Commit Graph

30 Commits

Author SHA1 Message Date
Ilya Mukhortov 6aa1db25aa FilterTabs: multi-select pill tabs with counts and status highlight
Like ContentTabs variant="pill" but several options can be on at once;
an empty value means «Все». Options take count and tone; highlight
colors selected options with their status tone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:29:09 +10:00
Ilya Mukhortov c9be29e6fb FilterBar: extended filters in a right-side drawer
The «Ещё» button now always opens a sheet on the right with the `more`
filters (applied immediately, «Сбросить все» and «Готово» in the footer).
«Ещё» and «Сбросить» sit at the right edge and wrap below on narrow bars.
New FilterSwitch for toggles in the drawer. collapseAt is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:29:09 +10:00
Ilya Mukhortov 50a01fc34e DataTable: container-width columns, grow and minWidth
Columns now adapt to the table's own width instead of the window's:
minWidth hides secondary columns, grow columns take the free space and
shrink first, and cardsBelow (640px) switches to renderCard cards.
useElementWidth moves to hooks/ and is still re-exported from chart-hover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:12:03 +10:00
Ilya Mukhortov 51611deece Add CHANGELOG.md with releases 0.1.0–0.8.0
From now on every tagged release adds its section here in the same commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:28:23 +10:00
Ilya Mukhortov 9fa8a46edc LoginScreen, 14px section tabs, release 0.8.0
- LoginScreen: login page layout, the form in a centered card on a soft dot
  grid, `note` under the card and `footer` at the bottom of the screen.
- Section tabs (PageTabs, "ещё N") and the PageFrame title move from 13px to
  14px and still match each other.
- Sidebar open cards under menu items move from 13px to 14px.
- text-ui (13px) is now meant for meta lines under a title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:24:07 +10:00
Ilya Mukhortov 87d12b72ec Text sizes through cn(), tab underline, sticky table header, release 0.7.1
- cn(): tailwind-merge knows text-ui / text-2xs / text-3xs. Before, text-ui
  was taken for a colour and dropped next to text-<colour>, so section tabs
  and other text-ui labels rendered at 16px instead of 13px (regression
  from 0.7.0).
- ContentTabs: the line underline no longer overflows the strip by 1px (the
  strip stopped being vertically scrollable); new `actions` slot puts
  buttons in the same row with one shared bottom line.
- DataTable: sticky header has a solid background and its divider is a cell
  shadow, so it scrolls with the header and rows don't show through.
- PageFrame: the title is a pill like the SectionTabsBar root tab
  (13px medium, same height and position).
- ScheduleGrid: solid sticky header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:14:11 +10:00
Ilya Mukhortov 770e2c35e6 EmptyState, FilterBar, ScheduleGrid, type scale, release 0.7.0
- EmptyState: icon tile, title, description and action; DataTable turns a
  string `empty` into one.
- FilterBar: filters wrap inside their own block, secondary toggles fold into
  an "Ещё" popover, "Сбросить" with a counter stays on the first row.
- ScheduleGrid: day grid by resource with status-coloured events, lanes for
  overlaps, off-hours hatching, clickable free slots and a "now" line.
- DataTable: `loading` skeleton rows and `renderCard` for narrow screens.
- Type scale tokens text-ui (13px), text-2xs (11px), text-3xs (10px) replace
  arbitrary text-[Npx] across the kit.
- Window shell, sidebar and frames use overflow-clip, so scrollIntoView and
  focus can no longer shift them; dark theme frame gets a faint ring.
- PatientPanel actions wrap on phones, pill ContentTabs cap at full width,
  DateRangeInput no longer shrinks in a flex row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:57:30 +10:00
Ilya Mukhortov 1d9c935b1e LoginForm without remember-me and forgot-password, release 0.6.0
Breaking: LoginCredentials has no `remember` field and LoginForm no longer
takes `onForgotPassword`. The form is login, password, sign-in and the
electronic signature button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:21:02 +10:00
Ilya Mukhortov 96239dd064 Window shell, section tabs, CopyValue, SearchField, release 0.5.0
The shell used to be copied into every app; now it lives in the kit:
- ShellProvider: the app passes location, navigate, storageKey and basename,
  so the kit stays router-agnostic and apps on one domain keep separate storage
