@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":"error-page-Bhai-spN.js","sources":["../../node_modules/lucide-react/dist/esm/icons/circle-question-mark.mjs","../../node_modules/lucide-react/dist/esm/icons/house.mjs","../../src/patterns/error-page/error-page-statuses.ts","../../src/patterns/error-page/error-page-locale.ts","../../src/patterns/error-page/error-page.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\", key: \"1u773s\" }],\n [\"path\", { d: \"M12 17h.01\", key: \"p32p05\" }]\n];\nconst CircleQuestionMark = createLucideIcon(\"circle-question-mark\", __iconNode);\n\nexport { __iconNode, CircleQuestionMark as default };\n//# sourceMappingURL=circle-question-mark.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8\", key: \"5wwlr5\" }],\n [\n \"path\",\n {\n 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\",\n key: \"r6nss1\"\n }\n ]\n];\nconst House = createLucideIcon(\"house\", __iconNode);\n\nexport { __iconNode, House as default };\n//# sourceMappingURL=house.mjs.map\n","import type { ErrorPageMood } from './error-page-illustration';\n\n/** The statuses with their own copy. Anything else shows `generic`. */\nexport const ERROR_PAGE_STATUSES = [\n 400,\n 401,\n 403,\n 404,\n 405,\n 410,\n 419,\n 429,\n 500,\n 502,\n 503,\n 504,\n 'offline',\n 'maintenance',\n] as const;\n\nexport type ErrorPageKnownStatus = (typeof ERROR_PAGE_STATUSES)[number];\n\n/** What the status's main button does. */\nexport type ErrorPagePrimaryAction = 'home' | 'retry' | 'login';\n\nexport interface ErrorPageStatusSpec {\n /** Key under `ui.errorPage.status.*`. */\n key: string;\n /** How the Alfadocs mark shows the trouble. */\n mood: ErrorPageMood;\n primary: ErrorPagePrimaryAction;\n}\n\nconst SPECS: Record<ErrorPageKnownStatus | 'generic', ErrorPageStatusSpec> = {\n 400: { key: 'badRequest', mood: 'jumbled', primary: 'home' },\n 401: { key: 'unauthorised', mood: 'locked', primary: 'login' },\n 403: { key: 'forbidden', mood: 'roped', primary: 'home' },\n 404: { key: 'notFound', mood: 'lost', primary: 'home' },\n 405: { key: 'methodNotAllowed', mood: 'wrong-way', primary: 'home' },\n 410: { key: 'gone', mood: 'vanished', primary: 'home' },\n 419: { key: 'expired', mood: 'asleep', primary: 'login' },\n 429: { key: 'tooManyRequests', mood: 'melt', primary: 'retry' },\n 500: { key: 'serverError', mood: 'patched', primary: 'retry' },\n 502: { key: 'badGateway', mood: 'unplugged', primary: 'retry' },\n 503: { key: 'maintenance', mood: 'rebuild', primary: 'retry' },\n 504: { key: 'timeout', mood: 'snail', primary: 'retry' },\n offline: { key: 'offline', mood: 'adrift', primary: 'retry' },\n maintenance: { key: 'maintenance', mood: 'rebuild', primary: 'retry' },\n generic: { key: 'generic', mood: 'puzzled', primary: 'home' },\n};\n\n/** The spec for any status; unknown ones fall back to `generic`. */\nexport function errorPageStatusSpec(\n status: number | 'offline' | 'maintenance',\n): ErrorPageStatusSpec {\n return (ERROR_PAGE_STATUSES as readonly (number | string)[]).includes(status)\n ? SPECS[status as ErrorPageKnownStatus]\n : SPECS.generic;\n}\n","import type { i18n as I18n } from 'i18next';\nimport { loadLocale } from '../../i18n/config';\nimport { LOCALES_WITH_BUNDLES } from '../../i18n/supported-locales';\n\n/** Where LocalePicker and HeaderSettings save a language the visitor\n * picked: `LOCALE_STORAGE_KEY` in locale-picker.tsx, copied so the error\n * page does not bundle the picker. */\nexport const SAVED_LOCALE_KEY = 'alfadocs-ui.locale';\n\n/** Used when nothing else names a language the kit ships. */\nexport const ERROR_PAGE_FALLBACK_LOCALE = 'it';\n\nexport interface ErrorPageLocaleSources {\n /** Host-supplied locale. Always wins when the kit ships it. */\n locale?: string;\n /** True when `<html lang>` is only the site default, not the visitor's\n * language: for example an error raised before routing read it. */\n hostLocaleIsDefault?: boolean;\n /** Test seams; the browser values are read when omitted. */\n saved?: string | null;\n browser?: readonly string[];\n document?: string;\n}\n\nconst shipped = (tag: string | null | undefined): string | undefined => {\n if (!tag) return undefined;\n const base = tag.toLowerCase().replaceAll('_', '-').split('-')[0];\n // The legacy `cn` code is Chinese.\n const code = base === 'cn' ? 'zh' : base;\n return (LOCALES_WITH_BUNDLES as readonly string[]).includes(code)\n ? code\n : undefined;\n};\n\nconst readSaved = (): string | null => {\n try {\n return window.localStorage.getItem(SAVED_LOCALE_KEY);\n } catch {\n return null;\n }\n};\n\n/**\n * The language to show an error in. First match wins:\n * 1. the `locale` prop;\n * 2. the language the visitor picked before in the kit;\n * 3. the browser's languages, in order;\n * 4. `<html lang>`, unless the host says it is only its default;\n * 5. Italian.\n * Only languages the kit ships count at each step.\n */\nexport function resolveErrorPageLocale(\n sources: ErrorPageLocaleSources = {},\n): string {\n const inBrowser = typeof window !== 'undefined';\n const saved =\n sources.saved !== undefined\n ? sources.saved\n : inBrowser\n ? readSaved()\n : null;\n const browser =\n sources.browser ??\n (inBrowser && typeof navigator !== 'undefined'\n ? navigator.languages?.length\n ? navigator.languages\n : [navigator.language]\n : []);\n const documentLang =\n sources.document ??\n (typeof document !== 'undefined' ? document.documentElement.lang : '');\n\n const candidates = [\n sources.locale,\n saved,\n ...browser,\n sources.hostLocaleIsDefault ? undefined : documentLang,\n ];\n for (const candidate of candidates) {\n const code = shipped(candidate);\n if (code) return code;\n }\n return ERROR_PAGE_FALLBACK_LOCALE;\n}\n\n/** Fetches the kit's bundle for a language without changing the host's\n * active language. Rejects when the bundle cannot load. */\nexport const loadErrorPageLocale = (\n language: string,\n instance: I18n,\n): Promise<void> => loadLocale(language, instance);\n","/* -------------------------------------------------------------------- */\n/* ErrorPage — one branded, translated page for every HTTP error. */\n/* */\n/* A status picks the illustration, the copy and the main action (home, */\n/* retry or log in); a host may override each, e.g. to show an outcome */\n/* of its own. The language is chosen in the browser, so a host */\n/* whose server rendered the error before it knew the visitor's */\n/* language still shows the right one: see `resolveErrorPageLocale`. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n type Ref,\n} from 'react';\nimport type { i18n as I18n } from 'i18next';\nimport { useTranslation } from 'react-i18next';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CircleQuestionMark, House, LogIn, RotateCcw } from 'lucide-react';\nimport { Button } from '../../components/button';\nimport { Logo } from '../../components/logo';\nimport { isDevelopment } from '../../components/_shared/is-development';\nimport { isSafeHref } from '../../components/_shared/safe-href';\nimport { errorPageStatusSpec } from './error-page-statuses';\nimport {\n ErrorPageIllustration,\n type ErrorPageMood,\n} from './error-page-illustration';\nimport {\n loadErrorPageLocale,\n resolveErrorPageLocale,\n} from './error-page-locale';\n\nconst errorPageVariants = cva(\n '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)]',\n {\n variants: {\n layout: {\n /** Fills the viewport: the whole page is the error. */\n page: 'ds:min-h-screen',\n /** Fills its container, under the host's own header. */\n embedded: 'ds:[min-block-size:100%]',\n },\n surface: {\n /** The page background. */\n background: '',\n /** A card's surface, for a page set inside a `Card`. The mark\n * cuts its holes with `--background`, so that is re-pointed too. */\n card: 'ds:[--background:var(--card)] ds:[--foreground:var(--card-foreground)]',\n },\n },\n defaultVariants: { layout: 'page', surface: 'background' },\n },\n);\n\nconst RTL = new Set(['ar']);\n\n/** How long to wait for the chosen language before showing English. An\n * error page often appears because the network is failing. */\nconst LANGUAGE_PATIENCE = 1500;\n\n/** \"22:00\" today, \"30 set, 22:00\" on another day, and with the year when\n * it is not this year. Undefined for a date that does not parse, so a\n * bad value shows nothing. */\nfunction formatBackAt(\n value: Date | string,\n locale: string,\n): string | undefined {\n const at = value instanceof Date ? value : new Date(value);\n if (Number.isNaN(at.getTime())) return undefined;\n const now = new Date();\n const day =\n now.toDateString() === at.toDateString()\n ? {}\n : ({\n day: 'numeric',\n month: 'short',\n ...(now.getFullYear() === at.getFullYear()\n ? {}\n : { year: 'numeric' }),\n } as const);\n // Plain `en` formats the US way; the kit writes British English.\n return new Intl.DateTimeFormat(locale === 'en' ? 'en-GB' : locale, {\n ...day,\n hour: '2-digit',\n minute: '2-digit',\n }).format(at);\n}\n\n/** True when the instance holds error page copy for a language. A host\n * may register its own `ui` bundle, even a partial one for this page:\n * the kit's full bundle is still merged in, and English backs every\n * key, so a gap never shows as a raw key. */\nconst hasCopy = (instance: I18n, language: string): boolean =>\n Boolean(instance.getResource(language, 'ui', 'errorPage'));\n\n/** Links the page may render: paths on the same site, and web, mail and\n * phone addresses written out in full. Anything else becomes `#`. */\nconst safeHref = (href: string): string => (isSafeHref(href) ? href : '#');\n\n/** A host's own main action: a link (`href`) or a button (`onClick`).\n * The label is shown as given, so pass it already translated. A link may\n * also take `onClick`, e.g. to record the click: it runs, and the link\n * still opens. */\nexport type ErrorPageCustomAction =\n | { label: string; href: string; onClick?: () => void; icon?: ReactNode }\n | { label: string; onClick: () => void; href?: never; icon?: ReactNode };\n\nexport interface ErrorPageProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'title'>,\n VariantProps<typeof errorPageVariants> {\n /** `'page'` fills the viewport; `'embedded'` fills its container, under\n * the host's own header. Default `'page'`, or `'embedded'` with\n * `surface=\"card\"`. */\n layout?: VariantProps<typeof errorPageVariants>['layout'];\n /** `'card'` takes a card's colour, for a page set inside a `Card`, and\n * then defaults to `layout=\"embedded\"` and `as=\"div\"`. Default\n * `'background'`. */\n surface?: VariantProps<typeof errorPageVariants>['surface'];\n /** HTTP status, `'offline'` for a network error in the browser, or\n * `'maintenance'` for planned downtime with no HTTP error behind it.\n * Statuses without their own copy show the generic page. */\n status: number | 'offline' | 'maintenance';\n /** Where \"Go to the home page\" leads. Default `/`. Like every link\n * here it may be a path on the same site or an `http(s)`, `mailto:`\n * or `tel:` address; anything else is replaced with `#`. */\n homeHref?: string;\n /** Where \"Log in\" leads for 401 and 419. Without it, those statuses\n * offer \"Try again\" instead. */\n loginHref?: string;\n /** Adds \"Contact support\". A path, a web address, `mailto:` or `tel:`. */\n supportHref?: string;\n /** \"Try again\". Default: reload the page. */\n onRetry?: () => void;\n /** Shown for support to quote, e.g. the host's X-Request-Id. */\n requestId?: string;\n /** When planned maintenance should end, for 503 and `'maintenance'`.\n * Shown in the visitor's own time zone and language. Pass a `Date`, or\n * an ISO string with its offset (`2026-10-01T22:00:00+02:00`): without\n * one the browser reads it as the visitor's local time. */\n backAt?: Date | string;\n /** The host's language. Always wins when the kit ships it. */\n locale?: string;\n /** True when `<html lang>` is only the site default, as on an error\n * raised before routing: the page then skips it when choosing. */\n hostLocaleIsDefault?: boolean;\n /** Replaces the status title. Pass it already translated. */\n title?: string;\n /** Replaces the status message. Pass it already translated. */\n message?: string;\n /** Replaces the status's main button with the host's own, e.g. \"Book\n * an appointment\". Where the main button was Home (400, 403, 404,\n * 405, 410 and any status without its own copy), the home link goes\n * with it; where it was \"Try again\" or \"Log in\", the home link\n * stays as the second button. */\n primaryAction?: ErrorPageCustomAction;\n /** Shows \"Go to the home page\". Default true. False hides it on every\n * status, leaving the status's own main button (\"Try again\" or \"Log\n * in\"), or `primaryAction` in its place, and \"Contact support\" when\n * `supportHref` is set. On a status whose main button was Home, that\n * can leave no button at all. */\n showHomeLink?: boolean;\n /** Picks the mark's mood whatever the status, e.g. for a status\n * without its own copy. */\n mood?: ErrorPageMood;\n /** Shows \"Error 404\" above the title. Default true. Turn it off when\n * the page reports an outcome inside an app rather than an HTTP\n * error. */\n showStatusLabel?: boolean;\n /** Signs the page with the Alfadocs wordmark. Default true. */\n showLogo?: boolean;\n /** Renders as `<main>` or as `<div>` when the host already has a main\n * landmark. Default `'main'`, or `'div'` with `surface=\"card\"`. */\n as?: 'main' | 'div';\n /** Moves focus to the heading once shown, and again when the status\n * or `focusKey` changes. Default true. */\n focusHeading?: boolean;\n /** Moves focus to the heading again when it changes, even under the\n * same status: a retry count, say, so a retry that fails the same way\n * is announced again. Copy that changes on its own never moves focus. */\n focusKey?: string | number;\n /** Scrolls the heading into view, if it is not, when it takes focus.\n * Default false, so focus never moves the host's page. Turn it on when\n * the page can appear below the fold, as in a long form. */\n scrollOnFocus?: boolean;\n /** The heading's level. Default 1; pass 2 inside an app page that\n * already has its own `h1`. */\n headingLevel?: 1 | 2 | 3;\n}\n\nexport const ErrorPage = forwardRef<HTMLElement, ErrorPageProps>(\n (\n {\n status,\n homeHref = '/',\n loginHref,\n supportHref,\n onRetry,\n requestId,\n backAt,\n locale,\n hostLocaleIsDefault = false,\n title,\n message,\n primaryAction,\n showHomeLink = true,\n mood,\n showStatusLabel = true,\n showLogo = true,\n as,\n focusHeading = true,\n focusKey,\n scrollOnFocus = false,\n headingLevel = 1,\n layout,\n surface,\n className,\n ...rest\n },\n ref,\n ) => {\n const { i18n } = useTranslation('ui');\n const language = useMemo(\n () => resolveErrorPageLocale({ locale, hostLocaleIsDefault }),\n [locale, hostLocaleIsDefault],\n );\n // The chosen language may not be loaded yet. Until it is, the page\n // stays hidden rather than flashing English. If it cannot load, or\n // takes too long (offline, a failing gateway), the page shows in\n // English and switches over if the language arrives after all.\n // `for` is the language each answer was given for: when the language\n // changes, the old answer is still on screen until the new one comes.\n const [answer, setAnswer] = useState<{\n for: string;\n shown: string | null;\n }>(() => ({\n for: language,\n shown: hasCopy(i18n, language) ? language : null,\n }));\n const shown = answer.shown;\n // Bumped when a bundle lands, so copy that arrives then is drawn.\n const [, setLoaded] = useState(0);\n useEffect(() => {\n let current = true;\n const ready = hasCopy(i18n, language);\n const show = (next: string | null) =>\n setAnswer((now) =>\n now.for === language && now.shown === next\n ? now\n : { for: language, shown: next },\n );\n // English if nothing for this language is shown yet.\n const english = () =>\n setAnswer((now) =>\n now.for === language && now.shown\n ? now\n : { for: language, shown: 'en' },\n );\n show(ready ? language : null);\n const landed = () => current && setLoaded((count) => count + 1);\n // The kit's full bundles: English backs every key, and a host's own\n // instance may hold neither yet. A loaded bundle resolves at once.\n void loadErrorPageLocale('en', i18n)\n .then(landed)\n .catch(() => undefined);\n const patience = ready\n ? undefined\n : setTimeout(() => current && english(), LANGUAGE_PATIENCE);\n loadErrorPageLocale(language, i18n)\n .then(() => {\n if (!current) return;\n show(language);\n landed();\n })\n .catch(() => current && english());\n return () => {\n current = false;\n clearTimeout(patience);\n };\n }, [i18n, language]);\n\n // The chosen language first, English for any key it lacks.\n const t = i18n.getFixedT(\n shown && shown !== 'en' ? [shown, 'en'] : 'en',\n 'ui',\n );\n const spec = errorPageStatusSpec(status);\n const backTime =\n spec.key === 'maintenance' && backAt\n ? formatBackAt(backAt, shown ?? 'en')\n : undefined;\n\n const headingRef = useRef<HTMLHeadingElement | null>(null);\n const copyId = useId();\n // Once per status and focusKey: copy that arrives late (the kit's\n // language or the host's) must not pull focus back, but a different\n // status or key shown in place must be announced. And only once the\n // language asked for has answered: while the old one is still on\n // screen, focus would land before the page appears in the new one.\n const focusFor = `${String(status)}:${focusKey ?? ''}`;\n const focusedFor = useRef<string | null>(null);\n useEffect(() => {\n if (!focusHeading || !answer.shown || answer.for !== language) return;\n if (focusedFor.current === focusFor) return;\n focusedFor.current = focusFor;\n const heading = headingRef.current;\n heading?.focus({ preventScroll: true });\n if (scrollOnFocus) heading?.scrollIntoView({ block: 'nearest' });\n }, [answer, language, focusHeading, focusFor, scrollOnFocus]);\n const Heading = (['h1', 'h2', 'h3'] as const)[headingLevel - 1];\n\n // A blank label leaves the host's button with no accessible name.\n const blankLabel =\n primaryAction !== undefined &&\n (typeof primaryAction.label !== 'string' ||\n primaryAction.label.trim() === '');\n // isDevelopment, not import.meta.env.DEV: the library build strips the\n // latter, and this warning is for the host's developer.\n useEffect(() => {\n if (blankLabel && isDevelopment()) {\n console.warn(\n 'ErrorPage: `primaryAction.label` is empty, so its button has no accessible name. Pass the label, already translated.',\n );\n }\n }, [blankLabel]);\n\n // A page inside a card is part of the host's page.\n const inCard = surface === 'card';\n const Root = as ?? (inCard ? 'div' : 'main');\n\n const retry = onRetry ?? (() => window.location.reload());\n const primary =\n spec.primary === 'login' && !loginHref ? 'retry' : spec.primary;\n\n const link = (\n action: 'home' | 'login' | 'support',\n href: string,\n icon: ReactNode,\n intent: 'primary' | 'secondary' | 'ghost',\n ) => (\n <Button\n key={action}\n intent={intent}\n size=\"lg\"\n flipIconInRtl={action === 'login'}\n asChild\n startIcon={icon}\n data-action={action}\n >\n <a href={safeHref(href)}>{t(`errorPage.actions.${action}`)}</a>\n </Button>\n );\n\n const actions: ReactNode[] = [];\n if (primaryAction) {\n actions.push(\n typeof primaryAction.href === 'string' ? (\n <Button\n key=\"custom\"\n intent=\"primary\"\n size=\"lg\"\n asChild\n startIcon={primaryAction.icon}\n data-action=\"custom\"\n >\n <a\n href={safeHref(primaryAction.href)}\n onClick={primaryAction.onClick}\n >\n {primaryAction.label}\n </a>\n </Button>\n ) : (\n <Button\n key=\"custom\"\n intent=\"primary\"\n size=\"lg\"\n startIcon={primaryAction.icon}\n onClick={primaryAction.onClick}\n data-action=\"custom\"\n >\n {primaryAction.label}\n </Button>\n ),\n );\n } else if (primary === 'retry') {\n actions.push(\n <Button\n key=\"retry\"\n intent=\"primary\"\n size=\"lg\"\n startIcon={<RotateCcw aria-hidden=\"true\" />}\n onClick={retry}\n data-action=\"retry\"\n >\n {t('errorPage.actions.retry')}\n </Button>,\n );\n } else if (primary === 'login' && loginHref) {\n actions.push(\n link('login', loginHref, <LogIn aria-hidden=\"true\" />, 'primary'),\n );\n }\n // Always a way back, except offline or during maintenance, where\n // there is nowhere to go, where the host's own action replaced it, and\n // where the host turned it off.\n if (\n showHomeLink &&\n status !== 'offline' &&\n spec.key !== 'maintenance' &&\n !(primaryAction && primary === 'home')\n ) {\n actions.push(\n link(\n 'home',\n homeHref,\n <House aria-hidden=\"true\" />,\n primary === 'home' ? 'primary' : 'secondary',\n ),\n );\n }\n if (supportHref) {\n actions.push(\n link(\n 'support',\n supportHref,\n <CircleQuestionMark aria-hidden=\"true\" />,\n 'ghost',\n ),\n );\n }\n\n return (\n <Root\n ref={ref as Ref<HTMLDivElement>}\n data-component=\"error-page\"\n data-status={String(status)}\n lang={shown ?? undefined}\n aria-busy={shown ? undefined : true}\n dir={shown && RTL.has(shown) ? 'rtl' : 'ltr'}\n className={errorPageVariants({\n layout: layout ?? (inCard ? 'embedded' : undefined),\n surface,\n className,\n })}\n {...rest}\n >\n <div\n className={\n shown\n ? 'ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center ds:[max-inline-size:32rem]'\n : 'ds:invisible'\n }\n >\n <ErrorPageIllustration mood={mood ?? spec.mood} />\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n {/* Focus lands here, so the status label sits inside the\n heading: a screen reader would never read a label before\n it. No outline: the heading is focused by script only and\n is not in the tab order. */}\n <Heading\n ref={headingRef}\n tabIndex={-1}\n aria-describedby={\n backTime\n ? `${copyId}-message ${copyId}-back`\n : `${copyId}-message`\n }\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:outline-none\"\n >\n {showStatusLabel && typeof status === 'number' && (\n <span className=\"type-label ds:text-[var(--muted-foreground)]\">\n {t('errorPage.statusLabel', { status })}\n </span>\n )}\n <span className=\"type-title-page\">\n {title ?? t(`errorPage.status.${spec.key}.title`)}\n </span>\n </Heading>\n <p\n id={`${copyId}-message`}\n className=\"type-body ds:text-[var(--muted-foreground)]\"\n >\n {message ?? t(`errorPage.status.${spec.key}.message`)}\n </p>\n {backTime && (\n <p id={`${copyId}-back`} className=\"type-body ds:font-semibold\">\n {t('errorPage.backAt', { time: backTime })}\n </p>\n )}\n </div>\n {actions.length > 0 && (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:justify-center ds:gap-[var(--spacing-sm)]\">\n {actions}\n </div>\n )}\n {requestId && (\n <p className=\"type-body-sm ds:text-[var(--muted-foreground)]\">\n {t('errorPage.reference', { id: requestId })}\n <br />\n {t('errorPage.referenceHint')}\n </p>\n )}\n {showLogo && <Logo decorative size=\"sm\" className=\"ds:opacity-70\" />}\n </div>\n </Root>\n );\n },\n);\nErrorPage.displayName = 'ErrorPage';\n"],"names":["__iconNode","CircleQuestionMark","createLucideIcon","House","ERROR_PAGE_STATUSES","SPECS","errorPageStatusSpec","status","SAVED_LOCALE_KEY","ERROR_PAGE_FALLBACK_LOCALE","shipped","tag","base","code","LOCALES_WITH_BUNDLES","readSaved","resolveErrorPageLocale","sources","inBrowser","saved","browser","_a","documentLang","candidates","candidate","loadErrorPageLocale","language","instance","loadLocale","errorPageVariants","cva","RTL","LANGUAGE_PATIENCE","formatBackAt","value","locale","at","now","day","hasCopy","safeHref","href","isSafeHref","ErrorPage","forwardRef","homeHref","loginHref","supportHref","onRetry","requestId","backAt","hostLocaleIsDefault","title","message","primaryAction","showHomeLink","mood","showStatusLabel","showLogo","as","focusHeading","focusKey","scrollOnFocus","headingLevel","layout","surface","className","rest","ref","i18n","useTranslation","useMemo","answer","setAnswer","useState","shown","setLoaded","useEffect","current","ready","show","next","english","landed","count","patience","t","spec","backTime","headingRef","useRef","copyId","useId","focusFor","focusedFor","heading","Heading","blankLabel","isDevelopment","inCard","Root","retry","primary","link","action","icon","intent","jsx","Button","actions","RotateCcw","LogIn","jsxs","ErrorPageIllustration","Logo"],"mappings":";;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,MAAM,KAAK,UAAU;AAAA,EACzD,CAAC,QAAQ,EAAE,GAAG,wCAAwC,KAAK,SAAQ,CAAE;AAAA,EACrE,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAC7C,GACMC,KAAqBC,EAAiB,wBAAwBF,EAAU;ACd9E;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,8CAA8C,KAAK,SAAQ,CAAE;AAAA,EAC3E;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AACA,GACMG,KAAQD,EAAiB,SAASF,EAAU,GChBrCI,KAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAeMC,IAAuE;AAAA,EAC3E,KAAK,EAAE,KAAK,cAAc,MAAM,WAAW,SAAS,OAAA;AAAA,EACpD,KAAK,EAAE,KAAK,gBAAgB,MAAM,UAAU,SAAS,QAAA;AAAA,EACrD,KAAK,EAAE,KAAK,aAAa,MAAM,SAAS,SAAS,OAAA;AAAA,EACjD,KAAK,EAAE,KAAK,YAAY,MAAM,QAAQ,SAAS,OAAA;AAAA,EAC/C,K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A;AAAA,gBAEF,gBAAAoB;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,IAAI,GAAGhB,CAAM;AAAA,oBACb,WAAU;AAAA,oBAET,UAAAtC,KAAWiC,EAAE,oBAAoBC,EAAK,GAAG,UAAU;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAErDC,KACC,gBAAAmB,EAAC,KAAA,EAAE,IAAI,GAAGhB,CAAM,SAAS,WAAU,8BAChC,YAAE,oBAAoB,EAAE,MAAMH,EAAA,CAAU,EAAA,CAC3C;AAAA,cAAA,GAEJ;AAAA,cACCqB,EAAQ,SAAS,uBACf,OAAA,EAAI,WAAU,qFACZ,UAAAA,GACH;AAAA,cAED5D,KACC,gBAAA+D,EAAC,KAAA,EAAE,WAAU,kDACV,UAAA;AAAA,gBAAA1B,EAAE,uBAAuB,EAAE,IAAIrC,EAAA,CAAW;AAAA,kCAC1C,MAAA,EAAG;AAAA,gBACHqC,EAAE,yBAAyB;AAAA,cAAA,GAC9B;AAAA,cAED5B,uBAAawD,IAAA,EAAK,YAAU,IAAC,MAAK,MAAK,WAAU,gBAAA,CAAgB;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACpE;AAAA,IAAA;AAAA,EAGN;AACF;AACAvE,GAAU,cAAc;","x_google_ignoreList":[0,1]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header-settings-BVhjndtV.js","sources":["../../src/components/header-settings/header-settings.agent.ts","../../src/components/header-settings/header-settings.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — HeaderSettings. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HeaderSettingsHandle } from './header-settings';\n\nexport const headerSettingsAgent: AgentAdapter<HeaderSettingsHandle> = {\n id: 'header-settings',\n // Each setter persists a single preference value (locale / theme /\n // accessibility) — `set_value` semantics, not an ephemeral view switch.\n capabilities: ['set_value'],\n // Read-back for all three setters. None of these preferences is\n // recoverable from the DOM — `useTheme` resolves preference + OS into\n // a single applied class, so `theme: 'system'` and `theme: 'light'`\n // both paint `.theme-light` — and `set_locale` swallows unknown tags.\n // Without these slots an agent cannot distinguish \"switched to\n // Italian\" from \"the tag was dropped on the floor\". All four are UI\n // preferences: no PHI, no patient-identifiable data (§7).\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.headerSettings.state.locale',\n description:\n 'Active IETF language tag (e.g. \"en\", \"it\", \"ar\"). Initially uses HTML lang first when followHtmlLang is enabled; otherwise storage, then HTML lang when initialLocaleFromHtmlLang is enabled, then the browser. Read after set_locale to confirm the switch; unknown tags leave it unchanged.',\n read: (handle) => handle.getLocale(),\n },\n theme: {\n type: \"'light' | 'dark' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.theme',\n description:\n \"Stored base-theme preference. `'system'` means no override is set and the OS decides — read `resolvedTheme` for what is actually painted.\",\n read: (handle) => handle.getTheme(),\n },\n accessibility: {\n type: \"'default' | 'accessible' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.accessibility',\n description:\n \"Stored AAA-contrast preference. `'system'` means no override is set and `prefers-contrast` decides.\",\n read: (handle) => handle.getAccessibility(),\n },\n resolvedTheme: {\n type: \"'light' | 'dark' | 'light-accessible' | 'dark-accessible'\",\n descriptionKey: 'ui.agent.headerSettings.state.resolvedTheme',\n description:\n 'The theme actually applied to the document once preference and OS signals resolve. This is what makes a `set_theme(\"system\")` or `set_accessibility(\"system\")` write verifiable.',\n read: (handle) => handle.getResolvedTheme(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\", \"ar\"). Unknown tags are silently dropped.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setLocale',\n description:\n \"Switch the active locale to the given IETF tag. Unknown tags are silently dropped — read the `locale` state slot afterwards to confirm. On a site with one address per language, the host may then load that language's address.\",\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\n examples: [{ args: { locale: 'it' }, note: 'Switch to Italian.' }],\n invoke: (handle, args: { locale: string }) => {\n // Validation happens inside the handle so the agent surface\n // accepts arbitrary tags and silently drops unknown ones.\n handle.setLocale(args.locale);\n },\n },\n set_theme: {\n safety: 'write',\n argsType: '{ theme: \"light\" | \"dark\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: { theme: { enum: ['light', 'dark', 'system'] } },\n required: ['theme'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setTheme',\n description:\n 'Switch the theme preference. Verify with the `theme` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n { args: { theme: 'dark' }, note: 'Switch to the dark theme.' },\n ],\n invoke: (handle, args: { theme: 'light' | 'dark' | 'system' }) => {\n handle.setTheme(args.theme);\n },\n },\n set_accessibility: {\n safety: 'write',\n argsType: '{ accessibility: \"default\" | \"accessible\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: {\n accessibility: {\n enum: ['default', 'accessible', 'system'],\n description:\n \"`'system'` clears the override and follows `prefers-contrast`.\",\n },\n },\n required: ['accessibility'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setAccessibility',\n description:\n 'Switch the accessibility preference. Verify with the `accessibility` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n {\n args: { accessibility: 'accessible' },\n note: 'Enable the AAA-accessible profile.',\n },\n ],\n invoke: (\n handle,\n args: { accessibility: 'default' | 'accessible' | 'system' },\n ) => {\n handle.setAccessibility(args.accessibility);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'header-settings',\n description: 'Marks the HeaderSettings wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop (forwarded via HTMLAttributes).',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type FocusEvent,\n type HTMLAttributes,\n type KeyboardEvent,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ArrowLeft, ChevronRight, Settings } from 'lucide-react';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport {\n LocalePicker,\n persistLocalePreference,\n reportLocaleChange,\n type LocaleChangeHandler,\n useInitialLocale,\n} from '../locale-picker/locale-picker';\nimport {\n useTheme,\n type AccessibilityPreference,\n type ResolvedTheme,\n type ThemePreference,\n} from '../../hooks';\nimport { useLocale } from '../../hooks/use-locale';\nimport { useMediaQuery } from '../../hooks/use-media-query';\nimport { useDocumentDirection } from '../../hooks/use-direction';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { headerSettingsAgent } from './header-settings.agent';\nimport { useLengthTokenPx } from '../_shared/length-token';\n\nfunction applyDocumentAttrs(locale: Locale): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n root.lang = locale;\n root.dir = LOCALE_META[locale].dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n align: {\n start: '',\n end: '',\n },\n },\n defaultVariants: { align: 'end' },\n});\n\n// The language flyout hosts the searchable locale list, so it takes a\n// popover width rather than the menu's minimum.\nconst languageFlyoutClasses = 'ds:w-[var(--popover-size-md)]';\n\nconst panelVariants = cva('', {\n variants: {\n language: {\n true: 'ds:[inline-size:var(--popover-size-md)] ds:[min-inline-size:0] ds:[max-inline-size:calc(100vw_-_2_*_var(--spacing-lg))] ds:[&_input]:min-w-0',\n false: '',\n },\n },\n});\n\ntype PhoneView = 'main' | 'language' | 'appearance';\n\nconst phoneRowClasses = cva(\n 'ds:flex ds:flex-1 ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]',\n);\n\nfunction SettingRowLabel({\n label,\n value,\n lang,\n}: {\n label: string;\n value: string;\n lang?: string;\n}) {\n return (\n <span className={phoneRowClasses()}>\n <span className=\"ds:truncate\">{label}</span>\n <span\n lang={lang}\n className=\"ds:shrink-0 ds:text-muted-foreground ds:[[data-highlighted]_&]:text-current\"\n >\n {value}\n </span>\n </span>\n );\n}\n\nfunction isLocale(tag: string): tag is Locale {\n return Object.prototype.hasOwnProperty.call(LOCALE_META, tag);\n}\n\n/* ------------------------------------------------------------------ */\n/* LanguageSub */\n/* */\n/* One menu row naming the setting and showing the current language */\n/* (\"Language · English ›\"), laid out like DropdownMenu.ChoiceSub. It */\n/* opens a flyout beside the menu holding LocalePicker.SearchList, so */\n/* the 18 locales stay searchable. The flyout is a dialog, not a menu: */\n/* it holds a search combobox and a listbox, which a menu may not own. */\n/* ------------------------------------------------------------------ */\n\nfunction LanguageSub({\n locale,\n onLocaleChange,\n}: {\n locale: string;\n onLocaleChange?: LocaleChangeHandler;\n}) {\n const { t } = useTranslation('ui');\n const current = LOCALE_META[isLocale(locale) ? locale : 'en'];\n\n // Radix focuses the flyout itself when a keyboard user opens it. Hand\n // that focus on to the search field so typing filters at once.\n const handleFocus = (event: FocusEvent<HTMLDivElement>) => {\n if (event.target !== event.currentTarget) return;\n event.currentTarget\n .querySelector<HTMLInputElement>('input')\n ?.focus({ preventScroll: true });\n };\n\n // The flyout closes on the \"back\" arrow (ArrowLeft, or ArrowRight in\n // RTL). Inside the search field that key moves the caret instead,\n // unless the caret is already at the start of the field. Capture\n // phase, so Radix's own handler on the flyout never sees the key.\n const handleKeyDownCapture = (event: KeyboardEvent<HTMLDivElement>) => {\n const target = event.target;\n if (!(target instanceof HTMLInputElement)) return;\n // Keys pressed while an IME is composing (Japanese, Chinese) belong to\n // the composition, never to the menu.\n if (event.nativeEvent.isComposing) {\n event.stopPropagation();\n return;\n }\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return;\n if (target.selectionStart !== 0 || target.selectionEnd !== 0) {\n event.stopPropagation();\n }\n };\n\n return (\n <DropdownMenu.Sub>\n <DropdownMenu.SubTrigger aria-haspopup=\"dialog\" data-value={current.code}>\n <span className=\"ds:flex ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <span className=\"ds:truncate\">\n {t('navigation.headerSettings.language.label')}\n </span>\n <span\n lang={current.code}\n className=\"ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:[[data-highlighted]_&]:text-current\"\n >\n {current.nativeName}\n </span>\n </span>\n </DropdownMenu.SubTrigger>\n {/* Radix renders a `menu`; override to `dialog` and drop the\n menu-only `aria-orientation`, which a dialog may not carry. */}\n <DropdownMenu.SubContent\n role=\"dialog\"\n aria-orientation={undefined}\n className={languageFlyoutClasses}\n onFocus={handleFocus}\n onKeyDownCapture={handleKeyDownCapture}\n // Escape that cancels an IME conversion must not close the menu.\n onEscapeKeyDown={(escapeEvent) => {\n if (escapeEvent.isComposing) escapeEvent.preventDefault();\n }}\n >\n <LocalePicker.SearchList onLocaleChange={onLocaleChange} />\n </DropdownMenu.SubContent>\n </DropdownMenu.Sub>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport interface HeaderSettingsProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n /** Anchor side for the dropdown. Defaults to `end` (matches LTR + RTL). */\n align?: 'start' | 'end';\n /**\n * Size of the cog trigger only. Forwards to the underlying\n * `IconButton`. Defaults to `md` to preserve the existing visual.\n * Use `sm` when composing alongside other `<Button size=\"sm\">`\n * actions in a header row — keeps the visual rhythm consistent.\n *\n * The menu itself (language, appearance and accessible-mode rows)\n * stays at kit defaults regardless — this prop only sizes the\n * trigger.\n */\n size?: 'sm' | 'md' | 'lg';\n /** Disable the trigger entirely. */\n disabled?: boolean;\n /**\n * With no saved choice, start from the page's HTML lang before falling back\n * to the browser. Defaults to false. The first locale surface's mount effect\n * decides for the app lifecycle; pass the same option to LocalePicker.\n */\n initialLocaleFromHtmlLang?: boolean;\n /**\n * The page's HTML lang decides the starting locale, ahead of a saved\n * choice. For sites with one address per language, where the address\n * decides. Defaults to false. Pass the same option to LocalePicker.\n */\n followHtmlLang?: boolean;\n /**\n * Called after a language picked in the menu (or set through the agent\n * handle) has been applied and changed the language. Not called for the\n * starting locale. A site with one address per language navigates to\n * `resolved` here.\n */\n onLocaleChange?: LocaleChangeHandler;\n}\n\nexport interface HeaderSettingsHandle {\n /**\n * Switch the active locale. Widened to `string` (vs. `Locale`) so\n * agent surfaces with untyped inputs can call through without\n * extra casting — invalid tags no-op silently.\n */\n setLocale: (next: string) => void;\n setTheme: (next: ThemePreference) => void;\n setAccessibility: (next: AccessibilityPreference) => void;\n /* ---- read-back for the three setters above -------------------- */\n /** Active IETF language tag, as i18next resolved it. */\n getLocale: () => string;\n /** Stored base-theme preference (`'system'` when no override is set). */\n getTheme: () => ThemePreference;\n /** Stored AAA-contrast preference (`'system'` when no override is set). */\n getAccessibility: () => AccessibilityPreference;\n /**\n * The theme actually painted once preference + OS signals resolve.\n * `theme: 'system'` and `theme: 'light'` both render `.theme-light`,\n * so this is what makes a `setTheme('system')` write verifiable.\n */\n getResolvedTheme: () => ResolvedTheme;\n}\n\n/* ------------------------------------------------------------------ */\n/* HeaderSettings */\n/* */\n/* Single button → single DropdownMenu surface, laid out as a View */\n/* menu: Language, Appearance (light / dark / system) and an Accessible */\n/* mode SwitchItem. On phones the lists replace the panel with a Back */\n/* row; on larger screens they open beside it. Every row uses the hooks */\n/* (`useLocale`, `useTheme`) as the standalone components, so there is */\n/* no state duplication. */\n/* ------------------------------------------------------------------ */\n\nexport const HeaderSettings = forwardRef<HTMLDivElement, HeaderSettingsProps>(\n (props, ref) => {\n const {\n align = 'end',\n size = 'md',\n disabled = false,\n initialLocaleFromHtmlLang = false,\n followHtmlLang = false,\n onLocaleChange,\n className,\n id,\n ...rest\n } = props as HeaderSettingsProps & { id?: string };\n\n const { t } = useTranslation('ui');\n const theme = useTheme();\n const { locale, setLocale: setLocaleI18n } = useLocale();\n // The language search only mounts with its flyout, so apply the saved\n // (or HTML/browser) language here, on mount.\n useInitialLocale(initialLocaleFromHtmlLang, followHtmlLang);\n const onLocaleChangeRef = useRef(onLocaleChange);\n onLocaleChangeRef.current = onLocaleChange;\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n // PublicHeader uses ds:md:hidden / ds:hidden ds:md:flex for its phone\n // sheet and inline actions. Match that same Tailwind md boundary (768px).\n const isPhone = useMediaQuery('(width < 48rem)');\n const direction = useDocumentDirection();\n const [phoneView, setPhoneView] = useState<PhoneView>('main');\n const view = isPhone ? phoneView : 'main';\n const panelRef = useRef<HTMLDivElement>(null);\n const languageRowRef = useRef<HTMLDivElement>(null);\n const appearanceRowRef = useRef<HTMLDivElement>(null);\n const returnFocusRef = useRef<Exclude<PhoneView, 'main'> | null>(null);\n const activationRef = useRef('keyboard');\n\n useIsomorphicLayoutEffect(() => {\n if (!isPhone && phoneView !== 'main') {\n returnFocusRef.current = phoneView;\n setPhoneView('main');\n }\n if (view === 'language') {\n panelRef.current\n ?.querySelector<HTMLElement>(\n activationRef.current === 'keyboard' ? 'input' : 'button',\n )\n ?.focus({ preventScroll: true });\n } else if (view === 'appearance') {\n panelRef.current\n ?.querySelector<HTMLElement>('[role=\"menuitem\"]')\n ?.focus({ preventScroll: true });\n } else if (returnFocusRef.current) {\n const section = returnFocusRef.current;\n // Desktop renders SubTrigger/ChoiceSub in place of the phone rows.\n const row = isPhone\n ? (section === 'language' ? languageRowRef : appearanceRowRef).current\n : panelRef.current?.querySelector<HTMLElement>(\n `[role=\"menuitem\"][aria-haspopup=\"${section === 'language' ? 'dialog' : 'menu'}\"]`,\n );\n row?.focus({ preventScroll: true });\n returnFocusRef.current = null;\n }\n }, [isPhone, phoneView, view]);\n\n const handlePhoneRowKeyDown = (\n event: KeyboardEvent<HTMLDivElement>,\n section: Exclude<PhoneView, 'main'>,\n ) => {\n if (event.nativeEvent.isComposing) return;\n const forwardKey = direction === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n if (\n event.key === 'Enter' ||\n event.key === ' ' ||\n event.key === forwardKey\n )\n activationRef.current = 'keyboard';\n if (event.key === forwardKey) {\n event.preventDefault();\n setPhoneView(section);\n }\n };\n\n const goBack = () => {\n if (view === 'main') return;\n returnFocusRef.current = view;\n setPhoneView('main');\n };\n\n const handlePhoneKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (view === 'main') return;\n if (event.nativeEvent.isComposing) {\n event.stopPropagation();\n return;\n }\n if (event.key !== (direction === 'rtl' ? 'ArrowRight' : 'ArrowLeft'))\n return;\n const target = event.target;\n // As in LanguageSub, leave the caret alone until it reaches the start.\n if (\n target instanceof HTMLInputElement &&\n (target.selectionStart !== 0 || target.selectionEnd !== 0)\n )\n return;\n event.preventDefault();\n event.stopPropagation();\n goBack();\n };\n\n // Same side-effect chain as LocalePicker's internal helper:\n // i18next.changeLanguage → document.dir/lang → persist.\n // Share persistence and session preference with every locale picker.\n const setLocaleWithPersistence = useCallback(\n (next: Locale) => {\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n persistLocalePreference(next);\n },\n [setLocaleI18n],\n );\n const setLocaleRef = useRef(setLocaleWithPersistence);\n setLocaleRef.current = setLocaleWithPersistence;\n // Assigned during render (not in an effect) so an agent reading the\n // slot immediately after `set_locale` sees the settled value rather\n // than the pre-commit one.\n const localeRef = useRef(locale);\n localeRef.current = locale;\n\n const themeRef = useRef(theme);\n themeRef.current = theme;\n const agentHandle = useMemo<HeaderSettingsHandle>(\n () => ({\n setLocale: (next: string) => {\n // Mirrors LocalePicker's gating — silently drop unknown tags\n // rather than crash mid-cascade. `LOCALES_WITH_BUNDLES` is\n // re-imported via the LOCALE_META keys so this file doesn't\n // need the resources module on the build-agent-catalog path.\n if (Object.prototype.hasOwnProperty.call(LOCALE_META, next)) {\n const previous = localeRef.current;\n setLocaleRef.current(next as Locale);\n reportLocaleChange(\n onLocaleChangeRef.current,\n next as Locale,\n previous as Locale,\n );\n }\n },\n setTheme: (next) => themeRef.current.setTheme(next),\n setAccessibility: (next) => themeRef.current.setAccessibility(next),\n // Read-back. None of the three preferences is recoverable from\n // the DOM: `useTheme` resolves preference + OS into one applied\n // class, so `theme: 'system'` and `theme: 'light'` both paint\n // `.theme-light`. Without these an agent cannot tell a switch\n // that landed from one that was dropped.\n getLocale: () => localeRef.current,\n getTheme: () => themeRef.current.theme,\n getAccessibility: () => themeRef.current.accessibility,\n getResolvedTheme: () => themeRef.current.resolvedTheme,\n }),\n [],\n );\n useAgentRegistration(headerSettingsAgent, agentHandle, id);\n\n const accessibleChecked = theme.accessibility === 'accessible';\n // Keep the panel clear of the screen edge by the phone menu's own\n // side margin. In the PublicHeader sheet the gear is\n // 24px from the edge and an end-aligned 224px panel would otherwise be\n // pushed flush against it. On desktop it never reaches the edge.\n const edgeMargin = useLengthTokenPx('--spacing-lg', forwardedRef, 24);\n const languageLabel = t('navigation.headerSettings.language.label');\n const appearanceLabel = t('navigation.headerSettings.appearance.label');\n const currentLocale = LOCALE_META[isLocale(locale) ? locale : 'en'];\n const appearanceOptions = [\n {\n value: 'light',\n label: t('navigation.headerSettings.appearance.light'),\n },\n { value: 'dark', label: t('navigation.headerSettings.appearance.dark') },\n {\n value: 'system',\n label: t('navigation.headerSettings.appearance.system'),\n },\n ] as const;\n const backLabel = t('navigation.headerSettings.back');\n\n return (\n <div\n ref={forwardedRef}\n data-component=\"header-settings\"\n data-component-id={id}\n className={wrapperVariants({ align, className })}\n {...rest}\n >\n <DropdownMenu.Root\n onOpenChange={(open) => {\n if (!open) {\n returnFocusRef.current = null;\n setPhoneView('main');\n }\n }}\n >\n <DropdownMenu.Trigger asChild>\n <IconButton\n size={size}\n disabled={disabled}\n icon={<Settings aria-hidden />}\n aria-label={t('navigation.headerSettings.trigger')}\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n ref={panelRef}\n align={align}\n collisionPadding={edgeMargin}\n className={panelVariants({ language: view === 'language' })}\n {...(view === 'language'\n ? {\n role: 'dialog',\n 'aria-orientation': undefined,\n 'aria-label': languageLabel,\n 'aria-labelledby': undefined,\n }\n : {})}\n onKeyDownCapture={handlePhoneKeyDown}\n onEscapeKeyDown={(event) => {\n if (event.isComposing) event.preventDefault();\n }}\n >\n {view === 'language' ? (\n <div\n role=\"presentation\"\n onKeyDown={(event) => {\n // The dialog owns typing and Tab, not Radix's menu\n // typeahead. Its two tab stops are Back and search.\n if (\n event.key === 'Tab' &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey\n ) {\n event.preventDefault();\n event.currentTarget\n .querySelector<HTMLElement>(\n event.target instanceof HTMLInputElement\n ? 'button'\n : 'input',\n )\n ?.focus();\n }\n event.stopPropagation();\n }}\n >\n <Button\n intent=\"ghost\"\n size=\"sm\"\n className=\"ds:w-full ds:justify-start ds:text-start ds:font-normal ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:gap-[var(--spacing-sm)] ds:[&>span:last-child]:flex-1\"\n startIcon={<ArrowLeft aria-hidden className=\"ds:size-4\" />}\n flipIconInRtl\n onClick={goBack}\n >\n <SettingRowLabel label={backLabel} value={languageLabel} />\n </Button>\n <DropdownMenu.Separator />\n <LocalePicker.SearchList onLocaleChange={onLocaleChange} />\n </div>\n ) : view === 'appearance' ? (\n <>\n <DropdownMenu.Item\n startIcon={\n <ArrowLeft\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onSelect={(event) => {\n event.preventDefault();\n goBack();\n }}\n >\n <SettingRowLabel label={backLabel} value={appearanceLabel} />\n </DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.RadioGroup\n aria-label={appearanceLabel}\n value={theme.theme}\n onValueChange={(next) =>\n theme.setTheme(next as ThemePreference)\n }\n >\n {appearanceOptions.map((option) => (\n <DropdownMenu.RadioItem\n key={option.value}\n value={option.value}\n onSelect={(event) => event.preventDefault()}\n >\n {option.label}\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n </>\n ) : (\n <>\n {isPhone ? (\n <DropdownMenu.Item\n ref={languageRowRef}\n aria-haspopup=\"dialog\"\n data-value={currentLocale.code}\n endIcon={\n <ChevronRight\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onPointerDown={(event) => {\n activationRef.current = event.pointerType;\n }}\n onKeyDown={(event) =>\n handlePhoneRowKeyDown(event, 'language')\n }\n onSelect={(event) => {\n event.preventDefault();\n setPhoneView('language');\n }}\n >\n <SettingRowLabel\n label={languageLabel}\n value={currentLocale.nativeName}\n lang={currentLocale.code}\n />\n </DropdownMenu.Item>\n ) : (\n <LanguageSub\n locale={locale}\n onLocaleChange={onLocaleChange}\n />\n )}\n <DropdownMenu.Separator />\n {isPhone ? (\n <DropdownMenu.Item\n ref={appearanceRowRef}\n aria-haspopup=\"menu\"\n data-value={theme.theme}\n endIcon={\n <ChevronRight\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onPointerDown={(event) => {\n activationRef.current = event.pointerType;\n }}\n onKeyDown={(event) =>\n handlePhoneRowKeyDown(event, 'appearance')\n }\n onSelect={(event) => {\n event.preventDefault();\n setPhoneView('appearance');\n }}\n >\n <SettingRowLabel\n label={appearanceLabel}\n value={\n appearanceOptions.find(\n (option) => option.value === theme.theme,\n )?.label ?? ''\n }\n />\n </DropdownMenu.Item>\n ) : (\n <DropdownMenu.ChoiceSub\n label={appearanceLabel}\n value={theme.theme}\n onValueChange={theme.setTheme}\n options={appearanceOptions}\n />\n )}\n {/* Writes through useTheme, so the document gets the\n `theme-accessible` class at once (including the Lexend\n swap for Latin scripts, see src/tokens/index.css). */}\n <DropdownMenu.SwitchItem\n checked={accessibleChecked}\n onCheckedChange={(next) =>\n theme.setAccessibility(next ? 'accessible' : 'default')\n }\n >\n {t('navigation.headerSettings.appearance.accessible')}\n </DropdownMenu.SwitchItem>\n </>\n )}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </div>\n );\n },\n);\n\nHeaderSettings.displayName = 'HeaderSettings';\n"],"names":["headerSettingsAgent","handle","args","applyDocumentAttrs","locale","root","LOCALE_META","wrapperVariants","cva","languageFlyoutClasses","panelVariants","phoneRowClasses","SettingRowLabel","label","value","lang","jsxs","jsx","isLocale","tag","LanguageSub","onLocaleChange","t","useTranslation","current","handleFocus","event","_a","handleKeyDownCapture","target","DropdownMenu","escapeEvent","LocalePicker","HeaderSettings","forwardRef","props","ref","align","size","disabled","initialLocaleFromHtmlLang","followHtmlLang","className","id","rest","theme","useTheme","setLocaleI18n","useLocale","useInitialLocale","onLocaleChangeRef","useRef","forwardedRef","useImperativeHandle","isPhone","useMediaQuery","direction","useDocumentDirection","phoneView","setPhoneView","useState","view","panelRef","languageRowRef","appearanceRowRef","returnFocusRef","activationRef","useIsomorphicLayoutEffect","_b","_d","_c","section","row","_e","handlePhoneRowKeyDown","forwardKey","goBack","handlePhoneKeyDown","setLocaleWithPersistence","useCallback","next","persistLocalePreference","setLocaleRef","localeRef","themeRef","agentHandle","useMemo","previous","reportLocaleChange","useAgentRegistration","accessibleChecked","edgeMargin","useLengthTokenPx","languageLabel","appearanceLabel","currentLocale","appearanceOptions","backLabel","open","IconButton","Settings","Button","ArrowLeft","Fragment","option","ChevronRight"],"mappings":";;;;;;;;;;;;;;;;;;AAOO,MAAMA,KAA0D;AAAA,EACrE,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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