@alfadocs/ui-kit-debug 1.112.2 → 1.114.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/{anamnesis-card-BzuluoD1.js → anamnesis-card-Ddnrdfx3.js} +2 -2
- package/dist/_chunks/{anamnesis-card-BzuluoD1.js.map → anamnesis-card-Ddnrdfx3.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-card-DdTRdNrQ.js → anamnesis-summary-card-S1H_AARG.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-card-DdTRdNrQ.js.map → anamnesis-summary-card-S1H_AARG.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-DfDulR_c.js → anamnesis-summary-rows-DaS-j8Jd.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-DfDulR_c.js.map → anamnesis-summary-rows-DaS-j8Jd.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-DmsY5g28.js → antenatal-schedule-timeline-DmlXxevC.js} +2 -2
- package/dist/_chunks/{antenatal-schedule-timeline-DmsY5g28.js.map → antenatal-schedule-timeline-DmlXxevC.js.map} +1 -1
- package/dist/_chunks/{bishop-score-CnIft4eV.js → bishop-score-QJu-sM1y.js} +2 -2
- package/dist/_chunks/{bishop-score-CnIft4eV.js.map → bishop-score-QJu-sM1y.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-NMkXc079.js → bmi-calculator-Ba4yoR31.js} +2 -2
- package/dist/_chunks/{bmi-calculator-NMkXc079.js.map → bmi-calculator-Ba4yoR31.js.map} +1 -1
- package/dist/_chunks/{calendar-appointment-editor-dialog-FvdoKZ54.js → calendar-appointment-editor-dialog-iyh9QqNw.js} +6 -6
- package/dist/_chunks/{calendar-appointment-editor-dialog-FvdoKZ54.js.map → calendar-appointment-editor-dialog-iyh9QqNw.js.map} +1 -1
- package/dist/_chunks/{card-C85_Ndhb.js → card-DVO3x8E-.js} +23 -19
- package/dist/_chunks/{card-C85_Ndhb.js.map → card-DVO3x8E-.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-BVkxGiGl.js → clinical-note-card-Zz5_GEz-.js} +2 -2
- package/dist/_chunks/{clinical-note-card-BVkxGiGl.js.map → clinical-note-card-Zz5_GEz-.js.map} +1 -1
- package/dist/_chunks/{connection-status-CWSU3eiq.js → connection-status-DjarASoU.js} +2 -2
- package/dist/_chunks/{connection-status-CWSU3eiq.js.map → connection-status-DjarASoU.js.map} +1 -1
- package/dist/_chunks/{contact-card-CymtNvy3.js → contact-card-Cv-Nwvac.js} +2 -2
- package/dist/_chunks/{contact-card-CymtNvy3.js.map → contact-card-Cv-Nwvac.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-CAL66GaH.js → contact-profile-card-DMXWBBkU.js} +2 -2
- package/dist/_chunks/{contact-profile-card-CAL66GaH.js.map → contact-profile-card-DMXWBBkU.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-ZMDvToIm.js → cycle-calculator-Dd-XbKmZ.js} +2 -2
- package/dist/_chunks/{cycle-calculator-ZMDvToIm.js.map → cycle-calculator-Dd-XbKmZ.js.map} +1 -1
- package/dist/_chunks/{document-preview-5xs64jME.js → document-preview-WvJKHJOP.js} +2 -2
- package/dist/_chunks/{document-preview-5xs64jME.js.map → document-preview-WvJKHJOP.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-Dr2cDa64.js → due-date-calculator-Dl6SyMHO.js} +3 -3
- package/dist/_chunks/{due-date-calculator-Dr2cDa64.js.map → due-date-calculator-Dl6SyMHO.js.map} +1 -1
- package/dist/_chunks/email-input-DxwbREpx.js +156 -0
- package/dist/_chunks/email-input-DxwbREpx.js.map +1 -0
- package/dist/_chunks/{entity-summary-BbqqYqF1.js → entity-summary-DGCBQDt1.js} +2 -2
- package/dist/_chunks/{entity-summary-BbqqYqF1.js.map → entity-summary-DGCBQDt1.js.map} +1 -1
- package/dist/_chunks/{face-scheme-e2M2HJGz.js → face-scheme-DlcQaQVR.js} +2 -2
- package/dist/_chunks/{face-scheme-e2M2HJGz.js.map → face-scheme-DlcQaQVR.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-CkIwJgiH.js → fetal-weight-DmZzMRzB.js} +2 -2
- package/dist/_chunks/{fetal-weight-CkIwJgiH.js.map → fetal-weight-DmZzMRzB.js.map} +1 -1
- package/dist/_chunks/{finished-terminal-DXVAfhRr.js → finished-terminal-BKTFUk3S.js} +2 -2
- package/dist/_chunks/{finished-terminal-DXVAfhRr.js.map → finished-terminal-BKTFUk3S.js.map} +1 -1
- package/dist/_chunks/{forgot-password-form-vfCO2-Tt.js → forgot-password-form-Bc_UPax6.js} +9 -8
- package/dist/_chunks/{forgot-password-form-vfCO2-Tt.js.map → forgot-password-form-Bc_UPax6.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-Dv3IePb-.js → gestational-age-calculator-DmzYdW5e.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-Dv3IePb-.js.map → gestational-age-calculator-DmzYdW5e.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-DdyUt4gz.js → hcg-doubling-Tr72PetS.js} +2 -2
- package/dist/_chunks/{hcg-doubling-DdyUt4gz.js.map → hcg-doubling-Tr72PetS.js.map} +1 -1
- package/dist/_chunks/{heatmap-BiwC7Gdx.js → heatmap-CNxCDl0D.js} +2 -2
- package/dist/_chunks/{heatmap-BiwC7Gdx.js.map → heatmap-CNxCDl0D.js.map} +1 -1
- package/dist/_chunks/isEmail-BfVspSvV.js +248 -0
- package/dist/_chunks/isEmail-BfVspSvV.js.map +1 -0
- package/dist/_chunks/{kit-extensions-BOsUgWnE.js → kit-extensions-DZJRmDI6.js} +7 -7
- package/dist/_chunks/{kit-extensions-BOsUgWnE.js.map → kit-extensions-DZJRmDI6.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-Cz1Clugq.js → login-dev-card-D7orCfJT.js} +48 -47
- package/dist/_chunks/{login-dev-card-Cz1Clugq.js.map → login-dev-card-D7orCfJT.js.map} +1 -1
- package/dist/_chunks/map-view-Bny79cWa.js +856 -0
- package/dist/_chunks/map-view-Bny79cWa.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-C-4QF6mp.js → marketplace-app-shell-CPNVBVLH.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-C-4QF6mp.js.map → marketplace-app-shell-CPNVBVLH.js.map} +1 -1
- package/dist/_chunks/motion-is-off-BvAuNV5O.js +15 -0
- package/dist/_chunks/motion-is-off-BvAuNV5O.js.map +1 -0
- package/dist/_chunks/{notes-panel-Cz621DWV.js → notes-panel-DXMTObBv.js} +3 -3
- package/dist/_chunks/{notes-panel-Cz621DWV.js.map → notes-panel-DXMTObBv.js.map} +1 -1
- package/dist/_chunks/{operator-hero-BELhrv9o.js → operator-hero-BWayX73x.js} +71 -62
- package/dist/_chunks/{operator-hero-BELhrv9o.js.map → operator-hero-BWayX73x.js.map} +1 -1
- package/dist/_chunks/{patient-details-BwkDIm4D.js → patient-details-DdtXBNjt.js} +3 -3
- package/dist/_chunks/{patient-details-BwkDIm4D.js.map → patient-details-DdtXBNjt.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-CBba7w9V.js → patient-field-row-D9rb-QJH.js} +2 -2
- package/dist/_chunks/{patient-field-row-CBba7w9V.js.map → patient-field-row-D9rb-QJH.js.map} +1 -1
- package/dist/_chunks/{patient-search-CxuqVUTB.js → patient-search-DDRDCjZi.js} +439 -482
- package/dist/_chunks/patient-search-DDRDCjZi.js.map +1 -0
- package/dist/_chunks/{patient-summary-card-DtYTo9w_.js → patient-summary-card-CGHz-Bvm.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DtYTo9w_.js.map → patient-summary-card-CGHz-Bvm.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-u5EuFyCY.js → payment-automation-upsell-D7yaD4u1.js} +3 -3
- package/dist/_chunks/{payment-automation-upsell-u5EuFyCY.js.map → payment-automation-upsell-D7yaD4u1.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-IR83TJax.js → payment-request-card-BmV2pLoM.js} +2 -2
- package/dist/_chunks/{payment-request-card-IR83TJax.js.map → payment-request-card-BmV2pLoM.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-DqdUEFxK.js → periodontal-chart-Bjz7O4wT.js} +2 -2
- package/dist/_chunks/{periodontal-chart-DqdUEFxK.js.map → periodontal-chart-Bjz7O4wT.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-CCkzStlm.js → periodontal-chart-card-CxEXHl2x.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-CCkzStlm.js.map → periodontal-chart-card-CxEXHl2x.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-CF1d_0yl.js → periodontal-diagnosis-xheWfi4g.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-CF1d_0yl.js.map → periodontal-diagnosis-xheWfi4g.js.map} +1 -1
- package/dist/_chunks/{periodontal-risk-chart-D2zyID0H.js → periodontal-risk-chart-BBPB9wf1.js} +2 -2
- package/dist/_chunks/{periodontal-risk-chart-D2zyID0H.js.map → periodontal-risk-chart-BBPB9wf1.js.map} +1 -1
- package/dist/_chunks/{practice-profile-hero-Bb4YyxHA.js → practice-profile-hero-Cw4NZp0A.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-Bb4YyxHA.js.map → practice-profile-hero-Cw4NZp0A.js.map} +1 -1
- package/dist/_chunks/practice-results-BlxfBx-D.js +2181 -0
- package/dist/_chunks/practice-results-BlxfBx-D.js.map +1 -0
- package/dist/_chunks/{pregnancy-dating-Cs8xpZA8.js → pregnancy-dating-BvorzHrd.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-Cs8xpZA8.js.map → pregnancy-dating-BvorzHrd.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-B_Zldlzq.js → pregnancy-weight-gain-DQoOM8QV.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-B_Zldlzq.js.map → pregnancy-weight-gain-DQoOM8QV.js.map} +1 -1
- package/dist/_chunks/{privacy-mask-DbEKI-Jv.js → privacy-mask-Dc3kdkCR.js} +2 -2
- package/dist/_chunks/{privacy-mask-DbEKI-Jv.js.map → privacy-mask-Dc3kdkCR.js.map} +1 -1
- package/dist/_chunks/{public-footer-DGjLTtNK.js → public-footer-CB7ruuLI.js} +295 -260
- package/dist/_chunks/public-footer-CB7ruuLI.js.map +1 -0
- package/dist/_chunks/{public-header.agent-_ArDD1Xr.js → public-header.agent-Db4wm6_S.js} +203 -193
- package/dist/_chunks/public-header.agent-Db4wm6_S.js.map +1 -0
- package/dist/_chunks/{registration-form-DEyUFysm.js → registration-form-Lw9T7IXr.js} +7 -6
- package/dist/_chunks/{registration-form-DEyUFysm.js.map → registration-form-Lw9T7IXr.js.map} +1 -1
- package/dist/_chunks/{reserved.agent-W_Zgj564.js → reserved.agent-D2jwJPac.js} +22 -32
- package/dist/_chunks/reserved.agent-D2jwJPac.js.map +1 -0
- package/dist/_chunks/{reset-password-form-B0acanDD.js → reset-password-form-C93SH0Tx.js} +3 -3
- package/dist/_chunks/{reset-password-form-B0acanDD.js.map → reset-password-form-C93SH0Tx.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-B03auSpQ.js → reviews-panel-CfJPEkH7.js} +2 -2
- package/dist/_chunks/{reviews-panel-B03auSpQ.js.map → reviews-panel-CfJPEkH7.js.map} +1 -1
- package/dist/_chunks/{section-card-D1sV4Voz.js → section-card-DFr2wGal.js} +2 -2
- package/dist/_chunks/{section-card-D1sV4Voz.js.map → section-card-DFr2wGal.js.map} +1 -1
- package/dist/_chunks/{send-registration-link-form-Nn0jf65G.js → send-registration-link-form-DfbTjrEK.js} +9 -8
- package/dist/_chunks/{send-registration-link-form-Nn0jf65G.js.map → send-registration-link-form-DfbTjrEK.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-CPow3aCZ.js → signed-out-frame-bh7fn_Px.js} +2 -2
- package/dist/_chunks/{signed-out-frame-CPow3aCZ.js.map → signed-out-frame-bh7fn_Px.js.map} +1 -1
- package/dist/_chunks/{stat-BFKZV50y.js → stat-WGLdn5Vn.js} +113 -107
- package/dist/_chunks/stat-WGLdn5Vn.js.map +1 -0
- package/dist/_chunks/{task-card-TSJjuuDe.js → task-card-DqVoitRk.js} +2 -2
- package/dist/_chunks/{task-card-TSJjuuDe.js.map → task-card-DqVoitRk.js.map} +1 -1
- package/dist/_chunks/{task-editor-gqWF1jI6.js → task-editor-D--LwVrg.js} +2 -2
- package/dist/_chunks/{task-editor-gqWF1jI6.js.map → task-editor-D--LwVrg.js.map} +1 -1
- package/dist/_chunks/{task-tray-DrXfMCuf.js → task-tray-C6j8HVMv.js} +2 -2
- package/dist/_chunks/{task-tray-DrXfMCuf.js.map → task-tray-C6j8HVMv.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-OuIaydK5.js → tasks-panel-D6PuF4MQ.js} +2 -2
- package/dist/_chunks/{tasks-panel-OuIaydK5.js.map → tasks-panel-D6PuF4MQ.js.map} +1 -1
- package/dist/_chunks/{timeline-CKUaBZOx.js → timeline-AMqE-c2T.js} +2 -2
- package/dist/_chunks/{timeline-CKUaBZOx.js.map → timeline-AMqE-c2T.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-DYyCYI9f.js → use-appointment-details-read-BK_Gw1GG.js} +5 -5
- package/dist/_chunks/{use-appointment-details-read-DYyCYI9f.js.map → use-appointment-details-read-BK_Gw1GG.js.map} +1 -1
- package/dist/_chunks/verify-identity-types-C85EXNzy.js +707 -0
- package/dist/_chunks/verify-identity-types-C85EXNzy.js.map +1 -0
- package/dist/_chunks/{workflow-map-DWk-rZse.js → workflow-map-B4XkcET0.js} +2 -2
- package/dist/_chunks/{workflow-map-DWk-rZse.js.map → workflow-map-B4XkcET0.js.map} +1 -1
- package/dist/_chunks/{workflow-webhook-action-DILFqAVd.js → workflow-webhook-action-CtBn5JvO.js} +2 -2
- package/dist/_chunks/{workflow-webhook-action-DILFqAVd.js.map → workflow-webhook-action-CtBn5JvO.js.map} +1 -1
- package/dist/agent-catalog.json +111 -7
- package/dist/agent-i18n/en.json +13 -2
- package/dist/components/_shared/motion-is-off.d.ts +7 -0
- package/dist/components/_shared/motion-is-off.d.ts.map +1 -0
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-details-panel/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/booking/step-focus.d.ts +0 -6
- package/dist/components/booking/step-focus.d.ts.map +1 -1
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/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-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- 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/fetal-weight/index.js +1 -1
- package/dist/components/finished-terminal/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/heatmap/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +16 -0
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-search/patient-search.d.ts +6 -2
- package/dist/components/patient-search/patient-search.d.ts.map +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/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/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.agent.d.ts.map +1 -1
- package/dist/components/practice-results/practice-results.d.ts +43 -2
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-footer/public-footer.d.ts +23 -0
- package/dist/components/public-footer/public-footer.d.ts.map +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +7 -0
- package/dist/components/public-header/public-header.d.ts.map +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/section-card/index.js +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +7 -0
- package/dist/components/stat/stat.d.ts.map +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/timeline/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +68 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +70 -2
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +68 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +70 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +68 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +70 -2
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +68 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +68 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +68 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +70 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +68 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +70 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +68 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +70 -2
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +68 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +70 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +68 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +70 -2
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +68 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +70 -2
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +68 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +70 -2
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +68 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +70 -2
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +68 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +70 -2
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +68 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +70 -2
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +68 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +70 -2
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +68 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +70 -2
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +68 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +70 -2
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +68 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +70 -2
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +373 -368
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +70 -2
- package/dist/locales/de.json +70 -2
- package/dist/locales/el.json +70 -2
- package/dist/locales/en.json +68 -0
- package/dist/locales/es.json +70 -2
- package/dist/locales/fr.json +70 -2
- package/dist/locales/hi.json +70 -2
- package/dist/locales/it.json +70 -2
- package/dist/locales/ja.json +70 -2
- package/dist/locales/nl.json +70 -2
- package/dist/locales/pl.json +70 -2
- package/dist/locales/pt.json +70 -2
- package/dist/locales/ro.json +70 -2
- package/dist/locales/ru.json +70 -2
- package/dist/locales/sq.json +70 -2
- package/dist/locales/sv.json +70 -2
- package/dist/locales/tr.json +70 -2
- package/dist/locales/zh.json +70 -2
- 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/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/signed-out-frame/index.js +1 -1
- package/dist/patterns/verify-identity/change-email-dialog.d.ts +26 -0
- package/dist/patterns/verify-identity/change-email-dialog.d.ts.map +1 -0
- package/dist/patterns/verify-identity/index.d.ts +7 -0
- package/dist/patterns/verify-identity/index.d.ts.map +1 -0
- package/dist/patterns/verify-identity/index.js +8 -0
- package/dist/patterns/verify-identity/index.js.map +1 -0
- package/dist/patterns/verify-identity/use-countdown.d.ts +12 -0
- package/dist/patterns/verify-identity/use-countdown.d.ts.map +1 -0
- package/dist/patterns/verify-identity/verify-identity-steps.d.ts +21 -0
- package/dist/patterns/verify-identity/verify-identity-steps.d.ts.map +1 -0
- package/dist/patterns/verify-identity/verify-identity-types.d.ts +47 -0
- package/dist/patterns/verify-identity/verify-identity-types.d.ts.map +1 -0
- package/dist/patterns/verify-identity/verify-identity.d.ts +54 -0
- package/dist/patterns/verify-identity/verify-identity.d.ts.map +1 -0
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
- package/dist/_chunks/email-input-BEO3vonE.js +0 -399
- package/dist/_chunks/email-input-BEO3vonE.js.map +0 -1
- package/dist/_chunks/map-view-Dn7aXZJw.js +0 -731
- package/dist/_chunks/map-view-Dn7aXZJw.js.map +0 -1
- package/dist/_chunks/patient-search-CxuqVUTB.js.map +0 -1
- package/dist/_chunks/practice-results-BOpaPaav.js +0 -1923
- package/dist/_chunks/practice-results-BOpaPaav.js.map +0 -1
- package/dist/_chunks/public-footer-DGjLTtNK.js.map +0 -1
- package/dist/_chunks/public-header.agent-_ArDD1Xr.js.map +0 -1
- package/dist/_chunks/reserved.agent-W_Zgj564.js.map +0 -1
- package/dist/_chunks/stat-BFKZV50y.js.map +0 -1
|
@@ -3,11 +3,12 @@ import { forwardRef as Ke, useId as G, useState as f, useRef as I, useEffect as
|
|
|
3
3
|
import { useTranslation as Je } from "react-i18next";
|
|
4
4
|
import { c as Qe } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { parsePhoneNumberFromString as Xe } from "libphonenumber-js/min";
|
|
6
|
-
import { i as Ye
|
|
6
|
+
import { i as Ye } from "./isEmail-BfVspSvV.js";
|
|
7
7
|
import { A as h } from "./alert-C4WKViaS.js";
|
|
8
|
-
import { B as
|
|
9
|
-
import { C as B } from "./card-
|
|
8
|
+
import { B as pe } from "./button-DohK_Ak_.js";
|
|
9
|
+
import { C as B } from "./card-DVO3x8E-.js";
|
|
10
10
|
import { D as Ze } from "./date-picker-CdhXlgVI.js";
|
|
11
|
+
import { E as he } from "./email-input-DxwbREpx.js";
|
|
11
12
|
import { E as Ve } from "./error-summary-DxNhwf_G.js";
|
|
12
13
|
import { F } from "./form-field-CyHfOVKF.js";
|
|
13
14
|
import { P as ue } from "./phone-input-BL8Sj6OG.js";
|
|
@@ -180,7 +181,7 @@ const q = [
|
|
|
180
181
|
date: _(ce)
|
|
181
182
|
}) })
|
|
182
183
|
] }),
|
|
183
|
-
de && /* @__PURE__ */ n(
|
|
184
|
+
de && /* @__PURE__ */ n(pe, { asChild: !0, intent: "secondary", "data-action": "send-another", children: /* @__PURE__ */ n("a", { href: de, children: i("sendRegistrationLink.sendAnother") }) })
|
|
184
185
|
] }) })
|
|
185
186
|
}
|
|
186
187
|
) : /* @__PURE__ */ n(
|
|
@@ -247,7 +248,7 @@ const q = [
|
|
|
247
248
|
announceError: !s.lists("email"),
|
|
248
249
|
"data-field": "email",
|
|
249
250
|
children: /* @__PURE__ */ n(
|
|
250
|
-
|
|
251
|
+
he,
|
|
251
252
|
{
|
|
252
253
|
ref: te.ref,
|
|
253
254
|
name: le("email"),
|
|
@@ -271,7 +272,7 @@ const q = [
|
|
|
271
272
|
announceError: !s.lists("emailConfirm"),
|
|
272
273
|
"data-field": "emailConfirm",
|
|
273
274
|
children: /* @__PURE__ */ n(
|
|
274
|
-
|
|
275
|
+
he,
|
|
275
276
|
{
|
|
276
277
|
ref: ie.ref,
|
|
277
278
|
name: le("emailConfirm"),
|
|
@@ -381,7 +382,7 @@ const q = [
|
|
|
381
382
|
),
|
|
382
383
|
He.map(([e, o]) => /* @__PURE__ */ n("input", { type: "hidden", name: e, value: o }, e)),
|
|
383
384
|
/* @__PURE__ */ n(
|
|
384
|
-
|
|
385
|
+
pe,
|
|
385
386
|
{
|
|
386
387
|
type: "submit",
|
|
387
388
|
intent: "primary",
|
|
@@ -406,4 +407,4 @@ export {
|
|
|
406
407
|
q as S,
|
|
407
408
|
fn as a
|
|
408
409
|
};
|
|
409
|
-
//# sourceMappingURL=send-registration-link-form-
|
|
410
|
+
//# sourceMappingURL=send-registration-link-form-DfbTjrEK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-registration-link-form-Nn0jf65G.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,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ASpB,EAAO;AAAA,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-DfbTjrEK.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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,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;"}
|
|
@@ -2,7 +2,7 @@ import { jsxs as d, jsx as e, Fragment as v } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as y } from "react";
|
|
3
3
|
import { c as H } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { A as S } from "./app-frame-DUPEwu4E.js";
|
|
5
|
-
import { P as x } from "./public-footer-
|
|
5
|
+
import { P as x } from "./public-footer-CB7ruuLI.js";
|
|
6
6
|
import { useTranslation as b } from "react-i18next";
|
|
7
7
|
import { B as u } from "./button-DohK_Ak_.js";
|
|
8
8
|
import { H as N, g as O, f as F, a as z, d as B } from "./header-l_B8MV0g.js";
|
|
@@ -168,4 +168,4 @@ export {
|
|
|
168
168
|
V as S,
|
|
169
169
|
w as a
|
|
170
170
|
};
|
|
171
|
-
//# sourceMappingURL=signed-out-frame-
|
|
171
|
+
//# sourceMappingURL=signed-out-frame-bh7fn_Px.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signed-out-frame-CPow3aCZ.js","sources":["../../src/patterns/signed-out-frame/signed-out-header.tsx","../../src/patterns/signed-out-frame/signed-out-frame.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* SignedOutHeader — the app's Header as a visitor sees it before */\n/* sign-in: the brand, the skip link and the way to the other */\n/* signed-out pages. No search, inbox or account menu. */\n/* */\n/* A link shows only when the host gives its address. On the login page */\n/* that is the two ways to register; on a registration page it is the */\n/* way back to the login. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { LogIn, Stethoscope, User } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '../../components/button';\nimport {\n Header,\n HeaderBrand,\n HeaderEnd,\n HeaderSkipLink,\n HeaderStart,\n} from '../../components/header';\nimport { Logo } from '../../components/logo';\nimport { isSafeHref } from '../../components/_shared/safe-href';\n\nexport interface SignedOutHeaderProps {\n /** Where the brand leads. Default `/`. */\n homeHref?: string;\n /** The id of the `<main>` the skip link lands on. Default\n * `main-content`, `AppFrame`'s own default. */\n mainId?: string;\n /**\n * Adds \"Sign in\". For a registration page. A path on the same site, or\n * an address written in full (`https://…`); anything else shows no\n * link. The same rule holds for the two addresses below.\n */\n loginHref?: string;\n /** Adds \"Register as a doctor\". For the login page. */\n registerDoctorHref?: string;\n /** Adds \"Register as a patient\". For the login page. */\n registerPatientHref?: string;\n}\n\n// The header's buttons are the header turned inside out: the bar's ink as\n// the fill, the bar's own colour (`--header-brand-surface`) as the text.\n// Light: white with violet text (4.75:1). Dark: the bar is the page's navy,\n// so the text is navy too; fuchsia on the cream fill would be 2.75:1.\n//\n// Hover tints the fill with the bar. In the light theme that alone would\n// drop the violet text to 4.07:1, so the text deepens with it (4.76:1):\n// `--header-brand-surface-hover` is --primary-hover in light and stays the\n// navy in dark. The buttons carry no `--secondary-border` edge: the fill is\n// already the bar's ink.\n//\n// A small button is 32px tall from `sm` up and drops its wider hit box\n// there. These keep the hit box at every width: the bar is 64px tall, and\n// a tablet is touched as much as a phone.\nconst linksVariants = cva(\n 'ds:items-center ds:gap-[var(--spacing-sm)] ds:[--secondary:var(--header-foreground)] ds:[--secondary-hover:color-mix(in_srgb,var(--header-foreground)_88%,transparent)] ds:[--secondary-border:transparent] ds:[--secondary-foreground:var(--header-brand-surface,var(--primary))] ds:[&_a:hover]:[--secondary-foreground:var(--header-brand-surface-hover,var(--primary-hover))] ds:[&_a]:sm:before:block',\n {\n variants: {\n /** Labelled buttons from `md` up; icons only below it. */\n show: {\n wide: 'ds:hidden ds:md:inline-flex',\n narrow: 'ds:inline-flex ds:md:hidden',\n always: 'ds:inline-flex',\n },\n },\n defaultVariants: { show: 'always' },\n },\n);\n\n/** An address a link may use, or nothing. */\nconst linkTo = (href: string | undefined): string | undefined =>\n href && isSafeHref(href) ? href : undefined;\n\ninterface RegisterLinksProps {\n doctorHref: string | undefined;\n patientHref: string | undefined;\n hideLabel?: boolean;\n}\n\n/** The ways to open an account. Links, not buttons: each goes to its own\n * registration page. */\nfunction RegisterLinks({\n doctorHref,\n patientHref,\n hideLabel = false,\n}: RegisterLinksProps) {\n const { t } = useTranslation('ui');\n return (\n <>\n {doctorHref && (\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<Stethoscope />}\n hideLabel={hideLabel}\n >\n <a href={doctorHref} data-action=\"register-doctor\">\n {t('signedOutHeader.registerDoctor')}\n </a>\n </Button>\n )}\n {patientHref && (\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<User />}\n hideLabel={hideLabel}\n >\n <a href={patientHref} data-action=\"register-patient\">\n {t('signedOutHeader.registerPatient')}\n </a>\n </Button>\n )}\n </>\n );\n}\n\n/**\n * The signed-out header. `SignedOutFrame` renders it; use it on its own\n * only with a frame of your own.\n */\nexport const SignedOutHeader = forwardRef<HTMLElement, SignedOutHeaderProps>(\n (\n {\n homeHref = '/',\n mainId = 'main-content',\n loginHref,\n registerDoctorHref,\n registerPatientHref,\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const loginLink = linkTo(loginHref);\n const doctorLink = linkTo(registerDoctorHref);\n const patientLink = linkTo(registerPatientHref);\n const hasRegister = Boolean(doctorLink || patientLink);\n\n return (\n <Header ref={ref}>\n <HeaderStart>\n <HeaderSkipLink href={`#${mainId}`} />\n <HeaderBrand\n href={linkTo(homeHref) ?? '/'}\n logo={<Logo variant=\"monochrome\" size=\"md\" decorative />}\n aria-label={t('publicHeader.homeLabel')}\n />\n </HeaderStart>\n {(loginLink || hasRegister) && (\n <HeaderEnd>\n {/* One short label: it keeps its text on a phone. */}\n {loginLink && (\n <div className={linksVariants()}>\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<LogIn />}\n >\n <a href={loginLink} data-action=\"login\">\n {t('signedOutHeader.login')}\n </a>\n </Button>\n </div>\n )}\n {/* Two labelled buttons and the brand do not fit a phone, so\n below `md` each folds to its icon and keeps its name for a\n screen reader. */}\n {hasRegister && (\n <>\n <div className={linksVariants({ show: 'wide' })}>\n <RegisterLinks\n doctorHref={doctorLink}\n patientHref={patientLink}\n />\n </div>\n <div className={linksVariants({ show: 'narrow' })}>\n <RegisterLinks\n doctorHref={doctorLink}\n patientHref={patientLink}\n hideLabel\n />\n </div>\n </>\n )}\n </HeaderEnd>\n )}\n </Header>\n );\n },\n);\nSignedOutHeader.displayName = 'SignedOutHeader';\n","/* -------------------------------------------------------------------- */\n/* SignedOutFrame — the app frame as a visitor sees it before sign-in. */\n/* */\n/* The signed-out header on top, no sidebar, the page's content centred */\n/* on the app's canvas, and the minimal footer with the privacy policy */\n/* and the terms. The login, forgot-password and registration pages */\n/* wear it, so they read as one family. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { AppFrame } from '../../components/app-frame';\nimport {\n PublicFooter,\n type LegalUrlOverrides,\n} from '../../components/public-footer';\nimport {\n SignedOutHeader,\n type SignedOutHeaderProps,\n} from './signed-out-header';\n\nexport interface SignedOutFrameProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'children'>,\n SignedOutHeaderProps {\n /** The page: a card such as `LoginForm`, centred in `<main>`. */\n children: ReactNode;\n /** Shows the footer with the privacy policy and the terms. Default\n * true. */\n showFooter?: boolean;\n /**\n * Adds the footer's copyright line: the year, the company's registered\n * name and its VAT number. Default false.\n */\n showCopyright?: boolean;\n /** The site the footer's legal links lead to. Default: the footer's\n * own, `https://www.alfadocs.com`. */\n marketingBaseUrl?: string;\n /** The footer's legal links, per language, where they differ from its\n * defaults. */\n legalUrlOverrides?: LegalUrlOverrides;\n}\n\n// The wrapper is only a marker: the frame inside it is the box. It has\n// no box of its own (`display: contents`), so a `className` that sizes or\n// spaces it does nothing, and a ref to it measures nothing.\nconst signedOutFrameVariants = cva('ds:contents');\n\n/**\n * The signed-out app frame. It is one viewport tall: the header and the\n * footer stay put and the content scrolls between them.\n */\nexport const SignedOutFrame = forwardRef<HTMLDivElement, SignedOutFrameProps>(\n (\n {\n children,\n homeHref,\n mainId = 'main-content',\n loginHref,\n registerDoctorHref,\n registerPatientHref,\n showFooter = true,\n showCopyright = false,\n marketingBaseUrl,\n legalUrlOverrides,\n className,\n ...rest\n },\n ref,\n ) => (\n <div\n ref={ref}\n {...rest}\n data-component=\"signed-out-frame\"\n className={signedOutFrameVariants({ className })}\n >\n {/* `<main>` is a size container, so the content can be exactly as\n tall as the space between the header and the footer (`100cqh`)\n and centre in it, whatever height the footer wraps to on a\n phone. */}\n <AppFrame\n header={\n <SignedOutHeader\n homeHref={homeHref}\n mainId={mainId}\n loginHref={loginHref}\n registerDoctorHref={registerDoctorHref}\n registerPatientHref={registerPatientHref}\n />\n }\n sidebar={null}\n footer={\n showFooter ? (\n <PublicFooter\n variant=\"minimal\"\n showCopyright={showCopyright}\n marketingBaseUrl={marketingBaseUrl}\n legalUrlOverrides={legalUrlOverrides}\n />\n ) : undefined\n }\n mainId={mainId}\n padded={false}\n mainClassName=\"ds:bg-[color:var(--app-shell-background)] ds:[container-type:size]\"\n >\n <div className=\"ds:flex ds:min-h-[100cqh] ds:w-full ds:items-center ds:justify-center ds:p-0 ds:sm:p-[var(--spacing-lg)]\">\n {children}\n </div>\n </AppFrame>\n </div>\n ),\n);\nSignedOutFrame.displayName = 'SignedOutFrame';\n"],"names":["linksVariants","cva","linkTo","href","isSafeHref","RegisterLinks","doctorHref","patientHref","hideLabel","t","useTranslation","jsxs","Fragment","jsx","Button","Stethoscope","User","SignedOutHeader","forwardRef","homeHref","mainId","loginHref","registerDoctorHref","registerPatientHref","ref","loginLink","doctorLink","patientLink","hasRegister","Header","HeaderStart","HeaderSkipLink","HeaderBrand","Logo","HeaderEnd","LogIn","signedOutFrameVariants","SignedOutFrame","children","showFooter","showCopyright","marketingBaseUrl","legalUrlOverrides","className","rest","AppFrame","PublicFooter"],"mappings":";;;;;;;;;;;;;AAyDA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA,MAER,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,iBAAiB,EAAE,MAAM,SAAA;AAAA,EAAS;AAEtC,GAGMC,IAAS,CAACC,MACdA,KAAQC,EAAWD,CAAI,IAAIA,IAAO;AAUpC,SAASE,EAAc;AAAA,EACrB,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAAuB;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,IAAI;AACjC,SACE,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAN,KACC,gBAAAO;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAO;AAAA,QACP,QAAO;AAAA,QACP,MAAK;AAAA,QACL,6BAAYC,GAAA,EAAY;AAAA,QACxB,WAAAP;AAAA,QAEA,UAAA,gBAAAK,EAAC,OAAE,MAAMP,GAAY,eAAY,mBAC9B,UAAAG,EAAE,gCAAgC,EAAA,CACrC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGHF,KACC,gBAAAM;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAO;AAAA,QACP,QAAO;AAAA,QACP,MAAK;AAAA,QACL,6BAAYE,GAAA,EAAK;AAAA,QACjB,WAAAR;AAAA,QAEA,UAAA,gBAAAK,EAAC,OAAE,MAAMN,GAAa,eAAY,oBAC/B,UAAAE,EAAE,iCAAiC,EAAA,CACtC;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GAEJ;AAEJ;AAMO,MAAMQ,IAAkBC;AAAA,EAC7B,CACE;AAAA,IACE,UAAAC,IAAW;AAAA,IACX,QAAAC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;AAAA,UAEN,QAAAtB;AAAA,UACA,QAAQ;AAAA,UACR,eAAc;AAAA,UAEd,UAAA,gBAAAP,EAAC,OAAA,EAAI,WAAU,4GACZ,UAAAyB,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;AACAD,EAAe,cAAc;"}
|
|
1
|
+
{"version":3,"file":"signed-out-frame-bh7fn_Px.js","sources":["../../src/patterns/signed-out-frame/signed-out-header.tsx","../../src/patterns/signed-out-frame/signed-out-frame.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* SignedOutHeader — the app's Header as a visitor sees it before */\n/* sign-in: the brand, the skip link and the way to the other */\n/* signed-out pages. No search, inbox or account menu. */\n/* */\n/* A link shows only when the host gives its address. On the login page */\n/* that is the two ways to register; on a registration page it is the */\n/* way back to the login. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { LogIn, Stethoscope, User } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '../../components/button';\nimport {\n Header,\n HeaderBrand,\n HeaderEnd,\n HeaderSkipLink,\n HeaderStart,\n} from '../../components/header';\nimport { Logo } from '../../components/logo';\nimport { isSafeHref } from '../../components/_shared/safe-href';\n\nexport interface SignedOutHeaderProps {\n /** Where the brand leads. Default `/`. */\n homeHref?: string;\n /** The id of the `<main>` the skip link lands on. Default\n * `main-content`, `AppFrame`'s own default. */\n mainId?: string;\n /**\n * Adds \"Sign in\". For a registration page. A path on the same site, or\n * an address written in full (`https://…`); anything else shows no\n * link. The same rule holds for the two addresses below.\n */\n loginHref?: string;\n /** Adds \"Register as a doctor\". For the login page. */\n registerDoctorHref?: string;\n /** Adds \"Register as a patient\". For the login page. */\n registerPatientHref?: string;\n}\n\n// The header's buttons are the header turned inside out: the bar's ink as\n// the fill, the bar's own colour (`--header-brand-surface`) as the text.\n// Light: white with violet text (4.75:1). Dark: the bar is the page's navy,\n// so the text is navy too; fuchsia on the cream fill would be 2.75:1.\n//\n// Hover tints the fill with the bar. In the light theme that alone would\n// drop the violet text to 4.07:1, so the text deepens with it (4.76:1):\n// `--header-brand-surface-hover` is --primary-hover in light and stays the\n// navy in dark. The buttons carry no `--secondary-border` edge: the fill is\n// already the bar's ink.\n//\n// A small button is 32px tall from `sm` up and drops its wider hit box\n// there. These keep the hit box at every width: the bar is 64px tall, and\n// a tablet is touched as much as a phone.\nconst linksVariants = cva(\n 'ds:items-center ds:gap-[var(--spacing-sm)] ds:[--secondary:var(--header-foreground)] ds:[--secondary-hover:color-mix(in_srgb,var(--header-foreground)_88%,transparent)] ds:[--secondary-border:transparent] ds:[--secondary-foreground:var(--header-brand-surface,var(--primary))] ds:[&_a:hover]:[--secondary-foreground:var(--header-brand-surface-hover,var(--primary-hover))] ds:[&_a]:sm:before:block',\n {\n variants: {\n /** Labelled buttons from `md` up; icons only below it. */\n show: {\n wide: 'ds:hidden ds:md:inline-flex',\n narrow: 'ds:inline-flex ds:md:hidden',\n always: 'ds:inline-flex',\n },\n },\n defaultVariants: { show: 'always' },\n },\n);\n\n/** An address a link may use, or nothing. */\nconst linkTo = (href: string | undefined): string | undefined =>\n href && isSafeHref(href) ? href : undefined;\n\ninterface RegisterLinksProps {\n doctorHref: string | undefined;\n patientHref: string | undefined;\n hideLabel?: boolean;\n}\n\n/** The ways to open an account. Links, not buttons: each goes to its own\n * registration page. */\nfunction RegisterLinks({\n doctorHref,\n patientHref,\n hideLabel = false,\n}: RegisterLinksProps) {\n const { t } = useTranslation('ui');\n return (\n <>\n {doctorHref && (\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<Stethoscope />}\n hideLabel={hideLabel}\n >\n <a href={doctorHref} data-action=\"register-doctor\">\n {t('signedOutHeader.registerDoctor')}\n </a>\n </Button>\n )}\n {patientHref && (\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<User />}\n hideLabel={hideLabel}\n >\n <a href={patientHref} data-action=\"register-patient\">\n {t('signedOutHeader.registerPatient')}\n </a>\n </Button>\n )}\n </>\n );\n}\n\n/**\n * The signed-out header. `SignedOutFrame` renders it; use it on its own\n * only with a frame of your own.\n */\nexport const SignedOutHeader = forwardRef<HTMLElement, SignedOutHeaderProps>(\n (\n {\n homeHref = '/',\n mainId = 'main-content',\n loginHref,\n registerDoctorHref,\n registerPatientHref,\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const loginLink = linkTo(loginHref);\n const doctorLink = linkTo(registerDoctorHref);\n const patientLink = linkTo(registerPatientHref);\n const hasRegister = Boolean(doctorLink || patientLink);\n\n return (\n <Header ref={ref}>\n <HeaderStart>\n <HeaderSkipLink href={`#${mainId}`} />\n <HeaderBrand\n href={linkTo(homeHref) ?? '/'}\n logo={<Logo variant=\"monochrome\" size=\"md\" decorative />}\n aria-label={t('publicHeader.homeLabel')}\n />\n </HeaderStart>\n {(loginLink || hasRegister) && (\n <HeaderEnd>\n {/* One short label: it keeps its text on a phone. */}\n {loginLink && (\n <div className={linksVariants()}>\n <Button\n asChild\n intent=\"secondary\"\n size=\"sm\"\n startIcon={<LogIn />}\n >\n <a href={loginLink} data-action=\"login\">\n {t('signedOutHeader.login')}\n </a>\n </Button>\n </div>\n )}\n {/* Two labelled buttons and the brand do not fit a phone, so\n below `md` each folds to its icon and keeps its name for a\n screen reader. */}\n {hasRegister && (\n <>\n <div className={linksVariants({ show: 'wide' })}>\n <RegisterLinks\n doctorHref={doctorLink}\n patientHref={patientLink}\n />\n </div>\n <div className={linksVariants({ show: 'narrow' })}>\n <RegisterLinks\n doctorHref={doctorLink}\n patientHref={patientLink}\n hideLabel\n />\n </div>\n </>\n )}\n </HeaderEnd>\n )}\n </Header>\n );\n },\n);\nSignedOutHeader.displayName = 'SignedOutHeader';\n","/* -------------------------------------------------------------------- */\n/* SignedOutFrame — the app frame as a visitor sees it before sign-in. */\n/* */\n/* The signed-out header on top, no sidebar, the page's content centred */\n/* on the app's canvas, and the minimal footer with the privacy policy */\n/* and the terms. The login, forgot-password and registration pages */\n/* wear it, so they read as one family. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { AppFrame } from '../../components/app-frame';\nimport {\n PublicFooter,\n type LegalUrlOverrides,\n} from '../../components/public-footer';\nimport {\n SignedOutHeader,\n type SignedOutHeaderProps,\n} from './signed-out-header';\n\nexport interface SignedOutFrameProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'children'>,\n SignedOutHeaderProps {\n /** The page: a card such as `LoginForm`, centred in `<main>`. */\n children: ReactNode;\n /** Shows the footer with the privacy policy and the terms. Default\n * true. */\n showFooter?: boolean;\n /**\n * Adds the footer's copyright line: the year, the company's registered\n * name and its VAT number. Default false.\n */\n showCopyright?: boolean;\n /** The site the footer's legal links lead to. Default: the footer's\n * own, `https://www.alfadocs.com`. */\n marketingBaseUrl?: string;\n /** The footer's legal links, per language, where they differ from its\n * defaults. */\n legalUrlOverrides?: LegalUrlOverrides;\n}\n\n// The wrapper is only a marker: the frame inside it is the box. It has\n// no box of its own (`display: contents`), so a `className` that sizes or\n// spaces it does nothing, and a ref to it measures nothing.\nconst signedOutFrameVariants = cva('ds:contents');\n\n/**\n * The signed-out app frame. It is one viewport tall: the header and the\n * footer stay put and the content scrolls between them.\n */\nexport const SignedOutFrame = forwardRef<HTMLDivElement, SignedOutFrameProps>(\n (\n {\n children,\n homeHref,\n mainId = 'main-content',\n loginHref,\n registerDoctorHref,\n registerPatientHref,\n showFooter = true,\n showCopyright = false,\n marketingBaseUrl,\n legalUrlOverrides,\n className,\n ...rest\n },\n ref,\n ) => (\n <div\n ref={ref}\n {...rest}\n data-component=\"signed-out-frame\"\n className={signedOutFrameVariants({ className })}\n >\n {/* `<main>` is a size container, so the content can be exactly as\n tall as the space between the header and the footer (`100cqh`)\n and centre in it, whatever height the footer wraps to on a\n phone. */}\n <AppFrame\n header={\n <SignedOutHeader\n homeHref={homeHref}\n mainId={mainId}\n loginHref={loginHref}\n registerDoctorHref={registerDoctorHref}\n registerPatientHref={registerPatientHref}\n />\n }\n sidebar={null}\n footer={\n showFooter ? (\n <PublicFooter\n variant=\"minimal\"\n showCopyright={showCopyright}\n marketingBaseUrl={marketingBaseUrl}\n legalUrlOverrides={legalUrlOverrides}\n />\n ) : undefined\n }\n mainId={mainId}\n padded={false}\n mainClassName=\"ds:bg-[color:var(--app-shell-background)] ds:[container-type:size]\"\n >\n <div className=\"ds:flex ds:min-h-[100cqh] ds:w-full ds:items-center ds:justify-center ds:p-0 ds:sm:p-[var(--spacing-lg)]\">\n {children}\n </div>\n </AppFrame>\n </div>\n ),\n);\nSignedOutFrame.displayName = 'SignedOutFrame';\n"],"names":["linksVariants","cva","linkTo","href","isSafeHref","RegisterLinks","doctorHref","patientHref","hideLabel","t","useTranslation","jsxs","Fragment","jsx","Button","Stethoscope","User","SignedOutHeader","forwardRef","homeHref","mainId","loginHref","registerDoctorHref","registerPatientHref","ref","loginLink","doctorLink","patientLink","hasRegister","Header","HeaderStart","HeaderSkipLink","HeaderBrand","Logo","HeaderEnd","LogIn","signedOutFrameVariants","SignedOutFrame","children","showFooter","showCopyright","marketingBaseUrl","legalUrlOverrides","className","rest","AppFrame","PublicFooter"],"mappings":";;;;;;;;;;;;;AAyDA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA,MAER,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,iBAAiB,EAAE,MAAM,SAAA;AAAA,EAAS;AAEtC,GAGMC,IAAS,CAACC,MACdA,KAAQC,EAAWD,CAAI,IAAIA,IAAO;AAUpC,SAASE,EAAc;AAAA,EACrB,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAAuB;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,IAA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