- AppShell and AppSidebar: groups, badges, disabled items, open section tabs,
  search button, user menu; logo and header extras come from props
- SectionFrame with Alt+F maximize, SectionTabsProvider/SectionTabsBar and hooks,
  useCloseSectionTab instead of closeSectionTab
- createStore in lib/store
- CopyValue: click to copy with a short "Скопировано" tooltip
- SearchField: debounced filter, Enter applies at once, optional select for the next scan
- SearchInput: a passed onKeyDown no longer disables Esc-to-clear

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 12:07:20 +10:00
Ilya Mukhortov 4d04e9af68 Notice, Chip, Autocomplete, loading indicators, release 0.4.0
Replacements for MUI pieces the LIS still uses:
- Notice: inline error/warning/info/success message with title, action, close
- Chip: static, selectable, with count or remove button; MultiSelect chips use it
- Autocomplete: type-in field with suggestions, local filter or server search
- Spinner, LoadingBar, indeterminate Progress
- RadioGroup and Collapsible (height animation) from shadcn

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:52:31 +10:00
Ilya Mukhortov 7ac2af1b8b PatientPanel: cake icon before the birth date, birthIcon slot
The icon can be replaced via the birthIcon prop (e.g. with an interactive one).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:48:22 +10:00
Ilya Mukhortov ac8617d542 Status dots, page-controlled ConfirmDialog, system theme, release 0.3.0
- ContentTabs: tone dot before the label for status filter tabs;
  tabs with a zero count are dimmed
- StatusBadge: pulse for in-progress states (connecting, waiting for
  the device); StatusDot exported on its own
- ConfirmDialog: trigger is optional, open/onOpenChange let the page
  drive it; pending, error, disabled, content fields, footer,
  extraActions, onClosed. A Promise from onConfirm shows the spinner
  and error by itself and closes on success; the dialog can't be
  closed while pending; focus goes to the first field
- ThemeProvider: "system" mode that follows the OS, defaultTheme and
  storageKey props; Toaster works without the provider
- copyText with an execCommand fallback for plain http; copyToClipboard
  uses it and reports failures
- Dialog and Sheet: close button labelled "Закрыть" for screen readers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:41:05 +10:00
Ilya Mukhortov 7446adc55c Add LoginForm and InputOTP, release 0.2.0
LoginForm covers login/password, sign-in with an electronic signature
and a second step with a one-time code when onLogin (or onSignature)
returns an OtpChallenge. Errors are thrown from the async callbacks and
shown in the form.

- Password field: show/hide toggle, Caps Lock hint
- OTP step: auto-submit on the last digit, wrong code clears the field,
  resend after a countdown when the code was sent somewhere, back to
  the password step
- InputOTP primitive from shadcn (input-otp dependency), caret-blink
  animation in styles.css

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:31:17 +10:00
Ilya Mukhortov 5d22cf4948 Install from git: README, repository field, .gitignore
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 10:50:59 +10:00
Ilya Mukhortov 0f02a3c252 Extract UI kit into Medkit workspace package (@medkit/ui)
Move shadcn primitives, kit components, charts, theme provider, shared
hooks and utils (cn, format, masks, clipboard) into packages/medkit,
consumed as source via npm workspaces. The app now imports everything
from "@medkit/ui".

- Package-internal imports are relative; no @/ alias inside the kit
- Theme tokens, fonts and base styles move to @medkit/ui/styles.css,
  which registers its own @source so classes are found from node_modules
- NotifyToaster takes a navigate prop instead of depending on
  react-router; the app mounts it in App with useNavigate()
- Kit-only dependencies move to the package; react, react-dom and
  tailwindcss are peers
- Drop components.json (shadcn CLI unused, aliases no longer valid)
- Update UI docs and add a package README

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 10:48:51 +10:00
Ilya Mukhortov ab08dea5d6 Chief physician dashboard, reports and cases sections
- Главная (/dashboard): live "today" strip, KPI tiles with deltas and
  trends, attendance chart, patient path, doctor load heatmap, alerts,
  revenue by service and funding, doctors table, booking availability
  against the state-guarantee norm, process metrics
