@alfadocs/ui-kit-debug 1.36.1 → 1.38.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-tray-DYGCTIWB.js → agenda-tray-CG6jUjKc.js} +2 -2
- package/dist/_chunks/{agenda-tray-DYGCTIWB.js.map → agenda-tray-CG6jUjKc.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-card-GYHa7VGp.js → anamnesis-summary-card-CclBbiXg.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-card-GYHa7VGp.js.map → anamnesis-summary-card-CclBbiXg.js.map} +1 -1
- package/dist/_chunks/appointment-peek-5S4O1VQP.js +115 -0
- package/dist/_chunks/appointment-peek-5S4O1VQP.js.map +1 -0
- package/dist/_chunks/appointment-peek.agent-C539tNFM.js +17 -0
- package/dist/_chunks/appointment-peek.agent-C539tNFM.js.map +1 -0
- package/dist/_chunks/{appointment-timeline-ByfovxqR.js → appointment-timeline-D-rNwKpS.js} +2 -2
- package/dist/_chunks/{appointment-timeline-ByfovxqR.js.map → appointment-timeline-D-rNwKpS.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-D6UyJHej.js → appointment-tray-CK2CULg_.js} +2 -2
- package/dist/_chunks/{appointment-tray-D6UyJHej.js.map → appointment-tray-CK2CULg_.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-B0Z8Dwn8.js → balance-badge-cell-DHs5p0bA.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-B0Z8Dwn8.js.map → balance-badge-cell-DHs5p0bA.js.map} +1 -1
- package/dist/_chunks/{booking-Dp-9qR6F.js → booking-x3J7sS2G.js} +3 -3
- package/dist/_chunks/{booking-Dp-9qR6F.js.map → booking-x3J7sS2G.js.map} +1 -1
- package/dist/_chunks/building-2-D33bLCWL.js +24 -0
- package/dist/_chunks/building-2-D33bLCWL.js.map +1 -0
- package/dist/_chunks/calendar-workspace-Cc1LRVWY.js +9900 -0
- package/dist/_chunks/calendar-workspace-Cc1LRVWY.js.map +1 -0
- package/dist/_chunks/{control-room-rail-Ds45_g4f.js → control-room-rail-DQoHdE1U.js} +2 -2
- package/dist/_chunks/{control-room-rail-Ds45_g4f.js.map → control-room-rail-DQoHdE1U.js.map} +1 -1
- package/dist/_chunks/{data-table-BYGK-gUJ.js → data-table-Dy1lyumT.js} +2 -2
- package/dist/_chunks/{data-table-BYGK-gUJ.js.map → data-table-Dy1lyumT.js.map} +1 -1
- package/dist/_chunks/editable-description-7ptNpJEg.js +142 -0
- package/dist/_chunks/editable-description-7ptNpJEg.js.map +1 -0
- package/dist/_chunks/editable-description.agent-Bm_LBV2j.js +21 -0
- package/dist/_chunks/editable-description.agent-Bm_LBV2j.js.map +1 -0
- package/dist/_chunks/{file-manager-DvkFgj7d.js → file-manager-UlcYQv8n.js} +3 -3
- package/dist/_chunks/{file-manager-DvkFgj7d.js.map → file-manager-UlcYQv8n.js.map} +1 -1
- package/dist/_chunks/{message-tray-BcLyaO-G.js → message-tray-CXjVsKqp.js} +2 -2
- package/dist/_chunks/{message-tray-BcLyaO-G.js.map → message-tray-CXjVsKqp.js.map} +1 -1
- package/dist/_chunks/{money.agent-Dw55UxUA.js → money-BY-HmKhZ.js} +33 -47
- package/dist/_chunks/money-BY-HmKhZ.js.map +1 -0
- package/dist/_chunks/money.agent-BjJ6gOkx.js +17 -0
- package/dist/_chunks/money.agent-BjJ6gOkx.js.map +1 -0
- package/dist/_chunks/{note-timeline-CXfSV3yX.js → note-timeline-D2oPuQP6.js} +134 -73
- package/dist/_chunks/note-timeline-D2oPuQP6.js.map +1 -0
- package/dist/_chunks/notes-panel-CkbfDDzj.js +614 -0
- package/dist/_chunks/notes-panel-CkbfDDzj.js.map +1 -0
- package/dist/_chunks/{notification-tray-CJ8jOe-U.js → notification-tray-_NoChRKi.js} +2 -2
- package/dist/_chunks/{notification-tray-CJ8jOe-U.js.map → notification-tray-_NoChRKi.js.map} +1 -1
- package/dist/_chunks/panel-subview-BNXN8OEL.js +160 -0
- package/dist/_chunks/panel-subview-BNXN8OEL.js.map +1 -0
- package/dist/_chunks/panel-subview.agent-BIBvE-IW.js +17 -0
- package/dist/_chunks/panel-subview.agent-BIBvE-IW.js.map +1 -0
- package/dist/_chunks/{patient-details-f7SSXkTJ.js → patient-details-2cIaL-Zb.js} +2 -2
- package/dist/_chunks/{patient-details-f7SSXkTJ.js.map → patient-details-2cIaL-Zb.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-BQZoP4m2.js → patient-field-row-IHb2VFc2.js} +193 -172
- package/dist/_chunks/patient-field-row-IHb2VFc2.js.map +1 -0
- package/dist/_chunks/{patient-summary-card-Bz7KdUin.js → patient-summary-card-B131Q7Bp.js} +3 -3
- package/dist/_chunks/{patient-summary-card-Bz7KdUin.js.map → patient-summary-card-B131Q7Bp.js.map} +1 -1
- package/dist/_chunks/{practice-results-DOcORTkP.js → practice-results-CBNRJNnY.js} +2 -2
- package/dist/_chunks/{practice-results-DOcORTkP.js.map → practice-results-CBNRJNnY.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-C0TO69P7.js → product-hub-panel-C3bMjscm.js} +2 -2
- package/dist/_chunks/{product-hub-panel-C0TO69P7.js.map → product-hub-panel-C3bMjscm.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-BaHZb_ai.js → reviews-panel-Cy969x7q.js} +2 -2
- package/dist/_chunks/{reviews-panel-BaHZb_ai.js.map → reviews-panel-Cy969x7q.js.map} +1 -1
- package/dist/_chunks/{section-card.agent-W18CHEgX.js → section-card-XR2bW1Ie.js} +20 -34
- package/dist/_chunks/{section-card.agent-W18CHEgX.js.map → section-card-XR2bW1Ie.js.map} +1 -1
- package/dist/_chunks/section-card.agent-Bz1BhM_j.js +17 -0
- package/dist/_chunks/section-card.agent-Bz1BhM_j.js.map +1 -0
- package/dist/_chunks/{signature-request-Dej2g86d.js → signature-request-b-86AGlT.js} +2 -2
- package/dist/_chunks/{signature-request-Dej2g86d.js.map → signature-request-b-86AGlT.js.map} +1 -1
- package/dist/_chunks/{skeleton-CZbwyJAA.js → skeleton-B1KTdJ4N.js} +46 -33
- package/dist/_chunks/skeleton-B1KTdJ4N.js.map +1 -0
- package/dist/_chunks/{slot-grid-8Ko6thzz.js → slot-grid-Bk3GZL1p.js} +2 -2
- package/dist/_chunks/{slot-grid-8Ko6thzz.js.map → slot-grid-Bk3GZL1p.js.map} +1 -1
- package/dist/_chunks/smartphone-DaPcFw-X.js +32 -0
- package/dist/_chunks/smartphone-DaPcFw-X.js.map +1 -0
- package/dist/_chunks/{task-card-BalrLkSz.js → task-card-qTKD1fIT.js} +39 -57
- package/dist/_chunks/task-card-qTKD1fIT.js.map +1 -0
- package/dist/_chunks/{task-tray-wl9eti6J.js → task-tray-5co9Jr2L.js} +3 -3
- package/dist/_chunks/{task-tray-wl9eti6J.js.map → task-tray-5co9Jr2L.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-BDNB7hsZ.js → tasks-panel-BpH-x7U3.js} +3 -3
- package/dist/_chunks/{tasks-panel-BDNB7hsZ.js.map → tasks-panel-BpH-x7U3.js.map} +1 -1
- package/dist/_chunks/{tool-rail-Bq5eiFMG.js → tool-rail-BP8sjxCw.js} +310 -231
- package/dist/_chunks/tool-rail-BP8sjxCw.js.map +1 -0
- package/dist/_chunks/treatment-receipt-dUm99mdn.js +160 -0
- package/dist/_chunks/treatment-receipt-dUm99mdn.js.map +1 -0
- package/dist/_chunks/treatment-receipt.agent-bpFm2RPH.js +21 -0
- package/dist/_chunks/treatment-receipt.agent-bpFm2RPH.js.map +1 -0
- package/dist/_chunks/use-presence-transition-cDwWUXV-.js +58 -0
- package/dist/_chunks/use-presence-transition-cDwWUXV-.js.map +1 -0
- package/dist/_chunks/{workflow-map-D-LEni11.js → workflow-map-CXdsxvUj.js} +140 -156
- package/dist/_chunks/workflow-map-CXdsxvUj.js.map +1 -0
- package/dist/agent-catalog.json +65 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/appointment-peek/appointment-peek.agent.d.ts +3 -0
- package/dist/components/appointment-peek/appointment-peek.agent.d.ts.map +1 -0
- package/dist/components/appointment-peek/appointment-peek.d.ts +45 -0
- package/dist/components/appointment-peek/appointment-peek.d.ts.map +1 -0
- package/dist/components/appointment-peek/index.d.ts +4 -0
- package/dist/components/appointment-peek/index.d.ts.map +1 -0
- package/dist/components/appointment-peek/index.js +7 -0
- package/dist/components/appointment-peek/index.js.map +1 -0
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/editable-description/editable-description.agent.d.ts +3 -0
- package/dist/components/editable-description/editable-description.agent.d.ts.map +1 -0
- package/dist/components/editable-description/editable-description.d.ts +26 -0
- package/dist/components/editable-description/editable-description.d.ts.map +1 -0
- package/dist/components/editable-description/index.d.ts +4 -0
- package/dist/components/editable-description/index.d.ts.map +1 -0
- package/dist/components/editable-description/index.js +7 -0
- package/dist/components/editable-description/index.js.map +1 -0
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/money/index.js +2 -1
- package/dist/components/money/index.js.map +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/note-timeline/note-timeline.d.ts +8 -0
- package/dist/components/note-timeline/note-timeline.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +16 -0
- package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/panel-subview/index.d.ts +4 -0
- package/dist/components/panel-subview/index.d.ts.map +1 -0
- package/dist/components/panel-subview/index.js +7 -0
- package/dist/components/panel-subview/index.js.map +1 -0
- package/dist/components/panel-subview/panel-subview.agent.d.ts +3 -0
- package/dist/components/panel-subview/panel-subview.agent.d.ts.map +1 -0
- package/dist/components/panel-subview/panel-subview.d.ts +32 -0
- package/dist/components/panel-subview/panel-subview.d.ts.map +1 -0
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/section-card/index.js +4 -3
- package/dist/components/section-card/index.js.map +1 -1
- package/dist/components/skeleton/index.d.ts +1 -1
- package/dist/components/skeleton/index.d.ts.map +1 -1
- package/dist/components/skeleton/index.js +3 -2
- package/dist/components/skeleton/skeleton.d.ts +12 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
- package/dist/components/treatment-receipt/index.d.ts +4 -0
- package/dist/components/treatment-receipt/index.d.ts.map +1 -0
- package/dist/components/treatment-receipt/index.js +7 -0
- package/dist/components/treatment-receipt/index.js.map +1 -0
- package/dist/components/treatment-receipt/treatment-receipt.agent.d.ts +3 -0
- package/dist/components/treatment-receipt/treatment-receipt.agent.d.ts.map +1 -0
- package/dist/components/treatment-receipt/treatment-receipt.d.ts +38 -0
- package/dist/components/treatment-receipt/treatment-receipt.d.ts.map +1 -0
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +9 -7
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-presence-transition.d.ts +40 -0
- package/dist/hooks/use-presence-transition.d.ts.map +1 -0
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +29 -5
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +29 -5
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +29 -5
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +29 -5
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +29 -5
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +29 -5
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +29 -5
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +29 -5
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +29 -5
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +29 -5
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +29 -5
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +29 -5
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +29 -5
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +29 -5
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +29 -5
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +29 -5
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +29 -5
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +29 -5
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +29 -5
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +29 -5
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +29 -5
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +29 -5
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +29 -5
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +29 -5
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +29 -5
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +29 -5
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +29 -5
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +29 -5
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +29 -5
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +29 -5
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +29 -5
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +29 -5
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +29 -5
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +29 -5
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +29 -5
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +29 -5
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +959 -940
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +29 -5
- package/dist/locales/de.json +29 -5
- package/dist/locales/el.json +29 -5
- package/dist/locales/en.json +29 -5
- package/dist/locales/es.json +29 -5
- package/dist/locales/fr.json +29 -5
- package/dist/locales/hi.json +29 -5
- package/dist/locales/it.json +29 -5
- package/dist/locales/ja.json +29 -5
- package/dist/locales/nl.json +29 -5
- package/dist/locales/pl.json +29 -5
- package/dist/locales/pt.json +29 -5
- package/dist/locales/ro.json +29 -5
- package/dist/locales/ru.json +29 -5
- package/dist/locales/sq.json +29 -5
- package/dist/locales/sv.json +29 -5
- package/dist/locales/tr.json +29 -5
- package/dist/locales/zh.json +29 -5
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +16 -7
- package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +23 -23
- package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts +0 -2
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-info-hover.d.ts +18 -0
- package/dist/patterns/calendar/calendar-info-hover.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts +10 -0
- package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts +2 -2
- package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +17 -1
- package/dist/_chunks/calendar-workspace-BYwQK7fz.js +0 -9478
- package/dist/_chunks/calendar-workspace-BYwQK7fz.js.map +0 -1
- package/dist/_chunks/hourglass-BEAzW1wE.js +0 -26
- package/dist/_chunks/hourglass-BEAzW1wE.js.map +0 -1
- package/dist/_chunks/money.agent-Dw55UxUA.js.map +0 -1
- package/dist/_chunks/note-timeline-CXfSV3yX.js.map +0 -1
- package/dist/_chunks/notes-panel-Co8D3uDd.js +0 -469
- package/dist/_chunks/notes-panel-Co8D3uDd.js.map +0 -1
- package/dist/_chunks/patient-field-row-BQZoP4m2.js.map +0 -1
- package/dist/_chunks/skeleton-CZbwyJAA.js.map +0 -1
- package/dist/_chunks/smartphone-C0rFF2if.js +0 -15
- package/dist/_chunks/smartphone-C0rFF2if.js.map +0 -1
- package/dist/_chunks/task-card-BalrLkSz.js.map +0 -1
- package/dist/_chunks/tool-rail-Bq5eiFMG.js.map +0 -1
- package/dist/_chunks/workflow-map-D-LEni11.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { forwardRef as P, useRef as T, useImperativeHandle as q, useMemo as B }
|
|
|
3
3
|
import { c as H } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as K } from "react-i18next";
|
|
5
5
|
import { I as M } from "./icon-button-8xqRnkdG.js";
|
|
6
|
-
import { S as A } from "./skeleton-
|
|
6
|
+
import { S as A } from "./skeleton-B1KTdJ4N.js";
|
|
7
7
|
import { E as D } from "./empty-state-X0sVPfVo.js";
|
|
8
8
|
import { A as V } from "./agenda-card-DyQtHb9z.js";
|
|
9
9
|
import { u as F } from "./registry-DvAUVLHh.js";
|
|
@@ -212,4 +212,4 @@ export {
|
|
|
212
212
|
U as A,
|
|
213
213
|
L as a
|
|
214
214
|
};
|
|
215
|
-
//# sourceMappingURL=agenda-tray-
|
|
215
|
+
//# sourceMappingURL=agenda-tray-CG6jUjKc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agenda-tray-DYGCTIWB.js","sources":["../../src/components/agenda-tray/agenda-tray.agent.ts","../../src/components/agenda-tray/agenda-tray.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AgendaTray. */\n/* */\n/* Tray-level surface: read appointment ids + lifecycle status (never */\n/* patient names / treatments), and route an activation through the */\n/* curated handle. AgendaTray is in-page (no open/close). */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { AgendaTrayHandle } from './agenda-tray';\n\nexport const agendaTrayAgent: AgentAdapter<AgendaTrayHandle> = {\n id: 'agenda-tray',\n // `pick` (NON-persisting): select_item activates / opens an appointment by\n // firing onOpenAppointment — it does not store a \"selected\" value on the tray\n // (there is no selection state slot), so this is a pick, not select_single.\n capabilities: ['pick'],\n state: {\n items: {\n type: 'Array<{ id: string; status: string }>',\n descriptionKey: 'ui.agent.agendaTray.state.items',\n description:\n 'Currently-displayed appointments. Ids + status only — never patient identity.',\n read: (handle) => handle.getItems(),\n },\n },\n actions: {\n select_item: {\n // Activates (opens) an appointment — pure navigation, no data mutation.\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n descriptionKey: 'ui.agent.agendaTray.actions.selectItem',\n description: 'Activate the appointment with the given id.',\n examples: [\n { args: { id: 'appt-204' }, note: 'Open appointment appt-204.' },\n ],\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'agenda-tray',\n description: 'Marks the AgendaTray 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 AgendaCard 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 { AgendaCard, type AgendaItem } from '../agenda-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { agendaTrayAgent } from './agenda-tray.agent';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst agendaTrayVariants = 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 AgendaTray. Exposed as the forwardRef\n * target so a future agent / MCP UI bridge can drive the tray without\n * touching the DOM. See `agenda-tray.agent.ts`.\n */\nexport interface AgendaTrayHandle {\n getItems: () => Array<{ id: string; status: string }>;\n selectItem: (id: string) => void;\n}\n\nexport interface AgendaTrayProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'onClick' | 'id'>,\n VariantProps<typeof agendaTrayVariants> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so\n * an agent / MCP UI bridge can address this specific tray.\n */\n id?: string;\n items: AgendaItem[];\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 size?: 'sm' | 'md';\n onOpenAppointment?: (item: AgendaItem) => void;\n onAddAppointment?: () => void;\n /** Localised label for the \"Add\" affordance. */\n addLabel?: string;\n loading?: boolean;\n emptyTitle?: string;\n emptyDescription?: string;\n /** Optional CTA wired into the empty state (EmptyState primaryAction). */\n emptyAction?: { label: string; onClick: () => void };\n /**\n * Pinned footer link (e.g. \"All upcoming appointments\"). Localised by\n * the consumer; rendered after the list, before the section closes.\n */\n viewAllLabel?: string;\n /** Fires when the footer link is activated. Required to render it. */\n onViewAll?: () => void;\n /**\n * Per-row trailing action toolbar, forwarded to each AgendaCard's\n * `actions` slot.\n */\n renderItemActions?: (item: AgendaItem) => ReactNode;\n /**\n * Constrain the list to the tray's own height and scroll inside it —\n * pair with a height/max-height on `className`. The scroll region is\n * keyboard-focusable so it stays operable without a pointer.\n */\n scrollable?: boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const AgendaTray = forwardRef<HTMLElement, AgendaTrayProps>(\n (\n {\n id,\n items,\n title,\n caption,\n size = 'sm',\n onOpenAppointment,\n onAddAppointment,\n addLabel,\n loading = false,\n emptyTitle,\n emptyDescription,\n emptyAction,\n viewAllLabel,\n onViewAll,\n renderItemActions,\n scrollable = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const heading = title ?? t('agendaTray.title', \"Today's appointments\");\n const resolvedAddLabel = addLabel ?? t('agendaTray.add', 'Add appointment');\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=\"2.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('agendaTray.empty.title', 'No appointments')}\n description={\n emptyDescription ??\n t(\n 'agendaTray.empty.description',\n 'New appointments will appear here.',\n )\n }\n primaryAction={emptyAction}\n />\n </div>\n );\n } else {\n body = (\n <ul\n className={[\n // flex-1 unconditionally so a footer pins to the tray's\n // bottom edge in equal-height grid rows.\n 'ds:flex ds:list-none ds:flex-col ds:flex-1 ds:min-h-0',\n // Keyboard-focusable when it scrolls (axe\n // scrollable-region-focusable) — pair with a height on the\n // tray's className.\n scrollable ? 'ds:overflow-y-auto' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- scrollable list must be keyboard focusable (axe scrollable-region-focusable)\n tabIndex={scrollable ? 0 : undefined}\n aria-label={scrollable ? heading : undefined}\n >\n {items.map((item) => (\n <AgendaCard\n key={item.id}\n item={item}\n size={size}\n onActivate={onOpenAppointment}\n actions={renderItemActions?.(item)}\n data-appointment-id={item.id}\n />\n ))}\n </ul>\n );\n }\n\n /* Curated imperative handle for agent integration. See\n * agenda-tray.agent.ts. */\n const itemsRef = useRef<AgendaItem[]>(items);\n itemsRef.current = items;\n\n const innerRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => innerRef.current as HTMLElement, []);\n\n const handle = useMemo<AgendaTrayHandle>(\n () => ({\n getItems: () =>\n itemsRef.current.map((i) => ({\n id: i.id,\n status: i.status ?? 'confirmed',\n })),\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(agendaTrayAgent, handle, id);\n\n return (\n <section\n ref={innerRef}\n aria-label={heading}\n data-component=\"agenda-tray\"\n data-component-id={id}\n className={agendaTrayVariants({ 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 {viewAllLabel && onViewAll && !isEmpty && !loading ? (\n <footer className=\"ds:[border-block-start:var(--border-width-sm)_solid_var(--card-border)] ds:p-[var(--spacing-sm)]\">\n <button\n type=\"button\"\n onClick={onViewAll}\n className={[\n 'type-label ds:text-[color:var(--link)] ds:underline ds:underline-offset-2 ds:hover:no-underline',\n 'ds:rounded-[var(--radius-sm)] ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]',\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-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n ].join(' ')}\n >\n {viewAllLabel}\n </button>\n </footer>\n ) : null}\n </section>\n );\n },\n);\n\nAgendaTray.displayName = 'AgendaTray';\n"],"names":["agendaTrayAgent","handle","args","agendaTrayVariants","cva","AgendaTray","forwardRef","id","items","title","caption","size","onOpenAppointment","onAddAppointment","addLabel","loading","emptyTitle","emptyDescription","emptyAction","viewAllLabel","onViewAll","renderItemActions","scrollable","className","rest","ref","t","useTranslation","heading","resolvedAddLabel","isEmpty","body","jsx","i","Skeleton","EmptyState","item","AgendaCard","itemsRef","useRef","innerRef","useImperativeHandle","useMemo","targetId","found","useAgentRegistration","jsxs","CalendarDays","IconButton","Plus"],"mappings":";;;;;;;;;;;AAWO,MAAMA,IAAkD;AAAA,EAC7D,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;AAAA,MAEX,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,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,UAAU;AAAA,QACR,EAAE,MAAM,EAAE,IA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IACzC,gBAAAiB,EAAC,UAAA,EAAO,WAAU,oGAChB,UAAA,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAASZ;AAAA,cACT,WAAW;AAAA,gBACT;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cAAA,EACA,KAAK,GAAG;AAAA,cAET,UAAAD;AAAA,YAAA;AAAA,UAAA,GAEL,IACE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAd,EAAW,cAAc;"}
|
|
1
|
+
{"version":3,"file":"agenda-tray-CG6jUjKc.js","sources":["../../src/components/agenda-tray/agenda-tray.agent.ts","../../src/components/agenda-tray/agenda-tray.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AgendaTray. */\n/* */\n/* Tray-level surface: read appointment ids + lifecycle status (never */\n/* patient names / treatments), and route an activation through the */\n/* curated handle. AgendaTray is in-page (no open/close). */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { AgendaTrayHandle } from './agenda-tray';\n\nexport const agendaTrayAgent: AgentAdapter<AgendaTrayHandle> = {\n id: 'agenda-tray',\n // `pick` (NON-persisting): select_item activates / opens an appointment by\n // firing onOpenAppointment — it does not store a \"selected\" value on the tray\n // (there is no selection state slot), so this is a pick, not select_single.\n capabilities: ['pick'],\n state: {\n items: {\n type: 'Array<{ id: string; status: string }>',\n descriptionKey: 'ui.agent.agendaTray.state.items',\n description:\n 'Currently-displayed appointments. Ids + status only — never patient identity.',\n read: (handle) => handle.getItems(),\n },\n },\n actions: {\n select_item: {\n // Activates (opens) an appointment — pure navigation, no data mutation.\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n descriptionKey: 'ui.agent.agendaTray.actions.selectItem',\n description: 'Activate the appointment with the given id.',\n examples: [\n { args: { id: 'appt-204' }, note: 'Open appointment appt-204.' },\n ],\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'agenda-tray',\n description: 'Marks the AgendaTray 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 AgendaCard 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 { AgendaCard, type AgendaItem } from '../agenda-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { agendaTrayAgent } from './agenda-tray.agent';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst agendaTrayVariants = 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 AgendaTray. Exposed as the forwardRef\n * target so a future agent / MCP UI bridge can drive the tray without\n * touching the DOM. See `agenda-tray.agent.ts`.\n */\nexport interface AgendaTrayHandle {\n getItems: () => Array<{ id: string; status: string }>;\n selectItem: (id: string) => void;\n}\n\nexport interface AgendaTrayProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'onClick' | 'id'>,\n VariantProps<typeof agendaTrayVariants> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so\n * an agent / MCP UI bridge can address this specific tray.\n */\n id?: string;\n items: AgendaItem[];\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 size?: 'sm' | 'md';\n onOpenAppointment?: (item: AgendaItem) => void;\n onAddAppointment?: () => void;\n /** Localised label for the \"Add\" affordance. */\n addLabel?: string;\n loading?: boolean;\n emptyTitle?: string;\n emptyDescription?: string;\n /** Optional CTA wired into the empty state (EmptyState primaryAction). */\n emptyAction?: { label: string; onClick: () => void };\n /**\n * Pinned footer link (e.g. \"All upcoming appointments\"). Localised by\n * the consumer; rendered after the list, before the section closes.\n */\n viewAllLabel?: string;\n /** Fires when the footer link is activated. Required to render it. */\n onViewAll?: () => void;\n /**\n * Per-row trailing action toolbar, forwarded to each AgendaCard's\n * `actions` slot.\n */\n renderItemActions?: (item: AgendaItem) => ReactNode;\n /**\n * Constrain the list to the tray's own height and scroll inside it —\n * pair with a height/max-height on `className`. The scroll region is\n * keyboard-focusable so it stays operable without a pointer.\n */\n scrollable?: boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const AgendaTray = forwardRef<HTMLElement, AgendaTrayProps>(\n (\n {\n id,\n items,\n title,\n caption,\n size = 'sm',\n onOpenAppointment,\n onAddAppointment,\n addLabel,\n loading = false,\n emptyTitle,\n emptyDescription,\n emptyAction,\n viewAllLabel,\n onViewAll,\n renderItemActions,\n scrollable = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const heading = title ?? t('agendaTray.title', \"Today's appointments\");\n const resolvedAddLabel = addLabel ?? t('agendaTray.add', 'Add appointment');\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=\"2.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('agendaTray.empty.title', 'No appointments')}\n description={\n emptyDescription ??\n t(\n 'agendaTray.empty.description',\n 'New appointments will appear here.',\n )\n }\n primaryAction={emptyAction}\n />\n </div>\n );\n } else {\n body = (\n <ul\n className={[\n // flex-1 unconditionally so a footer pins to the tray's\n // bottom edge in equal-height grid rows.\n 'ds:flex ds:list-none ds:flex-col ds:flex-1 ds:min-h-0',\n // Keyboard-focusable when it scrolls (axe\n // scrollable-region-focusable) — pair with a height on the\n // tray's className.\n scrollable ? 'ds:overflow-y-auto' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- scrollable list must be keyboard focusable (axe scrollable-region-focusable)\n tabIndex={scrollable ? 0 : undefined}\n aria-label={scrollable ? heading : undefined}\n >\n {items.map((item) => (\n <AgendaCard\n key={item.id}\n item={item}\n size={size}\n onActivate={onOpenAppointment}\n actions={renderItemActions?.(item)}\n data-appointment-id={item.id}\n />\n ))}\n </ul>\n );\n }\n\n /* Curated imperative handle for agent integration. See\n * agenda-tray.agent.ts. */\n const itemsRef = useRef<AgendaItem[]>(items);\n itemsRef.current = items;\n\n const innerRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => innerRef.current as HTMLElement, []);\n\n const handle = useMemo<AgendaTrayHandle>(\n () => ({\n getItems: () =>\n itemsRef.current.map((i) => ({\n id: i.id,\n status: i.status ?? 'confirmed',\n })),\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(agendaTrayAgent, handle, id);\n\n return (\n <section\n ref={innerRef}\n aria-label={heading}\n data-component=\"agenda-tray\"\n data-component-id={id}\n className={agendaTrayVariants({ 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 {viewAllLabel && onViewAll && !isEmpty && !loading ? (\n <footer className=\"ds:[border-block-start:var(--border-width-sm)_solid_var(--card-border)] ds:p-[var(--spacing-sm)]\">\n <button\n type=\"button\"\n onClick={onViewAll}\n className={[\n 'type-label ds:text-[color:var(--link)] ds:underline ds:underline-offset-2 ds:hover:no-underline',\n 'ds:rounded-[var(--radius-sm)] ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]',\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-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n ].join(' ')}\n >\n {viewAllLabel}\n </button>\n </footer>\n ) : null}\n </section>\n );\n },\n);\n\nAgendaTray.displayName = 'AgendaTray';\n"],"names":["agendaTrayAgent","handle","args","agendaTrayVariants","cva","AgendaTray","forwardRef","id","items","title","caption","size","onOpenAppointment","onAddAppointment","addLabel","loading","emptyTitle","emptyDescription","emptyAction","viewAllLabel","onViewAll","renderItemActions","scrollable","className","rest","ref","t","useTranslation","heading","resolvedAddLabel","isEmpty","body","jsx","i","Skeleton","EmptyState","item","AgendaCard","itemsRef","useRef","innerRef","useImperativeHandle","useMemo","targetId","found","useAgentRegistration","jsxs","CalendarDays","IconButton","Plus"],"mappings":";;;;;;;;;;;AAWO,MAAMA,IAAkD;AAAA,EAC7D,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;AAAA,MAEX,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,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,UAAU;AAAA,QACR,EAAE,MAAM,EAAE,IAAI,WAAA,GAAc,MAAM,6BAAA;AAAA,MAA6B;AAAA,MAEjE,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,WAAWC,EAAK,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aACE;AAAA,IAAA;AAAA,IAEJ,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aACE;AAAA,IAAA;AAAA,EACJ;AAEJ,GC1CMC,IAAqB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 -4,7 +4,7 @@ import { c as h } from "./index-D2ZczOXr.js";
|
|
|
4
4
|
import { useTranslation as ie } from "react-i18next";
|
|
5
5
|
import { B as H } from "./badge-BudgzTe_.js";
|
|
6
6
|
import { C as oe } from "./card-DPmk26CL.js";
|
|
7
|
-
import { S as k } from "./skeleton-
|
|
7
|
+
import { S as k } from "./skeleton-B1KTdJ4N.js";
|
|
8
8
|
import { a as le, T as ce } from "./tooltip-Cp-PLePW.js";
|
|
9
9
|
import { u as me } from "./registry-DvAUVLHh.js";
|
|
10
10
|
import { H as P } from "./heart-pulse-BCppJyN2.js";
|
|
@@ -365,4 +365,4 @@ export {
|
|
|
365
365
|
we as A,
|
|
366
366
|
ue as a
|
|
367
367
|
};
|
|
368
|
-
//# sourceMappingURL=anamnesis-summary-card-
|
|
368
|
+
//# sourceMappingURL=anamnesis-summary-card-CclBbiXg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anamnesis-summary-card-GYHa7VGp.js","sources":["../../src/components/anamnesis-summary-card/anamnesis-summary-card.agent.ts","../../src/components/anamnesis-summary-card/anamnesis-summary-card.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { AnamnesisSummaryCardHandle } from './anamnesis-summary-card';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — AnamnesisSummaryCard */\n/* */\n/* Read-only adapter. Surfaces a STRUCTURAL snapshot of the anamnesis */\n/* summary — section / answer / highlighted / unanswered counts and the */\n/* consumer id only. Never a question label or an answer value, so an */\n/* agent can answer \"does this patient have highlighted answers?\" without */\n/* re-parsing the DOM and without leaking PHI (PRS §Security). */\n/* -------------------------------------------------------------------- */\n\nexport const anamnesisSummaryCardAgent: AgentAdapter<AnamnesisSummaryCardHandle> =\n {\n id: 'anamnesis-summary-card',\n // The card is read-only: the only handle method is a getSummary\n // projection, so there is no capability to declare.\n capabilities: [],\n state: {\n summary: {\n type: '{ id?: string; sectionCount: number; answerCount: number; highlightedCount: number; unansweredCount: number }',\n descriptionKey: 'ui.agent.anamnesisSummaryCard.state.summary',\n description:\n 'Structural summary of the anamnesis card — section, answer, highlighted and unanswered counts plus the consumer id. Never question labels or answer values.',\n read: (handle) => handle.getSummary(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'anamnesis-summary-card',\n description: 'Marks the AnamnesisSummaryCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-answer-id',\n description:\n 'One per answer row (KeyValuePair); the value is the intake field key. Highlighted rows also carry data-highlighted.',\n },\n },\n };\n","import {\n forwardRef,\n useId,\n useImperativeHandle,\n useMemo,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { HeartPulse } from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { Tooltip, TooltipProvider } from '../tooltip/tooltip';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { anamnesisSummaryCardAgent } from './anamnesis-summary-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* AnamnesisSummaryCard */\n/* */\n/* A read-only summary of a patient's anamnesis answers: every answered */\n/* question as a label/value row, grouped by section, two columns when */\n/* the card is wide. Practice-flagged (\"highlighted\") answers carry an */\n/* accent rail plus a HeartPulse chip whose tooltip says WHEN the answer */\n/* was recorded (and from which module when the card combines several). */\n/* */\n/* Templated on PatientSummaryCard: the consumer passes rows, the kit */\n/* owns layout, icons, i18n, and a11y. Used by the platform both for the */\n/* Overview tab (one card combining each module's latest interview) and */\n/* under the archive table (one card per interview). */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n // Same `surface` vocabulary as PatientSummaryCard / ContactProfileCard,\n // plus `bare` for a host that already frames the card — an expanded\n // table row, where a card inside a row inside a table was three layers.\n surface: {\n flat: '',\n elevated: '',\n bare: '',\n },\n density: {\n comfortable: '',\n compact: '',\n },\n },\n defaultVariants: {\n surface: 'elevated',\n density: 'comfortable',\n },\n});\n\n/** Stack of sections inside the body — the density tunes the section gap. */\nconst sectionsVariants = cva('ds:flex ds:flex-col', {\n variants: {\n density: {\n comfortable: 'ds:gap-[var(--spacing-lg)]',\n compact: 'ds:gap-[var(--spacing-md)]',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\n/** Card padding per density — overrides Card.Header / Body / Footer defaults. */\nconst headerPaddingVariants = cva('', {\n variants: {\n density: {\n comfortable: '',\n compact: 'ds:p-[var(--spacing-sm)] ds:pb-0',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\nconst bodyPaddingVariants = cva('', {\n variants: {\n density: {\n comfortable: '',\n compact: 'ds:p-[var(--spacing-sm)]',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\nconst footerPaddingVariants = cva('', {\n variants: {\n density: {\n comfortable: '',\n compact: 'ds:p-[var(--spacing-sm)] ds:pt-0',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface AnamnesisSummaryAnswer {\n /** Stable key (the intake field key). */\n id: string;\n /** Question label, already translated by the consumer. */\n label: string;\n /** Formatted answer. Strings preferred; ReactNode allowed. */\n value: ReactNode;\n /** Unit symbol rendered muted after the value (e.g. \"kg\"). */\n unit?: string;\n /** The practice's highlight rule fired for this answer. */\n highlighted?: boolean;\n /**\n * When the answer was recorded — `YYYY-MM-DD`, `YYYY-MM-DDTHH:mm` (LOCAL\n * wall time, no zone) or full ISO-8601. A bare date is never read as UTC.\n */\n reportedAtIso?: string;\n /** Where the answer came from when the card combines modules (module name). */\n sourceLabel?: string;\n}\n\nexport interface AnamnesisSummarySection {\n id: string;\n heading: string;\n answers: AnamnesisSummaryAnswer[];\n}\n\nexport interface AnamnesisSummaryCardHandle {\n /** Structural snapshot only — counts, never labels or values. */\n getSummary: () => {\n id?: string;\n sectionCount: number;\n answerCount: number;\n highlightedCount: number;\n unansweredCount: number;\n };\n}\n\nexport interface AnamnesisSummaryCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n sections: AnamnesisSummarySection[];\n /** Card title (e.g. the module name). Falls back to the \"Anamnesis summary\" region label. */\n title?: string;\n /** Muted line under the title (e.g. the interview date-time, already formatted). */\n subtitle?: string;\n /** Questions the consumer omitted because they were unanswered — one muted footer line when > 0. */\n unansweredCount?: number;\n /** BCP-47 tag for the tooltip date; defaults to the active i18next language. */\n locale?: string;\n /** Highlighted answers sort to the top of their section. Default `true`. */\n highlightedFirst?: boolean;\n /**\n * Open the card with a \"Highlighted answers\" group collecting every\n * flagged answer, each with where and when it was recorded, before the\n * sections. Default `true`; absent when nothing is flagged.\n */\n highlightedGroup?: boolean;\n /**\n * Render ONLY the highlighted-answers group — no sections, no unanswered\n * footer — for a card whose sole job is the flagged answers. Empty copy\n * when nothing is flagged. Default `false`.\n */\n highlightedOnly?: boolean;\n /** `'elevated'` (default) — Card with shadow; `'flat'` — outlined Card. */\n surface?: 'flat' | 'elevated' | 'bare';\n /** `'comfortable'` (default) or `'compact'` (tighter row gap + paddings). */\n density?: 'comfortable' | 'compact';\n /** Render the skeleton loading placeholder. */\n loading?: boolean;\n /** Rendered at the inline-end of the heading row (e.g. an action menu). */\n actionSlot?: ReactNode;\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Date helpers */\n/* -------------------------------------------------------------------- */\n\nconst DATE_ONLY_RE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst LOCAL_DATETIME_RE =\n /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})(?::(\\d{2}))?$/;\nconst CLOCK_TIME_RE = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}/;\n\n/**\n * Parse a stored stamp by fields when it carries no zone, so `2026-03-01`\n * stays 1 March in every viewer zone (`new Date('2026-03-01')` would read\n * it as UTC midnight and print 29 February west of Greenwich).\n */\nfunction parseReportedAt(iso: string): { date: Date; hasTime: boolean } | null {\n const day = DATE_ONLY_RE.exec(iso);\n if (day) {\n return {\n date: new Date(Number(day[1]), Number(day[2]) - 1, Number(day[3])),\n hasTime: false,\n };\n }\n const local = LOCAL_DATETIME_RE.exec(iso);\n if (local) {\n return {\n date: new Date(\n Number(local[1]),\n Number(local[2]) - 1,\n Number(local[3]),\n Number(local[4]),\n Number(local[5]),\n local[6] ? Number(local[6]) : 0,\n ),\n hasTime: true,\n };\n }\n const date = new Date(iso);\n if (Number.isNaN(date.getTime())) return null;\n return { date, hasTime: CLOCK_TIME_RE.test(iso) };\n}\n\nfunction formatReportedAt(iso: string, locale: string): string | null {\n const parsed = parseReportedAt(iso);\n if (!parsed) return null;\n const options: Intl.DateTimeFormatOptions = parsed.hasTime\n ? { dateStyle: 'medium', timeStyle: 'short' }\n : { dateStyle: 'medium' };\n try {\n return new Intl.DateTimeFormat(locale, options).format(parsed.date);\n } catch {\n // An unknown BCP-47 tag throws — fall back to the runtime default locale.\n return new Intl.DateTimeFormat(undefined, options).format(parsed.date);\n }\n}\n\n/* -------------------------------------------------------------------- */\n/* Styling fragments */\n/* -------------------------------------------------------------------- */\n\n/** Bare button carrying the chip — it exists only to give the tooltip a\n * keyboard-focusable trigger, so it inherits the chip's pill outline.\n * The 16px chip sits below `--min-target-size`, so the same `::before`\n * hit-area recipe as InfoTip `size=\"sm\"` expands the target: the full\n * 44/48px on touch, relaxing to the `--spacing-lg` 24px floor from `sm:` up. */\nconst CHIP_BUTTON_CLASS =\n 'ds:relative ds:inline-flex ds:appearance-none ds:border-0 ds:bg-transparent ds:p-0 ds:m-0 ds:cursor-default ds:rounded-[var(--radius-full)] ds:before:absolute ds:before:content-[\"\"] ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:sm:before:inset-x-[calc((var(--spacing-lg)-100%)/-2)] ds:sm:before:inset-y-[calc((var(--spacing-lg)-100%)/-2)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\n/** Every cell carries a start bar: a quiet edge in the border colour, the\n * accent when the answer is flagged. It gives a cell an edge without a box. */\nconst CELL_CLASS =\n 'ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)] ds:border-s-2 ds:ps-[var(--spacing-sm)]';\nconst CELL_BAR_CLASS = 'ds:border-[color:var(--border)]';\nconst CELL_BAR_ACCENT_CLASS = 'ds:border-[color:var(--accent)]';\n\nconst MUTED_LINE_CLASS =\n 'type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]';\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\n/** Card's slot shape without its box — for `surface=\"bare\"`. */\nconst BareShell = Object.assign(\n ({ children }: { children?: ReactNode }) => <>{children}</>,\n {\n Header: ({\n children,\n className,\n }: {\n children?: ReactNode;\n className?: string;\n }) => <div className={className}>{children}</div>,\n Body: ({\n children,\n className,\n }: {\n children?: ReactNode;\n className?: string;\n }) => <div className={className}>{children}</div>,\n Footer: ({\n children,\n className,\n }: {\n children?: ReactNode;\n className?: string;\n }) => <div className={className}>{children}</div>,\n },\n);\n\nexport const AnamnesisSummaryCard = forwardRef<\n AnamnesisSummaryCardHandle,\n AnamnesisSummaryCardProps\n>(\n (\n {\n sections,\n title,\n subtitle,\n unansweredCount = 0,\n locale,\n highlightedFirst = true,\n highlightedGroup = true,\n highlightedOnly = false,\n surface = 'elevated',\n density = 'comfortable',\n loading = false,\n actionSlot,\n id,\n className,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n // Drop empty sections and apply the highlighted-first order once per\n // input change; `sort` is stable so unhighlighted rows keep their order.\n const visibleSections = useMemo(\n () =>\n sections\n .filter((section) => section.answers.length > 0)\n .map((section) => ({\n ...section,\n answers: highlightedFirst\n ? [...section.answers].sort(\n (a, b) => Number(!!b.highlighted) - Number(!!a.highlighted),\n )\n : section.answers,\n })),\n [sections, highlightedFirst],\n );\n\n const answerCount = visibleSections.reduce(\n (sum, section) => sum + section.answers.length,\n 0,\n );\n const highlightedCount = visibleSections.reduce(\n (sum, section) =>\n sum + section.answers.filter((answer) => answer.highlighted).length,\n 0,\n );\n const sectionCount = visibleSections.length;\n // Every flagged answer in section order, for the opening group.\n const highlightedAnswers = visibleSections.flatMap((section) =>\n section.answers.filter((answer) => answer.highlighted),\n );\n // A flagged-answers-only card lists no sections at all.\n const listedSections = highlightedOnly ? [] : visibleSections;\n const recordedLine = (answer: AnamnesisSummaryAnswer): string | null => {\n const date = answer.reportedAtIso\n ? formatReportedAt(answer.reportedAtIso, activeLocale)\n : null;\n const parts = [answer.sourceLabel, date].filter((part): part is string =>\n Boolean(part),\n );\n return parts.length > 0 ? parts.join(' · ') : null;\n };\n\n // Imperative handle — structural snapshot only (counts + consumer id),\n // never a question label or an answer value.\n const handle = useMemo<AnamnesisSummaryCardHandle>(\n () => ({\n getSummary: () => ({\n id,\n sectionCount,\n answerCount,\n highlightedCount,\n unansweredCount,\n }),\n }),\n [id, sectionCount, answerCount, highlightedCount, unansweredCount],\n );\n useImperativeHandle(ref, () => handle, [handle]);\n useAgentRegistration(anamnesisSummaryCardAgent, handle, id);\n\n const regionLabel = t('anamnesisSummaryCard.regionLabel', {\n defaultValue: 'Anamnesis summary',\n });\n const resolvedTitle = title ?? regionLabel;\n const resolvedAriaLabel = ariaLabel ?? resolvedTitle;\n const highlightedText = t('anamnesisSummaryCard.highlighted', {\n defaultValue: 'Highlighted',\n });\n\n const titleClass =\n density === 'comfortable' ? 'type-title-card' : 'type-title-item';\n const rowGap = density === 'comfortable' ? 'md' : 'sm';\n\n /* ---------------------------------------------------------------- */\n /* Highlight chip */\n /* ---------------------------------------------------------------- */\n\n const renderChip = (answer: AnamnesisSummaryAnswer) => {\n const date = answer.reportedAtIso\n ? formatReportedAt(answer.reportedAtIso, activeLocale)\n : null;\n const tooltipLabel =\n date && answer.sourceLabel\n ? t('anamnesisSummaryCard.reportedOnFrom', {\n date,\n source: answer.sourceLabel,\n defaultValue: 'Highlighted on {{date}} · {{source}}',\n })\n : date\n ? t('anamnesisSummaryCard.reportedOn', {\n date,\n defaultValue: 'Highlighted on {{date}}',\n })\n : highlightedText;\n return (\n <Tooltip label={tooltipLabel} side=\"top\">\n <button\n type=\"button\"\n className={CHIP_BUTTON_CLASS}\n data-highlighted-chip=\"\"\n >\n {/* Icon only: the heart is the mark, the tooltip and the\n accessible name say why. */}\n <Badge\n variant=\"accentSoft\"\n size=\"sm\"\n aria-label={highlightedText}\n leading={<HeartPulse aria-hidden=\"true\" />}\n />\n </button>\n </Tooltip>\n );\n };\n\n /* ---------------------------------------------------------------- */\n /* Header */\n /* ---------------------------------------------------------------- */\n\n const header = (\n <div className=\"ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <h3\n id={headingId}\n className={`ds:m-0 ${titleClass} ds:text-[color:var(--foreground)]`}\n >\n {resolvedTitle}\n </h3>\n {subtitle ? <p className={MUTED_LINE_CLASS}>{subtitle}</p> : null}\n </div>\n {!loading && highlightedCount > 0 ? (\n <Badge\n variant=\"accentSoft\"\n size=\"sm\"\n leading={<HeartPulse aria-hidden=\"true\" />}\n className=\"ds:shrink-0\"\n >\n {t('anamnesisSummaryCard.highlightedCount', {\n count: highlightedCount,\n defaultValue: '{{count}} highlighted',\n })}\n </Badge>\n ) : null}\n {actionSlot ? (\n <div className=\"ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]\">\n {actionSlot}\n </div>\n ) : null}\n </div>\n );\n\n /* ---------------------------------------------------------------- */\n /* Body */\n /* ---------------------------------------------------------------- */\n\n const skeletonBody = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <Skeleton variant=\"text\" width=\"40%\" />\n <Skeleton variant=\"text\" lines={4} />\n </div>\n );\n\n const emptyBody = (\n <p className={MUTED_LINE_CLASS}>\n {t('anamnesisSummaryCard.empty', {\n defaultValue: 'No answers recorded yet',\n })}\n </p>\n );\n\n /* ---------------------------------------------------------------- */\n /* Q&A cells */\n /* ---------------------------------------------------------------- */\n\n // Question above answer, one accent glyph each, two cells across when\n // the card is wide: a reader scans questions the way they were asked,\n // and a label|value pair doubled up made four ragged columns.\n const gridClass = [\n 'ds:m-0 ds:grid ds:grid-cols-1 ds:@[672px]/afields:grid-cols-2',\n 'ds:gap-x-[var(--spacing-lg)]',\n rowGap === 'md'\n ? 'ds:gap-y-[var(--spacing-md)]'\n : 'ds:gap-y-[var(--spacing-sm)]',\n ].join(' ');\n\n const renderAnswer = (\n answer: AnamnesisSummaryAnswer,\n opts: {\n recorded: boolean;\n chip: boolean;\n accentBar: boolean;\n keyPrefix: string;\n },\n ) => {\n const flagged = opts.chip && answer.highlighted;\n const recorded = opts.recorded ? recordedLine(answer) : null;\n return (\n <div\n key={`${opts.keyPrefix}${answer.id}`}\n data-answer-id={answer.id}\n data-highlighted={answer.highlighted ? '' : undefined}\n className={[\n CELL_CLASS,\n opts.accentBar || flagged ? CELL_BAR_ACCENT_CLASS : CELL_BAR_CLASS,\n ].join(' ')}\n >\n {/* The question leads: heavier and larger than its answer, the\n flag's heart ahead of it — a mark beside the question, never a\n box around the answer. */}\n <dt className=\"type-title-item ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] ds:font-semibold ds:text-[color:var(--foreground)]\">\n {flagged ? renderChip(answer) : null}\n <span>{answer.label}</span>\n </dt>\n <dd className=\"type-body-sm ds:m-0 ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)] ds:text-[color:var(--foreground)]\">\n <span className=\"ds:inline-flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]\">\n <span>{answer.value}</span>\n {answer.unit ? (\n <span className=\"ds:text-[color:var(--muted-foreground)]\">\n {answer.unit}\n </span>\n ) : null}\n </span>\n {recorded ? (\n <span className={MUTED_LINE_CLASS}>{recorded}</span>\n ) : null}\n </dd>\n </div>\n );\n };\n\n const sectionsBody = (\n <div\n role=\"group\"\n aria-label={t('anamnesisSummaryCard.sectionsLabel', {\n defaultValue: 'Anamnesis sections',\n })}\n className={sectionsVariants({ density })}\n >\n {/* Plain <div>, deliberately not a named <section>: a named\n <section> is a `region` landmark, and one per anamnesis section\n per card would drown the page-level landmarks. The <h4> already\n gives heading navigation into each section. */}\n {(highlightedGroup || highlightedOnly) &&\n highlightedAnswers.length > 0 ? (\n <div\n data-highlighted-group=\"\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n {/* The card's own title already says it when this is all it shows. */}\n {highlightedOnly ? null : (\n <h4 className=\"type-label ds:m-0 ds:font-semibold ds:text-[color:var(--foreground)]\">\n {t('anamnesisSummaryCard.highlightedGroup', {\n defaultValue: 'Highlighted answers',\n })}\n </h4>\n )}\n {/* Container-queried so the cells flow into two columns when the\n card is wide enough and stay single-column in a narrow rail —\n the same 672px PatientSummaryCard breaks at (px, not rem:\n container-query rem follows the host root font-size). */}\n <div className=\"ds:@container/afields\">\n <dl className={gridClass}>\n {highlightedAnswers.map((answer) =>\n renderAnswer(answer, {\n recorded: true,\n chip: false,\n accentBar: true,\n keyPrefix: 'highlighted-',\n }),\n )}\n </dl>\n </div>\n </div>\n ) : null}\n {listedSections.map((section) => (\n <div\n key={section.id}\n data-section-id={section.id}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n <h4 className=\"type-label ds:m-0 ds:font-semibold ds:text-[color:var(--foreground)]\">\n {section.heading}\n </h4>\n <div className=\"ds:@container/afields\">\n <dl className={gridClass}>\n {section.answers.map((answer) =>\n renderAnswer(answer, {\n recorded: false,\n chip: true,\n accentBar: false,\n keyPrefix: '',\n }),\n )}\n </dl>\n </div>\n </div>\n ))}\n </div>\n );\n\n const body = loading\n ? skeletonBody\n : visibleSections.length === 0 ||\n (highlightedOnly && highlightedAnswers.length === 0)\n ? emptyBody\n : sectionsBody;\n\n // `bare` drops the Card chrome and keeps its slots, so a host that\n // already frames the content (an expanded table row) gets one layer.\n const Shell = surface === 'bare' ? BareShell : Card;\n\n return (\n <div\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-busy={loading || undefined}\n data-component=\"anamnesis-summary-card\"\n data-component-id={id}\n data-density={density}\n data-highlighted-only={highlightedOnly ? '' : undefined}\n id={id}\n className={rootVariants({ surface, density, className })}\n {...rest}\n >\n <Shell variant={surface === 'flat' ? 'outlined' : 'elevated'}>\n <Shell.Header className={headerPaddingVariants({ density })}>\n {header}\n </Shell.Header>\n {/* Own TooltipProvider so a host without one still gets the chip\n tooltips; Radix providers compose, so a host-level one also works. */}\n <TooltipProvider>\n <Shell.Body className={bodyPaddingVariants({ density })}>\n {body}\n </Shell.Body>\n </TooltipProvider>\n {!loading && !highlightedOnly && unansweredCount > 0 ? (\n <Shell.Footer className={footerPaddingVariants({ density })}>\n <p className={MUTED_LINE_CLASS}>\n {t('anamnesisSummaryCard.unanswered', {\n count: unansweredCount,\n defaultValue: '{{count}} questions not answered',\n })}\n </p>\n </Shell.Footer>\n ) : null}\n </Shell>\n </div>\n );\n },\n);\n\nAnamnesisSummaryCard.displayName = 'AnamnesisSummaryCard';\n\n/** Variant unions re-exported for downstream typing. */\nexport type AnamnesisSummaryCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\nexport type AnamnesisSummaryCardDensity = NonNullable<\n VariantProps<typeof rootVariants>['density']\n>;\n"],"names":["anamnesisSummaryCardAgent","handle","rootVariants","cva","sectionsVariants","headerPaddingVariants","bodyPaddingVariants","footerPaddingVariants","DATE_ONLY_RE","LOCAL_DATETIME_RE","CLOCK_TIME_RE","parseReportedAt","iso","day","local","date","formatReportedAt","locale","parsed","options","CHIP_BUTTON_CLASS","CELL_CLASS","CELL_BAR_CLASS","CELL_BAR_ACCENT_CLASS","MUTED_LINE_CLASS","BareShell","children","className","jsx","AnamnesisSummaryCard","forwardRef","sections","title","subtitle","unansweredCount","highlightedFirst","highlightedGroup","highlightedOnly","surface","density","loading","actionSlot","id","ariaLabel","rest","ref","t","i18n","useTranslation","headingId","useId","activeLocale","visibleSections","useMemo","section","a","b","answerCount","sum","highlightedCount","answer","sectionCount","highlightedAnswers","listedSections","recordedLine","parts","part","useImperativeHandle","useAgentRegistration","regionLabel","resolvedTitle","resolvedAriaLabel","highlightedText","titleClass","rowGap","renderChip","tooltipLabel","Tooltip","Badge","HeartPulse","header","jsxs","skeletonBody","Skeleton","emptyBody","gridClass","renderAnswer","opts","flagged","recorded","sectionsBody","body","Shell","Card","TooltipProvider"],"mappings":";;;;;;;;;;AAaO,MAAMA,KACX;AAAA,EACE,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,WAAA;AAAA,IAAW;AAAA,EACtC;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;A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AAWvF,GAAsB,EAAE,SAAAkC,GAAS,GACvD,UAAAyC,GACH;AAAA,UAGA,gBAAApD,EAACkE,IAAA,EACC,UAAA,gBAAAlE,EAACgE,EAAM,MAAN,EAAW,WAAWtF,GAAoB,EAAE,SAAAiC,EAAA,CAAS,GACnD,cACH,GACF;AAAA,UACC,CAACC,KAAW,CAACH,KAAmBH,IAAkB,IACjD,gBAAAN,EAACgE,EAAM,QAAN,EAAa,WAAWrF,GAAsB,EAAE,SAAAgC,GAAS,GACxD,4BAAC,KAAA,EAAE,WAAWf,GACX,UAAAsB,EAAE,mCAAmC;AAAA,YACpC,OAAOZ;AAAA,YACP,cAAc;AAAA,UAAA,CACf,EAAA,CACH,EAAA,CACF,IACE;AAAA,QAAA,EAAA,CACN;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAL,GAAqB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"anamnesis-summary-card-CclBbiXg.js","sources":["../../src/components/anamnesis-summary-card/anamnesis-summary-card.agent.ts","../../src/components/anamnesis-summary-card/anamnesis-summary-card.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { AnamnesisSummaryCardHandle } from './anamnesis-summary-card';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — AnamnesisSummaryCard */\n/* */\n/* Read-only adapter. Surfaces a STRUCTURAL snapshot of the anamnesis */\n/* summary — section / answer / highlighted / unanswered counts and the */\n/* consumer id only. Never a question label or an answer value, so an */\n/* agent can answer \"does this patient have highlighted answers?\" without */\n/* re-parsing the DOM and without leaking PHI (PRS §Security). */\n/* -------------------------------------------------------------------- */\n\nexport const anamnesisSummaryCardAgent: AgentAdapter<AnamnesisSummaryCardHandle> =\n {\n id: 'anamnesis-summary-card',\n // The card is read-only: the only handle method is a getSummary\n // projection, so there is no capability to declare.\n capabilities: [],\n state: {\n summary: {\n type: '{ id?: string; sectionCount: number; answerCount: number; highlightedCount: number; unansweredCount: number }',\n descriptionKey: 'ui.agent.anamnesisSummaryCard.state.summary',\n description:\n 'Structural summary of the anamnesis card — section, answer, highlighted and unanswered counts plus the consumer id. Never question labels or answer values.',\n read: (handle) => handle.getSummary(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'anamnesis-summary-card',\n description: 'Marks the AnamnesisSummaryCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-answer-id',\n description:\n 'One per answer row (KeyValuePair); the value is the intake field key. Highlighted rows also carry data-highlighted.',\n },\n },\n };\n","import {\n forwardRef,\n useId,\n useImperativeHandle,\n useMemo,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { HeartPulse } from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { Tooltip, TooltipProvider } from '../tooltip/tooltip';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { anamnesisSummaryCardAgent } from './anamnesis-summary-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* AnamnesisSummaryCard */\n/* */\n/* A read-only summary of a patient's anamnesis answers: every answered */\n/* question as a label/value row, grouped by section, two columns when */\n/* the card is wide. Practice-flagged (\"highlighted\") answers carry an */\n/* accent rail plus a HeartPulse chip whose tooltip says WHEN the answer */\n/* was recorded (and from which module when the card combines several). */\n/* */\n/* Templated on PatientSummaryCard: the consumer passes rows, the kit */\n/* owns layout, icons, i18n, and a11y. Used by the platform both for the */\n/* Overview tab (one card combining each module's latest interview) and */\n/* under the archive table (one card per interview). */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n // Same `surface` vocabulary as PatientSummaryCard / ContactProfileCard,\n // plus `bare` for a host that already frames the card — an expanded\n // table row, where a card inside a row inside a table was three layers.\n surface: {\n flat: '',\n elevated: '',\n bare: '',\n },\n density: {\n comfortable: '',\n compact: '',\n },\n },\n defaultVariants: {\n surface: 'elevated',\n density: 'comfortable',\n },\n});\n\n/** Stack of sections inside the body — the density tunes the section gap. */\nconst sectionsVariants = cva('ds:flex ds:flex-col', {\n variants: {\n density: {\n comfortable: 'ds:gap-[var(--spacing-lg)]',\n compact: 'ds:gap-[var(--spacing-md)]',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\n/** Card padding per density — overrides Card.Header / Body / Footer defaults. */\nconst headerPaddingVariants = cva('', {\n variants: {\n density: {\n comfortable: '',\n compact: 'ds:p-[var(--spacing-sm)] ds:pb-0',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\nconst bodyPaddingVariants = cva('', {\n variants: {\n density: {\n comfortable: '',\n compact: 'ds:p-[var(--spacing-sm)]',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\nconst footerPaddingVariants = cva('', {\n variants: {\n density: {\n comfortable: '',\n compact: 'ds:p-[var(--spacing-sm)] ds:pt-0',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface AnamnesisSummaryAnswer {\n /** Stable key (the intake field key). */\n id: string;\n /** Question label, already translated by the consumer. */\n label: string;\n /** Formatted answer. Strings preferred; ReactNode allowed. */\n value: ReactNode;\n /** Unit symbol rendered muted after the value (e.g. \"kg\"). */\n unit?: string;\n /** The practice's highlight rule fired for this answer. */\n highlighted?: boolean;\n /**\n * When the answer was recorded — `YYYY-MM-DD`, `YYYY-MM-DDTHH:mm` (LOCAL\n * wall time, no zone) or full ISO-8601. A bare date is never read as UTC.\n */\n reportedAtIso?: string;\n /** Where the answer came from when the card combines modules (module name). */\n sourceLabel?: string;\n}\n\nexport interface AnamnesisSummarySection {\n id: string;\n heading: string;\n answers: AnamnesisSummaryAnswer[];\n}\n\nexport interface AnamnesisSummaryCardHandle {\n /** Structural snapshot only — counts, never labels or values. */\n getSummary: () => {\n id?: string;\n sectionCount: number;\n answerCount: number;\n highlightedCount: number;\n unansweredCount: number;\n };\n}\n\nexport interface AnamnesisSummaryCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n sections: AnamnesisSummarySection[];\n /** Card title (e.g. the module name). Falls back to the \"Anamnesis summary\" region label. */\n title?: string;\n /** Muted line under the title (e.g. the interview date-time, already formatted). */\n subtitle?: string;\n /** Questions the consumer omitted because they were unanswered — one muted footer line when > 0. */\n unansweredCount?: number;\n /** BCP-47 tag for the tooltip date; defaults to the active i18next language. */\n locale?: string;\n /** Highlighted answers sort to the top of their section. Default `true`. */\n highlightedFirst?: boolean;\n /**\n * Open the card with a \"Highlighted answers\" group collecting every\n * flagged answer, each with where and when it was recorded, before the\n * sections. Default `true`; absent when nothing is flagged.\n */\n highlightedGroup?: boolean;\n /**\n * Render ONLY the highlighted-answers group — no sections, no unanswered\n * footer — for a card whose sole job is the flagged answers. Empty copy\n * when nothing is flagged. Default `false`.\n */\n highlightedOnly?: boolean;\n /** `'elevated'` (default) — Card with shadow; `'flat'` — outlined Card. */\n surface?: 'flat' | 'elevated' | 'bare';\n /** `'comfortable'` (default) or `'compact'` (tighter row gap + paddings). */\n density?: 'comfortable' | 'compact';\n /** Render the skeleton loading placeholder. */\n loading?: boolean;\n /** Rendered at the inline-end of the heading row (e.g. an action menu). */\n actionSlot?: ReactNode;\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Date helpers */\n/* -------------------------------------------------------------------- */\n\nconst DATE_ONLY_RE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst LOCAL_DATETIME_RE =\n /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})(?::(\\d{2}))?$/;\nconst CLOCK_TIME_RE = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}/;\n\n/**\n * Parse a stored stamp by fields when it carries no zone, so `2026-03-01`\n * stays 1 March in every viewer zone (`new Date('2026-03-01')` would read\n * it as UTC midnight and print 29 February west of Greenwich).\n */\nfunction parseReportedAt(iso: string): { date: Date; hasTime: boolean } | null {\n const day = DATE_ONLY_RE.exec(iso);\n if (day) {\n return {\n date: new Date(Number(day[1]), Number(day[2]) - 1, Number(day[3])),\n hasTime: false,\n };\n }\n const local = LOCAL_DATETIME_RE.exec(iso);\n if (local) {\n return {\n date: new Date(\n Number(local[1]),\n Number(local[2]) - 1,\n Number(local[3]),\n Number(local[4]),\n Number(local[5]),\n local[6] ? Number(local[6]) : 0,\n ),\n hasTime: true,\n };\n }\n const date = new Date(iso);\n if (Number.isNaN(date.getTime())) return null;\n return { date, hasTime: CLOCK_TIME_RE.test(iso) };\n}\n\nfunction formatReportedAt(iso: string, locale: string): string | null {\n const parsed = parseReportedAt(iso);\n if (!parsed) return null;\n const options: Intl.DateTimeFormatOptions = parsed.hasTime\n ? { dateStyle: 'medium', timeStyle: 'short' }\n : { dateStyle: 'medium' };\n try {\n return new Intl.DateTimeFormat(locale, options).format(parsed.date);\n } catch {\n // An unknown BCP-47 tag throws — fall back to the runtime default locale.\n return new Intl.DateTimeFormat(undefined, options).format(parsed.date);\n }\n}\n\n/* -------------------------------------------------------------------- */\n/* Styling fragments */\n/* -------------------------------------------------------------------- */\n\n/** Bare button carrying the chip — it exists only to give the tooltip a\n * keyboard-focusable trigger, so it inherits the chip's pill outline.\n * The 16px chip sits below `--min-target-size`, so the same `::before`\n * hit-area recipe as InfoTip `size=\"sm\"` expands the target: the full\n * 44/48px on touch, relaxing to the `--spacing-lg` 24px floor from `sm:` up. */\nconst CHIP_BUTTON_CLASS =\n 'ds:relative ds:inline-flex ds:appearance-none ds:border-0 ds:bg-transparent ds:p-0 ds:m-0 ds:cursor-default ds:rounded-[var(--radius-full)] ds:before:absolute ds:before:content-[\"\"] ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:sm:before:inset-x-[calc((var(--spacing-lg)-100%)/-2)] ds:sm:before:inset-y-[calc((var(--spacing-lg)-100%)/-2)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\n/** Every cell carries a start bar: a quiet edge in the border colour, the\n * accent when the answer is flagged. It gives a cell an edge without a box. */\nconst CELL_CLASS =\n 'ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)] ds:border-s-2 ds:ps-[var(--spacing-sm)]';\nconst CELL_BAR_CLASS = 'ds:border-[color:var(--border)]';\nconst CELL_BAR_ACCENT_CLASS = 'ds:border-[color:var(--accent)]';\n\nconst MUTED_LINE_CLASS =\n 'type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]';\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\n/** Card's slot shape without its box — for `surface=\"bare\"`. */\nconst BareShell = Object.assign(\n ({ children }: { children?: ReactNode }) => <>{children}</>,\n {\n Header: ({\n children,\n className,\n }: {\n children?: ReactNode;\n className?: string;\n }) => <div className={className}>{children}</div>,\n Body: ({\n children,\n className,\n }: {\n children?: ReactNode;\n className?: string;\n }) => <div className={className}>{children}</div>,\n Footer: ({\n children,\n className,\n }: {\n children?: ReactNode;\n className?: string;\n }) => <div className={className}>{children}</div>,\n },\n);\n\nexport const AnamnesisSummaryCard = forwardRef<\n AnamnesisSummaryCardHandle,\n AnamnesisSummaryCardProps\n>(\n (\n {\n sections,\n title,\n subtitle,\n unansweredCount = 0,\n locale,\n highlightedFirst = true,\n highlightedGroup = true,\n highlightedOnly = false,\n surface = 'elevated',\n density = 'comfortable',\n loading = false,\n actionSlot,\n id,\n className,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n // Drop empty sections and apply the highlighted-first order once per\n // input change; `sort` is stable so unhighlighted rows keep their order.\n const visibleSections = useMemo(\n () =>\n sections\n .filter((section) => section.answers.length > 0)\n .map((section) => ({\n ...section,\n answers: highlightedFirst\n ? [...section.answers].sort(\n (a, b) => Number(!!b.highlighted) - Number(!!a.highlighted),\n )\n : section.answers,\n })),\n [sections, highlightedFirst],\n );\n\n const answerCount = visibleSections.reduce(\n (sum, section) => sum + section.answers.length,\n 0,\n );\n const highlightedCount = visibleSections.reduce(\n (sum, section) =>\n sum + section.answers.filter((answer) => answer.highlighted).length,\n 0,\n );\n const sectionCount = visibleSections.length;\n // Every flagged answer in section order, for the opening group.\n const highlightedAnswers = visibleSections.flatMap((section) =>\n section.answers.filter((answer) => answer.highlighted),\n );\n // A flagged-answers-only card lists no sections at all.\n const listedSections = highlightedOnly ? [] : visibleSections;\n const recordedLine = (answer: AnamnesisSummaryAnswer): string | null => {\n const date = answer.reportedAtIso\n ? formatReportedAt(answer.reportedAtIso, activeLocale)\n : null;\n const parts = [answer.sourceLabel, date].filter((part): part is string =>\n Boolean(part),\n );\n return parts.length > 0 ? parts.join(' · ') : null;\n };\n\n // Imperative handle — structural snapshot only (counts + consumer id),\n // never a question label or an answer value.\n const handle = useMemo<AnamnesisSummaryCardHandle>(\n () => ({\n getSummary: () => ({\n id,\n sectionCount,\n answerCount,\n highlightedCount,\n unansweredCount,\n }),\n }),\n [id, sectionCount, answerCount, highlightedCount, unansweredCount],\n );\n useImperativeHandle(ref, () => handle, [handle]);\n useAgentRegistration(anamnesisSummaryCardAgent, handle, id);\n\n const regionLabel = t('anamnesisSummaryCard.regionLabel', {\n defaultValue: 'Anamnesis summary',\n });\n const resolvedTitle = title ?? regionLabel;\n const resolvedAriaLabel = ariaLabel ?? resolvedTitle;\n const highlightedText = t('anamnesisSummaryCard.highlighted', {\n defaultValue: 'Highlighted',\n });\n\n const titleClass =\n density === 'comfortable' ? 'type-title-card' : 'type-title-item';\n const rowGap = density === 'comfortable' ? 'md' : 'sm';\n\n /* ---------------------------------------------------------------- */\n /* Highlight chip */\n /* ---------------------------------------------------------------- */\n\n const renderChip = (answer: AnamnesisSummaryAnswer) => {\n const date = answer.reportedAtIso\n ? formatReportedAt(answer.reportedAtIso, activeLocale)\n : null;\n const tooltipLabel =\n date && answer.sourceLabel\n ? t('anamnesisSummaryCard.reportedOnFrom', {\n date,\n source: answer.sourceLabel,\n defaultValue: 'Highlighted on {{date}} · {{source}}',\n })\n : date\n ? t('anamnesisSummaryCard.reportedOn', {\n date,\n defaultValue: 'Highlighted on {{date}}',\n })\n : highlightedText;\n return (\n <Tooltip label={tooltipLabel} side=\"top\">\n <button\n type=\"button\"\n className={CHIP_BUTTON_CLASS}\n data-highlighted-chip=\"\"\n >\n {/* Icon only: the heart is the mark, the tooltip and the\n accessible name say why. */}\n <Badge\n variant=\"accentSoft\"\n size=\"sm\"\n aria-label={highlightedText}\n leading={<HeartPulse aria-hidden=\"true\" />}\n />\n </button>\n </Tooltip>\n );\n };\n\n /* ---------------------------------------------------------------- */\n /* Header */\n /* ---------------------------------------------------------------- */\n\n const header = (\n <div className=\"ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <h3\n id={headingId}\n className={`ds:m-0 ${titleClass} ds:text-[color:var(--foreground)]`}\n >\n {resolvedTitle}\n </h3>\n {subtitle ? <p className={MUTED_LINE_CLASS}>{subtitle}</p> : null}\n </div>\n {!loading && highlightedCount > 0 ? (\n <Badge\n variant=\"accentSoft\"\n size=\"sm\"\n leading={<HeartPulse aria-hidden=\"true\" />}\n className=\"ds:shrink-0\"\n >\n {t('anamnesisSummaryCard.highlightedCount', {\n count: highlightedCount,\n defaultValue: '{{count}} highlighted',\n })}\n </Badge>\n ) : null}\n {actionSlot ? (\n <div className=\"ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]\">\n {actionSlot}\n </div>\n ) : null}\n </div>\n );\n\n /* ---------------------------------------------------------------- */\n /* Body */\n /* ---------------------------------------------------------------- */\n\n const skeletonBody = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <Skeleton variant=\"text\" width=\"40%\" />\n <Skeleton variant=\"text\" lines={4} />\n </div>\n );\n\n const emptyBody = (\n <p className={MUTED_LINE_CLASS}>\n {t('anamnesisSummaryCard.empty', {\n defaultValue: 'No answers recorded yet',\n })}\n </p>\n );\n\n /* ---------------------------------------------------------------- */\n /* Q&A cells */\n /* ---------------------------------------------------------------- */\n\n // Question above answer, one accent glyph each, two cells across when\n // the card is wide: a reader scans questions the way they were asked,\n // and a label|value pair doubled up made four ragged columns.\n const gridClass = [\n 'ds:m-0 ds:grid ds:grid-cols-1 ds:@[672px]/afields:grid-cols-2',\n 'ds:gap-x-[var(--spacing-lg)]',\n rowGap === 'md'\n ? 'ds:gap-y-[var(--spacing-md)]'\n : 'ds:gap-y-[var(--spacing-sm)]',\n ].join(' ');\n\n const renderAnswer = (\n answer: AnamnesisSummaryAnswer,\n opts: {\n recorded: boolean;\n chip: boolean;\n accentBar: boolean;\n keyPrefix: string;\n },\n ) => {\n const flagged = opts.chip && answer.highlighted;\n const recorded = opts.recorded ? recordedLine(answer) : null;\n return (\n <div\n key={`${opts.keyPrefix}${answer.id}`}\n data-answer-id={answer.id}\n data-highlighted={answer.highlighted ? '' : undefined}\n className={[\n CELL_CLASS,\n opts.accentBar || flagged ? CELL_BAR_ACCENT_CLASS : CELL_BAR_CLASS,\n ].join(' ')}\n >\n {/* The question leads: heavier and larger than its answer, the\n flag's heart ahead of it — a mark beside the question, never a\n box around the answer. */}\n <dt className=\"type-title-item ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] ds:font-semibold ds:text-[color:var(--foreground)]\">\n {flagged ? renderChip(answer) : null}\n <span>{answer.label}</span>\n </dt>\n <dd className=\"type-body-sm ds:m-0 ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)] ds:text-[color:var(--foreground)]\">\n <span className=\"ds:inline-flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]\">\n <span>{answer.value}</span>\n {answer.unit ? (\n <span className=\"ds:text-[color:var(--muted-foreground)]\">\n {answer.unit}\n </span>\n ) : null}\n </span>\n {recorded ? (\n <span className={MUTED_LINE_CLASS}>{recorded}</span>\n ) : null}\n </dd>\n </div>\n );\n };\n\n const sectionsBody = (\n <div\n role=\"group\"\n aria-label={t('anamnesisSummaryCard.sectionsLabel', {\n defaultValue: 'Anamnesis sections',\n })}\n className={sectionsVariants({ density })}\n >\n {/* Plain <div>, deliberately not a named <section>: a named\n <section> is a `region` landmark, and one per anamnesis section\n per card would drown the page-level landmarks. The <h4> already\n gives heading navigation into each section. */}\n {(highlightedGroup || highlightedOnly) &&\n highlightedAnswers.length > 0 ? (\n <div\n data-highlighted-group=\"\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n {/* The card's own title already says it when this is all it shows. */}\n {highlightedOnly ? null : (\n <h4 className=\"type-label ds:m-0 ds:font-semibold ds:text-[color:var(--foreground)]\">\n {t('anamnesisSummaryCard.highlightedGroup', {\n defaultValue: 'Highlighted answers',\n })}\n </h4>\n )}\n {/* Container-queried so the cells flow into two columns when the\n card is wide enough and stay single-column in a narrow rail —\n the same 672px PatientSummaryCard breaks at (px, not rem:\n container-query rem follows the host root font-size). */}\n <div className=\"ds:@container/afields\">\n <dl className={gridClass}>\n {highlightedAnswers.map((answer) =>\n renderAnswer(answer, {\n recorded: true,\n chip: false,\n accentBar: true,\n keyPrefix: 'highlighted-',\n }),\n )}\n </dl>\n </div>\n </div>\n ) : null}\n {listedSections.map((section) => (\n <div\n key={section.id}\n data-section-id={section.id}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n <h4 className=\"type-label ds:m-0 ds:font-semibold ds:text-[color:var(--foreground)]\">\n {section.heading}\n </h4>\n <div className=\"ds:@container/afields\">\n <dl className={gridClass}>\n {section.answers.map((answer) =>\n renderAnswer(answer, {\n recorded: false,\n chip: true,\n accentBar: false,\n keyPrefix: '',\n }),\n )}\n </dl>\n </div>\n </div>\n ))}\n </div>\n );\n\n const body = loading\n ? skeletonBody\n : visibleSections.length === 0 ||\n (highlightedOnly && highlightedAnswers.length === 0)\n ? emptyBody\n : sectionsBody;\n\n // `bare` drops the Card chrome and keeps its slots, so a host that\n // already frames the content (an expanded table row) gets one layer.\n const Shell = surface === 'bare' ? BareShell : Card;\n\n return (\n <div\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-busy={loading || undefined}\n data-component=\"anamnesis-summary-card\"\n data-component-id={id}\n data-density={density}\n data-highlighted-only={highlightedOnly ? '' : undefined}\n id={id}\n className={rootVariants({ surface, density, className })}\n {...rest}\n >\n <Shell variant={surface === 'flat' ? 'outlined' : 'elevated'}>\n <Shell.Header className={headerPaddingVariants({ density })}>\n {header}\n </Shell.Header>\n {/* Own TooltipProvider so a host without one still gets the chip\n tooltips; Radix providers compose, so a host-level one also works. */}\n <TooltipProvider>\n <Shell.Body className={bodyPaddingVariants({ density })}>\n {body}\n </Shell.Body>\n </TooltipProvider>\n {!loading && !highlightedOnly && unansweredCount > 0 ? (\n <Shell.Footer className={footerPaddingVariants({ density })}>\n <p className={MUTED_LINE_CLASS}>\n {t('anamnesisSummaryCard.unanswered', {\n count: unansweredCount,\n defaultValue: '{{count}} questions not answered',\n })}\n </p>\n </Shell.Footer>\n ) : null}\n </Shell>\n </div>\n );\n },\n);\n\nAnamnesisSummaryCard.displayName = 'AnamnesisSummaryCard';\n\n/** Variant unions re-exported for downstream typing. */\nexport type AnamnesisSummaryCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\nexport type AnamnesisSummaryCardDensity = NonNullable<\n VariantProps<typeof rootVariants>['density']\n>;\n"],"names":["anamnesisSummaryCardAgent","handle","rootVariants","cva","sectionsVariants","headerPaddingVariants","bodyPaddingVariants","footerPaddingVariants","DATE_ONLY_RE","LOCAL_DATETIME_RE","CLOCK_TIME_RE","parseReportedAt","iso","day","local","date","formatReportedAt","locale","parsed","options","CHIP_BUTTON_CLASS","CELL_CLASS","CELL_BAR_CLASS","CELL_BAR_ACCENT_CLASS","MUTED_LINE_CLASS","BareShell","children","className","jsx","AnamnesisSummaryCard","forwardRef","sections","title","subtitle","unansweredCount","highlightedFirst","highlightedGroup","highlightedOnly","surface","density","loading","actionSlot","id","ariaLabel","rest","ref","t","i18n","useTranslation","headingId","useId","activeLocale","visibleSections","useMemo","section","a","b","answerCount","sum","highlightedCount","answer","sectionCount","highlightedAnswers","listedSections","recordedLine","parts","part","useImperativeHandle","useAgentRegistration","regionLabel","resolvedTitle","resolvedAriaLabel","highlightedText","titleClass","rowGap","renderChip","tooltipLabel","Tooltip","Badge","HeartPulse","header","jsxs","skeletonBody","Skeleton","emptyBody","gridClass","renderAnswer","opts","flagged","recorded","sectionsBody","body","Shell","Card","TooltipProvider"],"mappings":";;;;;;;;;;AAaO,MAAMA,KACX;AAAA,EACE,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,WAAA;AAAA,IAAW;AAAA,EACtC;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ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,GAAS,GACvD,UAAAyC,GACH;AAAA,UAGA,gBAAApD,EAACkE,IAAA,EACC,UAAA,gBAAAlE,EAACgE,EAAM,MAAN,EAAW,WAAWtF,GAAoB,EAAE,SAAAiC,EAAA,CAAS,GACnD,cACH,GACF;AAAA,UACC,CAACC,KAAW,CAACH,KAAmBH,IAAkB,IACjD,gBAAAN,EAACgE,EAAM,QAAN,EAAa,WAAWrF,GAAsB,EAAE,SAAAgC,GAAS,GACxD,4BAAC,KAAA,EAAE,WAAWf,GACX,UAAAsB,EAAE,mCAAmC;AAAA,YACpC,OAAOZ;AAAA,YACP,cAAc;AAAA,UAAA,CACf,EAAA,CACH,EAAA,CACF,IACE;AAAA,QAAA,EAAA,CACN;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAL,GAAqB,cAAc;"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as C, isValidElement as P } from "react";
|
|
3
|
+
import { c as D } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as V } from "react-i18next";
|
|
5
|
+
import { A as y } from "./avatar-CkDeQOSI.js";
|
|
6
|
+
import { D as l } from "./description-list-C1RXMDZ_.js";
|
|
7
|
+
import { H as z } from "./hover-card-Bcku1GQu.js";
|
|
8
|
+
import { a as E } from "./workflow-status-xeaJTzD3.js";
|
|
9
|
+
import { C as H } from "./clock-Drd4Wtis.js";
|
|
10
|
+
import { V as I } from "./video-BheNGvsu.js";
|
|
11
|
+
import { A as S } from "./armchair-BaLDW6Hz.js";
|
|
12
|
+
import { E as j } from "./eye-off-C_4xkbRP.js";
|
|
13
|
+
import { a as L } from "./entity-card-I-Gio5wo.js";
|
|
14
|
+
const R = D(
|
|
15
|
+
"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]"
|
|
16
|
+
), T = C(
|
|
17
|
+
({
|
|
18
|
+
name: t,
|
|
19
|
+
avatarSrc: v,
|
|
20
|
+
time: h,
|
|
21
|
+
location: m,
|
|
22
|
+
telehealth: u = !1,
|
|
23
|
+
status: s,
|
|
24
|
+
statusLabel: x,
|
|
25
|
+
details: c,
|
|
26
|
+
flags: d,
|
|
27
|
+
privacy: r = !1,
|
|
28
|
+
className: k,
|
|
29
|
+
...N
|
|
30
|
+
}, g) => {
|
|
31
|
+
const { t: o } = V(), i = s ? L(s) : null, p = i == null ? void 0 : i.Icon, w = u ? I : S, f = !r, A = [
|
|
32
|
+
{ icon: /* @__PURE__ */ e(H, {}), label: o("appointmentPeek.time"), value: h },
|
|
33
|
+
...m ? [
|
|
34
|
+
{
|
|
35
|
+
icon: /* @__PURE__ */ e(w, {}),
|
|
36
|
+
label: o("appointmentPeek.location"),
|
|
37
|
+
value: m
|
|
38
|
+
}
|
|
39
|
+
] : [],
|
|
40
|
+
...f && c ? c.map((a) => ({
|
|
41
|
+
icon: P(a.icon) ? a.icon : null,
|
|
42
|
+
label: a.label,
|
|
43
|
+
value: a.value
|
|
44
|
+
})) : []
|
|
45
|
+
];
|
|
46
|
+
return /* @__PURE__ */ n(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
ref: g,
|
|
50
|
+
"data-component": "appointment-peek",
|
|
51
|
+
"data-status": s,
|
|
52
|
+
className: R({ className: k }),
|
|
53
|
+
...N,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ n("div", { className: "ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-sm)]", children: [
|
|
56
|
+
r ? null : /* @__PURE__ */ e(
|
|
57
|
+
y,
|
|
58
|
+
{
|
|
59
|
+
size: "sm",
|
|
60
|
+
name: t,
|
|
61
|
+
src: v,
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
className: "ds:shrink-0"
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ n("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
67
|
+
/* @__PURE__ */ e(z.Heading, { className: "ds:min-w-0", children: r ? /* @__PURE__ */ n("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
68
|
+
/* @__PURE__ */ e(
|
|
69
|
+
j,
|
|
70
|
+
{
|
|
71
|
+
"aria-hidden": "true",
|
|
72
|
+
className: "ds:size-4 ds:shrink-0"
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
o("appointmentPeek.hiddenName")
|
|
76
|
+
] }) : t }),
|
|
77
|
+
f && d ? /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: d }) : null
|
|
78
|
+
] })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ e(
|
|
81
|
+
l,
|
|
82
|
+
{
|
|
83
|
+
layout: "inline",
|
|
84
|
+
density: "compact",
|
|
85
|
+
divider: "none",
|
|
86
|
+
className: "ds:[--description-list-icon-color:var(--accent)]",
|
|
87
|
+
children: A.map((a, b) => /* @__PURE__ */ n(l.Row, { icon: a.icon, children: [
|
|
88
|
+
/* @__PURE__ */ e(l.Term, { children: a.label }),
|
|
89
|
+
/* @__PURE__ */ e(l.Detail, { children: a.value })
|
|
90
|
+
] }, b))
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
s && i && p ? /* @__PURE__ */ e("div", { "data-slot": "workflow", children: /* @__PURE__ */ e(
|
|
94
|
+
E,
|
|
95
|
+
{
|
|
96
|
+
size: "sm",
|
|
97
|
+
value: s,
|
|
98
|
+
option: {
|
|
99
|
+
value: s,
|
|
100
|
+
label: x ?? o(`appointmentCard.state.${s}`),
|
|
101
|
+
icon: /* @__PURE__ */ e(p, { "aria-hidden": "true" }),
|
|
102
|
+
tone: i.tone
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
) }) : null
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
T.displayName = "AppointmentPeek";
|
|
112
|
+
export {
|
|
113
|
+
T as A
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=appointment-peek-5S4O1VQP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment-peek-5S4O1VQP.js","sources":["../../src/components/appointment-peek/appointment-peek.tsx"],"sourcesContent":["import {\n forwardRef,\n isValidElement,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Armchair, Clock, EyeOff, Video } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar';\nimport { DescriptionList } from '../description-list';\nimport { HoverCard } from '../hover-card';\nimport { WorkflowStatusDisplay } from '../workflow-status';\nimport {\n appointmentStateWorkflow,\n type AppointmentState,\n} from '../_shared/entity-card';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentPeek */\n/* */\n/* The body of a calendar hover card: who, when, where, and the status */\n/* in the kit's one status face. Renders inside `HoverCard.Content`; its */\n/* name is a `HoverCard.Heading`, so the card takes its accessible name */\n/* from the patient without the host wiring it. */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]',\n);\n\nexport interface AppointmentPeekDetail {\n /** Leading glyph, decorative. */\n icon?: ReactNode;\n /** The term, already translated: \"Care\", \"Operator\". */\n label: string;\n value: ReactNode;\n}\n\nexport interface AppointmentPeekProps extends HTMLAttributes<HTMLDivElement> {\n /** Patient name, or the event title for an appointment with no patient. */\n name: string;\n /** Photo for the avatar; initials are drawn from `name` without one. */\n avatarSrc?: string;\n /** Host-formatted time range, e.g. \"09:30–11:00\". */\n time: string;\n /** Chair or room, already translated. With `telehealth`, the visit type. */\n location?: string;\n /** Swaps the chair glyph for a video camera. */\n telehealth?: boolean;\n /**\n * Appointment status, shown through `WorkflowStatusDisplay`. Leave it out\n * when the host has none recorded: no status is not the same as\n * confirmed, so the card shows no status face at all.\n */\n status?: AppointmentState;\n /**\n * Override the status caption, e.g. \"Arrived · waiting 12 min\". Still shown\n * under `privacy`, so keep it free of patient data. Ignored without\n * `status`.\n */\n statusLabel?: string;\n /** Extra rows after time and location: care, operator. */\n details?: AppointmentPeekDetail[];\n /** Indicator chips (Badges): booked online, anamnesis. Never status. */\n flags?: ReactNode;\n /**\n * Masks the name and drops everything personal: avatar, details and\n * flags. Time, place and status stay; they\n * are not patient data.\n */\n privacy?: boolean;\n}\n\nexport const AppointmentPeek = forwardRef<HTMLDivElement, AppointmentPeekProps>(\n (\n {\n name,\n avatarSrc,\n time,\n location,\n telehealth = false,\n status,\n statusLabel,\n details,\n flags,\n privacy = false,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const workflow = status ? appointmentStateWorkflow(status) : null;\n const StatusIcon = workflow?.Icon;\n\n const LocationIcon = telehealth ? Video : Armchair;\n const showClinical = !privacy;\n\n const rows: {\n icon: ReactElement | null;\n label: string;\n value: ReactNode;\n }[] = [\n { icon: <Clock />, label: t('appointmentPeek.time'), value: time },\n ...(location\n ? [\n {\n icon: <LocationIcon />,\n label: t('appointmentPeek.location'),\n value: location,\n },\n ]\n : []),\n ...(showClinical && details\n ? details.map((detail) => ({\n icon: isValidElement(detail.icon) ? detail.icon : null,\n label: detail.label,\n value: detail.value,\n }))\n : []),\n ];\n\n return (\n <div\n ref={ref}\n data-component=\"appointment-peek\"\n data-status={status}\n className={rootVariants({ className })}\n {...props}\n >\n {/* Avatar, name and the indicator chips together, every fact on its\n own row below, status last: the same identity block as\n PatientDetails. */}\n <div className=\"ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-sm)]\">\n {privacy ? null : (\n <Avatar\n size=\"sm\"\n name={name}\n src={avatarSrc}\n aria-hidden=\"true\"\n className=\"ds:shrink-0\"\n />\n )}\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <HoverCard.Heading className=\"ds:min-w-0\">\n {privacy ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <EyeOff\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0\"\n />\n {t('appointmentPeek.hiddenName')}\n </span>\n ) : (\n name\n )}\n </HoverCard.Heading>\n {showClinical && flags ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n {flags}\n </div>\n ) : null}\n </div>\n </div>\n\n <DescriptionList\n layout=\"inline\"\n density=\"compact\"\n divider=\"none\"\n // Label icons in the accent, as in PatientDetails.\n className=\"ds:[--description-list-icon-color:var(--accent)]\"\n >\n {rows.map((row, index) => (\n <DescriptionList.Row key={index} icon={row.icon}>\n <DescriptionList.Term>{row.label}</DescriptionList.Term>\n <DescriptionList.Detail>{row.value}</DescriptionList.Detail>\n </DescriptionList.Row>\n ))}\n </DescriptionList>\n\n {/* The kit's one status face: the same display the details panel,\n AppointmentCard and the history use, so a status never reads\n differently on the grid. Last, so the card reads who, what, then\n where it stands. Nothing at all when none is recorded. */}\n {status && workflow && StatusIcon ? (\n <div data-slot=\"workflow\">\n <WorkflowStatusDisplay\n size=\"sm\"\n value={status}\n option={{\n value: status,\n label: statusLabel ?? t(`appointmentCard.state.${status}`),\n icon: <StatusIcon aria-hidden=\"true\" />,\n tone: workflow.tone,\n }}\n />\n </div>\n ) : null}\n </div>\n );\n },\n);\nAppointmentPeek.displayName = 'AppointmentPeek';\n"],"names":["rootVariants","cva","AppointmentPeek","forwardRef","name","avatarSrc","time","location","telehealth","status","statusLabel","details","flags","privacy","className","props","ref","t","useTranslation","workflow","appointmentStateWorkflow","StatusIcon","LocationIcon","Video","Armchair","showClinical","rows","jsx","Clock","detail","isValidElement","jsxs","Avatar","HoverCard","EyeOff","DescriptionList","row","index","WorkflowStatusDisplay"],"mappings":";;;;;;;;;;;;;AA4BA,MAAMA,IAAeC;AA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E,yBAAyBR,CAAM,EAAE;AAAA,gBACzD,MAAM,gBAAAkB,EAACN,GAAA,EAAW,eAAY,OAAA,CAAO;AAAA,gBACrC,MAAMF,EAAS;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA,GAEJ,IACE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AACAjB,EAAgB,cAAc;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
id: "appointment-peek",
|
|
3
|
+
capabilities: [],
|
|
4
|
+
state: {},
|
|
5
|
+
actions: {},
|
|
6
|
+
domHooks: {
|
|
7
|
+
root: {
|
|
8
|
+
attr: "data-component",
|
|
9
|
+
value: "appointment-peek",
|
|
10
|
+
description: "Marks the element as a kit AppointmentPeek summary."
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
t as a
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=appointment-peek.agent-C539tNFM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment-peek.agent-C539tNFM.js","sources":["../../src/components/appointment-peek/appointment-peek.agent.ts"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentPeek. */\n/* */\n/* Read-only appointment summary inside a hover card. Pure presentation */\n/* — registers the canonical DOM hook only. The status it shows is */\n/* changed in the details panel, never here. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\n\nexport const appointmentPeekAgent: AgentAdapter = {\n id: 'appointment-peek',\n capabilities: [],\n state: {},\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-peek',\n description: 'Marks the element as a kit AppointmentPeek summary.',\n },\n },\n};\n"],"names":["appointmentPeekAgent"],"mappings":"AAUO,MAAMA,IAAqC;AAAA,EAChD,IAAI;AAAA,EACJ,cAAc,CAAA;AAAA,EACd,OAAO,CAAA;AAAA,EACP,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;"}
|
|
@@ -7,7 +7,7 @@ import { B as P } from "./button-nJaPh_HC.js";
|
|
|
7
7
|
import { B as ze } from "./button-group-QmN1VdUW.js";
|
|
8
8
|
import { D as Ae } from "./date-picker-6tFnKFty.js";
|
|
9
9
|
import { P as Be } from "./panel-header-D_mTdhUp.js";
|
|
10
|
-
import { S as Ke } from "./skeleton-
|
|
10
|
+
import { S as Ke } from "./skeleton-B1KTdJ4N.js";
|
|
11
11
|
import { E as Ee } from "./empty-state-X0sVPfVo.js";
|
|
12
12
|
import { u as ae } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
13
13
|
import { u as Ye } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
@@ -446,4 +446,4 @@ export {
|
|
|
446
446
|
Ue as A,
|
|
447
447
|
Ve as a
|
|
448
448
|
};
|
|
449
|
-
//# sourceMappingURL=appointment-timeline-
|
|
449
|
+
//# sourceMappingURL=appointment-timeline-D-rNwKpS.js.map
|