@alfadocs/ui-kit-debug 1.7.0 → 1.8.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/{anamnesis-summary-rows-F-cCmFAn.js → anamnesis-summary-rows-d44s_whc.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-F-cCmFAn.js.map → anamnesis-summary-rows-d44s_whc.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-BjlF2rTz.js → antenatal-schedule-timeline-B1k8QkA6.js} +3 -3
- package/dist/_chunks/{antenatal-schedule-timeline-BjlF2rTz.js.map → antenatal-schedule-timeline-B1k8QkA6.js.map} +1 -1
- package/dist/_chunks/{appointment-card-BhcPJpXh.js → appointment-card-Dzr3GeVz.js} +73 -90
- package/dist/_chunks/appointment-card-Dzr3GeVz.js.map +1 -0
- package/dist/_chunks/{appointment-timeline-CMPvzlGZ.js → appointment-timeline-0mwtpErq.js} +3 -3
- package/dist/_chunks/{appointment-timeline-CMPvzlGZ.js.map → appointment-timeline-0mwtpErq.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-3c_FLxXJ.js → appointment-tray-4FUu_5NX.js} +2 -2
- package/dist/_chunks/{appointment-tray-3c_FLxXJ.js.map → appointment-tray-4FUu_5NX.js.map} +1 -1
- package/dist/_chunks/armchair-BaLDW6Hz.js +23 -0
- package/dist/_chunks/armchair-BaLDW6Hz.js.map +1 -0
- package/dist/_chunks/{booking-CQMJUFG-.js → booking-DHkKcUIl.js} +4 -4
- package/dist/_chunks/{booking-CQMJUFG-.js.map → booking-DHkKcUIl.js.map} +1 -1
- package/dist/_chunks/{calendar-4dXTvsCz.js → calendar-B4Gnyu1C.js} +553 -437
- package/dist/_chunks/calendar-B4Gnyu1C.js.map +1 -0
- package/dist/_chunks/calendar-event-card-Bjdbik8G.js +425 -0
- package/dist/_chunks/calendar-event-card-Bjdbik8G.js.map +1 -0
- package/dist/_chunks/{care-plan-card-DQjVRDxO.js → care-plan-card-aDN4oem9.js} +3 -3
- package/dist/_chunks/{care-plan-card-DQjVRDxO.js.map → care-plan-card-aDN4oem9.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-CMpoeNkb.js → care-plan-entry-card-BEhANdBE.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-CMpoeNkb.js.map → care-plan-entry-card-BEhANdBE.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-CxYoq23f.js → care-plan-header-CkpPyQqG.js} +2 -2
- package/dist/_chunks/{care-plan-header-CxYoq23f.js.map → care-plan-header-CkpPyQqG.js.map} +1 -1
- package/dist/_chunks/{color-picker-D-tUwxxT.js → color-picker-oZ6zYks8.js} +164 -151
- package/dist/_chunks/color-picker-oZ6zYks8.js.map +1 -0
- package/dist/_chunks/control-room-rail-Cj2iX9h_.js +337 -0
- package/dist/_chunks/control-room-rail-Cj2iX9h_.js.map +1 -0
- package/dist/_chunks/{cycle-calculator-DzgO1vzP.js → cycle-calculator-DmtYGhqq.js} +3 -3
- package/dist/_chunks/{cycle-calculator-DzgO1vzP.js.map → cycle-calculator-DmtYGhqq.js.map} +1 -1
- package/dist/_chunks/{date-picker-Bp64zk2p.js → date-picker-CepI_oI2.js} +77 -74
- package/dist/_chunks/date-picker-CepI_oI2.js.map +1 -0
- package/dist/_chunks/{date-picker-variants-pKAJfnWr.js → date-picker-variants-DfuooXEK.js} +7 -2
- package/dist/_chunks/{date-picker-variants-pKAJfnWr.js.map → date-picker-variants-DfuooXEK.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-CDrZ8Zh0.js → date-range-picker-BD8P_rJq.js} +46 -45
- package/dist/_chunks/{date-range-picker-CDrZ8Zh0.js.map → date-range-picker-BD8P_rJq.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-DVETwpzc.js → date-time-picker-3I2vVKGV.js} +2 -2
- package/dist/_chunks/{date-time-picker-DVETwpzc.js.map → date-time-picker-3I2vVKGV.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-wK8Tajzz.js → due-date-calculator-BF_Ikofx.js} +4 -4
- package/dist/_chunks/{due-date-calculator-wK8Tajzz.js.map → due-date-calculator-BF_Ikofx.js.map} +1 -1
- package/dist/_chunks/{entity-card-9_62gY7l.js → entity-card-DmrgYSEX.js} +4 -4
- package/dist/_chunks/{entity-card-9_62gY7l.js.map → entity-card-DmrgYSEX.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-C_uDAeP_.js → gestational-age-calculator-CxZelpu2.js} +5 -5
- package/dist/_chunks/{gestational-age-calculator-C_uDAeP_.js.map → gestational-age-calculator-CxZelpu2.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-BaXkJhT-.js → hcg-doubling-CpU7H5rQ.js} +3 -3
- package/dist/_chunks/{hcg-doubling-BaXkJhT-.js.map → hcg-doubling-CpU7H5rQ.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-DH4JYpKU.js → link-cell-renderer-BZQtsuFz.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-DH4JYpKU.js.map → link-cell-renderer-BZQtsuFz.js.map} +1 -1
- package/dist/_chunks/{notes-panel-DlnENphf.js → notes-panel-e9cJWVRg.js} +2 -2
- package/dist/_chunks/{notes-panel-DlnENphf.js.map → notes-panel-e9cJWVRg.js.map} +1 -1
- package/dist/_chunks/{operator-hero-CCDnIa1S.js → operator-hero-BnFv-Uef.js} +2 -2
- package/dist/_chunks/{operator-hero-CCDnIa1S.js.map → operator-hero-BnFv-Uef.js.map} +1 -1
- package/dist/_chunks/{parse-JqixfsU0.js → parse-MN9bGkrY.js} +2 -2
- package/dist/_chunks/{parse-JqixfsU0.js.map → parse-MN9bGkrY.js.map} +1 -1
- package/dist/_chunks/{patient-details-qnsqYBGQ.js → patient-details-xrqe13az.js} +160 -159
- package/dist/_chunks/patient-details-xrqe13az.js.map +1 -0
- package/dist/_chunks/{patient-table-DwshfVsQ.js → patient-table-BqYomX50.js} +2 -2
- package/dist/_chunks/{patient-table-DwshfVsQ.js.map → patient-table-BqYomX50.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-BBIG7NFL.js → payment-automation-upsell-DwQW2fRp.js} +52 -63
- package/dist/_chunks/payment-automation-upsell-DwQW2fRp.js.map +1 -0
- package/dist/_chunks/{payment-request-card-BjjBMdsp.js → payment-request-card-YVCcCZ25.js} +2 -2
- package/dist/_chunks/{payment-request-card-BjjBMdsp.js.map → payment-request-card-YVCcCZ25.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-BVS_9YU2.js → pregnancy-dating-DtToyMyc.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-BVS_9YU2.js.map → pregnancy-dating-DtToyMyc.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-CiHwgISa.js → radiograph-panel.agent-C3trfWqB.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-CiHwgISa.js.map → radiograph-panel.agent-C3trfWqB.js.map} +1 -1
- package/dist/_chunks/repeat-CvQa5rZt.js +17 -0
- package/dist/_chunks/repeat-CvQa5rZt.js.map +1 -0
- package/dist/_chunks/resource-chip-DYTG0IQQ.js +83 -0
- package/dist/_chunks/resource-chip-DYTG0IQQ.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-DARnq_6N.js → rich-text-editor-BDfFtK4H.js} +2 -2
- package/dist/_chunks/{rich-text-editor-DARnq_6N.js.map → rich-text-editor-BDfFtK4H.js.map} +1 -1
- package/dist/_chunks/subDays-BLl3y3pd.js +8 -0
- package/dist/_chunks/{subDays-CAUv47M1.js.map → subDays-BLl3y3pd.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- package/dist/components/_shared/date-picker-variants.d.ts.map +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/calendar.agent.d.ts.map +1 -1
- package/dist/components/calendar/calendar.d.ts +138 -12
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +48 -11
- 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/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/color-picker/index.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts.map +1 -1
- package/dist/components/color-picker/index.js +4 -3
- package/dist/components/color-picker/palettes.d.ts +10 -0
- package/dist/components/color-picker/palettes.d.ts.map +1 -1
- package/dist/components/control-room-rail/control-room-rail.d.ts +9 -0
- package/dist/components/control-room-rail/control-room-rail.d.ts.map +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/date-picker.d.ts +11 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-details/patient-details.d.ts +8 -0
- package/dist/components/patient-details/patient-details.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/resource-chip/index.d.ts +3 -0
- package/dist/components/resource-chip/index.d.ts.map +1 -0
- package/dist/components/resource-chip/index.js +5 -0
- package/dist/components/resource-chip/index.js.map +1 -0
- package/dist/components/resource-chip/resource-chip.d.ts +26 -0
- package/dist/components/resource-chip/resource-chip.d.ts.map +1 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +4 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +4 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +4 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +4 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +4 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +4 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +4 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +4 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +4 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +4 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +4 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +4 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +4 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +4 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +4 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +4 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +4 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +4 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +4 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +4 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +4 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +4 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +4 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +4 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +4 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +4 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +4 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +4 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +4 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +4 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +4 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +4 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +4 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +4 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +4 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +961 -958
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +4 -0
- package/dist/locales/de.json +4 -0
- package/dist/locales/el.json +4 -0
- package/dist/locales/en.json +4 -0
- package/dist/locales/es.json +4 -0
- package/dist/locales/fr.json +4 -0
- package/dist/locales/hi.json +4 -0
- package/dist/locales/it.json +4 -0
- package/dist/locales/ja.json +4 -0
- package/dist/locales/nl.json +4 -0
- package/dist/locales/pl.json +4 -0
- package/dist/locales/pt.json +4 -0
- package/dist/locales/ro.json +4 -0
- package/dist/locales/ru.json +4 -0
- package/dist/locales/sq.json +4 -0
- package/dist/locales/sv.json +4 -0
- package/dist/locales/tr.json +4 -0
- package/dist/locales/zh.json +4 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/tokens.css +40 -24
- package/package.json +5 -1
- package/dist/_chunks/appointment-card-BhcPJpXh.js.map +0 -1
- package/dist/_chunks/calendar-4dXTvsCz.js.map +0 -1
- package/dist/_chunks/calendar-event-card-C6qGtywL.js +0 -257
- package/dist/_chunks/calendar-event-card-C6qGtywL.js.map +0 -1
- package/dist/_chunks/color-picker-D-tUwxxT.js.map +0 -1
- package/dist/_chunks/control-room-rail-IH1eBjrK.js +0 -333
- package/dist/_chunks/control-room-rail-IH1eBjrK.js.map +0 -1
- package/dist/_chunks/date-picker-Bp64zk2p.js.map +0 -1
- package/dist/_chunks/patient-details-qnsqYBGQ.js.map +0 -1
- package/dist/_chunks/payment-automation-upsell-BBIG7NFL.js.map +0 -1
- package/dist/_chunks/subDays-CAUv47M1.js +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment-card-Dzr3GeVz.js","sources":["../../node_modules/lucide-react/dist/esm/icons/clipboard-plus.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","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 Globe,\n MapPin,\n Star,\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 appointmentStateBadge,\n colorIdToToken,\n colorIdToAvatarToken,\n isSafeEntityUrl,\n} from '../_shared/entity-card';\nimport type { AppointmentState } from '../_shared/entity-card';\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/* -------------------------------------------------------------------- */\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 only, drives the avatar. */\nexport interface AppointmentPatient {\n /** Patient display name. */\n name: string;\n /** Optional avatar image URL. */\n avatarUrl?: 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/** 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 /** Optional deep link — when present (and safe) the row renders as an anchor. */\n url?: string;\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 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 },\n defaultVariants: {\n size: 'sm',\n interactive: false,\n surface: 'flat',\n },\n },\n);\n\nconst stretchedLinkClass = [\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' | 'role' | '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\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 className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const interactive = !!onActivate;\n const hasSafeUrl = !!item.url && isSafeEntityUrl(item.url);\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\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 </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 + ' ds:contents'}\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:contents 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\n return (\n <div\n ref={ref}\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 className={appointmentCardVariants({\n size,\n interactive,\n surface,\n className,\n })}\n {...rest}\n >\n {/* Leading rail: type glyph + start time + duration */}\n <span className=\"ds:flex ds:w-16 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: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 {activator}\n </div>\n <Badge\n variant={appointmentStateBadge(item.state)}\n size=\"sm\"\n withDot\n className=\"ds:shrink-0\"\n >\n {stateLabel}\n </Badge>\n </div>\n\n {/* Meta line: operator name · specialty · first visit\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 <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 </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 · advance-deposit */}\n {item.carePlan ||\n item.chair ||\n item.flags?.bookedOnline ||\n item.flags?.highlightedAnamnesis ||\n hasAdvance ? (\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 {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 </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","OPERATOR_DOT_CLASS","operatorDotClass","colorId","colorIdToToken","appointmentCardVariants","cva","stretchedLinkClass","TYPE_ICON","MapPin","Video","AppointmentCard","forwardRef","item","size","surface","locale","currency","showPatient","onActivate","className","rest","ref","t","useTranslation","interactive","hasSafeUrl","isSafeEntityUrl","patientName","_a","operatorName","_b","stateLabel","avatarSize","TypeIcon","title","ariaLabel","titleNode","jsx","activator","treatmentTags","tx","index","label","Tag","advanceCents","_c","hasAdvance","jsxs","Timestamp","Avatar","colorIdToAvatarToken","_d","_e","_f","Badge","appointmentStateBadge","_g","_h","Star","_i","_j","_k","Armchair","_l","Globe","_m","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,GAAiB,kBAAkBF,EAAU,GCW7DG,KAA6C;AAAA,EACjD,2BAA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Q;AAAA,kBACR,MAAK;AAAA,kBACL,2BAAUxD,IAAA,EAAc;AAAA,kBAEvB,YAAE,4BAA4B;AAAA,oBAC7B,QAAQc,EAAK,SAAS;AAAA,kBAAA,CACvB;AAAA,gBAAA;AAAA,cAAA,IAED;AAAA,cACHA,EAAK,QACJ,gBAAAyB,EAACiB,GAAA,EAAM,SAAQ,WAAU,MAAK,MAAK,SAAS,gBAAAjB,EAACyB,MAAS,GACnD,UAAAxC,EAAE,yBAAyB,EAAE,OAAOV,EAAK,MAAA,CAAO,GACnD,IACE;AAAA,eACHmD,IAAAnD,EAAK,UAAL,QAAAmD,EAAY,eACX,gBAAA1B,EAACiB,GAAA,EAAM,SAAQ,QAAO,MAAK,MAAK,2BAAUU,IAAA,EAAM,GAC7C,UAAA1C,EAAE,mCAAmC,GACxC,IACE;AAAA,eACH2C,IAAArD,EAAK,UAAL,QAAAqD,EAAY,uBACX,gBAAA5B,EAACiB,KAAM,SAAQ,WAAU,MAAK,MAAK,SAAO,IACvC,UAAAhC,EAAE,2CAA2C,GAChD,IACE;AAAA,cACHwB,IACC,gBAAAT;AAAA,gBAAC6B;AAAA,gBAAA;AAAA,kBACC,OAAM;AAAA,kBACN,QAAStB,IAA0B;AAAA,kBACnC,UAAA5B;AAAA,kBACA,QAAAD;AAAA,kBACA,MAAK;AAAA,kBACL,WAAS;AAAA,gBAAA;AAAA,cAAA,IAET;AAAA,YAAA,EAAA,CACN,IACE;AAAA,UAAA,GACN;AAAA,UAECS,IACC,gBAAAa;AAAA,YAAC8B;AAAA,YAAA;AAAA,cACC,eAAY;AAAA,cACZ,WAAU;AAAA,YAAA;AAAA,UAAA,IAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAzD,GAAgB,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -2,10 +2,10 @@ import { jsxs as C, jsx as o, Fragment as ve } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as ke, useId as be, useMemo as M, useRef as T, useState as X, useCallback as x, useImperativeHandle as Te } from "react";
|
|
3
3
|
import { c as xe } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as De } from "react-i18next";
|
|
5
|
-
import { A as we } from "./appointment-card-
|
|
5
|
+
import { A as we } from "./appointment-card-Dzr3GeVz.js";
|
|
6
6
|
import { B as K } from "./button-nJaPh_HC.js";
|
|
7
7
|
import { B as Re } from "./button-group-CaxRJsNG.js";
|
|
8
|
-
import { D as Ie } from "./date-picker-
|
|
8
|
+
import { D as Ie } from "./date-picker-CepI_oI2.js";
|
|
9
9
|
import { P as Se } from "./panel-header-D313n_9-.js";
|
|
10
10
|
import { S as je } from "./skeleton-CZbwyJAA.js";
|
|
11
11
|
import { E as Ce } from "./empty-state-X0sVPfVo.js";
|
|
@@ -385,4 +385,4 @@ export {
|
|
|
385
385
|
Ke as A,
|
|
386
386
|
Ne as a
|
|
387
387
|
};
|
|
388
|
-
//# sourceMappingURL=appointment-timeline-
|
|
388
|
+
//# sourceMappingURL=appointment-timeline-0mwtpErq.js.map
|
package/dist/_chunks/{appointment-timeline-CMPvzlGZ.js.map → appointment-timeline-0mwtpErq.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-timeline-CMPvzlGZ.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/* -------------------------------------------------------------------- */\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 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 { 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 /** Fires when a row is activated. */\n onOpenAppointment?: (item: AppointmentItem) => void;\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/* -------------------------------------------------------------------- */\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 onOpenAppointment,\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 ...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 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 {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 <ol className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0\">\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 <ul className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\">\n {group.items.map((item) => (\n <AppointmentCard\n key={item.id}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={false}\n locale={resolvedLocale}\n currency={currency}\n onActivate={onOpenAppointment}\n data-appointment-id={item.id}\n />\n ))}\n </ul>\n </li>\n ))}\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","onOpenAppointment","onLoadEarlier","onLoadLater","hasMoreEarlier","hasMoreLater","loadingEarlier","loadingLater","showFilters","onJumpToDate","emptyTitle","emptyDescription","className","ariaLabel","rest","ref","t","i18n","useTranslation","jumpId","useId","prefersReducedMotion","usePrefersReducedMotion","resolvedLocale","heading","now","useMemo","groups","moreEarlier","moreLater","anchorKey","todayKey","keys","g","k","scrollRef","useRef","dayElRefs","hasAnchored","prevFirstKey","prevScrollHeight","fadeTop","setFadeTop","useState","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","i","targetId","found","useAgentRegistration","isEmpty","loadingRow","jsx","Skeleton","jsxs","PanelHeader","CalendarDays","Fragment","ButtonGroup","Button","DatePicker","EmptyState","node","DayHeader","AppointmentCard","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AAE,MAAM,UAAA;AAAA,IAAU,CACvC,EAAE,OAAOpC,CAAI;AAAA,EAChB;AAKA,SACE,gBAAAkB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAYgB,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,gBAAAlB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAEV;AAAA,QACHmB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
1
|
+
{"version":3,"file":"appointment-timeline-0mwtpErq.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/* -------------------------------------------------------------------- */\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 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 { 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 /** Fires when a row is activated. */\n onOpenAppointment?: (item: AppointmentItem) => void;\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/* -------------------------------------------------------------------- */\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 onOpenAppointment,\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 ...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 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 {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 <ol className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0\">\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 <ul className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\">\n {group.items.map((item) => (\n <AppointmentCard\n key={item.id}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={false}\n locale={resolvedLocale}\n currency={currency}\n onActivate={onOpenAppointment}\n data-appointment-id={item.id}\n />\n ))}\n </ul>\n </li>\n ))}\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","onOpenAppointment","onLoadEarlier","onLoadLater","hasMoreEarlier","hasMoreLater","loadingEarlier","loadingLater","showFilters","onJumpToDate","emptyTitle","emptyDescription","className","ariaLabel","rest","ref","t","i18n","useTranslation","jumpId","useId","prefersReducedMotion","usePrefersReducedMotion","resolvedLocale","heading","now","useMemo","groups","moreEarlier","moreLater","anchorKey","todayKey","keys","g","k","scrollRef","useRef","dayElRefs","hasAnchored","prevFirstKey","prevScrollHeight","fadeTop","setFadeTop","useState","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","i","targetId","found","useAgentRegistration","isEmpty","loadingRow","jsx","Skeleton","jsxs","PanelHeader","CalendarDays","Fragment","ButtonGroup","Button","DatePicker","EmptyState","node","DayHeader","AppointmentCard","todayLabel","tomorrowLabel","yesterdayLabel","tomorrow","yesterday","isToday","label","sameYear"],"mappings":";;;;;;;;;;;;;;;AAWO,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,EAC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AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAEV;AAAA,QACHmB;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-DA2CAGHZ.js";
|
|
6
6
|
import { S as q } from "./skeleton-CZbwyJAA.js";
|
|
7
7
|
import { E as K } from "./empty-state-X0sVPfVo.js";
|
|
8
|
-
import { A as V } from "./appointment-card-
|
|
8
|
+
import { A as V } from "./appointment-card-Dzr3GeVz.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-4FUu_5NX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-tray-3c_FLxXJ.js","sources":["../../src/components/appointment-card/appointment-card.agent.ts","../../src/components/appointment-card/appointment-tray.agent.ts","../../src/components/appointment-card/appointment-tray.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentCard. */\n/* */\n/* Single-appointment surface. Activation is owned by the consumer / */\n/* host tray; the card emits a DOM hook so a future MCP UI bridge can */\n/* address one rendered card by its appointment id. Read-only — the card */\n/* exposes no imperative handle of its own (the tray owns activation). */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\n\nexport const appointmentCardAgent: AgentAdapter = {\n id: 'appointment-card',\n // 'pick' (non-persisting activation) is host-delegated: the card exposes no\n // handle of its own — its enclosing AppointmentTray performs the pick via\n // `appointment-tray.select_item`, addressing this card by its data-component-id.\n capabilities: ['pick'],\n state: {},\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-card',\n description:\n 'Marks the element as a kit AppointmentCard. The root also emits data-component-id sourced from item.id, data-state with the appointment lifecycle, and data-type with the delivery channel.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'item.id',\n description: 'Sourced from item.id — the stable appointment identifier.',\n },\n },\n};\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentTray. */\n/* */\n/* Tray-level surface: read appointment ids + lifecycle state (never */\n/* patient names / treatments), and route an activation through the */\n/* curated handle. AppointmentTray is in-page (no open/close). */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { AppointmentTrayHandle } from './appointment-tray';\n\nexport const appointmentTrayAgent: AgentAdapter<AppointmentTrayHandle> = {\n id: 'appointment-tray',\n // 'pick' (non-persisting activation): select_item routes an activation\n // through onActivate — it does not persist a \"selected appointment\" value,\n // so this is a focus/pick, not a select_single.\n capabilities: ['pick'],\n state: {\n items: {\n type: 'Array<{ id: string; state: string }>',\n descriptionKey: 'ui.agent.appointmentTray.state.items',\n description:\n 'Currently-displayed 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.appointmentTray.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 },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-tray',\n description: 'Marks the AppointmentTray 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 tray from the agent.',\n },\n item: {\n attr: 'data-appointment-id',\n description:\n 'Stable appointment id emitted on each rendered AppointmentCard inside the tray.',\n },\n },\n};\n","import {\n forwardRef,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CalendarDays, Plus } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { AppointmentCard, type AppointmentItem } from './appointment-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { appointmentTrayAgent } from './appointment-tray.agent';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentTray */\n/* */\n/* Bordered panel that hosts a list of AppointmentCards — header with a */\n/* title + optional caption + an \"Add\" affordance, a body that branches */\n/* on loading (Skeleton) / empty (EmptyState) / list. Mirrors AgendaTray */\n/* but composes the richer AppointmentCard row. */\n/* */\n/* All visible text flows through useTranslation('ui') against the */\n/* `appointmentTray.*` namespace. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA — panel surface */\n/* -------------------------------------------------------------------- */\n\nconst appointmentTrayVariants = cva(\n [\n 'ds:flex ds:flex-col',\n 'ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]',\n 'ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2',\n 'ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]',\n 'ds:overflow-hidden',\n ].join(' '),\n {\n variants: {\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/**\n * Curated imperative handle for AppointmentTray — the forwardRef target so a\n * future agent / MCP UI bridge can drive the tray without touching the DOM.\n * Reads identifiers + lifecycle state only, never patient identity. See\n * `appointment-tray.agent.ts`.\n */\nexport interface AppointmentTrayHandle {\n getItems: () => Array<{ id: string; state: string }>;\n selectItem: (id: string) => void;\n}\n\nexport interface AppointmentTrayProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'onClick' | 'id'>,\n VariantProps<typeof appointmentTrayVariants> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so an\n * agent / MCP UI bridge can address this specific tray.\n */\n id?: string;\n /** The appointments to render. */\n items: AppointmentItem[];\n /** Section title — rendered in the header. Localised by the consumer. */\n title?: string;\n /** Optional small caption (e.g. localised date) shown next to the title. */\n caption?: string;\n /** Visual density passed through to each AppointmentCard. */\n size?: 'sm' | 'md';\n /** BCP-47 locale override passed to each AppointmentCard. */\n locale?: string;\n /** ISO-4217 currency code passed to each AppointmentCard. */\n currency?: string;\n onOpenAppointment?: (item: AppointmentItem) => void;\n onAddAppointment?: () => void;\n /** Localised label for the \"Add\" affordance. */\n addLabel?: string;\n loading?: boolean;\n emptyTitle?: string;\n emptyDescription?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const AppointmentTray = forwardRef<HTMLElement, AppointmentTrayProps>(\n (\n {\n id,\n items,\n title,\n caption,\n size = 'sm',\n locale,\n currency,\n onOpenAppointment,\n onAddAppointment,\n addLabel,\n loading = false,\n emptyTitle,\n emptyDescription,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const heading = title ?? t('appointmentTray.title');\n const resolvedAddLabel = addLabel ?? t('appointmentTray.add');\n const isEmpty = !loading && items.length === 0;\n\n let body: ReactNode;\n if (loading) {\n body = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n {[0, 1, 2].map((i) => (\n <Skeleton key={i} variant=\"rectangular\" height=\"3.5rem\" />\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = (\n <div className=\"ds:p-[var(--spacing-md)]\">\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={emptyTitle ?? t('appointmentTray.empty.title')}\n description={\n emptyDescription ?? t('appointmentTray.empty.description')\n }\n />\n </div>\n );\n } else {\n body = (\n <ul className=\"ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-[var(--spacing-2xs)]\">\n {items.map((item) => (\n <AppointmentCard\n key={item.id}\n item={item}\n size={size}\n locale={locale}\n currency={currency}\n onActivate={onOpenAppointment}\n data-appointment-id={item.id}\n />\n ))}\n </ul>\n );\n }\n\n /* Curated imperative handle for agent integration. See\n * appointment-tray.agent.ts. */\n const itemsRef = useRef<AppointmentItem[]>(items);\n itemsRef.current = items;\n\n const innerRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => innerRef.current as HTMLElement, []);\n\n const handle = useMemo<AppointmentTrayHandle>(\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 }),\n [onOpenAppointment],\n );\n\n useAgentRegistration(appointmentTrayAgent, handle, id);\n\n return (\n <section\n ref={innerRef}\n aria-label={heading}\n data-component=\"appointment-tray\"\n data-component-id={id}\n className={appointmentTrayVariants({ size, className })}\n {...rest}\n >\n <header className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0\">\n <h3 className=\"ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card\">\n <CalendarDays aria-hidden=\"true\" className=\"ds:size-4\" />\n {heading}\n </h3>\n {caption ? (\n <span className=\"type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {caption}\n </span>\n ) : null}\n </div>\n {onAddAppointment ? (\n <IconButton\n icon={<Plus />}\n intent=\"outline\"\n size=\"sm\"\n aria-label={resolvedAddLabel}\n onClick={onAddAppointment}\n />\n ) : null}\n </header>\n {body}\n </section>\n );\n },\n);\n\nAppointmentTray.displayName = 'AppointmentTray';\n"],"names":["appointmentCardAgent","appointmentTrayAgent","handle","args","appointmentTrayVariants","cva","AppointmentTray","forwardRef","id","items","title","caption","size","locale","currency","onOpenAppointment","onAddAppointment","addLabel","loading","emptyTitle","emptyDescription","className","rest","ref","t","useTranslation","heading","resolvedAddLabel","isEmpty","body","jsx","i","Skeleton","EmptyState","item","AppointmentCard","itemsRef","useRef","innerRef","useImperativeHandle","useMemo","targetId","found","useAgentRegistration","jsxs","CalendarDays","IconButton","Plus"],"mappings":";;;;;;;;;;;AAWO,MAAMA,KAAqC;AAAA,EAChD,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,MAAM;AAAA,EACrB,OAAO,CAAA;AAAA,EACP,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aACE;AAAA,IAAA;AAAA,IAEJ,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GCrBaC,IAA4D;AAAA,EACvE,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,MAAM;AAAA,EACrB,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,EACF;AAAA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AM,WAAAS,GAAW;AAAA,QACrD,GAAGC;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAsB,EAAC,UAAA,EAAO,WAAU,kGAChB,UAAA;AAAA,YAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,8DACb,UAAA;AAAA,cAAA,gBAAAA,EAAC,MAAA,EAAG,WAAU,oFACZ,UAAA;AAAA,gBAAA,gBAAAd,EAACe,GAAA,EAAa,eAAY,QAAO,WAAU,aAAY;AAAA,gBACtDnB;AAAA,cAAA,GACH;AAAA,cACCf,IACC,gBAAAmB,EAAC,QAAA,EAAK,WAAU,wDACb,aACH,IACE;AAAA,YAAA,GACN;AAAA,YACCd,IACC,gBAAAc;AAAA,cAACgB;AAAA,cAAA;AAAA,gBACC,wBAAOC,GAAA,EAAK;AAAA,gBACZ,QAAO;AAAA,gBACP,MAAK;AAAA,gBACL,cAAYpB;AAAA,gBACZ,SAASX;AAAA,cAAA;AAAA,YAAA,IAET;AAAA,UAAA,GACN;AAAA,UACCa;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAvB,EAAgB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"appointment-tray-4FUu_5NX.js","sources":["../../src/components/appointment-card/appointment-card.agent.ts","../../src/components/appointment-card/appointment-tray.agent.ts","../../src/components/appointment-card/appointment-tray.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentCard. */\n/* */\n/* Single-appointment surface. Activation is owned by the consumer / */\n/* host tray; the card emits a DOM hook so a future MCP UI bridge can */\n/* address one rendered card by its appointment id. Read-only — the card */\n/* exposes no imperative handle of its own (the tray owns activation). */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\n\nexport const appointmentCardAgent: AgentAdapter = {\n id: 'appointment-card',\n // 'pick' (non-persisting activation) is host-delegated: the card exposes no\n // handle of its own — its enclosing AppointmentTray performs the pick via\n // `appointment-tray.select_item`, addressing this card by its data-component-id.\n capabilities: ['pick'],\n state: {},\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-card',\n description:\n 'Marks the element as a kit AppointmentCard. The root also emits data-component-id sourced from item.id, data-state with the appointment lifecycle, and data-type with the delivery channel.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'item.id',\n description: 'Sourced from item.id — the stable appointment identifier.',\n },\n },\n};\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentTray. */\n/* */\n/* Tray-level surface: read appointment ids + lifecycle state (never */\n/* patient names / treatments), and route an activation through the */\n/* curated handle. AppointmentTray is in-page (no open/close). */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { AppointmentTrayHandle } from './appointment-tray';\n\nexport const appointmentTrayAgent: AgentAdapter<AppointmentTrayHandle> = {\n id: 'appointment-tray',\n // 'pick' (non-persisting activation): select_item routes an activation\n // through onActivate — it does not persist a \"selected appointment\" value,\n // so this is a focus/pick, not a select_single.\n capabilities: ['pick'],\n state: {\n items: {\n type: 'Array<{ id: string; state: string }>',\n descriptionKey: 'ui.agent.appointmentTray.state.items',\n description:\n 'Currently-displayed 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.appointmentTray.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 },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-tray',\n description: 'Marks the AppointmentTray 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 tray from the agent.',\n },\n item: {\n attr: 'data-appointment-id',\n description:\n 'Stable appointment id emitted on each rendered AppointmentCard inside the tray.',\n },\n },\n};\n","import {\n forwardRef,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CalendarDays, Plus } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { AppointmentCard, type AppointmentItem } from './appointment-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { appointmentTrayAgent } from './appointment-tray.agent';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentTray */\n/* */\n/* Bordered panel that hosts a list of AppointmentCards — header with a */\n/* title + optional caption + an \"Add\" affordance, a body that branches */\n/* on loading (Skeleton) / empty (EmptyState) / list. Mirrors AgendaTray */\n/* but composes the richer AppointmentCard row. */\n/* */\n/* All visible text flows through useTranslation('ui') against the */\n/* `appointmentTray.*` namespace. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA — panel surface */\n/* -------------------------------------------------------------------- */\n\nconst appointmentTrayVariants = cva(\n [\n 'ds:flex ds:flex-col',\n 'ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]',\n 'ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2',\n 'ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]',\n 'ds:overflow-hidden',\n ].join(' '),\n {\n variants: {\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/**\n * Curated imperative handle for AppointmentTray — the forwardRef target so a\n * future agent / MCP UI bridge can drive the tray without touching the DOM.\n * Reads identifiers + lifecycle state only, never patient identity. See\n * `appointment-tray.agent.ts`.\n */\nexport interface AppointmentTrayHandle {\n getItems: () => Array<{ id: string; state: string }>;\n selectItem: (id: string) => void;\n}\n\nexport interface AppointmentTrayProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'onClick' | 'id'>,\n VariantProps<typeof appointmentTrayVariants> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so an\n * agent / MCP UI bridge can address this specific tray.\n */\n id?: string;\n /** The appointments to render. */\n items: AppointmentItem[];\n /** Section title — rendered in the header. Localised by the consumer. */\n title?: string;\n /** Optional small caption (e.g. localised date) shown next to the title. */\n caption?: string;\n /** Visual density passed through to each AppointmentCard. */\n size?: 'sm' | 'md';\n /** BCP-47 locale override passed to each AppointmentCard. */\n locale?: string;\n /** ISO-4217 currency code passed to each AppointmentCard. */\n currency?: string;\n onOpenAppointment?: (item: AppointmentItem) => void;\n onAddAppointment?: () => void;\n /** Localised label for the \"Add\" affordance. */\n addLabel?: string;\n loading?: boolean;\n emptyTitle?: string;\n emptyDescription?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const AppointmentTray = forwardRef<HTMLElement, AppointmentTrayProps>(\n (\n {\n id,\n items,\n title,\n caption,\n size = 'sm',\n locale,\n currency,\n onOpenAppointment,\n onAddAppointment,\n addLabel,\n loading = false,\n emptyTitle,\n emptyDescription,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const heading = title ?? t('appointmentTray.title');\n const resolvedAddLabel = addLabel ?? t('appointmentTray.add');\n const isEmpty = !loading && items.length === 0;\n\n let body: ReactNode;\n if (loading) {\n body = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n {[0, 1, 2].map((i) => (\n <Skeleton key={i} variant=\"rectangular\" height=\"3.5rem\" />\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = (\n <div className=\"ds:p-[var(--spacing-md)]\">\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={emptyTitle ?? t('appointmentTray.empty.title')}\n description={\n emptyDescription ?? t('appointmentTray.empty.description')\n }\n />\n </div>\n );\n } else {\n body = (\n <ul className=\"ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-[var(--spacing-2xs)]\">\n {items.map((item) => (\n <AppointmentCard\n key={item.id}\n item={item}\n size={size}\n locale={locale}\n currency={currency}\n onActivate={onOpenAppointment}\n data-appointment-id={item.id}\n />\n ))}\n </ul>\n );\n }\n\n /* Curated imperative handle for agent integration. See\n * appointment-tray.agent.ts. */\n const itemsRef = useRef<AppointmentItem[]>(items);\n itemsRef.current = items;\n\n const innerRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => innerRef.current as HTMLElement, []);\n\n const handle = useMemo<AppointmentTrayHandle>(\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 }),\n [onOpenAppointment],\n );\n\n useAgentRegistration(appointmentTrayAgent, handle, id);\n\n return (\n <section\n ref={innerRef}\n aria-label={heading}\n data-component=\"appointment-tray\"\n data-component-id={id}\n className={appointmentTrayVariants({ size, className })}\n {...rest}\n >\n <header className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0\">\n <h3 className=\"ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card\">\n <CalendarDays aria-hidden=\"true\" className=\"ds:size-4\" />\n {heading}\n </h3>\n {caption ? (\n <span className=\"type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {caption}\n </span>\n ) : null}\n </div>\n {onAddAppointment ? (\n <IconButton\n icon={<Plus />}\n intent=\"outline\"\n size=\"sm\"\n aria-label={resolvedAddLabel}\n onClick={onAddAppointment}\n />\n ) : null}\n </header>\n {body}\n </section>\n );\n },\n);\n\nAppointmentTray.displayName = 'AppointmentTray';\n"],"names":["appointmentCardAgent","appointmentTrayAgent","handle","args","appointmentTrayVariants","cva","AppointmentTray","forwardRef","id","items","title","caption","size","locale","currency","onOpenAppointment","onAddAppointment","addLabel","loading","emptyTitle","emptyDescription","className","rest","ref","t","useTranslation","heading","resolvedAddLabel","isEmpty","body","jsx","i","Skeleton","EmptyState","item","AppointmentCard","itemsRef","useRef","innerRef","useImperativeHandle","useMemo","targetId","found","useAgentRegistration","jsxs","CalendarDays","IconButton","Plus"],"mappings":";;;;;;;;;;;AAWO,MAAMA,KAAqC;AAAA,EAChD,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,MAAM;AAAA,EACrB,OAAO,CAAA;AAAA,EACP,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aACE;AAAA,IAAA;AAAA,IAEJ,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GCrBaC,IAA4D;AAAA,EACvE,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,MAAM;AAAA,EACrB,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;AAA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EAAwB,EAAE,MAAAQ,GAAM,WAAAS,GAAW;AAAA,QACrD,GAAGC;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAsB,EAAC,UAAA,EAAO,WAAU,kGAChB,UAAA;AAAA,YAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,8DACb,UAAA;AAAA,cAAA,gBAAAA,EAAC,MAAA,EAAG,WAAU,oFACZ,UAAA;AAAA,gBAAA,gBAAAd,EAACe,GAAA,EAAa,eAAY,QAAO,WAAU,aAAY;AAAA,gBACtDnB;AAAA,cAAA,GACH;AAAA,cACCf,IACC,gBAAAmB,EAAC,QAAA,EAAK,WAAU,wDACb,aACH,IACE;AAAA,YAAA,GACN;AAAA,YACCd,IACC,gBAAAc;AAAA,cAACgB;AAAA,cAAA;AAAA,gBACC,wBAAOC,GAAA,EAAK;AAAA,gBACZ,QAAO;AAAA,gBACP,MAAK;AAAA,gBACL,cAAYpB;AAAA,gBACZ,SAASX;AAAA,cAAA;AAAA,YAAA,IAET;AAAA,UAAA,GACN;AAAA,UACCa;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAvB,EAAgB,cAAc;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { c as a } from "./createLucideIcon-DhHxpK9K.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.22.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const t = [
|
|
9
|
+
["path", { d: "M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3", key: "irtipd" }],
|
|
10
|
+
[
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
d: "M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z",
|
|
14
|
+
key: "1qyhux"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
["path", { d: "M5 18v2", key: "ppbyun" }],
|
|
18
|
+
["path", { d: "M19 18v2", key: "gy7782" }]
|
|
19
|
+
], e = a("armchair", t);
|
|
20
|
+
export {
|
|
21
|
+
e as A
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=armchair-BaLDW6Hz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"armchair-BaLDW6Hz.js","sources":["../../node_modules/lucide-react/dist/esm/icons/armchair.mjs"],"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 [\"path\", { d: \"M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3\", key: \"irtipd\" }],\n [\n \"path\",\n {\n d: \"M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z\",\n key: \"1qyhux\"\n }\n ],\n [\"path\", { d: \"M5 18v2\", key: \"ppbyun\" }],\n [\"path\", { d: \"M19 18v2\", key: \"gy7782\" }]\n];\nconst Armchair = createLucideIcon(\"armchair\", __iconNode);\n\nexport { __iconNode, Armchair as default };\n//# sourceMappingURL=armchair.mjs.map\n"],"names":["__iconNode","Armchair","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,2CAA2C,KAAK,SAAQ,CAAE;AAAA,EACxE;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,YAAY,KAAK,SAAQ,CAAE;AAC3C,GACMC,IAAWC,EAAiB,YAAYF,CAAU;","x_google_ignoreList":[0]}
|
|
@@ -7,7 +7,7 @@ import { A as j } from "./alert-CiJT540z.js";
|
|
|
7
7
|
import { B as ne } from "./button-nJaPh_HC.js";
|
|
8
8
|
import { C as Ke } from "./checkbox-BuZ1u__2.js";
|
|
9
9
|
import { C as Et } from "./checkbox-group-CfqMv57d.js";
|
|
10
|
-
import { D as Lt } from "./date-picker-
|
|
10
|
+
import { D as Lt } from "./date-picker-CepI_oI2.js";
|
|
11
11
|
import { E as Rt } from "./email-input-Dpe63k0K.js";
|
|
12
12
|
import { F as W } from "./form-field-CahJzTxp.js";
|
|
13
13
|
import { P as Vt } from "./phone-input-BsZIoE36.js";
|
|
@@ -25,8 +25,8 @@ import { S as Kt } from "./stepper-progress-Bv0njx4g.js";
|
|
|
25
25
|
import { S as jt } from "./slot-grid-BuZOKfcd.js";
|
|
26
26
|
import { p as $ } from "./parseISO-fOGpHKXm.js";
|
|
27
27
|
import { l as le, f as Te, b as at } from "./format-4HNwNGrN.js";
|
|
28
|
-
import { w as lt, c as ce, a as je, i as qt, s as ye, l as Ht, x as De } from "./date-picker-variants-
|
|
29
|
-
import { s as Gt } from "./subDays-
|
|
28
|
+
import { w as lt, c as ce, a as je, i as qt, s as ye, l as Ht, x as De } from "./date-picker-variants-DfuooXEK.js";
|
|
29
|
+
import { s as Gt } from "./subDays-BLl3y3pd.js";
|
|
30
30
|
import { C as Ut } from "./chevron-left-B8cOyH-V.js";
|
|
31
31
|
import { C as Yt } from "./chevron-right-I9AeSxH2.js";
|
|
32
32
|
import { c as z } from "./createLucideIcon-DhHxpK9K.js";
|
|
@@ -2710,4 +2710,4 @@ export {
|
|
|
2710
2710
|
Q as O,
|
|
2711
2711
|
Da as b
|
|
2712
2712
|
};
|
|
2713
|
-
//# sourceMappingURL=booking-
|
|
2713
|
+
//# sourceMappingURL=booking-DHkKcUIl.js.map
|