@alfadocs/ui-kit-debug 1.96.0 → 1.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{address-autocomplete-DR4Xn23Z.js → address-autocomplete-DC-H-MZw.js} +2 -2
- package/dist/_chunks/{address-autocomplete-DR4Xn23Z.js.map → address-autocomplete-DC-H-MZw.js.map} +1 -1
- package/dist/_chunks/{address-fields-qxQkGwPf.js → address-fields-D5Ije0S2.js} +7 -7
- package/dist/_chunks/{address-fields-qxQkGwPf.js.map → address-fields-D5Ije0S2.js.map} +1 -1
- package/dist/_chunks/{agenda-card-BhY342MA.js → agenda-card-bRQ4j6U6.js} +2 -2
- package/dist/_chunks/{agenda-card-BhY342MA.js.map → agenda-card-bRQ4j6U6.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-BmxBGEci.js → agenda-tray-CzE3E8GU.js} +2 -2
- package/dist/_chunks/{agenda-tray-BmxBGEci.js.map → agenda-tray-CzE3E8GU.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-ovRX_oti.js → alia-sidebar-B5mu44g2.js} +3 -3
- package/dist/_chunks/{alia-sidebar-ovRX_oti.js.map → alia-sidebar-B5mu44g2.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-CdRUXoaA.js → anamnesis-summary-rows-B9HqOGd7.js} +4 -4
- package/dist/_chunks/{anamnesis-summary-rows-CdRUXoaA.js.map → anamnesis-summary-rows-B9HqOGd7.js.map} +1 -1
- package/dist/_chunks/{appointment-card-Csx4544A.js → appointment-card-zPr0brha.js} +3 -3
- package/dist/_chunks/{appointment-card-Csx4544A.js.map → appointment-card-zPr0brha.js.map} +1 -1
- package/dist/_chunks/{appointment-peek-CcDCWb-F.js → appointment-peek-xFTBany4.js} +3 -3
- package/dist/_chunks/{appointment-peek-CcDCWb-F.js.map → appointment-peek-xFTBany4.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-DW6FN6u8.js → appointment-timeline-AKkVx9AN.js} +2 -2
- package/dist/_chunks/{appointment-timeline-DW6FN6u8.js.map → appointment-timeline-AKkVx9AN.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-CZfXwHWz.js → appointment-tray-B8qQBW65.js} +2 -2
- package/dist/_chunks/{appointment-tray-CZfXwHWz.js.map → appointment-tray-B8qQBW65.js.map} +1 -1
- package/dist/_chunks/{aspect-ratio-DeSNzASA.js → aspect-ratio-B-6cyOpm.js} +13 -13
- package/dist/_chunks/aspect-ratio-B-6cyOpm.js.map +1 -0
- package/dist/_chunks/{autocomplete-BXMcNoa3.js → autocomplete-D10ydpgi.js} +2 -2
- package/dist/_chunks/{autocomplete-BXMcNoa3.js.map → autocomplete-D10ydpgi.js.map} +1 -1
- package/dist/_chunks/{avatar-a6042Ox2.js → avatar-BoqdWsNe.js} +2 -2
- package/dist/_chunks/avatar-BoqdWsNe.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-DcBmtijD.js → balance-badge-cell-DaZokVZY.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-DcBmtijD.js.map → balance-badge-cell-DaZokVZY.js.map} +1 -1
- package/dist/_chunks/{breadcrumb-Bn29NCnf.js → breadcrumb-zxa_PNhF.js} +2 -2
- package/dist/_chunks/breadcrumb-zxa_PNhF.js.map +1 -0
- package/dist/_chunks/{calendar-CmiMS4FJ.js → calendar-DVe5eArk.js} +2 -2
- package/dist/_chunks/{calendar-CmiMS4FJ.js.map → calendar-DVe5eArk.js.map} +1 -1
- package/dist/_chunks/{calendar-appointment-editor-dialog-BOZ5wk96.js → calendar-appointment-editor-dialog-26LEMx0q.js} +12 -12
- package/dist/_chunks/{calendar-appointment-editor-dialog-BOZ5wk96.js.map → calendar-appointment-editor-dialog-26LEMx0q.js.map} +1 -1
- package/dist/_chunks/{chat-message-LRO_6Ee3.js → chat-message-CkBCAcwn.js} +2 -2
- package/dist/_chunks/{chat-message-LRO_6Ee3.js.map → chat-message-CkBCAcwn.js.map} +1 -1
- package/dist/_chunks/{city-input-CA59CjnV.js → city-input-DXipzTfZ.js} +3 -3
- package/dist/_chunks/{city-input-CA59CjnV.js.map → city-input-DXipzTfZ.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-CWHFnCmY.js → clinical-note-card--juv_ELr.js} +2 -2
- package/dist/_chunks/{clinical-note-card-CWHFnCmY.js.map → clinical-note-card--juv_ELr.js.map} +1 -1
- package/dist/_chunks/{combobox-D-gpgEDy.js → combobox-duuDRI1t.js} +2 -2
- package/dist/_chunks/{combobox-D-gpgEDy.js.map → combobox-duuDRI1t.js.map} +1 -1
- package/dist/_chunks/{command-palette-B3dVqm9D.js → command-palette-DxQBU4wH.js} +3 -3
- package/dist/_chunks/command-palette-DxQBU4wH.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-jBf9U4At.js → contact-profile-card-QPUgGu-t.js} +57 -57
- package/dist/_chunks/contact-profile-card-QPUgGu-t.js.map +1 -0
- package/dist/_chunks/{copy-field-hgVSc51W.js → copy-field-BaYEDJ9f.js} +24 -24
- package/dist/_chunks/copy-field-BaYEDJ9f.js.map +1 -0
- package/dist/_chunks/{country-select-BfmX9y5i.js → country-select-CUuGOAoZ.js} +2 -2
- package/dist/_chunks/{country-select-BfmX9y5i.js.map → country-select-CUuGOAoZ.js.map} +1 -1
- package/dist/_chunks/{data-table-xUDjZS_O.js → data-table-C4UT4L9B.js} +3 -3
- package/dist/_chunks/{data-table-xUDjZS_O.js.map → data-table-C4UT4L9B.js.map} +1 -1
- package/dist/_chunks/{data-table-tabs-CcgU2lr5.js → data-table-tabs-Db7zToFD.js} +2 -2
- package/dist/_chunks/{data-table-tabs-CcgU2lr5.js.map → data-table-tabs-Db7zToFD.js.map} +1 -1
- package/dist/_chunks/{dependent-selector-CyNi7M_f.js → dependent-selector-DRN0P0Kr.js} +2 -2
- package/dist/_chunks/{dependent-selector-CyNi7M_f.js.map → dependent-selector-DRN0P0Kr.js.map} +1 -1
- package/dist/_chunks/{document-preview-DWIQryMW.js → document-preview-U8H6tnDJ.js} +2 -2
- package/dist/_chunks/{document-preview-DWIQryMW.js.map → document-preview-U8H6tnDJ.js.map} +1 -1
- package/dist/_chunks/{document-scanner-BQP0Rqrt.js → document-scanner-Bf3VUp00.js} +24 -24
- package/dist/_chunks/document-scanner-Bf3VUp00.js.map +1 -0
- package/dist/_chunks/{editable-currency-cell-renderer-BEaj2NT_.js → editable-currency-cell-renderer-BUdFMh67.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-BEaj2NT_.js.map → editable-currency-cell-renderer-BUdFMh67.js.map} +1 -1
- package/dist/_chunks/{email-input-C7THAwh2.js → email-input-BEO3vonE.js} +2 -2
- package/dist/_chunks/{email-input-C7THAwh2.js.map → email-input-BEO3vonE.js.map} +1 -1
- package/dist/_chunks/{entity-summary-BJdfIsk_.js → entity-summary-B4p8zP1J.js} +2 -2
- package/dist/_chunks/{entity-summary-BJdfIsk_.js.map → entity-summary-B4p8zP1J.js.map} +1 -1
- package/dist/_chunks/{face-scheme-BmygzbZr.js → face-scheme-DdVLQ5dP.js} +3 -3
- package/dist/_chunks/{face-scheme-BmygzbZr.js.map → face-scheme-DdVLQ5dP.js.map} +1 -1
- package/dist/_chunks/{file-manager-Ba_TcfCj.js → file-manager-B4K2j7jB.js} +4 -4
- package/dist/_chunks/{file-manager-Ba_TcfCj.js.map → file-manager-B4K2j7jB.js.map} +1 -1
- package/dist/_chunks/{fiscal-code-input-BzWmNDnl.js → fiscal-code-input-BBvU7sAo.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-BzWmNDnl.js.map → fiscal-code-input-BBvU7sAo.js.map} +1 -1
- package/dist/_chunks/{forgot-password-form-BCk4rGIh.js → forgot-password-form-CeTb5p-x.js} +2 -2
- package/dist/_chunks/{forgot-password-form-BCk4rGIh.js.map → forgot-password-form-CeTb5p-x.js.map} +1 -1
- package/dist/_chunks/{header-settings-C2D74i4g.js → header-settings-Df9q1uHt.js} +2 -2
- package/dist/_chunks/{header-settings-C2D74i4g.js.map → header-settings-Df9q1uHt.js.map} +1 -1
- package/dist/_chunks/{heatmap-C9tEvqEm.js → heatmap-B2Z1_kDn.js} +2 -2
- package/dist/_chunks/{heatmap-C9tEvqEm.js.map → heatmap-B2Z1_kDn.js.map} +1 -1
- package/dist/_chunks/{help-me-write-templates-BJSf24xS.js → help-me-write-templates-ra5a__Yy.js} +2 -2
- package/dist/_chunks/{help-me-write-templates-BJSf24xS.js.map → help-me-write-templates-ra5a__Yy.js.map} +1 -1
- package/dist/_chunks/{iban-input-B9L2QDHh.js → iban-input-DuTwKok5.js} +2 -2
- package/dist/_chunks/{iban-input-B9L2QDHh.js.map → iban-input-DuTwKok5.js.map} +1 -1
- package/dist/_chunks/{icon-picker-DQMG9L6M.js → icon-picker-BmU6gpZT.js} +2 -2
- package/dist/_chunks/{icon-picker-DQMG9L6M.js.map → icon-picker-BmU6gpZT.js.map} +1 -1
- package/dist/_chunks/{input-surface-iBmxVBfr.js → input-surface-BMffm2Vd.js} +4 -4
- package/dist/_chunks/{input-surface-iBmxVBfr.js.map → input-surface-BMffm2Vd.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-OmvrkUeN.js → link-cell-renderer-DKMgD-2v.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-OmvrkUeN.js.map → link-cell-renderer-DKMgD-2v.js.map} +1 -1
- package/dist/_chunks/{locale-picker-B1NAHW4U.js → locale-picker-C86h8Yt1.js} +2 -2
- package/dist/_chunks/{locale-picker-B1NAHW4U.js.map → locale-picker-C86h8Yt1.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-DcfcFJrm.js → login-dev-card-D5BV5j1i.js} +4 -4
- package/dist/_chunks/{login-dev-card-DcfcFJrm.js.map → login-dev-card-D5BV5j1i.js.map} +1 -1
- package/dist/_chunks/{map-view--c9bJDRw.js → map-view-V7etHnyF.js} +2 -2
- package/dist/_chunks/map-view-V7etHnyF.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-DDZI-uBl.js → marketplace-app-shell-D2qgIuXX.js} +4 -4
- package/dist/_chunks/{marketplace-app-shell-DDZI-uBl.js.map → marketplace-app-shell-D2qgIuXX.js.map} +1 -1
- package/dist/_chunks/{message-card-B6SduXJv.js → message-card-BzJEITml.js} +2 -2
- package/dist/_chunks/{message-card-B6SduXJv.js.map → message-card-BzJEITml.js.map} +1 -1
- package/dist/_chunks/{message-tray-18_TrLCy.js → message-tray-DiPgJbOb.js} +2 -2
- package/dist/_chunks/{message-tray-18_TrLCy.js.map → message-tray-DiPgJbOb.js.map} +1 -1
- package/dist/_chunks/{multi-select-i5MFRpXg.js → multi-select-Df3R8lv_.js} +30 -30
- package/dist/_chunks/multi-select-Df3R8lv_.js.map +1 -0
- package/dist/_chunks/{navigation-menu-DbaSlvdO.js → navigation-menu-1MrpIVkY.js} +3 -3
- package/dist/_chunks/navigation-menu-1MrpIVkY.js.map +1 -0
- package/dist/_chunks/{notes-panel-DfjF83IK.js → notes-panel-BbNLYcdv.js} +3 -3
- package/dist/_chunks/{notes-panel-DfjF83IK.js.map → notes-panel-BbNLYcdv.js.map} +1 -1
- package/dist/_chunks/{operator-hero-N_ziNGFF.js → operator-hero-BcuPTzS_.js} +2 -2
- package/dist/_chunks/{operator-hero-N_ziNGFF.js.map → operator-hero-BcuPTzS_.js.map} +1 -1
- package/dist/_chunks/{pagination-DvKGrsXu.js → pagination-C7N_NiRN.js} +2 -2
- package/dist/_chunks/{pagination-DvKGrsXu.js.map → pagination-C7N_NiRN.js.map} +1 -1
- package/dist/_chunks/{password-input-BokZ_rnT.js → password-input-SJGHFdOO.js} +2 -2
- package/dist/_chunks/{password-input-BokZ_rnT.js.map → password-input-SJGHFdOO.js.map} +1 -1
- package/dist/_chunks/{patient-details-DGHkAErB.js → patient-details-DoIOWP6j.js} +3 -3
- package/dist/_chunks/{patient-details-DGHkAErB.js.map → patient-details-DoIOWP6j.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-BVK4y98C.js → patient-field-row--dCDO5oB.js} +9 -9
- package/dist/_chunks/{patient-field-row-BVK4y98C.js.map → patient-field-row--dCDO5oB.js.map} +1 -1
- package/dist/_chunks/{patient-search-CL6dtBIq.js → patient-search-DJy0IZSx.js} +2 -2
- package/dist/_chunks/{patient-search-CL6dtBIq.js.map → patient-search-DJy0IZSx.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-DXz07c2X.js → patient-summary-card-CL04aq8h.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DXz07c2X.js.map → patient-summary-card-CL04aq8h.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-CZk6f8aK.js → payment-automation-upsell-BPF0c-5D.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-CZk6f8aK.js.map → payment-automation-upsell-BPF0c-5D.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer-gAsNUsA8.js → pdf-viewer-DlceXkfW.js} +267 -286
- package/dist/_chunks/pdf-viewer-DlceXkfW.js.map +1 -0
- package/dist/_chunks/{phone-input-DJ4BN8tG.js → phone-input-BL8Sj6OG.js} +3 -3
- package/dist/_chunks/phone-input-BL8Sj6OG.js.map +1 -0
- package/dist/_chunks/{postal-code-input-CfZOnIkW.js → postal-code-input-dJdSAVkP.js} +2 -2
- package/dist/_chunks/{postal-code-input-CfZOnIkW.js.map → postal-code-input-dJdSAVkP.js.map} +1 -1
- package/dist/_chunks/{practice-profile-hero-DKmnB-M0.js → practice-profile-hero-B8vykoci.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-DKmnB-M0.js.map → practice-profile-hero-B8vykoci.js.map} +1 -1
- package/dist/_chunks/{practice-results-ZOVlrb43.js → practice-results-U-5kpnJa.js} +3 -3
- package/dist/_chunks/{practice-results-ZOVlrb43.js.map → practice-results-U-5kpnJa.js.map} +1 -1
- package/dist/_chunks/{province-select-D64whw0m.js → province-select-cVOlwEc5.js} +2 -2
- package/dist/_chunks/{province-select-D64whw0m.js.map → province-select-cVOlwEc5.js.map} +1 -1
- package/dist/_chunks/{public-footer-BiPiU_lk.js → public-footer-t6gx6sjn.js} +163 -152
- package/dist/_chunks/public-footer-t6gx6sjn.js.map +1 -0
- package/dist/_chunks/{registration-form-K4j2tdLt.js → registration-form-JzzTomhd.js} +5 -5
- package/dist/_chunks/{registration-form-K4j2tdLt.js.map → registration-form-JzzTomhd.js.map} +1 -1
- package/dist/_chunks/{reserved.agent-TRbKB39d.js → reserved.agent-CB-92Vi9.js} +8 -8
- package/dist/_chunks/{reserved.agent-TRbKB39d.js.map → reserved.agent-CB-92Vi9.js.map} +1 -1
- package/dist/_chunks/{reset-password-form-C6XLV7SI.js → reset-password-form-DDdGEoIL.js} +3 -3
- package/dist/_chunks/{reset-password-form-C6XLV7SI.js.map → reset-password-form-DDdGEoIL.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-CJfT08It.js → rich-text-editor-F04przIt.js} +2 -2
- package/dist/_chunks/{rich-text-editor-CJfT08It.js.map → rich-text-editor-F04przIt.js.map} +1 -1
- package/dist/_chunks/{search-bar-mA4bPe3t.js → search-bar-CQ9_V3EJ.js} +2 -2
- package/dist/_chunks/{search-bar-mA4bPe3t.js.map → search-bar-CQ9_V3EJ.js.map} +1 -1
- package/dist/_chunks/{search-input-BAlDd05M.js → search-input-CRAMo1CA.js} +2 -2
- package/dist/_chunks/{search-input-BAlDd05M.js.map → search-input-CRAMo1CA.js.map} +1 -1
- package/dist/_chunks/{send-registration-link-form-yLSfcaPk.js → send-registration-link-form-DHCQpA4C.js} +3 -3
- package/dist/_chunks/{send-registration-link-form-yLSfcaPk.js.map → send-registration-link-form-DHCQpA4C.js.map} +1 -1
- package/dist/_chunks/{sidebar-BS24EnYd.js → sidebar-2VsPlNkZ.js} +3 -3
- package/dist/_chunks/sidebar-2VsPlNkZ.js.map +1 -0
- package/dist/_chunks/{sign-document-BiOTs1P4.js → sign-document-B5qZhthO.js} +10 -10
- package/dist/_chunks/sign-document-B5qZhthO.js.map +1 -0
- package/dist/_chunks/{signature-capture-Chqh62Pc.js → signature-capture-BJc7kfqi.js} +2 -2
- package/dist/_chunks/signature-capture-BJc7kfqi.js.map +1 -0
- package/dist/_chunks/{signature-field-Y01UB5DA.js → signature-field-DjabvRZm.js} +28 -34
- package/dist/_chunks/{signature-field-Y01UB5DA.js.map → signature-field-DjabvRZm.js.map} +1 -1
- package/dist/_chunks/{signature-request-CLtMgQKi.js → signature-request-CQ0torGq.js} +2 -2
- package/dist/_chunks/{signature-request-CLtMgQKi.js.map → signature-request-CQ0torGq.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-CRwVTCjY.js → signed-out-frame-BcQE00H1.js} +2 -2
- package/dist/_chunks/{signed-out-frame-CRwVTCjY.js.map → signed-out-frame-BcQE00H1.js.map} +1 -1
- package/dist/_chunks/{stat-Dno2ZihS.js → stat-BFKZV50y.js} +137 -117
- package/dist/_chunks/stat-BFKZV50y.js.map +1 -0
- package/dist/_chunks/{state-backed-text-input-Cgh4ms3p.js → state-backed-text-input-DVETOhSS.js} +2 -2
- package/dist/_chunks/{state-backed-text-input-Cgh4ms3p.js.map → state-backed-text-input-DVETOhSS.js.map} +1 -1
- package/dist/_chunks/{stepper-accordion-DDTSOUHc.js → stepper-accordion-CYjrmRte.js} +44 -44
- package/dist/_chunks/stepper-accordion-CYjrmRte.js.map +1 -0
- package/dist/_chunks/{task-editor-qXfMbHsy.js → task-editor-BiPGFXtB.js} +3 -3
- package/dist/_chunks/{task-editor-qXfMbHsy.js.map → task-editor-BiPGFXtB.js.map} +1 -1
- package/dist/_chunks/{text-input-CaG9ApoE.js → text-input-B6iAgCr3.js} +2 -2
- package/dist/_chunks/{text-input-CaG9ApoE.js.map → text-input-B6iAgCr3.js.map} +1 -1
- package/dist/_chunks/{timeline-B32dylRJ.js → timeline-tn5QQJdS.js} +2 -2
- package/dist/_chunks/{timeline-B32dylRJ.js.map → timeline-tn5QQJdS.js.map} +1 -1
- package/dist/_chunks/{transcript-panel-CoHHpcFg.js → transcript-panel-A781Pkzr.js} +2 -2
- package/dist/_chunks/{transcript-panel-CoHHpcFg.js.map → transcript-panel-A781Pkzr.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-UXXvBeGZ.js → use-appointment-details-read-BbIoPWO6.js} +5 -5
- package/dist/_chunks/{use-appointment-details-read-UXXvBeGZ.js.map → use-appointment-details-read-BbIoPWO6.js.map} +1 -1
- package/dist/_chunks/{widget-picker-B9HpT2Tb.js → widget-picker-DNYIqRT1.js} +2 -2
- package/dist/_chunks/{widget-picker-B9HpT2Tb.js.map → widget-picker-DNYIqRT1.js.map} +1 -1
- package/dist/_chunks/{workflow-map-flsvqQ3L.js → workflow-map-k-dQkpe7.js} +20 -20
- package/dist/_chunks/{workflow-map-flsvqQ3L.js.map → workflow-map-k-dQkpe7.js.map} +1 -1
- package/dist/_chunks/{workflow-status-HQ6ziE46.js → workflow-status-9wb7iWUd.js} +2 -2
- package/dist/_chunks/{workflow-status-HQ6ziE46.js.map → workflow-status-9wb7iWUd.js.map} +1 -1
- package/dist/_chunks/{workflow-webhook-action-BD-6UyOs.js → workflow-webhook-action-B_52rH7O.js} +3 -3
- package/dist/_chunks/{workflow-webhook-action-BD-6UyOs.js.map → workflow-webhook-action-B_52rH7O.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/input-surface.d.ts +3 -3
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/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/aspect-ratio/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/dependent-selector/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/email-input/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/iban-input/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/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/navigation-menu/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/password-input/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/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts.map +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/postal-code-input/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/province-select/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-footer/public-footer.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/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-capture/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/signature-field/signature-field.d.ts.map +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +8 -0
- package/dist/components/stat/stat.d.ts.map +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +13 -1
- package/dist/index.js +88 -88
- 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/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/reset-password-form/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/aspect-ratio-DeSNzASA.js.map +0 -1
- package/dist/_chunks/avatar-a6042Ox2.js.map +0 -1
- package/dist/_chunks/breadcrumb-Bn29NCnf.js.map +0 -1
- package/dist/_chunks/command-palette-B3dVqm9D.js.map +0 -1
- package/dist/_chunks/contact-profile-card-jBf9U4At.js.map +0 -1
- package/dist/_chunks/copy-field-hgVSc51W.js.map +0 -1
- package/dist/_chunks/document-scanner-BQP0Rqrt.js.map +0 -1
- package/dist/_chunks/map-view--c9bJDRw.js.map +0 -1
- package/dist/_chunks/multi-select-i5MFRpXg.js.map +0 -1
- package/dist/_chunks/navigation-menu-DbaSlvdO.js.map +0 -1
- package/dist/_chunks/pdf-viewer-gAsNUsA8.js.map +0 -1
- package/dist/_chunks/phone-input-DJ4BN8tG.js.map +0 -1
- package/dist/_chunks/public-footer-BiPiU_lk.js.map +0 -1
- package/dist/_chunks/sidebar-BS24EnYd.js.map +0 -1
- package/dist/_chunks/sign-document-BiOTs1P4.js.map +0 -1
- package/dist/_chunks/signature-capture-Chqh62Pc.js.map +0 -1
- package/dist/_chunks/stat-Dno2ZihS.js.map +0 -1
- package/dist/_chunks/stepper-accordion-DDTSOUHc.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-registration-link-form-yLSfcaPk.js","sources":["../../src/patterns/send-registration-link-form/send-registration-link-form.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* SendRegistrationLinkForm: the form sales use in the admin area to */\n/* send a doctor a registration link. */\n/* */\n/* Email, confirm email, mobile phone, confirm phone and the last day the link allows */\n/* login. Every prop is data, so a server-rendered page can mount it */\n/* from JSON. The browser posts a real form to the host's own field */\n/* names; the card checks what a browser can check first. The host */\n/* keeps every server rule. The link itself is never shown. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type HTMLAttributes,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\nimport {\n format,\n isAfter,\n isBefore,\n isValid,\n parseISO,\n startOfDay,\n} from 'date-fns';\nimport { parsePhoneNumberFromString } from 'libphonenumber-js/min';\nimport isEmail from 'validator/lib/isEmail';\nimport { Alert } from '../../components/alert';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { DatePicker } from '../../components/date-picker';\nimport { EmailInput } from '../../components/email-input';\nimport { ErrorSummary } from '../../components/error-summary';\nimport { FormField } from '../../components/form-field';\nimport { PhoneInput } from '../../components/phone-input';\nimport { isSafeHref, isSameSiteHref } from '../../components/_shared/safe-href';\nimport { useStateBackedInput } from '../../components/_shared/use-state-backed-input';\nimport { useFieldMatch } from '../../hooks/use-field-match';\nimport {\n useErrorSummary,\n useFormMessageAnnounce,\n} from '../_shared/use-error-summary';\nimport { useRegistrationSubmit } from '../registration-form/use-registration-submit';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** The fields of the form, in the order they appear. */\nexport const SEND_REGISTRATION_LINK_FIELDS = [\n 'email',\n 'emailConfirm',\n 'phone',\n 'phoneConfirm',\n 'allowLoginUntil',\n] as const;\n\nexport type SendRegistrationLinkField =\n (typeof SEND_REGISTRATION_LINK_FIELDS)[number];\n\n/** What `onSubmit` receives once every check has passed. */\nexport interface SendRegistrationLinkValues {\n email: string;\n /** As typed. It matches `email` apart from case and outer spaces. */\n emailConfirm: string;\n /** In E.164 form, e.g. `+393331234567`. */\n phone: string;\n /** In E.164 form. Equal to `phone`. */\n phoneConfirm: string;\n /** `yyyy-MM-dd`. */\n allowLoginUntil: string;\n}\n\n/** Values to show when the form opens, e.g. after a refused post.\n * `allowLoginUntil` is `yyyy-MM-dd`. */\nexport type SendRegistrationLinkInitialValues =\n Partial<SendRegistrationLinkValues>;\n\n/** Messages from the server, already translated by the host: one per\n * field, plus `form` for a message about the whole form. */\nexport type SendRegistrationLinkErrors = Partial<\n Record<SendRegistrationLinkField | 'form', string>\n>;\n\n/** The host's own form field names, e.g. `send_registration_link[email]`. */\nexport type SendRegistrationLinkFieldNames = Partial<\n Record<SendRegistrationLinkField, string>\n>;\n\n/** Guidance for the person sending, in the host's own words. */\nexport interface SendRegistrationLinkGuidance {\n /** The notice's heading. Pass it translated. */\n title: string;\n /** One short point each. Pass them translated. Plain text. */\n points: readonly string[];\n}\n\n/** The result of a send, shown instead of the form. */\nexport interface SendRegistrationLinkSent {\n /** The address the email went to. */\n email: string;\n /** The last day the link allows login, `yyyy-MM-dd`. */\n allowLoginUntil: string;\n}\n\nexport interface SendRegistrationLinkFormProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'onSubmit'\n> {\n /** Replaces the heading \"Send a registration link\". Pass it translated. */\n title?: string;\n /** The heading's level. Default 2, for a page that has its own `h1`. */\n headingLevel?: 1 | 2 | 3;\n /** A warning-style notice above the form. The kit has no copy for it. */\n guidance?: SendRegistrationLinkGuidance;\n /** The first day that can be chosen, `yyyy-MM-dd`. Default: tomorrow. */\n minDate?: string;\n /** The last day that can be chosen, `yyyy-MM-dd`. Default: no limit.\n * Keep it equal to the server's. */\n maxDate?: string;\n /** Values to show when the form opens. Read once. */\n initialValues?: SendRegistrationLinkInitialValues;\n /** Messages from the server. Each shows on its field until the user\n * changes that field, and the form takes focus when they are present\n * at load. */\n errors?: SendRegistrationLinkErrors;\n /** Fields that refuse paste, so the user types them. Default: none.\n * Refusing a paste in `phoneConfirm` is silent: use it with care. */\n blockPaste?: readonly ('email' | 'emailConfirm' | 'phoneConfirm')[];\n /** Replaces the button's \"Send registration link\". Translated. */\n submitLabel?: string;\n /** True while a React host sends the values. */\n submitting?: boolean;\n /** Shows the result instead of the form. */\n sent?: SendRegistrationLinkSent;\n /** Where \"Send another link\" leads. Same-site path or full address. */\n sendAnotherHref?: string;\n /** For a native form post: the host's field names. When set, the\n * browser posts the form. */\n fieldNames?: SendRegistrationLinkFieldNames;\n /** Where the post goes. Default: the current address. Same site only. */\n action?: string;\n /** Extra hidden inputs for a native post, by name: the CSRF token. */\n hiddenFields?: Readonly<Record<string, string>>;\n /** For React hosts: called once every check has passed. Not called when\n * `fieldNames` is set. */\n onSubmit?: (values: SendRegistrationLinkValues) => void;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:w-full ds:[max-inline-size:36rem] ds:text-start ds:text-[var(--foreground)]',\n);\n\nconst isoDay = (date: Date): string => format(date, 'yyyy-MM-dd');\n\n/** A `yyyy-MM-dd` string as a local date, or nothing. */\nconst readDay = (value: string | undefined): Date | undefined => {\n if (!value) return undefined;\n const day = parseISO(value);\n return isValid(day) ? startOfDay(day) : undefined;\n};\n\nconst isPossiblePhone = (e164: string): boolean =>\n parsePhoneNumberFromString(e164)?.isPossible() ?? false;\n\nconst hasMessage = (errors: SendRegistrationLinkErrors): boolean =>\n Object.values(errors).some(Boolean);\n\n/* -------------------------------------------------------------------- */\n/* SendRegistrationLinkForm */\n/* -------------------------------------------------------------------- */\n\nexport const SendRegistrationLinkForm = forwardRef<\n HTMLDivElement,\n SendRegistrationLinkFormProps\n>(\n (\n {\n title,\n headingLevel = 2,\n guidance,\n minDate,\n maxDate,\n initialValues,\n errors,\n blockPaste,\n submitLabel,\n submitting = false,\n sent,\n sendAnotherHref,\n fieldNames,\n action,\n hiddenFields,\n onSubmit,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const titleId = useId();\n const fieldIdBase = useId();\n const fieldId = (field: SendRegistrationLinkField) =>\n `${fieldIdBase}-${field}`;\n const formMessageId = useId();\n const native = fieldNames !== undefined;\n const Heading = `h${headingLevel}` as const;\n\n // The allowed days, whole days in the visitor's time zone. The default\n // first day is tomorrow, worked out once.\n const [tomorrow] = useState(() => {\n const day = startOfDay(new Date());\n day.setDate(day.getDate() + 1);\n return day;\n });\n const first = readDay(minDate) ?? tomorrow;\n const last = readDay(maxDate);\n const inRange = (day: Date) =>\n !isBefore(day, first) && !(last && isAfter(day, last));\n\n /* ------------------------------ State ----------------------------- */\n\n const [values, setValues] = useState(() => ({\n email: initialValues?.email ?? '',\n emailConfirm: initialValues?.emailConfirm ?? '',\n phone: initialValues?.phone ?? '',\n phoneConfirm: initialValues?.phoneConfirm ?? '',\n }));\n const [day, setDay] = useState<Date | undefined>(() =>\n readDay(initialValues?.allowLoginUntil),\n );\n const [phonePossible, setPhonePossible] = useState(() =>\n isPossiblePhone(initialValues?.phone ?? ''),\n );\n const [touched, setTouched] = useState<\n Partial<Record<SendRegistrationLinkField, boolean>>\n >(() => ({ email: Boolean(initialValues?.email) }));\n const [submitted, setSubmitted] = useState(false);\n const [serverErrors, setServerErrors] =\n useState<SendRegistrationLinkErrors>(() => errors ?? {});\n\n const clearServer = (field: SendRegistrationLinkField) =>\n setServerErrors((previous) =>\n previous[field] ? { ...previous, [field]: undefined } : previous,\n );\n const set = (\n field: 'email' | 'emailConfirm' | 'phone' | 'phoneConfirm',\n value: string,\n ) => {\n setValues((previous) => ({ ...previous, [field]: value }));\n clearServer(field);\n };\n const leave = (field: SendRegistrationLinkField) =>\n setTouched((previous) =>\n previous[field] ? previous : { ...previous, [field]: true },\n );\n\n /* ---------------------------- Validation -------------------------- */\n\n // The same comparison the server makes: trimmed, ignoring case.\n const emailMatch = useFieldMatch({\n value: values.email,\n confirmValue: values.emailConfirm,\n kind: 'email',\n submitted,\n });\n\n // Both phones are E.164 values, the ones the form posts.\n const phoneMatch = useFieldMatch({\n value: values.phone,\n confirmValue: values.phoneConfirm,\n kind: 'phone',\n submitted,\n });\n\n const invalid: Record<SendRegistrationLinkField, boolean> = {\n email: !isEmail(values.email),\n emailConfirm: values.emailConfirm === '' || !emailMatch.matches,\n phone: values.phone === '' || !phonePossible,\n phoneConfirm: values.phoneConfirm === '' || !phoneMatch.matches,\n allowLoginUntil: !day || !inRange(day),\n };\n const required = t('registrationForm.required');\n const formatDay = (value: Date) =>\n new Intl.DateTimeFormat(i18n.language, { dateStyle: 'medium' }).format(\n value,\n );\n const labels: Record<SendRegistrationLinkField, string> = {\n email: t('registrationForm.email'),\n emailConfirm: t('registrationForm.emailConfirm'),\n phone: t('sendRegistrationLink.phone'),\n phoneConfirm: t('sendRegistrationLink.phoneConfirm'),\n allowLoginUntil: t('sendRegistrationLink.allowLoginUntil'),\n };\n // A message shows once the user has left the field or tried to submit.\n // A date waits for a submit, or a value out of range: leaving the\n // field to open the calendar is not a mistake.\n const due = (field: SendRegistrationLinkField) =>\n submitted ||\n (field === 'allowLoginUntil'\n ? day !== undefined\n : touched[field] === true);\n const whenDue = (field: SendRegistrationLinkField, message: string) =>\n due(field) && invalid[field] ? message : undefined;\n const ownErrors: Record<SendRegistrationLinkField, string | undefined> = {\n email: whenDue(\n 'email',\n values.email === '' ? required : t('inputs.email.invalid'),\n ),\n emailConfirm:\n values.emailConfirm === ''\n ? whenDue('emailConfirm', required)\n : emailMatch.error,\n phone: whenDue(\n 'phone',\n values.phone === '' ? required : t('registrationForm.phoneInvalid'),\n ),\n phoneConfirm:\n values.phoneConfirm === ''\n ? whenDue('phoneConfirm', required)\n : phoneMatch.error,\n allowLoginUntil: whenDue(\n 'allowLoginUntil',\n !day\n ? required\n : t('sendRegistrationLink.dateOutOfRange', {\n min: formatDay(first),\n max: last ? formatDay(last) : '…',\n }),\n ),\n };\n const errorFor = (field: SendRegistrationLinkField) =>\n serverErrors[field] ?? ownErrors[field];\n\n /* ------------------------------ Focus ----------------------------- */\n\n const form = useRef<HTMLFormElement>(null);\n const formMessage = useRef<HTMLDivElement>(null);\n const emailRef = useRef<HTMLInputElement | null>(null);\n const emailConfirmRef = useRef<HTMLInputElement | null>(null);\n // The addresses stay out of the inputs' `value` attributes.\n const emailField = useStateBackedInput(values.email, emailRef);\n const emailConfirmField = useStateBackedInput(\n values.emailConfirm,\n emailConfirmRef,\n );\n\n const focusField = (field: SendRegistrationLinkField | 'form') => {\n if (field === 'form') {\n formMessage.current?.focus();\n return;\n }\n form.current\n ?.querySelector<HTMLElement>(`[data-field=\"${field}\"] input`)\n ?.focus();\n };\n const focusTargetFor = (messages: SendRegistrationLinkErrors) =>\n SEND_REGISTRATION_LINK_FIELDS.find((field) => messages[field]) ??\n (hasMessage(messages) ? ('form' as const) : undefined);\n\n const [openedWithFieldMessage] = useState(() =>\n SEND_REGISTRATION_LINK_FIELDS.some((field) => Boolean(errors?.[field])),\n );\n const summary = useErrorSummary(\n SEND_REGISTRATION_LINK_FIELDS,\n errorFor,\n openedWithFieldMessage,\n );\n const [focusRequest, setFocusRequest] = useState<{\n target: SendRegistrationLinkField | 'form';\n } | null>(() => {\n const target = openedWithFieldMessage\n ? undefined\n : focusTargetFor(errors ?? {});\n return target ? { target } : null;\n });\n useEffect(() => {\n if (focusRequest) focusField(focusRequest.target);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [focusRequest]);\n\n /* ------------------------------ Submit ---------------------------- */\n\n const submit = useRegistrationSubmit<SendRegistrationLinkField>({\n errors,\n submitting,\n native,\n captcha: false,\n firstProblem: () =>\n SEND_REGISTRATION_LINK_FIELDS.find((field) => invalid[field]),\n onRefused: (field) => {\n setSubmitted(true);\n summary.open(() => setFocusRequest({ target: field }));\n },\n deliver: () =>\n onSubmit?.({\n ...values,\n allowLoginUntil: day ? isoDay(day) : '',\n }),\n onAnswer: (answer) => {\n const next: SendRegistrationLinkErrors = answer;\n setServerErrors(next);\n if (!hasMessage(next)) return;\n setSubmitted(false);\n summary.open(() => {\n const target = focusTargetFor(next);\n if (target) setFocusRequest({ target });\n });\n },\n });\n\n /* ------------------------------ Render ---------------------------- */\n\n const name = (field: SendRegistrationLinkField) =>\n native ? fieldNames[field] : field;\n const formAction =\n native && action && isSameSiteHref(action) ? action : undefined;\n const formError = serverErrors.form;\n const formMessageAnnounce = useFormMessageAnnounce(\n formError,\n summary.listed.length > 0,\n );\n const ownNames = new Set(Object.values(fieldNames ?? {}));\n const extraFields = native\n ? Object.entries(hiddenFields ?? {}).filter(\n ([extra]) => !ownNames.has(extra),\n )\n : [];\n const anotherLink =\n sendAnotherHref && isSafeHref(sendAnotherHref)\n ? sendAnotherHref\n : undefined;\n const sentDay = readDay(sent?.allowLoginUntil);\n\n if (sent) {\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"send-registration-link-form\"\n data-state=\"sent\"\n className={rootVariants({ className })}\n >\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <Heading className=\"type-title-card\">\n {title ?? t('sendRegistrationLink.title')}\n </Heading>\n <Alert variant=\"success\" data-slot=\"sent\">\n <Alert.Title as=\"p\">\n {t('sendRegistrationLink.sentTitle')}\n </Alert.Title>\n <Alert.Description>\n {t('sendRegistrationLink.sentEmail', { email: sent.email })}\n </Alert.Description>\n {sentDay && (\n <Alert.Description>\n {t('sendRegistrationLink.sentUntil', {\n date: formatDay(sentDay),\n })}\n </Alert.Description>\n )}\n </Alert>\n {anotherLink && (\n <Button asChild intent=\"secondary\" data-action=\"send-another\">\n <a href={anotherLink}>\n {t('sendRegistrationLink.sendAnother')}\n </a>\n </Button>\n )}\n </Card.Body>\n </Card>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"send-registration-link-form\"\n className={rootVariants({ className })}\n >\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <Heading id={titleId} className=\"type-title-card\">\n {title ?? t('sendRegistrationLink.title')}\n </Heading>\n\n {guidance && (\n <Alert variant=\"warning\" data-slot=\"guidance\">\n <Alert.Title as=\"p\">{guidance.title}</Alert.Title>\n <ul className=\"ds:mx-0 ds:mb-0 ds:mt-[var(--spacing-xs)] ds:ps-[var(--spacing-lg)] ds:list-disc type-body-sm\">\n {guidance.points.map((point) => (\n <li key={point}>{point}</li>\n ))}\n </ul>\n </Alert>\n )}\n\n <form\n ref={form}\n noValidate\n method=\"post\"\n action={formAction}\n aria-labelledby={titleId}\n aria-busy={submit.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 aria-describedby={formError ? formMessageId : undefined}\n errors={summary.listed.map((field) => {\n const message = errorFor(field) ?? '';\n return {\n field,\n message,\n label: message === required ? labels[field] : undefined,\n targetId: fieldId(field),\n };\n })}\n />\n\n {formError && (\n <Alert\n ref={formMessage}\n id={formMessageId}\n variant=\"error\"\n announce={formMessageAnnounce}\n tabIndex={-1}\n data-field=\"form\"\n >\n <Alert.Description>{formError}</Alert.Description>\n </Alert>\n )}\n\n <FormField\n id={fieldId('email')}\n label={labels.email}\n required\n error={errorFor('email')}\n announceError={!summary.lists('email')}\n data-field=\"email\"\n >\n <EmailInput\n ref={emailField.ref}\n name={name('email')}\n errorMessage={null}\n onChange={emailField.quiet((event) =>\n set('email', event.target.value),\n )}\n onBlur={() => leave('email')}\n blockPaste={blockPaste?.includes('email') ?? false}\n />\n </FormField>\n\n <FormField\n id={fieldId('emailConfirm')}\n label={labels.emailConfirm}\n required\n error={errorFor('emailConfirm')}\n announceError={!summary.lists('emailConfirm')}\n data-field=\"emailConfirm\"\n >\n <EmailInput\n ref={emailConfirmField.ref}\n name={name('emailConfirm')}\n disableBuiltInValidation\n onChange={emailConfirmField.quiet((event) =>\n set('emailConfirm', event.target.value),\n )}\n onBlur={() => {\n leave('emailConfirm');\n emailMatch.confirmProps.onBlur();\n }}\n blockPaste={blockPaste?.includes('emailConfirm') ?? false}\n />\n </FormField>\n\n <FormField\n id={fieldId('phone')}\n label={labels.phone}\n required\n description={t('sendRegistrationLink.phoneDescription')}\n error={errorFor('phone')}\n announceError={!summary.lists('phone')}\n data-field=\"phone\"\n onBlur={() => leave('phone')}\n >\n {/* The visible input holds the number as typed; a hidden\n input carries the full international number. */}\n <PhoneInput\n name={native ? undefined : 'phone'}\n value={values.phone}\n onChange={(e164, meta) => {\n set('phone', e164);\n setPhonePossible(meta.isPossible);\n }}\n />\n </FormField>\n\n <FormField\n id={fieldId('phoneConfirm')}\n label={labels.phoneConfirm}\n required\n error={errorFor('phoneConfirm')}\n announceError={!summary.lists('phoneConfirm')}\n data-field=\"phoneConfirm\"\n onBlur={() => {\n leave('phoneConfirm');\n phoneMatch.confirmProps.onBlur();\n }}\n onPasteCapture={\n blockPaste?.includes('phoneConfirm')\n ? (event) => event.preventDefault()\n : undefined\n }\n >\n <PhoneInput\n name={native ? undefined : 'phoneConfirm'}\n value={values.phoneConfirm}\n onChange={(e164) => set('phoneConfirm', e164)}\n />\n </FormField>\n\n <FormField\n id={fieldId('allowLoginUntil')}\n label={labels.allowLoginUntil}\n required\n error={errorFor('allowLoginUntil')}\n announceError={!summary.lists('allowLoginUntil')}\n data-field=\"allowLoginUntil\"\n >\n <DatePicker\n value={day}\n minDate={first}\n maxDate={last}\n onChange={(next) => {\n setDay(next);\n clearServer('allowLoginUntil');\n }}\n />\n </FormField>\n\n {native && fieldNames.phone && (\n <input\n type=\"hidden\"\n name={fieldNames.phone}\n value={values.phone}\n />\n )}\n {native && fieldNames.phoneConfirm && (\n <input\n type=\"hidden\"\n name={fieldNames.phoneConfirm}\n value={values.phoneConfirm}\n />\n )}\n {native && fieldNames.allowLoginUntil && (\n <input\n type=\"hidden\"\n name={fieldNames.allowLoginUntil}\n value={day ? isoDay(day) : ''}\n />\n )}\n {extraFields.map(([extra, value]) => (\n <input key={extra} type=\"hidden\" name={extra} value={value} />\n ))}\n\n <Button\n type=\"submit\"\n intent=\"primary\"\n size=\"lg\"\n loading={submit.busy}\n className=\"ds:w-full\"\n data-action=\"submit\"\n >\n {submitLabel ?? t('sendRegistrationLink.submit')}\n </Button>\n <p role=\"status\" className=\"ds:sr-only\">\n {submit.busy ? t('chat.message.status.sending') : ''}\n </p>\n </form>\n </Card.Body>\n </Card>\n </div>\n );\n },\n);\nSendRegistrationLinkForm.displayName = 'SendRegistrationLinkForm';\n"],"names":["SEND_REGISTRATION_LINK_FIELDS","rootVariants","cva","isoDay","date","format","readDay","value","day","parseISO","isValid","startOfDay","isPossiblePhone","e164","_a","parsePhoneNumberFromString","hasMessage","errors","SendRegistrationLinkForm","forwardRef","title","headingLevel","guidance","minDate","maxDate","initialValues","blockPaste","submitLabel","submitting","sent","sendAnotherHref","fieldNames","action","hiddenFields","onSubmit","className","rest","ref","t","i18n","useTranslation","titleId","useId","fieldIdBase","fieldId","field","formMessageId","native","Heading","tomorrow","useState","first","last","inRange","isBefore","isAfter","values","setValues","setDay","phonePossible","setPhonePossible","touched","setTouched","submitted","setSubmitted","serverErrors","setServerErrors","clearServer","previous","set","leave","emailMatch","useFieldMatch","phoneMatch","invalid","isEmail","required","formatDay","labels","due","whenDue","message","ownErrors","errorFor","form","useRef","formMessage","emailRef","emailConfirmRef","emailField","useStateBackedInput","emailConfirmField","focusField","_c","_b","focusTargetFor","messages","openedWithFieldMessage","summary","useErrorSummary","focusRequest","setFocusRequest","target","useEffect","submit","useRegistrationSubmit","answer","next","name","formAction","isSameSiteHref","formError","formMessageAnnounce","useFormMessageAnnounce","ownNames","extraFields","extra","anotherLink","isSafeHref","sentDay","jsx","Card","jsxs","Alert","Button","point","ErrorSummary","FormField","EmailInput","event","PhoneInput","meta","DatePicker"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqDO,MAAMA,IAAgC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAkGMC,KAAeC;AAAA,EACnB;AACF,GAEMC,KAAS,CAACC,MAAuBC,GAAOD,GAAM,YAAY,GAG1DE,IAAU,CAACC,MAAgD;AAC/D,MAAI,CAACA,EAAO;AACZ,QAAMC,IAAMC,GAASF,CAAK;AAC1B,SAAOG,GAAQF,CAAG,IAAIG,GAAWH,CAAG,IAAI;AAC1C,GAEMI,KAAkB,CAACC,MAAA;;AACvB,WAAAC,IAAAC,GAA2BF,CAAI,MAA/B,gBAAAC,EAAkC,iBAAgB;AAAA,GAE9CE,KAAa,CAACC,MAClB,OAAO,OAAOA,CAAM,EAAE,KAAK,OAAO,GAMvBC,KAA2BC;AAAA,EAItC,CACE;AAAA,IACE,OAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA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AAA,oBAChB,WAAU;AAAA,oBACV,eAAY;AAAA,oBAEX,UAAA7E,MAAeW,EAAE,6BAA6B;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAEjD,gBAAAkF,EAAC,KAAA,EAAE,MAAK,UAAS,WAAU,cACxB,UAAAhB,EAAO,OAAOlE,EAAE,6BAA6B,IAAI,GAAA,CACpD;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACF,EAAA,CACF,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACApB,GAAyB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"send-registration-link-form-DHCQpA4C.js","sources":["../../src/patterns/send-registration-link-form/send-registration-link-form.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* SendRegistrationLinkForm: the form sales use in the admin area to */\n/* send a doctor a registration link. */\n/* */\n/* Email, confirm email, mobile phone, confirm phone and the last day the link allows */\n/* login. Every prop is data, so a server-rendered page can mount it */\n/* from JSON. The browser posts a real form to the host's own field */\n/* names; the card checks what a browser can check first. The host */\n/* keeps every server rule. The link itself is never shown. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type HTMLAttributes,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\nimport {\n format,\n isAfter,\n isBefore,\n isValid,\n parseISO,\n startOfDay,\n} from 'date-fns';\nimport { parsePhoneNumberFromString } from 'libphonenumber-js/min';\nimport isEmail from 'validator/lib/isEmail';\nimport { Alert } from '../../components/alert';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { DatePicker } from '../../components/date-picker';\nimport { EmailInput } from '../../components/email-input';\nimport { ErrorSummary } from '../../components/error-summary';\nimport { FormField } from '../../components/form-field';\nimport { PhoneInput } from '../../components/phone-input';\nimport { isSafeHref, isSameSiteHref } from '../../components/_shared/safe-href';\nimport { useStateBackedInput } from '../../components/_shared/use-state-backed-input';\nimport { useFieldMatch } from '../../hooks/use-field-match';\nimport {\n useErrorSummary,\n useFormMessageAnnounce,\n} from '../_shared/use-error-summary';\nimport { useRegistrationSubmit } from '../registration-form/use-registration-submit';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** The fields of the form, in the order they appear. */\nexport const SEND_REGISTRATION_LINK_FIELDS = [\n 'email',\n 'emailConfirm',\n 'phone',\n 'phoneConfirm',\n 'allowLoginUntil',\n] as const;\n\nexport type SendRegistrationLinkField =\n (typeof SEND_REGISTRATION_LINK_FIELDS)[number];\n\n/** What `onSubmit` receives once every check has passed. */\nexport interface SendRegistrationLinkValues {\n email: string;\n /** As typed. It matches `email` apart from case and outer spaces. */\n emailConfirm: string;\n /** In E.164 form, e.g. `+393331234567`. */\n phone: string;\n /** In E.164 form. Equal to `phone`. */\n phoneConfirm: string;\n /** `yyyy-MM-dd`. */\n allowLoginUntil: string;\n}\n\n/** Values to show when the form opens, e.g. after a refused post.\n * `allowLoginUntil` is `yyyy-MM-dd`. */\nexport type SendRegistrationLinkInitialValues =\n Partial<SendRegistrationLinkValues>;\n\n/** Messages from the server, already translated by the host: one per\n * field, plus `form` for a message about the whole form. */\nexport type SendRegistrationLinkErrors = Partial<\n Record<SendRegistrationLinkField | 'form', string>\n>;\n\n/** The host's own form field names, e.g. `send_registration_link[email]`. */\nexport type SendRegistrationLinkFieldNames = Partial<\n Record<SendRegistrationLinkField, string>\n>;\n\n/** Guidance for the person sending, in the host's own words. */\nexport interface SendRegistrationLinkGuidance {\n /** The notice's heading. Pass it translated. */\n title: string;\n /** One short point each. Pass them translated. Plain text. */\n points: readonly string[];\n}\n\n/** The result of a send, shown instead of the form. */\nexport interface SendRegistrationLinkSent {\n /** The address the email went to. */\n email: string;\n /** The last day the link allows login, `yyyy-MM-dd`. */\n allowLoginUntil: string;\n}\n\nexport interface SendRegistrationLinkFormProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'onSubmit'\n> {\n /** Replaces the heading \"Send a registration link\". Pass it translated. */\n title?: string;\n /** The heading's level. Default 2, for a page that has its own `h1`. */\n headingLevel?: 1 | 2 | 3;\n /** A warning-style notice above the form. The kit has no copy for it. */\n guidance?: SendRegistrationLinkGuidance;\n /** The first day that can be chosen, `yyyy-MM-dd`. Default: tomorrow. */\n minDate?: string;\n /** The last day that can be chosen, `yyyy-MM-dd`. Default: no limit.\n * Keep it equal to the server's. */\n maxDate?: string;\n /** Values to show when the form opens. Read once. */\n initialValues?: SendRegistrationLinkInitialValues;\n /** Messages from the server. Each shows on its field until the user\n * changes that field, and the form takes focus when they are present\n * at load. */\n errors?: SendRegistrationLinkErrors;\n /** Fields that refuse paste, so the user types them. Default: none.\n * Refusing a paste in `phoneConfirm` is silent: use it with care. */\n blockPaste?: readonly ('email' | 'emailConfirm' | 'phoneConfirm')[];\n /** Replaces the button's \"Send registration link\". Translated. */\n submitLabel?: string;\n /** True while a React host sends the values. */\n submitting?: boolean;\n /** Shows the result instead of the form. */\n sent?: SendRegistrationLinkSent;\n /** Where \"Send another link\" leads. Same-site path or full address. */\n sendAnotherHref?: string;\n /** For a native form post: the host's field names. When set, the\n * browser posts the form. */\n fieldNames?: SendRegistrationLinkFieldNames;\n /** Where the post goes. Default: the current address. Same site only. */\n action?: string;\n /** Extra hidden inputs for a native post, by name: the CSRF token. */\n hiddenFields?: Readonly<Record<string, string>>;\n /** For React hosts: called once every check has passed. Not called when\n * `fieldNames` is set. */\n onSubmit?: (values: SendRegistrationLinkValues) => void;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:w-full ds:[max-inline-size:36rem] ds:text-start ds:text-[var(--foreground)]',\n);\n\nconst isoDay = (date: Date): string => format(date, 'yyyy-MM-dd');\n\n/** A `yyyy-MM-dd` string as a local date, or nothing. */\nconst readDay = (value: string | undefined): Date | undefined => {\n if (!value) return undefined;\n const day = parseISO(value);\n return isValid(day) ? startOfDay(day) : undefined;\n};\n\nconst isPossiblePhone = (e164: string): boolean =>\n parsePhoneNumberFromString(e164)?.isPossible() ?? false;\n\nconst hasMessage = (errors: SendRegistrationLinkErrors): boolean =>\n Object.values(errors).some(Boolean);\n\n/* -------------------------------------------------------------------- */\n/* SendRegistrationLinkForm */\n/* -------------------------------------------------------------------- */\n\nexport const SendRegistrationLinkForm = forwardRef<\n HTMLDivElement,\n SendRegistrationLinkFormProps\n>(\n (\n {\n title,\n headingLevel = 2,\n guidance,\n minDate,\n maxDate,\n initialValues,\n errors,\n blockPaste,\n submitLabel,\n submitting = false,\n sent,\n sendAnotherHref,\n fieldNames,\n action,\n hiddenFields,\n onSubmit,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const titleId = useId();\n const fieldIdBase = useId();\n const fieldId = (field: SendRegistrationLinkField) =>\n `${fieldIdBase}-${field}`;\n const formMessageId = useId();\n const native = fieldNames !== undefined;\n const Heading = `h${headingLevel}` as const;\n\n // The allowed days, whole days in the visitor's time zone. The default\n // first day is tomorrow, worked out once.\n const [tomorrow] = useState(() => {\n const day = startOfDay(new Date());\n day.setDate(day.getDate() + 1);\n return day;\n });\n const first = readDay(minDate) ?? tomorrow;\n const last = readDay(maxDate);\n const inRange = (day: Date) =>\n !isBefore(day, first) && !(last && isAfter(day, last));\n\n /* ------------------------------ State ----------------------------- */\n\n const [values, setValues] = useState(() => ({\n email: initialValues?.email ?? '',\n emailConfirm: initialValues?.emailConfirm ?? '',\n phone: initialValues?.phone ?? '',\n phoneConfirm: initialValues?.phoneConfirm ?? '',\n }));\n const [day, setDay] = useState<Date | undefined>(() =>\n readDay(initialValues?.allowLoginUntil),\n );\n const [phonePossible, setPhonePossible] = useState(() =>\n isPossiblePhone(initialValues?.phone ?? ''),\n );\n const [touched, setTouched] = useState<\n Partial<Record<SendRegistrationLinkField, boolean>>\n >(() => ({ email: Boolean(initialValues?.email) }));\n const [submitted, setSubmitted] = useState(false);\n const [serverErrors, setServerErrors] =\n useState<SendRegistrationLinkErrors>(() => errors ?? {});\n\n const clearServer = (field: SendRegistrationLinkField) =>\n setServerErrors((previous) =>\n previous[field] ? { ...previous, [field]: undefined } : previous,\n );\n const set = (\n field: 'email' | 'emailConfirm' | 'phone' | 'phoneConfirm',\n value: string,\n ) => {\n setValues((previous) => ({ ...previous, [field]: value }));\n clearServer(field);\n };\n const leave = (field: SendRegistrationLinkField) =>\n setTouched((previous) =>\n previous[field] ? previous : { ...previous, [field]: true },\n );\n\n /* ---------------------------- Validation -------------------------- */\n\n // The same comparison the server makes: trimmed, ignoring case.\n const emailMatch = useFieldMatch({\n value: values.email,\n confirmValue: values.emailConfirm,\n kind: 'email',\n submitted,\n });\n\n // Both phones are E.164 values, the ones the form posts.\n const phoneMatch = useFieldMatch({\n value: values.phone,\n confirmValue: values.phoneConfirm,\n kind: 'phone',\n submitted,\n });\n\n const invalid: Record<SendRegistrationLinkField, boolean> = {\n email: !isEmail(values.email),\n emailConfirm: values.emailConfirm === '' || !emailMatch.matches,\n phone: values.phone === '' || !phonePossible,\n phoneConfirm: values.phoneConfirm === '' || !phoneMatch.matches,\n allowLoginUntil: !day || !inRange(day),\n };\n const required = t('registrationForm.required');\n const formatDay = (value: Date) =>\n new Intl.DateTimeFormat(i18n.language, { dateStyle: 'medium' }).format(\n value,\n );\n const labels: Record<SendRegistrationLinkField, string> = {\n email: t('registrationForm.email'),\n emailConfirm: t('registrationForm.emailConfirm'),\n phone: t('sendRegistrationLink.phone'),\n phoneConfirm: t('sendRegistrationLink.phoneConfirm'),\n allowLoginUntil: t('sendRegistrationLink.allowLoginUntil'),\n };\n // A message shows once the user has left the field or tried to submit.\n // A date waits for a submit, or a value out of range: leaving the\n // field to open the calendar is not a mistake.\n const due = (field: SendRegistrationLinkField) =>\n submitted ||\n (field === 'allowLoginUntil'\n ? day !== undefined\n : touched[field] === true);\n const whenDue = (field: SendRegistrationLinkField, message: string) =>\n due(field) && invalid[field] ? message : undefined;\n const ownErrors: Record<SendRegistrationLinkField, string | undefined> = {\n email: whenDue(\n 'email',\n values.email === '' ? required : t('inputs.email.invalid'),\n ),\n emailConfirm:\n values.emailConfirm === ''\n ? whenDue('emailConfirm', required)\n : emailMatch.error,\n phone: whenDue(\n 'phone',\n values.phone === '' ? required : t('registrationForm.phoneInvalid'),\n ),\n phoneConfirm:\n values.phoneConfirm === ''\n ? whenDue('phoneConfirm', required)\n : phoneMatch.error,\n allowLoginUntil: whenDue(\n 'allowLoginUntil',\n !day\n ? required\n : t('sendRegistrationLink.dateOutOfRange', {\n min: formatDay(first),\n max: last ? formatDay(last) : '…',\n }),\n ),\n };\n const errorFor = (field: SendRegistrationLinkField) =>\n serverErrors[field] ?? ownErrors[field];\n\n /* ------------------------------ Focus ----------------------------- */\n\n const form = useRef<HTMLFormElement>(null);\n const formMessage = useRef<HTMLDivElement>(null);\n const emailRef = useRef<HTMLInputElement | null>(null);\n const emailConfirmRef = useRef<HTMLInputElement | null>(null);\n // The addresses stay out of the inputs' `value` attributes.\n const emailField = useStateBackedInput(values.email, emailRef);\n const emailConfirmField = useStateBackedInput(\n values.emailConfirm,\n emailConfirmRef,\n );\n\n const focusField = (field: SendRegistrationLinkField | 'form') => {\n if (field === 'form') {\n formMessage.current?.focus();\n return;\n }\n form.current\n ?.querySelector<HTMLElement>(`[data-field=\"${field}\"] input`)\n ?.focus();\n };\n const focusTargetFor = (messages: SendRegistrationLinkErrors) =>\n SEND_REGISTRATION_LINK_FIELDS.find((field) => messages[field]) ??\n (hasMessage(messages) ? ('form' as const) : undefined);\n\n const [openedWithFieldMessage] = useState(() =>\n SEND_REGISTRATION_LINK_FIELDS.some((field) => Boolean(errors?.[field])),\n );\n const summary = useErrorSummary(\n SEND_REGISTRATION_LINK_FIELDS,\n errorFor,\n openedWithFieldMessage,\n );\n const [focusRequest, setFocusRequest] = useState<{\n target: SendRegistrationLinkField | 'form';\n } | null>(() => {\n const target = openedWithFieldMessage\n ? undefined\n : focusTargetFor(errors ?? {});\n return target ? { target } : null;\n });\n useEffect(() => {\n if (focusRequest) focusField(focusRequest.target);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [focusRequest]);\n\n /* ------------------------------ Submit ---------------------------- */\n\n const submit = useRegistrationSubmit<SendRegistrationLinkField>({\n errors,\n submitting,\n native,\n captcha: false,\n firstProblem: () =>\n SEND_REGISTRATION_LINK_FIELDS.find((field) => invalid[field]),\n onRefused: (field) => {\n setSubmitted(true);\n summary.open(() => setFocusRequest({ target: field }));\n },\n deliver: () =>\n onSubmit?.({\n ...values,\n allowLoginUntil: day ? isoDay(day) : '',\n }),\n onAnswer: (answer) => {\n const next: SendRegistrationLinkErrors = answer;\n setServerErrors(next);\n if (!hasMessage(next)) return;\n setSubmitted(false);\n summary.open(() => {\n const target = focusTargetFor(next);\n if (target) setFocusRequest({ target });\n });\n },\n });\n\n /* ------------------------------ Render ---------------------------- */\n\n const name = (field: SendRegistrationLinkField) =>\n native ? fieldNames[field] : field;\n const formAction =\n native && action && isSameSiteHref(action) ? action : undefined;\n const formError = serverErrors.form;\n const formMessageAnnounce = useFormMessageAnnounce(\n formError,\n summary.listed.length > 0,\n );\n const ownNames = new Set(Object.values(fieldNames ?? {}));\n const extraFields = native\n ? Object.entries(hiddenFields ?? {}).filter(\n ([extra]) => !ownNames.has(extra),\n )\n : [];\n const anotherLink =\n sendAnotherHref && isSafeHref(sendAnotherHref)\n ? sendAnotherHref\n : undefined;\n const sentDay = readDay(sent?.allowLoginUntil);\n\n if (sent) {\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"send-registration-link-form\"\n data-state=\"sent\"\n className={rootVariants({ className })}\n >\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <Heading className=\"type-title-card\">\n {title ?? t('sendRegistrationLink.title')}\n </Heading>\n <Alert variant=\"success\" data-slot=\"sent\">\n <Alert.Title as=\"p\">\n {t('sendRegistrationLink.sentTitle')}\n </Alert.Title>\n <Alert.Description>\n {t('sendRegistrationLink.sentEmail', { email: sent.email })}\n </Alert.Description>\n {sentDay && (\n <Alert.Description>\n {t('sendRegistrationLink.sentUntil', {\n date: formatDay(sentDay),\n })}\n </Alert.Description>\n )}\n </Alert>\n {anotherLink && (\n <Button asChild intent=\"secondary\" data-action=\"send-another\">\n <a href={anotherLink}>\n {t('sendRegistrationLink.sendAnother')}\n </a>\n </Button>\n )}\n </Card.Body>\n </Card>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"send-registration-link-form\"\n className={rootVariants({ className })}\n >\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <Heading id={titleId} className=\"type-title-card\">\n {title ?? t('sendRegistrationLink.title')}\n </Heading>\n\n {guidance && (\n <Alert variant=\"warning\" data-slot=\"guidance\">\n <Alert.Title as=\"p\">{guidance.title}</Alert.Title>\n <ul className=\"ds:mx-0 ds:mb-0 ds:mt-[var(--spacing-xs)] ds:ps-[var(--spacing-lg)] ds:list-disc type-body-sm\">\n {guidance.points.map((point) => (\n <li key={point}>{point}</li>\n ))}\n </ul>\n </Alert>\n )}\n\n <form\n ref={form}\n noValidate\n method=\"post\"\n action={formAction}\n aria-labelledby={titleId}\n aria-busy={submit.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 aria-describedby={formError ? formMessageId : undefined}\n errors={summary.listed.map((field) => {\n const message = errorFor(field) ?? '';\n return {\n field,\n message,\n label: message === required ? labels[field] : undefined,\n targetId: fieldId(field),\n };\n })}\n />\n\n {formError && (\n <Alert\n ref={formMessage}\n id={formMessageId}\n variant=\"error\"\n announce={formMessageAnnounce}\n tabIndex={-1}\n data-field=\"form\"\n >\n <Alert.Description>{formError}</Alert.Description>\n </Alert>\n )}\n\n <FormField\n id={fieldId('email')}\n label={labels.email}\n required\n error={errorFor('email')}\n announceError={!summary.lists('email')}\n data-field=\"email\"\n >\n <EmailInput\n ref={emailField.ref}\n name={name('email')}\n errorMessage={null}\n onChange={emailField.quiet((event) =>\n set('email', event.target.value),\n )}\n onBlur={() => leave('email')}\n blockPaste={blockPaste?.includes('email') ?? false}\n />\n </FormField>\n\n <FormField\n id={fieldId('emailConfirm')}\n label={labels.emailConfirm}\n required\n error={errorFor('emailConfirm')}\n announceError={!summary.lists('emailConfirm')}\n data-field=\"emailConfirm\"\n >\n <EmailInput\n ref={emailConfirmField.ref}\n name={name('emailConfirm')}\n disableBuiltInValidation\n onChange={emailConfirmField.quiet((event) =>\n set('emailConfirm', event.target.value),\n )}\n onBlur={() => {\n leave('emailConfirm');\n emailMatch.confirmProps.onBlur();\n }}\n blockPaste={blockPaste?.includes('emailConfirm') ?? false}\n />\n </FormField>\n\n <FormField\n id={fieldId('phone')}\n label={labels.phone}\n required\n description={t('sendRegistrationLink.phoneDescription')}\n error={errorFor('phone')}\n announceError={!summary.lists('phone')}\n data-field=\"phone\"\n onBlur={() => leave('phone')}\n >\n {/* The visible input holds the number as typed; a hidden\n input carries the full international number. */}\n <PhoneInput\n name={native ? undefined : 'phone'}\n value={values.phone}\n onChange={(e164, meta) => {\n set('phone', e164);\n setPhonePossible(meta.isPossible);\n }}\n />\n </FormField>\n\n <FormField\n id={fieldId('phoneConfirm')}\n label={labels.phoneConfirm}\n required\n error={errorFor('phoneConfirm')}\n announceError={!summary.lists('phoneConfirm')}\n data-field=\"phoneConfirm\"\n onBlur={() => {\n leave('phoneConfirm');\n phoneMatch.confirmProps.onBlur();\n }}\n onPasteCapture={\n blockPaste?.includes('phoneConfirm')\n ? (event) => event.preventDefault()\n : undefined\n }\n >\n <PhoneInput\n name={native ? undefined : 'phoneConfirm'}\n value={values.phoneConfirm}\n onChange={(e164) => set('phoneConfirm', e164)}\n />\n </FormField>\n\n <FormField\n id={fieldId('allowLoginUntil')}\n label={labels.allowLoginUntil}\n required\n error={errorFor('allowLoginUntil')}\n announceError={!summary.lists('allowLoginUntil')}\n data-field=\"allowLoginUntil\"\n >\n <DatePicker\n value={day}\n minDate={first}\n maxDate={last}\n onChange={(next) => {\n setDay(next);\n clearServer('allowLoginUntil');\n }}\n />\n </FormField>\n\n {native && fieldNames.phone && (\n <input\n type=\"hidden\"\n name={fieldNames.phone}\n value={values.phone}\n />\n )}\n {native && fieldNames.phoneConfirm && (\n <input\n type=\"hidden\"\n name={fieldNames.phoneConfirm}\n value={values.phoneConfirm}\n />\n )}\n {native && fieldNames.allowLoginUntil && (\n <input\n type=\"hidden\"\n name={fieldNames.allowLoginUntil}\n value={day ? isoDay(day) : ''}\n />\n )}\n {extraFields.map(([extra, value]) => (\n <input key={extra} type=\"hidden\" name={extra} value={value} />\n ))}\n\n <Button\n type=\"submit\"\n intent=\"primary\"\n size=\"lg\"\n loading={submit.busy}\n className=\"ds:w-full\"\n data-action=\"submit\"\n >\n {submitLabel ?? t('sendRegistrationLink.submit')}\n </Button>\n <p role=\"status\" className=\"ds:sr-only\">\n {submit.busy ? t('chat.message.status.sending') : ''}\n </p>\n </form>\n </Card.Body>\n </Card>\n </div>\n );\n },\n);\nSendRegistrationLinkForm.displayName = 'SendRegistrationLinkForm';\n"],"names":["SEND_REGISTRATION_LINK_FIELDS","rootVariants","cva","isoDay","date","format","readDay","value","day","parseISO","isValid","startOfDay","isPossiblePhone","e164","_a","parsePhoneNumberFromString","hasMessage","errors","SendRegistrationLinkForm","forwardRef","title","headingLevel","guidance","minDate","maxDate","initialValues","blockPaste","submitLabel","submitting","sent","sendAnotherHref","fieldNames","action","hiddenFields","onSubmit","className","rest","ref","t","i18n","useTranslation","titleId","useId","fieldIdBase","fieldId","field","formMessageId","native","Heading","tomorrow","useState","first","last","inRange","isBefore","isAfter","values","setValues","setDay","phonePossible","setPhonePossible","touched","setTouched","submitted","setSubmitted","serverErrors","setServerErrors","clearServer","previous","set","leave","emailMatch","useFieldMatch","phoneMatch","invalid","isEmail","required","formatDay","labels","due","whenDue","message","ownErrors","errorFor","form","useRef","formMessage","emailRef","emailConfirmRef","emailField","useStateBackedInput","emailConfirmField","focusField","_c","_b","focusTargetFor","messages","openedWithFieldMessage","summary","useErrorSummary","focusRequest","setFocusRequest","target","useEffect","submit","useRegistrationSubmit","answer","next","name","formAction","isSameSiteHref","formError","formMessageAnnounce","useFormMessageAnnounce","ownNames","extraFields","extra","anotherLink","isSafeHref","sentDay","jsx","Card","jsxs","Alert","Button","point","ErrorSummary","FormField","EmailInput","event","PhoneInput","meta","DatePicker"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqDO,MAAMA,IAAgC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAkGMC,KAAeC;AAAA,EACnB;AACF,GAEMC,KAAS,CAACC,MAAuBC,GAAOD,GAAM,YAAY,GAG1DE,IAAU,CAACC,MAAgD;AAC/D,MAAI,CAACA,EAAO;AACZ,QAAMC,IAAMC,GAASF,CAAK;AAC1B,SAAOG,GAAQF,CAAG,IAAIG,GAAWH,CAAG,IAAI;AAC1C,GAEMI,KAAkB,CAACC,MAAA;;AACvB,WAAAC,IAAAC,GAA2BF,CAAI,MAA/B,gBAAAC,EAAkC,iBAAgB;AAAA,GAE9CE,KAAa,CAACC,MAClB,OAAO,OAAOA,CAAM,EAAE,KAAK,OAAO,GAMvBC,KAA2BC;AAAA,EAItC,CACE;AAAA,IACE,OAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC;AAAA,IACA,QAAAR;AAAA,IACA,YAAAS;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC,KAAa;AAAA,IACb,MAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,W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I,GAAA,CACpD;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACF,EAAA,CACF,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACApB,GAAyB,cAAc;"}
|
|
@@ -12,7 +12,7 @@ import { useTranslation as de } from "react-i18next";
|
|
|
12
12
|
import { u as fs } from "./registry-DvAUVLHh.js";
|
|
13
13
|
import { u as ms } from "./use-edge-resize-CBtem0j2.js";
|
|
14
14
|
import { c as $e } from "./compose-refs-C0k0tdqF.js";
|
|
15
|
-
import { a as ps, b as vs, d as gs } from "./input-surface-
|
|
15
|
+
import { a as ps, b as vs, d as gs } from "./input-surface-BMffm2Vd.js";
|
|
16
16
|
import { u as xe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
17
17
|
import { i as bs } from "./is-development-CLUAnsU7.js";
|
|
18
18
|
import { X as He } from "./x-B5YnXwCz.js";
|
|
@@ -1384,7 +1384,7 @@ const it = [
|
|
|
1384
1384
|
"ds:min-h-[var(--min-target-size)]",
|
|
1385
1385
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
1386
1386
|
"ds:rounded-[var(--radius-sm)]",
|
|
1387
|
-
"ds:text-[var(--foreground)] ds:text-[var(--font-size-sm)]",
|
|
1387
|
+
"ds:text-[var(--foreground)] ds:text-[length:var(--font-size-sm)]",
|
|
1388
1388
|
"ds:font-[var(--font-weight-medium)]",
|
|
1389
1389
|
"ds:hover:bg-[var(--muted)]/20",
|
|
1390
1390
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
@@ -2568,4 +2568,4 @@ export {
|
|
|
2568
2568
|
Os as u,
|
|
2569
2569
|
H as v
|
|
2570
2570
|
};
|
|
2571
|
-
//# sourceMappingURL=sidebar-
|
|
2571
|
+
//# sourceMappingURL=sidebar-2VsPlNkZ.js.map
|