@alfadocs/ui-kit-debug 1.35.0 → 1.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{actions-cell-renderer-yy03OgRL.js → actions-cell-renderer-CUn1pqEq.js} +3 -3
- package/dist/_chunks/{actions-cell-renderer-yy03OgRL.js.map → actions-cell-renderer-CUn1pqEq.js.map} +1 -1
- package/dist/_chunks/{agenda-card-DVz3jwTf.js → agenda-card-DyQtHb9z.js} +2 -2
- package/dist/_chunks/{agenda-card-DVz3jwTf.js.map → agenda-card-DyQtHb9z.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-1oDWCJdB.js → agenda-tray-DYGCTIWB.js} +3 -3
- package/dist/_chunks/{agenda-tray-1oDWCJdB.js.map → agenda-tray-DYGCTIWB.js.map} +1 -1
- package/dist/_chunks/{ai-consent-banner-OggpS5hW.js → ai-consent-banner-De4gzSBZ.js} +4 -4
- package/dist/_chunks/{ai-consent-banner-OggpS5hW.js.map → ai-consent-banner-De4gzSBZ.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-Dt7tpCBh.js → ai-prompt-input-DdxlaI7q.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-Dt7tpCBh.js.map → ai-prompt-input-DdxlaI7q.js.map} +1 -1
- package/dist/_chunks/{alert-CiJT540z.js → alert-CiQ5Pa3Q.js} +2 -2
- package/dist/_chunks/{alert-CiJT540z.js.map → alert-CiQ5Pa3Q.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-D18kp3p9.js → alia-sidebar-B6bXlZZk.js} +6 -6
- package/dist/_chunks/{alia-sidebar-D18kp3p9.js.map → alia-sidebar-B6bXlZZk.js.map} +1 -1
- package/dist/_chunks/{anamnesis-card-NTi4LLzI.js → anamnesis-card-DGwINeNn.js} +3 -3
- package/dist/_chunks/{anamnesis-card-NTi4LLzI.js.map → anamnesis-card-DGwINeNn.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-card-DGVKBQoq.js → anamnesis-summary-card-GYHa7VGp.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-card-DGVKBQoq.js.map → anamnesis-summary-card-GYHa7VGp.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-BYgyp_i2.js → anamnesis-summary-rows-Cxtgo2ok.js} +12 -12
- package/dist/_chunks/{anamnesis-summary-rows-BYgyp_i2.js.map → anamnesis-summary-rows-Cxtgo2ok.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-sXfIp5lp.js → antenatal-schedule-timeline-CXk_tzWG.js} +2 -2
- package/dist/_chunks/{antenatal-schedule-timeline-sXfIp5lp.js.map → antenatal-schedule-timeline-CXk_tzWG.js.map} +1 -1
- package/dist/_chunks/{appointment-card-Bh_CIlc6.js → appointment-card-WsDGBBut.js} +120 -126
- package/dist/_chunks/appointment-card-WsDGBBut.js.map +1 -0
- package/dist/_chunks/{appointment-timeline-De-Wqdkw.js → appointment-timeline-ByfovxqR.js} +5 -5
- package/dist/_chunks/{appointment-timeline-De-Wqdkw.js.map → appointment-timeline-ByfovxqR.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-4I9wTAi4.js → appointment-tray-D6UyJHej.js} +3 -3
- package/dist/_chunks/{appointment-tray-4I9wTAi4.js.map → appointment-tray-D6UyJHej.js.map} +1 -1
- package/dist/_chunks/arrow-right-KsIrLdt0.js +15 -0
- package/dist/_chunks/arrow-right-KsIrLdt0.js.map +1 -0
- package/dist/_chunks/{audio-recorder-11wClczr.js → audio-recorder-BlQBC7N_.js} +3 -3
- package/dist/_chunks/{audio-recorder-11wClczr.js.map → audio-recorder-BlQBC7N_.js.map} +1 -1
- package/dist/_chunks/{badge-sTusUqZD.js → badge-BudgzTe_.js} +2 -2
- package/dist/_chunks/{badge-sTusUqZD.js.map → badge-BudgzTe_.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-DhBtFRoW.js → balance-badge-cell-B0Z8Dwn8.js} +6 -6
- package/dist/_chunks/{balance-badge-cell-DhBtFRoW.js.map → balance-badge-cell-B0Z8Dwn8.js.map} +1 -1
- package/dist/_chunks/{bishop-score-CAl7C5hm.js → bishop-score-D5b8tktp.js} +2 -2
- package/dist/_chunks/{bishop-score-CAl7C5hm.js.map → bishop-score-D5b8tktp.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-Dwkih9a4.js → bmi-calculator-dOKP-vW4.js} +4 -4
- package/dist/_chunks/{bmi-calculator-Dwkih9a4.js.map → bmi-calculator-dOKP-vW4.js.map} +1 -1
- package/dist/_chunks/{booking-BqkEtsKx.js → booking-Dp-9qR6F.js} +9 -9
- package/dist/_chunks/{booking-BqkEtsKx.js.map → booking-Dp-9qR6F.js.map} +1 -1
- package/dist/_chunks/button-group-QmN1VdUW.js +307 -0
- package/dist/_chunks/button-group-QmN1VdUW.js.map +1 -0
- package/dist/_chunks/{calendar-Dgvl5L4T.js → calendar-7GAUlsNO.js} +3 -3
- package/dist/_chunks/{calendar-Dgvl5L4T.js.map → calendar-7GAUlsNO.js.map} +1 -1
- package/dist/_chunks/{calendar-event-card-DSh-69HT.js → calendar-event-card-DKUnT9Be.js} +91 -134
- package/dist/_chunks/calendar-event-card-DKUnT9Be.js.map +1 -0
- package/dist/_chunks/{calendar-workspace-UywR5gUl.js → calendar-workspace-BYwQK7fz.js} +2501 -2415
- package/dist/_chunks/calendar-workspace-BYwQK7fz.js.map +1 -0
- package/dist/_chunks/{care-plan-card-DHVhBcvs.js → care-plan-card-COFOI-fI.js} +5 -5
- package/dist/_chunks/{care-plan-card-DHVhBcvs.js.map → care-plan-card-COFOI-fI.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-Dx6IdTcR.js → care-plan-entry-card-BOKn0KW-.js} +6 -6
- package/dist/_chunks/{care-plan-entry-card-Dx6IdTcR.js.map → care-plan-entry-card-BOKn0KW-.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-UTX5ZD74.js → care-plan-header-CbuOuVBw.js} +4 -4
- package/dist/_chunks/{care-plan-header-UTX5ZD74.js.map → care-plan-header-CbuOuVBw.js.map} +1 -1
- package/dist/_chunks/{carousel.agent-CLxdHEBP.js → carousel.agent-Dv4a4M8L.js} +2 -2
- package/dist/_chunks/{carousel.agent-CLxdHEBP.js.map → carousel.agent-Dv4a4M8L.js.map} +1 -1
- package/dist/_chunks/{chart-C6eHTxkO.js → chart-iWl76PXv.js} +3 -3
- package/dist/_chunks/{chart-C6eHTxkO.js.map → chart-iWl76PXv.js.map} +1 -1
- package/dist/_chunks/{chat-input-BsB5Umpj.js → chat-input-qM5QpUSq.js} +2 -2
- package/dist/_chunks/{chat-input-BsB5Umpj.js.map → chat-input-qM5QpUSq.js.map} +1 -1
- package/dist/_chunks/{chat-message-C-8UU2av.js → chat-message-RniXtrCH.js} +2 -2
- package/dist/_chunks/{chat-message-C-8UU2av.js.map → chat-message-RniXtrCH.js.map} +1 -1
- package/dist/_chunks/{checkbox-BuZ1u__2.js → checkbox-CZkipDn7.js} +2 -2
- package/dist/_chunks/{checkbox-BuZ1u__2.js.map → checkbox-CZkipDn7.js.map} +1 -1
- package/dist/_chunks/{checkbox-group-CfqMv57d.js → checkbox-group-DomUzpkF.js} +2 -2
- package/dist/_chunks/{checkbox-group-CfqMv57d.js.map → checkbox-group-DomUzpkF.js.map} +1 -1
- package/dist/_chunks/clinical-note-card-DdsGYMmI.js +325 -0
- package/dist/_chunks/clinical-note-card-DdsGYMmI.js.map +1 -0
- package/dist/_chunks/{code-block-BIkpRLkl.js → code-block-uVjNSI9g.js} +2 -2
- package/dist/_chunks/{code-block-BIkpRLkl.js.map → code-block-uVjNSI9g.js.map} +1 -1
- package/dist/_chunks/{connection-status-DRZIcMqM.js → connection-status-OEsWjmRk.js} +3 -3
- package/dist/_chunks/{connection-status-DRZIcMqM.js.map → connection-status-OEsWjmRk.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-DSI9uumA.js → contact-profile-card--My1H2UD.js} +3 -3
- package/dist/_chunks/{contact-profile-card-DSI9uumA.js.map → contact-profile-card--My1H2UD.js.map} +1 -1
- package/dist/_chunks/{control-room-rail-5MbhjsxN.js → control-room-rail-Ds45_g4f.js} +4 -4
- package/dist/_chunks/{control-room-rail-5MbhjsxN.js.map → control-room-rail-Ds45_g4f.js.map} +1 -1
- package/dist/_chunks/{counter-dRlTNC_y.js → counter-WsvRuum1.js} +50 -15
- package/dist/_chunks/counter-WsvRuum1.js.map +1 -0
- package/dist/_chunks/{cycle-calculator-DVgxBfP0.js → cycle-calculator-BJeaXiZv.js} +3 -3
- package/dist/_chunks/{cycle-calculator-DVgxBfP0.js.map → cycle-calculator-BJeaXiZv.js.map} +1 -1
- package/dist/_chunks/{dashboard-grid-BFtdHqfn.js → dashboard-grid-B23BFzRl.js} +2 -2
- package/dist/_chunks/{dashboard-grid-BFtdHqfn.js.map → dashboard-grid-B23BFzRl.js.map} +1 -1
- package/dist/_chunks/{data-table-DC96JJIq.js → data-table-BYGK-gUJ.js} +6 -6
- package/dist/_chunks/{data-table-DC96JJIq.js.map → data-table-BYGK-gUJ.js.map} +1 -1
- package/dist/_chunks/{data-table-tabs-DVIFkqx_.js → data-table-tabs-BMR0zsVQ.js} +3 -3
- package/dist/_chunks/{data-table-tabs-DVIFkqx_.js.map → data-table-tabs-BMR0zsVQ.js.map} +1 -1
- package/dist/_chunks/{date-picker-B6NW_PS5.js → date-picker-6tFnKFty.js} +14 -14
- package/dist/_chunks/{date-picker-B6NW_PS5.js.map → date-picker-6tFnKFty.js.map} +1 -1
- package/dist/_chunks/{dependent-selector-yTKKsuc9.js → dependent-selector-BHDP0nBB.js} +3 -3
- package/dist/_chunks/{dependent-selector-yTKKsuc9.js.map → dependent-selector-BHDP0nBB.js.map} +1 -1
- package/dist/_chunks/{description-list-CjJqR8WK.js → description-list-C1RXMDZ_.js} +2 -2
- package/dist/_chunks/{description-list-CjJqR8WK.js.map → description-list-C1RXMDZ_.js.map} +1 -1
- package/dist/_chunks/{document-preview-BrhMHNh8.js → document-preview-DsEyRcNd.js} +4 -4
- package/dist/_chunks/{document-preview-BrhMHNh8.js.map → document-preview-DsEyRcNd.js.map} +1 -1
- package/dist/_chunks/{document-scanner-C5Vrbu21.js → document-scanner-CbWVtm7u.js} +53 -52
- package/dist/_chunks/{document-scanner-C5Vrbu21.js.map → document-scanner-CbWVtm7u.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-CxgK8vzt.js → due-date-calculator-Dhc9Ljkb.js} +6 -6
- package/dist/_chunks/{due-date-calculator-CxgK8vzt.js.map → due-date-calculator-Dhc9Ljkb.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-B7TVZ5ZJ.js → editable-currency-cell-renderer-D7blbDFY.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-B7TVZ5ZJ.js.map → editable-currency-cell-renderer-D7blbDFY.js.map} +1 -1
- package/dist/_chunks/{editor-overlay-DEc5yYwo.js → editor-overlay-8fKAcRsm.js} +2 -2
- package/dist/_chunks/{editor-overlay-DEc5yYwo.js.map → editor-overlay-8fKAcRsm.js.map} +1 -1
- package/dist/_chunks/{entity-card-9_62gY7l.js → entity-card-I-Gio5wo.js} +36 -32
- package/dist/_chunks/entity-card-I-Gio5wo.js.map +1 -0
- package/dist/_chunks/{entity-summary-5o768XLU.js → entity-summary-BbW0mIzU.js} +4 -4
- package/dist/_chunks/{entity-summary-5o768XLU.js.map → entity-summary-BbW0mIzU.js.map} +1 -1
- package/dist/_chunks/{face-scheme-l-CQyLs-.js → face-scheme-uFvhqz6h.js} +4 -4
- package/dist/_chunks/{face-scheme-l-CQyLs-.js.map → face-scheme-uFvhqz6h.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-Dqy0T1fP.js → fetal-weight-C6SxchOv.js} +2 -2
- package/dist/_chunks/{fetal-weight-Dqy0T1fP.js.map → fetal-weight-C6SxchOv.js.map} +1 -1
- package/dist/_chunks/{field-array-BjkXZzSr.js → field-array-C9dmRaIM.js} +2 -2
- package/dist/_chunks/{field-array-BjkXZzSr.js.map → field-array-C9dmRaIM.js.map} +1 -1
- package/dist/_chunks/{file-manager-CI2Qn8qW.js → file-manager-DvkFgj7d.js} +7 -7
- package/dist/_chunks/{file-manager-CI2Qn8qW.js.map → file-manager-DvkFgj7d.js.map} +1 -1
- package/dist/_chunks/{file-upload-CwxdqkMK.js → file-upload-BDpb08GM.js} +71 -78
- package/dist/_chunks/file-upload-BDpb08GM.js.map +1 -0
- package/dist/_chunks/{fiscal-code-input-B_nYMSEM.js → fiscal-code-input-CkwIdB1y.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-B_nYMSEM.js.map → fiscal-code-input-CkwIdB1y.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-DrXzYfv-.js → freemium-paywall-BqGk_SBU.js} +2 -2
- package/dist/_chunks/{freemium-paywall-DrXzYfv-.js.map → freemium-paywall-BqGk_SBU.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-CZHVrERT.js → gestational-age-calculator-DDOGaPvg.js} +6 -6
- package/dist/_chunks/{gestational-age-calculator-CZHVrERT.js.map → gestational-age-calculator-DDOGaPvg.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-C2fQxfXd.js → hcg-doubling-Bb_n6tEa.js} +2 -2
- package/dist/_chunks/{hcg-doubling-C2fQxfXd.js.map → hcg-doubling-Bb_n6tEa.js.map} +1 -1
- package/dist/_chunks/{header-DUXRIPyM.js → header-BZ4pZlJV.js} +2 -2
- package/dist/_chunks/{header-DUXRIPyM.js.map → header-BZ4pZlJV.js.map} +1 -1
- package/dist/_chunks/{header-settings-DvjZNMhD.js → header-settings-B8mLc03Q.js} +4 -4
- package/dist/_chunks/{header-settings-DvjZNMhD.js.map → header-settings-B8mLc03Q.js.map} +1 -1
- package/dist/_chunks/hover-card-Bcku1GQu.js +511 -0
- package/dist/_chunks/hover-card-Bcku1GQu.js.map +1 -0
- package/dist/_chunks/{icon-button-DA2CAGHZ.js → icon-button-8xqRnkdG.js} +2 -2
- package/dist/_chunks/{icon-button-DA2CAGHZ.js.map → icon-button-8xqRnkdG.js.map} +1 -1
- package/dist/_chunks/{icon-button-group-VCCod3Hz.js → icon-button-group-Dj6CRoYR.js} +2 -2
- package/dist/_chunks/{icon-button-group-VCCod3Hz.js.map → icon-button-group-Dj6CRoYR.js.map} +1 -1
- package/dist/_chunks/{icon-picker-DOa89vn3.js → icon-picker-CTWzlHJr.js} +2 -2
- package/dist/_chunks/{icon-picker-DOa89vn3.js.map → icon-picker-CTWzlHJr.js.map} +1 -1
- package/dist/_chunks/{info-tip-CADik6WN.js → info-tip-ey_Pon2y.js} +2 -2
- package/dist/_chunks/{info-tip-CADik6WN.js.map → info-tip-ey_Pon2y.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-BIBdZBLg.js → key-value-pair-DczGb4yz.js} +42 -41
- package/dist/_chunks/key-value-pair-DczGb4yz.js.map +1 -0
- package/dist/_chunks/{link-cell-renderer-BEpMNtAa.js → link-cell-renderer-BNa8x6oJ.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-BEpMNtAa.js.map → link-cell-renderer-BNa8x6oJ.js.map} +1 -1
- package/dist/_chunks/loader-circle-BECIU_8N.js +12 -0
- package/dist/_chunks/loader-circle-BECIU_8N.js.map +1 -0
- package/dist/_chunks/{locale-picker-CwFtqSkt.js → locale-picker-BLeHbFSc.js} +3 -3
- package/dist/_chunks/{locale-picker-CwFtqSkt.js.map → locale-picker-BLeHbFSc.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-CK_ND8Tr.js → marketplace-app-shell-BwH6Aruw.js} +6 -6
- package/dist/_chunks/{marketplace-app-shell-CK_ND8Tr.js.map → marketplace-app-shell-BwH6Aruw.js.map} +1 -1
- package/dist/_chunks/{message-card-BUMv16un.js → message-card-Dm5Xshup.js} +2 -2
- package/dist/_chunks/{message-card-BUMv16un.js.map → message-card-Dm5Xshup.js.map} +1 -1
- package/dist/_chunks/{message-tray-0zsv27xX.js → message-tray-BcLyaO-G.js} +3 -3
- package/dist/_chunks/{message-tray-0zsv27xX.js.map → message-tray-BcLyaO-G.js.map} +1 -1
- package/dist/_chunks/{multi-select-DYOvx2SJ.js → multi-select-CtPd7g4x.js} +15 -15
- package/dist/_chunks/{multi-select-DYOvx2SJ.js.map → multi-select-CtPd7g4x.js.map} +1 -1
- package/dist/_chunks/note-attachment-CwDir3kK.js +124 -0
- package/dist/_chunks/note-attachment-CwDir3kK.js.map +1 -0
- package/dist/_chunks/note-timeline-CXfSV3yX.js +231 -0
- package/dist/_chunks/note-timeline-CXfSV3yX.js.map +1 -0
- package/dist/_chunks/{notes-panel-BjLt-kiP.js → notes-panel-Co8D3uDd.js} +7 -7
- package/dist/_chunks/{notes-panel-BjLt-kiP.js.map → notes-panel-Co8D3uDd.js.map} +1 -1
- package/dist/_chunks/{notification-card-CtrzoTUO.js → notification-card-ChcK9Wat.js} +2 -2
- package/dist/_chunks/{notification-card-CtrzoTUO.js.map → notification-card-ChcK9Wat.js.map} +1 -1
- package/dist/_chunks/{notification-tray-BiRzXHDf.js → notification-tray-CJ8jOe-U.js} +4 -4
- package/dist/_chunks/{notification-tray-BiRzXHDf.js.map → notification-tray-CJ8jOe-U.js.map} +1 -1
- package/dist/_chunks/{operator-hero-aG_qyn6g.js → operator-hero-XIdwDmN2.js} +3 -3
- package/dist/_chunks/{operator-hero-aG_qyn6g.js.map → operator-hero-XIdwDmN2.js.map} +1 -1
- package/dist/_chunks/{optical-prescription-DUJOhKz_.js → optical-prescription-cphK41eP.js} +2 -2
- package/dist/_chunks/{optical-prescription-DUJOhKz_.js.map → optical-prescription-cphK41eP.js.map} +1 -1
- package/dist/_chunks/panel-header-D_mTdhUp.js +128 -0
- package/dist/_chunks/panel-header-D_mTdhUp.js.map +1 -0
- package/dist/_chunks/patient-details-f7SSXkTJ.js +371 -0
- package/dist/_chunks/patient-details-f7SSXkTJ.js.map +1 -0
- package/dist/_chunks/patient-field-row-BQZoP4m2.js +787 -0
- package/dist/_chunks/patient-field-row-BQZoP4m2.js.map +1 -0
- package/dist/_chunks/{patient-search-HeEUB-_X.js → patient-search-D08b6jgj.js} +2 -2
- package/dist/_chunks/{patient-search-HeEUB-_X.js.map → patient-search-D08b6jgj.js.map} +1 -1
- package/dist/_chunks/patient-summary-card-Bz7KdUin.js +533 -0
- package/dist/_chunks/patient-summary-card-Bz7KdUin.js.map +1 -0
- package/dist/_chunks/{payment-automation-upsell-DwQW2fRp.js → payment-automation-upsell-BLTdE2em.js} +50 -59
- package/dist/_chunks/payment-automation-upsell-BLTdE2em.js.map +1 -0
- package/dist/_chunks/{payment-form-Ds1I9KqB.js → payment-form-BHMDqW9C.js} +2 -2
- package/dist/_chunks/{payment-form-Ds1I9KqB.js.map → payment-form-BHMDqW9C.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-DvEsWEkC.js → payment-request-card-BxcdvxKR.js} +6 -6
- package/dist/_chunks/{payment-request-card-DvEsWEkC.js.map → payment-request-card-BxcdvxKR.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer-DUIsV9s5.js → pdf-viewer-DUKdn5iq.js} +2 -2
- package/dist/_chunks/{pdf-viewer-DUIsV9s5.js.map → pdf-viewer-DUKdn5iq.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-B9fphroR.js → periodontal-chart-BF_e3wZp.js} +2 -2
- package/dist/_chunks/{periodontal-chart-B9fphroR.js.map → periodontal-chart-BF_e3wZp.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-qEZPXj83.js → periodontal-chart-card-BJEuJuzh.js} +3 -3
- package/dist/_chunks/{periodontal-chart-card-qEZPXj83.js.map → periodontal-chart-card-BJEuJuzh.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-lEwA8wqX.js → periodontal-diagnosis-C7pfPOct.js} +5 -5
- package/dist/_chunks/{periodontal-diagnosis-lEwA8wqX.js.map → periodontal-diagnosis-C7pfPOct.js.map} +1 -1
- package/dist/_chunks/{periodontal-risk-chart-0x7KVZjL.js → periodontal-risk-chart-B2tNFa15.js} +2 -2
- package/dist/_chunks/{periodontal-risk-chart-0x7KVZjL.js.map → periodontal-risk-chart-B2tNFa15.js.map} +1 -1
- package/dist/_chunks/{permission-matrix-BIJrGEmz.js → permission-matrix-VdAXjjHU.js} +3 -3
- package/dist/_chunks/{permission-matrix-BIJrGEmz.js.map → permission-matrix-VdAXjjHU.js.map} +1 -1
- package/dist/_chunks/{popover-DP6WCVwm.js → popover-DzR5QYxp.js} +24 -24
- package/dist/_chunks/{popover-DP6WCVwm.js.map → popover-DzR5QYxp.js.map} +1 -1
- package/dist/_chunks/{practice-profile-hero-DQyDvpJL.js → practice-profile-hero-DxoLlQr5.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-DQyDvpJL.js.map → practice-profile-hero-DxoLlQr5.js.map} +1 -1
- package/dist/_chunks/{practice-results-kayDEorM.js → practice-results-DOcORTkP.js} +4 -4
- package/dist/_chunks/{practice-results-kayDEorM.js.map → practice-results-DOcORTkP.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-n5j5dAKy.js → pregnancy-dating-nV1_S6w0.js} +6 -6
- package/dist/_chunks/{pregnancy-dating-n5j5dAKy.js.map → pregnancy-dating-nV1_S6w0.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-D5A8vPjj.js → pregnancy-weight-gain-tRecShAD.js} +4 -4
- package/dist/_chunks/{pregnancy-weight-gain-D5A8vPjj.js.map → pregnancy-weight-gain-tRecShAD.js.map} +1 -1
- package/dist/_chunks/{privacy-lock-CkAUo6Dz.js → privacy-lock-Be39vQUN.js} +2 -2
- package/dist/_chunks/{privacy-lock-CkAUo6Dz.js.map → privacy-lock-Be39vQUN.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-BScCotGD.js → product-hub-panel-C0TO69P7.js} +2 -2
- package/dist/_chunks/{product-hub-panel-BScCotGD.js.map → product-hub-panel-C0TO69P7.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-kth2SdXn.js → public-header.agent-Bl1KFwSE.js} +3 -3
- package/dist/_chunks/{public-header.agent-kth2SdXn.js.map → public-header.agent-Bl1KFwSE.js.map} +1 -1
- package/dist/_chunks/{radio-DNRe6H_8.js → radio-6fml-pWk.js} +2 -2
- package/dist/_chunks/{radio-DNRe6H_8.js.map → radio-6fml-pWk.js.map} +1 -1
- package/dist/_chunks/{radio-group-DyVBgnA3.js → radio-group-CIjmyioi.js} +3 -3
- package/dist/_chunks/{radio-group-DyVBgnA3.js.map → radio-group-CIjmyioi.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-o4jwEJPC.js → radiograph-panel.agent-k0G7JuoM.js} +6 -6
- package/dist/_chunks/{radiograph-panel.agent-o4jwEJPC.js.map → radiograph-panel.agent-k0G7JuoM.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-BKHEfqVQ.js → reviews-panel-BaHZb_ai.js} +3 -3
- package/dist/_chunks/{reviews-panel-BKHEfqVQ.js.map → reviews-panel-BaHZb_ai.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-CCI-Y3DN.js → rich-text-editor-BTXlorm5.js} +7 -7
- package/dist/_chunks/{rich-text-editor-CCI-Y3DN.js.map → rich-text-editor-BTXlorm5.js.map} +1 -1
- package/dist/_chunks/{search-bar-CJj6sI9m.js → search-bar-CCmViqaa.js} +46 -46
- package/dist/_chunks/{search-bar-CJj6sI9m.js.map → search-bar-CCmViqaa.js.map} +1 -1
- package/dist/_chunks/section-card.agent-W18CHEgX.js +74 -0
- package/dist/_chunks/section-card.agent-W18CHEgX.js.map +1 -0
- package/dist/_chunks/{sheet-BSznOyJs.js → sheet-hm04DGFd.js} +2 -2
- package/dist/_chunks/{sheet-BSznOyJs.js.map → sheet-hm04DGFd.js.map} +1 -1
- package/dist/_chunks/{sign-document-jF4fZDJ5.js → sign-document-CRQuAn4W.js} +2 -2
- package/dist/_chunks/{sign-document-jF4fZDJ5.js.map → sign-document-CRQuAn4W.js.map} +1 -1
- package/dist/_chunks/{signature-request-vihDT8On.js → signature-request-Dej2g86d.js} +5 -5
- package/dist/_chunks/{signature-request-vihDT8On.js.map → signature-request-Dej2g86d.js.map} +1 -1
- package/dist/_chunks/{signature-status-chip-T5fyS-k9.js → signature-status-chip-D4NsrdeI.js} +3 -3
- package/dist/_chunks/{signature-status-chip-T5fyS-k9.js.map → signature-status-chip-D4NsrdeI.js.map} +1 -1
- package/dist/_chunks/{slot-grid-BuZOKfcd.js → slot-grid-8Ko6thzz.js} +2 -2
- package/dist/_chunks/{slot-grid-BuZOKfcd.js.map → slot-grid-8Ko6thzz.js.map} +1 -1
- package/dist/_chunks/{streaming-text-CvsjIQ7S.js → streaming-text-DjFqLSt_.js} +2 -2
- package/dist/_chunks/{streaming-text-CvsjIQ7S.js.map → streaming-text-DjFqLSt_.js.map} +1 -1
- package/dist/_chunks/{tab-bar-DvFJIQfL.js → tab-bar-rDkLiaA6.js} +2 -2
- package/dist/_chunks/{tab-bar-DvFJIQfL.js.map → tab-bar-rDkLiaA6.js.map} +1 -1
- package/dist/_chunks/{tag-3wgkwwDB.js → tag-Ci3xJPcH.js} +2 -2
- package/dist/_chunks/{tag-3wgkwwDB.js.map → tag-Ci3xJPcH.js.map} +1 -1
- package/dist/_chunks/{task-tray-COo-RlDv.js → task-tray-wl9eti6J.js} +2 -2
- package/dist/_chunks/{task-tray-COo-RlDv.js.map → task-tray-wl9eti6J.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-DLKpSNoE.js → tasks-panel-BDNB7hsZ.js} +5 -5
- package/dist/_chunks/{tasks-panel-DLKpSNoE.js.map → tasks-panel-BDNB7hsZ.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-uEwoKjl3.js → theme-toggle-CMz8YfC1.js} +3 -3
- package/dist/_chunks/{theme-toggle-uEwoKjl3.js.map → theme-toggle-CMz8YfC1.js.map} +1 -1
- package/dist/_chunks/{timeline-Bs9Erxlo.js → timeline-61AihzYz.js} +47 -47
- package/dist/_chunks/timeline-61AihzYz.js.map +1 -0
- package/dist/_chunks/{toast-YZz2sBzB.js → toast-8jqtbfAB.js} +2 -2
- package/dist/_chunks/{toast-YZz2sBzB.js.map → toast-8jqtbfAB.js.map} +1 -1
- package/dist/_chunks/{tool-rail-ONaV-Nzz.js → tool-rail-Bq5eiFMG.js} +3 -3
- package/dist/_chunks/{tool-rail-ONaV-Nzz.js.map → tool-rail-Bq5eiFMG.js.map} +1 -1
- package/dist/_chunks/{tooltip-DvmfrNvB.js → tooltip-Cp-PLePW.js} +41 -41
- package/dist/_chunks/tooltip-Cp-PLePW.js.map +1 -0
- package/dist/_chunks/{tooth-scheme-Qe7LO5Di.js → tooth-scheme-BWkYxxjR.js} +3 -3
- package/dist/_chunks/{tooth-scheme-Qe7LO5Di.js.map → tooth-scheme-BWkYxxjR.js.map} +1 -1
- package/dist/_chunks/{transaction-chip-DJCstquX.js → transaction-chip-Dth1nThY.js} +49 -48
- package/dist/_chunks/{transaction-chip-DJCstquX.js.map → transaction-chip-Dth1nThY.js.map} +1 -1
- package/dist/_chunks/{transcript-panel-BGkEhvHO.js → transcript-panel-u2HHxZB6.js} +2 -2
- package/dist/_chunks/{transcript-panel-BGkEhvHO.js.map → transcript-panel-u2HHxZB6.js.map} +1 -1
- package/dist/_chunks/user-x-DYszNtIg.js +45 -0
- package/dist/_chunks/user-x-DYszNtIg.js.map +1 -0
- package/dist/_chunks/{warning-stack-DQz0Jyir.js → warning-stack-BW5Dwb3z.js} +3 -3
- package/dist/_chunks/{warning-stack-DQz0Jyir.js.map → warning-stack-BW5Dwb3z.js.map} +1 -1
- package/dist/_chunks/{widget-picker-DvUkBemi.js → widget-picker-B1sj6uyf.js} +2 -2
- package/dist/_chunks/{widget-picker-DvUkBemi.js.map → widget-picker-B1sj6uyf.js.map} +1 -1
- package/dist/_chunks/{workflow-map-dNzJjBWG.js → workflow-map-D-LEni11.js} +5 -5
- package/dist/_chunks/{workflow-map-dNzJjBWG.js.map → workflow-map-D-LEni11.js.map} +1 -1
- package/dist/_chunks/workflow-status-xeaJTzD3.js +476 -0
- package/dist/_chunks/workflow-status-xeaJTzD3.js.map +1 -0
- package/dist/agent-catalog.json +185 -1
- package/dist/agent-i18n/en.json +27 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts +44 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts.map +1 -1
- package/dist/components/_shared/entity-card/index.d.ts +1 -1
- package/dist/components/_shared/entity-card/index.d.ts.map +1 -1
- package/dist/components/_shared/note-attachment.d.ts +41 -0
- package/dist/components/_shared/note-attachment.d.ts.map +1 -0
- package/dist/components/_shared/note-markdown.d.ts +3 -0
- package/dist/components/_shared/note-markdown.d.ts.map +1 -0
- package/dist/components/_shared/patient-field-row.d.ts +40 -0
- package/dist/components/_shared/patient-field-row.d.ts.map +1 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts.map +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/button-group.d.ts +20 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +2 -34
- package/dist/components/clinical-note-card/clinical-note-card.d.ts.map +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/counter/counter.d.ts +6 -0
- package/dist/components/counter/counter.d.ts.map +1 -1
- package/dist/components/counter/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/hover-card/hover-card.agent.d.ts +4 -0
- package/dist/components/hover-card/hover-card.agent.d.ts.map +1 -0
- package/dist/components/hover-card/hover-card.d.ts +80 -0
- package/dist/components/hover-card/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card/index.d.ts +4 -0
- package/dist/components/hover-card/index.d.ts.map +1 -0
- package/dist/components/hover-card/index.js +6 -0
- package/dist/components/hover-card/index.js.map +1 -0
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/key-value-pair/key-value-pair.d.ts +8 -1
- package/dist/components/key-value-pair/key-value-pair.d.ts.map +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/note-timeline/index.d.ts +4 -0
- package/dist/components/note-timeline/index.d.ts.map +1 -0
- package/dist/components/note-timeline/index.js +6 -0
- package/dist/components/note-timeline/index.js.map +1 -0
- package/dist/components/note-timeline/note-timeline.agent.d.ts +4 -0
- package/dist/components/note-timeline/note-timeline.agent.d.ts.map +1 -0
- package/dist/components/note-timeline/note-timeline.d.ts +77 -0
- package/dist/components/note-timeline/note-timeline.d.ts.map +1 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/panel-header/index.js +1 -1
- package/dist/components/panel-header/panel-header.d.ts +7 -0
- package/dist/components/panel-header/panel-header.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-details/patient-details.d.ts.map +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +54 -0
- package/dist/components/patient-summary-card/patient-summary-card.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/section-card/index.d.ts +4 -0
- package/dist/components/section-card/index.d.ts.map +1 -0
- package/dist/components/section-card/index.js +6 -0
- package/dist/components/section-card/index.js.map +1 -0
- package/dist/components/section-card/section-card.agent.d.ts +3 -0
- package/dist/components/section-card/section-card.agent.d.ts.map +1 -0
- package/dist/components/section-card/section-card.d.ts +30 -0
- package/dist/components/section-card/section-card.d.ts.map +1 -0
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/timeline/timeline.d.ts +1 -1
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +11 -0
- package/dist/components/transaction-chip/transaction-chip.d.ts.map +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow-status/index.d.ts +4 -0
- package/dist/components/workflow-status/index.d.ts.map +1 -0
- package/dist/components/workflow-status/index.js +7 -0
- package/dist/components/workflow-status/index.js.map +1 -0
- package/dist/components/workflow-status/workflow-status.agent.d.ts +4 -0
- package/dist/components/workflow-status/workflow-status.agent.d.ts.map +1 -0
- package/dist/components/workflow-status/workflow-status.d.ts +52 -0
- package/dist/components/workflow-status/workflow-status.d.ts.map +1 -0
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +12 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +12 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +12 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +12 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +12 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +12 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +12 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +12 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +12 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +12 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +12 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +12 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +12 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +12 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +12 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +12 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +12 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +12 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +12 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +12 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +12 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +12 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +12 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +12 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +12 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +12 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +12 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +12 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +12 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +12 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +12 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +12 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +12 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +12 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +12 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +12 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +929 -916
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +12 -0
- package/dist/locales/de.json +12 -0
- package/dist/locales/el.json +12 -0
- package/dist/locales/en.json +12 -0
- package/dist/locales/es.json +12 -0
- package/dist/locales/fr.json +12 -0
- package/dist/locales/hi.json +12 -0
- package/dist/locales/it.json +12 -0
- package/dist/locales/ja.json +12 -0
- package/dist/locales/nl.json +12 -0
- package/dist/locales/pl.json +12 -0
- package/dist/locales/pt.json +12 -0
- package/dist/locales/ro.json +12 -0
- package/dist/locales/ru.json +12 -0
- package/dist/locales/sq.json +12 -0
- package/dist/locales/sv.json +12 -0
- package/dist/locales/tr.json +12 -0
- package/dist/locales/zh.json +12 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/calendar.model.d.ts +2 -0
- package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +17 -1
- package/dist/_chunks/appointment-card-Bh_CIlc6.js.map +0 -1
- package/dist/_chunks/button-group-CaxRJsNG.js +0 -289
- package/dist/_chunks/button-group-CaxRJsNG.js.map +0 -1
- package/dist/_chunks/calendar-event-card-DSh-69HT.js.map +0 -1
- package/dist/_chunks/calendar-workspace-UywR5gUl.js.map +0 -1
- package/dist/_chunks/clinical-note-card-CTRzmqvv.js +0 -438
- package/dist/_chunks/clinical-note-card-CTRzmqvv.js.map +0 -1
- package/dist/_chunks/counter-dRlTNC_y.js.map +0 -1
- package/dist/_chunks/entity-card-9_62gY7l.js.map +0 -1
- package/dist/_chunks/field-value-BetdWMA2.js +0 -384
- package/dist/_chunks/field-value-BetdWMA2.js.map +0 -1
- package/dist/_chunks/file-upload-CwxdqkMK.js.map +0 -1
- package/dist/_chunks/key-value-pair-BIBdZBLg.js.map +0 -1
- package/dist/_chunks/panel-header-D313n_9-.js +0 -105
- package/dist/_chunks/panel-header-D313n_9-.js.map +0 -1
- package/dist/_chunks/patient-details-BGiawUHd.js +0 -760
- package/dist/_chunks/patient-details-BGiawUHd.js.map +0 -1
- package/dist/_chunks/patient-summary-card--CT_gbaQ.js +0 -454
- package/dist/_chunks/patient-summary-card--CT_gbaQ.js.map +0 -1
- package/dist/_chunks/payment-automation-upsell-DwQW2fRp.js.map +0 -1
- package/dist/_chunks/timeline-Bs9Erxlo.js.map +0 -1
- package/dist/_chunks/tooltip-DvmfrNvB.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-bar-DvFJIQfL.js","sources":["../../src/hooks/use-scroll-overflow.ts","../../src/components/tab-bar/tab-bar.tsx"],"sourcesContent":["import { useCallback, useRef, useState, type RefObject } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect';\n\nexport interface UseScrollOverflowReturn<T extends HTMLElement> {\n /** Attach to the horizontally-scrollable element (the `overflow-x-auto` box). */\n ref: RefObject<T | null>;\n /** Content is hidden past the inline-START edge (scrolled away from the start). */\n canScrollStart: boolean;\n /** Content is hidden past the inline-END edge (more to reveal toward the end). */\n canScrollEnd: boolean;\n /**\n * Scroll by ~one viewport toward the inline start (`-1`) or end (`+1`),\n * smoothly unless the user prefers reduced motion. Direction-agnostic: works\n * in both LTR and RTL.\n */\n scrollByPage: (direction: -1 | 1) => void;\n}\n\n/**\n * Reports whether a horizontally-scrollable element has hidden content at its\n * inline-start / inline-end edges, and exposes a paged scroll action — the\n * plumbing behind a scroll strip's edge affordances (fade + chevron buttons).\n *\n * Direction-agnostic: distance-from-start is read as `Math.abs(scrollLeft)`,\n * which is correct in both LTR (`0…max`) and modern RTL (`0…-max`), so the two\n * edges are reported on the right logical side without branching. `scrollByPage`\n * flips its physical sign from the element's computed `direction`.\n *\n * Re-measures on element resize AND on content-size change (a tab added past the\n * fold widens the content without changing the container) by observing both the\n * scroll box and its first child. `enabled` switches measurement off — e.g. when\n * the host collapses the strip into a menu and there is nothing to scroll.\n *\n * Because the scrolled content stays in the DOM and is reachable by keyboard\n * (focus scrolls it into view), the affordance this drives is a sighted-pointer\n * convenience; assistive tech is unaffected.\n */\nexport function useScrollOverflow<T extends HTMLElement>(\n enabled = true,\n): UseScrollOverflowReturn<T> {\n const ref = useRef<T>(null);\n const [edges, setEdges] = useState({ start: false, end: false });\n\n useIsomorphicLayoutEffect(() => {\n const el = ref.current;\n if (!el || !enabled) {\n setEdges((prev) =>\n prev.start || prev.end ? { start: false, end: false } : prev,\n );\n return;\n }\n const measure = () => {\n // Math.abs() makes this direction-agnostic: modern RTL reports scrollLeft\n // as 0 at the start and negative toward the end, so |scrollLeft| is the\n // distance scrolled from the start in both writing directions.\n const distanceFromStart = Math.abs(el.scrollLeft);\n const maxScroll = el.scrollWidth - el.clientWidth;\n // +1 tolerates sub-pixel rounding between scroll/client widths.\n const start = distanceFromStart > 1;\n const end = maxScroll - distanceFromStart > 1;\n // Bail to the same reference when nothing changed, so neither the initial\n // no-overflow measure nor an idle scroll event triggers a re-render.\n setEdges((prev) =>\n prev.start === start && prev.end === end ? prev : { start, end },\n );\n };\n measure();\n el.addEventListener('scroll', measure, { passive: true });\n let observer: ResizeObserver | undefined;\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(measure);\n // The container catches viewport-width changes; its first child (the\n // content row) catches a tab added/removed past the fold, which grows the\n // scroll width without resizing the container.\n observer.observe(el);\n if (el.firstElementChild) observer.observe(el.firstElementChild);\n }\n return () => {\n el.removeEventListener('scroll', measure);\n observer?.disconnect();\n };\n }, [enabled]);\n\n const scrollByPage = useCallback((direction: -1 | 1) => {\n const el = ref.current;\n if (!el || typeof window === 'undefined') return;\n const isRtl = window.getComputedStyle(el).direction === 'rtl';\n const reduceMotion = window.matchMedia?.(\n '(prefers-reduced-motion: reduce)',\n ).matches;\n // ~85% of the viewport so a sliver of context carries across pages. The\n // physical sign flips in RTL (scrollLeft runs toward negative).\n const amount = el.clientWidth * 0.85 * direction * (isRtl ? -1 : 1);\n el.scrollBy({ left: amount, behavior: reduceMotion ? 'auto' : 'smooth' });\n }, []);\n\n return {\n ref,\n canScrollStart: edges.start,\n canScrollEnd: edges.end,\n scrollByPage,\n };\n}\n","/**\n * TabBar — a floating-pill bar of page-level navigation tabs.\n *\n * Each tab is an icon + label (+ optional count badge); the active tab is\n * marked with `aria-current=\"page\"` and an `--accent` underline. The bar is a\n * glassy `--card` pill that floats on whatever canvas the consumer provides\n * (the strip area itself is transparent, so it blends with the surrounding\n * surface).\n *\n * Two layouts:\n * - default (`fill` off): content-width tabs that **centre** when they fit and\n * scroll from the inline-start (`safe center`) when they overflow, with a\n * gutter preserved at both ends. The label stacks under the icon below `sm`.\n * Use this when the tab set is open-ended (e.g. a marketplace app's routes).\n * - `fill`: equal-width tabs that fill the bar and always stack the label under\n * the icon — a fixed, always-visible set that fits any column width without\n * scrolling (e.g. a patient portal's handful of sections).\n *\n * Tabs render as links when given an `href` (real navigation) or as buttons\n * otherwise (in-app view switching via `onSelect`). Use it as a header (top,\n * default) for section navigation; `position=\"bottom\"` floats it from the\n * bottom edge for a footer.\n *\n * With `collapseToMenu`, the strip folds into a single DropdownMenu whenever the\n * tabs don't fit — below the `sm` breakpoint OR when they overflow their\n * container at any width (a narrow column on a wide screen, e.g. a page squeezed\n * between two sidebars, clips the tabs just the same as a small viewport).\n *\n * SPA / consumer-router links: pass `renderLink` and TabBar hands each `href`\n * tab off to your router's `<Link>` instead of rendering its own `<a>` — the\n * embedded MarketplaceAppShell strip uses this so a tab click is a client-side\n * route change, not a full page navigation. The kit forwards the same\n * `className` + `aria-current` so the accent-underline active styling and the\n * `aria-current=\"page\"` marker survive in both modes. With `renderLink`\n * omitted the output is the plain `<a href>` exactly as before.\n */\nimport { forwardRef, Fragment, type MouseEvent, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Check, ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\n\nimport { Badge } from '../badge';\nimport { DropdownMenu } from '../dropdown-menu';\nimport { useMediaQuery } from '../../hooks/use-media-query';\nimport { useScrollOverflow } from '../../hooks/use-scroll-overflow';\nimport { useOverflowCollapse } from '../../hooks/use-overflow-collapse';\n\nexport interface TabBarItem {\n /** Stable id; also the value handed to `onSelect` for button tabs. */\n id: string;\n /** Pre-translated label — consumers localise their own nav copy. */\n label: string;\n /** Optional leading icon (a lucide-react element or equivalent), tinted with `--accent`. */\n icon?: ReactNode;\n /** Optional unseen-item count rendered as a pill badge. */\n badgeCount?: number;\n /** Mark the tab as the current page (`aria-current='page'` + accent underline). */\n isActive?: boolean;\n /** When set, the tab renders as a link to this href; otherwise it's a button. */\n href?: string;\n /**\n * Optional click handler threaded onto the link tab's `<a>` (or, when\n * `renderLink` is supplied, available to the consumer's router element). Use\n * it to intercept a same-origin click and route client-side without a full\n * navigation. Only applies to `href` (link) tabs — button tabs use `onSelect`.\n */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n}\n\n/**\n * Props the kit hands to `renderLink` for each `href` tab. The consumer returns\n * their router's `<Link to={href}>` carrying the same `className` (the active\n * accent-underline styling) and `aria-current` (`'page'` on the active tab).\n */\nexport interface TabBarRenderLinkProps {\n /** The tab's destination — feed it to your router's `to` / `href`. */\n href: string;\n /** The kit's tab classes (CVA output) — apply verbatim to the link element. */\n className: string;\n /** Icon + label + badge — render as the link's children. */\n children: ReactNode;\n /** `'page'` on the active tab, otherwise omitted — forward to the link. */\n 'aria-current'?: 'page';\n /**\n * The tab's stable `TabBarItem.id`, as the agent / automation DOM hook.\n * Spread it onto your router link (`{...rest}`) so the tab stays addressable\n * by `[data-tab-id]` the same way the kit's own `<a>` / `<button>` tabs are —\n * see PRS §26 §6.\n */\n 'data-tab-id'?: string;\n /** Optional per-item click handler (the item's `onClick`), if supplied. */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n}\n\nexport interface TabBarProps {\n /** The tabs, in order. */\n items: TabBarItem[];\n /**\n * Opaque instance id, emitted on the strip as `data-component-id`. Pass it\n * when more than one TabBar can be on screen so an agent / automation tool\n * can scope its `[data-tab-id]` lookup to one bar (PRS §26 §6).\n */\n id?: string;\n /** Accessible name for the `<nav>` landmark. */\n ariaLabel: string;\n /** Fires with the tab `id` when a button tab (one without `href`) is chosen. */\n onSelect?: (id: string) => void;\n /**\n * Render an `href` tab via the consumer's router instead of the kit's own\n * `<a>`. TabBar calls it for each link tab and renders the returned node; the\n * consumer returns their `<Link to={href}>` carrying the supplied `className`\n * + `aria-current` so the active accent underline and the `aria-current=\"page\"`\n * marker are preserved. Use it for SPA navigation (e.g. the MarketplaceAppShell\n * strip) so a tab click is a client-side route change, not a full page load.\n * Omit it to render the plain `<a href>` exactly as before. Button tabs (no\n * `href`) ignore `renderLink` and continue to use `onSelect`.\n */\n renderLink?: (props: TabBarRenderLinkProps) => ReactNode;\n /**\n * Equal-width tabs that fill the bar and always stack the label under the\n * icon (for a fixed, always-visible set). Off (default) = content-width tabs\n * that centre when they fit and scroll when they overflow.\n */\n fill?: boolean;\n /**\n * Float side. `'top'` (default) gutters from the top edge for a header;\n * `'bottom'` gutters from the bottom edge for a footer.\n */\n position?: 'top' | 'bottom';\n /**\n * Collapse the tab strip into a single DropdownMenu whenever the tabs don't\n * fit — below the `sm` breakpoint (≤640px) OR when they overflow their\n * container at any viewport width (a narrow column between two sidebars clips\n * the tabs the same as a small screen). The trigger shows the active tab; the\n * menu lists them all. Off (default) keeps the content-width / scroll\n * behaviour at every width, so existing consumers are unaffected. Designed for\n * button (`onSelect`) tabs; in the collapsed menu an `href` tab navigates with\n * a full page load, so `renderLink` (SPA routing) and a per-item `onClick`\n * apply only to the expanded strip.\n */\n collapseToMenu?: boolean;\n /** Extra classes merged onto the outer strip (e.g. sticky/fixed positioning). */\n className?: string;\n}\n\nfunction formatBadgeCount(count: number): string {\n return count > 99 ? '99+' : String(count);\n}\n\n/* Transparent strip area — provides the floating gutter on the active side. The\n default layout also insets the pill horizontally so it reads as a floating\n strip; `fill` drops that inset so the pill spans the full width and aligns\n with the consumer's content (e.g. a portal's cards). */\nconst stripVariants = cva('ds:shrink-0', {\n variants: {\n position: {\n top: 'ds:pt-[var(--spacing-md)]',\n bottom: 'ds:pb-[var(--spacing-md)]',\n },\n fill: {\n false: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n true: '',\n },\n },\n defaultVariants: { position: 'top', fill: false },\n});\n\n/* The pill is the glass chrome — the bordered, blurred, rounded surface. The\n scrollable tab row is a separate inner element (`pillScrollClasses`) so the\n edge-fade mask touches only the tabs, never the pill's border. It is also the\n overflow-collapse MEASUREMENT container: it stays mounted in both the scroll\n and the dropdown render, and (carrying no padding) its `clientWidth` is\n exactly the width the tab row has to fit. */\nconst pillClasses =\n 'ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--card-border)] ds:bg-[var(--card)]/80 ds:backdrop-blur-md ds:shadow-[var(--shadow-md)]';\n\n/* The inner scroll container. `safe center` centres the tabs when they fit but\n falls back to start-alignment the moment they overflow, so the row stays fully\n scrollable end to end. Inline-edge MASK: the leading / trailing edge fades only\n when tabs are hidden past it (`data-fade-start` / `data-fade-end`), so a clipped\n tab dissolves into the glass under the accent chevron — alpha-based, so no seam\n with the translucent pill. Logical via `--tabbar-mask-*` (RTL-mapped); `black`\n is the mask-opaque sentinel, not a colour. Disabled under reduced motion, the\n accessible theme, and forced-colors so content is never hidden from those\n users. `--tabbar-fade-distance` (default `--spacing-lg`) is per-instance. */\nconst pillScrollClasses = [\n 'ds:flex ds:[justify-content:safe_center] ds:overflow-x-auto ds:py-[var(--spacing-xs)]',\n 'ds:[--tabbar-mask-start:black] ds:[--tabbar-mask-end:black]',\n 'ds:ltr:data-[fade-start=true]:[--tabbar-mask-start:transparent]',\n 'ds:ltr:data-[fade-end=true]:[--tabbar-mask-end:transparent]',\n 'ds:rtl:data-[fade-start=true]:[--tabbar-mask-end:transparent]',\n 'ds:rtl:data-[fade-end=true]:[--tabbar-mask-start:transparent]',\n 'ds:[mask-image:linear-gradient(to_right,var(--tabbar-mask-start)_0,black_var(--tabbar-fade-distance,var(--spacing-lg)),black_calc(100%-var(--tabbar-fade-distance,var(--spacing-lg))),var(--tabbar-mask-end)_100%)]',\n 'ds:motion-reduce:[mask-image:none]',\n 'ds:[.theme-accessible_&]:[mask-image:none]',\n 'ds:forced-colors:[mask-image:none]',\n].join(' ');\n\n/* The nav's inline padding is the start/end gutter — it scrolls WITH the tabs,\n so the gutter survives a full scroll. Content width (`shrink-0`) by default so\n it overflows and scrolls; `w-full` in fill mode so the tabs spread to fit. */\nconst navVariants = cva(\n 'ds:flex ds:items-stretch ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n {\n variants: {\n fill: { false: 'ds:shrink-0', true: 'ds:w-full' },\n },\n defaultVariants: { fill: false },\n },\n);\n\n/* Each tab is a centred flex box so the icon + label sit centred on both axes.\n Regular weight; the active state is carried by the accent underline + accent\n icon, not a heavier weight. */\nconst tabVariants = cva(\n 'ds:group ds:flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:whitespace-nowrap ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:no-underline ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]',\n {\n variants: {\n fill: {\n // Responsive: label under the icon below `sm`, beside it at `sm`+.\n false: 'ds:flex-col ds:sm:flex-row ds:sm:gap-[var(--spacing-sm)]',\n // Fill the bar, always icon-over-label. No `min-w-0`, so a tab never\n // shrinks below its label (labels never overlap); if the full set can't\n // fit, the pill scrolls instead.\n true: 'ds:flex-1 ds:basis-0 ds:flex-col',\n },\n },\n defaultVariants: { fill: false },\n },\n);\n\nconst iconClasses =\n 'ds:inline-flex ds:items-center ds:text-[color:var(--accent)] ds:[&>svg]:size-4';\n\n/* The accent underline rides the label text itself (not the whole tab), so it\n never reaches the icon or badge and never has to propagate through flex. */\nconst labelClasses =\n 'ds:group-aria-[current=page]:underline ds:group-aria-[current=page]:decoration-2 ds:group-aria-[current=page]:decoration-[color:var(--accent)] ds:group-aria-[current=page]:underline-offset-[var(--spacing-xs)]';\n\n/* The mobile collapse trigger — a full-width button styled like a tab, showing\n the active tab's icon + label with a trailing chevron. */\nconst menuTriggerClasses =\n 'ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\n/* Scroll affordance — an accent chevron pinned to a scrollable edge of the pill,\n shown only when there are tabs hidden past that edge. No button chrome: the\n edge tab fades into the glass via the inner scroll's mask (above); the chevron\n just points the way and pages the strip on click. A `--min-target-size` hit\n area keeps it tappable. Block axis spans the pill (`top`/`bottom` px-inset past\n the border); the inline edge (`start`/`end`) and the chevron flip mirror RTL. */\nconst scrollAffordanceClasses =\n 'ds:absolute ds:top-px ds:bottom-px ds:z-10 ds:flex ds:min-w-[var(--min-target-size)] ds:items-center ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\n/* Pin the chevron to its inline edge, over the faded tab. */\nconst scrollAffordanceStartClasses =\n 'ds:start-px ds:justify-start ds:ps-[var(--spacing-xs)]';\n\nconst scrollAffordanceEndClasses =\n 'ds:end-px ds:justify-end ds:pe-[var(--spacing-xs)]';\n\n/* The chevron is the only visible mark — accent-tinted (matching the tab icons),\n mirrored under RTL. Decorative (`aria-hidden`); the button carries the label. */\nconst scrollChevronClasses =\n 'ds:size-4 ds:shrink-0 ds:text-[color:var(--accent)] ds:rtl:-scale-x-100';\n\nexport const TabBar = forwardRef<HTMLDivElement, TabBarProps>(\n (\n {\n items,\n id,\n ariaLabel,\n onSelect,\n renderLink,\n fill = false,\n position = 'top',\n collapseToMenu = false,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n // Collapse is twofold, OR'd: the documented mobile floor (≤sm) AND actual\n // container overflow (a narrow column on a wide screen clips the tabs just\n // the same). Both hooks run every render (hook order); only consulted when\n // collapseToMenu is on. The pill (containerRef) stays mounted across the\n // collapse so the overflow hook can still tell when the column has grown\n // back; the tab row (contentRef) carries the natural width.\n const isNarrow = useMediaQuery('(max-width: 640px)');\n const { containerRef, contentRef, isOverflowing } = useOverflowCollapse<\n HTMLDivElement,\n HTMLElement\n >(collapseToMenu);\n const isDropdown = collapseToMenu && (isNarrow || isOverflowing);\n\n // Edge scroll affordances for the scroll layout. Disabled in dropdown mode\n // (no scroll box), so the observer tears down / re-attaches across the flip.\n const {\n ref: pillRef,\n canScrollStart,\n canScrollEnd,\n scrollByPage,\n } = useScrollOverflow<HTMLDivElement>(!isDropdown);\n\n const activeItem = items.find((item) => item.isActive) ?? items[0];\n\n return (\n <div\n ref={ref}\n data-component=\"tab-bar\"\n data-component-id={id}\n className={`${stripVariants({ position, fill })}${className ? ` ${className}` : ''}`}\n >\n {/* Relative wrapper: the scroll affordances are absolutely positioned\n against it, NOT inside the scroll box (absolute children of a scroller\n scroll away with the content). */}\n <div className=\"ds:relative\">\n {/* The pill doubles as the overflow-collapse measurement container —\n rendered in BOTH branches (same element, same width) so the hook\n can keep measuring after the tab row is swapped for the menu. */}\n <div ref={containerRef} className={pillClasses}>\n {isDropdown ? (\n <nav aria-label={ariaLabel} className=\"ds:w-full\">\n <DropdownMenu.Root>\n <DropdownMenu.Trigger className={menuTriggerClasses}>\n {activeItem?.icon ? (\n <span aria-hidden=\"true\" className={iconClasses}>\n {activeItem.icon}\n </span>\n ) : null}\n <span className=\"ds:flex-1 ds:truncate ds:text-start\">\n {activeItem?.label}\n </span>\n <ChevronDown\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]\"\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n align=\"start\"\n className=\"ds:min-w-[12rem]\"\n >\n {items.map((item) => (\n <DropdownMenu.Item\n key={item.id}\n data-tab-id={item.id}\n startIcon={item.icon}\n endIcon={\n item.isActive ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:text-[color:var(--accent)]\"\n />\n ) : undefined\n }\n aria-current={item.isActive ? 'page' : undefined}\n onSelect={() => {\n if (item.href) {\n window.location.assign(item.href);\n } else {\n onSelect?.(item.id);\n }\n }}\n >\n {item.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </nav>\n ) : (\n <div\n ref={pillRef}\n data-fade-start={canScrollStart ? 'true' : undefined}\n data-fade-end={canScrollEnd ? 'true' : undefined}\n className={pillScrollClasses}\n >\n <nav\n ref={contentRef}\n aria-label={ariaLabel}\n className={navVariants({ fill })}\n >\n {items.map((item) => {\n const badge =\n typeof item.badgeCount === 'number' && item.badgeCount > 0\n ? item.badgeCount\n : undefined;\n const ariaCurrent = item.isActive ? 'page' : undefined;\n const inner = (\n <>\n {item.icon ? (\n <span aria-hidden=\"true\" className={iconClasses}>\n {item.icon}\n </span>\n ) : null}\n {/* Label + badge stay paired; they sit under the icon when\n the tab stacks to a column. */}\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span className={labelClasses}>{item.label}</span>\n {badge !== undefined ? (\n <Badge variant=\"neutral\">\n {formatBadgeCount(badge)}\n </Badge>\n ) : null}\n </span>\n </>\n );\n if (item.href !== undefined) {\n const tabClassName = tabVariants({ fill });\n // Consumer-router mode: hand the tab to the consumer's <Link>,\n // forwarding the same className + aria-current (+ the item's\n // onClick) so the active styling and `aria-current=\"page\"`\n // marker carry over and clicking routes client-side.\n if (renderLink) {\n return (\n <Fragment key={item.id}>\n {renderLink({\n href: item.href,\n className: tabClassName,\n children: inner,\n 'aria-current': ariaCurrent,\n 'data-tab-id': item.id,\n onClick: item.onClick,\n })}\n </Fragment>\n );\n }\n // Default: plain anchor — byte-identical to before when no\n // per-item onClick is supplied (onClick is omitted entirely,\n // not passed as undefined, so the rendered <a> is unchanged).\n return (\n <a\n key={item.id}\n href={item.href}\n data-tab-id={item.id}\n aria-current={ariaCurrent}\n className={tabClassName}\n {...(item.onClick ? { onClick: item.onClick } : {})}\n >\n {inner}\n </a>\n );\n }\n return (\n <button\n key={item.id}\n type=\"button\"\n data-tab-id={item.id}\n aria-current={ariaCurrent}\n className={tabVariants({ fill })}\n onClick={() => onSelect?.(item.id)}\n >\n {inner}\n </button>\n );\n })}\n </nav>\n </div>\n )}\n </div>\n {canScrollStart ? (\n <button\n type=\"button\"\n aria-label={t('navigation.tabBar.scrollBack')}\n onClick={() => scrollByPage(-1)}\n className={`${scrollAffordanceClasses} ${scrollAffordanceStartClasses}`}\n >\n <ChevronLeft\n aria-hidden=\"true\"\n className={scrollChevronClasses}\n />\n </button>\n ) : null}\n {canScrollEnd ? (\n <button\n type=\"button\"\n aria-label={t('navigation.tabBar.scrollForward')}\n onClick={() => scrollByPage(1)}\n className={`${scrollAffordanceClasses} ${scrollAffordanceEndClasses}`}\n >\n <ChevronRight\n aria-hidden=\"true\"\n className={scrollChevronClasses}\n />\n </button>\n ) : null}\n </div>\n </div>\n );\n },\n);\nTabBar.displayName = 'TabBar';\n"],"names":["useScrollOverflow","enabled","ref","useRef","edges","setEdges","useState","useIsomorphicLayoutEffect","el","prev","measure","distanceFromStart","maxScroll","start","end","observer","scrollByPage","useCallback","direction","isRtl","reduceMotion","_a","amount","formatBadgeCount","count","stripVariants","cva","pillClasses","pillScrollClasses","navVariants","tabVariants","iconClasses","labelClasses","menuTriggerClasses","scrollAffordanceClasses","scrollAffordanceStartClasses","scrollAffordanceEndClasses","scrollChevronClasses","TabBar","forwardRef","items","id","ariaLabel","onSelect","renderLink","fill","position","collapseToMenu","className","t","useTranslation","isNarrow","useMediaQuery","containerRef","contentRef","isOverflowing","useOverflowCollapse","isDropdown","pillRef","canScrollStart","canScrollEnd","activeItem","item","jsx","jsxs","DropdownMenu","ChevronDown","Check","badge","ariaCurrent","inner","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A,sBAAC;AAAA,sBAAA;AAAA,wBAEC,MAAK;AAAA,wBACL,eAAaD,EAAK;AAAA,wBAClB,gBAAcO;AAAA,wBACd,WAAWvC,EAAY,EAAE,MAAAe,GAAM;AAAA,wBAC/B,SAAS,MAAMF,KAAA,gBAAAA,EAAWmB,EAAK;AAAA,wBAE9B,UAAAQ;AAAA,sBAAA;AAAA,sBAPIR,EAAK;AAAA,oBAAA;AAAA,kBAUhB,CAAC;AAAA,gBAAA;AAAA,cAAA;AAAA,YACH;AAAA,UAAA,GAGN;AAAA,UACCH,IACC,gBAAAI;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAYd,EAAE,8BAA8B;AAAA,cAC5C,SAAS,MAAMjC,EAAa,EAAE;AAAA,cAC9B,WAAW,GAAGkB,CAAuB,IAAIC,EAA4B;AAAA,cAErE,UAAA,gBAAA4B;AAAA,gBAACW;AAAA,gBAAA;AAAA,kBACC,eAAY;AAAA,kBACZ,WAAWrC;AAAA,gBAAA;AAAA,cAAA;AAAA,YACb;AAAA,UAAA,IAEA;AAAA,UACHuB,IACC,gBAAAG;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAYd,EAAE,iCAAiC;AAAA,cAC/C,SAAS,MAAMjC,EAAa,CAAC;AAAA,cAC7B,WAAW,GAAGkB,CAAuB,IAAIE,EAA0B;AAAA,cAEnE,UAAA,gBAAA2B;AAAA,gBAACY;AAAA,gBAAA;AAAA,kBACC,eAAY;AAAA,kBACZ,WAAWtC;AAAA,gBAAA;AAAA,cAAA;AAAA,YACb;AAAA,UAAA,IAEA;AAAA,QAAA,EAAA,CACN;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAC,GAAO,cAAc;"}
|
|
1
|
+
{"version":3,"file":"tab-bar-rDkLiaA6.js","sources":["../../src/hooks/use-scroll-overflow.ts","../../src/components/tab-bar/tab-bar.tsx"],"sourcesContent":["import { useCallback, useRef, useState, type RefObject } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect';\n\nexport interface UseScrollOverflowReturn<T extends HTMLElement> {\n /** Attach to the horizontally-scrollable element (the `overflow-x-auto` box). */\n ref: RefObject<T | null>;\n /** Content is hidden past the inline-START edge (scrolled away from the start). */\n canScrollStart: boolean;\n /** Content is hidden past the inline-END edge (more to reveal toward the end). */\n canScrollEnd: boolean;\n /**\n * Scroll by ~one viewport toward the inline start (`-1`) or end (`+1`),\n * smoothly unless the user prefers reduced motion. Direction-agnostic: works\n * in both LTR and RTL.\n */\n scrollByPage: (direction: -1 | 1) => void;\n}\n\n/**\n * Reports whether a horizontally-scrollable element has hidden content at its\n * inline-start / inline-end edges, and exposes a paged scroll action — the\n * plumbing behind a scroll strip's edge affordances (fade + chevron buttons).\n *\n * Direction-agnostic: distance-from-start is read as `Math.abs(scrollLeft)`,\n * which is correct in both LTR (`0…max`) and modern RTL (`0…-max`), so the two\n * edges are reported on the right logical side without branching. `scrollByPage`\n * flips its physical sign from the element's computed `direction`.\n *\n * Re-measures on element resize AND on content-size change (a tab added past the\n * fold widens the content without changing the container) by observing both the\n * scroll box and its first child. `enabled` switches measurement off — e.g. when\n * the host collapses the strip into a menu and there is nothing to scroll.\n *\n * Because the scrolled content stays in the DOM and is reachable by keyboard\n * (focus scrolls it into view), the affordance this drives is a sighted-pointer\n * convenience; assistive tech is unaffected.\n */\nexport function useScrollOverflow<T extends HTMLElement>(\n enabled = true,\n): UseScrollOverflowReturn<T> {\n const ref = useRef<T>(null);\n const [edges, setEdges] = useState({ start: false, end: false });\n\n useIsomorphicLayoutEffect(() => {\n const el = ref.current;\n if (!el || !enabled) {\n setEdges((prev) =>\n prev.start || prev.end ? { start: false, end: false } : prev,\n );\n return;\n }\n const measure = () => {\n // Math.abs() makes this direction-agnostic: modern RTL reports scrollLeft\n // as 0 at the start and negative toward the end, so |scrollLeft| is the\n // distance scrolled from the start in both writing directions.\n const distanceFromStart = Math.abs(el.scrollLeft);\n const maxScroll = el.scrollWidth - el.clientWidth;\n // +1 tolerates sub-pixel rounding between scroll/client widths.\n const start = distanceFromStart > 1;\n const end = maxScroll - distanceFromStart > 1;\n // Bail to the same reference when nothing changed, so neither the initial\n // no-overflow measure nor an idle scroll event triggers a re-render.\n setEdges((prev) =>\n prev.start === start && prev.end === end ? prev : { start, end },\n );\n };\n measure();\n el.addEventListener('scroll', measure, { passive: true });\n let observer: ResizeObserver | undefined;\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(measure);\n // The container catches viewport-width changes; its first child (the\n // content row) catches a tab added/removed past the fold, which grows the\n // scroll width without resizing the container.\n observer.observe(el);\n if (el.firstElementChild) observer.observe(el.firstElementChild);\n }\n return () => {\n el.removeEventListener('scroll', measure);\n observer?.disconnect();\n };\n }, [enabled]);\n\n const scrollByPage = useCallback((direction: -1 | 1) => {\n const el = ref.current;\n if (!el || typeof window === 'undefined') return;\n const isRtl = window.getComputedStyle(el).direction === 'rtl';\n const reduceMotion = window.matchMedia?.(\n '(prefers-reduced-motion: reduce)',\n ).matches;\n // ~85% of the viewport so a sliver of context carries across pages. The\n // physical sign flips in RTL (scrollLeft runs toward negative).\n const amount = el.clientWidth * 0.85 * direction * (isRtl ? -1 : 1);\n el.scrollBy({ left: amount, behavior: reduceMotion ? 'auto' : 'smooth' });\n }, []);\n\n return {\n ref,\n canScrollStart: edges.start,\n canScrollEnd: edges.end,\n scrollByPage,\n };\n}\n","/**\n * TabBar — a floating-pill bar of page-level navigation tabs.\n *\n * Each tab is an icon + label (+ optional count badge); the active tab is\n * marked with `aria-current=\"page\"` and an `--accent` underline. The bar is a\n * glassy `--card` pill that floats on whatever canvas the consumer provides\n * (the strip area itself is transparent, so it blends with the surrounding\n * surface).\n *\n * Two layouts:\n * - default (`fill` off): content-width tabs that **centre** when they fit and\n * scroll from the inline-start (`safe center`) when they overflow, with a\n * gutter preserved at both ends. The label stacks under the icon below `sm`.\n * Use this when the tab set is open-ended (e.g. a marketplace app's routes).\n * - `fill`: equal-width tabs that fill the bar and always stack the label under\n * the icon — a fixed, always-visible set that fits any column width without\n * scrolling (e.g. a patient portal's handful of sections).\n *\n * Tabs render as links when given an `href` (real navigation) or as buttons\n * otherwise (in-app view switching via `onSelect`). Use it as a header (top,\n * default) for section navigation; `position=\"bottom\"` floats it from the\n * bottom edge for a footer.\n *\n * With `collapseToMenu`, the strip folds into a single DropdownMenu whenever the\n * tabs don't fit — below the `sm` breakpoint OR when they overflow their\n * container at any width (a narrow column on a wide screen, e.g. a page squeezed\n * between two sidebars, clips the tabs just the same as a small viewport).\n *\n * SPA / consumer-router links: pass `renderLink` and TabBar hands each `href`\n * tab off to your router's `<Link>` instead of rendering its own `<a>` — the\n * embedded MarketplaceAppShell strip uses this so a tab click is a client-side\n * route change, not a full page navigation. The kit forwards the same\n * `className` + `aria-current` so the accent-underline active styling and the\n * `aria-current=\"page\"` marker survive in both modes. With `renderLink`\n * omitted the output is the plain `<a href>` exactly as before.\n */\nimport { forwardRef, Fragment, type MouseEvent, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Check, ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\n\nimport { Badge } from '../badge';\nimport { DropdownMenu } from '../dropdown-menu';\nimport { useMediaQuery } from '../../hooks/use-media-query';\nimport { useScrollOverflow } from '../../hooks/use-scroll-overflow';\nimport { useOverflowCollapse } from '../../hooks/use-overflow-collapse';\n\nexport interface TabBarItem {\n /** Stable id; also the value handed to `onSelect` for button tabs. */\n id: string;\n /** Pre-translated label — consumers localise their own nav copy. */\n label: string;\n /** Optional leading icon (a lucide-react element or equivalent), tinted with `--accent`. */\n icon?: ReactNode;\n /** Optional unseen-item count rendered as a pill badge. */\n badgeCount?: number;\n /** Mark the tab as the current page (`aria-current='page'` + accent underline). */\n isActive?: boolean;\n /** When set, the tab renders as a link to this href; otherwise it's a button. */\n href?: string;\n /**\n * Optional click handler threaded onto the link tab's `<a>` (or, when\n * `renderLink` is supplied, available to the consumer's router element). Use\n * it to intercept a same-origin click and route client-side without a full\n * navigation. Only applies to `href` (link) tabs — button tabs use `onSelect`.\n */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n}\n\n/**\n * Props the kit hands to `renderLink` for each `href` tab. The consumer returns\n * their router's `<Link to={href}>` carrying the same `className` (the active\n * accent-underline styling) and `aria-current` (`'page'` on the active tab).\n */\nexport interface TabBarRenderLinkProps {\n /** The tab's destination — feed it to your router's `to` / `href`. */\n href: string;\n /** The kit's tab classes (CVA output) — apply verbatim to the link element. */\n className: string;\n /** Icon + label + badge — render as the link's children. */\n children: ReactNode;\n /** `'page'` on the active tab, otherwise omitted — forward to the link. */\n 'aria-current'?: 'page';\n /**\n * The tab's stable `TabBarItem.id`, as the agent / automation DOM hook.\n * Spread it onto your router link (`{...rest}`) so the tab stays addressable\n * by `[data-tab-id]` the same way the kit's own `<a>` / `<button>` tabs are —\n * see PRS §26 §6.\n */\n 'data-tab-id'?: string;\n /** Optional per-item click handler (the item's `onClick`), if supplied. */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n}\n\nexport interface TabBarProps {\n /** The tabs, in order. */\n items: TabBarItem[];\n /**\n * Opaque instance id, emitted on the strip as `data-component-id`. Pass it\n * when more than one TabBar can be on screen so an agent / automation tool\n * can scope its `[data-tab-id]` lookup to one bar (PRS §26 §6).\n */\n id?: string;\n /** Accessible name for the `<nav>` landmark. */\n ariaLabel: string;\n /** Fires with the tab `id` when a button tab (one without `href`) is chosen. */\n onSelect?: (id: string) => void;\n /**\n * Render an `href` tab via the consumer's router instead of the kit's own\n * `<a>`. TabBar calls it for each link tab and renders the returned node; the\n * consumer returns their `<Link to={href}>` carrying the supplied `className`\n * + `aria-current` so the active accent underline and the `aria-current=\"page\"`\n * marker are preserved. Use it for SPA navigation (e.g. the MarketplaceAppShell\n * strip) so a tab click is a client-side route change, not a full page load.\n * Omit it to render the plain `<a href>` exactly as before. Button tabs (no\n * `href`) ignore `renderLink` and continue to use `onSelect`.\n */\n renderLink?: (props: TabBarRenderLinkProps) => ReactNode;\n /**\n * Equal-width tabs that fill the bar and always stack the label under the\n * icon (for a fixed, always-visible set). Off (default) = content-width tabs\n * that centre when they fit and scroll when they overflow.\n */\n fill?: boolean;\n /**\n * Float side. `'top'` (default) gutters from the top edge for a header;\n * `'bottom'` gutters from the bottom edge for a footer.\n */\n position?: 'top' | 'bottom';\n /**\n * Collapse the tab strip into a single DropdownMenu whenever the tabs don't\n * fit — below the `sm` breakpoint (≤640px) OR when they overflow their\n * container at any viewport width (a narrow column between two sidebars clips\n * the tabs the same as a small screen). The trigger shows the active tab; the\n * menu lists them all. Off (default) keeps the content-width / scroll\n * behaviour at every width, so existing consumers are unaffected. Designed for\n * button (`onSelect`) tabs; in the collapsed menu an `href` tab navigates with\n * a full page load, so `renderLink` (SPA routing) and a per-item `onClick`\n * apply only to the expanded strip.\n */\n collapseToMenu?: boolean;\n /** Extra classes merged onto the outer strip (e.g. sticky/fixed positioning). */\n className?: string;\n}\n\nfunction formatBadgeCount(count: number): string {\n return count > 99 ? '99+' : String(count);\n}\n\n/* Transparent strip area — provides the floating gutter on the active side. The\n default layout also insets the pill horizontally so it reads as a floating\n strip; `fill` drops that inset so the pill spans the full width and aligns\n with the consumer's content (e.g. a portal's cards). */\nconst stripVariants = cva('ds:shrink-0', {\n variants: {\n position: {\n top: 'ds:pt-[var(--spacing-md)]',\n bottom: 'ds:pb-[var(--spacing-md)]',\n },\n fill: {\n false: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n true: '',\n },\n },\n defaultVariants: { position: 'top', fill: false },\n});\n\n/* The pill is the glass chrome — the bordered, blurred, rounded surface. The\n scrollable tab row is a separate inner element (`pillScrollClasses`) so the\n edge-fade mask touches only the tabs, never the pill's border. It is also the\n overflow-collapse MEASUREMENT container: it stays mounted in both the scroll\n and the dropdown render, and (carrying no padding) its `clientWidth` is\n exactly the width the tab row has to fit. */\nconst pillClasses =\n 'ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--card-border)] ds:bg-[var(--card)]/80 ds:backdrop-blur-md ds:shadow-[var(--shadow-md)]';\n\n/* The inner scroll container. `safe center` centres the tabs when they fit but\n falls back to start-alignment the moment they overflow, so the row stays fully\n scrollable end to end. Inline-edge MASK: the leading / trailing edge fades only\n when tabs are hidden past it (`data-fade-start` / `data-fade-end`), so a clipped\n tab dissolves into the glass under the accent chevron — alpha-based, so no seam\n with the translucent pill. Logical via `--tabbar-mask-*` (RTL-mapped); `black`\n is the mask-opaque sentinel, not a colour. Disabled under reduced motion, the\n accessible theme, and forced-colors so content is never hidden from those\n users. `--tabbar-fade-distance` (default `--spacing-lg`) is per-instance. */\nconst pillScrollClasses = [\n 'ds:flex ds:[justify-content:safe_center] ds:overflow-x-auto ds:py-[var(--spacing-xs)]',\n 'ds:[--tabbar-mask-start:black] ds:[--tabbar-mask-end:black]',\n 'ds:ltr:data-[fade-start=true]:[--tabbar-mask-start:transparent]',\n 'ds:ltr:data-[fade-end=true]:[--tabbar-mask-end:transparent]',\n 'ds:rtl:data-[fade-start=true]:[--tabbar-mask-end:transparent]',\n 'ds:rtl:data-[fade-end=true]:[--tabbar-mask-start:transparent]',\n 'ds:[mask-image:linear-gradient(to_right,var(--tabbar-mask-start)_0,black_var(--tabbar-fade-distance,var(--spacing-lg)),black_calc(100%-var(--tabbar-fade-distance,var(--spacing-lg))),var(--tabbar-mask-end)_100%)]',\n 'ds:motion-reduce:[mask-image:none]',\n 'ds:[.theme-accessible_&]:[mask-image:none]',\n 'ds:forced-colors:[mask-image:none]',\n].join(' ');\n\n/* The nav's inline padding is the start/end gutter — it scrolls WITH the tabs,\n so the gutter survives a full scroll. Content width (`shrink-0`) by default so\n it overflows and scrolls; `w-full` in fill mode so the tabs spread to fit. */\nconst navVariants = cva(\n 'ds:flex ds:items-stretch ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n {\n variants: {\n fill: { false: 'ds:shrink-0', true: 'ds:w-full' },\n },\n defaultVariants: { fill: false },\n },\n);\n\n/* Each tab is a centred flex box so the icon + label sit centred on both axes.\n Regular weight; the active state is carried by the accent underline + accent\n icon, not a heavier weight. */\nconst tabVariants = cva(\n 'ds:group ds:flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:whitespace-nowrap ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:no-underline ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]',\n {\n variants: {\n fill: {\n // Responsive: label under the icon below `sm`, beside it at `sm`+.\n false: 'ds:flex-col ds:sm:flex-row ds:sm:gap-[var(--spacing-sm)]',\n // Fill the bar, always icon-over-label. No `min-w-0`, so a tab never\n // shrinks below its label (labels never overlap); if the full set can't\n // fit, the pill scrolls instead.\n true: 'ds:flex-1 ds:basis-0 ds:flex-col',\n },\n },\n defaultVariants: { fill: false },\n },\n);\n\nconst iconClasses =\n 'ds:inline-flex ds:items-center ds:text-[color:var(--accent)] ds:[&>svg]:size-4';\n\n/* The accent underline rides the label text itself (not the whole tab), so it\n never reaches the icon or badge and never has to propagate through flex. */\nconst labelClasses =\n 'ds:group-aria-[current=page]:underline ds:group-aria-[current=page]:decoration-2 ds:group-aria-[current=page]:decoration-[color:var(--accent)] ds:group-aria-[current=page]:underline-offset-[var(--spacing-xs)]';\n\n/* The mobile collapse trigger — a full-width button styled like a tab, showing\n the active tab's icon + label with a trailing chevron. */\nconst menuTriggerClasses =\n 'ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\n/* Scroll affordance — an accent chevron pinned to a scrollable edge of the pill,\n shown only when there are tabs hidden past that edge. No button chrome: the\n edge tab fades into the glass via the inner scroll's mask (above); the chevron\n just points the way and pages the strip on click. A `--min-target-size` hit\n area keeps it tappable. Block axis spans the pill (`top`/`bottom` px-inset past\n the border); the inline edge (`start`/`end`) and the chevron flip mirror RTL. */\nconst scrollAffordanceClasses =\n 'ds:absolute ds:top-px ds:bottom-px ds:z-10 ds:flex ds:min-w-[var(--min-target-size)] ds:items-center ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\n/* Pin the chevron to its inline edge, over the faded tab. */\nconst scrollAffordanceStartClasses =\n 'ds:start-px ds:justify-start ds:ps-[var(--spacing-xs)]';\n\nconst scrollAffordanceEndClasses =\n 'ds:end-px ds:justify-end ds:pe-[var(--spacing-xs)]';\n\n/* The chevron is the only visible mark — accent-tinted (matching the tab icons),\n mirrored under RTL. Decorative (`aria-hidden`); the button carries the label. */\nconst scrollChevronClasses =\n 'ds:size-4 ds:shrink-0 ds:text-[color:var(--accent)] ds:rtl:-scale-x-100';\n\nexport const TabBar = forwardRef<HTMLDivElement, TabBarProps>(\n (\n {\n items,\n id,\n ariaLabel,\n onSelect,\n renderLink,\n fill = false,\n position = 'top',\n collapseToMenu = false,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n // Collapse is twofold, OR'd: the documented mobile floor (≤sm) AND actual\n // container overflow (a narrow column on a wide screen clips the tabs just\n // the same). Both hooks run every render (hook order); only consulted when\n // collapseToMenu is on. The pill (containerRef) stays mounted across the\n // collapse so the overflow hook can still tell when the column has grown\n // back; the tab row (contentRef) carries the natural width.\n const isNarrow = useMediaQuery('(max-width: 640px)');\n const { containerRef, contentRef, isOverflowing } = useOverflowCollapse<\n HTMLDivElement,\n HTMLElement\n >(collapseToMenu);\n const isDropdown = collapseToMenu && (isNarrow || isOverflowing);\n\n // Edge scroll affordances for the scroll layout. Disabled in dropdown mode\n // (no scroll box), so the observer tears down / re-attaches across the flip.\n const {\n ref: pillRef,\n canScrollStart,\n canScrollEnd,\n scrollByPage,\n } = useScrollOverflow<HTMLDivElement>(!isDropdown);\n\n const activeItem = items.find((item) => item.isActive) ?? items[0];\n\n return (\n <div\n ref={ref}\n data-component=\"tab-bar\"\n data-component-id={id}\n className={`${stripVariants({ position, fill })}${className ? ` ${className}` : ''}`}\n >\n {/* Relative wrapper: the scroll affordances are absolutely positioned\n against it, NOT inside the scroll box (absolute children of a scroller\n scroll away with the content). */}\n <div className=\"ds:relative\">\n {/* The pill doubles as the overflow-collapse measurement container —\n rendered in BOTH branches (same element, same width) so the hook\n can keep measuring after the tab row is swapped for the menu. */}\n <div ref={containerRef} className={pillClasses}>\n {isDropdown ? (\n <nav aria-label={ariaLabel} className=\"ds:w-full\">\n <DropdownMenu.Root>\n <DropdownMenu.Trigger className={menuTriggerClasses}>\n {activeItem?.icon ? (\n <span aria-hidden=\"true\" className={iconClasses}>\n {activeItem.icon}\n </span>\n ) : null}\n <span className=\"ds:flex-1 ds:truncate ds:text-start\">\n {activeItem?.label}\n </span>\n <ChevronDown\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]\"\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n align=\"start\"\n className=\"ds:min-w-[12rem]\"\n >\n {items.map((item) => (\n <DropdownMenu.Item\n key={item.id}\n data-tab-id={item.id}\n startIcon={item.icon}\n endIcon={\n item.isActive ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:text-[color:var(--accent)]\"\n />\n ) : undefined\n }\n aria-current={item.isActive ? 'page' : undefined}\n onSelect={() => {\n if (item.href) {\n window.location.assign(item.href);\n } else {\n onSelect?.(item.id);\n }\n }}\n >\n {item.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </nav>\n ) : (\n <div\n ref={pillRef}\n data-fade-start={canScrollStart ? 'true' : undefined}\n data-fade-end={canScrollEnd ? 'true' : undefined}\n className={pillScrollClasses}\n >\n <nav\n ref={contentRef}\n aria-label={ariaLabel}\n className={navVariants({ fill })}\n >\n {items.map((item) => {\n const badge =\n typeof item.badgeCount === 'number' && item.badgeCount > 0\n ? item.badgeCount\n : undefined;\n const ariaCurrent = item.isActive ? 'page' : undefined;\n const inner = (\n <>\n {item.icon ? (\n <span aria-hidden=\"true\" className={iconClasses}>\n {item.icon}\n </span>\n ) : null}\n {/* Label + badge stay paired; they sit under the icon when\n the tab stacks to a column. */}\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span className={labelClasses}>{item.label}</span>\n {badge !== undefined ? (\n <Badge variant=\"neutral\">\n {formatBadgeCount(badge)}\n </Badge>\n ) : null}\n </span>\n </>\n );\n if (item.href !== undefined) {\n const tabClassName = tabVariants({ fill });\n // Consumer-router mode: hand the tab to the consumer's <Link>,\n // forwarding the same className + aria-current (+ the item's\n // onClick) so the active styling and `aria-current=\"page\"`\n // marker carry over and clicking routes client-side.\n if (renderLink) {\n return (\n <Fragment key={item.id}>\n {renderLink({\n href: item.href,\n className: tabClassName,\n children: inner,\n 'aria-current': ariaCurrent,\n 'data-tab-id': item.id,\n onClick: item.onClick,\n })}\n </Fragment>\n );\n }\n // Default: plain anchor — byte-identical to before when no\n // per-item onClick is supplied (onClick is omitted entirely,\n // not passed as undefined, so the rendered <a> is unchanged).\n return (\n <a\n key={item.id}\n href={item.href}\n data-tab-id={item.id}\n aria-current={ariaCurrent}\n className={tabClassName}\n {...(item.onClick ? { onClick: item.onClick } : {})}\n >\n {inner}\n </a>\n );\n }\n return (\n <button\n key={item.id}\n type=\"button\"\n data-tab-id={item.id}\n aria-current={ariaCurrent}\n className={tabVariants({ fill })}\n onClick={() => onSelect?.(item.id)}\n >\n {inner}\n </button>\n );\n })}\n </nav>\n </div>\n )}\n </div>\n {canScrollStart ? (\n <button\n type=\"button\"\n aria-label={t('navigation.tabBar.scrollBack')}\n onClick={() => scrollByPage(-1)}\n className={`${scrollAffordanceClasses} ${scrollAffordanceStartClasses}`}\n >\n <ChevronLeft\n aria-hidden=\"true\"\n className={scrollChevronClasses}\n />\n </button>\n ) : null}\n {canScrollEnd ? (\n <button\n type=\"button\"\n aria-label={t('navigation.tabBar.scrollForward')}\n onClick={() => scrollByPage(1)}\n className={`${scrollAffordanceClasses} ${scrollAffordanceEndClasses}`}\n >\n <ChevronRight\n aria-hidden=\"true\"\n className={scrollChevronClasses}\n />\n </button>\n ) : null}\n </div>\n </div>\n );\n },\n);\nTabBar.displayName = 'TabBar';\n"],"names":["useScrollOverflow","enabled","ref","useRef","edges","setEdges","useState","useIsomorphicLayoutEffect","el","prev","measure","distanceFromStart","maxScroll","start","end","observer","scrollByPage","useCallback","direction","isRtl","reduceMotion","_a","amount","formatBadgeCount","count","stripVariants","cva","pillClasses","pillScrollClasses","navVariants","tabVariants","iconClasses","labelClasses","menuTriggerClasses","scrollAffordanceClasses","scrollAffordanceStartClasses","scrollAffordanceEndClasses","scrollChevronClasses","TabBar","forwardRef","items","id","ariaLabel","onSelect","renderLink","fill","position","collapseToMenu","className","t","useTranslation","isNarrow","useMediaQuery","containerRef","contentRef","isOverflowing","useOverflowCollapse","isDropdown","pillRef","canScrollStart","canScrollEnd","activeItem","item","jsx","jsxs","DropdownMenu","ChevronDown","Check","badge","ariaCurrent","inner","Fragment","Badge","tabClassName","ChevronLeft","ChevronRight"],"mappings":";;;;;;;;;;;;;AAqCO,SAASA,EACdC,IAAU,IACkB;AAC5B,QAAMC,IAAMC,EAAU,IAAI,GACpB,CAACC,GAAOC,CAAQ,IAAIC,EAAS,EAAE,OAAO,IAAO,KAAK,IAAO;AAE/D,EAAAC,EAA0B,MAAM;AAC9B,UAAMC,IAAKN,EAAI;AACf,QAAI,CAACM,KAAM,CAACP,GAAS;AACnB,MAAAI;AAAA,QAAS,CAACI,MACRA,EAAK,SAASA,EAAK,MAAM,EAAE,OAAO,IAAO,KAAK,OAAUA;AAAA,MAAA;AAE1D;AAAA,IACF;AACA,UAAMC,IAAU,MAAM;AAIpB,YAAMC,IAAoB,KAAK,IAAIH,EAAG,UAAU,GAC1CI,IAAYJ,EAAG,cAAcA,EAAG,aAEhCK,IAAQF,IAAoB,GAC5BG,IAAMF,IAAYD,IAAoB;AAG5C,MAAAN;AAAA,QAAS,CAACI,MACRA,EAAK,UAAUI,KAASJ,EAAK,QAAQK,IAAML,IAAO,EAAE,OAAAI,GAAO,KAAAC,EAAA;AAAA,MAAI;AAAA,IAEnE;AACA,IAAAJ,EAAA,GACAF,EAAG,iBAAiB,UAAUE,GAAS,EAAE,SAAS,IAAM;AACxD,QAAIK;AACJ,WAAI,OAAO,iBAAmB,QAC5BA,IAAW,IAAI,eAAeL,CAAO,GAIrCK,EAAS,QAAQP,CAAE,GACfA,EAAG,qBAAmBO,EAAS,QAAQP,EAAG,iBAAiB,IAE1D,MAAM;AACX,MAAAA,EAAG,oBAAoB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;AAAA,cAAA;AAAA,YACb;AAAA,UAAA,IAEA;AAAA,QAAA,EAAA,CACN;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAC,GAAO,cAAc;"}
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as X, useRef as q, useState as E, useEffect as F } from "react";
|
|
3
3
|
import { c as B } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as G } from "react-i18next";
|
|
5
|
-
import { T as v } from "./tooltip-
|
|
5
|
+
import { T as v } from "./tooltip-Cp-PLePW.js";
|
|
6
6
|
import { X as H } from "./x-B5YnXwCz.js";
|
|
7
7
|
const V = B(
|
|
8
8
|
[
|
|
@@ -255,4 +255,4 @@ L.displayName = "Tag";
|
|
|
255
255
|
export {
|
|
256
256
|
L as T
|
|
257
257
|
};
|
|
258
|
-
//# sourceMappingURL=tag-
|
|
258
|
+
//# sourceMappingURL=tag-Ci3xJPcH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-3wgkwwDB.js","sources":["../../src/components/tag/tag.tsx"],"sourcesContent":["import { forwardRef, useRef, useState, useEffect, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { X } from 'lucide-react';\nimport { Tooltip } from '../tooltip';\n\n/* ------------------------------------------------------------------ */\n/* CVA — tag pill */\n/* ------------------------------------------------------------------ */\n\nconst tagVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-full)]',\n 'type-eyebrow ds:whitespace-nowrap',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:aria-disabled:cursor-not-allowed ds:aria-disabled:opacity-50',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n ].join(' '),\n {\n variants: {\n variant: {\n neutral: '',\n info: '',\n success: '',\n warning: '',\n error: '',\n brand: '',\n },\n fill: {\n // Solid chips carry a subtle, theme-aware border (a low-opacity\n // foreground mix) so they read as a defined chip on any surface, not a\n // floating fill — works across every colour variant, light and dark.\n solid:\n 'ds:border ds:border-[color:color-mix(in_srgb,var(--foreground)_15%,transparent)]',\n outline: 'ds:border ds:border-[color:var(--border)] ds:bg-transparent',\n },\n size: {\n // Symmetric start/end padding — close button uses negative margin to stay flush.\n // Size is the only eyebrow-role axis that varies per Tag size; weight, transform,\n // tracking, line-height, and features all come from `.type-eyebrow` on the base.\n sm: 'ds:h-[calc(var(--spacing)*4)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:[--type-eyebrow-size:var(--font-size-2xs)]',\n md: 'ds:h-[calc(var(--spacing)*5)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:[--type-eyebrow-size:var(--font-size-2xs)]',\n lg: 'ds:h-[calc(var(--spacing)*6)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:[--type-eyebrow-size:var(--font-size-xs)]',\n },\n },\n compoundVariants: [\n // Solid fills — foreground tokens adapt per theme\n {\n fill: 'solid',\n variant: 'neutral',\n className:\n 'ds:bg-muted/20 ds:text-muted-foreground ds:border-[color:var(--border)]',\n },\n {\n fill: 'solid',\n variant: 'info',\n className: 'ds:bg-info ds:text-[color:var(--info-solid-foreground)]',\n },\n {\n fill: 'solid',\n variant: 'success',\n className:\n 'ds:bg-success ds:text-[color:var(--success-solid-foreground)]',\n },\n {\n fill: 'solid',\n variant: 'warning',\n className: 'ds:bg-warning ds:text-foreground',\n },\n {\n fill: 'solid',\n variant: 'error',\n className: 'ds:bg-destructive ds:text-destructive-foreground',\n },\n {\n fill: 'solid',\n variant: 'brand',\n className: 'ds:bg-primary ds:text-primary-foreground',\n },\n // Outline fills\n {\n fill: 'outline',\n variant: 'neutral',\n className: 'ds:border-[color:var(--border)] ds:text-muted-foreground',\n },\n {\n fill: 'outline',\n variant: 'info',\n className: 'ds:border-info ds:text-[var(--info-foreground)]',\n },\n {\n fill: 'outline',\n variant: 'success',\n className: 'ds:border-success ds:text-[var(--success-foreground)]',\n },\n {\n fill: 'outline',\n variant: 'warning',\n className: 'ds:border-warning ds:text-[var(--warning-foreground)]',\n },\n {\n fill: 'outline',\n variant: 'error',\n className: 'ds:border-destructive ds:text-[var(--error-foreground)]',\n },\n {\n fill: 'outline',\n variant: 'brand',\n className: 'ds:border-primary ds:text-primary',\n },\n ],\n defaultVariants: {\n variant: 'neutral',\n fill: 'solid',\n size: 'md',\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* CVA — close button */\n/* ------------------------------------------------------------------ */\n\nconst closeButtonVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0 ds:rounded-full',\n // Negative end margin keeps the button flush with the pill edge\n 'ds:-me-[var(--spacing-xs)]',\n 'ds:hover:bg-foreground/10',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:p-1 ds:[&>svg]:size-3',\n md: 'ds:p-1 ds:[&>svg]:size-3.5',\n lg: 'ds:p-1.5 ds:[&>svg]:size-4',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* TagProps */\n/* ------------------------------------------------------------------ */\n\nexport interface TagProps {\n /** The visible label text */\n label: string;\n /** Semantic colour variant */\n variant?: 'neutral' | 'info' | 'success' | 'warning' | 'error' | 'brand';\n /** Visual fill style */\n fill?: 'solid' | 'outline';\n /** Size */\n size?: 'sm' | 'md' | 'lg';\n /** Leading slot — icon element or dot */\n leading?: ReactNode;\n /** Called when the tag is removed (enables close button + Backspace/Delete) */\n onRemove?: () => void;\n /** Called when the tag is clicked (non-removable interactive tag) */\n onClick?: () => void;\n /** Disabled state */\n disabled?: boolean;\n /** Max inline size before truncation with tooltip — default 'none' */\n maxInlineSize?: string | 'none';\n /** Additional class names */\n className?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Tag */\n/* ------------------------------------------------------------------ */\n\nexport const Tag = forwardRef<HTMLElement, TagProps>(\n (\n {\n label,\n variant = 'neutral',\n fill = 'solid',\n size = 'md',\n leading,\n onRemove,\n onClick,\n disabled = false,\n maxInlineSize = 'none',\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const labelRef = useRef<HTMLSpanElement>(null);\n const [isOverflowing, setIsOverflowing] = useState(false);\n const [announcement, setAnnouncement] = useState('');\n\n useEffect(() => {\n const el = labelRef.current;\n if (!el || maxInlineSize === 'none') return;\n\n const check = () => setIsOverflowing(el.scrollWidth > el.clientWidth);\n const observer = new ResizeObserver(check);\n observer.observe(el);\n check();\n return () => observer.disconnect();\n }, [maxInlineSize]);\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (\n (e.key === 'Backspace' || e.key === 'Delete') &&\n onRemove &&\n !disabled\n ) {\n e.preventDefault();\n announce();\n // Delay gives the live region one render cycle before unmount\n setTimeout(onRemove, 100);\n }\n };\n\n const announce = () => {\n setAnnouncement(t('tag.removed', { label }));\n };\n\n const handleRemove = () => {\n if (!disabled && onRemove) {\n announce();\n setTimeout(onRemove, 100);\n }\n };\n\n const isRemovable = !!onRemove;\n const isClickable = !!onClick && !isRemovable;\n\n const rootClasses = tagVariants({\n variant,\n fill,\n size,\n className: [\n isClickable && !disabled\n ? 'ds:hover:brightness-90 ds:cursor-pointer'\n : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' '),\n });\n\n const leadingEl = leading ? (\n <span\n aria-hidden=\"true\"\n className=\"ds:shrink-0 ds:inline-flex ds:items-center ds:[&>svg]:size-3.5\"\n >\n {leading}\n </span>\n ) : null;\n\n // Consumer-controlled layout constraint — not a design token.\n // maxInlineSize is an arbitrary caller-supplied value that cannot be expressed\n // as a static Tailwind class; the style prop is the only cross-browser option.\n const labelEl = (\n <span\n ref={labelRef}\n className={\n maxInlineSize !== 'none'\n ? 'ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap'\n : undefined\n }\n // eslint-disable-next-line react/forbid-dom-props -- caller-supplied maxInlineSize, runtime-computed\n style={maxInlineSize !== 'none' ? { maxInlineSize } : undefined}\n >\n {label}\n </span>\n );\n\n // Live region — only for removable tags; must be a sibling outside the button.\n const liveRegion = (\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {announcement}\n </span>\n );\n\n const closeButton = isRemovable ? (\n <button\n type=\"button\"\n aria-label={t('tag.remove', { label })}\n onClick={handleRemove}\n disabled={disabled}\n // Intentionally excluded from tab order: Backspace/Delete on the focused\n // group element provides the same keyboard action.\n tabIndex={-1}\n className={closeButtonVariants({ size })}\n >\n <X aria-hidden=\"true\" />\n </button>\n ) : null;\n\n const shouldWrapTooltip = maxInlineSize !== 'none' && isOverflowing;\n\n // Clickable tag — renders as <button>; live region is a sibling, not inside button\n if (isClickable) {\n const tagEl = (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n onClick={!disabled ? onClick : undefined}\n disabled={disabled}\n data-component=\"tag\"\n className={rootClasses}\n >\n {leadingEl}\n {labelEl}\n </button>\n );\n return shouldWrapTooltip ? (\n <Tooltip label={label}>{tagEl}</Tooltip>\n ) : (\n tagEl\n );\n }\n\n // Removable tag — focusable <span> with embedded close button\n if (isRemovable) {\n const tagEl = (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- removable tag is focusable as a group; Backspace/Delete keyboard removal handled via onKeyDown\n <span\n ref={ref as React.Ref<HTMLSpanElement>}\n role=\"group\"\n aria-label={label}\n tabIndex={disabled ? -1 : 0}\n aria-disabled={disabled || undefined}\n onKeyDown={handleKeyDown}\n data-component=\"tag\"\n className={rootClasses}\n >\n {liveRegion}\n {leadingEl}\n {labelEl}\n {closeButton}\n </span>\n );\n return shouldWrapTooltip ? (\n <Tooltip label={label}>{tagEl}</Tooltip>\n ) : (\n tagEl\n );\n }\n\n // Decorative tag — plain <span>, no interactive role\n const tagEl = (\n <span\n ref={ref as React.Ref<HTMLSpanElement>}\n data-component=\"tag\"\n className={tagVariants({ variant, fill, size, className })}\n >\n {leadingEl}\n {labelEl}\n </span>\n );\n return shouldWrapTooltip ? <Tooltip label={label}>{tagEl}</Tooltip> : tagEl;\n },\n);\n\nTag.displayName = 'Tag';\n"],"names":["tagVariants","cva","closeButtonVariants","Tag","forwardRef","label","variant","fill","size","leading","onRemove","onClick","disabled","maxInlineSize","className","ref","t","useTranslation","labelRef","useRef","isOverflowing","setIsOverflowing","useState","announcement","setAnnouncement","useEffect","el","check","observer","handleKeyDown","e","announce","handleRemove","isRemovable","isClickable","rootClasses","leadingEl","jsx","labelEl","liveRegion","closeButton","X","shouldWrapTooltip","tagEl","jsxs","Tooltip"],"mappings":";;;;;;AAUA,MAAMA,IAAcC;AAAA,EAClB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,QACP,OAAO;AAAA,MAAA;AAAA,MAET,MAAM;AAAA;AAAA;AAAA;AAAA,QAIJ,OACE;AAAA,QACF,SAAS;AAAA,MAAA;AAAA,MAEX,MAAM;AAAA;AAAA;AAAA;AAAA,QAIJ,IAAI;AAAA,QACJ,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AAAA,UACrB,UAAAC;AAAA,UACA,kBAAe;AAAA,UACf,WAAWuB;AAAA,UAEV,UAAA;AAAA,YAAAC;AAAA,YACAE;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAGL,aAAOI,IACL,gBAAAL,EAACQ,GAAA,EAAQ,OAAAxC,GAAe,UAAAsC,GAAM,IAE9BA;AAAAA,IAEJ;AAGA,QAAIV,GAAa;AACf,YAAMU;AAAAA;AAAAA,QAEJ,gBAAAC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAA7B;AAAA,YACA,MAAK;AAAA,YACL,cAAYV;AAAA,YACZ,UAAUO,IAAW,KAAK;AAAA,YAC1B,iBAAeA,KAAY;AAAA,YAC3B,WAAWiB;AAAA,YACX,kBAAe;AAAA,YACf,WAAWM;AAAA,YAEV,UAAA;AAAA,cAAAI;AAAA,cACAH;AAAA,cACAE;AAAA,cACAE;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA;AAGL,aAAOE,IACL,gBAAAL,EAACQ,GAAA,EAAQ,OAAAxC,GAAe,UAAAsC,GAAM,IAE9BA;AAAAA,IAEJ;AAGA,UAAMA,IACJ,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAA7B;AAAA,QACA,kBAAe;AAAA,QACf,WAAWf,EAAY,EAAE,SAAAM,GAAS,MAAAC,GAAM,MAAAC,GAAM,WAAAM,GAAW;AAAA,QAExD,UAAA;AAAA,UAAAsB;AAAA,UACAE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAGL,WAAOI,IAAoB,gBAAAL,EAACQ,GAAA,EAAQ,OAAAxC,GAAe,aAAM,IAAasC;AAAA,EACxE;AACF;AAEAxC,EAAI,cAAc;"}
|
|
1
|
+
{"version":3,"file":"tag-Ci3xJPcH.js","sources":["../../src/components/tag/tag.tsx"],"sourcesContent":["import { forwardRef, useRef, useState, useEffect, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { X } from 'lucide-react';\nimport { Tooltip } from '../tooltip';\n\n/* ------------------------------------------------------------------ */\n/* CVA — tag pill */\n/* ------------------------------------------------------------------ */\n\nconst tagVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-full)]',\n 'type-eyebrow ds:whitespace-nowrap',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:aria-disabled:cursor-not-allowed ds:aria-disabled:opacity-50',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n ].join(' '),\n {\n variants: {\n variant: {\n neutral: '',\n info: '',\n success: '',\n warning: '',\n error: '',\n brand: '',\n },\n fill: {\n // Solid chips carry a subtle, theme-aware border (a low-opacity\n // foreground mix) so they read as a defined chip on any surface, not a\n // floating fill — works across every colour variant, light and dark.\n solid:\n 'ds:border ds:border-[color:color-mix(in_srgb,var(--foreground)_15%,transparent)]',\n outline: 'ds:border ds:border-[color:var(--border)] ds:bg-transparent',\n },\n size: {\n // Symmetric start/end padding — close button uses negative margin to stay flush.\n // Size is the only eyebrow-role axis that varies per Tag size; weight, transform,\n // tracking, line-height, and features all come from `.type-eyebrow` on the base.\n sm: 'ds:h-[calc(var(--spacing)*4)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:[--type-eyebrow-size:var(--font-size-2xs)]',\n md: 'ds:h-[calc(var(--spacing)*5)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:[--type-eyebrow-size:var(--font-size-2xs)]',\n lg: 'ds:h-[calc(var(--spacing)*6)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:[--type-eyebrow-size:var(--font-size-xs)]',\n },\n },\n compoundVariants: [\n // Solid fills — foreground tokens adapt per theme\n {\n fill: 'solid',\n variant: 'neutral',\n className:\n 'ds:bg-muted/20 ds:text-muted-foreground ds:border-[color:var(--border)]',\n },\n {\n fill: 'solid',\n variant: 'info',\n className: 'ds:bg-info ds:text-[color:var(--info-solid-foreground)]',\n },\n {\n fill: 'solid',\n variant: 'success',\n className:\n 'ds:bg-success ds:text-[color:var(--success-solid-foreground)]',\n },\n {\n fill: 'solid',\n variant: 'warning',\n className: 'ds:bg-warning ds:text-foreground',\n },\n {\n fill: 'solid',\n variant: 'error',\n className: 'ds:bg-destructive ds:text-destructive-foreground',\n },\n {\n fill: 'solid',\n variant: 'brand',\n className: 'ds:bg-primary ds:text-primary-foreground',\n },\n // Outline fills\n {\n fill: 'outline',\n variant: 'neutral',\n className: 'ds:border-[color:var(--border)] ds:text-muted-foreground',\n },\n {\n fill: 'outline',\n variant: 'info',\n className: 'ds:border-info ds:text-[var(--info-foreground)]',\n },\n {\n fill: 'outline',\n variant: 'success',\n className: 'ds:border-success ds:text-[var(--success-foreground)]',\n },\n {\n fill: 'outline',\n variant: 'warning',\n className: 'ds:border-warning ds:text-[var(--warning-foreground)]',\n },\n {\n fill: 'outline',\n variant: 'error',\n className: 'ds:border-destructive ds:text-[var(--error-foreground)]',\n },\n {\n fill: 'outline',\n variant: 'brand',\n className: 'ds:border-primary ds:text-primary',\n },\n ],\n defaultVariants: {\n variant: 'neutral',\n fill: 'solid',\n size: 'md',\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* CVA — close button */\n/* ------------------------------------------------------------------ */\n\nconst closeButtonVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0 ds:rounded-full',\n // Negative end margin keeps the button flush with the pill edge\n 'ds:-me-[var(--spacing-xs)]',\n 'ds:hover:bg-foreground/10',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:p-1 ds:[&>svg]:size-3',\n md: 'ds:p-1 ds:[&>svg]:size-3.5',\n lg: 'ds:p-1.5 ds:[&>svg]:size-4',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* TagProps */\n/* ------------------------------------------------------------------ */\n\nexport interface TagProps {\n /** The visible label text */\n label: string;\n /** Semantic colour variant */\n variant?: 'neutral' | 'info' | 'success' | 'warning' | 'error' | 'brand';\n /** Visual fill style */\n fill?: 'solid' | 'outline';\n /** Size */\n size?: 'sm' | 'md' | 'lg';\n /** Leading slot — icon element or dot */\n leading?: ReactNode;\n /** Called when the tag is removed (enables close button + Backspace/Delete) */\n onRemove?: () => void;\n /** Called when the tag is clicked (non-removable interactive tag) */\n onClick?: () => void;\n /** Disabled state */\n disabled?: boolean;\n /** Max inline size before truncation with tooltip — default 'none' */\n maxInlineSize?: string | 'none';\n /** Additional class names */\n className?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Tag */\n/* ------------------------------------------------------------------ */\n\nexport const Tag = forwardRef<HTMLElement, TagProps>(\n (\n {\n label,\n variant = 'neutral',\n fill = 'solid',\n size = 'md',\n leading,\n onRemove,\n onClick,\n disabled = false,\n maxInlineSize = 'none',\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const labelRef = useRef<HTMLSpanElement>(null);\n const [isOverflowing, setIsOverflowing] = useState(false);\n const [announcement, setAnnouncement] = useState('');\n\n useEffect(() => {\n const el = labelRef.current;\n if (!el || maxInlineSize === 'none') return;\n\n const check = () => setIsOverflowing(el.scrollWidth > el.clientWidth);\n const observer = new ResizeObserver(check);\n observer.observe(el);\n check();\n return () => observer.disconnect();\n }, [maxInlineSize]);\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (\n (e.key === 'Backspace' || e.key === 'Delete') &&\n onRemove &&\n !disabled\n ) {\n e.preventDefault();\n announce();\n // Delay gives the live region one render cycle before unmount\n setTimeout(onRemove, 100);\n }\n };\n\n const announce = () => {\n setAnnouncement(t('tag.removed', { label }));\n };\n\n const handleRemove = () => {\n if (!disabled && onRemove) {\n announce();\n setTimeout(onRemove, 100);\n }\n };\n\n const isRemovable = !!onRemove;\n const isClickable = !!onClick && !isRemovable;\n\n const rootClasses = tagVariants({\n variant,\n fill,\n size,\n className: [\n isClickable && !disabled\n ? 'ds:hover:brightness-90 ds:cursor-pointer'\n : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' '),\n });\n\n const leadingEl = leading ? (\n <span\n aria-hidden=\"true\"\n className=\"ds:shrink-0 ds:inline-flex ds:items-center ds:[&>svg]:size-3.5\"\n >\n {leading}\n </span>\n ) : null;\n\n // Consumer-controlled layout constraint — not a design token.\n // maxInlineSize is an arbitrary caller-supplied value that cannot be expressed\n // as a static Tailwind class; the style prop is the only cross-browser option.\n const labelEl = (\n <span\n ref={labelRef}\n className={\n maxInlineSize !== 'none'\n ? 'ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap'\n : undefined\n }\n // eslint-disable-next-line react/forbid-dom-props -- caller-supplied maxInlineSize, runtime-computed\n style={maxInlineSize !== 'none' ? { maxInlineSize } : undefined}\n >\n {label}\n </span>\n );\n\n // Live region — only for removable tags; must be a sibling outside the button.\n const liveRegion = (\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {announcement}\n </span>\n );\n\n const closeButton = isRemovable ? (\n <button\n type=\"button\"\n aria-label={t('tag.remove', { label })}\n onClick={handleRemove}\n disabled={disabled}\n // Intentionally excluded from tab order: Backspace/Delete on the focused\n // group element provides the same keyboard action.\n tabIndex={-1}\n className={closeButtonVariants({ size })}\n >\n <X aria-hidden=\"true\" />\n </button>\n ) : null;\n\n const shouldWrapTooltip = maxInlineSize !== 'none' && isOverflowing;\n\n // Clickable tag — renders as <button>; live region is a sibling, not inside button\n if (isClickable) {\n const tagEl = (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n onClick={!disabled ? onClick : undefined}\n disabled={disabled}\n data-component=\"tag\"\n className={rootClasses}\n >\n {leadingEl}\n {labelEl}\n </button>\n );\n return shouldWrapTooltip ? (\n <Tooltip label={label}>{tagEl}</Tooltip>\n ) : (\n tagEl\n );\n }\n\n // Removable tag — focusable <span> with embedded close button\n if (isRemovable) {\n const tagEl = (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- removable tag is focusable as a group; Backspace/Delete keyboard removal handled via onKeyDown\n <span\n ref={ref as React.Ref<HTMLSpanElement>}\n role=\"group\"\n aria-label={label}\n tabIndex={disabled ? -1 : 0}\n aria-disabled={disabled || undefined}\n onKeyDown={handleKeyDown}\n data-component=\"tag\"\n className={rootClasses}\n >\n {liveRegion}\n {leadingEl}\n {labelEl}\n {closeButton}\n </span>\n );\n return shouldWrapTooltip ? (\n <Tooltip label={label}>{tagEl}</Tooltip>\n ) : (\n tagEl\n );\n }\n\n // Decorative tag — plain <span>, no interactive role\n const tagEl = (\n <span\n ref={ref as React.Ref<HTMLSpanElement>}\n data-component=\"tag\"\n className={tagVariants({ variant, fill, size, className })}\n >\n {leadingEl}\n {labelEl}\n </span>\n );\n return shouldWrapTooltip ? <Tooltip label={label}>{tagEl}</Tooltip> : tagEl;\n },\n);\n\nTag.displayName = 'Tag';\n"],"names":["tagVariants","cva","closeButtonVariants","Tag","forwardRef","label","variant","fill","size","leading","onRemove","onClick","disabled","maxInlineSize","className","ref","t","useTranslation","labelRef","useRef","isOverflowing","setIsOverflowing","useState","announcement","setAnnouncement","useEffect","el","check","observer","handleKeyDown","e","announce","handleRemove","isRemovable","isClickable","rootClasses","leadingEl","jsx","labelEl","liveRegion","closeButton","X","shouldWrapTooltip","tagEl","jsxs","Tooltip"],"mappings":";;;;;;AAUA,MAAMA,IAAcC;AAAA,EACl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AAY,EAAE,SAAAM,GAAS,MAAAC,GAAM,MAAAC,GAAM,WAAAM,GAAW;AAAA,QAExD,UAAA;AAAA,UAAAsB;AAAA,UACAE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAGL,WAAOI,IAAoB,gBAAAL,EAACQ,GAAA,EAAQ,OAAAxC,GAAe,aAAM,IAAasC;AAAA,EACxE;AACF;AAEAxC,EAAI,cAAc;"}
|
|
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as v } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as B, useRef as N, useMemo as E, useImperativeHandle as P } from "react";
|
|
3
3
|
import { c as H } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as M } from "react-i18next";
|
|
5
|
-
import { I as A } from "./icon-button-
|
|
5
|
+
import { I as A } from "./icon-button-8xqRnkdG.js";
|
|
6
6
|
import { S as V } from "./skeleton-CZbwyJAA.js";
|
|
7
7
|
import { E as F } from "./empty-state-X0sVPfVo.js";
|
|
8
8
|
import { T as G } from "./task-card-BalrLkSz.js";
|
|
@@ -236,4 +236,4 @@ export {
|
|
|
236
236
|
X as T,
|
|
237
237
|
U as t
|
|
238
238
|
};
|
|
239
|
-
//# sourceMappingURL=task-tray-
|
|
239
|
+
//# sourceMappingURL=task-tray-wl9eti6J.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-tray-COo-RlDv.js","sources":["../../src/components/task-tray/task-tray.agent.ts","../../src/components/task-tray/task-tray.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — TaskTray. */\n/* */\n/* Tray-level surface: read the current task ids + status, route a */\n/* `select_item` activation, and `toggle_done` / `dismiss` per task */\n/* through the curated handle. TaskTray is in-page (no open/close), */\n/* so it declares neither `open` nor `close`. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TaskTrayHandle } from './task-tray';\n\nexport const taskTrayAgent: AgentAdapter<TaskTrayHandle> = {\n id: 'task-tray',\n capabilities: ['select_single', 'dismiss'],\n state: {\n items: {\n type: 'Array<{ id: string; status: string }>',\n descriptionKey: 'ui.agent.taskTray.state.items',\n description:\n 'Currently-displayed tasks. Ids + status only — never task title / patient.',\n read: (handle) => handle.getItems(),\n },\n },\n actions: {\n select_item: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.taskTray.actions.selectItem',\n description: 'Activate the task with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n toggle_done: {\n safety: 'write',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n descriptionKey: 'ui.agent.taskTray.actions.toggleDone',\n description: 'Request the host to toggle the done state of a task.',\n invoke: (handle, args: { id: string }) => {\n handle.toggleDone(args.id);\n },\n },\n dismiss: {\n safety: 'destructive',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.taskTray.actions.dismiss',\n description:\n 'Request the host to dismiss / remove the task with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.dismiss(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'task-tray',\n description: 'Marks the TaskTray wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific tray from the agent.',\n },\n item: {\n attr: 'data-task-id',\n description:\n 'Stable task id emitted on each rendered TaskCard inside the tray.',\n },\n },\n};\n","import {\n forwardRef,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { SquareCheckBig, Plus } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { TaskCard, type TaskItem } from '../task-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { taskTrayAgent } from './task-tray.agent';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst taskTrayVariants = cva(\n [\n 'ds:flex ds:flex-col',\n 'ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]',\n 'ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2',\n 'ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]',\n 'ds:overflow-hidden',\n ].join(' '),\n {\n variants: {\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\n/**\n * Curated imperative handle for TaskTray. Exposed as the forwardRef\n * target so a future agent / MCP UI bridge can drive the tray without\n * touching the DOM. See `task-tray.agent.ts`.\n */\nexport interface TaskTrayHandle {\n getItems: () => Array<{ id: string; status: string }>;\n selectItem: (id: string) => void;\n toggleDone: (id: string) => void;\n dismiss: (id: string) => void;\n}\n\nexport interface TaskTrayProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'onClick' | 'id'>,\n VariantProps<typeof taskTrayVariants> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so\n * an agent / MCP UI bridge can address this specific tray.\n */\n id?: string;\n /** Tasks rendered inside the panel. */\n items: TaskItem[];\n /** Section title — rendered in the header. Localised by the consumer. */\n title?: string;\n /** Visual density forwarded to each TaskCard. */\n size?: 'sm' | 'md';\n /** Fires when the user activates a task (click / Enter / Space). */\n onOpenTask?: (item: TaskItem) => void;\n /** Fires when the host should toggle the done state of a task. Used by agent integration. */\n onToggleDone?: (item: TaskItem) => void;\n /** Fires when the host should dismiss / remove a task. Used by agent integration. */\n onDismissTask?: (item: TaskItem) => void;\n /** Fires when the user activates the header \"Add\" affordance. */\n onAddTask?: () => void;\n /** Localised label for the \"Add\" affordance. Defaults to `ui.taskTray.add`. */\n addLabel?: string;\n /** When true the panel renders skeleton placeholders. */\n loading?: boolean;\n /** Render an empty state when `items` is empty and `loading` is false. */\n emptyTitle?: string;\n emptyDescription?: string;\n /** Optional CTA wired into the empty state (EmptyState primaryAction). */\n emptyAction?: { label: string; onClick: () => void };\n /**\n * Pinned footer link (e.g. \"All my undone tasks (12)\"). Localised by\n * the consumer; rendered after the list, before the section closes.\n */\n viewAllLabel?: string;\n /** Fires when the footer link is activated. Required to render it. */\n onViewAll?: () => void;\n /**\n * Per-row trailing action toolbar, forwarded to each TaskCard's\n * `actions` slot.\n */\n renderItemActions?: (item: TaskItem) => ReactNode;\n /**\n * Constrain the list to the tray's own height and scroll inside it —\n * pair with a height/max-height on `className`. The scroll region is\n * keyboard-focusable so it stays operable without a pointer.\n */\n scrollable?: boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const TaskTray = forwardRef<HTMLElement, TaskTrayProps>(\n (\n {\n id,\n items,\n title,\n size = 'sm',\n onOpenTask,\n onToggleDone,\n onDismissTask,\n onAddTask,\n addLabel,\n loading = false,\n emptyTitle,\n emptyDescription,\n emptyAction,\n viewAllLabel,\n onViewAll,\n renderItemActions,\n scrollable = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const heading = title ?? t('taskTray.title', 'Tasks');\n const resolvedAddLabel = addLabel ?? t('taskTray.add', 'Add task');\n const isEmpty = !loading && items.length === 0;\n\n let body: ReactNode;\n if (loading) {\n body = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n {[0, 1, 2].map((i) => (\n <Skeleton key={i} variant=\"rectangular\" height=\"2.5rem\" />\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = (\n <div className=\"ds:p-[var(--spacing-md)]\">\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={emptyTitle ?? t('taskTray.empty.title', 'No tasks yet')}\n description={\n emptyDescription ??\n t('taskTray.empty.description', 'New tasks will appear here.')\n }\n primaryAction={emptyAction}\n />\n </div>\n );\n } else {\n body = (\n <ul\n className={[\n // flex-1 unconditionally so a footer pins to the tray's\n // bottom edge in equal-height grid rows.\n 'ds:flex ds:list-none ds:flex-col ds:flex-1 ds:min-h-0',\n // Keyboard-focusable when it scrolls (axe\n // scrollable-region-focusable) — pair with a height on the\n // tray's className.\n scrollable ? 'ds:overflow-y-auto' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- scrollable list must be keyboard focusable (axe scrollable-region-focusable)\n tabIndex={scrollable ? 0 : undefined}\n aria-label={scrollable ? heading : undefined}\n >\n {items.map((item) => (\n <TaskCard\n key={item.id}\n item={item}\n size={size}\n onActivate={onOpenTask}\n actions={renderItemActions?.(item)}\n data-task-id={item.id}\n />\n ))}\n </ul>\n );\n }\n\n /* Curated imperative handle for agent integration. See\n * task-tray.agent.ts. */\n const itemsRef = useRef<TaskItem[]>(items);\n itemsRef.current = items;\n\n const handle = useMemo<TaskTrayHandle>(\n () => ({\n getItems: () =>\n itemsRef.current.map((i) => ({\n id: i.id,\n status: i.status ?? 'open',\n })),\n selectItem: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onOpenTask?.(found);\n },\n toggleDone: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onToggleDone?.(found);\n },\n dismiss: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onDismissTask?.(found);\n },\n }),\n [onOpenTask, onToggleDone, onDismissTask],\n );\n\n const rootRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => rootRef.current as HTMLElement, []);\n useAgentRegistration(taskTrayAgent, handle, id);\n\n return (\n <section\n ref={rootRef}\n aria-label={heading}\n data-component=\"task-tray\"\n data-component-id={id}\n className={taskTrayVariants({ size, className })}\n {...rest}\n >\n <header className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n <h3 className=\"ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card\">\n <SquareCheckBig aria-hidden=\"true\" className=\"ds:size-4\" />\n {heading}\n </h3>\n {onAddTask ? (\n <IconButton\n icon={<Plus />}\n intent=\"outline\"\n size=\"sm\"\n aria-label={resolvedAddLabel}\n onClick={onAddTask}\n />\n ) : null}\n </header>\n {body}\n {viewAllLabel && onViewAll && !isEmpty && !loading ? (\n <footer className=\"ds:[border-block-start:var(--border-width-sm)_solid_var(--card-border)] ds:p-[var(--spacing-sm)]\">\n <button\n type=\"button\"\n onClick={onViewAll}\n className={[\n 'type-label ds:text-[color:var(--link)] ds:underline ds:underline-offset-2 ds:hover:no-underline',\n 'ds:rounded-[var(--radius-sm)] ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n ].join(' ')}\n >\n {viewAllLabel}\n </button>\n </footer>\n ) : null}\n </section>\n );\n },\n);\n\nTaskTray.displayName = 'TaskTray';\n"],"names":["taskTrayAgent","handle","args","taskTrayVariants","cva","TaskTray","forwardRef","id","items","title","size","onOpenTask","onToggleDone","onDismissTask","onAddTask","addLabel","loading","emptyTitle","emptyDescription","emptyAction","viewAllLabel","onViewAll","renderItemActions","scrollable","className","rest","ref","t","useTranslation","heading","resolvedAddLabel","isEmpty","body","jsx","i","Skeleton","EmptyState","item","TaskCard","itemsRef","useRef","useMemo","targetId","found","rootRef","useImperativeHandle","useAgentR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A,UACCkB;AAAA,UACAZ,KAAgBC,KAAa,CAACU,KAAW,CAACf,IACzC,gBAAAiB,EAAC,UAAA,EAAO,WAAU,oGAChB,UAAA,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAASZ;AAAA,cACT,WAAW;AAAA,gBACT;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cAAA,EACA,KAAK,GAAG;AAAA,cAET,UAAAD;AAAA,YAAA;AAAA,UAAA,GAEL,IACE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAf,EAAS,cAAc;"}
|
|
1
|
+
{"version":3,"file":"task-tray-wl9eti6J.js","sources":["../../src/components/task-tray/task-tray.agent.ts","../../src/components/task-tray/task-tray.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — TaskTray. */\n/* */\n/* Tray-level surface: read the current task ids + status, route a */\n/* `select_item` activation, and `toggle_done` / `dismiss` per task */\n/* through the curated handle. TaskTray is in-page (no open/close), */\n/* so it declares neither `open` nor `close`. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TaskTrayHandle } from './task-tray';\n\nexport const taskTrayAgent: AgentAdapter<TaskTrayHandle> = {\n id: 'task-tray',\n capabilities: ['select_single', 'dismiss'],\n state: {\n items: {\n type: 'Array<{ id: string; status: string }>',\n descriptionKey: 'ui.agent.taskTray.state.items',\n description:\n 'Currently-displayed tasks. Ids + status only — never task title / patient.',\n read: (handle) => handle.getItems(),\n },\n },\n actions: {\n select_item: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.taskTray.actions.selectItem',\n description: 'Activate the task with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n toggle_done: {\n safety: 'write',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n descriptionKey: 'ui.agent.taskTray.actions.toggleDone',\n description: 'Request the host to toggle the done state of a task.',\n invoke: (handle, args: { id: string }) => {\n handle.toggleDone(args.id);\n },\n },\n dismiss: {\n safety: 'destructive',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.taskTray.actions.dismiss',\n description:\n 'Request the host to dismiss / remove the task with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.dismiss(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'task-tray',\n description: 'Marks the TaskTray wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific tray from the agent.',\n },\n item: {\n attr: 'data-task-id',\n description:\n 'Stable task id emitted on each rendered TaskCard inside the tray.',\n },\n },\n};\n","import {\n forwardRef,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { SquareCheckBig, Plus } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { TaskCard, type TaskItem } from '../task-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { taskTrayAgent } from './task-tray.agent';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst taskTrayVariants = cva(\n [\n 'ds:flex ds:flex-col',\n 'ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]',\n 'ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2',\n 'ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]',\n 'ds:overflow-hidden',\n ].join(' '),\n {\n variants: {\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\n/**\n * Curated imperative handle for TaskTray. Exposed as the forwardRef\n * target so a future agent / MCP UI bridge can drive the tray without\n * touching the DOM. See `task-tray.agent.ts`.\n */\nexport interface TaskTrayHandle {\n getItems: () => Array<{ id: string; status: string }>;\n selectItem: (id: string) => void;\n toggleDone: (id: string) => void;\n dismiss: (id: string) => void;\n}\n\nexport interface TaskTrayProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'onClick' | 'id'>,\n VariantProps<typeof taskTrayVariants> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so\n * an agent / MCP UI bridge can address this specific tray.\n */\n id?: string;\n /** Tasks rendered inside the panel. */\n items: TaskItem[];\n /** Section title — rendered in the header. Localised by the consumer. */\n title?: string;\n /** Visual density forwarded to each TaskCard. */\n size?: 'sm' | 'md';\n /** Fires when the user activates a task (click / Enter / Space). */\n onOpenTask?: (item: TaskItem) => void;\n /** Fires when the host should toggle the done state of a task. Used by agent integration. */\n onToggleDone?: (item: TaskItem) => void;\n /** Fires when the host should dismiss / remove a task. Used by agent integration. */\n onDismissTask?: (item: TaskItem) => void;\n /** Fires when the user activates the header \"Add\" affordance. */\n onAddTask?: () => void;\n /** Localised label for the \"Add\" affordance. Defaults to `ui.taskTray.add`. */\n addLabel?: string;\n /** When true the panel renders skeleton placeholders. */\n loading?: boolean;\n /** Render an empty state when `items` is empty and `loading` is false. */\n emptyTitle?: string;\n emptyDescription?: string;\n /** Optional CTA wired into the empty state (EmptyState primaryAction). */\n emptyAction?: { label: string; onClick: () => void };\n /**\n * Pinned footer link (e.g. \"All my undone tasks (12)\"). Localised by\n * the consumer; rendered after the list, before the section closes.\n */\n viewAllLabel?: string;\n /** Fires when the footer link is activated. Required to render it. */\n onViewAll?: () => void;\n /**\n * Per-row trailing action toolbar, forwarded to each TaskCard's\n * `actions` slot.\n */\n renderItemActions?: (item: TaskItem) => ReactNode;\n /**\n * Constrain the list to the tray's own height and scroll inside it —\n * pair with a height/max-height on `className`. The scroll region is\n * keyboard-focusable so it stays operable without a pointer.\n */\n scrollable?: boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const TaskTray = forwardRef<HTMLElement, TaskTrayProps>(\n (\n {\n id,\n items,\n title,\n size = 'sm',\n onOpenTask,\n onToggleDone,\n onDismissTask,\n onAddTask,\n addLabel,\n loading = false,\n emptyTitle,\n emptyDescription,\n emptyAction,\n viewAllLabel,\n onViewAll,\n renderItemActions,\n scrollable = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const heading = title ?? t('taskTray.title', 'Tasks');\n const resolvedAddLabel = addLabel ?? t('taskTray.add', 'Add task');\n const isEmpty = !loading && items.length === 0;\n\n let body: ReactNode;\n if (loading) {\n body = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n {[0, 1, 2].map((i) => (\n <Skeleton key={i} variant=\"rectangular\" height=\"2.5rem\" />\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = (\n <div className=\"ds:p-[var(--spacing-md)]\">\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={emptyTitle ?? t('taskTray.empty.title', 'No tasks yet')}\n description={\n emptyDescription ??\n t('taskTray.empty.description', 'New tasks will appear here.')\n }\n primaryAction={emptyAction}\n />\n </div>\n );\n } else {\n body = (\n <ul\n className={[\n // flex-1 unconditionally so a footer pins to the tray's\n // bottom edge in equal-height grid rows.\n 'ds:flex ds:list-none ds:flex-col ds:flex-1 ds:min-h-0',\n // Keyboard-focusable when it scrolls (axe\n // scrollable-region-focusable) — pair with a height on the\n // tray's className.\n scrollable ? 'ds:overflow-y-auto' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- scrollable list must be keyboard focusable (axe scrollable-region-focusable)\n tabIndex={scrollable ? 0 : undefined}\n aria-label={scrollable ? heading : undefined}\n >\n {items.map((item) => (\n <TaskCard\n key={item.id}\n item={item}\n size={size}\n onActivate={onOpenTask}\n actions={renderItemActions?.(item)}\n data-task-id={item.id}\n />\n ))}\n </ul>\n );\n }\n\n /* Curated imperative handle for agent integration. See\n * task-tray.agent.ts. */\n const itemsRef = useRef<TaskItem[]>(items);\n itemsRef.current = items;\n\n const handle = useMemo<TaskTrayHandle>(\n () => ({\n getItems: () =>\n itemsRef.current.map((i) => ({\n id: i.id,\n status: i.status ?? 'open',\n })),\n selectItem: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onOpenTask?.(found);\n },\n toggleDone: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onToggleDone?.(found);\n },\n dismiss: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onDismissTask?.(found);\n },\n }),\n [onOpenTask, onToggleDone, onDismissTask],\n );\n\n const rootRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => rootRef.current as HTMLElement, []);\n useAgentRegistration(taskTrayAgent, handle, id);\n\n return (\n <section\n ref={rootRef}\n aria-label={heading}\n data-component=\"task-tray\"\n data-component-id={id}\n className={taskTrayVariants({ size, className })}\n {...rest}\n >\n <header className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n <h3 className=\"ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card\">\n <SquareCheckBig aria-hidden=\"true\" className=\"ds:size-4\" />\n {heading}\n </h3>\n {onAddTask ? (\n <IconButton\n icon={<Plus />}\n intent=\"outline\"\n size=\"sm\"\n aria-label={resolvedAddLabel}\n onClick={onAddTask}\n />\n ) : null}\n </header>\n {body}\n {viewAllLabel && onViewAll && !isEmpty && !loading ? (\n <footer className=\"ds:[border-block-start:var(--border-width-sm)_solid_var(--card-border)] ds:p-[var(--spacing-sm)]\">\n <button\n type=\"button\"\n onClick={onViewAll}\n className={[\n 'type-label ds:text-[color:var(--link)] ds:underline ds:underline-offset-2 ds:hover:no-underline',\n 'ds:rounded-[var(--radius-sm)] ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n ].join(' ')}\n >\n {viewAllLabel}\n </button>\n </footer>\n ) : null}\n </section>\n );\n },\n);\n\nTaskTray.displayName = 'TaskTray';\n"],"names":["taskTrayAgent","handle","args","taskTrayVariants","cva","TaskTray","forwardRef","id","items","title","size","onOpenTask","onToggleDone","onDismissTask","onAddTask","addLabel","loading","emptyTitle","emptyDescription","emptyAction","viewAllLabel","onViewAll","renderItemActions","scrollable","className","rest","ref","t","useTranslation","heading","resolvedAddLabel","isEmpty","body","jsx","i","Skeleton","EmptyState","item","TaskCard","itemsRef","useRef","useMemo","targetId","found","rootRef","useImperativeHandle","useAgentRegistration","jsxs","SquareCheckBig","IconButton","Plus"],"mappings":";;;;;;;;;;;AAYO,MAAMA,IAA8C;AAAA,EACzD,IAAI;AAAA,EACJ,cAAc,CAAC,iBAAiB,SAAS;AAAA,EACzC,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAA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2,11 @@ import { jsx as a, jsxs as m, Fragment as we } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as Pt, useId as Pe, useMemo as O, useState as h, useCallback as f, useRef as V, useImperativeHandle as xt } from "react";
|
|
3
3
|
import { c as Nt } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as _t } from "react-i18next";
|
|
5
|
-
import { B as Dt } from "./badge-
|
|
5
|
+
import { B as Dt } from "./badge-BudgzTe_.js";
|
|
6
6
|
import { B as oe } from "./button-nJaPh_HC.js";
|
|
7
|
-
import { I as ne } from "./icon-button-
|
|
8
|
-
import { B as xe } from "./button-group-
|
|
9
|
-
import { P as Rt } from "./panel-header-
|
|
7
|
+
import { I as ne } from "./icon-button-8xqRnkdG.js";
|
|
8
|
+
import { B as xe } from "./button-group-QmN1VdUW.js";
|
|
9
|
+
import { P as Rt } from "./panel-header-D_mTdhUp.js";
|
|
10
10
|
import { S as Ne } from "./select-CLSUnKjF.js";
|
|
11
11
|
import { S as Tt } from "./switch-OILsBLWo.js";
|
|
12
12
|
import { S as St } from "./skeleton-CZbwyJAA.js";
|
|
@@ -841,4 +841,4 @@ export {
|
|
|
841
841
|
ns as T,
|
|
842
842
|
Gt as t
|
|
843
843
|
};
|
|
844
|
-
//# sourceMappingURL=tasks-panel-
|
|
844
|
+
//# sourceMappingURL=tasks-panel-BDNB7hsZ.js.map
|