@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
|
@@ -8,7 +8,7 @@ import { c as lt } from "./compose-refs-C0k0tdqF.js";
|
|
|
8
8
|
import { u as dt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
9
9
|
import { u as ut } from "./use-dom-value-DTxHhQAN.js";
|
|
10
10
|
import { u as ft } from "./registry-DvAUVLHh.js";
|
|
11
|
-
import { I as pt } from "./icon-button-
|
|
11
|
+
import { I as pt } from "./icon-button-C_1TgRiK.js";
|
|
12
12
|
import { c as mt } from "./createLucideIcon-DhHxpK9K.js";
|
|
13
13
|
import { C as fe } from "./circle-alert-rGDZ73Wh.js";
|
|
14
14
|
import { C as pe } from "./circle-check-BN6rz4NV.js";
|
|
@@ -569,4 +569,4 @@ export {
|
|
|
569
569
|
he as i,
|
|
570
570
|
kt as w
|
|
571
571
|
};
|
|
572
|
-
//# sourceMappingURL=fiscal-code-input-
|
|
572
|
+
//# sourceMappingURL=fiscal-code-input-DwHb2nVW.js.map
|
package/dist/_chunks/{fiscal-code-input-BSWwda0C.js.map → fiscal-code-input-DwHb2nVW.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fiscal-code-input-BSWwda0C.js","sources":["../../node_modules/lucide-react/dist/esm/icons/calculator.mjs","../../src/components/fiscal-code-input/fiscal-code-input.agent.ts","../../src/components/fiscal-code-input/is-valid-codice-fiscale.ts","../../src/components/fiscal-code-input/calculate-codice-fiscale.ts","../../src/components/fiscal-code-input/fiscal-code-input.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"16\", height: \"20\", x: \"4\", y: \"2\", rx: \"2\", key: \"1nb95v\" }],\n [\"line\", { x1: \"8\", x2: \"16\", y1: \"6\", y2: \"6\", key: \"x4nwl0\" }],\n [\"line\", { x1: \"16\", x2: \"16\", y1: \"14\", y2: \"18\", key: \"wjye3r\" }],\n [\"path\", { d: \"M16 10h.01\", key: \"1m94wz\" }],\n [\"path\", { d: \"M12 10h.01\", key: \"1nrarc\" }],\n [\"path\", { d: \"M8 10h.01\", key: \"19clt8\" }],\n [\"path\", { d: \"M12 14h.01\", key: \"1etili\" }],\n [\"path\", { d: \"M8 14h.01\", key: \"6423bh\" }],\n [\"path\", { d: \"M12 18h.01\", key: \"mhygvu\" }],\n [\"path\", { d: \"M8 18h.01\", key: \"lrp35t\" }]\n];\nconst Calculator = createLucideIcon(\"calculator\", __iconNode);\n\nexport { __iconNode, Calculator as default };\n//# sourceMappingURL=calculator.mjs.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — FiscalCodeInput. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { FiscalCodeInputHandle } from './fiscal-code-input';\n\nexport const fiscalCodeInputAgent: AgentAdapter<FiscalCodeInputHandle> = {\n id: 'fiscal-code-input',\n capabilities: ['set_value'],\n state: {\n value: {\n type: 'string',\n descriptionKey: 'ui.agent.fiscalCodeInput.state.value',\n description:\n 'Current codice fiscale, normalised (uppercased, 0–16 [A-Z0-9] characters).',\n read: (handle) => handle.getValue(),\n },\n isValid: {\n type: 'boolean',\n descriptionKey: 'ui.agent.fiscalCodeInput.state.isValid',\n description:\n 'Whether the value is 16 structurally-sound characters with a matching control character.',\n read: (handle) => handle.isValid(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: string }',\n argsSchema: {\n type: 'object',\n properties: { value: { type: 'string' } },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.fiscalCodeInput.actions.setValue',\n description:\n 'Replace the codice fiscale. The value is uppercased and stripped to [A-Z0-9], capped at 16 characters.',\n examples: [\n {\n args: { value: 'RSSMRA85T10A562S' },\n note: 'A complete, structurally-sound codice fiscale.',\n },\n ],\n invoke: (handle, args: { value: string }) => {\n handle.setValue(args.value);\n },\n },\n clear: {\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.fiscalCodeInput.actions.clear',\n description: 'Empty the input. Loses any typed value.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n focus: {\n safety: 'read',\n descriptionKey: 'ui.agent.fiscalCodeInput.actions.focus',\n description: 'Move keyboard focus to the codice fiscale input.',\n invoke: (handle) => {\n handle.focus();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'fiscal-code-input',\n description: 'Marks the FiscalCodeInput wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Codice Fiscale (Italian fiscal code) — client-side structural + */\n/* control-character checksum validator. */\n/* */\n/* SCOPE: this is a CLIENT MIRROR of the platform's */\n/* ValidateFiscalCodeService used ONLY to give instant feedback. It */\n/* validates two things and nothing more: */\n/* 1. The structural shape — 15 alphanumerics followed by 1 control */\n/* letter, where each position obeys its letter/digit class. A */\n/* digit position also accepts its omocodia letter (L M N P Q R S */\n/* T U V stand for 0–9), so omocodic codes are recognised. */\n/* 2. The 16th control character, derived from the first 15 via the */\n/* official odd/even per-position weighted-sum mod-26 algorithm. */\n/* */\n/* OUT OF SCOPE (server stays source of truth): birth-date / comune */\n/* Belfiore-code cross-checks. Validity does not check the omocodia */\n/* substitution order (any digit position may hold a letter, as on the */\n/* server); only the omocodia HINT does. A structurally-correct code */\n/* with a valid control character */\n/* can still be rejected by the server — the client never hard-blocks */\n/* submit on its own verdict. */\n/* ------------------------------------------------------------------ */\n\n/** Outcome of a structural + checksum check on a candidate code. */\nexport type FiscalCodeReason =\n | 'empty'\n | 'incomplete'\n | 'badFormat'\n | 'badChecksum'\n | 'valid';\n\n/**\n * Position classes for the 15 informative characters. Positions are\n * 0-indexed. Letter positions accept A–Z; digit positions accept 0–9.\n * The 16th (control) character is a letter and validated separately.\n *\n * Standard layout: surname (0–2 letters), name (3–5 letters), year (6–7\n * digits), month (8 letter), day (9–10 digits), comune (11 letter +\n * 12–14 digits). Under omocodia a digit position may instead hold the\n * letter in OMOCODIA_LETTERS at that digit's index.\n */\nconst LETTER_POSITIONS = new Set([0, 1, 2, 3, 4, 5, 8, 11]);\nconst DIGIT_POSITIONS = new Set([6, 7, 9, 10, 12, 13, 14]);\n\n/**\n * Omocodia substitution letters, indexed by the digit they replace\n * (L=0, M=1, N=2, P=3, Q=4, R=5, S=6, T=7, U=8, V=9). When two people\n * would share a code, the Agenzia delle Entrate swaps digits for these\n * letters and recomputes the control character.\n */\nconst OMOCODIA_LETTERS = 'LMNPQRSTUV';\n\n/** Digit positions in official substitution order: rightmost first. */\nconst OMOCODIA_ORDER = [14, 13, 12, 10, 9, 7, 6] as const;\n\nconst ODD_MAP: Readonly<Record<string, number>> = Object.freeze({\n '0': 1,\n '1': 0,\n '2': 5,\n '3': 7,\n '4': 9,\n '5': 13,\n '6': 15,\n '7': 17,\n '8': 19,\n '9': 21,\n A: 1,\n B: 0,\n C: 5,\n D: 7,\n E: 9,\n F: 13,\n G: 15,\n H: 17,\n I: 19,\n J: 21,\n K: 2,\n L: 4,\n M: 18,\n N: 20,\n O: 11,\n P: 3,\n Q: 6,\n R: 8,\n S: 12,\n T: 14,\n U: 16,\n V: 10,\n W: 22,\n X: 25,\n Y: 24,\n Z: 23,\n});\n\nconst EVEN_MAP: Readonly<Record<string, number>> = Object.freeze({\n '0': 0,\n '1': 1,\n '2': 2,\n '3': 3,\n '4': 4,\n '5': 5,\n '6': 6,\n '7': 7,\n '8': 8,\n '9': 9,\n A: 0,\n B: 1,\n C: 2,\n D: 3,\n E: 4,\n F: 5,\n G: 6,\n H: 7,\n I: 8,\n J: 9,\n K: 10,\n L: 11,\n M: 12,\n N: 13,\n O: 14,\n P: 15,\n Q: 16,\n R: 17,\n S: 18,\n T: 19,\n U: 20,\n V: 21,\n W: 22,\n X: 23,\n Y: 24,\n Z: 25,\n});\n\nconst REMAINDER_TO_CONTROL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\nfunction isDigitChar(ch: string): boolean {\n return ch >= '0' && ch <= '9';\n}\n\n/** ASCII-only uppercase, like the server's `strtoupper`. */\nfunction toUpperAscii(raw: string): string {\n return raw.replace(/[a-z]/g, (ch) => ch.toUpperCase());\n}\n\n/**\n * True when every informative position matches its letter/digit class.\n * A digit position also accepts an omocodia letter.\n */\nfunction hasValidStructure(code: string): boolean {\n if (!/^[A-Z0-9]{15}[A-Z]$/.test(code)) return false;\n for (let i = 0; i < 15; i += 1) {\n const ch = code[i];\n if (LETTER_POSITIONS.has(i) && isDigitChar(ch)) return false;\n if (\n DIGIT_POSITIONS.has(i) &&\n !isDigitChar(ch) &&\n !OMOCODIA_LETTERS.includes(ch)\n ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * True when the code uses omocodia: omocodia letters replace digits.\n * - With a matching control character, any combination counts: the Agenzia\n * can assign all 128, so a valid code with letters out of order is still\n * a real omocodic code.\n * - With a wrong control character the letters must run leftwards from the\n * last digit, the order the Agenzia starts from; a stray letter elsewhere\n * is read as a typo. One letter in the last digit (S for 5) cannot be told\n * apart from a first substitution, so it counts.\n * Anything but 16 characters is false.\n */\nexport function isOmocodicCodiceFiscale(raw: string): boolean {\n if (raw.length !== 16) return false;\n const code = toUpperAscii(raw);\n if (!hasValidStructure(code)) return false;\n const letters = OMOCODIA_ORDER.filter((i) => !isDigitChar(code[i]));\n if (letters.length === 0) return false;\n if (computeControlChar(code.slice(0, 15)) === code[15]) return true;\n let seenDigit = false;\n for (const i of OMOCODIA_ORDER) {\n if (isDigitChar(code[i])) seenDigit = true;\n else if (seenDigit) return false;\n }\n return true;\n}\n\n/**\n * Compute the expected 16th control character from the first 15\n * informative characters. The input MUST already be 15 uppercase\n * `[A-Z0-9]` characters (callers guard with `hasValidStructure`).\n */\nexport function computeControlChar(first15: string): string {\n let sum = 0;\n for (let i = 0; i < 15; i += 1) {\n const ch = first15[i];\n // Per the official spec, odd POSITIONS (1st, 3rd, … — i.e. 0-indexed\n // even i) use the ODD weight table; even positions use the EVEN table.\n sum += i % 2 === 0 ? ODD_MAP[ch] : EVEN_MAP[ch];\n }\n return REMAINDER_TO_CONTROL[sum % 26];\n}\n\n/**\n * Classify a candidate code. Like the server, lowercase letters are accepted\n * and nothing is stripped.\n *\n * - `empty` — no characters.\n * - `incomplete` — fewer than 16 characters.\n * - `badFormat` — more than 16 characters, or 16 that fail the\n * position-class pattern.\n * - `badChecksum` — 16 well-formed characters (omocodic or not) but the\n * control char is wrong.\n * - `valid` — structurally sound and the control char matches.\n */\nexport function classifyCodiceFiscale(raw: string): FiscalCodeReason {\n if (raw.length === 0) return 'empty';\n if (raw.length < 16) return 'incomplete';\n // The server rejects any length but 16; never judge a prefix.\n if (raw.length > 16) return 'badFormat';\n const code = toUpperAscii(raw);\n if (!hasValidStructure(code)) return 'badFormat';\n if (computeControlChar(code.slice(0, 15)) !== code[15]) return 'badChecksum';\n return 'valid';\n}\n\n/** Convenience boolean: structurally sound AND control character matches. */\nexport function isValidCodiceFiscale(raw: string): boolean {\n return classifyCodiceFiscale(raw) === 'valid';\n}\n","/* ------------------------------------------------------------------ */\n/* Codice Fiscale (Italian fiscal code) — client-side DERIVATION. */\n/* */\n/* SCOPE: a pure, self-contained function that computes the 16-char */\n/* codice fiscale from a person's identity data when the caller already */\n/* holds it. This is a CONVENIENCE so a form that knows surname / name */\n/* / birth date / sex / birthplace can pre-fill the field — the server */\n/* (ValidateFiscalCodeService) remains the source of truth. */\n/* */\n/* OUT OF SCOPE: municipality-name → Belfiore (cadastral) code lookup. */\n/* That mapping requires a ~8000-row table the kit must not bundle, so */\n/* the caller supplies the 4-character `belfioreCode` directly. */\n/* Omocodia digit-substitution (used only when two people would share a */\n/* code) is also out of scope — the base, non-omocodic code is emitted. */\n/* ------------------------------------------------------------------ */\n\nimport { computeControlChar } from './is-valid-codice-fiscale';\n\n/** Identity inputs needed to derive the (non-omocodic) codice fiscale. */\nexport interface CodiceFiscaleInput {\n /** Family name (cognome). Diacritics are folded; non-letters ignored. */\n surname: string;\n /** Given name (nome). Diacritics are folded; non-letters ignored. */\n name: string;\n /** Date of birth — a `Date` or an ISO `YYYY-MM-DD` (or full ISO) string. */\n birthDate: Date | string;\n /** Biological sex as recorded for the fiscal code: 'M' or 'F'. */\n sex: 'M' | 'F';\n /** 4-character cadastral / Belfiore code of the birthplace (e.g. H501). */\n belfioreCode: string;\n}\n\nconst VOWELS = new Set(['A', 'E', 'I', 'O', 'U']);\n\n/** Month → fiscal-code letter (Jan→A … Dec→T), 0-indexed by month. */\nconst MONTH_LETTERS = [\n 'A',\n 'B',\n 'C',\n 'D',\n 'E',\n 'H',\n 'L',\n 'M',\n 'P',\n 'R',\n 'S',\n 'T',\n] as const;\n\n/**\n * Fold a free-text name to bare uppercase A–Z: strip diacritics via NFD,\n * drop combining marks, uppercase, and keep only A–Z. Spaces / apostrophes\n * in compound names collapse away (the algorithm treats the name as one run\n * of letters).\n */\nfunction foldToLetters(input: string): string {\n return input\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .toUpperCase()\n .replace(/[^A-Z]/g, '');\n}\n\nfunction consonantsOf(letters: string): string {\n return [...letters].filter((c) => !VOWELS.has(c)).join('');\n}\n\nfunction vowelsOf(letters: string): string {\n return [...letters].filter((c) => VOWELS.has(c)).join('');\n}\n\n/**\n * Surname triple: consonants first, then vowels, right-padded with 'X'.\n * (e.g. \"Rossi\" → R S S; \"Fo\" → F O X.)\n */\nfunction surnameCode(surname: string): string {\n const letters = foldToLetters(surname);\n const code = consonantsOf(letters) + vowelsOf(letters);\n return (code + 'XXX').slice(0, 3);\n}\n\n/**\n * Name triple. With 4+ consonants, take the 1st, 3rd and 4th (the standard\n * \"skip the 2nd consonant\" rule); otherwise consonants then vowels,\n * right-padded with 'X'. (e.g. \"Mario\" → M R A; \"Maria\" → M RA → MRA;\n * \"Gianfranco\" → G F R.)\n */\nfunction nameCode(name: string): string {\n const letters = foldToLetters(name);\n const cons = consonantsOf(letters);\n if (cons.length >= 4) {\n return cons[0] + cons[2] + cons[3];\n }\n const code = cons + vowelsOf(letters);\n return (code + 'XXX').slice(0, 3);\n}\n\n/** Coerce a `Date` or ISO string to a `Date`; throws on an unparseable value. */\nfunction toDate(birthDate: Date | string): Date {\n const d = birthDate instanceof Date ? birthDate : new Date(birthDate);\n if (Number.isNaN(d.getTime())) {\n throw new Error(`calculateCodiceFiscale: invalid birthDate \"${birthDate}\"`);\n }\n return d;\n}\n\n/**\n * Two-digit zero-padded value. The fiscal code uses LOCAL calendar fields\n * (a birth date is a calendar date, not an instant), so we read the UTC\n * fields of a date-only ISO string consistently — see the date handling\n * below.\n */\nfunction pad2(n: number): string {\n return String(n).padStart(2, '0');\n}\n\n/**\n * Birth-date triple: 2-digit year + month letter + 2-digit day (+40 for\n * female). Returns the 5 characters `YYMDD`.\n *\n * Date fields are read in UTC so a date-only string like \"1980-01-01\"\n * (parsed by `Date` as UTC midnight) yields day 01 regardless of the\n * runtime timezone. Callers passing a `Date` built from local components\n * should construct it at UTC midnight (e.g. `new Date('1980-01-01')`).\n */\nfunction birthCode(birthDate: Date | string, sex: 'M' | 'F'): string {\n const d = toDate(birthDate);\n const yy = pad2(d.getUTCFullYear() % 100);\n const monthLetter = MONTH_LETTERS[d.getUTCMonth()];\n const day = d.getUTCDate() + (sex === 'F' ? 40 : 0);\n return yy + monthLetter + pad2(day);\n}\n\n/**\n * Compute the full 16-character (non-omocodic) codice fiscale from a\n * person's identity data. The caller supplies the 4-char Belfiore code of\n * the birthplace (the kit does not bundle the municipality table).\n *\n * Throws if `birthDate` is unparseable or `belfioreCode` is not 4\n * `[A-Z][0-9]{3}`-shaped characters — i.e. a letter followed by 3 digits,\n * the canonical Belfiore shape.\n */\nexport function calculateCodiceFiscale(input: CodiceFiscaleInput): string {\n const { surname, name, birthDate, sex, belfioreCode } = input;\n\n const belfiore = belfioreCode.trim().toUpperCase();\n if (!/^[A-Z][0-9]{3}$/.test(belfiore)) {\n throw new Error(\n `calculateCodiceFiscale: belfioreCode must be a letter + 3 digits (e.g. \"H501\"), got \"${belfioreCode}\"`,\n );\n }\n\n const first15 =\n surnameCode(surname) +\n nameCode(name) +\n birthCode(birthDate, sex) +\n belfiore;\n\n return first15 + computeControlChar(first15);\n}\n","import {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type ClipboardEvent,\n type CompositionEvent,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CircleAlert, CircleCheck, Calculator } from 'lucide-react';\nimport {\n FormFieldContext,\n useFormField,\n useFormFieldControlId,\n} from '../form-field/form-field-context';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT,\n INPUT_SURFACE_TEXT,\n INPUT_SURFACE_TONE,\n} from '../_shared/input-surface';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useDomValue } from '../_shared/use-dom-value';\nimport { useAgentRegistration } from '../../agent';\nimport { IconButton } from '../button';\nimport { fiscalCodeInputAgent } from './fiscal-code-input.agent';\nimport {\n classifyCodiceFiscale,\n isOmocodicCodiceFiscale,\n type FiscalCodeReason,\n} from './is-valid-codice-fiscale';\nimport {\n calculateCodiceFiscale,\n type CodiceFiscaleInput,\n} from './calculate-codice-fiscale';\n\n/** Agent-readiness curated handle for FiscalCodeInput. */\nexport interface FiscalCodeInputHandle {\n getValue: () => string;\n setValue: (value: string) => void;\n clear: () => void;\n focus: () => void;\n isValid: () => boolean;\n}\n\n/** Structured payload emitted on every keystroke alongside the raw value. */\nexport interface FiscalCodeChangeMeta {\n /** Structurally sound AND control character matches (always 16 chars). */\n isValid: boolean;\n /** Whether all 16 characters are present (regardless of validity). */\n isComplete: boolean;\n /** Why the value is (in)valid — drives consumer messaging. */\n reason: FiscalCodeReason;\n /**\n * Omocodia: omocodia letters replace digits. A valid code counts whatever the\n * order. With a wrong control character the letters must run leftwards from the\n * last digit, so a stray letter reads as a typo; that case is still true, so a\n * host can say \"looks like omocodia\" too.\n */\n isOmocodic: boolean;\n}\n\nexport interface FiscalCodeInputProps {\n /** Controlled value (raw, uppercased, no spaces). Pair with onChange. */\n value?: string;\n /** Uncontrolled initial value. Normalised on mount. */\n defaultValue?: string;\n /** Fires on every keystroke with the normalised raw string + meta. */\n onChange?: (raw: string, meta: FiscalCodeChangeMeta) => void;\n size?: 'sm' | 'md' | 'lg';\n tone?: 'default' | 'error';\n /** When the invalid tone + error string surface. Never marks partial input invalid. */\n validateOn?: 'change' | 'blur' | 'submit';\n /** Controlled escape hatch to force the invalid state (e.g. server rejection). */\n showError?: boolean;\n /** Overrides the kit's default i18n error string. */\n errorMessage?: string;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n placeholder?: string;\n /** Render the \"16 characters\" caption when NOT inside a FormField. */\n showFormatHint?: boolean;\n /**\n * OPT-IN. When the consuming form already holds the person's identity\n * data, supply it here to render an inline \"calculate\" affordance: a\n * small icon button that derives the codice fiscale and fills the field.\n * The caller supplies the 4-char `belfioreCode` of the birthplace — the\n * kit does not bundle the municipality lookup table. Omit to render\n * nothing extra (no behavioural change). Ignored when readOnly/disabled.\n */\n calculateFrom?: CodiceFiscaleInput;\n id?: string;\n name?: string;\n className?: string;\n 'aria-label'?: string;\n}\n\nconst MAX_LEN = 16;\n\nconst wrapperVariants = cva(\n ['ds:relative ds:flex ds:items-center ds:w-full', INPUT_SURFACE_CHROME].join(\n ' ',\n ),\n {\n variants: {\n size: {\n sm: INPUT_SURFACE_HEIGHT.sm,\n md: INPUT_SURFACE_HEIGHT.md,\n lg: INPUT_SURFACE_HEIGHT.lg,\n },\n tone: {\n default: INPUT_SURFACE_TONE.default,\n error: `${INPUT_SURFACE_TONE.error} ds:focus-within:outline-destructive`,\n },\n },\n defaultVariants: { size: 'md', tone: 'default' },\n },\n);\n\nconst inputVariants = cva(\n [\n // dir=\"ltr\" + tabular-nums keep the alphanumeric code rendering\n // left-to-right and evenly spaced even under an RTL/CJK surrounding\n // UI — this is a value-RENDERING concern (the code is never mirrored),\n // not a layout-direction violation, so logical-prop rules don't apply\n // to the code glyphs themselves.\n 'ds:w-full ds:min-w-0 ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground',\n 'ds:border-0 ds:outline-none ds:tabular-nums ds:uppercase ds:tracking-wide',\n 'ds:disabled:cursor-not-allowed',\n 'ds:read-only:cursor-default',\n ].join(' '),\n {\n variants: {\n size: {\n sm: `ds:pe-3 ${INPUT_SURFACE_TEXT.sm}`,\n md: `ds:pe-3 ${INPUT_SURFACE_TEXT.md}`,\n lg: `ds:pe-4 ${INPUT_SURFACE_TEXT.lg}`,\n },\n // When the calculate affordance is shown, the input text starts after\n // the inline-start icon button (mirrors `hasEnd`'s pe-10 reservation).\n hasStart: {\n true: 'ds:ps-10',\n false: '',\n },\n hasEnd: {\n true: 'ds:pe-10',\n false: '',\n },\n },\n compoundVariants: [\n { size: 'sm', hasStart: false, class: 'ds:ps-3' },\n { size: 'md', hasStart: false, class: 'ds:ps-3' },\n { size: 'lg', hasStart: false, class: 'ds:ps-4' },\n ],\n defaultVariants: { size: 'md', hasStart: false, hasEnd: false },\n },\n);\n\nconst adornmentEnd =\n 'ds:absolute ds:inset-y-0 ds:end-0 ds:pe-3 ds:flex ds:items-center ds:pointer-events-none ds:[&_svg]:size-4';\n\n// Inline-start wrapper for the calculate icon button. Positioned over the\n// reserved `ps-10` gutter; the button itself remains pointer-interactive.\nconst adornmentStart =\n 'ds:absolute ds:inset-y-0 ds:start-0 ds:ps-1 ds:flex ds:items-center';\n\nconst captionBase = 'type-body-sm ds:mt-[var(--spacing-xs)]';\n\n// Caption with a leading icon. The icon box is one line tall so it stays on\n// the first line when a long message (e.g. the omocodia ones) wraps.\nconst captionWithIcon = `${captionBase} ds:inline-flex ds:items-start ds:gap-[var(--spacing-xs)]`;\nconst captionIconBox =\n 'ds:flex ds:h-[1lh] ds:shrink-0 ds:items-center ds:[&_svg]:size-4';\n\n/** Uppercase, strip non-[A-Z0-9], normalise full-width / Eastern-Arabic\n * digits, and cap at 16 characters. */\nfunction normaliseFiscalCode(input: string): string {\n return (\n input\n .normalize('NFKC')\n // Eastern-Arabic & Extended-Arabic-Indic digits → ASCII (otp-input precedent).\n .replace(/[٠-٩]/g, (c) => String(c.charCodeAt(0) - 0x0660))\n .replace(/[۰-۹]/g, (c) => String(c.charCodeAt(0) - 0x06f0))\n .toUpperCase()\n .replace(/[^A-Z0-9]/g, '')\n .slice(0, MAX_LEN)\n );\n}\n\n/** Count [A-Z0-9] characters before `position` in the RAW (pre-normalise)\n * string, so the caret can be restored after re-normalising. */\nfunction countKeptBefore(str: string, position: number): number {\n let kept = 0;\n for (let i = 0; i < position && i < str.length; i += 1) {\n const c = str[i];\n if (\n (c >= '0' && c <= '9') ||\n (c >= 'A' && c <= 'Z') ||\n (c >= 'a' && c <= 'z')\n ) {\n kept += 1;\n }\n }\n return kept;\n}\n\nexport const FiscalCodeInput = forwardRef<\n HTMLInputElement,\n FiscalCodeInputProps\n>(function FiscalCodeInput(\n {\n value,\n defaultValue,\n onChange,\n size = 'md',\n tone = 'default',\n validateOn = 'blur',\n showError,\n errorMessage,\n disabled,\n readOnly,\n required,\n placeholder,\n showFormatHint = true,\n calculateFrom,\n id,\n name,\n className,\n 'aria-label': ariaLabel,\n },\n ref,\n) {\n const { t } = useTranslation('ui');\n const ctx = useFormField();\n const inFormField = useContext(FormFieldContext) !== null;\n\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<string>(() =>\n normaliseFiscalCode(defaultValue ?? ''),\n );\n const currentValue = isControlled\n ? normaliseFiscalCode(value ?? '')\n : internalValue;\n\n const [blurred, setBlurred] = useState(false);\n const composingRef = useRef(false);\n const pendingCaretRef = useRef<number | null>(null);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const composedRef = composeRefs(ref, inputRef);\n // The code is written to the input's DOM property, never to its `value`\n // attribute, where a copied outerHTML or a session replay could read it.\n // Paused mid-composition; declared before the caret effect below.\n const syncInput = useDomValue(inputRef, currentValue, composingRef);\n\n const reactId = useId();\n const generatedHintId = `${reactId}-hint`;\n const generatedStatusId = `${reactId}-status`;\n const generatedErrorId = `${reactId}-error`;\n\n // DEV-time guard: a standalone field with no visible label needs an\n // aria-label, mirroring Button's icon-only guard. No-op in production.\n useEffect(() => {\n const isDev =\n typeof import.meta !== 'undefined' &&\n typeof import.meta.env !== 'undefined' &&\n import.meta.env.DEV === true;\n if (isDev && !inFormField && !ariaLabel) {\n // eslint-disable-next-line no-console\n console.warn(\n '[FiscalCodeInput] No FormField/label and no `aria-label` — the field has no accessible name. Wrap it in a FormField or pass `aria-label`.',\n );\n }\n }, [inFormField, ariaLabel]);\n\n const reason = useMemo(\n () => classifyCodiceFiscale(currentValue),\n [currentValue],\n );\n const isComplete = currentValue.length === MAX_LEN;\n const isValid = reason === 'valid';\n const isOmocodic = useMemo(\n () => isOmocodicCodiceFiscale(currentValue),\n [currentValue],\n );\n\n const effectiveDisabled =\n (inFormField ? ctx.disabled : false) || Boolean(disabled);\n const effectiveRequired =\n (inFormField ? ctx.required : false) || Boolean(required);\n\n // Whether the component's OWN feedback should surface.\n //\n // `showError` is a controlled escape hatch (e.g. the server rejected the\n // code on submit): it forces the error regardless of completeness or the\n // client's own verdict. Otherwise the client only flags a COMPLETE\n // (16-char) code that fails its structural/checksum check — never a\n // partially-typed code — and `validateOn` governs the trigger.\n const ownFeedbackActive =\n !readOnly &&\n (Boolean(showError) ||\n (isComplete &&\n !isValid &&\n (validateOn === 'change' || (validateOn === 'blur' && blurred))));\n\n // When inside a FormField with its own error, FormField's role=alert wins\n // and this component stays silent (no double message / duplicate\n // aria-describedby target).\n const formFieldHasError = inFormField && ctx.invalid;\n const showOwnError = ownFeedbackActive && !formFieldHasError;\n\n const effectiveInvalid = formFieldHasError || showOwnError;\n const effectiveTone: 'default' | 'error' =\n effectiveInvalid || tone === 'error' ? 'error' : 'default';\n\n const ownErrorText = useMemo(() => {\n if (errorMessage) return errorMessage;\n // An omocodic code with a wrong control character gets its own message:\n // \"omocodia\" is what staff suspect, so confirm it and point at the typo.\n if (reason === 'badChecksum' && isOmocodic) {\n return t('inputs.fiscalCode.errorChecksumOmocodia');\n }\n // `valid` only reaches here through `showError` (e.g. a server\n // rejection): the characters are what the user can re-check.\n if (reason === 'badChecksum' || reason === 'valid') {\n return t('inputs.fiscalCode.errorChecksum');\n }\n if (reason === 'badFormat') return t('inputs.fiscalCode.errorFormat');\n return t('inputs.fiscalCode.errorIncomplete');\n }, [errorMessage, reason, isOmocodic, t]);\n\n // Standalone (no FormField) describedby: format hint + the live region that\n // is currently surfacing. When the component is showing its OWN error we\n // point at the assertive error node; otherwise at the polite status node\n // (valid affordance / typing progress). Inside a FormField, the FormField\n // owns describedBy entirely.\n const wantsHint = !inFormField && showFormatHint && !readOnly;\n const standaloneDescribedBy = inFormField\n ? undefined\n : [\n wantsHint ? generatedHintId : null,\n showOwnError ? generatedErrorId : generatedStatusId,\n ]\n .filter(Boolean)\n .join(' ') || undefined;\n const describedBy = inFormField\n ? ctx.describedBy || undefined\n : standaloneDescribedBy;\n\n const inputId = useFormFieldControlId(ctx, id);\n\n const emit = useCallback(\n (next: string) => {\n const nextReason = classifyCodiceFiscale(next);\n onChange?.(next, {\n isValid: nextReason === 'valid',\n isComplete: next.length === MAX_LEN,\n reason: nextReason,\n isOmocodic: isOmocodicCodiceFiscale(next),\n });\n },\n [onChange],\n );\n\n const commit = useCallback(\n (next: string) => {\n if (!isControlled) setInternalValue(next);\n emit(next);\n },\n [isControlled, emit],\n );\n\n // Restore caret after a normalising re-render that may have changed the\n // string length (mid-string edit / paste). Mirrors phone-input's caret\n // discipline.\n useIsomorphicLayoutEffect(() => {\n if (pendingCaretRef.current == null) return;\n const pos = pendingCaretRef.current;\n pendingCaretRef.current = null;\n const node = inputRef.current;\n if (node && document.activeElement === node) {\n // Re-clamp against the value the input ACTUALLY rendered this pass, not\n // the value we committed: a controlled parent may transform or reject\n // the emitted change so the echoed value diverges. Clamping to the live\n // DOM length keeps the caret inside the rendered string.\n const safePos = Math.min(pos, node.value.length);\n node.setSelectionRange(safePos, safePos);\n }\n });\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n if (readOnly) return;\n // Don't re-mask mid-IME composition or the user loses input; the\n // uppercase mask is re-applied on composition end / next change.\n if (composingRef.current) return;\n const target = event.target;\n const raw = target.value;\n const caret = target.selectionStart ?? raw.length;\n const keptBefore = countKeptBefore(raw, caret);\n const next = normaliseFiscalCode(raw);\n pendingCaretRef.current = Math.min(keptBefore, next.length);\n commit(next);\n // A character the mask drops leaves the value as it was, so no render\n // follows: ask for one, to take the dropped character out.\n syncInput();\n };\n\n const handleCompositionStart = () => {\n composingRef.current = true;\n };\n\n const handleCompositionEnd = (event: CompositionEvent<HTMLInputElement>) => {\n composingRef.current = false;\n if (readOnly) return;\n const next = normaliseFiscalCode(event.currentTarget.value);\n pendingCaretRef.current = next.length;\n commit(next);\n syncInput();\n };\n\n const handlePaste = (event: ClipboardEvent<HTMLInputElement>) => {\n if (readOnly) return;\n const text = event.clipboardData.getData('text');\n event.preventDefault();\n const node = inputRef.current;\n const selStart = node?.selectionStart ?? currentValue.length;\n const selEnd = node?.selectionEnd ?? currentValue.length;\n const cleaned = normaliseFiscalCode(text);\n const before = currentValue.slice(0, selStart);\n const after = currentValue.slice(selEnd);\n const next = normaliseFiscalCode(before + cleaned + after);\n pendingCaretRef.current = Math.min((before + cleaned).length, next.length);\n commit(next);\n };\n\n const handleBlur = () => {\n if (validateOn === 'blur') setBlurred(true);\n };\n\n // Opt-in derivation. Compute the CF from the supplied identity data and\n // route it through the SAME commit path as typing/paste so the controlled\n // / uncontrolled contract, the validation verdict, and the live-region\n // announcement all behave identically to a user-entered value.\n const handleCalculate = () => {\n if (!calculateFrom || readOnly || effectiveDisabled) return;\n let computed: string;\n try {\n computed = calculateCodiceFiscale(calculateFrom);\n } catch {\n // Bad identity data (unparseable date / malformed Belfiore code) is a\n // caller error, not a user action — fail quietly rather than throwing\n // out of an event handler and leave the field untouched.\n return;\n }\n const next = normaliseFiscalCode(computed);\n // After a successful derivation the value is complete: let blur-gated\n // validation surface immediately (the derived code is valid by\n // construction, so this confirms rather than errors).\n if (validateOn === 'blur') setBlurred(true);\n commit(next);\n inputRef.current?.focus();\n };\n\n const agentHandle = useMemo<FiscalCodeInputHandle>(\n () => ({\n getValue: () => currentValue,\n setValue: (next) => {\n const normalised = normaliseFiscalCode(next);\n if (!isControlled) setInternalValue(normalised);\n emit(normalised);\n inputRef.current?.focus();\n },\n clear: () => {\n if (!isControlled) setInternalValue('');\n emit('');\n inputRef.current?.focus();\n },\n focus: () => inputRef.current?.focus(),\n isValid: () => classifyCodiceFiscale(currentValue) === 'valid',\n }),\n [currentValue, isControlled, emit],\n );\n useAgentRegistration(fiscalCodeInputAgent, agentHandle, id);\n\n const resolvedPlaceholder = placeholder ?? t('inputs.fiscalCode.placeholder');\n\n // Polite status text (role=status). Carries ONLY non-error affordances:\n // the valid confirmation and, while typing an incomplete code, the live\n // character-count progress. Errors the user must act on are announced\n // assertively via the separate role=alert node below — never here.\n // Gated on !inFormField (matching showEndIcon): inside a FormField the\n // FormField owns every helper/status/error slot, so this stays silent.\n // A forced error (showError on a client-valid code) hides the valid\n // confirmation, so the field never says \"valid\" next to an error.\n const showValidStatus = isValid && !showOwnError;\n const statusMessage =\n readOnly || inFormField\n ? ''\n : showValidStatus\n ? isOmocodic\n ? t('inputs.fiscalCode.validOmocodia')\n : t('inputs.fiscalCode.valid')\n : currentValue.length > 0 && !isComplete\n ? t('inputs.fiscalCode.charactersEntered', {\n count: currentValue.length,\n })\n : '';\n\n // Assertive error text (role=alert) — surfaces only the component's own\n // actionable validation error, mirroring FormField's error <p>.\n const errorText = showOwnError ? ownErrorText : '';\n\n const showEndIcon = !readOnly && (showOwnError || (isValid && !inFormField));\n\n // Opt-in calculate affordance: only when identity data is supplied AND the\n // field is editable. Disabled/read-only fields render nothing extra.\n const showCalculate =\n Boolean(calculateFrom) && !readOnly && !effectiveDisabled;\n\n return (\n <div\n className=\"ds:flex ds:flex-col\"\n data-component=\"fiscal-code-input\"\n data-component-id={id}\n >\n {/* The box keeps the page direction so logical classes in `className`\n resolve as the host expects. The input and icons are dir=\"ltr\" so\n under RTL the icons sit over the input's padding, not the code. */}\n <div\n data-slot=\"fiscal-code-input\"\n className={wrapperVariants({ size, tone: effectiveTone, className })}\n >\n {showCalculate ? (\n <span dir=\"ltr\" className={adornmentStart}>\n <IconButton\n type=\"button\"\n size=\"sm\"\n intent=\"ghost\"\n icon={<Calculator />}\n aria-label={t('inputs.fiscalCode.calculate')}\n onClick={handleCalculate}\n />\n </span>\n ) : null}\n <input\n ref={composedRef}\n id={inputId}\n name={name}\n // dir=\"ltr\": the codice fiscale glyphs render LTR even under an\n // RTL surrounding UI — a value-rendering concern, not a layout\n // direction violation (see inputVariants comment).\n dir=\"ltr\"\n type=\"text\"\n inputMode=\"text\"\n autoCapitalize=\"characters\"\n autoCorrect=\"off\"\n autoComplete=\"off\"\n spellCheck={false}\n maxLength={MAX_LEN}\n // Loose structural mirror: 15 [A-Z0-9] + a final letter control\n // char (value is always uppercased). The real position-class /\n // omocodia / checksum rule is enforced in classifyCodiceFiscale;\n // this native pattern is only a non-JS fallback.\n pattern=\"[A-Z0-9]{15}[A-Z]\"\n placeholder={resolvedPlaceholder}\n disabled={effectiveDisabled}\n readOnly={readOnly}\n aria-label={ariaLabel}\n aria-describedby={describedBy}\n aria-invalid={effectiveInvalid || undefined}\n aria-required={effectiveRequired || undefined}\n onChange={handleChange}\n onCompositionStart={handleCompositionStart}\n onCompositionEnd={handleCompositionEnd}\n onPaste={handlePaste}\n onBlur={handleBlur}\n className={inputVariants({\n size,\n hasStart: showCalculate,\n hasEnd: showEndIcon,\n })}\n />\n {showEndIcon ? (\n <span\n aria-hidden=\"true\"\n dir=\"ltr\"\n className={`${adornmentEnd} ${\n showOwnError ? 'ds:text-destructive' : 'ds:text-success'\n }`}\n >\n {showOwnError ? <CircleAlert /> : <CircleCheck />}\n </span>\n ) : null}\n </div>\n\n {wantsHint ? (\n <p\n id={generatedHintId}\n className={`${captionBase} ds:text-muted-foreground`}\n >\n {t('inputs.fiscalCode.formatHint')}\n </p>\n ) : null}\n\n {/* Polite live region (role=status): announces the valid affordance\n and the typing-progress count as TEXT, satisfying 1.4.1 (never\n colour-only). Never carries an actionable error — that goes to the\n assertive node below, mirroring the kit's input-error convention. */}\n <p\n id={generatedStatusId}\n role=\"status\"\n aria-live=\"polite\"\n className={`${captionWithIcon} ${\n showValidStatus ? 'ds:text-success' : 'ds:text-muted-foreground'\n } ${statusMessage ? '' : 'ds:sr-only'}`}\n >\n {statusMessage ? (\n <>\n {showValidStatus ? (\n <span aria-hidden=\"true\" className={captionIconBox}>\n <CircleCheck />\n </span>\n ) : null}\n <span>{statusMessage}</span>\n </>\n ) : null}\n </p>\n\n {/* Assertive error region (role=alert): a validation error the user\n must correct is announced assertively, mirroring FormField's error\n <p> (form-field.tsx). Rendered only when the component owns the\n error — inside a FormField, FormField's role=alert wins. */}\n {errorText ? (\n <p\n id={generatedErrorId}\n role=\"alert\"\n className={`${captionWithIcon} ds:text-destructive`}\n >\n <span aria-hidden=\"true\" className={captionIconBox}>\n <CircleAlert />\n </span>\n <span>{errorText}</span>\n </p>\n ) : null}\n </div>\n );\n});\n\nFiscalCodeInput.displayName = 'FiscalCodeInput';\n\nexport { wrapperVariants as fiscalCodeWrapperVariants };\n"],"names":["__iconNode","Calculator","createLucideIcon","fiscalCodeInputAgent","handle","args","LETTER_POSITIONS","DIGIT_POSITIONS","OMOCODIA_LETTERS","OMOCODIA_ORDER","ODD_MAP","EVEN_MAP","REMAINDER_TO_CONTROL","isDigitChar","ch","toUpperAscii","raw","hasValidStructure","code","i","isOmocodicCodiceFiscale","computeControlChar","seenDigit","first15","sum","classifyCodiceFiscale","isValidCodiceFiscale","VOWELS","MONTH_LETTERS","foldToLetters","input","consonantsOf","letters","c","vowelsOf","surnameCode","surname","nameCode","name","cons","toDate","birthDate","d","pad2","n","birthCode","sex","yy","monthLetter","day","calculateCodiceFiscale","belfioreCode","belfiore","MAX_LEN","wrapperVariants","cva","INPUT_SURFACE_CHROME","INPUT_SURFACE_HEIGHT","INPUT_SURFACE_TONE","inputVariants","INPUT_SURFACE_TEXT","adornmentEnd","adornmentStart","captionBase","captionWithIcon","captionIconBox","normaliseFiscalCode","countKeptBefore","str","position","kept","FiscalCodeInput","forwardRef","value","defaultValue","onChange","size","tone","validateOn","showError","errorMessage","disabled","readOnly","required","placeholder","showFormatHint","calculateFrom","id","className","ariaLabel","ref","t","useTranslation","ctx","useFormField","inFormField","useContext","FormFieldContext","isControlled","internalValue","setInternalValue","useState","currentValue","blurred","setBlurred","composingRef","useRef","pendingCaretRef","inputRef","composedRef","composeRefs","syncInput","useDomValue","reactId","useId","generatedHintId","generatedStatusId","generatedErrorId","useEffect","reason","useMemo","isComplete","isValid","isOmocodic","effectiveDisabled","effectiveRequired","ownFeedbackActive","formFieldHasError","showOwnError","effectiveInvalid","effectiveTone","ownErrorText","wantsHint","standaloneDescribedBy","describedBy","inputId","useFormFieldControlId","emit","useCallback","next","nextReason","commit","useIsomorphicLayoutEffect","pos","node","safePos","handleChange","event","target","caret","keptBefore","handleCompositionStart","handleCompositionEnd","handlePaste","text","selStart","selEnd","cleaned","before","after","handleBlur","handleCalculate","computed","_a","agentHandle","normalised","useAgentRegistration","resolvedPlaceholder","showValidStatus","statusMessage","errorText","showEndIcon","showCalculate","jsxs","jsx","IconButton","CircleAlert","CircleCheck","Fragment"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,MAAM,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC9E,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC/D,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAClE,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAAA,EAC3C,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAAA,EAC3C,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAAA,EAC3C,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAAA,EAC3C,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAC5C,GACMC,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AF,EAAC,UAAM,UAAAJ,IAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,IAEjB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;AAEDnG,GAAgB,cAAc;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"fiscal-code-input-DwHb2nVW.js","sources":["../../node_modules/lucide-react/dist/esm/icons/calculator.mjs","../../src/components/fiscal-code-input/fiscal-code-input.agent.ts","../../src/components/fiscal-code-input/is-valid-codice-fiscale.ts","../../src/components/fiscal-code-input/calculate-codice-fiscale.ts","../../src/components/fiscal-code-input/fiscal-code-input.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"16\", height: \"20\", x: \"4\", y: \"2\", rx: \"2\", key: \"1nb95v\" }],\n [\"line\", { x1: \"8\", x2: \"16\", y1: \"6\", y2: \"6\", key: \"x4nwl0\" }],\n [\"line\", { x1: \"16\", x2: \"16\", y1: \"14\", y2: \"18\", key: \"wjye3r\" }],\n [\"path\", { d: \"M16 10h.01\", key: \"1m94wz\" }],\n [\"path\", { d: \"M12 10h.01\", key: \"1nrarc\" }],\n [\"path\", { d: \"M8 10h.01\", key: \"19clt8\" }],\n [\"path\", { d: \"M12 14h.01\", key: \"1etili\" }],\n [\"path\", { d: \"M8 14h.01\", key: \"6423bh\" }],\n [\"path\", { d: \"M12 18h.01\", key: \"mhygvu\" }],\n [\"path\", { d: \"M8 18h.01\", key: \"lrp35t\" }]\n];\nconst Calculator = createLucideIcon(\"calculator\", __iconNode);\n\nexport { __iconNode, Calculator as default };\n//# sourceMappingURL=calculator.mjs.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — FiscalCodeInput. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { FiscalCodeInputHandle } from './fiscal-code-input';\n\nexport const fiscalCodeInputAgent: AgentAdapter<FiscalCodeInputHandle> = {\n id: 'fiscal-code-input',\n capabilities: ['set_value'],\n state: {\n value: {\n type: 'string',\n descriptionKey: 'ui.agent.fiscalCodeInput.state.value',\n description:\n 'Current codice fiscale, normalised (uppercased, 0–16 [A-Z0-9] characters).',\n read: (handle) => handle.getValue(),\n },\n isValid: {\n type: 'boolean',\n descriptionKey: 'ui.agent.fiscalCodeInput.state.isValid',\n description:\n 'Whether the value is 16 structurally-sound characters with a matching control character.',\n read: (handle) => handle.isValid(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: string }',\n argsSchema: {\n type: 'object',\n properties: { value: { type: 'string' } },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.fiscalCodeInput.actions.setValue',\n description:\n 'Replace the codice fiscale. The value is uppercased and stripped to [A-Z0-9], capped at 16 characters.',\n examples: [\n {\n args: { value: 'RSSMRA85T10A562S' },\n note: 'A complete, structurally-sound codice fiscale.',\n },\n ],\n invoke: (handle, args: { value: string }) => {\n handle.setValue(args.value);\n },\n },\n clear: {\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.fiscalCodeInput.actions.clear',\n description: 'Empty the input. Loses any typed value.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n focus: {\n safety: 'read',\n descriptionKey: 'ui.agent.fiscalCodeInput.actions.focus',\n description: 'Move keyboard focus to the codice fiscale input.',\n invoke: (handle) => {\n handle.focus();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'fiscal-code-input',\n description: 'Marks the FiscalCodeInput wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Codice Fiscale (Italian fiscal code) — client-side structural + */\n/* control-character checksum validator. */\n/* */\n/* SCOPE: this is a CLIENT MIRROR of the platform's */\n/* ValidateFiscalCodeService used ONLY to give instant feedback. It */\n/* validates two things and nothing more: */\n/* 1. The structural shape — 15 alphanumerics followed by 1 control */\n/* letter, where each position obeys its letter/digit class. A */\n/* digit position also accepts its omocodia letter (L M N P Q R S */\n/* T U V stand for 0–9), so omocodic codes are recognised. */\n/* 2. The 16th control character, derived from the first 15 via the */\n/* official odd/even per-position weighted-sum mod-26 algorithm. */\n/* */\n/* OUT OF SCOPE (server stays source of truth): birth-date / comune */\n/* Belfiore-code cross-checks. Validity does not check the omocodia */\n/* substitution order (any digit position may hold a letter, as on the */\n/* server); only the omocodia HINT does. A structurally-correct code */\n/* with a valid control character */\n/* can still be rejected by the server — the client never hard-blocks */\n/* submit on its own verdict. */\n/* ------------------------------------------------------------------ */\n\n/** Outcome of a structural + checksum check on a candidate code. */\nexport type FiscalCodeReason =\n | 'empty'\n | 'incomplete'\n | 'badFormat'\n | 'badChecksum'\n | 'valid';\n\n/**\n * Position classes for the 15 informative characters. Positions are\n * 0-indexed. Letter positions accept A–Z; digit positions accept 0–9.\n * The 16th (control) character is a letter and validated separately.\n *\n * Standard layout: surname (0–2 letters), name (3–5 letters), year (6–7\n * digits), month (8 letter), day (9–10 digits), comune (11 letter +\n * 12–14 digits). Under omocodia a digit position may instead hold the\n * letter in OMOCODIA_LETTERS at that digit's index.\n */\nconst LETTER_POSITIONS = new Set([0, 1, 2, 3, 4, 5, 8, 11]);\nconst DIGIT_POSITIONS = new Set([6, 7, 9, 10, 12, 13, 14]);\n\n/**\n * Omocodia substitution letters, indexed by the digit they replace\n * (L=0, M=1, N=2, P=3, Q=4, R=5, S=6, T=7, U=8, V=9). When two people\n * would share a code, the Agenzia delle Entrate swaps digits for these\n * letters and recomputes the control character.\n */\nconst OMOCODIA_LETTERS = 'LMNPQRSTUV';\n\n/** Digit positions in official substitution order: rightmost first. */\nconst OMOCODIA_ORDER = [14, 13, 12, 10, 9, 7, 6] as const;\n\nconst ODD_MAP: Readonly<Record<string, number>> = Object.freeze({\n '0': 1,\n '1': 0,\n '2': 5,\n '3': 7,\n '4': 9,\n '5': 13,\n '6': 15,\n '7': 17,\n '8': 19,\n '9': 21,\n A: 1,\n B: 0,\n C: 5,\n D: 7,\n E: 9,\n F: 13,\n G: 15,\n H: 17,\n I: 19,\n J: 21,\n K: 2,\n L: 4,\n M: 18,\n N: 20,\n O: 11,\n P: 3,\n Q: 6,\n R: 8,\n S: 12,\n T: 14,\n U: 16,\n V: 10,\n W: 22,\n X: 25,\n Y: 24,\n Z: 23,\n});\n\nconst EVEN_MAP: Readonly<Record<string, number>> = Object.freeze({\n '0': 0,\n '1': 1,\n '2': 2,\n '3': 3,\n '4': 4,\n '5': 5,\n '6': 6,\n '7': 7,\n '8': 8,\n '9': 9,\n A: 0,\n B: 1,\n C: 2,\n D: 3,\n E: 4,\n F: 5,\n G: 6,\n H: 7,\n I: 8,\n J: 9,\n K: 10,\n L: 11,\n M: 12,\n N: 13,\n O: 14,\n P: 15,\n Q: 16,\n R: 17,\n S: 18,\n T: 19,\n U: 20,\n V: 21,\n W: 22,\n X: 23,\n Y: 24,\n Z: 25,\n});\n\nconst REMAINDER_TO_CONTROL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\nfunction isDigitChar(ch: string): boolean {\n return ch >= '0' && ch <= '9';\n}\n\n/** ASCII-only uppercase, like the server's `strtoupper`. */\nfunction toUpperAscii(raw: string): string {\n return raw.replace(/[a-z]/g, (ch) => ch.toUpperCase());\n}\n\n/**\n * True when every informative position matches its letter/digit class.\n * A digit position also accepts an omocodia letter.\n */\nfunction hasValidStructure(code: string): boolean {\n if (!/^[A-Z0-9]{15}[A-Z]$/.test(code)) return false;\n for (let i = 0; i < 15; i += 1) {\n const ch = code[i];\n if (LETTER_POSITIONS.has(i) && isDigitChar(ch)) return false;\n if (\n DIGIT_POSITIONS.has(i) &&\n !isDigitChar(ch) &&\n !OMOCODIA_LETTERS.includes(ch)\n ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * True when the code uses omocodia: omocodia letters replace digits.\n * - With a matching control character, any combination counts: the Agenzia\n * can assign all 128, so a valid code with letters out of order is still\n * a real omocodic code.\n * - With a wrong control character the letters must run leftwards from the\n * last digit, the order the Agenzia starts from; a stray letter elsewhere\n * is read as a typo. One letter in the last digit (S for 5) cannot be told\n * apart from a first substitution, so it counts.\n * Anything but 16 characters is false.\n */\nexport function isOmocodicCodiceFiscale(raw: string): boolean {\n if (raw.length !== 16) return false;\n const code = toUpperAscii(raw);\n if (!hasValidStructure(code)) return false;\n const letters = OMOCODIA_ORDER.filter((i) => !isDigitChar(code[i]));\n if (letters.length === 0) return false;\n if (computeControlChar(code.slice(0, 15)) === code[15]) return true;\n let seenDigit = false;\n for (const i of OMOCODIA_ORDER) {\n if (isDigitChar(code[i])) seenDigit = true;\n else if (seenDigit) return false;\n }\n return true;\n}\n\n/**\n * Compute the expected 16th control character from the first 15\n * informative characters. The input MUST already be 15 uppercase\n * `[A-Z0-9]` characters (callers guard with `hasValidStructure`).\n */\nexport function computeControlChar(first15: string): string {\n let sum = 0;\n for (let i = 0; i < 15; i += 1) {\n const ch = first15[i];\n // Per the official spec, odd POSITIONS (1st, 3rd, … — i.e. 0-indexed\n // even i) use the ODD weight table; even positions use the EVEN table.\n sum += i % 2 === 0 ? ODD_MAP[ch] : EVEN_MAP[ch];\n }\n return REMAINDER_TO_CONTROL[sum % 26];\n}\n\n/**\n * Classify a candidate code. Like the server, lowercase letters are accepted\n * and nothing is stripped.\n *\n * - `empty` — no characters.\n * - `incomplete` — fewer than 16 characters.\n * - `badFormat` — more than 16 characters, or 16 that fail the\n * position-class pattern.\n * - `badChecksum` — 16 well-formed characters (omocodic or not) but the\n * control char is wrong.\n * - `valid` — structurally sound and the control char matches.\n */\nexport function classifyCodiceFiscale(raw: string): FiscalCodeReason {\n if (raw.length === 0) return 'empty';\n if (raw.length < 16) return 'incomplete';\n // The server rejects any length but 16; never judge a prefix.\n if (raw.length > 16) return 'badFormat';\n const code = toUpperAscii(raw);\n if (!hasValidStructure(code)) return 'badFormat';\n if (computeControlChar(code.slice(0, 15)) !== code[15]) return 'badChecksum';\n return 'valid';\n}\n\n/** Convenience boolean: structurally sound AND control character matches. */\nexport function isValidCodiceFiscale(raw: string): boolean {\n return classifyCodiceFiscale(raw) === 'valid';\n}\n","/* ------------------------------------------------------------------ */\n/* Codice Fiscale (Italian fiscal code) — client-side DERIVATION. */\n/* */\n/* SCOPE: a pure, self-contained function that computes the 16-char */\n/* codice fiscale from a person's identity data when the caller already */\n/* holds it. This is a CONVENIENCE so a form that knows surname / name */\n/* / birth date / sex / birthplace can pre-fill the field — the server */\n/* (ValidateFiscalCodeService) remains the source of truth. */\n/* */\n/* OUT OF SCOPE: municipality-name → Belfiore (cadastral) code lookup. */\n/* That mapping requires a ~8000-row table the kit must not bundle, so */\n/* the caller supplies the 4-character `belfioreCode` directly. */\n/* Omocodia digit-substitution (used only when two people would share a */\n/* code) is also out of scope — the base, non-omocodic code is emitted. */\n/* ------------------------------------------------------------------ */\n\nimport { computeControlChar } from './is-valid-codice-fiscale';\n\n/** Identity inputs needed to derive the (non-omocodic) codice fiscale. */\nexport interface CodiceFiscaleInput {\n /** Family name (cognome). Diacritics are folded; non-letters ignored. */\n surname: string;\n /** Given name (nome). Diacritics are folded; non-letters ignored. */\n name: string;\n /** Date of birth — a `Date` or an ISO `YYYY-MM-DD` (or full ISO) string. */\n birthDate: Date | string;\n /** Biological sex as recorded for the fiscal code: 'M' or 'F'. */\n sex: 'M' | 'F';\n /** 4-character cadastral / Belfiore code of the birthplace (e.g. H501). */\n belfioreCode: string;\n}\n\nconst VOWELS = new Set(['A', 'E', 'I', 'O', 'U']);\n\n/** Month → fiscal-code letter (Jan→A … Dec→T), 0-indexed by month. */\nconst MONTH_LETTERS = [\n 'A',\n 'B',\n 'C',\n 'D',\n 'E',\n 'H',\n 'L',\n 'M',\n 'P',\n 'R',\n 'S',\n 'T',\n] as const;\n\n/**\n * Fold a free-text name to bare uppercase A–Z: strip diacritics via NFD,\n * drop combining marks, uppercase, and keep only A–Z. Spaces / apostrophes\n * in compound names collapse away (the algorithm treats the name as one run\n * of letters).\n */\nfunction foldToLetters(input: string): string {\n return input\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .toUpperCase()\n .replace(/[^A-Z]/g, '');\n}\n\nfunction consonantsOf(letters: string): string {\n return [...letters].filter((c) => !VOWELS.has(c)).join('');\n}\n\nfunction vowelsOf(letters: string): string {\n return [...letters].filter((c) => VOWELS.has(c)).join('');\n}\n\n/**\n * Surname triple: consonants first, then vowels, right-padded with 'X'.\n * (e.g. \"Rossi\" → R S S; \"Fo\" → F O X.)\n */\nfunction surnameCode(surname: string): string {\n const letters = foldToLetters(surname);\n const code = consonantsOf(letters) + vowelsOf(letters);\n return (code + 'XXX').slice(0, 3);\n}\n\n/**\n * Name triple. With 4+ consonants, take the 1st, 3rd and 4th (the standard\n * \"skip the 2nd consonant\" rule); otherwise consonants then vowels,\n * right-padded with 'X'. (e.g. \"Mario\" → M R A; \"Maria\" → M RA → MRA;\n * \"Gianfranco\" → G F R.)\n */\nfunction nameCode(name: string): string {\n const letters = foldToLetters(name);\n const cons = consonantsOf(letters);\n if (cons.length >= 4) {\n return cons[0] + cons[2] + cons[3];\n }\n const code = cons + vowelsOf(letters);\n return (code + 'XXX').slice(0, 3);\n}\n\n/** Coerce a `Date` or ISO string to a `Date`; throws on an unparseable value. */\nfunction toDate(birthDate: Date | string): Date {\n const d = birthDate instanceof Date ? birthDate : new Date(birthDate);\n if (Number.isNaN(d.getTime())) {\n throw new Error(`calculateCodiceFiscale: invalid birthDate \"${birthDate}\"`);\n }\n return d;\n}\n\n/**\n * Two-digit zero-padded value. The fiscal code uses LOCAL calendar fields\n * (a birth date is a calendar date, not an instant), so we read the UTC\n * fields of a date-only ISO string consistently — see the date handling\n * below.\n */\nfunction pad2(n: number): string {\n return String(n).padStart(2, '0');\n}\n\n/**\n * Birth-date triple: 2-digit year + month letter + 2-digit day (+40 for\n * female). Returns the 5 characters `YYMDD`.\n *\n * Date fields are read in UTC so a date-only string like \"1980-01-01\"\n * (parsed by `Date` as UTC midnight) yields day 01 regardless of the\n * runtime timezone. Callers passing a `Date` built from local components\n * should construct it at UTC midnight (e.g. `new Date('1980-01-01')`).\n */\nfunction birthCode(birthDate: Date | string, sex: 'M' | 'F'): string {\n const d = toDate(birthDate);\n const yy = pad2(d.getUTCFullYear() % 100);\n const monthLetter = MONTH_LETTERS[d.getUTCMonth()];\n const day = d.getUTCDate() + (sex === 'F' ? 40 : 0);\n return yy + monthLetter + pad2(day);\n}\n\n/**\n * Compute the full 16-character (non-omocodic) codice fiscale from a\n * person's identity data. The caller supplies the 4-char Belfiore code of\n * the birthplace (the kit does not bundle the municipality table).\n *\n * Throws if `birthDate` is unparseable or `belfioreCode` is not 4\n * `[A-Z][0-9]{3}`-shaped characters — i.e. a letter followed by 3 digits,\n * the canonical Belfiore shape.\n */\nexport function calculateCodiceFiscale(input: CodiceFiscaleInput): string {\n const { surname, name, birthDate, sex, belfioreCode } = input;\n\n const belfiore = belfioreCode.trim().toUpperCase();\n if (!/^[A-Z][0-9]{3}$/.test(belfiore)) {\n throw new Error(\n `calculateCodiceFiscale: belfioreCode must be a letter + 3 digits (e.g. \"H501\"), got \"${belfioreCode}\"`,\n );\n }\n\n const first15 =\n surnameCode(surname) +\n nameCode(name) +\n birthCode(birthDate, sex) +\n belfiore;\n\n return first15 + computeControlChar(first15);\n}\n","import {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type ClipboardEvent,\n type CompositionEvent,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CircleAlert, CircleCheck, Calculator } from 'lucide-react';\nimport {\n FormFieldContext,\n useFormField,\n useFormFieldControlId,\n} from '../form-field/form-field-context';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT,\n INPUT_SURFACE_TEXT,\n INPUT_SURFACE_TONE,\n} from '../_shared/input-surface';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useDomValue } from '../_shared/use-dom-value';\nimport { useAgentRegistration } from '../../agent';\nimport { IconButton } from '../button';\nimport { fiscalCodeInputAgent } from './fiscal-code-input.agent';\nimport {\n classifyCodiceFiscale,\n isOmocodicCodiceFiscale,\n type FiscalCodeReason,\n} from './is-valid-codice-fiscale';\nimport {\n calculateCodiceFiscale,\n type CodiceFiscaleInput,\n} from './calculate-codice-fiscale';\n\n/** Agent-readiness curated handle for FiscalCodeInput. */\nexport interface FiscalCodeInputHandle {\n getValue: () => string;\n setValue: (value: string) => void;\n clear: () => void;\n focus: () => void;\n isValid: () => boolean;\n}\n\n/** Structured payload emitted on every keystroke alongside the raw value. */\nexport interface FiscalCodeChangeMeta {\n /** Structurally sound AND control character matches (always 16 chars). */\n isValid: boolean;\n /** Whether all 16 characters are present (regardless of validity). */\n isComplete: boolean;\n /** Why the value is (in)valid — drives consumer messaging. */\n reason: FiscalCodeReason;\n /**\n * Omocodia: omocodia letters replace digits. A valid code counts whatever the\n * order. With a wrong control character the letters must run leftwards from the\n * last digit, so a stray letter reads as a typo; that case is still true, so a\n * host can say \"looks like omocodia\" too.\n */\n isOmocodic: boolean;\n}\n\nexport interface FiscalCodeInputProps {\n /** Controlled value (raw, uppercased, no spaces). Pair with onChange. */\n value?: string;\n /** Uncontrolled initial value. Normalised on mount. */\n defaultValue?: string;\n /** Fires on every keystroke with the normalised raw string + meta. */\n onChange?: (raw: string, meta: FiscalCodeChangeMeta) => void;\n size?: 'sm' | 'md' | 'lg';\n tone?: 'default' | 'error';\n /** When the invalid tone + error string surface. Never marks partial input invalid. */\n validateOn?: 'change' | 'blur' | 'submit';\n /** Controlled escape hatch to force the invalid state (e.g. server rejection). */\n showError?: boolean;\n /** Overrides the kit's default i18n error string. */\n errorMessage?: string;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n placeholder?: string;\n /** Render the \"16 characters\" caption when NOT inside a FormField. */\n showFormatHint?: boolean;\n /**\n * OPT-IN. When the consuming form already holds the person's identity\n * data, supply it here to render an inline \"calculate\" affordance: a\n * small icon button that derives the codice fiscale and fills the field.\n * The caller supplies the 4-char `belfioreCode` of the birthplace — the\n * kit does not bundle the municipality lookup table. Omit to render\n * nothing extra (no behavioural change). Ignored when readOnly/disabled.\n */\n calculateFrom?: CodiceFiscaleInput;\n id?: string;\n name?: string;\n className?: string;\n 'aria-label'?: string;\n}\n\nconst MAX_LEN = 16;\n\nconst wrapperVariants = cva(\n ['ds:relative ds:flex ds:items-center ds:w-full', INPUT_SURFACE_CHROME].join(\n ' ',\n ),\n {\n variants: {\n size: {\n sm: INPUT_SURFACE_HEIGHT.sm,\n md: INPUT_SURFACE_HEIGHT.md,\n lg: INPUT_SURFACE_HEIGHT.lg,\n },\n tone: {\n default: INPUT_SURFACE_TONE.default,\n error: `${INPUT_SURFACE_TONE.error} ds:focus-within:outline-destructive`,\n },\n },\n defaultVariants: { size: 'md', tone: 'default' },\n },\n);\n\nconst inputVariants = cva(\n [\n // dir=\"ltr\" + tabular-nums keep the alphanumeric code rendering\n // left-to-right and evenly spaced even under an RTL/CJK surrounding\n // UI — this is a value-RENDERING concern (the code is never mirrored),\n // not a layout-direction violation, so logical-prop rules don't apply\n // to the code glyphs themselves.\n 'ds:w-full ds:min-w-0 ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground',\n 'ds:border-0 ds:outline-none ds:tabular-nums ds:uppercase ds:tracking-wide',\n 'ds:disabled:cursor-not-allowed',\n 'ds:read-only:cursor-default',\n ].join(' '),\n {\n variants: {\n size: {\n sm: `ds:pe-3 ${INPUT_SURFACE_TEXT.sm}`,\n md: `ds:pe-3 ${INPUT_SURFACE_TEXT.md}`,\n lg: `ds:pe-4 ${INPUT_SURFACE_TEXT.lg}`,\n },\n // When the calculate affordance is shown, the input text starts after\n // the inline-start icon button (mirrors `hasEnd`'s pe-10 reservation).\n hasStart: {\n true: 'ds:ps-10',\n false: '',\n },\n hasEnd: {\n true: 'ds:pe-10',\n false: '',\n },\n },\n compoundVariants: [\n { size: 'sm', hasStart: false, class: 'ds:ps-3' },\n { size: 'md', hasStart: false, class: 'ds:ps-3' },\n { size: 'lg', hasStart: false, class: 'ds:ps-4' },\n ],\n defaultVariants: { size: 'md', hasStart: false, hasEnd: false },\n },\n);\n\nconst adornmentEnd =\n 'ds:absolute ds:inset-y-0 ds:end-0 ds:pe-3 ds:flex ds:items-center ds:pointer-events-none ds:[&_svg]:size-4';\n\n// Inline-start wrapper for the calculate icon button. Positioned over the\n// reserved `ps-10` gutter; the button itself remains pointer-interactive.\nconst adornmentStart =\n 'ds:absolute ds:inset-y-0 ds:start-0 ds:ps-1 ds:flex ds:items-center';\n\nconst captionBase = 'type-body-sm ds:mt-[var(--spacing-xs)]';\n\n// Caption with a leading icon. The icon box is one line tall so it stays on\n// the first line when a long message (e.g. the omocodia ones) wraps.\nconst captionWithIcon = `${captionBase} ds:inline-flex ds:items-start ds:gap-[var(--spacing-xs)]`;\nconst captionIconBox =\n 'ds:flex ds:h-[1lh] ds:shrink-0 ds:items-center ds:[&_svg]:size-4';\n\n/** Uppercase, strip non-[A-Z0-9], normalise full-width / Eastern-Arabic\n * digits, and cap at 16 characters. */\nfunction normaliseFiscalCode(input: string): string {\n return (\n input\n .normalize('NFKC')\n // Eastern-Arabic & Extended-Arabic-Indic digits → ASCII (otp-input precedent).\n .replace(/[٠-٩]/g, (c) => String(c.charCodeAt(0) - 0x0660))\n .replace(/[۰-۹]/g, (c) => String(c.charCodeAt(0) - 0x06f0))\n .toUpperCase()\n .replace(/[^A-Z0-9]/g, '')\n .slice(0, MAX_LEN)\n );\n}\n\n/** Count [A-Z0-9] characters before `position` in the RAW (pre-normalise)\n * string, so the caret can be restored after re-normalising. */\nfunction countKeptBefore(str: string, position: number): number {\n let kept = 0;\n for (let i = 0; i < position && i < str.length; i += 1) {\n const c = str[i];\n if (\n (c >= '0' && c <= '9') ||\n (c >= 'A' && c <= 'Z') ||\n (c >= 'a' && c <= 'z')\n ) {\n kept += 1;\n }\n }\n return kept;\n}\n\nexport const FiscalCodeInput = forwardRef<\n HTMLInputElement,\n FiscalCodeInputProps\n>(function FiscalCodeInput(\n {\n value,\n defaultValue,\n onChange,\n size = 'md',\n tone = 'default',\n validateOn = 'blur',\n showError,\n errorMessage,\n disabled,\n readOnly,\n required,\n placeholder,\n showFormatHint = true,\n calculateFrom,\n id,\n name,\n className,\n 'aria-label': ariaLabel,\n },\n ref,\n) {\n const { t } = useTranslation('ui');\n const ctx = useFormField();\n const inFormField = useContext(FormFieldContext) !== null;\n\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<string>(() =>\n normaliseFiscalCode(defaultValue ?? ''),\n );\n const currentValue = isControlled\n ? normaliseFiscalCode(value ?? '')\n : internalValue;\n\n const [blurred, setBlurred] = useState(false);\n const composingRef = useRef(false);\n const pendingCaretRef = useRef<number | null>(null);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const composedRef = composeRefs(ref, inputRef);\n // The code is written to the input's DOM property, never to its `value`\n // attribute, where a copied outerHTML or a session replay could read it.\n // Paused mid-composition; declared before the caret effect below.\n const syncInput = useDomValue(inputRef, currentValue, composingRef);\n\n const reactId = useId();\n const generatedHintId = `${reactId}-hint`;\n const generatedStatusId = `${reactId}-status`;\n const generatedErrorId = `${reactId}-error`;\n\n // DEV-time guard: a standalone field with no visible label needs an\n // aria-label, mirroring Button's icon-only guard. No-op in production.\n useEffect(() => {\n const isDev =\n typeof import.meta !== 'undefined' &&\n typeof import.meta.env !== 'undefined' &&\n import.meta.env.DEV === true;\n if (isDev && !inFormField && !ariaLabel) {\n // eslint-disable-next-line no-console\n console.warn(\n '[FiscalCodeInput] No FormField/label and no `aria-label` — the field has no accessible name. Wrap it in a FormField or pass `aria-label`.',\n );\n }\n }, [inFormField, ariaLabel]);\n\n const reason = useMemo(\n () => classifyCodiceFiscale(currentValue),\n [currentValue],\n );\n const isComplete = currentValue.length === MAX_LEN;\n const isValid = reason === 'valid';\n const isOmocodic = useMemo(\n () => isOmocodicCodiceFiscale(currentValue),\n [currentValue],\n );\n\n const effectiveDisabled =\n (inFormField ? ctx.disabled : false) || Boolean(disabled);\n const effectiveRequired =\n (inFormField ? ctx.required : false) || Boolean(required);\n\n // Whether the component's OWN feedback should surface.\n //\n // `showError` is a controlled escape hatch (e.g. the server rejected the\n // code on submit): it forces the error regardless of completeness or the\n // client's own verdict. Otherwise the client only flags a COMPLETE\n // (16-char) code that fails its structural/checksum check — never a\n // partially-typed code — and `validateOn` governs the trigger.\n const ownFeedbackActive =\n !readOnly &&\n (Boolean(showError) ||\n (isComplete &&\n !isValid &&\n (validateOn === 'change' || (validateOn === 'blur' && blurred))));\n\n // When inside a FormField with its own error, FormField's role=alert wins\n // and this component stays silent (no double message / duplicate\n // aria-describedby target).\n const formFieldHasError = inFormField && ctx.invalid;\n const showOwnError = ownFeedbackActive && !formFieldHasError;\n\n const effectiveInvalid = formFieldHasError || showOwnError;\n const effectiveTone: 'default' | 'error' =\n effectiveInvalid || tone === 'error' ? 'error' : 'default';\n\n const ownErrorText = useMemo(() => {\n if (errorMessage) return errorMessage;\n // An omocodic code with a wrong control character gets its own message:\n // \"omocodia\" is what staff suspect, so confirm it and point at the typo.\n if (reason === 'badChecksum' && isOmocodic) {\n return t('inputs.fiscalCode.errorChecksumOmocodia');\n }\n // `valid` only reaches here through `showError` (e.g. a server\n // rejection): the characters are what the user can re-check.\n if (reason === 'badChecksum' || reason === 'valid') {\n return t('inputs.fiscalCode.errorChecksum');\n }\n if (reason === 'badFormat') return t('inputs.fiscalCode.errorFormat');\n return t('inputs.fiscalCode.errorIncomplete');\n }, [errorMessage, reason, isOmocodic, t]);\n\n // Standalone (no FormField) describedby: format hint + the live region that\n // is currently surfacing. When the component is showing its OWN error we\n // point at the assertive error node; otherwise at the polite status node\n // (valid affordance / typing progress). Inside a FormField, the FormField\n // owns describedBy entirely.\n const wantsHint = !inFormField && showFormatHint && !readOnly;\n const standaloneDescribedBy = inFormField\n ? undefined\n : [\n wantsHint ? generatedHintId : null,\n showOwnError ? generatedErrorId : generatedStatusId,\n ]\n .filter(Boolean)\n .join(' ') || undefined;\n const describedBy = inFormField\n ? ctx.describedBy || undefined\n : standaloneDescribedBy;\n\n const inputId = useFormFieldControlId(ctx, id);\n\n const emit = useCallback(\n (next: string) => {\n const nextReason = classifyCodiceFiscale(next);\n onChange?.(next, {\n isValid: nextReason === 'valid',\n isComplete: next.length === MAX_LEN,\n reason: nextReason,\n isOmocodic: isOmocodicCodiceFiscale(next),\n });\n },\n [onChange],\n );\n\n const commit = useCallback(\n (next: string) => {\n if (!isControlled) setInternalValue(next);\n emit(next);\n },\n [isControlled, emit],\n );\n\n // Restore caret after a normalising re-render that may have changed the\n // string length (mid-string edit / paste). Mirrors phone-input's caret\n // discipline.\n useIsomorphicLayoutEffect(() => {\n if (pendingCaretRef.current == null) return;\n const pos = pendingCaretRef.current;\n pendingCaretRef.current = null;\n const node = inputRef.current;\n if (node && document.activeElement === node) {\n // Re-clamp against the value the input ACTUALLY rendered this pass, not\n // the value we committed: a controlled parent may transform or reject\n // the emitted change so the echoed value diverges. Clamping to the live\n // DOM length keeps the caret inside the rendered string.\n const safePos = Math.min(pos, node.value.length);\n node.setSelectionRange(safePos, safePos);\n }\n });\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n if (readOnly) return;\n // Don't re-mask mid-IME composition or the user loses input; the\n // uppercase mask is re-applied on composition end / next change.\n if (composingRef.current) return;\n const target = event.target;\n const raw = target.value;\n const caret = target.selectionStart ?? raw.length;\n const keptBefore = countKeptBefore(raw, caret);\n const next = normaliseFiscalCode(raw);\n pendingCaretRef.current = Math.min(keptBefore, next.length);\n commit(next);\n // A character the mask drops leaves the value as it was, so no render\n // follows: ask for one, to take the dropped character out.\n syncInput();\n };\n\n const handleCompositionStart = () => {\n composingRef.current = true;\n };\n\n const handleCompositionEnd = (event: CompositionEvent<HTMLInputElement>) => {\n composingRef.current = false;\n if (readOnly) return;\n const next = normaliseFiscalCode(event.currentTarget.value);\n pendingCaretRef.current = next.length;\n commit(next);\n syncInput();\n };\n\n const handlePaste = (event: ClipboardEvent<HTMLInputElement>) => {\n if (readOnly) return;\n const text = event.clipboardData.getData('text');\n event.preventDefault();\n const node = inputRef.current;\n const selStart = node?.selectionStart ?? currentValue.length;\n const selEnd = node?.selectionEnd ?? currentValue.length;\n const cleaned = normaliseFiscalCode(text);\n const before = currentValue.slice(0, selStart);\n const after = currentValue.slice(selEnd);\n const next = normaliseFiscalCode(before + cleaned + after);\n pendingCaretRef.current = Math.min((before + cleaned).length, next.length);\n commit(next);\n };\n\n const handleBlur = () => {\n if (validateOn === 'blur') setBlurred(true);\n };\n\n // Opt-in derivation. Compute the CF from the supplied identity data and\n // route it through the SAME commit path as typing/paste so the controlled\n // / uncontrolled contract, the validation verdict, and the live-region\n // announcement all behave identically to a user-entered value.\n const handleCalculate = () => {\n if (!calculateFrom || readOnly || effectiveDisabled) return;\n let computed: string;\n try {\n computed = calculateCodiceFiscale(calculateFrom);\n } catch {\n // Bad identity data (unparseable date / malformed Belfiore code) is a\n // caller error, not a user action — fail quietly rather than throwing\n // out of an event handler and leave the field untouched.\n return;\n }\n const next = normaliseFiscalCode(computed);\n // After a successful derivation the value is complete: let blur-gated\n // validation surface immediately (the derived code is valid by\n // construction, so this confirms rather than errors).\n if (validateOn === 'blur') setBlurred(true);\n commit(next);\n inputRef.current?.focus();\n };\n\n const agentHandle = useMemo<FiscalCodeInputHandle>(\n () => ({\n getValue: () => currentValue,\n setValue: (next) => {\n const normalised = normaliseFiscalCode(next);\n if (!isControlled) setInternalValue(normalised);\n emit(normalised);\n inputRef.current?.focus();\n },\n clear: () => {\n if (!isControlled) setInternalValue('');\n emit('');\n inputRef.current?.focus();\n },\n focus: () => inputRef.current?.focus(),\n isValid: () => classifyCodiceFiscale(currentValue) === 'valid',\n }),\n [currentValue, isControlled, emit],\n );\n useAgentRegistration(fiscalCodeInputAgent, agentHandle, id);\n\n const resolvedPlaceholder = placeholder ?? t('inputs.fiscalCode.placeholder');\n\n // Polite status text (role=status). Carries ONLY non-error affordances:\n // the valid confirmation and, while typing an incomplete code, the live\n // character-count progress. Errors the user must act on are announced\n // assertively via the separate role=alert node below — never here.\n // Gated on !inFormField (matching showEndIcon): inside a FormField the\n // FormField owns every helper/status/error slot, so this stays silent.\n // A forced error (showError on a client-valid code) hides the valid\n // confirmation, so the field never says \"valid\" next to an error.\n const showValidStatus = isValid && !showOwnError;\n const statusMessage =\n readOnly || inFormField\n ? ''\n : showValidStatus\n ? isOmocodic\n ? t('inputs.fiscalCode.validOmocodia')\n : t('inputs.fiscalCode.valid')\n : currentValue.length > 0 && !isComplete\n ? t('inputs.fiscalCode.charactersEntered', {\n count: currentValue.length,\n })\n : '';\n\n // Assertive error text (role=alert) — surfaces only the component's own\n // actionable validation error, mirroring FormField's error <p>.\n const errorText = showOwnError ? ownErrorText : '';\n\n const showEndIcon = !readOnly && (showOwnError || (isValid && !inFormField));\n\n // Opt-in calculate affordance: only when identity data is supplied AND the\n // field is editable. Disabled/read-only fields render nothing extra.\n const showCalculate =\n Boolean(calculateFrom) && !readOnly && !effectiveDisabled;\n\n return (\n <div\n className=\"ds:flex ds:flex-col\"\n data-component=\"fiscal-code-input\"\n data-component-id={id}\n >\n {/* The box keeps the page direction so logical classes in `className`\n resolve as the host expects. The input and icons are dir=\"ltr\" so\n under RTL the icons sit over the input's padding, not the code. */}\n <div\n data-slot=\"fiscal-code-input\"\n className={wrapperVariants({ size, tone: effectiveTone, className })}\n >\n {showCalculate ? (\n <span dir=\"ltr\" className={adornmentStart}>\n <IconButton\n type=\"button\"\n size=\"sm\"\n intent=\"ghost\"\n icon={<Calculator />}\n aria-label={t('inputs.fiscalCode.calculate')}\n onClick={handleCalculate}\n />\n </span>\n ) : null}\n <input\n ref={composedRef}\n id={inputId}\n name={name}\n // dir=\"ltr\": the codice fiscale glyphs render LTR even under an\n // RTL surrounding UI — a value-rendering concern, not a layout\n // direction violation (see inputVariants comment).\n dir=\"ltr\"\n type=\"text\"\n inputMode=\"text\"\n autoCapitalize=\"characters\"\n autoCorrect=\"off\"\n autoComplete=\"off\"\n spellCheck={false}\n maxLength={MAX_LEN}\n // Loose structural mirror: 15 [A-Z0-9] + a final letter control\n // char (value is always uppercased). The real position-class /\n // omocodia / checksum rule is enforced in classifyCodiceFiscale;\n // this native pattern is only a non-JS fallback.\n pattern=\"[A-Z0-9]{15}[A-Z]\"\n placeholder={resolvedPlaceholder}\n disabled={effectiveDisabled}\n readOnly={readOnly}\n aria-label={ariaLabel}\n aria-describedby={describedBy}\n aria-invalid={effectiveInvalid || undefined}\n aria-required={effectiveRequired || undefined}\n onChange={handleChange}\n onCompositionStart={handleCompositionStart}\n onCompositionEnd={handleCompositionEnd}\n onPaste={handlePaste}\n onBlur={handleBlur}\n className={inputVariants({\n size,\n hasStart: showCalculate,\n hasEnd: showEndIcon,\n })}\n />\n {showEndIcon ? (\n <span\n aria-hidden=\"true\"\n dir=\"ltr\"\n className={`${adornmentEnd} ${\n showOwnError ? 'ds:text-destructive' : 'ds:text-success'\n }`}\n >\n {showOwnError ? <CircleAlert /> : <CircleCheck />}\n </span>\n ) : null}\n </div>\n\n {wantsHint ? (\n <p\n id={generatedHintId}\n className={`${captionBase} ds:text-muted-foreground`}\n >\n {t('inputs.fiscalCode.formatHint')}\n </p>\n ) : null}\n\n {/* Polite live region (role=status): announces the valid affordance\n and the typing-progress count as TEXT, satisfying 1.4.1 (never\n colour-only). Never carries an actionable error — that goes to the\n assertive node below, mirroring the kit's input-error convention. */}\n <p\n id={generatedStatusId}\n role=\"status\"\n aria-live=\"polite\"\n className={`${captionWithIcon} ${\n showValidStatus ? 'ds:text-success' : 'ds:text-muted-foreground'\n } ${statusMessage ? '' : 'ds:sr-only'}`}\n >\n {statusMessage ? (\n <>\n {showValidStatus ? (\n <span aria-hidden=\"true\" className={captionIconBox}>\n <CircleCheck />\n </span>\n ) : null}\n <span>{statusMessage}</span>\n </>\n ) : null}\n </p>\n\n {/* Assertive error region (role=alert): a validation error the user\n must correct is announced assertively, mirroring FormField's error\n <p> (form-field.tsx). Rendered only when the component owns the\n error — inside a FormField, FormField's role=alert wins. */}\n {errorText ? (\n <p\n id={generatedErrorId}\n role=\"alert\"\n className={`${captionWithIcon} ds:text-destructive`}\n >\n <span aria-hidden=\"true\" className={captionIconBox}>\n <CircleAlert />\n </span>\n <span>{errorText}</span>\n </p>\n ) : null}\n </div>\n );\n});\n\nFiscalCodeInput.displayName = 'FiscalCodeInput';\n\nexport { wrapperVariants as fiscalCodeWrapperVariants };\n"],"names":["__iconNode","Calculator","createLucideIcon","fiscalCodeInputAgent","handle","args","LETTER_POSITIONS","DIGIT_POSITIONS","OMOCODIA_LETTERS","OMOCODIA_ORDER","ODD_MAP","EVEN_MAP","REMAINDER_TO_CONTROL","isDigitChar","ch","toUpperAscii","raw","hasValidStructure","code","i","isOmocodicCodiceFiscale","computeControlChar","seenDigit","first15","sum","classifyCodiceFiscale","isValidCodiceFiscale","VOWELS","MONTH_LETTERS","foldToLetters","input","consonantsOf","letters","c","vowelsOf","surnameCode","surname","nameCode","name","cons","toDate","birthDate","d","pad2","n","birthCode","sex","yy","monthLetter","day","calculateCodiceFiscale","belfioreCode","belfiore","MAX_LEN","wrapperVariants","cva","INPUT_SURFACE_CHROME","INPUT_SURFACE_HEIGHT","INPUT_SURFACE_TONE","inputVariants","INPUT_SURFACE_TEXT","adornmentEnd","adornmentStart","captionBase","captionWithIcon","captionIconBox","normaliseFiscalCode","countKeptBefore","str","position","kept","FiscalCodeInput","forwardRef","value","defaultValue","onChange","size","tone","validateOn","showError","errorMessage","disabled","readOnly","required","placeholder","showFormatHint","calculateFrom","id","className","ariaLabel","ref","t","useTranslation","ctx","useFormField","inFormField","useContext","FormFieldContext","isControlled","internalValue","setInternalValue","useState","currentValue","blurred","setBlurred","composingRef","useRef","pendingCaretRef","inputRef","composedRef","composeRefs","syncInput","useDomValue","reactId","useId","generatedHintId","generatedStatusId","generatedErrorId","useEffect","reason","useMemo","isComplete","isValid","isOmocodic","effectiveDisabled","effectiveRequired","ownFeedbackActive","formFieldHasError","showOwnError","effectiveInvalid","effectiveTone","ownErrorText","wantsHint","standaloneDescribedBy","describedBy","inputId","useFormFieldControlId","emit","useCallback","next","nextReason","commit","useIsomorphicLayoutEffect","pos","node","safePos","handleChange","event","target","caret","keptBefore","handleCompositionStart","handleCompositionEnd","handlePaste","text","selStart","selEnd","cleaned","before","after","handleBlur","handleCalculate","computed","_a","agentHandle","normalised","useAgentRegistration","resolvedPlaceholder","showValidStatus","statusMessage","errorText","showEndIcon","showCalculate","jsxs","jsx","IconButton","CircleAlert","CircleCheck","Fragment"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,MAAM,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC9E,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC/D,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAClE,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAAA,EAC3C,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAAA,EAC3C,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAAA,EAC3C,CAAC,QAAQ,EAAE,GA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ACJ,MAAK;AAAA,YACL,WAAW,GAAGrD,EAAe;AAAA,YAE7B,UAAA;AAAA,cAAA,gBAAA8G,EAAC,UAAK,eAAY,QAAO,WAAW7G,IAClC,UAAA,gBAAA6G,EAACE,MAAY,GACf;AAAA,cACA,gBAAAF,EAAC,UAAM,UAAAJ,IAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,IAEjB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;AAEDnG,GAAgB,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -3,14 +3,14 @@ import { forwardRef as po, useId as f, useState as d, useRef as p, useEffect as
|
|
|
3
3
|
import { useTranslation as vo } from "react-i18next";
|
|
4
4
|
import { c as U } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { i as J, E as Fo } from "./email-input-C7THAwh2.js";
|
|
6
|
-
import { A as P } from "./alert-
|
|
6
|
+
import { A as P } from "./alert-DdDpOi-P.js";
|
|
7
7
|
import { B as ho } from "./button-D-MQxsA_.js";
|
|
8
8
|
import { C as K } from "./card-BA4Ig_kn.js";
|
|
9
|
-
import { E as bo } from "./error-summary-
|
|
9
|
+
import { E as bo } from "./error-summary-DrUfuKu1.js";
|
|
10
10
|
import { F as wo } from "./form-field-Ani72sVY.js";
|
|
11
11
|
import { i as xo } from "./safe-href-5dbsfbQn.js";
|
|
12
12
|
import { u as Eo } from "./use-state-backed-input-DhRQo6gM.js";
|
|
13
|
-
import { u as Io, a as Ao, A as Po, b as yo, E as So, c as Ro, d as To } from "./auth-form-parts-
|
|
13
|
+
import { u as Io, a as Ao, A as Po, b as yo, E as So, c as Ro, d as To } from "./auth-form-parts-Cmb41LSQ.js";
|
|
14
14
|
import { u as Bo, a as Mo, b as No } from "./use-registration-submit-eWAECgUC.js";
|
|
15
15
|
const Vo = ["email"], Do = U(
|
|
16
16
|
"ds:mx-auto ds:w-full ds:max-w-[400px] ds:text-start ds:text-[var(--foreground)]"
|
|
@@ -231,4 +231,4 @@ export {
|
|
|
231
231
|
Vo as F,
|
|
232
232
|
_o as a
|
|
233
233
|
};
|
|
234
|
-
//# sourceMappingURL=forgot-password-form-
|
|
234
|
+
//# sourceMappingURL=forgot-password-form-CgZkEvZy.js.map
|
package/dist/_chunks/{forgot-password-form-CGWV5Q1-.js.map → forgot-password-form-CgZkEvZy.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot-password-form-CGWV5Q1-.js","sources":["../../src/patterns/forgot-password-form/forgot-password-form.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* ForgotPasswordForm — the card that asks for a password reset link. */\n/* */\n/* One email field and a button, then a confirmation. The confirmation */\n/* is vague on purpose: it never says whether an account exists for the */\n/* address, and never repeats the address. The host sends the email and */\n/* owns every server rule; the card checks what a browser can check, */\n/* then hands the email to `onSubmit` or posts a real form. */\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 { Alert } from '../../components/alert';\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 { 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 form's one field. */\nexport const FORGOT_PASSWORD_FORM_FIELDS = ['email'] as const;\n\nexport type ForgotPasswordFormField =\n (typeof FORGOT_PASSWORD_FORM_FIELDS)[number];\n\n/** What `onSubmit` receives once the email has passed its check. */\nexport interface ForgotPasswordFormValues {\n email: string;\n}\n\n/** The email to show when the form opens. */\nexport type ForgotPasswordFormInitialValues = Partial<ForgotPasswordFormValues>;\n\n/** Messages from the server, already translated: one for the email,\n * plus `form` for a message about the whole form, such as \"too many\n * requests, try again later\". */\nexport type ForgotPasswordFormErrors = Partial<\n Record<ForgotPasswordFormField | 'form', string>\n>;\n\n/** The host's own form field name, for a native form post. It is needed:\n * a field without a name is not posted. */\nexport type ForgotPasswordFormFieldNames = Record<\n ForgotPasswordFormField,\n string\n>;\n\nexport interface ForgotPasswordFormProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'onSubmit'\n> {\n /** Replaces the heading \"Reset your password\". Pass it translated. */\n title?: string;\n /**\n * Replaces the line under the heading (\"Enter the email linked to your\n * account and we will send a reset link.\"). Pass it translated.\n */\n description?: string;\n /**\n * The heading's level. Default 1: this 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.\n */\n showLogo?: boolean;\n /** How the mark arrives when the card opens. Default `assemble`. It\n * plays once and rests. */\n logoMotion?: BrandMarkMotion;\n /**\n * Host content between the heading and the field, such as a notice. It\n * sits outside the form, so nothing in it is posted.\n */\n children?: ReactNode;\n /** The email to show when the form opens. Read once. */\n initialValues?: ForgotPasswordFormInitialValues;\n /**\n * Messages from the server, already translated. The email's message\n * shows on the field until the user changes it; `form` shows above the\n * field. When messages arrive, focus moves to the error summary at the\n * top of the form when the email has a message, or to the message\n * above the field when only that says something.\n *\n * Do not use a message to say that no account has the address: that\n * tells a stranger who has an account. Show `sent` for every address.\n */\n errors?: ForgotPasswordFormErrors;\n /**\n * Shows the confirmation in place of the form: \"Check your inbox\". Set\n * it once the request has been accepted, whether or not an account\n * exists for the address. The confirmation says \"if an account exists\"\n * and never shows the address.\n */\n sent?: boolean;\n /**\n * Adds \"Back to sign in\" under the card's content. A path on the same\n * site, or an address written in full. Anything else shows no link.\n */\n loginHref?: string;\n /** Replaces the button's \"Send reset link\". Pass it translated. */\n submitLabel?: string;\n /**\n * True while the host sends the email: 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 request.\n */\n submitting?: boolean;\n /** For React hosts: called with the email once it has passed its\n * check. Not called when `fieldNames` is set. */\n onSubmit?: (values: ForgotPasswordFormValues) => void;\n /**\n * For a native form post: the host's own field name, e.g.\n * `{ email: 'email' }`. When set, the input carries that name and the\n * browser posts the form.\n */\n fieldNames?: ForgotPasswordFormFieldNames;\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\n * token. Not used with `onSubmit`. A name that is also the one in\n * `fieldNames` is left out: the form's own field wins.\n */\n hiddenFields?: Readonly<Record<string, string>>;\n}\n\n/* -------------------------------------------------------------------- */\n/* Styles */\n/* -------------------------------------------------------------------- */\n\n// 400px at most, in px: a host whose root font size is not 16px would\n// stretch or squeeze a width in rem.\nconst forgotPasswordFormVariants = cva(\n 'ds:mx-auto ds:w-full ds:max-w-[400px] ds:text-start ds:text-[var(--foreground)]',\n);\n\n// The confirmation takes focus when it appears, so it shows a ring.\nconst confirmationVariants = cva(\n 'ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]',\n);\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\ntype FocusTarget = 'email' | 'form';\n\n/** The form's one field, as the error summary lists it. */\nconst FIELDS = ['email'] as const;\n\n/** The confirmation's heading, by the level of the card's own. */\nconst CONFIRMATION_HEADING = { 1: 'h2', 2: 'h3', 3: 'h4' } as const;\n\nconst hasMessage = (errors: ForgotPasswordFormErrors): boolean =>\n Object.values(errors).some(Boolean);\n\nconst focusTargetFor = (\n messages: ForgotPasswordFormErrors,\n): FocusTarget | undefined =>\n messages.email ? 'email' : messages.form ? 'form' : undefined;\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\n/**\n * The card that asks for a password reset link. Mount it on the\n * forgot-password page, inside `SignedOutFrame` or the host's own chrome.\n */\nexport const ForgotPasswordForm = forwardRef<\n HTMLDivElement,\n ForgotPasswordFormProps\n>(\n (\n {\n title,\n description,\n headingLevel = 1,\n showLogo = true,\n logoMotion = 'assemble',\n children,\n initialValues,\n errors,\n sent = false,\n loginHref,\n submitLabel,\n submitting = false,\n onSubmit,\n fieldNames,\n action,\n hiddenFields,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const titleId = useId();\n const sentTitleId = useId();\n const sentDescriptionId = useId();\n const emailFieldId = useId();\n const formMessageId = useId();\n const native = fieldNames !== undefined;\n\n /* ------------------------------ State ----------------------------- */\n\n const [email, setEmail] = useState(() => initialValues?.email ?? '');\n // True once the user has filled in the field and left it. An email\n // that arrives filled in counts: a bad one is then flagged at once,\n // with its message. An empty field is not flagged for being passed\n // through; its message waits for a submit.\n const [touched, setTouched] = useState(() => Boolean(initialValues?.email));\n const [submitted, setSubmitted] = useState(false);\n const [serverErrors, setServerErrors] = useState<ForgotPasswordFormErrors>(\n () => errors ?? {},\n );\n\n const emailInput = 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 * What the input holds now. Read from the input, not from state: a\n * browser can fill the field without telling React, and the form must\n * not refuse a field that is visibly filled.\n */\n const held = (): string => {\n const value = emailInput.current?.value ?? email;\n if (value !== email) setEmail(value);\n return value;\n };\n\n /* ---------------------------- Validation -------------------------- */\n\n const invalid = !isEmail(email);\n // The message shows once the user has left the field or tried to\n // submit.\n const ownError =\n (submitted || touched) && invalid\n ? email === ''\n ? t('forgotPasswordForm.emailRequired')\n : t('inputs.email.invalid')\n : undefined;\n const emailError = serverErrors.email ?? ownError;\n\n /* ------------------------------ Focus ----------------------------- */\n\n const formMessage = useRef<HTMLDivElement>(null);\n const confirmation = useRef<HTMLDivElement>(null);\n\n // The email's 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 [openedWithEmailMessage] = useState(() => Boolean(errors?.email));\n const summary = useErrorSummary(\n FIELDS,\n () => emailError,\n openedWithEmailMessage,\n );\n // The message about the whole form: quiet while the summary lists the\n // email, because the summary reads it then.\n const formMessageAnnounce = useFormMessageAnnounce(\n serverErrors.form,\n summary.listed.length > 0,\n );\n\n // Any other place focus goes: the message above the field, when only\n // it says something. A new object for each request, so asking twice\n // for the same place moves focus twice.\n const [focusRequest, setFocusRequest] = useState<{\n target: FocusTarget;\n } | null>(() => {\n const target = openedWithEmailMessage\n ? undefined\n : focusTargetFor(errors ?? {});\n return target ? { target } : null;\n });\n useEffect(() => {\n if (!focusRequest) return;\n (focusRequest.target === 'email'\n ? emailInput\n : formMessage\n ).current?.focus();\n }, [focusRequest]);\n\n // The form, and the button that had focus, are gone once the\n // confirmation shows. Move focus to it, so a keyboard or screen\n // reader user lands on what happened. Not on a page that opens\n // already sent: that one is read from the top like any other.\n const wasSent = useRef(sent);\n useEffect(() => {\n if (sent && !wasSent.current) confirmation.current?.focus();\n wasSent.current = sent;\n }, [sent]);\n\n /* ------------------------------ Submit ---------------------------- */\n\n const submit = useRegistrationSubmit<'email'>({\n errors,\n submitting,\n native,\n captcha: false,\n firstProblem: () => (isEmail(held()) ? undefined : 'email'),\n onRefused: () => {\n setSubmitted(true);\n summary.open(() => setFocusRequest({ target: 'email' }));\n },\n // Only a React host gets here: a native post is the browser's own.\n deliver: () => onSubmit?.({ email: held() }),\n onAnswer: (answer) => {\n const next: ForgotPasswordFormErrors = answer;\n setServerErrors(next);\n if (!hasMessage(next)) return;\n setSubmitted(false);\n // The summary when the email has a message, else the message above.\n summary.open(() => {\n const target = focusTargetFor(next);\n if (target) setFocusRequest({ target });\n });\n },\n });\n const { busy } = submit;\n\n /* ------------------------------ Render ---------------------------- */\n\n const formAction = useFormAction('ForgotPasswordForm', native, action);\n const loginLink =\n loginHref && isSafeHref(loginHref) ? loginHref : undefined;\n const extraFields = useExtraFields(\n 'ForgotPasswordForm',\n native,\n fieldNames,\n hiddenFields,\n );\n\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"forgot-password-form\"\n data-state={sent ? 'sent' : 'asking'}\n className={forgotPasswordFormVariants({ className })}\n >\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <AuthCardHeading\n id={titleId}\n title={title ?? t('forgotPasswordForm.title')}\n // The instruction belongs to the form: once it is sent there\n // is nothing left to enter.\n description={\n sent\n ? undefined\n : (description ?? t('forgotPasswordForm.description'))\n }\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 {sent ? (\n // Named and described, so a screen reader that lands here\n // reads the whole confirmation, not only \"status\".\n <Alert\n ref={confirmation}\n variant=\"success\"\n tabIndex={-1}\n aria-labelledby={sentTitleId}\n aria-describedby={sentDescriptionId}\n data-slot=\"confirmation\"\n className={confirmationVariants()}\n >\n {/* One level under the card's own heading. */}\n <Alert.Title\n id={sentTitleId}\n as={CONFIRMATION_HEADING[headingLevel]}\n >\n {t('forgotPasswordForm.sentTitle')}\n </Alert.Title>\n <Alert.Description id={sentDescriptionId}>\n {t('forgotPasswordForm.sentDescription')}\n </Alert.Description>\n </Alert>\n ) : (\n <>\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={\n serverErrors.form ? formMessageId : undefined\n }\n errors={summary.listed.map((field) => ({\n field,\n message: emailError ?? '',\n targetId: emailFieldId,\n }))}\n />\n\n {serverErrors.form && (\n <AuthFormMessage\n ref={formMessage}\n id={formMessageId}\n announce={formMessageAnnounce}\n >\n {serverErrors.form}\n </AuthFormMessage>\n )}\n\n <FormField\n id={emailFieldId}\n label={t('forgotPasswordForm.email')}\n required\n error={emailError}\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. */}\n <EmailInput\n ref={emailField.ref}\n name={native ? fieldNames.email : 'email'}\n disableBuiltInValidation\n onChange={emailField.quiet((event) => {\n setEmail(event.target.value);\n // The server's message was about the old value.\n setServerErrors((previous) =>\n previous.email\n ? { ...previous, email: undefined }\n : previous,\n );\n })}\n onBlur={(event) => {\n // Whatever a browser filled in without saying so.\n setEmail(event.target.value);\n if (event.target.value !== '') setTouched(true);\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('forgotPasswordForm.submit')}\n </Button>\n </form>\n {/* Outside the form: a screen reader may hold back what\n changes inside a busy region. */}\n <AuthFormStatus busy={busy} />\n </>\n )}\n\n {loginLink && (\n <AuthTextLink href={loginLink} action=\"login\">\n {t('forgotPasswordForm.back')}\n </AuthTextLink>\n )}\n </Card.Body>\n </Card>\n </div>\n );\n },\n);\nForgotPasswordForm.displayName = 'ForgotPasswordForm';\n"],"names":["FORGOT_PASSWORD_FORM_FIELDS","forgotPasswordFormVariants","cva","confirmationVariants","FIELDS","CONFIRMATION_HEADING","hasMessage","errors","focusTargetFor","messages","ForgotPasswordForm","forwardRef","title","description","headingLevel","showLogo","logoMotion","children","initialValues","sent","loginHref","submitLabel","submitting","onSubmit","fieldNames","action","hiddenFields","className","rest","ref","useTranslation","titleId","useId","sentTitleId","sentDescriptionId","emailFieldId","formMessageId","native","email","setEmail","useState","touched","setTouched","submitted","setSubmitted","serverErrors","setServerErrors","emailInput","useRef","emailField","useStateBackedInput","held","value","_a","invalid","isEmail","ownError","emailError","formMessage","confirmation","openedWithEmailMessage","summary","useErrorSummary","formMessageAnnounce","useFormMessageAnnounce","focusRequest","setFocusRequest","target","useEffect","wasSent","submit","useRegistrationSubmit","answer","next","busy","formAction","useFormAction","loginLink","isSafeHref","extraFields","useExtraFields","jsx","Card","AuthCardHeading","jsxs","Alert","Fragment","ErrorSummary","field","AuthFormMessage","FormField","EmailInput","event","previous","ExtraFields","Button","AuthFormStatus","AuthTextLink"],"mappings":";;;;;;;;;;;;;;AAoDO,MAAMA,KAA8B,CAAC,OAAO,GAuH7CC,KAA6BC;AAAA,EACjC;AACF,GAGMC,KAAuBD;AAAA,EAC3B;AACF,GASME,KAAS,CAAC,OAAO,GAGjBC,KAAuB,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,KAAA,GAE9CC,KAAa,CAACC,MAClB,OAAO,OAAOA,CAAM,EAAE,KAAK,OAAO,GAE9BC,IAAiB,CACrBC,MAEAA,EAAS,QAAQ,UAAUA,EAAS,OAAO,SAAS,QAUzCC,KAAqBC;AAAA,EAIhC,CACE;AAAA,IACE,OAAAC;AAAA,IACA,aAAAC;AAAA,IAC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X,UAAA,gBAAAoB;AAAA,wBAACU;AAAA,wBAAA;AAAA,0BACC,KAAK1C,EAAW;AAAA,0BAChB,MAAMZ,IAASb,EAAW,QAAQ;AAAA,0BAClC,0BAAwB;AAAA,0BACxB,UAAUyB,EAAW,MAAM,CAAC2C,MAAU;AACpC,4BAAArD,EAASqD,EAAM,OAAO,KAAK,GAE3B9C;AAAA,8BAAgB,CAAC+C,MACfA,EAAS,QACL,EAAE,GAAGA,GAAU,OAAO,WACtBA;AAAA,4BAAA;AAAA,0BAER,CAAC;AAAA,0BACD,QAAQ,CAACD,MAAU;AAEjB,4BAAArD,EAASqD,EAAM,OAAO,KAAK,GACvBA,EAAM,OAAO,UAAU,SAAe,EAAI;AAAA,0BAChD;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBACF;AAAA,kBAAA;AAAA,kBAGF,gBAAAX,EAACa,IAAA,EAAY,QAAQf,GAAA,CAAa;AAAA,kBAElC,gBAAAE;AAAA,oBAACc;AAAA,oBAAA;AAAA,sBACC,MAAK;AAAA,sBACL,QAAO;AAAA,sBACP,MAAK;AAAA,sBACL,SAASrB;AAAA,sBACT,WAAU;AAAA,sBACV,eAAY;AAAA,sBAEX,UAAArD,KAAe,EAAE,2BAA2B;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAC/C;AAAA,cAAA;AAAA,YAAA;AAAA,YAIF,gBAAA4D,EAACe,MAAe,MAAAtB,EAAA,CAAY;AAAA,UAAA,GAC9B;AAAA,UAGDG,uBACEoB,IAAA,EAAa,MAAMpB,GAAW,QAAO,SACnC,UAAA,EAAE,yBAAyB,EAAA,CAC9B;AAAA,QAAA,EAAA,CAEJ,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAnE,GAAmB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"forgot-password-form-CgZkEvZy.js","sources":["../../src/patterns/forgot-password-form/forgot-password-form.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* ForgotPasswordForm — the card that asks for a password reset link. */\n/* */\n/* One email field and a button, then a confirmation. The confirmation */\n/* is vague on purpose: it never says whether an account exists for the */\n/* address, and never repeats the address. The host sends the email and */\n/* owns every server rule; the card checks what a browser can check, */\n/* then hands the email to `onSubmit` or posts a real form. */\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 { Alert } from '../../components/alert';\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 { 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 form's one field. */\nexport const FORGOT_PASSWORD_FORM_FIELDS = ['email'] as const;\n\nexport type ForgotPasswordFormField =\n (typeof FORGOT_PASSWORD_FORM_FIELDS)[number];\n\n/** What `onSubmit` receives once the email has passed its check. */\nexport interface ForgotPasswordFormValues {\n email: string;\n}\n\n/** The email to show when the form opens. */\nexport type ForgotPasswordFormInitialValues = Partial<ForgotPasswordFormValues>;\n\n/** Messages from the server, already translated: one for the email,\n * plus `form` for a message about the whole form, such as \"too many\n * requests, try again later\". */\nexport type ForgotPasswordFormErrors = Partial<\n Record<ForgotPasswordFormField | 'form', string>\n>;\n\n/** The host's own form field name, for a native form post. It is needed:\n * a field without a name is not posted. */\nexport type ForgotPasswordFormFieldNames = Record<\n ForgotPasswordFormField,\n string\n>;\n\nexport interface ForgotPasswordFormProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'onSubmit'\n> {\n /** Replaces the heading \"Reset your password\". Pass it translated. */\n title?: string;\n /**\n * Replaces the line under the heading (\"Enter the email linked to your\n * account and we will send a reset link.\"). Pass it translated.\n */\n description?: string;\n /**\n * The heading's level. Default 1: this 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.\n */\n showLogo?: boolean;\n /** How the mark arrives when the card opens. Default `assemble`. It\n * plays once and rests. */\n logoMotion?: BrandMarkMotion;\n /**\n * Host content between the heading and the field, such as a notice. It\n * sits outside the form, so nothing in it is posted.\n */\n children?: ReactNode;\n /** The email to show when the form opens. Read once. */\n initialValues?: ForgotPasswordFormInitialValues;\n /**\n * Messages from the server, already translated. The email's message\n * shows on the field until the user changes it; `form` shows above the\n * field. When messages arrive, focus moves to the error summary at the\n * top of the form when the email has a message, or to the message\n * above the field when only that says something.\n *\n * Do not use a message to say that no account has the address: that\n * tells a stranger who has an account. Show `sent` for every address.\n */\n errors?: ForgotPasswordFormErrors;\n /**\n * Shows the confirmation in place of the form: \"Check your inbox\". Set\n * it once the request has been accepted, whether or not an account\n * exists for the address. The confirmation says \"if an account exists\"\n * and never shows the address.\n */\n sent?: boolean;\n /**\n * Adds \"Back to sign in\" under the card's content. A path on the same\n * site, or an address written in full. Anything else shows no link.\n */\n loginHref?: string;\n /** Replaces the button's \"Send reset link\". Pass it translated. */\n submitLabel?: string;\n /**\n * True while the host sends the email: 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 request.\n */\n submitting?: boolean;\n /** For React hosts: called with the email once it has passed its\n * check. Not called when `fieldNames` is set. */\n onSubmit?: (values: ForgotPasswordFormValues) => void;\n /**\n * For a native form post: the host's own field name, e.g.\n * `{ email: 'email' }`. When set, the input carries that name and the\n * browser posts the form.\n */\n fieldNames?: ForgotPasswordFormFieldNames;\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\n * token. Not used with `onSubmit`. A name that is also the one in\n * `fieldNames` is left out: the form's own field wins.\n */\n hiddenFields?: Readonly<Record<string, string>>;\n}\n\n/* -------------------------------------------------------------------- */\n/* Styles */\n/* -------------------------------------------------------------------- */\n\n// 400px at most, in px: a host whose root font size is not 16px would\n// stretch or squeeze a width in rem.\nconst forgotPasswordFormVariants = cva(\n 'ds:mx-auto ds:w-full ds:max-w-[400px] ds:text-start ds:text-[var(--foreground)]',\n);\n\n// The confirmation takes focus when it appears, so it shows a ring.\nconst confirmationVariants = cva(\n 'ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]',\n);\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\ntype FocusTarget = 'email' | 'form';\n\n/** The form's one field, as the error summary lists it. */\nconst FIELDS = ['email'] as const;\n\n/** The confirmation's heading, by the level of the card's own. */\nconst CONFIRMATION_HEADING = { 1: 'h2', 2: 'h3', 3: 'h4' } as const;\n\nconst hasMessage = (errors: ForgotPasswordFormErrors): boolean =>\n Object.values(errors).some(Boolean);\n\nconst focusTargetFor = (\n messages: ForgotPasswordFormErrors,\n): FocusTarget | undefined =>\n messages.email ? 'email' : messages.form ? 'form' : undefined;\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\n/**\n * The card that asks for a password reset link. Mount it on the\n * forgot-password page, inside `SignedOutFrame` or the host's own chrome.\n */\nexport const ForgotPasswordForm = forwardRef<\n HTMLDivElement,\n ForgotPasswordFormProps\n>(\n (\n {\n title,\n description,\n headingLevel = 1,\n showLogo = true,\n logoMotion = 'assemble',\n children,\n initialValues,\n errors,\n sent = false,\n loginHref,\n submitLabel,\n submitting = false,\n onSubmit,\n fieldNames,\n action,\n hiddenFields,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const titleId = useId();\n const sentTitleId = useId();\n const sentDescriptionId = useId();\n const emailFieldId = useId();\n const formMessageId = useId();\n const native = fieldNames !== undefined;\n\n /* ------------------------------ State ----------------------------- */\n\n const [email, setEmail] = useState(() => initialValues?.email ?? '');\n // True once the user has filled in the field and left it. An email\n // that arrives filled in counts: a bad one is then flagged at once,\n // with its message. An empty field is not flagged for being passed\n // through; its message waits for a submit.\n const [touched, setTouched] = useState(() => Boolean(initialValues?.email));\n const [submitted, setSubmitted] = useState(false);\n const [serverErrors, setServerErrors] = useState<ForgotPasswordFormErrors>(\n () => errors ?? {},\n );\n\n const emailInput = 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 * What the input holds now. Read from the input, not from state: a\n * browser can fill the field without telling React, and the form must\n * not refuse a field that is visibly filled.\n */\n const held = (): string => {\n const value = emailInput.current?.value ?? email;\n if (value !== email) setEmail(value);\n return value;\n };\n\n /* ---------------------------- Validation -------------------------- */\n\n const invalid = !isEmail(email);\n // The message shows once the user has left the field or tried to\n // submit.\n const ownError =\n (submitted || touched) && invalid\n ? email === ''\n ? t('forgotPasswordForm.emailRequired')\n : t('inputs.email.invalid')\n : undefined;\n const emailError = serverErrors.email ?? ownError;\n\n /* ------------------------------ Focus ----------------------------- */\n\n const formMessage = useRef<HTMLDivElement>(null);\n const confirmation = useRef<HTMLDivElement>(null);\n\n // The email's 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 [openedWithEmailMessage] = useState(() => Boolean(errors?.email));\n const summary = useErrorSummary(\n FIELDS,\n () => emailError,\n openedWithEmailMessage,\n );\n // The message about the whole form: quiet while the summary lists the\n // email, because the summary reads it then.\n const formMessageAnnounce = useFormMessageAnnounce(\n serverErrors.form,\n summary.listed.length > 0,\n );\n\n // Any other place focus goes: the message above the field, when only\n // it says something. A new object for each request, so asking twice\n // for the same place moves focus twice.\n const [focusRequest, setFocusRequest] = useState<{\n target: FocusTarget;\n } | null>(() => {\n const target = openedWithEmailMessage\n ? undefined\n : focusTargetFor(errors ?? {});\n return target ? { target } : null;\n });\n useEffect(() => {\n if (!focusRequest) return;\n (focusRequest.target === 'email'\n ? emailInput\n : formMessage\n ).current?.focus();\n }, [focusRequest]);\n\n // The form, and the button that had focus, are gone once the\n // confirmation shows. Move focus to it, so a keyboard or screen\n // reader user lands on what happened. Not on a page that opens\n // already sent: that one is read from the top like any other.\n const wasSent = useRef(sent);\n useEffect(() => {\n if (sent && !wasSent.current) confirmation.current?.focus();\n wasSent.current = sent;\n }, [sent]);\n\n /* ------------------------------ Submit ---------------------------- */\n\n const submit = useRegistrationSubmit<'email'>({\n errors,\n submitting,\n native,\n captcha: false,\n firstProblem: () => (isEmail(held()) ? undefined : 'email'),\n onRefused: () => {\n setSubmitted(true);\n summary.open(() => setFocusRequest({ target: 'email' }));\n },\n // Only a React host gets here: a native post is the browser's own.\n deliver: () => onSubmit?.({ email: held() }),\n onAnswer: (answer) => {\n const next: ForgotPasswordFormErrors = answer;\n setServerErrors(next);\n if (!hasMessage(next)) return;\n setSubmitted(false);\n // The summary when the email has a message, else the message above.\n summary.open(() => {\n const target = focusTargetFor(next);\n if (target) setFocusRequest({ target });\n });\n },\n });\n const { busy } = submit;\n\n /* ------------------------------ Render ---------------------------- */\n\n const formAction = useFormAction('ForgotPasswordForm', native, action);\n const loginLink =\n loginHref && isSafeHref(loginHref) ? loginHref : undefined;\n const extraFields = useExtraFields(\n 'ForgotPasswordForm',\n native,\n fieldNames,\n hiddenFields,\n );\n\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"forgot-password-form\"\n data-state={sent ? 'sent' : 'asking'}\n className={forgotPasswordFormVariants({ className })}\n >\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <AuthCardHeading\n id={titleId}\n title={title ?? t('forgotPasswordForm.title')}\n // The instruction belongs to the form: once it is sent there\n // is nothing left to enter.\n description={\n sent\n ? undefined\n : (description ?? t('forgotPasswordForm.description'))\n }\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 {sent ? (\n // Named and described, so a screen reader that lands here\n // reads the whole confirmation, not only \"status\".\n <Alert\n ref={confirmation}\n variant=\"success\"\n tabIndex={-1}\n aria-labelledby={sentTitleId}\n aria-describedby={sentDescriptionId}\n data-slot=\"confirmation\"\n className={confirmationVariants()}\n >\n {/* One level under the card's own heading. */}\n <Alert.Title\n id={sentTitleId}\n as={CONFIRMATION_HEADING[headingLevel]}\n >\n {t('forgotPasswordForm.sentTitle')}\n </Alert.Title>\n <Alert.Description id={sentDescriptionId}>\n {t('forgotPasswordForm.sentDescription')}\n </Alert.Description>\n </Alert>\n ) : (\n <>\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={\n serverErrors.form ? formMessageId : undefined\n }\n errors={summary.listed.map((field) => ({\n field,\n message: emailError ?? '',\n targetId: emailFieldId,\n }))}\n />\n\n {serverErrors.form && (\n <AuthFormMessage\n ref={formMessage}\n id={formMessageId}\n announce={formMessageAnnounce}\n >\n {serverErrors.form}\n </AuthFormMessage>\n )}\n\n <FormField\n id={emailFieldId}\n label={t('forgotPasswordForm.email')}\n required\n error={emailError}\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. */}\n <EmailInput\n ref={emailField.ref}\n name={native ? fieldNames.email : 'email'}\n disableBuiltInValidation\n onChange={emailField.quiet((event) => {\n setEmail(event.target.value);\n // The server's message was about the old value.\n setServerErrors((previous) =>\n previous.email\n ? { ...previous, email: undefined }\n : previous,\n );\n })}\n onBlur={(event) => {\n // Whatever a browser filled in without saying so.\n setEmail(event.target.value);\n if (event.target.value !== '') setTouched(true);\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('forgotPasswordForm.submit')}\n </Button>\n </form>\n {/* Outside the form: a screen reader may hold back what\n changes inside a busy region. */}\n <AuthFormStatus busy={busy} />\n </>\n )}\n\n {loginLink && (\n <AuthTextLink href={loginLink} action=\"login\">\n {t('forgotPasswordForm.back')}\n </AuthTextLink>\n )}\n </Card.Body>\n </Card>\n </div>\n );\n },\n);\nForgotPasswordForm.displayName = 'ForgotPasswordForm';\n"],"names":["FORGOT_PASSWORD_FORM_FIELDS","forgotPasswordFormVariants","cva","confirmationVariants","FIELDS","CONFIRMATION_HEADING","hasMessage","errors","focusTargetFor","messages","ForgotPasswordForm","forwardRef","title","description","headingLevel","showLogo","logoMotion","children","initialValues","sent","loginHref","submitLabel","submitting","onSubmit","fieldNames","action","hiddenFields","className","rest","ref","useTranslation","titleId","useId","sentTitleId","sentDescriptionId","emailFieldId","formMessageId","native","email","setEmail","useState","touched","setTouched","submitted","setSubmitted","serverErrors","setServerErrors","emailInput","useRef","emailField","useStateBackedInput","held","value","_a","invalid","isEmail","ownError","emailError","formMessage","confirmation","openedWithEmailMessage","summary","useErrorSummary","formMessageAnnounce","useFormMessageAnnounce","focusRequest","setFocusRequest","target","useEffect","wasSent","submit","useRegistrationSubmit","answer","next","busy","formAction","useFormAction","loginLink","isSafeHref","extraFields","useExtraFields","jsx","Card","AuthCardHeading","jsxs","Alert","Fragment","ErrorSummary","field","AuthFormMessage","FormField","EmailInput","event","previous","ExtraFields","Button","AuthFormStatus","AuthTextLink"],"mappings":";;;;;;;;;;;;;;AAoDO,MAAMA,KAA8B,CAAC,OAAO,GAuH7CC,KAA6BC;AAAA,EACjC;AACF,GAGMC,KAAuBD;AAAA,EAC3B;AACF,GASME,KAAS,CAAC,OAAO,GAGjBC,KAAuB,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,KAAA,GAE9CC,KAAa,CAACC,MAClB,OAAO,OAAOA,CAAM,EAAE,KAAK,OAAO,GAE9BC,IAAiB,CACrBC,MAEAA,EAAS,QAAQ,UAAUA,EAAS,OAAO,SAAS,QAUzCC,KAAqBC;AAAA,EAIhC,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,QAAAX;AAAA,IACA,MAAAY,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,OACG;AACH,UAAM,EAAE,EAAA,IAAMC,GAAe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EjB,4BAAArD,EAASqD,EAAM,OAAO,KAAK,GACvBA,EAAM,OAAO,UAAU,SAAe,EAAI;AAAA,0BAChD;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBACF;AAAA,kBAAA;AAAA,kBAGF,gBAAAX,EAACa,IAAA,EAAY,QAAQf,GAAA,CAAa;AAAA,kBAElC,gBAAAE;AAAA,oBAACc;AAAA,oBAAA;AAAA,sBACC,MAAK;AAAA,sBACL,QAAO;AAAA,sBACP,MAAK;AAAA,sBACL,SAASrB;AAAA,sBACT,WAAU;AAAA,sBACV,eAAY;AAAA,sBAEX,UAAArD,KAAe,EAAE,2BAA2B;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAC/C;AAAA,cAAA;AAAA,YAAA;AAAA,YAIF,gBAAA4D,EAACe,MAAe,MAAAtB,EAAA,CAAY;AAAA,UAAA,GAC9B;AAAA,UAGDG,uBACEoB,IAAA,EAAa,MAAMpB,GAAW,QAAO,SACnC,UAAA,EAAE,yBAAyB,EAAA,CAC9B;AAAA,QAAA,EAAA,CAEJ,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAnE,GAAmB,cAAc;"}
|
|
@@ -9,7 +9,7 @@ import { u as $ } from "./use-select-on-arrow-Cr4iBuW5.js";
|
|
|
9
9
|
import { u as ee } from "./registry-DvAUVLHh.js";
|
|
10
10
|
import { B as R } from "./button-D-MQxsA_.js";
|
|
11
11
|
import { P as ae } from "./progress-D_g_Sl2g.js";
|
|
12
|
-
import { f as se } from "./payment-form-
|
|
12
|
+
import { f as se } from "./payment-form-i90DUuNK.js";
|
|
13
13
|
import { T as re } from "./triangle-alert-CBnO6nq_.js";
|
|
14
14
|
import { C as te } from "./check-DrFSN__t.js";
|
|
15
15
|
const de = {
|
|
@@ -282,4 +282,4 @@ export {
|
|
|
282
282
|
le as F,
|
|
283
283
|
de as f
|
|
284
284
|
};
|
|
285
|
-
//# sourceMappingURL=freemium-paywall-
|
|
285
|
+
//# sourceMappingURL=freemium-paywall-r-z48YaT.js.map
|