@alfadocs/ui-kit-debug 1.55.0 → 1.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{ai-credits-notice-BoNJtOuE.js → ai-credits-notice-ktklr8fy.js} +2 -2
- package/dist/_chunks/{ai-credits-notice-BoNJtOuE.js.map → ai-credits-notice-ktklr8fy.js.map} +1 -1
- package/dist/_chunks/ai-permission-notice-DyuEGwAt.js +206 -0
- package/dist/_chunks/ai-permission-notice-DyuEGwAt.js.map +1 -0
- package/dist/_chunks/alia-sidebar-BBKBJCv6.js +1284 -0
- package/dist/_chunks/alia-sidebar-BBKBJCv6.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-Dtw5Hpg4.js → anamnesis-summary-rows-CCQ62mMN.js} +5 -5
- package/dist/_chunks/{anamnesis-summary-rows-Dtw5Hpg4.js.map → anamnesis-summary-rows-CCQ62mMN.js.map} +1 -1
- package/dist/_chunks/{appointment-peek-BIZaDeCi.js → appointment-peek-WvNbE4JG.js} +2 -2
- package/dist/_chunks/{appointment-peek-BIZaDeCi.js.map → appointment-peek-WvNbE4JG.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-DmqYEIT9.js → appointment-timeline-Z0494xO-.js} +2 -2
- package/dist/_chunks/{appointment-timeline-DmqYEIT9.js.map → appointment-timeline-Z0494xO-.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-zP-iN-Pd.js → balance-badge-cell-CII3SDmR.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-zP-iN-Pd.js.map → balance-badge-cell-CII3SDmR.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-DTZhRhXe.js → bmi-calculator-C0UTxB7R.js} +2 -2
- package/dist/_chunks/{bmi-calculator-DTZhRhXe.js.map → bmi-calculator-C0UTxB7R.js.map} +1 -1
- package/dist/_chunks/{booking-uZO10TLK.js → booking-81WnKDsH.js} +4 -4
- package/dist/_chunks/{booking-uZO10TLK.js.map → booking-81WnKDsH.js.map} +1 -1
- package/dist/_chunks/{breadcrumb-xgVpPH2H.js → breadcrumb-Boan-5n8.js} +39 -39
- package/dist/_chunks/breadcrumb-Boan-5n8.js.map +1 -0
- package/dist/_chunks/{calculator-dialog-BRjZMWuE.js → calculator-dialog-CzQv03p0.js} +2 -2
- package/dist/_chunks/{calculator-dialog-BRjZMWuE.js.map → calculator-dialog-CzQv03p0.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-DVajSkKA.js → calendar-workspace-D5-k_9zE.js} +15 -15
- package/dist/_chunks/{calendar-workspace-DVajSkKA.js.map → calendar-workspace-D5-k_9zE.js.map} +1 -1
- package/dist/_chunks/{care-plan-card-Ddjh5Doc.js → care-plan-card-DxrRLRdW.js} +2 -2
- package/dist/_chunks/{care-plan-card-Ddjh5Doc.js.map → care-plan-card-DxrRLRdW.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-BeMYMiI7.js → care-plan-header-BMwZIgHJ.js} +3 -3
- package/dist/_chunks/{care-plan-header-BeMYMiI7.js.map → care-plan-header-BMwZIgHJ.js.map} +1 -1
- package/dist/_chunks/chart-DQ5GxqgT.js +906 -0
- package/dist/_chunks/chart-DQ5GxqgT.js.map +1 -0
- package/dist/_chunks/{clinical-note-card-14JIoUR0.js → clinical-note-card-hx939bvw.js} +2 -2
- package/dist/_chunks/{clinical-note-card-14JIoUR0.js.map → clinical-note-card-hx939bvw.js.map} +1 -1
- package/dist/_chunks/{color-picker-BRQ4Y9SO.js → color-picker-BsggJovx.js} +128 -123
- package/dist/_chunks/color-picker-BsggJovx.js.map +1 -0
- package/dist/_chunks/{contact-card-CmK05vNb.js → contact-card-fHBMwEsx.js} +2 -2
- package/dist/_chunks/{contact-card-CmK05vNb.js.map → contact-card-fHBMwEsx.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-C5DbP_X3.js → contact-profile-card-CMyBYgRR.js} +3 -3
- package/dist/_chunks/{contact-profile-card-C5DbP_X3.js.map → contact-profile-card-CMyBYgRR.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-Dgfqr4Q4.js → cycle-calculator-Cww9DzIa.js} +2 -2
- package/dist/_chunks/{cycle-calculator-Dgfqr4Q4.js.map → cycle-calculator-Cww9DzIa.js.map} +1 -1
- package/dist/_chunks/dashboard-grid-DfEY2qci.js +844 -0
- package/dist/_chunks/dashboard-grid-DfEY2qci.js.map +1 -0
- package/dist/_chunks/{data-table-C6T31E33.js → data-table-fAMTeAjM.js} +2 -2
- package/dist/_chunks/{data-table-C6T31E33.js.map → data-table-fAMTeAjM.js.map} +1 -1
- package/dist/_chunks/{data-table-tabs-Xhg5G0gU.js → data-table-tabs-CHYAAeHy.js} +2 -2
- package/dist/_chunks/{data-table-tabs-Xhg5G0gU.js.map → data-table-tabs-CHYAAeHy.js.map} +1 -1
- package/dist/_chunks/{date-picker-wRAcq2lt.js → date-picker-BSZuKo13.js} +69 -62
- package/dist/_chunks/date-picker-BSZuKo13.js.map +1 -0
- package/dist/_chunks/{date-range-picker-BOvHwWO5.js → date-range-picker-CFk-5O3R.js} +188 -177
- package/dist/_chunks/date-range-picker-CFk-5O3R.js.map +1 -0
- package/dist/_chunks/{date-time-picker-CLeLKuv9.js → date-time-picker-CjxTkblD.js} +92 -85
- package/dist/_chunks/date-time-picker-CjxTkblD.js.map +1 -0
- package/dist/_chunks/{dependent-selector-Bet3XAFj.js → dependent-selector-DgaAQc-c.js} +91 -86
- package/dist/_chunks/dependent-selector-DgaAQc-c.js.map +1 -0
- package/dist/_chunks/{dialog-D52AI4nF.js → dialog-Dn-iQ0Jp.js} +86 -69
- package/dist/_chunks/dialog-Dn-iQ0Jp.js.map +1 -0
- package/dist/_chunks/{document-preview-uoTekVR7.js → document-preview-CHGGG0l_.js} +2 -2
- package/dist/_chunks/{document-preview-uoTekVR7.js.map → document-preview-CHGGG0l_.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-DXDJbUzo.js → due-date-calculator-D_qFUiHp.js} +3 -3
- package/dist/_chunks/{due-date-calculator-DXDJbUzo.js.map → due-date-calculator-D_qFUiHp.js.map} +1 -1
- package/dist/_chunks/{entity-summary-DcB0fIiv.js → entity-summary-CWcCSThK.js} +2 -2
- package/dist/_chunks/{entity-summary-DcB0fIiv.js.map → entity-summary-CWcCSThK.js.map} +1 -1
- package/dist/_chunks/{file-manager-dIJQUZvq.js → file-manager-CFsL1KVt.js} +4 -4
- package/dist/_chunks/{file-manager-dIJQUZvq.js.map → file-manager-CFsL1KVt.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-B6ojVXq7.js → freemium-paywall-DIKuhX8b.js} +90 -86
- package/dist/_chunks/freemium-paywall-DIKuhX8b.js.map +1 -0
- package/dist/_chunks/{gestational-age-calculator-BfGpt3du.js → gestational-age-calculator-CZi43xKG.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-BfGpt3du.js.map → gestational-age-calculator-CZi43xKG.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-BIYyI2Yo.js → hcg-doubling-Ccvh7OaU.js} +2 -2
- package/dist/_chunks/{hcg-doubling-BIYyI2Yo.js.map → hcg-doubling-Ccvh7OaU.js.map} +1 -1
- package/dist/_chunks/{header-settings-ge_3gYEq.js → header-settings-BMcCx2LC.js} +2 -2
- package/dist/_chunks/{header-settings-ge_3gYEq.js.map → header-settings-BMcCx2LC.js.map} +1 -1
- package/dist/_chunks/{heatmap-BARGZZt2.js → heatmap-BEeOThkW.js} +2 -2
- package/dist/_chunks/{heatmap-BARGZZt2.js.map → heatmap-BEeOThkW.js.map} +1 -1
- package/dist/_chunks/{help-me-write-templates-B7L3zGsE.js → help-me-write-templates-BUoYGo6f.js} +2 -2
- package/dist/_chunks/help-me-write-templates-BUoYGo6f.js.map +1 -0
- package/dist/_chunks/{hover-card-BnTueNS2.js → hover-card-U_ZYoh1n.js} +201 -187
- package/dist/_chunks/hover-card-U_ZYoh1n.js.map +1 -0
- package/dist/_chunks/{icon-picker-DWrqmI1c.js → icon-picker-C86lQTIA.js} +2 -2
- package/dist/_chunks/{icon-picker-DWrqmI1c.js.map → icon-picker-C86lQTIA.js.map} +1 -1
- package/dist/_chunks/{info-tip-B0jmIt6M.js → info-tip-CJpNpzZe.js} +2 -2
- package/dist/_chunks/{info-tip-B0jmIt6M.js.map → info-tip-CJpNpzZe.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-Ax8IJr1M.js → key-value-pair-BNNITp6S.js} +25 -19
- package/dist/_chunks/key-value-pair-BNNITp6S.js.map +1 -0
- package/dist/_chunks/{kit-extensions-C9-v8Dih.js → kit-extensions-DYVxWcqv.js} +5 -5
- package/dist/_chunks/{kit-extensions-C9-v8Dih.js.map → kit-extensions-DYVxWcqv.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-DlBVPMTi.js → link-cell-renderer-CxW_oLa5.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-DlBVPMTi.js.map → link-cell-renderer-CxW_oLa5.js.map} +1 -1
- package/dist/_chunks/link-gRw3NtOt.js +137 -0
- package/dist/_chunks/link-gRw3NtOt.js.map +1 -0
- package/dist/_chunks/{locale-picker-DfNSdOpy.js → locale-picker-BGfrZyTw.js} +2 -2
- package/dist/_chunks/{locale-picker-DfNSdOpy.js.map → locale-picker-BGfrZyTw.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-Dcx-JEjg.js → marketplace-app-shell-BZcA9Z06.js} +143 -129
- package/dist/_chunks/marketplace-app-shell-BZcA9Z06.js.map +1 -0
- package/dist/_chunks/{message-tray-BB95DA82.js → message-tray-QKQutwxj.js} +76 -69
- package/dist/_chunks/message-tray-QKQutwxj.js.map +1 -0
- package/dist/_chunks/{nav-grid-BqCPH8sm.js → nav-grid-Byx8PxuB.js} +2 -2
- package/dist/_chunks/{nav-grid-BqCPH8sm.js.map → nav-grid-Byx8PxuB.js.map} +1 -1
- package/dist/_chunks/non-modal-tab-exit-j3CPOuE3.js +89 -0
- package/dist/_chunks/non-modal-tab-exit-j3CPOuE3.js.map +1 -0
- package/dist/_chunks/{note-attachment-I1NLoeRZ.js → note-attachment-Bt2cddsZ.js} +2 -2
- package/dist/_chunks/{note-attachment-I1NLoeRZ.js.map → note-attachment-Bt2cddsZ.js.map} +1 -1
- package/dist/_chunks/{note-timeline-CsY8YOE7.js → note-timeline-CX9nAgAR.js} +2 -2
- package/dist/_chunks/{note-timeline-CsY8YOE7.js.map → note-timeline-CX9nAgAR.js.map} +1 -1
- package/dist/_chunks/{notes-panel-I8ntrrUW.js → notes-panel-Cm4pttpl.js} +4 -4
- package/dist/_chunks/{notes-panel-I8ntrrUW.js.map → notes-panel-Cm4pttpl.js.map} +1 -1
- package/dist/_chunks/{notification-tray-__sJXnsz.js → notification-tray-C5VtbGjd.js} +83 -76
- package/dist/_chunks/notification-tray-C5VtbGjd.js.map +1 -0
- package/dist/_chunks/{patient-details-DsTtjpuX.js → patient-details-99kEdtc5.js} +2 -2
- package/dist/_chunks/{patient-details-DsTtjpuX.js.map → patient-details-99kEdtc5.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-BvZ9luz-.js → patient-field-row-DkxY13T6.js} +5 -5
- package/dist/_chunks/{patient-field-row-BvZ9luz-.js.map → patient-field-row-DkxY13T6.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-3dspc2tR.js → patient-summary-card-opdyfeW2.js} +10 -6
- package/dist/_chunks/{patient-summary-card-3dspc2tR.js.map → patient-summary-card-opdyfeW2.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-DEUfM7EU.js → payment-automation-upsell-DiHovmUL.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-DEUfM7EU.js.map → payment-automation-upsell-DiHovmUL.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-DAGqh9Yx.js → payment-request-card-DAniJNLX.js} +3 -3
- package/dist/_chunks/{payment-request-card-DAGqh9Yx.js.map → payment-request-card-DAniJNLX.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer-C3minW5b.js → pdf-viewer-CNQxa4tv.js} +396 -391
- package/dist/_chunks/pdf-viewer-CNQxa4tv.js.map +1 -0
- package/dist/_chunks/{periodontal-chart-BqwLxy2m.js → periodontal-chart-DD5C0M3l.js} +2 -2
- package/dist/_chunks/{periodontal-chart-BqwLxy2m.js.map → periodontal-chart-DD5C0M3l.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-CWZ1YM1h.js → periodontal-chart-card-CxdXvsPU.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-CWZ1YM1h.js.map → periodontal-chart-card-CxdXvsPU.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-C9IuvLId.js → periodontal-diagnosis-D-PJv7KS.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-C9IuvLId.js.map → periodontal-diagnosis-D-PJv7KS.js.map} +1 -1
- package/dist/_chunks/{phone-input-DxkHMYmu.js → phone-input-O9camxkq.js} +156 -151
- package/dist/_chunks/phone-input-O9camxkq.js.map +1 -0
- package/dist/_chunks/popover-BG75rYjN.js +367 -0
- package/dist/_chunks/popover-BG75rYjN.js.map +1 -0
- package/dist/_chunks/{position-grid-D2D5_Tze.js → position-grid-CBB88EaH.js} +38 -36
- package/dist/_chunks/position-grid-CBB88EaH.js.map +1 -0
- package/dist/_chunks/{practice-results-DxOgbPDy.js → practice-results-CfRkjzsI.js} +2 -2
- package/dist/_chunks/{practice-results-DxOgbPDy.js.map → practice-results-CfRkjzsI.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-R3q5n1Wh.js → pregnancy-dating-BFzv9g1N.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-R3q5n1Wh.js.map → pregnancy-dating-BFzv9g1N.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-DwmNklDU.js → pregnancy-weight-gain-CUUrBTBo.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-DwmNklDU.js.map → pregnancy-weight-gain-CUUrBTBo.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-BSSiGGG4.js → product-hub-panel-DlVRK7Ue.js} +103 -96
- package/dist/_chunks/product-hub-panel-DlVRK7Ue.js.map +1 -0
- package/dist/_chunks/{public-footer-CxpG6J1M.js → public-footer-ZWTEG1Rq.js} +2 -2
- package/dist/_chunks/{public-footer-CxpG6J1M.js.map → public-footer-ZWTEG1Rq.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-BWusjxY8.js → public-header.agent-BctevbuY.js} +2 -2
- package/dist/_chunks/{public-header.agent-BWusjxY8.js.map → public-header.agent-BctevbuY.js.map} +1 -1
- package/dist/_chunks/{radio-group-BT97ty7o.js → radio-group-DicxWJXP.js} +111 -106
- package/dist/_chunks/radio-group-DicxWJXP.js.map +1 -0
- package/dist/_chunks/{radiograph-panel.agent-BA90I3Mu.js → radiograph-panel.agent-DyqbTECc.js} +4 -4
- package/dist/_chunks/{radiograph-panel.agent-BA90I3Mu.js.map → radiograph-panel.agent-DyqbTECc.js.map} +1 -1
- package/dist/_chunks/{registration-form-D7iNqMBF.js → registration-form-BlTzYywa.js} +2 -2
- package/dist/_chunks/{registration-form-D7iNqMBF.js.map → registration-form-BlTzYywa.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-Blp4smUr.js → rich-text-editor-DTnNZ4Ff.js} +489 -484
- package/dist/_chunks/rich-text-editor-DTnNZ4Ff.js.map +1 -0
- package/dist/_chunks/{sheet-CNFW8mYZ.js → sheet-8qsiMoUI.js} +95 -79
- package/dist/_chunks/sheet-8qsiMoUI.js.map +1 -0
- package/dist/_chunks/{sign-document-B6HlyCGV.js → sign-document-D4iHS_Ug.js} +2 -2
- package/dist/_chunks/{sign-document-B6HlyCGV.js.map → sign-document-D4iHS_Ug.js.map} +1 -1
- package/dist/_chunks/{signature-request-rgMsgo-C.js → signature-request-DRuYAG5I.js} +2 -2
- package/dist/_chunks/{signature-request-rgMsgo-C.js.map → signature-request-DRuYAG5I.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-B2GTIeqA.js → signed-out-frame-AhMsNW1r.js} +2 -2
- package/dist/_chunks/{signed-out-frame-B2GTIeqA.js.map → signed-out-frame-AhMsNW1r.js.map} +1 -1
- package/dist/_chunks/{stat-51CDL4au.js → stat-DmjGfXND.js} +117 -108
- package/dist/_chunks/stat-DmjGfXND.js.map +1 -0
- package/dist/_chunks/{stepper-accordion-D7lnBGh2.js → stepper-accordion-DDTSOUHc.js} +17 -6
- package/dist/_chunks/stepper-accordion-DDTSOUHc.js.map +1 -0
- package/dist/_chunks/{task-editor-Ctxsa1BY.js → task-editor-NkcopDna.js} +4 -4
- package/dist/_chunks/{task-editor-Ctxsa1BY.js.map → task-editor-NkcopDna.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-DinTrRIW.js → use-appointment-details-read-CfFQNOF_.js} +5 -5
- package/dist/_chunks/{use-appointment-details-read-DinTrRIW.js.map → use-appointment-details-read-CfFQNOF_.js.map} +1 -1
- package/dist/_chunks/use-select-on-arrow-Cr4iBuW5.js +26 -0
- package/dist/_chunks/use-select-on-arrow-Cr4iBuW5.js.map +1 -0
- package/dist/_chunks/{voice-control-panel-Bg1eklL0.js → voice-control-panel-BKbgb7FM.js} +2 -2
- package/dist/_chunks/{voice-control-panel-Bg1eklL0.js.map → voice-control-panel-BKbgb7FM.js.map} +1 -1
- package/dist/_chunks/{widget-picker-D8RiWrJd.js → widget-picker-rBA7MR5P.js} +2 -2
- package/dist/_chunks/{widget-picker-D8RiWrJd.js.map → widget-picker-rBA7MR5P.js.map} +1 -1
- package/dist/_chunks/{workflow-map-D3mezmGB.js → workflow-map-Demlpy39.js} +2 -2
- package/dist/_chunks/{workflow-map-D3mezmGB.js.map → workflow-map-Demlpy39.js.map} +1 -1
- package/dist/agent-catalog.json +28 -11
- package/dist/agent-i18n/en.json +8 -7
- package/dist/components/_shared/non-modal-tab-exit.d.ts +19 -0
- package/dist/components/_shared/non-modal-tab-exit.d.ts.map +1 -0
- package/dist/components/_shared/use-apex-chart-semantics.d.ts +6 -0
- package/dist/components/_shared/use-apex-chart-semantics.d.ts.map +1 -0
- package/dist/components/_shared/use-select-on-arrow.d.ts +20 -0
- package/dist/components/_shared/use-select-on-arrow.d.ts.map +1 -0
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/ai-permission-notice.d.ts +32 -0
- package/dist/components/ai-permission-notice/ai-permission-notice.d.ts.map +1 -1
- package/dist/components/ai-permission-notice/index.d.ts +1 -1
- package/dist/components/ai-permission-notice/index.d.ts.map +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chart/chart.d.ts +15 -10
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts +22 -0
- package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts.map +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.agent.d.ts.map +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.d.ts +48 -4
- package/dist/components/dashboard-grid/dashboard-grid.d.ts.map +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/date-time-picker.d.ts.map +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dependent-selector/dependent-selector.d.ts.map +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/freemium-paywall/freemium-paywall.d.ts.map +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-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/hover-card/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/key-value-pair/key-value-pair.d.ts.map +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/link.d.ts +5 -3
- package/dist/components/link/link.d.ts.map +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/message-tray/message-tray.d.ts.map +1 -1
- package/dist/components/nav-grid/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/notification-tray/notification-tray.d.ts.map +1 -1
- package/dist/components/patient-details/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.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts.map +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/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover.d.ts +1 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/position-grid/index.js +1 -1
- package/dist/components/position-grid/position-grid.d.ts.map +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/product-hub-tray/index.js +1 -1
- package/dist/components/product-hub-tray/product-hub-tray.d.ts.map +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sheet/sheet.d.ts +2 -2
- package/dist/components/sheet/sheet.d.ts.map +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stat/index.d.ts +1 -1
- package/dist/components/stat/index.d.ts.map +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +9 -0
- package/dist/components/stat/stat.d.ts.map +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/stepper-accordion/stepper-accordion.d.ts.map +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-legacy.css +13 -2
- package/dist/i18n/locales/ar.d.ts +17 -2
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +20 -5
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +17 -2
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +20 -5
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +17 -2
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +20 -5
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +17 -2
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +20 -5
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +17 -2
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +20 -5
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +17 -2
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +20 -5
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +17 -2
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +20 -5
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +17 -2
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +20 -5
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +17 -2
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +20 -5
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +17 -2
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +20 -5
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +17 -2
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +20 -5
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +17 -2
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +20 -5
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +17 -2
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +20 -5
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +17 -2
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +20 -5
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +17 -2
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +20 -5
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +17 -2
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +20 -5
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +17 -2
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +20 -5
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +17 -2
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +20 -5
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +207 -206
- package/dist/locales/ar.json +20 -5
- package/dist/locales/de.json +20 -5
- package/dist/locales/el.json +20 -5
- package/dist/locales/en.json +20 -5
- package/dist/locales/es.json +20 -5
- package/dist/locales/fr.json +20 -5
- package/dist/locales/hi.json +20 -5
- package/dist/locales/it.json +20 -5
- package/dist/locales/ja.json +20 -5
- package/dist/locales/nl.json +20 -5
- package/dist/locales/pl.json +20 -5
- package/dist/locales/pt.json +20 -5
- package/dist/locales/ro.json +20 -5
- package/dist/locales/ru.json +20 -5
- package/dist/locales/sq.json +20 -5
- package/dist/locales/sv.json +20 -5
- package/dist/locales/tr.json +20 -5
- package/dist/locales/zh.json +20 -5
- package/dist/patterns/alia-assistant/alia-asteroid-icon.d.ts +10 -13
- package/dist/patterns/alia-assistant/alia-asteroid-icon.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/alia-popout.d.ts +5 -3
- package/dist/patterns/alia-assistant/alia-popout.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/index.d.ts +2 -0
- package/dist/patterns/alia-assistant/index.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/index.js +6 -5
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +2 -2
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts.map +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +7 -2
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts.map +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +13 -2
- package/package.json +1 -1
- package/dist/_chunks/ai-permission-notice-5vpblPCx.js +0 -171
- package/dist/_chunks/ai-permission-notice-5vpblPCx.js.map +0 -1
- package/dist/_chunks/alia-sidebar-DS0b54Mv.js +0 -1183
- package/dist/_chunks/alia-sidebar-DS0b54Mv.js.map +0 -1
- package/dist/_chunks/breadcrumb-xgVpPH2H.js.map +0 -1
- package/dist/_chunks/chart-C2RBJERE.js +0 -705
- package/dist/_chunks/chart-C2RBJERE.js.map +0 -1
- package/dist/_chunks/color-picker-BRQ4Y9SO.js.map +0 -1
- package/dist/_chunks/dashboard-grid-SAGoyCtL.js +0 -691
- package/dist/_chunks/dashboard-grid-SAGoyCtL.js.map +0 -1
- package/dist/_chunks/date-picker-wRAcq2lt.js.map +0 -1
- package/dist/_chunks/date-range-picker-BOvHwWO5.js.map +0 -1
- package/dist/_chunks/date-time-picker-CLeLKuv9.js.map +0 -1
- package/dist/_chunks/dependent-selector-Bet3XAFj.js.map +0 -1
- package/dist/_chunks/dialog-D52AI4nF.js.map +0 -1
- package/dist/_chunks/freemium-paywall-B6ojVXq7.js.map +0 -1
- package/dist/_chunks/help-me-write-templates-B7L3zGsE.js.map +0 -1
- package/dist/_chunks/hover-card-BnTueNS2.js.map +0 -1
- package/dist/_chunks/key-value-pair-Ax8IJr1M.js.map +0 -1
- package/dist/_chunks/link-2HokYuIi.js +0 -130
- package/dist/_chunks/link-2HokYuIi.js.map +0 -1
- package/dist/_chunks/marketplace-app-shell-Dcx-JEjg.js.map +0 -1
- package/dist/_chunks/message-tray-BB95DA82.js.map +0 -1
- package/dist/_chunks/notification-tray-__sJXnsz.js.map +0 -1
- package/dist/_chunks/pdf-viewer-C3minW5b.js.map +0 -1
- package/dist/_chunks/phone-input-DxkHMYmu.js.map +0 -1
- package/dist/_chunks/popover-BI3oV3eY.js +0 -305
- package/dist/_chunks/popover-BI3oV3eY.js.map +0 -1
- package/dist/_chunks/position-grid-D2D5_Tze.js.map +0 -1
- package/dist/_chunks/product-hub-panel-BSSiGGG4.js.map +0 -1
- package/dist/_chunks/radio-group-BT97ty7o.js.map +0 -1
- package/dist/_chunks/rich-text-editor-Blp4smUr.js.map +0 -1
- package/dist/_chunks/sheet-CNFW8mYZ.js.map +0 -1
- package/dist/_chunks/stat-51CDL4au.js.map +0 -1
- package/dist/_chunks/stepper-accordion-D7lnBGh2.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chart-C2RBJERE.js","sources":["../../node_modules/lucide-react/dist/esm/icons/chart-area.mjs","../../node_modules/lucide-react/dist/esm/icons/chart-column.mjs","../../node_modules/lucide-react/dist/esm/icons/chart-line.mjs","../../node_modules/lucide-react/dist/esm/icons/chart-pie.mjs","../../node_modules/lucide-react/dist/esm/icons/donut.mjs","../../src/components/chart/chart.agent.ts","../../src/components/chart/chart.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 3v16a2 2 0 0 0 2 2h16\", key: \"c24i48\" }],\n [\n \"path\",\n {\n d: \"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z\",\n key: \"q0gr47\"\n }\n ]\n];\nconst ChartArea = createLucideIcon(\"chart-area\", __iconNode);\n\nexport { __iconNode, ChartArea as default };\n//# sourceMappingURL=chart-area.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 3v16a2 2 0 0 0 2 2h16\", key: \"c24i48\" }],\n [\"path\", { d: \"M18 17V9\", key: \"2bz60n\" }],\n [\"path\", { d: \"M13 17V5\", key: \"1frdt8\" }],\n [\"path\", { d: \"M8 17v-3\", key: \"17ska0\" }]\n];\nconst ChartColumn = createLucideIcon(\"chart-column\", __iconNode);\n\nexport { __iconNode, ChartColumn as default };\n//# sourceMappingURL=chart-column.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 3v16a2 2 0 0 0 2 2h16\", key: \"c24i48\" }],\n [\"path\", { d: \"m19 9-5 5-4-4-3 3\", key: \"2osh9i\" }]\n];\nconst ChartLine = createLucideIcon(\"chart-line\", __iconNode);\n\nexport { __iconNode, ChartLine as default };\n//# sourceMappingURL=chart-line.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z\",\n key: \"pzmjnu\"\n }\n ],\n [\"path\", { d: \"M21.21 15.89A10 10 0 1 1 8 2.83\", key: \"k2fpak\" }]\n];\nconst ChartPie = createLucideIcon(\"chart-pie\", __iconNode);\n\nexport { __iconNode, ChartPie as default };\n//# sourceMappingURL=chart-pie.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M20.5 10a2.5 2.5 0 0 1-2.4-3H18a2.95 2.95 0 0 1-2.6-4.4 10 10 0 1 0 6.3 7.1c-.3.2-.8.3-1.2.3\",\n key: \"19sr3x\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }]\n];\nconst Donut = createLucideIcon(\"donut\", __iconNode);\n\nexport { __iconNode, Donut as default };\n//# sourceMappingURL=donut.mjs.map\n","import type { AgentAdapter } from '../../agent/types';\nimport type { ChartHandle } from './chart';\n\nexport const chartAgent: AgentAdapter<ChartHandle> = {\n id: 'chart',\n // view_change backs the opt-in type switcher (`switchableTypes` prop):\n // the same chart re-presented as line / bar / area / pie / donut.\n capabilities: ['view_change'],\n state: {\n declaredType: {\n type: \"'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'\",\n descriptionKey: 'ui.agent.chart.state.declaredType',\n description:\n 'The consumer-declared chart type — the shape `update_series` expects.',\n read: (handle) => handle.getTypeState().declaredType,\n },\n effectiveType: {\n type: \"'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'\",\n descriptionKey: 'ui.agent.chart.state.effectiveType',\n description:\n 'The type currently rendered — differs from declaredType after a type-switcher pick.',\n read: (handle) => handle.getTypeState().effectiveType,\n },\n availableTypes: {\n type: 'ChartType[]',\n descriptionKey: 'ui.agent.chart.state.availableTypes',\n description:\n 'Types the switcher offers. Empty when the chart has no type switcher.',\n read: (handle) => handle.getTypeState().availableTypes,\n },\n },\n actions: {\n change_view: {\n // Switching the presentation is a write (it changes what the user\n // sees) but is trivially reversible by switching back.\n safety: 'write',\n argsType: 'type',\n argsSchema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['line', 'bar', 'area', 'pie', 'donut'],\n description: 'The chart type to render.',\n },\n },\n required: ['type'],\n },\n returns: 'boolean (accepted)',\n returnsSchema: {\n type: 'boolean',\n description:\n 'True when the switch was applied; false when the chart has no type switcher or the type is not offered (check availableTypes first).',\n },\n idempotent: true,\n descriptionKey: 'ui.agent.chart.actions.changeView',\n description:\n 'Switch the rendered chart type via the type switcher. No-op (returns false) when the chart has no switcher or the type is not offered.',\n invoke: (handle, args: { type: string }) =>\n handle.setType(args.type as Parameters<ChartHandle['setType']>[0]),\n },\n update_series: {\n // Replacing the rendered series mutates what the chart displays — it\n // is a write, reversible by pushing the prior series back.\n safety: 'write',\n argsType: 'series',\n // `series` is `ChartSeries[]` (line/bar/area) OR `number[]`\n // (pie/donut/radialBar). Both shapes are accepted; the handle routes\n // by chart type internally.\n argsSchema: {\n type: 'object',\n properties: {\n series: {\n oneOf: [\n {\n type: 'array',\n description: 'Categorical series for line / bar / area charts.',\n items: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n data: { type: 'array', items: { type: 'number' } },\n role: {\n type: 'string',\n enum: ['primary', 'compare'],\n description:\n \"Optional. 'compare' renders this series as a secondary, colour-blind-safe overlay (e.g. the previous period) — dashed grey for line/area, hatched grey for bar. Omit for a normal primary series.\",\n },\n },\n required: ['name', 'data'],\n },\n },\n {\n type: 'array',\n description: 'Flat values for pie / donut / radialBar charts.',\n items: { type: 'number' },\n },\n ],\n },\n },\n required: ['series'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.chart.actions.updateSeries',\n description:\n 'Replace the chart series without remounting. Pass the DECLARED type’s shape (see declaredType state) — when the user has switched the view cross-shape the values are converted to the rendered shape. The write targets the live instance only: a later type switch re-reads the original props and discards it.',\n invoke: (\n handle,\n args: { series: Parameters<ChartHandle['updateSeries']>[0] },\n ) => {\n handle.updateSeries(args.series);\n },\n },\n export_png: {\n safety: 'read',\n returns: 'string (PNG data URI)',\n returnsSchema: {\n type: 'string',\n description: 'A `data:image/png;base64,…` URI of the rendered chart.',\n },\n idempotent: true,\n descriptionKey: 'ui.agent.chart.actions.exportPng',\n description:\n 'Return a PNG data URI of the chart for export or screenshotting.',\n invoke: (handle) => handle.dataURI(),\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'chart' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Chart — thin, typed wrapper over ApexCharts (react-apexcharts). */\n/* */\n/* - All chrome, colours, and fonts flow from */\n/* `src/tokens/apexcharts-theme.ts` — never hex literals in user */\n/* code. A MutationObserver on `<html class>` re-reads the bridge so */\n/* theme changes repaint without remount. */\n/* - A ResizeObserver on the wrapper keeps the chart responsive */\n/* without listening on `window.resize`. */\n/* - Accessibility: the wrapper carries `role=\"img\"` + `aria-label` */\n/* (required `title` prop) + `aria-describedby` pointing at a */\n/* visually-hidden `<table>` that mirrors series × categories. */\n/* - Colour-blind users: `patterns` prop flips `fill.type` to pattern */\n/* using ApexCharts' built-in pattern presets. */\n/* - Numbers format via `Intl.NumberFormat(locale)` — no hand-rolled */\n/* `toFixed()`. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport ReactApexChart from 'react-apexcharts';\nimport ApexCharts from 'apexcharts';\nimport {\n ChartArea,\n ChartColumn,\n ChartLine,\n ChartPie,\n Donut,\n} from 'lucide-react';\nimport {\n getApexChartsTheme,\n getCompareFillOpacity,\n resolveCompareTint,\n type ApexChartsTheme,\n} from '../../tokens/apexcharts-theme';\nimport { usePrefersReducedMotion } from '../../hooks';\nimport { useNeutraliseHiddenFocus } from '../_shared/use-neutralize-hidden-focus';\nimport { useKeepApexTooltipInside } from '../_shared/use-keep-apex-tooltip-inside';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { chartAgent } from './chart.agent';\nimport { IconButton } from '../button/icon-button';\nimport { IconButtonGroup } from '../icon-button-group';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst chartVariants = cva('ds:relative ds:block ds:w-full', {\n variants: {\n density: {\n compact: 'ds:min-h-[var(--chart-min-height-compact)]',\n comfortable: 'ds:min-h-[var(--chart-min-height-comfortable)]',\n // Applied when an explicit `height` prop is given and no density was\n // requested: the wrapper must not exceed the caller's height (a 96px\n // KPI chart inside a card must not reserve 320px).\n none: '',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type ChartType = 'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar';\n\nexport interface ChartSeries {\n name: string;\n data: number[];\n /**\n * Marks this series as a secondary \"compare\" overlay — e.g. the previous\n * period in a current-vs-previous financial view. Rendered visually\n * subordinate and colour-blind-safe, distinguished from primary series by\n * BOTH a non-colour cue AND a lighter shade of the SAME hue (never colour\n * alone). The compare series inherits its PAIRED primary's colour (k-th\n * compare pairs with the k-th primary, by order), then:\n * - line / area: a round-DOTTED stroke in the paired-primary colour (the\n * dotted-vs-solid pattern is the non-colour cue); area also gets a tinted\n * fill at `--chart-compare-fill-opacity`.\n * - bar: a tinted fill (paired-primary hue at `--chart-compare-fill-opacity`)\n * under a full-strength DOTTED outline that is OPEN at the baseline — so a\n * compare bar reads as an outlined \"ghost\" of its solid primary.\n * The legend swatch shows the lighter tint (via `legend.markers.fillColors`),\n * and the series name (e.g. \"Revenue (previous period)\") remains the primary\n * signal in the legend and the screen-reader table.\n * Only meaningful on axis types (line / area / bar); it is structurally\n * impossible on pie / donut / radialBar (their `series` is `number[]`, which\n * cannot carry this field), so the axis-only invariant is enforced by the\n * type system with no runtime guard. On an axis→slice type switch the compare\n * series are dropped from the slice (a previous-period total is not a slice of\n * the current whole; DEV warn). Omit (or `'primary'`) to render normally — a\n * chart with NO compare series emits byte-identical ApexCharts options to\n * before this field existed.\n * @default 'primary'\n */\n role?: 'primary' | 'compare';\n}\n\n/** Bar orientation. `'horizontal'` renders a ranking sideways. Default `'vertical'`. */\nexport type ChartOrientation = 'vertical' | 'horizontal';\n\n/** Line / area stroke interpolation. Default `'smooth'`. */\nexport type ChartCurve = 'smooth' | 'straight' | 'stepline';\n\nexport interface ChartProps extends VariantProps<typeof chartVariants> {\n /** Required — drives aria-label and sr-only table caption. */\n title: string;\n /** Opaque instance id — emitted as `data-component-id` for the agent registry. */\n id?: string;\n /** Chart visual type. */\n type: ChartType;\n /**\n * For `line` / `bar` / `area`: an array of `ChartSeries`.\n * For `pie` / `donut` / `radialBar`: an array of numbers matched to `labels`.\n */\n series: ChartSeries[] | number[];\n /** Category axis labels (line / bar / area). */\n categories?: string[];\n /** Slice labels (pie / donut / radialBar). */\n labels?: string[];\n /** Height override. Defaults to 320px. */\n height?: number | string;\n /** Width override. Defaults to 100% of container. */\n width?: number | string;\n /** Opt-in pattern fills for colour-blind users. */\n patterns?: boolean;\n /**\n * Stack multiple `bar` / `area` series into a composition-over-time view.\n * Maps to ApexCharts `chart.stacked`. Only applies to the axis types\n * (`line` / `bar` / `area`); slice types (`pie` / `donut` / `radialBar`)\n * have no axis to stack against and ignore it. Default `false` — an\n * unstacked chart emits no `chart.stacked` key and renders identically to\n * before this prop existed.\n */\n stacked?: boolean;\n /**\n * Orientation for the `bar` type. `'horizontal'` renders the bars sideways\n * (ApexCharts `plotOptions.bar.horizontal`) for ranking-style charts where\n * the category is a name and the value runs across the horizontal axis.\n * Still an axis chart — pass `series` as `ChartSeries[]` with `categories`.\n * Ignored for every non-`bar` type. Default `'vertical'`.\n */\n orientation?: ChartOrientation;\n /**\n * Stroke interpolation for `line` / `area` charts (ApexCharts\n * `stroke.curve`). `'straight'` avoids the overshoot a smoothed spline\n * introduces on spiky monthly financials — where a `'smooth'` curve can dip\n * visually below zero between two positive points. Inert on `bar` (stroke\n * width is 0) and ignored on slice types. Default `'smooth'` — existing\n * charts are unaffected.\n */\n curve?: ChartCurve;\n /**\n * Override the series colour ramp. Pass **already-resolved** colour strings\n * (e.g. the live value of `var(--success)` sampled by the consumer) — these\n * are handed straight to ApexCharts, which can't read CSS custom properties.\n * When omitted, the theme bridge's `colors` ramp from `apexcharts-theme.ts`\n * is used, so existing consumers are unaffected. Typical use: a single-arc\n * `radialBar` gauge (e.g. BMI) that must change hue with the value —\n * green in the healthy band, amber/red outside it.\n */\n colors?: string[];\n /** Show the ApexCharts toolbar. Defaults to false. */\n toolbar?: boolean;\n /** Locale override — defaults to the active i18next language. */\n locale?: string;\n /**\n * radialBar only. Formats the value printed in the ring centre. Use when the\n * gauge represents a non-percentage figure: pass the arc fill (0–100) as the\n * single `series` value and return the real figure here (e.g. `(_, ) => '22.4'`).\n * Ignored for every other chart type. Defaults to ApexCharts' `${value}%`.\n */\n radialValueFormatter?: (value: number) => string;\n /**\n * Formats the numeric value of each data point wherever it is surfaced as\n * text — the tooltip, the value (y) axis on categorical charts, and the\n * screen-reader summary table. Use it to append a unit or currency symbol,\n * e.g. `(v) => new Intl.NumberFormat(locale, { style: 'currency', currency:\n * 'EUR' }).format(v)`. Defaults to `Intl.NumberFormat(locale)` (grouped\n * number, no unit). Does not apply to a `radialBar` ring centre — use\n * `radialValueFormatter` for that.\n */\n valueFormatter?: (value: number) => string;\n /**\n * Opt-in type switcher. Pass two or more of `'line' | 'bar' | 'area' |\n * 'pie' | 'donut'` to render an icon radiogroup (an `IconButtonGroup`)\n * above the plot that lets the user flip the chart between those types.\n * `type` is the initial selection and is always offered; the user's pick\n * then sticks across re-renders (remount with a new `key` to reset it).\n * When the picked type reads the other data shape, the data adapts: axis\n * series collapse to one slice per series (that series' total) for `pie` /\n * `donut`, and slice values become a single-series axis chart with\n * `labels` as the categories. `radialBar` cannot participate — such\n * entries are ignored (DEV warning) and a `radialBar` chart never shows\n * the switcher.\n */\n switchableTypes?: ChartType[];\n /** Called when the user picks a different type via the switcher. */\n onTypeChange?: (type: ChartType) => void;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\nexport interface ChartHandle {\n /** Returns a PNG data URI for the chart. */\n dataURI: () => Promise<string>;\n /**\n * Updates series without remounting. Always pass the DECLARED `type`'s\n * shape — while the user has switched the view across the axis/slice\n * boundary the values (and, for axis→slice, the slice labels) are\n * converted to the rendered shape; for slice→axis the categories stay\n * the `labels` prop, so keep the value count stable. The update writes\n * to the live ApexCharts instance only: a later type switch remounts\n * from the original props and discards it.\n */\n updateSeries: (next: ChartProps['series']) => void;\n /**\n * Switches the rendered type via the type switcher. Returns `false`\n * (no-op) when the switcher is not enabled or the type is not offered.\n */\n setType: (next: ChartType) => boolean;\n /** Declared vs rendered type plus the types the switcher offers ([] when disabled). */\n getTypeState: () => {\n declaredType: ChartType;\n effectiveType: ChartType;\n availableTypes: ChartType[];\n };\n}\n\n/* ------------------------------------------------------------------ */\n/* Constants */\n/* ------------------------------------------------------------------ */\n\nconst PATTERN_STYLES = [\n 'verticalLines',\n 'horizontalLines',\n 'slantedLines',\n 'squares',\n 'circles',\n] as const;\n\n/** Types where `categories` belong on an x-axis. */\nconst CATEGORICAL_TYPES: ReadonlyArray<ChartType> = ['line', 'bar', 'area'];\n\n/** Types where `series` is a flat `number[]` paired with `labels`. */\nconst SLICE_TYPES: ReadonlyArray<ChartType> = ['pie', 'donut', 'radialBar'];\n\n/** Types the switcher may offer. `radialBar` is excluded — its series are\n * synthetic arc percents that cannot be re-plotted on an axis or as slices. */\nconst SWITCHABLE_TYPES: ReadonlyArray<ChartType> = [\n 'line',\n 'bar',\n 'area',\n 'pie',\n 'donut',\n];\n\ntype SwitchableType = Exclude<ChartType, 'radialBar'>;\n\n/* Static key map (not template-built) so the i18n coverage tooling can see\n every key literally. */\nconst TYPE_SWITCHER_LABEL_KEYS: Record<SwitchableType, string> = {\n line: 'chart.typeSwitcher.line',\n bar: 'chart.typeSwitcher.bar',\n area: 'chart.typeSwitcher.area',\n pie: 'chart.typeSwitcher.pie',\n donut: 'chart.typeSwitcher.donut',\n};\n\nconst TYPE_SWITCHER_ICONS: Record<SwitchableType, React.ReactNode> = {\n line: <ChartLine />,\n bar: <ChartColumn />,\n area: <ChartArea />,\n pie: <ChartPie />,\n donut: <Donut />,\n};\n\n/* Compare-overlay geometry. Colours come only from tokens (via the bridge);\n these are pure numeric/dash literals, consistent with the pre-existing\n stroke width:2 / dashArray literals the component already used. */\nconst COMPARE_OUTLINE_WIDTH = 2; // dotted outline / stroke width (~1.5–2px)\nconst COMPARE_DOT_DASH = '0 6'; // 0-length dash + round cap ⇒ round dots, 6px pitch\n\n/**\n * Rewrite each COMPARE bar into a 3-sided OPEN path (drop the baseline edge and\n * the implicit close) and round-dot its outline. A bar is natively one closed\n * path, so \"open at the bottom\" is impossible via config — this post-render DOM\n * patch is the only way. Verified safe against ApexCharts 5.10.6: animation\n * continuity is read from a separate `pathTo`/`pathFrom` attribute, never the\n * live `d`, so overwriting `d` never corrupts entrance/update animation or\n * `previousPaths`; the same element is kept so tooltips/crosshair still bind.\n * Idempotent (re-running writes the same `d`).\n *\n * Only applied to VERTICAL, positive-valued bars: the open edge is assumed to be\n * the bbox bottom. A horizontal or negative compare bar keeps the native\n * 4-sided dotted outline (still a valid non-colour cue) — see the guard in the\n * component. jsdom lacks `getBBox`, so the per-path guard makes this a no-op in\n * unit tests (exercised in the real-browser story run instead).\n */\nfunction patchCompareBars(\n root: HTMLElement | null,\n compareRealIndexes: number[],\n): void {\n if (!root || compareRealIndexes.length === 0) return;\n root\n .querySelectorAll<SVGGElement>(\n '.apexcharts-bar-series > .apexcharts-series',\n )\n .forEach((g) => {\n const ri = Number(g.getAttribute('data:realIndex'));\n if (!compareRealIndexes.includes(ri)) return;\n g.querySelectorAll<SVGPathElement>('path.apexcharts-bar-area').forEach(\n (p) => {\n if (typeof p.getBBox !== 'function') return; // jsdom guard\n const b = p.getBBox(); // final rendered box, stroke-excluded\n // 3-sided OPEN path: bottom-left → up left → across top → down right.\n // SVG fills the implicit close (bottom-right → bottom-left), so the\n // tint fill stays full-height; the stroke omits the baseline edge.\n p.setAttribute(\n 'd',\n `M ${b.x} ${b.y + b.height} L ${b.x} ${b.y} ` +\n `L ${b.x + b.width} ${b.y} L ${b.x + b.width} ${b.y + b.height}`,\n );\n p.setAttribute('stroke-dasharray', COMPARE_DOT_DASH); // round-dot rhythm\n p.setAttribute('stroke-linecap', 'round');\n },\n );\n });\n}\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction isSliceType(type: ChartType): boolean {\n return SLICE_TYPES.includes(type);\n}\n\nfunction isCategoricalType(type: ChartType): boolean {\n return CATEGORICAL_TYPES.includes(type);\n}\n\n/** Coerce `series` into `ChartSeries[]` for shared logic (table, aria). */\nfunction normaliseSeries(\n series: ChartSeries[] | number[],\n type: ChartType,\n): ChartSeries[] {\n if (isSliceType(type)) {\n const nums = series as number[];\n return [\n {\n name: '',\n data: nums,\n },\n ];\n }\n return series as ChartSeries[];\n}\n\n/* ------------------------------------------------------------------ */\n/* Chart component */\n/* ------------------------------------------------------------------ */\n\nexport const Chart = forwardRef<ChartHandle, ChartProps>(\n (\n {\n title,\n id,\n type,\n series,\n categories,\n labels,\n height,\n width,\n patterns = false,\n stacked = false,\n orientation = 'vertical',\n curve = 'smooth',\n colors,\n toolbar = false,\n locale: localeProp,\n radialValueFormatter,\n valueFormatter,\n switchableTypes,\n onTypeChange,\n density,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const rawId = useId();\n const chartId = useMemo(\n () => `chart-${rawId.replace(/[^a-zA-Z0-9-_]/g, '')}`,\n [rawId],\n );\n const summaryId = `${chartId}-summary`;\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [containerWidth, setContainerWidth] = useState(0);\n\n /* ApexCharts injects focusable canvases inside the `aria-hidden` */\n /* chart wrapper. Neutralise their tabindex so axe's */\n /* `aria-hidden-focus` rule passes. Same hook used in Sparkline. */\n useNeutraliseHiddenFocus(wrapperRef);\n // A clipping parent (a Card) would cut off a tooltip Apex places\n // outside the chart.\n useKeepApexTooltipInside(wrapperRef);\n\n const locale = localeProp ?? i18n.language ?? 'en';\n\n /* ---- dev warning if title missing ------------------------------ */\n if (import.meta.env.DEV && !title) {\n console.warn(\n 'Chart: `title` prop is required. It drives aria-label and the screen-reader summary table.',\n );\n }\n\n /* ---- theme-reactive state -------------------------------------- */\n const [themeOptions, setThemeOptions] = useState<ApexChartsTheme>(() => {\n try {\n return getApexChartsTheme();\n } catch {\n return {};\n }\n });\n\n /* ---- MutationObserver: re-read theme on class change ------------ */\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n let timer: ReturnType<typeof setTimeout>;\n const observer = new MutationObserver(() => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n try {\n setThemeOptions(getApexChartsTheme());\n } catch {\n /* no-op in non-browser environments */\n }\n }, 50);\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class'],\n });\n return () => {\n clearTimeout(timer);\n observer.disconnect();\n };\n }, []);\n\n /* ---- ResizeObserver: track container width --------------------- */\n useEffect(() => {\n const el = wrapperRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return undefined;\n const ro = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry) setContainerWidth(Math.floor(entry.contentRect.width));\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, []);\n\n /* ---- type switcher ---------------------------------------------- */\n const switcherTypes = useMemo<SwitchableType[]>(() => {\n if (!switchableTypes || switchableTypes.length === 0) return [];\n const valid = switchableTypes.filter((entry): entry is SwitchableType =>\n SWITCHABLE_TYPES.includes(entry),\n );\n if (import.meta.env.DEV && valid.length !== switchableTypes.length) {\n console.warn(\n \"Chart: `switchableTypes` accepts 'line' | 'bar' | 'area' | 'pie' | 'donut' — other entries are ignored.\",\n );\n }\n if (!SWITCHABLE_TYPES.includes(type)) {\n if (import.meta.env.DEV && valid.length > 0) {\n console.warn(\n 'Chart: the type switcher is unavailable when `type` is \"radialBar\".',\n );\n }\n return [];\n }\n const withCurrent = valid.includes(type as SwitchableType)\n ? valid\n : [type as SwitchableType, ...valid];\n return [...new Set(withCurrent)];\n }, [switchableTypes, type]);\n const switcherEnabled = switcherTypes.length >= 2;\n\n const [pickedType, setPickedType] = useState<SwitchableType | null>(null);\n const effectiveType: ChartType =\n switcherEnabled && pickedType && switcherTypes.includes(pickedType)\n ? pickedType\n : type;\n\n /* ---- data adaptation for the switcher --------------------------- */\n /* Axis and slice types read different `series` shapes. When the user */\n /* switches across that boundary the data adapts: each axis series */\n /* becomes one slice (its total across the categories), and slice */\n /* values become one axis series with `labels` as the categories. */\n /* Same-shape switches (line/bar/area, pie/donut) pass through as-is. */\n const declaredIsSlice = isSliceType(type);\n const effectiveIsSlice = isSliceType(effectiveType);\n const { effectiveSeries, effectiveCategories, effectiveLabels } =\n useMemo(() => {\n if (declaredIsSlice === effectiveIsSlice) {\n return {\n effectiveSeries: series,\n effectiveCategories: categories,\n effectiveLabels: labels,\n };\n }\n if (!declaredIsSlice) {\n const allRows = series as ChartSeries[];\n // A previous-period total is not a slice of the current whole, so\n // compare overlays are dropped from the axis→slice collapse (their\n // grey \"prev\" slice would misread as part of the current mix). This\n // also makes compareFlags naturally [] on the slice side.\n const rows = allRows.filter((row) => row.role !== 'compare');\n if (import.meta.env.DEV && rows.length !== allRows.length) {\n console.warn(\n 'Chart: compare series are dropped on an axis→slice switch — a previous-period total is not a slice of the current whole.',\n );\n }\n const totals = rows.map((row) =>\n row.data.reduce((sum, v) => sum + v, 0),\n );\n if (import.meta.env.DEV && totals.some((v) => v < 0)) {\n console.warn(\n 'Chart: the axis→slice adaptation produced a negative series total — pie/donut cannot represent negative values. Offer only axis types in `switchableTypes` for delta-style data.',\n );\n }\n return {\n effectiveSeries: totals,\n effectiveCategories: undefined,\n effectiveLabels: rows.map((row) => row.name),\n };\n }\n const values = series as number[];\n return {\n effectiveSeries: [\n { name: t('chart.table.value'), data: values },\n ] as ChartSeries[],\n effectiveCategories: labels ?? [],\n effectiveLabels: undefined,\n };\n }, [series, categories, labels, declaredIsSlice, effectiveIsSlice, t]);\n\n /* ---- imperative handle ----------------------------------------- */\n const agentHandle = useMemo<ChartHandle>(\n () => ({\n async dataURI(): Promise<string> {\n const instance = ApexCharts.getChartByID(chartId);\n if (!instance) return '';\n const result = await instance.dataURI();\n return (result as { imgURI: string }).imgURI;\n },\n updateSeries(next) {\n const instance = ApexCharts.getChartByID(chartId);\n if (!instance) return;\n // Callers always pass the DECLARED type's shape. When the user has\n // switched the view across the axis/slice boundary, convert to what\n // the live instance actually renders (mirrors the render-time\n // adaptation) so the update never hits a mismatched instance.\n const declaredSlice = isSliceType(type);\n const renderedSlice = isSliceType(effectiveType);\n if (declaredSlice === renderedSlice) {\n if (declaredSlice) instance.updateSeries(next as number[]);\n else instance.updateSeries(next as ChartSeries[]);\n return;\n }\n if (!declaredSlice) {\n // Drop compare overlays from the collapse (mirrors the render-time\n // adaptation) so no stray \"prev\" slice appears.\n const rows = (next as ChartSeries[]).filter(\n (row) => row.role !== 'compare',\n );\n // Keep slice labels in step with the incoming series — without\n // this, a series-count or name change desyncs slices from the\n // labels captured at the last React render.\n instance.updateOptions(\n { labels: rows.map((row) => row.name) },\n false,\n true,\n );\n instance.updateSeries(\n rows.map((row) => row.data.reduce((sum, v) => sum + v, 0)),\n );\n return;\n }\n instance.updateSeries([\n { name: t('chart.table.value'), data: next as number[] },\n ]);\n },\n setType(next: ChartType): boolean {\n if (!switcherEnabled) return false;\n if (!switcherTypes.includes(next as SwitchableType)) return false;\n setPickedType(next as SwitchableType);\n return true;\n },\n getTypeState() {\n return {\n declaredType: type,\n effectiveType,\n availableTypes: switcherEnabled\n ? ([...switcherTypes] as ChartType[])\n : [],\n };\n },\n }),\n [chartId, type, effectiveType, t, switcherEnabled, switcherTypes],\n );\n useImperativeHandle(ref, () => agentHandle, [agentHandle]);\n useAgentRegistration(chartAgent, agentHandle, id);\n\n /* ---- RTL detection --------------------------------------------- */\n const isRtl =\n typeof document !== 'undefined' && document.documentElement.dir === 'rtl';\n\n /* ---- normalised series for sr-only table ----------------------- */\n const tableSeries = useMemo(\n () => normaliseSeries(effectiveSeries, effectiveType),\n [effectiveSeries, effectiveType],\n );\n\n /* ---- Intl formatter -------------------------------------------- */\n const numberFormatter = useMemo(\n () => new Intl.NumberFormat(locale),\n [locale],\n );\n\n /* ---- resolved value formatter ---------------------------------- */\n /* The consumer's `valueFormatter` (e.g. a currency formatter) wins */\n /* everywhere a data-point value is surfaced as text; otherwise we */\n /* fall back to the locale-aware grouped number. */\n const formatValue = useMemo(\n () =>\n valueFormatter ?? ((value: number) => numberFormatter.format(value)),\n [valueFormatter, numberFormatter],\n );\n\n /* ---- toolbar localisation -------------------------------------- */\n const toolbarLocale = useMemo(\n () => ({\n name: locale,\n options: {\n toolbar: {\n download: t('chart.toolbar.download'),\n selection: t('chart.toolbar.selection'),\n selectionZoom: t('chart.toolbar.selectionZoom'),\n zoomIn: t('chart.toolbar.zoomIn'),\n zoomOut: t('chart.toolbar.zoomOut'),\n pan: t('chart.toolbar.pan'),\n reset: t('chart.toolbar.reset'),\n exportToSVG: t('chart.toolbar.exportToSVG'),\n exportToPNG: t('chart.toolbar.exportToPNG'),\n exportToCSV: t('chart.toolbar.exportToCSV'),\n },\n },\n }),\n [locale, t],\n );\n\n /* ---- build ApexOptions ----------------------------------------- */\n const reducedMotion = usePrefersReducedMotion();\n\n const chartOptions: ApexCharts.ApexOptions = useMemo(() => {\n // Split the resolved compare colours off the theme object BEFORE spread:\n // `base` is exactly today's theme shape (colours / chart / grid), so\n // `...base` emits the same keys as before. The theme no longer carries a\n // `compare` object — the redesign never uses grey; the compare fill is a\n // tint of the paired-primary hue, resolved below from a token.\n const base = themeOptions;\n\n // Per-series compare flags, derived at build time from the EFFECTIVE\n // series/type so the type switcher composes: only axis types carry the\n // `role` field (slice `series` is `number[]`), so a slice view yields [].\n const compareFlags =\n isCategoricalType(effectiveType) && Array.isArray(effectiveSeries)\n ? (effectiveSeries as ChartSeries[]).map((s) => s.role === 'compare')\n : [];\n const hasCompare = compareFlags.some(Boolean);\n const barCompare = hasCompare && effectiveType === 'bar';\n // The open-at-the-baseline bar rewrite (patchCompareBars) assumes the\n // baseline is the bbox BOTTOM — true only for vertical, non-negative bars.\n // A horizontal or negative compare bar keeps the native 4-sided dotted\n // outline (still a valid non-colour cue), so the hook is gated off for it.\n const compareHasNegative =\n barCompare &&\n (effectiveSeries as ChartSeries[]).some(\n (s) => s.role === 'compare' && s.data.some((v) => v < 0),\n );\n const openBottomBars =\n barCompare && orientation === 'vertical' && !compareHasNegative;\n // Compare fill opacity + per-series tints (legend swatch), resolved from\n // the token via the bridge so no hex literal lives in component code.\n const compareFillOpacity = hasCompare ? getCompareFillOpacity() : 0.3;\n\n if (\n import.meta.env.DEV &&\n hasCompare &&\n stacked &&\n isCategoricalType(effectiveType)\n ) {\n console.warn(\n 'Chart: `stacked` with a compare series — a compare overlay is normally a grouped, not stacked, series. It will be stacked with the primaries.',\n );\n }\n\n const options: ApexCharts.ApexOptions = {\n ...base,\n chart: {\n ...base.chart,\n id: chartId,\n toolbar: { show: toolbar },\n zoom: { enabled: toolbar },\n animations: {\n enabled: !reducedMotion,\n dynamicAnimation: { enabled: !reducedMotion },\n },\n locales: [toolbarLocale],\n defaultLocale: locale,\n parentHeightOffset: 0,\n // Stacking is an axis-only concept — gate on the categorical types\n // so a slice/radial chart never receives it, and omit the key\n // entirely when unstacked so the default output is byte-identical.\n ...(stacked && isCategoricalType(effectiveType)\n ? { stacked: true }\n : {}),\n },\n // Only set `labels` when the effective type actually has them (slice\n // charts). Emitting `labels: undefined` crashes ApexCharts' bar\n // renderer — `parseDataAxisCharts` reads `labels.length` and throws\n // \"Cannot read properties of undefined (reading 'length')\", which\n // aborts the render and leaves a blank chart. Absent is safe; area /\n // line tolerate the undefined but bar does not, so never pass it.\n ...(effectiveLabels ? { labels: effectiveLabels } : {}),\n legend: {\n ...base.legend,\n position: 'bottom',\n // ApexCharts legend.horizontalAlign is a physical prop mapped internally\n // to the chart's own text flow. For RTL we flip via `yaxis.opposite`\n // and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored\n // to the inline-start by asking for 'left' on LTR and 'right' on RTL.\n horizontalAlign: isRtl ? 'right' : 'left',\n fontFamily: 'inherit',\n },\n tooltip: {\n ...base.tooltip,\n y: {\n formatter: (value: number) => formatValue(value),\n },\n },\n noData: {\n text: t('chart.noData'),\n },\n };\n\n // Consumer-supplied, already-resolved colour ramp wins over the theme\n // bridge's `colors`. Ignored when absent so existing charts keep the\n // tokenised ramp. ApexCharts can't read `var(--…)`, so the consumer is\n // responsible for sampling the live token value before passing it in.\n if (colors && colors.length > 0) {\n options.colors = colors;\n }\n\n // Step 1 (compare) — pair each compare series with a primary and inherit\n // its colour. The k-th `role:'compare'` pairs with the k-th `role:'primary'`\n // by order (clamped to the last primary; falls back to its own index when\n // there are zero primaries). Primaries keep ApexCharts' own %-cycled ramp\n // colour, so after this `options.colors[i]` is the full paired-primary\n // colour for EVERY series — used directly by the bar fill/outline and the\n // line stroke. The compare fill is tinted separately (fill.opacity); only\n // the LEGEND swatch shows the lighter tint (legend.markers.fillColors).\n if (hasCompare) {\n const ramp = (options.colors ?? base.colors ?? []) as string[];\n const rampAt = (i: number) => ramp[i % Math.max(ramp.length, 1)];\n const primaryIdx = (effectiveSeries as ChartSeries[])\n .map((s, i) => (s.role === 'compare' ? -1 : i))\n .filter((i) => i >= 0);\n let seen = 0;\n options.colors = (effectiveSeries as ChartSeries[]).map((s, i) => {\n if (s.role !== 'compare') return rampAt(i);\n const pair = primaryIdx.length\n ? primaryIdx[Math.min(seen++, primaryIdx.length - 1)]\n : i;\n return rampAt(pair); // inherit the paired primary's colour\n });\n // Legend swatch: compare shows the lighter tint (a shade of its paired\n // primary), primaries show their own colour. Decoupled from the mark\n // colour so the swatch reads as \"lighter = compare\".\n const compareTints = (options.colors as string[]).map((c, i) =>\n compareFlags[i] ? resolveCompareTint(c) : c,\n );\n options.legend = {\n ...options.legend,\n markers: {\n ...(options.legend?.markers ?? {}),\n fillColors: compareTints,\n },\n };\n }\n\n if (isCategoricalType(effectiveType)) {\n // A horizontal bar makes ApexCharts swap axes: the numeric axis\n // becomes the x-axis and the categories move to the y-axis. The value\n // formatter must follow the numbers, so on a horizontal bar it lives\n // on `xaxis.labels` and the category y-axis keeps its default (string)\n // labels; every other categorical chart keeps the formatter on `yaxis`.\n const horizontalBar =\n effectiveType === 'bar' && orientation === 'horizontal';\n options.xaxis = {\n ...base.xaxis,\n categories: effectiveCategories ?? [],\n ...(horizontalBar\n ? {\n labels: {\n formatter: (value: string | number) =>\n formatValue(Number(value)),\n },\n }\n : {}),\n };\n options.yaxis = {\n ...base.yaxis,\n opposite: isRtl,\n ...(horizontalBar\n ? {}\n : { labels: { formatter: (value: number) => formatValue(value) } }),\n };\n // Step 2 (compare) — the non-colour cue is a round-DOTTED stroke on the\n // compare indices (dotted-vs-solid, greyscale/print-safe). It works on\n // bars too: unlike a fill hatch, a per-series bar stroke width + dash\n // renders a dotted OUTLINE in the paired-primary colour. Line/area keep\n // width 2; a bar's outline width is COMPARE_OUTLINE_WIDTH on compare\n // indices and 0 on primaries (solid, fill-only). `lineCap:'round'` turns\n // the 0-length dash into round dots. When there is no compare series the\n // stroke is byte-identical to before (no lineCap / dashArray key).\n options.stroke = {\n curve,\n width:\n effectiveType === 'bar'\n ? hasCompare\n ? compareFlags.map((c) => (c ? COMPARE_OUTLINE_WIDTH : 0))\n : 0\n : 2,\n ...(hasCompare\n ? {\n lineCap: 'round' as const,\n // Runtime accepts a string dash; the published types say\n // `number` → one documented cast. `'0 6'` + round cap ⇒ dots.\n dashArray: compareFlags.map((c) =>\n c ? COMPARE_DOT_DASH : 0,\n ) as unknown as number[],\n }\n : {}),\n };\n options.dataLabels = { enabled: false };\n }\n\n if (effectiveType === 'radialBar' && radialValueFormatter) {\n // ApexCharts treats a radialBar series value as a 0–100 percent and\n // renders it verbatim in the ring centre. When the displayed value is\n // NOT a percentage (e.g. a BMI), the consumer scales the series to a\n // percent for the arc and supplies `radialValueFormatter` to print the\n // real value in the centre. Without this, the gauge would read \"56%\"\n // for a BMI of 22.4 — misleading. Default behaviour is untouched.\n const basePlot = (base.plotOptions ?? {}) as NonNullable<\n ApexCharts.ApexOptions['plotOptions']\n >;\n options.plotOptions = {\n ...basePlot,\n radialBar: {\n ...(basePlot.radialBar ?? {}),\n dataLabels: {\n ...(basePlot.radialBar?.dataLabels ?? {}),\n value: {\n ...(basePlot.radialBar?.dataLabels?.value ?? {}),\n formatter: (val: number) => radialValueFormatter(Number(val)),\n },\n },\n },\n };\n }\n\n // Horizontal bars for rankings. `bar` and `radialBar` are mutually\n // exclusive effective types, so this never collides with the radialBar\n // plotOptions above. Absent (vertical) = the ApexCharts default, so the\n // key is only emitted when the consumer opts in.\n if (effectiveType === 'bar' && orientation === 'horizontal') {\n const basePlot = (base.plotOptions ?? {}) as NonNullable<\n ApexCharts.ApexOptions['plotOptions']\n >;\n options.plotOptions = {\n ...basePlot,\n bar: { ...(basePlot.bar ?? {}), horizontal: true },\n };\n }\n\n // Step 3 (fill) — the compare branches sit between the global `patterns`\n // branch and the area-gradient branch. Each is gated on hasCompare /\n // barCompare, so a chart with no compare series follows today's exact\n // paths and emits byte-identical fill.\n if (patterns) {\n // Colour-blind pattern mode. With a compare overlay the compare indices\n // drop the hatch and use a plain tinted solid fill (their dotted outline\n // / stroke from Step 2 is already the non-colour cue), so they read as a\n // lighter ghost of the primary; the primaries keep the cycled hatch.\n options.fill = {\n type: hasCompare\n ? compareFlags.map((c) => (c ? 'solid' : 'pattern'))\n : 'pattern',\n opacity: hasCompare\n ? compareFlags.map((c) =>\n c ? compareFillOpacity : effectiveType === 'area' ? 0.3 : 1,\n )\n : effectiveType === 'area'\n ? 0.3\n : 1,\n pattern: {\n style: [...PATTERN_STYLES],\n strokeWidth: 2,\n },\n };\n } else if (barCompare) {\n // Tinted solid fill: compare bars are their paired-primary hue at\n // `--chart-compare-fill-opacity`; primaries stay solid at full opacity.\n // The dotted outline (Step 2 stroke width) + open-bottom rewrite\n // (patchCompareBars, wired via chart.events below) supply the shape.\n options.fill = {\n type: 'solid',\n opacity: compareFlags.map((c) => (c ? compareFillOpacity : 1)),\n };\n } else if (effectiveType === 'area') {\n // Area gradient. With a compare overlay the compare fill drops to the\n // tint opacity so it sits under the dotted paired-primary stroke without\n // fighting the primary; primaries keep the default gradient. No grey —\n // the tint is a shade of the same (paired-primary) hue from Step 1.\n options.fill = hasCompare\n ? {\n type: 'gradient',\n opacity: compareFlags.map((c) => (c ? compareFillOpacity : 0.3)),\n }\n : {\n type: 'gradient',\n opacity: 0.3,\n };\n }\n\n // Open-at-the-baseline bar outline (progressive enhancement over the\n // native dotted 4-sided border). Attached ONLY for vertical, non-negative\n // compare bars; horizontal / negative bars keep the closed dotted outline.\n // Added inside this branch so a chart without open-bottom bars never gets\n // an `events` key (byte-identical). Re-fires on mount / update / animation\n // end — jointly covering mount, resize, theme change, and series updates.\n if (openBottomBars) {\n const compareRealIndexes = compareFlags\n .map((c, i) => (c ? i : -1))\n .filter((i) => i >= 0);\n const run = () =>\n patchCompareBars(wrapperRef.current, compareRealIndexes);\n const raf = () =>\n typeof requestAnimationFrame === 'function'\n ? requestAnimationFrame(run)\n : run();\n options.chart = {\n ...options.chart,\n events: {\n ...(options.chart?.events ?? {}),\n mounted: () => raf(),\n updated: () => raf(),\n animationEnd: () => run(),\n },\n };\n }\n\n return options;\n }, [\n themeOptions,\n chartId,\n toolbar,\n reducedMotion,\n toolbarLocale,\n locale,\n effectiveLabels,\n formatValue,\n t,\n effectiveType,\n effectiveSeries,\n effectiveCategories,\n isRtl,\n patterns,\n stacked,\n orientation,\n curve,\n colors,\n radialValueFormatter,\n ]);\n\n /* ---- resolved dimensions --------------------------------------- */\n const resolvedWidth =\n width ?? (containerWidth > 0 ? containerWidth : '100%');\n const resolvedHeight = height ?? 320;\n\n /* ---- sr-only data table --------------------------------------- */\n const srTable = useMemo(() => {\n const columnLabels = isSliceType(effectiveType)\n ? (effectiveLabels ?? [])\n : (effectiveCategories ?? []);\n const rows = tableSeries;\n return (\n <table id={summaryId} className=\"ds:sr-only\">\n <caption>{title}</caption>\n <thead>\n <tr>\n <th scope=\"col\">{t('chart.table.series')}</th>\n {columnLabels.map((col, i) => (\n <th key={`${col}-${i}`} scope=\"col\">\n {col}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, rowIndex) => (\n <tr key={`${row.name}-${rowIndex}`}>\n <th scope=\"row\">{row.name || t('chart.table.value')}</th>\n {row.data.map((value, colIndex) => (\n <td key={`${rowIndex}-${colIndex}`}>\n {/* For a radialBar gauge the series is a synthetic arc\n percent — announce the consumer's display value (e.g.\n the real BMI) instead of the raw fill so AT users get\n the same figure sighted users see in the ring. */}\n {effectiveType === 'radialBar' && radialValueFormatter\n ? radialValueFormatter(value)\n : formatValue(value)}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n }, [\n effectiveType,\n tableSeries,\n effectiveLabels,\n effectiveCategories,\n summaryId,\n title,\n t,\n formatValue,\n radialValueFormatter,\n ]);\n\n /* ---- ApexCharts `series` prop shape ----------------------------- */\n const apexSeries = useMemo(() => {\n if (isSliceType(effectiveType)) {\n return effectiveSeries as number[];\n }\n return effectiveSeries as ChartSeries[];\n }, [effectiveSeries, effectiveType]);\n\n /* `key={effectiveType}` remounts ApexCharts on a switch: its in-place\n axis↔slice type transitions are unreliable (stale internal scales),\n and a clean mount is the documented-safe path. */\n const chartRegion = (\n <div\n ref={wrapperRef}\n role=\"img\"\n aria-label={title}\n aria-describedby={summaryId}\n className={chartVariants({\n // Explicit height wins over the density min-height unless the\n // caller also asked for a density explicitly.\n density: density ?? (height !== undefined ? 'none' : undefined),\n className: switcherEnabled ? undefined : className,\n })}\n {...(switcherEnabled\n ? {}\n : { 'data-component': 'chart', 'data-component-id': id })}\n >\n {srTable}\n <ReactApexChart\n key={effectiveType}\n type={effectiveType}\n series={apexSeries as ApexCharts.ApexOptions['series']}\n options={chartOptions}\n width={resolvedWidth}\n height={resolvedHeight}\n aria-hidden=\"true\"\n />\n </div>\n );\n\n if (!switcherEnabled) return chartRegion;\n\n /* The switcher cannot live inside the `role=\"img\"` region — that role\n makes the whole subtree presentational, which would strip the radios\n from the accessibility tree. It renders as a sibling above the plot,\n and the bounding `data-component` marker moves to this shared\n wrapper so the component boundary still encloses everything. */\n return (\n <div\n data-component=\"chart\"\n data-component-id={id}\n className={`ds:block ds:w-full ${className ?? ''}`.trim()}\n >\n <div className=\"ds:mb-[var(--spacing-xs)] ds:flex ds:justify-end\">\n <IconButtonGroup\n role=\"radiogroup\"\n mode=\"toggle-single\"\n size=\"sm\"\n aria-label={t('chart.typeSwitcher.label')}\n value={effectiveType}\n onValueChange={(next) => {\n // Guard: keyboard paths can re-commit the current value; the\n // contract is \"called when the user picks a DIFFERENT type\".\n if (next === effectiveType) return;\n setPickedType(next as SwitchableType);\n onTypeChange?.(next as ChartType);\n }}\n >\n {switcherTypes.map((entry) => (\n <IconButton\n key={entry}\n value={entry}\n // Explicit — the default (submit) would post a surrounding\n // consumer <form> on click/Space.\n type=\"button\"\n icon={TYPE_SWITCHER_ICONS[entry]}\n aria-label={t(TYPE_SWITCHER_LABEL_KEYS[entry])}\n />\n ))}\n </IconButtonGroup>\n </div>\n {chartRegion}\n </div>\n );\n },\n);\n\nChart.displayName = 'Chart';\n\n/* ------------------------------------------------------------------ */\n/* Re-export internal helper for downstream theming (kept narrow). */\n/* ------------------------------------------------------------------ */\n\nexport { chartVariants };\n"],"names":["__iconNode","ChartArea","createLucideIcon","ChartColumn","ChartLine","ChartPie","Donut","chartAgent","handle","args","chartVariants","cva","PATTERN_STYLES","CATEGORICAL_TYPES","SLICE_TYPES","SWITCHABLE_TYPES","TYPE_SWITCHER_LABEL_KEYS","TYPE_SWITCHER_ICONS","COMPARE_OUTLINE_WIDTH","COMPARE_DOT_DASH","patchCompareBars","root","compareRealIndexes","g","ri","p","b","isSliceType","type","isCategoricalType","normaliseSeries","series","Chart","forwardRef","title","id","categories","labels","height","width","patterns","stacked","orientation","curve","colors","toolbar","localeProp","radialValueFormatter","valueFormatter","switchableTypes","onTypeChange","density","className","ref","t","i18n","useTranslation","rawId","useId","chartId","useMemo","summaryId","wrapperRef","useRef","containerWidth","setContainerWidth","useState","useNeutraliseHiddenFocus","useKeepApexTooltipInside","locale","themeOptions","setThemeOptions","getApexChartsTheme","useEffect","timer","observer","el","ro","entries","entry","switcherTypes","valid","withCurrent","switcherEnabled","pickedType","setPickedType","effectiveType","declaredIsSlice","effectiveIsSlice","effectiveSeries","effectiveCategories","effectiveLabels","rows","row","sum","v","values","agentHandle","instance","ApexCharts","next","declaredSlice","renderedSlice","useImperativeHandle","useAgentRegistration","isRtl","tableSeries","numberFormatter","formatValue","value","toolbarLocale","reducedMotion","usePrefersReducedMotion","chartOptions","base","compareFlags","s","hasCompare","barCompare","compareHasNegative","openBottomBars","compareFillOpacity","getCompareFillOpacity","options","ramp","rampAt","i","primaryIdx","seen","pair","compareTints","c","resolveCompareTint","_a","horizontalBar","basePlot","_b","_d","_c","val","run","raf","_e","resolvedWidth","resolvedHeight","srTable","columnLabels","jsx","jsxs","col","rowIndex","colIndex","apexSeries","chartRegion","ReactApexChart","IconButtonGroup","IconButton"],"mappings":";;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,4BAA4B,KAAK,SAAQ,CAAE;AAAA,EACzD;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AACA,GACMC,KAAYC,EAAiB,cAAcF,EAAU;ACnB3D;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,4BAA4B,KAAK,SAAQ,CAAE;AAAA,EACzD,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAC3C,GACMG,KAAcD,EAAiB,gBAAgBF,EAAU;ACf/D;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,4BAA4B,KAAK,SAAQ,CAAE;AAAA,EACzD,CAAC,QAAQ,EAAE,GAAG,qBAAqB,KAAK,SAAQ,CAAE;AACpD,GACMI,KAAYF,EAAiB,cAAcF,EAAU;ACb3D;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB;AAAA,I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,QACf,qBAAmBjH;AAAA,QACnB,WAAW,sBAAsBiB,MAAa,EAAE,GAAG,KAAA;AAAA,QAEnD,UAAA;AAAA,UAAA,gBAAA+F,EAAC,OAAA,EAAI,WAAU,oDACb,UAAA,gBAAAA;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAK;AAAA,cACL,MAAK;AAAA,cACL,cAAYrG,EAAE,0BAA0B;AAAA,cACxC,OAAOgC;AAAA,cACP,eAAe,CAACc,MAAS;AAGvB,gBAAIA,MAASd,MACbD,GAAce,CAAsB,GACpClD,KAAA,QAAAA,EAAekD;AAAA,cACjB;AAAA,cAEC,UAAApB,EAAc,IAAI,CAACD,MAClB,gBAAAoE;AAAA,gBAACS;AAAA,gBAAA;AAAA,kBAEC,OAAO7E;AAAA,kBAGP,MAAK;AAAA,kBACL,MAAM9D,GAAoB8D,CAAK;AAAA,kBAC/B,cAAYzB,EAAEtC,GAAyB+D,CAAK,CAAC;AAAA,gBAAA;AAAA,gBANxCA;AAAA,cAAA,CAQR;AAAA,YAAA;AAAA,UAAA,GAEL;AAAA,UACC0E;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,IAzCwBA;AAAA,EA4C/B;AACF;AAEAzH,GAAM,cAAc;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker-BRQ4Y9SO.js","sources":["../../src/components/color-picker/color-picker.agent.ts","../../src/components/color-picker/color-utils.ts","../../src/components/color-picker/palettes.ts","../../src/components/color-picker/color-picker.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — ColorPicker. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { ColorPickerHandle } from './color-picker';\n\nexport const colorPickerAgent: AgentAdapter<ColorPickerHandle> = {\n id: 'color-picker',\n capabilities: ['set_value'],\n state: {\n value: {\n type: 'string',\n descriptionKey: 'ui.agent.colorPicker.state.value',\n description: 'Currently picked colour as a hex string (e.g. \"#3b82f6\").',\n read: (handle) => handle.getValue(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ hex: string }',\n argsSchema: {\n type: 'object',\n properties: {\n hex: {\n type: 'string',\n description: 'Hex colour string, e.g. \"#3b82f6\".',\n },\n },\n required: ['hex'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.colorPicker.actions.setValue',\n description: 'Set the picked colour from a hex string.',\n examples: [{ args: { hex: '#3b82f6' }, note: 'Set to brand blue.' }],\n invoke: (handle, args: { hex: string }) => {\n handle.setValue(args.hex);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'color-picker',\n description:\n 'Marks the ColorPicker wrapper (inline) or trigger (popover variant).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/**\n * Pure colour-conversion utilities for the ColorPicker component.\n *\n * This is the ONLY file where hex/rgb literals are permitted (for conversion\n * math). The component file (`color-picker.tsx`) must not contain hex/rgb\n * literals — it references `var(--…)` tokens for its own UI.\n */\n\nexport interface HSLA {\n h: number; // 0–360\n s: number; // 0–100\n l: number; // 0–100\n a: number; // 0–1\n}\n\n/* ------------------------------------------------------------------ */\n/* Hex ↔ HSL */\n/* ------------------------------------------------------------------ */\n\n/** Parse a hex string (#rgb, #rrggbb, #rrggbbaa) into HSLA. */\nexport function hexToHsl(hex: string): HSLA {\n let h = hex.startsWith('#') ? hex.slice(1) : hex;\n\n // Expand shorthand (#rgb → #rrggbb, #rgba → #rrggbbaa)\n if (h.length === 3 || h.length === 4) {\n h = h\n .split('')\n .map((c) => c + c)\n .join('');\n }\n\n const r = parseInt(h.slice(0, 2), 16) / 255;\n const g = parseInt(h.slice(2, 4), 16) / 255;\n const b = parseInt(h.slice(4, 6), 16) / 255;\n const a = h.length === 8 ? parseInt(h.slice(6, 8), 16) / 255 : 1;\n\n return rgbToHsl(r, g, b, a);\n}\n\n/** Convert normalised RGB (0–1) + alpha to HSLA. */\nfunction rgbToHsl(r: number, g: number, b: number, a: number): HSLA {\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n let hue = 0;\n let sat = 0;\n\n if (max !== min) {\n const d = max - min;\n sat = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n if (max === r) {\n hue = ((g - b) / d + (g < b ? 6 : 0)) / 6;\n } else if (max === g) {\n hue = ((b - r) / d + 2) / 6;\n } else {\n hue = ((r - g) / d + 4) / 6;\n }\n }\n\n return {\n // Preserve byte identity through RGB -> HSL -> RGB. Palette colours\n // can be server identifiers, so even one changed channel is a different\n // selection. Round human-facing labels only, never this stored value.\n h: hue * 360,\n s: sat * 100,\n l: l * 100,\n a,\n };\n}\n\n/** Convert HSLA to a hex string (#rrggbb or #rrggbbaa when a < 1). */\nexport function hslToHex(hsl: HSLA): string {\n const { r, g, b } = hslToRgbComponents(hsl);\n const toHex = (n: number) =>\n Math.round(n * 255)\n .toString(16)\n .padStart(2, '0');\n\n const base = `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n if (hsl.a < 1) {\n return `${base}${toHex(hsl.a)}`;\n }\n return base;\n}\n\n/** Convert HSLA to an rgba() string. */\nexport function hslToRgba(hsl: HSLA): string {\n const { r, g, b } = hslToRgbComponents(hsl);\n const ri = Math.round(r * 255);\n const gi = Math.round(g * 255);\n const bi = Math.round(b * 255);\n\n if (hsl.a < 1) {\n return `rgba(${ri}, ${gi}, ${bi}, ${hsl.a})`;\n }\n return `rgba(${ri}, ${gi}, ${bi}, 1)`;\n}\n\n/** Internal: convert HSLA to normalised RGB components (0–1). */\nfunction hslToRgbComponents(hsl: HSLA): {\n r: number;\n g: number;\n b: number;\n} {\n const h = hsl.h / 360;\n const s = hsl.s / 100;\n const l = hsl.l / 100;\n\n if (s === 0) {\n return { r: l, g: l, b: l };\n }\n\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n\n return {\n r: hueToRgb(p, q, h + 1 / 3),\n g: hueToRgb(p, q, h),\n b: hueToRgb(p, q, h - 1 / 3),\n };\n}\n\nfunction hueToRgb(p: number, q: number, t: number): number {\n let tt = t;\n if (tt < 0) tt += 1;\n if (tt > 1) tt -= 1;\n if (tt < 1 / 6) return p + (q - p) * 6 * tt;\n if (tt < 1 / 2) return q;\n if (tt < 2 / 3) return p + (q - p) * (2 / 3 - tt) * 6;\n return p;\n}\n\n/* ------------------------------------------------------------------ */\n/* Format / Parse */\n/* ------------------------------------------------------------------ */\n\n/** Format an HSLA value to the specified output format. */\nexport function formatOutput(\n hsl: HSLA,\n format: 'hex' | 'hsl' | 'rgba',\n): string {\n switch (format) {\n case 'hex':\n return hslToHex(hsl);\n case 'hsl':\n if (hsl.a < 1) {\n return `hsla(${Math.round(hsl.h)}, ${Math.round(hsl.s)}%, ${Math.round(hsl.l)}%, ${hsl.a})`;\n }\n return `hsl(${Math.round(hsl.h)}, ${Math.round(hsl.s)}%, ${Math.round(hsl.l)}%)`;\n case 'rgba':\n return hslToRgba(hsl);\n }\n}\n\n/** Parse any supported colour string into HSLA. Returns null on failure. */\nexport function parseInput(value: string): HSLA | null {\n const trimmed = value.trim();\n if (!trimmed) return null;\n\n // Hex: #rgb, #rrggbb, #rrggbbaa\n if (trimmed.startsWith('#')) {\n const body = trimmed.slice(1);\n if (!/^[0-9a-fA-F]{3,8}$/.test(body)) return null;\n if (![3, 4, 6, 8].includes(body.length)) return null;\n return hexToHsl(trimmed);\n }\n\n // hsla(h, s%, l%, a) or hsl(h, s%, l%)\n const hslaMatch = trimmed.match(\n /^hsla?\\(\\s*([\\d.]+)\\s*[,/]\\s*([\\d.]+)%?\\s*[,/]\\s*([\\d.]+)%?\\s*(?:[,/]\\s*([\\d.]+))?\\s*\\)$/,\n );\n if (hslaMatch) {\n return {\n h: Math.round(parseFloat(hslaMatch[1])) % 360,\n s: Math.round(parseFloat(hslaMatch[2])),\n l: Math.round(parseFloat(hslaMatch[3])),\n a: hslaMatch[4] !== undefined ? parseFloat(hslaMatch[4]) : 1,\n };\n }\n\n // rgba(r, g, b, a) or rgb(r, g, b)\n const rgbaMatch = trimmed.match(\n /^rgba?\\(\\s*([\\d.]+)\\s*[,/]\\s*([\\d.]+)\\s*[,/]\\s*([\\d.]+)\\s*(?:[,/]\\s*([\\d.]+))?\\s*\\)$/,\n );\n if (rgbaMatch) {\n const r = parseFloat(rgbaMatch[1]) / 255;\n const g = parseFloat(rgbaMatch[2]) / 255;\n const b = parseFloat(rgbaMatch[3]) / 255;\n const a = rgbaMatch[4] !== undefined ? parseFloat(rgbaMatch[4]) : 1;\n return rgbToHsl(r, g, b, a);\n }\n\n return null;\n}\n\n/* ------------------------------------------------------------------ */\n/* Contrast — WCAG 2.x relative luminance */\n/* ------------------------------------------------------------------ */\n\n/** Relative luminance per WCAG 2.x (0 = black, 1 = white). */\nexport function relativeLuminance(hsl: HSLA): number {\n const { r, g, b } = hslToRgbComponents(hsl);\n const linearise = (c: number) =>\n c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);\n return 0.2126 * linearise(r) + 0.7152 * linearise(g) + 0.0722 * linearise(b);\n}\n\n/** WCAG 2.x contrast ratio between two colours. */\nexport function contrastRatio(fg: HSLA, bg: HSLA): number {\n const lum1 = relativeLuminance(fg);\n const lum2 = relativeLuminance(bg);\n const lighter = Math.max(lum1, lum2);\n const darker = Math.min(lum1, lum2);\n return Math.round(((lighter + 0.05) / (darker + 0.05)) * 100) / 100;\n}\n\n/** Meets WCAG AA for normal text (≥ 4.5:1). */\nexport function meetsAA(ratio: number): boolean {\n return ratio >= 4.5;\n}\n\n/** Meets WCAG AAA for normal text (≥ 7:1). */\nexport function meetsAAA(ratio: number): boolean {\n return ratio >= 7;\n}\n","export interface PaletteSwatch {\n name: string;\n hex: string;\n /** Recommended text colour for contrast. */\n textColor?: '#000000' | '#ffffff';\n}\n\n/**\n * Material Design appointment colours — mirrors the platform's `DoctorColor`\n * entity. Pink 500 is first because it's the default appointment colour;\n * remaining dark (white-text) colours follow alphabetically, then light\n * (black-text) colours alphabetically.\n */\nexport const APPOINTMENT_PALETTE: PaletteSwatch[] = [\n { name: 'Pink 500', hex: '#e91e63', textColor: '#ffffff' },\n { name: 'Black', hex: '#000000', textColor: '#ffffff' },\n { name: 'Blue 500', hex: '#2196f3', textColor: '#ffffff' },\n { name: 'Blue 900', hex: '#0d47a1', textColor: '#ffffff' },\n { name: 'Blue Grey 500', hex: '#607d8b', textColor: '#ffffff' },\n { name: 'Blue Grey 800', hex: '#37474f', textColor: '#ffffff' },\n { name: 'Brown 500', hex: '#795548', textColor: '#ffffff' },\n { name: 'Deep Orange 500', hex: '#ff5722', textColor: '#ffffff' },\n { name: 'Deep Purple 500', hex: '#673ab7', textColor: '#ffffff' },\n { name: 'Green 500', hex: '#4caf50', textColor: '#ffffff' },\n { name: 'Green 900', hex: '#1b5e20', textColor: '#ffffff' },\n { name: 'Indigo 500', hex: '#3f51b5', textColor: '#ffffff' },\n { name: 'Indigo 900', hex: '#1a237e', textColor: '#ffffff' },\n { name: 'Pink 900', hex: '#880e4f', textColor: '#ffffff' },\n { name: 'Purple 500', hex: '#9c27b0', textColor: '#ffffff' },\n { name: 'Purple 900', hex: '#4a148c', textColor: '#ffffff' },\n { name: 'Red 500', hex: '#f44336', textColor: '#ffffff' },\n { name: 'Red 900', hex: '#b71c1c', textColor: '#ffffff' },\n { name: 'Teal 500', hex: '#009688', textColor: '#ffffff' },\n { name: 'Teal 900', hex: '#004d40', textColor: '#ffffff' },\n { name: 'Amber 500', hex: '#ffc107', textColor: '#000000' },\n { name: 'Cyan 500', hex: '#00bcd4', textColor: '#000000' },\n { name: 'Grey 500', hex: '#9e9e9e', textColor: '#000000' },\n { name: 'Light Blue 500', hex: '#03a9f4', textColor: '#000000' },\n { name: 'Light Green 500', hex: '#8bc34a', textColor: '#000000' },\n { name: 'Lime 500', hex: '#cddc39', textColor: '#000000' },\n { name: 'Orange 500', hex: '#ff9800', textColor: '#000000' },\n { name: 'Orange 900', hex: '#e65100', textColor: '#000000' },\n { name: 'White', hex: '#ffffff', textColor: '#000000' },\n { name: 'Yellow 500', hex: '#ffeb3b', textColor: '#000000' },\n];\n\n/** Alfadocs brand palette — the six brand families × 3 shades (300/500/700). */\nexport const BRAND_PALETTE: PaletteSwatch[] = [\n { name: 'Blue 300', hex: '#70738c' },\n { name: 'Blue 500', hex: '#292e53' },\n { name: 'Blue 700', hex: '#1d213b' },\n { name: 'Violet 300', hex: '#9995ee' },\n { name: 'Violet 500', hex: '#6761e5' },\n { name: 'Violet 700', hex: '#4945a3' },\n { name: 'Purple 300', hex: '#ccaafa' },\n { name: 'Purple 500', hex: '#b380f8' },\n { name: 'Purple 700', hex: '#7f5bb0' },\n { name: 'Magenta 300', hex: '#ea7ffc' },\n { name: 'Magenta 500', hex: '#e040fb' },\n { name: 'Magenta 700', hex: '#9f2db2' },\n { name: 'Fuchsia 300', hex: '#fa76fc' },\n { name: 'Fuchsia 500', hex: '#f732fb' },\n { name: 'Fuchsia 700', hex: '#af24b2' },\n { name: 'Grey 300', hex: '#f9f6f3' },\n { name: 'Grey 500', hex: '#f6f1ed' },\n { name: 'Grey 700', hex: '#afaba8' },\n];\n\n/**\n * Google Calendar event colours — the platform's DEFAULT appointment\n * palette (practice DoctorColor sets mirror Google Calendar so synced\n * events keep their colours; the event `colorId` set is capped at 11 —\n * the 24 \"label\" colours exist only in Google's Labels API).\n * `textColor` is deliberately omitted: solid-scheme consumers get the\n * event card's auto-derived ink (provably WCAG AA for any opaque hex),\n * and the tinted scheme paints text on theme tokens regardless.\n */\nexport const GOOGLE_CALENDAR_PALETTE: PaletteSwatch[] = [\n { name: 'Tomato', hex: '#d50000' },\n { name: 'Flamingo', hex: '#e67c73' },\n { name: 'Tangerine', hex: '#f4511e' },\n { name: 'Banana', hex: '#f6bf26' },\n { name: 'Sage', hex: '#33b679' },\n { name: 'Basil', hex: '#0b8043' },\n { name: 'Peacock', hex: '#039be5' },\n { name: 'Blueberry', hex: '#3f51b5' },\n { name: 'Lavender', hex: '#7986cb' },\n { name: 'Grape', hex: '#8e24aa' },\n { name: 'Graphite', hex: '#616161' },\n];\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type KeyboardEvent,\n} from 'react';\nimport * as Popover from '@radix-ui/react-popover';\nimport { cva } from 'class-variance-authority';\nimport { Check, X } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport {\n useFormField,\n useFormFieldControlId,\n} from '../form-field/form-field-context';\nimport { Slider } from '../slider/slider';\nimport { useAgentRegistration } from '../../agent';\nimport { colorPickerAgent } from './color-picker.agent';\n\n/** Agent-readiness curated handle for ColorPicker. */\nexport interface ColorPickerHandle {\n getValue: () => string;\n setValue: (hex: string) => void;\n}\nimport {\n contrastRatio,\n formatOutput,\n hslToHex,\n meetsAA,\n meetsAAA,\n parseInput,\n type HSLA,\n} from './color-utils';\nimport { APPOINTMENT_PALETTE, type PaletteSwatch } from './palettes';\n\nconst COLS = 6;\n\nconst triggerVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:w-full',\n 'ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--control-border)] ds:bg-[var(--background)] ds:text-[var(--foreground)]',\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:h-8 ds:text-[length:var(--font-size-sm)] ds:ps-3 ds:pe-3',\n md: 'ds:h-[var(--min-target-size)] ds:text-[length:var(--font-size-base)] ds:ps-3 ds:pe-3',\n lg: 'ds:h-12 ds:text-[length:var(--font-size-lg)] ds:ps-4 ds:pe-4',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst swatchVariants = cva(\n [\n 'ds:relative ds:rounded-[var(--radius-sm)] ds:border-2 ds:cursor-pointer',\n 'ds:transition-[transform,box-shadow] 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:hover:scale-110',\n // The swatch background is the user-picked colour — set as a CSS custom\n // property via inline `style` per 23-constraints §Runtime-computed\n // dimensions (CSS custom property setter; the bg rule lives on the class).\n 'ds:bg-[var(--swatch-bg)]',\n ].join(' '),\n {\n variants: {\n selected: {\n true: 'ds:border-[var(--primary)] ds:shadow-[var(--shadow-md)]',\n false: 'ds:border-transparent',\n },\n // Swatch footprint. md/lg honour --min-target-size (44/48px) for touch.\n // sm is a denser 28px swatch for toolbar/inline use — comfortably above\n // the WCAG 2.5.8 (AA) 24px minimum, with the grid gap providing spacing.\n // sm intentionally does NOT take the accessible-theme --min-target-size\n // bump (48px) — a dense colour grid is opt-in and the full roving-tabindex\n // keyboard path is the mitigation for the sub-AAA pointer target.\n size: {\n // sm = 28px: clears WCAG 2.5.8 (AA, 24px) but intentionally opts out of\n // the accessible-theme 48px min-target bump — a conscious, signed-off\n // trade-off (dense opt-in grid; keyboard roving-tabindex is the mitigation).\n sm: 'ds:min-w-7 ds:min-h-7',\n md: 'ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]',\n lg: 'ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]',\n },\n },\n defaultVariants: { selected: false, size: 'md' },\n },\n);\n\nconst PANEL_CLASSES = [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-md)]',\n 'ds:rounded-[var(--radius-md)] ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:p-[var(--spacing-md)]',\n].join(' ');\n\n// Checkerboard under the opacity track — static geometry, so expressed as\n// Tailwind arbitrary values rather than inline `style`. `grey-700` comes\n// from the closed palette so the tile colour still tracks the token ramp.\nconst OPACITY_CHECKER_CLASSES = [\n 'ds:bg-[image:repeating-conic-gradient(var(--color-grey-700)_0%_25%,transparent_0%_50%)]',\n 'ds:bg-[size:8px_8px]',\n].join(' ');\n\nconst PANEL_COMPACT_CLASSES = [\n 'ds:rounded-[var(--radius-md)] ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:p-[var(--spacing-sm)]',\n].join(' ');\n\n// Tighter padding for the dense (sm) swatch-only panel — toolbar/inline use.\nconst PANEL_COMPACT_SM_CLASSES = [\n 'ds:rounded-[var(--radius-md)] ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:p-[var(--spacing-xs)]',\n].join(' ');\n\nconst POPOVER_CONTENT_CLASSES = [\n 'ds:z-[var(--z-popover)] ds:rounded-[var(--radius-md)]',\n 'ds:border ds:border-[color:var(--border)] ds:bg-[var(--background)] ds:shadow-[var(--shadow-lg)]',\n 'ds:w-72',\n 'ds:data-[state=open]:animate-in ds:data-[state=open]:fade-in-0 ds:data-[state=open]:zoom-in-95',\n 'ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out-0 ds:data-[state=closed]:zoom-out-95',\n 'ds:data-[side=bottom]:slide-in-from-top-2 ds:data-[side=top]:slide-in-from-bottom-2',\n 'ds:data-[side=left]:slide-in-from-right-2 ds:data-[side=right]:slide-in-from-left-2',\n].join(' ');\n\nconst HEX_INPUT_CLASSES = [\n 'ds:w-full ds:rounded-[var(--radius-sm)] ds:border ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)]',\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 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n].join(' ');\n\n// Makes the Slider track/range transparent so the gradient behind shows through\nconst TRANSPARENT_SLIDER =\n 'ds:[&>span:first-child]:bg-transparent ds:[&>span:first-child>span]:bg-transparent';\n\nexport interface ColorPickerProps {\n value?: string;\n defaultValue?: string;\n onChange?: (value: string) => void;\n format?: 'hex' | 'hsl' | 'rgba';\n allowOpacity?: boolean;\n palette?: (string | PaletteSwatch)[];\n against?: string;\n size?: 'sm' | 'md' | 'lg';\n disabled?: boolean;\n variant?: 'inline' | 'popover';\n /** Show only the swatch grid without sliders, hex input, or contrast readout */\n compact?: boolean;\n className?: string;\n}\n\nexport const ColorPicker = forwardRef<HTMLDivElement, ColorPickerProps>(\n (props, ref) => {\n const {\n value,\n defaultValue,\n onChange,\n format = 'hex',\n allowOpacity = false,\n palette,\n against,\n size = 'md',\n disabled = false,\n variant = 'inline',\n compact = true,\n className,\n } = props;\n\n const { t } = useTranslation('ui');\n const ctx = useFormField();\n const generatedId = useId();\n const pickerId = useFormFieldControlId(ctx) || generatedId;\n const effectiveDisabled = ctx.disabled || disabled;\n\n const isControlled = value !== undefined;\n const [internalHsl, setInternalHsl] = useState<HSLA>(() => {\n const initial = value ?? defaultValue;\n if (initial) {\n const parsed = parseInput(initial);\n if (parsed) return parsed;\n }\n return { h: 0, s: 100, l: 50, a: 1 };\n });\n\n const currentHsl: HSLA = useMemo(() => {\n if (isControlled && value) {\n const parsed = parseInput(value);\n if (parsed) return parsed;\n }\n return internalHsl;\n }, [isControlled, value, internalHsl]);\n\n const emitChange = useCallback(\n (hsl: HSLA) => {\n const finalHsl = allowOpacity ? hsl : { ...hsl, a: 1 };\n if (!isControlled) setInternalHsl(finalHsl);\n onChange?.(formatOutput(finalHsl, format));\n },\n [allowOpacity, format, isControlled, onChange],\n );\n\n const [hexInput, setHexInput] = useState(() => hslToHex(currentHsl));\n const [hexError, setHexError] = useState(false);\n const revertTimerRef = useRef<ReturnType<typeof setTimeout>>(undefined);\n const currentHslRef = useRef(currentHsl);\n currentHslRef.current = currentHsl;\n\n useEffect(() => {\n setHexInput(hslToHex(currentHsl));\n setHexError(false);\n if (revertTimerRef.current !== undefined) {\n clearTimeout(revertTimerRef.current);\n revertTimerRef.current = undefined;\n }\n }, [currentHsl]);\n\n useEffect(() => {\n return () => {\n if (revertTimerRef.current !== undefined) {\n clearTimeout(revertTimerRef.current);\n }\n };\n }, []);\n\n const handleHexBlur = () => {\n const parsed = parseInput(hexInput);\n if (parsed) {\n setHexError(false);\n emitChange(parsed);\n } else {\n setHexError(true);\n revertTimerRef.current = setTimeout(() => {\n revertTimerRef.current = undefined;\n setHexError(false);\n setHexInput(hslToHex(currentHslRef.current));\n }, 800);\n }\n };\n\n const swatches: PaletteSwatch[] = useMemo(() => {\n if (!palette) return APPOINTMENT_PALETTE;\n return palette.map((item) =>\n typeof item === 'string'\n ? { name: item.toUpperCase(), hex: item }\n : item,\n );\n }, [palette]);\n\n const currentHex = hslToHex(currentHsl);\n // Normalise palette entries through parseInput so swatches declared as\n // rgb()/hsl()/shorthand hex still match — raw `s.hex` comparison misses\n // any non-literal-hex representation.\n const swatchCanonicalHexes = useMemo(\n () =>\n swatches.map((s) => {\n const parsed = parseInput(s.hex);\n return parsed ? hslToHex(parsed).toLowerCase() : null;\n }),\n [swatches],\n );\n const selectedSwatchIndex = swatchCanonicalHexes.findIndex(\n (hex) => hex !== null && hex === currentHex.toLowerCase(),\n );\n\n const gridRef = useRef<HTMLDivElement>(null);\n const [focusedIndex, setFocusedIndex] = useState(\n selectedSwatchIndex >= 0 ? selectedSwatchIndex : 0,\n );\n\n const focusSwatch = (index: number) => {\n const cells =\n gridRef.current?.querySelectorAll<HTMLElement>('[role=\"gridcell\"]');\n if (cells?.[index]) {\n cells[index].focus();\n setFocusedIndex(index);\n }\n };\n\n const handleGridKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (effectiveDisabled) return;\n const total = swatches.length;\n let next = focusedIndex;\n\n // The grid (grid-cols-6) mirrors under dir=\"rtl\", so the physical\n // ArrowRight/ArrowLeft keys must map to the inverse logical delta to keep\n // keyboard navigation following the visual reading order. Resolve the\n // effective direction from the element's computed style.\n const isRtl =\n typeof window !== 'undefined' && gridRef.current\n ? window.getComputedStyle(gridRef.current).direction === 'rtl'\n : false;\n const forward = isRtl ? -1 : 1;\n\n switch (event.key) {\n case 'ArrowRight':\n next = (focusedIndex + forward + total) % total;\n break;\n case 'ArrowLeft':\n next = (focusedIndex - forward + total) % total;\n break;\n case 'ArrowDown':\n next = Math.min(focusedIndex + COLS, total - 1);\n break;\n case 'ArrowUp':\n next = Math.max(focusedIndex - COLS, 0);\n break;\n case 'Home':\n next = Math.floor(focusedIndex / COLS) * COLS;\n break;\n case 'End':\n next = Math.min(\n Math.floor(focusedIndex / COLS) * COLS + COLS - 1,\n total - 1,\n );\n break;\n case 'PageUp':\n next = focusedIndex % COLS;\n break;\n case 'PageDown': {\n const lastRowStart = Math.floor((total - 1) / COLS) * COLS;\n next = Math.min(lastRowStart + (focusedIndex % COLS), total - 1);\n break;\n }\n case 'Enter':\n case ' ': {\n event.preventDefault();\n const parsed = parseInput(swatches[focusedIndex].hex);\n if (parsed) emitChange(parsed);\n return;\n }\n default:\n return;\n }\n\n event.preventDefault();\n focusSwatch(next);\n };\n\n const [open, setOpen] = useState(false);\n\n const agentHandle = useMemo<ColorPickerHandle>(\n () => ({\n getValue: () => hslToHex(currentHslRef.current),\n setValue: (hex) => {\n const parsed = parseInput(hex);\n if (parsed) emitChange(parsed);\n },\n }),\n [emitChange],\n );\n useAgentRegistration(colorPickerAgent, agentHandle, pickerId);\n\n const contrastInfo = useMemo(() => {\n if (!against) return null;\n const bgHsl = parseInput(against);\n if (!bgHsl) return null;\n const ratio = contrastRatio(currentHsl, bgHsl);\n return { ratio, aa: meetsAA(ratio), aaa: meetsAAA(ratio) };\n }, [against, currentHsl]);\n\n const swatchGrid = (\n // eslint-disable-next-line jsx-a11y/interactive-supports-focus -- inner gridcells are individually focusable via roving tabindex\n <div\n ref={gridRef}\n role=\"grid\"\n aria-label={t('inputs.colorPicker.paletteLabel', 'Colour palette')}\n onKeyDown={handleGridKeyDown}\n className=\"ds:grid ds:grid-cols-6 ds:gap-[var(--spacing-xs)]\"\n >\n {swatches.map((_swatch, i) => {\n const rowStart = Math.floor(i / COLS) * COLS;\n const isFirstInRow = i === rowStart;\n return isFirstInRow ? (\n <div key={i} role=\"row\" className=\"ds:contents\">\n {swatches.slice(rowStart, rowStart + COLS).map((s, j) => {\n const idx = rowStart + j;\n const sel = idx === selectedSwatchIndex;\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events -- parent grid handles keyboard navigation via onKeyDown\n <div\n key={s.hex}\n role=\"gridcell\"\n aria-selected={sel}\n aria-label={t('inputs.colorPicker.swatchLabel', {\n name: s.name,\n hex: s.hex,\n })}\n tabIndex={idx === focusedIndex ? 0 : -1}\n onClick={() => {\n if (effectiveDisabled) return;\n const parsed = parseInput(s.hex);\n if (parsed) emitChange(parsed);\n setFocusedIndex(idx);\n }}\n className={swatchVariants({ selected: sel, size })}\n // eslint-disable-next-line react/forbid-dom-props -- user-picked swatch hex injected via --swatch-bg CSS variable\n style={{ ['--swatch-bg' as string]: s.hex }}\n >\n {sel ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:absolute ds:inset-0 ds:m-auto ds:size-4 ds:text-[var(--background)] ds:mix-blend-difference\"\n />\n ) : null}\n </div>\n );\n })}\n </div>\n ) : null;\n })}\n </div>\n );\n\n const fullControls = compact ? null : (\n <>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <label\n htmlFor={`${pickerId}-hex`}\n className=\"ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)]\"\n >\n {t('inputs.colorPicker.hex', 'Hex')}\n </label>\n <bdi dir=\"ltr\">\n <input\n id={`${pickerId}-hex`}\n type=\"text\"\n value={hexInput}\n disabled={effectiveDisabled}\n onChange={(e) => setHexInput(e.target.value)}\n onBlur={handleHexBlur}\n className={`${HEX_INPUT_CLASSES} ${hexError ? 'ds:border-[var(--destructive)]' : 'ds:border-[color:var(--control-border)]'}`}\n />\n </bdi>\n </div>\n\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <SliderWithGradient\n label={t('inputs.colorPicker.hue', 'Hue')}\n gradient=\"linear-gradient(to right, hsl(0,100%,50%), hsl(60,100%,50%), hsl(120,100%,50%), hsl(180,100%,50%), hsl(240,100%,50%), hsl(300,100%,50%), hsl(360,100%,50%))\"\n min={0}\n max={360}\n value={currentHsl.h}\n onChange={(h) => emitChange({ ...currentHsl, h })}\n formatValue={(v) => `H ${Math.round(v)}°`}\n disabled={effectiveDisabled}\n />\n <SliderWithGradient\n label={t('inputs.colorPicker.saturation', 'Saturation')}\n gradient={`linear-gradient(to right, hsl(${currentHsl.h},0%,${currentHsl.l}%), hsl(${currentHsl.h},100%,${currentHsl.l}%))`}\n min={0}\n max={100}\n value={currentHsl.s}\n onChange={(s) => emitChange({ ...currentHsl, s })}\n formatValue={(v) => `S ${Math.round(v)}%`}\n disabled={effectiveDisabled}\n />\n <SliderWithGradient\n label={t('inputs.colorPicker.lightness', 'Lightness')}\n gradient={`linear-gradient(to right, hsl(${currentHsl.h},${currentHsl.s}%,0%), hsl(${currentHsl.h},${currentHsl.s}%,50%), hsl(${currentHsl.h},${currentHsl.s}%,100%))`}\n min={0}\n max={100}\n value={currentHsl.l}\n onChange={(l) => emitChange({ ...currentHsl, l })}\n formatValue={(v) => `L ${Math.round(v)}%`}\n disabled={effectiveDisabled}\n />\n {allowOpacity ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <label className=\"ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)]\">\n {t('inputs.colorPicker.opacity', 'Opacity')}\n </label>\n <div className=\"ds:relative\">\n <div\n className={`ds:absolute ds:inset-0 ds:rounded-[var(--radius-full)] ds:pointer-events-none ${OPACITY_CHECKER_CLASSES}`}\n aria-hidden=\"true\"\n />\n <div\n className=\"ds:absolute ds:inset-0 ds:rounded-[var(--radius-full)] ds:pointer-events-none ds:bg-[image:var(--opacity-gradient)]\"\n // eslint-disable-next-line react/forbid-dom-props -- opacity-track gradient derived from live HSL, no token equivalent\n style={{\n ['--opacity-gradient' as string]: `linear-gradient(to right, hsla(${currentHsl.h},${currentHsl.s}%,${currentHsl.l}%,0), hsl(${currentHsl.h},${currentHsl.s}%,${currentHsl.l}%))`,\n }}\n aria-hidden=\"true\"\n />\n <Slider\n min={0}\n max={100}\n step={1}\n value={[Math.round(currentHsl.a * 100)]}\n onValueChange={([v]) =>\n emitChange({ ...currentHsl, a: v / 100 })\n }\n aria-label={t('inputs.colorPicker.opacity', 'Opacity')}\n formatValue={(v) => `${v}%`}\n disabled={effectiveDisabled}\n className={TRANSPARENT_SLIDER}\n />\n </div>\n </div>\n ) : null}\n </div>\n\n {contrastInfo ? (\n <div\n className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:text-[length:var(--font-size-sm)]\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <span className=\"ds:tabular-nums\">\n {t('inputs.colorPicker.contrastRatio', {\n ratio: contrastInfo.ratio.toFixed(1),\n })}\n </span>\n <ContrastBadge level=\"AA\" passes={contrastInfo.aa} t={t} />\n <ContrastBadge level=\"AAA\" passes={contrastInfo.aaa} t={t} />\n </div>\n ) : null}\n\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <div\n className=\"ds:size-8 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:bg-[var(--swatch-bg)]\"\n // eslint-disable-next-line react/forbid-dom-props -- live picked colour injected via --swatch-bg CSS variable\n style={{ ['--swatch-bg' as string]: hslToHex(currentHsl) }}\n aria-hidden=\"true\"\n />\n <span className=\"ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:tabular-nums\">\n {formatOutput(currentHsl, format)}\n </span>\n </div>\n </>\n );\n\n const panelContent = (\n <div\n className={\n compact\n ? size === 'sm'\n ? PANEL_COMPACT_SM_CLASSES\n : PANEL_COMPACT_CLASSES\n : PANEL_CLASSES\n }\n >\n {swatchGrid}\n {fullControls}\n </div>\n );\n\n if (variant === 'inline') {\n return (\n <div\n ref={ref}\n id={pickerId}\n className={className}\n aria-describedby={ctx.describedBy || undefined}\n aria-invalid={ctx.invalid || undefined}\n aria-disabled={effectiveDisabled || undefined}\n data-component=\"color-picker\"\n data-component-id={pickerId}\n data-testid=\"color-picker\"\n >\n {panelContent}\n </div>\n );\n }\n\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild disabled={effectiveDisabled}>\n {/* eslint-disable-next-line jsx-a11y/role-supports-aria-props -- FormField propagates invalid state to its trigger; users rely on this for validation announcements */}\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n id={pickerId}\n aria-describedby={ctx.describedBy || undefined}\n aria-invalid={ctx.invalid || undefined}\n // In compact mode the trigger only renders the swatch (which is\n // aria-hidden). Provide a fallback name so the button is named\n // for AT regardless of variant. The current value is announced\n // separately via the hex/HSL output inside the popover.\n aria-label={\n compact\n ? t('inputs.colorPicker.triggerLabel', 'Choose colour')\n : undefined\n }\n className={triggerVariants({ size, className })}\n data-component=\"color-picker\"\n data-component-id={pickerId}\n data-testid=\"color-picker-trigger\"\n >\n <span\n className={`ds:inline-block ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:shrink-0 ds:bg-[var(--swatch-bg)]${compact ? '' : ' ds:me-[var(--spacing-sm)]'}`}\n aria-hidden=\"true\"\n // eslint-disable-next-line react/forbid-dom-props -- trigger preview swatch shows current picked colour via --swatch-bg\n style={{ ['--swatch-bg' as string]: hslToHex(currentHsl) }}\n />\n {compact ? null : (\n <span className=\"ds:text-start ds:truncate ds:tabular-nums\">\n {formatOutput(currentHsl, format)}\n </span>\n )}\n </button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n sideOffset={4}\n align=\"start\"\n className={POPOVER_CONTENT_CLASSES}\n >\n {panelContent}\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n },\n);\n\nColorPicker.displayName = 'ColorPicker';\n\nfunction ContrastBadge({\n level,\n passes,\n t,\n}: {\n level: string;\n passes: boolean;\n t: (key: string, fallback: string) => string;\n}) {\n return (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <abbr\n title={`Web Content Accessibility Guidelines Level ${level}`}\n className=\"ds:no-underline ds:font-medium\"\n >\n {level}\n </abbr>\n {passes ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-[var(--success)]\"\n />\n ) : (\n <X\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-[var(--destructive)]\"\n />\n )}\n <span className=\"ds:sr-only\">\n {passes\n ? t('inputs.colorPicker.contrastPass', 'Pass')\n : t('inputs.colorPicker.contrastFail', 'Fail')}\n </span>\n </span>\n );\n}\n\nfunction SliderWithGradient({\n label,\n gradient,\n min,\n max,\n value,\n onChange,\n formatValue,\n disabled,\n}: {\n label: string;\n gradient: string;\n min: number;\n max: number;\n value: number;\n onChange: (v: number) => void;\n formatValue: (v: number) => string;\n disabled: boolean;\n}) {\n return (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <label className=\"ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)]\">\n {label}\n </label>\n <div className=\"ds:relative\">\n <div\n className=\"ds:absolute ds:inset-0 ds:rounded-[var(--radius-full)] ds:pointer-events-none ds:bg-[image:var(--slider-gradient)]\"\n // eslint-disable-next-line react/forbid-dom-props -- hue/saturation/lightness gradient derived from live HSL, no token equivalent\n style={{ ['--slider-gradient' as string]: gradient }}\n aria-hidden=\"true\"\n />\n <Slider\n min={min}\n max={max}\n step={1}\n value={[value]}\n onValueChange={([v]) => onChange(v)}\n aria-label={label}\n formatValue={formatValue}\n disabled={disabled}\n className={TRANSPARENT_SLIDER}\n />\n </div>\n </div>\n );\n}\n"],"names":["colorPickerAgent","handle","args","hexToHsl","hex","h","g","b","a","rgbToHsl","r","max","min","l","hue","sat","d","hslToHex","hsl","hslToRgbComponents","toHex","n","base","hslToRgba","ri","gi","bi","s","q","p","hueToRgb","t","tt","formatOutput","format","parseInput","value","trimmed","body","hslaMatch","rgbaMatch","relativeLuminance","linearise","c","contrastRatio","fg","bg","lum1","lum2","lighter","darker","meetsAA","ratio","meetsAAA","APPOINTMENT_PALETTE","BRAND_PALETTE","GOOGLE_CALENDAR_PALETTE","COLS","triggerVariants","cva","swatchVariants","PANEL_CLASSES","OPACITY_CHECKER_CLASSES","PANEL_COMPACT_CLASSES","PANEL_COMPACT_SM_CLASSES","POPOVER_CONTENT_CLASSES","HEX_INPUT_CLASSES","TRANSPARENT_SLIDER","ColorPicker","forwardRef","props","ref","defaultValue","onChange","allowOpacity","palette","against","size","disabled","variant","compact","className","useTranslation","ctx","useFormField","generatedId","useId","pickerId","useFormFieldControlId","effectiveDisabled","isControlled","internalHsl","setInternalHsl","useState","initial","parsed","currentHsl","useMemo","emitChange","useCallback","finalHsl","hexInput","setHexInput","hexError","setHexError","revertTimerRef","useRef","currentHslRef","useEffect","handleHexBlur","swatches","item","currentHex","selectedSwatchIndex","gridRef","focusedIndex","setFocusedIndex","focusSwatch","index","cells","_a","handleGridKeyDown","event","total","next","forward","lastRowStart","open","setOpen","agentHandle","useAgentRegistration","contrastInfo","bgHsl","swatchGrid","jsx","_swatch","rowStart","j","idx","sel","Check","fullControls","jsxs","Fragment","e","SliderWithGradient","v","Slider","ContrastBadge","panelContent","Popover","level","passes","X","label","gradient","formatValue"],"mappings":";;;;;;;;;;AASO,MAAMA,KAAoD;AAAA,EAC/D,IAAI;AAA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