@alfadocs/ui-kit 0.69.0 → 0.70.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/{agenda-card-BxSFkqgY.js → agenda-card-BQ-IKAru.js} +2 -2
- package/dist/_chunks/{agenda-tray-g0kg7HwB.js → agenda-tray-CGXRk58j.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-CXlsNX1c.js → ai-consent-banner-Be-h9mRI.js} +3 -3
- package/dist/_chunks/ai-tools-rail-B5NEghsp.js +511 -0
- package/dist/_chunks/{alert-_mUKLmwA.js → alert-CHYZ96tR.js} +150 -96
- package/dist/_chunks/{anamnesis-card-DRmE24OQ.js → anamnesis-card-DvYCa16e.js} +2 -2
- package/dist/_chunks/anatomy-scheme-CJB6dI6p.js +2445 -0
- package/dist/_chunks/annotation-marker-qt5R9WZX.js +120 -0
- package/dist/_chunks/{antenatal-schedule-timeline-35ebkcZT.js → antenatal-schedule-timeline-CwXrQRm1.js} +2 -2
- package/dist/_chunks/appointment-card-C06aZqA7.js +310 -0
- package/dist/_chunks/appointment-timeline-BJM0S_Fg.js +386 -0
- package/dist/_chunks/appointment-tray-DRRw5ROi.js +193 -0
- package/dist/_chunks/{audio-recorder-DYXXnGug.js → audio-recorder-Cpdk5qpQ.js} +2 -2
- package/dist/_chunks/{badge-CqGsX32l.js → badge-DCOqV9mI.js} +32 -27
- package/dist/_chunks/{bishop-score-PJI3AXzA.js → bishop-score-DnYWtZa_.js} +2 -2
- package/dist/_chunks/{bmi-calculator-BZtIJ53x.js → bmi-calculator-zjeY4E7J.js} +2 -2
- package/dist/_chunks/{booking-C3VqFReX.js → booking-DUBI0oqt.js} +4 -4
- package/dist/_chunks/{care-plan-card-CvFGXa2z.js → care-plan-card-C5sTfY9G.js} +5 -5
- package/dist/_chunks/{care-plan-entry-card-C3E_gClk.js → care-plan-entry-card-CXnxGCWA.js} +5 -5
- package/dist/_chunks/care-plan-header-BUwqDTtz.js +206 -0
- package/dist/_chunks/clinical-note-card-BUvNMNGL.js +436 -0
- package/dist/_chunks/{contact-profile-card-Dramqa9C.js → contact-profile-card-DDPwRFiP.js} +2 -2
- package/dist/_chunks/control-room-rail-Y8ryLYsP.js +229 -0
- package/dist/_chunks/{cycle-calculator-DmRGJNaT.js → cycle-calculator-CCmPwcBl.js} +2 -2
- package/dist/_chunks/{dependent-selector-CG_FOHya.js → dependent-selector-DUV4thxX.js} +2 -2
- package/dist/_chunks/{document-scanner-CTubA0-N.js → document-scanner-C_AxLooF.js} +3 -3
- package/dist/_chunks/{due-date-calculator-BTmsIQqD.js → due-date-calculator-Brdj-euS.js} +3 -3
- package/dist/_chunks/editable-currency-cell-renderer-C9twtALM.js +328 -0
- package/dist/_chunks/email-input-DJ7EXklP.js +397 -0
- package/dist/_chunks/{entity-card-COhmqHly.js → entity-card-9_62gY7l.js} +38 -20
- package/dist/_chunks/entity-summary-BxRjFh_4.js +138 -0
- package/dist/_chunks/{fetal-weight-CRz7KE2D.js → fetal-weight-DNCkyeVo.js} +2 -2
- package/dist/_chunks/field-value-NXYczdpO.js +415 -0
- package/dist/_chunks/{file-upload-5ScQd4fE.js → file-upload-DwZcAK8D.js} +2 -1
- package/dist/_chunks/{freemium-paywall-DZ2mBS3w.js → freemium-paywall-WYlNO7yT.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-BleUdhbI.js → gestational-age-calculator-CF2ISaYQ.js} +3 -3
- package/dist/_chunks/hash-CysBBS_N.js +17 -0
- package/dist/_chunks/{hcg-doubling-CnjDXX6U.js → hcg-doubling-C7bmuaU3.js} +2 -2
- package/dist/_chunks/{actions-cell-renderer-DrcaxB0w.js → link-cell-renderer-CTXqtXV-.js} +715 -592
- package/dist/_chunks/lock-CKOIn0IK.js +15 -0
- package/dist/_chunks/{marketplace-app-shell-6T9W4Knl.js → marketplace-app-shell-Skhfp6vK.js} +3 -3
- package/dist/_chunks/notes-panel-ay8_lPrA.js +158 -0
- package/dist/_chunks/{notification-card-BiESdm8q.js → notification-card-D2jiKSJJ.js} +27 -23
- package/dist/_chunks/{notification-tray-Btb9oQeZ.js → notification-tray-AEun6DN2.js} +2 -2
- package/dist/_chunks/{operator-hero-CP2Nhupm.js → operator-hero-CR0Rqh4-.js} +3 -3
- package/dist/_chunks/patient-details-Dlhqb5ig.js +675 -0
- package/dist/_chunks/{patient-search-CBC_ySF6.js → patient-search-Be6cLrHR.js} +2 -2
- package/dist/_chunks/patient-summary-card-WySCMwwA.js +437 -0
- package/dist/_chunks/patient-table-CHxf3Oqk.js +1110 -0
- package/dist/_chunks/{payment-form-DvjwYVIT.js → payment-form-CxqIXqw7.js} +2 -2
- package/dist/_chunks/{payment-request-card-DioWKBUq.js → payment-request-card-BcZJwu9z.js} +125 -136
- package/dist/_chunks/{pdf-viewer-D6BPfW2D.js → pdf-viewer-QfebdLOd.js} +192 -214
- package/dist/_chunks/{periodontal-chart-card-BuDEMbHE.js → periodontal-chart-card-hRRJY1NN.js} +2 -2
- package/dist/_chunks/{practice-results-KrTHqZua.js → practice-results-C6qDfxos.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-DORUAOHB.js → pregnancy-dating-CRVWswD-.js} +3 -3
- package/dist/_chunks/{pregnancy-weight-gain-DVz4rr7-.js → pregnancy-weight-gain-BUNpTsH-.js} +2 -2
- package/dist/_chunks/radiograph-panel.agent-CAX-C3g3.js +558 -0
- package/dist/_chunks/{rich-text-editor-BsV7zUdg.js → rich-text-editor-DlCqPixb.js} +410 -394
- package/dist/_chunks/{sign-document-B4DeRhTe.js → sign-document-By6hMOra.js} +2 -2
- package/dist/_chunks/{stepper-accordion-Dki6r9ZE.js → stepper-accordion-DC-H-8v4.js} +38 -48
- package/dist/_chunks/tab-bar-Bv9nGNdO.js +262 -0
- package/dist/_chunks/tooth-scheme-BhQoPNBD.js +2131 -0
- package/dist/_chunks/{transaction-chip-DK84XCBU.js → transaction-chip-CscoQbxF.js} +88 -61
- package/dist/_chunks/use-clamp-overflow-DQE2kwZ9.js +20 -0
- package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +32 -0
- package/dist/_chunks/use-persistent-state-nZwZAnE9.js +24 -0
- package/dist/_chunks/{warning-stack-BsgaEbL8.js → warning-stack--sTrrBDA.js} +86 -101
- package/dist/_chunks/{workflow-map-Bdam9pGp.js → workflow-map-Dy8mLCqF.js} +3 -3
- package/dist/_chunks/zoom-out-CgVtf2Wx.js +29 -0
- package/dist/agent/index.js +5 -4
- package/dist/agent/types.d.ts +19 -2
- package/dist/agent-catalog.json +1253 -86
- package/dist/agent-i18n/en.json +108 -6
- package/dist/components/_shared/entity-card/entity-card.d.ts +6 -0
- package/dist/components/_shared/entity-card/index.d.ts +1 -1
- package/dist/components/_shared/field-value.d.ts +21 -0
- package/dist/components/_shared/field-visibility-cog.d.ts +20 -0
- package/dist/components/_shared/field-visibility.d.ts +36 -0
- package/dist/components/_shared/patient-fields.d.ts +119 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +75 -0
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/alert/alert.d.ts +5 -0
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anatomy-scheme/anatomy-face-paths.d.ts +15 -0
- package/dist/components/anatomy-scheme/anatomy-muscle-paths.d.ts +20 -0
- package/dist/components/anatomy-scheme/anatomy-scheme-data.d.ts +121 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.agent.d.ts +6 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.d.ts +69 -0
- package/dist/components/anatomy-scheme/index.d.ts +6 -0
- package/dist/components/anatomy-scheme/index.js +17 -0
- package/dist/components/annotation-marker/annotation-marker.d.ts +33 -0
- package/dist/components/annotation-marker/index.d.ts +3 -0
- package/dist/components/annotation-marker/index.js +7 -0
- package/dist/components/appointment-card/appointment-card.d.ts +25 -1
- package/dist/components/appointment-card/index.js +6 -5
- package/dist/components/appointment-timeline/appointment-timeline.agent.d.ts +4 -0
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +66 -0
- package/dist/components/appointment-timeline/index.d.ts +4 -0
- package/dist/components/appointment-timeline/index.js +6 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/badge.d.ts +6 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/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/care-plan-header.agent.d.ts +4 -0
- package/dist/components/care-plan-header/care-plan-header.d.ts +100 -0
- package/dist/components/care-plan-header/index.d.ts +4 -0
- package/dist/components/care-plan-header/index.js +6 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +21 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/control-room-context.d.ts +53 -0
- package/dist/components/control-room-rail/control-room-rail.d.ts +35 -0
- package/dist/components/control-room-rail/index.d.ts +5 -0
- package/dist/components/control-room-rail/index.js +9 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +18 -0
- package/dist/components/data-table/index.d.ts +1 -1
- package/dist/components/data-table/index.js +32 -31
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/entity-summary/entity-summary.d.ts +43 -0
- package/dist/components/entity-summary/index.d.ts +3 -0
- package/dist/components/entity-summary/index.js +5 -0
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- 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 +9 -0
- package/dist/components/notes-panel/index.d.ts +3 -0
- package/dist/components/notes-panel/index.js +5 -0
- package/dist/components/notes-panel/notes-panel.d.ts +64 -0
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/patient-details/index.d.ts +5 -0
- package/dist/components/patient-details/index.js +6 -0
- package/dist/components/patient-details/patient-details.agent.d.ts +4 -0
- package/dist/components/patient-details/patient-details.d.ts +96 -0
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +40 -1
- package/dist/components/patient-table/columns.d.ts +69 -40
- package/dist/components/patient-table/index.d.ts +2 -6
- package/dist/components/patient-table/index.js +8 -9
- package/dist/components/patient-table/patient-table.d.ts +38 -4
- package/dist/components/patient-table/types.d.ts +52 -2
- package/dist/components/patient-table/use-responsive-columns.d.ts +8 -6
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/radiograph-panel/index.d.ts +4 -0
- package/dist/components/radiograph-panel/index.js +7 -0
- package/dist/components/radiograph-panel/radiograph-panel.agent.d.ts +13 -0
- package/dist/components/radiograph-panel/radiograph-panel.d.ts +36 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +18 -1
- package/dist/components/tooth-scheme/index.d.ts +2 -2
- package/dist/components/tooth-scheme/index.js +30 -23
- package/dist/components/tooth-scheme/tooth-data.d.ts +112 -1
- package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +75 -11
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +2 -2
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/warning-stack/warning-stack.d.ts +10 -7
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +24 -22
- package/dist/hooks/use-clamp-overflow.d.ts +19 -0
- package/dist/hooks/use-overflow-collapse.d.ts +46 -0
- package/dist/hooks/use-persistent-state.d.ts +7 -1
- package/dist/hooks/use-scroll-overflow.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts +308 -24
- package/dist/i18n/locales/ar.js +322 -27
- package/dist/i18n/locales/de.d.ts +308 -24
- package/dist/i18n/locales/de.js +322 -27
- package/dist/i18n/locales/el.d.ts +308 -24
- package/dist/i18n/locales/el.js +322 -27
- package/dist/i18n/locales/en.d.ts +309 -32
- package/dist/i18n/locales/en.js +323 -35
- package/dist/i18n/locales/es.d.ts +308 -24
- package/dist/i18n/locales/es.js +322 -27
- package/dist/i18n/locales/fr.d.ts +308 -24
- package/dist/i18n/locales/fr.js +322 -27
- package/dist/i18n/locales/hi.d.ts +308 -24
- package/dist/i18n/locales/hi.js +322 -27
- package/dist/i18n/locales/it.d.ts +308 -24
- package/dist/i18n/locales/it.js +322 -27
- package/dist/i18n/locales/ja.d.ts +308 -24
- package/dist/i18n/locales/ja.js +322 -27
- package/dist/i18n/locales/nl.d.ts +308 -24
- package/dist/i18n/locales/nl.js +322 -27
- package/dist/i18n/locales/pl.d.ts +308 -24
- package/dist/i18n/locales/pl.js +322 -27
- package/dist/i18n/locales/pt.d.ts +308 -24
- package/dist/i18n/locales/pt.js +322 -27
- package/dist/i18n/locales/ro.d.ts +308 -24
- package/dist/i18n/locales/ro.js +322 -27
- package/dist/i18n/locales/ru.d.ts +308 -24
- package/dist/i18n/locales/ru.js +322 -27
- package/dist/i18n/locales/sq.d.ts +308 -24
- package/dist/i18n/locales/sq.js +322 -27
- package/dist/i18n/locales/sv.d.ts +308 -24
- package/dist/i18n/locales/sv.js +322 -27
- package/dist/i18n/locales/tr.d.ts +308 -24
- package/dist/i18n/locales/tr.js +322 -27
- package/dist/i18n/locales/zh.d.ts +308 -24
- package/dist/i18n/locales/zh.js +322 -27
- package/dist/index.js +672 -623
- package/dist/locales/ar.json +311 -27
- package/dist/locales/de.json +311 -27
- package/dist/locales/el.json +311 -27
- package/dist/locales/en.json +311 -27
- package/dist/locales/es.json +311 -27
- package/dist/locales/fr.json +311 -27
- package/dist/locales/hi.json +311 -27
- package/dist/locales/it.json +311 -27
- package/dist/locales/ja.json +311 -27
- package/dist/locales/nl.json +311 -27
- package/dist/locales/pl.json +311 -27
- package/dist/locales/pt.json +311 -27
- package/dist/locales/ro.json +311 -27
- package/dist/locales/ru.json +311 -27
- package/dist/locales/sq.json +311 -27
- package/dist/locales/sv.json +311 -27
- package/dist/locales/tr.json +311 -27
- package/dist/locales/zh.json +311 -27
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +37 -1
- package/dist/_chunks/ai-tools-rail-BA_sqy1A.js +0 -373
- package/dist/_chunks/appointment-tray-CZtvtaH-.js +0 -431
- package/dist/_chunks/clinical-note-card-DqQYf_D4.js +0 -333
- package/dist/_chunks/editable-currency-cell-renderer-kgqp_mIw.js +0 -448
- package/dist/_chunks/email-input-B_Y55f5G.js +0 -396
- package/dist/_chunks/patient-summary-card-B836_fDB.js +0 -435
- package/dist/_chunks/patient-table-CDuosVru.js +0 -889
- package/dist/_chunks/tab-bar-B1ovILzh.js +0 -105
- package/dist/_chunks/tooth-scheme-yBr53cvv.js +0 -1330
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +0 -24
- package/dist/components/patient-table/cell-renderers/contact-cell.d.ts +0 -45
- package/dist/components/patient-table/cell-renderers/patient-identity-cell.d.ts +0 -26
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ve, useId as ke, useMemo as z, useRef as x, useState as X, useCallback as D, useImperativeHandle as be } from "react";
|
|
3
|
+
import { c as Te } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as xe } from "react-i18next";
|
|
5
|
+
import { A as De } from "./appointment-card-C06aZqA7.js";
|
|
6
|
+
import { B as K } from "./button-DD_0Xdmr.js";
|
|
7
|
+
import { B as we } from "./button-group-Ciq6J4IW.js";
|
|
8
|
+
import { D as Re } from "./date-picker-Dl9RKxaV.js";
|
|
9
|
+
import { S as Ie } from "./skeleton-CZbwyJAA.js";
|
|
10
|
+
import { E as Ne } from "./empty-state-BLy7tigq.js";
|
|
11
|
+
import { u as Z } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
12
|
+
import { u as Se } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
13
|
+
import { u as je } from "./registry-DvAUVLHh.js";
|
|
14
|
+
import { C as Ce } from "./calendar-days-C4BmpCZg.js";
|
|
15
|
+
const He = {
|
|
16
|
+
id: "appointment-timeline",
|
|
17
|
+
// 'pick' backs select_item (non-persisting activation through
|
|
18
|
+
// onOpenAppointment); 'scroll' backs jump_to_today, which re-anchors the
|
|
19
|
+
// scroll viewport (mirrors practice-results' scroll_to_result).
|
|
20
|
+
capabilities: ["scroll", "pick"],
|
|
21
|
+
state: {
|
|
22
|
+
items: {
|
|
23
|
+
type: "Array<{ id: string; state: string }>",
|
|
24
|
+
descriptionKey: "ui.agent.appointmentTimeline.state.items",
|
|
25
|
+
description: "Currently-rendered appointments. Ids + lifecycle state only — never patient identity.",
|
|
26
|
+
read: (n) => n.getItems()
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
actions: {
|
|
30
|
+
select_item: {
|
|
31
|
+
safety: "read",
|
|
32
|
+
argsType: "{ id: string }",
|
|
33
|
+
argsSchema: {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: { id: { type: "string" } },
|
|
36
|
+
required: ["id"]
|
|
37
|
+
},
|
|
38
|
+
idempotent: !0,
|
|
39
|
+
descriptionKey: "ui.agent.appointmentTimeline.actions.selectItem",
|
|
40
|
+
description: "Activate the appointment with the given id.",
|
|
41
|
+
invoke: (n, a) => {
|
|
42
|
+
n.selectItem(a.id);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
jump_to_today: {
|
|
46
|
+
safety: "read",
|
|
47
|
+
idempotent: !0,
|
|
48
|
+
descriptionKey: "ui.agent.appointmentTimeline.actions.jumpToToday",
|
|
49
|
+
description: "Re-anchor the timeline scroll on today's appointments.",
|
|
50
|
+
invoke: (n) => {
|
|
51
|
+
n.jumpToToday();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
domHooks: {
|
|
56
|
+
root: {
|
|
57
|
+
attr: "data-component",
|
|
58
|
+
value: "appointment-timeline",
|
|
59
|
+
description: "Marks the AppointmentTimeline wrapper."
|
|
60
|
+
},
|
|
61
|
+
instanceId: {
|
|
62
|
+
attr: "data-component-id",
|
|
63
|
+
sourceProp: "id",
|
|
64
|
+
description: "Sourced from the id prop. Required to address a specific timeline from the agent."
|
|
65
|
+
},
|
|
66
|
+
item: {
|
|
67
|
+
attr: "data-appointment-id",
|
|
68
|
+
description: "Stable appointment id emitted on each rendered AppointmentCard inside the timeline."
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}, O = 96, ze = Te(
|
|
72
|
+
[
|
|
73
|
+
"ds:flex ds:flex-col ds:h-full ds:min-h-0",
|
|
74
|
+
"ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]"
|
|
75
|
+
].join(" "),
|
|
76
|
+
{ variants: { size: { sm: "", md: "" } }, defaultVariants: { size: "sm" } }
|
|
77
|
+
), Me = [
|
|
78
|
+
"ds:flex-1 ds:min-h-0 ds:overflow-y-auto",
|
|
79
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
80
|
+
"ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
81
|
+
"ds:[--atl-mask-top:black] ds:[--atl-mask-bottom:black]",
|
|
82
|
+
"ds:data-[fade-top=true]:[--atl-mask-top:transparent]",
|
|
83
|
+
"ds:data-[fade-bottom=true]:[--atl-mask-bottom:transparent]",
|
|
84
|
+
"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%)]",
|
|
85
|
+
"ds:motion-reduce:[mask-image:none]",
|
|
86
|
+
"ds:[.theme-accessible_&]:[mask-image:none]",
|
|
87
|
+
"ds:forced-colors:[mask-image:none]",
|
|
88
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
89
|
+
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]",
|
|
90
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
91
|
+
].join(" ");
|
|
92
|
+
function g(n) {
|
|
93
|
+
const a = `${n.getMonth() + 1}`.padStart(2, "0"), l = `${n.getDate()}`.padStart(2, "0");
|
|
94
|
+
return `${n.getFullYear()}-${a}-${l}`;
|
|
95
|
+
}
|
|
96
|
+
function _e(n) {
|
|
97
|
+
const a = [...n].sort(
|
|
98
|
+
(p, m) => +new Date(p.startIso) - +new Date(m.startIso)
|
|
99
|
+
), l = /* @__PURE__ */ new Map();
|
|
100
|
+
for (const p of a) {
|
|
101
|
+
const m = new Date(p.startIso), h = g(m);
|
|
102
|
+
let c = l.get(h);
|
|
103
|
+
c || (c = {
|
|
104
|
+
key: h,
|
|
105
|
+
date: new Date(m.getFullYear(), m.getMonth(), m.getDate()),
|
|
106
|
+
items: []
|
|
107
|
+
}, l.set(h, c)), c.items.push(p);
|
|
108
|
+
}
|
|
109
|
+
return [...l.values()];
|
|
110
|
+
}
|
|
111
|
+
const Fe = ve(
|
|
112
|
+
({
|
|
113
|
+
id: n,
|
|
114
|
+
items: a,
|
|
115
|
+
nowIso: l,
|
|
116
|
+
title: p,
|
|
117
|
+
locale: m,
|
|
118
|
+
currency: h,
|
|
119
|
+
size: c = "sm",
|
|
120
|
+
onOpenAppointment: y,
|
|
121
|
+
onLoadEarlier: v,
|
|
122
|
+
onLoadLater: k,
|
|
123
|
+
hasMoreEarlier: w,
|
|
124
|
+
hasMoreLater: b,
|
|
125
|
+
loadingEarlier: R = !1,
|
|
126
|
+
loadingLater: C = !1,
|
|
127
|
+
showFilters: L = !0,
|
|
128
|
+
onJumpToDate: H,
|
|
129
|
+
emptyTitle: J,
|
|
130
|
+
emptyDescription: ee,
|
|
131
|
+
className: te,
|
|
132
|
+
"aria-label": se,
|
|
133
|
+
...ne
|
|
134
|
+
}, ae) => {
|
|
135
|
+
const { t: o, i18n: ie } = xe(), A = ke(), Y = Se(), $ = m ?? ie.language, E = p ?? o("appointmentTimeline.title"), r = z(
|
|
136
|
+
() => l ? new Date(l) : /* @__PURE__ */ new Date(),
|
|
137
|
+
[l]
|
|
138
|
+
), u = z(() => _e(a), [a]), P = w ?? !!v, q = b ?? !!k, M = z(() => {
|
|
139
|
+
if (u.length === 0) return;
|
|
140
|
+
const e = g(r), t = u.map((s) => s.key);
|
|
141
|
+
return t.includes(e) ? e : t.find((s) => s >= e) ?? t[t.length - 1];
|
|
142
|
+
}, [u, r]), I = x(null), N = x(/* @__PURE__ */ new Map()), G = x(!1), _ = x(void 0), V = x(0), [oe, re] = X(!1), [le, ce] = X(!1), S = D(() => {
|
|
143
|
+
const e = I.current;
|
|
144
|
+
if (!e) return;
|
|
145
|
+
const { scrollTop: t, scrollHeight: s, clientHeight: d } = e;
|
|
146
|
+
re(t > 1), ce(t + d < s - 1);
|
|
147
|
+
}, []), j = D(
|
|
148
|
+
(e, t) => {
|
|
149
|
+
const s = I.current;
|
|
150
|
+
if (!s) return;
|
|
151
|
+
let d = N.current.get(e);
|
|
152
|
+
if (!d) {
|
|
153
|
+
const B = [...N.current.keys()].sort(), U = B.find((ye) => ye >= e) ?? B[B.length - 1];
|
|
154
|
+
d = U ? N.current.get(U) : void 0;
|
|
155
|
+
}
|
|
156
|
+
if (!d) return;
|
|
157
|
+
const he = d.getBoundingClientRect().top - s.getBoundingClientRect().top;
|
|
158
|
+
s.scrollTo({
|
|
159
|
+
top: s.scrollTop + he,
|
|
160
|
+
behavior: t && !Y ? "smooth" : "auto"
|
|
161
|
+
});
|
|
162
|
+
},
|
|
163
|
+
[Y]
|
|
164
|
+
);
|
|
165
|
+
Z(() => {
|
|
166
|
+
var s;
|
|
167
|
+
const e = I.current;
|
|
168
|
+
if (!e) return;
|
|
169
|
+
const t = (s = u[0]) == null ? void 0 : s.key;
|
|
170
|
+
if (!G.current)
|
|
171
|
+
u.length > 0 && M && (j(M, !1), G.current = !0);
|
|
172
|
+
else if (_.current && t && t < _.current) {
|
|
173
|
+
const d = e.scrollHeight - V.current;
|
|
174
|
+
d > 0 && (e.scrollTop += d);
|
|
175
|
+
}
|
|
176
|
+
_.current = t, V.current = e.scrollHeight, S();
|
|
177
|
+
}, [u, M, j, S]), Z(() => {
|
|
178
|
+
const e = I.current;
|
|
179
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
180
|
+
const t = new ResizeObserver(S);
|
|
181
|
+
return t.observe(e), () => t.disconnect();
|
|
182
|
+
}, [S]);
|
|
183
|
+
const de = D(() => {
|
|
184
|
+
S();
|
|
185
|
+
const e = I.current;
|
|
186
|
+
if (!e) return;
|
|
187
|
+
const { scrollTop: t, scrollHeight: s, clientHeight: d } = e;
|
|
188
|
+
v && P && !R && t <= O && v(), k && q && !C && s - t - d <= O && k();
|
|
189
|
+
}, [
|
|
190
|
+
S,
|
|
191
|
+
v,
|
|
192
|
+
k,
|
|
193
|
+
P,
|
|
194
|
+
q,
|
|
195
|
+
R,
|
|
196
|
+
C
|
|
197
|
+
]), T = D(
|
|
198
|
+
(e) => {
|
|
199
|
+
const t = g(e), s = N.current.has(t);
|
|
200
|
+
j(t, !0), s || H == null || H(e.toISOString());
|
|
201
|
+
},
|
|
202
|
+
[j, H]
|
|
203
|
+
), me = D(() => T(r), [T, r]), pe = D(() => {
|
|
204
|
+
const e = new Date(r), t = (e.getDay() + 6) % 7;
|
|
205
|
+
e.setDate(e.getDate() - t), T(e);
|
|
206
|
+
}, [T, r]), ue = D(() => {
|
|
207
|
+
T(new Date(r.getFullYear(), r.getMonth(), 1));
|
|
208
|
+
}, [T, r]), F = x(a);
|
|
209
|
+
F.current = a;
|
|
210
|
+
const W = x(null);
|
|
211
|
+
be(ae, () => W.current, []);
|
|
212
|
+
const fe = z(
|
|
213
|
+
() => ({
|
|
214
|
+
getItems: () => F.current.map((e) => ({ id: e.id, state: e.state })),
|
|
215
|
+
selectItem: (e) => {
|
|
216
|
+
const t = F.current.find((s) => s.id === e);
|
|
217
|
+
t && (y == null || y(t));
|
|
218
|
+
},
|
|
219
|
+
jumpToToday: () => j(g(r), !0)
|
|
220
|
+
}),
|
|
221
|
+
[y, j, r]
|
|
222
|
+
);
|
|
223
|
+
je(He, fe, n);
|
|
224
|
+
const ge = u.length === 0 && !R && !C, Q = (e) => /* @__PURE__ */ i(
|
|
225
|
+
"div",
|
|
226
|
+
{
|
|
227
|
+
"aria-hidden": "true",
|
|
228
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]",
|
|
229
|
+
children: /* @__PURE__ */ i(Ie, { variant: "rectangular", height: "3.5rem" })
|
|
230
|
+
},
|
|
231
|
+
e
|
|
232
|
+
);
|
|
233
|
+
return /* @__PURE__ */ f(
|
|
234
|
+
"section",
|
|
235
|
+
{
|
|
236
|
+
ref: W,
|
|
237
|
+
"data-component": "appointment-timeline",
|
|
238
|
+
"data-component-id": n,
|
|
239
|
+
"aria-label": se ?? E,
|
|
240
|
+
className: ze({ size: c, className: te }),
|
|
241
|
+
...ne,
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ f("header", { className: "ds:shrink-0 ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:px-[var(--spacing-md)] ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-sm)]", children: [
|
|
244
|
+
/* @__PURE__ */ f("h2", { className: "ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card", children: [
|
|
245
|
+
/* @__PURE__ */ i(Ce, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
246
|
+
E
|
|
247
|
+
] }),
|
|
248
|
+
L ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
249
|
+
/* @__PURE__ */ f(we, { label: o("appointmentTimeline.filtersLabel"), children: [
|
|
250
|
+
/* @__PURE__ */ i(K, { intent: "outline", size: "sm", onClick: me, children: o("appointmentTimeline.today") }),
|
|
251
|
+
/* @__PURE__ */ i(K, { intent: "outline", size: "sm", onClick: pe, children: o("appointmentTimeline.thisWeek") }),
|
|
252
|
+
/* @__PURE__ */ i(K, { intent: "outline", size: "sm", onClick: ue, children: o("appointmentTimeline.thisMonth") })
|
|
253
|
+
] }),
|
|
254
|
+
/* @__PURE__ */ i("label", { htmlFor: A, className: "ds:sr-only", children: o("appointmentTimeline.jumpToDate") }),
|
|
255
|
+
/* @__PURE__ */ i(
|
|
256
|
+
Re,
|
|
257
|
+
{
|
|
258
|
+
id: A,
|
|
259
|
+
size: "sm",
|
|
260
|
+
placeholder: o("appointmentTimeline.jumpToDate"),
|
|
261
|
+
onChange: (e) => {
|
|
262
|
+
e && T(e);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
)
|
|
266
|
+
] }) : null
|
|
267
|
+
] }),
|
|
268
|
+
ge ? /* @__PURE__ */ i("div", { className: "ds:flex-1 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ i(
|
|
269
|
+
Ne,
|
|
270
|
+
{
|
|
271
|
+
variant: "first-use",
|
|
272
|
+
size: "sm",
|
|
273
|
+
title: J ?? o("appointmentTimeline.empty.title"),
|
|
274
|
+
description: ee ?? o("appointmentTimeline.empty.description")
|
|
275
|
+
}
|
|
276
|
+
) }) : /* @__PURE__ */ f(
|
|
277
|
+
"div",
|
|
278
|
+
{
|
|
279
|
+
ref: I,
|
|
280
|
+
tabIndex: 0,
|
|
281
|
+
onScroll: de,
|
|
282
|
+
"data-fade-top": oe ? "true" : void 0,
|
|
283
|
+
"data-fade-bottom": le ? "true" : void 0,
|
|
284
|
+
className: Me,
|
|
285
|
+
children: [
|
|
286
|
+
R ? Q("loading-earlier") : null,
|
|
287
|
+
/* @__PURE__ */ i("ol", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0", children: u.map((e) => /* @__PURE__ */ f(
|
|
288
|
+
"li",
|
|
289
|
+
{
|
|
290
|
+
ref: (t) => {
|
|
291
|
+
t ? N.current.set(e.key, t) : N.current.delete(e.key);
|
|
292
|
+
},
|
|
293
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
294
|
+
children: [
|
|
295
|
+
/* @__PURE__ */ i(
|
|
296
|
+
Be,
|
|
297
|
+
{
|
|
298
|
+
date: e.date,
|
|
299
|
+
now: r,
|
|
300
|
+
locale: $,
|
|
301
|
+
todayLabel: o("appointmentTimeline.today"),
|
|
302
|
+
tomorrowLabel: o("appointmentTimeline.tomorrow"),
|
|
303
|
+
yesterdayLabel: o("appointmentTimeline.yesterday")
|
|
304
|
+
}
|
|
305
|
+
),
|
|
306
|
+
/* @__PURE__ */ i("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: e.items.map((t) => /* @__PURE__ */ i(
|
|
307
|
+
De,
|
|
308
|
+
{
|
|
309
|
+
item: t,
|
|
310
|
+
size: c,
|
|
311
|
+
surface: "elevated",
|
|
312
|
+
showPatient: !1,
|
|
313
|
+
locale: $,
|
|
314
|
+
currency: h,
|
|
315
|
+
onActivate: y,
|
|
316
|
+
"data-appointment-id": t.id
|
|
317
|
+
},
|
|
318
|
+
t.id
|
|
319
|
+
)) })
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
e.key
|
|
323
|
+
)) }),
|
|
324
|
+
C ? Q("loading-later") : null
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
Fe.displayName = "AppointmentTimeline";
|
|
334
|
+
function Be({
|
|
335
|
+
date: n,
|
|
336
|
+
now: a,
|
|
337
|
+
locale: l,
|
|
338
|
+
todayLabel: p,
|
|
339
|
+
tomorrowLabel: m,
|
|
340
|
+
yesterdayLabel: h
|
|
341
|
+
}) {
|
|
342
|
+
const c = g(n), y = g(a), v = new Date(a);
|
|
343
|
+
v.setDate(a.getDate() + 1);
|
|
344
|
+
const k = new Date(a);
|
|
345
|
+
k.setDate(a.getDate() - 1);
|
|
346
|
+
const w = c === y;
|
|
347
|
+
let b;
|
|
348
|
+
if (w) b = p;
|
|
349
|
+
else if (c === g(v)) b = m;
|
|
350
|
+
else if (c === g(k)) b = h;
|
|
351
|
+
else {
|
|
352
|
+
const R = n.getFullYear() === a.getFullYear();
|
|
353
|
+
b = new Intl.DateTimeFormat(l, {
|
|
354
|
+
weekday: "short",
|
|
355
|
+
day: "numeric",
|
|
356
|
+
month: "short",
|
|
357
|
+
...R ? {} : { year: "numeric" }
|
|
358
|
+
}).format(n);
|
|
359
|
+
}
|
|
360
|
+
return /* @__PURE__ */ f(
|
|
361
|
+
"div",
|
|
362
|
+
{
|
|
363
|
+
"data-today": w ? "true" : void 0,
|
|
364
|
+
className: [
|
|
365
|
+
"ds:sticky ds:top-0 ds:z-[1] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]",
|
|
366
|
+
"ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow",
|
|
367
|
+
w ? "ds:text-[color:var(--primary)] ds:font-semibold" : "ds:text-[color:var(--muted-foreground)]"
|
|
368
|
+
].join(" "),
|
|
369
|
+
children: [
|
|
370
|
+
w ? /* @__PURE__ */ i(
|
|
371
|
+
"span",
|
|
372
|
+
{
|
|
373
|
+
"aria-hidden": "true",
|
|
374
|
+
className: "ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]"
|
|
375
|
+
}
|
|
376
|
+
) : null,
|
|
377
|
+
b
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
export {
|
|
383
|
+
Fe as A,
|
|
384
|
+
He as a
|
|
385
|
+
};
|
|
386
|
+
//# sourceMappingURL=appointment-timeline-BJM0S_Fg.js.map
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, useRef as h, useImperativeHandle as z, useMemo as P } from "react";
|
|
3
|
+
import { c as E } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as H } from "react-i18next";
|
|
5
|
+
import { I as M } from "./icon-button-LqoiKcUN.js";
|
|
6
|
+
import { S as q } from "./skeleton-CZbwyJAA.js";
|
|
7
|
+
import { E as K } from "./empty-state-BLy7tigq.js";
|
|
8
|
+
import { A as V } from "./appointment-card-C06aZqA7.js";
|
|
9
|
+
import { u as _ } from "./registry-DvAUVLHh.js";
|
|
10
|
+
import { C as B } from "./calendar-days-C4BmpCZg.js";
|
|
11
|
+
import { P as D } from "./plus-CYKNmfuA.js";
|
|
12
|
+
const ae = {
|
|
13
|
+
id: "appointment-card",
|
|
14
|
+
// 'pick' (non-persisting activation) is host-delegated: the card exposes no
|
|
15
|
+
// handle of its own — its enclosing AppointmentTray performs the pick via
|
|
16
|
+
// `appointment-tray.select_item`, addressing this card by its data-component-id.
|
|
17
|
+
capabilities: ["pick"],
|
|
18
|
+
state: {},
|
|
19
|
+
actions: {},
|
|
20
|
+
domHooks: {
|
|
21
|
+
root: {
|
|
22
|
+
attr: "data-component",
|
|
23
|
+
value: "appointment-card",
|
|
24
|
+
description: "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."
|
|
25
|
+
},
|
|
26
|
+
instanceId: {
|
|
27
|
+
attr: "data-component-id",
|
|
28
|
+
sourceProp: "item.id",
|
|
29
|
+
description: "Sourced from item.id — the stable appointment identifier."
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, L = {
|
|
33
|
+
id: "appointment-tray",
|
|
34
|
+
// 'pick' (non-persisting activation): select_item routes an activation
|
|
35
|
+
// through onActivate — it does not persist a "selected appointment" value,
|
|
36
|
+
// so this is a focus/pick, not a select_single.
|
|
37
|
+
capabilities: ["pick"],
|
|
38
|
+
state: {
|
|
39
|
+
items: {
|
|
40
|
+
type: "Array<{ id: string; state: string }>",
|
|
41
|
+
descriptionKey: "ui.agent.appointmentTray.state.items",
|
|
42
|
+
description: "Currently-displayed appointments. Ids + lifecycle state only — never patient identity.",
|
|
43
|
+
read: (a) => a.getItems()
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
actions: {
|
|
47
|
+
select_item: {
|
|
48
|
+
safety: "read",
|
|
49
|
+
argsType: "{ id: string }",
|
|
50
|
+
argsSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: { id: { type: "string" } },
|
|
53
|
+
required: ["id"]
|
|
54
|
+
},
|
|
55
|
+
idempotent: !0,
|
|
56
|
+
descriptionKey: "ui.agent.appointmentTray.actions.selectItem",
|
|
57
|
+
description: "Activate the appointment with the given id.",
|
|
58
|
+
invoke: (a, s) => {
|
|
59
|
+
a.selectItem(s.id);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
domHooks: {
|
|
64
|
+
root: {
|
|
65
|
+
attr: "data-component",
|
|
66
|
+
value: "appointment-tray",
|
|
67
|
+
description: "Marks the AppointmentTray wrapper."
|
|
68
|
+
},
|
|
69
|
+
instanceId: {
|
|
70
|
+
attr: "data-component-id",
|
|
71
|
+
sourceProp: "id",
|
|
72
|
+
description: "Sourced from the id prop. Required to address a specific tray from the agent."
|
|
73
|
+
},
|
|
74
|
+
item: {
|
|
75
|
+
attr: "data-appointment-id",
|
|
76
|
+
description: "Stable appointment id emitted on each rendered AppointmentCard inside the tray."
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}, F = E(
|
|
80
|
+
[
|
|
81
|
+
"ds:flex ds:flex-col",
|
|
82
|
+
"ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]",
|
|
83
|
+
"ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
|
|
84
|
+
"ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]",
|
|
85
|
+
"ds:overflow-hidden"
|
|
86
|
+
].join(" "),
|
|
87
|
+
{
|
|
88
|
+
variants: {
|
|
89
|
+
size: {
|
|
90
|
+
sm: "",
|
|
91
|
+
md: ""
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
defaultVariants: {
|
|
95
|
+
size: "sm"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
), G = j(
|
|
99
|
+
({
|
|
100
|
+
id: a,
|
|
101
|
+
items: s,
|
|
102
|
+
title: g,
|
|
103
|
+
caption: c,
|
|
104
|
+
size: p = "sm",
|
|
105
|
+
locale: v,
|
|
106
|
+
currency: x,
|
|
107
|
+
onOpenAppointment: i,
|
|
108
|
+
onAddAppointment: m,
|
|
109
|
+
addLabel: b,
|
|
110
|
+
loading: l = !1,
|
|
111
|
+
emptyTitle: T,
|
|
112
|
+
emptyDescription: w,
|
|
113
|
+
className: I,
|
|
114
|
+
...k
|
|
115
|
+
}, N) => {
|
|
116
|
+
const { t: r } = H(), f = g ?? r("appointmentTray.title"), C = b ?? r("appointmentTray.add"), A = !l && s.length === 0;
|
|
117
|
+
let n;
|
|
118
|
+
l ? n = /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [0, 1, 2].map((e) => /* @__PURE__ */ t(q, { variant: "rectangular", height: "3.5rem" }, e)) }) : A ? n = /* @__PURE__ */ t("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ t(
|
|
119
|
+
K,
|
|
120
|
+
{
|
|
121
|
+
variant: "first-use",
|
|
122
|
+
size: "sm",
|
|
123
|
+
title: T ?? r("appointmentTray.empty.title"),
|
|
124
|
+
description: w ?? r("appointmentTray.empty.description")
|
|
125
|
+
}
|
|
126
|
+
) }) : n = /* @__PURE__ */ t("ul", { className: "ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-[var(--spacing-2xs)]", children: s.map((e) => /* @__PURE__ */ t(
|
|
127
|
+
V,
|
|
128
|
+
{
|
|
129
|
+
item: e,
|
|
130
|
+
size: p,
|
|
131
|
+
locale: v,
|
|
132
|
+
currency: x,
|
|
133
|
+
onActivate: i,
|
|
134
|
+
"data-appointment-id": e.id
|
|
135
|
+
},
|
|
136
|
+
e.id
|
|
137
|
+
)) });
|
|
138
|
+
const o = h(s);
|
|
139
|
+
o.current = s;
|
|
140
|
+
const y = h(null);
|
|
141
|
+
z(N, () => y.current, []);
|
|
142
|
+
const S = P(
|
|
143
|
+
() => ({
|
|
144
|
+
getItems: () => o.current.map((e) => ({ id: e.id, state: e.state })),
|
|
145
|
+
selectItem: (e) => {
|
|
146
|
+
const u = o.current.find((R) => R.id === e);
|
|
147
|
+
u && (i == null || i(u));
|
|
148
|
+
}
|
|
149
|
+
}),
|
|
150
|
+
[i]
|
|
151
|
+
);
|
|
152
|
+
return _(L, S, a), /* @__PURE__ */ d(
|
|
153
|
+
"section",
|
|
154
|
+
{
|
|
155
|
+
ref: y,
|
|
156
|
+
"aria-label": f,
|
|
157
|
+
"data-component": "appointment-tray",
|
|
158
|
+
"data-component-id": a,
|
|
159
|
+
className: F({ size: p, className: I }),
|
|
160
|
+
...k,
|
|
161
|
+
children: [
|
|
162
|
+
/* @__PURE__ */ d("header", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [
|
|
163
|
+
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0", children: [
|
|
164
|
+
/* @__PURE__ */ d("h3", { className: "ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card", children: [
|
|
165
|
+
/* @__PURE__ */ t(B, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
166
|
+
f
|
|
167
|
+
] }),
|
|
168
|
+
c ? /* @__PURE__ */ t("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: c }) : null
|
|
169
|
+
] }),
|
|
170
|
+
m ? /* @__PURE__ */ t(
|
|
171
|
+
M,
|
|
172
|
+
{
|
|
173
|
+
icon: /* @__PURE__ */ t(D, {}),
|
|
174
|
+
intent: "outline",
|
|
175
|
+
size: "sm",
|
|
176
|
+
"aria-label": C,
|
|
177
|
+
onClick: m
|
|
178
|
+
}
|
|
179
|
+
) : null
|
|
180
|
+
] }),
|
|
181
|
+
n
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
G.displayName = "AppointmentTray";
|
|
188
|
+
export {
|
|
189
|
+
G as A,
|
|
190
|
+
ae as a,
|
|
191
|
+
L as b
|
|
192
|
+
};
|
|
193
|
+
//# sourceMappingURL=appointment-tray-DRRw5ROi.js.map
|
|
@@ -6,7 +6,7 @@ import { B as G } from "./button-DD_0Xdmr.js";
|
|
|
6
6
|
import { I as D } from "./icon-button-LqoiKcUN.js";
|
|
7
7
|
import { S as pe } from "./select-DMLG44F5.js";
|
|
8
8
|
import { A as le } from "./audio-visualiser-l6zPd0AG.js";
|
|
9
|
-
import { A as F } from "./alert-
|
|
9
|
+
import { A as F } from "./alert-CHYZ96tR.js";
|
|
10
10
|
import { u as me } from "./registry-DvAUVLHh.js";
|
|
11
11
|
import { M as fe } from "./mic-B4Gog3Gi.js";
|
|
12
12
|
import { c as J } from "./createLucideIcon-CrFbzy84.js";
|
|
@@ -447,4 +447,4 @@ export {
|
|
|
447
447
|
De as A,
|
|
448
448
|
Re as a
|
|
449
449
|
};
|
|
450
|
-
//# sourceMappingURL=audio-recorder-
|
|
450
|
+
//# sourceMappingURL=audio-recorder-Cpdk5qpQ.js.map
|