@alfadocs/ui-kit-debug 1.90.1 → 1.91.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/address-autocomplete-DR4Xn23Z.js +519 -0
- package/dist/_chunks/address-autocomplete-DR4Xn23Z.js.map +1 -0
- package/dist/_chunks/{address-fields-CfnXK8RT.js → address-fields-qxQkGwPf.js} +5 -5
- package/dist/_chunks/{address-fields-CfnXK8RT.js.map → address-fields-qxQkGwPf.js.map} +1 -1
- package/dist/_chunks/{agenda-card-BDuvreCe.js → agenda-card-BhY342MA.js} +2 -2
- package/dist/_chunks/{agenda-card-BDuvreCe.js.map → agenda-card-BhY342MA.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-D-jvptdo.js → agenda-tray-BmxBGEci.js} +2 -2
- package/dist/_chunks/{agenda-tray-D-jvptdo.js.map → agenda-tray-BmxBGEci.js.map} +1 -1
- package/dist/_chunks/{ai-permission-notice-CoW22jx1.js → ai-permission-notice-VNh3W57L.js} +2 -2
- package/dist/_chunks/{ai-permission-notice-CoW22jx1.js.map → ai-permission-notice-VNh3W57L.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-CsTRAxC8.js → alia-sidebar-ovRX_oti.js} +3 -3
- package/dist/_chunks/{alia-sidebar-CsTRAxC8.js.map → alia-sidebar-ovRX_oti.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js → anamnesis-summary-rows-EKPfVCmh.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js.map → anamnesis-summary-rows-EKPfVCmh.js.map} +1 -1
- package/dist/_chunks/{appointment-card-5JMWi9_f.js → appointment-card-Bstc1p7a.js} +2 -2
- package/dist/_chunks/{appointment-card-5JMWi9_f.js.map → appointment-card-Bstc1p7a.js.map} +1 -1
- package/dist/_chunks/{appointment-peek-39BwVMUf.js → appointment-peek-C0kKqnFk.js} +2 -2
- package/dist/_chunks/{appointment-peek-39BwVMUf.js.map → appointment-peek-C0kKqnFk.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-1-Za2miy.js → appointment-timeline-rbt9AwHO.js} +2 -2
- package/dist/_chunks/{appointment-timeline-1-Za2miy.js.map → appointment-timeline-rbt9AwHO.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-Dwc8MSIQ.js → appointment-tray-6zd8RLIL.js} +2 -2
- package/dist/_chunks/{appointment-tray-Dwc8MSIQ.js.map → appointment-tray-6zd8RLIL.js.map} +1 -1
- package/dist/_chunks/autocomplete-BXMcNoa3.js +562 -0
- package/dist/_chunks/autocomplete-BXMcNoa3.js.map +1 -0
- package/dist/_chunks/{avatar-BPiPL7ND.js → avatar-a6042Ox2.js} +52 -52
- package/dist/_chunks/avatar-a6042Ox2.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js → balance-badge-cell-BtJvre1-.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js.map → balance-badge-cell-BtJvre1-.js.map} +1 -1
- package/dist/_chunks/booking-opt_h7Uc.js +4590 -0
- package/dist/_chunks/booking-opt_h7Uc.js.map +1 -0
- package/dist/_chunks/{calendar-ClB-jWH1.js → calendar-CmiMS4FJ.js} +2 -2
- package/dist/_chunks/{calendar-ClB-jWH1.js.map → calendar-CmiMS4FJ.js.map} +1 -1
- package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js → calendar-appointment-editor-dialog-sJKLoVJ2.js} +11 -11
- package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js.map → calendar-appointment-editor-dialog-sJKLoVJ2.js.map} +1 -1
- package/dist/_chunks/{care-plan-card-BYCPNDvA.js → care-plan-card-DD9rEWYN.js} +2 -2
- package/dist/_chunks/{care-plan-card-BYCPNDvA.js.map → care-plan-card-DD9rEWYN.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-BzsAg6oY.js → care-plan-header-CXUJQt8Q.js} +2 -2
- package/dist/_chunks/{care-plan-header-BzsAg6oY.js.map → care-plan-header-CXUJQt8Q.js.map} +1 -1
- package/dist/_chunks/{chat-message-CmFJdEre.js → chat-message-LRO_6Ee3.js} +2 -2
- package/dist/_chunks/{chat-message-CmFJdEre.js.map → chat-message-LRO_6Ee3.js.map} +1 -1
- package/dist/_chunks/{checkbox-BjDv-r3o.js → checkbox-a7Sh-dXb.js} +32 -31
- package/dist/_chunks/checkbox-a7Sh-dXb.js.map +1 -0
- package/dist/_chunks/{checkbox-group-Cw2H5qaq.js → checkbox-group-eGdv9fZc.js} +2 -2
- package/dist/_chunks/{checkbox-group-Cw2H5qaq.js.map → checkbox-group-eGdv9fZc.js.map} +1 -1
- package/dist/_chunks/{city-input-CJVGswxp.js → city-input-CA59CjnV.js} +2 -2
- package/dist/_chunks/{city-input-CJVGswxp.js.map → city-input-CA59CjnV.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-Caidqcwa.js → clinical-note-card-Cut2lNmu.js} +3 -3
- package/dist/_chunks/{clinical-note-card-Caidqcwa.js.map → clinical-note-card-Cut2lNmu.js.map} +1 -1
- package/dist/_chunks/{combobox-CDPm_n0p.js → combobox-D-gpgEDy.js} +314 -294
- package/dist/_chunks/combobox-D-gpgEDy.js.map +1 -0
- package/dist/_chunks/{contact-card-Czu60UvU.js → contact-card-ClvEDM9e.js} +2 -2
- package/dist/_chunks/{contact-card-Czu60UvU.js.map → contact-card-ClvEDM9e.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-Da1vmJQI.js → contact-profile-card-CX45mZA3.js} +106 -95
- package/dist/_chunks/contact-profile-card-CX45mZA3.js.map +1 -0
- package/dist/_chunks/{country-select-DQ8q7ypA.js → country-select-BfmX9y5i.js} +2 -2
- package/dist/_chunks/{country-select-DQ8q7ypA.js.map → country-select-BfmX9y5i.js.map} +1 -1
- package/dist/_chunks/{data-table-B_IcS0Ke.js → data-table-CqQgoNsU.js} +2 -2
- package/dist/_chunks/{data-table-B_IcS0Ke.js.map → data-table-CqQgoNsU.js.map} +1 -1
- package/dist/_chunks/{dependent-selector-C4kOgO8b.js → dependent-selector-CyNi7M_f.js} +2 -2
- package/dist/_chunks/{dependent-selector-C4kOgO8b.js.map → dependent-selector-CyNi7M_f.js.map} +1 -1
- package/dist/_chunks/{entity-summary-BLxzSSXK.js → entity-summary-B_bOloqP.js} +3 -3
- package/dist/_chunks/{entity-summary-BLxzSSXK.js.map → entity-summary-B_bOloqP.js.map} +1 -1
- package/dist/_chunks/error-page-B0fGNTRB.js +419 -0
- package/dist/_chunks/error-page-B0fGNTRB.js.map +1 -0
- package/dist/_chunks/{face-scheme-BgJGFDTa.js → face-scheme-BKSE98bo.js} +2 -2
- package/dist/_chunks/{face-scheme-BgJGFDTa.js.map → face-scheme-BKSE98bo.js.map} +1 -1
- package/dist/_chunks/{file-manager-C9YOT-Dn.js → file-manager-BnI1ZWZu.js} +2 -2
- package/dist/_chunks/{file-manager-C9YOT-Dn.js.map → file-manager-BnI1ZWZu.js.map} +1 -1
- package/dist/_chunks/{header-settings-BVhjndtV.js → header-settings-BeA2fnol.js} +24 -23
- package/dist/_chunks/header-settings-BeA2fnol.js.map +1 -0
- package/dist/_chunks/{heatmap-HTz3Jvzy.js → heatmap-fCxwNz2o.js} +2 -2
- package/dist/_chunks/{heatmap-HTz3Jvzy.js.map → heatmap-fCxwNz2o.js.map} +1 -1
- package/dist/_chunks/{languages-CZqBaPwI.js → languages-CGLX6Qpe.js} +3 -15
- package/dist/_chunks/languages-CGLX6Qpe.js.map +1 -0
- package/dist/_chunks/link-DtCfnLnF.js +332 -0
- package/dist/_chunks/link-DtCfnLnF.js.map +1 -0
- package/dist/_chunks/{link-cell-renderer-C0ynDik7.js → link-cell-renderer-BS3V4LA6.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-C0ynDik7.js.map → link-cell-renderer-BS3V4LA6.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-DYwbL5sD.js → login-dev-card-BZBR58mu.js} +2 -2
- package/dist/_chunks/{login-dev-card-DYwbL5sD.js.map → login-dev-card-BZBR58mu.js.map} +1 -1
- package/dist/_chunks/{map-view-Bvi06RVh.js → map-view-UrNgxBy3.js} +260 -237
- package/dist/_chunks/map-view-UrNgxBy3.js.map +1 -0
- package/dist/_chunks/{index.modern-BeRXQVdc.js → maps-core-gate-DkNqGkm3.js} +360 -319
- package/dist/_chunks/maps-core-gate-DkNqGkm3.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js → marketplace-app-shell-CJQtx3sv.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js.map → marketplace-app-shell-CJQtx3sv.js.map} +1 -1
- package/dist/_chunks/{message-card-CvCnCssc.js → message-card-B6SduXJv.js} +2 -2
- package/dist/_chunks/{message-card-CvCnCssc.js.map → message-card-B6SduXJv.js.map} +1 -1
- package/dist/_chunks/{message-tray-IJYvy6Cf.js → message-tray-Cllf-v0G.js} +2 -2
- package/dist/_chunks/{message-tray-IJYvy6Cf.js.map → message-tray-Cllf-v0G.js.map} +1 -1
- package/dist/_chunks/{nav-grid-Oc4aCPrg.js → nav-grid-D2xVcHTO.js} +2 -2
- package/dist/_chunks/{nav-grid-Oc4aCPrg.js.map → nav-grid-D2xVcHTO.js.map} +1 -1
- package/dist/_chunks/{note-attachment-DIlIQ7JF.js → note-attachment-cnj2JRrg.js} +2 -2
- package/dist/_chunks/{note-attachment-DIlIQ7JF.js.map → note-attachment-cnj2JRrg.js.map} +1 -1
- package/dist/_chunks/{note-timeline-KzL52MmB.js → note-timeline-BrjHBQfx.js} +2 -2
- package/dist/_chunks/{note-timeline-KzL52MmB.js.map → note-timeline-BrjHBQfx.js.map} +1 -1
- package/dist/_chunks/{notes-panel-CZO1qsD-.js → notes-panel-ib7I3aNf.js} +3 -3
- package/dist/_chunks/{notes-panel-CZO1qsD-.js.map → notes-panel-ib7I3aNf.js.map} +1 -1
- package/dist/_chunks/{operator-hero-6aAIQaFZ.js → operator-hero-C_5B-8Qp.js} +43 -41
- package/dist/_chunks/operator-hero-C_5B-8Qp.js.map +1 -0
- package/dist/_chunks/{patient-details-D0P5eog5.js → patient-details-BjcUpD9S.js} +3 -3
- package/dist/_chunks/{patient-details-D0P5eog5.js.map → patient-details-BjcUpD9S.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-R73dZJY6.js → patient-field-row-B0tdiaWi.js} +6 -6
- package/dist/_chunks/{patient-field-row-R73dZJY6.js.map → patient-field-row-B0tdiaWi.js.map} +1 -1
- package/dist/_chunks/patient-search-Ca9j5cWb.js +1306 -0
- package/dist/_chunks/patient-search-Ca9j5cWb.js.map +1 -0
- package/dist/_chunks/{patient-summary-card-6U74-ivO.js → patient-summary-card-Cvv6_Ugk.js} +4 -4
- package/dist/_chunks/{patient-summary-card-6U74-ivO.js.map → patient-summary-card-Cvv6_Ugk.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-MndSlVoK.js → payment-request-card-BfGauFY0.js} +2 -2
- package/dist/_chunks/{payment-request-card-MndSlVoK.js.map → payment-request-card-BfGauFY0.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js → periodontal-diagnosis-DD3hrg9X.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js.map → periodontal-diagnosis-DD3hrg9X.js.map} +1 -1
- package/dist/_chunks/{permission-matrix-BoQjENGV.js → permission-matrix-BJ6sg3Zp.js} +3 -3
- package/dist/_chunks/{permission-matrix-BoQjENGV.js.map → permission-matrix-BJ6sg3Zp.js.map} +1 -1
- package/dist/_chunks/{practice-profile-hero-qfrsFQI_.js → practice-profile-hero-ClzE-4CB.js} +76 -73
- package/dist/_chunks/practice-profile-hero-ClzE-4CB.js.map +1 -0
- package/dist/_chunks/{practice-results-B61krlwu.js → practice-results-CQ_KvEXK.js} +517 -514
- package/dist/_chunks/practice-results-CQ_KvEXK.js.map +1 -0
- package/dist/_chunks/{product-hub-panel-Blag8t8f.js → product-hub-panel-bHi7lkVD.js} +2 -2
- package/dist/_chunks/{product-hub-panel-Blag8t8f.js.map → product-hub-panel-bHi7lkVD.js.map} +1 -1
- package/dist/_chunks/{province-select-CPdTwEob.js → province-select-D64whw0m.js} +2 -2
- package/dist/_chunks/{province-select-CPdTwEob.js.map → province-select-D64whw0m.js.map} +1 -1
- package/dist/_chunks/public-footer-IoRWoAMz.js +596 -0
- package/dist/_chunks/public-footer-IoRWoAMz.js.map +1 -0
- package/dist/_chunks/{registration-form-DmP3YUfp.js → registration-form-CRm6DaB9.js} +2 -2
- package/dist/_chunks/{registration-form-DmP3YUfp.js.map → registration-form-CRm6DaB9.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-UzQQLb-z.js → reviews-panel-B7InBORU.js} +42 -41
- package/dist/_chunks/reviews-panel-B7InBORU.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-BZTyxQBd.js → rich-text-editor-BfEu57dk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-BZTyxQBd.js.map → rich-text-editor-BfEu57dk.js.map} +1 -1
- package/dist/_chunks/{signature-request-DjY-X62H.js → signature-request-DvhyrRpn.js} +3 -3
- package/dist/_chunks/{signature-request-DjY-X62H.js.map → signature-request-DvhyrRpn.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-G-3ATOdu.js → signed-out-frame-CgRXOUzi.js} +2 -2
- package/dist/_chunks/{signed-out-frame-G-3ATOdu.js.map → signed-out-frame-CgRXOUzi.js.map} +1 -1
- package/dist/_chunks/{slot-grid-Bb13H9Rl.js → slot-grid-B-IAFX3C.js} +183 -170
- package/dist/_chunks/slot-grid-B-IAFX3C.js.map +1 -0
- package/dist/_chunks/{task-editor-BOETWbjU.js → task-editor-CI1SKUNc.js} +2 -2
- package/dist/_chunks/{task-editor-BOETWbjU.js.map → task-editor-CI1SKUNc.js.map} +1 -1
- package/dist/_chunks/{timeline-wUuTDFY_.js → timeline-BcYHdP56.js} +2 -2
- package/dist/_chunks/{timeline-wUuTDFY_.js.map → timeline-BcYHdP56.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js → use-appointment-details-read-D8vDg0sg.js} +5 -5
- package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js.map → use-appointment-details-read-D8vDg0sg.js.map} +1 -1
- package/dist/_chunks/{voice-control-panel-BziKE-KK.js → voice-control-panel-BP0otrID.js} +2 -2
- package/dist/_chunks/{voice-control-panel-BziKE-KK.js.map → voice-control-panel-BP0otrID.js.map} +1 -1
- package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js → workflow-webhook-action-B_nBJ_ht.js} +2 -2
- package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js.map → workflow-webhook-action-B_nBJ_ht.js.map} +1 -1
- package/dist/agent-catalog.json +3 -3
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/_shared/maps-core-gate.d.ts +18 -0
- package/dist/components/_shared/maps-core-gate.d.ts.map +1 -0
- package/dist/components/_shared/social-brand-icons.d.ts +29 -0
- package/dist/components/_shared/social-brand-icons.d.ts.map +1 -0
- package/dist/components/address-autocomplete/address-autocomplete.d.ts.map +1 -1
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- 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/autocomplete/autocomplete.agent.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/avatar/avatar.d.ts +14 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/booking/booking-types.d.ts +26 -0
- package/dist/components/booking/booking-types.d.ts.map +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/booking/slot-load-state.d.ts +11 -0
- package/dist/components/booking/slot-load-state.d.ts.map +1 -0
- package/dist/components/calendar/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/chat-message/index.js +1 -1
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/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/country-select/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +2 -1
- package/dist/components/header-settings/header-settings.d.ts.map +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/link.d.ts +10 -1
- package/dist/components/link/link.d.ts.map +1 -1
- package/dist/components/link/social-url.d.ts +71 -0
- package/dist/components/link/social-url.d.ts.map +1 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +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/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +6 -0
- package/dist/components/operator-hero/operator-hero.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-search/patient-search.d.ts.map +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +6 -0
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts.map +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +8 -2
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-footer/public-footer.d.ts +13 -1
- package/dist/components/public-footer/public-footer.d.ts.map +1 -1
- package/dist/components/public-footer/socials.d.ts +6 -5
- package/dist/components/public-footer/socials.d.ts.map +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/slot-grid/slot-grid.d.ts +2 -0
- package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/host-compat.css +1 -10
- package/dist/i18n/config.d.ts.map +1 -1
- package/dist/i18n/config.js +224 -96
- package/dist/i18n/config.js.map +1 -1
- package/dist/i18n/locales/ar.d.ts +3 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +4 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +3 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +4 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +3 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +4 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +3 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +3 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +4 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +3 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +4 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +3 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +4 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +3 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +4 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +3 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +4 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +3 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +4 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +3 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +4 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +3 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +4 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +3 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +4 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +3 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +4 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +3 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +4 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +3 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +4 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +3 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +4 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +3 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +4 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +68 -68
- package/dist/locales/ar.json +4 -1
- package/dist/locales/de.json +4 -1
- package/dist/locales/el.json +4 -1
- package/dist/locales/en.json +3 -0
- package/dist/locales/es.json +4 -1
- package/dist/locales/fr.json +4 -1
- package/dist/locales/hi.json +4 -1
- package/dist/locales/it.json +4 -1
- package/dist/locales/ja.json +4 -1
- package/dist/locales/nl.json +4 -1
- package/dist/locales/pl.json +4 -1
- package/dist/locales/pt.json +4 -1
- package/dist/locales/ro.json +4 -1
- package/dist/locales/ru.json +4 -1
- package/dist/locales/sq.json +4 -1
- package/dist/locales/sv.json +4 -1
- package/dist/locales/tr.json +4 -1
- package/dist/locales/zh.json +4 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/error-page/error-page-english.d.ts +71 -0
- package/dist/patterns/error-page/error-page-english.d.ts.map +1 -0
- package/dist/patterns/error-page/error-page.d.ts.map +1 -1
- package/dist/patterns/error-page/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/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/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/address-autocomplete-bPR2mNBt.js +0 -498
- package/dist/_chunks/address-autocomplete-bPR2mNBt.js.map +0 -1
- package/dist/_chunks/autocomplete-CnB1mHGc.js +0 -539
- package/dist/_chunks/autocomplete-CnB1mHGc.js.map +0 -1
- package/dist/_chunks/avatar-BPiPL7ND.js.map +0 -1
- package/dist/_chunks/booking-C0FoW8Yx.js +0 -4336
- package/dist/_chunks/booking-C0FoW8Yx.js.map +0 -1
- package/dist/_chunks/checkbox-BjDv-r3o.js.map +0 -1
- package/dist/_chunks/combobox-CDPm_n0p.js.map +0 -1
- package/dist/_chunks/contact-profile-card-Da1vmJQI.js.map +0 -1
- package/dist/_chunks/error-page-Bhai-spN.js +0 -344
- package/dist/_chunks/error-page-Bhai-spN.js.map +0 -1
- package/dist/_chunks/header-settings-BVhjndtV.js.map +0 -1
- package/dist/_chunks/index.modern-BeRXQVdc.js.map +0 -1
- package/dist/_chunks/languages-CZqBaPwI.js.map +0 -1
- package/dist/_chunks/link-N5_YpLtm.js +0 -138
- package/dist/_chunks/link-N5_YpLtm.js.map +0 -1
- package/dist/_chunks/map-view-Bvi06RVh.js.map +0 -1
- package/dist/_chunks/operator-hero-6aAIQaFZ.js.map +0 -1
- package/dist/_chunks/patient-search-CCOUZABE.js +0 -1196
- package/dist/_chunks/patient-search-CCOUZABE.js.map +0 -1
- package/dist/_chunks/practice-profile-hero-qfrsFQI_.js.map +0 -1
- package/dist/_chunks/practice-results-B61krlwu.js.map +0 -1
- package/dist/_chunks/public-footer-CXOrdAaS.js +0 -568
- package/dist/_chunks/public-footer-CXOrdAaS.js.map +0 -1
- package/dist/_chunks/reviews-panel-UzQQLb-z.js.map +0 -1
- package/dist/_chunks/slot-grid-Bb13H9Rl.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-BjDv-r3o.js","sources":["../../src/components/checkbox/checkbox-group-context.ts","../../src/components/checkbox/checkbox.agent.ts","../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport interface CheckboxGroupContextShape {\n name?: string;\n value: Set<string>;\n toggle: (itemValue: string) => void;\n disabled: boolean;\n}\n\nexport const CheckboxGroupContext =\n createContext<CheckboxGroupContextShape | null>(null);\n\nexport function useCheckboxGroup(): CheckboxGroupContextShape | null {\n return useContext(CheckboxGroupContext);\n}\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — Checkbox. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { CheckboxHandle } from './checkbox';\n\nexport const checkboxAgent: AgentAdapter<CheckboxHandle> = {\n id: 'checkbox',\n // A checkbox is a boolean toggle, not a one-of-N picker — `set_value`,\n // not `select_single` (which is reserved for choosing one item among many).\n capabilities: ['set_value'],\n state: {\n checked: {\n type: 'boolean | \"indeterminate\"',\n descriptionKey: 'ui.agent.checkbox.state.checked',\n description: 'Current checked state.',\n read: (handle) => handle.getChecked(),\n },\n },\n actions: {\n set_checked: {\n safety: 'write',\n argsType: '{ checked: boolean | \"indeterminate\" }',\n argsSchema: {\n type: 'object',\n properties: {\n checked: {\n oneOf: [{ type: 'boolean' }, { const: 'indeterminate' }],\n description:\n 'Target state: true, false, or the tri-state \"indeterminate\".',\n },\n },\n required: ['checked'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.checkbox.actions.setChecked',\n description: 'Set the checked state to a specific value.',\n examples: [{ args: { checked: true }, note: 'Tick the box.' }],\n invoke: (handle, args: { checked: boolean | 'indeterminate' }) => {\n handle.setChecked(args.checked);\n },\n },\n toggle: {\n safety: 'write',\n descriptionKey: 'ui.agent.checkbox.actions.toggle',\n description: 'Flip the checked state between checked and unchecked.',\n invoke: (handle) => {\n handle.toggle();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'checkbox',\n description: 'Marks the Checkbox 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 useId,\n useMemo,\n useRef,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport * as RadixCheckbox from '@radix-ui/react-checkbox';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useCheckboxGroup } from './checkbox-group-context';\nimport { Tooltip } from '../tooltip';\nimport { useAgentRegistration } from '../../agent';\nimport { checkboxAgent } from './checkbox.agent';\n\n/** Agent-readiness curated handle for Checkbox. */\nexport interface CheckboxHandle {\n getChecked: () => boolean | 'indeterminate';\n setChecked: (checked: boolean | 'indeterminate') => void;\n toggle: () => void;\n}\n\nconst drawClasses = [\n 'ds:[stroke-dasharray:1] ds:[stroke-dashoffset:1]',\n 'ds:animate-[checkbox-indicator-draw_var(--animation-duration)_ease-out_forwards]',\n].join(' ');\n\nfunction CheckIcon({ className }: { className?: string }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n data-slot=\"checkbox-check-icon\"\n className={className}\n >\n <path pathLength=\"1\" d=\"M5 12l5 5L20 7\" className={drawClasses} />\n </svg>\n );\n}\n\nfunction IndeterminateIcon({ className }: { className?: string }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n aria-hidden=\"true\"\n data-slot=\"checkbox-indeterminate-icon\"\n className={className}\n >\n <path pathLength=\"1\" d=\"M5 12h14\" className={drawClasses} />\n </svg>\n );\n}\n\nconst checkboxVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0',\n // The off-state edge is all that marks the box, so `--border` is\n // re-pointed at the 3:1 `--control-border` here. A host still on an\n // older token sheet lacks this class and keeps the soft edge.\n 'ds:[--border:var(--control-border)]',\n 'ds:border ds:border-border ds:rounded-[var(--radius-sm)] ds:bg-background',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n 'ds:data-[state=checked]:bg-primary ds:data-[state=checked]:border-primary',\n 'ds:data-[state=indeterminate]:bg-primary ds:data-[state=indeterminate]:border-primary',\n 'ds:relative ds:before:absolute ds:before:inset-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"]',\n ].join(' '),\n {\n variants: {\n // Per-size `mt` centers the box optically on the first line of the\n // label using the type-label line-box height — important when the\n // label wraps, because the wrapper uses `items-start` so children\n // align to the top edge rather than the multi-line block's centre.\n size: {\n sm: 'ds:size-3.5 ds:mt-[calc((var(--type-label-size)*var(--type-label-line-height)-0.875rem)/2)]',\n md: 'ds:size-4 ds:mt-[calc((var(--type-label-size)*var(--type-label-line-height)-1rem)/2)]',\n lg: 'ds:size-5 ds:mt-[calc((var(--type-label-size)*var(--type-label-line-height)-1.25rem)/2)]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\ntype RadixRootProps = ComponentPropsWithoutRef<typeof RadixCheckbox.Root>;\n\nexport interface CheckboxProps\n extends\n Omit<RadixRootProps, 'checked' | 'onCheckedChange' | 'children'>,\n VariantProps<typeof checkboxVariants> {\n /**\n * Visible label rendered next to the box. Accepts a string or any React\n * node — useful for consent labels that embed a privacy / T&C link.\n */\n label: ReactNode;\n checked?: boolean | 'indeterminate';\n onCheckedChange?: (checked: boolean | 'indeterminate') => void;\n size?: 'sm' | 'md' | 'lg';\n disabledReason?: string;\n value?: string;\n}\n\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (\n {\n label,\n checked,\n onCheckedChange,\n size = 'md',\n disabled,\n disabledReason,\n name,\n value,\n id,\n className,\n ...props\n },\n ref,\n ) => {\n const generatedId = useId();\n const checkboxId = id ?? generatedId;\n const group = useCheckboxGroup();\n\n const inGroup = group !== null && value !== undefined;\n const [ownCheckedRaw, setOwnChecked] = useControllableState<\n boolean | 'indeterminate'\n >({\n value: checked,\n defaultValue: false,\n onChange: onCheckedChange,\n });\n const ownChecked = ownCheckedRaw ?? false;\n const effectiveChecked = inGroup ? group.value.has(value) : ownChecked;\n const effectiveOnChange = inGroup\n ? () => group.toggle(value)\n : (next: boolean | 'indeterminate') => {\n setOwnChecked(next);\n };\n const effectiveName = group?.name ?? name;\n const effectiveDisabled = group?.disabled || disabled;\n\n const checkedRef = useRef<boolean | 'indeterminate'>(\n effectiveChecked ?? false,\n );\n checkedRef.current = effectiveChecked ?? false;\n\n const agentHandle = useMemo<CheckboxHandle>(\n () => ({\n getChecked: () => checkedRef.current,\n setChecked: (next) => {\n if (inGroup) {\n // Inside a group: toggle implements set via the group context.\n const isOn =\n checkedRef.current === true ||\n checkedRef.current === 'indeterminate';\n const want = next === true || next === 'indeterminate';\n if (isOn !== want) group.toggle(value);\n return;\n }\n setOwnChecked(next);\n },\n toggle: () => {\n if (inGroup) {\n group.toggle(value);\n return;\n }\n const next =\n checkedRef.current === true ||\n checkedRef.current === 'indeterminate'\n ? false\n : true;\n setOwnChecked(next);\n },\n }),\n [inGroup, group, value, setOwnChecked],\n );\n useAgentRegistration(checkboxAgent, agentHandle, id);\n\n // `text-primary-foreground` lives on the SVG (not the <button> Root) so\n // a legacy consumer rule like `button, input, … { color: inherit }`\n // can't intercept it — the unlayered consumer rule would beat any\n // @layer utilities rule on the button itself, leaving the tick paint\n // (currentColor) inheriting the consumer's body text colour. See\n // styles.css for the matching form-element revert inside [data-component].\n const iconSizeClass = [\n 'ds:text-primary-foreground',\n size === 'sm' ? 'ds:size-3' : size === 'lg' ? 'ds:size-4' : 'ds:size-3.5',\n ].join(' ');\n\n const labelClasses = [\n 'type-label ds:text-foreground ds:select-none',\n effectiveDisabled\n ? 'ds:cursor-not-allowed ds:opacity-50'\n : 'ds:cursor-pointer',\n ].join(' ');\n\n const content = (\n <div\n data-component=\"checkbox\"\n data-component-id={id}\n data-option-id={value}\n className=\"ds:inline-flex ds:items-start ds:gap-[var(--spacing-sm)]\"\n >\n <RadixCheckbox.Root\n ref={ref}\n id={checkboxId}\n checked={effectiveChecked}\n onCheckedChange={effectiveOnChange}\n disabled={effectiveDisabled}\n aria-disabled={effectiveDisabled || undefined}\n name={effectiveName}\n value={value}\n className={checkboxVariants({ size, className })}\n {...props}\n >\n <RadixCheckbox.Indicator>\n {effectiveChecked === 'indeterminate' ? (\n <IndeterminateIcon className={iconSizeClass} />\n ) : (\n <CheckIcon className={iconSizeClass} />\n )}\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n <label htmlFor={checkboxId} className={labelClasses}>\n {label}\n </label>\n </div>\n );\n\n if (effectiveDisabled && disabledReason) {\n return <Tooltip label={disabledReason}>{content}</Tooltip>;\n }\n\n return content;\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n"],"names":["CheckboxGroupContext","createContext","useCheckboxGroup","useContext","checkboxAgent","handle","args","drawClasses","CheckIcon","className","jsx","IndeterminateIcon","checkboxVariants","cva","Checkbox","forwardRef","label","checked","onCheckedChange","size","disabled","disabledReason","name","value","id","props","ref","generatedId","useId","checkboxId","group","inGroup","ownCheckedRaw","setOwnChecked","useControllableState","effectiveChecked","effectiveOnChange","next","effectiveName","effectiveDisabled","checkedRef","useRef","agentHandle","useMemo","useAgentRegistration","iconSizeClass","labelClasses","content","jsxs","RadixCheckbox","Tooltip"],"mappings":";;;;;;;AASO,MAAMA,IACXC,EAAgD,IAAI;AAE/C,SAASC,IAAqD;AACnE,SAAOC,EAAWH,CAAoB;AACxC;ACLO,MAAMI,IAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA,EAC1B,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,WAAA;AAAA,IAAW;AAAA,EACtC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,SAAS;AAAA,YACP,OAAO,CAAC,EAAE,MAAM,aAAa,EAAE,OAAO,iBAAiB;AAAA,YACvD,aACE;AAAA,UAAA;AAAA,QACJ;AAAA,QAEF,UAAU,CAAC,SAAS;AAAA,MAAA;AAAA,MAEtB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,MAAQ,MAAM,iBAAiB;AAAA,MAC7D,QAAQ,CAACA,GAAQC,MAAiD;AAChE,QAAAD,EAAO,WAAWC,EAAK,OAAO;AAAA,MAChC;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACD,MAAW;AAClB,QAAAA,EAAO,OAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,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AAAX,EAACwC,GAAA,EAAQ,OAAO7B,GAAiB,UAAA0B,GAAQ,IAG3CA;AAAA,EACT;AACF;AAEAjC,EAAS,cAAc;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-CDPm_n0p.js","sources":["../../src/components/combobox/combobox.agent.ts","../../src/components/combobox/combobox.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { ComboboxHandle } from './combobox';\n\nexport const comboboxAgent: AgentAdapter<ComboboxHandle> = {\n id: 'combobox',\n // Persisted single choice (value state + set_value) → select_single + set_value,\n // plus type-to-filter and open/close of the option list.\n capabilities: ['select_single', 'set_value', 'filter', 'open', 'close'],\n state: {\n value: {\n type: 'string | null',\n descriptionKey: 'ui.agent.combobox.state.value',\n description:\n 'Currently-selected option value, or null when nothing is selected.',\n read: (handle) => handle.getValue(),\n },\n query: {\n type: 'string',\n descriptionKey: 'ui.agent.combobox.state.query',\n description: 'Current filter query in the combobox input.',\n read: (handle) => handle.getQuery(),\n },\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.combobox.state.isOpen',\n description: 'True when the option list is visible.',\n read: (handle) => handle.getIsOpen(),\n },\n },\n actions: {\n set_value: {\n // Persists the user's chosen option — reversible via the same UI.\n safety: 'write',\n argsType: '{ value: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: ['string', 'null'],\n description: 'Option value to select, or null to clear.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.setValue',\n description: 'Set the selected value programmatically.',\n examples: [{ args: { value: 'it' }, note: 'Select the \"it\" option.' }],\n invoke: (handle, args: { value: string | null }) => {\n handle.setValue(args.value);\n },\n },\n apply_filter: {\n // Pure ephemeral filter of the visible options — no persisted change.\n safety: 'read',\n argsType: '{ query: string }',\n argsSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Filter text for the list.' },\n },\n required: ['query'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.applyFilter',\n description: 'Set the filter query for the option list.',\n invoke: (handle, args: { query: string }) => {\n handle.setQuery(args.query);\n },\n },\n clear_selection: {\n // Discards the persisted choice — destructive (loses the selection).\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.clearSelection',\n description: 'Clear the current selection.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.open',\n description: 'Open the option list.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.close',\n description: 'Close the option list.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'combobox' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-option-id',\n description: 'Each option emits its value as data-option-id.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type KeyboardEvent,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react';\nimport * as Popover from '@radix-ui/react-popover';\nimport { Command, defaultFilter, useCommandState } from 'cmdk';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, X } from 'lucide-react';\nimport {\n FormFieldContext,\n useFormField,\n useFormFieldControlRef,\n} from '../form-field/form-field-context';\nimport type { OptionShape } from '../_shared/option';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { normalizeDiacritics } from '../_shared/normalize-diacritics';\nimport { groupOptions } from '../_shared/group-options';\nimport { MENU_ROW_HIGHLIGHT } from '../_shared/menu-row';\nimport {\n OPTION_BODY_CLASSES,\n OPTION_END_CLASSES,\n OPTION_LABEL_ROW_CLASSES,\n optionDescriptionVariants,\n optionLabelVariants,\n} from '../_shared/option-row';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT,\n INPUT_SURFACE_PADDING_X,\n INPUT_SURFACE_TONE,\n} from '../_shared/input-surface';\nimport { useAgentRegistration } from '../../agent';\nimport { comboboxAgent } from './combobox.agent';\n\nexport type ComboboxOption<T extends string = string> = OptionShape<T>;\n\n// Curated agent-readiness handle — see combobox.agent.ts.\nexport interface ComboboxHandle {\n getValue: () => string | null;\n getQuery: () => string;\n getIsOpen: () => boolean;\n setValue: (value: string | null) => void;\n setQuery: (query: string) => void;\n clear: () => void;\n open: () => void;\n close: () => void;\n}\n\nexport interface ComboboxProps<T extends string = string> {\n options: ComboboxOption<T>[];\n value?: T | '';\n defaultValue?: T;\n onValueChange?: (value: T | '') => void;\n placeholder?: string;\n clearable?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n name?: string;\n id?: string;\n size?: 'sm' | 'md' | 'lg';\n tone?: 'default' | 'error';\n /** Custom score. All three arguments are diacritics-stripped and\n * lower-cased. `label` is the option's label ('' for the create row).\n * The filter is not consulted while the query is still the chosen\n * option's own label: then every option shows. */\n filter?: (value: string, search: string, label: string) => number;\n allowCreate?: boolean;\n onCreate?: (value: string) => void;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Query typed by the user (including IME commits and Clear), or set\n * through the agent handle. Selection and closing do not emit queries.\n * Pair with `filter` for host-provided results and `emptyMessage` for\n * their state. This callback also fires when there are no options. */\n onQueryChange?: (query: string) => void;\n emptyMessage?: ReactNode;\n 'aria-label'?: string;\n /**\n * Invalid-state fallback for use OUTSIDE a `<FormField>` (e.g. an inline\n * editor). Inside a FormField the context wins. Drives the error border and\n * the input's `aria-invalid`.\n */\n 'aria-invalid'?: boolean;\n /**\n * Error-message id fallback for use OUTSIDE a `<FormField>`. Inside a\n * FormField the context's `describedBy` wins.\n */\n 'aria-describedby'?: string;\n /**\n * The input's HTML `autocomplete` token (e.g. `country`,\n * `address-level1`, WCAG 2.1 §1.3.5). With a token, the browser can fill\n * the field from a saved address: text it fills in is matched to an\n * option (see `matchAutofill`) and that option is chosen.\n */\n autoComplete?: string;\n /**\n * Which option the browser's filled-in text means: return its `value`,\n * or `undefined` for none. Used only with `autoComplete`. The default\n * matches an option's value or label, ignoring case and accents.\n */\n matchAutofill?: (text: string) => string | undefined;\n /**\n * Let a long option label wrap onto a second line instead of ending in an\n * ellipsis. Longer still, it is clipped after two lines. Off by default.\n * An option's `description` always sits on its own line under the label.\n */\n wrapOptionLabels?: boolean;\n className?: string;\n}\n\nconst comboboxInputVariants = cva(\n [\n 'ds:peer ds:w-full ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground',\n 'ds:outline-none ds:border-0',\n 'ds:disabled:cursor-not-allowed',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-sm)]',\n md: 'ds:text-[length:var(--font-size-base)]',\n lg: 'ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\nconst comboboxWrapperVariants = cva(\n [\n 'ds:group ds:relative ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:w-full',\n INPUT_SURFACE_CHROME,\n ].join(' '),\n {\n variants: {\n size: {\n sm: `${INPUT_SURFACE_HEIGHT.sm} ${INPUT_SURFACE_PADDING_X.sm}`,\n md: `${INPUT_SURFACE_HEIGHT.md} ${INPUT_SURFACE_PADDING_X.md}`,\n lg: `${INPUT_SURFACE_HEIGHT.lg} ${INPUT_SURFACE_PADDING_X.lg}`,\n },\n tone: INPUT_SURFACE_TONE,\n },\n defaultVariants: {\n size: 'md',\n tone: 'default',\n },\n },\n);\n\nconst comboboxContentVariants = cva(\n [\n 'ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-[var(--radix-popover-trigger-width)]',\n // A guard: the list is as wide as the field, so only a field that is\n // itself wider than the screen could take it past the edge.\n 'ds:max-w-[var(--radix-popover-content-available-width)]',\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);\n\nconst comboboxItemVariants = cva(\n [\n 'ds:relative ds:flex ds:cursor-pointer ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-foreground ds:outline-none ds:select-none',\n MENU_ROW_HIGHLIGHT.selected,\n 'ds:aria-disabled:pointer-events-none ds:aria-disabled:opacity-50',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:min-h-8 ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-sm)]',\n md: 'ds:min-h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-base)]',\n lg: 'ds:min-h-12 ds:ps-4 ds:pe-4 ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\nconst comboboxGroupHeadingClasses = [\n 'ds:ps-3 ds:pe-3 ds:py-1.5',\n 'type-eyebrow ds:text-muted-foreground',\n].join(' ');\n\nconst comboboxListClasses =\n 'ds:max-h-[18rem] ds:overflow-y-auto ds:p-[var(--spacing-xs)]';\n\nconst comboboxEmptyClasses =\n 'ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground';\n\nconst iconSizeBySize = {\n sm: 'ds:size-3.5',\n md: 'ds:size-4',\n lg: 'ds:size-5',\n} as const;\n\ninterface CreateRowProps {\n search: string;\n label: string;\n iconClass: string;\n size: 'sm' | 'md' | 'lg';\n onSelect: (value: string) => void;\n}\n\nfunction ComboboxCreateRow({\n search,\n label,\n iconClass,\n size,\n onSelect,\n}: CreateRowProps): ReactElement | null {\n // Only surface the create row when no existing item matches the query.\n const filteredCount = useCommandState((state) => state.filtered.count);\n if (filteredCount > 0) return null;\n return (\n <Command.Item\n value={`__combobox-create__${search}`}\n keywords={[]}\n forceMount\n onSelect={() => onSelect(search)}\n className={comboboxItemVariants({ size })}\n >\n <span\n aria-hidden=\"true\"\n className={`ds:inline-flex ds:items-center ds:justify-center ${iconClass}`}\n />\n <span className=\"ds:flex-1 ds:truncate\">{label}</span>\n </Command.Item>\n );\n}\n\nconst ComboboxImpl = forwardRef<HTMLInputElement, ComboboxProps>(\n function Combobox(\n {\n options,\n value,\n defaultValue,\n onValueChange,\n placeholder,\n clearable = false,\n disabled,\n readOnly,\n required,\n name,\n id,\n size = 'md',\n tone = 'default',\n filter: externalFilter,\n allowCreate = false,\n onCreate,\n open: openProp,\n onOpenChange,\n onQueryChange,\n emptyMessage,\n className,\n 'aria-label': ariaLabel,\n 'aria-invalid': ariaInvalid,\n 'aria-describedby': ariaDescribedBy,\n autoComplete,\n matchAutofill,\n wrapOptionLabels = false,\n },\n ref,\n ) {\n const { t } = useTranslation('ui');\n const ctx = useFormField();\n const inFormField = useContext(FormFieldContext) !== null;\n\n const [currentValueRaw, setComboboxValue] = useControllableState<string>({\n value,\n defaultValue: defaultValue ?? '',\n onChange: onValueChange as ((next: string) => void) | undefined,\n });\n const currentValue = currentValueRaw ?? '';\n\n const selectedOption = useMemo(\n () => options.find((o) => o.value === currentValue),\n [options, currentValue],\n );\n const selectedLabel = selectedOption?.label ?? '';\n\n const [search, setSearch] = useState<string>(selectedLabel);\n const [internalOpen, setInternalOpen] = useState(false);\n const isOpenControlled = openProp !== undefined;\n const open = isOpenControlled ? openProp : internalOpen;\n const composingRef = useRef(false);\n /* The query is still the chosen option's own label: nothing typed yet. */\n const untouched = selectedLabel !== '' && search === selectedLabel;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const anchorRef = useRef<HTMLDivElement>(null);\n const listRef = useRef<HTMLDivElement>(null);\n\n /* cmdk writes its own id on the input and focuses it by that id, so\n the field's label follows that id. */\n useFormFieldControlRef(ctx, inputRef);\n\n /* cmdk's relevance sort moves DOM nodes. Remounting the list once the\n query is untouched again puts the options back in source order. */\n const [listEpoch, setListEpoch] = useState(0);\n const listMountedRef = useRef(false);\n useIsomorphicLayoutEffect(() => {\n /* The first render is already in source order. */\n if (!listMountedRef.current) {\n listMountedRef.current = true;\n return;\n }\n if (untouched) setListEpoch((n) => n + 1);\n }, [untouched]);\n\n /* Whether the user has reached a row since the list opened or the\n query changed: arrow keys, Home, End or the pointer. */\n const navigatedRef = useRef(false);\n useEffect(() => {\n navigatedRef.current = false;\n }, [search, open]);\n /* True while the kit itself makes the chosen option the active row. */\n const activatingRef = useRef(false);\n\n /* Opening on an untouched value shows the chosen option mid-list.\n Rect maths rather than scrollIntoView, which would scroll the page. */\n useIsomorphicLayoutEffect(() => {\n if (!open || !untouched || !currentValue) return;\n const list = listRef.current;\n const item = list?.querySelector<HTMLElement>(\n `[data-option-id=\"${CSS.escape(currentValue)}\"]`,\n );\n if (!list || !item) return;\n const listRect = list.getBoundingClientRect();\n const itemRect = item.getBoundingClientRect();\n /* The opening zoom scales both rects; scrollTop is unscaled. */\n const scale =\n list.offsetHeight > 0 ? listRect.height / list.offsetHeight : 1;\n const offset = (itemRect.top - listRect.top) / (scale || 1);\n const itemHeight = itemRect.height / (scale || 1);\n list.scrollTop += offset - (list.clientHeight - itemHeight) / 2;\n /* The chosen option becomes the active row, so the arrow keys move on\n from it. cmdk's pointer path sets the row and the input's\n aria-activedescendant without scrolling. */\n activatingRef.current = true;\n try {\n item.dispatchEvent(new PointerEvent('pointermove', { bubbles: true }));\n } finally {\n activatingRef.current = false;\n }\n /* Only on opening: reading the value later must not scroll. */\n }, [open]);\n\n const autofillToken =\n autoComplete && autoComplete !== 'off' ? autoComplete : undefined;\n useIsomorphicLayoutEffect(() => {\n const input = inputRef.current;\n if (!input) return;\n input.setAttribute('aria-expanded', String(open));\n /* cmdk writes autocomplete=\"off\" over the prop on every render. */\n if (autofillToken) input.setAttribute('autocomplete', autofillToken);\n });\n\n /* Text the browser fills in arrives as an input event that is not\n typing: no input type, or a replacement. The listener sits on the\n input itself, so it runs before React hands the change to cmdk. */\n const autofilledRef = useRef(false);\n useEffect(() => {\n const input = inputRef.current;\n if (!input || !autofillToken) return;\n const onInput = (event: Event) => {\n const inputType = (event as InputEvent).inputType;\n autofilledRef.current =\n !inputType || inputType === 'insertReplacementText';\n };\n input.addEventListener('input', onInput);\n return () => input.removeEventListener('input', onInput);\n }, [autofillToken]);\n\n useEffect(() => {\n if (!open) {\n setSearch(selectedLabel);\n }\n }, [selectedLabel, open]);\n\n const effectiveDisabled =\n (inFormField ? ctx.disabled : false) || Boolean(disabled);\n const effectiveReadOnly = Boolean(readOnly);\n const effectiveRequired =\n (inFormField ? ctx.required : false) || Boolean(required);\n const effectiveInvalid = inFormField ? ctx.invalid : Boolean(ariaInvalid);\n const effectiveTone = effectiveInvalid ? 'error' : tone;\n const describedBy =\n inFormField && ctx.describedBy ? ctx.describedBy : ariaDescribedBy;\n\n const resolvedPlaceholder =\n placeholder ?? t('inputs.combobox.placeholder', 'Search…');\n\n const filterFn = useMemo(\n () => (candidate: string, searchStr: string, keywords?: string[]) => {\n if (composingRef.current) return 1;\n /* Untouched query: every option shows, whatever the filter says. */\n if (selectedLabel !== '' && searchStr === selectedLabel) return 1;\n const normalizedCandidate = normalizeDiacritics(candidate);\n const normalizedSearch = normalizeDiacritics(searchStr);\n const normalizedKeywords = keywords?.map(normalizeDiacritics);\n if (externalFilter) {\n return externalFilter(\n normalizedCandidate,\n normalizedSearch,\n normalizedKeywords?.[0] ?? '',\n );\n }\n return defaultFilter(\n normalizedCandidate,\n normalizedSearch,\n normalizedKeywords,\n );\n },\n [externalFilter, selectedLabel],\n );\n\n const commit = (next: string) => {\n setComboboxValue(next);\n };\n\n const setOpen = (next: boolean) => {\n if (!isOpenControlled) setInternalOpen(next);\n onOpenChange?.(next);\n };\n\n const handleSelect = (optValue: string) => {\n const option = options.find((o) => o.value === optValue);\n commit(optValue);\n setSearch(option?.label ?? '');\n setOpen(false);\n };\n\n const handleCreate = (nextValue: string) => {\n onCreate?.(nextValue);\n setOpen(false);\n };\n\n const optionForAutofill = (text: string) => {\n const wanted = normalizeDiacritics(text.trim());\n if (!wanted) return undefined;\n const match = matchAutofill\n ? matchAutofill(text.trim())\n : options.find(\n (o) =>\n normalizeDiacritics(o.value) === wanted ||\n normalizeDiacritics(o.label) === wanted,\n )?.value;\n return options.find((o) => o.value === match && !o.disabled);\n };\n\n const handleSearchChange = (next: string) => {\n if (effectiveReadOnly) return;\n if (autofilledRef.current) {\n autofilledRef.current = false;\n const option = optionForAutofill(next);\n if (option) {\n commit(option.value);\n setSearch(option.label);\n if (open) setOpen(false);\n return;\n }\n /* Filled from another field and no option means it: the list\n must not open over a field the user is not in. */\n if (document.activeElement !== inputRef.current) {\n setSearch(selectedLabel);\n return;\n }\n }\n setSearch(next);\n if (!composingRef.current) onQueryChange?.(next);\n if (!open && next.length > 0 && !composingRef.current) {\n setOpen(true);\n }\n };\n\n const handleFocus = () => {\n if (!effectiveDisabled && !effectiveReadOnly) setOpen(true);\n };\n\n /* A pick keeps focus in the input, so no focus event follows. A\n click on the focused input reopens the list instead. */\n const handleClick = () => {\n if (!open && !effectiveDisabled && !effectiveReadOnly) setOpen(true);\n };\n\n const handleCompositionStart = () => {\n composingRef.current = true;\n };\n\n const handleCompositionEnd = () => {\n composingRef.current = false;\n if (effectiveReadOnly) return;\n const next = inputRef.current?.value ?? '';\n setSearch(next);\n onQueryChange?.(next);\n if (next.length > 0) setOpen(true);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.nativeEvent.isComposing) return;\n if (\n (event.key === 'ArrowDown' || event.key === 'ArrowUp') &&\n !open &&\n !effectiveDisabled &&\n !effectiveReadOnly\n ) {\n /* The arrow that opens the list only opens it. The next arrow\n moves on from the chosen option, or from the top. */\n event.preventDefault();\n setOpen(true);\n return;\n }\n if (\n event.key === 'ArrowDown' ||\n event.key === 'ArrowUp' ||\n event.key === 'Home' ||\n event.key === 'End' ||\n /* cmdk's own Ctrl+N, J, P and K move the highlight too. */\n (event.ctrlKey && ['n', 'j', 'p', 'k'].includes(event.key))\n ) {\n navigatedRef.current = true;\n }\n /* Handled before cmdk sees it: Enter commits only a row the user\n reached, never from a closed list. On an untouched open the lit\n row is the chosen option, so keeping the value matches it. */\n if (\n event.key === 'Enter' &&\n (!open || (!navigatedRef.current && (untouched || search === '')))\n ) {\n event.preventDefault();\n if (open) setOpen(false);\n return;\n }\n if (event.key === 'Escape' && open) {\n event.preventDefault();\n setOpen(false);\n setSearch(selectedLabel);\n }\n };\n\n const handleClear = (event: MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n commit('');\n setSearch('');\n onQueryChange?.('');\n setOpen(true);\n inputRef.current?.focus();\n };\n\n const handleOpenChange = (next: boolean) => {\n if (effectiveReadOnly && next) return;\n setOpen(next);\n if (!next) setSearch(selectedLabel);\n };\n\n // Agent handle — refs mirror state for fresh reads.\n const valueRef = useRef<string>(currentValue);\n useEffect(() => {\n valueRef.current = currentValue;\n }, [currentValue]);\n const searchRef = useRef<string>(search);\n useEffect(() => {\n searchRef.current = search;\n }, [search]);\n const openRef = useRef<boolean>(open);\n useEffect(() => {\n openRef.current = open;\n }, [open]);\n\n const setOpenStable = useCallback(\n (next: boolean) => {\n if (!isOpenControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isOpenControlled, onOpenChange],\n );\n\n const agentHandle = useMemo<ComboboxHandle>(\n () => ({\n getValue: () => valueRef.current || null,\n getQuery: () => searchRef.current,\n getIsOpen: () => openRef.current,\n setValue: (next) => {\n const v = next ?? '';\n setComboboxValue(v);\n const opt = options.find((o) => o.value === v);\n setSearch(opt?.label ?? '');\n },\n setQuery: (query) => {\n setSearch(query);\n onQueryChange?.(query);\n },\n clear: () => {\n setComboboxValue('');\n setSearch('');\n onQueryChange?.('');\n },\n open: () => setOpenStable(true),\n close: () => setOpenStable(false),\n }),\n [setComboboxValue, options, setOpenStable, onQueryChange],\n );\n useAgentRegistration(comboboxAgent, agentHandle, id);\n\n const showClear =\n clearable &&\n Boolean(currentValue) &&\n !effectiveDisabled &&\n !effectiveReadOnly;\n\n const groups = groupOptions(options);\n const iconClass = iconSizeBySize[size];\n\n return (\n <Popover.Root open={open} onOpenChange={handleOpenChange}>\n <Command\n filter={filterFn}\n shouldFilter\n loop\n // cmdk points the input's `aria-labelledby` at its own hidden\n // `<label cmdk-label>`, whose text is this `label`: it is the\n // input's accessible name. The caller's `aria-label` wins, then\n // the FormField's label. The placeholder is the last resort, so\n // the input is never unnamed.\n label={ariaLabel ?? (ctx.label || resolvedPlaceholder)}\n className=\"ds:w-full\"\n >\n <Popover.Anchor asChild>\n <div\n ref={anchorRef}\n className={comboboxWrapperVariants({\n size,\n tone: effectiveTone,\n className,\n })}\n data-component=\"combobox\"\n data-component-id={id}\n >\n <Command.Input\n ref={composeRefs(ref, inputRef)}\n value={search}\n onValueChange={handleSearchChange}\n // The picked label shows in the field: keep its direction.\n dir={selectedOption?.dir}\n name={name}\n placeholder={resolvedPlaceholder}\n disabled={effectiveDisabled}\n readOnly={effectiveReadOnly}\n required={effectiveRequired}\n autoComplete={autoComplete}\n // cmdk writes `id` and `aria-labelledby` after the props it\n // is given, so neither can be set here: the name goes through\n // the Command root's `label` above.\n aria-describedby={describedBy}\n aria-invalid={effectiveInvalid || undefined}\n onFocus={handleFocus}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onCompositionStart={handleCompositionStart}\n onCompositionEnd={handleCompositionEnd}\n className={comboboxInputVariants({ size })}\n />\n {showClear ? (\n <button\n type=\"button\"\n aria-label={t('inputs.combobox.clear', 'Clear selection')}\n onClick={handleClear}\n onPointerDown={(event) => event.stopPropagation()}\n className={[\n 'ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)]',\n 'ds:text-muted-foreground ds:hover:text-foreground',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:size-4 ds:shrink-0',\n /* A 24px hit area with no visual change. */\n \"ds:relative ds:before:absolute ds:before:inset-[calc(var(--spacing-xs)*-1)] ds:before:content-['']\",\n ].join(' ')}\n >\n <X aria-hidden=\"true\" className=\"ds:size-3.5\" />\n </button>\n ) : null}\n </div>\n </Popover.Anchor>\n <Popover.Portal forceMount>\n <Popover.Content\n // `forceMount` keeps the listbox in the DOM while the popover\n // is closed so the input's cmdk-set `aria-controls` always\n // points at a real id (axe's aria-valid-attr-value rule).\n // The CSS visibility / pointer-events is gated by data-state.\n forceMount\n hidden={!open}\n // Radix Popover.Content carries `role=\"dialog\"`; axe's\n // `aria-dialog-name` rule requires a name. Surface the\n // surrounding combobox label so the popover is named after\n // the field it serves (or fall back to the i18n default).\n aria-label={\n ariaLabel ?? t('inputs.combobox.popupLabel', 'Options')\n }\n onOpenAutoFocus={(event) => event.preventDefault()}\n onCloseAutoFocus={(event) => event.preventDefault()}\n onInteractOutside={(event) => {\n const target = event.target as Node | null;\n if (target && anchorRef.current?.contains(target)) {\n event.preventDefault();\n }\n }}\n sideOffset={4}\n align=\"start\"\n className={comboboxContentVariants()}\n >\n <Command.List\n key={listEpoch}\n ref={listRef}\n // cmdk names the listbox \"Suggestions\" in English otherwise.\n label={ariaLabel ?? (ctx.label || resolvedPlaceholder)}\n className={comboboxListClasses}\n onPointerMove={() => {\n if (!activatingRef.current) navigatedRef.current = true;\n }}\n /* The list is focusable: without this a pointer pick\n moves focus into it, then loses it to the page when\n the list hides. */\n onMouseDown={(event) => event.preventDefault()}\n >\n <Command.Empty className={comboboxEmptyClasses}>\n {/* cmdk owns the presentational wrapper. This unavailable\n option gives an empty list valid semantics without\n registering a selectable cmdk item. */}\n <div role=\"option\" aria-selected={false} aria-disabled=\"true\">\n {emptyMessage ??\n t('inputs.combobox.empty', 'No results found')}\n </div>\n </Command.Empty>\n {groups.map(({ group, items }, groupIndex) => {\n const body = items.map((option) => {\n const isSelected = option.value === currentValue;\n return (\n <Command.Item\n /* The label is in the key because cmdk only reads\n keywords when the value changes. */\n key={`${option.value}\\u0000${option.label}`}\n value={option.value}\n data-option-id={option.value}\n keywords={[option.label]}\n disabled={option.disabled}\n onSelect={handleSelect}\n className={comboboxItemVariants({ size })}\n >\n <span\n aria-hidden=\"true\"\n className={`ds:inline-flex ds:items-center ds:justify-center ${iconClass}`}\n >\n {isSelected ? <Check className={iconClass} /> : null}\n </span>\n {option.startAdornment ? (\n // Decorative by contract — the option's accessible\n // name comes from its label. Hide so a text-bearing\n // adornment can't leak into the computed name.\n <span\n aria-hidden=\"true\"\n className=\"ds:inline-flex ds:items-center ds:shrink-0\"\n >\n {option.startAdornment}\n </span>\n ) : null}\n {option.description || wrapOptionLabels ? (\n // Stacked: the label and its end content on one\n // row, the description on a line of its own\n // under them. In this DOM order the option's\n // name reads label, end content, description.\n <span\n className={`${OPTION_BODY_CLASSES} ds:py-[var(--spacing-xs)]`}\n >\n <span className={OPTION_LABEL_ROW_CLASSES}>\n <span\n dir={option.dir}\n className={optionLabelVariants({\n wrap: wrapOptionLabels,\n className: 'ds:flex-1',\n })}\n >\n {option.label}\n </span>\n {option.endContent ? (\n // Announced, as below.\n <span className={OPTION_END_CLASSES}>\n {option.endContent}\n </span>\n ) : null}\n </span>\n {option.description ? (\n <span\n className={optionDescriptionVariants({\n tone: option.descriptionTone,\n })}\n >\n {option.description}\n </span>\n ) : null}\n </span>\n ) : (\n <>\n <span\n dir={option.dir}\n className=\"ds:flex-1 ds:truncate\"\n >\n {option.label}\n </span>\n {option.endContent ? (\n // Deliberately NOT aria-hidden — unlike\n // `startAdornment`, this slot carries meaning\n // (a price, a count) and must reach the\n // option's accessible name. `ms-auto` pins it\n // to the inline-end and flips under RTL.\n <span className=\"ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0\">\n {option.endContent}\n </span>\n ) : null}\n </>\n )}\n </Command.Item>\n );\n });\n if (!group) {\n return (\n <Command.Group key={`group-${groupIndex}`}>\n {body}\n </Command.Group>\n );\n }\n return (\n <Command.Group\n key={`group-${group}`}\n heading={\n <span className={comboboxGroupHeadingClasses}>\n {group}\n </span>\n }\n >\n {body}\n </Command.Group>\n );\n })}\n {allowCreate && search.length > 0 ? (\n <ComboboxCreateRow\n search={search}\n label={t('inputs.combobox.create', 'Create \"{{value}}\"', {\n value: search,\n })}\n iconClass={iconClass}\n size={size}\n onSelect={handleCreate}\n />\n ) : null}\n </Command.List>\n </Popover.Content>\n </Popover.Portal>\n </Command>\n </Popover.Root>\n );\n },\n);\nComboboxImpl.displayName = 'Combobox';\n\ninterface ComboboxComponent {\n <T extends string = string>(\n props: ComboboxProps<T> & { ref?: Ref<HTMLInputElement> },\n ): ReactElement | null;\n displayName?: string;\n}\n\n// forwardRef erases component-level generics, so we re-widen via a callable\n// interface to preserve the `<T extends string>` signature at the call site.\nexport const Combobox = ComboboxImpl as unknown as ComboboxComponent;\n\nexport {\n comboboxInputVariants,\n comboboxWrapperVariants,\n comboboxContentVariants,\n comboboxItemVariants,\n};\n"],"names":["comboboxAgent","handle","args","comboboxInputVariants","cva","comboboxWrapperVariants","INPUT_SURFACE_CHROME","INPUT_SURFACE_HEIGHT","INPUT_SURFACE_PADDING_X","INPUT_SURFACE_TONE","comboboxContentVariants","comboboxItemVariants","MENU_ROW_HIGHLIGHT","comboboxGroupHeadingClasses","comboboxListClasses","comboboxEmptyClasses","iconSizeBySize","ComboboxCreateRow","search","label","iconClass","size","onSelect","useCommandState","state","jsxs","Command","jsx","ComboboxImpl","forwardRef","options","value","defaultValue","onValueChange","placeholder","clearable","disabled","readOnly","required","name","id","tone","externalFilter","allowCreate","onCreate","openProp","onOpenChange","onQueryChange","emptyMessage","className","ariaLabel","ariaInvalid","ariaDescribedBy","autoComplete","matchAutofill","wrapOptionLabels","ref","t","useTranslation","ctx","useFormField","inFormField","useContext","FormFieldContext","currentValueRaw","setComboboxValue","useControllableState","currentValue","selectedOption","useMemo","o","selectedLabel","setSearch","useState","internalOpen","setInternalOpen","isOpenControlled","open","composingRef","useRef","untouched","inputRef","anchorRef","listRef","useFormFieldControlRef","listEpoch","setListEpoch","listMountedRef","useIsomorphicLayoutEffect","n","navigatedRef","useEffect","activatingRef","list","item","listRect","itemRect","scale","offset","itemHeight","autofillToken","input","autofilledRef","onInput","event","inputType","effectiveDisabled","effectiveReadOnly","effectiveRequired","effectiveInvalid","effectiveTone","describedBy","resolvedPlaceholder","filterFn","candidate","searchStr","keywords","normalizedCandidate","normalizeDiacritics","normalizedSearch","normalizedKeywords","defaultFilter","commit","next","setOpen","handleSelect","optValue","option","handleCreate","nextValue","optionForAutofill","text","wanted","match","_a","handleSearchChange","handleFocus","handleClick","handleCompositionStart","handleCompositionEnd","handleKeyDown","handleClear","handleOpenChange","valueRef","searchRef","openRef","setOpenStable","useCallback","agentHandle","v","opt","query","useAgentRegistration","showClear","groups","groupOptions","Popover","composeRefs","X","target","group","items","groupIndex","body","isSelected","Check","OPTION_BODY_CLASSES","OPTION_LABEL_ROW_CLASSES","optionLabelVariants","OPTION_END_CLASSES","optionDescriptionVariants","Fragment","Combobox"],"mappings":";;;;;;;;;;;;;;;;;;AAGO,MAAMA,KAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,iBAAiB,aAAa,UAAU,QAAQ,OAAO;AAAA,EACtE,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,OAAO;AAAA,MACL,MAAM;AAA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AU2G;AAAA,sBAAA;AAAA,oBAAA,IAEV;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBA9IC3C;AAAA,cAAA;AAAA,YA+IP;AAAA,UAAA,EACF,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;AACAzD,GAAa,cAAc;AAWpB,MAAMgJ,KAAWhJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contact-profile-card-Da1vmJQI.js","sources":["../../src/components/contact-profile-card/contact-profile-card.agent.ts","../../src/components/contact-profile-card/contact-profile-card.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { ContactProfileCardHandle } from './contact-profile-card';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — ContactProfileCard */\n/* */\n/* Read-only adapter. Surfaces the rendered profession field so an */\n/* agent / MCP runtime can resolve \"what kind of practice is this?\" */\n/* without re-parsing the DOM. No actions yet — the card is a passive */\n/* presentation surface; navigation lives on the consumer's page. */\n/* -------------------------------------------------------------------- */\n\nexport const contactProfileCardAgent: AgentAdapter<ContactProfileCardHandle> = {\n id: 'contact-profile-card',\n // Passive presentation surface — only exposes the rendered profession for\n // introspection. No interactive capability is backed by the handle.\n capabilities: [],\n state: {\n profession: {\n type: 'string',\n descriptionKey: 'ui.agent.contactProfileCard.state.profession',\n description:\n 'Profession string the card is currently rendering — undefined when the consumer omitted it.',\n read: (handle) => handle.getProfession(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'contact-profile-card',\n description: 'Marks the ContactProfileCard root region.',\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 useId,\n useMemo,\n type ComponentPropsWithoutRef,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n Banknote,\n ExternalLink,\n Globe,\n Heart,\n Languages as LanguagesIcon,\n Mail,\n MapPin,\n MessageCircle,\n Phone,\n ShieldCheck,\n Stethoscope,\n type LucideIcon,\n} from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { KeyValueList, KeyValuePair } from '../key-value-pair/key-value-pair';\nimport { Link } from '../link/link';\nimport { formatPriceOrFree } from '../_shared/format-price';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { contactProfileCardAgent } from './contact-profile-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* ContactProfileCard */\n/* */\n/* Replaces the bespoke \"Profilo\" / \"Practice info\" cards that every */\n/* AlfaDocs surface composes by hand (booking-website PracticeInfoCard, */\n/* alfascribe operator pages, builders docs example, …). Composes Card */\n/* + KeyValueList + KeyValuePair so the labels share a column (no */\n/* zigzag values) and every row uses the same lucide icon family. */\n/* */\n/* The component is intentionally opinionated: every field is optional, */\n/* but the ORDER, ICONS, and LABELS are owned by the kit. Consumers */\n/* pass the data; the kit owns the visual + i18n. */\n/* */\n/* All visible text flows through `useTranslation('ui')` against the */\n/* `contactProfileCard.*` namespace. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\n// Override the KVP icon colour at the card root so every inner row's\n// leading glyph paints with `--accent` (brand magenta/violet) instead\n// of the default `--muted-foreground`. The ContactProfileCard is a\n// marketing surface — muted icons read as disabled against the\n// otherwise saturated card chrome. Scoped via CSS custom property so\n// only this card's icons shift; standalone KVPs elsewhere keep\n// `--muted-foreground`.\nconst rootVariants = cva(\n 'ds:w-full ds:text-[color:var(--foreground)] ds:[--key-value-pair-icon-color:var(--accent)]',\n {\n variants: {\n // Matches the kit's other `surface` props (Booking, ReviewsPanel).\n // The card itself renders `<Card variant=\"elevated\">` so the\n // `surface=\"flat\"` opt-out is rare — most consumers want the\n // boundary.\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: { surface: 'elevated' },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface ContactProfileCardAddress {\n /** Display text — already formatted by the consumer (street, postcode, city). */\n line: string;\n /** Optional lat/lng — drives the static-map link + the embedded thumbnail. */\n lat?: number;\n lng?: number;\n}\n\nexport interface ContactProfileCardHandle {\n /** Resolved consumer-supplied data — useful for agent introspection. */\n getProfession: () => string | undefined;\n}\n\nexport interface ContactProfileCardProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children' | 'children'\n> {\n /**\n * Override the localised \"Profilo\" / \"Profile\" heading. Most\n * consumers leave this unset.\n */\n heading?: string;\n /**\n * Free-text intro paragraph rendered above the data rows (e.g.\n * the practice's `bookingDescription` field). When omitted, the\n * card jumps straight into the data rows.\n */\n description?: string;\n\n /* ----- Identity rows ----- */\n\n /** Street + postcode + city, with optional lat/lng for the map link. */\n address?: ContactProfileCardAddress;\n /** Phone number, displayed as-is. Compiled into a `tel:` link. */\n phone?: string;\n /**\n * WhatsApp number — digits only (no `+`, no spaces). Compiled into\n * a `https://wa.me/<number>` link with an optional pre-filled message.\n */\n whatsappNumber?: string;\n /** Optional pre-filled WhatsApp message. Consumer-localised. */\n whatsappMessage?: string;\n /** Public-facing email. Compiled into a `mailto:` link. */\n email?: string;\n /**\n * Practice website. An address without a scheme (`www.example.it`) is\n * linked over `https://`; anything but a web address shows as text.\n */\n website?: string;\n\n /* ----- Embedded map thumbnail ----- */\n\n /**\n * Google Maps Static API key. When provided alongside `address.lat`\n * and `address.lng`, renders a static-map thumbnail at the top of\n * the card — a single one-shot `<img>` fetch, no JS SDK boot, no\n * consent gate needed (the same pattern PracticeResults uses).\n *\n * Without it (or without coords), the card renders info rows only —\n * the address row's \"Open in Google Maps\" link is still emitted as\n * a real `<a>` so the spatial cue isn't lost.\n *\n * Additive — existing consumers that don't pass this prop see the\n * same render as before.\n */\n googleMapsApiKey?: string;\n /**\n * Zoom level for the embedded map thumbnail. Default `14` —\n * neighbourhood-level, shows the pin in context. Ignored when the\n * thumbnail isn't rendered.\n */\n mapZoom?: number;\n\n /* ----- Profile metadata ----- */\n\n /**\n * ISO 639-1 language codes the practice speaks. Rendered as\n * `<Badge variant=\"neutral\">` chips. Each code is auto-resolved\n * into the active locale's native language name via the kit's\n * built-in `languages.<iso>` i18n bundle (18 ISO codes × 18\n * locales). For example `languages={['it', 'en']}` with\n * `i18n.language === 'it'` renders \"Italiano\" + \"Inglese\".\n *\n * Unknown / unbundled codes fall back to the uppercase ISO code\n * (`'xyz'` → `'XYZ'`). To override a specific label — regional\n * dialect, brand-voice variant, codes the kit doesn't ship — pass\n * `languageLabels`.\n */\n languages?: string[];\n /**\n * Override map from ISO code → display label, applied on top of\n * the kit's i18n auto-resolution. Only set when you need a\n * consumer-specific label for a code — the typical case is\n * regional dialect / brand-voice variants / non-ISO codes.\n *\n * Resolution order: `languageLabels[code]` > `t('languages.<code>')`\n * > `code.toUpperCase()`.\n */\n languageLabels?: Record<string, string>;\n /**\n * Insurance / convention strings (consumer-supplied, free text).\n * Rendered as `<Badge variant=\"info\">` chips.\n */\n insurances?: string[];\n /**\n * First-visit price in the smallest currency unit (cents / centesimi).\n * Formatted via `Intl.NumberFormat`; `0` renders the translated word\n * \"Free\". Omit when the consumer doesn't want to show the price.\n */\n firstVisitPriceCents?: number;\n /** ISO-4217 currency code for the price formatter. Defaults to `EUR`. */\n currencyCode?: string;\n /** Profession line — single value or already-joined comma list. */\n profession?: string;\n /** Show the \"expert for anxious patients\" row when true. */\n specializedInFearPatients?: boolean;\n\n /* ----- Telemetry hooks ----- */\n\n /**\n * Fires when the patient clicks the phone link. The kit emits a\n * `track('practice_profile_card_phone_click')` event before\n * invoking this — gate consumer-side analytics on the same event\n * to avoid duplicate fires.\n */\n onPhoneClick?: () => void;\n /** Fires when the patient clicks the WhatsApp link. */\n onWhatsAppClick?: () => void;\n /** Fires when the patient clicks the static-map link. */\n onMapClick?: () => void;\n /** Fires when the patient clicks the email mailto link. */\n onEmailClick?: () => void;\n\n /* ----- Slots ----- */\n\n /**\n * Rendered above the heading — e.g. a `<Avatar>` for the operator\n * variant, or a coloured chip strip. Optional.\n */\n headerSlot?: ReactNode;\n /**\n * Render an arbitrary map widget at the top of the card chrome —\n * replaces the built-in static `<img>` thumbnail that\n * `googleMapsApiKey` would otherwise produce. Use this when you\n * want an interactive map inside the card boundary instead of a\n * fixed image:\n *\n * <ContactProfileCard\n * mapSlot={\n * <PracticeMap practice={practice} googleMapsApiKey={key} />\n * }\n * …\n * />\n *\n * When both `mapSlot` and `googleMapsApiKey` are provided, the slot\n * wins (explicit > implicit). When neither is provided, no map area\n * renders. The slot is unstyled — pass through any container chrome\n * the consumer wants (e.g. a fixed height wrapper). The kit\n * positions it where the static thumbnail would have lived.\n */\n mapSlot?: ReactNode;\n /**\n * Rendered at the end of the card body, below the rows. Use for\n * a \"Book now\" `<Button>` or a \"View full profile\" link.\n */\n footerSlot?: ReactNode;\n\n /* ----- Styling ----- */\n\n /**\n * `'elevated'` (default) wraps the card in `<Card variant=\"elevated\">`\n * for a defined surface — what most consumers want when the card\n * stands alone on a page. `'flat'` drops the Card chrome so the\n * content sits naked — use when an outer card / sheet already\n * provides the boundary (e.g. embedded inside a `<Sheet>` or a\n * parent `<Card.Body>`).\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n /** Override the default region aria-label. */\n 'aria-label'?: string;\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\n/** Strip everything except digits + leading `+` for `tel:` URLs. */\nfunction normalisePhone(raw: string): string {\n return raw.replace(/[^\\d+]/g, '');\n}\n\n/** Build the WhatsApp `wa.me` URL. Number must already be digits-only. */\nfunction buildWhatsAppHref(number: string, message?: string): string {\n const base = `https://wa.me/${number}`;\n if (!message) return base;\n return `${base}?text=${encodeURIComponent(message)}`;\n}\n\n/**\n * The website as a link address, or undefined when it is not a web\n * address. Practices often save `www.example.it`, which a link would\n * resolve against the current page, and the field is practice-written,\n * so a `javascript:` value must never become a link.\n */\nfunction websiteHref(website: string): string | undefined {\n const value = website.trim();\n const href = /^[a-z][a-z0-9+.-]*:/i.test(value) ? value : `https://${value}`;\n try {\n const { protocol } = new URL(href);\n return protocol === 'http:' || protocol === 'https:' ? href : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** Google Maps search query — works without an API key. */\nfunction buildMapHref(address: ContactProfileCardAddress): string {\n const q = encodeURIComponent(address.line);\n return `https://www.google.com/maps/search/?api=1&query=${q}`;\n}\n\n/* -------------------------------------------------------------------- */\n/* MapThumbStrip — embedded Google Static Maps image */\n/* */\n/* Full-width strip rendered at the top of the card when the consumer */\n/* supplies both `address.lat`/`lng` and `googleMapsApiKey`. Same */\n/* one-shot `<img>` strategy as PracticeResults' StaticMapThumb (no JS */\n/* SDK boot → no consent gate needed), but full-card-width instead of */\n/* a 12rem aside. */\n/* -------------------------------------------------------------------- */\n\ninterface MapThumbStripProps {\n apiKey: string;\n center: { lat: number; lng: number };\n zoom: number;\n altText: string;\n}\n\n/**\n * Resolve the kit's `--map-marker-color` token to a six-character hex\n * string (no leading `#`) for Google Static Maps' `markers=color:` URL\n * parameter, which requires a literal hex value at fetch time.\n *\n * SSR-safe: when `document` is undefined we fall back to the kit's\n * brand violet. Same helper as PracticeResults — keep in sync if you\n * touch one.\n */\nfunction getStaticMapMarkerHex(): string {\n if (typeof document === 'undefined') return '4945a3';\n const raw = getComputedStyle(document.documentElement)\n .getPropertyValue('--map-marker-color')\n .trim();\n const match = /^#?([0-9a-fA-F]{6})$/.exec(raw);\n return match ? match[1] : '4945a3';\n}\n\nfunction MapThumbStrip({ apiKey, center, zoom, altText }: MapThumbStripProps) {\n // 640×192 keeps the asset under Google's 1MP free tier at scale=2\n // (1280×384 actual) and matches the strip's 12rem height at a\n // ~3.33:1 aspect ratio. Marker colour resolves from the kit's\n // `--map-marker-color` token at runtime so the value still lives\n // in `src/tokens/**` per the closed-palette constraint.\n const markerHex = getStaticMapMarkerHex();\n const src =\n `https://maps.googleapis.com/maps/api/staticmap` +\n `?center=${center.lat},${center.lng}` +\n `&zoom=${zoom}` +\n `&size=640x192&scale=2` +\n `&markers=color:0x${markerHex}%7C${center.lat},${center.lng}` +\n `&key=${encodeURIComponent(apiKey)}`;\n return (\n <img\n src={src}\n alt={altText}\n loading=\"lazy\"\n decoding=\"async\"\n width={640}\n height={192}\n className=\"ds:block ds:inline-size-full ds:block-size-[12rem] ds:[object-fit:cover] ds:rounded-[var(--radius-md)]\"\n />\n );\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const ContactProfileCard = forwardRef<\n HTMLDivElement,\n ContactProfileCardProps\n>(\n (\n {\n heading,\n description,\n address,\n phone,\n whatsappNumber,\n whatsappMessage,\n email,\n website,\n languages,\n languageLabels,\n insurances,\n firstVisitPriceCents,\n currencyCode = 'EUR',\n profession,\n specializedInFearPatients,\n googleMapsApiKey,\n mapZoom = 14,\n onPhoneClick,\n onWhatsAppClick,\n onMapClick,\n onEmailClick,\n headerSlot,\n footerSlot,\n mapSlot,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const headingId = useId();\n const locale = i18n.language ?? 'en';\n\n const resolvedHeading = heading ?? t('contactProfileCard.heading');\n const resolvedAriaLabel = ariaLabel ?? resolvedHeading;\n\n const formattedPrice = useMemo(() => {\n if (firstVisitPriceCents == null) return undefined;\n // 0 is a free first visit: the chip reads \"Free\", not \"€0.00\".\n return formatPriceOrFree(\n firstVisitPriceCents,\n currencyCode,\n locale,\n t('common.freeOfCharge'),\n );\n }, [firstVisitPriceCents, currencyCode, locale, t]);\n\n // Compose the rows in display order. Each `row` carries the icon +\n // localised label + the rendered value. Skipping a field is just\n // omitting the row — `KeyValueList` collapses the subgrid cleanly.\n const rows: Array<{\n key: string;\n icon: ReactElement;\n label: string;\n value: ReactNode;\n }> = [];\n\n if (address) {\n rows.push({\n key: 'address',\n icon: <MapPin aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.address'),\n value: (\n <span className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span dir=\"auto\">{address.line}</span>\n {address.lat != null && address.lng != null ? (\n <Link\n href={buildMapHref(address)}\n external\n intent=\"default\"\n onClick={onMapClick}\n >\n {t('contactProfileCard.openInGoogleMaps')}\n </Link>\n ) : null}\n </span>\n ),\n });\n }\n\n if (phone) {\n rows.push({\n key: 'phone',\n icon: <Phone aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.phone'),\n value: (\n <Link\n href={`tel:${normalisePhone(phone)}`}\n intent=\"default\"\n onClick={onPhoneClick}\n >\n <bdi dir=\"ltr\">{phone}</bdi>\n </Link>\n ),\n });\n }\n\n if (whatsappNumber) {\n rows.push({\n key: 'whatsapp',\n icon: <MessageCircle aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.whatsapp'),\n value: (\n <Link\n href={buildWhatsAppHref(whatsappNumber, whatsappMessage)}\n external\n intent=\"default\"\n onClick={onWhatsAppClick}\n >\n <bdi dir=\"ltr\">{whatsappNumber}</bdi>\n </Link>\n ),\n });\n }\n\n if (email) {\n rows.push({\n key: 'email',\n icon: <Mail aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.email'),\n value: (\n <Link\n href={`mailto:${email}`}\n intent=\"default\"\n onClick={onEmailClick}\n >\n <bdi dir=\"ltr\">{email}</bdi>\n </Link>\n ),\n });\n }\n\n if (website) {\n const href = websiteHref(website);\n rows.push({\n key: 'website',\n icon: <Globe aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.website'),\n value: href ? (\n <Link href={href} external intent=\"default\">\n <bdi dir=\"ltr\">{website}</bdi>\n </Link>\n ) : (\n <bdi dir=\"ltr\">{website}</bdi>\n ),\n });\n }\n\n if (languages && languages.length > 0) {\n // Resolution order, highest to lowest:\n // 1. consumer `languageLabels` override — for regional dialects,\n // brand-voice variants, or codes the kit doesn't ship.\n // 2. kit i18n bundle (`languages.<iso>`) — auto-resolves the 18\n // ISO codes the kit ships into the active locale's native\n // language name. Retires consumer-side ISO→label plumbing.\n // 3. uppercase fallback for unknown codes that the consumer\n // didn't override.\n const resolveLabel = (code: string): string => {\n if (languageLabels?.[code]) return languageLabels[code];\n const key = `languages.${code}`;\n if (i18n.exists(key)) return t(key);\n return code.toUpperCase();\n };\n rows.push({\n key: 'languages',\n icon: <LanguagesIcon aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.languages'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {languages.map((code) => (\n <Badge key={code} variant=\"neutral\">\n {resolveLabel(code)}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (insurances && insurances.length > 0) {\n rows.push({\n key: 'insurances',\n icon: <ShieldCheck aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.insurances'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {insurances.map((ins) => (\n <Badge key={ins} variant=\"info\">\n {ins}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (formattedPrice) {\n // The one figure on this card a patient compares between\n // practices, so it gets a chip. The chip starts in the value\n // column with every other row's value (the subgrid aligns them),\n // not pinned to the row's end, where it read as out of line.\n // `accentSoft`, not `brand`. The languages and insurance rows on\n // this card are tonal chips (`neutral` and `info`), so a solid\n // `brand` fill would read as a different class of object rather\n // than the same family. `accentSoft` is the same tonal recipe in\n // the most distinct hue on the card, so the price still leads.\n // `lg` because `md` sets the label at the smallest step of the\n // ramp, and `.theme-accessible` cannot lift it — the one figure\n // patients compare should not be the smallest text on the card.\n rows.push({\n key: 'firstVisitPrice',\n icon: <Banknote aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.firstVisitPrice'),\n value: (\n <Badge variant=\"accentSoft\" size=\"lg\">\n {formattedPrice}\n </Badge>\n ),\n });\n }\n\n if (specializedInFearPatients) {\n rows.push({\n key: 'expertForAnxiousPatients',\n icon: <Heart aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.expertForAnxiousPatients'),\n value: t('contactProfileCard.value.yesShort'),\n });\n }\n\n if (profession) {\n rows.push({\n key: 'profession',\n icon: <Stethoscope aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.profession'),\n value: profession,\n });\n }\n\n // Imperative handle for agent integrations.\n useAgentRegistration(\n contactProfileCardAgent,\n { getProfession: () => profession },\n id,\n );\n\n // Embedded static-map thumbnail. Renders only when the consumer\n // supplies BOTH a usable lat/lng pair AND a `googleMapsApiKey`.\n // The d.ts-promised behaviour; without a key the strip is silently\n // omitted and the address row's \"Open in Google Maps\" link still\n // emits as the spatial-cue fallback.\n const showMapThumb =\n !!googleMapsApiKey &&\n address?.lat !== undefined &&\n address?.lng !== undefined;\n const mapThumb = showMapThumb ? (\n <MapThumbStrip\n apiKey={googleMapsApiKey!}\n center={{ lat: address!.lat!, lng: address!.lng! }}\n zoom={mapZoom}\n altText={t('contactProfileCard.map.alt', {\n address: address!.line,\n defaultValue: 'Map showing {{address}}',\n })}\n />\n ) : null;\n\n // Map area: explicit consumer slot wins over the implicit\n // googleMapsApiKey-driven static thumbnail. 0.33.4 introduces the\n // slot so consumers can embed an interactive <MapView> /\n // <PracticeMap> wrapper inside the card chrome instead of the\n // fixed static <img>. When neither is set the area renders as\n // nothing. 0.33.6 moves the area from above the heading to below\n // the data rows — the map reads as the spatial closer (\"here it\n // is on the map\") rather than a stylised hero, and any CTA in\n // footerSlot still lands at the very bottom.\n const mapArea = mapSlot ?? mapThumb;\n\n const body = (\n <>\n {description ? (\n <p dir=\"auto\" className=\"type-body-sm ds:m-0 ds:whitespace-pre-line\">\n {description}\n </p>\n ) : null}\n {rows.length > 0 ? (\n <KeyValueList rowGap=\"md\">\n {rows.map((row) => (\n <KeyValuePair\n key={row.key}\n icon={row.icon}\n label={row.label}\n value={row.value}\n />\n ))}\n </KeyValueList>\n ) : null}\n {mapArea}\n {footerSlot}\n </>\n );\n\n // `surface=\"flat\"` skips the Card wrapper — the consumer is\n // already inside a Card / Sheet and doesn't want a double border.\n const inner = (\n <>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {headerSlot}\n <h2\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {resolvedHeading}\n </h2>\n </div>\n {body}\n </>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"contact-profile-card\"\n data-component-id={id}\n id={id}\n className={rootVariants({ surface, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </Card.Body>\n </Card>\n ) : (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </div>\n )}\n </div>\n );\n },\n);\n\nContactProfileCard.displayName = 'ContactProfileCard';\n\n// Helper export so consumers can mirror the kit's row order if they\n// need to compose a partial alternative (rare).\nexport const CONTACT_PROFILE_CARD_ROW_KEYS = [\n 'address',\n 'phone',\n 'whatsapp',\n 'email',\n 'website',\n 'languages',\n 'insurances',\n 'firstVisitPrice',\n 'expertForAnxiousPatients',\n 'profession',\n] as const;\n\n// Defensive icon export so consumers can render the same glyph\n// outside the card if they need it for consistency.\nexport const CONTACT_PROFILE_CARD_ROW_ICONS: Record<\n (typeof CONTACT_PROFILE_CARD_ROW_KEYS)[number],\n LucideIcon\n> = {\n address: MapPin,\n phone: Phone,\n whatsapp: MessageCircle,\n email: Mail,\n website: Globe,\n languages: LanguagesIcon,\n insurances: ShieldCheck,\n firstVisitPrice: Banknote,\n expertForAnxiousPatients: Heart,\n profession: Stethoscope,\n};\n\n// Re-exports of the rootVariants type for downstream typing.\nexport type ContactProfileCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\n\n// ExternalLink is exported by lucide-react and used elsewhere in the\n// kit; re-exporting here so consumers don't have to add it as a\n// peer-dep import for icon parity in their own UIs.\nexport { ExternalLink };\n"],"names":["contactProfileCardAgent","handle","rootVariants","cva","normalisePhone","raw","buildWhatsAppHref","number","message","base","websiteHref","website","value","href","protocol","buildMapHref","address","getStaticMapMarkerHex","match","MapThumbStrip","apiKey","center","zoom","altText","markerHex","src","jsx","ContactProfileCard","forwardRef","heading","description","phone","whatsappNumber","whatsappMessage","email","languages","languageLabels","insurances","firstVisitPriceCents","currencyCode","profession","specializedInFearPatients","googleMapsApiKey","mapZoom","onPhoneClick","onWhatsAppClick","onMapClick","onEmailClick","headerSlot","footerSlot","mapSlot","surface","ariaLabel","id","className","rest","ref","t","i18n","useTranslation","headingId","useId","locale","resolvedHeading","resolvedAriaLabel","formattedPrice","useMemo","formatPriceOrFree","rows","MapPin","jsxs","Link","Phone","MessageCircle","Mail","Globe","resolveLabel","code","key","LanguagesIcon","Badge","ShieldCheck","ins","Banknote","Heart","Stethoscope","useAgentRegistration","mapThumb","mapArea","body","Fragment","KeyValueList","row","KeyValuePair","inner","Card","CONTACT_PROFILE_CARD_ROW_KEYS","CONTACT_PROFILE_CARD_ROW_ICONS"],"mappings":";;;;;;;;;;;;;;;;;;;AAYO,MAAMA,KAAkE;AAAA,EAC7E,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,cAAA;AAAA,IAAc;AAAA,EACzC;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AA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AAIkC;AAAA,YACJ,WAAU;AAAA,YAET,UAAAG;AAAA,UAAA;AAAA,QAAA;AAAA,MACH,GACF;AAAA,MACC0B;AAAA,IAAA,GACH;AAGF,WACE,gBAAA/D;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAA8B;AAAA,QACA,MAAK;AAAA,QACL,cAAYQ;AAAA,QACZ,mBAAiBJ;AAAA,QACjB,kBAAe;AAAA,QACf,qBAAmBP;AAAA,QACnB,IAAAA;AAAA,QACA,WAAWnD,GAAa,EAAE,SAAAiD,GAAS,WAAAG,IAAW;AAAA,QAC7C,GAAGC;AAAA,QAEH,gBAAY,aACX,gBAAA7B,EAACqE,KAAK,SAAQ,YACZ,4BAACA,EAAK,MAAL,EAAU,WAAU,kDAClB,aACH,EAAA,CACF,sBAEC,OAAA,EAAI,WAAU,kDACZ,UAAAD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAnE,GAAmB,cAAc;AAI1B,MAAMqE,KAAgC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAIaC,KAGT;AAAA,EACF,SAAS5B;AAAA,EACT,OAAOG;AAAA,EACP,UAAUC;AAAA,EACV,OAAOC;AAAA,EACP,SAASC;AAAA,EACT,WAAWI;AAAAA,EACX,YAAYE;AAAA,EACZ,iBAAiBE;AAAA,EACjB,0BAA0BC;AAAA,EAC1B,YAAYC;AACd;"}
|
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
import { jsx as r, jsxs as P } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as ue, useMemo as fe, useState as j, useEffect as _, useRef as O, useId as ge } from "react";
|
|
3
|
-
import { useTranslation as pe } from "react-i18next";
|
|
4
|
-
import { c as ye } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { B as N } from "./button-DohK_Ak_.js";
|
|
6
|
-
import { L as he } from "./logo-hIsyVE96.js";
|
|
7
|
-
import { i as ve } from "./is-development-CLUAnsU7.js";
|
|
8
|
-
import { i as be } from "./safe-href-5dbsfbQn.js";
|
|
9
|
-
import { a as ke } from "./error-page-illustration-BdJLuMdV.js";
|
|
10
|
-
import { loadLocale as we, LOCALES_WITH_BUNDLES as xe } from "../i18n/config.js";
|
|
11
|
-
import { R as Ee } from "./rotate-ccw-BBQnIVTr.js";
|
|
12
|
-
import { L as Le } from "./log-in-OQUEoGhX.js";
|
|
13
|
-
import { c as q } from "./createLucideIcon-DhHxpK9K.js";
|
|
14
|
-
/**
|
|
15
|
-
* @license lucide-react v1.22.0 - ISC
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the ISC license.
|
|
18
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/
|
|
20
|
-
const Pe = [
|
|
21
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
22
|
-
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
23
|
-
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
24
|
-
], Ne = q("circle-question-mark", Pe);
|
|
25
|
-
/**
|
|
26
|
-
* @license lucide-react v1.22.0 - ISC
|
|
27
|
-
*
|
|
28
|
-
* This source code is licensed under the ISC license.
|
|
29
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/
|
|
31
|
-
const Se = [
|
|
32
|
-
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
33
|
-
[
|
|
34
|
-
"path",
|
|
35
|
-
{
|
|
36
|
-
d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
|
|
37
|
-
key: "r6nss1"
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
], Ce = q("house", Se), Re = [
|
|
41
|
-
400,
|
|
42
|
-
401,
|
|
43
|
-
403,
|
|
44
|
-
404,
|
|
45
|
-
405,
|
|
46
|
-
410,
|
|
47
|
-
419,
|
|
48
|
-
429,
|
|
49
|
-
500,
|
|
50
|
-
502,
|
|
51
|
-
503,
|
|
52
|
-
504,
|
|
53
|
-
"offline",
|
|
54
|
-
"maintenance"
|
|
55
|
-
], V = {
|
|
56
|
-
400: { key: "badRequest", mood: "jumbled", primary: "home" },
|
|
57
|
-
401: { key: "unauthorised", mood: "locked", primary: "login" },
|
|
58
|
-
403: { key: "forbidden", mood: "roped", primary: "home" },
|
|
59
|
-
404: { key: "notFound", mood: "lost", primary: "home" },
|
|
60
|
-
405: { key: "methodNotAllowed", mood: "wrong-way", primary: "home" },
|
|
61
|
-
410: { key: "gone", mood: "vanished", primary: "home" },
|
|
62
|
-
419: { key: "expired", mood: "asleep", primary: "login" },
|
|
63
|
-
429: { key: "tooManyRequests", mood: "melt", primary: "retry" },
|
|
64
|
-
500: { key: "serverError", mood: "patched", primary: "retry" },
|
|
65
|
-
502: { key: "badGateway", mood: "unplugged", primary: "retry" },
|
|
66
|
-
503: { key: "maintenance", mood: "rebuild", primary: "retry" },
|
|
67
|
-
504: { key: "timeout", mood: "snail", primary: "retry" },
|
|
68
|
-
offline: { key: "offline", mood: "adrift", primary: "retry" },
|
|
69
|
-
maintenance: { key: "maintenance", mood: "rebuild", primary: "retry" },
|
|
70
|
-
generic: { key: "generic", mood: "puzzled", primary: "home" }
|
|
71
|
-
};
|
|
72
|
-
function Ie(e) {
|
|
73
|
-
return Re.includes(e) ? V[e] : V.generic;
|
|
74
|
-
}
|
|
75
|
-
const _e = "alfadocs-ui.locale", Te = "it", ze = (e) => {
|
|
76
|
-
if (!e) return;
|
|
77
|
-
const a = e.toLowerCase().replaceAll("_", "-").split("-")[0], n = a === "cn" ? "zh" : a;
|
|
78
|
-
return xe.includes(n) ? n : void 0;
|
|
79
|
-
}, $e = () => {
|
|
80
|
-
try {
|
|
81
|
-
return window.localStorage.getItem(_e);
|
|
82
|
-
} catch {
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
function De(e = {}) {
|
|
87
|
-
var p;
|
|
88
|
-
const a = typeof window < "u", n = e.saved !== void 0 ? e.saved : a ? $e() : null, l = e.browser ?? (a && typeof navigator < "u" ? (p = navigator.languages) != null && p.length ? navigator.languages : [navigator.language] : []), g = e.document ?? (typeof document < "u" ? document.documentElement.lang : ""), v = [
|
|
89
|
-
e.locale,
|
|
90
|
-
n,
|
|
91
|
-
...l,
|
|
92
|
-
e.hostLocaleIsDefault ? void 0 : g
|
|
93
|
-
];
|
|
94
|
-
for (const b of v) {
|
|
95
|
-
const y = ze(b);
|
|
96
|
-
if (y) return y;
|
|
97
|
-
}
|
|
98
|
-
return Te;
|
|
99
|
-
}
|
|
100
|
-
const H = (e, a) => we(e, a), Be = ye(
|
|
101
|
-
"ds:flex ds:flex-col ds:items-center ds:justify-center ds:bg-[var(--background)] ds:text-[var(--foreground)] ds:px-[var(--spacing-md)] ds:py-[var(--spacing-2xl)]",
|
|
102
|
-
{
|
|
103
|
-
variants: {
|
|
104
|
-
layout: {
|
|
105
|
-
/** Fills the viewport: the whole page is the error. */
|
|
106
|
-
page: "ds:min-h-screen",
|
|
107
|
-
/** Fills its container, under the host's own header. */
|
|
108
|
-
embedded: "ds:[min-block-size:100%]"
|
|
109
|
-
},
|
|
110
|
-
surface: {
|
|
111
|
-
/** The page background. */
|
|
112
|
-
background: "",
|
|
113
|
-
/** A card's surface, for a page set inside a `Card`. The mark
|
|
114
|
-
* cuts its holes with `--background`, so that is re-pointed too. */
|
|
115
|
-
card: "ds:[--background:var(--card)] ds:[--foreground:var(--card-foreground)]"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
defaultVariants: { layout: "page", surface: "background" }
|
|
119
|
-
}
|
|
120
|
-
), Fe = /* @__PURE__ */ new Set(["ar"]), Me = 1500;
|
|
121
|
-
function Ae(e, a) {
|
|
122
|
-
const n = e instanceof Date ? e : new Date(e);
|
|
123
|
-
if (Number.isNaN(n.getTime())) return;
|
|
124
|
-
const l = /* @__PURE__ */ new Date(), g = l.toDateString() === n.toDateString() ? {} : {
|
|
125
|
-
day: "numeric",
|
|
126
|
-
month: "short",
|
|
127
|
-
...l.getFullYear() === n.getFullYear() ? {} : { year: "numeric" }
|
|
128
|
-
};
|
|
129
|
-
return new Intl.DateTimeFormat(a === "en" ? "en-GB" : a, {
|
|
130
|
-
...g,
|
|
131
|
-
hour: "2-digit",
|
|
132
|
-
minute: "2-digit"
|
|
133
|
-
}).format(n);
|
|
134
|
-
}
|
|
135
|
-
const U = (e, a) => !!e.getResource(a, "ui", "errorPage"), Y = (e) => be(e) ? e : "#", Ge = ue(
|
|
136
|
-
({
|
|
137
|
-
status: e,
|
|
138
|
-
homeHref: a = "/",
|
|
139
|
-
loginHref: n,
|
|
140
|
-
supportHref: l,
|
|
141
|
-
onRetry: g,
|
|
142
|
-
requestId: v,
|
|
143
|
-
backAt: p,
|
|
144
|
-
locale: b,
|
|
145
|
-
hostLocaleIsDefault: y = !1,
|
|
146
|
-
title: K,
|
|
147
|
-
message: Q,
|
|
148
|
-
primaryAction: s,
|
|
149
|
-
showHomeLink: W = !0,
|
|
150
|
-
mood: J,
|
|
151
|
-
showStatusLabel: X = !0,
|
|
152
|
-
showLogo: Z = !0,
|
|
153
|
-
as: ee,
|
|
154
|
-
focusHeading: T = !0,
|
|
155
|
-
focusKey: re,
|
|
156
|
-
scrollOnFocus: z = !1,
|
|
157
|
-
headingLevel: oe = 1,
|
|
158
|
-
layout: ae,
|
|
159
|
-
surface: $,
|
|
160
|
-
className: te,
|
|
161
|
-
...ne
|
|
162
|
-
}, se) => {
|
|
163
|
-
const { i18n: f } = pe("ui"), t = fe(
|
|
164
|
-
() => De({ locale: b, hostLocaleIsDefault: y }),
|
|
165
|
-
[b, y]
|
|
166
|
-
), [k, D] = j(() => ({
|
|
167
|
-
for: t,
|
|
168
|
-
shown: U(f, t) ? t : null
|
|
169
|
-
})), i = k.shown, [, ie] = j(0);
|
|
170
|
-
_(() => {
|
|
171
|
-
let o = !0;
|
|
172
|
-
const x = U(f, t), E = (c) => D(
|
|
173
|
-
(I) => I.for === t && I.shown === c ? I : { for: t, shown: c }
|
|
174
|
-
), L = () => D(
|
|
175
|
-
(c) => c.for === t && c.shown ? c : { for: t, shown: "en" }
|
|
176
|
-
);
|
|
177
|
-
E(x ? t : null);
|
|
178
|
-
const G = () => o && ie((c) => c + 1);
|
|
179
|
-
H("en", f).then(G).catch(() => {
|
|
180
|
-
});
|
|
181
|
-
const me = x ? void 0 : setTimeout(() => o && L(), Me);
|
|
182
|
-
return H(t, f).then(() => {
|
|
183
|
-
o && (E(t), G());
|
|
184
|
-
}).catch(() => o && L()), () => {
|
|
185
|
-
o = !1, clearTimeout(me);
|
|
186
|
-
};
|
|
187
|
-
}, [f, t]);
|
|
188
|
-
const d = f.getFixedT(
|
|
189
|
-
i && i !== "en" ? [i, "en"] : "en",
|
|
190
|
-
"ui"
|
|
191
|
-
), m = Ie(e), S = m.key === "maintenance" && p ? Ae(p, i ?? "en") : void 0, B = O(null), h = ge(), C = `${String(e)}:${re ?? ""}`, F = O(null);
|
|
192
|
-
_(() => {
|
|
193
|
-
if (!T || !k.shown || k.for !== t || F.current === C) return;
|
|
194
|
-
F.current = C;
|
|
195
|
-
const o = B.current;
|
|
196
|
-
o == null || o.focus({ preventScroll: !0 }), z && (o == null || o.scrollIntoView({ block: "nearest" }));
|
|
197
|
-
}, [k, t, T, C, z]);
|
|
198
|
-
const de = ["h1", "h2", "h3"][oe - 1], M = s !== void 0 && (typeof s.label != "string" || s.label.trim() === "");
|
|
199
|
-
_(() => {
|
|
200
|
-
M && ve() && console.warn(
|
|
201
|
-
"ErrorPage: `primaryAction.label` is empty, so its button has no accessible name. Pass the label, already translated."
|
|
202
|
-
);
|
|
203
|
-
}, [M]);
|
|
204
|
-
const A = $ === "card", ce = ee ?? (A ? "div" : "main"), le = g ?? (() => window.location.reload()), w = m.primary === "login" && !n ? "retry" : m.primary, R = (o, x, E, L) => /* @__PURE__ */ r(
|
|
205
|
-
N,
|
|
206
|
-
{
|
|
207
|
-
intent: L,
|
|
208
|
-
size: "lg",
|
|
209
|
-
flipIconInRtl: o === "login",
|
|
210
|
-
asChild: !0,
|
|
211
|
-
startIcon: E,
|
|
212
|
-
"data-action": o,
|
|
213
|
-
children: /* @__PURE__ */ r("a", { href: Y(x), children: d(`errorPage.actions.${o}`) })
|
|
214
|
-
},
|
|
215
|
-
o
|
|
216
|
-
), u = [];
|
|
217
|
-
return s ? u.push(
|
|
218
|
-
typeof s.href == "string" ? /* @__PURE__ */ r(
|
|
219
|
-
N,
|
|
220
|
-
{
|
|
221
|
-
intent: "primary",
|
|
222
|
-
size: "lg",
|
|
223
|
-
asChild: !0,
|
|
224
|
-
startIcon: s.icon,
|
|
225
|
-
"data-action": "custom",
|
|
226
|
-
children: /* @__PURE__ */ r(
|
|
227
|
-
"a",
|
|
228
|
-
{
|
|
229
|
-
href: Y(s.href),
|
|
230
|
-
onClick: s.onClick,
|
|
231
|
-
children: s.label
|
|
232
|
-
}
|
|
233
|
-
)
|
|
234
|
-
},
|
|
235
|
-
"custom"
|
|
236
|
-
) : /* @__PURE__ */ r(
|
|
237
|
-
N,
|
|
238
|
-
{
|
|
239
|
-
intent: "primary",
|
|
240
|
-
size: "lg",
|
|
241
|
-
startIcon: s.icon,
|
|
242
|
-
onClick: s.onClick,
|
|
243
|
-
"data-action": "custom",
|
|
244
|
-
children: s.label
|
|
245
|
-
},
|
|
246
|
-
"custom"
|
|
247
|
-
)
|
|
248
|
-
) : w === "retry" ? u.push(
|
|
249
|
-
/* @__PURE__ */ r(
|
|
250
|
-
N,
|
|
251
|
-
{
|
|
252
|
-
intent: "primary",
|
|
253
|
-
size: "lg",
|
|
254
|
-
startIcon: /* @__PURE__ */ r(Ee, { "aria-hidden": "true" }),
|
|
255
|
-
onClick: le,
|
|
256
|
-
"data-action": "retry",
|
|
257
|
-
children: d("errorPage.actions.retry")
|
|
258
|
-
},
|
|
259
|
-
"retry"
|
|
260
|
-
)
|
|
261
|
-
) : w === "login" && n && u.push(
|
|
262
|
-
R("login", n, /* @__PURE__ */ r(Le, { "aria-hidden": "true" }), "primary")
|
|
263
|
-
), W && e !== "offline" && m.key !== "maintenance" && !(s && w === "home") && u.push(
|
|
264
|
-
R(
|
|
265
|
-
"home",
|
|
266
|
-
a,
|
|
267
|
-
/* @__PURE__ */ r(Ce, { "aria-hidden": "true" }),
|
|
268
|
-
w === "home" ? "primary" : "secondary"
|
|
269
|
-
)
|
|
270
|
-
), l && u.push(
|
|
271
|
-
R(
|
|
272
|
-
"support",
|
|
273
|
-
l,
|
|
274
|
-
/* @__PURE__ */ r(Ne, { "aria-hidden": "true" }),
|
|
275
|
-
"ghost"
|
|
276
|
-
)
|
|
277
|
-
), /* @__PURE__ */ r(
|
|
278
|
-
ce,
|
|
279
|
-
{
|
|
280
|
-
ref: se,
|
|
281
|
-
"data-component": "error-page",
|
|
282
|
-
"data-status": String(e),
|
|
283
|
-
lang: i ?? void 0,
|
|
284
|
-
"aria-busy": i ? void 0 : !0,
|
|
285
|
-
dir: i && Fe.has(i) ? "rtl" : "ltr",
|
|
286
|
-
className: Be({
|
|
287
|
-
layout: ae ?? (A ? "embedded" : void 0),
|
|
288
|
-
surface: $,
|
|
289
|
-
className: te
|
|
290
|
-
}),
|
|
291
|
-
...ne,
|
|
292
|
-
children: /* @__PURE__ */ P(
|
|
293
|
-
"div",
|
|
294
|
-
{
|
|
295
|
-
className: i ? "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center ds:[max-inline-size:32rem]" : "ds:invisible",
|
|
296
|
-
children: [
|
|
297
|
-
/* @__PURE__ */ r(ke, { mood: J ?? m.mood }),
|
|
298
|
-
/* @__PURE__ */ P("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
299
|
-
/* @__PURE__ */ P(
|
|
300
|
-
de,
|
|
301
|
-
{
|
|
302
|
-
ref: B,
|
|
303
|
-
tabIndex: -1,
|
|
304
|
-
"aria-describedby": S ? `${h}-message ${h}-back` : `${h}-message`,
|
|
305
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:outline-none",
|
|
306
|
-
children: [
|
|
307
|
-
X && typeof e == "number" && /* @__PURE__ */ r("span", { className: "type-label ds:text-[var(--muted-foreground)]", children: d("errorPage.statusLabel", { status: e }) }),
|
|
308
|
-
/* @__PURE__ */ r("span", { className: "type-title-page", children: K ?? d(`errorPage.status.${m.key}.title`) })
|
|
309
|
-
]
|
|
310
|
-
}
|
|
311
|
-
),
|
|
312
|
-
/* @__PURE__ */ r(
|
|
313
|
-
"p",
|
|
314
|
-
{
|
|
315
|
-
id: `${h}-message`,
|
|
316
|
-
className: "type-body ds:text-[var(--muted-foreground)]",
|
|
317
|
-
children: Q ?? d(`errorPage.status.${m.key}.message`)
|
|
318
|
-
}
|
|
319
|
-
),
|
|
320
|
-
S && /* @__PURE__ */ r("p", { id: `${h}-back`, className: "type-body ds:font-semibold", children: d("errorPage.backAt", { time: S }) })
|
|
321
|
-
] }),
|
|
322
|
-
u.length > 0 && /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-center ds:gap-[var(--spacing-sm)]", children: u }),
|
|
323
|
-
v && /* @__PURE__ */ P("p", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: [
|
|
324
|
-
d("errorPage.reference", { id: v }),
|
|
325
|
-
/* @__PURE__ */ r("br", {}),
|
|
326
|
-
d("errorPage.referenceHint")
|
|
327
|
-
] }),
|
|
328
|
-
Z && /* @__PURE__ */ r(he, { decorative: !0, size: "sm", className: "ds:opacity-70" })
|
|
329
|
-
]
|
|
330
|
-
}
|
|
331
|
-
)
|
|
332
|
-
}
|
|
333
|
-
);
|
|
334
|
-
}
|
|
335
|
-
);
|
|
336
|
-
Ge.displayName = "ErrorPage";
|
|
337
|
-
export {
|
|
338
|
-
Te as E,
|
|
339
|
-
Re as a,
|
|
340
|
-
Ge as b,
|
|
341
|
-
Ie as e,
|
|
342
|
-
De as r
|
|
343
|
-
};
|
|
344
|
-
//# sourceMappingURL=error-page-Bhai-spN.js.map
|