@alfadocs/ui-kit-debug 1.45.0 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{actions-cell-renderer-BXBy9c0f.js → actions-cell-renderer-B5m9lwgC.js} +2 -2
- package/dist/_chunks/{actions-cell-renderer-BXBy9c0f.js.map → actions-cell-renderer-B5m9lwgC.js.map} +1 -1
- package/dist/_chunks/ai-credits-notice-xszqOZTC.js +90 -0
- package/dist/_chunks/ai-credits-notice-xszqOZTC.js.map +1 -0
- package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js +17 -0
- package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js.map +1 -0
- package/dist/_chunks/{ai-consent-banner-D7I2U-cz.js → ai-permission-notice-D7I2U-cz.js} +1 -1
- package/dist/_chunks/ai-permission-notice-D7I2U-cz.js.map +1 -0
- package/dist/_chunks/ai-sparkle-D23NT8Z_.js +45 -0
- package/dist/_chunks/ai-sparkle-D23NT8Z_.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-DQUqwWc1.js → anamnesis-summary-rows-DI-UX5r6.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-DQUqwWc1.js.map → anamnesis-summary-rows-DI-UX5r6.js.map} +1 -1
- package/dist/_chunks/{appointment-card-TgR_2GKS.js → appointment-card-DluZy8Iv.js} +2 -2
- package/dist/_chunks/{appointment-card-TgR_2GKS.js.map → appointment-card-DluZy8Iv.js.map} +1 -1
- package/dist/_chunks/{appointment-peek-abiR0T9e.js → appointment-peek-BsfCpiJs.js} +3 -3
- package/dist/_chunks/{appointment-peek-abiR0T9e.js.map → appointment-peek-BsfCpiJs.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-CCnyUYKz.js → appointment-timeline-Cs5f9viN.js} +3 -3
- package/dist/_chunks/{appointment-timeline-CCnyUYKz.js.map → appointment-timeline-Cs5f9viN.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-N0yEI8UF.js → appointment-tray-CLrGGnKR.js} +2 -2
- package/dist/_chunks/{appointment-tray-N0yEI8UF.js.map → appointment-tray-CLrGGnKR.js.map} +1 -1
- package/dist/_chunks/baby-Dku-Xvg9.js +23 -0
- package/dist/_chunks/baby-Dku-Xvg9.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-o6LldMUA.js → balance-badge-cell-YGrYdrvR.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-o6LldMUA.js.map → balance-badge-cell-YGrYdrvR.js.map} +1 -1
- package/dist/_chunks/{booking-D43ASl8y.js → booking-B7gA9gFB.js} +279 -296
- package/dist/_chunks/booking-B7gA9gFB.js.map +1 -0
- package/dist/_chunks/button-group-CA1tmu39.js +325 -0
- package/dist/_chunks/button-group-CA1tmu39.js.map +1 -0
- package/dist/_chunks/{calendar-U6N0F99w.js → calendar-OzSeTb4V.js} +2 -2
- package/dist/_chunks/{calendar-U6N0F99w.js.map → calendar-OzSeTb4V.js.map} +1 -1
- package/dist/_chunks/{calendar-event-card-DKUnT9Be.js → calendar-event-card-B6N5h1dO.js} +57 -48
- package/dist/_chunks/{calendar-event-card-DKUnT9Be.js.map → calendar-event-card-B6N5h1dO.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-B7KvZ1_D.js → calendar-workspace-BB-BZT7W.js} +3002 -2912
- package/dist/_chunks/calendar-workspace-BB-BZT7W.js.map +1 -0
- package/dist/_chunks/{chart-PF2krCZC.js → chart-D8ucl8hH.js} +2 -2
- package/dist/_chunks/{chart-PF2krCZC.js.map → chart-D8ucl8hH.js.map} +1 -1
- package/dist/_chunks/{data-table-CcAx_I1w.js → data-table-DnKOmEVw.js} +2 -2
- package/dist/_chunks/{data-table-CcAx_I1w.js.map → data-table-DnKOmEVw.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-Psb6XKHR.js → editable-currency-cell-renderer-OUkUv7U4.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-Psb6XKHR.js.map → editable-currency-cell-renderer-OUkUv7U4.js.map} +1 -1
- package/dist/_chunks/{face-scheme-Bm6pe7R8.js → face-scheme-mIhwrQXt.js} +3 -3
- package/dist/_chunks/{face-scheme-Bm6pe7R8.js.map → face-scheme-mIhwrQXt.js.map} +1 -1
- package/dist/_chunks/{file-manager-BfLQxF5t.js → file-manager-DOcJGIx2.js} +4 -4
- package/dist/_chunks/{file-manager-BfLQxF5t.js.map → file-manager-DOcJGIx2.js.map} +1 -1
- package/dist/_chunks/{header-settings-CTe45iDy.js → header-settings-BEfx_-TF.js} +2 -2
- package/dist/_chunks/{header-settings-CTe45iDy.js.map → header-settings-BEfx_-TF.js.map} +1 -1
- package/dist/_chunks/{help-me-write-templates-GUeEn3Ff.js → help-me-write-templates-DHIwa4xR.js} +205 -199
- package/dist/_chunks/help-me-write-templates-DHIwa4xR.js.map +1 -0
- package/dist/_chunks/{hover-card-BMJBVqIf.js → hover-card-nUae8NPJ.js} +67 -62
- package/dist/_chunks/{hover-card-BMJBVqIf.js.map → hover-card-nUae8NPJ.js.map} +1 -1
- package/dist/_chunks/{icon-button-group-DkkdIygu.js → icon-button-group-DZKC6KGf.js} +181 -168
- package/dist/_chunks/icon-button-group-DZKC6KGf.js.map +1 -0
- package/dist/_chunks/kit-extensions-DuoFF1R3.js +94 -0
- package/dist/_chunks/kit-extensions-DuoFF1R3.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-DdwPj03y.js → marketplace-app-shell-PB89Dkk_.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-DdwPj03y.js.map → marketplace-app-shell-PB89Dkk_.js.map} +1 -1
- package/dist/_chunks/{notes-panel-Dkk9QPPX.js → notes-panel-CHbDDMx8.js} +83 -73
- package/dist/_chunks/notes-panel-CHbDDMx8.js.map +1 -0
- package/dist/_chunks/{patient-details-C8ImUrVg.js → patient-details-DUj1htsH.js} +2 -2
- package/dist/_chunks/{patient-details-C8ImUrVg.js.map → patient-details-DUj1htsH.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-BRSOKvme.js → patient-field-row-CO0WR7yA.js} +2 -2
- package/dist/_chunks/patient-field-row-CO0WR7yA.js.map +1 -0
- package/dist/_chunks/{patient-summary-card-BhmKB2KR.js → patient-summary-card-DNzdYjxE.js} +59 -45
- package/dist/_chunks/patient-summary-card-DNzdYjxE.js.map +1 -0
- package/dist/_chunks/rich-text-editor-BwDV2XkZ.js +4153 -0
- package/dist/_chunks/rich-text-editor-BwDV2XkZ.js.map +1 -0
- package/dist/_chunks/{tasks-panel-CpcikOeY.js → tasks-panel-DncuBPIZ.js} +2 -2
- package/dist/_chunks/{tasks-panel-CpcikOeY.js.map → tasks-panel-DncuBPIZ.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-bI0pgDDv.js → theme-toggle-BP0XRGMM.js} +2 -2
- package/dist/_chunks/{theme-toggle-bI0pgDDv.js.map → theme-toggle-BP0XRGMM.js.map} +1 -1
- package/dist/_chunks/use-ai-sparkle-Cf4yVTLB.js +76 -0
- package/dist/_chunks/use-ai-sparkle-Cf4yVTLB.js.map +1 -0
- package/dist/_chunks/{workflow-status-xeaJTzD3.js → workflow-status-CuJAOuKL.js} +43 -42
- package/dist/_chunks/{workflow-status-xeaJTzD3.js.map → workflow-status-CuJAOuKL.js.map} +1 -1
- package/dist/agent-catalog.json +32 -4
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/_shared/field-value.d.ts.map +1 -1
- package/dist/components/ai-credits-notice/ai-credits-notice.agent.d.ts +3 -0
- package/dist/components/ai-credits-notice/ai-credits-notice.agent.d.ts.map +1 -0
- package/dist/components/ai-credits-notice/ai-credits-notice.d.ts +48 -0
- package/dist/components/ai-credits-notice/ai-credits-notice.d.ts.map +1 -0
- package/dist/components/ai-credits-notice/index.d.ts +4 -0
- package/dist/components/ai-credits-notice/index.d.ts.map +1 -0
- package/dist/components/ai-credits-notice/index.js +7 -0
- package/dist/components/ai-credits-notice/index.js.map +1 -0
- package/dist/components/{ai-consent-banner/ai-consent-banner.agent.d.ts → ai-permission-notice/ai-permission-notice.agent.d.ts} +2 -2
- package/dist/components/ai-permission-notice/ai-permission-notice.agent.d.ts.map +1 -0
- package/dist/components/{ai-consent-banner/ai-consent-banner.d.ts → ai-permission-notice/ai-permission-notice.d.ts} +1 -1
- package/dist/components/ai-permission-notice/ai-permission-notice.d.ts.map +1 -0
- package/dist/components/ai-permission-notice/index.d.ts +4 -0
- package/dist/components/ai-permission-notice/index.d.ts.map +1 -0
- package/dist/components/{ai-consent-banner → ai-permission-notice}/index.js +1 -1
- package/dist/components/ai-sparkle/ai-sparkle.d.ts +3 -3
- package/dist/components/ai-sparkle/ai-sparkle.d.ts.map +1 -1
- package/dist/components/ai-sparkle/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button-group/button-group.d.ts.map +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/hover-card/hover-card.d.ts +4 -0
- package/dist/components/hover-card/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card/index.d.ts +1 -1
- package/dist/components/hover-card/index.d.ts.map +1 -1
- package/dist/components/hover-card/index.js +3 -2
- package/dist/components/icon-button-group/icon-button-group.d.ts.map +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +10 -0
- package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/rich-text-editor/editor-extensions.d.ts +54 -0
- package/dist/components/rich-text-editor/editor-extensions.d.ts.map +1 -0
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +2 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -1
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +4 -0
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.d.ts +2 -0
- package/dist/components/rich-text-editor/index.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +6 -4
- package/dist/components/rich-text-editor/index.js.map +1 -1
- package/dist/components/rich-text-editor/kit-extensions.d.ts +4 -0
- package/dist/components/rich-text-editor/kit-extensions.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +18 -2
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/components/workflow-status/workflow-status.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +51 -53
- package/dist/hooks/use-ai-sparkle.d.ts +7 -25
- package/dist/hooks/use-ai-sparkle.d.ts.map +1 -1
- package/dist/host-compat.css +2 -2
- package/dist/i18n/locales/ar.d.ts +31 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +33 -2
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +31 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +33 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +31 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +33 -2
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +31 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +33 -2
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +31 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +33 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +31 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +33 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +31 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +33 -2
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +31 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +33 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +31 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +33 -2
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +31 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +33 -2
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +31 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +33 -2
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +31 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +33 -2
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +31 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +33 -2
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +31 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +33 -2
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +31 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +33 -2
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +31 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +33 -2
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +31 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +33 -2
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +31 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +33 -2
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +646 -639
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +33 -2
- package/dist/locales/de.json +33 -2
- package/dist/locales/el.json +33 -2
- package/dist/locales/en.json +33 -2
- package/dist/locales/es.json +33 -2
- package/dist/locales/fr.json +33 -2
- package/dist/locales/hi.json +33 -2
- package/dist/locales/it.json +33 -2
- package/dist/locales/ja.json +33 -2
- package/dist/locales/nl.json +33 -2
- package/dist/locales/pl.json +33 -2
- package/dist/locales/pt.json +33 -2
- package/dist/locales/ro.json +33 -2
- package/dist/locales/ru.json +33 -2
- package/dist/locales/sq.json +33 -2
- package/dist/locales/sv.json +33 -2
- package/dist/locales/tr.json +33 -2
- package/dist/locales/zh.json +33 -2
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-bookings-panel.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +6 -4
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.data.d.ts +9 -0
- package/dist/patterns/calendar/calendar.data.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts +16 -5
- package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.types.d.ts +3 -1
- package/dist/patterns/calendar/calendar.types.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +11 -2
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts.map +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +14 -4
- package/dist/_chunks/ai-consent-banner-D7I2U-cz.js.map +0 -1
- package/dist/_chunks/ai-sparkle-DXeP_6a0.js +0 -52
- package/dist/_chunks/ai-sparkle-DXeP_6a0.js.map +0 -1
- package/dist/_chunks/booking-D43ASl8y.js.map +0 -1
- package/dist/_chunks/button-group-R32U7SyV.js +0 -307
- package/dist/_chunks/button-group-R32U7SyV.js.map +0 -1
- package/dist/_chunks/calendar-workspace-B7KvZ1_D.js.map +0 -1
- package/dist/_chunks/help-me-write-templates-GUeEn3Ff.js.map +0 -1
- package/dist/_chunks/icon-button-group-DkkdIygu.js.map +0 -1
- package/dist/_chunks/notes-panel-Dkk9QPPX.js.map +0 -1
- package/dist/_chunks/patient-field-row-BRSOKvme.js.map +0 -1
- package/dist/_chunks/patient-summary-card-BhmKB2KR.js.map +0 -1
- package/dist/_chunks/rich-text-editor-BrAvNajV.js +0 -3779
- package/dist/_chunks/rich-text-editor-BrAvNajV.js.map +0 -1
- package/dist/_chunks/use-ai-sparkle-CyQSRTCe.js +0 -103
- package/dist/_chunks/use-ai-sparkle-CyQSRTCe.js.map +0 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts.map +0 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts.map +0 -1
- package/dist/components/ai-consent-banner/index.d.ts +0 -4
- package/dist/components/ai-consent-banner/index.d.ts.map +0 -1
- /package/dist/components/{ai-consent-banner → ai-permission-notice}/index.js.map +0 -0
|
@@ -7,7 +7,7 @@ import { B as t } from "./badge-BudgzTe_.js";
|
|
|
7
7
|
import { T as ua } from "./tag-Ci3xJPcH.js";
|
|
8
8
|
import { T as ma } from "./timestamp-BV2lC-wV.js";
|
|
9
9
|
import { T as Y } from "./transaction-chip-CwgcJiqF.js";
|
|
10
|
-
import { a as fa } from "./workflow-status-
|
|
10
|
+
import { a as fa } from "./workflow-status-CuJAOuKL.js";
|
|
11
11
|
import { i as ga } from "./is-safe-url-DkETxeHz.js";
|
|
12
12
|
import { a as ha, b as va, c as ba } from "./entity-card-I-Gio5wo.js";
|
|
13
13
|
import { V as xa } from "./video-BheNGvsu.js";
|
|
@@ -454,4 +454,4 @@ Pa.displayName = "AppointmentCard";
|
|
|
454
454
|
export {
|
|
455
455
|
Pa as A
|
|
456
456
|
};
|
|
457
|
-
//# sourceMappingURL=appointment-card-
|
|
457
|
+
//# sourceMappingURL=appointment-card-DluZy8Iv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-card-TgR_2GKS.js","sources":["../../node_modules/lucide-react/dist/esm/icons/clipboard-plus.mjs","../../node_modules/lucide-react/dist/esm/icons/file-pen-line.mjs","../../node_modules/lucide-react/dist/esm/icons/message-square-text.mjs","../../src/components/appointment-card/appointment-card.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"8\", height: \"4\", x: \"8\", y: \"2\", rx: \"1\", ry: \"1\", key: \"tgr4d6\" }],\n [\n \"path\",\n {\n d: \"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\",\n key: \"116196\"\n }\n ],\n [\"path\", { d: \"M9 14h6\", key: \"159ibu\" }],\n [\"path\", { d: \"M12 17v-6\", key: \"1y8rbf\" }]\n];\nconst ClipboardPlus = createLucideIcon(\"clipboard-plus\", __iconNode);\n\nexport { __iconNode, ClipboardPlus as default };\n//# sourceMappingURL=clipboard-plus.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z\",\n key: \"ukzhwg\"\n }\n ],\n [\"path\", { d: \"M14.487 7.858A1 1 0 0 1 14 7V2\", key: \"1klhew\" }],\n [\n \"path\",\n {\n d: \"M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516\",\n key: \"rxaxab\"\n }\n ],\n [\"path\", { d: \"M8 18h1\", key: \"13wk12\" }]\n];\nconst FilePenLine = createLucideIcon(\"file-pen-line\", __iconNode);\n\nexport { __iconNode, FilePenLine as default };\n//# sourceMappingURL=file-pen-line.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z\",\n key: \"18887p\"\n }\n ],\n [\"path\", { d: \"M7 11h10\", key: \"1twpyw\" }],\n [\"path\", { d: \"M7 15h6\", key: \"d9of3u\" }],\n [\"path\", { d: \"M7 7h8\", key: \"af5zfr\" }]\n];\nconst MessageSquareText = createLucideIcon(\"message-square-text\", __iconNode);\n\nexport { __iconNode, MessageSquareText as default };\n//# sourceMappingURL=message-square-text.mjs.map\n","import { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n Armchair,\n ChevronRight,\n ClipboardPlus,\n FileSignature,\n Globe,\n MapPin,\n MessageSquareText,\n Repeat,\n Star,\n UserX,\n Video,\n} from 'lucide-react';\nimport { Avatar } from '../avatar/avatar';\nimport { Badge } from '../badge/badge';\nimport { Tag } from '../tag/tag';\nimport { Timestamp } from '../timestamp/timestamp';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport {\n appointmentStateWorkflow,\n colorIdToToken,\n colorIdToAvatarToken,\n isSafeEntityUrl,\n} from '../_shared/entity-card';\nimport type { AppointmentState } from '../_shared/entity-card';\nimport { WorkflowStatusDisplay } from '../workflow-status';\n\n/*\n * Closed colour-dot class map. `colorIdToToken` resolves the operator's\n * numeric colour id to one of a fixed set of palette tokens; the operator\n * dot needs a *static* Tailwind class for each so the compiler can emit it\n * (dynamic `ds:bg-[…]` strings are not seen by the JIT). The keys mirror the\n * exact token strings the shared helper returns.\n */\nconst OPERATOR_DOT_CLASS: Record<string, string> = {\n 'var(--color-violet-500)': 'ds:bg-[var(--color-violet-500)]',\n 'var(--color-purple-500)': 'ds:bg-[var(--color-purple-500)]',\n 'var(--color-magenta-500)': 'ds:bg-[var(--color-magenta-500)]',\n 'var(--color-blue-500)': 'ds:bg-[var(--color-blue-500)]',\n 'var(--color-green-500)': 'ds:bg-[var(--color-green-500)]',\n 'var(--color-red-500)': 'ds:bg-[var(--color-red-500)]',\n 'var(--color-yellow-500)': 'ds:bg-[var(--color-yellow-500)]',\n 'var(--color-indigo-500)': 'ds:bg-[var(--color-indigo-500)]',\n 'var(--color-orange-500)': 'ds:bg-[var(--color-orange-500)]',\n 'var(--color-fuchsia-500)': 'ds:bg-[var(--color-fuchsia-500)]',\n 'var(--color-grey-700)': 'ds:bg-[var(--color-grey-700)]',\n};\n\nfunction operatorDotClass(colorId: number | string | undefined): string {\n return (\n OPERATOR_DOT_CLASS[colorIdToToken(colorId)] ??\n 'ds:bg-[var(--color-grey-700)]'\n );\n}\n\n/** Age in whole years from a DOB string, or undefined if unparseable. */\nfunction ageFromDob(dobIso: string | undefined): number | undefined {\n if (!dobIso) return undefined;\n const dob = new Date(dobIso);\n if (Number.isNaN(dob.getTime())) return undefined;\n const now = new Date();\n let age = now.getFullYear() - dob.getFullYear();\n const monthDiff = now.getMonth() - dob.getMonth();\n if (monthDiff < 0 || (monthDiff === 0 && now.getDate() < dob.getDate())) {\n age--;\n }\n return age < 0 || age > 130 ? undefined : age;\n}\n\n/* -------------------------------------------------------------------- */\n/* AppointmentCard */\n/* */\n/* Single-row appointment surface — sibling of AgendaCard, but richer: */\n/* leading timestamp, operator + patient avatars with the operator */\n/* colour dot, a lifecycle-state Badge (announced by label, never colour */\n/* alone), treatment / tooth Tags, and an optional advance-deposit */\n/* TransactionChip. State→Badge-variant + colour-id→token + URL-safety */\n/* come from the shared `_shared/entity-card` helpers. */\n/* */\n/* All visible text flows through useTranslation('ui') against the */\n/* `appointmentCard.*` namespace (plus shared `financial.*` for money). */\n/* -------------------------------------------------------------------- */\n\n// Back-compat / one-stop import — the URL guard lives in the shared helper.\nexport { isSafeEntityUrl as isSafeAppointmentUrl } from '../_shared/is-safe-url';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** Appointment delivery channel. */\nexport type AppointmentType = 'inPractice' | 'telehealth';\n\n/** First-visit tri-state flag. */\nexport type AppointmentFirstVisit = 'yes' | 'no' | 'unknown';\n\n/** Operator (clinician) summary — name + optional palette colour id. */\nexport interface AppointmentOperator {\n /** Operator display name — drives the avatar initials + accessible name. */\n name: string;\n /** Numeric palette colour id, resolved to a kit token for the colour dot. */\n colorId?: number | string;\n}\n\n/** Patient summary — identity + optional age driver. */\nexport interface AppointmentPatient {\n /** Patient display name. */\n name: string;\n /** Optional avatar image URL. */\n avatarUrl?: string;\n /** ISO-8601 date of birth — when present, the card renders the age as a\n * suffix on the name (e.g. \"Carol Danvers · 45\"). */\n dobIso?: string;\n}\n\n/** One treatment line within the appointment. */\nexport interface AppointmentTreatment {\n /** Localised care / treatment name. */\n careName: string;\n /** Optional tooth elements (e.g. FDI ids) the treatment targets. */\n elements?: string[];\n}\n\n/** Booking-reason metadata captured at online-booking time. */\nexport interface AppointmentBookingReason {\n /** Localised booking-reason description. */\n description: string;\n /** Expected duration in minutes. */\n durationMin?: number;\n /** Advance / deposit amount in cents (non-negative). */\n advanceAmountCents?: number;\n /** Localised specialty label. */\n specialty?: string;\n}\n\n/** Money summary for the appointment. */\nexport interface AppointmentMoney {\n /** Total billable amount in cents. When present, rendered as a\n * TransactionChip. */\n billableAmountCents?: number;\n /** Outstanding unpaid amount in cents. When > 0, rendered as a warning\n * TransactionChip so the front desk can flag it at a glance. */\n unpaidAmountCents?: number;\n}\n\n/** Signing status for documents attached to the appointment. */\nexport interface AppointmentSigning {\n /** How many documents require a signature. */\n required: number;\n /** How many have been completed so far. */\n toComplete: number;\n}\n\n/** Boolean appointment flags surfaced as chips / indicators. */\nexport interface AppointmentFlags {\n bookedOnline?: boolean;\n noPatientAssigned?: boolean;\n highlightedAnamnesis?: boolean;\n billable?: boolean;\n}\n\nexport interface AppointmentItem {\n /** Stable appointment identifier. */\n id: string;\n /** ISO-8601 start instant. */\n startIso: string;\n /** Duration in minutes. */\n durationMin: number;\n /** Lifecycle state — drives the Badge variant + label. */\n state: AppointmentState;\n /** Delivery channel — drives the leading type glyph. */\n type: AppointmentType;\n /** First-visit flag. */\n firstVisit?: AppointmentFirstVisit;\n /** Assigned operator. */\n operator?: AppointmentOperator;\n /** Chair / room label — surfaced as a chip. */\n chair?: string;\n /**\n * The care plan this appointment belongs to, when any — surfaced as a chip\n * (`Care plan {number}`). `url` is the deep link the consumer may use for\n * navigation; the chip itself is non-interactive so it never nests an anchor\n * inside the row's own stretched link.\n */\n carePlan?: { number: string; url?: string };\n /** Patient identity. */\n patient?: AppointmentPatient;\n /** Treatment lines. */\n treatments?: AppointmentTreatment[];\n /** Online booking-reason metadata. */\n bookingReason?: AppointmentBookingReason;\n /** Boolean flags. */\n flags?: AppointmentFlags;\n /** Money summary — billable + unpaid amounts. */\n money?: AppointmentMoney;\n /** Whether this appointment is part of a recurring series. */\n recurring?: boolean;\n /** Signing status for attached documents. */\n signing?: AppointmentSigning;\n /** A note left by the patient at booking time. When present, a small\n * message icon signals it. */\n bookingNote?: string;\n /** Optional deep link — when present (and safe) the row renders as an anchor. */\n url?: string;\n /**\n * Settle the row visually without removing it from the list — a muted\n * wash in place of the elevated surface, shadow dropped. Text keeps its\n * normal foreground colour so contrast is unaffected; only the chrome\n * dims. For a row already concluded (done / no-show) that a host still\n * wants listed alongside what's still ahead.\n */\n dimmed?: boolean;\n /**\n * Marks this as the NEXT appointment to start — a steady accent outline\n * (a state, not a one-off address, so it never animates) plus a small\n * \"Next\" label. The cue never rests on colour alone.\n */\n next?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA — row */\n/* -------------------------------------------------------------------- */\n\nconst appointmentCardVariants = cva(\n [\n 'ds:relative ds:flex ds:items-start ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:text-start ds:group',\n 'ds:bg-[var(--card)] ds:text-[color:var(--card-foreground)]',\n 'ds:transition-[colors,border-color,box-shadow] ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n 'ds:forced-colors:border ds:forced-colors:border-[CanvasText]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:p-[var(--spacing-sm)]',\n md: 'ds:p-[var(--spacing-md)]',\n },\n interactive: {\n true: 'ds:hover:bg-[color:var(--muted)]/40 ds:cursor-pointer',\n false: '',\n },\n surface: {\n // `flat` (default) is the chrome-less row used inside a bordered\n // AppointmentTray. `elevated` gives each row its own card chrome\n // (border + shadow) for use directly on a rail, e.g. AppointmentTimeline.\n // Uses `--shadow-sm` (a row lift), not `--shadow-card`/`--shadow-lg`:\n // the rail's `overflow-y:auto` scroll region clips `overflow-x` at a\n // narrow gutter, so a wide 30px-blur shadow gets a hard-edged clip.\n flat: '',\n elevated:\n 'ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2 ds:shadow-[var(--shadow-sm)]',\n },\n selected: {\n // The row the host has marked as the active/selected appointment —\n // matches the `current` note's info-tinted accent: a solid\n // inline-start bar plus a soft info wash, so the eye keeps its\n // place in the list after a click.\n true: 'ds:border-s-2 ds:border-s-[color:var(--info)] ds:bg-[color:var(--info)]/10',\n false: '',\n },\n dimmed: {\n // Settled (concluded / no-show) rows: a muted wash instead of the\n // elevated card surface, shadow dropped. Only the CHROME dims —\n // text stays `--card-foreground` / `--muted-foreground`, so AA\n // contrast is untouched in every theme.\n true: 'ds:bg-[color:var(--muted)]/40 ds:shadow-none',\n false: '',\n },\n next: {\n // The next appointment to start: a STEADY accent outline (a state,\n // not a one-off address like the notes/bookings \"addressed\" ring,\n // so no keyframe replay). `outline` rather than `border` keeps the\n // row's own border/radius untouched.\n true: 'ds:outline ds:outline-2 ds:outline-[color:var(--accent)] ds:[outline-offset:-1px] ds:forced-colors:outline-[Highlight]',\n false: '',\n },\n },\n defaultVariants: {\n size: 'sm',\n interactive: false,\n surface: 'flat',\n selected: false,\n dimmed: false,\n next: false,\n },\n },\n);\n\nconst stretchedLinkClass = [\n // Interactive elements need a box to remain keyboard-focusable in browsers.\n 'ds:inline-flex ds:min-w-0',\n 'ds:focus-visible:outline-none',\n \"ds:after:content-[''] ds:after:absolute ds:after:inset-0 ds:after:rounded-[var(--radius-md)]\",\n 'ds:after:pointer-events-auto',\n 'ds:focus-visible:after:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:after:outline-solid',\n 'ds:focus-visible:after:outline-[color:var(--ring)]',\n 'ds:focus-visible:after:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:after:outline-[CanvasText]',\n].join(' ');\n\nconst TYPE_ICON: Record<AppointmentType, typeof MapPin> = {\n inPractice: MapPin,\n telehealth: Video,\n};\n\n/* -------------------------------------------------------------------- */\n/* Props */\n/* -------------------------------------------------------------------- */\n\nexport interface AppointmentCardProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'title'>,\n VariantProps<typeof appointmentCardVariants> {\n /** The appointment to render. */\n item: AppointmentItem;\n /** Visual density. */\n size?: 'sm' | 'md';\n /**\n * `'flat'` (default) — chrome-less row for use inside a bordered\n * `AppointmentTray`. `'elevated'` — each row carries its own card chrome\n * (border + shadow), for placing rows directly on a rail (AppointmentTimeline).\n */\n surface?: 'flat' | 'elevated';\n /** BCP-47 locale override for the timestamp + currency. */\n locale?: string;\n /** ISO-4217 currency code for the advance-deposit chip. Defaults to `EUR`. */\n currency?: string;\n /**\n * Show the patient identity (avatar + name as the row title). Default `true`.\n * Set `false` in single-patient surfaces (e.g. a patient's own\n * `AppointmentTimeline`) where repeating the name is redundant — the row then\n * leads with the operator as its title, falling back to a generic label.\n */\n showPatient?: boolean;\n /** Fires when the row is activated. */\n onActivate?: (item: AppointmentItem) => void;\n /**\n * Mark this row as the active/selected appointment — an info-tinted\n * inline-start bar plus a soft wash, so the eye keeps its place in the\n * list after a click. Renders `aria-current=\"true\"` for assistive tech.\n */\n selected?: boolean;\n /**\n * Withhold the lifecycle-state badge when the item's state is the\n * default/expected one (`confirmed`) — it needs no announcement, and\n * dropping it leaves the badge to states that actually ask for\n * attention. Default `false` (today's behaviour: every state, including\n * `confirmed`, shows its badge) so existing consumers are unaffected.\n */\n hideDefaultStatus?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const AppointmentCard = forwardRef<HTMLDivElement, AppointmentCardProps>(\n (\n {\n item,\n size = 'sm',\n surface = 'flat',\n locale,\n currency = 'EUR',\n showPatient = true,\n onActivate,\n selected = false,\n hideDefaultStatus = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const interactive = !!onActivate;\n const hasSafeUrl = !!item.url && isSafeEntityUrl(item.url);\n const showStatus = !(hideDefaultStatus && item.state === 'confirmed');\n\n const patientName = item.patient?.name ?? t('appointmentCard.noPatient');\n const operatorName = item.operator?.name;\n const stateLabel = t(`appointmentCard.state.${item.state}`);\n const stateWorkflow = appointmentStateWorkflow(item.state);\n const StateIcon = stateWorkflow.Icon;\n const patientAge = ageFromDob(item.patient?.dobIso);\n const noPatient = item.flags?.noPatientAssigned || !item.patient;\n\n const avatarSize = size === 'md' ? 'md' : 'sm';\n const TypeIcon = TYPE_ICON[item.type];\n\n // In single-patient context the patient name is redundant, so the row leads\n // with the operator (the \"who am I seeing\") and falls back to a generic\n // label when no operator is set.\n const title = showPatient\n ? patientName\n : (operatorName ?? t('appointmentCard.appointment'));\n\n const ariaLabel = showPatient\n ? t('appointmentCard.itemLabel', {\n patient: patientName,\n state: stateLabel,\n })\n : t('appointmentCard.itemLabelGeneric', { title, state: stateLabel });\n\n const titleNode = (\n <span className=\"ds:min-w-0 ds:truncate type-title-item ds:text-[color:var(--foreground)]\">\n {title}\n {showPatient && patientAge !== undefined ? (\n <span className=\"ds:ms-[var(--spacing-2xs)] ds:font-normal ds:text-[color:var(--muted-foreground)]\">\n · {patientAge}\n </span>\n ) : null}\n </span>\n );\n\n let activator: ReactNode;\n if (interactive && hasSafeUrl) {\n activator = (\n <a\n href={item.url}\n aria-label={ariaLabel}\n className={stretchedLinkClass}\n onClick={(e) => {\n if (e.defaultPrevented || e.metaKey || e.ctrlKey || e.shiftKey)\n return;\n onActivate?.(item);\n }}\n >\n {titleNode}\n </a>\n );\n } else if (interactive) {\n activator = (\n <button\n type=\"button\"\n aria-label={ariaLabel}\n className={\n stretchedLinkClass +\n ' ds:bg-transparent ds:border-0 ds:p-0 ds:text-start'\n }\n onClick={() => onActivate?.(item)}\n >\n {titleNode}\n </button>\n );\n } else {\n activator = titleNode;\n }\n\n // Treatment / tooth-element Tags. Each treatment becomes one Tag; the\n // tooth elements (when present) are appended to the visible label.\n const treatmentTags = (item.treatments ?? []).map((tx, index) => {\n const label =\n tx.elements && tx.elements.length > 0\n ? t('appointmentCard.treatmentWithElements', {\n care: tx.careName,\n elements: tx.elements.join(', '),\n })\n : tx.careName;\n return (\n <Tag\n key={`${tx.careName}-${index}`}\n label={label}\n variant=\"neutral\"\n fill=\"outline\"\n size=\"sm\"\n maxInlineSize=\"12rem\"\n />\n );\n });\n\n const advanceCents = item.bookingReason?.advanceAmountCents;\n const hasAdvance = typeof advanceCents === 'number' && advanceCents > 0;\n const unpaidCents = item.money?.unpaidAmountCents;\n const hasUnpaid = typeof unpaidCents === 'number' && unpaidCents > 0;\n\n return (\n <div\n ref={ref}\n /* `listitem` by default — the card is normally a list child. A\n consumer composing a richer row (card plus its own action row)\n owns the semantics instead and passes `role=\"presentation\"`,\n so the two do not nest. `rest` is spread after this. */\n role=\"listitem\"\n data-component=\"appointment-card\"\n data-component-id={item.id}\n data-state={item.state}\n data-type={item.type}\n aria-current={selected ? 'true' : undefined}\n className={appointmentCardVariants({\n size,\n interactive,\n surface,\n selected,\n dimmed: item.dimmed,\n next: item.next,\n className,\n })}\n {...rest}\n >\n {/* Leading rail: type glyph + start time + duration */}\n {/* min-w, not a fixed w: a 12-hour time (\"10:30 AM\") plus the type\n glyph is wider than 4rem, and must never wrap AM/PM onto a\n second line. */}\n <span className=\"ds:flex ds:min-w-20 ds:shrink-0 ds:flex-col ds:items-start ds:gap-[var(--spacing-2xs)]\">\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:whitespace-nowrap ds:text-[color:var(--muted-foreground)]\">\n <TypeIcon aria-hidden=\"true\" className=\"ds:size-3.5 ds:shrink-0\" />\n <span className=\"ds:sr-only\">\n {t(`appointmentCard.type.${item.type}`)}\n </span>\n <Timestamp\n value={item.startIso}\n format=\"absolute\"\n shape=\"bare\"\n locale={locale}\n absoluteFormat={{ hour: 'numeric', minute: '2-digit' }}\n className=\"type-body-sm ds:font-medium ds:text-[color:var(--foreground)] ds:tabular-nums\"\n />\n </span>\n <span className=\"type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {t('appointmentCard.duration', { count: item.durationMin })}\n </span>\n </span>\n\n {/* Operator avatar with colour dot */}\n {operatorName ? (\n <span className=\"ds:relative ds:shrink-0\">\n <Avatar\n name={operatorName}\n color={colorIdToAvatarToken(item.operator?.colorId)}\n size={avatarSize}\n aria-hidden=\"true\"\n role=\"presentation\"\n aria-label={undefined}\n />\n <span\n aria-hidden=\"true\"\n className={\n 'ds:absolute ds:bottom-0 ds:end-0 ds:size-2.5 ds:rounded-[var(--radius-full)] ds:border ds:border-[color:var(--card)] ' +\n operatorDotClass(item.operator?.colorId)\n }\n />\n </span>\n ) : null}\n\n {/* Main content column */}\n <div className=\"ds:flex-1 ds:min-w-0 ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex-1 ds:min-w-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {showPatient && item.patient?.avatarUrl ? (\n <Avatar\n name={patientName}\n src={item.patient.avatarUrl}\n size={avatarSize}\n className=\"ds:shrink-0\"\n aria-hidden=\"true\"\n role=\"presentation\"\n aria-label={undefined}\n />\n ) : null}\n {showPatient && noPatient ? (\n <span\n className={`ds:shrink-0 ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-full)] ds:bg-[color:var(--muted)] ds:text-[color:var(--muted-foreground)] ${\n avatarSize === 'md' ? 'ds:size-10' : 'ds:size-8'\n }`}\n >\n <UserX aria-hidden=\"true\" className=\"ds:size-4\" />\n </span>\n ) : null}\n {activator}\n </div>\n {item.next ? (\n <Badge\n variant=\"accentSoft\"\n size=\"sm\"\n className=\"ds:shrink-0\"\n aria-hidden=\"true\"\n >\n {t('appointmentCard.next')}\n </Badge>\n ) : null}\n {/* The kit's read-only status surface, not a bare Badge: an\n appointment's status is the same thing on a card, in a details\n footer and in a history entry, so it wears one face and takes\n its tone and glyph from the shared map. `hideDefaultStatus`\n withholds it for the expected/default state only. */}\n {showStatus ? (\n <WorkflowStatusDisplay\n size=\"sm\"\n value={item.state}\n option={{\n value: item.state,\n label: stateLabel,\n icon: <StateIcon aria-hidden=\"true\" />,\n tone: stateWorkflow.tone,\n }}\n className=\"ds:shrink-0\"\n />\n ) : null}\n </div>\n {item.next ? (\n <span className=\"ds:sr-only\">{t('appointmentCard.nextSr')}</span>\n ) : null}\n\n {/* Meta line: operator name · specialty · first visit · booking note\n (chair moved to a chip below). When the patient is hidden the\n operator is promoted to the title, so it drops out of the meta. */}\n {(showPatient && operatorName) ||\n item.bookingReason?.specialty ||\n item.firstVisit === 'yes' ||\n item.firstVisit === 'unknown' ||\n item.bookingNote ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)] type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {showPatient && operatorName ? <span>{operatorName}</span> : null}\n {item.bookingReason?.specialty ? (\n <span>{item.bookingReason.specialty}</span>\n ) : null}\n {item.firstVisit === 'yes' ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]\">\n <Star aria-hidden=\"true\" className=\"ds:size-3 ds:shrink-0\" />\n {t('appointmentCard.firstVisit')}\n </span>\n ) : null}\n {item.firstVisit === 'unknown' ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]\">\n <Star aria-hidden=\"true\" className=\"ds:size-3 ds:shrink-0\" />\n {t('appointmentCard.firstVisitUnknown')}\n </span>\n ) : null}\n {item.bookingNote ? (\n <span\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]\"\n title={t('appointmentCard.hasBookingNote')}\n >\n <MessageSquareText\n aria-hidden=\"true\"\n className=\"ds:size-3 ds:shrink-0\"\n />\n {t('appointmentCard.hasBookingNote')}\n </span>\n ) : null}\n </div>\n ) : null}\n\n {/* Booking reason */}\n {item.bookingReason?.description ? (\n <span className=\"type-body-sm ds:text-[color:var(--foreground)] ds:truncate\">\n {item.bookingReason.description}\n </span>\n ) : null}\n\n {/* Treatment / tooth Tags */}\n {treatmentTags.length > 0 ? (\n <div className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {treatmentTags}\n </div>\n ) : null}\n\n {/* Chips: care plan · chair · flags · recurring · signing ·\n advance-deposit · unpaid balance · billable */}\n {item.carePlan ||\n item.chair ||\n item.flags?.bookedOnline ||\n item.flags?.highlightedAnamnesis ||\n item.flags?.billable ||\n item.recurring ||\n item.signing ||\n hasAdvance ||\n hasUnpaid ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n {item.carePlan ? (\n <Badge\n variant=\"accentSoft\"\n size=\"sm\"\n leading={<ClipboardPlus />}\n >\n {t('appointmentCard.carePlan', {\n number: item.carePlan.number,\n })}\n </Badge>\n ) : null}\n {item.chair ? (\n <Badge variant=\"neutral\" size=\"sm\" leading={<Armchair />}>\n {t('appointmentCard.chair', { chair: item.chair })}\n </Badge>\n ) : null}\n {item.flags?.bookedOnline ? (\n <Badge variant=\"info\" size=\"sm\" leading={<Globe />}>\n {t('appointmentCard.flag.bookedOnline')}\n </Badge>\n ) : null}\n {item.flags?.highlightedAnamnesis ? (\n <Badge variant=\"warning\" size=\"sm\" withDot>\n {t('appointmentCard.flag.highlightedAnamnesis')}\n </Badge>\n ) : null}\n {item.recurring ? (\n <Badge variant=\"neutral\" size=\"sm\" leading={<Repeat />}>\n {t('appointmentCard.recurring')}\n </Badge>\n ) : null}\n {item.signing ? (\n <Badge\n variant={\n item.signing.toComplete >= item.signing.required\n ? 'success'\n : 'warning'\n }\n size=\"sm\"\n leading={<FileSignature />}\n >\n {t('appointmentCard.signing', {\n complete: item.signing.toComplete,\n required: item.signing.required,\n })}\n </Badge>\n ) : null}\n {item.flags?.billable ? (\n <Badge variant=\"success\" size=\"sm\" withDot>\n {t('appointmentCard.flag.billable')}\n </Badge>\n ) : null}\n {hasAdvance ? (\n <TransactionChip\n state=\"to-invoice\"\n amount={(advanceCents as number) / 100}\n currency={currency}\n locale={locale}\n size=\"sm\"\n showLabel\n />\n ) : null}\n {hasUnpaid ? (\n <TransactionChip\n state=\"debt\"\n amount={unpaidCents / 100}\n currency={currency}\n locale={locale}\n size=\"sm\"\n showLabel\n />\n ) : null}\n </div>\n ) : null}\n </div>\n\n {interactive ? (\n <ChevronRight\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0 ds:self-center ds:text-[color:var(--muted-foreground)] ds:opacity-0 ds:transition-opacity ds:motion-reduce:transition-none ds:group-hover:opacity-100 ds:group-focus-within:opacity-100 ds:rtl:rotate-180\"\n />\n ) : null}\n </div>\n );\n },\n);\n\nAppointmentCard.displayName = 'AppointmentCard';\n"],"names":["__iconNode","ClipboardPlus","createLucideIcon","FilePenLine","MessageSquareText","OPERATOR_DOT_CLASS","operatorDotClass","colorId","colorIdToToken","ageFromDob","dobIso","dob","now","age","monthDiff","appointmentCardVariants","cva","stretchedLinkClass","TYPE_ICON","MapPin","Video","AppointmentCard","forwardRef","item","size","surface","locale","currency","showPatient","onActivate","selected","hideDefaultStatus","className","rest","ref","t","useTranslation","interactive","hasSafeUrl","isSafeEntityUrl","showStatus","patientName","_a","operatorName","_b","stateLabel","stateWorkflow","appointmentStateWorkflow","StateIcon","patientAge","_c","noPatient","_d","avatarSize","TypeIcon","title","ariaLabel","titleNode","jsxs","activator","jsx","e","treatmentTags","tx","index","label","Tag","advanceCents","_e","hasAdvance","unpaidCents","_f","hasUnpaid","Timestamp","Avatar","colorIdToAvatarToken","_g","_h","_i","UserX","Badge","WorkflowStatusDisplay","_j","_k","Star","_l","_m","_n","_o","Armchair","_p","Globe","_q","Repeat","FileSignature","_r","TransactionChip","ChevronRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,KAAK,QAAQ,KAAK,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,UAAU;AAAA,EACrF;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAC5C,GACMC,KAAgBC,EAAiB,kBAAkBF,EAAU;ACrBnE;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE,CAAC,QAAQ,EAAE,GAAG,kCAAkC,KAAK,SAAQ,CAAE;AAAA,EAC/D;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAC1C,GACMG,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cACC,eAAY;AAAA,cACZ,WAAU;AAAA,YAAA;AAAA,UAAA,IAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEA5E,GAAgB,cAAc;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"appointment-card-DluZy8Iv.js","sources":["../../node_modules/lucide-react/dist/esm/icons/clipboard-plus.mjs","../../node_modules/lucide-react/dist/esm/icons/file-pen-line.mjs","../../node_modules/lucide-react/dist/esm/icons/message-square-text.mjs","../../src/components/appointment-card/appointment-card.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"8\", height: \"4\", x: \"8\", y: \"2\", rx: \"1\", ry: \"1\", key: \"tgr4d6\" }],\n [\n \"path\",\n {\n d: \"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\",\n key: \"116196\"\n }\n ],\n [\"path\", { d: \"M9 14h6\", key: \"159ibu\" }],\n [\"path\", { d: \"M12 17v-6\", key: \"1y8rbf\" }]\n];\nconst ClipboardPlus = createLucideIcon(\"clipboard-plus\", __iconNode);\n\nexport { __iconNode, ClipboardPlus as default };\n//# sourceMappingURL=clipboard-plus.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z\",\n key: \"ukzhwg\"\n }\n ],\n [\"path\", { d: \"M14.487 7.858A1 1 0 0 1 14 7V2\", key: \"1klhew\" }],\n [\n \"path\",\n {\n d: \"M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516\",\n key: \"rxaxab\"\n }\n ],\n [\"path\", { d: \"M8 18h1\", key: \"13wk12\" }]\n];\nconst FilePenLine = createLucideIcon(\"file-pen-line\", __iconNode);\n\nexport { __iconNode, FilePenLine as default };\n//# sourceMappingURL=file-pen-line.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z\",\n key: \"18887p\"\n }\n ],\n [\"path\", { d: \"M7 11h10\", key: \"1twpyw\" }],\n [\"path\", { d: \"M7 15h6\", key: \"d9of3u\" }],\n [\"path\", { d: \"M7 7h8\", key: \"af5zfr\" }]\n];\nconst MessageSquareText = createLucideIcon(\"message-square-text\", __iconNode);\n\nexport { __iconNode, MessageSquareText as default };\n//# sourceMappingURL=message-square-text.mjs.map\n","import { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n Armchair,\n ChevronRight,\n ClipboardPlus,\n FileSignature,\n Globe,\n MapPin,\n MessageSquareText,\n Repeat,\n Star,\n UserX,\n Video,\n} from 'lucide-react';\nimport { Avatar } from '../avatar/avatar';\nimport { Badge } from '../badge/badge';\nimport { Tag } from '../tag/tag';\nimport { Timestamp } from '../timestamp/timestamp';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport {\n appointmentStateWorkflow,\n colorIdToToken,\n colorIdToAvatarToken,\n isSafeEntityUrl,\n} from '../_shared/entity-card';\nimport type { AppointmentState } from '../_shared/entity-card';\nimport { WorkflowStatusDisplay } from '../workflow-status';\n\n/*\n * Closed colour-dot class map. `colorIdToToken` resolves the operator's\n * numeric colour id to one of a fixed set of palette tokens; the operator\n * dot needs a *static* Tailwind class for each so the compiler can emit it\n * (dynamic `ds:bg-[…]` strings are not seen by the JIT). The keys mirror the\n * exact token strings the shared helper returns.\n */\nconst OPERATOR_DOT_CLASS: Record<string, string> = {\n 'var(--color-violet-500)': 'ds:bg-[var(--color-violet-500)]',\n 'var(--color-purple-500)': 'ds:bg-[var(--color-purple-500)]',\n 'var(--color-magenta-500)': 'ds:bg-[var(--color-magenta-500)]',\n 'var(--color-blue-500)': 'ds:bg-[var(--color-blue-500)]',\n 'var(--color-green-500)': 'ds:bg-[var(--color-green-500)]',\n 'var(--color-red-500)': 'ds:bg-[var(--color-red-500)]',\n 'var(--color-yellow-500)': 'ds:bg-[var(--color-yellow-500)]',\n 'var(--color-indigo-500)': 'ds:bg-[var(--color-indigo-500)]',\n 'var(--color-orange-500)': 'ds:bg-[var(--color-orange-500)]',\n 'var(--color-fuchsia-500)': 'ds:bg-[var(--color-fuchsia-500)]',\n 'var(--color-grey-700)': 'ds:bg-[var(--color-grey-700)]',\n};\n\nfunction operatorDotClass(colorId: number | string | undefined): string {\n return (\n OPERATOR_DOT_CLASS[colorIdToToken(colorId)] ??\n 'ds:bg-[var(--color-grey-700)]'\n );\n}\n\n/** Age in whole years from a DOB string, or undefined if unparseable. */\nfunction ageFromDob(dobIso: string | undefined): number | undefined {\n if (!dobIso) return undefined;\n const dob = new Date(dobIso);\n if (Number.isNaN(dob.getTime())) return undefined;\n const now = new Date();\n let age = now.getFullYear() - dob.getFullYear();\n const monthDiff = now.getMonth() - dob.getMonth();\n if (monthDiff < 0 || (monthDiff === 0 && now.getDate() < dob.getDate())) {\n age--;\n }\n return age < 0 || age > 130 ? undefined : age;\n}\n\n/* -------------------------------------------------------------------- */\n/* AppointmentCard */\n/* */\n/* Single-row appointment surface — sibling of AgendaCard, but richer: */\n/* leading timestamp, operator + patient avatars with the operator */\n/* colour dot, a lifecycle-state Badge (announced by label, never colour */\n/* alone), treatment / tooth Tags, and an optional advance-deposit */\n/* TransactionChip. State→Badge-variant + colour-id→token + URL-safety */\n/* come from the shared `_shared/entity-card` helpers. */\n/* */\n/* All visible text flows through useTranslation('ui') against the */\n/* `appointmentCard.*` namespace (plus shared `financial.*` for money). */\n/* -------------------------------------------------------------------- */\n\n// Back-compat / one-stop import — the URL guard lives in the shared helper.\nexport { isSafeEntityUrl as isSafeAppointmentUrl } from '../_shared/is-safe-url';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** Appointment delivery channel. */\nexport type AppointmentType = 'inPractice' | 'telehealth';\n\n/** First-visit tri-state flag. */\nexport type AppointmentFirstVisit = 'yes' | 'no' | 'unknown';\n\n/** Operator (clinician) summary — name + optional palette colour id. */\nexport interface AppointmentOperator {\n /** Operator display name — drives the avatar initials + accessible name. */\n name: string;\n /** Numeric palette colour id, resolved to a kit token for the colour dot. */\n colorId?: number | string;\n}\n\n/** Patient summary — identity + optional age driver. */\nexport interface AppointmentPatient {\n /** Patient display name. */\n name: string;\n /** Optional avatar image URL. */\n avatarUrl?: string;\n /** ISO-8601 date of birth — when present, the card renders the age as a\n * suffix on the name (e.g. \"Carol Danvers · 45\"). */\n dobIso?: string;\n}\n\n/** One treatment line within the appointment. */\nexport interface AppointmentTreatment {\n /** Localised care / treatment name. */\n careName: string;\n /** Optional tooth elements (e.g. FDI ids) the treatment targets. */\n elements?: string[];\n}\n\n/** Booking-reason metadata captured at online-booking time. */\nexport interface AppointmentBookingReason {\n /** Localised booking-reason description. */\n description: string;\n /** Expected duration in minutes. */\n durationMin?: number;\n /** Advance / deposit amount in cents (non-negative). */\n advanceAmountCents?: number;\n /** Localised specialty label. */\n specialty?: string;\n}\n\n/** Money summary for the appointment. */\nexport interface AppointmentMoney {\n /** Total billable amount in cents. When present, rendered as a\n * TransactionChip. */\n billableAmountCents?: number;\n /** Outstanding unpaid amount in cents. When > 0, rendered as a warning\n * TransactionChip so the front desk can flag it at a glance. */\n unpaidAmountCents?: number;\n}\n\n/** Signing status for documents attached to the appointment. */\nexport interface AppointmentSigning {\n /** How many documents require a signature. */\n required: number;\n /** How many have been completed so far. */\n toComplete: number;\n}\n\n/** Boolean appointment flags surfaced as chips / indicators. */\nexport interface AppointmentFlags {\n bookedOnline?: boolean;\n noPatientAssigned?: boolean;\n highlightedAnamnesis?: boolean;\n billable?: boolean;\n}\n\nexport interface AppointmentItem {\n /** Stable appointment identifier. */\n id: string;\n /** ISO-8601 start instant. */\n startIso: string;\n /** Duration in minutes. */\n durationMin: number;\n /** Lifecycle state — drives the Badge variant + label. */\n state: AppointmentState;\n /** Delivery channel — drives the leading type glyph. */\n type: AppointmentType;\n /** First-visit flag. */\n firstVisit?: AppointmentFirstVisit;\n /** Assigned operator. */\n operator?: AppointmentOperator;\n /** Chair / room label — surfaced as a chip. */\n chair?: string;\n /**\n * The care plan this appointment belongs to, when any — surfaced as a chip\n * (`Care plan {number}`). `url` is the deep link the consumer may use for\n * navigation; the chip itself is non-interactive so it never nests an anchor\n * inside the row's own stretched link.\n */\n carePlan?: { number: string; url?: string };\n /** Patient identity. */\n patient?: AppointmentPatient;\n /** Treatment lines. */\n treatments?: AppointmentTreatment[];\n /** Online booking-reason metadata. */\n bookingReason?: AppointmentBookingReason;\n /** Boolean flags. */\n flags?: AppointmentFlags;\n /** Money summary — billable + unpaid amounts. */\n money?: AppointmentMoney;\n /** Whether this appointment is part of a recurring series. */\n recurring?: boolean;\n /** Signing status for attached documents. */\n signing?: AppointmentSigning;\n /** A note left by the patient at booking time. When present, a small\n * message icon signals it. */\n bookingNote?: string;\n /** Optional deep link — when present (and safe) the row renders as an anchor. */\n url?: string;\n /**\n * Settle the row visually without removing it from the list — a muted\n * wash in place of the elevated surface, shadow dropped. Text keeps its\n * normal foreground colour so contrast is unaffected; only the chrome\n * dims. For a row already concluded (done / no-show) that a host still\n * wants listed alongside what's still ahead.\n */\n dimmed?: boolean;\n /**\n * Marks this as the NEXT appointment to start — a steady accent outline\n * (a state, not a one-off address, so it never animates) plus a small\n * \"Next\" label. The cue never rests on colour alone.\n */\n next?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA — row */\n/* -------------------------------------------------------------------- */\n\nconst appointmentCardVariants = cva(\n [\n 'ds:relative ds:flex ds:items-start ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:text-start ds:group',\n 'ds:bg-[var(--card)] ds:text-[color:var(--card-foreground)]',\n 'ds:transition-[colors,border-color,box-shadow] ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n 'ds:forced-colors:border ds:forced-colors:border-[CanvasText]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:p-[var(--spacing-sm)]',\n md: 'ds:p-[var(--spacing-md)]',\n },\n interactive: {\n true: 'ds:hover:bg-[color:var(--muted)]/40 ds:cursor-pointer',\n false: '',\n },\n surface: {\n // `flat` (default) is the chrome-less row used inside a bordered\n // AppointmentTray. `elevated` gives each row its own card chrome\n // (border + shadow) for use directly on a rail, e.g. AppointmentTimeline.\n // Uses `--shadow-sm` (a row lift), not `--shadow-card`/`--shadow-lg`:\n // the rail's `overflow-y:auto` scroll region clips `overflow-x` at a\n // narrow gutter, so a wide 30px-blur shadow gets a hard-edged clip.\n flat: '',\n elevated:\n 'ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2 ds:shadow-[var(--shadow-sm)]',\n },\n selected: {\n // The row the host has marked as the active/selected appointment —\n // matches the `current` note's info-tinted accent: a solid\n // inline-start bar plus a soft info wash, so the eye keeps its\n // place in the list after a click.\n true: 'ds:border-s-2 ds:border-s-[color:var(--info)] ds:bg-[color:var(--info)]/10',\n false: '',\n },\n dimmed: {\n // Settled (concluded / no-show) rows: a muted wash instead of the\n // elevated card surface, shadow dropped. Only the CHROME dims —\n // text stays `--card-foreground` / `--muted-foreground`, so AA\n // contrast is untouched in every theme.\n true: 'ds:bg-[color:var(--muted)]/40 ds:shadow-none',\n false: '',\n },\n next: {\n // The next appointment to start: a STEADY accent outline (a state,\n // not a one-off address like the notes/bookings \"addressed\" ring,\n // so no keyframe replay). `outline` rather than `border` keeps the\n // row's own border/radius untouched.\n true: 'ds:outline ds:outline-2 ds:outline-[color:var(--accent)] ds:[outline-offset:-1px] ds:forced-colors:outline-[Highlight]',\n false: '',\n },\n },\n defaultVariants: {\n size: 'sm',\n interactive: false,\n surface: 'flat',\n selected: false,\n dimmed: false,\n next: false,\n },\n },\n);\n\nconst stretchedLinkClass = [\n // Interactive elements need a box to remain keyboard-focusable in browsers.\n 'ds:inline-flex ds:min-w-0',\n 'ds:focus-visible:outline-none',\n \"ds:after:content-[''] ds:after:absolute ds:after:inset-0 ds:after:rounded-[var(--radius-md)]\",\n 'ds:after:pointer-events-auto',\n 'ds:focus-visible:after:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:after:outline-solid',\n 'ds:focus-visible:after:outline-[color:var(--ring)]',\n 'ds:focus-visible:after:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:after:outline-[CanvasText]',\n].join(' ');\n\nconst TYPE_ICON: Record<AppointmentType, typeof MapPin> = {\n inPractice: MapPin,\n telehealth: Video,\n};\n\n/* -------------------------------------------------------------------- */\n/* Props */\n/* -------------------------------------------------------------------- */\n\nexport interface AppointmentCardProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'title'>,\n VariantProps<typeof appointmentCardVariants> {\n /** The appointment to render. */\n item: AppointmentItem;\n /** Visual density. */\n size?: 'sm' | 'md';\n /**\n * `'flat'` (default) — chrome-less row for use inside a bordered\n * `AppointmentTray`. `'elevated'` — each row carries its own card chrome\n * (border + shadow), for placing rows directly on a rail (AppointmentTimeline).\n */\n surface?: 'flat' | 'elevated';\n /** BCP-47 locale override for the timestamp + currency. */\n locale?: string;\n /** ISO-4217 currency code for the advance-deposit chip. Defaults to `EUR`. */\n currency?: string;\n /**\n * Show the patient identity (avatar + name as the row title). Default `true`.\n * Set `false` in single-patient surfaces (e.g. a patient's own\n * `AppointmentTimeline`) where repeating the name is redundant — the row then\n * leads with the operator as its title, falling back to a generic label.\n */\n showPatient?: boolean;\n /** Fires when the row is activated. */\n onActivate?: (item: AppointmentItem) => void;\n /**\n * Mark this row as the active/selected appointment — an info-tinted\n * inline-start bar plus a soft wash, so the eye keeps its place in the\n * list after a click. Renders `aria-current=\"true\"` for assistive tech.\n */\n selected?: boolean;\n /**\n * Withhold the lifecycle-state badge when the item's state is the\n * default/expected one (`confirmed`) — it needs no announcement, and\n * dropping it leaves the badge to states that actually ask for\n * attention. Default `false` (today's behaviour: every state, including\n * `confirmed`, shows its badge) so existing consumers are unaffected.\n */\n hideDefaultStatus?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const AppointmentCard = forwardRef<HTMLDivElement, AppointmentCardProps>(\n (\n {\n item,\n size = 'sm',\n surface = 'flat',\n locale,\n currency = 'EUR',\n showPatient = true,\n onActivate,\n selected = false,\n hideDefaultStatus = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const interactive = !!onActivate;\n const hasSafeUrl = !!item.url && isSafeEntityUrl(item.url);\n const showStatus = !(hideDefaultStatus && item.state === 'confirmed');\n\n const patientName = item.patient?.name ?? t('appointmentCard.noPatient');\n const operatorName = item.operator?.name;\n const stateLabel = t(`appointmentCard.state.${item.state}`);\n const stateWorkflow = appointmentStateWorkflow(item.state);\n const StateIcon = stateWorkflow.Icon;\n const patientAge = ageFromDob(item.patient?.dobIso);\n const noPatient = item.flags?.noPatientAssigned || !item.patient;\n\n const avatarSize = size === 'md' ? 'md' : 'sm';\n const TypeIcon = TYPE_ICON[item.type];\n\n // In single-patient context the patient name is redundant, so the row leads\n // with the operator (the \"who am I seeing\") and falls back to a generic\n // label when no operator is set.\n const title = showPatient\n ? patientName\n : (operatorName ?? t('appointmentCard.appointment'));\n\n const ariaLabel = showPatient\n ? t('appointmentCard.itemLabel', {\n patient: patientName,\n state: stateLabel,\n })\n : t('appointmentCard.itemLabelGeneric', { title, state: stateLabel });\n\n const titleNode = (\n <span className=\"ds:min-w-0 ds:truncate type-title-item ds:text-[color:var(--foreground)]\">\n {title}\n {showPatient && patientAge !== undefined ? (\n <span className=\"ds:ms-[var(--spacing-2xs)] ds:font-normal ds:text-[color:var(--muted-foreground)]\">\n · {patientAge}\n </span>\n ) : null}\n </span>\n );\n\n let activator: ReactNode;\n if (interactive && hasSafeUrl) {\n activator = (\n <a\n href={item.url}\n aria-label={ariaLabel}\n className={stretchedLinkClass}\n onClick={(e) => {\n if (e.defaultPrevented || e.metaKey || e.ctrlKey || e.shiftKey)\n return;\n onActivate?.(item);\n }}\n >\n {titleNode}\n </a>\n );\n } else if (interactive) {\n activator = (\n <button\n type=\"button\"\n aria-label={ariaLabel}\n className={\n stretchedLinkClass +\n ' ds:bg-transparent ds:border-0 ds:p-0 ds:text-start'\n }\n onClick={() => onActivate?.(item)}\n >\n {titleNode}\n </button>\n );\n } else {\n activator = titleNode;\n }\n\n // Treatment / tooth-element Tags. Each treatment becomes one Tag; the\n // tooth elements (when present) are appended to the visible label.\n const treatmentTags = (item.treatments ?? []).map((tx, index) => {\n const label =\n tx.elements && tx.elements.length > 0\n ? t('appointmentCard.treatmentWithElements', {\n care: tx.careName,\n elements: tx.elements.join(', '),\n })\n : tx.careName;\n return (\n <Tag\n key={`${tx.careName}-${index}`}\n label={label}\n variant=\"neutral\"\n fill=\"outline\"\n size=\"sm\"\n maxInlineSize=\"12rem\"\n />\n );\n });\n\n const advanceCents = item.bookingReason?.advanceAmountCents;\n const hasAdvance = typeof advanceCents === 'number' && advanceCents > 0;\n const unpaidCents = item.money?.unpaidAmountCents;\n const hasUnpaid = typeof unpaidCents === 'number' && unpaidCents > 0;\n\n return (\n <div\n ref={ref}\n /* `listitem` by default — the card is normally a list child. A\n consumer composing a richer row (card plus its own action row)\n owns the semantics instead and passes `role=\"presentation\"`,\n so the two do not nest. `rest` is spread after this. */\n role=\"listitem\"\n data-component=\"appointment-card\"\n data-component-id={item.id}\n data-state={item.state}\n data-type={item.type}\n aria-current={selected ? 'true' : undefined}\n className={appointmentCardVariants({\n size,\n interactive,\n surface,\n selected,\n dimmed: item.dimmed,\n next: item.next,\n className,\n })}\n {...rest}\n >\n {/* Leading rail: type glyph + start time + duration */}\n {/* min-w, not a fixed w: a 12-hour time (\"10:30 AM\") plus the type\n glyph is wider than 4rem, and must never wrap AM/PM onto a\n second line. */}\n <span className=\"ds:flex ds:min-w-20 ds:shrink-0 ds:flex-col ds:items-start ds:gap-[var(--spacing-2xs)]\">\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:whitespace-nowrap ds:text-[color:var(--muted-foreground)]\">\n <TypeIcon aria-hidden=\"true\" className=\"ds:size-3.5 ds:shrink-0\" />\n <span className=\"ds:sr-only\">\n {t(`appointmentCard.type.${item.type}`)}\n </span>\n <Timestamp\n value={item.startIso}\n format=\"absolute\"\n shape=\"bare\"\n locale={locale}\n absoluteFormat={{ hour: 'numeric', minute: '2-digit' }}\n className=\"type-body-sm ds:font-medium ds:text-[color:var(--foreground)] ds:tabular-nums\"\n />\n </span>\n <span className=\"type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {t('appointmentCard.duration', { count: item.durationMin })}\n </span>\n </span>\n\n {/* Operator avatar with colour dot */}\n {operatorName ? (\n <span className=\"ds:relative ds:shrink-0\">\n <Avatar\n name={operatorName}\n color={colorIdToAvatarToken(item.operator?.colorId)}\n size={avatarSize}\n aria-hidden=\"true\"\n role=\"presentation\"\n aria-label={undefined}\n />\n <span\n aria-hidden=\"true\"\n className={\n 'ds:absolute ds:bottom-0 ds:end-0 ds:size-2.5 ds:rounded-[var(--radius-full)] ds:border ds:border-[color:var(--card)] ' +\n operatorDotClass(item.operator?.colorId)\n }\n />\n </span>\n ) : null}\n\n {/* Main content column */}\n <div className=\"ds:flex-1 ds:min-w-0 ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex-1 ds:min-w-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {showPatient && item.patient?.avatarUrl ? (\n <Avatar\n name={patientName}\n src={item.patient.avatarUrl}\n size={avatarSize}\n className=\"ds:shrink-0\"\n aria-hidden=\"true\"\n role=\"presentation\"\n aria-label={undefined}\n />\n ) : null}\n {showPatient && noPatient ? (\n <span\n className={`ds:shrink-0 ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-full)] ds:bg-[color:var(--muted)] ds:text-[color:var(--muted-foreground)] ${\n avatarSize === 'md' ? 'ds:size-10' : 'ds:size-8'\n }`}\n >\n <UserX aria-hidden=\"true\" className=\"ds:size-4\" />\n </span>\n ) : null}\n {activator}\n </div>\n {item.next ? (\n <Badge\n variant=\"accentSoft\"\n size=\"sm\"\n className=\"ds:shrink-0\"\n aria-hidden=\"true\"\n >\n {t('appointmentCard.next')}\n </Badge>\n ) : null}\n {/* The kit's read-only status surface, not a bare Badge: an\n appointment's status is the same thing on a card, in a details\n footer and in a history entry, so it wears one face and takes\n its tone and glyph from the shared map. `hideDefaultStatus`\n withholds it for the expected/default state only. */}\n {showStatus ? (\n <WorkflowStatusDisplay\n size=\"sm\"\n value={item.state}\n option={{\n value: item.state,\n label: stateLabel,\n icon: <StateIcon aria-hidden=\"true\" />,\n tone: stateWorkflow.tone,\n }}\n className=\"ds:shrink-0\"\n />\n ) : null}\n </div>\n {item.next ? (\n <span className=\"ds:sr-only\">{t('appointmentCard.nextSr')}</span>\n ) : null}\n\n {/* Meta line: operator name · specialty · first visit · booking note\n (chair moved to a chip below). When the patient is hidden the\n operator is promoted to the title, so it drops out of the meta. */}\n {(showPatient && operatorName) ||\n item.bookingReason?.specialty ||\n item.firstVisit === 'yes' ||\n item.firstVisit === 'unknown' ||\n item.bookingNote ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)] type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {showPatient && operatorName ? <span>{operatorName}</span> : null}\n {item.bookingReason?.specialty ? (\n <span>{item.bookingReason.specialty}</span>\n ) : null}\n {item.firstVisit === 'yes' ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]\">\n <Star aria-hidden=\"true\" className=\"ds:size-3 ds:shrink-0\" />\n {t('appointmentCard.firstVisit')}\n </span>\n ) : null}\n {item.firstVisit === 'unknown' ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]\">\n <Star aria-hidden=\"true\" className=\"ds:size-3 ds:shrink-0\" />\n {t('appointmentCard.firstVisitUnknown')}\n </span>\n ) : null}\n {item.bookingNote ? (\n <span\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]\"\n title={t('appointmentCard.hasBookingNote')}\n >\n <MessageSquareText\n aria-hidden=\"true\"\n className=\"ds:size-3 ds:shrink-0\"\n />\n {t('appointmentCard.hasBookingNote')}\n </span>\n ) : null}\n </div>\n ) : null}\n\n {/* Booking reason */}\n {item.bookingReason?.description ? (\n <span className=\"type-body-sm ds:text-[color:var(--foreground)] ds:truncate\">\n {item.bookingReason.description}\n </span>\n ) : null}\n\n {/* Treatment / tooth Tags */}\n {treatmentTags.length > 0 ? (\n <div className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {treatmentTags}\n </div>\n ) : null}\n\n {/* Chips: care plan · chair · flags · recurring · signing ·\n advance-deposit · unpaid balance · billable */}\n {item.carePlan ||\n item.chair ||\n item.flags?.bookedOnline ||\n item.flags?.highlightedAnamnesis ||\n item.flags?.billable ||\n item.recurring ||\n item.signing ||\n hasAdvance ||\n hasUnpaid ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n {item.carePlan ? (\n <Badge\n variant=\"accentSoft\"\n size=\"sm\"\n leading={<ClipboardPlus />}\n >\n {t('appointmentCard.carePlan', {\n number: item.carePlan.number,\n })}\n </Badge>\n ) : null}\n {item.chair ? (\n <Badge variant=\"neutral\" size=\"sm\" leading={<Armchair />}>\n {t('appointmentCard.chair', { chair: item.chair })}\n </Badge>\n ) : null}\n {item.flags?.bookedOnline ? (\n <Badge variant=\"info\" size=\"sm\" leading={<Globe />}>\n {t('appointmentCard.flag.bookedOnline')}\n </Badge>\n ) : null}\n {item.flags?.highlightedAnamnesis ? (\n <Badge variant=\"warning\" size=\"sm\" withDot>\n {t('appointmentCard.flag.highlightedAnamnesis')}\n </Badge>\n ) : null}\n {item.recurring ? (\n <Badge variant=\"neutral\" size=\"sm\" leading={<Repeat />}>\n {t('appointmentCard.recurring')}\n </Badge>\n ) : null}\n {item.signing ? (\n <Badge\n variant={\n item.signing.toComplete >= item.signing.required\n ? 'success'\n : 'warning'\n }\n size=\"sm\"\n leading={<FileSignature />}\n >\n {t('appointmentCard.signing', {\n complete: item.signing.toComplete,\n required: item.signing.required,\n })}\n </Badge>\n ) : null}\n {item.flags?.billable ? (\n <Badge variant=\"success\" size=\"sm\" withDot>\n {t('appointmentCard.flag.billable')}\n </Badge>\n ) : null}\n {hasAdvance ? (\n <TransactionChip\n state=\"to-invoice\"\n amount={(advanceCents as number) / 100}\n currency={currency}\n locale={locale}\n size=\"sm\"\n showLabel\n />\n ) : null}\n {hasUnpaid ? (\n <TransactionChip\n state=\"debt\"\n amount={unpaidCents / 100}\n currency={currency}\n locale={locale}\n size=\"sm\"\n showLabel\n />\n ) : null}\n </div>\n ) : null}\n </div>\n\n {interactive ? (\n <ChevronRight\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0 ds:self-center ds:text-[color:var(--muted-foreground)] ds:opacity-0 ds:transition-opacity ds:motion-reduce:transition-none ds:group-hover:opacity-100 ds:group-focus-within:opacity-100 ds:rtl:rotate-180\"\n />\n ) : null}\n </div>\n );\n },\n);\n\nAppointmentCard.displayName = 'AppointmentCard';\n"],"names":["__iconNode","ClipboardPlus","createLucideIcon","FilePenLine","MessageSquareText","OPERATOR_DOT_CLASS","operatorDotClass","colorId","colorIdToToken","ageFromDob","dobIso","dob","now","age","monthDiff","appointmentCardVariants","cva","stretchedLinkClass","TYPE_ICON","MapPin","Video","AppointmentCard","forwardRef","item","size","surface","locale","currency","showPatient","onActivate","selected","hideDefaultStatus","className","rest","ref","t","useTranslation","interactive","hasSafeUrl","isSafeEntityUrl","showStatus","patientName","_a","operatorName","_b","stateLabel","stateWorkflow","appointmentStateWorkflow","StateIcon","patientAge","_c","noPatient","_d","avatarSize","TypeIcon","title","ariaLabel","titleNode","jsxs","activator","jsx","e","treatmentTags","tx","index","label","Tag","advanceCents","_e","hasAdvance","unpaidCents","_f","hasUnpaid","Timestamp","Avatar","colorIdToAvatarToken","_g","_h","_i","UserX","Badge","WorkflowStatusDisplay","_j","_k","Star","_l","_m","_n","_o","Armchair","_p","Globe","_q","Repeat","FileSignature","_r","TransactionChip","ChevronRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,KAAK,QAAQ,KAAK,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,UAAU;AAAA,EACrF;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAC5C,GACMC,KAAgBC,EAAiB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,kBACA,QAAAD;AAAA,kBACA,MAAK;AAAA,kBACL,WAAS;AAAA,gBAAA;AAAA,cAAA,IAET;AAAA,cACH8C,IACC,gBAAAZ;AAAA,gBAACoC;AAAA,gBAAA;AAAA,kBACC,OAAM;AAAA,kBACN,QAAQ1B,IAAc;AAAA,kBACtB,UAAA3C;AAAA,kBACA,QAAAD;AAAA,kBACA,MAAK;AAAA,kBACL,WAAS;AAAA,gBAAA;AAAA,cAAA,IAET;AAAA,YAAA,EAAA,CACN,IACE;AAAA,UAAA,GACN;AAAA,UAECW,IACC,gBAAAuB;AAAA,YAACqC;AAAA,YAAA;AAAA,cACC,eAAY;AAAA,cACZ,WAAU;AAAA,YAAA;AAAA,UAAA,IAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEA5E,GAAgB,cAAc;","x_google_ignoreList":[0,1,2]}
|
|
@@ -4,8 +4,8 @@ import { c as D } from "./index-D2ZczOXr.js";
|
|
|
4
4
|
import { useTranslation as V } from "react-i18next";
|
|
5
5
|
import { A as y } from "./avatar-CkDeQOSI.js";
|
|
6
6
|
import { D as l } from "./description-list-BsJ_6CQE.js";
|
|
7
|
-
import { H as z } from "./hover-card-
|
|
8
|
-
import { a as E } from "./workflow-status-
|
|
7
|
+
import { H as z } from "./hover-card-nUae8NPJ.js";
|
|
8
|
+
import { a as E } from "./workflow-status-CuJAOuKL.js";
|
|
9
9
|
import { C as H } from "./clock-Drd4Wtis.js";
|
|
10
10
|
import { V as I } from "./video-BheNGvsu.js";
|
|
11
11
|
import { A as S } from "./armchair-BaLDW6Hz.js";
|
|
@@ -112,4 +112,4 @@ T.displayName = "AppointmentPeek";
|
|
|
112
112
|
export {
|
|
113
113
|
T as A
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=appointment-peek-
|
|
115
|
+
//# sourceMappingURL=appointment-peek-BsfCpiJs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-peek-abiR0T9e.js","sources":["../../src/components/appointment-peek/appointment-peek.tsx"],"sourcesContent":["import {\n forwardRef,\n isValidElement,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Armchair, Clock, EyeOff, Video } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar';\nimport { DescriptionList } from '../description-list';\nimport { HoverCard } from '../hover-card';\nimport { WorkflowStatusDisplay } from '../workflow-status';\nimport {\n appointmentStateWorkflow,\n type AppointmentState,\n} from '../_shared/entity-card';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentPeek */\n/* */\n/* The body of a calendar hover card: who, when, where, and the status */\n/* in the kit's one status face. Renders inside `HoverCard.Content`; its */\n/* name is a `HoverCard.Heading`, so the card takes its accessible name */\n/* from the patient without the host wiring it. */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]',\n);\n\nexport interface AppointmentPeekDetail {\n /** Leading glyph, decorative. */\n icon?: ReactNode;\n /** The term, already translated: \"Care\", \"Operator\". */\n label: string;\n value: ReactNode;\n}\n\nexport interface AppointmentPeekProps extends HTMLAttributes<HTMLDivElement> {\n /** Patient name, or the event title for an appointment with no patient. */\n name: string;\n /** Photo for the avatar; initials are drawn from `name` without one. */\n avatarSrc?: string;\n /** Host-formatted time range, e.g. \"09:30–11:00\". */\n time: string;\n /** Chair or room, already translated. With `telehealth`, the visit type. */\n location?: string;\n /** Swaps the chair glyph for a video camera. */\n telehealth?: boolean;\n /**\n * Appointment status, shown through `WorkflowStatusDisplay`. Leave it out\n * when the host has none recorded: no status is not the same as\n * confirmed, so the card shows no status face at all.\n */\n status?: AppointmentState;\n /**\n * Override the status caption, e.g. \"Arrived · waiting 12 min\". Still shown\n * under `privacy`, so keep it free of patient data. Ignored without\n * `status`.\n */\n statusLabel?: string;\n /** Extra rows after time and location: care, operator. */\n details?: AppointmentPeekDetail[];\n /** Indicator chips (Badges): booked online, anamnesis. Never status. */\n flags?: ReactNode;\n /**\n * Masks the name and drops everything personal: avatar, details and\n * flags. Time, place and status stay; they\n * are not patient data.\n */\n privacy?: boolean;\n}\n\nexport const AppointmentPeek = forwardRef<HTMLDivElement, AppointmentPeekProps>(\n (\n {\n name,\n avatarSrc,\n time,\n location,\n telehealth = false,\n status,\n statusLabel,\n details,\n flags,\n privacy = false,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const workflow = status ? appointmentStateWorkflow(status) : null;\n const StatusIcon = workflow?.Icon;\n\n const LocationIcon = telehealth ? Video : Armchair;\n const showClinical = !privacy;\n\n const rows: {\n icon: ReactElement | null;\n label: string;\n value: ReactNode;\n }[] = [\n { icon: <Clock />, label: t('appointmentPeek.time'), value: time },\n ...(location\n ? [\n {\n icon: <LocationIcon />,\n label: t('appointmentPeek.location'),\n value: location,\n },\n ]\n : []),\n ...(showClinical && details\n ? details.map((detail) => ({\n icon: isValidElement(detail.icon) ? detail.icon : null,\n label: detail.label,\n value: detail.value,\n }))\n : []),\n ];\n\n return (\n <div\n ref={ref}\n data-component=\"appointment-peek\"\n data-status={status}\n className={rootVariants({ className })}\n {...props}\n >\n {/* Avatar, name and the indicator chips together, every fact on its\n own row below, status last: the same identity block as\n PatientDetails. */}\n <div className=\"ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-sm)]\">\n {privacy ? null : (\n <Avatar\n size=\"sm\"\n name={name}\n src={avatarSrc}\n aria-hidden=\"true\"\n className=\"ds:shrink-0\"\n />\n )}\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <HoverCard.Heading className=\"ds:min-w-0\">\n {privacy ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <EyeOff\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0\"\n />\n {t('appointmentPeek.hiddenName')}\n </span>\n ) : (\n name\n )}\n </HoverCard.Heading>\n {showClinical && flags ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n {flags}\n </div>\n ) : null}\n </div>\n </div>\n\n <DescriptionList\n layout=\"inline\"\n density=\"compact\"\n divider=\"none\"\n // Label icons in the accent, as in PatientDetails.\n className=\"ds:[--description-list-icon-color:var(--accent)]\"\n >\n {rows.map((row, index) => (\n <DescriptionList.Row key={index} icon={row.icon}>\n <DescriptionList.Term>{row.label}</DescriptionList.Term>\n <DescriptionList.Detail>{row.value}</DescriptionList.Detail>\n </DescriptionList.Row>\n ))}\n </DescriptionList>\n\n {/* The kit's one status face: the same display the details panel,\n AppointmentCard and the history use, so a status never reads\n differently on the grid. Last, so the card reads who, what, then\n where it stands. Nothing at all when none is recorded. */}\n {status && workflow && StatusIcon ? (\n <div data-slot=\"workflow\">\n <WorkflowStatusDisplay\n size=\"sm\"\n value={status}\n option={{\n value: status,\n label: statusLabel ?? t(`appointmentCard.state.${status}`),\n icon: <StatusIcon aria-hidden=\"true\" />,\n tone: workflow.tone,\n }}\n />\n </div>\n ) : null}\n </div>\n );\n },\n);\nAppointmentPeek.displayName = 'AppointmentPeek';\n"],"names":["rootVariants","cva","AppointmentPeek","forwardRef","name","avatarSrc","time","location","telehealth","status","statusLabel","details","flags","privacy","className","props","ref","t","useTranslation","workflow","appointmentStateWorkflow","StatusIcon","LocationIcon","Video","Armchair","showClinical","rows","jsx","Clock","detail","isValidElement","jsxs","Avatar","HoverCard","EyeOff","DescriptionList","row","index","WorkflowStatusDisplay"],"mappings":";;;;;;;;;;;;;AA4BA,MAAMA,IAAeC;AAAA,EACnB;AACF,GA6CaC,IAAkBC;AAAA,EAC7B,CACE;AAAA,IACE,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,QAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAA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A,EAGV;AACF;AACAjB,EAAgB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"appointment-peek-BsfCpiJs.js","sources":["../../src/components/appointment-peek/appointment-peek.tsx"],"sourcesContent":["import {\n forwardRef,\n isValidElement,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Armchair, Clock, EyeOff, Video } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar';\nimport { DescriptionList } from '../description-list';\nimport { HoverCard } from '../hover-card';\nimport { WorkflowStatusDisplay } from '../workflow-status';\nimport {\n appointmentStateWorkflow,\n type AppointmentState,\n} from '../_shared/entity-card';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentPeek */\n/* */\n/* The body of a calendar hover card: who, when, where, and the status */\n/* in the kit's one status face. Renders inside `HoverCard.Content`; its */\n/* name is a `HoverCard.Heading`, so the card takes its accessible name */\n/* from the patient without the host wiring it. */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]',\n);\n\nexport interface AppointmentPeekDetail {\n /** Leading glyph, decorative. */\n icon?: ReactNode;\n /** The term, already translated: \"Care\", \"Operator\". */\n label: string;\n value: ReactNode;\n}\n\nexport interface AppointmentPeekProps extends HTMLAttributes<HTMLDivElement> {\n /** Patient name, or the event title for an appointment with no patient. */\n name: string;\n /** Photo for the avatar; initials are drawn from `name` without one. */\n avatarSrc?: string;\n /** Host-formatted time range, e.g. \"09:30–11:00\". */\n time: string;\n /** Chair or room, already translated. With `telehealth`, the visit type. */\n location?: string;\n /** Swaps the chair glyph for a video camera. */\n telehealth?: boolean;\n /**\n * Appointment status, shown through `WorkflowStatusDisplay`. Leave it out\n * when the host has none recorded: no status is not the same as\n * confirmed, so the card shows no status face at all.\n */\n status?: AppointmentState;\n /**\n * Override the status caption, e.g. \"Arrived · waiting 12 min\". Still shown\n * under `privacy`, so keep it free of patient data. Ignored without\n * `status`.\n */\n statusLabel?: string;\n /** Extra rows after time and location: care, operator. */\n details?: AppointmentPeekDetail[];\n /** Indicator chips (Badges): booked online, anamnesis. Never status. */\n flags?: ReactNode;\n /**\n * Masks the name and drops everything personal: avatar, details and\n * flags. Time, place and status stay; they\n * are not patient data.\n */\n privacy?: boolean;\n}\n\nexport const AppointmentPeek = forwardRef<HTMLDivElement, AppointmentPeekProps>(\n (\n {\n name,\n avatarSrc,\n time,\n location,\n telehealth = false,\n status,\n statusLabel,\n details,\n flags,\n privacy = false,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const workflow = status ? appointmentStateWorkflow(status) : null;\n const StatusIcon = workflow?.Icon;\n\n const LocationIcon = telehealth ? Video : Armchair;\n const showClinical = !privacy;\n\n const rows: {\n icon: ReactElement | null;\n label: string;\n value: ReactNode;\n }[] = [\n { icon: <Clock />, label: t('appointmentPeek.time'), value: time },\n ...(location\n ? [\n {\n icon: <LocationIcon />,\n label: t('appointmentPeek.location'),\n value: location,\n },\n ]\n : []),\n ...(showClinical && details\n ? details.map((detail) => ({\n icon: isValidElement(detail.icon) ? detail.icon : null,\n label: detail.label,\n value: detail.value,\n }))\n : []),\n ];\n\n return (\n <div\n ref={ref}\n data-component=\"appointment-peek\"\n data-status={status}\n className={rootVariants({ className })}\n {...props}\n >\n {/* Avatar, name and the indicator chips together, every fact on its\n own row below, status last: the same identity block as\n PatientDetails. */}\n <div className=\"ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-sm)]\">\n {privacy ? null : (\n <Avatar\n size=\"sm\"\n name={name}\n src={avatarSrc}\n aria-hidden=\"true\"\n className=\"ds:shrink-0\"\n />\n )}\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <HoverCard.Heading className=\"ds:min-w-0\">\n {privacy ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <EyeOff\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0\"\n />\n {t('appointmentPeek.hiddenName')}\n </span>\n ) : (\n name\n )}\n </HoverCard.Heading>\n {showClinical && flags ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n {flags}\n </div>\n ) : null}\n </div>\n </div>\n\n <DescriptionList\n layout=\"inline\"\n density=\"compact\"\n divider=\"none\"\n // Label icons in the accent, as in PatientDetails.\n className=\"ds:[--description-list-icon-color:var(--accent)]\"\n >\n {rows.map((row, index) => (\n <DescriptionList.Row key={index} icon={row.icon}>\n <DescriptionList.Term>{row.label}</DescriptionList.Term>\n <DescriptionList.Detail>{row.value}</DescriptionList.Detail>\n </DescriptionList.Row>\n ))}\n </DescriptionList>\n\n {/* The kit's one status face: the same display the details panel,\n AppointmentCard and the history use, so a status never reads\n differently on the grid. Last, so the card reads who, what, then\n where it stands. Nothing at all when none is recorded. */}\n {status && workflow && StatusIcon ? (\n <div data-slot=\"workflow\">\n <WorkflowStatusDisplay\n size=\"sm\"\n value={status}\n option={{\n value: status,\n label: statusLabel ?? t(`appointmentCard.state.${status}`),\n icon: <StatusIcon aria-hidden=\"true\" />,\n tone: workflow.tone,\n }}\n />\n </div>\n ) : null}\n </div>\n );\n },\n);\nAppointmentPeek.displayName = 'AppointmentPeek';\n"],"names":["rootVariants","cva","AppointmentPeek","forwardRef","name","avatarSrc","time","location","telehealth","status","statusLabel","details","flags","privacy","className","props","ref","t","useTranslation","workflow","appointmentStateWorkflow","StatusIcon","LocationIcon","Video","Armchair","showClinical","rows","jsx","Clock","detail","isValidElement","jsxs","Avatar","HoverCard","EyeOff","DescriptionList","row","index","WorkflowStatusDisplay"],"mappings":";;;;;;;;;;;;;AA4BA,MAAMA,IAAeC;AAAA,EACnB;AACF,GA6CaC,IAAkBC;AAAA,EAC7B,CACE;AAAA,IACE,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,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AAAA,YACjB;AAAA,UAAA,GAEJ,IACE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AACAjB,EAAgB,cAAc;"}
|
|
@@ -2,9 +2,9 @@ import { jsxs as x, jsx as o, Fragment as He } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as Me, useId as Ne, useMemo as j, useRef as v, useState as $, useEffect as _e, useCallback as b, useImperativeHandle as Fe } from "react";
|
|
3
3
|
import { c as ze } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as Ae } from "react-i18next";
|
|
5
|
-
import { A as ne } from "./appointment-card-
|
|
5
|
+
import { A as ne } from "./appointment-card-DluZy8Iv.js";
|
|
6
6
|
import { B as P } from "./button-CaUe1uyd.js";
|
|
7
|
-
import { B as Be } from "./button-group-
|
|
7
|
+
import { B as Be } from "./button-group-CA1tmu39.js";
|
|
8
8
|
import { D as Ke } from "./date-picker-6tFnKFty.js";
|
|
9
9
|
import { P as Ee } from "./panel-header-D_mTdhUp.js";
|
|
10
10
|
import { S as Ye } from "./skeleton-B1KTdJ4N.js";
|
|
@@ -450,4 +450,4 @@ export {
|
|
|
450
450
|
Ze as A,
|
|
451
451
|
Oe as a
|
|
452
452
|
};
|
|
453
|
-
//# sourceMappingURL=appointment-timeline-
|
|
453
|
+
//# sourceMappingURL=appointment-timeline-Cs5f9viN.js.map
|
package/dist/_chunks/{appointment-timeline-CCnyUYKz.js.map → appointment-timeline-Cs5f9viN.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-timeline-CCnyUYKz.js","sources":["../../src/components/appointment-timeline/appointment-timeline.agent.ts","../../src/components/appointment-timeline/appointment-timeline.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentTimeline. */\n/* */\n/* Timeline surface: read appointment ids + lifecycle state (never */\n/* patient names / treatments), activate a row through the curated handle, */\n/* and re-anchor the scroll on today. In-page (no open/close). */\n/* `showPatient` is presentation only — it changes which name each row */\n/* leads with, never what the adapter reads or exposes. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { AppointmentTimelineHandle } from './appointment-timeline';\n\nexport const appointmentTimelineAgent: AgentAdapter<AppointmentTimelineHandle> =\n {\n id: 'appointment-timeline',\n // 'pick' backs select_item (non-persisting activation through\n // onOpenAppointment); 'scroll' backs jump_to_today, which re-anchors the\n // scroll viewport (mirrors practice-results' scroll_to_result).\n capabilities: ['scroll', 'pick'],\n state: {\n items: {\n type: 'Array<{ id: string; state: string }>',\n descriptionKey: 'ui.agent.appointmentTimeline.state.items',\n description:\n 'Currently-rendered appointments. Ids + lifecycle state only — never patient identity.',\n read: (handle) => handle.getItems(),\n },\n },\n actions: {\n select_item: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.appointmentTimeline.actions.selectItem',\n description: 'Activate the appointment with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n jump_to_today: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.appointmentTimeline.actions.jumpToToday',\n description: \"Re-anchor the timeline scroll on today's appointments.\",\n invoke: (handle) => {\n handle.jumpToToday();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-timeline',\n description: 'Marks the AppointmentTimeline wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific timeline from the agent.',\n },\n item: {\n attr: 'data-appointment-id',\n description:\n 'Stable appointment id emitted on each rendered AppointmentCard inside the timeline.',\n },\n },\n };\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CalendarDays } from 'lucide-react';\nimport { AppointmentCard, type AppointmentItem } from '../appointment-card';\nimport { Button } from '../button';\nimport { ButtonGroup } from '../button-group';\nimport { DatePicker } from '../date-picker';\nimport { PanelHeader } from '../panel-header';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { usePrefersReducedMotion } from '../../hooks/use-prefers-reduced-motion';\nimport { REFLOW_ROW_CLASS, useListReflow } from '../../hooks/use-list-reflow';\nimport { useExitTransition } from '../../hooks/use-exit-transition';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { appointmentTimelineAgent } from './appointment-timeline.agent';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentTimeline */\n/* */\n/* A vertical, day-grouped appointment timeline for the Control Room */\n/* rail. Unlike AppointmentTray (a bordered card of a flat list), this */\n/* fills the rail edge-to-edge: appointments are grouped under day */\n/* headers, the scroll is anchored on TODAY, and it scrolls infinitely */\n/* into the past and future — the consumer feeds more via onLoadEarlier */\n/* / onLoadLater as either edge is reached (scroll position is preserved */\n/* when earlier items prepend). Date-filter presets + a jump-to-date */\n/* picker re-anchor the scroll. Top + bottom transparent gradient fades */\n/* (a block-axis mask) signal more content beyond each edge. */\n/* */\n/* Each row reuses AppointmentCard (care-plan + chair chips included). */\n/* All visible text flows through useTranslation('ui') against the */\n/* `appointmentTimeline.*` namespace; no PHI reaches the agent adapter. */\n/* -------------------------------------------------------------------- */\n\n/* How close (px) to an edge before the matching load callback fires. */\nconst EDGE_LOAD_THRESHOLD = 96;\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** Curated imperative handle — identifiers + lifecycle state only. */\nexport interface AppointmentTimelineHandle {\n getItems: () => Array<{ id: string; state: string }>;\n selectItem: (id: string) => void;\n jumpToToday: () => void;\n}\n\nexport interface AppointmentTimelineProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'onClick' | 'id' | 'title'\n> {\n /** Stable instance id, surfaced as `data-component-id`. */\n id?: string;\n /** Appointments to render — any order; grouped + sorted internally. */\n items: AppointmentItem[];\n /**\n * ISO-8601 \"now\" anchor — the timeline scrolls to this day on mount and the\n * \"Today\" preset returns to it. Defaults to the current instant. Stories pass\n * a fixed value for deterministic snapshots.\n */\n nowIso?: string;\n /** Panel heading. Defaults to the localised \"Appointments\". */\n title?: string;\n /** BCP-47 locale override for day headers + each AppointmentCard. */\n locale?: string;\n /** ISO-4217 currency code passed to each AppointmentCard. */\n currency?: string;\n /** Visual density passed to each AppointmentCard. */\n size?: 'sm' | 'md';\n /**\n * Lead each row with the PATIENT (avatar + name as the row title) rather\n * than the operator. Default `false`: the timeline was built for a\n * patient-scoped rail, where repeating the name on every row is noise. A\n * clinic-wide agenda — \"who is coming in next\" across the practice —\n * passes `true`, and rows with no patient read as \"No patient\".\n */\n showPatient?: boolean;\n /** Fires when a row is activated. */\n onOpenAppointment?: (item: AppointmentItem) => void;\n /**\n * The id of the currently selected appointment. The matching card\n * renders with `selected` (info-tinted accent + `aria-current`) so the\n * eye keeps its place in the list after a click.\n */\n selectedId?: string;\n\n /* ----- Infinite scroll ----- */\n /** Load earlier (past) appointments — fired when the top edge is reached. */\n onLoadEarlier?: () => void;\n /** Load later (future) appointments — fired when the bottom edge is reached. */\n onLoadLater?: () => void;\n /** Whether more past appointments exist. Defaults to `true` when `onLoadEarlier` is set. */\n hasMoreEarlier?: boolean;\n /** Whether more future appointments exist. Defaults to `true` when `onLoadLater` is set. */\n hasMoreLater?: boolean;\n /** Show a loading row at the top edge. */\n loadingEarlier?: boolean;\n /** Show a loading row at the bottom edge. */\n loadingLater?: boolean;\n\n /* ----- Filters ----- */\n /** Show the date-filter row (presets + jump-to-date). Default `true`. */\n showFilters?: boolean;\n /**\n * Fired when a jump-to-date / preset targets a day outside the loaded range,\n * so the consumer can load it. The timeline scrolls to the nearest rendered\n * day until then.\n */\n onJumpToDate?: (dateIso: string) => void;\n\n /* ----- Empty ----- */\n emptyTitle?: string;\n emptyDescription?: string;\n\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n\n /**\n * Content rendered between the header/filter row and the scroll region —\n * a summary strip, a \"happening now\" band, anything the host needs\n * ahead of the day-grouped list. Omitted by default (no change to\n * today's layout). Not part of the scroll region: it stays fixed like\n * the header above it.\n */\n headerExtra?: ReactNode;\n /**\n * Forwarded to every row's `AppointmentCard`: withhold the lifecycle\n * badge for the default/expected state (`confirmed`). Default `false`\n * (today's behaviour — every state shows its badge).\n */\n hideDefaultStatus?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n [\n 'ds:flex ds:flex-col ds:h-full ds:min-h-0',\n 'ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]',\n ].join(' '),\n { variants: { size: { sm: '', md: '' } }, defaultVariants: { size: 'sm' } },\n);\n\n/* Scroll region with a block-axis fade mask. The CSS custom properties flip to\n `transparent` at whichever edge has more content (data-fade-top /\n data-fade-bottom), mirroring the TabBar edge-mask technique on the Y axis.\n Disabled under reduced-motion, the accessible theme, and forced-colors. */\nconst scrollRegionClasses = [\n 'ds:flex-1 ds:min-h-0 ds:overflow-y-auto',\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]',\n 'ds:[--atl-mask-top:black] ds:[--atl-mask-bottom:black]',\n 'ds:data-[fade-top=true]:[--atl-mask-top:transparent]',\n 'ds:data-[fade-bottom=true]:[--atl-mask-bottom:transparent]',\n 'ds:[mask-image:linear-gradient(to_bottom,var(--atl-mask-top)_0,black_var(--atl-fade-distance,var(--spacing-lg)),black_calc(100%-var(--atl-fade-distance,var(--spacing-lg))),var(--atl-mask-bottom)_100%)]',\n 'ds:motion-reduce:[mask-image:none]',\n 'ds:[.theme-accessible_&]:[mask-image:none]',\n 'ds:forced-colors:[mask-image:none]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n].join(' ');\n\n/* -------------------------------------------------------------------- */\n/* Day grouping + header labels */\n/* -------------------------------------------------------------------- */\n\ninterface DayGroup {\n key: string;\n date: Date;\n items: AppointmentItem[];\n}\n\n/** Local calendar day key (`YYYY-MM-DD`) — sorts chronologically as a string. */\nfunction localDayKey(d: Date): string {\n const m = `${d.getMonth() + 1}`.padStart(2, '0');\n const day = `${d.getDate()}`.padStart(2, '0');\n return `${d.getFullYear()}-${m}-${day}`;\n}\n\nfunction groupByDay(items: AppointmentItem[]): DayGroup[] {\n const sorted = [...items].sort(\n (a, b) => +new Date(a.startIso) - +new Date(b.startIso),\n );\n const map = new Map<string, DayGroup>();\n for (const item of sorted) {\n const d = new Date(item.startIso);\n const key = localDayKey(d);\n let group = map.get(key);\n if (!group) {\n group = {\n key,\n date: new Date(d.getFullYear(), d.getMonth(), d.getDate()),\n items: [],\n };\n map.set(key, group);\n }\n group.items.push(item);\n }\n return [...map.values()];\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const AppointmentTimeline = forwardRef<\n HTMLElement,\n AppointmentTimelineProps\n>(\n (\n {\n id,\n items,\n nowIso,\n title,\n locale,\n currency,\n size = 'sm',\n showPatient = false,\n onOpenAppointment,\n selectedId,\n onLoadEarlier,\n onLoadLater,\n hasMoreEarlier,\n hasMoreLater,\n loadingEarlier = false,\n loadingLater = false,\n showFilters = true,\n onJumpToDate,\n emptyTitle,\n emptyDescription,\n className,\n 'aria-label': ariaLabel,\n headerExtra,\n hideDefaultStatus = false,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const jumpId = useId();\n const prefersReducedMotion = usePrefersReducedMotion();\n const resolvedLocale = locale ?? i18n.language;\n\n const heading = title ?? t('appointmentTimeline.title');\n const now = useMemo(\n () => (nowIso ? new Date(nowIso) : new Date()),\n [nowIso],\n );\n\n const groups = useMemo(() => groupByDay(items), [items]);\n\n /* Reflow + exit transitions — the same pair notes and tasks use. When\n an appointment is added or removed, surviving cards slide to their\n new positions instead of snapping; a removed card fades out in place\n before the host drops it, so the removal reads as a removal. */\n const reduceMotion = prefersReducedMotion || undefined;\n const flatItemIds = useMemo(\n () => groups.flatMap((g) => g.items.map((i) => i.id)).join(),\n [groups],\n );\n const { containerRef: reflowRef } = useListReflow<HTMLOListElement>({\n key: flatItemIds,\n reduceMotion,\n });\n const exitTransition = useExitTransition({ reduceMotion });\n\n /* Track removed items so they can fade out in place. The previous\n items array is diffed against the current one; removed ids are held\n in `leavingItems` and rendered after the live groups, faded, until\n the exit transition elapses and drops them. */\n const prevItemsRef = useRef(items);\n const [leavingItems, setLeavingItems] = useState<AppointmentItem[]>([]);\n useEffect(() => {\n const prev = prevItemsRef.current;\n if (prev === items) return;\n const currentIds = new Set(items.map((i) => i.id));\n const removed = prev.filter((i) => !currentIds.has(i.id));\n if (removed.length > 0) {\n setLeavingItems((prev) => [...prev, ...removed]);\n removed.forEach((item) => {\n exitTransition.leave(item.id, () => {\n setLeavingItems((prev) => prev.filter((i) => i.id !== item.id));\n });\n });\n }\n prevItemsRef.current = items;\n }, [items, exitTransition]);\n\n const moreEarlier = hasMoreEarlier ?? !!onLoadEarlier;\n const moreLater = hasMoreLater ?? !!onLoadLater;\n\n /* The day to anchor on: today if present, else the nearest upcoming day,\n else the last day we have. */\n const anchorKey = useMemo(() => {\n if (groups.length === 0) return undefined;\n const todayKey = localDayKey(now);\n const keys = groups.map((g) => g.key);\n if (keys.includes(todayKey)) return todayKey;\n return keys.find((k) => k >= todayKey) ?? keys[keys.length - 1];\n }, [groups, now]);\n\n const scrollRef = useRef<HTMLDivElement>(null);\n const dayElRefs = useRef<Map<string, HTMLElement>>(new Map());\n const hasAnchored = useRef(false);\n const prevFirstKey = useRef<string | undefined>(undefined);\n const prevScrollHeight = useRef(0);\n\n const [fadeTop, setFadeTop] = useState(false);\n const [fadeBottom, setFadeBottom] = useState(false);\n\n const updateEdges = useCallback(() => {\n const region = scrollRef.current;\n if (!region) return;\n const { scrollTop, scrollHeight, clientHeight } = region;\n setFadeTop(scrollTop > 1);\n setFadeBottom(scrollTop + clientHeight < scrollHeight - 1);\n }, []);\n\n /* Scroll a day into view at the top of the region. Falls back to the\n nearest rendered day on/after the target (presets may land on an empty\n day). Uses getBoundingClientRect so it is offsetParent-agnostic. */\n const scrollToKey = useCallback(\n (targetKey: string, smooth: boolean) => {\n const region = scrollRef.current;\n if (!region) return;\n let el = dayElRefs.current.get(targetKey);\n if (!el) {\n const keys = [...dayElRefs.current.keys()].sort();\n const next =\n keys.find((k) => k >= targetKey) ?? keys[keys.length - 1];\n el = next ? dayElRefs.current.get(next) : undefined;\n }\n if (!el) return;\n const delta =\n el.getBoundingClientRect().top - region.getBoundingClientRect().top;\n region.scrollTo({\n top: region.scrollTop + delta,\n behavior: smooth && !prefersReducedMotion ? 'smooth' : 'auto',\n });\n },\n [prefersReducedMotion],\n );\n\n /* Anchor on mount; preserve the viewport when earlier days prepend. */\n useIsomorphicLayoutEffect(() => {\n const region = scrollRef.current;\n if (!region) return;\n const firstKey = groups[0]?.key;\n if (!hasAnchored.current) {\n if (groups.length > 0 && anchorKey) {\n scrollToKey(anchorKey, false);\n hasAnchored.current = true;\n }\n } else if (\n prevFirstKey.current &&\n firstKey &&\n firstKey < prevFirstKey.current\n ) {\n const grew = region.scrollHeight - prevScrollHeight.current;\n if (grew > 0) region.scrollTop += grew;\n }\n prevFirstKey.current = firstKey;\n prevScrollHeight.current = region.scrollHeight;\n updateEdges();\n }, [groups, anchorKey, scrollToKey, updateEdges]);\n\n /* Recompute the fades when the region resizes. */\n useIsomorphicLayoutEffect(() => {\n const region = scrollRef.current;\n if (!region || typeof ResizeObserver === 'undefined') return undefined;\n const observer = new ResizeObserver(updateEdges);\n observer.observe(region);\n return () => observer.disconnect();\n }, [updateEdges]);\n\n const handleScroll = useCallback(() => {\n updateEdges();\n const region = scrollRef.current;\n if (!region) return;\n const { scrollTop, scrollHeight, clientHeight } = region;\n if (\n onLoadEarlier &&\n moreEarlier &&\n !loadingEarlier &&\n scrollTop <= EDGE_LOAD_THRESHOLD\n ) {\n onLoadEarlier();\n }\n if (\n onLoadLater &&\n moreLater &&\n !loadingLater &&\n scrollHeight - scrollTop - clientHeight <= EDGE_LOAD_THRESHOLD\n ) {\n onLoadLater();\n }\n }, [\n updateEdges,\n onLoadEarlier,\n onLoadLater,\n moreEarlier,\n moreLater,\n loadingEarlier,\n loadingLater,\n ]);\n\n /* ----- Filter actions ----- */\n const jumpTo = useCallback(\n (date: Date) => {\n const key = localDayKey(date);\n const known = dayElRefs.current.has(key);\n scrollToKey(key, true);\n if (!known) onJumpToDate?.(date.toISOString());\n },\n [scrollToKey, onJumpToDate],\n );\n\n const handleToday = useCallback(() => jumpTo(now), [jumpTo, now]);\n const handleThisWeek = useCallback(() => {\n const start = new Date(now);\n const dow = (start.getDay() + 6) % 7; // Monday-based week start\n start.setDate(start.getDate() - dow);\n jumpTo(start);\n }, [jumpTo, now]);\n const handleThisMonth = useCallback(() => {\n jumpTo(new Date(now.getFullYear(), now.getMonth(), 1));\n }, [jumpTo, now]);\n\n /* ----- Agent handle ----- */\n const itemsRef = useRef<AppointmentItem[]>(items);\n itemsRef.current = items;\n const innerRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => innerRef.current as HTMLElement, []);\n\n const handle = useMemo<AppointmentTimelineHandle>(\n () => ({\n getItems: () =>\n itemsRef.current.map((i) => ({ id: i.id, state: i.state })),\n selectItem: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onOpenAppointment?.(found);\n },\n jumpToToday: () => scrollToKey(localDayKey(now), true),\n }),\n [onOpenAppointment, scrollToKey, now],\n );\n useAgentRegistration(appointmentTimelineAgent, handle, id);\n\n const isEmpty = groups.length === 0 && !loadingEarlier && !loadingLater;\n\n const loadingRow = (key: string) => (\n <div\n key={key}\n aria-hidden=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]\"\n >\n <Skeleton variant=\"rectangular\" height=\"3.5rem\" />\n </div>\n );\n\n return (\n <section\n ref={innerRef}\n data-component=\"appointment-timeline\"\n data-component-id={id}\n aria-label={ariaLabel ?? heading}\n className={rootVariants({ size, className })}\n {...rest}\n >\n {/* Shared rail header: title + (optional) filter row + divider. This\n panel owns its own scroll/fill, so the header stays a fixed band\n (sticky={false}). The rail injects the favourite/close cluster via\n PanelHeaderActionsProvider; standalone it renders none. */}\n <PanelHeader\n icon={<CalendarDays />}\n title={heading}\n filters={\n showFilters ? (\n <>\n <ButtonGroup label={t('appointmentTimeline.filtersLabel')}>\n <Button intent=\"outline\" size=\"sm\" onClick={handleToday}>\n {t('appointmentTimeline.today')}\n </Button>\n <Button intent=\"outline\" size=\"sm\" onClick={handleThisWeek}>\n {t('appointmentTimeline.thisWeek')}\n </Button>\n <Button intent=\"outline\" size=\"sm\" onClick={handleThisMonth}>\n {t('appointmentTimeline.thisMonth')}\n </Button>\n </ButtonGroup>\n <label htmlFor={jumpId} className=\"ds:sr-only\">\n {t('appointmentTimeline.jumpToDate')}\n </label>\n <DatePicker\n id={jumpId}\n size=\"sm\"\n placeholder={t('appointmentTimeline.jumpToDate')}\n onChange={(date) => {\n if (date) jumpTo(date);\n }}\n />\n </>\n ) : undefined\n }\n />\n\n {headerExtra}\n\n {isEmpty ? (\n <div className=\"ds:flex-1 ds:p-[var(--spacing-md)]\">\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={emptyTitle ?? t('appointmentTimeline.empty.title')}\n description={\n emptyDescription ?? t('appointmentTimeline.empty.description')\n }\n />\n </div>\n ) : (\n <div\n ref={scrollRef}\n // The scroll region must be keyboard-focusable so arrow / Home /\n // End can drive it (axe scrollable-region-focusable); jsx-a11y's\n // generic rule doesn't know this element scrolls.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n onScroll={handleScroll}\n data-fade-top={fadeTop ? 'true' : undefined}\n data-fade-bottom={fadeBottom ? 'true' : undefined}\n className={scrollRegionClasses}\n >\n {loadingEarlier ? loadingRow('loading-earlier') : null}\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" is NOT redundant: WebKit drops implicit list semantics when list-style is none */}\n <ol\n ref={reflowRef}\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0\"\n >\n {groups.map((group) => (\n <li\n key={group.key}\n ref={(node) => {\n if (node) dayElRefs.current.set(group.key, node);\n else dayElRefs.current.delete(group.key);\n }}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\"\n >\n <DayHeader\n date={group.date}\n now={now}\n locale={resolvedLocale}\n todayLabel={t('appointmentTimeline.today')}\n tomorrowLabel={t('appointmentTimeline.tomorrow')}\n yesterdayLabel={t('appointmentTimeline.yesterday')}\n />\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" is NOT redundant: WebKit drops implicit list semantics when list-style is none */}\n <ul\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\"\n >\n {group.items.map((item) => (\n <AppointmentCard\n key={item.id}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={showPatient}\n locale={resolvedLocale}\n currency={currency}\n onActivate={onOpenAppointment}\n selected={item.id === selectedId}\n hideDefaultStatus={hideDefaultStatus}\n data-appointment-id={item.id}\n data-reflow-id={item.id}\n className={REFLOW_ROW_CLASS}\n />\n ))}\n </ul>\n </li>\n ))}\n {/* Leaving cards: removed from state but held for the exit\n fade. Rendered without `data-reflow-id` so the reflow hook\n ignores them; faded via `data-leaving`. */}\n {leavingItems.length > 0\n ? leavingItems.map((item) => (\n <AppointmentCard\n key={`leaving-${item.id}`}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={showPatient}\n locale={resolvedLocale}\n currency={currency}\n aria-hidden=\"true\"\n data-leaving\n className={[\n 'ds:opacity-0',\n 'ds:transition-opacity',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:ease-[var(--ease-out)]',\n 'ds:motion-reduce:transition-none',\n ].join(' ')}\n />\n ))\n : null}\n </ol>\n {loadingLater ? loadingRow('loading-later') : null}\n </div>\n )}\n </section>\n );\n },\n);\n\nAppointmentTimeline.displayName = 'AppointmentTimeline';\n\n/* -------------------------------------------------------------------- */\n/* Day header — sticky label per day group */\n/* -------------------------------------------------------------------- */\n\ninterface DayHeaderProps {\n date: Date;\n now: Date;\n locale: string | undefined;\n todayLabel: string;\n tomorrowLabel: string;\n yesterdayLabel: string;\n}\n\nfunction DayHeader({\n date,\n now,\n locale,\n todayLabel,\n tomorrowLabel,\n yesterdayLabel,\n}: DayHeaderProps): ReactNode {\n const key = localDayKey(date);\n const todayKey = localDayKey(now);\n const tomorrow = new Date(now);\n tomorrow.setDate(now.getDate() + 1);\n const yesterday = new Date(now);\n yesterday.setDate(now.getDate() - 1);\n\n const isToday = key === todayKey;\n\n let label: string;\n if (isToday) label = todayLabel;\n else if (key === localDayKey(tomorrow)) label = tomorrowLabel;\n else if (key === localDayKey(yesterday)) label = yesterdayLabel;\n else {\n const sameYear = date.getFullYear() === now.getFullYear();\n label = new Intl.DateTimeFormat(locale, {\n weekday: 'short',\n day: 'numeric',\n month: 'short',\n ...(sameYear ? {} : { year: 'numeric' }),\n }).format(date);\n }\n\n // Today's group is marked with the brand colour + a leading dot so the\n // current day reads at a glance. `--primary` clears AA on the card in every\n // theme (violet-500 light, magenta on dark); the dot is decorative.\n return (\n <div\n data-today={isToday ? 'true' : undefined}\n className={[\n 'ds:sticky ds:top-0 ds:z-[1] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]',\n 'ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow',\n isToday\n ? 'ds:text-[color:var(--primary)] ds:font-semibold'\n : 'ds:text-[color:var(--muted-foreground)]',\n ].join(' ')}\n >\n {isToday ? (\n <span\n aria-hidden=\"true\"\n className=\"ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]\"\n />\n ) : null}\n {label}\n </div>\n );\n}\n\n/** Re-export of the size variant union for downstream typing. */\nexport type AppointmentTimelineSize = NonNullable<\n VariantProps<typeof rootVariants>['size']\n>;\n"],"names":["appointmentTimelineAgent","handle","args","EDGE_LOAD_THRESHOLD","rootVariants","cva","scrollRegionClasses","localDayKey","d","m","day","groupByDay","items","sorted","a","b","map","item","key","group","AppointmentTimeline","forwardRef","id","nowIso","title","locale","currency","size","showPatient","onOpenAppointment","selectedId","onLoadEarlier","onLoadLater","hasMoreEarlier","hasMoreLater","loadingEarlier","loadingLater","showFilters","onJumpToDate","emptyTitle","emptyDescription","className","ariaLabel","headerExtra","hideDefaultStatus","rest","ref","t","i18n","useTranslation","jumpId","useId","prefersReducedMotion","usePrefersReducedMotion","resolvedLocale","heading","now","useMemo","groups","reduceMotion","flatItemIds","g","i","reflowRef","useListReflow","exitTransition","useExitTransition","prevItemsRef","useRef","leavingItems","setLeavingItems","useState","useEffect","prev","currentIds","removed","moreEarlier","moreLater","anchorKey","todayKey","keys","k","scrollRef","dayElRefs","hasAnchored","prevFirstKey","prevScrollHeight","fadeTop","setFadeTop","fadeBottom","setFadeBottom","updateEdges","useCallback","region","scrollTop","scrollHeight","clientHeight","scrollToKey","targetKey","smooth","el","next","delta","useIsomorphicLayoutEffect","firstKey","_a","grew","observer","handleScroll","jumpTo","date","known","handleToday","handleThisWeek","start","dow","handleThisMonth","itemsRef","innerRef","useImperativeHandle","targetId","found","useAgentRegistration","isEmpty","loadingRow","jsx","Skeleton","jsxs","PanelHeader","CalendarDays","Fragment","ButtonGroup","Button","DatePicker","EmptyState","node","DayHeader","AppointmentCard","REFLOW_ROW_CLASS","todayLabel","tomorrowLabel","yesterdayLabel","tomorrow","yesterday","isToday","label","sameYear"],"mappings":";;;;;;;;;;;;;;;;AAaO,MAAMA,KACX;AAAA,EACE,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,UAAU,MAAM;AAAA,EAC/B,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,WAAWC,EAAK,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,IAEF,eAAe;AAAA,MACb,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACD,MAAW;AAClB,QAAAA,EAAO,YAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aACE;AAAA,IAAA;AAAA,IAEJ,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aACE;AAAA,IAAA;AAAA,EACJ;AAEJ,GCzBIE,KAAsB,IAuGtBC,KAAeC;AAAA,EACnB;AAAA,IACE;AAAA,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AAkH;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AACF,GAA8B;AAC5B,QAAM3H,IAAMX,EAAYuG,CAAI,GACtB/B,IAAWxE,EAAYiD,CAAG,GAC1BsF,IAAW,IAAI,KAAKtF,CAAG;AAC7B,EAAAsF,EAAS,QAAQtF,EAAI,QAAA,IAAY,CAAC;AAClC,QAAMuF,IAAY,IAAI,KAAKvF,CAAG;AAC9B,EAAAuF,EAAU,QAAQvF,EAAI,QAAA,IAAY,CAAC;AAEnC,QAAMwF,IAAU9H,MAAQ6D;AAExB,MAAIkE;AACJ,MAAID,EAAS,CAAAC,IAAQN;AAAA,WACZzH,MAAQX,EAAYuI,CAAQ,EAAG,CAAAG,IAAQL;AAAA,WACvC1H,MAAQX,EAAYwI,CAAS,EAAG,CAAAE,IAAQJ;AAAA,OAC5C;AACH,UAAMK,IAAWpC,EAAK,YAAA,MAAkBtD,EAAI,YAAA;AAC5C,IAAAyF,IAAQ,IAAI,KAAK,eAAexH,GAAQ;AAAA,MACtC,SAAS;AAAA,MACT,KAAK;AAAA,MACL,OAAO;AAAA,MACP,GAAIyH,IAAW,CAAA,IAAK,EAAE,MAAM,UAAA;AAAA,IAAU,CACvC,EAAE,OAAOpC,CAAI;AAAA,EAChB;AAKA,SACE,gBAAAiB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAYiB,IAAU,SAAS;AAAA,MAC/B,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACAA,IACI,oDACA;AAAA,MAAA,EACJ,KAAK,GAAG;AAAA,MAET,UAAA;AAAA,QAAAA,IACC,gBAAAnB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAEV;AAAA,QACHoB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
1
|
+
{"version":3,"file":"appointment-timeline-Cs5f9viN.js","sources":["../../src/components/appointment-timeline/appointment-timeline.agent.ts","../../src/components/appointment-timeline/appointment-timeline.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentTimeline. */\n/* */\n/* Timeline surface: read appointment ids + lifecycle state (never */\n/* patient names / treatments), activate a row through the curated handle, */\n/* and re-anchor the scroll on today. In-page (no open/close). */\n/* `showPatient` is presentation only — it changes which name each row */\n/* leads with, never what the adapter reads or exposes. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { AppointmentTimelineHandle } from './appointment-timeline';\n\nexport const appointmentTimelineAgent: AgentAdapter<AppointmentTimelineHandle> =\n {\n id: 'appointment-timeline',\n // 'pick' backs select_item (non-persisting activation through\n // onOpenAppointment); 'scroll' backs jump_to_today, which re-anchors the\n // scroll viewport (mirrors practice-results' scroll_to_result).\n capabilities: ['scroll', 'pick'],\n state: {\n items: {\n type: 'Array<{ id: string; state: string }>',\n descriptionKey: 'ui.agent.appointmentTimeline.state.items',\n description:\n 'Currently-rendered appointments. Ids + lifecycle state only — never patient identity.',\n read: (handle) => handle.getItems(),\n },\n },\n actions: {\n select_item: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.appointmentTimeline.actions.selectItem',\n description: 'Activate the appointment with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n jump_to_today: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.appointmentTimeline.actions.jumpToToday',\n description: \"Re-anchor the timeline scroll on today's appointments.\",\n invoke: (handle) => {\n handle.jumpToToday();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-timeline',\n description: 'Marks the AppointmentTimeline wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific timeline from the agent.',\n },\n item: {\n attr: 'data-appointment-id',\n description:\n 'Stable appointment id emitted on each rendered AppointmentCard inside the timeline.',\n },\n },\n };\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CalendarDays } from 'lucide-react';\nimport { AppointmentCard, type AppointmentItem } from '../appointment-card';\nimport { Button } from '../button';\nimport { ButtonGroup } from '../button-group';\nimport { DatePicker } from '../date-picker';\nimport { PanelHeader } from '../panel-header';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { usePrefersReducedMotion } from '../../hooks/use-prefers-reduced-motion';\nimport { REFLOW_ROW_CLASS, useListReflow } from '../../hooks/use-list-reflow';\nimport { useExitTransition } from '../../hooks/use-exit-transition';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { appointmentTimelineAgent } from './appointment-timeline.agent';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentTimeline */\n/* */\n/* A vertical, day-grouped appointment timeline for the Control Room */\n/* rail. Unlike AppointmentTray (a bordered card of a flat list), this */\n/* fills the rail edge-to-edge: appointments are grouped under day */\n/* headers, the scroll is anchored on TODAY, and it scrolls infinitely */\n/* into the past and future — the consumer feeds more via onLoadEarlier */\n/* / onLoadLater as either edge is reached (scroll position is preserved */\n/* when earlier items prepend). Date-filter presets + a jump-to-date */\n/* picker re-anchor the scroll. Top + bottom transparent gradient fades */\n/* (a block-axis mask) signal more content beyond each edge. */\n/* */\n/* Each row reuses AppointmentCard (care-plan + chair chips included). */\n/* All visible text flows through useTranslation('ui') against the */\n/* `appointmentTimeline.*` namespace; no PHI reaches the agent adapter. */\n/* -------------------------------------------------------------------- */\n\n/* How close (px) to an edge before the matching load callback fires. */\nconst EDGE_LOAD_THRESHOLD = 96;\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** Curated imperative handle — identifiers + lifecycle state only. */\nexport interface AppointmentTimelineHandle {\n getItems: () => Array<{ id: string; state: string }>;\n selectItem: (id: string) => void;\n jumpToToday: () => void;\n}\n\nexport interface AppointmentTimelineProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'onClick' | 'id' | 'title'\n> {\n /** Stable instance id, surfaced as `data-component-id`. */\n id?: string;\n /** Appointments to render — any order; grouped + sorted internally. */\n items: AppointmentItem[];\n /**\n * ISO-8601 \"now\" anchor — the timeline scrolls to this day on mount and the\n * \"Today\" preset returns to it. Defaults to the current instant. Stories pass\n * a fixed value for deterministic snapshots.\n */\n nowIso?: string;\n /** Panel heading. Defaults to the localised \"Appointments\". */\n title?: string;\n /** BCP-47 locale override for day headers + each AppointmentCard. */\n locale?: string;\n /** ISO-4217 currency code passed to each AppointmentCard. */\n currency?: string;\n /** Visual density passed to each AppointmentCard. */\n size?: 'sm' | 'md';\n /**\n * Lead each row with the PATIENT (avatar + name as the row title) rather\n * than the operator. Default `false`: the timeline was built for a\n * patient-scoped rail, where repeating the name on every row is noise. A\n * clinic-wide agenda — \"who is coming in next\" across the practice —\n * passes `true`, and rows with no patient read as \"No patient\".\n */\n showPatient?: boolean;\n /** Fires when a row is activated. */\n onOpenAppointment?: (item: AppointmentItem) => void;\n /**\n * The id of the currently selected appointment. The matching card\n * renders with `selected` (info-tinted accent + `aria-current`) so the\n * eye keeps its place in the list after a click.\n */\n selectedId?: string;\n\n /* ----- Infinite scroll ----- */\n /** Load earlier (past) appointments — fired when the top edge is reached. */\n onLoadEarlier?: () => void;\n /** Load later (future) appointments — fired when the bottom edge is reached. */\n onLoadLater?: () => void;\n /** Whether more past appointments exist. Defaults to `true` when `onLoadEarlier` is set. */\n hasMoreEarlier?: boolean;\n /** Whether more future appointments exist. Defaults to `true` when `onLoadLater` is set. */\n hasMoreLater?: boolean;\n /** Show a loading row at the top edge. */\n loadingEarlier?: boolean;\n /** Show a loading row at the bottom edge. */\n loadingLater?: boolean;\n\n /* ----- Filters ----- */\n /** Show the date-filter row (presets + jump-to-date). Default `true`. */\n showFilters?: boolean;\n /**\n * Fired when a jump-to-date / preset targets a day outside the loaded range,\n * so the consumer can load it. The timeline scrolls to the nearest rendered\n * day until then.\n */\n onJumpToDate?: (dateIso: string) => void;\n\n /* ----- Empty ----- */\n emptyTitle?: string;\n emptyDescription?: string;\n\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n\n /**\n * Content rendered between the header/filter row and the scroll region —\n * a summary strip, a \"happening now\" band, anything the host needs\n * ahead of the day-grouped list. Omitted by default (no change to\n * today's layout). Not part of the scroll region: it stays fixed like\n * the header above it.\n */\n headerExtra?: ReactNode;\n /**\n * Forwarded to every row's `AppointmentCard`: withhold the lifecycle\n * badge for the default/expected state (`confirmed`). Default `false`\n * (today's behaviour — every state shows its badge).\n */\n hideDefaultStatus?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n [\n 'ds:flex ds:flex-col ds:h-full ds:min-h-0',\n 'ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]',\n ].join(' '),\n { variants: { size: { sm: '', md: '' } }, defaultVariants: { size: 'sm' } },\n);\n\n/* Scroll region with a block-axis fade mask. The CSS custom properties flip to\n `transparent` at whichever edge has more content (data-fade-top /\n data-fade-bottom), mirroring the TabBar edge-mask technique on the Y axis.\n Disabled under reduced-motion, the accessible theme, and forced-colors. */\nconst scrollRegionClasses = [\n 'ds:flex-1 ds:min-h-0 ds:overflow-y-auto',\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]',\n 'ds:[--atl-mask-top:black] ds:[--atl-mask-bottom:black]',\n 'ds:data-[fade-top=true]:[--atl-mask-top:transparent]',\n 'ds:data-[fade-bottom=true]:[--atl-mask-bottom:transparent]',\n 'ds:[mask-image:linear-gradient(to_bottom,var(--atl-mask-top)_0,black_var(--atl-fade-distance,var(--spacing-lg)),black_calc(100%-var(--atl-fade-distance,var(--spacing-lg))),var(--atl-mask-bottom)_100%)]',\n 'ds:motion-reduce:[mask-image:none]',\n 'ds:[.theme-accessible_&]:[mask-image:none]',\n 'ds:forced-colors:[mask-image:none]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n].join(' ');\n\n/* -------------------------------------------------------------------- */\n/* Day grouping + header labels */\n/* -------------------------------------------------------------------- */\n\ninterface DayGroup {\n key: string;\n date: Date;\n items: AppointmentItem[];\n}\n\n/** Local calendar day key (`YYYY-MM-DD`) — sorts chronologically as a string. */\nfunction localDayKey(d: Date): string {\n const m = `${d.getMonth() + 1}`.padStart(2, '0');\n const day = `${d.getDate()}`.padStart(2, '0');\n return `${d.getFullYear()}-${m}-${day}`;\n}\n\nfunction groupByDay(items: AppointmentItem[]): DayGroup[] {\n const sorted = [...items].sort(\n (a, b) => +new Date(a.startIso) - +new Date(b.startIso),\n );\n const map = new Map<string, DayGroup>();\n for (const item of sorted) {\n const d = new Date(item.startIso);\n const key = localDayKey(d);\n let group = map.get(key);\n if (!group) {\n group = {\n key,\n date: new Date(d.getFullYear(), d.getMonth(), d.getDate()),\n items: [],\n };\n map.set(key, group);\n }\n group.items.push(item);\n }\n return [...map.values()];\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const AppointmentTimeline = forwardRef<\n HTMLElement,\n AppointmentTimelineProps\n>(\n (\n {\n id,\n items,\n nowIso,\n title,\n locale,\n currency,\n size = 'sm',\n showPatient = false,\n onOpenAppointment,\n selectedId,\n onLoadEarlier,\n onLoadLater,\n hasMoreEarlier,\n hasMoreLater,\n loadingEarlier = false,\n loadingLater = false,\n showFilters = true,\n onJumpToDate,\n emptyTitle,\n emptyDescription,\n className,\n 'aria-label': ariaLabel,\n headerExtra,\n hideDefaultStatus = false,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const jumpId = useId();\n const prefersReducedMotion = usePrefersReducedMotion();\n const resolvedLocale = locale ?? i18n.language;\n\n const heading = title ?? t('appointmentTimeline.title');\n const now = useMemo(\n () => (nowIso ? new Date(nowIso) : new Date()),\n [nowIso],\n );\n\n const groups = useMemo(() => groupByDay(items), [items]);\n\n /* Reflow + exit transitions — the same pair notes and tasks use. When\n an appointment is added or removed, surviving cards slide to their\n new positions instead of snapping; a removed card fades out in place\n before the host drops it, so the removal reads as a removal. */\n const reduceMotion = prefersReducedMotion || undefined;\n const flatItemIds = useMemo(\n () => groups.flatMap((g) => g.items.map((i) => i.id)).join(),\n [groups],\n );\n const { containerRef: reflowRef } = useListReflow<HTMLOListElement>({\n key: flatItemIds,\n reduceMotion,\n });\n const exitTransition = useExitTransition({ reduceMotion });\n\n /* Track removed items so they can fade out in place. The previous\n items array is diffed against the current one; removed ids are held\n in `leavingItems` and rendered after the live groups, faded, until\n the exit transition elapses and drops them. */\n const prevItemsRef = useRef(items);\n const [leavingItems, setLeavingItems] = useState<AppointmentItem[]>([]);\n useEffect(() => {\n const prev = prevItemsRef.current;\n if (prev === items) return;\n const currentIds = new Set(items.map((i) => i.id));\n const removed = prev.filter((i) => !currentIds.has(i.id));\n if (removed.length > 0) {\n setLeavingItems((prev) => [...prev, ...removed]);\n removed.forEach((item) => {\n exitTransition.leave(item.id, () => {\n setLeavingItems((prev) => prev.filter((i) => i.id !== item.id));\n });\n });\n }\n prevItemsRef.current = items;\n }, [items, exitTransition]);\n\n const moreEarlier = hasMoreEarlier ?? !!onLoadEarlier;\n const moreLater = hasMoreLater ?? !!onLoadLater;\n\n /* The day to anchor on: today if present, else the nearest upcoming day,\n else the last day we have. */\n const anchorKey = useMemo(() => {\n if (groups.length === 0) return undefined;\n const todayKey = localDayKey(now);\n const keys = groups.map((g) => g.key);\n if (keys.includes(todayKey)) return todayKey;\n return keys.find((k) => k >= todayKey) ?? keys[keys.length - 1];\n }, [groups, now]);\n\n const scrollRef = useRef<HTMLDivElement>(null);\n const dayElRefs = useRef<Map<string, HTMLElement>>(new Map());\n const hasAnchored = useRef(false);\n const prevFirstKey = useRef<string | undefined>(undefined);\n const prevScrollHeight = useRef(0);\n\n const [fadeTop, setFadeTop] = useState(false);\n const [fadeBottom, setFadeBottom] = useState(false);\n\n const updateEdges = useCallback(() => {\n const region = scrollRef.current;\n if (!region) return;\n const { scrollTop, scrollHeight, clientHeight } = region;\n setFadeTop(scrollTop > 1);\n setFadeBottom(scrollTop + clientHeight < scrollHeight - 1);\n }, []);\n\n /* Scroll a day into view at the top of the region. Falls back to the\n nearest rendered day on/after the target (presets may land on an empty\n day). Uses getBoundingClientRect so it is offsetParent-agnostic. */\n const scrollToKey = useCallback(\n (targetKey: string, smooth: boolean) => {\n const region = scrollRef.current;\n if (!region) return;\n let el = dayElRefs.current.get(targetKey);\n if (!el) {\n const keys = [...dayElRefs.current.keys()].sort();\n const next =\n keys.find((k) => k >= targetKey) ?? keys[keys.length - 1];\n el = next ? dayElRefs.current.get(next) : undefined;\n }\n if (!el) return;\n const delta =\n el.getBoundingClientRect().top - region.getBoundingClientRect().top;\n region.scrollTo({\n top: region.scrollTop + delta,\n behavior: smooth && !prefersReducedMotion ? 'smooth' : 'auto',\n });\n },\n [prefersReducedMotion],\n );\n\n /* Anchor on mount; preserve the viewport when earlier days prepend. */\n useIsomorphicLayoutEffect(() => {\n const region = scrollRef.current;\n if (!region) return;\n const firstKey = groups[0]?.key;\n if (!hasAnchored.current) {\n if (groups.length > 0 && anchorKey) {\n scrollToKey(anchorKey, false);\n hasAnchored.current = true;\n }\n } else if (\n prevFirstKey.current &&\n firstKey &&\n firstKey < prevFirstKey.current\n ) {\n const grew = region.scrollHeight - prevScrollHeight.current;\n if (grew > 0) region.scrollTop += grew;\n }\n prevFirstKey.current = firstKey;\n prevScrollHeight.current = region.scrollHeight;\n updateEdges();\n }, [groups, anchorKey, scrollToKey, updateEdges]);\n\n /* Recompute the fades when the region resizes. */\n useIsomorphicLayoutEffect(() => {\n const region = scrollRef.current;\n if (!region || typeof ResizeObserver === 'undefined') return undefined;\n const observer = new ResizeObserver(updateEdges);\n observer.observe(region);\n return () => observer.disconnect();\n }, [updateEdges]);\n\n const handleScroll = useCallback(() => {\n updateEdges();\n const region = scrollRef.current;\n if (!region) return;\n const { scrollTop, scrollHeight, clientHeight } = region;\n if (\n onLoadEarlier &&\n moreEarlier &&\n !loadingEarlier &&\n scrollTop <= EDGE_LOAD_THRESHOLD\n ) {\n onLoadEarlier();\n }\n if (\n onLoadLater &&\n moreLater &&\n !loadingLater &&\n scrollHeight - scrollTop - clientHeight <= EDGE_LOAD_THRESHOLD\n ) {\n onLoadLater();\n }\n }, [\n updateEdges,\n onLoadEarlier,\n onLoadLater,\n moreEarlier,\n moreLater,\n loadingEarlier,\n loadingLater,\n ]);\n\n /* ----- Filter actions ----- */\n const jumpTo = useCallback(\n (date: Date) => {\n const key = localDayKey(date);\n const known = dayElRefs.current.has(key);\n scrollToKey(key, true);\n if (!known) onJumpToDate?.(date.toISOString());\n },\n [scrollToKey, onJumpToDate],\n );\n\n const handleToday = useCallback(() => jumpTo(now), [jumpTo, now]);\n const handleThisWeek = useCallback(() => {\n const start = new Date(now);\n const dow = (start.getDay() + 6) % 7; // Monday-based week start\n start.setDate(start.getDate() - dow);\n jumpTo(start);\n }, [jumpTo, now]);\n const handleThisMonth = useCallback(() => {\n jumpTo(new Date(now.getFullYear(), now.getMonth(), 1));\n }, [jumpTo, now]);\n\n /* ----- Agent handle ----- */\n const itemsRef = useRef<AppointmentItem[]>(items);\n itemsRef.current = items;\n const innerRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => innerRef.current as HTMLElement, []);\n\n const handle = useMemo<AppointmentTimelineHandle>(\n () => ({\n getItems: () =>\n itemsRef.current.map((i) => ({ id: i.id, state: i.state })),\n selectItem: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onOpenAppointment?.(found);\n },\n jumpToToday: () => scrollToKey(localDayKey(now), true),\n }),\n [onOpenAppointment, scrollToKey, now],\n );\n useAgentRegistration(appointmentTimelineAgent, handle, id);\n\n const isEmpty = groups.length === 0 && !loadingEarlier && !loadingLater;\n\n const loadingRow = (key: string) => (\n <div\n key={key}\n aria-hidden=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]\"\n >\n <Skeleton variant=\"rectangular\" height=\"3.5rem\" />\n </div>\n );\n\n return (\n <section\n ref={innerRef}\n data-component=\"appointment-timeline\"\n data-component-id={id}\n aria-label={ariaLabel ?? heading}\n className={rootVariants({ size, className })}\n {...rest}\n >\n {/* Shared rail header: title + (optional) filter row + divider. This\n panel owns its own scroll/fill, so the header stays a fixed band\n (sticky={false}). The rail injects the favourite/close cluster via\n PanelHeaderActionsProvider; standalone it renders none. */}\n <PanelHeader\n icon={<CalendarDays />}\n title={heading}\n filters={\n showFilters ? (\n <>\n <ButtonGroup label={t('appointmentTimeline.filtersLabel')}>\n <Button intent=\"outline\" size=\"sm\" onClick={handleToday}>\n {t('appointmentTimeline.today')}\n </Button>\n <Button intent=\"outline\" size=\"sm\" onClick={handleThisWeek}>\n {t('appointmentTimeline.thisWeek')}\n </Button>\n <Button intent=\"outline\" size=\"sm\" onClick={handleThisMonth}>\n {t('appointmentTimeline.thisMonth')}\n </Button>\n </ButtonGroup>\n <label htmlFor={jumpId} className=\"ds:sr-only\">\n {t('appointmentTimeline.jumpToDate')}\n </label>\n <DatePicker\n id={jumpId}\n size=\"sm\"\n placeholder={t('appointmentTimeline.jumpToDate')}\n onChange={(date) => {\n if (date) jumpTo(date);\n }}\n />\n </>\n ) : undefined\n }\n />\n\n {headerExtra}\n\n {isEmpty ? (\n <div className=\"ds:flex-1 ds:p-[var(--spacing-md)]\">\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={emptyTitle ?? t('appointmentTimeline.empty.title')}\n description={\n emptyDescription ?? t('appointmentTimeline.empty.description')\n }\n />\n </div>\n ) : (\n <div\n ref={scrollRef}\n // The scroll region must be keyboard-focusable so arrow / Home /\n // End can drive it (axe scrollable-region-focusable); jsx-a11y's\n // generic rule doesn't know this element scrolls.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n onScroll={handleScroll}\n data-fade-top={fadeTop ? 'true' : undefined}\n data-fade-bottom={fadeBottom ? 'true' : undefined}\n className={scrollRegionClasses}\n >\n {loadingEarlier ? loadingRow('loading-earlier') : null}\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" is NOT redundant: WebKit drops implicit list semantics when list-style is none */}\n <ol\n ref={reflowRef}\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0\"\n >\n {groups.map((group) => (\n <li\n key={group.key}\n ref={(node) => {\n if (node) dayElRefs.current.set(group.key, node);\n else dayElRefs.current.delete(group.key);\n }}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\"\n >\n <DayHeader\n date={group.date}\n now={now}\n locale={resolvedLocale}\n todayLabel={t('appointmentTimeline.today')}\n tomorrowLabel={t('appointmentTimeline.tomorrow')}\n yesterdayLabel={t('appointmentTimeline.yesterday')}\n />\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" is NOT redundant: WebKit drops implicit list semantics when list-style is none */}\n <ul\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\"\n >\n {group.items.map((item) => (\n <AppointmentCard\n key={item.id}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={showPatient}\n locale={resolvedLocale}\n currency={currency}\n onActivate={onOpenAppointment}\n selected={item.id === selectedId}\n hideDefaultStatus={hideDefaultStatus}\n data-appointment-id={item.id}\n data-reflow-id={item.id}\n className={REFLOW_ROW_CLASS}\n />\n ))}\n </ul>\n </li>\n ))}\n {/* Leaving cards: removed from state but held for the exit\n fade. Rendered without `data-reflow-id` so the reflow hook\n ignores them; faded via `data-leaving`. */}\n {leavingItems.length > 0\n ? leavingItems.map((item) => (\n <AppointmentCard\n key={`leaving-${item.id}`}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={showPatient}\n locale={resolvedLocale}\n currency={currency}\n aria-hidden=\"true\"\n data-leaving\n className={[\n 'ds:opacity-0',\n 'ds:transition-opacity',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:ease-[var(--ease-out)]',\n 'ds:motion-reduce:transition-none',\n ].join(' ')}\n />\n ))\n : null}\n </ol>\n {loadingLater ? loadingRow('loading-later') : null}\n </div>\n )}\n </section>\n );\n },\n);\n\nAppointmentTimeline.displayName = 'AppointmentTimeline';\n\n/* -------------------------------------------------------------------- */\n/* Day header — sticky label per day group */\n/* -------------------------------------------------------------------- */\n\ninterface DayHeaderProps {\n date: Date;\n now: Date;\n locale: string | undefined;\n todayLabel: string;\n tomorrowLabel: string;\n yesterdayLabel: string;\n}\n\nfunction DayHeader({\n date,\n now,\n locale,\n todayLabel,\n tomorrowLabel,\n yesterdayLabel,\n}: DayHeaderProps): ReactNode {\n const key = localDayKey(date);\n const todayKey = localDayKey(now);\n const tomorrow = new Date(now);\n tomorrow.setDate(now.getDate() + 1);\n const yesterday = new Date(now);\n yesterday.setDate(now.getDate() - 1);\n\n const isToday = key === todayKey;\n\n let label: string;\n if (isToday) label = todayLabel;\n else if (key === localDayKey(tomorrow)) label = tomorrowLabel;\n else if (key === localDayKey(yesterday)) label = yesterdayLabel;\n else {\n const sameYear = date.getFullYear() === now.getFullYear();\n label = new Intl.DateTimeFormat(locale, {\n weekday: 'short',\n day: 'numeric',\n month: 'short',\n ...(sameYear ? {} : { year: 'numeric' }),\n }).format(date);\n }\n\n // Today's group is marked with the brand colour + a leading dot so the\n // current day reads at a glance. `--primary` clears AA on the card in every\n // theme (violet-500 light, magenta on dark); the dot is decorative.\n return (\n <div\n data-today={isToday ? 'true' : undefined}\n className={[\n 'ds:sticky ds:top-0 ds:z-[1] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]',\n 'ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow',\n isToday\n ? 'ds:text-[color:var(--primary)] ds:font-semibold'\n : 'ds:text-[color:var(--muted-foreground)]',\n ].join(' ')}\n >\n {isToday ? (\n <span\n aria-hidden=\"true\"\n className=\"ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]\"\n />\n ) : null}\n {label}\n </div>\n );\n}\n\n/** Re-export of the size variant union for downstream typing. */\nexport type AppointmentTimelineSize = NonNullable<\n VariantProps<typeof rootVariants>['size']\n>;\n"],"names":["appointmentTimelineAgent","handle","args","EDGE_LOAD_THRESHOLD","rootVariants","cva","scrollRegionClasses","localDayKey","d","m","day","groupByDay","items","sorted","a","b","map","item","key","group","AppointmentTimeline","forwardRef","id","nowIso","title","locale","currency","size","showPatient","onOpenAppointment","selectedId","onLoadEarlier","onLoadLater","hasMoreEarlier","hasMoreLater","loadingEarlier","loadingLater","showFilters","onJumpToDate","emptyTitle","emptyDescription","className","ariaLabel","headerExtra","hideDefaultStatus","rest","ref","t","i18n","useTranslation","jumpId","useId","prefersReducedMotion","usePrefersReducedMotion","resolvedLocale","heading","now","useMemo","groups","reduceMotion","flatItemIds","g","i","reflowRef","useListReflow","exitTransition","useExitTransition","prevItemsRef","useRef","leavingItems","setLeavingItems","useState","useEffect","prev","currentIds","removed","moreEarlier","moreLater","anchorKey","todayKey","keys","k","scrollRef","dayElRefs","hasAnchored","prevFirstKey","prevScrollHeight","fadeTop","setFadeTop","fadeBottom","setFadeBottom","updateEdges","useCallback","region","scrollTop","scrollHeight","clientHeight","scrollToKey","targetKey","smooth","el","next","delta","useIsomorphicLayoutEffect","firstKey","_a","grew","observer","handleScroll","jumpTo","date","known","handleToday","handleThisWeek","start","dow","handleThisMonth","itemsRef","innerRef","useImperativeHandle","targetId","found","useAgentRegistration","isEmpty","loadingRow","jsx","Skeleton","jsxs","PanelHeader","CalendarDays","Fragment","ButtonGroup","Button","DatePicker","EmptyState","node","DayHeader","AppointmentCard","REFLOW_ROW_CLASS","todayLabel","tomorrowLabel","yesterdayLabel","tomorrow","yesterday","isToday","label","sameYear"],"mappings":";;;;;;;;;;;;;;;;AAaO,MAAMA,KACX;AAAA,EACE,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,UAAU,MAAM;AAAA,EAC/B,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,WAAWC,EAAK,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,IAEF,eAAe;AAAA,MACb,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACD,MAAW;AAClB,QAAAA,EAAO,YAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAA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,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAEV;AAAA,QACHoB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -5,7 +5,7 @@ import { useTranslation as H } from "react-i18next";
|
|
|
5
5
|
import { I as M } from "./icon-button-CehAeZoP.js";
|
|
6
6
|
import { S as q } from "./skeleton-B1KTdJ4N.js";
|
|
7
7
|
import { E as K } from "./empty-state-BUN_UAWf.js";
|
|
8
|
-
import { A as V } from "./appointment-card-
|
|
8
|
+
import { A as V } from "./appointment-card-DluZy8Iv.js";
|
|
9
9
|
import { u as _ } from "./registry-DvAUVLHh.js";
|
|
10
10
|
import { C as B } from "./calendar-days-BGWklvE-.js";
|
|
11
11
|
import { P as D } from "./plus-DzMQ_c6b.js";
|
|
@@ -190,4 +190,4 @@ export {
|
|
|
190
190
|
ae as a,
|
|
191
191
|
L as b
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=appointment-tray-
|
|
193
|
+
//# sourceMappingURL=appointment-tray-CLrGGnKR.js.map
|