@alfadocs/ui-kit-debug 1.6.0 → 1.7.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-BD-jruqA.js → actions-cell-renderer-ALEAGO3j.js} +6 -6
- package/dist/_chunks/{actions-cell-renderer-BD-jruqA.js.map → actions-cell-renderer-ALEAGO3j.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-CYR-znfE.js → agenda-tray-BweO8pDo.js} +3 -3
- package/dist/_chunks/{agenda-tray-CYR-znfE.js.map → agenda-tray-BweO8pDo.js.map} +1 -1
- package/dist/_chunks/{ai-consent-banner-DLF6FNXv.js → ai-consent-banner-OggpS5hW.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-DLF6FNXv.js.map → ai-consent-banner-OggpS5hW.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-BgAubYKd.js → ai-prompt-input-DnbfEJnr.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-BgAubYKd.js.map → ai-prompt-input-DnbfEJnr.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-Bg53-ZOT.js → alia-sidebar-BWcWZivN.js} +7 -7
- package/dist/_chunks/{alia-sidebar-Bg53-ZOT.js.map → alia-sidebar-BWcWZivN.js.map} +1 -1
- package/dist/_chunks/{anamnesis-card-BylMLHYj.js → anamnesis-card-NTi4LLzI.js} +2 -2
- package/dist/_chunks/{anamnesis-card-BylMLHYj.js.map → anamnesis-card-NTi4LLzI.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-BpYztFUv.js → anamnesis-summary-rows-F-cCmFAn.js} +7 -7
- package/dist/_chunks/{anamnesis-summary-rows-BpYztFUv.js.map → anamnesis-summary-rows-F-cCmFAn.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-DT1uFp8z.js → appointment-timeline-CMPvzlGZ.js} +4 -4
- package/dist/_chunks/{appointment-timeline-DT1uFp8z.js.map → appointment-timeline-CMPvzlGZ.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-DvyVK7um.js → appointment-tray-3c_FLxXJ.js} +3 -3
- package/dist/_chunks/{appointment-tray-DvyVK7um.js.map → appointment-tray-3c_FLxXJ.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-nVRN4PSK.js → audio-recorder-EWBCNIsd.js} +3 -3
- package/dist/_chunks/{audio-recorder-nVRN4PSK.js.map → audio-recorder-EWBCNIsd.js.map} +1 -1
- package/dist/_chunks/{bishop-score-BV1JAEMV.js → bishop-score-Cnu0xs-z.js} +2 -2
- package/dist/_chunks/{bishop-score-BV1JAEMV.js.map → bishop-score-Cnu0xs-z.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-CdR-RLFj.js → bmi-calculator-CcH6upht.js} +2 -2
- package/dist/_chunks/{bmi-calculator-CdR-RLFj.js.map → bmi-calculator-CcH6upht.js.map} +1 -1
- package/dist/_chunks/{booking-D84O6H2X.js → booking-CQMJUFG-.js} +5 -5
- package/dist/_chunks/{booking-D84O6H2X.js.map → booking-CQMJUFG-.js.map} +1 -1
- package/dist/_chunks/{button-group-Be_In68J.js → button-group-CaxRJsNG.js} +2 -2
- package/dist/_chunks/{button-group-Be_In68J.js.map → button-group-CaxRJsNG.js.map} +1 -1
- package/dist/_chunks/{button-BvNtqHAS.js → button-nJaPh_HC.js} +68 -38
- package/dist/_chunks/button-nJaPh_HC.js.map +1 -0
- package/dist/_chunks/{care-plan-card-CehAU7F_.js → care-plan-card-DQjVRDxO.js} +2 -2
- package/dist/_chunks/{care-plan-card-CehAU7F_.js.map → care-plan-card-DQjVRDxO.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-ChWRMfMw.js → care-plan-entry-card-CMpoeNkb.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-ChWRMfMw.js.map → care-plan-entry-card-CMpoeNkb.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-_B0TTWT1.js → care-plan-header-CxYoq23f.js} +2 -2
- package/dist/_chunks/{care-plan-header-_B0TTWT1.js.map → care-plan-header-CxYoq23f.js.map} +1 -1
- package/dist/_chunks/{carousel.agent-pjORsMS8.js → carousel.agent-CLxdHEBP.js} +2 -2
- package/dist/_chunks/{carousel.agent-pjORsMS8.js.map → carousel.agent-CLxdHEBP.js.map} +1 -1
- package/dist/_chunks/{chart-Y-gso_Uz.js → chart-Bkr1Sh4o.js} +3 -3
- package/dist/_chunks/{chart-Y-gso_Uz.js.map → chart-Bkr1Sh4o.js.map} +1 -1
- package/dist/_chunks/{chat-input-BqI9GXQh.js → chat-input-BsB5Umpj.js} +2 -2
- package/dist/_chunks/{chat-input-BqI9GXQh.js.map → chat-input-BsB5Umpj.js.map} +1 -1
- package/dist/_chunks/{chat-message-DHNUbjXA.js → chat-message-DBQu10rs.js} +3 -3
- package/dist/_chunks/{chat-message-DHNUbjXA.js.map → chat-message-DBQu10rs.js.map} +1 -1
- package/dist/_chunks/{code-block-BONe9fJi.js → code-block-BIkpRLkl.js} +2 -2
- package/dist/_chunks/{code-block-BONe9fJi.js.map → code-block-BIkpRLkl.js.map} +1 -1
- package/dist/_chunks/{connection-status-NT8hUtYl.js → connection-status-DRZIcMqM.js} +3 -3
- package/dist/_chunks/{connection-status-NT8hUtYl.js.map → connection-status-DRZIcMqM.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-BxHiG8e6.js → contact-profile-card-CE9OJKcl.js} +2 -2
- package/dist/_chunks/{contact-profile-card-BxHiG8e6.js.map → contact-profile-card-CE9OJKcl.js.map} +1 -1
- package/dist/_chunks/{control-room-rail-DDyPDBji.js → control-room-rail-IH1eBjrK.js} +3 -3
- package/dist/_chunks/{control-room-rail-DDyPDBji.js.map → control-room-rail-IH1eBjrK.js.map} +1 -1
- package/dist/_chunks/{copy-field-B-DoMBH_.js → copy-field-fYKpl6aN.js} +2 -2
- package/dist/_chunks/{copy-field-B-DoMBH_.js.map → copy-field-fYKpl6aN.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-DJZYvNhw.js → cycle-calculator-DzgO1vzP.js} +2 -2
- package/dist/_chunks/{cycle-calculator-DJZYvNhw.js.map → cycle-calculator-DzgO1vzP.js.map} +1 -1
- package/dist/_chunks/{dashboard-grid-bd0QW2a8.js → dashboard-grid-BFtdHqfn.js} +2 -2
- package/dist/_chunks/{dashboard-grid-bd0QW2a8.js.map → dashboard-grid-BFtdHqfn.js.map} +1 -1
- package/dist/_chunks/{data-table-tabs-C8uDThT3.js → data-table-tabs-C1kRUzat.js} +3 -3
- package/dist/_chunks/{data-table-tabs-C8uDThT3.js.map → data-table-tabs-C1kRUzat.js.map} +1 -1
- package/dist/_chunks/{description-list-Ck7fKdt5.js → description-list-CjJqR8WK.js} +2 -2
- package/dist/_chunks/{description-list-Ck7fKdt5.js.map → description-list-CjJqR8WK.js.map} +1 -1
- package/dist/_chunks/{document-preview-Aae2yKvY.js → document-preview-oyx9RhCo.js} +2 -2
- package/dist/_chunks/{document-preview-Aae2yKvY.js.map → document-preview-oyx9RhCo.js.map} +1 -1
- package/dist/_chunks/{document-scanner-qNZLhH_r.js → document-scanner-C5Vrbu21.js} +2 -2
- package/dist/_chunks/{document-scanner-qNZLhH_r.js.map → document-scanner-C5Vrbu21.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-ajaQ4ya5.js → due-date-calculator-wK8Tajzz.js} +2 -2
- package/dist/_chunks/{due-date-calculator-ajaQ4ya5.js.map → due-date-calculator-wK8Tajzz.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-DyMbSyDK.js → editable-currency-cell-renderer-DYdzKpjL.js} +3 -3
- package/dist/_chunks/{editable-currency-cell-renderer-DyMbSyDK.js.map → editable-currency-cell-renderer-DYdzKpjL.js.map} +1 -1
- package/dist/_chunks/{editor-overlay-DE-gxj9L.js → editor-overlay-DEc5yYwo.js} +2 -2
- package/dist/_chunks/{editor-overlay-DE-gxj9L.js.map → editor-overlay-DEc5yYwo.js.map} +1 -1
- package/dist/_chunks/{empty-state-Df0tM6Kn.js → empty-state-X0sVPfVo.js} +2 -2
- package/dist/_chunks/{empty-state-Df0tM6Kn.js.map → empty-state-X0sVPfVo.js.map} +1 -1
- package/dist/_chunks/{entity-summary-DBOI5di6.js → entity-summary-B_vO5Ur4.js} +3 -3
- package/dist/_chunks/{entity-summary-DBOI5di6.js.map → entity-summary-B_vO5Ur4.js.map} +1 -1
- package/dist/_chunks/{face-scheme-D7Pub04e.js → face-scheme-BfDi4YkW.js} +5 -5
- package/dist/_chunks/{face-scheme-D7Pub04e.js.map → face-scheme-BfDi4YkW.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-jon6GIfQ.js → fetal-weight-Dqy0T1fP.js} +2 -2
- package/dist/_chunks/{fetal-weight-jon6GIfQ.js.map → fetal-weight-Dqy0T1fP.js.map} +1 -1
- package/dist/_chunks/{field-array-BQFX5OYi.js → field-array-BjkXZzSr.js} +3 -3
- package/dist/_chunks/{field-array-BQFX5OYi.js.map → field-array-BjkXZzSr.js.map} +1 -1
- package/dist/_chunks/{field-value-BbiDRyNh.js → field-value-DG8zaZvo.js} +4 -4
- package/dist/_chunks/{field-value-BbiDRyNh.js.map → field-value-DG8zaZvo.js.map} +1 -1
- package/dist/_chunks/{file-manager-CML_C6_h.js → file-manager-Cc_upjZX.js} +6 -6
- package/dist/_chunks/{file-manager-CML_C6_h.js.map → file-manager-Cc_upjZX.js.map} +1 -1
- package/dist/_chunks/{finished-terminal-BWNVh7Y8.js → finished-terminal-Br61Ip4e.js} +2 -2
- package/dist/_chunks/{finished-terminal-BWNVh7Y8.js.map → finished-terminal-Br61Ip4e.js.map} +1 -1
- package/dist/_chunks/{fiscal-code-input-Nx1N9r72.js → fiscal-code-input-B_nYMSEM.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-Nx1N9r72.js.map → fiscal-code-input-B_nYMSEM.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-HG3pFvMp.js → freemium-paywall-DrXzYfv-.js} +2 -2
- package/dist/_chunks/{freemium-paywall-HG3pFvMp.js.map → freemium-paywall-DrXzYfv-.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-dEpQDWcb.js → gestational-age-calculator-C_uDAeP_.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-dEpQDWcb.js.map → gestational-age-calculator-C_uDAeP_.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-CC6TLtHd.js → hcg-doubling-BaXkJhT-.js} +2 -2
- package/dist/_chunks/{hcg-doubling-CC6TLtHd.js.map → hcg-doubling-BaXkJhT-.js.map} +1 -1
- package/dist/_chunks/{header-CimZS-J9.js → header-DUXRIPyM.js} +2 -2
- package/dist/_chunks/{header-CimZS-J9.js.map → header-DUXRIPyM.js.map} +1 -1
- package/dist/_chunks/{header-settings-C0zHLXJE.js → header-settings-CVC_davE.js} +4 -4
- package/dist/_chunks/{header-settings-C0zHLXJE.js.map → header-settings-CVC_davE.js.map} +1 -1
- package/dist/_chunks/{icon-button-9c9Gp41m.js → icon-button-DA2CAGHZ.js} +2 -2
- package/dist/_chunks/{icon-button-9c9Gp41m.js.map → icon-button-DA2CAGHZ.js.map} +1 -1
- package/dist/_chunks/{icon-button-group-DrvuWPGJ.js → icon-button-group-D6SVMteH.js} +2 -2
- package/dist/_chunks/{icon-button-group-DrvuWPGJ.js.map → icon-button-group-D6SVMteH.js.map} +1 -1
- package/dist/_chunks/{icon-picker-DXV3sDp1.js → icon-picker-ChzpCnZ-.js} +3 -3
- package/dist/_chunks/{icon-picker-DXV3sDp1.js.map → icon-picker-ChzpCnZ-.js.map} +1 -1
- package/dist/_chunks/{image-cropper-DWSnyLwW.js → image-cropper-C84NDTB7.js} +2 -2
- package/dist/_chunks/{image-cropper-DWSnyLwW.js.map → image-cropper-C84NDTB7.js.map} +1 -1
- package/dist/_chunks/{info-tip-C4mPSJbS.js → info-tip-C119cwQl.js} +2 -2
- package/dist/_chunks/{info-tip-C4mPSJbS.js.map → info-tip-C119cwQl.js.map} +1 -1
- package/dist/_chunks/{insert-result-98J1QEp7.js → insert-result-LCNTskNJ.js} +2 -2
- package/dist/_chunks/{insert-result-98J1QEp7.js.map → insert-result-LCNTskNJ.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-DGkGlgCF.js → key-value-pair-BubG4fUa.js} +2 -2
- package/dist/_chunks/{key-value-pair-DGkGlgCF.js.map → key-value-pair-BubG4fUa.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-D3IsW_2R.js → link-cell-renderer-DH4JYpKU.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-D3IsW_2R.js.map → link-cell-renderer-DH4JYpKU.js.map} +1 -1
- package/dist/_chunks/{locale-picker-sI0HWgZy.js → locale-picker-BvbVjDQ-.js} +3 -3
- package/dist/_chunks/{locale-picker-sI0HWgZy.js.map → locale-picker-BvbVjDQ-.js.map} +1 -1
- package/dist/_chunks/{map-view-iwSDRW3t.js → map-view-CCAlC9IL.js} +2 -2
- package/dist/_chunks/{map-view-iwSDRW3t.js.map → map-view-CCAlC9IL.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-b5hN-Q0m.js → marketplace-app-shell-Chfdia7m.js} +4 -4
- package/dist/_chunks/{marketplace-app-shell-b5hN-Q0m.js.map → marketplace-app-shell-Chfdia7m.js.map} +1 -1
- package/dist/_chunks/{message-card-BCJ-Jgs6.js → message-card-D8GB4FdF.js} +3 -3
- package/dist/_chunks/{message-card-BCJ-Jgs6.js.map → message-card-D8GB4FdF.js.map} +1 -1
- package/dist/_chunks/{message-tray-DHtm_WaF.js → message-tray-CGIRQjx5.js} +4 -4
- package/dist/_chunks/{message-tray-DHtm_WaF.js.map → message-tray-CGIRQjx5.js.map} +1 -1
- package/dist/_chunks/{notes-panel-D6HKLLS-.js → notes-panel-DlnENphf.js} +3 -3
- package/dist/_chunks/{notes-panel-D6HKLLS-.js.map → notes-panel-DlnENphf.js.map} +1 -1
- package/dist/_chunks/{notification-card-CcMQn2RX.js → notification-card-CtrzoTUO.js} +3 -3
- package/dist/_chunks/{notification-card-CcMQn2RX.js.map → notification-card-CtrzoTUO.js.map} +1 -1
- package/dist/_chunks/{notification-tray-nr7dv-Q8.js → notification-tray-BiRzXHDf.js} +4 -4
- package/dist/_chunks/{notification-tray-nr7dv-Q8.js.map → notification-tray-BiRzXHDf.js.map} +1 -1
- package/dist/_chunks/{optical-prescription-DtzEqFQm.js → optical-prescription-Dj3Eh5Ok.js} +2 -2
- package/dist/_chunks/{optical-prescription-DtzEqFQm.js.map → optical-prescription-Dj3Eh5Ok.js.map} +1 -1
- package/dist/_chunks/{patient-details-rENrE_qY.js → patient-details-qnsqYBGQ.js} +5 -5
- package/dist/_chunks/{patient-details-rENrE_qY.js.map → patient-details-qnsqYBGQ.js.map} +1 -1
- package/dist/_chunks/{patient-search-NQemeJlL.js → patient-search-D5ufYoRc.js} +2 -2
- package/dist/_chunks/{patient-search-NQemeJlL.js.map → patient-search-D5ufYoRc.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-DQJgOOrA.js → patient-summary-card-CBfuDvJ5.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DQJgOOrA.js.map → patient-summary-card-CBfuDvJ5.js.map} +1 -1
- package/dist/_chunks/{patient-table-BubxfOWL.js → patient-table-DwshfVsQ.js} +3 -3
- package/dist/_chunks/{patient-table-BubxfOWL.js.map → patient-table-DwshfVsQ.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-CnaBPt5e.js → payment-automation-upsell-BBIG7NFL.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-CnaBPt5e.js.map → payment-automation-upsell-BBIG7NFL.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-CvhDzDNk.js → payment-request-card-BjjBMdsp.js} +3 -3
- package/dist/_chunks/{payment-request-card-CvhDzDNk.js.map → payment-request-card-BjjBMdsp.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-C0nNQKKK.js → periodontal-chart-BatZEFar.js} +2 -2
- package/dist/_chunks/{periodontal-chart-C0nNQKKK.js.map → periodontal-chart-BatZEFar.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-Bz-ebteE.js → periodontal-chart-card-BBpY_rBc.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-Bz-ebteE.js.map → periodontal-chart-card-BBpY_rBc.js.map} +1 -1
- package/dist/_chunks/{popover-Btj6N25H.js → popover-Cqcjx-Ny.js} +2 -2
- package/dist/_chunks/{popover-Btj6N25H.js.map → popover-Cqcjx-Ny.js.map} +1 -1
- package/dist/_chunks/{practice-results-CKoLD_x5.js → practice-results-BEsAdW-B.js} +719 -633
- package/dist/_chunks/practice-results-BEsAdW-B.js.map +1 -0
- package/dist/_chunks/{pregnancy-dating-DQVpFs_f.js → pregnancy-dating-BVS_9YU2.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-DQVpFs_f.js.map → pregnancy-dating-BVS_9YU2.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-hm3QJALe.js → pregnancy-weight-gain-CJwbs9W-.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-hm3QJALe.js.map → pregnancy-weight-gain-CJwbs9W-.js.map} +1 -1
- package/dist/_chunks/{privacy-lock-SQYFRSuH.js → privacy-lock-CkAUo6Dz.js} +3 -3
- package/dist/_chunks/{privacy-lock-SQYFRSuH.js.map → privacy-lock-CkAUo6Dz.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-BjnD9pdl.js → product-hub-panel-BScCotGD.js} +3 -3
- package/dist/_chunks/{product-hub-panel-BjnD9pdl.js.map → product-hub-panel-BScCotGD.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-DseNK2NQ.js → public-header.agent-kth2SdXn.js} +3 -3
- package/dist/_chunks/{public-header.agent-DseNK2NQ.js.map → public-header.agent-kth2SdXn.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-CAXFgCyn.js → radiograph-panel.agent-CiHwgISa.js} +4 -4
- package/dist/_chunks/{radiograph-panel.agent-CAXFgCyn.js.map → radiograph-panel.agent-CiHwgISa.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-Cd3SxJdW.js → reviews-panel-BKHEfqVQ.js} +4 -4
- package/dist/_chunks/{reviews-panel-Cd3SxJdW.js.map → reviews-panel-BKHEfqVQ.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-DGtn_4sb.js → rich-text-editor-DARnq_6N.js} +5 -5
- package/dist/_chunks/{rich-text-editor-DGtn_4sb.js.map → rich-text-editor-DARnq_6N.js.map} +1 -1
- package/dist/_chunks/{session-countdown-q4r5TlCo.js → session-countdown-QMsnRa1x.js} +2 -2
- package/dist/_chunks/{session-countdown-q4r5TlCo.js.map → session-countdown-QMsnRa1x.js.map} +1 -1
- package/dist/_chunks/{sheet-CD99CdXr.js → sheet-BSznOyJs.js} +2 -2
- package/dist/_chunks/{sheet-CD99CdXr.js.map → sheet-BSznOyJs.js.map} +1 -1
- package/dist/_chunks/{sign-in-with-alfadocs-button-_JxVRO5d.js → sign-in-with-alfadocs-button-BLe_quy5.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-_JxVRO5d.js.map → sign-in-with-alfadocs-button-BLe_quy5.js.map} +1 -1
- package/dist/_chunks/{signature-request-C4UBfVRZ.js → signature-request-DXhpphlp.js} +4 -4
- package/dist/_chunks/{signature-request-C4UBfVRZ.js.map → signature-request-DXhpphlp.js.map} +1 -1
- package/dist/_chunks/{slot-grid-P_e9p5t5.js → slot-grid-BuZOKfcd.js} +4 -4
- package/dist/_chunks/{slot-grid-P_e9p5t5.js.map → slot-grid-BuZOKfcd.js.map} +1 -1
- package/dist/_chunks/{streaming-text-BuW7I0Zu.js → streaming-text-CvsjIQ7S.js} +2 -2
- package/dist/_chunks/{streaming-text-BuW7I0Zu.js.map → streaming-text-CvsjIQ7S.js.map} +1 -1
- package/dist/_chunks/{task-tray-BT288xoM.js → task-tray-CYG6rj2s.js} +3 -3
- package/dist/_chunks/{task-tray-BT288xoM.js.map → task-tray-CYG6rj2s.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-BBkZuejF.js → tasks-panel-Do5SFp-j.js} +5 -5
- package/dist/_chunks/{tasks-panel-BBkZuejF.js.map → tasks-panel-Do5SFp-j.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-Bi-CmV6M.js → theme-toggle-DuMhQNFS.js} +3 -3
- package/dist/_chunks/{theme-toggle-Bi-CmV6M.js.map → theme-toggle-DuMhQNFS.js.map} +1 -1
- package/dist/_chunks/{toast.agent-C44mtGrW.js → toast.agent-D1tdg6DS.js} +2 -2
- package/dist/_chunks/{toast.agent-C44mtGrW.js.map → toast.agent-D1tdg6DS.js.map} +1 -1
- package/dist/_chunks/{token-insert-menu-D8FgXl33.js → token-insert-menu-9Um0JinI.js} +2 -2
- package/dist/_chunks/{token-insert-menu-D8FgXl33.js.map → token-insert-menu-9Um0JinI.js.map} +1 -1
- package/dist/_chunks/{tool-rail-BF3F2Ihq.js → tool-rail-CHyUmulN.js} +2 -2
- package/dist/_chunks/{tool-rail-BF3F2Ihq.js.map → tool-rail-CHyUmulN.js.map} +1 -1
- package/dist/_chunks/{tooth-scheme-BPXE1_3N.js → tooth-scheme-WdyVymQ1.js} +3 -3
- package/dist/_chunks/{tooth-scheme-BPXE1_3N.js.map → tooth-scheme-WdyVymQ1.js.map} +1 -1
- package/dist/_chunks/{unit-converter-iDxlxKmm.js → unit-converter-BPumXMA6.js} +2 -2
- package/dist/_chunks/{unit-converter-iDxlxKmm.js.map → unit-converter-BPumXMA6.js.map} +1 -1
- package/dist/_chunks/{warning-stack-nczJf52p.js → warning-stack-DQz0Jyir.js} +3 -3
- package/dist/_chunks/{warning-stack-nczJf52p.js.map → warning-stack-DQz0Jyir.js.map} +1 -1
- package/dist/_chunks/{workflow-map-BVofnDYh.js → workflow-map-DE_ribRM.js} +5 -5
- package/dist/_chunks/{workflow-map-BVofnDYh.js.map → workflow-map-DE_ribRM.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- 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/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/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/button.d.ts +10 -0
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button-group/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/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/copy-field/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 +3 -3
- package/dist/components/data-table-tabs/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 +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/empty-state/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/finished-terminal/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/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/image-cropper/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- 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/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +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-table/index.js +1 -1
- package/dist/components/payment-card/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/popover/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +47 -7
- package/dist/components/practice-results/practice-results.d.ts.map +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/public-header/public-header.d.ts +1 -1
- 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/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/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/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/toast/index.js +1 -1
- package/dist/components/token-insert-menu/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +2 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +2 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +2 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +2 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +2 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +2 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +2 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +2 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +2 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +2 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +2 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +2 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +2 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +2 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +2 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +2 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +2 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +2 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +96 -96
- package/dist/locales/ar.json +2 -1
- package/dist/locales/de.json +2 -1
- package/dist/locales/el.json +2 -1
- package/dist/locales/en.json +2 -1
- package/dist/locales/es.json +2 -1
- package/dist/locales/fr.json +2 -1
- package/dist/locales/hi.json +2 -1
- package/dist/locales/it.json +2 -1
- package/dist/locales/ja.json +2 -1
- package/dist/locales/nl.json +2 -1
- package/dist/locales/pl.json +2 -1
- package/dist/locales/pt.json +2 -1
- package/dist/locales/ro.json +2 -1
- package/dist/locales/ru.json +2 -1
- package/dist/locales/sq.json +2 -1
- package/dist/locales/sv.json +2 -1
- package/dist/locales/tr.json +2 -1
- package/dist/locales/zh.json +2 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/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 +1 -1
- package/dist/_chunks/button-BvNtqHAS.js.map +0 -1
- package/dist/_chunks/practice-results-CKoLD_x5.js.map +0 -1
package/dist/_chunks/{signature-request-C4UBfVRZ.js.map → signature-request-DXhpphlp.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signature-request-C4UBfVRZ.js","sources":["../../node_modules/lucide-react/dist/esm/icons/tablet.mjs","../../node_modules/lucide-react/dist/esm/icons/user-plus.mjs","../../src/patterns/signature-request/signature-request.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"16\", height: \"20\", x: \"4\", y: \"2\", rx: \"2\", ry: \"2\", key: \"76otgf\" }],\n [\"line\", { x1: \"12\", x2: \"12.01\", y1: \"18\", y2: \"18\", key: \"1dp563\" }]\n];\nconst Tablet = createLucideIcon(\"tablet\", __iconNode);\n\nexport { __iconNode, Tablet as default };\n//# sourceMappingURL=tablet.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\", key: \"1yyitq\" }],\n [\"circle\", { cx: \"9\", cy: \"7\", r: \"4\", key: \"nufk8\" }],\n [\"line\", { x1: \"19\", x2: \"19\", y1: \"8\", y2: \"14\", key: \"1bvyxn\" }],\n [\"line\", { x1: \"22\", x2: \"16\", y1: \"11\", y2: \"11\", key: \"1shjgl\" }]\n];\nconst UserPlus = createLucideIcon(\"user-plus\", __iconNode);\n\nexport { __iconNode, UserPlus as default };\n//# sourceMappingURL=user-plus.mjs.map\n","/**\n * SignatureRequestModal — the practice-side \"Documenti firmati\" modal that\n * dispatches a document-signature request: assign the operator who must\n * counter-sign (or leave the request unassigned) and how their request is\n * delivered (their system-defined default channel arrives pre-checked),\n * build the patient-side signer roster (up to `maxSigners`, each with their\n * own delivery channel and, for on-device signing, an OTP waiver), and send.\n *\n * Runtime pattern: real consuming apps mount this in production (surfaced via\n * `src/patterns/index.ts` and the `./patterns/signature-request` subpath).\n * The component owns the form state — re-seeded from the `initial*` props\n * every time `open` flips back to `true` — while the host owns `open`, the\n * option lists, and what happens on submit. Multiple on-device signers sign\n * sequentially in roster order — the execution side is the Signing pattern's\n * multi-signer flow; this modal only encodes the intents.\n */\nimport {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport {\n Mail,\n MessageSquare,\n PenLine,\n Plus,\n Tablet,\n UserPlus,\n X,\n} from 'lucide-react';\nimport { Dialog } from '../../components/dialog';\nimport { Button } from '../../components/button';\nimport { IconButton } from '../../components/icon-button';\nimport { Checkbox } from '../../components/checkbox';\nimport { WhatsAppGlyph } from '../../components/whatsapp-button';\nimport { Select } from '../../components/select';\nimport { Switch } from '../../components/switch';\nimport { Alert } from '../../components/alert';\nimport { InfoTip } from '../../components/info-tip';\nimport { Separator } from '../../components/separator';\nimport { Avatar } from '../../components/avatar';\n\n/** Delivery channel for one signer's signature request. */\nexport type SignatureChannel = 'sms' | 'email' | 'whatsapp' | 'on-device';\n\n/**\n * Delivery channel for the operator's counter-sign request. The default is\n * system defined — the assigned operator's own `defaultChannel` (e-mail or\n * SMS) arrives pre-checked; `'on-device'` is offerable only while a roster\n * signer also signs on this device.\n */\nexport type OperatorChannel = 'sms' | 'email' | 'on-device';\n\n/** One selectable person/role for the operator or signer selects. */\nexport interface SignerOption {\n value: string;\n label: string;\n /**\n * Delivery channels this person can actually receive. Omit (or pass an\n * empty list) to offer every channel. Hosts gate this from per-patient\n * capability flags — e.g. a patient with no mobile number drops `'sms'`\n * and `'whatsapp'`. Only meaningful for signer options, not operators.\n */\n availableChannels?: SignatureChannel[];\n /**\n * The delivery channel this operator's own settings resolve to — the\n * system-defined default, pre-checked when the operator is assigned.\n * Falls back to `'email'` when omitted. Only meaningful for operator\n * options, not signers.\n */\n defaultChannel?: 'sms' | 'email';\n}\n\n/** One patient-side signer row in the submission. */\nexport interface SignerRequest {\n signerId: string;\n channel: SignatureChannel;\n /** Only meaningful when `channel` is `'on-device'`. */\n skipOtp?: boolean;\n}\n\n/** Payload handed to `onRequestSignature`. */\nexport interface SignatureRequestSubmission {\n /** `null` when the counter-signing operator is left unassigned. */\n operatorId: string | null;\n /**\n * How the operator's counter-sign request is delivered. `null` while the\n * operator is unassigned. Defaults to the operator's own system-defined\n * channel unless explicitly changed in the modal.\n */\n operatorChannel: OperatorChannel | null;\n /** 1..N signers; on-device signers sign sequentially in this order. */\n signers: SignerRequest[];\n}\n\nexport interface SignatureRequestModalProps {\n /** Controlled open state. Reopening re-seeds the form from `initial*`. */\n open: boolean;\n /**\n * Fires when the dialog requests a state change (<kbd>Esc</kbd> or the\n * footer Close button). `false` is the dismiss signal — hosts typically\n * persist a \"dismissed this session\" flag there.\n */\n onOpenChange: (open: boolean) => void;\n /** Operators offered as the counter-signing signer. */\n operators: SignerOption[];\n /** Patient-side people/roles offered in each signer row. */\n signerOptions: SignerOption[];\n /** Enables the \"Assign to me\" shortcut targeting this operator. */\n currentOperatorId?: string;\n /** Offer an \"Assign later\" option in the operator select. Default `true`. */\n allowAssignLater?: boolean;\n /**\n * Preselected operator; `null` preselects \"Assign later\" (honoured only\n * while `allowAssignLater` — otherwise the first operator is seeded).\n */\n initialOperatorId?: string | null;\n /**\n * Preselected operator delivery channel. Defaults to the seeded operator's\n * system-defined `defaultChannel`. `'on-device'` is honoured only while a\n * seeded roster signer also signs on this device.\n */\n initialOperatorChannel?: OperatorChannel;\n /** Seed the signer roster. Defaults to the first option, on-device. */\n initialSigners?: SignerRequest[];\n /** Cap on roster size. Default `2`. */\n maxSigners?: number;\n /**\n * Whether an operator must counter-sign. `false` drops the operator\n * section entirely and submits `operatorId: null` — a host whose document\n * does not require a counter-signature must not be asked for one. Default\n * `true`.\n */\n requireOperator?: boolean;\n /**\n * Whether the patient side signs at all. `false` drops the signer roster\n * and submits an empty `signers` array — for documents only an operator\n * signs. Default `true`. Setting BOTH this and `requireOperator` to false\n * leaves nothing to request, so the primary action stays disabled.\n */\n requirePatient?: boolean;\n /** Disables all inputs and shows the primary action as loading. */\n busy?: boolean;\n /** Consumer-translated error shown above the footer (e.g. server failure). */\n error?: string;\n /** Override the dialog title. Defaults to the `ui.*` string. */\n title?: string;\n /** Override the dialog description. Defaults to the `ui.*` string. */\n description?: string;\n /** Receives the completed submission. The host closes via `onOpenChange`. */\n onRequestSignature: (submission: SignatureRequestSubmission) => void;\n /**\n * Extra attributes for the portaled dialog surface (e.g. `dir`/`lang`\n * when the host pins a locale below `<html>`, or a test id).\n */\n contentProps?: ComponentPropsWithoutRef<'div'>;\n}\n\nconst ASSIGN_LATER = '__assign-later__';\n\n/** Canonical channel display order; per-signer availability filters this. */\nconst CHANNEL_ORDER: SignatureChannel[] = [\n 'sms',\n 'email',\n 'whatsapp',\n 'on-device',\n];\n\n/** Internal roster row — `rowId` keys the DOM so editing a row's person\n * never remounts the row (which would drop keyboard focus). */\ninterface RosterRow extends SignerRequest {\n rowId: number;\n}\n\nfunction labelFor(options: SignerOption[], value: string): string {\n return options.find((option) => option.value === value)?.label ?? '';\n}\n\nexport const SignatureRequestModal = forwardRef<\n HTMLDivElement,\n SignatureRequestModalProps\n>(\n (\n {\n open,\n onOpenChange,\n operators,\n signerOptions,\n currentOperatorId,\n allowAssignLater = true,\n requireOperator = true,\n requirePatient = true,\n initialOperatorId,\n initialOperatorChannel,\n initialSigners,\n maxSigners = 2,\n busy = false,\n error,\n title,\n description,\n onRequestSignature,\n contentProps,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n const nextRowId = useRef(0);\n const addButtonRef = useRef<HTMLButtonElement>(null);\n\n // Channels a given signer can receive on — the person's `availableChannels`\n // filtered into canonical order; omitted/empty means every channel.\n const channelsFor = (signerId: string): SignatureChannel[] => {\n const allowed = signerOptions.find(\n (option) => option.value === signerId,\n )?.availableChannels;\n return allowed && allowed.length > 0\n ? CHANNEL_ORDER.filter((channel) => allowed.includes(channel))\n : CHANNEL_ORDER;\n };\n\n // First available channel for a signer, preferring `preferred` when offered.\n const resolveChannel = (\n signerId: string,\n preferred: SignatureChannel,\n ): SignatureChannel => {\n const available = channelsFor(signerId);\n return available.includes(preferred) ? preferred : available[0];\n };\n\n const seedOperator = () => {\n if (initialOperatorId === null) {\n return allowAssignLater\n ? ASSIGN_LATER\n : (operators[0]?.value ?? ASSIGN_LATER);\n }\n return (\n initialOperatorId ??\n operators[0]?.value ??\n (allowAssignLater ? ASSIGN_LATER : '')\n );\n };\n const seedRows = (): RosterRow[] => {\n const seed =\n initialSigners && initialSigners.length > 0\n ? initialSigners\n : signerOptions.length > 0\n ? [\n {\n signerId: signerOptions[0].value,\n channel: resolveChannel(signerOptions[0].value, 'on-device'),\n },\n ]\n : [];\n return seed.map((signer) => ({ ...signer, rowId: nextRowId.current++ }));\n };\n\n // System-defined default for one operator — the channel their own\n // settings resolve to.\n const operatorDefaultChannel = (operatorId: string): OperatorChannel =>\n operators.find((option) => option.value === operatorId)?.defaultChannel ??\n 'email';\n\n // Seed clamp: `'on-device'` is honoured only when the seeded roster\n // makes it available, so the option is never checked-and-disabled, not\n // even for a frame.\n const seedOperatorChannel = (\n operatorId: string,\n rows: RosterRow[],\n ): OperatorChannel => {\n if (initialOperatorChannel === 'on-device') {\n return rows.some((signer) => signer.channel === 'on-device')\n ? 'on-device'\n : operatorDefaultChannel(operatorId);\n }\n return initialOperatorChannel ?? operatorDefaultChannel(operatorId);\n };\n\n const [operator, setOperator] = useState<string>(seedOperator);\n const [signers, setSigners] = useState<RosterRow[]>(seedRows);\n const [operatorChannel, setOperatorChannel] = useState<OperatorChannel>(\n () => seedOperatorChannel(operator, signers),\n );\n // Feeds the sr-only live region announcing the automatic channel\n // fallback below; any explicit choice clears it.\n const [revertedTo, setRevertedTo] = useState<OperatorChannel | null>(null);\n\n // Re-seed the form whenever the host reopens the (still-mounted) modal,\n // so a previous request's choices never leak into the next one.\n const wasOpen = useRef(open);\n useEffect(() => {\n if (open && !wasOpen.current) {\n const nextOperator = seedOperator();\n const nextRows = seedRows();\n setOperator(nextOperator);\n setSigners(nextRows);\n setOperatorChannel(seedOperatorChannel(nextOperator, nextRows));\n setRevertedTo(null);\n }\n wasOpen.current = open;\n // The seeds intentionally read the render-time props on the rising\n // edge only — prop changes while open (or closed) don't reset input.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n // Operator on-device signing piggybacks on a patient handover: it is\n // offerable only while a roster signer signs on this device, and falls\n // back to the operator's system default the moment the last on-device\n // row leaves. The fallback is announced via the live region — the\n // trigger lives in the roster section, far from the checkbox it moves.\n const anySignerOnDevice = signers.some(\n (signer) => signer.channel === 'on-device',\n );\n useEffect(() => {\n if (operatorChannel === 'on-device' && !anySignerOnDevice) {\n const fallback = operatorDefaultChannel(operator);\n setOperatorChannel(fallback);\n setRevertedTo(fallback);\n }\n // `operatorDefaultChannel` reads the render-time `operators` prop.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [operatorChannel, anySignerOnDevice, operator]);\n\n const operatorSelectOptions = allowAssignLater\n ? [\n ...operators,\n { value: ASSIGN_LATER, label: t('signatureRequest.assignLater') },\n ]\n : operators;\n const isUnassigned = operator === ASSIGN_LATER;\n\n const channelMeta: Record<\n SignatureChannel,\n { label: string; icon: React.ReactNode }\n > = {\n sms: {\n label: t('signatureRequest.viaSms'),\n icon: <MessageSquare className=\"ds:size-4\" aria-hidden />,\n },\n email: {\n label: t('signatureRequest.viaEmail'),\n icon: <Mail className=\"ds:size-4\" aria-hidden />,\n },\n whatsapp: {\n label: t('signatureRequest.viaWhatsapp'),\n icon: <WhatsAppGlyph className=\"ds:size-4\" aria-hidden />,\n },\n 'on-device': {\n label: t('signatureRequest.onThisDevice'),\n icon: <Tablet className=\"ds:size-4\" aria-hidden />,\n },\n };\n\n // Operator delivery — same checkbox visuals as the signer rows, minus\n // WhatsApp. No \"system defined\" option: the operator's own default\n // (e-mail or SMS per their settings) arrives pre-checked instead.\n // On-device greys out while no patient signer signs on this device;\n // an InfoTip explains why.\n const operatorChannelOptions: Array<{\n value: OperatorChannel;\n label: string;\n icon: React.ReactNode;\n disabled?: boolean;\n hint?: string;\n }> = [\n { value: 'sms', ...channelMeta.sms },\n { value: 'email', ...channelMeta.email },\n {\n value: 'on-device',\n ...channelMeta['on-device'],\n disabled: !anySignerOnDevice,\n hint: anySignerOnDevice\n ? undefined\n : t('signatureRequest.onDeviceUnavailableHint'),\n },\n ];\n\n const chosenIds = signers.map((signer) => signer.signerId);\n const nextFreeOption = signerOptions.find(\n (option) => !chosenIds.includes(option.value),\n );\n const canAddSigner =\n !busy && signers.length < maxSigners && nextFreeOption !== undefined;\n\n const patchSigner = (rowId: number, patch: Partial<SignerRequest>) => {\n setSigners((current) =>\n current.map((signer) =>\n signer.rowId === rowId ? { ...signer, ...patch } : signer,\n ),\n );\n };\n\n const addSigner = () => {\n if (!nextFreeOption) return;\n setSigners((current) => [\n ...current,\n {\n signerId: nextFreeOption.value,\n channel: resolveChannel(nextFreeOption.value, 'sms'),\n rowId: nextRowId.current++,\n },\n ]);\n };\n\n const removeSigner = (rowId: number) => {\n // Move focus BEFORE the row (and the focused remove button) unmounts —\n // otherwise Radix's focus scope dumps focus on the dialog container.\n addButtonRef.current?.focus();\n setSigners((current) =>\n current.filter((signer) => signer.rowId !== rowId),\n );\n };\n\n const handleRequest = () => {\n onRequestSignature({\n operatorId: !requireOperator || isUnassigned ? null : operator,\n operatorChannel:\n !requireOperator || isUnassigned ? null : operatorChannel,\n signers: requirePatient\n ? signers.map(({ rowId: _rowId, ...signer }) => signer)\n : [],\n });\n };\n\n return (\n <div ref={ref} className=\"ds:contents\" data-component=\"signature-request\">\n <Dialog open={open} onOpenChange={onOpenChange}>\n <Dialog.Content size=\"lg\" hideCloseButton {...contentProps}>\n <Dialog.Header>\n <Dialog.Title>\n {title ?? t('signatureRequest.title')}\n </Dialog.Title>\n <Dialog.Description>\n {description ?? t('signatureRequest.noSignedVersions')}\n </Dialog.Description>\n </Dialog.Header>\n\n <Dialog.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {requireOperator ? (\n <section className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <p className=\"type-eyebrow ds:text-start ds:text-[color:var(--muted-foreground)]\">\n {t('signatureRequest.operatorSection')}\n </p>\n {currentOperatorId !== undefined ? (\n <Button\n intent=\"primary\"\n size=\"sm\"\n startIcon={<UserPlus />}\n disabled={busy}\n onClick={() => {\n setOperator(currentOperatorId);\n setOperatorChannel(\n operatorDefaultChannel(currentOperatorId),\n );\n setRevertedTo(null);\n }}\n >\n {t('signatureRequest.assignToMe')}\n </Button>\n ) : null}\n </div>\n\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n {/* Mirrors the select value — decorative for AT. No name →\n Avatar's built-in placeholder-icon fallback. */}\n <Avatar\n aria-hidden=\"true\"\n name={\n isUnassigned ? undefined : labelFor(operators, operator)\n }\n size=\"sm\"\n />\n <div className=\"ds:min-w-0 ds:flex-1 ds:text-start\">\n <Select\n options={operatorSelectOptions}\n value={operator}\n onValueChange={(value) => {\n if (!value) return;\n setOperator(value);\n // A different operator brings their own system\n // default along.\n setOperatorChannel(\n value === ASSIGN_LATER\n ? 'email'\n : operatorDefaultChannel(value),\n );\n setRevertedTo(null);\n }}\n required\n disabled={busy}\n placeholder={t('signatureRequest.operatorPlaceholder')}\n aria-label={t('signatureRequest.operatorSection')}\n />\n </div>\n </div>\n\n {/* One channel for the operator too — same mutually exclusive\n checkbox visuals as the signer rows. Hidden while the\n request is unassigned: there is nobody to deliver to. */}\n {isUnassigned ? null : (\n <div\n role=\"group\"\n aria-label={t('signatureRequest.operatorChannelLabel')}\n className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-lg)] ds:gap-y-[var(--spacing-sm)] ds:ps-[var(--spacing-xl)]\"\n >\n {operatorChannelOptions.map((option) => (\n <span\n key={option.value}\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]\"\n >\n <Checkbox\n checked={operatorChannel === option.value}\n disabled={busy || option.disabled}\n onCheckedChange={(checked) => {\n if (checked !== true) return;\n setOperatorChannel(option.value);\n setRevertedTo(null);\n }}\n label={\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span\n aria-hidden=\"true\"\n className=\"ds:text-[var(--accent)]\"\n >\n {option.icon}\n </span>\n {option.label}\n </span>\n }\n />\n {/* Sibling of the checkbox, never inside its label —\n the tip is its own interactive control. The wider\n gap keeps the tip's touch hit-area off the label. */}\n {option.hint ? (\n <InfoTip size=\"sm\" content={option.hint} />\n ) : null}\n </span>\n ))}\n </div>\n )}\n\n {/* Announces the automatic on-device → default fallback: the\n trigger (the patient's channel change) sits in another\n section, so the moved checkmark alone is not enough. */}\n <span role=\"status\" className=\"ds:sr-only\">\n {revertedTo\n ? t('signatureRequest.operatorChannelReverted', {\n channel: channelMeta[revertedTo].label,\n })\n : null}\n </span>\n </section>\n ) : null}\n\n {/* The rule only separates two sections that are both there. */}\n {requireOperator && requirePatient ? (\n <Separator decorative />\n ) : null}\n\n {requirePatient ? (\n <section className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-start\">\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <p className=\"type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {t('signatureRequest.signersSection')}\n </p>\n {/* Offered only when the roster holds more than one\n person. A patient with nobody else to sign for them saw\n a permanently greyed action — a promise the modal could\n never keep. With two or more it stays, greying (not\n hiding) once every seat is taken so the cap reads. */}\n {signerOptions.length > 1 ? (\n <Button\n ref={addButtonRef}\n intent=\"primary\"\n size=\"sm\"\n startIcon={<Plus />}\n disabled={!canAddSigner}\n onClick={addSigner}\n >\n {t('signatureRequest.addSigner')}\n </Button>\n ) : null}\n </div>\n\n {signers.map((signer) => {\n const rowOptions = signerOptions.filter(\n (option) =>\n option.value === signer.signerId ||\n !chosenIds.includes(option.value),\n );\n const rowLabel = labelFor(signerOptions, signer.signerId);\n const rowChannelOptions = channelsFor(signer.signerId).map(\n (channel) => ({\n value: channel,\n ...channelMeta[channel],\n }),\n );\n return (\n <div\n key={signer.rowId}\n role=\"group\"\n aria-label={rowLabel}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n {/* Mirrors the select value — decorative for AT. */}\n <Avatar\n aria-hidden=\"true\"\n name={rowLabel}\n size=\"sm\"\n />\n <div className=\"ds:min-w-0 ds:flex-1\">\n <Select\n options={rowOptions}\n value={signer.signerId}\n onValueChange={(value) => {\n if (!value) return;\n const channel = resolveChannel(\n value,\n signer.channel,\n );\n patchSigner(signer.rowId, {\n signerId: value,\n channel,\n skipOtp:\n channel === 'on-device'\n ? signer.skipOtp\n : undefined,\n });\n }}\n required\n disabled={busy}\n placeholder={t(\n 'signatureRequest.signerPlaceholder',\n )}\n aria-label={t(\n 'signatureRequest.signerPlaceholder',\n )}\n />\n </div>\n {signers.length > 1 ? (\n <IconButton\n intent=\"ghost\"\n size=\"sm\"\n icon={<X />}\n disabled={busy}\n aria-label={t('signatureRequest.removeSigner')}\n onClick={() => removeSigner(signer.rowId)}\n />\n ) : null}\n </div>\n\n {/* One channel per signer — checkbox visuals, but the\n choice is mutually exclusive: checking a channel\n unchecks the others, and the active one can't be\n unchecked. */}\n <div\n role=\"group\"\n aria-label={t('signatureRequest.channelLabel')}\n className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-lg)] ds:gap-y-[var(--spacing-sm)] ds:ps-[var(--spacing-xl)]\"\n >\n {rowChannelOptions.map((option) => (\n <Checkbox\n key={option.value}\n checked={signer.channel === option.value}\n disabled={busy}\n onCheckedChange={(checked) =>\n checked === true &&\n patchSigner(signer.rowId, {\n channel: option.value,\n skipOtp: undefined,\n })\n }\n label={\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span\n aria-hidden=\"true\"\n className=\"ds:text-[var(--accent)]\"\n >\n {option.icon}\n </span>\n {option.label}\n </span>\n }\n />\n ))}\n </div>\n\n {signer.channel === 'on-device' ? (\n <div className=\"ds:ps-[var(--spacing-xl)]\">\n <Switch\n label={t('signatureRequest.noOtp')}\n checked={signer.skipOtp === true}\n disabled={busy}\n onCheckedChange={(checked) =>\n patchSigner(signer.rowId, { skipOtp: checked })\n }\n />\n </div>\n ) : null}\n </div>\n );\n })}\n </section>\n ) : null}\n\n {/* Dedicated alert area — one warning regardless of how many\n signers waive OTP, stacked with any submission error, all at\n the same full width as the operator hint. */}\n {signers.some(\n (signer) =>\n signer.channel === 'on-device' && signer.skipOtp === true,\n ) ? (\n <Alert variant=\"warning\">\n <Alert.Description>\n {t('signatureRequest.noOtpWarning')}\n </Alert.Description>\n </Alert>\n ) : null}\n {error ? (\n <Alert variant=\"error\">\n <Alert.Description>{error}</Alert.Description>\n </Alert>\n ) : null}\n </Dialog.Body>\n\n <Dialog.Footer>\n <Button\n intent=\"primary\"\n startIcon={<PenLine />}\n onClick={handleRequest}\n disabled={\n busy ||\n (requirePatient && signers.length === 0) ||\n (!requirePatient && !requireOperator)\n }\n loading={busy}\n >\n {t('signatureRequest.requestSignature')}\n </Button>\n <Dialog.Close asChild>\n <Button intent=\"outline\" disabled={busy}>\n {t('signatureRequest.close')}\n </Button>\n </Dialog.Close>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog>\n </div>\n );\n },\n);\nSignatureRequestModal.displayName = 'SignatureRequestModal';\n"],"names":["__iconNode","Tablet","createLucideIcon","UserPlus","ASSIGN_LATER","CHANNEL_ORDER","labelFor","options","value","_a","option","SignatureRequestModal","forwardRef","open","onOpenChange","operators","signerOptions","currentOperatorId","allowAssignLater","requireOperator","requirePatient","initialOperatorId","initialOperatorChannel","initialSigners","maxSigners","busy","error","title","description","onRequestSignature","contentProps","ref","t","useTranslation","nextRowId","useRef","addButtonRef","channelsFor","signerId","allowed","channel","resolveChannel","preferred","available","seedOperator","_b","seedRows","signer","operatorDefaultChannel","operatorId","seedOperatorChannel","rows","operator","setOperator","useState","signers","setSigners","operatorChannel","setOperatorChannel","revertedTo","setRevertedTo","wasOpen","useEffect","nextOperator","nextRows","anySignerOnDevice","fallback","operatorSelectOptions","isUnassigned","channelMeta","jsx","MessageSquare","Mail","WhatsAppGlyph","operatorChannelOptions","chosenIds","nextFreeOption","canAddSigner","patchSigner","rowId","patch","current","addSigner","removeSigner","handleRequest","_rowId","Dialog","jsxs","Button","Avatar","Select","Checkbox","checked","InfoTip","Separator","Plus","rowOptions","rowL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hB;AAAA,UAACkB;AAAA,UAAA;AAAA,YACC,QAAO;AAAA,YACP,6BAAYe,IAAA,EAAQ;AAAA,YACpB,SAASnB;AAAA,YACT,UACE3D,KACCL,KAAkBmC,EAAQ,WAAW,KACrC,CAACnC,KAAkB,CAACD;AAAA,YAEvB,SAASM;AAAA,YAER,YAAE,mCAAmC;AAAA,UAAA;AAAA,QAAA;AAAA,QAExC,gBAAA6C,EAACgB,EAAO,OAAP,EAAa,SAAO,IACnB,UAAA,gBAAAhB,EAACkB,GAAA,EAAO,QAAO,WAAU,UAAU/D,GAChC,UAAAO,EAAE,wBAAwB,GAC7B,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,EAAA,CACF,GACF,GACF;AAAA,EAEJ;AACF;AACArB,GAAsB,cAAc;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"signature-request-DXhpphlp.js","sources":["../../node_modules/lucide-react/dist/esm/icons/tablet.mjs","../../node_modules/lucide-react/dist/esm/icons/user-plus.mjs","../../src/patterns/signature-request/signature-request.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"16\", height: \"20\", x: \"4\", y: \"2\", rx: \"2\", ry: \"2\", key: \"76otgf\" }],\n [\"line\", { x1: \"12\", x2: \"12.01\", y1: \"18\", y2: \"18\", key: \"1dp563\" }]\n];\nconst Tablet = createLucideIcon(\"tablet\", __iconNode);\n\nexport { __iconNode, Tablet as default };\n//# sourceMappingURL=tablet.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\", key: \"1yyitq\" }],\n [\"circle\", { cx: \"9\", cy: \"7\", r: \"4\", key: \"nufk8\" }],\n [\"line\", { x1: \"19\", x2: \"19\", y1: \"8\", y2: \"14\", key: \"1bvyxn\" }],\n [\"line\", { x1: \"22\", x2: \"16\", y1: \"11\", y2: \"11\", key: \"1shjgl\" }]\n];\nconst UserPlus = createLucideIcon(\"user-plus\", __iconNode);\n\nexport { __iconNode, UserPlus as default };\n//# sourceMappingURL=user-plus.mjs.map\n","/**\n * SignatureRequestModal — the practice-side \"Documenti firmati\" modal that\n * dispatches a document-signature request: assign the operator who must\n * counter-sign (or leave the request unassigned) and how their request is\n * delivered (their system-defined default channel arrives pre-checked),\n * build the patient-side signer roster (up to `maxSigners`, each with their\n * own delivery channel and, for on-device signing, an OTP waiver), and send.\n *\n * Runtime pattern: real consuming apps mount this in production (surfaced via\n * `src/patterns/index.ts` and the `./patterns/signature-request` subpath).\n * The component owns the form state — re-seeded from the `initial*` props\n * every time `open` flips back to `true` — while the host owns `open`, the\n * option lists, and what happens on submit. Multiple on-device signers sign\n * sequentially in roster order — the execution side is the Signing pattern's\n * multi-signer flow; this modal only encodes the intents.\n */\nimport {\n forwardRef,\n useEffect,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport {\n Mail,\n MessageSquare,\n PenLine,\n Plus,\n Tablet,\n UserPlus,\n X,\n} from 'lucide-react';\nimport { Dialog } from '../../components/dialog';\nimport { Button } from '../../components/button';\nimport { IconButton } from '../../components/icon-button';\nimport { Checkbox } from '../../components/checkbox';\nimport { WhatsAppGlyph } from '../../components/whatsapp-button';\nimport { Select } from '../../components/select';\nimport { Switch } from '../../components/switch';\nimport { Alert } from '../../components/alert';\nimport { InfoTip } from '../../components/info-tip';\nimport { Separator } from '../../components/separator';\nimport { Avatar } from '../../components/avatar';\n\n/** Delivery channel for one signer's signature request. */\nexport type SignatureChannel = 'sms' | 'email' | 'whatsapp' | 'on-device';\n\n/**\n * Delivery channel for the operator's counter-sign request. The default is\n * system defined — the assigned operator's own `defaultChannel` (e-mail or\n * SMS) arrives pre-checked; `'on-device'` is offerable only while a roster\n * signer also signs on this device.\n */\nexport type OperatorChannel = 'sms' | 'email' | 'on-device';\n\n/** One selectable person/role for the operator or signer selects. */\nexport interface SignerOption {\n value: string;\n label: string;\n /**\n * Delivery channels this person can actually receive. Omit (or pass an\n * empty list) to offer every channel. Hosts gate this from per-patient\n * capability flags — e.g. a patient with no mobile number drops `'sms'`\n * and `'whatsapp'`. Only meaningful for signer options, not operators.\n */\n availableChannels?: SignatureChannel[];\n /**\n * The delivery channel this operator's own settings resolve to — the\n * system-defined default, pre-checked when the operator is assigned.\n * Falls back to `'email'` when omitted. Only meaningful for operator\n * options, not signers.\n */\n defaultChannel?: 'sms' | 'email';\n}\n\n/** One patient-side signer row in the submission. */\nexport interface SignerRequest {\n signerId: string;\n channel: SignatureChannel;\n /** Only meaningful when `channel` is `'on-device'`. */\n skipOtp?: boolean;\n}\n\n/** Payload handed to `onRequestSignature`. */\nexport interface SignatureRequestSubmission {\n /** `null` when the counter-signing operator is left unassigned. */\n operatorId: string | null;\n /**\n * How the operator's counter-sign request is delivered. `null` while the\n * operator is unassigned. Defaults to the operator's own system-defined\n * channel unless explicitly changed in the modal.\n */\n operatorChannel: OperatorChannel | null;\n /** 1..N signers; on-device signers sign sequentially in this order. */\n signers: SignerRequest[];\n}\n\nexport interface SignatureRequestModalProps {\n /** Controlled open state. Reopening re-seeds the form from `initial*`. */\n open: boolean;\n /**\n * Fires when the dialog requests a state change (<kbd>Esc</kbd> or the\n * footer Close button). `false` is the dismiss signal — hosts typically\n * persist a \"dismissed this session\" flag there.\n */\n onOpenChange: (open: boolean) => void;\n /** Operators offered as the counter-signing signer. */\n operators: SignerOption[];\n /** Patient-side people/roles offered in each signer row. */\n signerOptions: SignerOption[];\n /** Enables the \"Assign to me\" shortcut targeting this operator. */\n currentOperatorId?: string;\n /** Offer an \"Assign later\" option in the operator select. Default `true`. */\n allowAssignLater?: boolean;\n /**\n * Preselected operator; `null` preselects \"Assign later\" (honoured only\n * while `allowAssignLater` — otherwise the first operator is seeded).\n */\n initialOperatorId?: string | null;\n /**\n * Preselected operator delivery channel. Defaults to the seeded operator's\n * system-defined `defaultChannel`. `'on-device'` is honoured only while a\n * seeded roster signer also signs on this device.\n */\n initialOperatorChannel?: OperatorChannel;\n /** Seed the signer roster. Defaults to the first option, on-device. */\n initialSigners?: SignerRequest[];\n /** Cap on roster size. Default `2`. */\n maxSigners?: number;\n /**\n * Whether an operator must counter-sign. `false` drops the operator\n * section entirely and submits `operatorId: null` — a host whose document\n * does not require a counter-signature must not be asked for one. Default\n * `true`.\n */\n requireOperator?: boolean;\n /**\n * Whether the patient side signs at all. `false` drops the signer roster\n * and submits an empty `signers` array — for documents only an operator\n * signs. Default `true`. Setting BOTH this and `requireOperator` to false\n * leaves nothing to request, so the primary action stays disabled.\n */\n requirePatient?: boolean;\n /** Disables all inputs and shows the primary action as loading. */\n busy?: boolean;\n /** Consumer-translated error shown above the footer (e.g. server failure). */\n error?: string;\n /** Override the dialog title. Defaults to the `ui.*` string. */\n title?: string;\n /** Override the dialog description. Defaults to the `ui.*` string. */\n description?: string;\n /** Receives the completed submission. The host closes via `onOpenChange`. */\n onRequestSignature: (submission: SignatureRequestSubmission) => void;\n /**\n * Extra attributes for the portaled dialog surface (e.g. `dir`/`lang`\n * when the host pins a locale below `<html>`, or a test id).\n */\n contentProps?: ComponentPropsWithoutRef<'div'>;\n}\n\nconst ASSIGN_LATER = '__assign-later__';\n\n/** Canonical channel display order; per-signer availability filters this. */\nconst CHANNEL_ORDER: SignatureChannel[] = [\n 'sms',\n 'email',\n 'whatsapp',\n 'on-device',\n];\n\n/** Internal roster row — `rowId` keys the DOM so editing a row's person\n * never remounts the row (which would drop keyboard focus). */\ninterface RosterRow extends SignerRequest {\n rowId: number;\n}\n\nfunction labelFor(options: SignerOption[], value: string): string {\n return options.find((option) => option.value === value)?.label ?? '';\n}\n\nexport const SignatureRequestModal = forwardRef<\n HTMLDivElement,\n SignatureRequestModalProps\n>(\n (\n {\n open,\n onOpenChange,\n operators,\n signerOptions,\n currentOperatorId,\n allowAssignLater = true,\n requireOperator = true,\n requirePatient = true,\n initialOperatorId,\n initialOperatorChannel,\n initialSigners,\n maxSigners = 2,\n busy = false,\n error,\n title,\n description,\n onRequestSignature,\n contentProps,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n const nextRowId = useRef(0);\n const addButtonRef = useRef<HTMLButtonElement>(null);\n\n // Channels a given signer can receive on — the person's `availableChannels`\n // filtered into canonical order; omitted/empty means every channel.\n const channelsFor = (signerId: string): SignatureChannel[] => {\n const allowed = signerOptions.find(\n (option) => option.value === signerId,\n )?.availableChannels;\n return allowed && allowed.length > 0\n ? CHANNEL_ORDER.filter((channel) => allowed.includes(channel))\n : CHANNEL_ORDER;\n };\n\n // First available channel for a signer, preferring `preferred` when offered.\n const resolveChannel = (\n signerId: string,\n preferred: SignatureChannel,\n ): SignatureChannel => {\n const available = channelsFor(signerId);\n return available.includes(preferred) ? preferred : available[0];\n };\n\n const seedOperator = () => {\n if (initialOperatorId === null) {\n return allowAssignLater\n ? ASSIGN_LATER\n : (operators[0]?.value ?? ASSIGN_LATER);\n }\n return (\n initialOperatorId ??\n operators[0]?.value ??\n (allowAssignLater ? ASSIGN_LATER : '')\n );\n };\n const seedRows = (): RosterRow[] => {\n const seed =\n initialSigners && initialSigners.length > 0\n ? initialSigners\n : signerOptions.length > 0\n ? [\n {\n signerId: signerOptions[0].value,\n channel: resolveChannel(signerOptions[0].value, 'on-device'),\n },\n ]\n : [];\n return seed.map((signer) => ({ ...signer, rowId: nextRowId.current++ }));\n };\n\n // System-defined default for one operator — the channel their own\n // settings resolve to.\n const operatorDefaultChannel = (operatorId: string): OperatorChannel =>\n operators.find((option) => option.value === operatorId)?.defaultChannel ??\n 'email';\n\n // Seed clamp: `'on-device'` is honoured only when the seeded roster\n // makes it available, so the option is never checked-and-disabled, not\n // even for a frame.\n const seedOperatorChannel = (\n operatorId: string,\n rows: RosterRow[],\n ): OperatorChannel => {\n if (initialOperatorChannel === 'on-device') {\n return rows.some((signer) => signer.channel === 'on-device')\n ? 'on-device'\n : operatorDefaultChannel(operatorId);\n }\n return initialOperatorChannel ?? operatorDefaultChannel(operatorId);\n };\n\n const [operator, setOperator] = useState<string>(seedOperator);\n const [signers, setSigners] = useState<RosterRow[]>(seedRows);\n const [operatorChannel, setOperatorChannel] = useState<OperatorChannel>(\n () => seedOperatorChannel(operator, signers),\n );\n // Feeds the sr-only live region announcing the automatic channel\n // fallback below; any explicit choice clears it.\n const [revertedTo, setRevertedTo] = useState<OperatorChannel | null>(null);\n\n // Re-seed the form whenever the host reopens the (still-mounted) modal,\n // so a previous request's choices never leak into the next one.\n const wasOpen = useRef(open);\n useEffect(() => {\n if (open && !wasOpen.current) {\n const nextOperator = seedOperator();\n const nextRows = seedRows();\n setOperator(nextOperator);\n setSigners(nextRows);\n setOperatorChannel(seedOperatorChannel(nextOperator, nextRows));\n setRevertedTo(null);\n }\n wasOpen.current = open;\n // The seeds intentionally read the render-time props on the rising\n // edge only — prop changes while open (or closed) don't reset input.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n // Operator on-device signing piggybacks on a patient handover: it is\n // offerable only while a roster signer signs on this device, and falls\n // back to the operator's system default the moment the last on-device\n // row leaves. The fallback is announced via the live region — the\n // trigger lives in the roster section, far from the checkbox it moves.\n const anySignerOnDevice = signers.some(\n (signer) => signer.channel === 'on-device',\n );\n useEffect(() => {\n if (operatorChannel === 'on-device' && !anySignerOnDevice) {\n const fallback = operatorDefaultChannel(operator);\n setOperatorChannel(fallback);\n setRevertedTo(fallback);\n }\n // `operatorDefaultChannel` reads the render-time `operators` prop.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [operatorChannel, anySignerOnDevice, operator]);\n\n const operatorSelectOptions = allowAssignLater\n ? [\n ...operators,\n { value: ASSIGN_LATER, label: t('signatureRequest.assignLater') },\n ]\n : operators;\n const isUnassigned = operator === ASSIGN_LATER;\n\n const channelMeta: Record<\n SignatureChannel,\n { label: string; icon: React.ReactNode }\n > = {\n sms: {\n label: t('signatureRequest.viaSms'),\n icon: <MessageSquare className=\"ds:size-4\" aria-hidden />,\n },\n email: {\n label: t('signatureRequest.viaEmail'),\n icon: <Mail className=\"ds:size-4\" aria-hidden />,\n },\n whatsapp: {\n label: t('signatureRequest.viaWhatsapp'),\n icon: <WhatsAppGlyph className=\"ds:size-4\" aria-hidden />,\n },\n 'on-device': {\n label: t('signatureRequest.onThisDevice'),\n icon: <Tablet className=\"ds:size-4\" aria-hidden />,\n },\n };\n\n // Operator delivery — same checkbox visuals as the signer rows, minus\n // WhatsApp. No \"system defined\" option: the operator's own default\n // (e-mail or SMS per their settings) arrives pre-checked instead.\n // On-device greys out while no patient signer signs on this device;\n // an InfoTip explains why.\n const operatorChannelOptions: Array<{\n value: OperatorChannel;\n label: string;\n icon: React.ReactNode;\n disabled?: boolean;\n hint?: string;\n }> = [\n { value: 'sms', ...channelMeta.sms },\n { value: 'email', ...channelMeta.email },\n {\n value: 'on-device',\n ...channelMeta['on-device'],\n disabled: !anySignerOnDevice,\n hint: anySignerOnDevice\n ? undefined\n : t('signatureRequest.onDeviceUnavailableHint'),\n },\n ];\n\n const chosenIds = signers.map((signer) => signer.signerId);\n const nextFreeOption = signerOptions.find(\n (option) => !chosenIds.includes(option.value),\n );\n const canAddSigner =\n !busy && signers.length < maxSigners && nextFreeOption !== undefined;\n\n const patchSigner = (rowId: number, patch: Partial<SignerRequest>) => {\n setSigners((current) =>\n current.map((signer) =>\n signer.rowId === rowId ? { ...signer, ...patch } : signer,\n ),\n );\n };\n\n const addSigner = () => {\n if (!nextFreeOption) return;\n setSigners((current) => [\n ...current,\n {\n signerId: nextFreeOption.value,\n channel: resolveChannel(nextFreeOption.value, 'sms'),\n rowId: nextRowId.current++,\n },\n ]);\n };\n\n const removeSigner = (rowId: number) => {\n // Move focus BEFORE the row (and the focused remove button) unmounts —\n // otherwise Radix's focus scope dumps focus on the dialog container.\n addButtonRef.current?.focus();\n setSigners((current) =>\n current.filter((signer) => signer.rowId !== rowId),\n );\n };\n\n const handleRequest = () => {\n onRequestSignature({\n operatorId: !requireOperator || isUnassigned ? null : operator,\n operatorChannel:\n !requireOperator || isUnassigned ? null : operatorChannel,\n signers: requirePatient\n ? signers.map(({ rowId: _rowId, ...signer }) => signer)\n : [],\n });\n };\n\n return (\n <div ref={ref} className=\"ds:contents\" data-component=\"signature-request\">\n <Dialog open={open} onOpenChange={onOpenChange}>\n <Dialog.Content size=\"lg\" hideCloseButton {...contentProps}>\n <Dialog.Header>\n <Dialog.Title>\n {title ?? t('signatureRequest.title')}\n </Dialog.Title>\n <Dialog.Description>\n {description ?? t('signatureRequest.noSignedVersions')}\n </Dialog.Description>\n </Dialog.Header>\n\n <Dialog.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {requireOperator ? (\n <section className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <p className=\"type-eyebrow ds:text-start ds:text-[color:var(--muted-foreground)]\">\n {t('signatureRequest.operatorSection')}\n </p>\n {currentOperatorId !== undefined ? (\n <Button\n intent=\"primary\"\n size=\"sm\"\n startIcon={<UserPlus />}\n disabled={busy}\n onClick={() => {\n setOperator(currentOperatorId);\n setOperatorChannel(\n operatorDefaultChannel(currentOperatorId),\n );\n setRevertedTo(null);\n }}\n >\n {t('signatureRequest.assignToMe')}\n </Button>\n ) : null}\n </div>\n\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n {/* Mirrors the select value — decorative for AT. No name →\n Avatar's built-in placeholder-icon fallback. */}\n <Avatar\n aria-hidden=\"true\"\n name={\n isUnassigned ? undefined : labelFor(operators, operator)\n }\n size=\"sm\"\n />\n <div className=\"ds:min-w-0 ds:flex-1 ds:text-start\">\n <Select\n options={operatorSelectOptions}\n value={operator}\n onValueChange={(value) => {\n if (!value) return;\n setOperator(value);\n // A different operator brings their own system\n // default along.\n setOperatorChannel(\n value === ASSIGN_LATER\n ? 'email'\n : operatorDefaultChannel(value),\n );\n setRevertedTo(null);\n }}\n required\n disabled={busy}\n placeholder={t('signatureRequest.operatorPlaceholder')}\n aria-label={t('signatureRequest.operatorSection')}\n />\n </div>\n </div>\n\n {/* One channel for the operator too — same mutually exclusive\n checkbox visuals as the signer rows. Hidden while the\n request is unassigned: there is nobody to deliver to. */}\n {isUnassigned ? null : (\n <div\n role=\"group\"\n aria-label={t('signatureRequest.operatorChannelLabel')}\n className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-lg)] ds:gap-y-[var(--spacing-sm)] ds:ps-[var(--spacing-xl)]\"\n >\n {operatorChannelOptions.map((option) => (\n <span\n key={option.value}\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]\"\n >\n <Checkbox\n checked={operatorChannel === option.value}\n disabled={busy || option.disabled}\n onCheckedChange={(checked) => {\n if (checked !== true) return;\n setOperatorChannel(option.value);\n setRevertedTo(null);\n }}\n label={\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span\n aria-hidden=\"true\"\n className=\"ds:text-[var(--accent)]\"\n >\n {option.icon}\n </span>\n {option.label}\n </span>\n }\n />\n {/* Sibling of the checkbox, never inside its label —\n the tip is its own interactive control. The wider\n gap keeps the tip's touch hit-area off the label. */}\n {option.hint ? (\n <InfoTip size=\"sm\" content={option.hint} />\n ) : null}\n </span>\n ))}\n </div>\n )}\n\n {/* Announces the automatic on-device → default fallback: the\n trigger (the patient's channel change) sits in another\n section, so the moved checkmark alone is not enough. */}\n <span role=\"status\" className=\"ds:sr-only\">\n {revertedTo\n ? t('signatureRequest.operatorChannelReverted', {\n channel: channelMeta[revertedTo].label,\n })\n : null}\n </span>\n </section>\n ) : null}\n\n {/* The rule only separates two sections that are both there. */}\n {requireOperator && requirePatient ? (\n <Separator decorative />\n ) : null}\n\n {requirePatient ? (\n <section className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-start\">\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <p className=\"type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {t('signatureRequest.signersSection')}\n </p>\n {/* Offered only when the roster holds more than one\n person. A patient with nobody else to sign for them saw\n a permanently greyed action — a promise the modal could\n never keep. With two or more it stays, greying (not\n hiding) once every seat is taken so the cap reads. */}\n {signerOptions.length > 1 ? (\n <Button\n ref={addButtonRef}\n intent=\"primary\"\n size=\"sm\"\n startIcon={<Plus />}\n disabled={!canAddSigner}\n onClick={addSigner}\n >\n {t('signatureRequest.addSigner')}\n </Button>\n ) : null}\n </div>\n\n {signers.map((signer) => {\n const rowOptions = signerOptions.filter(\n (option) =>\n option.value === signer.signerId ||\n !chosenIds.includes(option.value),\n );\n const rowLabel = labelFor(signerOptions, signer.signerId);\n const rowChannelOptions = channelsFor(signer.signerId).map(\n (channel) => ({\n value: channel,\n ...channelMeta[channel],\n }),\n );\n return (\n <div\n key={signer.rowId}\n role=\"group\"\n aria-label={rowLabel}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n {/* Mirrors the select value — decorative for AT. */}\n <Avatar\n aria-hidden=\"true\"\n name={rowLabel}\n size=\"sm\"\n />\n <div className=\"ds:min-w-0 ds:flex-1\">\n <Select\n options={rowOptions}\n value={signer.signerId}\n onValueChange={(value) => {\n if (!value) return;\n const channel = resolveChannel(\n value,\n signer.channel,\n );\n patchSigner(signer.rowId, {\n signerId: value,\n channel,\n skipOtp:\n channel === 'on-device'\n ? signer.skipOtp\n : undefined,\n });\n }}\n required\n disabled={busy}\n placeholder={t(\n 'signatureRequest.signerPlaceholder',\n )}\n aria-label={t(\n 'signatureRequest.signerPlaceholder',\n )}\n />\n </div>\n {signers.length > 1 ? (\n <IconButton\n intent=\"ghost\"\n size=\"sm\"\n icon={<X />}\n disabled={busy}\n aria-label={t('signatureRequest.removeSigner')}\n onClick={() => removeSigner(signer.rowId)}\n />\n ) : null}\n </div>\n\n {/* One channel per signer — checkbox visuals, but the\n choice is mutually exclusive: checking a channel\n unchecks the others, and the active one can't be\n unchecked. */}\n <div\n role=\"group\"\n aria-label={t('signatureRequest.channelLabel')}\n className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-lg)] ds:gap-y-[var(--spacing-sm)] ds:ps-[var(--spacing-xl)]\"\n >\n {rowChannelOptions.map((option) => (\n <Checkbox\n key={option.value}\n checked={signer.channel === option.value}\n disabled={busy}\n onCheckedChange={(checked) =>\n checked === true &&\n patchSigner(signer.rowId, {\n channel: option.value,\n skipOtp: undefined,\n })\n }\n label={\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span\n aria-hidden=\"true\"\n className=\"ds:text-[var(--accent)]\"\n >\n {option.icon}\n </span>\n {option.label}\n </span>\n }\n />\n ))}\n </div>\n\n {signer.channel === 'on-device' ? (\n <div className=\"ds:ps-[var(--spacing-xl)]\">\n <Switch\n label={t('signatureRequest.noOtp')}\n checked={signer.skipOtp === true}\n disabled={busy}\n onCheckedChange={(checked) =>\n patchSigner(signer.rowId, { skipOtp: checked })\n }\n />\n </div>\n ) : null}\n </div>\n );\n })}\n </section>\n ) : null}\n\n {/* Dedicated alert area — one warning regardless of how many\n signers waive OTP, stacked with any submission error, all at\n the same full width as the operator hint. */}\n {signers.some(\n (signer) =>\n signer.channel === 'on-device' && signer.skipOtp === true,\n ) ? (\n <Alert variant=\"warning\">\n <Alert.Description>\n {t('signatureRequest.noOtpWarning')}\n </Alert.Description>\n </Alert>\n ) : null}\n {error ? (\n <Alert variant=\"error\">\n <Alert.Description>{error}</Alert.Description>\n </Alert>\n ) : null}\n </Dialog.Body>\n\n <Dialog.Footer>\n <Button\n intent=\"primary\"\n startIcon={<PenLine />}\n onClick={handleRequest}\n disabled={\n busy ||\n (requirePatient && signers.length === 0) ||\n (!requirePatient && !requireOperator)\n }\n loading={busy}\n >\n {t('signatureRequest.requestSignature')}\n </Button>\n <Dialog.Close asChild>\n <Button intent=\"outline\" disabled={busy}>\n {t('signatureRequest.close')}\n </Button>\n </Dialog.Close>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog>\n </div>\n );\n },\n);\nSignatureRequestModal.displayName = 'SignatureRequestModal';\n"],"names":["__iconNode","Tablet","createLucideIcon","UserPlus","ASSIGN_LATER","CHANNEL_ORDER","labelFor","options","value","_a","option","SignatureRequestModal","forwardRef","open","onOpenChange","operators","signerOptions","currentOperatorId","allowAssignLater","requireOperator","requirePatient","initialOperatorId","initialOperatorChannel","initialSigners","maxSigners","busy","error","title","description","onRequestSignature","contentProps","ref","t","useTranslation","nextRowId","useRef","addButtonRef","channelsFor","signerId","allowed","channel","resolveChannel","preferred","available","seedOperator","_b","seedRows","signer","operatorDefaultChannel","operatorId","seedOperatorChannel","rows","operator","setOperator","useState","signers","setSigners","operatorChannel","setOperatorChannel","revertedTo","setRevertedTo","wasOpen","useEffect","nextOperator","nextRows","anySignerOnDevice","fallback","operatorSelectOptions","isUnassigned","channelMeta","jsx","MessageSquare","Mail","WhatsAppGlyph","operatorChannelOptions","chosenIds","nextFreeOption","canAddSigner","patchSigner","rowId","patch","current","addSigner","removeSigner","handleRequest","_rowId","Dialog","jsxs","Button","Avatar","Select","Checkbox","checked","InfoTip","Separator","Plus","rowOptions","rowLabel","rowChannelOptions","IconButton","X","Switch","Alert","PenLine"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,MAAM,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK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AAAA,QAAA;AAAA,QAExC,gBAAA6C,EAACgB,EAAO,OAAP,EAAa,SAAO,IACnB,UAAA,gBAAAhB,EAACkB,GAAA,EAAO,QAAO,WAAU,UAAU/D,GAChC,UAAAO,EAAE,wBAAwB,GAC7B,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,EAAA,CACF,GACF,GACF;AAAA,EAEJ;AACF;AACArB,GAAsB,cAAc;","x_google_ignoreList":[0,1]}
|
|
@@ -2,9 +2,9 @@ import { jsx as r, jsxs as k } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as ye, useId as he, useState as me, useCallback as M, useRef as ge, useEffect as ve, useMemo as be } from "react";
|
|
3
3
|
import { c as m } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as we } from "react-i18next";
|
|
5
|
-
import { B as F } from "./button-
|
|
6
|
-
import { I as q } from "./icon-button-
|
|
7
|
-
import { E as xe } from "./empty-state-
|
|
5
|
+
import { B as F } from "./button-nJaPh_HC.js";
|
|
6
|
+
import { I as q } from "./icon-button-DA2CAGHZ.js";
|
|
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";
|
|
10
10
|
import { b as ke, f as De } from "./format-4HNwNGrN.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-BuZOKfcd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot-grid-P_e9p5t5.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,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AAAA,UAEC0C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAvD,GAAS,cAAc;"}
|
|
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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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-BIkpRLkl.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-CvsjIQ7S.js.map
|