@alfadocs/ui-kit-debug 1.61.0 → 1.62.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/{actions-cell-renderer-CZWGQFKV.js → actions-cell-renderer-BXCpK2_0.js} +3 -3
- package/dist/_chunks/{actions-cell-renderer-CZWGQFKV.js.map → actions-cell-renderer-BXCpK2_0.js.map} +1 -1
- package/dist/_chunks/{agenda-card-DauvvKX6.js → agenda-card-DR9gDdKp.js} +2 -2
- package/dist/_chunks/{agenda-card-DauvvKX6.js.map → agenda-card-DR9gDdKp.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-DU7O5Z7R.js → agenda-tray-DGB1Zup-.js} +3 -3
- package/dist/_chunks/{agenda-tray-DU7O5Z7R.js.map → agenda-tray-DGB1Zup-.js.map} +1 -1
- package/dist/_chunks/{ai-credits-notice-MBgQXxsx.js → ai-credits-notice-pK9BOmEz.js} +2 -2
- package/dist/_chunks/{ai-credits-notice-MBgQXxsx.js.map → ai-credits-notice-pK9BOmEz.js.map} +1 -1
- package/dist/_chunks/{ai-permission-notice-BJHutKLE.js → ai-permission-notice-DpRmZ9Q3.js} +4 -4
- package/dist/_chunks/{ai-permission-notice-BJHutKLE.js.map → ai-permission-notice-DpRmZ9Q3.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-Dzos37rf.js → ai-prompt-input-DSGSe4LH.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-Dzos37rf.js.map → ai-prompt-input-DSGSe4LH.js.map} +1 -1
- package/dist/_chunks/{alert-BhCstf2h.js → alert-DdDpOi-P.js} +2 -2
- package/dist/_chunks/{alert-BhCstf2h.js.map → alert-DdDpOi-P.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-CU3mVL9J.js → alia-sidebar-qe0quZkB.js} +6 -6
- package/dist/_chunks/{alia-sidebar-CU3mVL9J.js.map → alia-sidebar-qe0quZkB.js.map} +1 -1
- package/dist/_chunks/{anamnesis-card-VjJOUl-t.js → anamnesis-card-CsUBOG32.js} +3 -3
- package/dist/_chunks/{anamnesis-card-VjJOUl-t.js.map → anamnesis-card-CsUBOG32.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-card-cCj7LPh3.js → anamnesis-summary-card-CMzBLTiN.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-card-cCj7LPh3.js.map → anamnesis-summary-card-CMzBLTiN.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-C5F08WT6.js → anamnesis-summary-rows-DFWws7mM.js} +11 -11
- package/dist/_chunks/{anamnesis-summary-rows-C5F08WT6.js.map → anamnesis-summary-rows-DFWws7mM.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-CfNFrej5.js → antenatal-schedule-timeline-DuaAQj1m.js} +2 -2
- package/dist/_chunks/{antenatal-schedule-timeline-CfNFrej5.js.map → antenatal-schedule-timeline-DuaAQj1m.js.map} +1 -1
- package/dist/_chunks/app-frame-DUPEwu4E.js +179 -0
- package/dist/_chunks/app-frame-DUPEwu4E.js.map +1 -0
- package/dist/_chunks/app-frame-context-CPszhDDb.js +10 -0
- package/dist/_chunks/app-frame-context-CPszhDDb.js.map +1 -0
- package/dist/_chunks/{appointment-card-BXQUZlAJ.js → appointment-card-CL32sux-.js} +3 -3
- package/dist/_chunks/{appointment-card-BXQUZlAJ.js.map → appointment-card-CL32sux-.js.map} +1 -1
- package/dist/_chunks/{appointment-peek-BvzXHYiD.js → appointment-peek-B5mcDcXt.js} +3 -3
- package/dist/_chunks/{appointment-peek-BvzXHYiD.js.map → appointment-peek-B5mcDcXt.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-r-q97cec.js → appointment-timeline-DaHKV81s.js} +4 -4
- package/dist/_chunks/{appointment-timeline-r-q97cec.js.map → appointment-timeline-DaHKV81s.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-DF_R9ldY.js → appointment-tray-qtpJt8e0.js} +3 -3
- package/dist/_chunks/{appointment-tray-DF_R9ldY.js.map → appointment-tray-qtpJt8e0.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-Cssm6jVh.js → audio-recorder-DR-u1qbl.js} +3 -3
- package/dist/_chunks/{audio-recorder-Cssm6jVh.js.map → audio-recorder-DR-u1qbl.js.map} +1 -1
- package/dist/_chunks/{auth-form-parts-CravOf0L.js → auth-form-parts-Cmb41LSQ.js} +2 -2
- package/dist/_chunks/{auth-form-parts-CravOf0L.js.map → auth-form-parts-Cmb41LSQ.js.map} +1 -1
- package/dist/_chunks/{badge-hnBt8o7n.js → badge-BUk4RjTS.js} +2 -2
- package/dist/_chunks/{badge-hnBt8o7n.js.map → badge-BUk4RjTS.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-DMG06b2C.js → balance-badge-cell-F7p_ZKEg.js} +5 -5
- package/dist/_chunks/{balance-badge-cell-DMG06b2C.js.map → balance-badge-cell-F7p_ZKEg.js.map} +1 -1
- package/dist/_chunks/{bishop-score-DxfkcxiV.js → bishop-score-CaNTrikJ.js} +2 -2
- package/dist/_chunks/{bishop-score-DxfkcxiV.js.map → bishop-score-CaNTrikJ.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-B4kgPqt5.js → bmi-calculator-DjmQ04Ch.js} +4 -4
- package/dist/_chunks/{bmi-calculator-B4kgPqt5.js.map → bmi-calculator-DjmQ04Ch.js.map} +1 -1
- package/dist/_chunks/{booking-CXaqmdF7.js → booking-CGhOtxad.js} +8 -8
- package/dist/_chunks/{booking-CXaqmdF7.js.map → booking-CGhOtxad.js.map} +1 -1
- package/dist/_chunks/{button-group-Cfpyu6pc.js → button-group-DCOJhvm3.js} +3 -3
- package/dist/_chunks/{button-group-Cfpyu6pc.js.map → button-group-DCOJhvm3.js.map} +1 -1
- package/dist/_chunks/{calendar-DNTVaK6b.js → calendar-DCr65Kt1.js} +3 -3
- package/dist/_chunks/{calendar-DNTVaK6b.js.map → calendar-DCr65Kt1.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-UL5xcpWa.js → calendar-workspace-Dvfl9Vf6.js} +29 -29
- package/dist/_chunks/{calendar-workspace-UL5xcpWa.js.map → calendar-workspace-Dvfl9Vf6.js.map} +1 -1
- package/dist/_chunks/{care-plan-card-DFQbU_Gd.js → care-plan-card-BU3p5cLr.js} +3 -3
- package/dist/_chunks/{care-plan-card-DFQbU_Gd.js.map → care-plan-card-BU3p5cLr.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-bj784KRk.js → care-plan-entry-card-DPJcP34v.js} +4 -4
- package/dist/_chunks/{care-plan-entry-card-bj784KRk.js.map → care-plan-entry-card-DPJcP34v.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-DDhyAfVK.js → care-plan-header-CgFjQLBd.js} +3 -3
- package/dist/_chunks/{care-plan-header-DDhyAfVK.js.map → care-plan-header-CgFjQLBd.js.map} +1 -1
- package/dist/_chunks/{carousel.agent-Csn24G1k.js → carousel.agent-BaRsN-8H.js} +2 -2
- package/dist/_chunks/{carousel.agent-Csn24G1k.js.map → carousel.agent-BaRsN-8H.js.map} +1 -1
- package/dist/_chunks/chart-DgYHN8Xq.js +991 -0
- package/dist/_chunks/chart-DgYHN8Xq.js.map +1 -0
- package/dist/_chunks/{chat-input-Ck34Pnmp.js → chat-input-HtTbUUD6.js} +2 -2
- package/dist/_chunks/{chat-input-Ck34Pnmp.js.map → chat-input-HtTbUUD6.js.map} +1 -1
- package/dist/_chunks/{chat-message-DU0X3Xnl.js → chat-message-fRLZ95O5.js} +2 -2
- package/dist/_chunks/{chat-message-DU0X3Xnl.js.map → chat-message-fRLZ95O5.js.map} +1 -1
- package/dist/_chunks/{checkbox--ndmyokr.js → checkbox-BjDv-r3o.js} +2 -2
- package/dist/_chunks/{checkbox--ndmyokr.js.map → checkbox-BjDv-r3o.js.map} +1 -1
- package/dist/_chunks/{checkbox-group-B0oZHNT3.js → checkbox-group-Cw2H5qaq.js} +2 -2
- package/dist/_chunks/{checkbox-group-B0oZHNT3.js.map → checkbox-group-Cw2H5qaq.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-L6FVM9Gx.js → clinical-note-card-BgURrgL5.js} +3 -3
- package/dist/_chunks/{clinical-note-card-L6FVM9Gx.js.map → clinical-note-card-BgURrgL5.js.map} +1 -1
- package/dist/_chunks/{code-block-DiC4bg-o.js → code-block-vwEv1jEa.js} +2 -2
- package/dist/_chunks/{code-block-DiC4bg-o.js.map → code-block-vwEv1jEa.js.map} +1 -1
- package/dist/_chunks/{connection-status-BAnuwayz.js → connection-status--wYsgreh.js} +3 -3
- package/dist/_chunks/{connection-status-BAnuwayz.js.map → connection-status--wYsgreh.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-JTRbnbxy.js → contact-profile-card-VTCAmQqj.js} +3 -3
- package/dist/_chunks/{contact-profile-card-JTRbnbxy.js.map → contact-profile-card-VTCAmQqj.js.map} +1 -1
- package/dist/_chunks/control-room-rail-DUerqHeo.js +416 -0
- package/dist/_chunks/control-room-rail-DUerqHeo.js.map +1 -0
- package/dist/_chunks/{cycle-calculator-BuFi6ZJa.js → cycle-calculator-D-rwX9Pj.js} +2 -2
- package/dist/_chunks/{cycle-calculator-BuFi6ZJa.js.map → cycle-calculator-D-rwX9Pj.js.map} +1 -1
- package/dist/_chunks/{dashboard-grid-DRnhIlT-.js → dashboard-grid-B2MB7SRS.js} +627 -603
- package/dist/_chunks/dashboard-grid-B2MB7SRS.js.map +1 -0
- package/dist/_chunks/{data-table-DAPkhyXO.js → data-table-m7GbLJZy.js} +6 -6
- package/dist/_chunks/{data-table-DAPkhyXO.js.map → data-table-m7GbLJZy.js.map} +1 -1
- package/dist/_chunks/{data-table-tabs-2t0cdk0h.js → data-table-tabs-BfrnefV5.js} +3 -3
- package/dist/_chunks/{data-table-tabs-2t0cdk0h.js.map → data-table-tabs-BfrnefV5.js.map} +1 -1
- package/dist/_chunks/{dependent-selector-DgaAQc-c.js → dependent-selector-DBr1AhLg.js} +3 -3
- package/dist/_chunks/{dependent-selector-DgaAQc-c.js.map → dependent-selector-DBr1AhLg.js.map} +1 -1
- package/dist/_chunks/{description-list-CFEw__MT.js → description-list-Q8640NHu.js} +2 -2
- package/dist/_chunks/{description-list-CFEw__MT.js.map → description-list-Q8640NHu.js.map} +1 -1
- package/dist/_chunks/{dev-bypass-button-dTuUuzsT.js → dev-bypass-button--CPzzRSj.js} +2 -2
- package/dist/_chunks/{dev-bypass-button-dTuUuzsT.js.map → dev-bypass-button--CPzzRSj.js.map} +1 -1
- package/dist/_chunks/{document-preview-DYX669jE.js → document-preview-B1dQm292.js} +4 -4
- package/dist/_chunks/{document-preview-DYX669jE.js.map → document-preview-B1dQm292.js.map} +1 -1
- package/dist/_chunks/{document-scanner-C41n4pNq.js → document-scanner-CVPVLK7z.js} +2 -2
- package/dist/_chunks/{document-scanner-C41n4pNq.js.map → document-scanner-CVPVLK7z.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-yYvX8Ww_.js → due-date-calculator-DTfxFJCM.js} +5 -5
- package/dist/_chunks/{due-date-calculator-yYvX8Ww_.js.map → due-date-calculator-DTfxFJCM.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-6LDFAWUE.js → editable-currency-cell-renderer-1ijmzNWh.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-6LDFAWUE.js.map → editable-currency-cell-renderer-1ijmzNWh.js.map} +1 -1
- package/dist/_chunks/{editable-description-D9FsTi8e.js → editable-description-ChGNdYY8.js} +2 -2
- package/dist/_chunks/{editable-description-D9FsTi8e.js.map → editable-description-ChGNdYY8.js.map} +1 -1
- package/dist/_chunks/{editor-overlay-BYkcaLCj.js → editor-overlay-CpVO1-Kk.js} +2 -2
- package/dist/_chunks/{editor-overlay-BYkcaLCj.js.map → editor-overlay-CpVO1-Kk.js.map} +1 -1
- package/dist/_chunks/{entity-summary-oD_63dlz.js → entity-summary-DXIr5_x2.js} +4 -4
- package/dist/_chunks/{entity-summary-oD_63dlz.js.map → entity-summary-DXIr5_x2.js.map} +1 -1
- package/dist/_chunks/{error-summary-BhM8FEkl.js → error-summary-DrUfuKu1.js} +2 -2
- package/dist/_chunks/{error-summary-BhM8FEkl.js.map → error-summary-DrUfuKu1.js.map} +1 -1
- package/dist/_chunks/{face-scheme-C-5V3MsY.js → face-scheme-DAD-mXzM.js} +4 -4
- package/dist/_chunks/{face-scheme-C-5V3MsY.js.map → face-scheme-DAD-mXzM.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-CHv2winC.js → fetal-weight-DycD_Vqr.js} +2 -2
- package/dist/_chunks/{fetal-weight-CHv2winC.js.map → fetal-weight-DycD_Vqr.js.map} +1 -1
- package/dist/_chunks/{field-array-dSkD_ePA.js → field-array-BJYc1xSu.js} +2 -2
- package/dist/_chunks/{field-array-dSkD_ePA.js.map → field-array-BJYc1xSu.js.map} +1 -1
- package/dist/_chunks/{file-manager-C8bdHsYy.js → file-manager-G0t8MWbE.js} +6 -6
- package/dist/_chunks/{file-manager-C8bdHsYy.js.map → file-manager-G0t8MWbE.js.map} +1 -1
- package/dist/_chunks/{fiscal-code-input-BSWwda0C.js → fiscal-code-input-DwHb2nVW.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-BSWwda0C.js.map → fiscal-code-input-DwHb2nVW.js.map} +1 -1
- package/dist/_chunks/{forgot-password-form-CGWV5Q1-.js → forgot-password-form-CgZkEvZy.js} +4 -4
- package/dist/_chunks/{forgot-password-form-CGWV5Q1-.js.map → forgot-password-form-CgZkEvZy.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-DjjVPC-5.js → freemium-paywall-r-z48YaT.js} +2 -2
- package/dist/_chunks/{freemium-paywall-DjjVPC-5.js.map → freemium-paywall-r-z48YaT.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-BLccWS_4.js → gestational-age-calculator-BnCAL5a-.js} +5 -5
- package/dist/_chunks/{gestational-age-calculator-BLccWS_4.js.map → gestational-age-calculator-BnCAL5a-.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-CnrY2OVu.js → hcg-doubling-DVDiqFyp.js} +2 -2
- package/dist/_chunks/{hcg-doubling-CnrY2OVu.js.map → hcg-doubling-DVDiqFyp.js.map} +1 -1
- package/dist/_chunks/{header-BVHAt7Fi.js → header-_TppWBpK.js} +2 -2
- package/dist/_chunks/{header-BVHAt7Fi.js.map → header-_TppWBpK.js.map} +1 -1
- package/dist/_chunks/{header-settings-C200bKyp.js → header-settings-BSH9Gk0J.js} +3 -3
- package/dist/_chunks/{header-settings-C200bKyp.js.map → header-settings-BSH9Gk0J.js.map} +1 -1
- package/dist/_chunks/{heatmap-CRMr7VWC.js → heatmap-Bb0-M88T.js} +4 -4
- package/dist/_chunks/{heatmap-CRMr7VWC.js.map → heatmap-Bb0-M88T.js.map} +1 -1
- package/dist/_chunks/{help-me-write-templates-C9T8-DcT.js → help-me-write-templates-DFmqnsAa.js} +4 -4
- package/dist/_chunks/{help-me-write-templates-C9T8-DcT.js.map → help-me-write-templates-DFmqnsAa.js.map} +1 -1
- package/dist/_chunks/{hover-card-DbTmj-ea.js → hover-card-CTNhQXWS.js} +2 -2
- package/dist/_chunks/{hover-card-DbTmj-ea.js.map → hover-card-CTNhQXWS.js.map} +1 -1
- package/dist/_chunks/{icon-button-dNE6ENLn.js → icon-button-C_1TgRiK.js} +2 -2
- package/dist/_chunks/{icon-button-dNE6ENLn.js.map → icon-button-C_1TgRiK.js.map} +1 -1
- package/dist/_chunks/{icon-button-group-Du8IvZek.js → icon-button-group-NIHji7_y.js} +2 -2
- package/dist/_chunks/{icon-button-group-Du8IvZek.js.map → icon-button-group-NIHji7_y.js.map} +1 -1
- package/dist/_chunks/{icon-picker-D5NdDbCL.js → icon-picker-Dq4O32K8.js} +2 -2
- package/dist/_chunks/{icon-picker-D5NdDbCL.js.map → icon-picker-Dq4O32K8.js.map} +1 -1
- package/dist/_chunks/{info-tip-DObdz3w3.js → info-tip-cYszyg6h.js} +2 -2
- package/dist/_chunks/{info-tip-DObdz3w3.js.map → info-tip-cYszyg6h.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-BNYHAZwD.js → key-value-pair-BscGwZsJ.js} +2 -2
- package/dist/_chunks/{key-value-pair-BNYHAZwD.js.map → key-value-pair-BscGwZsJ.js.map} +1 -1
- package/dist/_chunks/{kit-extensions-DI2nHVNw.js → kit-extensions-RnddkrXn.js} +6 -6
- package/dist/_chunks/{kit-extensions-DI2nHVNw.js.map → kit-extensions-RnddkrXn.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-DvhzS6lu.js → link-cell-renderer-dtEYlxi2.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-DvhzS6lu.js.map → link-cell-renderer-dtEYlxi2.js.map} +1 -1
- package/dist/_chunks/{locale-picker-Bu4YE5b2.js → locale-picker-CeveTnDK.js} +3 -3
- package/dist/_chunks/{locale-picker-Bu4YE5b2.js.map → locale-picker-CeveTnDK.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-DwWWHclZ.js → login-dev-card-PnADNcI9.js} +3 -3
- package/dist/_chunks/{login-dev-card-DwWWHclZ.js.map → login-dev-card-PnADNcI9.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-p6hPgVwy.js → marketplace-app-shell-C-2e4eCD.js} +139 -136
- package/dist/_chunks/marketplace-app-shell-C-2e4eCD.js.map +1 -0
- package/dist/_chunks/{message-card-CvZlo3Fn.js → message-card-A3mJNqfy.js} +2 -2
- package/dist/_chunks/{message-card-CvZlo3Fn.js.map → message-card-A3mJNqfy.js.map} +1 -1
- package/dist/_chunks/{message-tray-DrS_LOed.js → message-tray-Ft6vSr71.js} +3 -3
- package/dist/_chunks/{message-tray-DrS_LOed.js.map → message-tray-Ft6vSr71.js.map} +1 -1
- package/dist/_chunks/{multi-select-BT23EnSA.js → multi-select-CMaAQQgb.js} +2 -2
- package/dist/_chunks/{multi-select-BT23EnSA.js.map → multi-select-CMaAQQgb.js.map} +1 -1
- package/dist/_chunks/{note-attachment-Bt2cddsZ.js → note-attachment-DoVWvjWR.js} +2 -2
- package/dist/_chunks/{note-attachment-Bt2cddsZ.js.map → note-attachment-DoVWvjWR.js.map} +1 -1
- package/dist/_chunks/{note-timeline-CX9nAgAR.js → note-timeline-B7l3t5DZ.js} +2 -2
- package/dist/_chunks/{note-timeline-CX9nAgAR.js.map → note-timeline-B7l3t5DZ.js.map} +1 -1
- package/dist/_chunks/{notes-panel-6TElt7jQ.js → notes-panel-CTmvrqQn.js} +7 -7
- package/dist/_chunks/{notes-panel-6TElt7jQ.js.map → notes-panel-CTmvrqQn.js.map} +1 -1
- package/dist/_chunks/{notification-card-Qrs52HIA.js → notification-card-c2oX8j3F.js} +2 -2
- package/dist/_chunks/{notification-card-Qrs52HIA.js.map → notification-card-c2oX8j3F.js.map} +1 -1
- package/dist/_chunks/{notification-tray-DRm1z97G.js → notification-tray-BR3seWA7.js} +3 -3
- package/dist/_chunks/{notification-tray-DRm1z97G.js.map → notification-tray-BR3seWA7.js.map} +1 -1
- package/dist/_chunks/{operator-hero-C_Khr5IU.js → operator-hero-3_RG4Dkj.js} +2 -2
- package/dist/_chunks/{operator-hero-C_Khr5IU.js.map → operator-hero-3_RG4Dkj.js.map} +1 -1
- package/dist/_chunks/{optical-prescription-DLIAhJ6f.js → optical-prescription-CxfMsbxi.js} +2 -2
- package/dist/_chunks/{optical-prescription-DLIAhJ6f.js.map → optical-prescription-CxfMsbxi.js.map} +1 -1
- package/dist/_chunks/{panel-header-D_mTdhUp.js → panel-header-BJkaUwnl.js} +2 -2
- package/dist/_chunks/{panel-header-D_mTdhUp.js.map → panel-header-BJkaUwnl.js.map} +1 -1
- package/dist/_chunks/{panel-subview-CjZgdWwO.js → panel-subview-yP4qIbKS.js} +3 -3
- package/dist/_chunks/{panel-subview-CjZgdWwO.js.map → panel-subview-yP4qIbKS.js.map} +1 -1
- package/dist/_chunks/{patient-details-BjqKBY2x.js → patient-details-BNDS69Zx.js} +4 -4
- package/dist/_chunks/{patient-details-BjqKBY2x.js.map → patient-details-BNDS69Zx.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-BiI0BPPK.js → patient-field-row-BLBi-PjO.js} +7 -7
- package/dist/_chunks/{patient-field-row-BiI0BPPK.js.map → patient-field-row-BLBi-PjO.js.map} +1 -1
- package/dist/_chunks/{patient-search-B5R7FyFO.js → patient-search-DOnDUVsl.js} +2 -2
- package/dist/_chunks/{patient-search-B5R7FyFO.js.map → patient-search-DOnDUVsl.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-BOgnWKRV.js → patient-summary-card-T9umuZJF.js} +8 -8
- package/dist/_chunks/{patient-summary-card-BOgnWKRV.js.map → patient-summary-card-T9umuZJF.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-39d5ykBi.js → payment-automation-upsell-C8MEu0t6.js} +4 -4
- package/dist/_chunks/{payment-automation-upsell-39d5ykBi.js.map → payment-automation-upsell-C8MEu0t6.js.map} +1 -1
- package/dist/_chunks/{payment-form-v6zZuV1_.js → payment-form-i90DUuNK.js} +2 -2
- package/dist/_chunks/{payment-form-v6zZuV1_.js.map → payment-form-i90DUuNK.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-E3G4aVt6.js → payment-request-card-BmzNMY2a.js} +4 -4
- package/dist/_chunks/{payment-request-card-E3G4aVt6.js.map → payment-request-card-BmzNMY2a.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer-CNQxa4tv.js → pdf-viewer-DJ9VN7cu.js} +2 -2
- package/dist/_chunks/{pdf-viewer-CNQxa4tv.js.map → pdf-viewer-DJ9VN7cu.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-BZ1d6S36.js → periodontal-chart-DCcOEYC6.js} +2 -2
- package/dist/_chunks/{periodontal-chart-BZ1d6S36.js.map → periodontal-chart-DCcOEYC6.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-BE5hiQnn.js → periodontal-chart-card-CxdjXFb3.js} +3 -3
- package/dist/_chunks/{periodontal-chart-card-BE5hiQnn.js.map → periodontal-chart-card-CxdjXFb3.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-6wybid_W.js → periodontal-diagnosis-B9YmmVmM.js} +5 -5
- package/dist/_chunks/{periodontal-diagnosis-6wybid_W.js.map → periodontal-diagnosis-B9YmmVmM.js.map} +1 -1
- package/dist/_chunks/{periodontal-risk-chart-CgLwBj5c.js → periodontal-risk-chart-CPy7CNFe.js} +2 -2
- package/dist/_chunks/{periodontal-risk-chart-CgLwBj5c.js.map → periodontal-risk-chart-CPy7CNFe.js.map} +1 -1
- package/dist/_chunks/{permission-matrix-DuTkUHxe.js → permission-matrix-BoQjENGV.js} +3 -3
- package/dist/_chunks/{permission-matrix-DuTkUHxe.js.map → permission-matrix-BoQjENGV.js.map} +1 -1
- package/dist/_chunks/{popover-DQr_tljb.js → popover-4ZVtH_At.js} +2 -2
- package/dist/_chunks/{popover-DQr_tljb.js.map → popover-4ZVtH_At.js.map} +1 -1
- package/dist/_chunks/{practice-profile-hero-DPbvYfCs.js → practice-profile-hero-Dfc0F60y.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-DPbvYfCs.js.map → practice-profile-hero-Dfc0F60y.js.map} +1 -1
- package/dist/_chunks/{practice-results-Cktx7KaC.js → practice-results-B8L9ZmtR.js} +4 -4
- package/dist/_chunks/{practice-results-Cktx7KaC.js.map → practice-results-B8L9ZmtR.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-26fcvhAx.js → pregnancy-dating-D2XTELiw.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-26fcvhAx.js.map → pregnancy-dating-D2XTELiw.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-D8q1IUCT.js → pregnancy-weight-gain-BVvyL-j1.js} +4 -4
- package/dist/_chunks/{pregnancy-weight-gain-D8q1IUCT.js.map → pregnancy-weight-gain-BVvyL-j1.js.map} +1 -1
- package/dist/_chunks/{privacy-lock-BpVgSgMb.js → privacy-lock-CEYJ8ehu.js} +2 -2
- package/dist/_chunks/{privacy-lock-BpVgSgMb.js.map → privacy-lock-CEYJ8ehu.js.map} +1 -1
- package/dist/_chunks/{privacy-mask-BfMC57ST.js → privacy-mask-Ch7743uk.js} +2 -2
- package/dist/_chunks/{privacy-mask-BfMC57ST.js.map → privacy-mask-Ch7743uk.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-CH4B49ij.js → product-hub-panel-D-UELdo0.js} +2 -2
- package/dist/_chunks/{product-hub-panel-CH4B49ij.js.map → product-hub-panel-D-UELdo0.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-BHTDKMsw.js → public-header.agent-DXRA7ebK.js} +3 -3
- package/dist/_chunks/{public-header.agent-BHTDKMsw.js.map → public-header.agent-DXRA7ebK.js.map} +1 -1
- package/dist/_chunks/{radio-BBbMdbE_.js → radio-BZQs6_36.js} +2 -2
- package/dist/_chunks/{radio-BBbMdbE_.js.map → radio-BZQs6_36.js.map} +1 -1
- package/dist/_chunks/{radio-group-DicxWJXP.js → radio-group-ChIKyeSJ.js} +3 -3
- package/dist/_chunks/{radio-group-DicxWJXP.js.map → radio-group-ChIKyeSJ.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-DR0gOeSc.js → radiograph-panel.agent-DDNUo4Ul.js} +4 -4
- package/dist/_chunks/{radiograph-panel.agent-DR0gOeSc.js.map → radiograph-panel.agent-DDNUo4Ul.js.map} +1 -1
- package/dist/_chunks/{registration-form-B8IeB9kd.js → registration-form-BQyT_kBX.js} +5 -5
- package/dist/_chunks/{registration-form-B8IeB9kd.js.map → registration-form-BQyT_kBX.js.map} +1 -1
- package/dist/_chunks/{resource-chip-DQeCJzJf.js → resource-chip-DB5jDwUO.js} +2 -2
- package/dist/_chunks/{resource-chip-DQeCJzJf.js.map → resource-chip-DB5jDwUO.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-CHzDqerd.js → reviews-panel-AvsVgtJu.js} +3 -3
- package/dist/_chunks/{reviews-panel-CHzDqerd.js.map → reviews-panel-AvsVgtJu.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-BRuTo2hm.js → rich-text-editor-M2gT_E7f.js} +9 -9
- package/dist/_chunks/{rich-text-editor-BRuTo2hm.js.map → rich-text-editor-M2gT_E7f.js.map} +1 -1
- package/dist/_chunks/{sheet-CqvPYNLn.js → sheet-D2PfJl8n.js} +2 -2
- package/dist/_chunks/{sheet-CqvPYNLn.js.map → sheet-D2PfJl8n.js.map} +1 -1
- package/dist/_chunks/{sidebar-C9Zof0z1.js → sidebar-BS24EnYd.js} +2 -2
- package/dist/_chunks/{sidebar-C9Zof0z1.js.map → sidebar-BS24EnYd.js.map} +1 -1
- package/dist/_chunks/{sign-document-D4iHS_Ug.js → sign-document-CY7xTXbm.js} +2 -2
- package/dist/_chunks/{sign-document-D4iHS_Ug.js.map → sign-document-CY7xTXbm.js.map} +1 -1
- package/dist/_chunks/{signature-request-BH7yKI01.js → signature-request-BMCHy2ZO.js} +5 -5
- package/dist/_chunks/{signature-request-BH7yKI01.js.map → signature-request-BMCHy2ZO.js.map} +1 -1
- package/dist/_chunks/{signature-status-chip-DP3qRijv.js → signature-status-chip-pIoQjvH8.js} +3 -3
- package/dist/_chunks/{signature-status-chip-DP3qRijv.js.map → signature-status-chip-pIoQjvH8.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-eaOWHpDr.js → signed-out-frame-D5DzqATh.js} +3 -3
- package/dist/_chunks/{signed-out-frame-eaOWHpDr.js.map → signed-out-frame-D5DzqATh.js.map} +1 -1
- package/dist/_chunks/{slot-grid-DELa2Nwz.js → slot-grid-dj5f6R2w.js} +2 -2
- package/dist/_chunks/{slot-grid-DELa2Nwz.js.map → slot-grid-dj5f6R2w.js.map} +1 -1
- package/dist/_chunks/{stat-DmjGfXND.js → stat-D2PNJujA.js} +2 -2
- package/dist/_chunks/stat-D2PNJujA.js.map +1 -0
- package/dist/_chunks/{streaming-text-bPDoG7Y3.js → streaming-text-zFViGexf.js} +2 -2
- package/dist/_chunks/{streaming-text-bPDoG7Y3.js.map → streaming-text-zFViGexf.js.map} +1 -1
- package/dist/_chunks/{tab-bar-5GppbMGc.js → tab-bar-BEODTG6k.js} +2 -2
- package/dist/_chunks/{tab-bar-5GppbMGc.js.map → tab-bar-BEODTG6k.js.map} +1 -1
- package/dist/_chunks/{tag-CS5cXpfx.js → tag-DOZGz0fT.js} +2 -2
- package/dist/_chunks/{tag-CS5cXpfx.js.map → tag-DOZGz0fT.js.map} +1 -1
- package/dist/_chunks/{task-card-zaTU1rQa.js → task-card-BS7Uqevr.js} +2 -2
- package/dist/_chunks/{task-card-zaTU1rQa.js.map → task-card-BS7Uqevr.js.map} +1 -1
- package/dist/_chunks/{task-editor-CgGcg-2c.js → task-editor-DoiOzNiC.js} +9 -9
- package/dist/_chunks/{task-editor-CgGcg-2c.js.map → task-editor-DoiOzNiC.js.map} +1 -1
- package/dist/_chunks/{task-tray-DGMwogWu.js → task-tray-eQU4KJcA.js} +3 -3
- package/dist/_chunks/{task-tray-DGMwogWu.js.map → task-tray-eQU4KJcA.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-xGtiEdcj.js → tasks-panel-8nLwBw6P.js} +7 -7
- package/dist/_chunks/{tasks-panel-xGtiEdcj.js.map → tasks-panel-8nLwBw6P.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-_cfYEK73.js → theme-toggle-Ctb77x6O.js} +3 -3
- package/dist/_chunks/{theme-toggle-_cfYEK73.js.map → theme-toggle-Ctb77x6O.js.map} +1 -1
- package/dist/_chunks/{toast-CNUydTgT.js → toast-6T519aLz.js} +2 -2
- package/dist/_chunks/{toast-CNUydTgT.js.map → toast-6T519aLz.js.map} +1 -1
- package/dist/_chunks/tool-rail-C-03rH2I.js +973 -0
- package/dist/_chunks/tool-rail-C-03rH2I.js.map +1 -0
- package/dist/_chunks/tooltip-uEBdD1-5.js +178 -0
- package/dist/_chunks/tooltip-uEBdD1-5.js.map +1 -0
- package/dist/_chunks/{tooth-scheme-05DsRMA5.js → tooth-scheme-Dkh4JwzT.js} +2 -2
- package/dist/_chunks/{tooth-scheme-05DsRMA5.js.map → tooth-scheme-Dkh4JwzT.js.map} +1 -1
- package/dist/_chunks/{transcript-panel-CjsiDB1K.js → transcript-panel-XudW5l6l.js} +2 -2
- package/dist/_chunks/{transcript-panel-CjsiDB1K.js.map → transcript-panel-XudW5l6l.js.map} +1 -1
- package/dist/_chunks/{treatment-receipt-BSVOfStA.js → treatment-receipt-BdJ36vNP.js} +3 -3
- package/dist/_chunks/{treatment-receipt-BSVOfStA.js.map → treatment-receipt-BdJ36vNP.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-BGVthJFx.js → use-appointment-details-read-Gu0ehyxj.js} +16 -16
- package/dist/_chunks/{use-appointment-details-read-BGVthJFx.js.map → use-appointment-details-read-Gu0ehyxj.js.map} +1 -1
- package/dist/_chunks/use-edge-resize-CBtem0j2.js +171 -0
- package/dist/_chunks/use-edge-resize-CBtem0j2.js.map +1 -0
- package/dist/_chunks/{voice-control-panel-DyKEaFxt.js → voice-control-panel-C0BfY23Y.js} +4 -4
- package/dist/_chunks/{voice-control-panel-DyKEaFxt.js.map → voice-control-panel-C0BfY23Y.js.map} +1 -1
- package/dist/_chunks/{warning-stack-CAL9xVo1.js → warning-stack-HYWAytZV.js} +3 -3
- package/dist/_chunks/{warning-stack-CAL9xVo1.js.map → warning-stack-HYWAytZV.js.map} +1 -1
- package/dist/_chunks/{widget-picker-CkhoG4Rj.js → widget-picker-DlNPGcnu.js} +2 -2
- package/dist/_chunks/{widget-picker-CkhoG4Rj.js.map → widget-picker-DlNPGcnu.js.map} +1 -1
- package/dist/_chunks/{workflow-map-BUYG1oXU.js → workflow-map-C2B2qIr1.js} +5 -5
- package/dist/_chunks/{workflow-map-BUYG1oXU.js.map → workflow-map-C2B2qIr1.js.map} +1 -1
- package/dist/agent-catalog.json +13 -1
- package/dist/agent-i18n/en.json +10 -0
- package/dist/components/_shared/use-apex-legend-scroll.d.ts +7 -0
- package/dist/components/_shared/use-apex-legend-scroll.d.ts.map +1 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/app-frame/app-frame-context.d.ts +19 -0
- package/dist/components/app-frame/app-frame-context.d.ts.map +1 -0
- package/dist/components/app-frame/app-frame.d.ts +3 -0
- package/dist/components/app-frame/app-frame.d.ts.map +1 -1
- package/dist/components/app-frame/index.d.ts +2 -0
- package/dist/components/app-frame/index.d.ts.map +1 -1
- package/dist/components/app-frame/index.js +4 -2
- package/dist/components/app-frame/index.js.map +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/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/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/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/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/chart.d.ts +3 -1
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/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/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/control-room-context.d.ts +10 -4
- package/dist/components/control-room-rail/control-room-context.d.ts.map +1 -1
- package/dist/components/control-room-rail/control-room-rail.agent.d.ts.map +1 -1
- package/dist/components/control-room-rail/control-room-rail.d.ts.map +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.d.ts.map +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dev-bypass-button/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/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/heatmap/index.js +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/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/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/panel-header/index.js +1 -1
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/patient-details/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/patient-table/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/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-profile-hero/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/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/resource-chip/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +7 -2
- package/dist/components/stat/stat.d.ts.map +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.agent.d.ts.map +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts +7 -0
- package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-edge-resize.d.ts +5 -1
- package/dist/hooks/use-edge-resize.d.ts.map +1 -1
- package/dist/index.js +778 -776
- package/dist/index.js.map +1 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +3 -0
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts.map +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +8 -1
- package/package.json +1 -1
- package/dist/_chunks/app-frame-CqmDh2v5.js +0 -134
- package/dist/_chunks/app-frame-CqmDh2v5.js.map +0 -1
- package/dist/_chunks/chart-D7PbNO_M.js +0 -920
- package/dist/_chunks/chart-D7PbNO_M.js.map +0 -1
- package/dist/_chunks/control-room-rail-BbBEIdws.js +0 -379
- package/dist/_chunks/control-room-rail-BbBEIdws.js.map +0 -1
- package/dist/_chunks/dashboard-grid-DRnhIlT-.js.map +0 -1
- package/dist/_chunks/marketplace-app-shell-p6hPgVwy.js.map +0 -1
- package/dist/_chunks/stat-DmjGfXND.js.map +0 -1
- package/dist/_chunks/tool-rail-Blgibz0a.js +0 -816
- package/dist/_chunks/tool-rail-Blgibz0a.js.map +0 -1
- package/dist/_chunks/tooltip-Cp-PLePW.js +0 -119
- package/dist/_chunks/tooltip-Cp-PLePW.js.map +0 -1
- package/dist/_chunks/use-edge-resize-DHbyQwu8.js +0 -149
- package/dist/_chunks/use-edge-resize-DHbyQwu8.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale-picker-Bu4YE5b2.js","sources":["../../src/components/flag/flag-core.ts","../../src/i18n/locale-meta.ts","../../src/components/locale-picker/locale-picker.agent.ts","../../src/components/locale-picker/locale-picker.tsx"],"sourcesContent":["import { createElement, forwardRef } from 'react';\nimport {\n FlagView,\n flagClasses,\n safeFlagGlob,\n type FlagAssetMap,\n} from './flag-view';\nimport type { FlagProps } from './flag';\n\n/* ------------------------------------------------------------------ */\n/* CoreFlag — the locale-chrome flag binding. */\n/* */\n/* Identical component to `Flag` (same props, same FlagView, same DOM, */\n/* same synchronous paint) bound to a SUBSET of the asset set: only the */\n/* countries the kit's own locale chrome can ever ask for. */\n/* */\n/* Why it exists: LocalePicker ships inside HeaderSettings, which ships */\n/* inside MarketplaceAppShell, which is on every route of every */\n/* consumer — including login screens. Importing `Flag` there pulled */\n/* all 530 inlined SVGs (485,552 B of chunk) onto pages that offer a */\n/* three-item language menu. This binding pulls 36 (29,183 B). */\n/* */\n/* The glob pattern below MUST list every `LOCALE_META[…].countryCode`. */\n/* `flag.test.tsx` asserts that (it fails if a locale is added to */\n/* `src/i18n/locale-meta.ts` without its flag), so the two can't drift. */\n/* */\n/* Both patterns are spelled out as string literals (rather than built */\n/* from a shared constant) because `import.meta.glob` is a build macro: */\n/* Vite reads the pattern off the AST, so it must be a literal — an */\n/* interpolated template silently matches nothing. */\n/* ------------------------------------------------------------------ */\n\nconst CORE_RECTANGLE_URL_MAP: FlagAssetMap = safeFlagGlob(() =>\n import.meta.glob<string>(\n '/node_modules/country-flag-icons/3x2/{AL,CN,DE,ES,FR,GB,GR,IN,IT,JP,NL,PL,PT,RO,RU,SA,SE,TR}.svg',\n { query: '?url', import: 'default', eager: true },\n ),\n);\n\nconst CORE_SQUARE_URL_MAP: FlagAssetMap = safeFlagGlob(() =>\n import.meta.glob<string>(\n '/node_modules/country-flag-icons/1x1/{AL,CN,DE,ES,FR,GB,GR,IN,IT,JP,NL,PL,PT,RO,RU,SA,SE,TR}.svg',\n { query: '?url', import: 'default', eager: true },\n ),\n);\n\n/** Country codes bundled with `CoreFlag`. Subset of `FLAG_COUNTRIES`. */\nexport const CORE_FLAG_COUNTRIES: readonly string[] = Object.freeze(\n Object.keys(CORE_RECTANGLE_URL_MAP).sort(),\n);\n\n/** Does `CoreFlag` bundle an asset for this country code? Case-insensitive. */\nexport function hasCoreFlag(country: string): boolean {\n return country.toUpperCase() in CORE_RECTANGLE_URL_MAP;\n}\n\n/**\n * `Flag` restricted to the kit's own locale set. Internal — not exported\n * from `index.ts` or the root barrel. Renders `FlagView` with no JSX so\n * this file stays a `.ts` module alongside the glob it owns.\n */\nexport const CoreFlag = forwardRef<HTMLElement, FlagProps>(\n (\n {\n country,\n label,\n shape = 'rectangle',\n size = 'sm',\n rounded = 'sm',\n className,\n ...rest\n },\n ref,\n ) => {\n const code = country.toUpperCase();\n const urlMap =\n shape === 'square' ? CORE_SQUARE_URL_MAP : CORE_RECTANGLE_URL_MAP;\n\n return createElement(FlagView, {\n ref,\n code,\n src: urlMap[code],\n label,\n className: flagClasses({ shape, size, rounded }, className),\n ...rest,\n });\n },\n);\n\nCoreFlag.displayName = 'CoreFlag';\n","/* -------------------------------------------------------------------- */\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 `./supported-locales` */\n/* 1:1; the `locale-meta.test.ts` parity check fails the build if a code */\n/* is 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 './supported-locales';\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 // Persists a single locale choice via the handle's `setLocale` → set_value.\n capabilities: ['set_value'],\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.localePicker.state.locale',\n description:\n 'Resolved IETF tag of the locale currently applied to the page. Read this after `set_locale` — the setter silently drops tags the kit ships no bundle for, so this is the only confirmation the switch landed.',\n read: (handle) => handle.getLocale(),\n },\n isSystemDefault: {\n type: 'boolean',\n descriptionKey: 'ui.agent.localePicker.state.isSystemDefault',\n description:\n 'True when the resolved locale came from `navigator.language` rather than an explicit user choice. Distinguishes \"the user chose English\" from \"we are following the browser, which happens to be English\" — a distinction the resolved tag alone destroys.',\n read: (handle) => handle.getIsSystemDefault(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\"). Unsupported tags are a no-op.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.localePicker.actions.setLocale',\n description:\n 'Switch the active locale to the given IETF tag. Unsupported tags are a silent no-op — read the `locale` state slot afterwards to confirm the switch landed.',\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\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 { CoreFlag, hasCoreFlag } from '../flag/flag-core';\nimport { MENU_ROW_HIGHLIGHT } from '../_shared/menu-row';\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 useInitialLocale();\n\n return { locale, isSystemDefault, setLocale };\n}\n\n/**\n * Applies the stored locale, or else the browser's, once per app lifecycle.\n * Every locale surface calls it on mount (the picker, and HeaderSettings,\n * whose search list only mounts when its flyout opens), so the page starts\n * in the right language and direction whichever one the host renders.\n */\nexport function useInitialLocale(): void {\n const { locale: rawLocale, setLocale: setLocaleI18n } = useLocale();\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\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\nconst localeRowClasses = [\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 MENU_ROW_HIGHLIGHT.selected,\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\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 /** Resolved locale tag actually applied to the page (always concrete). */\n getLocale: () => string;\n /**\n * True when the resolved locale came from `navigator.language` rather\n * than an explicit user choice. Read-back for `set_locale`: the\n * resolved tag alone cannot tell \"the user chose English\" from\n * \"we are following the browser, which happens to be English\".\n */\n getIsSystemDefault: () => boolean;\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('ui');\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={localeRowClasses}\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={localeRowClasses}\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 {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n /* hasCoreFlag 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('ui');\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 {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\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('ui');\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 {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\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 // Read-back for `set_locale` — the setter swallows unsupported\n // tags, so these are the only way an agent can tell a switch\n // landed from one that was dropped.\n getLocale: () => stateRef.current.locale,\n getIsSystemDefault: () => stateRef.current.isSystemDefault,\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":["CORE_RECTANGLE_URL_MAP","safeFlagGlob","__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6","__vite_glob_0_7","__vite_glob_0_8","__vite_glob_0_9","__vite_glob_0_10","__vite_glob_0_11","__vite_glob_0_12","__vite_glob_0_13","__vite_glob_0_14","__vite_glob_0_15","__vite_glob_0_16","__vite_glob_0_17","CORE_SQUARE_URL_MAP","__vite_glob_1_0","__vite_glob_1_1","__vite_glob_1_2","__vite_glob_1_3","__vite_glob_1_4","__vite_glob_1_5","__vite_glob_1_6","__vite_glob_1_7","__vite_glob_1_8","__vite_glob_1_9","__vite_glob_1_10","__vite_glob_1_11","__vite_glob_1_12","__vite_glob_1_13","__vite_glob_1_14","__vite_glob_1_15","__vite_glob_1_16","__vite_glob_1_17","hasCoreFlag","country","CoreFlag","forwardRef","label","shape","size","rounded","className","rest","ref","code","createElement","FlagView","flagClasses","LOCALE_META","LOCALES_WITH_BUNDLES","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","useInitialLocale","useEffect","stored","wrapperVariants","cva","compactTriggerClasses","popoverContentClasses","localeRowClasses","MENU_ROW_HIGHLIGHT","searchListVariants","LocalePickerSearchList","valueProp","onValueChange","inputIdProp","disabled","loading","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","IconTrigger","state","forwardedRef","popoverSide","Popover","IconButton","CompactTrigger","LocalePickerRoot","props","variant","id","useMemo","useRef","useImperativeHandle","stateRef","agentHandle","useAgentRegistration","LocalePicker"],"mappings":";;;;;;;;;;;;;;;;AAgCA,MAAMA,IAAuCC;AAAA,EAAa,MACxD,uBAAA,OAAA;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,EAAA,CAAA;AAIF,GAEMC,KAAoCnB;AAAA,EAAa,MACrD,uBAAA,OAAA;AAAA,IAAA,+CAAAoB;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,I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;AAAA,MAAA;AAAA,QACC,OAAAL;AAAA,QACA,MAAAlF;AAAA,QACA,cAAAmF;AAAA,QACA,WAAApF;AAAA,QACA,UAAAuD;AAAA,QACA,SAAAC;AAAA,QACA,aAAA6B;AAAA,MAAA;AAAA,IAAA,IAKJ,gBAAAjB;AAAA,MAACc;AAAA,MAAA;AAAA,QACC,OAAAC;AAAA,QACA,MAAAlF;AAAA,QACA,cAAAmF;AAAA,QACA,WAAApF;AAAA,QACA,UAAAuD;AAAA,QACA,SAAAC;AAAA,QACA,aAAA6B;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAI,EAAiB,cAAc;AAExB,MAAMU,KAAe,OAAO,OAAOV,GAAkB;AAAA,EAC1D,YAAYtC;AACd,CAAC;"}
|
|
1
|
+
{"version":3,"file":"locale-picker-CeveTnDK.js","sources":["../../src/components/flag/flag-core.ts","../../src/i18n/locale-meta.ts","../../src/components/locale-picker/locale-picker.agent.ts","../../src/components/locale-picker/locale-picker.tsx"],"sourcesContent":["import { createElement, forwardRef } from 'react';\nimport {\n FlagView,\n flagClasses,\n safeFlagGlob,\n type FlagAssetMap,\n} from './flag-view';\nimport type { FlagProps } from './flag';\n\n/* ------------------------------------------------------------------ */\n/* CoreFlag — the locale-chrome flag binding. */\n/* */\n/* Identical component to `Flag` (same props, same FlagView, same DOM, */\n/* same synchronous paint) bound to a SUBSET of the asset set: only the */\n/* countries the kit's own locale chrome can ever ask for. */\n/* */\n/* Why it exists: LocalePicker ships inside HeaderSettings, which ships */\n/* inside MarketplaceAppShell, which is on every route of every */\n/* consumer — including login screens. Importing `Flag` there pulled */\n/* all 530 inlined SVGs (485,552 B of chunk) onto pages that offer a */\n/* three-item language menu. This binding pulls 36 (29,183 B). */\n/* */\n/* The glob pattern below MUST list every `LOCALE_META[…].countryCode`. */\n/* `flag.test.tsx` asserts that (it fails if a locale is added to */\n/* `src/i18n/locale-meta.ts` without its flag), so the two can't drift. */\n/* */\n/* Both patterns are spelled out as string literals (rather than built */\n/* from a shared constant) because `import.meta.glob` is a build macro: */\n/* Vite reads the pattern off the AST, so it must be a literal — an */\n/* interpolated template silently matches nothing. */\n/* ------------------------------------------------------------------ */\n\nconst CORE_RECTANGLE_URL_MAP: FlagAssetMap = safeFlagGlob(() =>\n import.meta.glob<string>(\n '/node_modules/country-flag-icons/3x2/{AL,CN,DE,ES,FR,GB,GR,IN,IT,JP,NL,PL,PT,RO,RU,SA,SE,TR}.svg',\n { query: '?url', import: 'default', eager: true },\n ),\n);\n\nconst CORE_SQUARE_URL_MAP: FlagAssetMap = safeFlagGlob(() =>\n import.meta.glob<string>(\n '/node_modules/country-flag-icons/1x1/{AL,CN,DE,ES,FR,GB,GR,IN,IT,JP,NL,PL,PT,RO,RU,SA,SE,TR}.svg',\n { query: '?url', import: 'default', eager: true },\n ),\n);\n\n/** Country codes bundled with `CoreFlag`. Subset of `FLAG_COUNTRIES`. */\nexport const CORE_FLAG_COUNTRIES: readonly string[] = Object.freeze(\n Object.keys(CORE_RECTANGLE_URL_MAP).sort(),\n);\n\n/** Does `CoreFlag` bundle an asset for this country code? Case-insensitive. */\nexport function hasCoreFlag(country: string): boolean {\n return country.toUpperCase() in CORE_RECTANGLE_URL_MAP;\n}\n\n/**\n * `Flag` restricted to the kit's own locale set. Internal — not exported\n * from `index.ts` or the root barrel. Renders `FlagView` with no JSX so\n * this file stays a `.ts` module alongside the glob it owns.\n */\nexport const CoreFlag = forwardRef<HTMLElement, FlagProps>(\n (\n {\n country,\n label,\n shape = 'rectangle',\n size = 'sm',\n rounded = 'sm',\n className,\n ...rest\n },\n ref,\n ) => {\n const code = country.toUpperCase();\n const urlMap =\n shape === 'square' ? CORE_SQUARE_URL_MAP : CORE_RECTANGLE_URL_MAP;\n\n return createElement(FlagView, {\n ref,\n code,\n src: urlMap[code],\n label,\n className: flagClasses({ shape, size, rounded }, className),\n ...rest,\n });\n },\n);\n\nCoreFlag.displayName = 'CoreFlag';\n","/* -------------------------------------------------------------------- */\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 `./supported-locales` */\n/* 1:1; the `locale-meta.test.ts` parity check fails the build if a code */\n/* is 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 './supported-locales';\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 // Persists a single locale choice via the handle's `setLocale` → set_value.\n capabilities: ['set_value'],\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.localePicker.state.locale',\n description:\n 'Resolved IETF tag of the locale currently applied to the page. Read this after `set_locale` — the setter silently drops tags the kit ships no bundle for, so this is the only confirmation the switch landed.',\n read: (handle) => handle.getLocale(),\n },\n isSystemDefault: {\n type: 'boolean',\n descriptionKey: 'ui.agent.localePicker.state.isSystemDefault',\n description:\n 'True when the resolved locale came from `navigator.language` rather than an explicit user choice. Distinguishes \"the user chose English\" from \"we are following the browser, which happens to be English\" — a distinction the resolved tag alone destroys.',\n read: (handle) => handle.getIsSystemDefault(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\"). Unsupported tags are a no-op.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.localePicker.actions.setLocale',\n description:\n 'Switch the active locale to the given IETF tag. Unsupported tags are a silent no-op — read the `locale` state slot afterwards to confirm the switch landed.',\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\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 { CoreFlag, hasCoreFlag } from '../flag/flag-core';\nimport { MENU_ROW_HIGHLIGHT } from '../_shared/menu-row';\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 useInitialLocale();\n\n return { locale, isSystemDefault, setLocale };\n}\n\n/**\n * Applies the stored locale, or else the browser's, once per app lifecycle.\n * Every locale surface calls it on mount (the picker, and HeaderSettings,\n * whose search list only mounts when its flyout opens), so the page starts\n * in the right language and direction whichever one the host renders.\n */\nexport function useInitialLocale(): void {\n const { locale: rawLocale, setLocale: setLocaleI18n } = useLocale();\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\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\nconst localeRowClasses = [\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 MENU_ROW_HIGHLIGHT.selected,\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\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 /** Resolved locale tag actually applied to the page (always concrete). */\n getLocale: () => string;\n /**\n * True when the resolved locale came from `navigator.language` rather\n * than an explicit user choice. Read-back for `set_locale`: the\n * resolved tag alone cannot tell \"the user chose English\" from\n * \"we are following the browser, which happens to be English\".\n */\n getIsSystemDefault: () => boolean;\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('ui');\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={localeRowClasses}\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={localeRowClasses}\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 {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n /* hasCoreFlag 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('ui');\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 {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\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('ui');\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 {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\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 // Read-back for `set_locale` — the setter swallows unsupported\n // tags, so these are the only way an agent can tell a switch\n // landed from one that was dropped.\n getLocale: () => stateRef.current.locale,\n getIsSystemDefault: () => stateRef.current.isSystemDefault,\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":["CORE_RECTANGLE_URL_MAP","safeFlagGlob","__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6","__vite_glob_0_7","__vite_glob_0_8","__vite_glob_0_9","__vite_glob_0_10","__vite_glob_0_11","__vite_glob_0_12","__vite_glob_0_13","__vite_glob_0_14","__vite_glob_0_15","__vite_glob_0_16","__vite_glob_0_17","CORE_SQUARE_URL_MAP","__vite_glob_1_0","__vite_glob_1_1","__vite_glob_1_2","__vite_glob_1_3","__vite_glob_1_4","__vite_glob_1_5","__vite_glob_1_6","__vite_glob_1_7","__vite_glob_1_8","__vite_glob_1_9","__vite_glob_1_10","__vite_glob_1_11","__vite_glob_1_12","__vite_glob_1_13","__vite_glob_1_14","__vite_glob_1_15","__vite_glob_1_16","__vite_glob_1_17","hasCoreFlag","country","CoreFlag","forwardRef","label","shape","size","rounded","className","rest","ref","code","createElement","FlagView","flagClasses","LOCALE_META","LOCALES_WITH_BUNDLES","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","useInitialLocale","useEffect","stored","wrapperVariants","cva","compactTriggerClasses","popoverContentClasses","localeRowClasses","MENU_ROW_HIGHLIGHT","searchListVariants","LocalePickerSearchList","valueProp","onValueChange","inputIdProp","disabled","loading","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","IconTrigger","state","forwardedRef","popoverSide","Popover","IconButton","CompactTrigger","LocalePickerRoot","props","variant","id","useMemo","useRef","useImperativeHandle","stateRef","agentHandle","useAgentRegistration","LocalePicker"],"mappings":";;;;;;;;;;;;;;;;AAgCA,MAAMA,IAAuCC;AAAA,EAAa,MACxD,uBAAA,OAAA;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,EAAA,CAAA;AAIF,GAEMC,KAAoCnB;AAAA,EAAa,MACrD,uBAAA,OAAA;AAAA,IAAA,+CAAAoB;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,EAAA,CAAA;AAIF;AAGsD,OAAO;AAAA,EAC3D,OAAO,KAAKtC,CAAsB,EAA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AAA,QACA,UAAAuD;AAAA,QACA,SAAAC;AAAA,QACA,aAAA6B;AAAA,MAAA;AAAA,IAAA,IAKJ,gBAAAjB;AAAA,MAACc;AAAA,MAAA;AAAA,QACC,OAAAC;AAAA,QACA,MAAAlF;AAAA,QACA,cAAAmF;AAAA,QACA,WAAApF;AAAA,QACA,UAAAuD;AAAA,QACA,SAAAC;AAAA,QACA,aAAA6B;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAI,EAAiB,cAAc;AAExB,MAAMU,KAAe,OAAO,OAAOV,GAAkB;AAAA,EAC1D,YAAYtC;AACd,CAAC;"}
|
|
@@ -5,12 +5,12 @@ import { c as j } from "./index-D2ZczOXr.js";
|
|
|
5
5
|
import { i as as, E as Es } from "./email-input-C7THAwh2.js";
|
|
6
6
|
import { B as ds } from "./button-D-MQxsA_.js";
|
|
7
7
|
import { C as h } from "./card-BA4Ig_kn.js";
|
|
8
|
-
import { E as Ns } from "./error-summary-
|
|
8
|
+
import { E as Ns } from "./error-summary-DrUfuKu1.js";
|
|
9
9
|
import { F as rs } from "./form-field-Ani72sVY.js";
|
|
10
10
|
import { P as Is } from "./password-input-BokZ_rnT.js";
|
|
11
11
|
import { i as is } from "./safe-href-5dbsfbQn.js";
|
|
12
12
|
import { u as Bs } from "./use-state-backed-input-DhRQo6gM.js";
|
|
13
|
-
import { u as Rs, a as Ls, A as As, b as Cs, E as Ms, d as Ss, c as ks } from "./auth-form-parts-
|
|
13
|
+
import { u as Rs, a as Ls, A as As, b as Cs, E as Ms, d as Ss, c as ks } from "./auth-form-parts-Cmb41LSQ.js";
|
|
14
14
|
import { u as qs, b as zs, a as js } from "./use-registration-submit-eWAECgUC.js";
|
|
15
15
|
import { M as $s } from "./matrix-rain-sDOUUwZp.js";
|
|
16
16
|
import { a as Ds } from "./error-page-illustration-BdJLuMdV.js";
|
|
@@ -306,4 +306,4 @@ export {
|
|
|
306
306
|
Gs as a,
|
|
307
307
|
Hs as b
|
|
308
308
|
};
|
|
309
|
-
//# sourceMappingURL=login-dev-card-
|
|
309
|
+
//# sourceMappingURL=login-dev-card-PnADNcI9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-dev-card-DwWWHclZ.js","sources":["../../src/patterns/login-form/login-form.tsx","../../src/patterns/login-form/login-dev-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* LoginForm — the sign-in card. */\n/* */\n/* One export for the card: the mark, the heading, email and password, */\n/* the button and the way to a new password. The host keeps the page */\n/* around it and every server rule. The card checks what a browser can */\n/* check, then hands the values to `onSubmit` or posts a real form to */\n/* the host's own field names. */\n/* */\n/* The email must be an email address. A server that also signs people */\n/* in by a username cannot use this card for those accounts. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\n// The validator EmailInput itself uses, so the two never disagree.\nimport isEmail from 'validator/lib/isEmail';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { EmailInput } from '../../components/email-input';\nimport { ErrorSummary } from '../../components/error-summary';\nimport { FormField } from '../../components/form-field';\nimport { PasswordInput } from '../../components/password-input';\nimport { isSafeHref } from '../../components/_shared/safe-href';\nimport { useStateBackedInput } from '../../components/_shared/use-state-backed-input';\nimport {\n AuthCardHeading,\n AuthFormMessage,\n AuthFormStatus,\n AuthTextLink,\n ExtraFields,\n useExtraFields,\n useFormAction,\n} from '../_shared/auth-form-parts';\nimport type { BrandMarkMotion } from '../_shared/brand-mark';\nimport {\n useErrorSummary,\n useFormMessageAnnounce,\n} from '../_shared/use-error-summary';\nimport { useRegistrationSubmit } from '../registration-form/use-registration-submit';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** The fields of the form, in the order they appear. */\nexport const LOGIN_FORM_FIELDS = ['email', 'password'] as const;\n\nexport type LoginFormField = (typeof LOGIN_FORM_FIELDS)[number];\n\n/** What `onSubmit` receives once both checks have passed. */\nexport interface LoginFormValues {\n email: string;\n password: string;\n}\n\n/** Values to show when the form opens. There is no password here, on\n * purpose: a password is never sent back to the browser. */\nexport type LoginFormInitialValues = Partial<Pick<LoginFormValues, 'email'>>;\n\n/** Messages from the server, already translated: one per field, plus\n * `form` for a message about the whole form, such as \"the email or\n * password is incorrect\". */\nexport type LoginFormErrors = Partial<Record<LoginFormField | 'form', string>>;\n\n/** The host's own form field names, for a native form post. Both are\n * needed: a field without a name is not posted. */\nexport type LoginFormFieldNames = Record<LoginFormField, string>;\n\nexport interface LoginFormProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'onSubmit'\n> {\n /** Replaces the heading \"Sign in to Alfadocs\". Pass it translated. */\n title?: string;\n /** A line under the heading. Pass it translated. */\n description?: string;\n /**\n * The heading's level. Default 1: a sign-in page usually has no other\n * heading. Pass 2 on a page that has its own `h1`.\n */\n headingLevel?: 1 | 2 | 3;\n /**\n * Shows the Alfadocs mark above the heading, with the heading and its\n * line centred under it. Default true. With `false` the heading sits\n * at the start edge, for a host that shows its own logo.\n */\n showLogo?: boolean;\n /**\n * How the mark arrives when the card opens: its pieces come together\n * (`assemble`, the default), it turns once (`spin`), it beats\n * (`pulse`), or it is still (`none`). It plays once and rests, and\n * holds still under reduced motion and in the accessible themes.\n */\n logoMotion?: BrandMarkMotion;\n /**\n * Host content between the heading and the fields, such as a notice\n * (\"You have been signed out\"). It sits outside the form, so nothing in\n * it is posted. Keep any heading inside it below the card's own level.\n */\n children?: ReactNode;\n /** The email to show when the form opens, such as the one last used.\n * Read once. There is never an initial password. */\n initialValues?: LoginFormInitialValues;\n /**\n * Messages from the server, already translated. A field's message\n * shows on that field until the user changes it; `form` shows above\n * the fields.\n *\n * When messages arrive, the password is emptied and focus moves: to\n * the error summary at the top of the form, which lists each field\n * with a message, or, when only `form` says something, to the\n * password, which is then described by that message. The same happens\n * for messages present when the form opens (a page the server rendered\n * after a failed post).\n *\n * Never say which of the two values was wrong: one message for both.\n * Set `submitting` while you send, so the form also notices an answer\n * that says the same as the last one.\n */\n errors?: LoginFormErrors;\n /**\n * Adds \"Forgot password?\" under the button. A path on the same site,\n * or an address written in full (`https://…`). Anything else shows no\n * link.\n */\n forgotPasswordHref?: string;\n /** Replaces the button's \"Sign in\". Pass it translated. */\n submitLabel?: string;\n /**\n * True while the host sends the values: the button shows a spinner and\n * a second submit is ignored. Set it inside `onSubmit`, before anything\n * is awaited: until it is true, a second press sends a second sign-in.\n */\n submitting?: boolean;\n /** For React hosts: called with the values once both checks have\n * passed. Not called when `fieldNames` is set. */\n onSubmit?: (values: LoginFormValues) => void;\n /**\n * For a native form post: the host's own field names, both of them,\n * e.g. `{ email: 'email', password: 'password' }`. When set, the inputs\n * carry these names and the browser posts the form.\n */\n fieldNames?: LoginFormFieldNames;\n /**\n * Where a native form post goes. Default: the current address. Only a\n * path, or an address on the page's own origin, is accepted: another\n * origin is never sent what the user typed, and the post then goes to\n * the current address. Does nothing without `fieldNames`.\n */\n action?: string;\n /**\n * Extra hidden inputs posted with a native form, by name: a CSRF token,\n * a return address. Not used with `onSubmit`. A name that is also one\n * of `fieldNames` is left out: the form's own field wins. The server\n * must check a return address itself: anyone can change a hidden input.\n */\n hiddenFields?: Readonly<Record<string, string>>;\n /**\n * A second card beside the sign-in, the same height: the development\n * quick sign-in (`LoginDevCard`). Pass it only when the server says\n * this is a development environment: the kit never decides that\n * itself. The two sit side by side where there is room and stack on a\n * phone.\n */\n devCard?: ReactNode;\n}\n\n/* -------------------------------------------------------------------- */\n/* Styles */\n/* -------------------------------------------------------------------- */\n\n// The card is 400px wide at most, written in px: a host whose root font\n// size is not 16px would stretch or squeeze a width in rem.\nconst loginFormVariants = cva(\n 'ds:flex ds:w-full ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:text-start ds:text-[var(--foreground)] ds:lg:flex-row ds:lg:items-stretch',\n);\n\nconst columnVariants = cva('ds:w-full ds:max-w-[400px]');\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst hasMessage = (errors: LoginFormErrors): boolean =>\n Object.values(errors).some(Boolean);\n\nconst hasFieldMessage = (errors: LoginFormErrors): boolean =>\n LOGIN_FORM_FIELDS.some((field) => Boolean(errors[field]));\n\n/**\n * Where to send the user for a set of server messages: the first field\n * that has one. A message about the whole form sends them to the\n * password, the field they will have to type again.\n */\nconst focusTargetFor = (\n messages: LoginFormErrors,\n): LoginFormField | undefined =>\n LOGIN_FORM_FIELDS.find((field) => messages[field]) ??\n (messages.form ? 'password' : undefined);\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\n/**\n * The sign-in card. Mount it on the login page, inside `SignedOutFrame`\n * or the host's own chrome.\n */\nexport const LoginForm = forwardRef<HTMLDivElement, LoginFormProps>(\n (\n {\n title,\n description,\n headingLevel = 1,\n showLogo = true,\n logoMotion = 'assemble',\n children,\n initialValues,\n errors,\n forgotPasswordHref,\n submitLabel,\n submitting = false,\n onSubmit,\n fieldNames,\n action,\n hiddenFields,\n devCard,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const titleId = useId();\n const formMessageId = useId();\n const fieldIdBase = useId();\n /** The id of a field's wrapper: where the summary's link leads. */\n const fieldId = (field: LoginFormField) => `${fieldIdBase}-${field}`;\n const native = fieldNames !== undefined;\n\n /* ------------------------------ State ----------------------------- */\n\n // Read once. The password always starts empty.\n const [email, setEmail] = useState(() => initialValues?.email ?? '');\n const [password, setPassword] = useState('');\n // A field the user has filled in and left. An email that arrives\n // filled in counts: a bad one is then flagged at once, with its\n // message. An empty field is not flagged for being passed through: a\n // keyboard user on the way to \"Forgot password?\" has made no mistake.\n // Its message waits for a submit.\n const [touched, setTouched] = useState<\n Partial<Record<LoginFormField, boolean>>\n >(() => ({ email: Boolean(initialValues?.email) }));\n const [submitted, setSubmitted] = useState(false);\n const [serverErrors, setServerErrors] = useState<LoginFormErrors>(\n () => errors ?? {},\n );\n\n const leave = (field: LoginFormField) =>\n setTouched((previous) =>\n previous[field] ? previous : { ...previous, [field]: true },\n );\n // The server's message was about the old value.\n const forget = (field: LoginFormField) =>\n setServerErrors((previous) =>\n previous[field] ? { ...previous, [field]: undefined } : previous,\n );\n\n const emailInput = useRef<HTMLInputElement>(null);\n const passwordInput = useRef<HTMLInputElement>(null);\n // The address stays out of the input's `value` attribute, where a\n // copied outerHTML or a session replay could read it.\n const emailField = useStateBackedInput(email, emailInput);\n\n const emptyPassword = () => {\n setPassword('');\n setTouched((previous) => ({ ...previous, password: false }));\n };\n /**\n * What the two inputs hold now. Read from the inputs, not from state:\n * a browser or a password manager can fill a field without telling\n * React, and the form must not refuse a field that is visibly filled.\n */\n const held = (): LoginFormValues => {\n const values = {\n email: emailInput.current?.value ?? email,\n password: passwordInput.current?.value ?? password,\n };\n if (values.email !== email) setEmail(values.email);\n if (values.password !== password) setPassword(values.password);\n return values;\n };\n\n /* ---------------------------- Validation -------------------------- */\n\n /** What stops a submit, whether or not the message shows yet. The\n * password only has to be there: its rules are for a new password. */\n const invalid: Record<LoginFormField, boolean> = {\n email: !isEmail(email),\n password: password === '',\n };\n // A message shows once the user has filled in and left the field, or\n // tried to submit.\n const due = (field: LoginFormField) => submitted || touched[field] === true;\n const ownErrors: Record<LoginFormField, string | undefined> = {\n email:\n due('email') && invalid.email\n ? email === ''\n ? t('loginForm.emailRequired')\n : t('inputs.email.invalid')\n : undefined,\n password:\n due('password') && invalid.password\n ? t('loginForm.passwordRequired')\n : undefined,\n };\n const errorFor = (field: LoginFormField) =>\n serverErrors[field] ?? ownErrors[field];\n\n /* ------------------------------ Focus ----------------------------- */\n\n // Every field with a message after a refused submit, or after a server\n // answer, is listed at the top of the form, and focus goes there. A\n // page the server rendered after a failed post opens that way too: it\n // announces nothing itself.\n const [openedWithFieldMessage] = useState(() =>\n hasFieldMessage(errors ?? {}),\n );\n const summary = useErrorSummary(\n LOGIN_FORM_FIELDS,\n errorFor,\n openedWithFieldMessage,\n );\n\n // Any other place focus goes: the password, when only the message\n // about the whole form says something. A new object for each request,\n // so asking twice for the same place moves focus twice. The effect runs\n // after the messages are drawn, so a screen reader lands on something\n // that already says what is wrong.\n const [focusRequest, setFocusRequest] = useState<{\n target: LoginFormField;\n } | null>(() => {\n const target = openedWithFieldMessage\n ? undefined\n : focusTargetFor(errors ?? {});\n return target ? { target } : null;\n });\n useEffect(() => {\n if (!focusRequest) return;\n (focusRequest.target === 'email'\n ? emailInput\n : passwordInput\n ).current?.focus();\n }, [focusRequest]);\n\n /* ------------------------------ Submit ---------------------------- */\n\n const submit = useRegistrationSubmit<LoginFormField>({\n errors,\n submitting,\n native,\n captcha: false,\n firstProblem: () => {\n const values = held();\n if (!isEmail(values.email)) return 'email';\n return values.password === '' ? 'password' : undefined;\n },\n onRefused: (field) => {\n // Both messages now show, listed in the summary, which takes focus.\n setSubmitted(true);\n summary.open(() => setFocusRequest({ target: field }));\n },\n // Only a React host gets here: a native post is the browser's own.\n deliver: () => onSubmit?.(held()),\n onAnswer: (answer) => {\n const next: LoginFormErrors = answer;\n setServerErrors(next);\n if (!hasMessage(next)) return;\n // Never keep a password the server did not accept.\n emptyPassword();\n setSubmitted(false);\n // The summary when a field has a message, else the password.\n summary.open(() => {\n const target = focusTargetFor(next);\n if (target) setFocusRequest({ target });\n });\n },\n // The page came back from the browser's cache as it was left: the\n // password must not come back with it.\n onRestore: emptyPassword,\n });\n const { busy } = submit;\n\n /* ------------------------------ Render ---------------------------- */\n\n const formAction = useFormAction('LoginForm', native, action);\n const forgotLink =\n forgotPasswordHref && isSafeHref(forgotPasswordHref)\n ? forgotPasswordHref\n : undefined;\n const extraFields = useExtraFields(\n 'LoginForm',\n native,\n fieldNames,\n hiddenFields,\n );\n const formError = serverErrors.form;\n // Quiet while the summary lists a field: the summary reads it then.\n const formMessageAnnounce = useFormMessageAnnounce(\n formError,\n summary.listed.length > 0,\n );\n\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"login-form\"\n className={loginFormVariants({ className })}\n >\n <div className={columnVariants()}>\n <Card variant=\"elevated\" className=\"ds:h-full\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <AuthCardHeading\n id={titleId}\n title={title ?? t('loginForm.title')}\n description={description}\n level={headingLevel}\n showLogo={showLogo}\n logoMotion={logoMotion}\n />\n\n {children ? (\n <div\n data-slot=\"host-content\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n {children}\n </div>\n ) : null}\n\n {/* Always POST, in both modes: should the script ever fail to\n run, the browser must not put a password in the address. */}\n <form\n noValidate\n method=\"post\"\n action={formAction}\n aria-labelledby={titleId}\n aria-busy={busy || undefined}\n onSubmit={submit.handleSubmit}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n <ErrorSummary\n ref={summary.ref}\n headingLevel={(headingLevel + 1) as 2 | 3 | 4}\n // The message about the whole form is read with it.\n aria-describedby={formError ? formMessageId : undefined}\n errors={summary.listed.map((field) => ({\n field,\n message: errorFor(field) ?? '',\n targetId: fieldId(field),\n }))}\n />\n\n {formError && (\n <AuthFormMessage\n id={formMessageId}\n announce={formMessageAnnounce}\n >\n {formError}\n </AuthFormMessage>\n )}\n\n <FormField\n id={fieldId('email')}\n label={t('loginForm.email')}\n required\n error={errorFor('email')}\n // Quiet while the summary lists it: the summary reads it.\n announceError={!summary.lists('email')}\n data-field=\"email\"\n >\n {/* One check, above, drives the message, the red mark and\n aria-invalid through FormField. EmailInput's own check\n is off so the two cannot disagree. `username` is the\n name browsers and password managers give the field\n that goes with `current-password`. */}\n <EmailInput\n ref={emailField.ref}\n name={native ? fieldNames.email : 'email'}\n autoComplete=\"username\"\n disableBuiltInValidation\n onChange={emailField.quiet((event) => {\n setEmail(event.target.value);\n forget('email');\n })}\n onBlur={(event) => {\n // Whatever a browser filled in without saying so.\n setEmail(event.target.value);\n if (event.target.value !== '') leave('email');\n }}\n />\n </FormField>\n\n <FormField\n id={fieldId('password')}\n label={t('loginForm.password')}\n required\n error={errorFor('password')}\n announceError={!summary.lists('password')}\n data-field=\"password\"\n >\n {/* Described by the message above the fields when there is\n one: focus lands here after a refused sign-in, and a\n screen reader then reads why. */}\n <PasswordInput\n ref={passwordInput}\n name={native ? fieldNames.password : 'password'}\n autoComplete=\"current-password\"\n aria-describedby={formError ? formMessageId : undefined}\n value={password}\n onChange={(event) => {\n setPassword(event.target.value);\n forget('password');\n }}\n onBlur={(event) => {\n setPassword(event.target.value);\n if (event.target.value !== '') leave('password');\n }}\n />\n </FormField>\n\n <ExtraFields fields={extraFields} />\n\n <Button\n type=\"submit\"\n intent=\"primary\"\n size=\"lg\"\n loading={busy}\n className=\"ds:w-full\"\n data-action=\"submit\"\n >\n {submitLabel ?? t('loginForm.submit')}\n </Button>\n\n {forgotLink && (\n <AuthTextLink href={forgotLink} action=\"forgot-password\">\n {t('loginForm.forgot')}\n </AuthTextLink>\n )}\n </form>\n {/* Outside the form: a screen reader may hold back what\n changes inside a busy region. */}\n <AuthFormStatus busy={busy} />\n </Card.Body>\n </Card>\n </div>\n {devCard ? <div className={columnVariants()}>{devCard}</div> : null}\n </div>\n );\n },\n);\nLoginForm.displayName = 'LoginForm';\n","/* -------------------------------------------------------------------- */\n/* LoginDevCard — the development quick sign-in card. */\n/* */\n/* A second card beside the login, for developers: one link per test */\n/* account the host's server can sign in. The kit only draws it. The */\n/* host decides whether it is rendered, supplies every word on it, and */\n/* its server must refuse the routes outside development. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { MatrixRain } from '../../components/matrix-rain';\nimport { isSafeHref } from '../../components/_shared/safe-href';\nimport { ErrorPageIllustration } from '../error-page/error-page-illustration';\n\nexport interface LoginDevOption {\n /** The link's text, e.g. \"Sign in as admin\". The host supplies it, so\n * the kit ships no text for a card that users never see. */\n label: string;\n /** The development-only route that signs the test account in. A path\n * on the same site, or an address written in full. */\n href: string;\n /** A Lucide icon for the link, passed bare: `<ShieldUser />`. */\n icon?: ReactNode;\n}\n\nexport interface LoginDevCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n /** The card's heading, e.g. \"Developer quick login\". */\n title: string;\n /** One link per test account. An option with an unsafe address is\n * left out. */\n options: readonly LoginDevOption[];\n /** The heading's level. Default 2, under the login's own heading. */\n headingLevel?: 2 | 3;\n}\n\n// As tall as the login beside it, so the two cards read as a pair.\nconst loginDevCardVariants = cva('ds:h-full ds:w-full');\n\n/**\n * The development quick sign-in card. Render it only when the server\n * says this is a development environment: it never checks the\n * environment itself. Pass it to `LoginForm` as `devCard`.\n */\nexport const LoginDevCard = forwardRef<HTMLDivElement, LoginDevCardProps>(\n ({ title, options, headingLevel = 2, className, ...rest }, ref) => {\n const titleId = useId();\n const Heading = `h${headingLevel}` as const;\n const links = options.filter((option) => isSafeHref(option.href));\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"login-dev-card\"\n className={loginDevCardVariants({ className })}\n >\n <Card\n variant=\"elevated\"\n aria-labelledby={titleId}\n className=\"ds:relative ds:isolate ds:flex ds:h-full ds:flex-col ds:overflow-hidden\"\n >\n {/* Code rain round the edges, clear in the middle so it never runs\n behind the links. MatrixRain holds still under reduced motion by\n itself; it does not know the accessible themes, so the rain is\n taken out there, like the kit's other decorative motion. */}\n <div className=\"ds:absolute ds:inset-0 ds:z-0 ds:[display:var(--accessible-off,block)]\">\n <MatrixRain\n glyphs=\"hex\"\n decay=\"fast\"\n mask=\"center\"\n maskRadius=\"xl\"\n className=\"ds:size-full\"\n />\n </div>\n <Card.Header className=\"ds:relative ds:z-[1]\">\n <div className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-center\">\n {/* The melting mark from the error pages, at half its size\n there. */}\n <div className=\"ds:[&>div]:w-24\">\n <ErrorPageIllustration mood=\"melt\" />\n </div>\n <Heading\n id={titleId}\n className=\"type-title-card ds:text-[var(--foreground)]\"\n >\n {title}\n </Heading>\n </div>\n </Card.Header>\n <Card.Body className=\"ds:relative ds:z-[1] ds:flex ds:flex-1 ds:flex-col ds:justify-center\">\n {/* The top margin keeps the heading clear of the links when the\n cards stack and this one is only as tall as its content. */}\n <div className=\"ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n {links.map((option, index) => (\n <Button\n // Two options may share an address, so the place in the\n // list is part of the key.\n key={`${index}:${option.href}`}\n asChild\n intent=\"primary\"\n startIcon={option.icon}\n className=\"ds:min-h-[var(--min-target-size)] ds:w-full\"\n >\n <a href={option.href} data-action=\"dev-login\">\n {option.label}\n </a>\n </Button>\n ))}\n </div>\n </Card.Body>\n </Card>\n </div>\n );\n },\n);\nLoginDevCard.displayName = 'LoginDevCard';\n"],"names":["LOGIN_FORM_FIELDS","loginFormVariants","cva","columnVariants","hasMessage","errors","hasFieldMessage","field","focusTargetFor","messages","LoginForm","forwardRef","title","description","headingLevel","showLogo","logoMotion","children","initialValues","forgotPasswordHref","submitLabel","submitting","onSubmit","fieldNames","action","hiddenFields","devCard","className","rest","ref","t","useTranslation","titleId","useId","formMessageId","fieldIdBase","fieldId","native","email","setEmail","useState","password","setPassword","touched","setTouched","submitted","setSubmitted","serverErrors","setServerErrors","leave","previous","forget","emailInput","useRef","passwordInput","emailField","useStateBackedInput","emptyPassword","held","values","_a","_b","invalid","isEmail","due","ownErrors","errorFor","openedWithFieldMessage","summary","useErrorSummary","focusRequest","setFocusRequest","target","useEffect","submit","useRegistrationSubmit","answer","next","busy","formAction","useFormAction","forgotLink","isSafeHref","extraFields","useExtraFields","formError","formMessageAnnounce","useFormMessageAnnounce","jsxs","jsx","Card","AuthCardHeading","ErrorSummary","AuthFormMessage","FormField","EmailInput","event","PasswordInput","ExtraFields","Button","AuthTextLink","AuthFormStatus","loginDevCardVariants","LoginDevCard","options","Heading","links","option","MatrixRain","ErrorPageIllustration","index"],"mappings":";;;;;;;;;;;;;;;;AAuDO,MAAMA,IAAoB,CAAC,SAAS,UAAU,GAgI/CC,KAAoBC;AAAA,EACxB;AACF,GAEMC,KAAiBD,EAAI,4BAA4B,GAMjDE,KAAa,CAACC,MAClB,OAAO,OAAOA,CAAM,EAAE,KAAK,OAAO,GAE9BC,KAAkB,CAACD,MACvBL,EAAkB,KAAK,CAACO,MAAU,EAAQF,EAAOE,CAAK,CAAE,GAOpDC,KAAiB,CACrBC,MAEAT,EAAkB,KAAK,CAACO,MAAUE,EAASF,CAAK,CAAC,MAChDE,EAAS,OAAO,aAAa,SAUnBC,KAAYC;AAAA,EACvB,CACE;AAAA,IACE,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,UAAAC,IAAW;AAAA,IACX,YAAAC,IAAa;AAAA,IACb,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,QAAAb;AAAA,IACA,oBAAAc;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,OACG;AACH,UAAM,EAAE,GAAAC,EAAA,IAAMC,GAAe,IAAI,GAC3BC,IAAUC,EAAA,GACVC,IAAgBD,EAAA,GAChBE,KAAcF,EAAA,GAEdG,IAAU,CAAC7B,MAA0B,GAAG4B,EAAW,IAAI5B,CAAK,IAC5D8B,IAASd,MAAe,QAKxB,CAACe,GAAOC,CAAQ,IAAIC,EAAS,OAAMtB,KAAA,gBAAAA,EAAe,UAAS,EAAE,GAC7D,CAACuB,GAAUC,CAAW,IAAIF,EAAS,EAAE,GAMrC,CAACG,IAASC,CAAU,IAAIJ,EAE5B,OAAO,EAA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AAAA,kBAAA;AAAA,oBACC,IAAIzE;AAAA,oBACJ,WAAU;AAAA,oBAET,UAAApB;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACH,EAAA,CACF,EAAA,CACF;AAAA,cACA,gBAAA6E,EAACC,EAAK,MAAL,EAAU,WAAU,wEAGnB,UAAA,gBAAAD,EAAC,OAAA,EAAI,WAAU,4EACZ,UAAAiB,EAAM,IAAI,CAACC,GAAQG,MAClB,gBAAArB;AAAA,gBAACU;AAAA,gBAAA;AAAA,kBAIC,SAAO;AAAA,kBACP,QAAO;AAAA,kBACP,WAAWQ,EAAO;AAAA,kBAClB,WAAU;AAAA,kBAEV,UAAA,gBAAAlB,EAAC,OAAE,MAAMkB,EAAO,MAAM,eAAY,aAC/B,YAAO,MAAA,CACV;AAAA,gBAAA;AAAA,gBARK,GAAGG,CAAK,IAAIH,EAAO,IAAI;AAAA,cAAA,CAU/B,GACH,EAAA,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAGN;AACF;AACAJ,GAAa,cAAc;"}
|
|
1
|
+
{"version":3,"file":"login-dev-card-PnADNcI9.js","sources":["../../src/patterns/login-form/login-form.tsx","../../src/patterns/login-form/login-dev-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* LoginForm — the sign-in card. */\n/* */\n/* One export for the card: the mark, the heading, email and password, */\n/* the button and the way to a new password. The host keeps the page */\n/* around it and every server rule. The card checks what a browser can */\n/* check, then hands the values to `onSubmit` or posts a real form to */\n/* the host's own field names. */\n/* */\n/* The email must be an email address. A server that also signs people */\n/* in by a username cannot use this card for those accounts. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\n// The validator EmailInput itself uses, so the two never disagree.\nimport isEmail from 'validator/lib/isEmail';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { EmailInput } from '../../components/email-input';\nimport { ErrorSummary } from '../../components/error-summary';\nimport { FormField } from '../../components/form-field';\nimport { PasswordInput } from '../../components/password-input';\nimport { isSafeHref } from '../../components/_shared/safe-href';\nimport { useStateBackedInput } from '../../components/_shared/use-state-backed-input';\nimport {\n AuthCardHeading,\n AuthFormMessage,\n AuthFormStatus,\n AuthTextLink,\n ExtraFields,\n useExtraFields,\n useFormAction,\n} from '../_shared/auth-form-parts';\nimport type { BrandMarkMotion } from '../_shared/brand-mark';\nimport {\n useErrorSummary,\n useFormMessageAnnounce,\n} from '../_shared/use-error-summary';\nimport { useRegistrationSubmit } from '../registration-form/use-registration-submit';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** The fields of the form, in the order they appear. */\nexport const LOGIN_FORM_FIELDS = ['email', 'password'] as const;\n\nexport type LoginFormField = (typeof LOGIN_FORM_FIELDS)[number];\n\n/** What `onSubmit` receives once both checks have passed. */\nexport interface LoginFormValues {\n email: string;\n password: string;\n}\n\n/** Values to show when the form opens. There is no password here, on\n * purpose: a password is never sent back to the browser. */\nexport type LoginFormInitialValues = Partial<Pick<LoginFormValues, 'email'>>;\n\n/** Messages from the server, already translated: one per field, plus\n * `form` for a message about the whole form, such as \"the email or\n * password is incorrect\". */\nexport type LoginFormErrors = Partial<Record<LoginFormField | 'form', string>>;\n\n/** The host's own form field names, for a native form post. Both are\n * needed: a field without a name is not posted. */\nexport type LoginFormFieldNames = Record<LoginFormField, string>;\n\nexport interface LoginFormProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'onSubmit'\n> {\n /** Replaces the heading \"Sign in to Alfadocs\". Pass it translated. */\n title?: string;\n /** A line under the heading. Pass it translated. */\n description?: string;\n /**\n * The heading's level. Default 1: a sign-in page usually has no other\n * heading. Pass 2 on a page that has its own `h1`.\n */\n headingLevel?: 1 | 2 | 3;\n /**\n * Shows the Alfadocs mark above the heading, with the heading and its\n * line centred under it. Default true. With `false` the heading sits\n * at the start edge, for a host that shows its own logo.\n */\n showLogo?: boolean;\n /**\n * How the mark arrives when the card opens: its pieces come together\n * (`assemble`, the default), it turns once (`spin`), it beats\n * (`pulse`), or it is still (`none`). It plays once and rests, and\n * holds still under reduced motion and in the accessible themes.\n */\n logoMotion?: BrandMarkMotion;\n /**\n * Host content between the heading and the fields, such as a notice\n * (\"You have been signed out\"). It sits outside the form, so nothing in\n * it is posted. Keep any heading inside it below the card's own level.\n */\n children?: ReactNode;\n /** The email to show when the form opens, such as the one last used.\n * Read once. There is never an initial password. */\n initialValues?: LoginFormInitialValues;\n /**\n * Messages from the server, already translated. A field's message\n * shows on that field until the user changes it; `form` shows above\n * the fields.\n *\n * When messages arrive, the password is emptied and focus moves: to\n * the error summary at the top of the form, which lists each field\n * with a message, or, when only `form` says something, to the\n * password, which is then described by that message. The same happens\n * for messages present when the form opens (a page the server rendered\n * after a failed post).\n *\n * Never say which of the two values was wrong: one message for both.\n * Set `submitting` while you send, so the form also notices an answer\n * that says the same as the last one.\n */\n errors?: LoginFormErrors;\n /**\n * Adds \"Forgot password?\" under the button. A path on the same site,\n * or an address written in full (`https://…`). Anything else shows no\n * link.\n */\n forgotPasswordHref?: string;\n /** Replaces the button's \"Sign in\". Pass it translated. */\n submitLabel?: string;\n /**\n * True while the host sends the values: the button shows a spinner and\n * a second submit is ignored. Set it inside `onSubmit`, before anything\n * is awaited: until it is true, a second press sends a second sign-in.\n */\n submitting?: boolean;\n /** For React hosts: called with the values once both checks have\n * passed. Not called when `fieldNames` is set. */\n onSubmit?: (values: LoginFormValues) => void;\n /**\n * For a native form post: the host's own field names, both of them,\n * e.g. `{ email: 'email', password: 'password' }`. When set, the inputs\n * carry these names and the browser posts the form.\n */\n fieldNames?: LoginFormFieldNames;\n /**\n * Where a native form post goes. Default: the current address. Only a\n * path, or an address on the page's own origin, is accepted: another\n * origin is never sent what the user typed, and the post then goes to\n * the current address. Does nothing without `fieldNames`.\n */\n action?: string;\n /**\n * Extra hidden inputs posted with a native form, by name: a CSRF token,\n * a return address. Not used with `onSubmit`. A name that is also one\n * of `fieldNames` is left out: the form's own field wins. The server\n * must check a return address itself: anyone can change a hidden input.\n */\n hiddenFields?: Readonly<Record<string, string>>;\n /**\n * A second card beside the sign-in, the same height: the development\n * quick sign-in (`LoginDevCard`). Pass it only when the server says\n * this is a development environment: the kit never decides that\n * itself. The two sit side by side where there is room and stack on a\n * phone.\n */\n devCard?: ReactNode;\n}\n\n/* -------------------------------------------------------------------- */\n/* Styles */\n/* -------------------------------------------------------------------- */\n\n// The card is 400px wide at most, written in px: a host whose root font\n// size is not 16px would stretch or squeeze a width in rem.\nconst loginFormVariants = cva(\n 'ds:flex ds:w-full ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:text-start ds:text-[var(--foreground)] ds:lg:flex-row ds:lg:items-stretch',\n);\n\nconst columnVariants = cva('ds:w-full ds:max-w-[400px]');\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst hasMessage = (errors: LoginFormErrors): boolean =>\n Object.values(errors).some(Boolean);\n\nconst hasFieldMessage = (errors: LoginFormErrors): boolean =>\n LOGIN_FORM_FIELDS.some((field) => Boolean(errors[field]));\n\n/**\n * Where to send the user for a set of server messages: the first field\n * that has one. A message about the whole form sends them to the\n * password, the field they will have to type again.\n */\nconst focusTargetFor = (\n messages: LoginFormErrors,\n): LoginFormField | undefined =>\n LOGIN_FORM_FIELDS.find((field) => messages[field]) ??\n (messages.form ? 'password' : undefined);\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\n/**\n * The sign-in card. Mount it on the login page, inside `SignedOutFrame`\n * or the host's own chrome.\n */\nexport const LoginForm = forwardRef<HTMLDivElement, LoginFormProps>(\n (\n {\n title,\n description,\n headingLevel = 1,\n showLogo = true,\n logoMotion = 'assemble',\n children,\n initialValues,\n errors,\n forgotPasswordHref,\n submitLabel,\n submitting = false,\n onSubmit,\n fieldNames,\n action,\n hiddenFields,\n devCard,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const titleId = useId();\n const formMessageId = useId();\n const fieldIdBase = useId();\n /** The id of a field's wrapper: where the summary's link leads. */\n const fieldId = (field: LoginFormField) => `${fieldIdBase}-${field}`;\n const native = fieldNames !== undefined;\n\n /* ------------------------------ State ----------------------------- */\n\n // Read once. The password always starts empty.\n const [email, setEmail] = useState(() => initialValues?.email ?? '');\n const [password, setPassword] = useState('');\n // A field the user has filled in and left. An email that arrives\n // filled in counts: a bad one is then flagged at once, with its\n // message. An empty field is not flagged for being passed through: a\n // keyboard user on the way to \"Forgot password?\" has made no mistake.\n // Its message waits for a submit.\n const [touched, setTouched] = useState<\n Partial<Record<LoginFormField, boolean>>\n >(() => ({ email: Boolean(initialValues?.email) }));\n const [submitted, setSubmitted] = useState(false);\n const [serverErrors, setServerErrors] = useState<LoginFormErrors>(\n () => errors ?? {},\n );\n\n const leave = (field: LoginFormField) =>\n setTouched((previous) =>\n previous[field] ? previous : { ...previous, [field]: true },\n );\n // The server's message was about the old value.\n const forget = (field: LoginFormField) =>\n setServerErrors((previous) =>\n previous[field] ? { ...previous, [field]: undefined } : previous,\n );\n\n const emailInput = useRef<HTMLInputElement>(null);\n const passwordInput = useRef<HTMLInputElement>(null);\n // The address stays out of the input's `value` attribute, where a\n // copied outerHTML or a session replay could read it.\n const emailField = useStateBackedInput(email, emailInput);\n\n const emptyPassword = () => {\n setPassword('');\n setTouched((previous) => ({ ...previous, password: false }));\n };\n /**\n * What the two inputs hold now. Read from the inputs, not from state:\n * a browser or a password manager can fill a field without telling\n * React, and the form must not refuse a field that is visibly filled.\n */\n const held = (): LoginFormValues => {\n const values = {\n email: emailInput.current?.value ?? email,\n password: passwordInput.current?.value ?? password,\n };\n if (values.email !== email) setEmail(values.email);\n if (values.password !== password) setPassword(values.password);\n return values;\n };\n\n /* ---------------------------- Validation -------------------------- */\n\n /** What stops a submit, whether or not the message shows yet. The\n * password only has to be there: its rules are for a new password. */\n const invalid: Record<LoginFormField, boolean> = {\n email: !isEmail(email),\n password: password === '',\n };\n // A message shows once the user has filled in and left the field, or\n // tried to submit.\n const due = (field: LoginFormField) => submitted || touched[field] === true;\n const ownErrors: Record<LoginFormField, string | undefined> = {\n email:\n due('email') && invalid.email\n ? email === ''\n ? t('loginForm.emailRequired')\n : t('inputs.email.invalid')\n : undefined,\n password:\n due('password') && invalid.password\n ? t('loginForm.passwordRequired')\n : undefined,\n };\n const errorFor = (field: LoginFormField) =>\n serverErrors[field] ?? ownErrors[field];\n\n /* ------------------------------ Focus ----------------------------- */\n\n // Every field with a message after a refused submit, or after a server\n // answer, is listed at the top of the form, and focus goes there. A\n // page the server rendered after a failed post opens that way too: it\n // announces nothing itself.\n const [openedWithFieldMessage] = useState(() =>\n hasFieldMessage(errors ?? {}),\n );\n const summary = useErrorSummary(\n LOGIN_FORM_FIELDS,\n errorFor,\n openedWithFieldMessage,\n );\n\n // Any other place focus goes: the password, when only the message\n // about the whole form says something. A new object for each request,\n // so asking twice for the same place moves focus twice. The effect runs\n // after the messages are drawn, so a screen reader lands on something\n // that already says what is wrong.\n const [focusRequest, setFocusRequest] = useState<{\n target: LoginFormField;\n } | null>(() => {\n const target = openedWithFieldMessage\n ? undefined\n : focusTargetFor(errors ?? {});\n return target ? { target } : null;\n });\n useEffect(() => {\n if (!focusRequest) return;\n (focusRequest.target === 'email'\n ? emailInput\n : passwordInput\n ).current?.focus();\n }, [focusRequest]);\n\n /* ------------------------------ Submit ---------------------------- */\n\n const submit = useRegistrationSubmit<LoginFormField>({\n errors,\n submitting,\n native,\n captcha: false,\n firstProblem: () => {\n const values = held();\n if (!isEmail(values.email)) return 'email';\n return values.password === '' ? 'password' : undefined;\n },\n onRefused: (field) => {\n // Both messages now show, listed in the summary, which takes focus.\n setSubmitted(true);\n summary.open(() => setFocusRequest({ target: field }));\n },\n // Only a React host gets here: a native post is the browser's own.\n deliver: () => onSubmit?.(held()),\n onAnswer: (answer) => {\n const next: LoginFormErrors = answer;\n setServerErrors(next);\n if (!hasMessage(next)) return;\n // Never keep a password the server did not accept.\n emptyPassword();\n setSubmitted(false);\n // The summary when a field has a message, else the password.\n summary.open(() => {\n const target = focusTargetFor(next);\n if (target) setFocusRequest({ target });\n });\n },\n // The page came back from the browser's cache as it was left: the\n // password must not come back with it.\n onRestore: emptyPassword,\n });\n const { busy } = submit;\n\n /* ------------------------------ Render ---------------------------- */\n\n const formAction = useFormAction('LoginForm', native, action);\n const forgotLink =\n forgotPasswordHref && isSafeHref(forgotPasswordHref)\n ? forgotPasswordHref\n : undefined;\n const extraFields = useExtraFields(\n 'LoginForm',\n native,\n fieldNames,\n hiddenFields,\n );\n const formError = serverErrors.form;\n // Quiet while the summary lists a field: the summary reads it then.\n const formMessageAnnounce = useFormMessageAnnounce(\n formError,\n summary.listed.length > 0,\n );\n\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"login-form\"\n className={loginFormVariants({ className })}\n >\n <div className={columnVariants()}>\n <Card variant=\"elevated\" className=\"ds:h-full\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <AuthCardHeading\n id={titleId}\n title={title ?? t('loginForm.title')}\n description={description}\n level={headingLevel}\n showLogo={showLogo}\n logoMotion={logoMotion}\n />\n\n {children ? (\n <div\n data-slot=\"host-content\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n {children}\n </div>\n ) : null}\n\n {/* Always POST, in both modes: should the script ever fail to\n run, the browser must not put a password in the address. */}\n <form\n noValidate\n method=\"post\"\n action={formAction}\n aria-labelledby={titleId}\n aria-busy={busy || undefined}\n onSubmit={submit.handleSubmit}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n <ErrorSummary\n ref={summary.ref}\n headingLevel={(headingLevel + 1) as 2 | 3 | 4}\n // The message about the whole form is read with it.\n aria-describedby={formError ? formMessageId : undefined}\n errors={summary.listed.map((field) => ({\n field,\n message: errorFor(field) ?? '',\n targetId: fieldId(field),\n }))}\n />\n\n {formError && (\n <AuthFormMessage\n id={formMessageId}\n announce={formMessageAnnounce}\n >\n {formError}\n </AuthFormMessage>\n )}\n\n <FormField\n id={fieldId('email')}\n label={t('loginForm.email')}\n required\n error={errorFor('email')}\n // Quiet while the summary lists it: the summary reads it.\n announceError={!summary.lists('email')}\n data-field=\"email\"\n >\n {/* One check, above, drives the message, the red mark and\n aria-invalid through FormField. EmailInput's own check\n is off so the two cannot disagree. `username` is the\n name browsers and password managers give the field\n that goes with `current-password`. */}\n <EmailInput\n ref={emailField.ref}\n name={native ? fieldNames.email : 'email'}\n autoComplete=\"username\"\n disableBuiltInValidation\n onChange={emailField.quiet((event) => {\n setEmail(event.target.value);\n forget('email');\n })}\n onBlur={(event) => {\n // Whatever a browser filled in without saying so.\n setEmail(event.target.value);\n if (event.target.value !== '') leave('email');\n }}\n />\n </FormField>\n\n <FormField\n id={fieldId('password')}\n label={t('loginForm.password')}\n required\n error={errorFor('password')}\n announceError={!summary.lists('password')}\n data-field=\"password\"\n >\n {/* Described by the message above the fields when there is\n one: focus lands here after a refused sign-in, and a\n screen reader then reads why. */}\n <PasswordInput\n ref={passwordInput}\n name={native ? fieldNames.password : 'password'}\n autoComplete=\"current-password\"\n aria-describedby={formError ? formMessageId : undefined}\n value={password}\n onChange={(event) => {\n setPassword(event.target.value);\n forget('password');\n }}\n onBlur={(event) => {\n setPassword(event.target.value);\n if (event.target.value !== '') leave('password');\n }}\n />\n </FormField>\n\n <ExtraFields fields={extraFields} />\n\n <Button\n type=\"submit\"\n intent=\"primary\"\n size=\"lg\"\n loading={busy}\n className=\"ds:w-full\"\n data-action=\"submit\"\n >\n {submitLabel ?? t('loginForm.submit')}\n </Button>\n\n {forgotLink && (\n <AuthTextLink href={forgotLink} action=\"forgot-password\">\n {t('loginForm.forgot')}\n </AuthTextLink>\n )}\n </form>\n {/* Outside the form: a screen reader may hold back what\n changes inside a busy region. */}\n <AuthFormStatus busy={busy} />\n </Card.Body>\n </Card>\n </div>\n {devCard ? <div className={columnVariants()}>{devCard}</div> : null}\n </div>\n );\n },\n);\nLoginForm.displayName = 'LoginForm';\n","/* -------------------------------------------------------------------- */\n/* LoginDevCard — the development quick sign-in card. */\n/* */\n/* A second card beside the login, for developers: one link per test */\n/* account the host's server can sign in. The kit only draws it. The */\n/* host decides whether it is rendered, supplies every word on it, and */\n/* its server must refuse the routes outside development. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { MatrixRain } from '../../components/matrix-rain';\nimport { isSafeHref } from '../../components/_shared/safe-href';\nimport { ErrorPageIllustration } from '../error-page/error-page-illustration';\n\nexport interface LoginDevOption {\n /** The link's text, e.g. \"Sign in as admin\". The host supplies it, so\n * the kit ships no text for a card that users never see. */\n label: string;\n /** The development-only route that signs the test account in. A path\n * on the same site, or an address written in full. */\n href: string;\n /** A Lucide icon for the link, passed bare: `<ShieldUser />`. */\n icon?: ReactNode;\n}\n\nexport interface LoginDevCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n /** The card's heading, e.g. \"Developer quick login\". */\n title: string;\n /** One link per test account. An option with an unsafe address is\n * left out. */\n options: readonly LoginDevOption[];\n /** The heading's level. Default 2, under the login's own heading. */\n headingLevel?: 2 | 3;\n}\n\n// As tall as the login beside it, so the two cards read as a pair.\nconst loginDevCardVariants = cva('ds:h-full ds:w-full');\n\n/**\n * The development quick sign-in card. Render it only when the server\n * says this is a development environment: it never checks the\n * environment itself. Pass it to `LoginForm` as `devCard`.\n */\nexport const LoginDevCard = forwardRef<HTMLDivElement, LoginDevCardProps>(\n ({ title, options, headingLevel = 2, className, ...rest }, ref) => {\n const titleId = useId();\n const Heading = `h${headingLevel}` as const;\n const links = options.filter((option) => isSafeHref(option.href));\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"login-dev-card\"\n className={loginDevCardVariants({ className })}\n >\n <Card\n variant=\"elevated\"\n aria-labelledby={titleId}\n className=\"ds:relative ds:isolate ds:flex ds:h-full ds:flex-col ds:overflow-hidden\"\n >\n {/* Code rain round the edges, clear in the middle so it never runs\n behind the links. MatrixRain holds still under reduced motion by\n itself; it does not know the accessible themes, so the rain is\n taken out there, like the kit's other decorative motion. */}\n <div className=\"ds:absolute ds:inset-0 ds:z-0 ds:[display:var(--accessible-off,block)]\">\n <MatrixRain\n glyphs=\"hex\"\n decay=\"fast\"\n mask=\"center\"\n maskRadius=\"xl\"\n className=\"ds:size-full\"\n />\n </div>\n <Card.Header className=\"ds:relative ds:z-[1]\">\n <div className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-center\">\n {/* The melting mark from the error pages, at half its size\n there. */}\n <div className=\"ds:[&>div]:w-24\">\n <ErrorPageIllustration mood=\"melt\" />\n </div>\n <Heading\n id={titleId}\n className=\"type-title-card ds:text-[var(--foreground)]\"\n >\n {title}\n </Heading>\n </div>\n </Card.Header>\n <Card.Body className=\"ds:relative ds:z-[1] ds:flex ds:flex-1 ds:flex-col ds:justify-center\">\n {/* The top margin keeps the heading clear of the links when the\n cards stack and this one is only as tall as its content. */}\n <div className=\"ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n {links.map((option, index) => (\n <Button\n // Two options may share an address, so the place in the\n // list is part of the key.\n key={`${index}:${option.href}`}\n asChild\n intent=\"primary\"\n startIcon={option.icon}\n className=\"ds:min-h-[var(--min-target-size)] ds:w-full\"\n >\n <a href={option.href} data-action=\"dev-login\">\n {option.label}\n </a>\n </Button>\n ))}\n </div>\n </Card.Body>\n </Card>\n </div>\n );\n },\n);\nLoginDevCard.displayName = 'LoginDevCard';\n"],"names":["LOGIN_FORM_FIELDS","loginFormVariants","cva","columnVariants","hasMessage","errors","hasFieldMessage","field","focusTargetFor","messages","LoginForm","forwardRef","title","description","headingLevel","showLogo","logoMotion","children","initialValues","forgotPasswordHref","submitLabel","submitting","onSubmit","fieldNames","action","hiddenFields","devCard","className","rest","ref","t","useTranslation","titleId","useId","formMessageId","fieldIdBase","fieldId","native","email","setEmail","useState","password","setPassword","touched","setTouched","submitted","setSubmitted","serverErrors","setServerErrors","leave","previous","forget","emailInput","useRef","passwordInput","emailField","useStateBackedInput","emptyPassword","held","values","_a","_b","invalid","isEmail","due","ownErrors","errorFor","openedWithFieldMessage","summary","useErrorSummary","focusRequest","setFocusRequest","target","useEffect","submit","useRegistrationSubmit","answer","next","busy","formAction","useFormAction","forgotLink","isSafeHref","extraFields","useExtraFields","formError","formMessageAnnounce","useFormMessageAnnounce","jsxs","jsx","Card","AuthCardHeading","ErrorSummary","AuthFormMessage","FormField","EmailInput","event","PasswordInput","ExtraFields","Button","AuthTextLink","AuthFormStatus","loginDevCardVariants","LoginDevCard","options","Heading","links","option","MatrixRain","ErrorPageIllustration","index"],"mappings":";;;;;;;;;;;;;;;;AAuDO,MAAMA,IAAoB,CAAC,SAAS,UAAU,GAgI/CC,KAAoBC;AAAA,EACxB;AACF,GAEMC,KAAiBD,EAAI,4BAA4B,GAMjDE,KAAa,CAACC,MAClB,OAAO,OAAOA,CAAM,EAAE,KAAK,OAAO,GAE9BC,KAAkB,CAACD,MACvBL,EAAkB,KAAK,CAACO,MAAU,EAAQF,EAAOE,CAAK,CAAE,GAOpDC,KAAiB,CACrBC,MAEAT,EAAkB,KAAK,CAACO,MAAUE,EAASF,CAAK,CAAC,MAChDE,EAAS,OAAO,aAAa,SAUnBC,KAAYC;AAAA,EACvB,CACE;AAAA,IACE,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,UAAAC,IAAW;AAAA,IACX,YAAAC,IAAa;AAAA,IACb,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,QAAAb;AAAA,IACA,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