@alfadocs/ui-kit-debug 0.64.0 → 0.66.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/{agenda-tray-DA6qj8BL.js → agenda-tray-Bh1KfEOG.js} +2 -2
- package/dist/_chunks/{agenda-tray-DA6qj8BL.js.map → agenda-tray-Bh1KfEOG.js.map} +1 -1
- package/dist/_chunks/{ai-consent-banner-DBKV27je.js → ai-consent-banner-Btzmk8OH.js} +3 -2
- package/dist/_chunks/{ai-consent-banner-DBKV27je.js.map → ai-consent-banner-Btzmk8OH.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-Dx8eXoPm.js → ai-prompt-input-BwEACCPm.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-Dx8eXoPm.js.map → ai-prompt-input-BwEACCPm.js.map} +1 -1
- package/dist/_chunks/{ai-tools-rail-7tC3GT4h.js → ai-tools-rail-DAfaW8eA.js} +65 -56
- package/dist/_chunks/ai-tools-rail-DAfaW8eA.js.map +1 -0
- package/dist/_chunks/{alia-sidebar-DlvyXgVC.js → alia-sidebar-CN8pA6c-.js} +7 -7
- package/dist/_chunks/{alia-sidebar-DlvyXgVC.js.map → alia-sidebar-CN8pA6c-.js.map} +1 -1
- package/dist/_chunks/{anamnesis-card-CmkBVAln.js → anamnesis-card-qeLYRG79.js} +2 -2
- package/dist/_chunks/{anamnesis-card-CmkBVAln.js.map → anamnesis-card-qeLYRG79.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-CdiqkF05.js → antenatal-schedule-timeline-BfzFjEyb.js} +3 -3
- package/dist/_chunks/{antenatal-schedule-timeline-CdiqkF05.js.map → antenatal-schedule-timeline-BfzFjEyb.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-BwDHhWWC.js → appointment-tray-BQnJEora.js} +2 -2
- package/dist/_chunks/{appointment-tray-BwDHhWWC.js.map → appointment-tray-BQnJEora.js.map} +1 -1
- package/dist/_chunks/{ar-C68WKG5a.js → ar-Cn5Fq48Z.js} +2 -2
- package/dist/_chunks/{ar-C68WKG5a.js.map → ar-Cn5Fq48Z.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-CdXuT9ln.js → audio-recorder-DjXLP4aF.js} +2 -2
- package/dist/_chunks/{audio-recorder-CdXuT9ln.js.map → audio-recorder-DjXLP4aF.js.map} +1 -1
- package/dist/_chunks/{autocomplete-CDqxB68B.js → autocomplete-CcCFlVf-.js} +4 -4
- package/dist/_chunks/{autocomplete-CDqxB68B.js.map → autocomplete-CcCFlVf-.js.map} +1 -1
- package/dist/_chunks/{bishop-score-CzjSx-dm.js → bishop-score-DPN4Ched.js} +2 -2
- package/dist/_chunks/{bishop-score-CzjSx-dm.js.map → bishop-score-DPN4Ched.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-DA2NGmVK.js → bmi-calculator-DuUneHuZ.js} +2 -2
- package/dist/_chunks/{bmi-calculator-DA2NGmVK.js.map → bmi-calculator-DuUneHuZ.js.map} +1 -1
- package/dist/_chunks/{booking-ChfvWy3P.js → booking-L8-YP8BJ.js} +148 -148
- package/dist/_chunks/booking-L8-YP8BJ.js.map +1 -0
- package/dist/_chunks/calendar-B6soK1Yb.js +17 -0
- package/dist/_chunks/calendar-B6soK1Yb.js.map +1 -0
- package/dist/_chunks/{calendar-CkuJIg3s.js → calendar-oYWOCrnf.js} +1 -1
- package/dist/_chunks/{calendar-CkuJIg3s.js.map → calendar-oYWOCrnf.js.map} +1 -1
- package/dist/_chunks/{care-plan-card-DhZNoXs4.js → care-plan-card-D42WD4-T.js} +2 -2
- package/dist/_chunks/{care-plan-card-DhZNoXs4.js.map → care-plan-card-D42WD4-T.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-DW70yBOD.js → care-plan-entry-card-BukNI7Uy.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-DW70yBOD.js.map → care-plan-entry-card-BukNI7Uy.js.map} +1 -1
- package/dist/_chunks/{carousel.agent-DrX96W-1.js → carousel.agent-vt21A_el.js} +2 -2
- package/dist/_chunks/{carousel.agent-DrX96W-1.js.map → carousel.agent-vt21A_el.js.map} +1 -1
- package/dist/_chunks/{chat-input-CFwc7JxL.js → chat-input-B5zjNEUN.js} +2 -2
- package/dist/_chunks/{chat-input-CFwc7JxL.js.map → chat-input-B5zjNEUN.js.map} +1 -1
- package/dist/_chunks/{chat-message-Dm8U2RY1.js → chat-message-3V54YipB.js} +2 -2
- package/dist/_chunks/{chat-message-Dm8U2RY1.js.map → chat-message-3V54YipB.js.map} +1 -1
- package/dist/_chunks/{code-block-HoddNOKJ.js → code-block-BBWHhIc8.js} +2 -2
- package/dist/_chunks/{code-block-HoddNOKJ.js.map → code-block-BBWHhIc8.js.map} +1 -1
- package/dist/_chunks/columns-2-BTOBZbep.js +15 -0
- package/dist/_chunks/columns-2-BTOBZbep.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-DvvVfAA2.js → contact-profile-card-CCeJmjbd.js} +2 -2
- package/dist/_chunks/{contact-profile-card-DvvVfAA2.js.map → contact-profile-card-CCeJmjbd.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-C_t1Hs8V.js → cycle-calculator-D6LTmtQt.js} +4 -4
- package/dist/_chunks/{cycle-calculator-C_t1Hs8V.js.map → cycle-calculator-D6LTmtQt.js.map} +1 -1
- package/dist/_chunks/{date-picker-BfHblqwA.js → date-picker-oGg5BnXL.js} +12 -11
- package/dist/_chunks/{date-picker-BfHblqwA.js.map → date-picker-oGg5BnXL.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-CXEAx3O_.js → date-picker-variants-DAcSLTua.js} +358 -372
- package/dist/_chunks/date-picker-variants-DAcSLTua.js.map +1 -0
- package/dist/_chunks/{date-range-picker-hcAMs1wO.js → date-range-picker-C5BWfH_T.js} +34 -25
- package/dist/_chunks/{date-range-picker-hcAMs1wO.js.map → date-range-picker-C5BWfH_T.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-H-3Pwqlb.js → date-time-picker-Ze1My59T.js} +18 -17
- package/dist/_chunks/{date-time-picker-H-3Pwqlb.js.map → date-time-picker-Ze1My59T.js.map} +1 -1
- package/dist/_chunks/{de-DK4A9_a8.js → de-CrJs4ZsX.js} +2 -2
- package/dist/_chunks/{de-DK4A9_a8.js.map → de-CrJs4ZsX.js.map} +1 -1
- package/dist/_chunks/{description-list-BEbK2g93.js → description-list-gkNGWk5G.js} +2 -2
- package/dist/_chunks/{description-list-BEbK2g93.js.map → description-list-gkNGWk5G.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-Q8MIwEVV.js → due-date-calculator-CIG194vq.js} +4 -4
- package/dist/_chunks/{due-date-calculator-Q8MIwEVV.js.map → due-date-calculator-CIG194vq.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-BQgaKFCz.js → editable-currency-cell-renderer-f3d0Rhue.js} +535 -535
- package/dist/_chunks/editable-currency-cell-renderer-f3d0Rhue.js.map +1 -0
- package/dist/_chunks/editor-overlay-wYm22wZK.js +88 -0
- package/dist/_chunks/editor-overlay-wYm22wZK.js.map +1 -0
- package/dist/_chunks/{el-B29HXhG5.js → el-DHdMOIhL.js} +6 -6
- package/dist/_chunks/{el-B29HXhG5.js.map → el-DHdMOIhL.js.map} +1 -1
- package/dist/_chunks/{es-BOwPVwWn.js → es-DCATCfqo.js} +2 -2
- package/dist/_chunks/{es-BOwPVwWn.js.map → es-DCATCfqo.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-D1a6BmM-.js → fetal-weight-Xf8-ZoDy.js} +2 -2
- package/dist/_chunks/{fetal-weight-D1a6BmM-.js.map → fetal-weight-Xf8-ZoDy.js.map} +1 -1
- package/dist/_chunks/{fiscal-code-input-BZ0FxwUl.js → fiscal-code-input-DPtqluVb.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-BZ0FxwUl.js.map → fiscal-code-input-DPtqluVb.js.map} +1 -1
- package/dist/_chunks/{fr-DoDBtn0T.js → fr-BfGEMshF.js} +2 -2
- package/dist/_chunks/{fr-DoDBtn0T.js.map → fr-BfGEMshF.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-gHGA44dW.js → freemium-paywall-CkWjv3o6.js} +2 -2
- package/dist/_chunks/{freemium-paywall-gHGA44dW.js.map → freemium-paywall-CkWjv3o6.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-D85E8lGN.js → gestational-age-calculator-BGsZaWXW.js} +6 -6
- package/dist/_chunks/{gestational-age-calculator-D85E8lGN.js.map → gestational-age-calculator-BGsZaWXW.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-Dg0Hr7ey.js → hcg-doubling-LH5i6oM7.js} +3 -3
- package/dist/_chunks/{hcg-doubling-Dg0Hr7ey.js.map → hcg-doubling-LH5i6oM7.js.map} +1 -1
- package/dist/_chunks/{header-Ce1Br27u.js → header-CNszv2WQ.js} +2 -2
- package/dist/_chunks/{header-Ce1Br27u.js.map → header-CNszv2WQ.js.map} +1 -1
- package/dist/_chunks/{header-settings-D5Z2B_Yz.js → header-settings-CNOqIhoW.js} +3 -3
- package/dist/_chunks/{header-settings-D5Z2B_Yz.js.map → header-settings-CNOqIhoW.js.map} +1 -1
- package/dist/_chunks/{hi-DGByrKby.js → hi-CBFRXEIm.js} +2 -2
- package/dist/_chunks/{hi-DGByrKby.js.map → hi-CBFRXEIm.js.map} +1 -1
- package/dist/_chunks/icon-button-LqoiKcUN.js +78 -0
- package/dist/_chunks/icon-button-LqoiKcUN.js.map +1 -0
- package/dist/_chunks/image-C6RM5hfF.js +16 -0
- package/dist/_chunks/image-C6RM5hfF.js.map +1 -0
- package/dist/_chunks/{insert-result-C1SYdueh.js → insert-result-njqBthzT.js} +115 -125
- package/dist/_chunks/insert-result-njqBthzT.js.map +1 -0
- package/dist/_chunks/{isSameWeek-B1odL2vR.js → isSameWeek-I3DfXUp1.js} +2 -2
- package/dist/_chunks/{isSameWeek-B1odL2vR.js.map → isSameWeek-I3DfXUp1.js.map} +1 -1
- package/dist/_chunks/{it-B16rEecm.js → it-nz6vAKwG.js} +7 -7
- package/dist/_chunks/{it-B16rEecm.js.map → it-nz6vAKwG.js.map} +1 -1
- package/dist/_chunks/{ja-B0viOgft.js → ja-DQcqdAEJ.js} +2 -2
- package/dist/_chunks/{ja-B0viOgft.js.map → ja-DQcqdAEJ.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-CkQIb9EG.js → key-value-pair-BrgbMfbF.js} +2 -2
- package/dist/_chunks/{key-value-pair-CkQIb9EG.js.map → key-value-pair-BrgbMfbF.js.map} +1 -1
- package/dist/_chunks/{locale-picker-D99UyZVJ.js → locale-picker-C9JmBht3.js} +3 -3
- package/dist/_chunks/{locale-picker-D99UyZVJ.js.map → locale-picker-C9JmBht3.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-C4OYAC22.js → marketplace-app-shell-Cou6XnMJ.js} +5 -5
- package/dist/_chunks/{marketplace-app-shell-C4OYAC22.js.map → marketplace-app-shell-Cou6XnMJ.js.map} +1 -1
- package/dist/_chunks/{message-card-Dvl1TgaN.js → message-card-Bgcvfj6-.js} +2 -2
- package/dist/_chunks/{message-card-Dvl1TgaN.js.map → message-card-Bgcvfj6-.js.map} +1 -1
- package/dist/_chunks/{message-tray-Dl6GQaaV.js → message-tray-saAVMeHP.js} +3 -3
- package/dist/_chunks/{message-tray-Dl6GQaaV.js.map → message-tray-saAVMeHP.js.map} +1 -1
- package/dist/_chunks/{multi-select-DOLO3K_z.js → multi-select-BcPylvHR.js} +100 -90
- package/dist/_chunks/multi-select-BcPylvHR.js.map +1 -0
- package/dist/_chunks/{nl-cBxEX2QU.js → nl-L5SuDjyl.js} +2 -2
- package/dist/_chunks/{nl-cBxEX2QU.js.map → nl-L5SuDjyl.js.map} +1 -1
- package/dist/_chunks/{notification-card-CObnGdJu.js → notification-card-BiESdm8q.js} +2 -2
- package/dist/_chunks/{notification-card-CObnGdJu.js.map → notification-card-BiESdm8q.js.map} +1 -1
- package/dist/_chunks/{notification-tray-BWHDIjgd.js → notification-tray-DlgenTEe.js} +3 -3
- package/dist/_chunks/{notification-tray-BWHDIjgd.js.map → notification-tray-DlgenTEe.js.map} +1 -1
- package/dist/_chunks/{patient-search-CArmRKeg.js → patient-search-Bw9ONucF.js} +2 -2
- package/dist/_chunks/{patient-search-CArmRKeg.js.map → patient-search-Bw9ONucF.js.map} +1 -1
- package/dist/_chunks/{patient-shell-Coarf346.js → patient-shell-Tgpv0HND.js} +4 -4
- package/dist/_chunks/{patient-shell-Coarf346.js.map → patient-shell-Tgpv0HND.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-BnTqxcTr.js → patient-summary-card-Bgso0p_l.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BnTqxcTr.js.map → patient-summary-card-Bgso0p_l.js.map} +1 -1
- package/dist/_chunks/{payment-form-DJ9vnzrT.js → payment-form-nXocS_MX.js} +11 -4
- package/dist/_chunks/{payment-form-DJ9vnzrT.js.map → payment-form-nXocS_MX.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-B_lyobd0.js → payment-request-card-DBz3hVDz.js} +3 -3
- package/dist/_chunks/{payment-request-card-B_lyobd0.js.map → payment-request-card-DBz3hVDz.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer-chMpwpA4.js → pdf-viewer-GsfNqeeT.js} +3 -3
- package/dist/_chunks/pdf-viewer-GsfNqeeT.js.map +1 -0
- package/dist/_chunks/{periodontal-chart-card-BYs9hax1.js → periodontal-chart-card-AYyHtU9K.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-BYs9hax1.js.map → periodontal-chart-card-AYyHtU9K.js.map} +1 -1
- package/dist/_chunks/phone-input-DVXhNlIl.js +563 -0
- package/dist/_chunks/phone-input-DVXhNlIl.js.map +1 -0
- package/dist/_chunks/{pl-DtS08ioY.js → pl-YAn5z2wR.js} +3 -3
- package/dist/_chunks/{pl-DtS08ioY.js.map → pl-YAn5z2wR.js.map} +1 -1
- package/dist/_chunks/{popover-Devce-tT.js → popover-DTbfAuR0.js} +2 -2
- package/dist/_chunks/{popover-Devce-tT.js.map → popover-DTbfAuR0.js.map} +1 -1
- package/dist/_chunks/{practice-results-CtfciF2v.js → practice-results-CVAgY2RZ.js} +3 -3
- package/dist/_chunks/{practice-results-CtfciF2v.js.map → practice-results-CVAgY2RZ.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-7NUaAfob.js → pregnancy-dating-f9aJbiAk.js} +6 -6
- package/dist/_chunks/{pregnancy-dating-7NUaAfob.js.map → pregnancy-dating-f9aJbiAk.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-DI7X-0JX.js → pregnancy-weight-gain-BMRBeA8V.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-DI7X-0JX.js.map → pregnancy-weight-gain-BMRBeA8V.js.map} +1 -1
- package/dist/_chunks/{privacy-lock-BN3L-alb.js → privacy-lock-C7JyMf0y.js} +2 -2
- package/dist/_chunks/{privacy-lock-BN3L-alb.js.map → privacy-lock-C7JyMf0y.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-CkfZBA3t.js → product-hub-panel-CAXDFeGP.js} +2 -2
- package/dist/_chunks/{product-hub-panel-CkfZBA3t.js.map → product-hub-panel-CAXDFeGP.js.map} +1 -1
- package/dist/_chunks/{pt-yFXs1VvH.js → pt-D9xdT5KQ.js} +6 -6
- package/dist/_chunks/{pt-yFXs1VvH.js.map → pt-D9xdT5KQ.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-CYQK6T6F.js → public-header.agent-BOhJgZEU.js} +3 -3
- package/dist/_chunks/{public-header.agent-CYQK6T6F.js.map → public-header.agent-BOhJgZEU.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-CPrXu5TX.js → reviews-panel-DBktKm7i.js} +2 -2
- package/dist/_chunks/{reviews-panel-CPrXu5TX.js.map → reviews-panel-DBktKm7i.js.map} +1 -1
- package/dist/_chunks/rich-text-editor-B5XQNxe8.js +1586 -0
- package/dist/_chunks/rich-text-editor-B5XQNxe8.js.map +1 -0
- package/dist/_chunks/{ro-DsCzSrzR.js → ro-Cp--52bT.js} +2 -2
- package/dist/_chunks/{ro-DsCzSrzR.js.map → ro-Cp--52bT.js.map} +1 -1
- package/dist/_chunks/{ru-DgDxL0pc.js → ru-BM8eX_Zz.js} +3 -3
- package/dist/_chunks/{ru-DgDxL0pc.js.map → ru-BM8eX_Zz.js.map} +1 -1
- package/dist/_chunks/{search-bar-CvN_S0jW.js → search-bar-SY2BcV2N.js} +2 -2
- package/dist/_chunks/{search-bar-CvN_S0jW.js.map → search-bar-SY2BcV2N.js.map} +1 -1
- package/dist/_chunks/{search-input-D3aMvi4l.js → search-input-DbxrnHkW.js} +3 -3
- package/dist/_chunks/{search-input-D3aMvi4l.js.map → search-input-DbxrnHkW.js.map} +1 -1
- package/dist/_chunks/{sheet-xbzu4YiY.js → sheet-taJer-Ha.js} +2 -2
- package/dist/_chunks/{sheet-xbzu4YiY.js.map → sheet-taJer-Ha.js.map} +1 -1
- package/dist/_chunks/{sidebar-DPEHzxLZ.js → sidebar-BFwbx74W.js} +12 -1
- package/dist/_chunks/sidebar-BFwbx74W.js.map +1 -0
- package/dist/_chunks/{sign-document--nr5cxsB.js → sign-document-CdAiHiCh.js} +2 -2
- package/dist/_chunks/{sign-document--nr5cxsB.js.map → sign-document-CdAiHiCh.js.map} +1 -1
- package/dist/_chunks/{sign-in-with-alfadocs-button-BpAjVmsI.js → sign-in-with-alfadocs-button-LppxjlFt.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-BpAjVmsI.js.map → sign-in-with-alfadocs-button-LppxjlFt.js.map} +1 -1
- package/dist/_chunks/{signature-field-DbhbpLha.js → signature-field-Dy1JRjzE.js} +10 -3
- package/dist/_chunks/{signature-field-DbhbpLha.js.map → signature-field-Dy1JRjzE.js.map} +1 -1
- package/dist/_chunks/{slot-grid-BlHHP9Qy.js → slot-grid-FsqumOaS.js} +2 -2
- package/dist/_chunks/{slot-grid-BlHHP9Qy.js.map → slot-grid-FsqumOaS.js.map} +1 -1
- package/dist/_chunks/smart-date-CWikAqZx.js +114 -0
- package/dist/_chunks/smart-date-CWikAqZx.js.map +1 -0
- package/dist/_chunks/{social-sign-in-button-uJYLM366.js → social-sign-in-button-dlpPI5l7.js} +2 -2
- package/dist/_chunks/{social-sign-in-button-uJYLM366.js.map → social-sign-in-button-dlpPI5l7.js.map} +1 -1
- package/dist/_chunks/{spinner-OjQNn8oN.js → spinner-hbwuKwMf.js} +10 -10
- package/dist/_chunks/{spinner-OjQNn8oN.js.map → spinner-hbwuKwMf.js.map} +1 -1
- package/dist/_chunks/{sq-DHlCYN67.js → sq-XRpr0r49.js} +6 -6
- package/dist/_chunks/{sq-DHlCYN67.js.map → sq-XRpr0r49.js.map} +1 -1
- package/dist/_chunks/{streaming-text-CfhDqtIT.js → streaming-text-BB9mvK4m.js} +2 -2
- package/dist/_chunks/{streaming-text-CfhDqtIT.js.map → streaming-text-BB9mvK4m.js.map} +1 -1
- package/dist/_chunks/subDays-BcYv1Lxi.js +8 -0
- package/dist/_chunks/{subDays-Bs00akhK.js.map → subDays-BcYv1Lxi.js.map} +1 -1
- package/dist/_chunks/{sv-O0QaQs_s.js → sv-Z3APomE8.js} +2 -2
- package/dist/_chunks/{sv-O0QaQs_s.js.map → sv-Z3APomE8.js.map} +1 -1
- package/dist/_chunks/{task-tray-Cb_hK4yb.js → task-tray-CAncV-QQ.js} +2 -2
- package/dist/_chunks/{task-tray-Cb_hK4yb.js.map → task-tray-CAncV-QQ.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-DAW7uC0B.js → theme-toggle-DETmSu_h.js} +2 -2
- package/dist/_chunks/{theme-toggle-DAW7uC0B.js.map → theme-toggle-DETmSu_h.js.map} +1 -1
- package/dist/_chunks/{toast.agent-B0MCsvdZ.js → toast.agent-vuLRRn2a.js} +2 -2
- package/dist/_chunks/{toast.agent-B0MCsvdZ.js.map → toast.agent-vuLRRn2a.js.map} +1 -1
- package/dist/_chunks/{tooth-scheme-CiphQaON.js → tooth-scheme-BIx1O2aJ.js} +3 -3
- package/dist/_chunks/{tooth-scheme-CiphQaON.js.map → tooth-scheme-BIx1O2aJ.js.map} +1 -1
- package/dist/_chunks/{tr-BmNDRuio.js → tr-e0-P4FON.js} +2 -2
- package/dist/_chunks/{tr-BmNDRuio.js.map → tr-e0-P4FON.js.map} +1 -1
- package/dist/_chunks/{transcript-panel-B4HiC7ed.js → transcript-panel-CLHmv83g.js} +2 -2
- package/dist/_chunks/{transcript-panel-B4HiC7ed.js.map → transcript-panel-CLHmv83g.js.map} +1 -1
- package/dist/_chunks/trash-2-rPAKaRgB.js +18 -0
- package/dist/_chunks/trash-2-rPAKaRgB.js.map +1 -0
- package/dist/_chunks/{unit-converter-BIbXHIQA.js → unit-converter-C1V3ACM9.js} +2 -2
- package/dist/_chunks/{unit-converter-BIbXHIQA.js.map → unit-converter-C1V3ACM9.js.map} +1 -1
- package/dist/_chunks/{wallet-pay-button-DuDPBlCO.js → wallet-pay-button--dnR6NfJ.js} +2 -2
- package/dist/_chunks/{wallet-pay-button-DuDPBlCO.js.map → wallet-pay-button--dnR6NfJ.js.map} +1 -1
- package/dist/_chunks/{workflow-map-BJDUNYlX.js → workflow-map-Bt4Of5dT.js} +137 -149
- package/dist/_chunks/workflow-map-Bt4Of5dT.js.map +1 -0
- package/dist/_chunks/{zh-CN-CgVJZEzz.js → zh-CN-B-igM5gY.js} +3 -3
- package/dist/_chunks/{zh-CN-CgVJZEzz.js.map → zh-CN-B-igM5gY.js.map} +1 -1
- package/dist/agent-catalog.json +32 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts.map +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts.map +1 -1
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/icon-button.d.ts.map +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/filters/date-range-filter.d.ts.map +1 -1
- package/dist/components/data-table/filters/select-filter.d.ts.map +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/editor-overlay.d.ts +19 -0
- package/dist/components/editor-overlay/editor-overlay.d.ts.map +1 -0
- package/dist/components/editor-overlay/index.d.ts +3 -0
- package/dist/components/editor-overlay/index.d.ts.map +1 -0
- package/dist/components/editor-overlay/index.js +5 -0
- package/dist/components/editor-overlay/index.js.map +1 -0
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts.map +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.d.ts +9 -0
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +26 -0
- package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -0
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +25 -0
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.agent.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +43 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/signature-field/signature-field.d.ts.map +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/smart-date/index.d.ts +3 -0
- package/dist/components/smart-date/index.d.ts.map +1 -0
- package/dist/components/smart-date/index.js +5 -0
- package/dist/components/smart-date/index.js.map +1 -0
- package/dist/components/smart-date/smart-date.d.ts +32 -0
- package/dist/components/smart-date/smart-date.d.ts.map +1 -0
- package/dist/components/social-sign-in-button/index.js +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/wallet-pay-button/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +60 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +61 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +60 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +61 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +60 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +61 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +60 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +65 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +60 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +61 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +60 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +61 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +60 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +61 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +60 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +61 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +60 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +61 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +60 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +61 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +60 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +61 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +60 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +61 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +60 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +61 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +60 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +61 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +60 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +61 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +60 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +61 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +60 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +61 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +60 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +61 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +494 -490
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +61 -1
- package/dist/locales/de.json +61 -1
- package/dist/locales/el.json +61 -1
- package/dist/locales/en.json +61 -1
- package/dist/locales/es.json +61 -1
- package/dist/locales/fr.json +61 -1
- package/dist/locales/hi.json +61 -1
- package/dist/locales/it.json +61 -1
- package/dist/locales/ja.json +61 -1
- package/dist/locales/nl.json +61 -1
- package/dist/locales/pl.json +61 -1
- package/dist/locales/pt.json +61 -1
- package/dist/locales/ro.json +61 -1
- package/dist/locales/ru.json +61 -1
- package/dist/locales/sq.json +61 -1
- package/dist/locales/sv.json +61 -1
- package/dist/locales/tr.json +61 -1
- package/dist/locales/zh.json +61 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +36 -22
- package/package.json +10 -1
- package/dist/_chunks/ai-tools-rail-7tC3GT4h.js.map +0 -1
- package/dist/_chunks/booking-ChfvWy3P.js.map +0 -1
- package/dist/_chunks/date-picker-variants-CXEAx3O_.js.map +0 -1
- package/dist/_chunks/editable-currency-cell-renderer-BQgaKFCz.js.map +0 -1
- package/dist/_chunks/icon-button-CKEOrN37.js +0 -70
- package/dist/_chunks/icon-button-CKEOrN37.js.map +0 -1
- package/dist/_chunks/insert-result-C1SYdueh.js.map +0 -1
- package/dist/_chunks/multi-select-DOLO3K_z.js.map +0 -1
- package/dist/_chunks/pdf-viewer-chMpwpA4.js.map +0 -1
- package/dist/_chunks/phone-input-DfZbPPvh.js +0 -525
- package/dist/_chunks/phone-input-DfZbPPvh.js.map +0 -1
- package/dist/_chunks/rich-text-editor-B03qM22-.js +0 -334
- package/dist/_chunks/rich-text-editor-B03qM22-.js.map +0 -1
- package/dist/_chunks/sidebar-DPEHzxLZ.js.map +0 -1
- package/dist/_chunks/subDays-Bs00akhK.js +0 -8
- package/dist/_chunks/workflow-map-BJDUNYlX.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as i, Fragment as f } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as g, useState as y, useCallback as z } from "react";
|
|
3
3
|
import { c as P } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as I } from "react-i18next";
|
|
5
|
-
import { I as K } from "./icon-button-
|
|
5
|
+
import { I as K } from "./icon-button-LqoiKcUN.js";
|
|
6
6
|
import { C as T } from "./check-DPdL_Sm7.js";
|
|
7
7
|
import { C as j } from "./copy-B00HK7tj.js";
|
|
8
8
|
const B = P("ds:flex", {
|
|
@@ -141,4 +141,4 @@ export {
|
|
|
141
141
|
L as K,
|
|
142
142
|
_ as a
|
|
143
143
|
};
|
|
144
|
-
//# sourceMappingURL=key-value-pair-
|
|
144
|
+
//# sourceMappingURL=key-value-pair-BrgbMfbF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-value-pair-CkQIb9EG.js","sources":["../../src/components/key-value-pair/key-value-pair.tsx"],"sourcesContent":["import { forwardRef, useState, useCallback, type HTMLAttributes } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Copy, Check } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\n\n/* ------------------------------------------------------------------ */\n/* CVA — root wrapper */\n/* */\n/* The layout variants below describe the LOGICAL flow of label/value. */\n/* When an `icon` prop is supplied, the root flips to `flex-row` and */\n/* renders the icon at the leading edge regardless of the chosen */\n/* layout — the layout then governs the inner label/value stack. Cap- */\n/* height alignment is handled by `items-start` + a small `mt` offset */\n/* on the icon wrapper so a wrapping value doesn't push the icon */\n/* downward. */\n/* ------------------------------------------------------------------ */\n\nconst keyValuePairVariants = cva('ds:flex', {\n variants: {\n layout: {\n horizontal: 'ds:flex-row ds:items-center ds:gap-[var(--spacing-sm)]',\n vertical: 'ds:flex-col ds:gap-[var(--spacing-xs)]',\n },\n /** Internal — flips the root to a horizontal flex when an icon\n is present so the icon can sit at the leading edge of both\n horizontal and vertical inner stacks. `items-start` keeps the\n icon anchored to the label row even when the value wraps. */\n hasIcon: {\n true: 'ds:flex-row ds:items-start ds:gap-[var(--spacing-sm)]',\n false: '',\n },\n },\n defaultVariants: {\n layout: 'horizontal',\n hasIcon: false,\n },\n});\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePairProps */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValuePairProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<VariantProps<typeof keyValuePairVariants>, 'hasIcon'> {\n /** The label (term) */\n label: string;\n /** The value — accepts plain text, Badge, Tag, monospace code, any ReactNode */\n value: React.ReactNode;\n /** Layout direction */\n layout?: 'horizontal' | 'vertical';\n /** Render value in monospace font */\n mono?: boolean;\n /** Show a copy-to-clipboard IconButton beside the value */\n copyable?: boolean;\n /** The text to copy — defaults to `value` if value is a string */\n copyText?: string;\n /**\n * Optional decorative icon rendered at the leading edge of the pair.\n * Pass a `lucide-react` icon (or any single React element) for\n * visual consistency. The wrapper applies `aria-hidden=\"true\"` and\n * paints the icon with `var(--key-value-pair-icon-color)` (defaults\n * to `--muted-foreground`); consumers can recolour the slot via\n * that token without forking the component.\n *\n * Cap-height alignment with the label is automatic — the wrapper\n * uses `mt-0.5` so the glyph rides the label row, not the\n * geometric centre of a wrapping value.\n *\n * Type is `ReactElement` (not the broader `ReactNode`) so the\n * intent is clear at the call site: this slot is for a single\n * SVG/icon, not arbitrary fragments, strings, or numbers.\n */\n icon?: React.ReactElement | null;\n}\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePair */\n/* ------------------------------------------------------------------ */\n\nexport const KeyValuePair = forwardRef<HTMLDivElement, KeyValuePairProps>(\n (\n {\n label,\n value,\n layout = 'horizontal',\n mono = false,\n copyable = false,\n copyText,\n icon,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const [copied, setCopied] = useState(false);\n const [announcement, setAnnouncement] = useState('');\n\n const textToCopy =\n copyText ?? (typeof value === 'string' ? value : undefined);\n\n const handleCopy = useCallback(async () => {\n if (!textToCopy) {\n if (import.meta.env.DEV) {\n console.warn(\n 'KeyValuePair: copyable is true but no copyText was provided and value is not a string. Copy no-op.',\n );\n }\n return;\n }\n\n try {\n await navigator.clipboard.writeText(textToCopy);\n setCopied(true);\n setAnnouncement(t('keyValuePair.copied'));\n setTimeout(() => {\n setCopied(false);\n setAnnouncement('');\n }, 2000);\n } catch {\n setAnnouncement(t('keyValuePair.notAvailable'));\n setTimeout(() => setAnnouncement(''), 3000);\n }\n }, [textToCopy, t]);\n\n const valueClasses = [\n 'type-body ds:text-foreground ds:min-w-0 ds:shrink ds:[unicode-bidi:isolate]',\n // `flex-1` lets the value absorb the remaining inline space\n // when the KVP root flexes the icon / label / value as direct\n // siblings (`hasIcon && layout === 'horizontal'`). Without it,\n // the value would shrink to its content width and the row\n // would leave inline-end whitespace. Vertical layout doesn't\n // need it because the value is below the label, not beside it.\n layout === 'horizontal' ? 'ds:flex-1' : '',\n mono ? 'ds:font-[family-name:var(--font-mono)]' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const hasIcon = icon !== undefined && icon !== null;\n\n // Inner stack — used ONLY for `layout=\"vertical\"` when an icon is\n // present (icon on the leading edge, label-on-top-of-value stacked\n // next to it). For `layout=\"horizontal\"` we render the icon /\n // label / value as direct flex children of the root — wrapping\n // them in a single `<div>` would break the KeyValueList subgrid\n // (the subgrid's 3 tracks would collapse to 2: the wrapper +\n // icon). See the conditional below.\n const innerStackClass =\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0 ds:flex-1';\n\n const stack = (\n <>\n <span className=\"type-label ds:text-muted-foreground ds:shrink-0\">\n {label}\n <span className=\"ds:sr-only\">: </span>\n </span>\n <span className={valueClasses}>{value}</span>\n {copyable && (\n <IconButton\n icon={copied ? <Check /> : <Copy />}\n size=\"sm\"\n aria-label={t('keyValuePair.copy', { label })}\n onClick={handleCopy}\n intent=\"ghost\"\n className={\n layout === 'horizontal'\n ? 'ds:ms-auto ds:shrink-0'\n : 'ds:self-start'\n }\n />\n )}\n </>\n );\n\n return (\n <div\n ref={ref}\n className={keyValuePairVariants({ layout, hasIcon, className })}\n data-component=\"key-value-pair\"\n {...props}\n >\n {hasIcon ? (\n <>\n {/* Decorative icon wrapper. `aria-hidden` so SR users only\n hear \"<label>: <value>\" — the icon is brand polish,\n not semantic content.\n\n `translate-y` shifts the icon down by 2px visually so\n its centre lines up with the label's x-height centre.\n In a baseline-aligned subgrid row, the icon's margin-\n box bottom pins to the label's text baseline — that\n leaves the 16px SVG sitting visually 3-4px above the\n label's centre. `translate-y` adjusts only the paint\n position; the underlying baseline math still holds,\n so multi-line value cells (e.g. address + map link)\n stay correctly aligned with the FIRST line of the\n value. */}\n <span\n aria-hidden=\"true\"\n className=\"ds:inline-flex ds:shrink-0 ds:translate-y-0.5 ds:text-[color:var(--key-value-pair-icon-color)] ds:[&_svg]:size-4\"\n >\n {icon}\n </span>\n {/* `horizontal` layout: render label / value / copy as\n direct flex children of the root so each piece falls\n into its own track when this KVP is promoted to a\n subgrid row by `<KeyValueList>`. Wrapping them in a\n `<div>` here would collapse the subgrid's 3 tracks\n (icon | label | value) to 2 (icon | wrapper) and labels\n across rows would no longer share a column. The root's\n `flex flex-row` + `gap-sm` keeps the standalone visual\n identical.\n\n `vertical` layout still needs the wrapper because the\n stack is column-flow — label-on-top-of-value next to\n the icon. */}\n {layout === 'horizontal' ? (\n stack\n ) : (\n <div className={innerStackClass}>{stack}</div>\n )}\n </>\n ) : (\n stack\n )}\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {announcement}\n </span>\n </div>\n );\n },\n);\n\nKeyValuePair.displayName = 'KeyValuePair';\n\n/* ------------------------------------------------------------------ */\n/* KeyValueList — subgrid alignment for a column of KVP rows */\n/* */\n/* When several `<KeyValuePair>` rows live in the same card (practice */\n/* profile, settings panel, contact card, etc.), the per-row flex */\n/* layout means each row's label column has a different width. The */\n/* values end up zigzagged. Wrapping in `<KeyValueList>` puts all rows */\n/* into a single 3-column CSS subgrid (icon | label | value), so */\n/* labels share a column across rows and values start at the same */\n/* inline-start edge. */\n/* */\n/* Standalone `<KeyValuePair>` instances outside a `<KeyValueList>` */\n/* keep their existing per-row flex layout — no behaviour change for */\n/* consumers that didn't opt in. */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValueListProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Gap between rows. Maps to spacing tokens — defaults to `md`.\n * Smaller gaps suit dense settings panels; larger gaps suit\n * profile cards.\n */\n rowGap?: 'sm' | 'md' | 'lg';\n}\n\nconst rowGapClassMap: Record<\n NonNullable<KeyValueListProps['rowGap']>,\n string\n> = {\n sm: 'ds:gap-y-[var(--spacing-sm)]',\n md: 'ds:gap-y-[var(--spacing-md)]',\n lg: 'ds:gap-y-[var(--spacing-lg)]',\n};\n\nexport const KeyValueList = forwardRef<HTMLDivElement, KeyValueListProps>(\n ({ children, className, rowGap = 'md', ...props }, ref) => {\n // Three-column subgrid: icon | label | value.\n // - col 1: `auto` — width of the widest icon (or 0 if no rows have icons)\n // - col 2: `auto` — width of the widest label, shared across all rows\n // - col 3: `minmax(0, 1fr)` — value flexes; `minmax` prevents the\n // value from forcing the grid wider than its container when the\n // value contains a long unbroken string (e.g. an email or URL).\n //\n // Each child `<KeyValuePair>` (which renders as a `<div>` with a\n // `data-component=\"key-value-pair\"` marker) is promoted into a\n // subgrid row by the CSS below — the cell boundaries align across\n // every direct child.\n //\n // We render as `<div>` (not `<dl>`): axe enforces \"dl can only\n // contain dt/dd\" and the inner KVP renders as a `<div>`. The KVP's\n // own SR markup (label + `<span class=\"sr-only\">: </span>` + value)\n // already conveys term-value semantics — wrapping in a `<dl>`\n // doesn't add anything the screen reader doesn't already get.\n return (\n <div\n ref={ref}\n data-component=\"key-value-list\"\n className={[\n 'ds:grid ds:grid-cols-[auto_auto_minmax(0,1fr)]',\n 'ds:gap-x-[var(--spacing-md)]',\n rowGapClassMap[rowGap],\n // Each direct `data-component=\"key-value-pair\"` child becomes\n // a subgrid row spanning all three columns. The KVP's own\n // flex layout still works inside the cell (icon shrinks-0,\n // label shrinks-0, value flexes) — subgrid just aligns the\n // boundaries between siblings.\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid-cols-subgrid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:col-span-3',\n 'ds:[&>[data-component=\"key-value-pair\"]]:items-baseline',\n // Unset the KVP's intra-row `gap-sm` so the subgrid inherits\n // the parent KeyValueList's `gap-x-md` for every track gap\n // (icon→label and label→value). `gap-0` here would override\n // the parent's gap and crowd the icon against the label;\n // `[gap:normal]` is the subgrid-spec way to defer to the\n // parent.\n 'ds:[&>[data-component=\"key-value-pair\"]]:[gap:normal]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nKeyValueList.displayName = 'KeyValueList';\n"],"names":["keyValuePairVariants","cva","KeyValuePair","forwardRef","label","value","layout","mono","copyable","copyText","icon","className","props","ref","t","useTranslation","copied","setCopied","useState","announcement","setAnnouncement","textToCopy","handleCopy","useCallback","valueClasses","hasIcon","innerStackClass","stack","jsxs","Fragment","jsx","IconButton","Check","Copy","rowGapClassMap","KeyValueList","children","rowGap"],"mappings":";;;;;;;AAk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AAA;AAAA,EAGN;AACF;AAEAjB,EAAa,cAAc;AA2B3B,MAAMgC,IAGF;AAAA,EACF,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAehC;AAAA,EAC1B,CAAC,EAAE,UAAAiC,GAAU,WAAAzB,GAAW,QAAA0B,IAAS,MAAM,GAAGzB,EAAA,GAASC,MAmB/C,gBAAAiB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAjB;AAAA,MACA,kBAAe;AAAA,MACf,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACAqB,EAAeG,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMrB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOA;AAAA,QACA1B;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAwB;AAAA,IAAA;AAAA,EAAA;AAIT;AAEAD,EAAa,cAAc;"}
|
|
1
|
+
{"version":3,"file":"key-value-pair-BrgbMfbF.js","sources":["../../src/components/key-value-pair/key-value-pair.tsx"],"sourcesContent":["import { forwardRef, useState, useCallback, type HTMLAttributes } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Copy, Check } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\n\n/* ------------------------------------------------------------------ */\n/* CVA — root wrapper */\n/* */\n/* The layout variants below describe the LOGICAL flow of label/value. */\n/* When an `icon` prop is supplied, the root flips to `flex-row` and */\n/* renders the icon at the leading edge regardless of the chosen */\n/* layout — the layout then governs the inner label/value stack. Cap- */\n/* height alignment is handled by `items-start` + a small `mt` offset */\n/* on the icon wrapper so a wrapping value doesn't push the icon */\n/* downward. */\n/* ------------------------------------------------------------------ */\n\nconst keyValuePairVariants = cva('ds:flex', {\n variants: {\n layout: {\n horizontal: 'ds:flex-row ds:items-center ds:gap-[var(--spacing-sm)]',\n vertical: 'ds:flex-col ds:gap-[var(--spacing-xs)]',\n },\n /** Internal — flips the root to a horizontal flex when an icon\n is present so the icon can sit at the leading edge of both\n horizontal and vertical inner stacks. `items-start` keeps the\n icon anchored to the label row even when the value wraps. */\n hasIcon: {\n true: 'ds:flex-row ds:items-start ds:gap-[var(--spacing-sm)]',\n false: '',\n },\n },\n defaultVariants: {\n layout: 'horizontal',\n hasIcon: false,\n },\n});\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePairProps */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValuePairProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<VariantProps<typeof keyValuePairVariants>, 'hasIcon'> {\n /** The label (term) */\n label: string;\n /** The value — accepts plain text, Badge, Tag, monospace code, any ReactNode */\n value: React.ReactNode;\n /** Layout direction */\n layout?: 'horizontal' | 'vertical';\n /** Render value in monospace font */\n mono?: boolean;\n /** Show a copy-to-clipboard IconButton beside the value */\n copyable?: boolean;\n /** The text to copy — defaults to `value` if value is a string */\n copyText?: string;\n /**\n * Optional decorative icon rendered at the leading edge of the pair.\n * Pass a `lucide-react` icon (or any single React element) for\n * visual consistency. The wrapper applies `aria-hidden=\"true\"` and\n * paints the icon with `var(--key-value-pair-icon-color)` (defaults\n * to `--muted-foreground`); consumers can recolour the slot via\n * that token without forking the component.\n *\n * Cap-height alignment with the label is automatic — the wrapper\n * uses `mt-0.5` so the glyph rides the label row, not the\n * geometric centre of a wrapping value.\n *\n * Type is `ReactElement` (not the broader `ReactNode`) so the\n * intent is clear at the call site: this slot is for a single\n * SVG/icon, not arbitrary fragments, strings, or numbers.\n */\n icon?: React.ReactElement | null;\n}\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePair */\n/* ------------------------------------------------------------------ */\n\nexport const KeyValuePair = forwardRef<HTMLDivElement, KeyValuePairProps>(\n (\n {\n label,\n value,\n layout = 'horizontal',\n mono = false,\n copyable = false,\n copyText,\n icon,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const [copied, setCopied] = useState(false);\n const [announcement, setAnnouncement] = useState('');\n\n const textToCopy =\n copyText ?? (typeof value === 'string' ? value : undefined);\n\n const handleCopy = useCallback(async () => {\n if (!textToCopy) {\n if (import.meta.env.DEV) {\n console.warn(\n 'KeyValuePair: copyable is true but no copyText was provided and value is not a string. Copy no-op.',\n );\n }\n return;\n }\n\n try {\n await navigator.clipboard.writeText(textToCopy);\n setCopied(true);\n setAnnouncement(t('keyValuePair.copied'));\n setTimeout(() => {\n setCopied(false);\n setAnnouncement('');\n }, 2000);\n } catch {\n setAnnouncement(t('keyValuePair.notAvailable'));\n setTimeout(() => setAnnouncement(''), 3000);\n }\n }, [textToCopy, t]);\n\n const valueClasses = [\n 'type-body ds:text-foreground ds:min-w-0 ds:shrink ds:[unicode-bidi:isolate]',\n // `flex-1` lets the value absorb the remaining inline space\n // when the KVP root flexes the icon / label / value as direct\n // siblings (`hasIcon && layout === 'horizontal'`). Without it,\n // the value would shrink to its content width and the row\n // would leave inline-end whitespace. Vertical layout doesn't\n // need it because the value is below the label, not beside it.\n layout === 'horizontal' ? 'ds:flex-1' : '',\n mono ? 'ds:font-[family-name:var(--font-mono)]' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const hasIcon = icon !== undefined && icon !== null;\n\n // Inner stack — used ONLY for `layout=\"vertical\"` when an icon is\n // present (icon on the leading edge, label-on-top-of-value stacked\n // next to it). For `layout=\"horizontal\"` we render the icon /\n // label / value as direct flex children of the root — wrapping\n // them in a single `<div>` would break the KeyValueList subgrid\n // (the subgrid's 3 tracks would collapse to 2: the wrapper +\n // icon). See the conditional below.\n const innerStackClass =\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0 ds:flex-1';\n\n const stack = (\n <>\n <span className=\"type-label ds:text-muted-foreground ds:shrink-0\">\n {label}\n <span className=\"ds:sr-only\">: </span>\n </span>\n <span className={valueClasses}>{value}</span>\n {copyable && (\n <IconButton\n icon={copied ? <Check /> : <Copy />}\n size=\"sm\"\n aria-label={t('keyValuePair.copy', { label })}\n onClick={handleCopy}\n intent=\"ghost\"\n className={\n layout === 'horizontal'\n ? 'ds:ms-auto ds:shrink-0'\n : 'ds:self-start'\n }\n />\n )}\n </>\n );\n\n return (\n <div\n ref={ref}\n className={keyValuePairVariants({ layout, hasIcon, className })}\n data-component=\"key-value-pair\"\n {...props}\n >\n {hasIcon ? (\n <>\n {/* Decorative icon wrapper. `aria-hidden` so SR users only\n hear \"<label>: <value>\" — the icon is brand polish,\n not semantic content.\n\n `translate-y` shifts the icon down by 2px visually so\n its centre lines up with the label's x-height centre.\n In a baseline-aligned subgrid row, the icon's margin-\n box bottom pins to the label's text baseline — that\n leaves the 16px SVG sitting visually 3-4px above the\n label's centre. `translate-y` adjusts only the paint\n position; the underlying baseline math still holds,\n so multi-line value cells (e.g. address + map link)\n stay correctly aligned with the FIRST line of the\n value. */}\n <span\n aria-hidden=\"true\"\n className=\"ds:inline-flex ds:shrink-0 ds:translate-y-0.5 ds:text-[color:var(--key-value-pair-icon-color)] ds:[&_svg]:size-4\"\n >\n {icon}\n </span>\n {/* `horizontal` layout: render label / value / copy as\n direct flex children of the root so each piece falls\n into its own track when this KVP is promoted to a\n subgrid row by `<KeyValueList>`. Wrapping them in a\n `<div>` here would collapse the subgrid's 3 tracks\n (icon | label | value) to 2 (icon | wrapper) and labels\n across rows would no longer share a column. The root's\n `flex flex-row` + `gap-sm` keeps the standalone visual\n identical.\n\n `vertical` layout still needs the wrapper because the\n stack is column-flow — label-on-top-of-value next to\n the icon. */}\n {layout === 'horizontal' ? (\n stack\n ) : (\n <div className={innerStackClass}>{stack}</div>\n )}\n </>\n ) : (\n stack\n )}\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {announcement}\n </span>\n </div>\n );\n },\n);\n\nKeyValuePair.displayName = 'KeyValuePair';\n\n/* ------------------------------------------------------------------ */\n/* KeyValueList — subgrid alignment for a column of KVP rows */\n/* */\n/* When several `<KeyValuePair>` rows live in the same card (practice */\n/* profile, settings panel, contact card, etc.), the per-row flex */\n/* layout means each row's label column has a different width. The */\n/* values end up zigzagged. Wrapping in `<KeyValueList>` puts all rows */\n/* into a single 3-column CSS subgrid (icon | label | value), so */\n/* labels share a column across rows and values start at the same */\n/* inline-start edge. */\n/* */\n/* Standalone `<KeyValuePair>` instances outside a `<KeyValueList>` */\n/* keep their existing per-row flex layout — no behaviour change for */\n/* consumers that didn't opt in. */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValueListProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Gap between rows. Maps to spacing tokens — defaults to `md`.\n * Smaller gaps suit dense settings panels; larger gaps suit\n * profile cards.\n */\n rowGap?: 'sm' | 'md' | 'lg';\n}\n\nconst rowGapClassMap: Record<\n NonNullable<KeyValueListProps['rowGap']>,\n string\n> = {\n sm: 'ds:gap-y-[var(--spacing-sm)]',\n md: 'ds:gap-y-[var(--spacing-md)]',\n lg: 'ds:gap-y-[var(--spacing-lg)]',\n};\n\nexport const KeyValueList = forwardRef<HTMLDivElement, KeyValueListProps>(\n ({ children, className, rowGap = 'md', ...props }, ref) => {\n // Three-column subgrid: icon | label | value.\n // - col 1: `auto` — width of the widest icon (or 0 if no rows have icons)\n // - col 2: `auto` — width of the widest label, shared across all rows\n // - col 3: `minmax(0, 1fr)` — value flexes; `minmax` prevents the\n // value from forcing the grid wider than its container when the\n // value contains a long unbroken string (e.g. an email or URL).\n //\n // Each child `<KeyValuePair>` (which renders as a `<div>` with a\n // `data-component=\"key-value-pair\"` marker) is promoted into a\n // subgrid row by the CSS below — the cell boundaries align across\n // every direct child.\n //\n // We render as `<div>` (not `<dl>`): axe enforces \"dl can only\n // contain dt/dd\" and the inner KVP renders as a `<div>`. The KVP's\n // own SR markup (label + `<span class=\"sr-only\">: </span>` + value)\n // already conveys term-value semantics — wrapping in a `<dl>`\n // doesn't add anything the screen reader doesn't already get.\n return (\n <div\n ref={ref}\n data-component=\"key-value-list\"\n className={[\n 'ds:grid ds:grid-cols-[auto_auto_minmax(0,1fr)]',\n 'ds:gap-x-[var(--spacing-md)]',\n rowGapClassMap[rowGap],\n // Each direct `data-component=\"key-value-pair\"` child becomes\n // a subgrid row spanning all three columns. The KVP's own\n // flex layout still works inside the cell (icon shrinks-0,\n // label shrinks-0, value flexes) — subgrid just aligns the\n // boundaries between siblings.\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid-cols-subgrid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:col-span-3',\n 'ds:[&>[data-component=\"key-value-pair\"]]:items-baseline',\n // Unset the KVP's intra-row `gap-sm` so the subgrid inherits\n // the parent KeyValueList's `gap-x-md` for every track gap\n // (icon→label and label→value). `gap-0` here would override\n // the parent's gap and crowd the icon against the label;\n // `[gap:normal]` is the subgrid-spec way to defer to the\n // parent.\n 'ds:[&>[data-component=\"key-value-pair\"]]:[gap:normal]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nKeyValueList.displayName = 'KeyValueList';\n"],"names":["keyValuePairVariants","cva","KeyValuePair","forwardRef","label","value","layout","mono","copyable","copyText","icon","className","props","ref","t","useTranslation","copied","setCopied","useState","announcement","setAnnouncement","textToCopy","handleCopy","useCallback","valueClasses","hasIcon","innerStackClass","stack","jsxs","Fragment","jsx","IconButton","Check","Copy","rowGapClassMap","KeyValueList","children","rowGap"],"mappings":";;;;;;;AAkBA,MAAMA,IAAuBC,EAAI,WAAW;AAAA,EAC1C,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,YAAY;AAAA,MACZ,UAAU;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMZ,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAEF,iBAAiB;AAAA,IACf,QAAQ;AAAA,IACR,SAAS;AA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;AAAA,MACC,KAAAjB;AAAA,MACA,kBAAe;AAAA,MACf,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACAqB,EAAeG,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMrB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOA;AAAA,QACA1B;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAwB;AAAA,IAAA;AAAA,EAAA;AAIT;AAEAD,EAAa,cAAc;"}
|
|
@@ -3,8 +3,8 @@ import { forwardRef as H, useId as $, useState as M, useCallback as R, useMemo a
|
|
|
3
3
|
import { c as B } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as T } from "react-i18next";
|
|
5
5
|
import { _ as y, R as ee } from "./index-4xgbg-sn.js";
|
|
6
|
-
import { I as ae } from "./icon-button-
|
|
7
|
-
import { P as C } from "./popover-
|
|
6
|
+
import { I as ae } from "./icon-button-LqoiKcUN.js";
|
|
7
|
+
import { P as C } from "./popover-DTbfAuR0.js";
|
|
8
8
|
import { h as A, a as _ } from "./flag-DZ6V7-hU.js";
|
|
9
9
|
import { c as se, a as te, d as re } from "./input-surface-xyERuLU_.js";
|
|
10
10
|
import { LOCALES_WITH_BUNDLES as j } from "../i18n/config.js";
|
|
@@ -724,4 +724,4 @@ export {
|
|
|
724
724
|
I as b,
|
|
725
725
|
k as c
|
|
726
726
|
};
|
|
727
|
-
//# sourceMappingURL=locale-picker-
|
|
727
|
+
//# sourceMappingURL=locale-picker-C9JmBht3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale-picker-D99UyZVJ.js","sources":["../../src/i18n/locale-meta.ts","../../src/components/locale-picker/locale-picker.agent.ts","../../src/components/locale-picker/locale-picker.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Locale metadata registry. */\n/* */\n/* Single source of truth for human-facing locale information — native */\n/* name, English name, flag emoji, and writing direction. Consumed by */\n/* LocalePicker / HeaderSettings to render the language switcher. */\n/* */\n/* Keys must match `LOCALES_WITH_BUNDLES` from `./resources` 1:1; the */\n/* `locale-meta.test.ts` parity check fails the build if a code is */\n/* added to one and not the other. */\n/* */\n/* Flag emojis use the Regional Indicator pair convention — a few of */\n/* the codes are language tags rather than country tags (en, ar, hi); */\n/* the flag chosen is the \"default-region\" the kit ships marketing */\n/* surfaces in. Consumers that need a different region flag (e.g. */\n/* British vs. American English) can override via `LOCALE_META[code]`. */\n/* -------------------------------------------------------------------- */\n\nimport { LOCALES_WITH_BUNDLES } from './resources';\n\n/** Reading direction. Mirrors the shape of `hooks/use-locale.ts#LocaleDir`. */\nexport type LocaleDir = 'ltr' | 'rtl';\n\n/** IETF locale tag from the kit's bundled set. */\nexport type Locale = (typeof LOCALES_WITH_BUNDLES)[number];\n\nexport interface LocaleMetaEntry {\n /** IETF locale tag (matches the key in `LOCALES_WITH_BUNDLES`). */\n code: Locale;\n /** Endonym — the locale's name in its own language (\"Italiano\", \"العربية\"). */\n nativeName: string;\n /** Exonym — the locale's name in English (\"Italian\", \"Arabic\"). */\n englishName: string;\n /**\n * ISO 3166-1 alpha-2 country code for the default-region flag. Feed\n * to the kit's `<Flag country={…} />` component to render the actual\n * flag SVG (NOT the emoji glyph — those don't paint on Windows and\n * lose fidelity at hero sizes). A few language tags here aren't tied\n * to a single country (en, ar, hi); we pick the AlfaDocs default\n * marketing region — consumers needing a different region flag\n * override at the call site.\n */\n countryCode: string;\n /**\n * Regional-indicator flag emoji. Retained as a fallback for non-DOM\n * contexts (terminal logs, plain-text exports) and the rare consumer\n * surface that can't mount the kit's `Flag` component. UI surfaces\n * should always reach for `countryCode` + `<Flag />` instead.\n */\n flag: string;\n /** Reading direction. */\n dir: LocaleDir;\n}\n\n/**\n * Canonical metadata for every locale shipped in `LOCALES_WITH_BUNDLES`.\n * Order matches the bundled-locales array so iteration is stable.\n */\nexport const LOCALE_META: Record<Locale, LocaleMetaEntry> = {\n en: {\n code: 'en',\n nativeName: 'English',\n englishName: 'English',\n countryCode: 'GB',\n flag: '🇬🇧',\n dir: 'ltr',\n },\n it: {\n code: 'it',\n nativeName: 'Italiano',\n englishName: 'Italian',\n countryCode: 'IT',\n flag: '🇮🇹',\n dir: 'ltr',\n },\n de: {\n code: 'de',\n nativeName: 'Deutsch',\n englishName: 'German',\n countryCode: 'DE',\n flag: '🇩🇪',\n dir: 'ltr',\n },\n ar: {\n code: 'ar',\n nativeName: 'العربية',\n englishName: 'Arabic',\n countryCode: 'SA',\n flag: '🇸🇦',\n dir: 'rtl',\n },\n fr: {\n code: 'fr',\n nativeName: 'Français',\n englishName: 'French',\n countryCode: 'FR',\n flag: '🇫🇷',\n dir: 'ltr',\n },\n es: {\n code: 'es',\n nativeName: 'Español',\n englishName: 'Spanish',\n countryCode: 'ES',\n flag: '🇪🇸',\n dir: 'ltr',\n },\n pt: {\n code: 'pt',\n nativeName: 'Português',\n englishName: 'Portuguese',\n countryCode: 'PT',\n flag: '🇵🇹',\n dir: 'ltr',\n },\n nl: {\n code: 'nl',\n nativeName: 'Nederlands',\n englishName: 'Dutch',\n countryCode: 'NL',\n flag: '🇳🇱',\n dir: 'ltr',\n },\n ro: {\n code: 'ro',\n nativeName: 'Română',\n englishName: 'Romanian',\n countryCode: 'RO',\n flag: '🇷🇴',\n dir: 'ltr',\n },\n sq: {\n code: 'sq',\n nativeName: 'Shqip',\n englishName: 'Albanian',\n countryCode: 'AL',\n flag: '🇦🇱',\n dir: 'ltr',\n },\n tr: {\n code: 'tr',\n nativeName: 'Türkçe',\n englishName: 'Turkish',\n countryCode: 'TR',\n flag: '🇹🇷',\n dir: 'ltr',\n },\n pl: {\n code: 'pl',\n nativeName: 'Polski',\n englishName: 'Polish',\n countryCode: 'PL',\n flag: '🇵🇱',\n dir: 'ltr',\n },\n sv: {\n code: 'sv',\n nativeName: 'Svenska',\n englishName: 'Swedish',\n countryCode: 'SE',\n flag: '🇸🇪',\n dir: 'ltr',\n },\n ru: {\n code: 'ru',\n nativeName: 'Русский',\n englishName: 'Russian',\n countryCode: 'RU',\n flag: '🇷🇺',\n dir: 'ltr',\n },\n el: {\n code: 'el',\n nativeName: 'Ελληνικά',\n englishName: 'Greek',\n countryCode: 'GR',\n flag: '🇬🇷',\n dir: 'ltr',\n },\n ja: {\n code: 'ja',\n nativeName: '日本語',\n englishName: 'Japanese',\n countryCode: 'JP',\n flag: '🇯🇵',\n dir: 'ltr',\n },\n zh: {\n code: 'zh',\n nativeName: '中文',\n englishName: 'Chinese',\n countryCode: 'CN',\n flag: '🇨🇳',\n dir: 'ltr',\n },\n hi: {\n code: 'hi',\n nativeName: 'हिन्दी',\n englishName: 'Hindi',\n countryCode: 'IN',\n flag: '🇮🇳',\n dir: 'ltr',\n },\n};\n\n/**\n * Canonical (i18n-parity) order — used when consumers need the same\n * sequence as `LOCALES_WITH_BUNDLES` (e.g. generating fixtures or\n * snapshot keys). Pickers / menus should use `LOCALE_LIST` instead,\n * which sorts alphabetically.\n */\nexport const LOCALE_LIST_CANONICAL: readonly LocaleMetaEntry[] =\n LOCALES_WITH_BUNDLES.map((code) => LOCALE_META[code]);\n\n/**\n * Picker-facing list — sorted alphabetically by English name so the\n * order is deterministic and language-independent. End users searching\n * by native name use the picker's input box to filter; the visible\n * order doesn't depend on the active locale's collation.\n *\n * \"System Default\" (the OS-driven fallback) is rendered separately at\n * the top of `LocalePicker.SearchList` — not in this list — so the\n * alphabetical order here applies to the 18 explicit locale rows only.\n */\nexport const LOCALE_LIST: readonly LocaleMetaEntry[] = [\n ...LOCALES_WITH_BUNDLES.map((code) => LOCALE_META[code]),\n].sort((a, b) => a.englishName.localeCompare(b.englishName, 'en'));\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — LocalePicker. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { LocalePickerHandle } from './locale-picker';\n\nexport const localePickerAgent: AgentAdapter<LocalePickerHandle> = {\n id: 'locale-picker',\n capabilities: ['view_change'],\n state: {},\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n descriptionKey: 'ui.agent.localePicker.actions.setLocale',\n description: 'Switch the active locale to the given IETF tag.',\n invoke: (handle, args: { locale: string }) => {\n // The handle's own implementation gates against\n // `LOCALES_WITH_BUNDLES`, so a tag the kit doesn't ship is a\n // no-op rather than a runtime crash.\n handle.setLocale(args.locale);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'locale-picker',\n description: 'Marks the LocalePicker wrapper.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type Ref,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, Globe, Monitor } from 'lucide-react';\nimport { Command, defaultFilter } from 'cmdk';\nimport { IconButton } from '../button/icon-button';\nimport { Popover } from '../popover/popover';\nimport { Flag, hasFlag } from '../flag/flag';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT,\n INPUT_SURFACE_PADDING_X,\n} from '../_shared/input-surface';\nimport { LOCALE_LIST, LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { LOCALES_WITH_BUNDLES } from '../../i18n/config';\nimport { useLocale } from '../../hooks/use-locale';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { localePickerAgent } from './locale-picker.agent';\n\n/* ------------------------------------------------------------------ */\n/* Persistence + browser-locale detection */\n/* */\n/* The first mount of a LocalePicker after a fresh page load runs a */\n/* one-shot detection: if no locale has ever been persisted, read */\n/* navigator.language, normalise to the base tag (`it-IT` → `it`), */\n/* and adopt it if the kit ships a matching bundle. Fall back to */\n/* `en` if not. Result is persisted so a subsequent page load */\n/* respects the user choice without re-detecting. */\n/* */\n/* Module-level flag — the detection must fire once per app */\n/* lifecycle, not once per LocalePicker instance, since HeaderSettings */\n/* + a standalone picker can both be mounted simultaneously. */\n/* ------------------------------------------------------------------ */\n\nexport const LOCALE_STORAGE_KEY = 'alfadocs-ui.locale';\n\n/**\n * Sentinel value (and Combobox-row key) for \"follow the browser /\n * OS locale\". Mirrors the ThemeToggle's `'system'` preference: the\n * picker doesn't store a concrete locale code; the runtime resolves\n * to `navigator.language` on each mount.\n */\nexport const LOCALE_SYSTEM_DEFAULT = 'system' as const;\nexport type LocalePreference = Locale | typeof LOCALE_SYSTEM_DEFAULT;\n\nlet detectionFired = false;\n\nfunction isSupportedLocale(value: unknown): value is Locale {\n return (\n typeof value === 'string' &&\n (LOCALES_WITH_BUNDLES as readonly string[]).includes(value)\n );\n}\n\nfunction safeReadStorage(key: string): string | null {\n if (typeof window === 'undefined') return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n}\n\nfunction safeWriteStorage(key: string, value: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.setItem(key, value);\n } catch {\n /* Storage can throw in private mode / when quota is exceeded — the\n in-memory state is the source of truth. Same silent-fail shape\n as use-theme.ts. */\n }\n}\n\nfunction detectBrowserLocale(): Locale {\n if (typeof navigator === 'undefined') return 'en';\n const raw = navigator.language;\n if (!raw) return 'en';\n const base = raw.toLowerCase().split('-')[0];\n return isSupportedLocale(base) ? base : 'en';\n}\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/* Shared state hook */\n/* */\n/* Centralises the setLocale wrapper so both the standalone picker */\n/* and the inline `LocalePicker.SearchList` share one source of truth: */\n/* 1. delegate to `useLocale().setLocale` (the i18next change) */\n/* 2. set `document.documentElement.dir` + `lang` */\n/* 3. persist to localStorage at `alfadocs-ui.locale` */\n/* ------------------------------------------------------------------ */\n\ninterface LocalePickerState {\n /** Resolved locale actually applied to the page (always concrete). */\n locale: Locale;\n /**\n * True when the resolved locale came from `navigator.language`\n * rather than an explicit user choice (i.e. no localStorage entry).\n * Used to mark the \"System Default\" row as the active selection\n * until the user picks a specific locale.\n */\n isSystemDefault: boolean;\n /**\n * Switch to a specific locale (persists) OR back to the System\n * Default (clears the localStorage entry and re-detects).\n */\n setLocale: (next: LocalePreference) => void;\n}\n\nfunction safeRemoveStorage(key: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.removeItem(key);\n } catch {\n /* private mode etc. — silent fail per the rest of the file. */\n }\n}\n\nfunction useLocalePickerState(): LocalePickerState {\n const { locale: rawLocale, setLocale: setLocaleI18n } = useLocale();\n const [isSystemDefault, setIsSystemDefault] = useState<boolean>(\n () => safeReadStorage(LOCALE_STORAGE_KEY) === null,\n );\n\n // Coerce the i18next-reported locale to the supported set so consumers\n // never see an un-bundled tag (e.g. when the host app pre-loads\n // `en-US` before the kit's resources land).\n const locale: Locale = isSupportedLocale(rawLocale) ? rawLocale : 'en';\n\n const setLocale = useCallback(\n (next: LocalePreference) => {\n if (next === LOCALE_SYSTEM_DEFAULT) {\n // Clear persistence + re-resolve to navigator.language.\n safeRemoveStorage(LOCALE_STORAGE_KEY);\n const detected = detectBrowserLocale();\n void setLocaleI18n(detected);\n applyDocumentAttrs(detected);\n setIsSystemDefault(true);\n return;\n }\n if (!isSupportedLocale(next)) return;\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n setIsSystemDefault(false);\n },\n [setLocaleI18n],\n );\n\n // One-shot detection on first LocalePicker mount per app lifecycle.\n useEffect(() => {\n if (detectionFired) return;\n detectionFired = true;\n const stored = safeReadStorage(LOCALE_STORAGE_KEY);\n if (isSupportedLocale(stored)) {\n // User-chosen value persists — keep i18next + document in sync.\n if (stored !== rawLocale) void setLocaleI18n(stored);\n applyDocumentAttrs(stored);\n return;\n }\n // No stored value → we're in System Default mode. Detect, apply,\n // but do NOT persist (so the System Default selection stays\n // sticky across reloads until the user explicitly chooses).\n const detected = detectBrowserLocale();\n void setLocaleI18n(detected);\n applyDocumentAttrs(detected);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentional one-shot detection\n }, []);\n\n return { locale, isSystemDefault, setLocale };\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n variant: {\n icon: '',\n compact: '',\n },\n },\n defaultVariants: { variant: 'icon' },\n});\n\nconst compactTriggerClasses = [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)]',\n 'ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]',\n 'ds:bg-transparent ds:text-foreground',\n 'ds:hover:bg-muted',\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:opacity-50 ds:disabled:cursor-not-allowed',\n 'type-body-sm',\n].join(' ');\n\nconst popoverContentClasses = [\n 'ds:w-[18rem] ds:rounded-[var(--radius-md)]',\n 'ds:bg-background ds:text-foreground ds:border ds:border-border',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:overflow-hidden',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type LocalePickerVariant = 'icon' | 'compact';\n\nexport interface LocalePickerProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n variant?: LocalePickerVariant;\n /**\n * Controlled escape hatch — when omitted the picker reads/writes\n * `useLocale()` directly so a bare `<LocalePicker />` works with no\n * wiring. Pass both to opt into controlled mode.\n */\n value?: Locale;\n onValueChange?: (next: LocalePreference) => void;\n /** Disable interaction (greys out the trigger). */\n disabled?: boolean;\n /** Mark as busy (kept open / focusable but read-only). */\n loading?: boolean;\n /**\n * Side the search popover opens onto, relative to the trigger.\n * Defaults to `bottom` (standard dropdown). Use `end` (inline-end —\n * right in LTR, left in RTL) when nesting the LocalePicker inside\n * another popover/menu so the search surface flies out to the side\n * rather than stacking below.\n */\n popoverSide?: 'top' | 'bottom' | 'start' | 'end';\n}\n\n/**\n * Curated imperative handle for agent / external automation. The\n * `setLocale` parameter is widened to `string` (rather than the\n * narrower `Locale`) so untyped agent inputs don't have to thread the\n * `LOCALES_WITH_BUNDLES` constraint at the call site — the\n * implementation validates internally and no-ops on an unsupported\n * tag.\n */\nexport interface LocalePickerHandle {\n setLocale: (next: string) => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker.SearchList — the inline searchable list */\n/* */\n/* HeaderSettings renders this directly inside its DropdownMenu so the */\n/* same UX is reused without nesting another popover. Standalone the */\n/* root component renders this same widget inside a Popover. */\n/* ------------------------------------------------------------------ */\n\nexport interface LocalePickerSearchListProps {\n /**\n * Active selection. Either a `Locale` code or the\n * `LOCALE_SYSTEM_DEFAULT` sentinel (when the user hasn't made an\n * explicit choice and the kit is following `navigator.language`).\n * Defaults to the shared store.\n */\n value?: LocalePreference;\n /**\n * Fires after a successful selection. Accepts a concrete `Locale`\n * or `LOCALE_SYSTEM_DEFAULT` (when the user picks the \"System\n * Default\" row at the top of the list).\n *\n * Defaults to the shared setter (delegates to useLocale, persists\n * or clears storage, updates document.dir/lang).\n */\n onValueChange?: (next: LocalePreference) => void;\n /** Optional id for the search input (axe `aria-labelledby` chain). */\n inputId?: string;\n /** Disable the input + list interactions. */\n disabled?: boolean;\n /** Mark as busy (read-only). */\n loading?: boolean;\n className?: string;\n}\n\nconst searchListVariants = cva('ds:flex ds:flex-col', {\n variants: {\n loading: {\n true: 'ds:opacity-60 ds:pointer-events-none',\n false: '',\n },\n },\n defaultVariants: { loading: false },\n});\n\nexport const LocalePickerSearchList = forwardRef<\n HTMLDivElement,\n LocalePickerSearchListProps\n>(\n (\n {\n value: valueProp,\n onValueChange,\n inputId: inputIdProp,\n disabled = false,\n loading = false,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const store = useLocalePickerState();\n // Resolved-to-render-with: which locale name to display for\n // \"System Default ({{nativeName}})\". Always a concrete Locale.\n const resolvedLocale = store.locale;\n // Selection-state: the picker's current value is either an\n // explicit Locale or the System Default sentinel.\n const currentSelection: LocalePreference =\n valueProp ??\n (store.isSystemDefault ? LOCALE_SYSTEM_DEFAULT : store.locale);\n const generatedId = useId();\n const inputId = inputIdProp ?? `${generatedId}-search`;\n const [search, setSearch] = useState('');\n\n const handleSelect = useCallback(\n (code: string) => {\n if (disabled || loading) return;\n if (code === LOCALE_SYSTEM_DEFAULT) {\n if (onValueChange) {\n onValueChange(LOCALE_SYSTEM_DEFAULT);\n } else {\n store.setLocale(LOCALE_SYSTEM_DEFAULT);\n }\n return;\n }\n if (!isSupportedLocale(code)) return;\n if (onValueChange) {\n onValueChange(code);\n } else {\n store.setLocale(code);\n }\n },\n [disabled, loading, onValueChange, store],\n );\n\n return (\n <div\n ref={ref}\n className={[searchListVariants({ loading }), className]\n .filter(Boolean)\n .join(' ')}\n data-component=\"locale-picker-search-list\"\n >\n <Command\n label={t('navigation.localePicker.commandLabel')}\n // Defer to cmdk's defaultFilter — it ranks against both the\n // Item's `value` (the locale code) and `keywords` (the\n // native + English names), which is exactly the haystack we\n // want users to be able to match against. The Item's `value`\n // alone wouldn't surface \"jap\" → 日本語 because the code is\n // `ja`; the keyword \"Japanese\" handles that match.\n filter={defaultFilter}\n shouldFilter\n >\n {/* Input chrome borrows the kit's standard INPUT_SURFACE\n tokens (same as Combobox / Autocomplete) so the search\n field reads as a first-class kit input rather than a\n one-off list header. The wrapper carries the border /\n padding / focus-within ring; the inner Command.Input\n keeps its outline-less peer styling. */}\n <div\n className={[\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT.sm,\n INPUT_SURFACE_PADDING_X.sm,\n 'ds:flex ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:m-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Globe\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-muted-foreground ds:shrink-0\"\n />\n <Command.Input\n id={inputId}\n value={search}\n onValueChange={setSearch}\n placeholder={t('navigation.localePicker.searchPlaceholder')}\n aria-label={t('navigation.localePicker.searchLabel')}\n disabled={disabled || loading}\n className={[\n 'ds:peer ds:flex-1 ds:bg-transparent ds:border-0 ds:outline-none',\n 'ds:placeholder:text-muted-foreground ds:text-foreground',\n 'ds:text-[length:var(--font-size-sm)]',\n ].join(' ')}\n />\n </div>\n <Command.List\n className={[\n 'ds:max-h-[18rem] ds:overflow-y-auto',\n 'ds:p-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Command.Empty\n className={[\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]',\n 'type-body-sm ds:text-muted-foreground',\n ].join(' ')}\n >\n {t('navigation.localePicker.empty')}\n </Command.Empty>\n\n {/* \"System Default\" — always the first row. Selected when\n the user hasn't picked an explicit locale; selecting it\n clears the localStorage entry and re-resolves to\n navigator.language. Mirrors the `'system'` value in\n ThemeToggle. */}\n {(() => {\n const isSystemSelected =\n currentSelection === LOCALE_SYSTEM_DEFAULT;\n const resolvedEntry = LOCALE_META[resolvedLocale];\n return (\n <Command.Item\n key={LOCALE_SYSTEM_DEFAULT}\n value={LOCALE_SYSTEM_DEFAULT}\n keywords={[\n 'system',\n 'default',\n 'auto',\n 'browser',\n resolvedEntry.nativeName,\n resolvedEntry.englishName,\n ]}\n disabled={disabled || loading}\n onSelect={handleSelect}\n className={[\n 'ds:relative ds:flex ds:cursor-pointer ds:select-none',\n 'ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:text-foreground ds:outline-none',\n 'ds:data-[highlighted]:bg-muted',\n 'ds:aria-selected:bg-muted',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\n ].join(' ')}\n aria-selected={isSystemSelected || undefined}\n data-current={isSystemSelected ? 'true' : undefined}\n >\n <Monitor\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-muted-foreground ds:shrink-0\"\n />\n <span className=\"ds:flex-1 ds:min-w-0 ds:truncate type-body-sm\">\n {t('navigation.localePicker.systemDefault', {\n locale: resolvedEntry.nativeName,\n })}\n </span>\n {isSystemSelected ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-primary ds:shrink-0\"\n />\n ) : null}\n {isSystemSelected ? (\n <span className=\"ds:sr-only\">\n {t('navigation.localePicker.currentSelection')}\n </span>\n ) : null}\n </Command.Item>\n );\n })()}\n\n {LOCALE_LIST.map((entry) => {\n const isSelected = currentSelection === entry.code;\n return (\n <Command.Item\n key={entry.code}\n value={entry.code}\n keywords={[entry.nativeName, entry.englishName]}\n disabled={disabled || loading}\n onSelect={handleSelect}\n className={[\n 'ds:relative ds:flex ds:cursor-pointer ds:select-none',\n 'ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:text-foreground ds:outline-none',\n 'ds:data-[highlighted]:bg-muted',\n 'ds:aria-selected:bg-muted',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\n ].join(' ')}\n aria-selected={isSelected || undefined}\n data-current={isSelected ? 'true' : undefined}\n // `lang` on the row triggers font-cascade selection\n // so Arabic / Japanese / Devanagari / Greek glyphs\n // paint via the Noto Sans family. Intentionally\n // omits `dir` — the row layout follows the picker\n // surface's direction (LTR menu = LTR row, RTL menu\n // = RTL row). Setting `dir=\"rtl\"` per Arabic row\n // would flip just THAT row inside an LTR menu, which\n // breaks the visual rhythm with neighbouring rows.\n // Arabic text within the row still renders RTL at\n // the character level (script-driven) regardless.\n lang={entry.code}\n >\n {hasFlag(entry.countryCode) ? (\n <Flag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n /* hasFlag fallback: render the emoji glyph only\n when the kit doesn't ship an SVG for this\n country code. All 18 bundled locales currently\n have SVG flags, so this is dead code on the\n canonical set — kept for resilience when\n consumers extend the registry. */\n <span\n aria-hidden=\"true\"\n className=\"ds:text-base ds:shrink-0\"\n >\n {entry.flag}\n </span>\n )}\n <span className=\"ds:flex-1 ds:min-w-0 ds:truncate type-body-sm\">\n {entry.nativeName}\n </span>\n {isSelected ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-primary ds:shrink-0\"\n />\n ) : null}\n {isSelected ? (\n <span className=\"ds:sr-only\">\n {t('navigation.localePicker.currentSelection')}\n </span>\n ) : null}\n </Command.Item>\n );\n })}\n </Command.List>\n </Command>\n </div>\n );\n },\n);\nLocalePickerSearchList.displayName = 'LocalePicker.SearchList';\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker root — icon + compact trigger variants */\n/* ------------------------------------------------------------------ */\n\ninterface VariantRenderProps {\n state: LocalePickerState;\n rest: HTMLAttributes<HTMLDivElement>;\n forwardedRef: Ref<HTMLDivElement>;\n className?: string;\n disabled: boolean;\n loading: boolean;\n popoverSide: 'top' | 'bottom' | 'start' | 'end';\n}\n\nfunction IconTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n popoverSide,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'icon', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <IconButton\n disabled={disabled || loading}\n icon={\n <span className=\"ds:relative ds:inline-flex ds:items-center ds:justify-center\">\n <Globe aria-hidden className=\"ds:size-5\" />\n {hasFlag(entry.countryCode) ? (\n <Flag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className={[\n // Corner chip overlaying the globe glyph.\n // `outline` paints a thin background-coloured\n // ring around the flag so it reads as a chip\n // rather than blending into the globe edge.\n 'ds:absolute ds:bottom-[-3px] ds:end-[-5px]',\n 'ds:outline ds:outline-2 ds:outline-background',\n // Scale down to chip size — Flag's sm tile is\n // larger than the original emoji glyph.\n 'ds:scale-75 ds:origin-bottom-end',\n ].join(' ')}\n />\n ) : null}\n </span>\n }\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n />\n </Popover.Trigger>\n <Popover.Content\n side={popoverSide}\n align=\"start\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nfunction CompactTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n popoverSide,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'compact', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n disabled={disabled || loading}\n className={compactTriggerClasses}\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n >\n {hasFlag(entry.countryCode) ? (\n <Flag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n <Globe aria-hidden className=\"ds:size-4 ds:shrink-0\" />\n )}\n <span\n className=\"ds:flex-1 ds:truncate type-body-sm\"\n lang={entry.code}\n >\n {entry.nativeName}\n </span>\n </button>\n </Popover.Trigger>\n <Popover.Content\n side={popoverSide}\n align=\"start\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nconst LocalePickerRoot = forwardRef<HTMLDivElement, LocalePickerProps>(\n (props, ref) => {\n const {\n variant = 'icon',\n value,\n onValueChange,\n disabled = false,\n loading = false,\n popoverSide = 'bottom',\n className,\n id,\n ...rest\n } = props as LocalePickerProps & { id?: string };\n\n const store = useLocalePickerState();\n const resolvedLocale = value ?? store.locale;\n\n // Controlled overlay: when a consumer passes `onValueChange`, route\n // selections to them instead of the shared store. Document attrs +\n // localStorage are still updated so the picker behaves consistently\n // either way.\n const setLocale = useCallback(\n (next: LocalePreference) => {\n if (onValueChange) {\n onValueChange(next);\n // Side-effects in controlled mode: still write through to\n // the persistence + document attrs so the rest of the page\n // re-renders even though we're routing state to the consumer.\n if (next === LOCALE_SYSTEM_DEFAULT) {\n safeRemoveStorage(LOCALE_STORAGE_KEY);\n const detected = detectBrowserLocale();\n applyDocumentAttrs(detected);\n } else if (isSupportedLocale(next)) {\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n }\n return;\n }\n store.setLocale(next);\n },\n [onValueChange, store],\n );\n\n const state: LocalePickerState = useMemo(\n () => ({\n locale: resolvedLocale,\n isSystemDefault: store.isSystemDefault,\n setLocale,\n }),\n [resolvedLocale, store.isSystemDefault, setLocale],\n );\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n const stateRef = useRef(state);\n stateRef.current = state;\n const agentHandle = useMemo<LocalePickerHandle>(\n () => ({\n setLocale: (next: string) => {\n if (isSupportedLocale(next)) {\n stateRef.current.setLocale(next);\n }\n },\n }),\n [],\n );\n useAgentRegistration(localePickerAgent, agentHandle, id);\n\n if (variant === 'compact') {\n return (\n <CompactTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n popoverSide={popoverSide}\n />\n );\n }\n return (\n <IconTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n popoverSide={popoverSide}\n />\n );\n },\n);\nLocalePickerRoot.displayName = 'LocalePicker';\n\nexport const LocalePicker = Object.assign(LocalePickerRoot, {\n SearchList: LocalePickerSearchList,\n});\n"],"names":["LOCALE_META","LOCALES_WITH_BUNDLES","code","LOCALE_LIST","a","b","localePickerAgent","handle","args","LOCALE_STORAGE_KEY","LOCALE_SYSTEM_DEFAULT","detectionFired","isSupportedLocale","value","safeReadStorage","key","safeWriteStorage","detectBrowserLocale","raw","base","applyDocumentAttrs","locale","root","safeRemoveStorage","useLocalePickerState","rawLocale","setLocaleI18n","useLocale","isSystemDefault","setIsSystemDefault","useState","setLocale","useCallback","next","detected","useEffect","stored","wrapperVariants","cva","compactTriggerClasses","popoverContentClasses","searchListVariants","LocalePickerSearchList","forwardRef","valueProp","onValueChange","inputIdProp","disabled","loading","className","ref","t","useTranslation","store","resolvedLocale","currentSelection","generatedId","useId","inputId","search","setSearch","handleSelect","jsx","jsxs","Command","defaultFilter","INPUT_SURFACE_CHROME","INPUT_SURFACE_HEIGHT","INPUT_SURFACE_PADDING_X","Globe","isSystemSelected","resolvedEntry","Monitor","Check","entry","isSelected","hasFlag","Flag","IconTrigger","state","rest","forwardedRef","popoverSide","Popover","IconButton","CompactTrigger","LocalePickerRoot","props","variant","id","useMemo","useRef","useImperativeHandle","stateRef","agentHandle","useAgentRegistration","LocalePicker"],"mappings":";;;;;;;;;;;;;;;AA0DO,MAAMA,IAA+C;AAAA,EAC1D,IA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AAkC;AAAA,MAAA;AAAA,IAAA,IAKJ,gBAAApB;AAAA,MAACgB;AAAA,MAAA;AAAA,QACC,OAAAC;AAAA,QACA,MAAAC;AAAA,QACA,cAAAC;AAAA,QACA,WAAAhC;AAAA,QACA,UAAAF;AAAA,QACA,SAAAC;AAAA,QACA,aAAAkC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAI,EAAiB,cAAc;AAExB,MAAMU,KAAe,OAAO,OAAOV,GAAkB;AAAA,EAC1D,YAAY5C;AACd,CAAC;"}
|
|
1
|
+
{"version":3,"file":"locale-picker-C9JmBht3.js","sources":["../../src/i18n/locale-meta.ts","../../src/components/locale-picker/locale-picker.agent.ts","../../src/components/locale-picker/locale-picker.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Locale metadata registry. */\n/* */\n/* Single source of truth for human-facing locale information — native */\n/* name, English name, flag emoji, and writing direction. Consumed by */\n/* LocalePicker / HeaderSettings to render the language switcher. */\n/* */\n/* Keys must match `LOCALES_WITH_BUNDLES` from `./resources` 1:1; the */\n/* `locale-meta.test.ts` parity check fails the build if a code is */\n/* added to one and not the other. */\n/* */\n/* Flag emojis use the Regional Indicator pair convention — a few of */\n/* the codes are language tags rather than country tags (en, ar, hi); */\n/* the flag chosen is the \"default-region\" the kit ships marketing */\n/* surfaces in. Consumers that need a different region flag (e.g. */\n/* British vs. American English) can override via `LOCALE_META[code]`. */\n/* -------------------------------------------------------------------- */\n\nimport { LOCALES_WITH_BUNDLES } from './resources';\n\n/** Reading direction. Mirrors the shape of `hooks/use-locale.ts#LocaleDir`. */\nexport type LocaleDir = 'ltr' | 'rtl';\n\n/** IETF locale tag from the kit's bundled set. */\nexport type Locale = (typeof LOCALES_WITH_BUNDLES)[number];\n\nexport interface LocaleMetaEntry {\n /** IETF locale tag (matches the key in `LOCALES_WITH_BUNDLES`). */\n code: Locale;\n /** Endonym — the locale's name in its own language (\"Italiano\", \"العربية\"). */\n nativeName: string;\n /** Exonym — the locale's name in English (\"Italian\", \"Arabic\"). */\n englishName: string;\n /**\n * ISO 3166-1 alpha-2 country code for the default-region flag. Feed\n * to the kit's `<Flag country={…} />` component to render the actual\n * flag SVG (NOT the emoji glyph — those don't paint on Windows and\n * lose fidelity at hero sizes). A few language tags here aren't tied\n * to a single country (en, ar, hi); we pick the AlfaDocs default\n * marketing region — consumers needing a different region flag\n * override at the call site.\n */\n countryCode: string;\n /**\n * Regional-indicator flag emoji. Retained as a fallback for non-DOM\n * contexts (terminal logs, plain-text exports) and the rare consumer\n * surface that can't mount the kit's `Flag` component. UI surfaces\n * should always reach for `countryCode` + `<Flag />` instead.\n */\n flag: string;\n /** Reading direction. */\n dir: LocaleDir;\n}\n\n/**\n * Canonical metadata for every locale shipped in `LOCALES_WITH_BUNDLES`.\n * Order matches the bundled-locales array so iteration is stable.\n */\nexport const LOCALE_META: Record<Locale, LocaleMetaEntry> = {\n en: {\n code: 'en',\n nativeName: 'English',\n englishName: 'English',\n countryCode: 'GB',\n flag: '🇬🇧',\n dir: 'ltr',\n },\n it: {\n code: 'it',\n nativeName: 'Italiano',\n englishName: 'Italian',\n countryCode: 'IT',\n flag: '🇮🇹',\n dir: 'ltr',\n },\n de: {\n code: 'de',\n nativeName: 'Deutsch',\n englishName: 'German',\n countryCode: 'DE',\n flag: '🇩🇪',\n dir: 'ltr',\n },\n ar: {\n code: 'ar',\n nativeName: 'العربية',\n englishName: 'Arabic',\n countryCode: 'SA',\n flag: '🇸🇦',\n dir: 'rtl',\n },\n fr: {\n code: 'fr',\n nativeName: 'Français',\n englishName: 'French',\n countryCode: 'FR',\n flag: '🇫🇷',\n dir: 'ltr',\n },\n es: {\n code: 'es',\n nativeName: 'Español',\n englishName: 'Spanish',\n countryCode: 'ES',\n flag: '🇪🇸',\n dir: 'ltr',\n },\n pt: {\n code: 'pt',\n nativeName: 'Português',\n englishName: 'Portuguese',\n countryCode: 'PT',\n flag: '🇵🇹',\n dir: 'ltr',\n },\n nl: {\n code: 'nl',\n nativeName: 'Nederlands',\n englishName: 'Dutch',\n countryCode: 'NL',\n flag: '🇳🇱',\n dir: 'ltr',\n },\n ro: {\n code: 'ro',\n nativeName: 'Română',\n englishName: 'Romanian',\n countryCode: 'RO',\n flag: '🇷🇴',\n dir: 'ltr',\n },\n sq: {\n code: 'sq',\n nativeName: 'Shqip',\n englishName: 'Albanian',\n countryCode: 'AL',\n flag: '🇦🇱',\n dir: 'ltr',\n },\n tr: {\n code: 'tr',\n nativeName: 'Türkçe',\n englishName: 'Turkish',\n countryCode: 'TR',\n flag: '🇹🇷',\n dir: 'ltr',\n },\n pl: {\n code: 'pl',\n nativeName: 'Polski',\n englishName: 'Polish',\n countryCode: 'PL',\n flag: '🇵🇱',\n dir: 'ltr',\n },\n sv: {\n code: 'sv',\n nativeName: 'Svenska',\n englishName: 'Swedish',\n countryCode: 'SE',\n flag: '🇸🇪',\n dir: 'ltr',\n },\n ru: {\n code: 'ru',\n nativeName: 'Русский',\n englishName: 'Russian',\n countryCode: 'RU',\n flag: '🇷🇺',\n dir: 'ltr',\n },\n el: {\n code: 'el',\n nativeName: 'Ελληνικά',\n englishName: 'Greek',\n countryCode: 'GR',\n flag: '🇬🇷',\n dir: 'ltr',\n },\n ja: {\n code: 'ja',\n nativeName: '日本語',\n englishName: 'Japanese',\n countryCode: 'JP',\n flag: '🇯🇵',\n dir: 'ltr',\n },\n zh: {\n code: 'zh',\n nativeName: '中文',\n englishName: 'Chinese',\n countryCode: 'CN',\n flag: '🇨🇳',\n dir: 'ltr',\n },\n hi: {\n code: 'hi',\n nativeName: 'हिन्दी',\n englishName: 'Hindi',\n countryCode: 'IN',\n flag: '🇮🇳',\n dir: 'ltr',\n },\n};\n\n/**\n * Canonical (i18n-parity) order — used when consumers need the same\n * sequence as `LOCALES_WITH_BUNDLES` (e.g. generating fixtures or\n * snapshot keys). Pickers / menus should use `LOCALE_LIST` instead,\n * which sorts alphabetically.\n */\nexport const LOCALE_LIST_CANONICAL: readonly LocaleMetaEntry[] =\n LOCALES_WITH_BUNDLES.map((code) => LOCALE_META[code]);\n\n/**\n * Picker-facing list — sorted alphabetically by English name so the\n * order is deterministic and language-independent. End users searching\n * by native name use the picker's input box to filter; the visible\n * order doesn't depend on the active locale's collation.\n *\n * \"System Default\" (the OS-driven fallback) is rendered separately at\n * the top of `LocalePicker.SearchList` — not in this list — so the\n * alphabetical order here applies to the 18 explicit locale rows only.\n */\nexport const LOCALE_LIST: readonly LocaleMetaEntry[] = [\n ...LOCALES_WITH_BUNDLES.map((code) => LOCALE_META[code]),\n].sort((a, b) => a.englishName.localeCompare(b.englishName, 'en'));\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — LocalePicker. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { LocalePickerHandle } from './locale-picker';\n\nexport const localePickerAgent: AgentAdapter<LocalePickerHandle> = {\n id: 'locale-picker',\n capabilities: ['view_change'],\n state: {},\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n descriptionKey: 'ui.agent.localePicker.actions.setLocale',\n description: 'Switch the active locale to the given IETF tag.',\n invoke: (handle, args: { locale: string }) => {\n // The handle's own implementation gates against\n // `LOCALES_WITH_BUNDLES`, so a tag the kit doesn't ship is a\n // no-op rather than a runtime crash.\n handle.setLocale(args.locale);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'locale-picker',\n description: 'Marks the LocalePicker wrapper.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type Ref,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, Globe, Monitor } from 'lucide-react';\nimport { Command, defaultFilter } from 'cmdk';\nimport { IconButton } from '../button/icon-button';\nimport { Popover } from '../popover/popover';\nimport { Flag, hasFlag } from '../flag/flag';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT,\n INPUT_SURFACE_PADDING_X,\n} from '../_shared/input-surface';\nimport { LOCALE_LIST, LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { LOCALES_WITH_BUNDLES } from '../../i18n/config';\nimport { useLocale } from '../../hooks/use-locale';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { localePickerAgent } from './locale-picker.agent';\n\n/* ------------------------------------------------------------------ */\n/* Persistence + browser-locale detection */\n/* */\n/* The first mount of a LocalePicker after a fresh page load runs a */\n/* one-shot detection: if no locale has ever been persisted, read */\n/* navigator.language, normalise to the base tag (`it-IT` → `it`), */\n/* and adopt it if the kit ships a matching bundle. Fall back to */\n/* `en` if not. Result is persisted so a subsequent page load */\n/* respects the user choice without re-detecting. */\n/* */\n/* Module-level flag — the detection must fire once per app */\n/* lifecycle, not once per LocalePicker instance, since HeaderSettings */\n/* + a standalone picker can both be mounted simultaneously. */\n/* ------------------------------------------------------------------ */\n\nexport const LOCALE_STORAGE_KEY = 'alfadocs-ui.locale';\n\n/**\n * Sentinel value (and Combobox-row key) for \"follow the browser /\n * OS locale\". Mirrors the ThemeToggle's `'system'` preference: the\n * picker doesn't store a concrete locale code; the runtime resolves\n * to `navigator.language` on each mount.\n */\nexport const LOCALE_SYSTEM_DEFAULT = 'system' as const;\nexport type LocalePreference = Locale | typeof LOCALE_SYSTEM_DEFAULT;\n\nlet detectionFired = false;\n\nfunction isSupportedLocale(value: unknown): value is Locale {\n return (\n typeof value === 'string' &&\n (LOCALES_WITH_BUNDLES as readonly string[]).includes(value)\n );\n}\n\nfunction safeReadStorage(key: string): string | null {\n if (typeof window === 'undefined') return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n}\n\nfunction safeWriteStorage(key: string, value: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.setItem(key, value);\n } catch {\n /* Storage can throw in private mode / when quota is exceeded — the\n in-memory state is the source of truth. Same silent-fail shape\n as use-theme.ts. */\n }\n}\n\nfunction detectBrowserLocale(): Locale {\n if (typeof navigator === 'undefined') return 'en';\n const raw = navigator.language;\n if (!raw) return 'en';\n const base = raw.toLowerCase().split('-')[0];\n return isSupportedLocale(base) ? base : 'en';\n}\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/* Shared state hook */\n/* */\n/* Centralises the setLocale wrapper so both the standalone picker */\n/* and the inline `LocalePicker.SearchList` share one source of truth: */\n/* 1. delegate to `useLocale().setLocale` (the i18next change) */\n/* 2. set `document.documentElement.dir` + `lang` */\n/* 3. persist to localStorage at `alfadocs-ui.locale` */\n/* ------------------------------------------------------------------ */\n\ninterface LocalePickerState {\n /** Resolved locale actually applied to the page (always concrete). */\n locale: Locale;\n /**\n * True when the resolved locale came from `navigator.language`\n * rather than an explicit user choice (i.e. no localStorage entry).\n * Used to mark the \"System Default\" row as the active selection\n * until the user picks a specific locale.\n */\n isSystemDefault: boolean;\n /**\n * Switch to a specific locale (persists) OR back to the System\n * Default (clears the localStorage entry and re-detects).\n */\n setLocale: (next: LocalePreference) => void;\n}\n\nfunction safeRemoveStorage(key: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.removeItem(key);\n } catch {\n /* private mode etc. — silent fail per the rest of the file. */\n }\n}\n\nfunction useLocalePickerState(): LocalePickerState {\n const { locale: rawLocale, setLocale: setLocaleI18n } = useLocale();\n const [isSystemDefault, setIsSystemDefault] = useState<boolean>(\n () => safeReadStorage(LOCALE_STORAGE_KEY) === null,\n );\n\n // Coerce the i18next-reported locale to the supported set so consumers\n // never see an un-bundled tag (e.g. when the host app pre-loads\n // `en-US` before the kit's resources land).\n const locale: Locale = isSupportedLocale(rawLocale) ? rawLocale : 'en';\n\n const setLocale = useCallback(\n (next: LocalePreference) => {\n if (next === LOCALE_SYSTEM_DEFAULT) {\n // Clear persistence + re-resolve to navigator.language.\n safeRemoveStorage(LOCALE_STORAGE_KEY);\n const detected = detectBrowserLocale();\n void setLocaleI18n(detected);\n applyDocumentAttrs(detected);\n setIsSystemDefault(true);\n return;\n }\n if (!isSupportedLocale(next)) return;\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n setIsSystemDefault(false);\n },\n [setLocaleI18n],\n );\n\n // One-shot detection on first LocalePicker mount per app lifecycle.\n useEffect(() => {\n if (detectionFired) return;\n detectionFired = true;\n const stored = safeReadStorage(LOCALE_STORAGE_KEY);\n if (isSupportedLocale(stored)) {\n // User-chosen value persists — keep i18next + document in sync.\n if (stored !== rawLocale) void setLocaleI18n(stored);\n applyDocumentAttrs(stored);\n return;\n }\n // No stored value → we're in System Default mode. Detect, apply,\n // but do NOT persist (so the System Default selection stays\n // sticky across reloads until the user explicitly chooses).\n const detected = detectBrowserLocale();\n void setLocaleI18n(detected);\n applyDocumentAttrs(detected);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentional one-shot detection\n }, []);\n\n return { locale, isSystemDefault, setLocale };\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n variant: {\n icon: '',\n compact: '',\n },\n },\n defaultVariants: { variant: 'icon' },\n});\n\nconst compactTriggerClasses = [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)]',\n 'ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]',\n 'ds:bg-transparent ds:text-foreground',\n 'ds:hover:bg-muted',\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:opacity-50 ds:disabled:cursor-not-allowed',\n 'type-body-sm',\n].join(' ');\n\nconst popoverContentClasses = [\n 'ds:w-[18rem] ds:rounded-[var(--radius-md)]',\n 'ds:bg-background ds:text-foreground ds:border ds:border-border',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:overflow-hidden',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type LocalePickerVariant = 'icon' | 'compact';\n\nexport interface LocalePickerProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n variant?: LocalePickerVariant;\n /**\n * Controlled escape hatch — when omitted the picker reads/writes\n * `useLocale()` directly so a bare `<LocalePicker />` works with no\n * wiring. Pass both to opt into controlled mode.\n */\n value?: Locale;\n onValueChange?: (next: LocalePreference) => void;\n /** Disable interaction (greys out the trigger). */\n disabled?: boolean;\n /** Mark as busy (kept open / focusable but read-only). */\n loading?: boolean;\n /**\n * Side the search popover opens onto, relative to the trigger.\n * Defaults to `bottom` (standard dropdown). Use `end` (inline-end —\n * right in LTR, left in RTL) when nesting the LocalePicker inside\n * another popover/menu so the search surface flies out to the side\n * rather than stacking below.\n */\n popoverSide?: 'top' | 'bottom' | 'start' | 'end';\n}\n\n/**\n * Curated imperative handle for agent / external automation. The\n * `setLocale` parameter is widened to `string` (rather than the\n * narrower `Locale`) so untyped agent inputs don't have to thread the\n * `LOCALES_WITH_BUNDLES` constraint at the call site — the\n * implementation validates internally and no-ops on an unsupported\n * tag.\n */\nexport interface LocalePickerHandle {\n setLocale: (next: string) => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker.SearchList — the inline searchable list */\n/* */\n/* HeaderSettings renders this directly inside its DropdownMenu so the */\n/* same UX is reused without nesting another popover. Standalone the */\n/* root component renders this same widget inside a Popover. */\n/* ------------------------------------------------------------------ */\n\nexport interface LocalePickerSearchListProps {\n /**\n * Active selection. Either a `Locale` code or the\n * `LOCALE_SYSTEM_DEFAULT` sentinel (when the user hasn't made an\n * explicit choice and the kit is following `navigator.language`).\n * Defaults to the shared store.\n */\n value?: LocalePreference;\n /**\n * Fires after a successful selection. Accepts a concrete `Locale`\n * or `LOCALE_SYSTEM_DEFAULT` (when the user picks the \"System\n * Default\" row at the top of the list).\n *\n * Defaults to the shared setter (delegates to useLocale, persists\n * or clears storage, updates document.dir/lang).\n */\n onValueChange?: (next: LocalePreference) => void;\n /** Optional id for the search input (axe `aria-labelledby` chain). */\n inputId?: string;\n /** Disable the input + list interactions. */\n disabled?: boolean;\n /** Mark as busy (read-only). */\n loading?: boolean;\n className?: string;\n}\n\nconst searchListVariants = cva('ds:flex ds:flex-col', {\n variants: {\n loading: {\n true: 'ds:opacity-60 ds:pointer-events-none',\n false: '',\n },\n },\n defaultVariants: { loading: false },\n});\n\nexport const LocalePickerSearchList = forwardRef<\n HTMLDivElement,\n LocalePickerSearchListProps\n>(\n (\n {\n value: valueProp,\n onValueChange,\n inputId: inputIdProp,\n disabled = false,\n loading = false,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const store = useLocalePickerState();\n // Resolved-to-render-with: which locale name to display for\n // \"System Default ({{nativeName}})\". Always a concrete Locale.\n const resolvedLocale = store.locale;\n // Selection-state: the picker's current value is either an\n // explicit Locale or the System Default sentinel.\n const currentSelection: LocalePreference =\n valueProp ??\n (store.isSystemDefault ? LOCALE_SYSTEM_DEFAULT : store.locale);\n const generatedId = useId();\n const inputId = inputIdProp ?? `${generatedId}-search`;\n const [search, setSearch] = useState('');\n\n const handleSelect = useCallback(\n (code: string) => {\n if (disabled || loading) return;\n if (code === LOCALE_SYSTEM_DEFAULT) {\n if (onValueChange) {\n onValueChange(LOCALE_SYSTEM_DEFAULT);\n } else {\n store.setLocale(LOCALE_SYSTEM_DEFAULT);\n }\n return;\n }\n if (!isSupportedLocale(code)) return;\n if (onValueChange) {\n onValueChange(code);\n } else {\n store.setLocale(code);\n }\n },\n [disabled, loading, onValueChange, store],\n );\n\n return (\n <div\n ref={ref}\n className={[searchListVariants({ loading }), className]\n .filter(Boolean)\n .join(' ')}\n data-component=\"locale-picker-search-list\"\n >\n <Command\n label={t('navigation.localePicker.commandLabel')}\n // Defer to cmdk's defaultFilter — it ranks against both the\n // Item's `value` (the locale code) and `keywords` (the\n // native + English names), which is exactly the haystack we\n // want users to be able to match against. The Item's `value`\n // alone wouldn't surface \"jap\" → 日本語 because the code is\n // `ja`; the keyword \"Japanese\" handles that match.\n filter={defaultFilter}\n shouldFilter\n >\n {/* Input chrome borrows the kit's standard INPUT_SURFACE\n tokens (same as Combobox / Autocomplete) so the search\n field reads as a first-class kit input rather than a\n one-off list header. The wrapper carries the border /\n padding / focus-within ring; the inner Command.Input\n keeps its outline-less peer styling. */}\n <div\n className={[\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT.sm,\n INPUT_SURFACE_PADDING_X.sm,\n 'ds:flex ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:m-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Globe\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-muted-foreground ds:shrink-0\"\n />\n <Command.Input\n id={inputId}\n value={search}\n onValueChange={setSearch}\n placeholder={t('navigation.localePicker.searchPlaceholder')}\n aria-label={t('navigation.localePicker.searchLabel')}\n disabled={disabled || loading}\n className={[\n 'ds:peer ds:flex-1 ds:bg-transparent ds:border-0 ds:outline-none',\n 'ds:placeholder:text-muted-foreground ds:text-foreground',\n 'ds:text-[length:var(--font-size-sm)]',\n ].join(' ')}\n />\n </div>\n <Command.List\n className={[\n 'ds:max-h-[18rem] ds:overflow-y-auto',\n 'ds:p-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Command.Empty\n className={[\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]',\n 'type-body-sm ds:text-muted-foreground',\n ].join(' ')}\n >\n {t('navigation.localePicker.empty')}\n </Command.Empty>\n\n {/* \"System Default\" — always the first row. Selected when\n the user hasn't picked an explicit locale; selecting it\n clears the localStorage entry and re-resolves to\n navigator.language. Mirrors the `'system'` value in\n ThemeToggle. */}\n {(() => {\n const isSystemSelected =\n currentSelection === LOCALE_SYSTEM_DEFAULT;\n const resolvedEntry = LOCALE_META[resolvedLocale];\n return (\n <Command.Item\n key={LOCALE_SYSTEM_DEFAULT}\n value={LOCALE_SYSTEM_DEFAULT}\n keywords={[\n 'system',\n 'default',\n 'auto',\n 'browser',\n resolvedEntry.nativeName,\n resolvedEntry.englishName,\n ]}\n disabled={disabled || loading}\n onSelect={handleSelect}\n className={[\n 'ds:relative ds:flex ds:cursor-pointer ds:select-none',\n 'ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:text-foreground ds:outline-none',\n 'ds:data-[highlighted]:bg-muted',\n 'ds:aria-selected:bg-muted',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\n ].join(' ')}\n aria-selected={isSystemSelected || undefined}\n data-current={isSystemSelected ? 'true' : undefined}\n >\n <Monitor\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-muted-foreground ds:shrink-0\"\n />\n <span className=\"ds:flex-1 ds:min-w-0 ds:truncate type-body-sm\">\n {t('navigation.localePicker.systemDefault', {\n locale: resolvedEntry.nativeName,\n })}\n </span>\n {isSystemSelected ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-primary ds:shrink-0\"\n />\n ) : null}\n {isSystemSelected ? (\n <span className=\"ds:sr-only\">\n {t('navigation.localePicker.currentSelection')}\n </span>\n ) : null}\n </Command.Item>\n );\n })()}\n\n {LOCALE_LIST.map((entry) => {\n const isSelected = currentSelection === entry.code;\n return (\n <Command.Item\n key={entry.code}\n value={entry.code}\n keywords={[entry.nativeName, entry.englishName]}\n disabled={disabled || loading}\n onSelect={handleSelect}\n className={[\n 'ds:relative ds:flex ds:cursor-pointer ds:select-none',\n 'ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:text-foreground ds:outline-none',\n 'ds:data-[highlighted]:bg-muted',\n 'ds:aria-selected:bg-muted',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\n ].join(' ')}\n aria-selected={isSelected || undefined}\n data-current={isSelected ? 'true' : undefined}\n // `lang` on the row triggers font-cascade selection\n // so Arabic / Japanese / Devanagari / Greek glyphs\n // paint via the Noto Sans family. Intentionally\n // omits `dir` — the row layout follows the picker\n // surface's direction (LTR menu = LTR row, RTL menu\n // = RTL row). Setting `dir=\"rtl\"` per Arabic row\n // would flip just THAT row inside an LTR menu, which\n // breaks the visual rhythm with neighbouring rows.\n // Arabic text within the row still renders RTL at\n // the character level (script-driven) regardless.\n lang={entry.code}\n >\n {hasFlag(entry.countryCode) ? (\n <Flag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n /* hasFlag fallback: render the emoji glyph only\n when the kit doesn't ship an SVG for this\n country code. All 18 bundled locales currently\n have SVG flags, so this is dead code on the\n canonical set — kept for resilience when\n consumers extend the registry. */\n <span\n aria-hidden=\"true\"\n className=\"ds:text-base ds:shrink-0\"\n >\n {entry.flag}\n </span>\n )}\n <span className=\"ds:flex-1 ds:min-w-0 ds:truncate type-body-sm\">\n {entry.nativeName}\n </span>\n {isSelected ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-primary ds:shrink-0\"\n />\n ) : null}\n {isSelected ? (\n <span className=\"ds:sr-only\">\n {t('navigation.localePicker.currentSelection')}\n </span>\n ) : null}\n </Command.Item>\n );\n })}\n </Command.List>\n </Command>\n </div>\n );\n },\n);\nLocalePickerSearchList.displayName = 'LocalePicker.SearchList';\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker root — icon + compact trigger variants */\n/* ------------------------------------------------------------------ */\n\ninterface VariantRenderProps {\n state: LocalePickerState;\n rest: HTMLAttributes<HTMLDivElement>;\n forwardedRef: Ref<HTMLDivElement>;\n className?: string;\n disabled: boolean;\n loading: boolean;\n popoverSide: 'top' | 'bottom' | 'start' | 'end';\n}\n\nfunction IconTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n popoverSide,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'icon', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <IconButton\n disabled={disabled || loading}\n icon={\n <span className=\"ds:relative ds:inline-flex ds:items-center ds:justify-center\">\n <Globe aria-hidden className=\"ds:size-5\" />\n {hasFlag(entry.countryCode) ? (\n <Flag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className={[\n // Corner chip overlaying the globe glyph.\n // `outline` paints a thin background-coloured\n // ring around the flag so it reads as a chip\n // rather than blending into the globe edge.\n 'ds:absolute ds:bottom-[-3px] ds:end-[-5px]',\n 'ds:outline ds:outline-2 ds:outline-background',\n // Scale down to chip size — Flag's sm tile is\n // larger than the original emoji glyph.\n 'ds:scale-75 ds:origin-bottom-end',\n ].join(' ')}\n />\n ) : null}\n </span>\n }\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n />\n </Popover.Trigger>\n <Popover.Content\n side={popoverSide}\n align=\"start\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nfunction CompactTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n popoverSide,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'compact', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n disabled={disabled || loading}\n className={compactTriggerClasses}\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n >\n {hasFlag(entry.countryCode) ? (\n <Flag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n <Globe aria-hidden className=\"ds:size-4 ds:shrink-0\" />\n )}\n <span\n className=\"ds:flex-1 ds:truncate type-body-sm\"\n lang={entry.code}\n >\n {entry.nativeName}\n </span>\n </button>\n </Popover.Trigger>\n <Popover.Content\n side={popoverSide}\n align=\"start\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nconst LocalePickerRoot = forwardRef<HTMLDivElement, LocalePickerProps>(\n (props, ref) => {\n const {\n variant = 'icon',\n value,\n onValueChange,\n disabled = false,\n loading = false,\n popoverSide = 'bottom',\n className,\n id,\n ...rest\n } = props as LocalePickerProps & { id?: string };\n\n const store = useLocalePickerState();\n const resolvedLocale = value ?? store.locale;\n\n // Controlled overlay: when a consumer passes `onValueChange`, route\n // selections to them instead of the shared store. Document attrs +\n // localStorage are still updated so the picker behaves consistently\n // either way.\n const setLocale = useCallback(\n (next: LocalePreference) => {\n if (onValueChange) {\n onValueChange(next);\n // Side-effects in controlled mode: still write through to\n // the persistence + document attrs so the rest of the page\n // re-renders even though we're routing state to the consumer.\n if (next === LOCALE_SYSTEM_DEFAULT) {\n safeRemoveStorage(LOCALE_STORAGE_KEY);\n const detected = detectBrowserLocale();\n applyDocumentAttrs(detected);\n } else if (isSupportedLocale(next)) {\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n }\n return;\n }\n store.setLocale(next);\n },\n [onValueChange, store],\n );\n\n const state: LocalePickerState = useMemo(\n () => ({\n locale: resolvedLocale,\n isSystemDefault: store.isSystemDefault,\n setLocale,\n }),\n [resolvedLocale, store.isSystemDefault, setLocale],\n );\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n const stateRef = useRef(state);\n stateRef.current = state;\n const agentHandle = useMemo<LocalePickerHandle>(\n () => ({\n setLocale: (next: string) => {\n if (isSupportedLocale(next)) {\n stateRef.current.setLocale(next);\n }\n },\n }),\n [],\n );\n useAgentRegistration(localePickerAgent, agentHandle, id);\n\n if (variant === 'compact') {\n return (\n <CompactTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n popoverSide={popoverSide}\n />\n );\n }\n return (\n <IconTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n popoverSide={popoverSide}\n />\n );\n },\n);\nLocalePickerRoot.displayName = 'LocalePicker';\n\nexport const LocalePicker = Object.assign(LocalePickerRoot, {\n SearchList: LocalePickerSearchList,\n});\n"],"names":["LOCALE_META","LOCALES_WITH_BUNDLES","code","LOCALE_LIST","a","b","localePickerAgent","handle","args","LOCALE_STORAGE_KEY","LOCALE_SYSTEM_DEFAULT","detectionFired","isSupportedLocale","value","safeReadStorage","key","safeWriteStorage","detectBrowserLocale","raw","base","applyDocumentAttrs","locale","root","safeRemoveStorage","useLocalePickerState","rawLocale","setLocaleI18n","useLocale","isSystemDefault","setIsSystemDefault","useState","setLocale","useCallback","next","detected","useEffect","stored","wrapperVariants","cva","compactTriggerClasses","popoverContentClasses","searchListVariants","LocalePickerSearchList","forwardRef","valueProp","onValueChange","inputIdProp","disabled","loading","className","ref","t","useTranslation","store","resolvedLocale","currentSelection","generatedId","useId","inputId","search","setSearch","handleSelect","jsx","jsxs","Command","defaultFilter","INPUT_SURFACE_CHROME","INPUT_SURFACE_HEIGHT","INPUT_SURFACE_PADDING_X","Globe","isSystemSelected","resolvedEntry","Monitor","Check","entry","isSelected","hasFlag","Flag","IconTrigger","state","rest","forwardedRef","popoverSide","Popover","IconButton","CompactTrigger","LocalePickerRoot","props","variant","id","useMemo","useRef","useImperativeHandle","stateRef","agentHandle","useAgentRegistration","LocalePicker"],"mappings":";;;;;;;;;;;;;;;AA0DO,MAAMA,IAA+C;AAAA,EAC1D,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAAA,EAEP,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAAA,EAEP,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAAA,EAEP,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAAA,EAEP,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAAA,EAEP,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ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AAK,MAAM+B,EAAa,SAA2B,CAAA,CAAE;AAEzE,UAAMY,IAAWF,EAAOZ,CAAK;AAC7B,IAAAc,EAAS,UAAUd;AACnB,UAAMe,IAAcJ;AAAA,MAClB,OAAO;AAAA,QACL,WAAW,CAACzD,MAAiB;AAC3B,UAAIrB,EAAkBqB,CAAI,KACxB4D,EAAS,QAAQ,UAAU5D,CAAI;AAAA,QAEnC;AAAA,MAAA;AAAA,MAEF,CAAA;AAAA,IAAC;AAIH,WAFA8D,GAAqBzF,IAAmBwF,GAAaL,CAAE,GAEnDD,MAAY,YAEZ,gBAAA1B;AAAA,MAACuB;AAAA,MAAA;AAAA,QACC,OAAAN;AAAA,QACA,MAAAC;AAAA,QACA,cAAAC;AAAA,QACA,WAAAhC;AAAA,QACA,UAAAF;AAAA,QACA,SAAAC;AAAA,QACA,aAAAkC;AAAA,MAAA;AAAA,IAAA,IAKJ,gBAAApB;AAAA,MAACgB;AAAA,MAAA;AAAA,QACC,OAAAC;AAAA,QACA,MAAAC;AAAA,QACA,cAAAC;AAAA,QACA,WAAAhC;AAAA,QACA,UAAAF;AAAA,QACA,SAAAC;AAAA,QACA,aAAAkC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAI,EAAiB,cAAc;AAExB,MAAMU,KAAe,OAAO,OAAOV,GAAkB;AAAA,EAC1D,YAAY5C;AACd,CAAC;"}
|
package/dist/_chunks/{marketplace-app-shell-C4OYAC22.js → marketplace-app-shell-Cou6XnMJ.js}
RENAMED
|
@@ -8,10 +8,10 @@ import { A as D } from "./alert-_mUKLmwA.js";
|
|
|
8
8
|
import { C as w } from "./card-DPmk26CL.js";
|
|
9
9
|
import { D as m } from "./dropdown-menu-DwwPovMZ.js";
|
|
10
10
|
import { T as F } from "./tab-bar-Xetknddo.js";
|
|
11
|
-
import { a as S, H as q, g as G, f as A, e as J, c as K, d as Q } from "./header-
|
|
12
|
-
import { H as U } from "./header-settings-
|
|
13
|
-
import { S as X } from "./sign-in-with-alfadocs-button-
|
|
14
|
-
import { S as Y, a as Z, j as _, k as aa, i as ea, h as z } from "./sidebar-
|
|
11
|
+
import { a as S, H as q, g as G, f as A, e as J, c as K, d as Q } from "./header-CNszv2WQ.js";
|
|
12
|
+
import { H as U } from "./header-settings-CNOqIhoW.js";
|
|
13
|
+
import { S as X } from "./sign-in-with-alfadocs-button-LppxjlFt.js";
|
|
14
|
+
import { S as Y, a as Z, j as _, k as aa, i as ea, h as z } from "./sidebar-BFwbx74W.js";
|
|
15
15
|
import { T as sa } from "./theme-root-BOO73p5t.js";
|
|
16
16
|
import { a as ta } from "./tooltip-DvmfrNvB.js";
|
|
17
17
|
import { u as ra } from "./use-theme-CAuo6EYT.js";
|
|
@@ -510,4 +510,4 @@ export {
|
|
|
510
510
|
va as M,
|
|
511
511
|
g as P
|
|
512
512
|
};
|
|
513
|
-
//# sourceMappingURL=marketplace-app-shell-
|
|
513
|
+
//# sourceMappingURL=marketplace-app-shell-Cou6XnMJ.js.map
|