- Analytics mart (clinic-stats) with two years of seeded doctor×day facts
- Lightweight SVG charts in components/charts, --chart-* color tokens
- Reports section: catalog, report filters, queued runs and results
- Cases section and patient documents/profile updates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:14:32 +10:00
Ilya Mukhortov 8c21fb618b Logo double-click to home, drop SNILS menu item, explain tab dots
- Double-click on the МИС Медицина logo navigates to the home page
- Remove «Скопировать СНИЛС» from the patient ⋯ menu (header already copies it)
- Tab alert is now the reason text, not a flag: shown in the tab tooltip and
  on the sidebar row («Хроническая боль», «Новые ответы: 2»)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:51:25 +10:00
Ilya Mukhortov 97ea626045 Date/time widgets everywhere, TimeInput, profile block editing
- Replace native date inputs with DateInput / DateRangeInput (tasks,
  schedule, booking, doctor intervals, patient birth and issue dates)
- New TimeInput: «чч:мм» mask plus hour/minute picker; used for task due time
- Patient create: anonymous patient hides the name fields; SNILS under birth date
- Patient profile: every block edits in its own EditDialog (new kit component,
  InfoSection onEdit pencil); name copies on click; SNILS moved to the header
- UI_COMPONENTS.md / UI_STRUCTURE.md: component reference and design rules
  (dates via DateInput, time via TimeInput, block editing via EditDialog)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:31:12 +10:00
Ilya Mukhortov d7f7b3ecdb Open cards: fit tabs to width (max 4) with an "ещё N" menu
PageTabs shows as many card tabs as fit the bar width, at most
MAX_VISIBLE_TABS (4), measured from an invisible copy of the row and
recomputed on resize. The rest go into an "ещё N" dropdown where a
card can be opened or closed; the active card is always visible.
The sidebar uses the same split: all cards when there are up to five,
otherwise four plus "ещё N" with the same menu.

The close button inside menu items stops only click, not pointerdown:
otherwise Radix treats pointerup as an outside press and selects the
item, opening the card instead of closing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:18:40 +10:00
Ilya Mukhortov 4fee19d057 Messages: file attachments
Attach files with the paperclip, drag and drop onto the thread or paste
from the clipboard (up to 10 files, 20 MB each). Pending files show
above the input and survive switching conversations; a message can be
files only. In the thread images form a grid that opens in the
lightbox, other files render as cards. The lightbox and PDF preview
are extracted from FileGallery as FileViewer for reuse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:43:09 +10:00
Ilya Mukhortov 7ebaac8e1a Patient create form, /ui-form page with date and SNILS inputs, notify toasts
- Patients: create form with masks and validation, patients store
- Kit: SnilsInput, DateInput (manual entry + calendar), DateRangeInput
  (two months, presets), Combobox, notify toasts
- Date mask rejects impossible dates as you type (40.33, 31.04, 29.02.2027),
  pads 4 -> 04, overwrites digits in a full field, keeps the caret in place
- shadcn Calendar on react-day-picker 9 with Russian locale
- /ui-form showcase page, shared Showcase block, notify demo on /ui
- Logo heartbeat animation on hover and click
- .claude/launch.json with dev server configs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:23:26 +10:00
Ilya Mukhortov 13960689fd Booking: choose services like in the current MIS
- «Выбор услуг» dialog: doctor's / internal / all services, funding and
  category filters, search, checkboxes, selected total; already added
  services are marked
- booking form: services table with quantity, price, sum, category
  totals; profile's main service is added automatically; at least one
  service required; amount due in the summary and on the ticket
- appointment sheet in Schedule: services with payment status
  (не оплачено / оплачено / возвращено / отказ), totals and refunds
- demo price list (ОМС, платные, ДМС, внутренние) with codes from the MIS
- kit: ServicePicker, ServiceLinesTable (editable and compact modes);
  FormField accepts className; formatMoney

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:21:52 +10:00
Ilya Mukhortov 835fa7bd99 TimeRangeInput: minimal width, remove button overlays the corner
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:07:36 +10:00
Ilya Mukhortov c099858ad7 Registry and Schedule sections on top of the shared doctors store
- registry: section tabs — «Регистратура» day overview (stats, today's
  queue with next-step buttons, nearest free slots) and parallel
  «Запись на приём» tabs; tab label shows the chosen patient
