@alfadocs/ui-kit-debug 1.35.0 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{actions-cell-renderer-yy03OgRL.js → actions-cell-renderer-CUn1pqEq.js} +3 -3
- package/dist/_chunks/{actions-cell-renderer-yy03OgRL.js.map → actions-cell-renderer-CUn1pqEq.js.map} +1 -1
- package/dist/_chunks/{agenda-card-DVz3jwTf.js → agenda-card-DyQtHb9z.js} +2 -2
- package/dist/_chunks/{agenda-card-DVz3jwTf.js.map → agenda-card-DyQtHb9z.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-1oDWCJdB.js → agenda-tray-DYGCTIWB.js} +3 -3
- package/dist/_chunks/{agenda-tray-1oDWCJdB.js.map → agenda-tray-DYGCTIWB.js.map} +1 -1
- package/dist/_chunks/{ai-consent-banner-OggpS5hW.js → ai-consent-banner-De4gzSBZ.js} +4 -4
- package/dist/_chunks/{ai-consent-banner-OggpS5hW.js.map → ai-consent-banner-De4gzSBZ.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-Dt7tpCBh.js → ai-prompt-input-DdxlaI7q.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-Dt7tpCBh.js.map → ai-prompt-input-DdxlaI7q.js.map} +1 -1
- package/dist/_chunks/{alert-CiJT540z.js → alert-CiQ5Pa3Q.js} +2 -2
- package/dist/_chunks/{alert-CiJT540z.js.map → alert-CiQ5Pa3Q.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-D18kp3p9.js → alia-sidebar-B6bXlZZk.js} +6 -6
- package/dist/_chunks/{alia-sidebar-D18kp3p9.js.map → alia-sidebar-B6bXlZZk.js.map} +1 -1
- package/dist/_chunks/{anamnesis-card-NTi4LLzI.js → anamnesis-card-DGwINeNn.js} +3 -3
- package/dist/_chunks/{anamnesis-card-NTi4LLzI.js.map → anamnesis-card-DGwINeNn.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-card-DGVKBQoq.js → anamnesis-summary-card-GYHa7VGp.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-card-DGVKBQoq.js.map → anamnesis-summary-card-GYHa7VGp.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-BYgyp_i2.js → anamnesis-summary-rows-Cxtgo2ok.js} +12 -12
- package/dist/_chunks/{anamnesis-summary-rows-BYgyp_i2.js.map → anamnesis-summary-rows-Cxtgo2ok.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-sXfIp5lp.js → antenatal-schedule-timeline-CXk_tzWG.js} +2 -2
- package/dist/_chunks/{antenatal-schedule-timeline-sXfIp5lp.js.map → antenatal-schedule-timeline-CXk_tzWG.js.map} +1 -1
- package/dist/_chunks/{appointment-card-Bh_CIlc6.js → appointment-card-WsDGBBut.js} +120 -126
- package/dist/_chunks/appointment-card-WsDGBBut.js.map +1 -0
- package/dist/_chunks/{appointment-timeline-De-Wqdkw.js → appointment-timeline-ByfovxqR.js} +5 -5
- package/dist/_chunks/{appointment-timeline-De-Wqdkw.js.map → appointment-timeline-ByfovxqR.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-4I9wTAi4.js → appointment-tray-D6UyJHej.js} +3 -3
- package/dist/_chunks/{appointment-tray-4I9wTAi4.js.map → appointment-tray-D6UyJHej.js.map} +1 -1
- package/dist/_chunks/arrow-right-KsIrLdt0.js +15 -0
- package/dist/_chunks/arrow-right-KsIrLdt0.js.map +1 -0
- package/dist/_chunks/{audio-recorder-11wClczr.js → audio-recorder-BlQBC7N_.js} +3 -3
- package/dist/_chunks/{audio-recorder-11wClczr.js.map → audio-recorder-BlQBC7N_.js.map} +1 -1
- package/dist/_chunks/{badge-sTusUqZD.js → badge-BudgzTe_.js} +2 -2
- package/dist/_chunks/{badge-sTusUqZD.js.map → badge-BudgzTe_.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-DhBtFRoW.js → balance-badge-cell-B0Z8Dwn8.js} +6 -6
- package/dist/_chunks/{balance-badge-cell-DhBtFRoW.js.map → balance-badge-cell-B0Z8Dwn8.js.map} +1 -1
- package/dist/_chunks/{bishop-score-CAl7C5hm.js → bishop-score-D5b8tktp.js} +2 -2
- package/dist/_chunks/{bishop-score-CAl7C5hm.js.map → bishop-score-D5b8tktp.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-Dwkih9a4.js → bmi-calculator-dOKP-vW4.js} +4 -4
- package/dist/_chunks/{bmi-calculator-Dwkih9a4.js.map → bmi-calculator-dOKP-vW4.js.map} +1 -1
- package/dist/_chunks/{booking-BqkEtsKx.js → booking-Dp-9qR6F.js} +9 -9
- package/dist/_chunks/{booking-BqkEtsKx.js.map → booking-Dp-9qR6F.js.map} +1 -1
- package/dist/_chunks/button-group-QmN1VdUW.js +307 -0
- package/dist/_chunks/button-group-QmN1VdUW.js.map +1 -0
- package/dist/_chunks/{calendar-Dgvl5L4T.js → calendar-7GAUlsNO.js} +3 -3
- package/dist/_chunks/{calendar-Dgvl5L4T.js.map → calendar-7GAUlsNO.js.map} +1 -1
- package/dist/_chunks/{calendar-event-card-DSh-69HT.js → calendar-event-card-DKUnT9Be.js} +91 -134
- package/dist/_chunks/calendar-event-card-DKUnT9Be.js.map +1 -0
- package/dist/_chunks/{calendar-workspace-UywR5gUl.js → calendar-workspace-Duv_5B4j.js} +2494 -2415
- package/dist/_chunks/calendar-workspace-Duv_5B4j.js.map +1 -0
- package/dist/_chunks/{care-plan-card-DHVhBcvs.js → care-plan-card-COFOI-fI.js} +5 -5
- package/dist/_chunks/{care-plan-card-DHVhBcvs.js.map → care-plan-card-COFOI-fI.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-Dx6IdTcR.js → care-plan-entry-card-BOKn0KW-.js} +6 -6
- package/dist/_chunks/{care-plan-entry-card-Dx6IdTcR.js.map → care-plan-entry-card-BOKn0KW-.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-UTX5ZD74.js → care-plan-header-CbuOuVBw.js} +4 -4
- package/dist/_chunks/{care-plan-header-UTX5ZD74.js.map → care-plan-header-CbuOuVBw.js.map} +1 -1
- package/dist/_chunks/{carousel.agent-CLxdHEBP.js → carousel.agent-Dv4a4M8L.js} +2 -2
- package/dist/_chunks/{carousel.agent-CLxdHEBP.js.map → carousel.agent-Dv4a4M8L.js.map} +1 -1
- package/dist/_chunks/{chart-C6eHTxkO.js → chart-iWl76PXv.js} +3 -3
- package/dist/_chunks/{chart-C6eHTxkO.js.map → chart-iWl76PXv.js.map} +1 -1
- package/dist/_chunks/{chat-input-BsB5Umpj.js → chat-input-qM5QpUSq.js} +2 -2
- package/dist/_chunks/{chat-input-BsB5Umpj.js.map → chat-input-qM5QpUSq.js.map} +1 -1
- package/dist/_chunks/{chat-message-C-8UU2av.js → chat-message-RniXtrCH.js} +2 -2
- package/dist/_chunks/{chat-message-C-8UU2av.js.map → chat-message-RniXtrCH.js.map} +1 -1
- package/dist/_chunks/{checkbox-BuZ1u__2.js → checkbox-CZkipDn7.js} +2 -2
- package/dist/_chunks/{checkbox-BuZ1u__2.js.map → checkbox-CZkipDn7.js.map} +1 -1
- package/dist/_chunks/{checkbox-group-CfqMv57d.js → checkbox-group-DomUzpkF.js} +2 -2
- package/dist/_chunks/{checkbox-group-CfqMv57d.js.map → checkbox-group-DomUzpkF.js.map} +1 -1
- package/dist/_chunks/clinical-note-card-DdsGYMmI.js +325 -0
- package/dist/_chunks/clinical-note-card-DdsGYMmI.js.map +1 -0
- package/dist/_chunks/{code-block-BIkpRLkl.js → code-block-uVjNSI9g.js} +2 -2
- package/dist/_chunks/{code-block-BIkpRLkl.js.map → code-block-uVjNSI9g.js.map} +1 -1
- package/dist/_chunks/{connection-status-DRZIcMqM.js → connection-status-OEsWjmRk.js} +3 -3
- package/dist/_chunks/{connection-status-DRZIcMqM.js.map → connection-status-OEsWjmRk.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-DSI9uumA.js → contact-profile-card--My1H2UD.js} +3 -3
- package/dist/_chunks/{contact-profile-card-DSI9uumA.js.map → contact-profile-card--My1H2UD.js.map} +1 -1
- package/dist/_chunks/{control-room-rail-5MbhjsxN.js → control-room-rail-Ds45_g4f.js} +4 -4
- package/dist/_chunks/{control-room-rail-5MbhjsxN.js.map → control-room-rail-Ds45_g4f.js.map} +1 -1
- package/dist/_chunks/{counter-dRlTNC_y.js → counter-WsvRuum1.js} +50 -15
- package/dist/_chunks/counter-WsvRuum1.js.map +1 -0
- package/dist/_chunks/{cycle-calculator-DVgxBfP0.js → cycle-calculator-BJeaXiZv.js} +3 -3
- package/dist/_chunks/{cycle-calculator-DVgxBfP0.js.map → cycle-calculator-BJeaXiZv.js.map} +1 -1
- package/dist/_chunks/{dashboard-grid-BFtdHqfn.js → dashboard-grid-B23BFzRl.js} +2 -2
- package/dist/_chunks/{dashboard-grid-BFtdHqfn.js.map → dashboard-grid-B23BFzRl.js.map} +1 -1
- package/dist/_chunks/{data-table-DC96JJIq.js → data-table-BYGK-gUJ.js} +6 -6
- package/dist/_chunks/{data-table-DC96JJIq.js.map → data-table-BYGK-gUJ.js.map} +1 -1
- package/dist/_chunks/{data-table-tabs-DVIFkqx_.js → data-table-tabs-BMR0zsVQ.js} +3 -3
- package/dist/_chunks/{data-table-tabs-DVIFkqx_.js.map → data-table-tabs-BMR0zsVQ.js.map} +1 -1
- package/dist/_chunks/{date-picker-B6NW_PS5.js → date-picker-6tFnKFty.js} +14 -14
- package/dist/_chunks/{date-picker-B6NW_PS5.js.map → date-picker-6tFnKFty.js.map} +1 -1
- package/dist/_chunks/{dependent-selector-yTKKsuc9.js → dependent-selector-BHDP0nBB.js} +3 -3
- package/dist/_chunks/{dependent-selector-yTKKsuc9.js.map → dependent-selector-BHDP0nBB.js.map} +1 -1
- package/dist/_chunks/{description-list-CjJqR8WK.js → description-list-C1RXMDZ_.js} +2 -2
- package/dist/_chunks/{description-list-CjJqR8WK.js.map → description-list-C1RXMDZ_.js.map} +1 -1
- package/dist/_chunks/{document-preview-BrhMHNh8.js → document-preview-DsEyRcNd.js} +4 -4
- package/dist/_chunks/{document-preview-BrhMHNh8.js.map → document-preview-DsEyRcNd.js.map} +1 -1
- package/dist/_chunks/{document-scanner-C5Vrbu21.js → document-scanner-CbWVtm7u.js} +53 -52
- package/dist/_chunks/{document-scanner-C5Vrbu21.js.map → document-scanner-CbWVtm7u.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-CxgK8vzt.js → due-date-calculator-Dhc9Ljkb.js} +6 -6
- package/dist/_chunks/{due-date-calculator-CxgK8vzt.js.map → due-date-calculator-Dhc9Ljkb.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-B7TVZ5ZJ.js → editable-currency-cell-renderer-D7blbDFY.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-B7TVZ5ZJ.js.map → editable-currency-cell-renderer-D7blbDFY.js.map} +1 -1
- package/dist/_chunks/{editor-overlay-DEc5yYwo.js → editor-overlay-8fKAcRsm.js} +2 -2
- package/dist/_chunks/{editor-overlay-DEc5yYwo.js.map → editor-overlay-8fKAcRsm.js.map} +1 -1
- package/dist/_chunks/{entity-card-9_62gY7l.js → entity-card-I-Gio5wo.js} +36 -32
- package/dist/_chunks/entity-card-I-Gio5wo.js.map +1 -0
- package/dist/_chunks/{entity-summary-5o768XLU.js → entity-summary-BbW0mIzU.js} +4 -4
- package/dist/_chunks/{entity-summary-5o768XLU.js.map → entity-summary-BbW0mIzU.js.map} +1 -1
- package/dist/_chunks/{face-scheme-l-CQyLs-.js → face-scheme-uFvhqz6h.js} +4 -4
- package/dist/_chunks/{face-scheme-l-CQyLs-.js.map → face-scheme-uFvhqz6h.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-Dqy0T1fP.js → fetal-weight-C6SxchOv.js} +2 -2
- package/dist/_chunks/{fetal-weight-Dqy0T1fP.js.map → fetal-weight-C6SxchOv.js.map} +1 -1
- package/dist/_chunks/{field-array-BjkXZzSr.js → field-array-C9dmRaIM.js} +2 -2
- package/dist/_chunks/{field-array-BjkXZzSr.js.map → field-array-C9dmRaIM.js.map} +1 -1
- package/dist/_chunks/{file-manager-CI2Qn8qW.js → file-manager-DvkFgj7d.js} +7 -7
- package/dist/_chunks/{file-manager-CI2Qn8qW.js.map → file-manager-DvkFgj7d.js.map} +1 -1
- package/dist/_chunks/{file-upload-CwxdqkMK.js → file-upload-BDpb08GM.js} +71 -78
- package/dist/_chunks/file-upload-BDpb08GM.js.map +1 -0
- package/dist/_chunks/{fiscal-code-input-B_nYMSEM.js → fiscal-code-input-CkwIdB1y.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-B_nYMSEM.js.map → fiscal-code-input-CkwIdB1y.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-DrXzYfv-.js → freemium-paywall-BqGk_SBU.js} +2 -2
- package/dist/_chunks/{freemium-paywall-DrXzYfv-.js.map → freemium-paywall-BqGk_SBU.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-CZHVrERT.js → gestational-age-calculator-DDOGaPvg.js} +6 -6
- package/dist/_chunks/{gestational-age-calculator-CZHVrERT.js.map → gestational-age-calculator-DDOGaPvg.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-C2fQxfXd.js → hcg-doubling-Bb_n6tEa.js} +2 -2
- package/dist/_chunks/{hcg-doubling-C2fQxfXd.js.map → hcg-doubling-Bb_n6tEa.js.map} +1 -1
- package/dist/_chunks/{header-DUXRIPyM.js → header-BZ4pZlJV.js} +2 -2
- package/dist/_chunks/{header-DUXRIPyM.js.map → header-BZ4pZlJV.js.map} +1 -1
- package/dist/_chunks/{header-settings-DvjZNMhD.js → header-settings-B8mLc03Q.js} +4 -4
- package/dist/_chunks/{header-settings-DvjZNMhD.js.map → header-settings-B8mLc03Q.js.map} +1 -1
- package/dist/_chunks/hover-card-Bcku1GQu.js +511 -0
- package/dist/_chunks/hover-card-Bcku1GQu.js.map +1 -0
- package/dist/_chunks/{icon-button-DA2CAGHZ.js → icon-button-8xqRnkdG.js} +2 -2
- package/dist/_chunks/{icon-button-DA2CAGHZ.js.map → icon-button-8xqRnkdG.js.map} +1 -1
- package/dist/_chunks/{icon-button-group-VCCod3Hz.js → icon-button-group-Dj6CRoYR.js} +2 -2
- package/dist/_chunks/{icon-button-group-VCCod3Hz.js.map → icon-button-group-Dj6CRoYR.js.map} +1 -1
- package/dist/_chunks/{icon-picker-DOa89vn3.js → icon-picker-CTWzlHJr.js} +2 -2
- package/dist/_chunks/{icon-picker-DOa89vn3.js.map → icon-picker-CTWzlHJr.js.map} +1 -1
- package/dist/_chunks/{info-tip-CADik6WN.js → info-tip-ey_Pon2y.js} +2 -2
- package/dist/_chunks/{info-tip-CADik6WN.js.map → info-tip-ey_Pon2y.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-BIBdZBLg.js → key-value-pair-DczGb4yz.js} +42 -41
- package/dist/_chunks/key-value-pair-DczGb4yz.js.map +1 -0
- package/dist/_chunks/{link-cell-renderer-BEpMNtAa.js → link-cell-renderer-BNa8x6oJ.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-BEpMNtAa.js.map → link-cell-renderer-BNa8x6oJ.js.map} +1 -1
- package/dist/_chunks/loader-circle-BECIU_8N.js +12 -0
- package/dist/_chunks/loader-circle-BECIU_8N.js.map +1 -0
- package/dist/_chunks/{locale-picker-CwFtqSkt.js → locale-picker-BLeHbFSc.js} +3 -3
- package/dist/_chunks/{locale-picker-CwFtqSkt.js.map → locale-picker-BLeHbFSc.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-CK_ND8Tr.js → marketplace-app-shell-BwH6Aruw.js} +6 -6
- package/dist/_chunks/{marketplace-app-shell-CK_ND8Tr.js.map → marketplace-app-shell-BwH6Aruw.js.map} +1 -1
- package/dist/_chunks/{message-card-BUMv16un.js → message-card-Dm5Xshup.js} +2 -2
- package/dist/_chunks/{message-card-BUMv16un.js.map → message-card-Dm5Xshup.js.map} +1 -1
- package/dist/_chunks/{message-tray-0zsv27xX.js → message-tray-BcLyaO-G.js} +3 -3
- package/dist/_chunks/{message-tray-0zsv27xX.js.map → message-tray-BcLyaO-G.js.map} +1 -1
- package/dist/_chunks/{multi-select-DYOvx2SJ.js → multi-select-CtPd7g4x.js} +15 -15
- package/dist/_chunks/{multi-select-DYOvx2SJ.js.map → multi-select-CtPd7g4x.js.map} +1 -1
- package/dist/_chunks/note-attachment-CwDir3kK.js +124 -0
- package/dist/_chunks/note-attachment-CwDir3kK.js.map +1 -0
- package/dist/_chunks/note-timeline-CXfSV3yX.js +231 -0
- package/dist/_chunks/note-timeline-CXfSV3yX.js.map +1 -0
- package/dist/_chunks/{notes-panel-BjLt-kiP.js → notes-panel-Co8D3uDd.js} +7 -7
- package/dist/_chunks/{notes-panel-BjLt-kiP.js.map → notes-panel-Co8D3uDd.js.map} +1 -1
- package/dist/_chunks/{notification-card-CtrzoTUO.js → notification-card-ChcK9Wat.js} +2 -2
- package/dist/_chunks/{notification-card-CtrzoTUO.js.map → notification-card-ChcK9Wat.js.map} +1 -1
- package/dist/_chunks/{notification-tray-BiRzXHDf.js → notification-tray-CJ8jOe-U.js} +4 -4
- package/dist/_chunks/{notification-tray-BiRzXHDf.js.map → notification-tray-CJ8jOe-U.js.map} +1 -1
- package/dist/_chunks/{operator-hero-aG_qyn6g.js → operator-hero-XIdwDmN2.js} +3 -3
- package/dist/_chunks/{operator-hero-aG_qyn6g.js.map → operator-hero-XIdwDmN2.js.map} +1 -1
- package/dist/_chunks/{optical-prescription-DUJOhKz_.js → optical-prescription-cphK41eP.js} +2 -2
- package/dist/_chunks/{optical-prescription-DUJOhKz_.js.map → optical-prescription-cphK41eP.js.map} +1 -1
- package/dist/_chunks/panel-header-D_mTdhUp.js +128 -0
- package/dist/_chunks/panel-header-D_mTdhUp.js.map +1 -0
- package/dist/_chunks/patient-details-f7SSXkTJ.js +371 -0
- package/dist/_chunks/patient-details-f7SSXkTJ.js.map +1 -0
- package/dist/_chunks/patient-field-row-BQZoP4m2.js +787 -0
- package/dist/_chunks/patient-field-row-BQZoP4m2.js.map +1 -0
- package/dist/_chunks/{patient-search-HeEUB-_X.js → patient-search-D08b6jgj.js} +2 -2
- package/dist/_chunks/{patient-search-HeEUB-_X.js.map → patient-search-D08b6jgj.js.map} +1 -1
- package/dist/_chunks/patient-summary-card-Bz7KdUin.js +533 -0
- package/dist/_chunks/patient-summary-card-Bz7KdUin.js.map +1 -0
- package/dist/_chunks/{payment-automation-upsell-DwQW2fRp.js → payment-automation-upsell-BLTdE2em.js} +50 -59
- package/dist/_chunks/payment-automation-upsell-BLTdE2em.js.map +1 -0
- package/dist/_chunks/{payment-form-Ds1I9KqB.js → payment-form-BHMDqW9C.js} +2 -2
- package/dist/_chunks/{payment-form-Ds1I9KqB.js.map → payment-form-BHMDqW9C.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-DvEsWEkC.js → payment-request-card-BxcdvxKR.js} +6 -6
- package/dist/_chunks/{payment-request-card-DvEsWEkC.js.map → payment-request-card-BxcdvxKR.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer-DUIsV9s5.js → pdf-viewer-DUKdn5iq.js} +2 -2
- package/dist/_chunks/{pdf-viewer-DUIsV9s5.js.map → pdf-viewer-DUKdn5iq.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-B9fphroR.js → periodontal-chart-BF_e3wZp.js} +2 -2
- package/dist/_chunks/{periodontal-chart-B9fphroR.js.map → periodontal-chart-BF_e3wZp.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-qEZPXj83.js → periodontal-chart-card-BJEuJuzh.js} +3 -3
- package/dist/_chunks/{periodontal-chart-card-qEZPXj83.js.map → periodontal-chart-card-BJEuJuzh.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-lEwA8wqX.js → periodontal-diagnosis-C7pfPOct.js} +5 -5
- package/dist/_chunks/{periodontal-diagnosis-lEwA8wqX.js.map → periodontal-diagnosis-C7pfPOct.js.map} +1 -1
- package/dist/_chunks/{periodontal-risk-chart-0x7KVZjL.js → periodontal-risk-chart-B2tNFa15.js} +2 -2
- package/dist/_chunks/{periodontal-risk-chart-0x7KVZjL.js.map → periodontal-risk-chart-B2tNFa15.js.map} +1 -1
- package/dist/_chunks/{permission-matrix-BIJrGEmz.js → permission-matrix-VdAXjjHU.js} +3 -3
- package/dist/_chunks/{permission-matrix-BIJrGEmz.js.map → permission-matrix-VdAXjjHU.js.map} +1 -1
- package/dist/_chunks/{popover-DP6WCVwm.js → popover-DzR5QYxp.js} +24 -24
- package/dist/_chunks/{popover-DP6WCVwm.js.map → popover-DzR5QYxp.js.map} +1 -1
- package/dist/_chunks/{practice-profile-hero-DQyDvpJL.js → practice-profile-hero-DxoLlQr5.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-DQyDvpJL.js.map → practice-profile-hero-DxoLlQr5.js.map} +1 -1
- package/dist/_chunks/{practice-results-kayDEorM.js → practice-results-DOcORTkP.js} +4 -4
- package/dist/_chunks/{practice-results-kayDEorM.js.map → practice-results-DOcORTkP.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-n5j5dAKy.js → pregnancy-dating-nV1_S6w0.js} +6 -6
- package/dist/_chunks/{pregnancy-dating-n5j5dAKy.js.map → pregnancy-dating-nV1_S6w0.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-D5A8vPjj.js → pregnancy-weight-gain-tRecShAD.js} +4 -4
- package/dist/_chunks/{pregnancy-weight-gain-D5A8vPjj.js.map → pregnancy-weight-gain-tRecShAD.js.map} +1 -1
- package/dist/_chunks/{privacy-lock-CkAUo6Dz.js → privacy-lock-Be39vQUN.js} +2 -2
- package/dist/_chunks/{privacy-lock-CkAUo6Dz.js.map → privacy-lock-Be39vQUN.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-BScCotGD.js → product-hub-panel-C0TO69P7.js} +2 -2
- package/dist/_chunks/{product-hub-panel-BScCotGD.js.map → product-hub-panel-C0TO69P7.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-kth2SdXn.js → public-header.agent-Bl1KFwSE.js} +3 -3
- package/dist/_chunks/{public-header.agent-kth2SdXn.js.map → public-header.agent-Bl1KFwSE.js.map} +1 -1
- package/dist/_chunks/{radio-DNRe6H_8.js → radio-6fml-pWk.js} +2 -2
- package/dist/_chunks/{radio-DNRe6H_8.js.map → radio-6fml-pWk.js.map} +1 -1
- package/dist/_chunks/{radio-group-DyVBgnA3.js → radio-group-CIjmyioi.js} +3 -3
- package/dist/_chunks/{radio-group-DyVBgnA3.js.map → radio-group-CIjmyioi.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-o4jwEJPC.js → radiograph-panel.agent-k0G7JuoM.js} +6 -6
- package/dist/_chunks/{radiograph-panel.agent-o4jwEJPC.js.map → radiograph-panel.agent-k0G7JuoM.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-BKHEfqVQ.js → reviews-panel-BaHZb_ai.js} +3 -3
- package/dist/_chunks/{reviews-panel-BKHEfqVQ.js.map → reviews-panel-BaHZb_ai.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-CCI-Y3DN.js → rich-text-editor-BTXlorm5.js} +7 -7
- package/dist/_chunks/{rich-text-editor-CCI-Y3DN.js.map → rich-text-editor-BTXlorm5.js.map} +1 -1
- package/dist/_chunks/{search-bar-CJj6sI9m.js → search-bar-CCmViqaa.js} +46 -46
- package/dist/_chunks/{search-bar-CJj6sI9m.js.map → search-bar-CCmViqaa.js.map} +1 -1
- package/dist/_chunks/section-card.agent-W18CHEgX.js +74 -0
- package/dist/_chunks/section-card.agent-W18CHEgX.js.map +1 -0
- package/dist/_chunks/{sheet-BSznOyJs.js → sheet-hm04DGFd.js} +2 -2
- package/dist/_chunks/{sheet-BSznOyJs.js.map → sheet-hm04DGFd.js.map} +1 -1
- package/dist/_chunks/{sign-document-jF4fZDJ5.js → sign-document-CRQuAn4W.js} +2 -2
- package/dist/_chunks/{sign-document-jF4fZDJ5.js.map → sign-document-CRQuAn4W.js.map} +1 -1
- package/dist/_chunks/{signature-request-vihDT8On.js → signature-request-Dej2g86d.js} +5 -5
- package/dist/_chunks/{signature-request-vihDT8On.js.map → signature-request-Dej2g86d.js.map} +1 -1
- package/dist/_chunks/{signature-status-chip-T5fyS-k9.js → signature-status-chip-D4NsrdeI.js} +3 -3
- package/dist/_chunks/{signature-status-chip-T5fyS-k9.js.map → signature-status-chip-D4NsrdeI.js.map} +1 -1
- package/dist/_chunks/{slot-grid-BuZOKfcd.js → slot-grid-8Ko6thzz.js} +2 -2
- package/dist/_chunks/{slot-grid-BuZOKfcd.js.map → slot-grid-8Ko6thzz.js.map} +1 -1
- package/dist/_chunks/{streaming-text-CvsjIQ7S.js → streaming-text-DjFqLSt_.js} +2 -2
- package/dist/_chunks/{streaming-text-CvsjIQ7S.js.map → streaming-text-DjFqLSt_.js.map} +1 -1
- package/dist/_chunks/{tab-bar-DvFJIQfL.js → tab-bar-rDkLiaA6.js} +2 -2
- package/dist/_chunks/{tab-bar-DvFJIQfL.js.map → tab-bar-rDkLiaA6.js.map} +1 -1
- package/dist/_chunks/{tag-3wgkwwDB.js → tag-Ci3xJPcH.js} +2 -2
- package/dist/_chunks/{tag-3wgkwwDB.js.map → tag-Ci3xJPcH.js.map} +1 -1
- package/dist/_chunks/{task-tray-COo-RlDv.js → task-tray-wl9eti6J.js} +2 -2
- package/dist/_chunks/{task-tray-COo-RlDv.js.map → task-tray-wl9eti6J.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-DLKpSNoE.js → tasks-panel-BDNB7hsZ.js} +5 -5
- package/dist/_chunks/{tasks-panel-DLKpSNoE.js.map → tasks-panel-BDNB7hsZ.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-uEwoKjl3.js → theme-toggle-CMz8YfC1.js} +3 -3
- package/dist/_chunks/{theme-toggle-uEwoKjl3.js.map → theme-toggle-CMz8YfC1.js.map} +1 -1
- package/dist/_chunks/{timeline-Bs9Erxlo.js → timeline-61AihzYz.js} +47 -47
- package/dist/_chunks/timeline-61AihzYz.js.map +1 -0
- package/dist/_chunks/{toast-YZz2sBzB.js → toast-8jqtbfAB.js} +2 -2
- package/dist/_chunks/{toast-YZz2sBzB.js.map → toast-8jqtbfAB.js.map} +1 -1
- package/dist/_chunks/{tool-rail-ONaV-Nzz.js → tool-rail-Bq5eiFMG.js} +3 -3
- package/dist/_chunks/{tool-rail-ONaV-Nzz.js.map → tool-rail-Bq5eiFMG.js.map} +1 -1
- package/dist/_chunks/{tooltip-DvmfrNvB.js → tooltip-Cp-PLePW.js} +41 -41
- package/dist/_chunks/tooltip-Cp-PLePW.js.map +1 -0
- package/dist/_chunks/{tooth-scheme-Qe7LO5Di.js → tooth-scheme-BWkYxxjR.js} +3 -3
- package/dist/_chunks/{tooth-scheme-Qe7LO5Di.js.map → tooth-scheme-BWkYxxjR.js.map} +1 -1
- package/dist/_chunks/{transaction-chip-DJCstquX.js → transaction-chip-Dth1nThY.js} +49 -48
- package/dist/_chunks/{transaction-chip-DJCstquX.js.map → transaction-chip-Dth1nThY.js.map} +1 -1
- package/dist/_chunks/{transcript-panel-BGkEhvHO.js → transcript-panel-u2HHxZB6.js} +2 -2
- package/dist/_chunks/{transcript-panel-BGkEhvHO.js.map → transcript-panel-u2HHxZB6.js.map} +1 -1
- package/dist/_chunks/user-x-DYszNtIg.js +45 -0
- package/dist/_chunks/user-x-DYszNtIg.js.map +1 -0
- package/dist/_chunks/{warning-stack-DQz0Jyir.js → warning-stack-BW5Dwb3z.js} +3 -3
- package/dist/_chunks/{warning-stack-DQz0Jyir.js.map → warning-stack-BW5Dwb3z.js.map} +1 -1
- package/dist/_chunks/{widget-picker-DvUkBemi.js → widget-picker-B1sj6uyf.js} +2 -2
- package/dist/_chunks/{widget-picker-DvUkBemi.js.map → widget-picker-B1sj6uyf.js.map} +1 -1
- package/dist/_chunks/{workflow-map-dNzJjBWG.js → workflow-map-D-LEni11.js} +5 -5
- package/dist/_chunks/{workflow-map-dNzJjBWG.js.map → workflow-map-D-LEni11.js.map} +1 -1
- package/dist/_chunks/workflow-status-xeaJTzD3.js +476 -0
- package/dist/_chunks/workflow-status-xeaJTzD3.js.map +1 -0
- package/dist/agent-catalog.json +185 -1
- package/dist/agent-i18n/en.json +27 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts +44 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts.map +1 -1
- package/dist/components/_shared/entity-card/index.d.ts +1 -1
- package/dist/components/_shared/entity-card/index.d.ts.map +1 -1
- package/dist/components/_shared/note-attachment.d.ts +41 -0
- package/dist/components/_shared/note-attachment.d.ts.map +1 -0
- package/dist/components/_shared/note-markdown.d.ts +3 -0
- package/dist/components/_shared/note-markdown.d.ts.map +1 -0
- package/dist/components/_shared/patient-field-row.d.ts +40 -0
- package/dist/components/_shared/patient-field-row.d.ts.map +1 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts.map +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/button-group.d.ts +20 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +2 -34
- package/dist/components/clinical-note-card/clinical-note-card.d.ts.map +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/counter/counter.d.ts +6 -0
- package/dist/components/counter/counter.d.ts.map +1 -1
- package/dist/components/counter/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/hover-card/hover-card.agent.d.ts +4 -0
- package/dist/components/hover-card/hover-card.agent.d.ts.map +1 -0
- package/dist/components/hover-card/hover-card.d.ts +80 -0
- package/dist/components/hover-card/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card/index.d.ts +4 -0
- package/dist/components/hover-card/index.d.ts.map +1 -0
- package/dist/components/hover-card/index.js +6 -0
- package/dist/components/hover-card/index.js.map +1 -0
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/key-value-pair/key-value-pair.d.ts +8 -1
- package/dist/components/key-value-pair/key-value-pair.d.ts.map +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/note-timeline/index.d.ts +4 -0
- package/dist/components/note-timeline/index.d.ts.map +1 -0
- package/dist/components/note-timeline/index.js +6 -0
- package/dist/components/note-timeline/index.js.map +1 -0
- package/dist/components/note-timeline/note-timeline.agent.d.ts +4 -0
- package/dist/components/note-timeline/note-timeline.agent.d.ts.map +1 -0
- package/dist/components/note-timeline/note-timeline.d.ts +77 -0
- package/dist/components/note-timeline/note-timeline.d.ts.map +1 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/panel-header/index.js +1 -1
- package/dist/components/panel-header/panel-header.d.ts +7 -0
- package/dist/components/panel-header/panel-header.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-details/patient-details.d.ts.map +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +54 -0
- package/dist/components/patient-summary-card/patient-summary-card.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/section-card/index.d.ts +4 -0
- package/dist/components/section-card/index.d.ts.map +1 -0
- package/dist/components/section-card/index.js +6 -0
- package/dist/components/section-card/index.js.map +1 -0
- package/dist/components/section-card/section-card.agent.d.ts +3 -0
- package/dist/components/section-card/section-card.agent.d.ts.map +1 -0
- package/dist/components/section-card/section-card.d.ts +30 -0
- package/dist/components/section-card/section-card.d.ts.map +1 -0
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tag/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/theme-toggle/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/timeline/timeline.d.ts +1 -1
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +11 -0
- package/dist/components/transaction-chip/transaction-chip.d.ts.map +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow-status/index.d.ts +4 -0
- package/dist/components/workflow-status/index.d.ts.map +1 -0
- package/dist/components/workflow-status/index.js +7 -0
- package/dist/components/workflow-status/index.js.map +1 -0
- package/dist/components/workflow-status/workflow-status.agent.d.ts +4 -0
- package/dist/components/workflow-status/workflow-status.agent.d.ts.map +1 -0
- package/dist/components/workflow-status/workflow-status.d.ts +52 -0
- package/dist/components/workflow-status/workflow-status.d.ts.map +1 -0
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +12 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +12 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +12 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +12 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +12 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +12 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +12 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +12 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +12 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +12 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +12 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +12 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +12 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +12 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +12 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +12 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +12 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +12 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +12 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +12 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +12 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +12 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +12 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +12 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +12 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +12 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +12 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +12 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +12 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +12 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +12 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +12 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +12 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +12 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +12 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +12 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +929 -916
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +12 -0
- package/dist/locales/de.json +12 -0
- package/dist/locales/el.json +12 -0
- package/dist/locales/en.json +12 -0
- package/dist/locales/es.json +12 -0
- package/dist/locales/fr.json +12 -0
- package/dist/locales/hi.json +12 -0
- package/dist/locales/it.json +12 -0
- package/dist/locales/ja.json +12 -0
- package/dist/locales/nl.json +12 -0
- package/dist/locales/pl.json +12 -0
- package/dist/locales/pt.json +12 -0
- package/dist/locales/ro.json +12 -0
- package/dist/locales/ru.json +12 -0
- package/dist/locales/sq.json +12 -0
- package/dist/locales/sv.json +12 -0
- package/dist/locales/tr.json +12 -0
- package/dist/locales/zh.json +12 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/calendar.model.d.ts +2 -0
- package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
- 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/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/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/appointment-card-Bh_CIlc6.js.map +0 -1
- package/dist/_chunks/button-group-CaxRJsNG.js +0 -289
- package/dist/_chunks/button-group-CaxRJsNG.js.map +0 -1
- package/dist/_chunks/calendar-event-card-DSh-69HT.js.map +0 -1
- package/dist/_chunks/calendar-workspace-UywR5gUl.js.map +0 -1
- package/dist/_chunks/clinical-note-card-CTRzmqvv.js +0 -438
- package/dist/_chunks/clinical-note-card-CTRzmqvv.js.map +0 -1
- package/dist/_chunks/counter-dRlTNC_y.js.map +0 -1
- package/dist/_chunks/entity-card-9_62gY7l.js.map +0 -1
- package/dist/_chunks/field-value-BetdWMA2.js +0 -384
- package/dist/_chunks/field-value-BetdWMA2.js.map +0 -1
- package/dist/_chunks/file-upload-CwxdqkMK.js.map +0 -1
- package/dist/_chunks/key-value-pair-BIBdZBLg.js.map +0 -1
- package/dist/_chunks/panel-header-D313n_9-.js +0 -105
- package/dist/_chunks/panel-header-D313n_9-.js.map +0 -1
- package/dist/_chunks/patient-details-BGiawUHd.js +0 -760
- package/dist/_chunks/patient-details-BGiawUHd.js.map +0 -1
- package/dist/_chunks/patient-summary-card--CT_gbaQ.js +0 -454
- package/dist/_chunks/patient-summary-card--CT_gbaQ.js.map +0 -1
- package/dist/_chunks/payment-automation-upsell-DwQW2fRp.js.map +0 -1
- package/dist/_chunks/timeline-Bs9Erxlo.js.map +0 -1
- package/dist/_chunks/tooltip-DvmfrNvB.js.map +0 -1
package/dist/_chunks/{signature-status-chip-T5fyS-k9.js → signature-status-chip-D4NsrdeI.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as E } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as M } from "react";
|
|
3
3
|
import { useTranslation as K } from "react-i18next";
|
|
4
|
-
import { B as Y } from "./badge-
|
|
5
|
-
import { T as z } from "./tooltip-
|
|
4
|
+
import { B as Y } from "./badge-BudgzTe_.js";
|
|
5
|
+
import { T as z } from "./tooltip-Cp-PLePW.js";
|
|
6
6
|
function _(i) {
|
|
7
7
|
if (!i || typeof i == "string") return [];
|
|
8
8
|
const n = i.signedBy;
|
|
@@ -193,4 +193,4 @@ export {
|
|
|
193
193
|
u as e,
|
|
194
194
|
H as s
|
|
195
195
|
};
|
|
196
|
-
//# sourceMappingURL=signature-status-chip-
|
|
196
|
+
//# sourceMappingURL=signature-status-chip-D4NsrdeI.js.map
|
package/dist/_chunks/{signature-status-chip-T5fyS-k9.js.map → signature-status-chip-D4NsrdeI.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signature-status-chip-T5fyS-k9.js","sources":["../../src/components/signature-status-chip/signature-status-chip.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Badge, type BadgeProps } from '../badge';\nimport { Tooltip } from '../tooltip';\n\n/* ------------------------------------------------------------------ */\n/* State vocabulary */\n/* ------------------------------------------------------------------ */\n\n/** One party's standing on the document. */\nexport type SignatureParty = 'signed' | 'pending' | 'notRequired';\n\n/** The chip's derived state. */\nexport type SignatureStatus = 'signed' | 'partial' | 'unsigned' | 'notRequired';\n\n/**\n * The parties a document can require. `secondary` is the second signee on a\n * two-signee envelope (platform: `secondary_signee_id`) — a guardian, parent\n * or co-signer. It is optional: a document that does not need one leaves it\n * `notRequired`, which is the default.\n */\nexport type SignatureRole = 'operator' | 'patient' | 'secondary';\n\ntype RequiredStanding = Exclude<SignatureParty, 'notRequired'>;\n\n/**\n * Who a party is, and — when they cannot sign for themselves — who signs in\n * their place. A minor, or an adult who lacks capacity, is still the party\n * the document is about; the parent, guardian or legal representative signs\n * on their behalf. The standing (`signed` / `pending`) stays on the party,\n * because it is their signature slot that is being filled.\n */\nexport interface SignerRepresentative {\n /** The representative's display name. */\n name: string;\n /**\n * Already-translated relationship to the party, e.g. \"Mother\",\n * \"Legal guardian\". Same contract as `SignerRoster.relationship` — the\n * host translates it, because the set is open.\n */\n relationship?: string;\n /**\n * This representative's own standing. Supply it when representatives can\n * be at different stages — both parents must consent and only one has\n * signed. Omit it and the representative inherits the party's standing,\n * which is the right default when a single person signs.\n */\n standing?: Exclude<SignatureParty, 'notRequired'>;\n}\n\nexport interface SignerIdentity {\n /** The party's own display name. */\n name: string;\n /**\n * Who signs in this party's place, when the party cannot sign for\n * themselves. One representative for the ordinary guardian case; several\n * where every one of them must sign — both parents consenting for a minor,\n * where the minor never signs at all.\n *\n * When representatives carry their own `standing`, they become the source\n * of truth for this party: the slot is `signed` only once every one of\n * them has signed. Pass the same values to {@link signatureStatusOf} so\n * host-side filtering agrees with the chip.\n */\n signedBy?: SignerRepresentative | SignerRepresentative[];\n}\n\n/** Normalise the one-or-many representative shape to a list. */\nfunction representativesOf(\n identity: string | SignerIdentity | undefined,\n): SignerRepresentative[] {\n if (!identity || typeof identity === 'string') return [];\n const by = identity.signedBy;\n if (!by) return [];\n return Array.isArray(by) ? by : [by];\n}\n\n/**\n * A party's effective standing. Representatives that carry their own\n * `standing` override the party value, because they are the signatures that\n * actually have to land: every one of them must sign before the slot is\n * complete.\n */\nexport function effectiveStanding(\n party: SignatureParty,\n identity?: string | SignerIdentity,\n): SignatureParty {\n if (party === 'notRequired') return 'notRequired';\n const reps = representativesOf(identity).filter((r) => r.standing);\n if (reps.length === 0) return party;\n return reps.every((r) => r.standing === 'signed') ? 'signed' : 'pending';\n}\n\n/**\n * Display names for the signers, when the host has them and chooses to show\n * them. A bare string is the common case; pass a {@link SignerIdentity} where\n * someone signs on the party's behalf.\n */\nexport type SignatureSignerNames = Partial<\n Record<SignatureRole, string | SignerIdentity>\n>;\n\n/**\n * The rule, exported so hosts can sort/filter by the same state the chip\n * shows: required = parties not `notRequired`; all signed → `signed`, some\n * signed → `partial`, none signed → `unsigned`, nobody required → `notRequired`.\n *\n * `secondary` is optional and defaults to `notRequired`, so existing\n * two-argument calls keep their exact meaning.\n */\nexport function signatureStatusOf(\n operator: SignatureParty,\n patient: SignatureParty,\n secondary: SignatureParty = 'notRequired',\n names?: SignatureSignerNames,\n): SignatureStatus {\n const required = [\n effectiveStanding(operator, names?.operator),\n effectiveStanding(patient, names?.patient),\n effectiveStanding(secondary, names?.secondary),\n ].filter((p) => p !== 'notRequired');\n if (required.length === 0) return 'notRequired';\n const signed = required.filter((p) => p === 'signed').length;\n if (signed === 0) return 'unsigned';\n return signed === required.length ? 'signed' : 'partial';\n}\n\n// `partial` shares the warning tone with `unsigned` so a half-signed document\n// never reads as done at a glance — only a fully signed one goes green.\nconst STATUS_VARIANT: Record<\n SignatureStatus,\n NonNullable<BadgeProps['variant']>\n> = {\n // Traffic light: green when everyone required has signed, amber when at\n // least one party is still missing, red when nobody has.\n signed: 'success',\n partial: 'warning',\n unsigned: 'error',\n notRequired: 'neutral',\n};\n\nconst ROLE_DEFAULT: Record<SignatureRole, string> = {\n operator: 'Operator',\n patient: 'Patient',\n secondary: 'Second signee',\n};\n\nconst STANDING_DEFAULT: Record<RequiredStanding, string> = {\n signed: 'signed',\n pending: 'pending',\n};\n\n// Flat keys, matching the shipped bundles. i18next splits on '.', so a\n// nested `missing.operator` alongside the existing flat keys would risk a\n// lookup collision — and renaming them would break any host override.\nconst MISSING_KEY: Record<SignatureRole, string> = {\n operator: 'signatureStatusChip.missingOperator',\n patient: 'signatureStatusChip.missingPatient',\n secondary: 'signatureStatusChip.missingSecondary',\n};\n\nconst MISSING_DEFAULT: Record<SignatureRole, string> = {\n operator: 'Operator signature missing',\n patient: 'Patient signature missing',\n secondary: 'Second signee signature missing',\n};\n\n/**\n * Wrap host-supplied names in a Unicode first-strong isolate. Names arrive in\n * an unknown script and are interpolated into a translated frame — a Latin\n * name inside an Arabic sentence reorders the surrounding punctuation without\n * this. FSI … PDI is invisible, and assistive tech treats it as formatting.\n */\nfunction isolate(value: string): string {\n return `\\u2068${value}\\u2069`;\n}\n\nfunction requiredParties(\n operator: SignatureParty,\n patient: SignatureParty,\n secondary: SignatureParty,\n): Array<{ role: SignatureRole; standing: RequiredStanding }> {\n const out: Array<{ role: SignatureRole; standing: RequiredStanding }> = [];\n if (operator !== 'notRequired')\n out.push({ role: 'operator', standing: operator });\n if (patient !== 'notRequired')\n out.push({ role: 'patient', standing: patient });\n if (secondary !== 'notRequired')\n out.push({ role: 'secondary', standing: secondary });\n return out;\n}\n\n/* ------------------------------------------------------------------ */\n/* Props */\n/* ------------------------------------------------------------------ */\n\nexport interface SignatureStatusChipProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children'\n> {\n /** The operator's standing. */\n operator: SignatureParty;\n /** The patient's standing. */\n patient: SignatureParty;\n /**\n * The second signee's standing on a two-signee envelope — a guardian,\n * parent or co-signer. Defaults to `notRequired`, so a document with only\n * an operator and a patient behaves exactly as before.\n */\n secondary?: SignatureParty;\n /**\n * Display names for the signers, keyed by role. Supply them and the\n * breakdown reads \"Operator: Dr Rossi (signed)\" instead of \"Operator\n * signed\"; omit them and only the roles are named.\n *\n * A role may be a bare name, or a {@link SignerIdentity} when someone\n * signs on that party's behalf — a parent for a minor, a guardian for an\n * adult who lacks capacity. Then the row reads \"Patient: M. Bianchi,\n * signed by A. Bianchi (Parent)\".\n *\n * A name is shown in the chip's accessible name and its hover title, so\n * pass one only where the viewer is already entitled to see that person —\n * these are real people, and on the patient row usually a patient. Roles\n * with no name fall back to the role alone, so a partial map is fine.\n */\n names?: SignatureSignerNames;\n /** Chip height — maps onto the Badge `sm` / `md` sizes. */\n size?: 'sm' | 'md';\n /**\n * Spell the breakdown in the chip text (\"Signed · Operator signed · Patient\n * signed\") instead of the summary word. Default false — the breakdown is\n * always in the accessible name / title.\n */\n detail?: boolean;\n /**\n * Make the breakdown reachable by keyboard and touch, not only on hover.\n *\n * The chip becomes focusable and the breakdown moves out of the accessible\n * name into the kit's `Tooltip`, which exposes it as the accessible\n * description. Screen readers then hear the summary once and the detail\n * once, instead of the whole string twice.\n *\n * Off by default for two reasons. It adds a tab stop, and a table of forty\n * chips should not add forty; and it **requires a `TooltipProvider` above\n * it** — without one the kit's Tooltip throws. Turn it on where the\n * breakdown is something the user has to act on.\n */\n tooltip?: boolean;\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const SignatureStatusChip = forwardRef<\n HTMLSpanElement,\n SignatureStatusChipProps\n>(\n (\n {\n operator,\n patient,\n secondary = 'notRequired',\n names,\n size = 'md',\n detail = false,\n tooltip = false,\n id,\n className,\n 'aria-label': ariaLabelProp,\n title: titleProp,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const status = signatureStatusOf(operator, patient, secondary, names);\n // Each party's standing is the effective one, so a slot held open by an\n // unsigned representative reads as pending here too.\n const parties = requiredParties(\n effectiveStanding(operator, names?.operator),\n effectiveStanding(patient, names?.patient),\n effectiveStanding(secondary, names?.secondary),\n );\n\n // When exactly one required party is outstanding the summary names it,\n // which is more use than a vague \"partially signed\". Two or more can be\n // outstanding once a second signee is in play, and then only the count\n // is worth the chip's width — the breakdown spells out the rest.\n // Two summaries, because a summary that is about to be followed by the\n // breakdown must not say what the breakdown is about to say. Alone, it\n // names the party that is missing, which is the useful half. Leading a\n // breakdown, it is the status word only — otherwise a detail chip read\n // \"Operator signature missing · Operator pending · Patient signed\",\n // naming the operator twice in one line.\n const summaryLead = (() => {\n switch (status) {\n case 'signed':\n return t('signatureStatusChip.signed', { defaultValue: 'Signed' });\n case 'unsigned':\n return t('signatureStatusChip.unsigned', {\n defaultValue: 'Not signed',\n });\n case 'notRequired':\n return t('signatureStatusChip.notRequired', {\n defaultValue: 'No signature required',\n });\n case 'partial':\n return t('signatureStatusChip.partial', {\n defaultValue: 'Partially signed',\n });\n }\n })();\n\n const summary = (() => {\n switch (status) {\n case 'signed':\n return t('signatureStatusChip.signed', { defaultValue: 'Signed' });\n case 'unsigned':\n return t('signatureStatusChip.unsigned', {\n defaultValue: 'Not signed',\n });\n case 'notRequired':\n return t('signatureStatusChip.notRequired', {\n defaultValue: 'No signature required',\n });\n case 'partial': {\n const pending = parties.filter((p) => p.standing === 'pending');\n if (pending.length === 1) {\n const role = pending[0].role;\n return t(MISSING_KEY[role], {\n defaultValue: MISSING_DEFAULT[role],\n });\n }\n return t('signatureStatusChip.missingCount', {\n defaultValue: '{{count}} signatures missing',\n count: pending.length,\n });\n }\n }\n })();\n\n // Two breakdowns, deliberately. The chip is a pill: its visible text\n // names roles only, so it stays the length it was before names existed.\n // Names go where there is room for them — the tooltip, or the accessible\n // name when there is no tooltip. A named three-party chip spelled out\n // visibly ran to 138 characters, which is a paragraph, not a chip.\n const buildBreakdown = (withNames: boolean) =>\n parties\n .map(({ role, standing }) => {\n const roleLabel = t(`signatureStatusChip.party.${role}`, {\n defaultValue: ROLE_DEFAULT[role],\n });\n const state = t(`signatureStatusChip.state.${standing}`, {\n defaultValue: STANDING_DEFAULT[standing],\n });\n const identity = withNames ? names?.[role] : undefined;\n if (!identity) {\n return t('signatureStatusChip.breakdownItem', {\n defaultValue: '{{party}} {{state}}',\n party: roleLabel,\n state,\n });\n }\n\n const who =\n typeof identity === 'string' ? { name: identity } : identity;\n\n // Someone signs in the party's place — name the party AND whoever\n // fills their slot, so the reader can see both. Several can be\n // required at once: both parents consenting for a minor.\n const reps = representativesOf(who);\n if (reps.length > 0) {\n const render = (r: SignerRepresentative) =>\n r.relationship\n ? t('signatureStatusChip.representative', {\n defaultValue: '{{name}} ({{relationship}})',\n name: isolate(r.name),\n relationship: r.relationship,\n })\n : isolate(r.name);\n\n // A representative with no standing of its own follows the party.\n const standingOf = (r: SignerRepresentative) =>\n r.standing ?? standing;\n const signed = reps.filter((r) => standingOf(r) === 'signed');\n const awaiting = reps.filter((r) => standingOf(r) === 'pending');\n\n const clauses: string[] = [];\n if (signed.length > 0)\n clauses.push(\n t('signatureStatusChip.signedByList', {\n defaultValue: 'signed by {{signers}}',\n signers: signed.map(render).join(', '),\n }),\n );\n if (awaiting.length > 0)\n clauses.push(\n t('signatureStatusChip.awaitingList', {\n defaultValue: 'awaiting {{signers}}',\n signers: awaiting.map(render).join(', '),\n }),\n );\n\n return t('signatureStatusChip.breakdownItemOnBehalf', {\n defaultValue: '{{party}}: {{name}}, {{detail}}',\n party: roleLabel,\n name: isolate(who.name),\n detail: clauses.join(', '),\n });\n }\n\n return t('signatureStatusChip.breakdownItemNamed', {\n defaultValue: '{{party}}: {{name}} ({{state}})',\n party: roleLabel,\n name: isolate(who.name),\n state,\n });\n })\n .join(' · ');\n\n const breakdownNamed = buildBreakdown(true);\n const breakdownRoles = buildBreakdown(false);\n\n // The full picture always reaches AT and hover, even in the compact form.\n const label = breakdownNamed\n ? `${summaryLead}, ${breakdownNamed}`\n : summary;\n // Visible text: roles only, never names.\n const visible =\n detail && breakdownRoles ? `${summaryLead} · ${breakdownRoles}` : summary;\n\n // With a tooltip the breakdown becomes the accessible DESCRIPTION, so the\n // name carries only the summary — otherwise assistive tech reads the same\n // detail twice. Without one, the name has to carry everything, because\n // there is nowhere else for it to go.\n const useTooltip = tooltip && breakdownNamed.length > 0;\n const accessibleName = ariaLabelProp ?? (useTooltip ? summary : label);\n\n const chip = (\n <Badge\n ref={ref}\n variant={STATUS_VARIANT[status]}\n size={size}\n withDot\n role=\"img\"\n // One source of truth: an overridden aria-label also becomes the\n // hover text, so the two can never drift apart.\n aria-label={accessibleName}\n // A native title alongside a Tooltip shows two overlapping bubbles,\n // so the Tooltip takes over entirely when it is on.\n title={useTooltip ? titleProp : (titleProp ?? accessibleName)}\n tabIndex={useTooltip ? 0 : undefined}\n data-component=\"signature-status-chip\"\n data-status={status}\n data-component-id={id}\n id={id}\n className={\n useTooltip\n ? [\n 'ds:rounded-[var(--radius-full)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring',\n 'ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n : className\n }\n {...rest}\n >\n {visible}\n </Badge>\n );\n\n if (!useTooltip) return chip;\n\n // Radix's Trigger clones this element, so the chip itself is the trigger:\n // one element, focusable, with the focus ring following the pill shape.\n return <Tooltip label={breakdownNamed}>{chip}</Tooltip>;\n },\n);\n\nSignatureStatusChip.displayName = 'SignatureStatusChip';\n"],"names":["representativesOf","identity","by","effectiveStanding","party","reps","r","signatureStatusOf","operator","patient","secondary","names","required","p","signed","STATUS_VARIANT","ROLE_DEFAULT","STANDING_DEFAULT","MISSING_KEY","MISSING_DEFAULT","isolate","value","requiredParties","out","SignatureStatusChip","forwardRef","size","detail","tooltip","id","className","ariaLabelProp","titleProp","rest","ref","t","useTranslation","status","parties","summaryLead","summary","pending","role","buildBreakdown","withNames","standing","roleLabel","state","who","render","standingOf","awaiting","clauses","breakdownNamed","breakdownRoles","label","visible","useTooltip","accessibleName","chip","jsx","Badge","Tooltip"],"mappings":";;;;;AAoEA,SAASA,EACPC,GACwB;AACxB,MAAI,CAACA,KAAY,OAAOA,KAAa,iBAAiB,CAAA;AACtD,QAAMC,IAAKD,EAAS;AACpB,SAAKC,IACE,MAAM,QAAQA,CAAE,IAAIA,IAAK,CAACA,CAAE,IADnB,CAAA;AAElB;AAQO,SAASC,EACdC,GACAH,GACgB;AAChB,MAAIG,MAAU,cAAe,QAAO;AACpC,QAAMC,IAAOL,EAAkBC,CAAQ,EAAE,OAAO,CAACK,MAAMA,EAAE,QAAQ;AACjE,SAAID,EAAK,WAAW,IAAUD,IACvBC,EAAK,MAAM,CAACC,MAAMA,EAAE,aAAa,QAAQ,IAAI,WAAW;AACjE;AAmBO,SAASC,EACdC,GACAC,GACAC,IAA4B,eAC5BC,GACiB;AACjB,QAAMC,IAAW;AAAA,IACfT,EAAkBK,GAAUG,KAAA,gBAAAA,EAAO,QAAQ;AAAA,IAC3CR,EAAkBM,GAASE,KAAA,gBAAAA,EAAO,OAAO;AAAA,IACzCR,EAAkBO,GAAWC,KAAA,gBAAAA,EAAO,SAAS;AAAA,EAAA,EAC7C,OAAO,CAACE,MAAMA,MAAM,aAAa;AACnC,MAAID,EAAS,WAAW,EAAG,QAAO;AAClC,QAAME,IAASF,EA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,EAAQ,OAAOT,GAAiB,UAAAM,GAAK,IAJrBA;AAAA,EAK1B;AACF;AAEAnC,GAAoB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"signature-status-chip-D4NsrdeI.js","sources":["../../src/components/signature-status-chip/signature-status-chip.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Badge, type BadgeProps } from '../badge';\nimport { Tooltip } from '../tooltip';\n\n/* ------------------------------------------------------------------ */\n/* State vocabulary */\n/* ------------------------------------------------------------------ */\n\n/** One party's standing on the document. */\nexport type SignatureParty = 'signed' | 'pending' | 'notRequired';\n\n/** The chip's derived state. */\nexport type SignatureStatus = 'signed' | 'partial' | 'unsigned' | 'notRequired';\n\n/**\n * The parties a document can require. `secondary` is the second signee on a\n * two-signee envelope (platform: `secondary_signee_id`) — a guardian, parent\n * or co-signer. It is optional: a document that does not need one leaves it\n * `notRequired`, which is the default.\n */\nexport type SignatureRole = 'operator' | 'patient' | 'secondary';\n\ntype RequiredStanding = Exclude<SignatureParty, 'notRequired'>;\n\n/**\n * Who a party is, and — when they cannot sign for themselves — who signs in\n * their place. A minor, or an adult who lacks capacity, is still the party\n * the document is about; the parent, guardian or legal representative signs\n * on their behalf. The standing (`signed` / `pending`) stays on the party,\n * because it is their signature slot that is being filled.\n */\nexport interface SignerRepresentative {\n /** The representative's display name. */\n name: string;\n /**\n * Already-translated relationship to the party, e.g. \"Mother\",\n * \"Legal guardian\". Same contract as `SignerRoster.relationship` — the\n * host translates it, because the set is open.\n */\n relationship?: string;\n /**\n * This representative's own standing. Supply it when representatives can\n * be at different stages — both parents must consent and only one has\n * signed. Omit it and the representative inherits the party's standing,\n * which is the right default when a single person signs.\n */\n standing?: Exclude<SignatureParty, 'notRequired'>;\n}\n\nexport interface SignerIdentity {\n /** The party's own display name. */\n name: string;\n /**\n * Who signs in this party's place, when the party cannot sign for\n * themselves. One representative for the ordinary guardian case; several\n * where every one of them must sign — both parents consenting for a minor,\n * where the minor never signs at all.\n *\n * When representatives carry their own `standing`, they become the source\n * of truth for this party: the slot is `signed` only once every one of\n * them has signed. Pass the same values to {@link signatureStatusOf} so\n * host-side filtering agrees with the chip.\n */\n signedBy?: SignerRepresentative | SignerRepresentative[];\n}\n\n/** Normalise the one-or-many representative shape to a list. */\nfunction representativesOf(\n identity: string | SignerIdentity | undefined,\n): SignerRepresentative[] {\n if (!identity || typeof identity === 'string') return [];\n const by = identity.signedBy;\n if (!by) return [];\n return Array.isArray(by) ? by : [by];\n}\n\n/**\n * A party's effective standing. Representatives that carry their own\n * `standing` override the party value, because they are the signatures that\n * actually have to land: every one of them must sign before the slot is\n * complete.\n */\nexport function effectiveStanding(\n party: SignatureParty,\n identity?: string | SignerIdentity,\n): SignatureParty {\n if (party === 'notRequired') return 'notRequired';\n const reps = representativesOf(identity).filter((r) => r.standing);\n if (reps.length === 0) return party;\n return reps.every((r) => r.standing === 'signed') ? 'signed' : 'pending';\n}\n\n/**\n * Display names for the signers, when the host has them and chooses to show\n * them. A bare string is the common case; pass a {@link SignerIdentity} where\n * someone signs on the party's behalf.\n */\nexport type SignatureSignerNames = Partial<\n Record<SignatureRole, string | SignerIdentity>\n>;\n\n/**\n * The rule, exported so hosts can sort/filter by the same state the chip\n * shows: required = parties not `notRequired`; all signed → `signed`, some\n * signed → `partial`, none signed → `unsigned`, nobody required → `notRequired`.\n *\n * `secondary` is optional and defaults to `notRequired`, so existing\n * two-argument calls keep their exact meaning.\n */\nexport function signatureStatusOf(\n operator: SignatureParty,\n patient: SignatureParty,\n secondary: SignatureParty = 'notRequired',\n names?: SignatureSignerNames,\n): SignatureStatus {\n const required = [\n effectiveStanding(operator, names?.operator),\n effectiveStanding(patient, names?.patient),\n effectiveStanding(secondary, names?.secondary),\n ].filter((p) => p !== 'notRequired');\n if (required.length === 0) return 'notRequired';\n const signed = required.filter((p) => p === 'signed').length;\n if (signed === 0) return 'unsigned';\n return signed === required.length ? 'signed' : 'partial';\n}\n\n// `partial` shares the warning tone with `unsigned` so a half-signed document\n// never reads as done at a glance — only a fully signed one goes green.\nconst STATUS_VARIANT: Record<\n SignatureStatus,\n NonNullable<BadgeProps['variant']>\n> = {\n // Traffic light: green when everyone required has signed, amber when at\n // least one party is still missing, red when nobody has.\n signed: 'success',\n partial: 'warning',\n unsigned: 'error',\n notRequired: 'neutral',\n};\n\nconst ROLE_DEFAULT: Record<SignatureRole, string> = {\n operator: 'Operator',\n patient: 'Patient',\n secondary: 'Second signee',\n};\n\nconst STANDING_DEFAULT: Record<RequiredStanding, string> = {\n signed: 'signed',\n pending: 'pending',\n};\n\n// Flat keys, matching the shipped bundles. i18next splits on '.', so a\n// nested `missing.operator` alongside the existing flat keys would risk a\n// lookup collision — and renaming them would break any host override.\nconst MISSING_KEY: Record<SignatureRole, string> = {\n operator: 'signatureStatusChip.missingOperator',\n patient: 'signatureStatusChip.missingPatient',\n secondary: 'signatureStatusChip.missingSecondary',\n};\n\nconst MISSING_DEFAULT: Record<SignatureRole, string> = {\n operator: 'Operator signature missing',\n patient: 'Patient signature missing',\n secondary: 'Second signee signature missing',\n};\n\n/**\n * Wrap host-supplied names in a Unicode first-strong isolate. Names arrive in\n * an unknown script and are interpolated into a translated frame — a Latin\n * name inside an Arabic sentence reorders the surrounding punctuation without\n * this. FSI … PDI is invisible, and assistive tech treats it as formatting.\n */\nfunction isolate(value: string): string {\n return `\\u2068${value}\\u2069`;\n}\n\nfunction requiredParties(\n operator: SignatureParty,\n patient: SignatureParty,\n secondary: SignatureParty,\n): Array<{ role: SignatureRole; standing: RequiredStanding }> {\n const out: Array<{ role: SignatureRole; standing: RequiredStanding }> = [];\n if (operator !== 'notRequired')\n out.push({ role: 'operator', standing: operator });\n if (patient !== 'notRequired')\n out.push({ role: 'patient', standing: patient });\n if (secondary !== 'notRequired')\n out.push({ role: 'secondary', standing: secondary });\n return out;\n}\n\n/* ------------------------------------------------------------------ */\n/* Props */\n/* ------------------------------------------------------------------ */\n\nexport interface SignatureStatusChipProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children'\n> {\n /** The operator's standing. */\n operator: SignatureParty;\n /** The patient's standing. */\n patient: SignatureParty;\n /**\n * The second signee's standing on a two-signee envelope — a guardian,\n * parent or co-signer. Defaults to `notRequired`, so a document with only\n * an operator and a patient behaves exactly as before.\n */\n secondary?: SignatureParty;\n /**\n * Display names for the signers, keyed by role. Supply them and the\n * breakdown reads \"Operator: Dr Rossi (signed)\" instead of \"Operator\n * signed\"; omit them and only the roles are named.\n *\n * A role may be a bare name, or a {@link SignerIdentity} when someone\n * signs on that party's behalf — a parent for a minor, a guardian for an\n * adult who lacks capacity. Then the row reads \"Patient: M. Bianchi,\n * signed by A. Bianchi (Parent)\".\n *\n * A name is shown in the chip's accessible name and its hover title, so\n * pass one only where the viewer is already entitled to see that person —\n * these are real people, and on the patient row usually a patient. Roles\n * with no name fall back to the role alone, so a partial map is fine.\n */\n names?: SignatureSignerNames;\n /** Chip height — maps onto the Badge `sm` / `md` sizes. */\n size?: 'sm' | 'md';\n /**\n * Spell the breakdown in the chip text (\"Signed · Operator signed · Patient\n * signed\") instead of the summary word. Default false — the breakdown is\n * always in the accessible name / title.\n */\n detail?: boolean;\n /**\n * Make the breakdown reachable by keyboard and touch, not only on hover.\n *\n * The chip becomes focusable and the breakdown moves out of the accessible\n * name into the kit's `Tooltip`, which exposes it as the accessible\n * description. Screen readers then hear the summary once and the detail\n * once, instead of the whole string twice.\n *\n * Off by default for two reasons. It adds a tab stop, and a table of forty\n * chips should not add forty; and it **requires a `TooltipProvider` above\n * it** — without one the kit's Tooltip throws. Turn it on where the\n * breakdown is something the user has to act on.\n */\n tooltip?: boolean;\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const SignatureStatusChip = forwardRef<\n HTMLSpanElement,\n SignatureStatusChipProps\n>(\n (\n {\n operator,\n patient,\n secondary = 'notRequired',\n names,\n size = 'md',\n detail = false,\n tooltip = false,\n id,\n className,\n 'aria-label': ariaLabelProp,\n title: titleProp,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const status = signatureStatusOf(operator, patient, secondary, names);\n // Each party's standing is the effective one, so a slot held open by an\n // unsigned representative reads as pending here too.\n const parties = requiredParties(\n effectiveStanding(operator, names?.operator),\n effectiveStanding(patient, names?.patient),\n effectiveStanding(secondary, names?.secondary),\n );\n\n // When exactly one required party is outstanding the summary names it,\n // which is more use than a vague \"partially signed\". Two or more can be\n // outstanding once a second signee is in play, and then only the count\n // is worth the chip's width — the breakdown spells out the rest.\n // Two summaries, because a summary that is about to be followed by the\n // breakdown must not say what the breakdown is about to say. Alone, it\n // names the party that is missing, which is the useful half. Leading a\n // breakdown, it is the status word only — otherwise a detail chip read\n // \"Operator signature missing · Operator pending · Patient signed\",\n // naming the operator twice in one line.\n const summaryLead = (() => {\n switch (status) {\n case 'signed':\n return t('signatureStatusChip.signed', { defaultValue: 'Signed' });\n case 'unsigned':\n return t('signatureStatusChip.unsigned', {\n defaultValue: 'Not signed',\n });\n case 'notRequired':\n return t('signatureStatusChip.notRequired', {\n defaultValue: 'No signature required',\n });\n case 'partial':\n return t('signatureStatusChip.partial', {\n defaultValue: 'Partially signed',\n });\n }\n })();\n\n const summary = (() => {\n switch (status) {\n case 'signed':\n return t('signatureStatusChip.signed', { defaultValue: 'Signed' });\n case 'unsigned':\n return t('signatureStatusChip.unsigned', {\n defaultValue: 'Not signed',\n });\n case 'notRequired':\n return t('signatureStatusChip.notRequired', {\n defaultValue: 'No signature required',\n });\n case 'partial': {\n const pending = parties.filter((p) => p.standing === 'pending');\n if (pending.length === 1) {\n const role = pending[0].role;\n return t(MISSING_KEY[role], {\n defaultValue: MISSING_DEFAULT[role],\n });\n }\n return t('signatureStatusChip.missingCount', {\n defaultValue: '{{count}} signatures missing',\n count: pending.length,\n });\n }\n }\n })();\n\n // Two breakdowns, deliberately. The chip is a pill: its visible text\n // names roles only, so it stays the length it was before names existed.\n // Names go where there is room for them — the tooltip, or the accessible\n // name when there is no tooltip. A named three-party chip spelled out\n // visibly ran to 138 characters, which is a paragraph, not a chip.\n const buildBreakdown = (withNames: boolean) =>\n parties\n .map(({ role, standing }) => {\n const roleLabel = t(`signatureStatusChip.party.${role}`, {\n defaultValue: ROLE_DEFAULT[role],\n });\n const state = t(`signatureStatusChip.state.${standing}`, {\n defaultValue: STANDING_DEFAULT[standing],\n });\n const identity = withNames ? names?.[role] : undefined;\n if (!identity) {\n return t('signatureStatusChip.breakdownItem', {\n defaultValue: '{{party}} {{state}}',\n party: roleLabel,\n state,\n });\n }\n\n const who =\n typeof identity === 'string' ? { name: identity } : identity;\n\n // Someone signs in the party's place — name the party AND whoever\n // fills their slot, so the reader can see both. Several can be\n // required at once: both parents consenting for a minor.\n const reps = representativesOf(who);\n if (reps.length > 0) {\n const render = (r: SignerRepresentative) =>\n r.relationship\n ? t('signatureStatusChip.representative', {\n defaultValue: '{{name}} ({{relationship}})',\n name: isolate(r.name),\n relationship: r.relationship,\n })\n : isolate(r.name);\n\n // A representative with no standing of its own follows the party.\n const standingOf = (r: SignerRepresentative) =>\n r.standing ?? standing;\n const signed = reps.filter((r) => standingOf(r) === 'signed');\n const awaiting = reps.filter((r) => standingOf(r) === 'pending');\n\n const clauses: string[] = [];\n if (signed.length > 0)\n clauses.push(\n t('signatureStatusChip.signedByList', {\n defaultValue: 'signed by {{signers}}',\n signers: signed.map(render).join(', '),\n }),\n );\n if (awaiting.length > 0)\n clauses.push(\n t('signatureStatusChip.awaitingList', {\n defaultValue: 'awaiting {{signers}}',\n signers: awaiting.map(render).join(', '),\n }),\n );\n\n return t('signatureStatusChip.breakdownItemOnBehalf', {\n defaultValue: '{{party}}: {{name}}, {{detail}}',\n party: roleLabel,\n name: isolate(who.name),\n detail: clauses.join(', '),\n });\n }\n\n return t('signatureStatusChip.breakdownItemNamed', {\n defaultValue: '{{party}}: {{name}} ({{state}})',\n party: roleLabel,\n name: isolate(who.name),\n state,\n });\n })\n .join(' · ');\n\n const breakdownNamed = buildBreakdown(true);\n const breakdownRoles = buildBreakdown(false);\n\n // The full picture always reaches AT and hover, even in the compact form.\n const label = breakdownNamed\n ? `${summaryLead}, ${breakdownNamed}`\n : summary;\n // Visible text: roles only, never names.\n const visible =\n detail && breakdownRoles ? `${summaryLead} · ${breakdownRoles}` : summary;\n\n // With a tooltip the breakdown becomes the accessible DESCRIPTION, so the\n // name carries only the summary — otherwise assistive tech reads the same\n // detail twice. Without one, the name has to carry everything, because\n // there is nowhere else for it to go.\n const useTooltip = tooltip && breakdownNamed.length > 0;\n const accessibleName = ariaLabelProp ?? (useTooltip ? summary : label);\n\n const chip = (\n <Badge\n ref={ref}\n variant={STATUS_VARIANT[status]}\n size={size}\n withDot\n role=\"img\"\n // One source of truth: an overridden aria-label also becomes the\n // hover text, so the two can never drift apart.\n aria-label={accessibleName}\n // A native title alongside a Tooltip shows two overlapping bubbles,\n // so the Tooltip takes over entirely when it is on.\n title={useTooltip ? titleProp : (titleProp ?? accessibleName)}\n tabIndex={useTooltip ? 0 : undefined}\n data-component=\"signature-status-chip\"\n data-status={status}\n data-component-id={id}\n id={id}\n className={\n useTooltip\n ? [\n 'ds:rounded-[var(--radius-full)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring',\n 'ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n : className\n }\n {...rest}\n >\n {visible}\n </Badge>\n );\n\n if (!useTooltip) return chip;\n\n // Radix's Trigger clones this element, so the chip itself is the trigger:\n // one element, focusable, with the focus ring following the pill shape.\n return <Tooltip label={breakdownNamed}>{chip}</Tooltip>;\n },\n);\n\nSignatureStatusChip.displayName = 'SignatureStatusChip';\n"],"names":["representativesOf","identity","by","effectiveStanding","party","reps","r","signatureStatusOf","operator","patient","secondary","names","required","p","signed","STATUS_VARIANT","ROLE_DEFAULT","STANDING_DEFAULT","MISSING_KEY","MISSING_DEFAULT","isolate","value","requiredParties","out","SignatureStatusChip","forwardRef","size","detail","tooltip","id","className","ariaLabelProp","titleProp","rest","ref","t","useTranslation","status","parties","summaryLead","summary","pending","role","buildBreakdown","withNames","standing","roleLabel","state","who","render","standingOf","awaiting","clauses","breakdownNamed","breakdownRoles","label","visible","useTooltip","accessibleName","chip","jsx","Badge","Tooltip"],"mappings":";;;;;AAoEA,SAASA,EACPC,GACwB;AACxB,MAAI,CAACA,KAAY,OAAOA,KAAa,iBAAiB,CAAA;AACtD,QAAMC,IAAKD,EAAS;AACpB,SAAKC,IACE,MAAM,QAAQA,CAAE,IAAIA,IAAK,CAACA,CAAE,IADnB,CAAA;AAElB;AAQO,SAASC,EACdC,GACAH,GACgB;AAChB,MAAIG,MAAU,cAAe,QAAO;AACpC,QAAMC,IAAOL,EAAkBC,CAAQ,EAAE,OAAO,CAACK,MAAMA,EAAE,QAAQ;AACjE,SAAID,EAAK,WAAW,IAAUD,IACvBC,EAAK,MAAM,CAACC,MAAMA,EAAE,aAAa,QAAQ,IAAI,WAAW;AACjE;AAmBO,SAASC,EACdC,GACAC,GACAC,IAA4B,eAC5BC,GACiB;AACjB,QAAMC,IAAW;AAAA,IACfT,EAAkBK,GAAUG,KAAA,gBAAAA,EAAO,QAAQ;AAAA,IAC3CR,EAAkBM,GAASE,KAAA,gBAAAA,EAAO,OAAO;AAAA,IACzCR,EAAkBO,GAAWC,KAAA,gBAAAA,EAAO,SAAS;AAAA,EAAA,EAC7C,OAAO,CAACE,MAAMA,MAAM,aAAa;AACnC,MAAID,EAAS,WAAW,EAAG,QAAO;AAClC,QAAME,IAASF,EAAS,OAAO,CAACC,MAAMA,MAAM,QAAQ,EAAE;AACtD,SAAIC,MAAW,IAAU,aAClBA,MAAWF,EAAS,SAAS,WAAW;AACjD;AAIA,MAAMG,IAGF;AAAA;AAAA;AAAA,EAGF,QAAQ;AAAA,EACR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{ c as m } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as we } from "react-i18next";
|
|
5
5
|
import { B as F } from "./button-nJaPh_HC.js";
|
|
6
|
-
import { I as q } from "./icon-button-
|
|
6
|
+
import { I as q } from "./icon-button-8xqRnkdG.js";
|
|
7
7
|
import { E as xe } from "./empty-state-X0sVPfVo.js";
|
|
8
8
|
import { S as W } from "./skeleton-CZbwyJAA.js";
|
|
9
9
|
import { u as Se } from "./registry-DvAUVLHh.js";
|
|
@@ -637,4 +637,4 @@ export {
|
|
|
637
637
|
Qe as i,
|
|
638
638
|
Ge as s
|
|
639
639
|
};
|
|
640
|
-
//# sourceMappingURL=slot-grid-
|
|
640
|
+
//# sourceMappingURL=slot-grid-8Ko6thzz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot-grid-BuZOKfcd.js","sources":["../../src/components/slot-grid/slot-grid.agent.ts","../../src/components/slot-grid/slot-grid.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — SlotGrid. */\n/* */\n/* Multi-day time-slot picker. Selection stays fully CONTROLLED by the */\n/* consumer (`selectedSlotId` + `onSlotSelect`) — the adapter never */\n/* stores a choice, it reports the committed prop and fires the same */\n/* callback a native click would (the `combobox.set_value` contract). */\n/* */\n/* Two channels reach the same component: */\n/* • the registry — `SlotGridHandle` resolved by (`slot-grid`, id), */\n/* which is the ONLY channel the MCP bridge has (PRS §26 §8.1); */\n/* • the DOM — `data-slot-id` on every rendered slot button, for */\n/* DOM-driving tools (browser extension / computer use) that never */\n/* touch the registry. */\n/* */\n/* PHI (§6.1 / §7): a slot id is an AVAILABILITY identifier and a day */\n/* key is a calendar date. SlotGrid is never handed a patient — its */\n/* inputs are `{ id, start, end?, available?, label? }` plus */\n/* `Intl`-formatted time strings — so no state slot can leak PHI. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { SlotGridHandle } from './slot-grid';\n\nexport const slotGridAgent: AgentAdapter<SlotGridHandle> = {\n id: 'slot-grid',\n // pick → `select_slot` + the `selectedSlotId` state slot.\n // range_navigate → `next_days` / `previous_days` + `hasNext` / `hasPrevious`.\n // expand → `show_more_day` + the `expandedDays` state slot.\n //\n // Host-delegated, deliberately WITHOUT an action: the optional\n // \"Next available\" CTA (`showNextAvailable` + `onJumpToNextAvailable`)\n // stays a native click on the toolbar button. It is a consumer-owned\n // jump to a window the grid has not been given, so the agent reaches it\n // through the DOM, or by reading `slotsByDay` and paging with\n // `next_days` until availability appears.\n capabilities: ['pick', 'range_navigate', 'expand'],\n state: {\n status: {\n type: \"'default' | 'loading' | 'disabled' | 'empty'\",\n descriptionKey: 'ui.agent.slotGrid.state.status',\n description:\n 'Visual state of the grid. Read this before concluding \"no availability\" — `loading` means the window has not resolved yet.',\n read: (handle) => handle.getStatus(),\n },\n selectedSlotId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.slotGrid.state.selectedSlotId',\n description:\n 'Id of the slot the consumer has committed as selected, or null. Reflects the controlled `selectedSlotId` prop, not an internal choice.',\n read: (handle) => handle.getSelectedSlotId(),\n },\n visibleDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.visibleDays',\n description:\n 'Calendar days currently rendered as columns, as `yyyy-MM-dd` keys in display order.',\n read: (handle) => handle.getVisibleDays(),\n },\n slotsByDay: {\n type: 'Record<string, string[]>',\n descriptionKey: 'ui.agent.slotGrid.state.slotsByDay',\n description:\n 'Map of day key (`yyyy-MM-dd`) to the ids of that day’s bookable slots. Ids only — never slot or patient objects. Includes slots still collapsed behind \"Show more\".',\n read: (handle) => handle.getSlotsByDay(),\n },\n expandedDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.expandedDays',\n description:\n 'Day keys whose \"Show more\" control has been used, so every slot for that day is rendered.',\n read: (handle) => handle.getExpandedDays(),\n },\n hasPrevious: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasPrevious',\n description:\n 'True when an earlier window of days exists — the \"previous days\" arrow is offered.',\n read: (handle) => handle.getHasPrevious(),\n },\n hasNext: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasNext',\n description:\n 'True when a later window of days exists — the \"next days\" arrow is offered.',\n read: (handle) => handle.getHasNext(),\n },\n },\n actions: {\n select_slot: {\n // Fires the consumer's `onSlotSelect`, exactly as a click on the slot\n // button does. Persistent in the consumer's booking draft, and\n // reversible by selecting another slot — `write`, not `phi`: a slot is\n // availability, not patient data.\n safety: 'write',\n argsType: '{ slotId: string }',\n argsSchema: {\n type: 'object',\n properties: {\n slotId: {\n type: 'string',\n description:\n 'Id of the slot to select. Must be one of the ids returned by the `slotsByDay` state slot.',\n },\n },\n required: ['slotId'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the selection callback fired.',\n },\n errors: [\n 'Returns false when no slot with that id is in the visible window — page with next_days / previous_days first.',\n 'Returns false when the slot is unavailable, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.selectSlot',\n description:\n 'Select an available slot by id. Emits the same selection the user would by clicking the slot button.',\n examples: [\n {\n args: { slotId: 'avail-2026-09-01-0930' },\n note: 'Book the 09:30 slot on 1 September.',\n },\n ],\n invoke: (handle, args: { slotId: string }) =>\n handle.selectSlot(args.slotId),\n },\n next_days: {\n // View-window paging only — the consumer fetches, nothing is persisted.\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasNext` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.nextDays',\n description:\n 'Page the visible window forward to the next group of days, as the \"next days\" arrow does.',\n invoke: (handle) => handle.nextDays(),\n },\n previous_days: {\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasPrevious` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.previousDays',\n description:\n 'Page the visible window back to the previous group of days, as the \"previous days\" arrow does.',\n invoke: (handle) => handle.previousDays(),\n },\n show_more_day: {\n // Reveals slots the grid already holds — ephemeral disclosure state.\n safety: 'read',\n argsType: '{ dayKey: string }',\n argsSchema: {\n type: 'object',\n properties: {\n dayKey: {\n type: 'string',\n pattern: '^\\\\d{4}-\\\\d{2}-\\\\d{2}$',\n description:\n 'Day to expand, as a `yyyy-MM-dd` key from the `visibleDays` state slot.',\n },\n },\n required: ['dayKey'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the day was expanded.',\n },\n errors: [\n 'Returns false when the day key is not one of the visible columns, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.showMoreDay',\n description:\n 'Render every slot for one day, as the day’s \"Show more\" button does. Only affects what is on screen — `slotsByDay` already lists collapsed slots.',\n examples: [\n {\n args: { dayKey: '2026-09-01' },\n note: 'Reveal the rest of 1 September so every slot button is clickable.',\n },\n ],\n invoke: (handle, args: { dayKey: string }) =>\n handle.showMoreDay(args.dayKey),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'slot-grid',\n description:\n 'Marks the SlotGrid region. Emits `data-state` reflecting the public `state` prop (default / loading / disabled / empty).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the `id` prop. Also the registry key — without an `id` the instance does not register, so the handle-driven actions are unreachable and only the DOM channel works.',\n },\n item: {\n attr: 'data-slot-id',\n sourceProp: 'days[].slots[].id',\n description:\n 'Per-slot button identifier sourced from each `SlotGridSlot.id` — an availability id, never a patient id. DOM-driving agents activate a slot via native click on the matching button.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* SlotGrid — multi-day time-slot picker for patient booking. */\n/* */\n/* Renders N day columns side-by-side. Each column shows a day header */\n/* (formatted via `Intl.DateTimeFormat(locale)`) plus a vertical list */\n/* of slot buttons. Long days collapse to `maxInitialSlotsPerDay` and */\n/* reveal the rest via a \"Show more\" button (progressive disclosure). */\n/* */\n/* Navigation arrows (`onPreviousDays` / `onNextDays`) let the consumer */\n/* page the window of days; the optional \"Next available\" CTA jumps to */\n/* the first day with an open slot. */\n/* */\n/* Purely presentational — no business logic, no data fetching. Date */\n/* comparisons use `date-fns` (never moment.js) and the rendered labels */\n/* come exclusively from `Intl.DateTimeFormat` or the `ui.slotGrid` */\n/* namespace via `useTranslation()`. */\n/* */\n/* Agent surface: `ref` is the outer <div>; a separate `SlotGridHandle` */\n/* (built with `useMemo`, registered via `useAgentRegistration`) gives */\n/* the MCP bridge a read-only view of the visible days + available slot */\n/* ids and the four interactions the UI itself offers. See */\n/* `slot-grid.agent.ts` and PRS §26. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { format, isSameDay, parseISO } from 'date-fns';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { useAgentRegistration } from '../../agent';\nimport { slotGridAgent } from './slot-grid.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type SlotGridState = 'default' | 'loading' | 'disabled' | 'empty';\n\nexport type SlotGridSize = 'sm' | 'md' | 'lg';\n\nexport interface SlotGridSlot {\n /** Stable identity — used by consumers to resolve selection. */\n id: string;\n /** Slot start — ISO string or `Date`. Rendered via `Intl.DateTimeFormat`. */\n start: string | Date;\n /** Optional slot end — if omitted only the start time is announced. */\n end?: string | Date;\n /** Defaults to `true`. Unavailable slots render disabled and are not focusable. */\n available?: boolean;\n /** Override the default `Intl`-formatted time label. */\n label?: string;\n /** Override the accessible name of the slot button. */\n ariaLabel?: string;\n}\n\nexport interface SlotGridDay {\n /** The calendar day the column represents. */\n date: string | Date;\n /** Slots for this day, in chronological order. Empty array ⇒ empty day. */\n slots: SlotGridSlot[];\n /** Override the default `Intl`-formatted day header. */\n label?: string;\n}\n\nexport interface SlotGridProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'onSelect'>,\n VariantProps<typeof slotGridVariants> {\n /** Days to render, one column per entry. */\n days: SlotGridDay[];\n /** Visual / interactive state. Defaults to `'default'`. */\n state?: SlotGridState;\n /** Density of the slot buttons and day headers. Defaults to `'md'`. */\n size?: SlotGridSize;\n /** Id of the currently selected slot (controlled). */\n selectedSlotId?: string;\n /**\n * Initial number of slots to render per day before the \"Show more\"\n * progressive-disclosure control collapses the rest. Defaults to `6`.\n */\n maxInitialSlotsPerDay?: number;\n /**\n * BCP-47 locale tag for `Intl.DateTimeFormat`. Defaults to the active\n * i18next language.\n */\n locale?: string;\n /** IANA time zone for `Intl.DateTimeFormat`. Optional. */\n timeZone?: string;\n /** Whether the \"previous days\" navigation arrow should be enabled. */\n hasPrevious?: boolean;\n /** Whether the \"next days\" navigation arrow should be enabled. */\n hasNext?: boolean;\n /**\n * When `true`, renders the \"Next available\" CTA at the end of the\n * toolbar. Only emits a callback — the consumer owns the navigation.\n */\n showNextAvailable?: boolean;\n /** Accessible label for the outer grid region. */\n ariaLabel?: string;\n /** Fires when the user selects an available slot. */\n onSlotSelect?: (slot: SlotGridSlot, day: SlotGridDay) => void;\n /** Fires when the user clicks the \"previous days\" arrow. */\n onPreviousDays?: () => void;\n /** Fires when the user clicks the \"next days\" arrow. */\n onNextDays?: () => void;\n /** Fires when the user clicks a day's \"Show more\" button. */\n onShowMore?: (day: SlotGridDay) => void;\n /** Fires when the user clicks the \"Next available\" CTA. */\n onJumpToNextAvailable?: () => void;\n}\n\n/**\n * Imperative handle the agent adapter (`slot-grid.agent.ts`) reads and drives.\n *\n * It is NOT the `ref` — `ref` stays the outer `HTMLDivElement` so existing\n * consumers are unaffected. The handle is built with `useMemo` and handed to\n * `useAgentRegistration`, the same shape Autocomplete uses.\n *\n * Every getter returns identifiers and structural state only — availability\n * slot ids, calendar day keys, booleans. Never patient data (PRS §26 §7).\n */\nexport interface SlotGridHandle {\n /** Current visual / interactive state (`default` / `loading` / `disabled` / `empty`). */\n getStatus: () => SlotGridState;\n /** Controlled `selectedSlotId` prop, or `null` when nothing is selected. */\n getSelectedSlotId: () => string | null;\n /** Day keys (`yyyy-MM-dd`) of the currently-rendered columns, in order. */\n getVisibleDays: () => string[];\n /** Day key → ids of that day's AVAILABLE slots (collapsed ones included). */\n getSlotsByDay: () => Record<string, string[]>;\n /** Day keys whose \"Show more\" control has been used. */\n getExpandedDays: () => string[];\n /** Mirrors the `hasPrevious` prop — whether an earlier window exists. */\n getHasPrevious: () => boolean;\n /** Mirrors the `hasNext` prop — whether a later window exists. */\n getHasNext: () => boolean;\n /** Select an available slot by id. Returns `false` when it cannot be selected. */\n selectSlot: (slotId: string) => boolean;\n /** Page the window forward. Returns `false` when the arrow would be disabled. */\n nextDays: () => boolean;\n /** Page the window back. Returns `false` when the arrow would be disabled. */\n previousDays: () => boolean;\n /** Reveal a day's collapsed slots. Returns `false` when the day is not visible. */\n showMoreDay: (dayKey: string) => boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst slotGridVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:w-full',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-sm)]',\n md: 'ds:text-[length:var(--font-size-base)]',\n lg: 'ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst toolbarVariants = cva(\n 'ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full',\n);\n\n/**\n * Column-count is dynamic (1–12), so it is declared as a full CVA variant —\n * this keeps every `grid-cols-N` string statically visible to Tailwind's\n * JIT and keeps the variant table inside CVA rather than hand-rolled.\n */\nconst COLS_MAX = 12;\n\nconst columnsVariants = cva(\n 'ds:grid ds:gap-[var(--spacing-sm)] ds:w-full ds:auto-rows-min ds:items-start',\n {\n variants: {\n cols: {\n 1: 'ds:grid-cols-1',\n 2: 'ds:grid-cols-2',\n 3: 'ds:grid-cols-3',\n 4: 'ds:grid-cols-4',\n 5: 'ds:grid-cols-5',\n 6: 'ds:grid-cols-6',\n 7: 'ds:grid-cols-7',\n 8: 'ds:grid-cols-8',\n 9: 'ds:grid-cols-9',\n 10: 'ds:grid-cols-10',\n 11: 'ds:grid-cols-11',\n 12: 'ds:grid-cols-12',\n },\n },\n defaultVariants: { cols: 1 },\n },\n);\n\ntype ColumnsCount = NonNullable<VariantProps<typeof columnsVariants>['cols']>;\n\nfunction clampCols(count: number): ColumnsCount {\n return Math.max(1, Math.min(count, COLS_MAX)) as ColumnsCount;\n}\n\nconst columnVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:bg-[var(--card)]',\n 'ds:min-w-0',\n ].join(' '),\n);\n\nconst dayHeaderVariants = cva(\n [\n 'ds:font-[var(--font-weight-semibold)]',\n 'ds:text-[var(--foreground)]',\n 'ds:text-start',\n 'ds:truncate',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-xs)]',\n md: 'ds:text-[length:var(--font-size-sm)]',\n lg: 'ds:text-[length:var(--font-size-base)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst slotListVariants = cva(\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full ds:m-0 ds:p-0 ds:list-none',\n);\n\nconst slotButtonVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:w-full',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:font-[var(--font-weight-medium)]',\n 'ds:bg-[var(--secondary)]',\n 'ds:shadow-[var(--shadow-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:transition-[background-color,color,box-shadow]',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[var(--focus-ring-offset)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed ds:disabled:shadow-none',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed ds:aria-disabled:shadow-none',\n 'ds:hover:enabled:shadow-[var(--shadow-md)]',\n 'ds:aria-pressed:bg-[var(--primary)] ds:aria-pressed:text-[var(--primary-foreground)]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:text-[length:var(--font-size-xs)] ds:h-8',\n md: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:h-10',\n lg: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-base)] ds:h-12',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction toDate(value: string | Date): Date {\n return value instanceof Date ? value : parseISO(value);\n}\n\n/**\n * Internal identity for one rendered column. The index guards against a\n * consumer passing the same calendar date twice.\n */\nfunction columnKey(day: SlotGridDay, index: number): string {\n return `${toDate(day.date).toISOString()}-${index}`;\n}\n\n/**\n * Agent-facing key for one column — the local calendar date as `yyyy-MM-dd`.\n * Structural, locale-independent, and carries no patient data.\n */\nfunction dayKeyOf(day: SlotGridDay): string {\n return format(toDate(day.date), 'yyyy-MM-dd');\n}\n\n/** Is `a` the same calendar day as `b`? Uses `date-fns`, locale-agnostic. */\nexport function isSameDate(a: string | Date, b: string | Date): boolean {\n return isSameDay(toDate(a), toDate(b));\n}\n\n/** Find the first day in a list that has at least one available slot. */\nexport function findFirstAvailable(\n days: SlotGridDay[],\n): { day: SlotGridDay; slot: SlotGridSlot } | undefined {\n for (const day of days) {\n const slot = day.slots.find((s) => s.available !== false);\n if (slot) return { day, slot };\n }\n return undefined;\n}\n\nfunction formatDayHeader(\n date: Date,\n locale: string,\n timeZone?: string,\n): string {\n try {\n return new Intl.DateTimeFormat(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n timeZone,\n }).format(date);\n } catch {\n return new Intl.DateTimeFormat('en', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n }).format(date);\n }\n}\n\nfunction formatSlotTime(\n slot: SlotGridSlot,\n locale: string,\n timeZone?: string,\n): string {\n if (slot.label !== undefined) return slot.label;\n const start = toDate(slot.start);\n try {\n const fmt = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n timeZone,\n });\n if (slot.end) {\n const end = toDate(slot.end);\n if (typeof fmt.formatRange === 'function') {\n try {\n return fmt.formatRange(start, end);\n } catch {\n /* fall through */\n }\n }\n return `${fmt.format(start)} – ${fmt.format(end)}`;\n }\n return fmt.format(start);\n } catch {\n return start.toISOString();\n }\n}\n\nfunction formatSlotAriaLabel(\n slot: SlotGridSlot,\n day: SlotGridDay,\n locale: string,\n timeZone: string | undefined,\n template: (opts: { time: string; day: string }) => string,\n): string {\n if (slot.ariaLabel !== undefined) return slot.ariaLabel;\n const time = formatSlotTime(slot, locale, timeZone);\n const dayLabel =\n day.label !== undefined\n ? day.label\n : formatDayHeader(toDate(day.date), locale, timeZone);\n return template({ time, day: dayLabel });\n}\n\n/* ------------------------------------------------------------------ */\n/* Glyphs — logical-direction arrows */\n/* ------------------------------------------------------------------ */\n\nfunction ChevronStartIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M15 18l-6-6 6-6\" />\n </svg>\n );\n}\n\nfunction ChevronEndIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M9 6l6 6-6 6\" />\n </svg>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const SlotGrid = forwardRef<HTMLDivElement, SlotGridProps>(\n (\n {\n days,\n state = 'default',\n size = 'md',\n selectedSlotId,\n maxInitialSlotsPerDay = 6,\n locale: localeProp,\n timeZone,\n hasPrevious = false,\n hasNext = false,\n showNextAvailable = false,\n ariaLabel,\n onSlotSelect,\n onPreviousDays,\n onNextDays,\n onShowMore,\n onJumpToNextAvailable,\n className,\n id,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const locale = localeProp ?? i18n.language ?? 'en';\n const idBase = useId();\n\n const [expanded, setExpanded] = useState<Record<string, boolean>>({});\n\n const isLoading = state === 'loading';\n const isDisabled = state === 'disabled';\n const isInteractionSuppressed = isLoading || isDisabled;\n const isEmpty =\n state === 'empty' ||\n days.length === 0 ||\n days.every((day) => day.slots.length === 0);\n\n const resolvedAriaLabel = ariaLabel ?? t('slotGrid.ariaLabel');\n\n const handleSlotClick = useCallback(\n (slot: SlotGridSlot, day: SlotGridDay) => {\n if (isInteractionSuppressed) return;\n if (slot.available === false) return;\n onSlotSelect?.(slot, day);\n },\n [isInteractionSuppressed, onSlotSelect],\n );\n\n const handleShowMore = useCallback(\n (day: SlotGridDay, key: string) => {\n setExpanded((prev) => ({ ...prev, [key]: true }));\n onShowMore?.(day);\n },\n [onShowMore],\n );\n\n const handleSlotKeyDown = useCallback(\n (\n event: KeyboardEvent<HTMLButtonElement>,\n slot: SlotGridSlot,\n day: SlotGridDay,\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleSlotClick(slot, day);\n }\n },\n [handleSlotClick],\n );\n\n /* ---- Agent handle ---------------------------------------------- */\n /* `ref` stays the outer <div> (unchanged for consumers). The agent */\n /* handle is a separate, memo-stable object — the Autocomplete shape. */\n /* A snapshot ref mirrors props + internal state so the handle reads */\n /* fresh values without re-registering on every render. */\n\n const snapshot = {\n days,\n selectedSlotId,\n hasPrevious,\n hasNext,\n state,\n expanded,\n isInteractionSuppressed,\n onPreviousDays,\n onNextDays,\n handleSlotClick,\n handleShowMore,\n };\n const latest = useRef(snapshot);\n useEffect(() => {\n latest.current = snapshot;\n });\n\n const agentHandle = useMemo<SlotGridHandle>(\n () => ({\n getStatus: () => latest.current.state,\n getSelectedSlotId: () => latest.current.selectedSlotId ?? null,\n getVisibleDays: () => latest.current.days.map(dayKeyOf),\n getSlotsByDay: () => {\n // Ids only — never the slot objects (PRS §26 §7 / auditor A9).\n const byDay: Record<string, string[]> = {};\n for (const day of latest.current.days) {\n const key = dayKeyOf(day);\n const ids = day.slots\n .filter((slot) => slot.available !== false)\n .map((slot) => slot.id);\n byDay[key] = byDay[key] ? [...byDay[key], ...ids] : ids;\n }\n return byDay;\n },\n getExpandedDays: () =>\n latest.current.days\n .filter(\n (day, index) =>\n latest.current.expanded[columnKey(day, index)] === true,\n )\n .map(dayKeyOf),\n getHasPrevious: () => latest.current.hasPrevious,\n getHasNext: () => latest.current.hasNext,\n selectSlot: (slotId) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n for (const day of current.days) {\n const slot = day.slots.find((candidate) => candidate.id === slotId);\n if (!slot) continue;\n if (slot.available === false) return false;\n // Same code path as a native click on the slot button.\n current.handleSlotClick(slot, day);\n return true;\n }\n return false;\n },\n nextDays: () => {\n const current = latest.current;\n if (!current.hasNext || current.isInteractionSuppressed) return false;\n if (!current.onNextDays) return false;\n current.onNextDays();\n return true;\n },\n previousDays: () => {\n const current = latest.current;\n if (!current.hasPrevious || current.isInteractionSuppressed) {\n return false;\n }\n if (!current.onPreviousDays) return false;\n current.onPreviousDays();\n return true;\n },\n showMoreDay: (dayKey) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n const index = current.days.findIndex(\n (day) => dayKeyOf(day) === dayKey,\n );\n if (index < 0) return false;\n const day = current.days[index];\n current.handleShowMore(day, columnKey(day, index));\n return true;\n },\n }),\n [],\n );\n\n useAgentRegistration(slotGridAgent, agentHandle, id);\n\n const columnCount = clampCols(days.length || 1);\n const columnsClass = columnsVariants({ cols: columnCount });\n\n /* ---- Rendered content ------------------------------------------ */\n\n let body: ReactNode;\n if (isLoading) {\n body = (\n <div\n className={columnsClass}\n data-state=\"loading\"\n role=\"status\"\n aria-live=\"polite\"\n aria-label={t('common.loading')}\n >\n {Array.from({ length: columnCount }, (_, colIdx) => (\n <div key={`loading-col-${colIdx}`} className={columnVariants()}>\n <Skeleton variant=\"text\" size={size} width=\"60%\" />\n <div className={slotListVariants()}>\n {Array.from(\n { length: Math.min(maxInitialSlotsPerDay, 4) },\n (_, rowIdx) => (\n <Skeleton\n key={`loading-slot-${colIdx}-${rowIdx}`}\n variant=\"rounded\"\n size={size}\n height=\"40px\"\n />\n ),\n )}\n </div>\n </div>\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = (\n <div data-state=\"empty\">\n <EmptyState variant=\"no-results\" title={t('slotGrid.noSlots')} />\n </div>\n );\n } else {\n body = (\n <div\n className={columnsClass}\n data-state={isDisabled ? 'disabled' : 'default'}\n >\n {days.map((day, dayIdx) => {\n const dayKey = columnKey(day, dayIdx);\n const headerLabel =\n day.label ?? formatDayHeader(toDate(day.date), locale, timeZone);\n const headerId = `${idBase}-day-${dayIdx}-header`;\n const isExpanded = expanded[dayKey] ?? false;\n const visibleSlots = isExpanded\n ? day.slots\n : day.slots.slice(0, maxInitialSlotsPerDay);\n const hiddenCount = day.slots.length - visibleSlots.length;\n\n const isDayEmpty = day.slots.length === 0;\n\n return (\n // Use a plain <div role=\"group\"> rather than <section> — a\n // <section> with aria-labelledby is a landmark, and nesting many\n // landmarks inside the outer slot-grid landmark fails axe's\n // landmark-unique rule.\n <div\n key={dayKey}\n role=\"group\"\n className={columnVariants()}\n aria-labelledby={headerId}\n data-empty={isDayEmpty || undefined}\n >\n <h3 id={headerId} className={dayHeaderVariants({ size })}>\n {headerLabel}\n </h3>\n {isDayEmpty ? (\n <p className=\"type-body-sm ds:text-[var(--muted-foreground)] ds:m-0\">\n {t('slotGrid.noSlots')}\n </p>\n ) : null}\n <ul className={slotListVariants()}>\n {visibleSlots.map((slot) => {\n const ariaLabelSlot = formatSlotAriaLabel(\n slot,\n day,\n locale,\n timeZone,\n ({ time, day: dayLabel }) =>\n t('slotGrid.slotLabel', { time, day: dayLabel }),\n );\n const isSelected = selectedSlotId === slot.id;\n const isSlotDisabled =\n slot.available === false || isInteractionSuppressed;\n return (\n <li key={slot.id}>\n <button\n type=\"button\"\n className={slotButtonVariants({ size })}\n aria-label={ariaLabelSlot}\n aria-pressed={isSelected}\n disabled={isSlotDisabled}\n aria-disabled={isSlotDisabled || undefined}\n data-slot-id={slot.id}\n onClick={() => handleSlotClick(slot, day)}\n onKeyDown={(event) =>\n handleSlotKeyDown(event, slot, day)\n }\n >\n {formatSlotTime(slot, locale, timeZone)}\n </button>\n </li>\n );\n })}\n </ul>\n {hiddenCount > 0 ? (\n <Button\n intent=\"ghost\"\n size={size === 'lg' ? 'md' : 'sm'}\n onClick={() => handleShowMore(day, dayKey)}\n disabled={isInteractionSuppressed}\n >\n {t('slotGrid.showMore', { count: hiddenCount })}\n </Button>\n ) : null}\n </div>\n );\n })}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n id={id}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n className={slotGridVariants({ size, className })}\n data-component=\"slot-grid\"\n data-component-id={id}\n data-state={state}\n {...rest}\n >\n <div className={toolbarVariants()}>\n <IconButton\n icon={<ChevronStartIcon />}\n aria-label={t('slotGrid.previousDays')}\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasPrevious || isInteractionSuppressed}\n onClick={onPreviousDays}\n />\n {showNextAvailable ? (\n <Button\n intent=\"secondary\"\n size={size === 'lg' ? 'md' : 'sm'}\n disabled={isInteractionSuppressed}\n onClick={onJumpToNextAvailable}\n >\n {t('slotGrid.nextAvailable')}\n </Button>\n ) : (\n <span aria-hidden=\"true\" />\n )}\n <IconButton\n icon={<ChevronEndIcon />}\n aria-label={t('slotGrid.nextDays')}\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasNext || isInteractionSuppressed}\n onClick={onNextDays}\n />\n </div>\n\n {body}\n </div>\n );\n },\n);\n\nSlotGrid.displayName = 'SlotGrid';\n"],"names":["slotGridAgent","handle","args","slotGridVariants","cva","toolbarVariants","COLS_MAX","columnsVariants","clampCols","count","columnVariants","dayHeaderVariants","slotListVariants","slotButtonVariants","toDate","value","parseISO","columnKey","day","index","dayKeyOf","format","isSameDate","a","b","isSameDay","findFirstAvailable","days","slot","s","formatDayHeader","date","locale","timeZone","formatSlotTime","start","fmt","end","formatSlotAriaLabel","template","time","dayLabel","ChevronStartIcon","jsx","ChevronEndIcon","SlotGrid","forwardRef","state","size","selectedSlotId","maxInitialSlotsPerDay","localeProp","hasPrevious","hasNext","showNextAvailable","ariaLabel","onSlotSelect","onPreviousDays","onNextDays","onShowMore","onJumpToNextAvailable","className","id","rest","ref","t","i18n","useTranslation","idBase","useId","expanded","setExpanded","useState","isLoading","isDisabled","isInteractionSuppressed","isEmpty","resolvedAriaLabel","handleSlotClick","useCallback","handleShowMore","key","prev","handleSlotKeyDown","event","snapshot","latest","useRef","useEffect","agentHandle","useMemo","byDay","ids","slotId","current","candidate","dayKey","useAgentRegistration","columnCount","columnsClass","body","_","colIdx","jsxs","Skeleton","rowIdx","EmptyState","dayIdx","headerLabel","headerId","visibleSlots","hiddenCount","isDayEmpty","ariaLabelSlot","isSelected","isSlotDisabled","Button","IconButton"],"mappings":";;;;;;;;;;;AAwBO,MAAMA,KAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWJ,cAAc,CAAC,QAAQ,kBAAkB,QAAQ;AAAA,EACjD,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,kBAAA;AAAA,IAAkB;AAAA,IAE7C,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,eAAA;AAAA,IAAe;AAAA,IAE1C,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,cAAA;AAAA,IAAc;AAAA,IAEzC,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,gBAAA;AAAA,IAAgB;AAAA,IAE3C,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,eAAA;AAAA,IAAe;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ACrC,MAAMjB,MAAS,OAAO,OAAO;AAAA,gBAC7B,QAAO;AAAA,gBACP,eAAa;AAAA,gBACb,UAAU,CAACI,KAAeuB;AAAA,gBAC1B,SAASlB;AAAA,cAAA;AAAA,YAAA;AAAA,YAEVH,IACC,gBAAAX;AAAA,cAACyE;AAAA,cAAA;AAAA,gBACC,QAAO;AAAA,gBACP,MAAMpE,MAAS,OAAO,OAAO;AAAA,gBAC7B,UAAU2B;AAAA,gBACV,SAASf;AAAA,gBAER,YAAE,wBAAwB;AAAA,cAAA;AAAA,YAAA,IAG7B,gBAAAjB,EAAC,QAAA,EAAK,eAAY,OAAA,CAAO;AAAA,YAE3B,gBAAAA;AAAA,cAAC0E;AAAA,cAAA;AAAA,gBACC,wBAAOzE,IAAA,EAAe;AAAA,gBACtB,cAAYqB,EAAE,mBAAmB;AAAA,gBACjC,MAAMjB,MAAS,OAAO,OAAO;AAAA,gBAC7B,QAAO;AAAA,gBACP,eAAa;AAAA,gBACb,UAAU,CAACK,KAAWsB;AAAA,gBACtB,SAASjB;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAEC0C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAvD,GAAS,cAAc;"}
|
|
1
|
+
{"version":3,"file":"slot-grid-8Ko6thzz.js","sources":["../../src/components/slot-grid/slot-grid.agent.ts","../../src/components/slot-grid/slot-grid.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — SlotGrid. */\n/* */\n/* Multi-day time-slot picker. Selection stays fully CONTROLLED by the */\n/* consumer (`selectedSlotId` + `onSlotSelect`) — the adapter never */\n/* stores a choice, it reports the committed prop and fires the same */\n/* callback a native click would (the `combobox.set_value` contract). */\n/* */\n/* Two channels reach the same component: */\n/* • the registry — `SlotGridHandle` resolved by (`slot-grid`, id), */\n/* which is the ONLY channel the MCP bridge has (PRS §26 §8.1); */\n/* • the DOM — `data-slot-id` on every rendered slot button, for */\n/* DOM-driving tools (browser extension / computer use) that never */\n/* touch the registry. */\n/* */\n/* PHI (§6.1 / §7): a slot id is an AVAILABILITY identifier and a day */\n/* key is a calendar date. SlotGrid is never handed a patient — its */\n/* inputs are `{ id, start, end?, available?, label? }` plus */\n/* `Intl`-formatted time strings — so no state slot can leak PHI. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { SlotGridHandle } from './slot-grid';\n\nexport const slotGridAgent: AgentAdapter<SlotGridHandle> = {\n id: 'slot-grid',\n // pick → `select_slot` + the `selectedSlotId` state slot.\n // range_navigate → `next_days` / `previous_days` + `hasNext` / `hasPrevious`.\n // expand → `show_more_day` + the `expandedDays` state slot.\n //\n // Host-delegated, deliberately WITHOUT an action: the optional\n // \"Next available\" CTA (`showNextAvailable` + `onJumpToNextAvailable`)\n // stays a native click on the toolbar button. It is a consumer-owned\n // jump to a window the grid has not been given, so the agent reaches it\n // through the DOM, or by reading `slotsByDay` and paging with\n // `next_days` until availability appears.\n capabilities: ['pick', 'range_navigate', 'expand'],\n state: {\n status: {\n type: \"'default' | 'loading' | 'disabled' | 'empty'\",\n descriptionKey: 'ui.agent.slotGrid.state.status',\n description:\n 'Visual state of the grid. Read this before concluding \"no availability\" — `loading` means the window has not resolved yet.',\n read: (handle) => handle.getStatus(),\n },\n selectedSlotId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.slotGrid.state.selectedSlotId',\n description:\n 'Id of the slot the consumer has committed as selected, or null. Reflects the controlled `selectedSlotId` prop, not an internal choice.',\n read: (handle) => handle.getSelectedSlotId(),\n },\n visibleDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.visibleDays',\n description:\n 'Calendar days currently rendered as columns, as `yyyy-MM-dd` keys in display order.',\n read: (handle) => handle.getVisibleDays(),\n },\n slotsByDay: {\n type: 'Record<string, string[]>',\n descriptionKey: 'ui.agent.slotGrid.state.slotsByDay',\n description:\n 'Map of day key (`yyyy-MM-dd`) to the ids of that day’s bookable slots. Ids only — never slot or patient objects. Includes slots still collapsed behind \"Show more\".',\n read: (handle) => handle.getSlotsByDay(),\n },\n expandedDays: {\n type: 'string[]',\n descriptionKey: 'ui.agent.slotGrid.state.expandedDays',\n description:\n 'Day keys whose \"Show more\" control has been used, so every slot for that day is rendered.',\n read: (handle) => handle.getExpandedDays(),\n },\n hasPrevious: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasPrevious',\n description:\n 'True when an earlier window of days exists — the \"previous days\" arrow is offered.',\n read: (handle) => handle.getHasPrevious(),\n },\n hasNext: {\n type: 'boolean',\n descriptionKey: 'ui.agent.slotGrid.state.hasNext',\n description:\n 'True when a later window of days exists — the \"next days\" arrow is offered.',\n read: (handle) => handle.getHasNext(),\n },\n },\n actions: {\n select_slot: {\n // Fires the consumer's `onSlotSelect`, exactly as a click on the slot\n // button does. Persistent in the consumer's booking draft, and\n // reversible by selecting another slot — `write`, not `phi`: a slot is\n // availability, not patient data.\n safety: 'write',\n argsType: '{ slotId: string }',\n argsSchema: {\n type: 'object',\n properties: {\n slotId: {\n type: 'string',\n description:\n 'Id of the slot to select. Must be one of the ids returned by the `slotsByDay` state slot.',\n },\n },\n required: ['slotId'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the selection callback fired.',\n },\n errors: [\n 'Returns false when no slot with that id is in the visible window — page with next_days / previous_days first.',\n 'Returns false when the slot is unavailable, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.selectSlot',\n description:\n 'Select an available slot by id. Emits the same selection the user would by clicking the slot button.',\n examples: [\n {\n args: { slotId: 'avail-2026-09-01-0930' },\n note: 'Book the 09:30 slot on 1 September.',\n },\n ],\n invoke: (handle, args: { slotId: string }) =>\n handle.selectSlot(args.slotId),\n },\n next_days: {\n // View-window paging only — the consumer fetches, nothing is persisted.\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasNext` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.nextDays',\n description:\n 'Page the visible window forward to the next group of days, as the \"next days\" arrow does.',\n invoke: (handle) => handle.nextDays(),\n },\n previous_days: {\n safety: 'read',\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the paging callback fired.',\n },\n errors: [\n 'Returns false when `hasPrevious` is false, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.previousDays',\n description:\n 'Page the visible window back to the previous group of days, as the \"previous days\" arrow does.',\n invoke: (handle) => handle.previousDays(),\n },\n show_more_day: {\n // Reveals slots the grid already holds — ephemeral disclosure state.\n safety: 'read',\n argsType: '{ dayKey: string }',\n argsSchema: {\n type: 'object',\n properties: {\n dayKey: {\n type: 'string',\n pattern: '^\\\\d{4}-\\\\d{2}-\\\\d{2}$',\n description:\n 'Day to expand, as a `yyyy-MM-dd` key from the `visibleDays` state slot.',\n },\n },\n required: ['dayKey'],\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the day was expanded.',\n },\n errors: [\n 'Returns false when the day key is not one of the visible columns, or the grid is loading or disabled.',\n ],\n descriptionKey: 'ui.agent.slotGrid.actions.showMoreDay',\n description:\n 'Render every slot for one day, as the day’s \"Show more\" button does. Only affects what is on screen — `slotsByDay` already lists collapsed slots.',\n examples: [\n {\n args: { dayKey: '2026-09-01' },\n note: 'Reveal the rest of 1 September so every slot button is clickable.',\n },\n ],\n invoke: (handle, args: { dayKey: string }) =>\n handle.showMoreDay(args.dayKey),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'slot-grid',\n description:\n 'Marks the SlotGrid region. Emits `data-state` reflecting the public `state` prop (default / loading / disabled / empty).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the `id` prop. Also the registry key — without an `id` the instance does not register, so the handle-driven actions are unreachable and only the DOM channel works.',\n },\n item: {\n attr: 'data-slot-id',\n sourceProp: 'days[].slots[].id',\n description:\n 'Per-slot button identifier sourced from each `SlotGridSlot.id` — an availability id, never a patient id. DOM-driving agents activate a slot via native click on the matching button.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* SlotGrid — multi-day time-slot picker for patient booking. */\n/* */\n/* Renders N day columns side-by-side. Each column shows a day header */\n/* (formatted via `Intl.DateTimeFormat(locale)`) plus a vertical list */\n/* of slot buttons. Long days collapse to `maxInitialSlotsPerDay` and */\n/* reveal the rest via a \"Show more\" button (progressive disclosure). */\n/* */\n/* Navigation arrows (`onPreviousDays` / `onNextDays`) let the consumer */\n/* page the window of days; the optional \"Next available\" CTA jumps to */\n/* the first day with an open slot. */\n/* */\n/* Purely presentational — no business logic, no data fetching. Date */\n/* comparisons use `date-fns` (never moment.js) and the rendered labels */\n/* come exclusively from `Intl.DateTimeFormat` or the `ui.slotGrid` */\n/* namespace via `useTranslation()`. */\n/* */\n/* Agent surface: `ref` is the outer <div>; a separate `SlotGridHandle` */\n/* (built with `useMemo`, registered via `useAgentRegistration`) gives */\n/* the MCP bridge a read-only view of the visible days + available slot */\n/* ids and the four interactions the UI itself offers. See */\n/* `slot-grid.agent.ts` and PRS §26. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { format, isSameDay, parseISO } from 'date-fns';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { useAgentRegistration } from '../../agent';\nimport { slotGridAgent } from './slot-grid.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type SlotGridState = 'default' | 'loading' | 'disabled' | 'empty';\n\nexport type SlotGridSize = 'sm' | 'md' | 'lg';\n\nexport interface SlotGridSlot {\n /** Stable identity — used by consumers to resolve selection. */\n id: string;\n /** Slot start — ISO string or `Date`. Rendered via `Intl.DateTimeFormat`. */\n start: string | Date;\n /** Optional slot end — if omitted only the start time is announced. */\n end?: string | Date;\n /** Defaults to `true`. Unavailable slots render disabled and are not focusable. */\n available?: boolean;\n /** Override the default `Intl`-formatted time label. */\n label?: string;\n /** Override the accessible name of the slot button. */\n ariaLabel?: string;\n}\n\nexport interface SlotGridDay {\n /** The calendar day the column represents. */\n date: string | Date;\n /** Slots for this day, in chronological order. Empty array ⇒ empty day. */\n slots: SlotGridSlot[];\n /** Override the default `Intl`-formatted day header. */\n label?: string;\n}\n\nexport interface SlotGridProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'onSelect'>,\n VariantProps<typeof slotGridVariants> {\n /** Days to render, one column per entry. */\n days: SlotGridDay[];\n /** Visual / interactive state. Defaults to `'default'`. */\n state?: SlotGridState;\n /** Density of the slot buttons and day headers. Defaults to `'md'`. */\n size?: SlotGridSize;\n /** Id of the currently selected slot (controlled). */\n selectedSlotId?: string;\n /**\n * Initial number of slots to render per day before the \"Show more\"\n * progressive-disclosure control collapses the rest. Defaults to `6`.\n */\n maxInitialSlotsPerDay?: number;\n /**\n * BCP-47 locale tag for `Intl.DateTimeFormat`. Defaults to the active\n * i18next language.\n */\n locale?: string;\n /** IANA time zone for `Intl.DateTimeFormat`. Optional. */\n timeZone?: string;\n /** Whether the \"previous days\" navigation arrow should be enabled. */\n hasPrevious?: boolean;\n /** Whether the \"next days\" navigation arrow should be enabled. */\n hasNext?: boolean;\n /**\n * When `true`, renders the \"Next available\" CTA at the end of the\n * toolbar. Only emits a callback — the consumer owns the navigation.\n */\n showNextAvailable?: boolean;\n /** Accessible label for the outer grid region. */\n ariaLabel?: string;\n /** Fires when the user selects an available slot. */\n onSlotSelect?: (slot: SlotGridSlot, day: SlotGridDay) => void;\n /** Fires when the user clicks the \"previous days\" arrow. */\n onPreviousDays?: () => void;\n /** Fires when the user clicks the \"next days\" arrow. */\n onNextDays?: () => void;\n /** Fires when the user clicks a day's \"Show more\" button. */\n onShowMore?: (day: SlotGridDay) => void;\n /** Fires when the user clicks the \"Next available\" CTA. */\n onJumpToNextAvailable?: () => void;\n}\n\n/**\n * Imperative handle the agent adapter (`slot-grid.agent.ts`) reads and drives.\n *\n * It is NOT the `ref` — `ref` stays the outer `HTMLDivElement` so existing\n * consumers are unaffected. The handle is built with `useMemo` and handed to\n * `useAgentRegistration`, the same shape Autocomplete uses.\n *\n * Every getter returns identifiers and structural state only — availability\n * slot ids, calendar day keys, booleans. Never patient data (PRS §26 §7).\n */\nexport interface SlotGridHandle {\n /** Current visual / interactive state (`default` / `loading` / `disabled` / `empty`). */\n getStatus: () => SlotGridState;\n /** Controlled `selectedSlotId` prop, or `null` when nothing is selected. */\n getSelectedSlotId: () => string | null;\n /** Day keys (`yyyy-MM-dd`) of the currently-rendered columns, in order. */\n getVisibleDays: () => string[];\n /** Day key → ids of that day's AVAILABLE slots (collapsed ones included). */\n getSlotsByDay: () => Record<string, string[]>;\n /** Day keys whose \"Show more\" control has been used. */\n getExpandedDays: () => string[];\n /** Mirrors the `hasPrevious` prop — whether an earlier window exists. */\n getHasPrevious: () => boolean;\n /** Mirrors the `hasNext` prop — whether a later window exists. */\n getHasNext: () => boolean;\n /** Select an available slot by id. Returns `false` when it cannot be selected. */\n selectSlot: (slotId: string) => boolean;\n /** Page the window forward. Returns `false` when the arrow would be disabled. */\n nextDays: () => boolean;\n /** Page the window back. Returns `false` when the arrow would be disabled. */\n previousDays: () => boolean;\n /** Reveal a day's collapsed slots. Returns `false` when the day is not visible. */\n showMoreDay: (dayKey: string) => boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst slotGridVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:w-full',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-sm)]',\n md: 'ds:text-[length:var(--font-size-base)]',\n lg: 'ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst toolbarVariants = cva(\n 'ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full',\n);\n\n/**\n * Column-count is dynamic (1–12), so it is declared as a full CVA variant —\n * this keeps every `grid-cols-N` string statically visible to Tailwind's\n * JIT and keeps the variant table inside CVA rather than hand-rolled.\n */\nconst COLS_MAX = 12;\n\nconst columnsVariants = cva(\n 'ds:grid ds:gap-[var(--spacing-sm)] ds:w-full ds:auto-rows-min ds:items-start',\n {\n variants: {\n cols: {\n 1: 'ds:grid-cols-1',\n 2: 'ds:grid-cols-2',\n 3: 'ds:grid-cols-3',\n 4: 'ds:grid-cols-4',\n 5: 'ds:grid-cols-5',\n 6: 'ds:grid-cols-6',\n 7: 'ds:grid-cols-7',\n 8: 'ds:grid-cols-8',\n 9: 'ds:grid-cols-9',\n 10: 'ds:grid-cols-10',\n 11: 'ds:grid-cols-11',\n 12: 'ds:grid-cols-12',\n },\n },\n defaultVariants: { cols: 1 },\n },\n);\n\ntype ColumnsCount = NonNullable<VariantProps<typeof columnsVariants>['cols']>;\n\nfunction clampCols(count: number): ColumnsCount {\n return Math.max(1, Math.min(count, COLS_MAX)) as ColumnsCount;\n}\n\nconst columnVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:bg-[var(--card)]',\n 'ds:min-w-0',\n ].join(' '),\n);\n\nconst dayHeaderVariants = cva(\n [\n 'ds:font-[var(--font-weight-semibold)]',\n 'ds:text-[var(--foreground)]',\n 'ds:text-start',\n 'ds:truncate',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-xs)]',\n md: 'ds:text-[length:var(--font-size-sm)]',\n lg: 'ds:text-[length:var(--font-size-base)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst slotListVariants = cva(\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full ds:m-0 ds:p-0 ds:list-none',\n);\n\nconst slotButtonVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:w-full',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:font-[var(--font-weight-medium)]',\n 'ds:bg-[var(--secondary)]',\n 'ds:shadow-[var(--shadow-sm)]',\n 'ds:text-[var(--foreground)]',\n 'ds:transition-[background-color,color,box-shadow]',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[var(--focus-ring-offset)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed ds:disabled:shadow-none',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed ds:aria-disabled:shadow-none',\n 'ds:hover:enabled:shadow-[var(--shadow-md)]',\n 'ds:aria-pressed:bg-[var(--primary)] ds:aria-pressed:text-[var(--primary-foreground)]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:text-[length:var(--font-size-xs)] ds:h-8',\n md: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:h-10',\n lg: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-base)] ds:h-12',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction toDate(value: string | Date): Date {\n return value instanceof Date ? value : parseISO(value);\n}\n\n/**\n * Internal identity for one rendered column. The index guards against a\n * consumer passing the same calendar date twice.\n */\nfunction columnKey(day: SlotGridDay, index: number): string {\n return `${toDate(day.date).toISOString()}-${index}`;\n}\n\n/**\n * Agent-facing key for one column — the local calendar date as `yyyy-MM-dd`.\n * Structural, locale-independent, and carries no patient data.\n */\nfunction dayKeyOf(day: SlotGridDay): string {\n return format(toDate(day.date), 'yyyy-MM-dd');\n}\n\n/** Is `a` the same calendar day as `b`? Uses `date-fns`, locale-agnostic. */\nexport function isSameDate(a: string | Date, b: string | Date): boolean {\n return isSameDay(toDate(a), toDate(b));\n}\n\n/** Find the first day in a list that has at least one available slot. */\nexport function findFirstAvailable(\n days: SlotGridDay[],\n): { day: SlotGridDay; slot: SlotGridSlot } | undefined {\n for (const day of days) {\n const slot = day.slots.find((s) => s.available !== false);\n if (slot) return { day, slot };\n }\n return undefined;\n}\n\nfunction formatDayHeader(\n date: Date,\n locale: string,\n timeZone?: string,\n): string {\n try {\n return new Intl.DateTimeFormat(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n timeZone,\n }).format(date);\n } catch {\n return new Intl.DateTimeFormat('en', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n }).format(date);\n }\n}\n\nfunction formatSlotTime(\n slot: SlotGridSlot,\n locale: string,\n timeZone?: string,\n): string {\n if (slot.label !== undefined) return slot.label;\n const start = toDate(slot.start);\n try {\n const fmt = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n timeZone,\n });\n if (slot.end) {\n const end = toDate(slot.end);\n if (typeof fmt.formatRange === 'function') {\n try {\n return fmt.formatRange(start, end);\n } catch {\n /* fall through */\n }\n }\n return `${fmt.format(start)} – ${fmt.format(end)}`;\n }\n return fmt.format(start);\n } catch {\n return start.toISOString();\n }\n}\n\nfunction formatSlotAriaLabel(\n slot: SlotGridSlot,\n day: SlotGridDay,\n locale: string,\n timeZone: string | undefined,\n template: (opts: { time: string; day: string }) => string,\n): string {\n if (slot.ariaLabel !== undefined) return slot.ariaLabel;\n const time = formatSlotTime(slot, locale, timeZone);\n const dayLabel =\n day.label !== undefined\n ? day.label\n : formatDayHeader(toDate(day.date), locale, timeZone);\n return template({ time, day: dayLabel });\n}\n\n/* ------------------------------------------------------------------ */\n/* Glyphs — logical-direction arrows */\n/* ------------------------------------------------------------------ */\n\nfunction ChevronStartIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M15 18l-6-6 6-6\" />\n </svg>\n );\n}\n\nfunction ChevronEndIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"ds:size-4\"\n >\n <path d=\"M9 6l6 6-6 6\" />\n </svg>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const SlotGrid = forwardRef<HTMLDivElement, SlotGridProps>(\n (\n {\n days,\n state = 'default',\n size = 'md',\n selectedSlotId,\n maxInitialSlotsPerDay = 6,\n locale: localeProp,\n timeZone,\n hasPrevious = false,\n hasNext = false,\n showNextAvailable = false,\n ariaLabel,\n onSlotSelect,\n onPreviousDays,\n onNextDays,\n onShowMore,\n onJumpToNextAvailable,\n className,\n id,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const locale = localeProp ?? i18n.language ?? 'en';\n const idBase = useId();\n\n const [expanded, setExpanded] = useState<Record<string, boolean>>({});\n\n const isLoading = state === 'loading';\n const isDisabled = state === 'disabled';\n const isInteractionSuppressed = isLoading || isDisabled;\n const isEmpty =\n state === 'empty' ||\n days.length === 0 ||\n days.every((day) => day.slots.length === 0);\n\n const resolvedAriaLabel = ariaLabel ?? t('slotGrid.ariaLabel');\n\n const handleSlotClick = useCallback(\n (slot: SlotGridSlot, day: SlotGridDay) => {\n if (isInteractionSuppressed) return;\n if (slot.available === false) return;\n onSlotSelect?.(slot, day);\n },\n [isInteractionSuppressed, onSlotSelect],\n );\n\n const handleShowMore = useCallback(\n (day: SlotGridDay, key: string) => {\n setExpanded((prev) => ({ ...prev, [key]: true }));\n onShowMore?.(day);\n },\n [onShowMore],\n );\n\n const handleSlotKeyDown = useCallback(\n (\n event: KeyboardEvent<HTMLButtonElement>,\n slot: SlotGridSlot,\n day: SlotGridDay,\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleSlotClick(slot, day);\n }\n },\n [handleSlotClick],\n );\n\n /* ---- Agent handle ---------------------------------------------- */\n /* `ref` stays the outer <div> (unchanged for consumers). The agent */\n /* handle is a separate, memo-stable object — the Autocomplete shape. */\n /* A snapshot ref mirrors props + internal state so the handle reads */\n /* fresh values without re-registering on every render. */\n\n const snapshot = {\n days,\n selectedSlotId,\n hasPrevious,\n hasNext,\n state,\n expanded,\n isInteractionSuppressed,\n onPreviousDays,\n onNextDays,\n handleSlotClick,\n handleShowMore,\n };\n const latest = useRef(snapshot);\n useEffect(() => {\n latest.current = snapshot;\n });\n\n const agentHandle = useMemo<SlotGridHandle>(\n () => ({\n getStatus: () => latest.current.state,\n getSelectedSlotId: () => latest.current.selectedSlotId ?? null,\n getVisibleDays: () => latest.current.days.map(dayKeyOf),\n getSlotsByDay: () => {\n // Ids only — never the slot objects (PRS §26 §7 / auditor A9).\n const byDay: Record<string, string[]> = {};\n for (const day of latest.current.days) {\n const key = dayKeyOf(day);\n const ids = day.slots\n .filter((slot) => slot.available !== false)\n .map((slot) => slot.id);\n byDay[key] = byDay[key] ? [...byDay[key], ...ids] : ids;\n }\n return byDay;\n },\n getExpandedDays: () =>\n latest.current.days\n .filter(\n (day, index) =>\n latest.current.expanded[columnKey(day, index)] === true,\n )\n .map(dayKeyOf),\n getHasPrevious: () => latest.current.hasPrevious,\n getHasNext: () => latest.current.hasNext,\n selectSlot: (slotId) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n for (const day of current.days) {\n const slot = day.slots.find((candidate) => candidate.id === slotId);\n if (!slot) continue;\n if (slot.available === false) return false;\n // Same code path as a native click on the slot button.\n current.handleSlotClick(slot, day);\n return true;\n }\n return false;\n },\n nextDays: () => {\n const current = latest.current;\n if (!current.hasNext || current.isInteractionSuppressed) return false;\n if (!current.onNextDays) return false;\n current.onNextDays();\n return true;\n },\n previousDays: () => {\n const current = latest.current;\n if (!current.hasPrevious || current.isInteractionSuppressed) {\n return false;\n }\n if (!current.onPreviousDays) return false;\n current.onPreviousDays();\n return true;\n },\n showMoreDay: (dayKey) => {\n const current = latest.current;\n if (current.isInteractionSuppressed) return false;\n const index = current.days.findIndex(\n (day) => dayKeyOf(day) === dayKey,\n );\n if (index < 0) return false;\n const day = current.days[index];\n current.handleShowMore(day, columnKey(day, index));\n return true;\n },\n }),\n [],\n );\n\n useAgentRegistration(slotGridAgent, agentHandle, id);\n\n const columnCount = clampCols(days.length || 1);\n const columnsClass = columnsVariants({ cols: columnCount });\n\n /* ---- Rendered content ------------------------------------------ */\n\n let body: ReactNode;\n if (isLoading) {\n body = (\n <div\n className={columnsClass}\n data-state=\"loading\"\n role=\"status\"\n aria-live=\"polite\"\n aria-label={t('common.loading')}\n >\n {Array.from({ length: columnCount }, (_, colIdx) => (\n <div key={`loading-col-${colIdx}`} className={columnVariants()}>\n <Skeleton variant=\"text\" size={size} width=\"60%\" />\n <div className={slotListVariants()}>\n {Array.from(\n { length: Math.min(maxInitialSlotsPerDay, 4) },\n (_, rowIdx) => (\n <Skeleton\n key={`loading-slot-${colIdx}-${rowIdx}`}\n variant=\"rounded\"\n size={size}\n height=\"40px\"\n />\n ),\n )}\n </div>\n </div>\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = (\n <div data-state=\"empty\">\n <EmptyState variant=\"no-results\" title={t('slotGrid.noSlots')} />\n </div>\n );\n } else {\n body = (\n <div\n className={columnsClass}\n data-state={isDisabled ? 'disabled' : 'default'}\n >\n {days.map((day, dayIdx) => {\n const dayKey = columnKey(day, dayIdx);\n const headerLabel =\n day.label ?? formatDayHeader(toDate(day.date), locale, timeZone);\n const headerId = `${idBase}-day-${dayIdx}-header`;\n const isExpanded = expanded[dayKey] ?? false;\n const visibleSlots = isExpanded\n ? day.slots\n : day.slots.slice(0, maxInitialSlotsPerDay);\n const hiddenCount = day.slots.length - visibleSlots.length;\n\n const isDayEmpty = day.slots.length === 0;\n\n return (\n // Use a plain <div role=\"group\"> rather than <section> — a\n // <section> with aria-labelledby is a landmark, and nesting many\n // landmarks inside the outer slot-grid landmark fails axe's\n // landmark-unique rule.\n <div\n key={dayKey}\n role=\"group\"\n className={columnVariants()}\n aria-labelledby={headerId}\n data-empty={isDayEmpty || undefined}\n >\n <h3 id={headerId} className={dayHeaderVariants({ size })}>\n {headerLabel}\n </h3>\n {isDayEmpty ? (\n <p className=\"type-body-sm ds:text-[var(--muted-foreground)] ds:m-0\">\n {t('slotGrid.noSlots')}\n </p>\n ) : null}\n <ul className={slotListVariants()}>\n {visibleSlots.map((slot) => {\n const ariaLabelSlot = formatSlotAriaLabel(\n slot,\n day,\n locale,\n timeZone,\n ({ time, day: dayLabel }) =>\n t('slotGrid.slotLabel', { time, day: dayLabel }),\n );\n const isSelected = selectedSlotId === slot.id;\n const isSlotDisabled =\n slot.available === false || isInteractionSuppressed;\n return (\n <li key={slot.id}>\n <button\n type=\"button\"\n className={slotButtonVariants({ size })}\n aria-label={ariaLabelSlot}\n aria-pressed={isSelected}\n disabled={isSlotDisabled}\n aria-disabled={isSlotDisabled || undefined}\n data-slot-id={slot.id}\n onClick={() => handleSlotClick(slot, day)}\n onKeyDown={(event) =>\n handleSlotKeyDown(event, slot, day)\n }\n >\n {formatSlotTime(slot, locale, timeZone)}\n </button>\n </li>\n );\n })}\n </ul>\n {hiddenCount > 0 ? (\n <Button\n intent=\"ghost\"\n size={size === 'lg' ? 'md' : 'sm'}\n onClick={() => handleShowMore(day, dayKey)}\n disabled={isInteractionSuppressed}\n >\n {t('slotGrid.showMore', { count: hiddenCount })}\n </Button>\n ) : null}\n </div>\n );\n })}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n id={id}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n className={slotGridVariants({ size, className })}\n data-component=\"slot-grid\"\n data-component-id={id}\n data-state={state}\n {...rest}\n >\n <div className={toolbarVariants()}>\n <IconButton\n icon={<ChevronStartIcon />}\n aria-label={t('slotGrid.previousDays')}\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasPrevious || isInteractionSuppressed}\n onClick={onPreviousDays}\n />\n {showNextAvailable ? (\n <Button\n intent=\"secondary\"\n size={size === 'lg' ? 'md' : 'sm'}\n disabled={isInteractionSuppressed}\n onClick={onJumpToNextAvailable}\n >\n {t('slotGrid.nextAvailable')}\n </Button>\n ) : (\n <span aria-hidden=\"true\" />\n )}\n <IconButton\n icon={<ChevronEndIcon />}\n aria-label={t('slotGrid.nextDays')}\n size={size === 'lg' ? 'md' : 'sm'}\n intent=\"ghost\"\n flipIconInRtl\n disabled={!hasNext || isInteractionSuppressed}\n onClick={onNextDays}\n />\n </div>\n\n {body}\n </div>\n );\n },\n);\n\nSlotGrid.displayName = 'SlotGrid';\n"],"names":["slotGridAgent","handle","args","slotGridVariants","cva","toolbarVariants","COLS_MAX","columnsVariants","clampCols","count","columnVariants","dayHeaderVariants","slotListVariants","slotButtonVariants","toDate","value","parseISO","columnKey","day","index","dayKeyOf","format","isSameDate","a","b","isSameDay","findFirstAvailable","days","slot","s","formatDayHeader","date","locale","timeZone","formatSlotTime","start","fmt","end","formatSlotAriaLabel","template","time","dayLabel","ChevronStartIcon","jsx","ChevronEndIcon","SlotGrid","forwardRef","state","size","selectedSlotId","maxInitialSlotsPerDay","localeProp","hasPrevious","hasNext","showNextAvailable","ariaLabel","onSlotSelect","onPreviousDays","onNextDays","onShowMore","onJumpToNextAvailable","className","id","rest","ref","t","i18n","useTranslation","idBase","useId","expanded","setExpanded","useState","isLoading","isDisabled","isInteractionSuppressed","isEmpty","resolvedAriaLabel","handleSlotClick","useCallback","handleShowMore","key","prev","handleSlotKeyDown","event","snapshot","latest","useRef","useEffect","agentHandle","useMemo","byDay","ids","slotId","current","candidate","dayKey","useAgentRegistration","columnCount","columnsClass","body","_","colIdx","jsxs","Skeleton","rowIdx","EmptyState","dayIdx","headerLabel","headerId","visibleSlots","hiddenCount","isDayEmpty","ariaLabelSlot","isSelected","isSlotDisabled","Button","IconButton"],"mappings":";;;;;;;;;;;AAwBO,MAAMA,KAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWJ,cAAc,CAAC,QAAQ,kBAAkB,QAAQ;AAAA,EACjD,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,kBAAA;AAAA,IAAkB;AAAA,IAE7C,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,eAAA;AAAA,IAAe;AAAA,IAE1C,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA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AA,QAC/C,kBAAe;AAAA,QACf,qBAAmBC;AAAA,QACnB,cAAYf;AAAA,QACX,GAAGgB;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAwC,EAAC,OAAA,EAAI,WAAWlG,GAAA,GACd,UAAA;AAAA,YAAA,gBAAAsC;AAAA,cAAC0E;AAAA,cAAA;AAAA,gBACC,wBAAO3E,IAAA,EAAiB;AAAA,gBACxB,cAAYuB,EAAE,uBAAuB;AAAA,gBACrC,MAAMjB,MAAS,OAAO,OAAO;AAAA,gBAC7B,QAAO;AAAA,gBACP,eAAa;AAAA,gBACb,UAAU,CAACI,KAAeuB;AAAA,gBAC1B,SAASlB;AAAA,cAAA;AAAA,YAAA;AAAA,YAEVH,IACC,gBAAAX;AAAA,cAACyE;AAAA,cAAA;AAAA,gBACC,QAAO;AAAA,gBACP,MAAMpE,MAAS,OAAO,OAAO;AAAA,gBAC7B,UAAU2B;AAAA,gBACV,SAASf;AAAA,gBAER,YAAE,wBAAwB;AAAA,cAAA;AAAA,YAAA,IAG7B,gBAAAjB,EAAC,QAAA,EAAK,eAAY,OAAA,CAAO;AAAA,YAE3B,gBAAAA;AAAA,cAAC0E;AAAA,cAAA;AAAA,gBACC,wBAAOzE,IAAA,EAAe;AAAA,gBACtB,cAAYqB,EAAE,mBAAmB;AAAA,gBACjC,MAAMjB,MAAS,OAAO,OAAO;AAAA,gBAC7B,QAAO;AAAA,gBACP,eAAa;AAAA,gBACb,UAAU,CAACK,KAAWsB;AAAA,gBACtB,SAASjB;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAEC0C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAvD,GAAS,cAAc;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as h, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as y, useState as v, useEffect as b, Fragment as m } from "react";
|
|
3
3
|
import { c as x } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { s as g, C } from "./code-block-
|
|
4
|
+
import { s as g, C } from "./code-block-uVjNSI9g.js";
|
|
5
5
|
const z = x(
|
|
6
6
|
"type-body ds:block ds:whitespace-pre-wrap ds:break-words",
|
|
7
7
|
{
|
|
@@ -128,4 +128,4 @@ j.displayName = "StreamingText";
|
|
|
128
128
|
export {
|
|
129
129
|
j as S
|
|
130
130
|
};
|
|
131
|
-
//# sourceMappingURL=streaming-text-
|
|
131
|
+
//# sourceMappingURL=streaming-text-DjFqLSt_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming-text-CvsjIQ7S.js","sources":["../../src/components/streaming-text/streaming-text.tsx"],"sourcesContent":["import {\n forwardRef,\n Fragment,\n useEffect,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CodeBlock, splitCodeFences } from '../_shared/code-block';\n\nconst containerVariants = cva(\n 'type-body ds:block ds:whitespace-pre-wrap ds:break-words',\n {\n variants: {\n // Family, weight, tracking, line-height all come from `.type-body` on the base.\n // Size variants override --type-body-size to shift the ramp step.\n size: {\n sm: 'ds:[--type-body-size:var(--font-size-sm)]',\n md: '',\n lg: 'ds:[--type-body-size:var(--font-size-lg)]',\n },\n density: {\n default: '',\n compact: 'ds:[--type-body-size:var(--font-size-sm)] ds:leading-snug',\n },\n },\n defaultVariants: { size: 'md', density: 'default' },\n },\n);\n\ntype NativeProps = Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children' | 'aria-busy' | 'aria-live'\n>;\n\nexport interface StreamingTextProps\n extends NativeProps, VariantProps<typeof containerVariants> {\n /** Accumulated plain-text content. Parent appends tokens as they arrive. */\n content: string;\n /** While true the blinking cursor is shown and aria-busy is set. */\n isStreaming: boolean;\n /** When true, parse a small, safe subset of markdown (bold, inline code, line-breaks).\n * No HTML passes through; no dangerouslySetInnerHTML is ever used. */\n renderMarkdown?: boolean;\n /** Announce updates more aggressively when the streamed content is primary\n * (not wrapped by a higher-level log region). Defaults to 'polite'; never\n * set to 'assertive' for streamed output. */\n ariaLive?: 'polite' | 'off';\n}\n\n/* ------------------------------------------------------------------ */\n/* Safe, dependency-free markdown-ish renderer. */\n/* Handles **bold**, `inline code`, and newlines. Anything that looks */\n/* like HTML stays as text — no dangerouslySetInnerHTML. */\n/* ------------------------------------------------------------------ */\n\ntype Token =\n | { type: 'text'; value: string }\n | { type: 'bold'; value: string }\n | { type: 'code'; value: string }\n | { type: 'br' };\n\nfunction tokenize(input: string): Token[] {\n // Single-pass O(n) scanner. Avoids regex backtracking on `***` triples.\n const tokens: Token[] = [];\n const len = input.length;\n const STAR = 42; // '*'\n const BACKTICK = 96; // '`'\n const LF = 10; // '\\n'\n let textStart = 0;\n let i = 0;\n\n const flushText = (end: number) => {\n if (end > textStart) {\n tokens.push({ type: 'text', value: input.slice(textStart, end) });\n }\n };\n\n while (i < len) {\n const c = input.charCodeAt(i);\n\n if (c === STAR && i + 1 < len && input.charCodeAt(i + 1) === STAR) {\n // Look for closing `**`; inner content must not contain `*`.\n let j = i + 2;\n while (j < len && input.charCodeAt(j) !== STAR) j++;\n if (j < len - 1 && input.charCodeAt(j + 1) === STAR && j > i + 2) {\n flushText(i);\n tokens.push({ type: 'bold', value: input.slice(i + 2, j) });\n i = j + 2;\n textStart = i;\n continue;\n }\n i += 2;\n continue;\n }\n\n if (c === BACKTICK) {\n let j = i + 1;\n while (j < len && input.charCodeAt(j) !== BACKTICK) j++;\n if (j < len && j > i + 1) {\n flushText(i);\n tokens.push({ type: 'code', value: input.slice(i + 1, j) });\n i = j + 1;\n textStart = i;\n continue;\n }\n i += 1;\n continue;\n }\n\n if (c === LF) {\n flushText(i);\n tokens.push({ type: 'br' });\n i += 1;\n textStart = i;\n continue;\n }\n\n i += 1;\n }\n\n flushText(len);\n return tokens;\n}\n\nfunction renderInline(input: string): ReactNode {\n return tokenize(input).map((tok, i) => {\n if (tok.type === 'bold') return <strong key={i}>{tok.value}</strong>;\n if (tok.type === 'code') {\n return (\n <code\n key={i}\n dir=\"ltr\"\n className=\"ds:rounded-[var(--radius-sm)] ds:bg-muted/20 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)] ds:text-[length:0.95em]\"\n >\n {tok.value}\n </code>\n );\n }\n if (tok.type === 'br') return <br key={i} />;\n return <Fragment key={i}>{tok.value}</Fragment>;\n });\n}\n\n/**\n * Render the streamed body: split fenced code blocks out to `<CodeBlock>` and\n * run the inline tokenizer over the surrounding text. Tolerates an open fence\n * (closing ``` not yet streamed) — the prompt renders as a code block live.\n */\nfunction renderTokens(input: string): ReactNode {\n return splitCodeFences(input).map((seg, i) => {\n if (seg.type === 'code') {\n return <CodeBlock key={i} code={seg.value} language={seg.lang} />;\n }\n return <Fragment key={i}>{renderInline(seg.value)}</Fragment>;\n });\n}\n\nexport const StreamingText = forwardRef<HTMLSpanElement, StreamingTextProps>(\n (\n {\n content,\n isStreaming,\n renderMarkdown = false,\n ariaLive = 'polite',\n size = 'md',\n density = 'default',\n className,\n ...rest\n },\n ref,\n ) => {\n // Throttle visible content to at most ~10 updates per second so assistive\n // tech doesn't receive one announcement per token. We keep the full text in\n // a ref and push it to state on a timer.\n const [visible, setVisible] = useState<string>(content);\n\n useEffect(() => {\n if (!isStreaming) {\n // Streaming ended — flush immediately.\n setVisible(content);\n return;\n }\n // Global `setTimeout` works in both Node and browsers — avoid the\n // `window.` prefix so SSR (Next.js App Router, Remix) doesn't throw.\n const handle = setTimeout(() => setVisible(content), 100);\n return () => clearTimeout(handle);\n }, [content, isStreaming]);\n\n const body = renderMarkdown ? renderTokens(visible) : visible;\n\n return (\n <span\n ref={ref}\n aria-live={ariaLive}\n aria-busy={isStreaming ? true : false}\n data-component=\"streaming-text\"\n className={containerVariants({ size, density, className })}\n {...rest}\n >\n {body}\n {isStreaming ? (\n <span\n aria-hidden=\"true\"\n className={[\n 'ds:inline-block ds:align-baseline',\n 'ds:text-[color:var(--primary)]',\n 'ds:motion-safe:animate-[streaming-cursor-blink_1s_step-end_infinite]',\n 'ds:motion-reduce:opacity-100',\n 'ds:[.theme-accessible_&]:animate-none',\n 'ds:forced-colors:text-[CanvasText]',\n 'ds:ms-[1px]',\n ].join(' ')}\n >\n {'\\u258D'}\n </span>\n ) : null}\n </span>\n );\n },\n);\n\nStreamingText.displayName = 'StreamingText';\n"],"names":["containerVariants","cva","tokenize","input","tokens","len","STAR","BACKTICK","LF","textStart","i","flushText","end","c","j","renderInline","tok","jsx","Fragment","renderTokens","splitCodeFences","seg","CodeBlock","StreamingText","forwardRef","content","isStreaming","renderMarkdown","ariaLive","size","density","className","rest","ref","visible","setVisible","useState","useEffect","handle","body","jsxs"],"mappings":";;;;AAWA,MAAMA,IAAoBC;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA;AAAA,MAGR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,iBAAiB,EAAE,MAAM,MAAM,SAAS,UAAA;AAAA,EAAU;AAEtD;AAkCA,SAASC,EAASC,GAAwB;AAExC,QAAMC,IAAkB,CAAA,GAClBC,IAAMF,EAAM,QACZG,IAAO,IACPC,IAAW,IACXC,IAAK;AACX,MAAIC,IAAY,GACZC,IAAI;AAER,QAAMC,IAAY,CAACC,MAAgB;AACjC,IAAIA,IAAMH,KACRL,EAAO,KAAK,EAAE,MAAM,QAAQ,OAAOD,EAAM,MAAMM,GAAWG,CAAG,GAAG;AAAA,EAEpE;AAEA,SAAOF,IAAIL,KAAK;AACd,UAAMQ,IAAIV,EAAM,WAAWO,CAAC;AAE5B,QAAIG,MAAMP,KAAQI,IAAI,IAAIL,KAAOF,EAAM,WAAWO,IAAI,CAAC,MAAMJ,GAAM;AAEjE,UAAIQ,IAAIJ,I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;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,eAAY;AAAA,cACZ,WAAW;AAAA,gBACT;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cAAA,EACA,KAAK,GAAG;AAAA,cAET,UAAA;AAAA,YAAA;AAAA,UAAA,IAED;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAM,EAAc,cAAc;"}
|
|
1
|
+
{"version":3,"file":"streaming-text-DjFqLSt_.js","sources":["../../src/components/streaming-text/streaming-text.tsx"],"sourcesContent":["import {\n forwardRef,\n Fragment,\n useEffect,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CodeBlock, splitCodeFences } from '../_shared/code-block';\n\nconst containerVariants = cva(\n 'type-body ds:block ds:whitespace-pre-wrap ds:break-words',\n {\n variants: {\n // Family, weight, tracking, line-height all come from `.type-body` on the base.\n // Size variants override --type-body-size to shift the ramp step.\n size: {\n sm: 'ds:[--type-body-size:var(--font-size-sm)]',\n md: '',\n lg: 'ds:[--type-body-size:var(--font-size-lg)]',\n },\n density: {\n default: '',\n compact: 'ds:[--type-body-size:var(--font-size-sm)] ds:leading-snug',\n },\n },\n defaultVariants: { size: 'md', density: 'default' },\n },\n);\n\ntype NativeProps = Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children' | 'aria-busy' | 'aria-live'\n>;\n\nexport interface StreamingTextProps\n extends NativeProps, VariantProps<typeof containerVariants> {\n /** Accumulated plain-text content. Parent appends tokens as they arrive. */\n content: string;\n /** While true the blinking cursor is shown and aria-busy is set. */\n isStreaming: boolean;\n /** When true, parse a small, safe subset of markdown (bold, inline code, line-breaks).\n * No HTML passes through; no dangerouslySetInnerHTML is ever used. */\n renderMarkdown?: boolean;\n /** Announce updates more aggressively when the streamed content is primary\n * (not wrapped by a higher-level log region). Defaults to 'polite'; never\n * set to 'assertive' for streamed output. */\n ariaLive?: 'polite' | 'off';\n}\n\n/* ------------------------------------------------------------------ */\n/* Safe, dependency-free markdown-ish renderer. */\n/* Handles **bold**, `inline code`, and newlines. Anything that looks */\n/* like HTML stays as text — no dangerouslySetInnerHTML. */\n/* ------------------------------------------------------------------ */\n\ntype Token =\n | { type: 'text'; value: string }\n | { type: 'bold'; value: string }\n | { type: 'code'; value: string }\n | { type: 'br' };\n\nfunction tokenize(input: string): Token[] {\n // Single-pass O(n) scanner. Avoids regex backtracking on `***` triples.\n const tokens: Token[] = [];\n const len = input.length;\n const STAR = 42; // '*'\n const BACKTICK = 96; // '`'\n const LF = 10; // '\\n'\n let textStart = 0;\n let i = 0;\n\n const flushText = (end: number) => {\n if (end > textStart) {\n tokens.push({ type: 'text', value: input.slice(textStart, end) });\n }\n };\n\n while (i < len) {\n const c = input.charCodeAt(i);\n\n if (c === STAR && i + 1 < len && input.charCodeAt(i + 1) === STAR) {\n // Look for closing `**`; inner content must not contain `*`.\n let j = i + 2;\n while (j < len && input.charCodeAt(j) !== STAR) j++;\n if (j < len - 1 && input.charCodeAt(j + 1) === STAR && j > i + 2) {\n flushText(i);\n tokens.push({ type: 'bold', value: input.slice(i + 2, j) });\n i = j + 2;\n textStart = i;\n continue;\n }\n i += 2;\n continue;\n }\n\n if (c === BACKTICK) {\n let j = i + 1;\n while (j < len && input.charCodeAt(j) !== BACKTICK) j++;\n if (j < len && j > i + 1) {\n flushText(i);\n tokens.push({ type: 'code', value: input.slice(i + 1, j) });\n i = j + 1;\n textStart = i;\n continue;\n }\n i += 1;\n continue;\n }\n\n if (c === LF) {\n flushText(i);\n tokens.push({ type: 'br' });\n i += 1;\n textStart = i;\n continue;\n }\n\n i += 1;\n }\n\n flushText(len);\n return tokens;\n}\n\nfunction renderInline(input: string): ReactNode {\n return tokenize(input).map((tok, i) => {\n if (tok.type === 'bold') return <strong key={i}>{tok.value}</strong>;\n if (tok.type === 'code') {\n return (\n <code\n key={i}\n dir=\"ltr\"\n className=\"ds:rounded-[var(--radius-sm)] ds:bg-muted/20 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)] ds:text-[length:0.95em]\"\n >\n {tok.value}\n </code>\n );\n }\n if (tok.type === 'br') return <br key={i} />;\n return <Fragment key={i}>{tok.value}</Fragment>;\n });\n}\n\n/**\n * Render the streamed body: split fenced code blocks out to `<CodeBlock>` and\n * run the inline tokenizer over the surrounding text. Tolerates an open fence\n * (closing ``` not yet streamed) — the prompt renders as a code block live.\n */\nfunction renderTokens(input: string): ReactNode {\n return splitCodeFences(input).map((seg, i) => {\n if (seg.type === 'code') {\n return <CodeBlock key={i} code={seg.value} language={seg.lang} />;\n }\n return <Fragment key={i}>{renderInline(seg.value)}</Fragment>;\n });\n}\n\nexport const StreamingText = forwardRef<HTMLSpanElement, StreamingTextProps>(\n (\n {\n content,\n isStreaming,\n renderMarkdown = false,\n ariaLive = 'polite',\n size = 'md',\n density = 'default',\n className,\n ...rest\n },\n ref,\n ) => {\n // Throttle visible content to at most ~10 updates per second so assistive\n // tech doesn't receive one announcement per token. We keep the full text in\n // a ref and push it to state on a timer.\n const [visible, setVisible] = useState<string>(content);\n\n useEffect(() => {\n if (!isStreaming) {\n // Streaming ended — flush immediately.\n setVisible(content);\n return;\n }\n // Global `setTimeout` works in both Node and browsers — avoid the\n // `window.` prefix so SSR (Next.js App Router, Remix) doesn't throw.\n const handle = setTimeout(() => setVisible(content), 100);\n return () => clearTimeout(handle);\n }, [content, isStreaming]);\n\n const body = renderMarkdown ? renderTokens(visible) : visible;\n\n return (\n <span\n ref={ref}\n aria-live={ariaLive}\n aria-busy={isStreaming ? true : false}\n data-component=\"streaming-text\"\n className={containerVariants({ size, density, className })}\n {...rest}\n >\n {body}\n {isStreaming ? (\n <span\n aria-hidden=\"true\"\n className={[\n 'ds:inline-block ds:align-baseline',\n 'ds:text-[color:var(--primary)]',\n 'ds:motion-safe:animate-[streaming-cursor-blink_1s_step-end_infinite]',\n 'ds:motion-reduce:opacity-100',\n 'ds:[.theme-accessible_&]:animate-none',\n 'ds:forced-colors:text-[CanvasText]',\n 'ds:ms-[1px]',\n ].join(' ')}\n >\n {'\\u258D'}\n </span>\n ) : null}\n </span>\n );\n },\n);\n\nStreamingText.displayName = 'StreamingText';\n"],"names":["containerVariants","cva","tokenize","input","tokens","len","STAR","BACKTICK","LF","textStart","i","flushText","end","c","j","renderInline","tok","jsx","Fragment","renderTokens","splitCodeFences","seg","CodeBlock","StreamingText","forwardRef","content","isStreaming","renderMarkdown","ariaLive","size","density","className","rest","ref","visible","setVisible","useState","useEffect","handle","body","jsxs"],"mappings":";;;;AAWA,MAAMA,IAAoBC;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA;AAAA,MAGR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,iBAAiB,EAAE,MAAM,MAAM,SAAS,UAAA;AAAA,EAAU;AAEtD;AAkCA,SAASC,EAASC,GAAwB;AAExC,QAAMC,IAAkB,CAAA,GAClBC,IAAMF,EAAM,QACZG,IAAO,IACPC,IAAW,IACXC,IAAK;AACX,MAAIC,IAAY,GACZC,IAAI;AAER,QAAMC,IAAY,CAACC,MAAgB;AACjC,IAAIA,IAAMH,KACRL,EAAO,KAAK,EAAE,MAAM,QAAQ,OAAOD,EAAM,MAAMM,GAAWG,CAAG,GAAG;AAAA,EAEpE;AAEA,SAAOF,IAAIL,KAAK;AACd,UAAMQ,IAAIV,EAAM,WAAWO,CAAC;AAE5B,QAAIG,MAAMP,KAAQI,IAAI,IAAIL,KAAOF,EAAM,WAAWO,IAAI,CAAC,MAAMJ,GAAM;AAEjE,UAAIQ,IAAIJ,IAAI;AACZ,aAAOI,IAAIT,KAAOF,EAAM,WAAWW,CAAC,MAAMR,I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AAAA,gBACT;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cAAA,EACA,KAAK,GAAG;AAAA,cAET,UAAA;AAAA,YAAA;AAAA,UAAA,IAED;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAM,EAAc,cAAc;"}
|
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as v, Fragment as S } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as V, useState as F, useCallback as O, forwardRef as D, Fragment as M } from "react";
|
|
3
3
|
import { c as C } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as L } from "react-i18next";
|
|
5
|
-
import { B as W } from "./badge-
|
|
5
|
+
import { B as W } from "./badge-BudgzTe_.js";
|
|
6
6
|
import { D as b } from "./dropdown-menu-DU-Hrf33.js";
|
|
7
7
|
import { u as P } from "./use-media-query-CcAx5SMM.js";
|
|
8
8
|
import { u as I } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
@@ -265,4 +265,4 @@ ts.displayName = "TabBar";
|
|
|
265
265
|
export {
|
|
266
266
|
ts as T
|
|
267
267
|
};
|
|
268
|
-
//# sourceMappingURL=tab-bar-
|
|
268
|
+
//# sourceMappingURL=tab-bar-rDkLiaA6.js.map
|