@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-input-O9camxkq.js","sources":["../../src/components/phone-input/phone-input.agent.ts","../../src/components/phone-input/phone-input.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — PhoneInput. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { PhoneInputHandle } from './phone-input';\n\nexport const phoneInputAgent: AgentAdapter<PhoneInputHandle> = {\n id: 'phone-input',\n // A phone number is a single form value, not free-form rich text — `set_value`\n // (not `edit_inline`, which is reserved for in-place rich/cell editing).\n capabilities: ['set_value'],\n state: {\n value: {\n type: 'string',\n descriptionKey: 'ui.agent.phoneInput.state.value',\n description:\n 'Current E.164 phone number, or empty string when not yet valid.',\n read: (handle) => handle.getValue(),\n },\n isEmpty: {\n type: 'boolean',\n descriptionKey: 'ui.agent.phoneInput.state.isEmpty',\n description: 'Whether the input has no value.',\n read: (handle) => handle.getValue() === '',\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: string }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: 'string',\n description:\n 'Phone number in E.164 or national format; the parser infers the country.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.phoneInput.actions.setValue',\n description:\n 'Replace the phone number (E.164 or national format; parser will infer country).',\n examples: [\n { args: { value: '+393331234567' }, note: 'Set an Italian mobile.' },\n ],\n invoke: (handle, args: { value: string }) => {\n handle.setValue(args.value);\n },\n },\n clear: {\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.phoneInput.actions.clear',\n description: 'Empty the input. Loses any typed value.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n focus: {\n safety: 'read',\n descriptionKey: 'ui.agent.phoneInput.actions.focus',\n description: 'Move keyboard focus to the phone-number input.',\n invoke: (handle) => {\n handle.focus();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'phone-input',\n description: 'Marks the PhoneInput wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type FocusEvent,\n} from 'react';\nimport { useAgentRegistration } from '../../agent';\nimport { phoneInputAgent } from './phone-input.agent';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useDomValue } from '../_shared/use-dom-value';\n\n/** Agent-readiness curated handle for PhoneInput. */\nexport interface PhoneInputHandle {\n getValue: () => string;\n setValue: (value: string) => void;\n clear: () => void;\n focus: () => void;\n}\nimport * as Popover from '@radix-ui/react-popover';\nimport {\n findPopoverTrigger,\n useNonModalTabExit,\n} from '../_shared/non-modal-tab-exit';\nimport { Command, defaultFilter } from 'cmdk';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ChevronDown } from 'lucide-react';\nimport {\n AsYouType,\n getCountries,\n getCountryCallingCode,\n parsePhoneNumberFromString,\n type CountryCode,\n} from 'libphonenumber-js/min';\nimport {\n FormFieldContext,\n useFormField,\n useFormFieldControlId,\n} from '../form-field/form-field-context';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { normalizeDiacritics } from '../_shared/normalize-diacritics';\nimport { MENU_ROW_HIGHLIGHT } from '../_shared/menu-row';\nimport { Flag } from '../flag';\n\nexport interface PhoneInputChangeMeta {\n country: CountryCode;\n isValid: boolean;\n isPossible: boolean;\n type?: string;\n}\n\nexport interface PhoneInputProps {\n value?: string;\n defaultValue?: string;\n /**\n * Country pre-selected when no value is supplied. Defaults to `IT`\n * (AlfaDocs's dominant user base is Italian). Pass a different\n * `CountryCode` to override, or enable `detectBrowserCountry` to\n * derive it from the browser locale.\n */\n defaultCountry?: CountryCode;\n /**\n * When true, infer the default country from `navigator.language` /\n * `Intl.Locale` before falling back to `defaultCountry` (or `IT`).\n * Off by default — most AlfaDocs flows should stay on IT regardless\n * of the visitor's browser locale.\n */\n detectBrowserCountry?: boolean;\n onChange?: (e164: string, meta: PhoneInputChangeMeta) => void;\n size?: 'sm' | 'md' | 'lg';\n tone?: 'default' | 'error';\n disabled?: boolean;\n readOnly?: boolean;\n placeholder?: string;\n popularCountries?: CountryCode[];\n /**\n * Restrict the country picker to this set (ISO 3166-1 alpha-2 codes), in\n * the order given. Unsupported or duplicate codes are dropped; an empty /\n * all-invalid list is ignored (every country stays selectable).\n * `popularCountries` is intersected with this set. When the list resolves\n * to a single country the picker collapses to a fixed, non-interactive\n * dial code — only the national-number field stays editable.\n */\n allowedCountries?: CountryCode[];\n className?: string;\n id?: string;\n name?: string;\n /**\n * What `name` posts in a native form. `national` (the default) posts the\n * number field's own text, e.g. `333 123 4567`. `e164` posts the full\n * number from a hidden field instead, e.g. `+393331234567`: the string\n * `onChange` reports, so it is empty while the text is not yet a number.\n */\n nameFormat?: 'national' | 'e164';\n required?: boolean;\n /**\n * Fires once when focus has left the whole control. Moving between the\n * country picker and the number field does not fire it. It takes no\n * event: the control has several parts, so there is no single target.\n */\n onBlur?: () => void;\n 'aria-label'?: string;\n}\n\nconst phoneInputWrapperVariants = cva(\n [\n 'ds:group ds:relative ds:inline-flex ds:items-stretch ds:w-full',\n 'ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--control-border)] ds:bg-input',\n 'ds:shadow-[var(--shadow-input)]',\n 'ds:text-foreground',\n 'ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n /* The ring is for the number field only. The country button draws its\n own, and `focus-within` here would draw a second one around it. */\n 'ds:has-[input:focus]:outline-[length:var(--focus-ring-width)] ds:has-[input:focus]:outline-solid',\n 'ds:has-[input:focus]:outline-ring ds:has-[input:focus]:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:has-[input:focus]:outline-[CanvasText]',\n 'ds:has-[:disabled]:cursor-not-allowed ds:has-[:disabled]:opacity-50',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:h-8 ds:text-[length:var(--font-size-sm)]',\n md: 'ds:h-[var(--min-target-size)] ds:text-[length:var(--font-size-base)]',\n lg: 'ds:h-12 ds:text-[length:var(--font-size-lg)]',\n },\n tone: {\n default: '',\n error: 'ds:border-destructive ds:has-[input:focus]:outline-destructive',\n },\n },\n defaultVariants: {\n size: 'md',\n tone: 'default',\n },\n },\n);\n\nconst countryTriggerVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:bg-transparent ds:text-foreground',\n 'ds:border-0 ds:border-e ds:border-e-border',\n 'ds:rounded-s-[var(--radius-sm)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:hover:bg-muted',\n 'ds:focus:outline-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n 'ds:disabled:cursor-not-allowed',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-3 ds:pe-2',\n md: 'ds:ps-3 ds:pe-2',\n lg: 'ds:ps-4 ds:pe-3',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst phoneNumberInputVariants = cva(\n [\n 'ds:flex-1 ds:min-w-0 ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground',\n 'ds:border-0 ds:outline-none',\n 'ds:disabled:cursor-not-allowed',\n 'ds:read-only:cursor-default',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-2 ds:pe-3 ds:text-[length:var(--font-size-sm)]',\n md: 'ds:ps-2 ds:pe-3 ds:text-[length:var(--font-size-base)]',\n lg: 'ds:ps-3 ds:pe-4 ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst pickerContentClasses = [\n 'ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-72',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:animate-in ds:fade-in ds:zoom-in-95',\n 'ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out',\n 'ds:data-[state=closed]:zoom-out-95',\n 'ds:data-[side=bottom]:slide-in-from-top-2',\n 'ds:data-[side=top]:slide-in-from-bottom-2',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst pickerSearchClasses = [\n 'ds:w-full ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground',\n 'ds:border-0 ds:border-b ds:border-b-border ds:outline-none',\n 'ds:ps-3 ds:pe-3 ds:py-2 ds:text-[var(--font-size-sm)]',\n 'ds:focus:outline-none',\n].join(' ');\n\nconst pickerListClasses =\n 'ds:max-h-72 ds:overflow-y-auto ds:p-[var(--spacing-xs)]';\n\nconst pickerItemClasses = [\n 'ds:relative ds:flex ds:cursor-pointer ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)] ds:ps-3 ds:pe-3 ds:py-2 ds:text-[var(--font-size-sm)]',\n 'ds:text-foreground ds:outline-none ds:select-none',\n MENU_ROW_HIGHLIGHT.selected,\n].join(' ');\n\nconst pickerGroupHeadingClasses = [\n 'ds:ps-3 ds:pe-3 ds:py-1.5',\n 'type-eyebrow ds:text-muted-foreground',\n].join(' ');\n\nconst pickerEmptyClasses =\n 'ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground';\n\nconst chevronSizeBySize = {\n sm: 'ds:size-3.5',\n md: 'ds:size-4',\n lg: 'ds:size-5',\n} as const;\n\nconst flagSizeBySize = {\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n} as const satisfies Record<'sm' | 'md' | 'lg', 'sm' | 'md' | 'lg'>;\n\nfunction countDigitsBefore(str: string, position: number): number {\n let digits = 0;\n for (let i = 0; i < position && i < str.length; i++) {\n if (str[i] >= '0' && str[i] <= '9') digits++;\n }\n return digits;\n}\n\nfunction positionAfterDigits(str: string, targetDigits: number): number {\n if (targetDigits === 0) return 0;\n let count = 0;\n for (let i = 0; i < str.length; i++) {\n if (str[i] >= '0' && str[i] <= '9') {\n count++;\n if (count === targetDigits) return i + 1;\n }\n }\n return str.length;\n}\n\nfunction resolveDefaultCountry(\n explicit: CountryCode | undefined,\n supported: Set<string>,\n detectBrowser: boolean,\n locale: string,\n allowedList: CountryCode[] | null,\n): CountryCode {\n const allowed =\n allowedList && allowedList.length ? new Set<string>(allowedList) : null;\n const ok = (code: string) =>\n supported.has(code) && (!allowed || allowed.has(code));\n\n if (explicit && ok(explicit)) return explicit;\n\n if (detectBrowser) {\n const fromNavigator =\n typeof navigator !== 'undefined' ? navigator.language : undefined;\n if (fromNavigator) {\n const match = fromNavigator.match(/-([A-Za-z]{2})/);\n if (match) {\n const candidate = match[1].toUpperCase();\n if (ok(candidate)) return candidate as CountryCode;\n }\n }\n\n try {\n const region = new Intl.Locale(locale).region;\n if (region && ok(region.toUpperCase())) {\n return region.toUpperCase() as CountryCode;\n }\n } catch {\n // Intl.Locale may throw on malformed BCP-47 — fall through.\n }\n }\n\n // A restricted list with no explicit / detected hit defaults to the\n // consumer's first listed country; otherwise AlfaDocs's Italian-first\n // fallback.\n if (allowed) return allowedList![0];\n return 'IT';\n}\n\ninterface CountryRow {\n code: CountryCode;\n name: string;\n dialCode: string;\n}\n\nfunction buildCountryRows(\n locale: string,\n countries: CountryCode[],\n): CountryRow[] {\n let displayNames: Intl.DisplayNames;\n try {\n displayNames = new Intl.DisplayNames([locale], { type: 'region' });\n } catch {\n displayNames = new Intl.DisplayNames(['en'], { type: 'region' });\n }\n const rows = countries.map<CountryRow>((code) => ({\n code,\n name: displayNames.of(code) ?? code,\n dialCode: getCountryCallingCode(code),\n }));\n const collator = new Intl.Collator(locale);\n return rows.sort((a, b) => collator.compare(a.name, b.name));\n}\n\nexport const PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(\n function PhoneInput(\n {\n value,\n defaultValue,\n defaultCountry,\n detectBrowserCountry = false,\n onChange,\n size = 'md',\n tone = 'default',\n disabled,\n readOnly,\n placeholder,\n popularCountries,\n allowedCountries,\n className,\n id,\n name,\n nameFormat = 'national',\n required,\n onBlur,\n 'aria-label': ariaLabel,\n },\n ref,\n ) {\n const { t, i18n } = useTranslation('ui');\n const ctx = useFormField();\n const inFormField = useContext(FormFieldContext) !== null;\n\n const supportedCountries = useMemo(\n () => new Set(getCountries() as string[]),\n [],\n );\n\n // Consumer-restricted country set, filtered to supported + deduped with\n // order preserved. `null` means \"no restriction\" (every country shown).\n const allowedList = useMemo<CountryCode[] | null>(() => {\n if (!allowedCountries || allowedCountries.length === 0) return null;\n const seen = new Set<string>();\n const filtered = allowedCountries.filter((code) => {\n if (!supportedCountries.has(code) || seen.has(code)) return false;\n seen.add(code);\n return true;\n });\n return filtered.length > 0 ? filtered : null;\n }, [allowedCountries, supportedCountries]);\n\n // A single allowed country has nothing to pick — render the dial code as a\n // fixed, non-interactive prefix instead of a one-item picker.\n const isCountryFixed = allowedList !== null && allowedList.length === 1;\n\n const initialState = useMemo(() => {\n const resolvedCountry = resolveDefaultCountry(\n defaultCountry,\n supportedCountries,\n detectBrowserCountry,\n i18n.language,\n allowedList,\n );\n const raw = value ?? defaultValue;\n if (raw) {\n const parsed = parsePhoneNumberFromString(raw);\n if (parsed?.country) {\n // Clamp the parsed country to `allowedCountries` so the rendered dial\n // code can never leave the allowed set — a single-country lock stays\n // on its country even when handed an off-set value.\n if (!allowedList || allowedList.includes(parsed.country)) {\n return {\n country: parsed.country,\n display: parsed.formatNational(),\n pinned: true,\n };\n }\n return {\n country: resolvedCountry,\n display: new AsYouType(resolvedCountry).input(\n parsed.nationalNumber,\n ),\n pinned: true,\n };\n }\n return { country: resolvedCountry, display: raw, pinned: false };\n }\n return { country: resolvedCountry, display: '', pinned: false };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const [country, setCountry] = useState<CountryCode>(initialState.country);\n const [displayValue, setDisplayValue] = useState<string>(\n initialState.display,\n );\n const [pickerOpen, setPickerOpen] = useState(false);\n const [pickerSearch, setPickerSearch] = useState('');\n\n const isControlled = value !== undefined;\n const lastEmittedRef = useRef<string>('');\n const pendingCaretRef = useRef<number | null>(null);\n // Pins the country once the user (or an incoming value) selects one,\n // so the locale-flip effect below stops re-resolving.\n const userSelectedCountryRef = useRef(initialState.pinned);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const composedInputRef = composeRefs(ref, inputRef);\n // The number is written to the input's DOM property, never to its\n // `value` attribute, where a copied outerHTML or a session replay\n // could read it. Declared before the caret effect below, which places\n // the caret in the text this one writes.\n const syncDisplay = useDomValue(inputRef, displayValue);\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const pickerContentRef = useRef<HTMLDivElement | null>(null);\n\n // Re-resolve the country when i18n.language flips from the bootstrap\n // fallback to the real locale on first paint, unless the user has\n // already pinned a country.\n useEffect(() => {\n if (userSelectedCountryRef.current) return;\n const next = resolveDefaultCountry(\n defaultCountry,\n supportedCountries,\n detectBrowserCountry,\n i18n.language,\n allowedList,\n );\n setCountry((prev) => (prev === next ? prev : next));\n }, [\n i18n.language,\n defaultCountry,\n supportedCountries,\n detectBrowserCountry,\n allowedList,\n ]);\n\n // Sync state back from a controlled `value` prop change that did not\n // originate from this component (e.g. parent reset). Skip the sync when\n // the incoming value matches what we just emitted.\n useEffect(() => {\n if (!isControlled) return;\n const current = value ?? '';\n if (current === lastEmittedRef.current) return;\n if (current === '') {\n setDisplayValue('');\n return;\n }\n const parsed = parsePhoneNumberFromString(current);\n if (\n parsed?.country &&\n (!allowedList || allowedList.includes(parsed.country))\n ) {\n userSelectedCountryRef.current = true;\n setCountry(parsed.country);\n setDisplayValue(parsed.formatNational());\n } else {\n // Off-set or unparseable controlled value — keep the country within the\n // allowed set; only sync the displayed digits.\n setDisplayValue(parsed ? parsed.formatNational() : current);\n }\n }, [value, isControlled, allowedList]);\n\n useIsomorphicLayoutEffect(() => {\n if (pendingCaretRef.current == null) return;\n const pos = pendingCaretRef.current;\n pendingCaretRef.current = null;\n const node = inputRef.current;\n if (node && document.activeElement === node) {\n node.setSelectionRange(pos, pos);\n }\n });\n\n const emit = useCallback(\n (nextDisplay: string, nextCountry: CountryCode) => {\n const parsed = parsePhoneNumberFromString(nextDisplay, nextCountry);\n const e164 = parsed?.number ?? '';\n lastEmittedRef.current = e164;\n onChange?.(e164, {\n country: nextCountry,\n isValid: parsed?.isValid() ?? false,\n isPossible: parsed?.isPossible() ?? false,\n type: parsed?.getType(),\n });\n },\n [onChange],\n );\n\n const controlId = useFormFieldControlId(ctx, id);\n const inputId = id ?? (inFormField ? controlId : undefined);\n const effectiveDisabled =\n (inFormField ? ctx.disabled : false) || Boolean(disabled);\n const effectiveRequired =\n (inFormField ? ctx.required : false) || Boolean(required);\n const effectiveInvalid = inFormField ? ctx.invalid : false;\n const effectiveTone = effectiveInvalid ? 'error' : tone;\n const describedBy =\n inFormField && ctx.describedBy ? ctx.describedBy : undefined;\n\n const resolvedPlaceholder =\n placeholder ?? t('inputs.phone.placeholder', 'Phone number');\n\n /* Focus leaving the whole control. The picker is portalled, so it is\n outside the wrapper in the DOM but still part of the control. */\n const onBlurRef = useRef(onBlur);\n onBlurRef.current = onBlur;\n const focusInsideRef = useRef(false);\n const pressInsideRef = useRef(false);\n const isInside = useCallback(\n (node: EventTarget | null) =>\n node instanceof Node &&\n Boolean(\n wrapperRef.current?.contains(node) ||\n pickerContentRef.current?.contains(node),\n ),\n [],\n );\n const leave = useCallback(() => {\n if (!focusInsideRef.current) return;\n focusInsideRef.current = false;\n onBlurRef.current?.();\n }, []);\n const handleFocus = () => {\n focusInsideRef.current = true;\n };\n const handleBlur = (event: FocusEvent<HTMLDivElement>) => {\n const next = event.relatedTarget;\n if (isInside(next)) return;\n /* Safari does not focus a button on click: pressing the country\n button blurs the number field to nowhere. */\n if (next === null && pressInsideRef.current) return;\n leave();\n };\n const listensForBlur = onBlur !== undefined;\n useEffect(() => {\n if (!listensForBlur) return;\n let check: number | undefined;\n const onPointerDown = (event: PointerEvent) => {\n pressInsideRef.current = isInside(event.target);\n if (pressInsideRef.current) return;\n /* A press outside closes the picker, and its focused search box\n can unmount without a blur event. */\n check = window.setTimeout(() => {\n if (!isInside(document.activeElement)) leave();\n }, 0);\n };\n const onPointerUp = () => {\n pressInsideRef.current = false;\n };\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('pointerup', onPointerUp, true);\n document.addEventListener('pointercancel', onPointerUp, true);\n return () => {\n window.clearTimeout(check);\n document.removeEventListener('pointerdown', onPointerDown, true);\n document.removeEventListener('pointerup', onPointerUp, true);\n document.removeEventListener('pointercancel', onPointerUp, true);\n };\n }, [listensForBlur, isInside, leave]);\n\n const postsE164 = nameFormat === 'e164' && name !== undefined;\n const e164Value = postsE164\n ? (parsePhoneNumberFromString(displayValue, country)?.number ?? '')\n : '';\n\n const handleInputChange = (event: ChangeEvent<HTMLInputElement>) => {\n // A keystroke the formatter drops (or a read-only field refuses)\n // leaves the text as it was, so no render follows: ask for one, to\n // take the refused character out.\n syncDisplay();\n if (readOnly) return;\n const target = event.target;\n const raw = target.value;\n const caret = target.selectionStart ?? raw.length;\n const digitsBefore = countDigitsBefore(raw, caret);\n\n const formatter = new AsYouType(country);\n const formatted = formatter.input(raw);\n\n pendingCaretRef.current = positionAfterDigits(formatted, digitsBefore);\n setDisplayValue(formatted);\n emit(formatted, country);\n };\n\n const lastEmittedRefForHandle = lastEmittedRef;\n const agentHandle = useMemo<PhoneInputHandle>(\n () => ({\n getValue: () => lastEmittedRefForHandle.current,\n setValue: (next) => {\n if (next === '') {\n setDisplayValue('');\n emit('', country);\n return;\n }\n const parsed = parsePhoneNumberFromString(next);\n if (parsed?.country) {\n userSelectedCountryRef.current = true;\n setCountry(parsed.country);\n setDisplayValue(parsed.formatNational());\n emit(parsed.formatNational(), parsed.country);\n } else {\n const formatter = new AsYouType(country);\n const formatted = formatter.input(next);\n setDisplayValue(formatted);\n emit(formatted, country);\n }\n },\n clear: () => {\n setDisplayValue('');\n emit('', country);\n },\n focus: () => inputRef.current?.focus(),\n }),\n [country, emit, lastEmittedRefForHandle],\n );\n useAgentRegistration(phoneInputAgent, agentHandle, id);\n const exitOnTab = useNonModalTabExit(true, {\n getAnchor: findPopoverTrigger,\n onReturnToTrigger: () => setPickerOpen(false),\n });\n\n const handleCountrySelect = (nextCountry: CountryCode) => {\n if (nextCountry === country) {\n setPickerOpen(false);\n return;\n }\n const digits = displayValue.replace(/\\D/g, '');\n const formatter = new AsYouType(nextCountry);\n const reformatted = digits ? formatter.input(digits) : '';\n userSelectedCountryRef.current = true;\n setCountry(nextCountry);\n setDisplayValue(reformatted);\n setPickerOpen(false);\n setPickerSearch('');\n emit(reformatted, nextCountry);\n requestAnimationFrame(() => {\n inputRef.current?.focus();\n });\n };\n\n const countryRows = useMemo(\n () =>\n buildCountryRows(\n i18n.language,\n allowedList ?? (Array.from(supportedCountries) as CountryCode[]),\n ),\n [i18n.language, supportedCountries, allowedList],\n );\n\n const popularRows = useMemo(() => {\n if (!popularCountries || popularCountries.length === 0) return [];\n const byCode = new Map(countryRows.map((row) => [row.code, row]));\n return popularCountries\n .filter((code): code is CountryCode => supportedCountries.has(code))\n .map((code) => byCode.get(code))\n .filter((row): row is CountryRow => Boolean(row));\n }, [popularCountries, countryRows, supportedCountries]);\n\n const popularCodes = useMemo(\n () => new Set(popularRows.map((row) => row.code)),\n [popularRows],\n );\n\n const remainingRows = useMemo(\n () =>\n popularCodes.size > 0\n ? countryRows.filter((row) => !popularCodes.has(row.code))\n : countryRows,\n [countryRows, popularCodes],\n );\n\n const selected = useMemo(\n () => countryRows.find((row) => row.code === country),\n [countryRows, country],\n );\n const selectedDialCode = selected ? selected.dialCode : '';\n const selectedName = selected ? selected.name : country;\n\n const triggerLabel = t('inputs.phone.countryPickerLabel', 'Country');\n const triggerAccessibleName = `${triggerLabel}: ${selectedName}, +${selectedDialCode}`;\n\n const filterFn = useCallback(\n (candidate: string, searchStr: string, keywords?: string[]) => {\n const normalizedCandidate = normalizeDiacritics(candidate);\n const normalizedSearch = normalizeDiacritics(searchStr);\n const normalizedKeywords = keywords?.map(normalizeDiacritics);\n return defaultFilter(\n normalizedCandidate,\n normalizedSearch,\n normalizedKeywords,\n );\n },\n [],\n );\n\n const renderRow = (row: CountryRow) => {\n const accessibleLabel = `${row.name}, +${row.dialCode}`;\n return (\n <Command.Item\n key={row.code}\n value={row.code}\n keywords={[row.name, row.dialCode, `+${row.dialCode}`]}\n onSelect={() => handleCountrySelect(row.code)}\n className={pickerItemClasses}\n aria-label={accessibleLabel}\n >\n <Flag country={row.code} size={flagSizeBySize[size]} />\n <span className=\"ds:flex-1 ds:truncate\">{row.name}</span>\n <bdi dir=\"ltr\" className=\"ds:text-muted-foreground ds:tabular-nums\">\n +{row.dialCode}\n </bdi>\n </Command.Item>\n );\n };\n\n return (\n <div\n ref={wrapperRef}\n onFocus={handleFocus}\n onBlur={handleBlur}\n data-component=\"phone-input\"\n data-component-id={id}\n data-slot=\"phone-input\"\n className={phoneInputWrapperVariants({\n size,\n tone: effectiveTone,\n className,\n })}\n >\n {isCountryFixed ? (\n <span\n data-slot=\"phone-country-fixed\"\n className={`${countryTriggerVariants({ size })} ds:cursor-default ds:hover:bg-transparent`}\n >\n <span className=\"ds:sr-only\">{`${triggerLabel}: ${selectedName}`}</span>\n <Flag country={country} size={flagSizeBySize[size]} />\n <bdi dir=\"ltr\" className=\"ds:tabular-nums\">\n +{selectedDialCode}\n </bdi>\n </span>\n ) : (\n <Popover.Root open={pickerOpen} onOpenChange={setPickerOpen}>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n disabled={effectiveDisabled}\n // What opens is a dialog: a search box over the list.\n aria-haspopup=\"dialog\"\n aria-expanded={pickerOpen}\n aria-label={triggerAccessibleName}\n className={countryTriggerVariants({ size })}\n >\n <Flag country={country} size={flagSizeBySize[size]} />\n <bdi dir=\"ltr\" className=\"ds:tabular-nums\">\n +{selectedDialCode}\n </bdi>\n <ChevronDown\n aria-hidden=\"true\"\n className={[\n chevronSizeBySize[size],\n 'ds:shrink-0 ds:text-muted-foreground',\n 'ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n pickerOpen ? 'ds:rotate-180' : '',\n ].join(' ')}\n />\n </button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n ref={pickerContentRef}\n onKeyDown={exitOnTab}\n sideOffset={6}\n align=\"start\"\n // Radix gives the content role=\"dialog\" with no name.\n aria-label={triggerLabel}\n className={pickerContentClasses}\n >\n <Command\n filter={filterFn}\n shouldFilter\n loop\n label={triggerLabel}\n >\n <Command.Input\n asChild\n value={pickerSearch}\n onValueChange={setPickerSearch}\n >\n <input\n data-phone-country-search=\"true\"\n type=\"text\"\n autoComplete=\"off\"\n autoCorrect=\"off\"\n spellCheck={false}\n placeholder={t(\n 'inputs.phone.searchCountry',\n 'Search countries…',\n )}\n className={pickerSearchClasses}\n />\n </Command.Input>\n <Command.List className={pickerListClasses}>\n <Command.Empty className={pickerEmptyClasses}>\n {t('inputs.phone.noCountryFound', 'No country found')}\n </Command.Empty>\n {popularRows.length > 0 ? (\n <Command.Group\n heading={\n <span className={pickerGroupHeadingClasses}>\n {t('inputs.phone.popularCountries', 'Popular')}\n </span>\n }\n >\n {popularRows.map(renderRow)}\n </Command.Group>\n ) : null}\n <Command.Group\n heading={\n popularRows.length > 0 ? (\n <span className={pickerGroupHeadingClasses}>\n {t('inputs.phone.allCountries', 'All countries')}\n </span>\n ) : undefined\n }\n >\n {remainingRows.map(renderRow)}\n </Command.Group>\n </Command.List>\n </Command>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n )}\n <input\n ref={composedInputRef}\n id={inputId}\n name={postsE164 ? undefined : name}\n type=\"tel\"\n inputMode=\"tel\"\n autoComplete=\"tel-national\"\n placeholder={resolvedPlaceholder}\n disabled={effectiveDisabled}\n readOnly={readOnly}\n required={effectiveRequired}\n aria-label={ariaLabel}\n aria-describedby={describedBy}\n aria-invalid={effectiveInvalid || undefined}\n onChange={handleInputChange}\n className={phoneNumberInputVariants({ size })}\n />\n {postsE164 ? (\n <input\n type=\"hidden\"\n name={name}\n value={e164Value}\n disabled={effectiveDisabled}\n />\n ) : null}\n </div>\n );\n },\n);\n\nPhoneInput.displayName = 'PhoneInput';\n\nexport {\n phoneInputWrapperVariants,\n countryTriggerVariants,\n phoneNumberInputVariants,\n};\n"],"names":["phoneInputAgent","handle","args","phoneInputWrapperVariants","cva","countryTriggerVariants","phoneNumberInputVariants","pickerContentClasses","pickerSearchClasses","pickerListClasses","pickerItemClasses","MENU_ROW_HIGHLIGHT","pickerGroupHeadingClasses","pickerEmptyClasses","chevronSizeBySize","flagSizeBySize","countDigitsBefore","str","position","digits","i","positionAfterDigits","targetDigits","count","resolveDefaultCountry","explicit","supported","detectBrowser","locale","allowedList","allowed","ok","code","fromNavigator","match","candidate","region","buildCountryRows","countries","displayNames","rows","getCountryCallingCode","collator","a","b","PhoneInput","forwardRef","value","defaultValue","defaultCountry","detectBrowserCountry","onChange","size","tone","disabled","readOnly","placeholder","popularCountries","allowedCountries","className","id","name","nameFormat","required","onBlur","ariaLabel","ref","t","i18n","useTranslation","ctx","useFormField","inFormField","useContext","FormFieldContext","supportedCountries","useMemo","getCountries","seen","filtered","isCountryFixed","initialState","resolvedCountry","raw","parsed","parsePhoneNumberFromString","AsYouType","country","setCountry","useState","displayValue","setDisplayValue","pickerOpen","setPickerOpen","pickerSearch","setPickerSearch","isControlled","lastEmittedRef","useRef","pendingCaretRef","userSelectedCountryRef","inputRef","composedInputRef","composeRefs","syncDisplay","useDomValue","wrapperRef","pickerContentRef","useEffect","next","prev","current","useIsomorphicLayoutEffect","pos","node","emit","useCallback","nextDisplay","nextCountry","e164","controlId","useFormFieldControlId","inputId","effectiveDisabled","effectiveRequired","effectiveInvalid","effectiveTone","describedBy","resolvedPlaceholder","onBlurRef","focusInsideRef","pressInsideRef","isInside","_a","_b","leave","handleFocus","handleBlur","event","listensForBlur","check","onPointerDown","onPointerUp","postsE164","e164Value","handleInputChange","target","caret","digitsBefore","formatted","lastEmittedRefForHandle","agentHandle","useAgentRegistration","exitOnTab","useNonModalTabExit","findPopoverTrigger","handleCountrySelect","formatter","reformatted","countryRows","popularRows","byCode","row","popularCodes","remainingRows","selected","selectedDialCode","selectedName","triggerLabel","triggerAccessibleName","filterFn","searchStr","keywords","normalizedCandidate","normalizeDiacritics","normalizedSearch","normalizedKeywords","defaultFilter","renderRow","accessibleLabel","jsxs","Command","jsx","Flag","Popover","ChevronDown"],"mappings":";;;;;;;;;;;;;;;;;AASO,MAAMA,KAAkD;AAAA,EAC7D,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA,EAC1B,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,SAAS;AAAA,MACP,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACA,MAAWA,EAAO,eAAe;AAAA,IAAA;AAAA,EAC1C;AAAA,EAEF,SAAS;AAAA,IACP,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,OAAO;AAAA,YACL,MAAM;AAAA,YACN,aACE;AAAA,UAAA;AAAA,QACJ;AAAA,QAEF,UAAU,CAAC,OAAO;AAAA,MAAA;AAAA,MAEpB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,UAAU;AAAA,QACR,EAAE,MAAM,EAAE,OAAO,gBAAA,GAAmB,MAAM,yBAAA;AAAA,MAAyB;AA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,EAAE,iCAAiC,SAAS,GAC/C;AAAA,4BAGD,UAAA6F,EAAY,IAAIkB,EAAS;AAAA,0BAAA;AAAA,wBAAA,IAE1B;AAAA,wBACJ,gBAAAI;AAAA,0BAACD,EAAQ;AAAA,0BAAR;AAAA,4BACC,SACErB,EAAY,SAAS,IACnB,gBAAAsB,EAAC,QAAA,EAAK,WAAW1K,IACd,UAAAuD,EAAE,6BAA6B,eAAe,EAAA,CACjD,IACE;AAAA,4BAGL,UAAAiG,GAAc,IAAIc,EAAS;AAAA,0BAAA;AAAA,wBAAA;AAAA,sBAC9B,EAAA,CACF;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA,EACF,CACF;AAAA,UAAA,GACF;AAAA,UAEF,gBAAAI;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,KAAKhF;AAAA,cACL,IAAIoB;AAAA,cACJ,MAAMqB,KAAY,SAAYlF;AAAA,cAC9B,MAAK;AAAA,cACL,WAAU;AAAA,cACV,cAAa;AAAA,cACb,aAAamE;AAAA,cACb,UAAUL;AAAA,cACV,UAAApE;AAAA,cACA,UAAUqE;AAAA,cACV,cAAY3D;AAAA,cACZ,oBAAkB8D;AAAA,cAClB,gBAAcF,MAAoB;AAAA,cAClC,UAAUoB;AAAA,cACV,WAAW3I,GAAyB,EAAE,MAAA8C,EAAA,CAAM;AAAA,YAAA;AAAA,UAAA;AAAA,UAE7C2F,KACC,gBAAAuC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAAzH;AAAA,cACA,OAAOmF;AAAA,cACP,UAAUrB;AAAA,YAAA;AAAA,UAAA,IAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEA9E,GAAW,cAAc;"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { jsx as i, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
+
import { useState as V, useCallback as C, useRef as y, useEffect as N, useMemo as M, forwardRef as R, useId as X, useContext as m, createContext as k } from "react";
|
|
3
|
+
import * as g from "@radix-ui/react-popover";
|
|
4
|
+
import { c as F } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { useTranslation as ee } from "react-i18next";
|
|
6
|
+
import { I as oe } from "./icon-button-COX76Jdj.js";
|
|
7
|
+
import { u as te } from "./registry-DvAUVLHh.js";
|
|
8
|
+
import { c as q } from "./compose-refs-C0k0tdqF.js";
|
|
9
|
+
import { f as re, u as ne } from "./non-modal-tab-exit-j3CPOuE3.js";
|
|
10
|
+
import { X as se } from "./x-B5YnXwCz.js";
|
|
11
|
+
const ie = {
|
|
12
|
+
id: "popover",
|
|
13
|
+
capabilities: ["open", "close"],
|
|
14
|
+
state: {
|
|
15
|
+
isOpen: {
|
|
16
|
+
type: "boolean",
|
|
17
|
+
descriptionKey: "ui.agent.popover.state.isOpen",
|
|
18
|
+
description: "True when the popover is currently open.",
|
|
19
|
+
read: (e) => e.getIsOpen()
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
actions: {
|
|
23
|
+
open: {
|
|
24
|
+
safety: "read",
|
|
25
|
+
idempotent: !0,
|
|
26
|
+
descriptionKey: "ui.agent.popover.actions.open",
|
|
27
|
+
description: "Open the popover.",
|
|
28
|
+
invoke: (e) => {
|
|
29
|
+
e.open();
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
close: {
|
|
33
|
+
safety: "read",
|
|
34
|
+
idempotent: !0,
|
|
35
|
+
descriptionKey: "ui.agent.popover.actions.close",
|
|
36
|
+
description: "Close the popover.",
|
|
37
|
+
invoke: (e) => {
|
|
38
|
+
e.close();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
domHooks: {
|
|
43
|
+
root: { attr: "data-component", value: "popover" },
|
|
44
|
+
instanceId: {
|
|
45
|
+
attr: "data-component-id",
|
|
46
|
+
sourceProp: "id",
|
|
47
|
+
description: "Sourced from the id prop on Popover.Root."
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, D = k({
|
|
51
|
+
headingId: void 0,
|
|
52
|
+
setHeadingId: () => {
|
|
53
|
+
},
|
|
54
|
+
descriptionId: void 0,
|
|
55
|
+
setDescriptionId: () => {
|
|
56
|
+
}
|
|
57
|
+
}), G = k({
|
|
58
|
+
isHoverMode: !1,
|
|
59
|
+
clearHoverTimer: () => {
|
|
60
|
+
},
|
|
61
|
+
closeWithDelay: () => {
|
|
62
|
+
}
|
|
63
|
+
}), E = k(null);
|
|
64
|
+
function ae(e) {
|
|
65
|
+
var r;
|
|
66
|
+
if (!e) return null;
|
|
67
|
+
const o = (r = e.virtualAnchorRef.current) == null ? void 0 : r.current;
|
|
68
|
+
return e.triggerRef.current ? e.triggerRef.current : o instanceof HTMLElement ? o : e.anchorRef.current;
|
|
69
|
+
}
|
|
70
|
+
function de(e) {
|
|
71
|
+
if (e === "top" || e === "bottom") return e;
|
|
72
|
+
const o = typeof document < "u" && document.documentElement.dir === "rtl";
|
|
73
|
+
return e === "start" ? o ? "right" : "left" : o ? "left" : "right";
|
|
74
|
+
}
|
|
75
|
+
const ce = F(
|
|
76
|
+
[
|
|
77
|
+
// `--card-border` 32% alpha provides a subtle edge that survives dark
|
|
78
|
+
// without becoming a heavy outline. The previous transparent border
|
|
79
|
+
// relied on the drop-shadow alone, which reads as a faint halo against
|
|
80
|
+
// dark surfaces and lets the popover float as an unbounded blob; the
|
|
81
|
+
// earlier heavy `--border` (grey-800 since WCAG 1.4.11 bump in 67fef8c)
|
|
82
|
+
// overcorrected the other way and made the popover read as a charcoal
|
|
83
|
+
// box. The forced-colors override below upgrades the border to
|
|
84
|
+
// `CanvasText` so HCM still repaints a fully visible edge.
|
|
85
|
+
"ds:relative ds:bg-[var(--popover)] ds:border ds:border-[color:var(--card-border)] ds:rounded-[var(--radius-md)]",
|
|
86
|
+
"ds:p-[var(--spacing-md)]",
|
|
87
|
+
"ds:shadow-[var(--shadow-lg)]",
|
|
88
|
+
"ds:z-[var(--z-popover)]",
|
|
89
|
+
"ds:text-[var(--popover-foreground)] ds:text-[length:var(--font-size-sm)]",
|
|
90
|
+
"ds:break-words",
|
|
91
|
+
"ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out",
|
|
92
|
+
"ds:data-[state=closed]:fade-out-0 ds:data-[state=open]:fade-in-0",
|
|
93
|
+
"ds:data-[state=closed]:zoom-out-95 ds:data-[state=open]:zoom-in-95",
|
|
94
|
+
"ds:data-[side=bottom]:slide-in-from-top-2 ds:data-[side=left]:slide-in-from-right-2",
|
|
95
|
+
"ds:data-[side=right]:slide-in-from-left-2 ds:data-[side=top]:slide-in-from-bottom-2",
|
|
96
|
+
"ds:motion-reduce:transition-none ds:motion-reduce:animate-none",
|
|
97
|
+
"ds:forced-colors:border-[CanvasText]",
|
|
98
|
+
"ds:focus-visible:outline-none"
|
|
99
|
+
].join(" "),
|
|
100
|
+
{
|
|
101
|
+
variants: {
|
|
102
|
+
size: {
|
|
103
|
+
sm: "ds:max-w-[var(--popover-size-sm)]",
|
|
104
|
+
md: "ds:max-w-[var(--popover-size-md)]",
|
|
105
|
+
lg: "ds:max-w-[var(--popover-size-lg)]"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
defaultVariants: {
|
|
109
|
+
size: "md"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
), J = k(void 0);
|
|
113
|
+
function S({
|
|
114
|
+
openOn: e = "click",
|
|
115
|
+
children: o,
|
|
116
|
+
id: r,
|
|
117
|
+
open: t,
|
|
118
|
+
onOpenChange: n,
|
|
119
|
+
defaultOpen: s,
|
|
120
|
+
modal: u
|
|
121
|
+
}) {
|
|
122
|
+
const [j, I] = V(s ?? !1), T = t !== void 0, h = T ? t : j, a = C(
|
|
123
|
+
(w) => {
|
|
124
|
+
T || I(w), n == null || n(w);
|
|
125
|
+
},
|
|
126
|
+
[T, n]
|
|
127
|
+
), f = y(null), x = e === "hover" || e === "hover-or-click", c = C(() => {
|
|
128
|
+
f.current && (clearTimeout(f.current), f.current = null);
|
|
129
|
+
}, []), z = C(() => {
|
|
130
|
+
c(), f.current = setTimeout(() => {
|
|
131
|
+
a(!0);
|
|
132
|
+
}, 300);
|
|
133
|
+
}, [c, a]), b = C(() => {
|
|
134
|
+
c(), f.current = setTimeout(() => {
|
|
135
|
+
a(!1);
|
|
136
|
+
}, 300);
|
|
137
|
+
}, [c, a]);
|
|
138
|
+
N(() => () => c(), [c]);
|
|
139
|
+
const A = y(h);
|
|
140
|
+
N(() => {
|
|
141
|
+
A.current = h;
|
|
142
|
+
}, [h]);
|
|
143
|
+
const p = M(
|
|
144
|
+
() => ({
|
|
145
|
+
getIsOpen: () => A.current,
|
|
146
|
+
open: () => a(!0),
|
|
147
|
+
close: () => a(!1)
|
|
148
|
+
}),
|
|
149
|
+
[a]
|
|
150
|
+
);
|
|
151
|
+
te(ie, p, r);
|
|
152
|
+
const O = y(null), B = y(null), P = y(void 0), W = M(
|
|
153
|
+
() => ({
|
|
154
|
+
modal: u ?? !1,
|
|
155
|
+
close: () => a(!1),
|
|
156
|
+
triggerRef: O,
|
|
157
|
+
anchorRef: B,
|
|
158
|
+
virtualAnchorRef: P
|
|
159
|
+
}),
|
|
160
|
+
[u, a]
|
|
161
|
+
), [H, d] = V(void 0), [l, v] = V(
|
|
162
|
+
void 0
|
|
163
|
+
), L = x ? {
|
|
164
|
+
onMouseEnter: z,
|
|
165
|
+
onMouseLeave: b,
|
|
166
|
+
onFocus: () => {
|
|
167
|
+
c(), a(!0);
|
|
168
|
+
},
|
|
169
|
+
onBlur: b
|
|
170
|
+
} : {};
|
|
171
|
+
return /* @__PURE__ */ i(J.Provider, { value: r, children: /* @__PURE__ */ i(
|
|
172
|
+
D.Provider,
|
|
173
|
+
{
|
|
174
|
+
value: { headingId: H, setHeadingId: d, descriptionId: l, setDescriptionId: v },
|
|
175
|
+
children: /* @__PURE__ */ i(
|
|
176
|
+
G.Provider,
|
|
177
|
+
{
|
|
178
|
+
value: { isHoverMode: x, clearHoverTimer: c, closeWithDelay: b },
|
|
179
|
+
children: /* @__PURE__ */ i(E.Provider, { value: W, children: /* @__PURE__ */ i(
|
|
180
|
+
g.Root,
|
|
181
|
+
{
|
|
182
|
+
open: h,
|
|
183
|
+
onOpenChange: a,
|
|
184
|
+
modal: u,
|
|
185
|
+
children: x ? /* @__PURE__ */ i("span", { className: "ds:inline-flex", ...L, children: o }) : o
|
|
186
|
+
}
|
|
187
|
+
) })
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
}
|
|
191
|
+
) });
|
|
192
|
+
}
|
|
193
|
+
S.displayName = "Popover.Root";
|
|
194
|
+
const K = R(({ children: e, ...o }, r) => {
|
|
195
|
+
var s;
|
|
196
|
+
const t = (s = m(E)) == null ? void 0 : s.triggerRef, n = M(
|
|
197
|
+
() => q(r, t),
|
|
198
|
+
[r, t]
|
|
199
|
+
);
|
|
200
|
+
return /* @__PURE__ */ i(g.Trigger, { ref: n, ...o, children: e });
|
|
201
|
+
});
|
|
202
|
+
K.displayName = "Popover.Trigger";
|
|
203
|
+
const Q = R(({ virtualRef: e, ...o }, r) => {
|
|
204
|
+
const t = m(E), n = t == null ? void 0 : t.anchorRef, s = t == null ? void 0 : t.virtualAnchorRef, u = M(
|
|
205
|
+
() => q(r, n),
|
|
206
|
+
[r, n]
|
|
207
|
+
);
|
|
208
|
+
return N(() => {
|
|
209
|
+
if (s)
|
|
210
|
+
return s.current = e, () => {
|
|
211
|
+
s.current === e && (s.current = void 0);
|
|
212
|
+
};
|
|
213
|
+
}, [s, e]), /* @__PURE__ */ i(g.Anchor, { ref: u, virtualRef: e, ...o });
|
|
214
|
+
});
|
|
215
|
+
Q.displayName = "Popover.Anchor";
|
|
216
|
+
const U = R(
|
|
217
|
+
({
|
|
218
|
+
side: e = "bottom",
|
|
219
|
+
align: o = "center",
|
|
220
|
+
size: r = "md",
|
|
221
|
+
showArrow: t = !0,
|
|
222
|
+
className: n,
|
|
223
|
+
children: s,
|
|
224
|
+
onKeyDown: u,
|
|
225
|
+
onFocus: j,
|
|
226
|
+
onCloseAutoFocus: I,
|
|
227
|
+
...T
|
|
228
|
+
}, h) => {
|
|
229
|
+
const { headingId: a, descriptionId: f } = m(D), x = m(J), {
|
|
230
|
+
isHoverMode: c,
|
|
231
|
+
clearHoverTimer: z,
|
|
232
|
+
closeWithDelay: b
|
|
233
|
+
} = m(G), A = de(e), p = m(E), O = C(
|
|
234
|
+
(d) => ae(p) ?? re(d),
|
|
235
|
+
[p]
|
|
236
|
+
), B = ne(!(p != null && p.modal), {
|
|
237
|
+
getAnchor: O,
|
|
238
|
+
onReturnToTrigger: c || p == null ? void 0 : p.close
|
|
239
|
+
}), P = y(null), W = c ? {
|
|
240
|
+
onMouseEnter: z,
|
|
241
|
+
onMouseLeave: b,
|
|
242
|
+
onBlur: b
|
|
243
|
+
} : {}, H = j ?? (c ? z : void 0);
|
|
244
|
+
return /* @__PURE__ */ i(g.Portal, { children: /* @__PURE__ */ $(
|
|
245
|
+
g.Content,
|
|
246
|
+
{
|
|
247
|
+
ref: h,
|
|
248
|
+
side: A,
|
|
249
|
+
align: o,
|
|
250
|
+
sideOffset: 8,
|
|
251
|
+
collisionPadding: 8,
|
|
252
|
+
"aria-labelledby": a,
|
|
253
|
+
"aria-describedby": f,
|
|
254
|
+
className: ce({ size: r, className: n }),
|
|
255
|
+
"data-component": "popover",
|
|
256
|
+
"data-component-id": x,
|
|
257
|
+
...W,
|
|
258
|
+
...T,
|
|
259
|
+
onFocus: (d) => {
|
|
260
|
+
P.current = null, H == null || H(d);
|
|
261
|
+
},
|
|
262
|
+
onKeyDown: (d) => {
|
|
263
|
+
const l = d.currentTarget, v = l.ownerDocument, L = l.contains(v.activeElement);
|
|
264
|
+
u == null || u(d), B(d);
|
|
265
|
+
const w = !l.contains(v.activeElement);
|
|
266
|
+
d.key === "Tab" && L && w && (P.current = v);
|
|
267
|
+
},
|
|
268
|
+
onCloseAutoFocus: (d) => {
|
|
269
|
+
const l = P.current;
|
|
270
|
+
P.current = null;
|
|
271
|
+
const v = l == null ? void 0 : l.activeElement;
|
|
272
|
+
if (l && v && v !== l.body) {
|
|
273
|
+
d.preventDefault();
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
I == null || I(d);
|
|
277
|
+
},
|
|
278
|
+
children: [
|
|
279
|
+
s,
|
|
280
|
+
t && /* @__PURE__ */ i(
|
|
281
|
+
g.Arrow,
|
|
282
|
+
{
|
|
283
|
+
width: 12,
|
|
284
|
+
height: 6,
|
|
285
|
+
className: "ds:fill-[var(--popover)]"
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
) });
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
U.displayName = "Popover.Content";
|
|
294
|
+
const Y = R(
|
|
295
|
+
({ className: e }, o) => {
|
|
296
|
+
const { t: r } = ee("ui");
|
|
297
|
+
return /* @__PURE__ */ i(
|
|
298
|
+
"div",
|
|
299
|
+
{
|
|
300
|
+
className: [
|
|
301
|
+
"ds:absolute ds:top-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]",
|
|
302
|
+
e
|
|
303
|
+
].filter(Boolean).join(" "),
|
|
304
|
+
children: /* @__PURE__ */ i(g.Close, { asChild: !0, children: /* @__PURE__ */ i(
|
|
305
|
+
oe,
|
|
306
|
+
{
|
|
307
|
+
ref: o,
|
|
308
|
+
icon: /* @__PURE__ */ i(se, {}),
|
|
309
|
+
intent: "ghost",
|
|
310
|
+
size: "sm",
|
|
311
|
+
"aria-label": r("common.close", "Close")
|
|
312
|
+
}
|
|
313
|
+
) })
|
|
314
|
+
}
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
);
|
|
318
|
+
Y.displayName = "Popover.Close";
|
|
319
|
+
const Z = R(
|
|
320
|
+
({ as: e = "h3", className: o, ...r }, t) => {
|
|
321
|
+
const n = X(), { setHeadingId: s } = m(D);
|
|
322
|
+
return N(() => (s(n), () => s(void 0)), [n, s]), /* @__PURE__ */ i(
|
|
323
|
+
e,
|
|
324
|
+
{
|
|
325
|
+
ref: t,
|
|
326
|
+
id: n,
|
|
327
|
+
className: [
|
|
328
|
+
"type-title-item ds:leading-snug ds:break-words",
|
|
329
|
+
"ds:pe-[var(--spacing-xl)]",
|
|
330
|
+
o
|
|
331
|
+
].filter(Boolean).join(" "),
|
|
332
|
+
...r
|
|
333
|
+
}
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
);
|
|
337
|
+
Z.displayName = "Popover.Heading";
|
|
338
|
+
const _ = R(({ className: e, ...o }, r) => {
|
|
339
|
+
const t = X(), { setDescriptionId: n } = m(D);
|
|
340
|
+
return N(() => (n(t), () => n(void 0)), [t, n]), /* @__PURE__ */ i(
|
|
341
|
+
"div",
|
|
342
|
+
{
|
|
343
|
+
ref: r,
|
|
344
|
+
id: t,
|
|
345
|
+
className: [
|
|
346
|
+
"ds:text-[var(--muted-foreground)] type-body-sm ds:mt-[var(--spacing-xs)]",
|
|
347
|
+
e
|
|
348
|
+
].filter(Boolean).join(" "),
|
|
349
|
+
...o
|
|
350
|
+
}
|
|
351
|
+
);
|
|
352
|
+
});
|
|
353
|
+
_.displayName = "Popover.Description";
|
|
354
|
+
const Pe = Object.assign(S, {
|
|
355
|
+
Root: S,
|
|
356
|
+
Trigger: K,
|
|
357
|
+
Anchor: Q,
|
|
358
|
+
Content: U,
|
|
359
|
+
Close: Y,
|
|
360
|
+
Heading: Z,
|
|
361
|
+
Description: _
|
|
362
|
+
});
|
|
363
|
+
export {
|
|
364
|
+
Pe as P,
|
|
365
|
+
ie as p
|
|
366
|
+
};
|
|
367
|
+
//# sourceMappingURL=popover-BG75rYjN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover-BG75rYjN.js","sources":["../../src/components/popover/popover.agent.ts","../../src/components/popover/popover.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { PopoverHandle } from './popover';\n\nexport const popoverAgent: AgentAdapter<PopoverHandle> = {\n id: 'popover',\n capabilities: ['open', 'close'],\n state: {\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.popover.state.isOpen',\n description: 'True when the popover is currently open.',\n read: (handle) => handle.getIsOpen(),\n },\n },\n actions: {\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.popover.actions.open',\n description: 'Open the popover.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.popover.actions.close',\n description: 'Close the popover.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'popover' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop on Popover.Root.',\n },\n },\n};\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type HTMLAttributes,\n type MutableRefObject,\n type ReactNode,\n} from 'react';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { X } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { useAgentRegistration } from '../../agent';\nimport { composeRefs } from '../_shared/compose-refs';\nimport {\n findPopoverTrigger,\n useNonModalTabExit,\n} from '../_shared/non-modal-tab-exit';\nimport { popoverAgent } from './popover.agent';\n\ninterface PopoverA11yContext {\n headingId: string | undefined;\n setHeadingId: (id: string | undefined) => void;\n descriptionId: string | undefined;\n setDescriptionId: (id: string | undefined) => void;\n}\n\nconst A11yContext = createContext<PopoverA11yContext>({\n headingId: undefined,\n setHeadingId: () => {},\n descriptionId: undefined,\n setDescriptionId: () => {},\n});\n\ninterface PopoverHoverContext {\n isHoverMode: boolean;\n clearHoverTimer: () => void;\n closeWithDelay: () => void;\n}\n\nconst HoverContext = createContext<PopoverHoverContext>({\n isHoverMode: false,\n clearHoverTimer: () => {},\n closeWithDelay: () => {},\n});\n\ntype VirtualAnchorRef = ComponentPropsWithoutRef<\n typeof RadixPopover.Anchor\n>['virtualRef'];\n\n// Where a non-modal popover sits in reading order: Tab leaves to just after\n// its trigger, or its anchor when there is no trigger.\ninterface PopoverPlacementContext {\n modal: boolean;\n close: () => void;\n triggerRef: MutableRefObject<HTMLElement | null>;\n anchorRef: MutableRefObject<HTMLElement | null>;\n virtualAnchorRef: MutableRefObject<VirtualAnchorRef>;\n}\n\nconst PlacementContext = createContext<PopoverPlacementContext | null>(null);\n\nfunction resolveAnchor(\n placement: PopoverPlacementContext | null,\n): HTMLElement | null {\n if (!placement) return null;\n const virtual = placement.virtualAnchorRef.current?.current;\n if (placement.triggerRef.current) return placement.triggerRef.current;\n if (virtual instanceof HTMLElement) return virtual;\n return placement.anchorRef.current;\n}\n\nfunction resolvePhysicalSide(\n logicalSide: 'start' | 'top' | 'end' | 'bottom',\n): 'left' | 'top' | 'right' | 'bottom' {\n if (logicalSide === 'top' || logicalSide === 'bottom') return logicalSide;\n const isRtl =\n typeof document !== 'undefined' && document.documentElement.dir === 'rtl';\n if (logicalSide === 'start') return isRtl ? 'right' : 'left';\n /* logicalSide === 'end' */\n return isRtl ? 'left' : 'right';\n}\n\nconst contentVariants = cva(\n [\n // `--card-border` 32% alpha provides a subtle edge that survives dark\n // without becoming a heavy outline. The previous transparent border\n // relied on the drop-shadow alone, which reads as a faint halo against\n // dark surfaces and lets the popover float as an unbounded blob; the\n // earlier heavy `--border` (grey-800 since WCAG 1.4.11 bump in 67fef8c)\n // overcorrected the other way and made the popover read as a charcoal\n // box. The forced-colors override below upgrades the border to\n // `CanvasText` so HCM still repaints a fully visible edge.\n 'ds:relative ds:bg-[var(--popover)] ds:border ds:border-[color:var(--card-border)] ds:rounded-[var(--radius-md)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:z-[var(--z-popover)]',\n 'ds:text-[var(--popover-foreground)] ds:text-[length:var(--font-size-sm)]',\n 'ds:break-words',\n 'ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out',\n 'ds:data-[state=closed]:fade-out-0 ds:data-[state=open]:fade-in-0',\n 'ds:data-[state=closed]:zoom-out-95 ds:data-[state=open]:zoom-in-95',\n 'ds:data-[side=bottom]:slide-in-from-top-2 ds:data-[side=left]:slide-in-from-right-2',\n 'ds:data-[side=right]:slide-in-from-left-2 ds:data-[side=top]:slide-in-from-bottom-2',\n 'ds:motion-reduce:transition-none ds:motion-reduce:animate-none',\n 'ds:forced-colors:border-[CanvasText]',\n 'ds:focus-visible:outline-none',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:max-w-[var(--popover-size-sm)]',\n md: 'ds:max-w-[var(--popover-size-md)]',\n lg: 'ds:max-w-[var(--popover-size-lg)]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\n// Curated agent-readiness handle — see popover.agent.ts.\nexport interface PopoverHandle {\n getIsOpen: () => boolean;\n open: () => void;\n close: () => void;\n}\n\nexport interface PopoverRootProps extends ComponentPropsWithoutRef<\n typeof RadixPopover.Root\n> {\n openOn?: 'click' | 'hover' | 'hover-or-click';\n /** Opaque instance id — forwarded to Popover.Content as `data-component-id`. */\n id?: string;\n children: ReactNode;\n}\n\nconst PopoverIdContext = createContext<string | undefined>(undefined);\n\nfunction PopoverRoot({\n openOn = 'click',\n children,\n id,\n open: controlledOpen,\n onOpenChange,\n defaultOpen,\n modal,\n}: PopoverRootProps) {\n const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : internalOpen;\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n if (!isControlled) setInternalOpen(nextOpen);\n onOpenChange?.(nextOpen);\n },\n [isControlled, onOpenChange],\n );\n\n const hoverTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const isHoverMode = openOn === 'hover' || openOn === 'hover-or-click';\n\n const clearHoverTimer = useCallback(() => {\n if (hoverTimerRef.current) {\n clearTimeout(hoverTimerRef.current);\n hoverTimerRef.current = null;\n }\n }, []);\n\n const openWithDelay = useCallback(() => {\n clearHoverTimer();\n hoverTimerRef.current = setTimeout(() => {\n handleOpenChange(true);\n }, 300);\n }, [clearHoverTimer, handleOpenChange]);\n\n const closeWithDelay = useCallback(() => {\n clearHoverTimer();\n hoverTimerRef.current = setTimeout(() => {\n handleOpenChange(false);\n }, 300);\n }, [clearHoverTimer, handleOpenChange]);\n\n useEffect(() => {\n return () => clearHoverTimer();\n }, [clearHoverTimer]);\n\n // Agent handle.\n const openRef = useRef(isOpen);\n useEffect(() => {\n openRef.current = isOpen;\n }, [isOpen]);\n\n const agentHandle = useMemo<PopoverHandle>(\n () => ({\n getIsOpen: () => openRef.current,\n open: () => handleOpenChange(true),\n close: () => handleOpenChange(false),\n }),\n [handleOpenChange],\n );\n useAgentRegistration(popoverAgent, agentHandle, id);\n\n const triggerRef = useRef<HTMLElement | null>(null);\n const anchorRef = useRef<HTMLElement | null>(null);\n const virtualAnchorRef = useRef<VirtualAnchorRef>(undefined);\n const placement = useMemo<PopoverPlacementContext>(\n () => ({\n modal: modal ?? false,\n close: () => handleOpenChange(false),\n triggerRef,\n anchorRef,\n virtualAnchorRef,\n }),\n [modal, handleOpenChange],\n );\n\n /* a11y context state */\n const [headingId, setHeadingId] = useState<string | undefined>(undefined);\n const [descriptionId, setDescriptionId] = useState<string | undefined>(\n undefined,\n );\n\n const hoverHandlers = isHoverMode\n ? {\n onMouseEnter: openWithDelay,\n onMouseLeave: closeWithDelay,\n onFocus: () => {\n clearHoverTimer();\n handleOpenChange(true);\n },\n onBlur: closeWithDelay,\n }\n : {};\n\n return (\n <PopoverIdContext.Provider value={id}>\n <A11yContext.Provider\n value={{ headingId, setHeadingId, descriptionId, setDescriptionId }}\n >\n <HoverContext.Provider\n value={{ isHoverMode, clearHoverTimer, closeWithDelay }}\n >\n <PlacementContext.Provider value={placement}>\n <RadixPopover.Root\n open={isOpen}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n {isHoverMode ? (\n <span className=\"ds:inline-flex\" {...hoverHandlers}>\n {children}\n </span>\n ) : (\n children\n )}\n </RadixPopover.Root>\n </PlacementContext.Provider>\n </HoverContext.Provider>\n </A11yContext.Provider>\n </PopoverIdContext.Provider>\n );\n}\nPopoverRoot.displayName = 'Popover.Root';\n\nconst PopoverTrigger = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef<typeof RadixPopover.Trigger>\n>(({ children, ...props }, ref) => {\n const triggerRef = useContext(PlacementContext)?.triggerRef;\n const composedRef = useMemo(\n () => composeRefs<HTMLElement>(ref, triggerRef),\n [ref, triggerRef],\n );\n return (\n <RadixPopover.Trigger ref={composedRef} {...props}>\n {children}\n </RadixPopover.Trigger>\n );\n});\nPopoverTrigger.displayName = 'Popover.Trigger';\n\n// Positions Content against an arbitrary element when a Trigger button is\n// unsuitable (e.g. an editor on a role=tab). Wraps Radix to record the anchor\n// for Tab order; props and ref pass straight through.\nconst PopoverAnchor = forwardRef<\n ElementRef<typeof RadixPopover.Anchor>,\n ComponentPropsWithoutRef<typeof RadixPopover.Anchor>\n>(({ virtualRef, ...props }, ref) => {\n const placement = useContext(PlacementContext);\n const anchorRef = placement?.anchorRef;\n const virtualAnchorRef = placement?.virtualAnchorRef;\n const composedRef = useMemo(\n () => composeRefs<HTMLElement>(ref, anchorRef),\n [ref, anchorRef],\n );\n useEffect(() => {\n if (!virtualAnchorRef) return;\n virtualAnchorRef.current = virtualRef;\n return () => {\n if (virtualAnchorRef.current === virtualRef) {\n virtualAnchorRef.current = undefined;\n }\n };\n }, [virtualAnchorRef, virtualRef]);\n return (\n <RadixPopover.Anchor ref={composedRef} virtualRef={virtualRef} {...props} />\n );\n});\nPopoverAnchor.displayName = 'Popover.Anchor';\n\nexport interface PopoverContentProps\n extends\n Omit<\n ComponentPropsWithoutRef<typeof RadixPopover.Content>,\n 'side' | 'align'\n >,\n VariantProps<typeof contentVariants> {\n side?: 'start' | 'top' | 'end' | 'bottom';\n align?: 'start' | 'center' | 'end';\n size?: 'sm' | 'md' | 'lg';\n showArrow?: boolean;\n className?: string;\n children: ReactNode;\n}\n\nconst PopoverContent = forwardRef<HTMLDivElement, PopoverContentProps>(\n (\n {\n side = 'bottom',\n align = 'center',\n size = 'md',\n showArrow = true,\n className,\n children,\n onKeyDown,\n onFocus,\n onCloseAutoFocus,\n ...props\n },\n ref,\n ) => {\n const { headingId, descriptionId } = useContext(A11yContext);\n const instanceId = useContext(PopoverIdContext);\n const {\n isHoverMode: isHover,\n clearHoverTimer: cancelTimer,\n closeWithDelay: delayClose,\n } = useContext(HoverContext);\n const physicalSide = resolvePhysicalSide(side);\n\n const placement = useContext(PlacementContext);\n const getAnchor = useCallback(\n (content: HTMLElement) =>\n resolveAnchor(placement) ?? findPopoverTrigger(content),\n [placement],\n );\n // A hover popover shows while its trigger has focus, so it stays open there.\n const exitOnTab = useNonModalTabExit(!placement?.modal, {\n getAnchor,\n onReturnToTrigger: isHover ? undefined : placement?.close,\n });\n // The document Tab carried focus out into. If focus still rests there when\n // the popover closes, the consumer's focus return is skipped.\n const tabbedOutRef = useRef<Document | null>(null);\n\n const contentHoverHandlers = isHover\n ? {\n onMouseEnter: cancelTimer,\n onMouseLeave: delayClose,\n onBlur: delayClose,\n }\n : {};\n const handleFocus = onFocus ?? (isHover ? cancelTimer : undefined);\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n ref={ref}\n side={physicalSide}\n align={align}\n sideOffset={8}\n collisionPadding={8}\n aria-labelledby={headingId}\n aria-describedby={descriptionId}\n className={contentVariants({ size, className })}\n data-component=\"popover\"\n data-component-id={instanceId}\n {...contentHoverHandlers}\n {...props}\n onFocus={(event) => {\n tabbedOutRef.current = null;\n handleFocus?.(event);\n }}\n onKeyDown={(event) => {\n const content = event.currentTarget;\n const doc = content.ownerDocument;\n const wasInside = content.contains(doc.activeElement);\n onKeyDown?.(event);\n exitOnTab(event);\n const isOut = !content.contains(doc.activeElement);\n if (event.key === 'Tab' && wasInside && isOut) {\n tabbedOutRef.current = doc;\n }\n }}\n onCloseAutoFocus={(event) => {\n const doc = tabbedOutRef.current;\n tabbedOutRef.current = null;\n const resting = doc?.activeElement;\n if (doc && resting && resting !== doc.body) {\n event.preventDefault();\n return;\n }\n onCloseAutoFocus?.(event);\n }}\n >\n {children}\n {showArrow && (\n <RadixPopover.Arrow\n width={12}\n height={6}\n className=\"ds:fill-[var(--popover)]\"\n />\n )}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\nconst PopoverClose = forwardRef<HTMLButtonElement, { className?: string }>(\n ({ className }, ref) => {\n const { t } = useTranslation('ui');\n\n return (\n <div\n className={[\n 'ds:absolute ds:top-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <RadixPopover.Close asChild>\n <IconButton\n ref={ref}\n icon={<X />}\n intent=\"ghost\"\n size=\"sm\"\n aria-label={t('common.close', 'Close')}\n />\n </RadixPopover.Close>\n </div>\n );\n },\n);\nPopoverClose.displayName = 'Popover.Close';\n\ninterface PopoverHeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n as?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n}\n\nconst PopoverHeading = forwardRef<HTMLHeadingElement, PopoverHeadingProps>(\n ({ as: Tag = 'h3', className, ...props }, ref) => {\n const generatedId = useId();\n const { setHeadingId } = useContext(A11yContext);\n\n useEffect(() => {\n setHeadingId(generatedId);\n return () => setHeadingId(undefined);\n }, [generatedId, setHeadingId]);\n\n return (\n <Tag\n ref={ref}\n id={generatedId}\n className={[\n 'type-title-item ds:leading-snug ds:break-words',\n 'ds:pe-[var(--spacing-xl)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n );\n },\n);\nPopoverHeading.displayName = 'Popover.Heading';\n\n/**\n * The popover's description region.\n *\n * A `div`, not a `p`. A popover body routinely holds structured content —\n * the calendar's hover peek puts `KeyValuePair`s in here — and a `p` may\n * only contain phrasing content, so the browser silently closed the\n * paragraph and re-parented the rest. That breaks the DOM the\n * `aria-describedby` region points at, so the description a screen reader\n * announces was not the description on screen. React said so on every\n * open: \"validateDOMNesting: <div> cannot appear as a descendant of <p>\".\n *\n * The accessible wiring is by id, not by tag, so nothing about the\n * announcement depends on the element being a paragraph.\n */\nconst PopoverDescription = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const generatedId = useId();\n const { setDescriptionId } = useContext(A11yContext);\n\n useEffect(() => {\n setDescriptionId(generatedId);\n return () => setDescriptionId(undefined);\n }, [generatedId, setDescriptionId]);\n\n return (\n <div\n ref={ref}\n id={generatedId}\n className={[\n 'ds:text-[var(--muted-foreground)] type-body-sm ds:mt-[var(--spacing-xs)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n );\n});\nPopoverDescription.displayName = 'Popover.Description';\n\nexport const Popover = Object.assign(PopoverRoot, {\n Root: PopoverRoot,\n Trigger: PopoverTrigger,\n Anchor: PopoverAnchor,\n Content: PopoverContent,\n Close: PopoverClose,\n Heading: PopoverHeading,\n Description: PopoverDescription,\n});\n\nexport type { PopoverRootProps as PopoverProps, PopoverHeadingProps };\n"],"names":["popoverAgent","handle","A11yContext","createContext","HoverContext","PlacementContext","resolveAnchor","placement","virtual","_a","resolvePhysicalSide","logicalSide","isRtl","contentVariants","cva","PopoverIdContext","PopoverRoot","openOn","children","id","controlledOpen","onOpenChange","defaultOpen","modal","internalOpen","setInternalOpen","useState","isControlled","isOpen","handleOpenChange","useCallback","nextOpen","hoverTimerRef","useRef","isHoverMode","clearHoverTimer","openWithDelay","closeWithDelay","useEffect","openRef","agentHandle","useMemo","useAgentRegistration","triggerRef","anchorRef","virtualAnchorRef","headingId","setHeadingId","descriptionId","setDescriptionId","hoverHandlers","jsx","RadixPopover","PopoverTrigger","forwardRef","props","ref","useContext","composedRef","composeRefs","PopoverAnchor","virtualRef","PopoverContent","side","align","size","showArrow","className","onKeyDown","onFocus","onCloseAutoFocus","instanceId","isHover","cancelTimer","delayClose","physicalSide","getAnchor","content","findPopoverTrigger","exitOnTab","useNonModalTabExit","tabbedOutRef","contentHoverHandlers","handleFocus","jsxs","event","doc","wasInside","isOut","resting","PopoverClose","t","useTranslation","IconButton","X","PopoverHeading","Tag","generatedId","useId","PopoverDescription","Popover"],"mappings":";;;;;;;;;;AAGO,MAAMA,KAA4C;AAAA,EACvD,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,OAAO;AAAA,EAC9B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,EACrC;AAAA,EAEF,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,KAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,MAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM,EAAE,MAAM,kBAAkB,OAAO,UAAA;AAAA,IACvC,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GCNMC,IAAcC,EAAkC;AAAA,EACpD,WAAW;AAAA,EACX,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,eAAe;AAAA,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