- booking wizard: free slots of all doctors by date range, day part,
  specialty, doctor → patient, funding, service, comment → ticket;
  same-day warning, same-time block, «slot just taken» guard;
  reschedule cancels the old appointment
- schedule: day list across doctors with date nav, doctor/patient
  filters, status pills, online/canceled toggles, sorting; side sheet
  with appointment details and status flow (пришёл → на приёме →
  завершён, неявка, отмена с подтверждением, перенос)
- appointments gain status, source, booked by/at, funding, service,
  comment; demo data derives statuses from the current time
- patient card «Записать на приём» opens a booking tab with the patient
- kit: Stepper, PatientPicker; shadcn sheet

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:43:08 +10:00
Ilya Mukhortov 83d3e840b5 Doctors section: list, week schedule, interval settings, schedule profiles
- doctors open as section tabs; tab remembers subsection and week (?week=)
- list: search, alphabet (only present letters), specialty chips with
  counts, grouped by specialty, today's load, quick links to subsections
- schedule: week grid built from intervals and profiles; free/booked/past
  slots, live queue for zero-duration profiles, book via patient picker,
  cancel with undo, open patient card from a slot, vacation/off days
- settings: intervals with dates, active/vacation, «continue» copy,
  per-block weekday hours with presets; validation incl. overlaps;
  draft survives tab switches
- profiles: accordion form (duration, color, place, flags, funding,
  services), save/reset, delete with confirmation and usage warning
- mock intervals moved from 2018 to Sep–Dec 2026; deterministic demo
  appointments around today (some linked to patient cards)
- kit: TimeRangeInput, ConfirmDialog, SaveBar; ScrollArea horizontal;
  section tabs honour an explicit href when opening an existing tab

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:27:14 +10:00
Ilya Mukhortov c4cc228d80 Notifications and messages sections; live nav badges
- notifications: day groups, unread/read/all, type filters with counts,
  mark one/all read with undo, «Перейти» routes to the section
- messages: inbox with search and dm/group filter, thread with day
  dividers and grouped bubbles, Enter to send, per-chat drafts shown
  in the inbox, «Написать» colleague picker that opens or creates a DM;
  single pane on narrow screens
- sidebar badges for notifications/messages come from the stores
- sidebar collapses to an icon rail below 768px
- shared createStore (tasks store moved onto it), date helpers,
  SearchInput in the kit
- fix: effects returned scrollIntoView's Promise in recent Chrome

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:16:37 +10:00
Ilya Mukhortov 37c0248629 Tasks section: list, create form, task card with section tabs
- tasks open as section tabs (#1004, «Новая задача»), mirrored in sidebar
- list: search, status multi-select, segments, «мои задачи», reset,
  sorting and pagination; filters kept in the URL
- create: validation, multi-selects, date/time, file drop with previews;
  draft survives tab switches
- card: status change, priority, editable executors/observers,
  due badge, files, replies (private, reply-to, edit/delete own)
- in-memory tasks store shared by all tabs
- kit: MultiSelect, PersonChip/PersonAvatar, FileDrop, FormField/FormSection,
  removable FileGallery tiles

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:08:57 +10:00
Ilya Mukhortov 6d1a8719be Extract reusable kit components and add /ui showcase
Kit (src/components/kit): PageTabs, ContentTabs, PatientPanel, DataTable
with sorting, Pagination, FileGallery (image lightbox, PDF preview),
StatusBadge, StatTile, InfoSection/Field, DateLeaf, PageFrame, CodeBlock.
Patient pages now use them; search results are sortable; documents show
attachments. Replace next-themes with a small ThemeProvider (React 19
warned about its inline script).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:49:10 +10:00
Ilya Mukhortov 687a880a08 Thin auto-hiding overlay scrollbars; inbox icons below search
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:33:03 +10:00
Ilya Mukhortov 89f0d22357 Initial React + shadcn/ui scaffold: layout, section tabs, patients
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:21:07 +10:00