@alfadocs/ui-kit-debug 1.73.2 → 1.74.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/alia-sidebar-CsTRAxC8.js +1323 -0
- package/dist/_chunks/alia-sidebar-CsTRAxC8.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js → anamnesis-summary-rows-vNDyE5HW.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js.map → anamnesis-summary-rows-vNDyE5HW.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js → antenatal-schedule-timeline-BGewPfEX.js} +18 -18
- package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js.map → antenatal-schedule-timeline-BGewPfEX.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-CKwMXUid.js → appointment-timeline-1-Za2miy.js} +2 -2
- package/dist/_chunks/{appointment-timeline-CKwMXUid.js.map → appointment-timeline-1-Za2miy.js.map} +1 -1
- package/dist/_chunks/{ar-pLopgMbL.js → ar-C4YQVTH6.js} +2 -2
- package/dist/_chunks/{ar-pLopgMbL.js.map → ar-C4YQVTH6.js.map} +1 -1
- package/dist/_chunks/{auth-form-parts-DHv6LVV2.js → auth-form-parts-B3GWChvG.js} +2 -2
- package/dist/_chunks/{auth-form-parts-DHv6LVV2.js.map → auth-form-parts-B3GWChvG.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js → balance-badge-cell-B49xgL6H.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js.map → balance-badge-cell-B49xgL6H.js.map} +1 -1
- package/dist/_chunks/{booking-CTRoFbIS.js → booking-sq9sa29d.js} +9 -9
- package/dist/_chunks/booking-sq9sa29d.js.map +1 -0
- package/dist/_chunks/brand-mark-DLk9kD8g.js +63 -0
- package/dist/_chunks/brand-mark-DLk9kD8g.js.map +1 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js → calendar-appointment-editor-dialog-CctI6mpd.js} +8 -8
- package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js.map → calendar-appointment-editor-dialog-CctI6mpd.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-Ycp3li61.js → cycle-calculator-HO3s5InI.js} +5 -5
- package/dist/_chunks/{cycle-calculator-Ycp3li61.js.map → cycle-calculator-HO3s5InI.js.map} +1 -1
- package/dist/_chunks/{date-picker-KcoNNsM0.js → date-picker-CdhXlgVI.js} +4 -4
- package/dist/_chunks/{date-picker-KcoNNsM0.js.map → date-picker-CdhXlgVI.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-DN37Oj5-.js → date-picker-variants-Dt6UbonG.js} +25 -25
- package/dist/_chunks/{date-picker-variants-DN37Oj5-.js.map → date-picker-variants-Dt6UbonG.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-CjcjUJLW.js → date-range-picker-B_j4VQlV.js} +5 -5
- package/dist/_chunks/{date-range-picker-CjcjUJLW.js.map → date-range-picker-B_j4VQlV.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-BVQNZ4yC.js → date-time-picker-n-yrlMJq.js} +3 -3
- package/dist/_chunks/{date-time-picker-BVQNZ4yC.js.map → date-time-picker-n-yrlMJq.js.map} +1 -1
- package/dist/_chunks/{de-lVkJRPnh.js → de-B1B3PIgY.js} +2 -2
- package/dist/_chunks/{de-lVkJRPnh.js.map → de-B1B3PIgY.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-B0gyOijA.js → due-date-calculator-CDWTSblh.js} +6 -6
- package/dist/_chunks/{due-date-calculator-B0gyOijA.js.map → due-date-calculator-CDWTSblh.js.map} +1 -1
- package/dist/_chunks/{el-CHzxNWPj.js → el-iLqGpapg.js} +16 -16
- package/dist/_chunks/{el-CHzxNWPj.js.map → el-iLqGpapg.js.map} +1 -1
- package/dist/_chunks/{en-GB-CwxYmmhU.js → en-GB-CxPRQbD6.js} +6 -6
- package/dist/_chunks/{en-GB-CwxYmmhU.js.map → en-GB-CxPRQbD6.js.map} +1 -1
- package/dist/_chunks/{es-Ck-oxbHW.js → es-Bg1oqwDs.js} +2 -2
- package/dist/_chunks/{es-Ck-oxbHW.js.map → es-Bg1oqwDs.js.map} +1 -1
- package/dist/_chunks/{forgot-password-form-D6kB72OD.js → forgot-password-form-BSOZVrZG.js} +3 -3
- package/dist/_chunks/{forgot-password-form-D6kB72OD.js.map → forgot-password-form-BSOZVrZG.js.map} +1 -1
- package/dist/_chunks/{format-D-1gTdHF.js → format--x5jypvH.js} +13 -13
- package/dist/_chunks/{format-D-1gTdHF.js.map → format--x5jypvH.js.map} +1 -1
- package/dist/_chunks/{fr-fWRnDcSD.js → fr-DpGxyOGI.js} +2 -2
- package/dist/_chunks/{fr-fWRnDcSD.js.map → fr-DpGxyOGI.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js → gestational-age-calculator-CTHeJJdb.js} +7 -7
- package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js.map → gestational-age-calculator-CTHeJJdb.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-BnopYgd-.js → hcg-doubling-BBk-a33g.js} +11 -11
- package/dist/_chunks/{hcg-doubling-BnopYgd-.js.map → hcg-doubling-BBk-a33g.js.map} +1 -1
- package/dist/_chunks/{hi-B5uX0h3V.js → hi-3Dtsksrw.js} +2 -2
- package/dist/_chunks/{hi-B5uX0h3V.js.map → hi-3Dtsksrw.js.map} +1 -1
- package/dist/_chunks/{isSameWeek-u81Z-J7h.js → isSameWeek-DyVftHWi.js} +2 -2
- package/dist/_chunks/{isSameWeek-u81Z-J7h.js.map → isSameWeek-DyVftHWi.js.map} +1 -1
- package/dist/_chunks/{it-DBoNIelY.js → it-Cp0CA13d.js} +3 -3
- package/dist/_chunks/{it-DBoNIelY.js.map → it-Cp0CA13d.js.map} +1 -1
- package/dist/_chunks/{ja-Du8gfg8p.js → ja-9FOyR1lb.js} +22 -22
- package/dist/_chunks/{ja-Du8gfg8p.js.map → ja-9FOyR1lb.js.map} +1 -1
- package/dist/_chunks/{kit-extensions-DgBi3tsK.js → kit-extensions-sNTZWkoo.js} +4 -4
- package/dist/_chunks/{kit-extensions-DgBi3tsK.js.map → kit-extensions-sNTZWkoo.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js → link-cell-renderer-B0riA_h_.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js.map → link-cell-renderer-B0riA_h_.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-pnJbVaoQ.js → login-dev-card-DRxTPkE9.js} +3 -3
- package/dist/_chunks/{login-dev-card-pnJbVaoQ.js.map → login-dev-card-DRxTPkE9.js.map} +1 -1
- package/dist/_chunks/{nl-BCBwxYi8.js → nl-sfx-zJgR.js} +2 -2
- package/dist/_chunks/{nl-BCBwxYi8.js.map → nl-sfx-zJgR.js.map} +1 -1
- package/dist/_chunks/{notes-panel-C_QshXyI.js → notes-panel-CxjMovCh.js} +2 -2
- package/dist/_chunks/{notes-panel-C_QshXyI.js.map → notes-panel-CxjMovCh.js.map} +1 -1
- package/dist/_chunks/{parse-UB4FJGNA.js → parse-B0s7bY4d.js} +3 -3
- package/dist/_chunks/{parse-UB4FJGNA.js.map → parse-B0s7bY4d.js.map} +1 -1
- package/dist/_chunks/{parseISO-y3LncvfO.js → parseISO-DZZ5a-zK.js} +2 -2
- package/dist/_chunks/{parseISO-y3LncvfO.js.map → parseISO-DZZ5a-zK.js.map} +1 -1
- package/dist/_chunks/{patient-details-Cd_dCqkg.js → patient-details-Dgd_tocD.js} +2 -2
- package/dist/_chunks/{patient-details-Cd_dCqkg.js.map → patient-details-Dgd_tocD.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-D6Ftm46u.js → patient-field-row-BFVlJnS9.js} +3 -3
- package/dist/_chunks/{patient-field-row-D6Ftm46u.js.map → patient-field-row-BFVlJnS9.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js → patient-summary-card-BTKvFUmh.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js.map → patient-summary-card-BTKvFUmh.js.map} +1 -1
- package/dist/_chunks/{phone-input-O9camxkq.js → phone-input-EwVuqFik.js} +74 -74
- package/dist/_chunks/phone-input-EwVuqFik.js.map +1 -0
- package/dist/_chunks/{pl-HwLM6gPs.js → pl-BLh7KO-s.js} +3 -3
- package/dist/_chunks/{pl-HwLM6gPs.js.map → pl-BLh7KO-s.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-CvNFirHt.js → pregnancy-dating-JBAUbM40.js} +7 -7
- package/dist/_chunks/{pregnancy-dating-CvNFirHt.js.map → pregnancy-dating-JBAUbM40.js.map} +1 -1
- package/dist/_chunks/{pt-BxhT5ZQH.js → pt-CPKOrOLj.js} +2 -2
- package/dist/_chunks/{pt-BxhT5ZQH.js.map → pt-CPKOrOLj.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js → radiograph-panel.agent-DQh2SX8G.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js.map → radiograph-panel.agent-DQh2SX8G.js.map} +1 -1
- package/dist/_chunks/registration-form-B6qqeXP1.js +1310 -0
- package/dist/_chunks/registration-form-B6qqeXP1.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-BXFgcvBW.js → rich-text-editor-BZTyxQBd.js} +1683 -1673
- package/dist/_chunks/rich-text-editor-BZTyxQBd.js.map +1 -0
- package/dist/_chunks/{ro-Do9W55ae.js → ro-Dc-oNqbF.js} +2 -2
- package/dist/_chunks/{ro-Do9W55ae.js.map → ro-Dc-oNqbF.js.map} +1 -1
- package/dist/_chunks/{ru-PDBX5gdf.js → ru-BtNpDZRR.js} +3 -3
- package/dist/_chunks/{ru-PDBX5gdf.js.map → ru-BtNpDZRR.js.map} +1 -1
- package/dist/_chunks/send-registration-link-form-pO2bGjGa.js +409 -0
- package/dist/_chunks/send-registration-link-form-pO2bGjGa.js.map +1 -0
- package/dist/_chunks/{slot-grid-uA9j7Nik.js → slot-grid-Bb13H9Rl.js} +3 -3
- package/dist/_chunks/{slot-grid-uA9j7Nik.js.map → slot-grid-Bb13H9Rl.js.map} +1 -1
- package/dist/_chunks/{sq-DnvsgyIh.js → sq-D4c7olaV.js} +2 -2
- package/dist/_chunks/{sq-DnvsgyIh.js.map → sq-D4c7olaV.js.map} +1 -1
- package/dist/_chunks/subDays-DKISP2nE.js +8 -0
- package/dist/_chunks/{subDays-xH7cpN6B.js.map → subDays-DKISP2nE.js.map} +1 -1
- package/dist/_chunks/{sv-CpFSK8xS.js → sv-Bf_dHPvh.js} +2 -2
- package/dist/_chunks/{sv-CpFSK8xS.js.map → sv-Bf_dHPvh.js.map} +1 -1
- package/dist/_chunks/{task-editor-BTeUFGUX.js → task-editor-CRhfwP9T.js} +2 -2
- package/dist/_chunks/{task-editor-BTeUFGUX.js.map → task-editor-CRhfwP9T.js.map} +1 -1
- package/dist/_chunks/{tr-DW4oQYHT.js → tr-xqQ6cbGY.js} +2 -2
- package/dist/_chunks/{tr-DW4oQYHT.js.map → tr-xqQ6cbGY.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js → use-appointment-details-read-BFslxbRr.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js.map → use-appointment-details-read-BFslxbRr.js.map} +1 -1
- package/dist/_chunks/use-field-match-C8ug3sdQ.js +30 -0
- package/dist/_chunks/use-field-match-C8ug3sdQ.js.map +1 -0
- package/dist/_chunks/use-registration-submit-CLGHxwoT.js +112 -0
- package/dist/_chunks/use-registration-submit-CLGHxwoT.js.map +1 -0
- package/dist/_chunks/{zh-CN-QGEs29fQ.js → zh-CN-C657DBCO.js} +3 -3
- package/dist/_chunks/{zh-CN-QGEs29fQ.js.map → zh-CN-C657DBCO.js.map} +1 -1
- package/dist/agent-catalog.json +87 -3
- package/dist/agent-i18n/en.json +9 -2
- package/dist/alia-asteroid-icon/index.js +52 -0
- package/dist/alia-asteroid-icon/index.js.map +1 -0
- package/dist/aws-transcribe/index.js +320 -0
- package/dist/aws-transcribe/index.js.map +1 -0
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-field-match.d.ts +2 -2
- package/dist/hooks/use-field-match.d.ts.map +1 -1
- package/dist/i18n/locales/ar.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +38 -2
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +36 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +38 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +36 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +38 -2
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +36 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +38 -2
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +36 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +38 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +36 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +38 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +36 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +38 -2
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +36 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +38 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +36 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +38 -2
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +36 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +38 -2
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +36 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +38 -2
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +36 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +38 -2
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +36 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +38 -2
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +36 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +38 -2
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +36 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +38 -2
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +36 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +38 -2
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +36 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +38 -2
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +36 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +38 -2
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +296 -292
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +38 -2
- package/dist/locales/de.json +38 -2
- package/dist/locales/el.json +38 -2
- package/dist/locales/en.json +38 -2
- package/dist/locales/es.json +38 -2
- package/dist/locales/fr.json +38 -2
- package/dist/locales/hi.json +38 -2
- package/dist/locales/it.json +38 -2
- package/dist/locales/ja.json +38 -2
- package/dist/locales/nl.json +38 -2
- package/dist/locales/pl.json +38 -2
- package/dist/locales/pt.json +38 -2
- package/dist/locales/ro.json +38 -2
- package/dist/locales/ru.json +38 -2
- package/dist/locales/sq.json +38 -2
- package/dist/locales/sv.json +38 -2
- package/dist/locales/tr.json +38 -2
- package/dist/locales/zh.json +38 -2
- package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +22 -0
- package/dist/patterns/alia-assistant/alia-types.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/index.js +7 -6
- package/dist/patterns/alia-assistant/index.js.map +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/registration-form/index.d.ts +1 -0
- package/dist/patterns/registration-form/index.d.ts.map +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/registration-form/registration-form.d.ts +43 -0
- package/dist/patterns/registration-form/registration-form.d.ts.map +1 -1
- package/dist/patterns/registration-form/registration-verification.d.ts +38 -0
- package/dist/patterns/registration-form/registration-verification.d.ts.map +1 -0
- package/dist/patterns/registration-form/use-contact-verification.d.ts +107 -0
- package/dist/patterns/registration-form/use-contact-verification.d.ts.map +1 -0
- package/dist/patterns/registration-form/verification-requests.d.ts +9 -0
- package/dist/patterns/registration-form/verification-requests.d.ts.map +1 -0
- package/dist/patterns/send-registration-link-form/index.d.ts +3 -0
- package/dist/patterns/send-registration-link-form/index.d.ts.map +1 -0
- package/dist/patterns/send-registration-link-form/index.js +6 -0
- package/dist/patterns/send-registration-link-form/index.js.map +1 -0
- package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts +80 -0
- package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts.map +1 -0
- package/dist/speech/aws-transcribe.d.ts +65 -0
- package/dist/speech/aws-transcribe.d.ts.map +1 -0
- package/dist/speech/event-stream.d.ts +13 -0
- package/dist/speech/event-stream.d.ts.map +1 -0
- package/dist/tokens.css +1 -1
- package/package.json +13 -1
- package/dist/_chunks/alia-sidebar-DZoyUFW8.js +0 -1290
- package/dist/_chunks/alia-sidebar-DZoyUFW8.js.map +0 -1
- package/dist/_chunks/booking-CTRoFbIS.js.map +0 -1
- package/dist/_chunks/phone-input-O9camxkq.js.map +0 -1
- package/dist/_chunks/registration-form-BGSVMAga.js +0 -819
- package/dist/_chunks/registration-form-BGSVMAga.js.map +0 -1
- package/dist/_chunks/rich-text-editor-BXFgcvBW.js.map +0 -1
- package/dist/_chunks/subDays-xH7cpN6B.js +0 -8
- package/dist/_chunks/use-field-match-pdbEnKvO.js +0 -28
- package/dist/_chunks/use-field-match-pdbEnKvO.js.map +0 -1
- package/dist/_chunks/use-registration-submit-eWAECgUC.js +0 -171
- package/dist/_chunks/use-registration-submit-eWAECgUC.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Xe, useContext as et, useMemo as v, useState as G, useRef as
|
|
2
|
+
import { forwardRef as Xe, useContext as et, useMemo as v, useState as G, useRef as b, useEffect as de, useCallback as U } from "react";
|
|
3
3
|
import { u as tt } from "./registry-DvAUVLHh.js";
|
|
4
4
|
import { u as nt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
5
5
|
import { u as st } from "./use-dom-value-DTxHhQAN.js";
|
|
6
|
-
import * as
|
|
6
|
+
import * as O from "@radix-ui/react-popover";
|
|
7
7
|
import { u as ot, f as rt } from "./non-modal-tab-exit-j3CPOuE3.js";
|
|
8
8
|
import { R as at, _ as w } from "./index-4xgbg-sn.js";
|
|
9
9
|
import { c as pe } from "./index-D2ZczOXr.js";
|
|
10
10
|
import { useTranslation as it } from "react-i18next";
|
|
11
|
-
import { getCountries as dt, parsePhoneNumberFromString as T, AsYouType as W, getCountryCallingCode as
|
|
12
|
-
import { u as
|
|
11
|
+
import { getCountries as dt, parsePhoneNumberFromString as T, AsYouType as W, getCountryCallingCode as ut } from "libphonenumber-js/min";
|
|
12
|
+
import { u as lt, F as ct, a as pt } from "./form-field-context-DtiROUJV.js";
|
|
13
13
|
import { c as ft } from "./compose-refs-C0k0tdqF.js";
|
|
14
|
-
import { n as
|
|
14
|
+
import { n as ue } from "./normalize-diacritics-BNGbFNlJ.js";
|
|
15
15
|
import { b as mt } from "./menu-row-BAr8bx1I.js";
|
|
16
|
-
import { a as
|
|
16
|
+
import { a as le } from "./flag-DVBE6DnB.js";
|
|
17
17
|
import { C as ht } from "./chevron-down-DWE7GSq9.js";
|
|
18
18
|
const gt = {
|
|
19
19
|
id: "phone-input",
|
|
@@ -100,7 +100,7 @@ const gt = {
|
|
|
100
100
|
"ds:has-[input:focus]:outline-[length:var(--focus-ring-width)] ds:has-[input:focus]:outline-solid",
|
|
101
101
|
"ds:has-[input:focus]:outline-ring ds:has-[input:focus]:outline-offset-[length:var(--focus-ring-offset)]",
|
|
102
102
|
"ds:forced-colors:has-[input:focus]:outline-[CanvasText]",
|
|
103
|
-
"ds:has-[:disabled]:cursor-not-allowed ds:has-[:disabled]:opacity-50"
|
|
103
|
+
"ds:has-[input:disabled]:cursor-not-allowed ds:has-[input:disabled]:opacity-50"
|
|
104
104
|
].join(" "),
|
|
105
105
|
{
|
|
106
106
|
variants: {
|
|
@@ -143,7 +143,7 @@ const gt = {
|
|
|
143
143
|
},
|
|
144
144
|
defaultVariants: { size: "md" }
|
|
145
145
|
}
|
|
146
|
-
),
|
|
146
|
+
), bt = pe(
|
|
147
147
|
[
|
|
148
148
|
"ds:flex-1 ds:min-w-0 ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground",
|
|
149
149
|
"ds:border-0 ds:outline-none",
|
|
@@ -160,7 +160,7 @@ const gt = {
|
|
|
160
160
|
},
|
|
161
161
|
defaultVariants: { size: "md" }
|
|
162
162
|
}
|
|
163
|
-
),
|
|
163
|
+
), yt = [
|
|
164
164
|
"ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-72",
|
|
165
165
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground",
|
|
166
166
|
"ds:shadow-[var(--shadow-lg)]",
|
|
@@ -212,16 +212,16 @@ function Re(s, a, c, o, f) {
|
|
|
212
212
|
if (c) {
|
|
213
213
|
const C = typeof navigator < "u" ? navigator.language : void 0;
|
|
214
214
|
if (C) {
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
const
|
|
218
|
-
if (d(
|
|
215
|
+
const y = C.match(/-([A-Za-z]{2})/);
|
|
216
|
+
if (y) {
|
|
217
|
+
const I = y[1].toUpperCase();
|
|
218
|
+
if (d(I)) return I;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
try {
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
224
|
-
return
|
|
222
|
+
const y = new Intl.Locale(o).region;
|
|
223
|
+
if (y && d(y.toUpperCase()))
|
|
224
|
+
return y.toUpperCase();
|
|
225
225
|
} catch {
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -237,7 +237,7 @@ function St(s, a) {
|
|
|
237
237
|
const o = a.map((i) => ({
|
|
238
238
|
code: i,
|
|
239
239
|
name: c.of(i) ?? i,
|
|
240
|
-
dialCode:
|
|
240
|
+
dialCode: ut(i)
|
|
241
241
|
})), f = new Intl.Collator(s);
|
|
242
242
|
return o.sort((i, d) => f.compare(i.name, d.name));
|
|
243
243
|
}
|
|
@@ -250,8 +250,8 @@ const Et = Xe(
|
|
|
250
250
|
onChange: i,
|
|
251
251
|
size: d = "md",
|
|
252
252
|
tone: C = "default",
|
|
253
|
-
disabled:
|
|
254
|
-
readOnly:
|
|
253
|
+
disabled: y,
|
|
254
|
+
readOnly: I,
|
|
255
255
|
placeholder: Se,
|
|
256
256
|
popularCountries: V,
|
|
257
257
|
allowedCountries: D,
|
|
@@ -264,7 +264,7 @@ const Et = Xe(
|
|
|
264
264
|
"aria-label": Fe
|
|
265
265
|
}, Te) {
|
|
266
266
|
var Ne;
|
|
267
|
-
const { t:
|
|
267
|
+
const { t: z, i18n: E } = it("ui"), R = lt(), k = et(ct) !== null, h = v(
|
|
268
268
|
() => new Set(dt()),
|
|
269
269
|
[]
|
|
270
270
|
), p = v(() => {
|
|
@@ -294,9 +294,9 @@ const Et = Xe(
|
|
|
294
294
|
} : { country: e, display: t, pinned: !1 };
|
|
295
295
|
}
|
|
296
296
|
return { country: e, display: "", pinned: !1 };
|
|
297
|
-
}, []), [
|
|
297
|
+
}, []), [u, j] = G(J.country), [Q, g] = G(
|
|
298
298
|
J.display
|
|
299
|
-
), [X, A] = G(!1), [De, fe] = G(""), me = a !== void 0, ee =
|
|
299
|
+
), [X, A] = G(!1), [De, fe] = G(""), me = a !== void 0, ee = b(""), B = b(null), $ = b(J.pinned), P = b(null), Le = ft(Te, P), je = st(P, Q), he = b(null), ge = b(null);
|
|
300
300
|
de(() => {
|
|
301
301
|
if ($.current) return;
|
|
302
302
|
const e = Re(
|
|
@@ -330,10 +330,10 @@ const Et = Xe(
|
|
|
330
330
|
const t = P.current;
|
|
331
331
|
t && document.activeElement === t && t.setSelectionRange(e, e);
|
|
332
332
|
});
|
|
333
|
-
const x =
|
|
333
|
+
const x = U(
|
|
334
334
|
(e, t) => {
|
|
335
|
-
const n = T(e, t),
|
|
336
|
-
ee.current =
|
|
335
|
+
const n = T(e, t), l = (n == null ? void 0 : n.number) ?? "";
|
|
336
|
+
ee.current = l, i == null || i(l, {
|
|
337
337
|
country: t,
|
|
338
338
|
isValid: (n == null ? void 0 : n.isValid()) ?? !1,
|
|
339
339
|
isPossible: (n == null ? void 0 : n.isPossible()) ?? !1,
|
|
@@ -341,15 +341,15 @@ const Et = Xe(
|
|
|
341
341
|
});
|
|
342
342
|
},
|
|
343
343
|
[i]
|
|
344
|
-
), Ae = pt(
|
|
344
|
+
), Ae = pt(R, L), Be = L ?? (k ? Ae : void 0), te = (k ? R.disabled : !1) || !!y, $e = (k ? R.required : !1) || !!Pe, ve = k ? R.invalid : !1, He = ve ? "error" : C, Ke = k && R.describedBy ? R.describedBy : void 0, Me = Se ?? z("inputs.phone.placeholder", "Phone number"), H = b(Z);
|
|
345
345
|
H.current = Z;
|
|
346
|
-
const ne =
|
|
346
|
+
const ne = b(!1), K = b(!1), M = U(
|
|
347
347
|
(e) => {
|
|
348
348
|
var t, n;
|
|
349
349
|
return e instanceof Node && !!((t = he.current) != null && t.contains(e) || (n = ge.current) != null && n.contains(e));
|
|
350
350
|
},
|
|
351
351
|
[]
|
|
352
|
-
), se =
|
|
352
|
+
), se = U(() => {
|
|
353
353
|
var e;
|
|
354
354
|
ne.current && (ne.current = !1, (e = H.current) == null || e.call(H));
|
|
355
355
|
}, []), _e = () => {
|
|
@@ -357,12 +357,12 @@ const Et = Xe(
|
|
|
357
357
|
}, qe = (e) => {
|
|
358
358
|
const t = e.relatedTarget;
|
|
359
359
|
M(t) || t === null && K.current || se();
|
|
360
|
-
},
|
|
360
|
+
}, be = Z !== void 0;
|
|
361
361
|
de(() => {
|
|
362
|
-
if (!
|
|
362
|
+
if (!be) return;
|
|
363
363
|
let e;
|
|
364
|
-
const t = (
|
|
365
|
-
K.current = M(
|
|
364
|
+
const t = (l) => {
|
|
365
|
+
K.current = M(l.target), !K.current && (e = window.setTimeout(() => {
|
|
366
366
|
M(document.activeElement) || se();
|
|
367
367
|
}, 0));
|
|
368
368
|
}, n = () => {
|
|
@@ -371,50 +371,50 @@ const Et = Xe(
|
|
|
371
371
|
return document.addEventListener("pointerdown", t, !0), document.addEventListener("pointerup", n, !0), document.addEventListener("pointercancel", n, !0), () => {
|
|
372
372
|
window.clearTimeout(e), document.removeEventListener("pointerdown", t, !0), document.removeEventListener("pointerup", n, !0), document.removeEventListener("pointercancel", n, !0);
|
|
373
373
|
};
|
|
374
|
-
}, [
|
|
375
|
-
const oe = ke === "e164" && Y !== void 0, Ge = oe ? ((Ne = T(Q,
|
|
376
|
-
if (je(),
|
|
377
|
-
const t = e.target, n = t.value,
|
|
378
|
-
B.current = Rt(ie,
|
|
379
|
-
},
|
|
374
|
+
}, [be, M, se]);
|
|
375
|
+
const oe = ke === "e164" && Y !== void 0, Ge = oe ? ((Ne = T(Q, u)) == null ? void 0 : Ne.number) ?? "" : "", Ue = (e) => {
|
|
376
|
+
if (je(), I) return;
|
|
377
|
+
const t = e.target, n = t.value, l = t.selectionStart ?? n.length, S = zt(n, l), ie = new W(u).input(n);
|
|
378
|
+
B.current = Rt(ie, S), g(ie), x(ie, u);
|
|
379
|
+
}, ye = ee, Oe = v(
|
|
380
380
|
() => ({
|
|
381
|
-
getValue: () =>
|
|
381
|
+
getValue: () => ye.current,
|
|
382
382
|
setValue: (e) => {
|
|
383
383
|
if (e === "") {
|
|
384
|
-
g(""), x("",
|
|
384
|
+
g(""), x("", u);
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
387
|
const t = T(e);
|
|
388
388
|
if (t != null && t.country)
|
|
389
389
|
$.current = !0, j(t.country), g(t.formatNational()), x(t.formatNational(), t.country);
|
|
390
390
|
else {
|
|
391
|
-
const
|
|
392
|
-
g(
|
|
391
|
+
const l = new W(u).input(e);
|
|
392
|
+
g(l), x(l, u);
|
|
393
393
|
}
|
|
394
394
|
},
|
|
395
395
|
clear: () => {
|
|
396
|
-
g(""), x("",
|
|
396
|
+
g(""), x("", u);
|
|
397
397
|
},
|
|
398
398
|
focus: () => {
|
|
399
399
|
var e;
|
|
400
400
|
return (e = P.current) == null ? void 0 : e.focus();
|
|
401
401
|
}
|
|
402
402
|
}),
|
|
403
|
-
[
|
|
403
|
+
[u, x, ye]
|
|
404
404
|
);
|
|
405
|
-
tt(gt,
|
|
405
|
+
tt(gt, Oe, L);
|
|
406
406
|
const We = ot(!0, {
|
|
407
407
|
getAnchor: rt,
|
|
408
408
|
onReturnToTrigger: () => A(!1)
|
|
409
409
|
}), Ye = (e) => {
|
|
410
|
-
if (e ===
|
|
410
|
+
if (e === u) {
|
|
411
411
|
A(!1);
|
|
412
412
|
return;
|
|
413
413
|
}
|
|
414
|
-
const t = Q.replace(/\D/g, ""), n = new W(e),
|
|
415
|
-
$.current = !0, j(e), g(
|
|
416
|
-
var
|
|
417
|
-
(
|
|
414
|
+
const t = Q.replace(/\D/g, ""), n = new W(e), l = t ? n.input(t) : "";
|
|
415
|
+
$.current = !0, j(e), g(l), A(!1), fe(""), x(l, e), requestAnimationFrame(() => {
|
|
416
|
+
var S;
|
|
417
|
+
(S = P.current) == null || S.focus();
|
|
418
418
|
});
|
|
419
419
|
}, N = v(
|
|
420
420
|
() => St(
|
|
@@ -433,14 +433,14 @@ const Et = Xe(
|
|
|
433
433
|
() => re.size > 0 ? N.filter((e) => !re.has(e.code)) : N,
|
|
434
434
|
[N, re]
|
|
435
435
|
), _ = v(
|
|
436
|
-
() => N.find((e) => e.code ===
|
|
437
|
-
[N,
|
|
438
|
-
), ae = _ ? _.dialCode : "", Ce = _ ? _.name :
|
|
436
|
+
() => N.find((e) => e.code === u),
|
|
437
|
+
[N, u]
|
|
438
|
+
), ae = _ ? _.dialCode : "", Ce = _ ? _.name : u, q = z("inputs.phone.countryPickerLabel", "Country"), Je = `${q}: ${Ce}, +${ae}`, Qe = U(
|
|
439
439
|
(e, t, n) => {
|
|
440
|
-
const
|
|
440
|
+
const l = ue(e), S = ue(t), we = n == null ? void 0 : n.map(ue);
|
|
441
441
|
return at(
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
l,
|
|
443
|
+
S,
|
|
444
444
|
we
|
|
445
445
|
);
|
|
446
446
|
},
|
|
@@ -456,7 +456,7 @@ const Et = Xe(
|
|
|
456
456
|
className: Nt,
|
|
457
457
|
"aria-label": t,
|
|
458
458
|
children: [
|
|
459
|
-
/* @__PURE__ */ r(
|
|
459
|
+
/* @__PURE__ */ r(le, { country: e.code, size: ce[d] }),
|
|
460
460
|
/* @__PURE__ */ r("span", { className: "ds:flex-1 ds:truncate", children: e.name }),
|
|
461
461
|
/* @__PURE__ */ m("bdi", { dir: "ltr", className: "ds:text-muted-foreground ds:tabular-nums", children: [
|
|
462
462
|
"+",
|
|
@@ -489,25 +489,25 @@ const Et = Xe(
|
|
|
489
489
|
className: `${Ie({ size: d })} ds:cursor-default ds:hover:bg-transparent`,
|
|
490
490
|
children: [
|
|
491
491
|
/* @__PURE__ */ r("span", { className: "ds:sr-only", children: `${q}: ${Ce}` }),
|
|
492
|
-
/* @__PURE__ */ r(
|
|
492
|
+
/* @__PURE__ */ r(le, { country: u, size: ce[d] }),
|
|
493
493
|
/* @__PURE__ */ m("bdi", { dir: "ltr", className: "ds:tabular-nums", children: [
|
|
494
494
|
"+",
|
|
495
495
|
ae
|
|
496
496
|
] })
|
|
497
497
|
]
|
|
498
498
|
}
|
|
499
|
-
) : /* @__PURE__ */ m(
|
|
500
|
-
/* @__PURE__ */ r(
|
|
499
|
+
) : /* @__PURE__ */ m(O.Root, { open: X, onOpenChange: A, children: [
|
|
500
|
+
/* @__PURE__ */ r(O.Trigger, { asChild: !0, children: /* @__PURE__ */ m(
|
|
501
501
|
"button",
|
|
502
502
|
{
|
|
503
503
|
type: "button",
|
|
504
|
-
disabled: te,
|
|
504
|
+
disabled: te || !!I,
|
|
505
505
|
"aria-haspopup": "dialog",
|
|
506
506
|
"aria-expanded": X,
|
|
507
507
|
"aria-label": Je,
|
|
508
508
|
className: Ie({ size: d }),
|
|
509
509
|
children: [
|
|
510
|
-
/* @__PURE__ */ r(
|
|
510
|
+
/* @__PURE__ */ r(le, { country: u, size: ce[d] }),
|
|
511
511
|
/* @__PURE__ */ m("bdi", { dir: "ltr", className: "ds:tabular-nums", children: [
|
|
512
512
|
"+",
|
|
513
513
|
ae
|
|
@@ -527,15 +527,15 @@ const Et = Xe(
|
|
|
527
527
|
]
|
|
528
528
|
}
|
|
529
529
|
) }),
|
|
530
|
-
/* @__PURE__ */ r(
|
|
531
|
-
|
|
530
|
+
/* @__PURE__ */ r(O.Portal, { children: /* @__PURE__ */ r(
|
|
531
|
+
O.Content,
|
|
532
532
|
{
|
|
533
533
|
ref: ge,
|
|
534
534
|
onKeyDown: We,
|
|
535
535
|
sideOffset: 6,
|
|
536
536
|
align: "start",
|
|
537
537
|
"aria-label": q,
|
|
538
|
-
className:
|
|
538
|
+
className: yt,
|
|
539
539
|
children: /* @__PURE__ */ m(
|
|
540
540
|
w,
|
|
541
541
|
{
|
|
@@ -558,7 +558,7 @@ const Et = Xe(
|
|
|
558
558
|
autoComplete: "off",
|
|
559
559
|
autoCorrect: "off",
|
|
560
560
|
spellCheck: !1,
|
|
561
|
-
placeholder:
|
|
561
|
+
placeholder: z(
|
|
562
562
|
"inputs.phone.searchCountry",
|
|
563
563
|
"Search countries…"
|
|
564
564
|
),
|
|
@@ -568,18 +568,18 @@ const Et = Xe(
|
|
|
568
568
|
}
|
|
569
569
|
),
|
|
570
570
|
/* @__PURE__ */ m(w.List, { className: xt, children: [
|
|
571
|
-
/* @__PURE__ */ r(w.Empty, { className: wt, children:
|
|
571
|
+
/* @__PURE__ */ r(w.Empty, { className: wt, children: z("inputs.phone.noCountryFound", "No country found") }),
|
|
572
572
|
F.length > 0 ? /* @__PURE__ */ r(
|
|
573
573
|
w.Group,
|
|
574
574
|
{
|
|
575
|
-
heading: /* @__PURE__ */ r("span", { className: ze, children:
|
|
575
|
+
heading: /* @__PURE__ */ r("span", { className: ze, children: z("inputs.phone.popularCountries", "Popular") }),
|
|
576
576
|
children: F.map(xe)
|
|
577
577
|
}
|
|
578
578
|
) : null,
|
|
579
579
|
/* @__PURE__ */ r(
|
|
580
580
|
w.Group,
|
|
581
581
|
{
|
|
582
|
-
heading: F.length > 0 ? /* @__PURE__ */ r("span", { className: ze, children:
|
|
582
|
+
heading: F.length > 0 ? /* @__PURE__ */ r("span", { className: ze, children: z("inputs.phone.allCountries", "All countries") }) : void 0,
|
|
583
583
|
children: Ze.map(xe)
|
|
584
584
|
}
|
|
585
585
|
)
|
|
@@ -601,13 +601,13 @@ const Et = Xe(
|
|
|
601
601
|
autoComplete: "tel-national",
|
|
602
602
|
placeholder: Me,
|
|
603
603
|
disabled: te,
|
|
604
|
-
readOnly:
|
|
604
|
+
readOnly: I,
|
|
605
605
|
required: $e,
|
|
606
606
|
"aria-label": Fe,
|
|
607
607
|
"aria-describedby": Ke,
|
|
608
608
|
"aria-invalid": ve || void 0,
|
|
609
|
-
onChange:
|
|
610
|
-
className:
|
|
609
|
+
onChange: Ue,
|
|
610
|
+
className: bt({ size: d })
|
|
611
611
|
}
|
|
612
612
|
),
|
|
613
613
|
oe ? /* @__PURE__ */ r(
|
|
@@ -627,8 +627,8 @@ const Et = Xe(
|
|
|
627
627
|
Et.displayName = "PhoneInput";
|
|
628
628
|
export {
|
|
629
629
|
Et as P,
|
|
630
|
-
|
|
630
|
+
bt as a,
|
|
631
631
|
Ie as c,
|
|
632
632
|
vt as p
|
|
633
633
|
};
|
|
634
|
-
//# sourceMappingURL=phone-input-
|
|
634
|
+
//# sourceMappingURL=phone-input-EwVuqFik.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-input-EwVuqFik.js","sources":["../../src/components/phone-input/phone-input.agent.ts","../../src/components/phone-input/phone-input.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — PhoneInput. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { PhoneInputHandle } from './phone-input';\n\nexport const phoneInputAgent: AgentAdapter<PhoneInputHandle> = {\n id: 'phone-input',\n // A phone number is a single form value, not free-form rich text — `set_value`\n // (not `edit_inline`, which is reserved for in-place rich/cell editing).\n capabilities: ['set_value'],\n state: {\n value: {\n type: 'string',\n descriptionKey: 'ui.agent.phoneInput.state.value',\n description:\n 'Current E.164 phone number, or empty string when not yet valid.',\n read: (handle) => handle.getValue(),\n },\n isEmpty: {\n type: 'boolean',\n descriptionKey: 'ui.agent.phoneInput.state.isEmpty',\n description: 'Whether the input has no value.',\n read: (handle) => handle.getValue() === '',\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: string }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: 'string',\n description:\n 'Phone number in E.164 or national format; the parser infers the country.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.phoneInput.actions.setValue',\n description:\n 'Replace the phone number (E.164 or national format; parser will infer country).',\n examples: [\n { args: { value: '+393331234567' }, note: 'Set an Italian mobile.' },\n ],\n invoke: (handle, args: { value: string }) => {\n handle.setValue(args.value);\n },\n },\n clear: {\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.phoneInput.actions.clear',\n description: 'Empty the input. Loses any typed value.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n focus: {\n safety: 'read',\n descriptionKey: 'ui.agent.phoneInput.actions.focus',\n description: 'Move keyboard focus to the phone-number input.',\n invoke: (handle) => {\n handle.focus();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'phone-input',\n description: 'Marks the PhoneInput wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type FocusEvent,\n} from 'react';\nimport { useAgentRegistration } from '../../agent';\nimport { phoneInputAgent } from './phone-input.agent';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useDomValue } from '../_shared/use-dom-value';\n\n/** Agent-readiness curated handle for PhoneInput. */\nexport interface PhoneInputHandle {\n getValue: () => string;\n setValue: (value: string) => void;\n clear: () => void;\n focus: () => void;\n}\nimport * as Popover from '@radix-ui/react-popover';\nimport {\n findPopoverTrigger,\n useNonModalTabExit,\n} from '../_shared/non-modal-tab-exit';\nimport { Command, defaultFilter } from 'cmdk';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ChevronDown } from 'lucide-react';\nimport {\n AsYouType,\n getCountries,\n getCountryCallingCode,\n parsePhoneNumberFromString,\n type CountryCode,\n} from 'libphonenumber-js/min';\nimport {\n FormFieldContext,\n useFormField,\n useFormFieldControlId,\n} from '../form-field/form-field-context';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { normalizeDiacritics } from '../_shared/normalize-diacritics';\nimport { MENU_ROW_HIGHLIGHT } from '../_shared/menu-row';\nimport { Flag } from '../flag';\n\nexport interface PhoneInputChangeMeta {\n country: CountryCode;\n isValid: boolean;\n isPossible: boolean;\n type?: string;\n}\n\nexport interface PhoneInputProps {\n value?: string;\n defaultValue?: string;\n /**\n * Country pre-selected when no value is supplied. Defaults to `IT`\n * (AlfaDocs's dominant user base is Italian). Pass a different\n * `CountryCode` to override, or enable `detectBrowserCountry` to\n * derive it from the browser locale.\n */\n defaultCountry?: CountryCode;\n /**\n * When true, infer the default country from `navigator.language` /\n * `Intl.Locale` before falling back to `defaultCountry` (or `IT`).\n * Off by default — most AlfaDocs flows should stay on IT regardless\n * of the visitor's browser locale.\n */\n detectBrowserCountry?: boolean;\n onChange?: (e164: string, meta: PhoneInputChangeMeta) => void;\n size?: 'sm' | 'md' | 'lg';\n tone?: 'default' | 'error';\n disabled?: boolean;\n readOnly?: boolean;\n placeholder?: string;\n popularCountries?: CountryCode[];\n /**\n * Restrict the country picker to this set (ISO 3166-1 alpha-2 codes), in\n * the order given. Unsupported or duplicate codes are dropped; an empty /\n * all-invalid list is ignored (every country stays selectable).\n * `popularCountries` is intersected with this set. When the list resolves\n * to a single country the picker collapses to a fixed, non-interactive\n * dial code — only the national-number field stays editable.\n */\n allowedCountries?: CountryCode[];\n className?: string;\n id?: string;\n name?: string;\n /**\n * What `name` posts in a native form. `national` (the default) posts the\n * number field's own text, e.g. `333 123 4567`. `e164` posts the full\n * number from a hidden field instead, e.g. `+393331234567`: the string\n * `onChange` reports, so it is empty while the text is not yet a number.\n */\n nameFormat?: 'national' | 'e164';\n required?: boolean;\n /**\n * Fires once when focus has left the whole control. Moving between the\n * country picker and the number field does not fire it. It takes no\n * event: the control has several parts, so there is no single target.\n */\n onBlur?: () => void;\n 'aria-label'?: string;\n}\n\nconst phoneInputWrapperVariants = cva(\n [\n 'ds:group ds:relative ds:inline-flex ds:items-stretch ds:w-full',\n 'ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--control-border)] ds:bg-input',\n 'ds:shadow-[var(--shadow-input)]',\n 'ds:text-foreground',\n 'ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n /* The ring is for the number field only. The country button draws its\n own, and `focus-within` here would draw a second one around it. */\n 'ds:has-[input:focus]:outline-[length:var(--focus-ring-width)] ds:has-[input:focus]:outline-solid',\n 'ds:has-[input:focus]:outline-ring ds:has-[input:focus]:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:has-[input:focus]:outline-[CanvasText]',\n 'ds:has-[input:disabled]:cursor-not-allowed ds:has-[input:disabled]:opacity-50',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:h-8 ds:text-[length:var(--font-size-sm)]',\n md: 'ds:h-[var(--min-target-size)] ds:text-[length:var(--font-size-base)]',\n lg: 'ds:h-12 ds:text-[length:var(--font-size-lg)]',\n },\n tone: {\n default: '',\n error: 'ds:border-destructive ds:has-[input:focus]:outline-destructive',\n },\n },\n defaultVariants: {\n size: 'md',\n tone: 'default',\n },\n },\n);\n\nconst countryTriggerVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:bg-transparent ds:text-foreground',\n 'ds:border-0 ds:border-e ds:border-e-border',\n 'ds:rounded-s-[var(--radius-sm)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:hover:bg-muted',\n 'ds:focus:outline-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n 'ds:disabled:cursor-not-allowed',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-3 ds:pe-2',\n md: 'ds:ps-3 ds:pe-2',\n lg: 'ds:ps-4 ds:pe-3',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst phoneNumberInputVariants = cva(\n [\n 'ds:flex-1 ds:min-w-0 ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground',\n 'ds:border-0 ds:outline-none',\n 'ds:disabled:cursor-not-allowed',\n 'ds:read-only:cursor-default',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-2 ds:pe-3 ds:text-[length:var(--font-size-sm)]',\n md: 'ds:ps-2 ds:pe-3 ds:text-[length:var(--font-size-base)]',\n lg: 'ds:ps-3 ds:pe-4 ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst pickerContentClasses = [\n 'ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-72',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:animate-in ds:fade-in ds:zoom-in-95',\n 'ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out',\n 'ds:data-[state=closed]:zoom-out-95',\n 'ds:data-[side=bottom]:slide-in-from-top-2',\n 'ds:data-[side=top]:slide-in-from-bottom-2',\n 'ds:motion-reduce:animate-none',\n].join(' ');\n\nconst pickerSearchClasses = [\n 'ds:w-full ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground',\n 'ds:border-0 ds:border-b ds:border-b-border ds:outline-none',\n 'ds:ps-3 ds:pe-3 ds:py-2 ds:text-[var(--font-size-sm)]',\n 'ds:focus:outline-none',\n].join(' ');\n\nconst pickerListClasses =\n 'ds:max-h-72 ds:overflow-y-auto ds:p-[var(--spacing-xs)]';\n\nconst pickerItemClasses = [\n 'ds:relative ds:flex ds:cursor-pointer ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)] ds:ps-3 ds:pe-3 ds:py-2 ds:text-[var(--font-size-sm)]',\n 'ds:text-foreground ds:outline-none ds:select-none',\n MENU_ROW_HIGHLIGHT.selected,\n].join(' ');\n\nconst pickerGroupHeadingClasses = [\n 'ds:ps-3 ds:pe-3 ds:py-1.5',\n 'type-eyebrow ds:text-muted-foreground',\n].join(' ');\n\nconst pickerEmptyClasses =\n 'ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground';\n\nconst chevronSizeBySize = {\n sm: 'ds:size-3.5',\n md: 'ds:size-4',\n lg: 'ds:size-5',\n} as const;\n\nconst flagSizeBySize = {\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n} as const satisfies Record<'sm' | 'md' | 'lg', 'sm' | 'md' | 'lg'>;\n\nfunction countDigitsBefore(str: string, position: number): number {\n let digits = 0;\n for (let i = 0; i < position && i < str.length; i++) {\n if (str[i] >= '0' && str[i] <= '9') digits++;\n }\n return digits;\n}\n\nfunction positionAfterDigits(str: string, targetDigits: number): number {\n if (targetDigits === 0) return 0;\n let count = 0;\n for (let i = 0; i < str.length; i++) {\n if (str[i] >= '0' && str[i] <= '9') {\n count++;\n if (count === targetDigits) return i + 1;\n }\n }\n return str.length;\n}\n\nfunction resolveDefaultCountry(\n explicit: CountryCode | undefined,\n supported: Set<string>,\n detectBrowser: boolean,\n locale: string,\n allowedList: CountryCode[] | null,\n): CountryCode {\n const allowed =\n allowedList && allowedList.length ? new Set<string>(allowedList) : null;\n const ok = (code: string) =>\n supported.has(code) && (!allowed || allowed.has(code));\n\n if (explicit && ok(explicit)) return explicit;\n\n if (detectBrowser) {\n const fromNavigator =\n typeof navigator !== 'undefined' ? navigator.language : undefined;\n if (fromNavigator) {\n const match = fromNavigator.match(/-([A-Za-z]{2})/);\n if (match) {\n const candidate = match[1].toUpperCase();\n if (ok(candidate)) return candidate as CountryCode;\n }\n }\n\n try {\n const region = new Intl.Locale(locale).region;\n if (region && ok(region.toUpperCase())) {\n return region.toUpperCase() as CountryCode;\n }\n } catch {\n // Intl.Locale may throw on malformed BCP-47 — fall through.\n }\n }\n\n // A restricted list with no explicit / detected hit defaults to the\n // consumer's first listed country; otherwise AlfaDocs's Italian-first\n // fallback.\n if (allowed) return allowedList![0];\n return 'IT';\n}\n\ninterface CountryRow {\n code: CountryCode;\n name: string;\n dialCode: string;\n}\n\nfunction buildCountryRows(\n locale: string,\n countries: CountryCode[],\n): CountryRow[] {\n let displayNames: Intl.DisplayNames;\n try {\n displayNames = new Intl.DisplayNames([locale], { type: 'region' });\n } catch {\n displayNames = new Intl.DisplayNames(['en'], { type: 'region' });\n }\n const rows = countries.map<CountryRow>((code) => ({\n code,\n name: displayNames.of(code) ?? code,\n dialCode: getCountryCallingCode(code),\n }));\n const collator = new Intl.Collator(locale);\n return rows.sort((a, b) => collator.compare(a.name, b.name));\n}\n\nexport const PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(\n function PhoneInput(\n {\n value,\n defaultValue,\n defaultCountry,\n detectBrowserCountry = false,\n onChange,\n size = 'md',\n tone = 'default',\n disabled,\n readOnly,\n placeholder,\n popularCountries,\n allowedCountries,\n className,\n id,\n name,\n nameFormat = 'national',\n required,\n onBlur,\n 'aria-label': ariaLabel,\n },\n ref,\n ) {\n const { t, i18n } = useTranslation('ui');\n const ctx = useFormField();\n const inFormField = useContext(FormFieldContext) !== null;\n\n const supportedCountries = useMemo(\n () => new Set(getCountries() as string[]),\n [],\n );\n\n // Consumer-restricted country set, filtered to supported + deduped with\n // order preserved. `null` means \"no restriction\" (every country shown).\n const allowedList = useMemo<CountryCode[] | null>(() => {\n if (!allowedCountries || allowedCountries.length === 0) return null;\n const seen = new Set<string>();\n const filtered = allowedCountries.filter((code) => {\n if (!supportedCountries.has(code) || seen.has(code)) return false;\n seen.add(code);\n return true;\n });\n return filtered.length > 0 ? filtered : null;\n }, [allowedCountries, supportedCountries]);\n\n // A single allowed country has nothing to pick — render the dial code as a\n // fixed, non-interactive prefix instead of a one-item picker.\n const isCountryFixed = allowedList !== null && allowedList.length === 1;\n\n const initialState = useMemo(() => {\n const resolvedCountry = resolveDefaultCountry(\n defaultCountry,\n supportedCountries,\n detectBrowserCountry,\n i18n.language,\n allowedList,\n );\n const raw = value ?? defaultValue;\n if (raw) {\n const parsed = parsePhoneNumberFromString(raw);\n if (parsed?.country) {\n // Clamp the parsed country to `allowedCountries` so the rendered dial\n // code can never leave the allowed set — a single-country lock stays\n // on its country even when handed an off-set value.\n if (!allowedList || allowedList.includes(parsed.country)) {\n return {\n country: parsed.country,\n display: parsed.formatNational(),\n pinned: true,\n };\n }\n return {\n country: resolvedCountry,\n display: new AsYouType(resolvedCountry).input(\n parsed.nationalNumber,\n ),\n pinned: true,\n };\n }\n return { country: resolvedCountry, display: raw, pinned: false };\n }\n return { country: resolvedCountry, display: '', pinned: false };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const [country, setCountry] = useState<CountryCode>(initialState.country);\n const [displayValue, setDisplayValue] = useState<string>(\n initialState.display,\n );\n const [pickerOpen, setPickerOpen] = useState(false);\n const [pickerSearch, setPickerSearch] = useState('');\n\n const isControlled = value !== undefined;\n const lastEmittedRef = useRef<string>('');\n const pendingCaretRef = useRef<number | null>(null);\n // Pins the country once the user (or an incoming value) selects one,\n // so the locale-flip effect below stops re-resolving.\n const userSelectedCountryRef = useRef(initialState.pinned);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const composedInputRef = composeRefs(ref, inputRef);\n // The number is written to the input's DOM property, never to its\n // `value` attribute, where a copied outerHTML or a session replay\n // could read it. Declared before the caret effect below, which places\n // the caret in the text this one writes.\n const syncDisplay = useDomValue(inputRef, displayValue);\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const pickerContentRef = useRef<HTMLDivElement | null>(null);\n\n // Re-resolve the country when i18n.language flips from the bootstrap\n // fallback to the real locale on first paint, unless the user has\n // already pinned a country.\n useEffect(() => {\n if (userSelectedCountryRef.current) return;\n const next = resolveDefaultCountry(\n defaultCountry,\n supportedCountries,\n detectBrowserCountry,\n i18n.language,\n allowedList,\n );\n setCountry((prev) => (prev === next ? prev : next));\n }, [\n i18n.language,\n defaultCountry,\n supportedCountries,\n detectBrowserCountry,\n allowedList,\n ]);\n\n // Sync state back from a controlled `value` prop change that did not\n // originate from this component (e.g. parent reset). Skip the sync when\n // the incoming value matches what we just emitted.\n useEffect(() => {\n if (!isControlled) return;\n const current = value ?? '';\n if (current === lastEmittedRef.current) return;\n if (current === '') {\n setDisplayValue('');\n return;\n }\n const parsed = parsePhoneNumberFromString(current);\n if (\n parsed?.country &&\n (!allowedList || allowedList.includes(parsed.country))\n ) {\n userSelectedCountryRef.current = true;\n setCountry(parsed.country);\n setDisplayValue(parsed.formatNational());\n } else {\n // Off-set or unparseable controlled value — keep the country within the\n // allowed set; only sync the displayed digits.\n setDisplayValue(parsed ? parsed.formatNational() : current);\n }\n }, [value, isControlled, allowedList]);\n\n useIsomorphicLayoutEffect(() => {\n if (pendingCaretRef.current == null) return;\n const pos = pendingCaretRef.current;\n pendingCaretRef.current = null;\n const node = inputRef.current;\n if (node && document.activeElement === node) {\n node.setSelectionRange(pos, pos);\n }\n });\n\n const emit = useCallback(\n (nextDisplay: string, nextCountry: CountryCode) => {\n const parsed = parsePhoneNumberFromString(nextDisplay, nextCountry);\n const e164 = parsed?.number ?? '';\n lastEmittedRef.current = e164;\n onChange?.(e164, {\n country: nextCountry,\n isValid: parsed?.isValid() ?? false,\n isPossible: parsed?.isPossible() ?? false,\n type: parsed?.getType(),\n });\n },\n [onChange],\n );\n\n const controlId = useFormFieldControlId(ctx, id);\n const inputId = id ?? (inFormField ? controlId : undefined);\n const effectiveDisabled =\n (inFormField ? ctx.disabled : false) || Boolean(disabled);\n const effectiveRequired =\n (inFormField ? ctx.required : false) || Boolean(required);\n const effectiveInvalid = inFormField ? ctx.invalid : false;\n const effectiveTone = effectiveInvalid ? 'error' : tone;\n const describedBy =\n inFormField && ctx.describedBy ? ctx.describedBy : undefined;\n\n const resolvedPlaceholder =\n placeholder ?? t('inputs.phone.placeholder', 'Phone number');\n\n /* Focus leaving the whole control. The picker is portalled, so it is\n outside the wrapper in the DOM but still part of the control. */\n const onBlurRef = useRef(onBlur);\n onBlurRef.current = onBlur;\n const focusInsideRef = useRef(false);\n const pressInsideRef = useRef(false);\n const isInside = useCallback(\n (node: EventTarget | null) =>\n node instanceof Node &&\n Boolean(\n wrapperRef.current?.contains(node) ||\n pickerContentRef.current?.contains(node),\n ),\n [],\n );\n const leave = useCallback(() => {\n if (!focusInsideRef.current) return;\n focusInsideRef.current = false;\n onBlurRef.current?.();\n }, []);\n const handleFocus = () => {\n focusInsideRef.current = true;\n };\n const handleBlur = (event: FocusEvent<HTMLDivElement>) => {\n const next = event.relatedTarget;\n if (isInside(next)) return;\n /* Safari does not focus a button on click: pressing the country\n button blurs the number field to nowhere. */\n if (next === null && pressInsideRef.current) return;\n leave();\n };\n const listensForBlur = onBlur !== undefined;\n useEffect(() => {\n if (!listensForBlur) return;\n let check: number | undefined;\n const onPointerDown = (event: PointerEvent) => {\n pressInsideRef.current = isInside(event.target);\n if (pressInsideRef.current) return;\n /* A press outside closes the picker, and its focused search box\n can unmount without a blur event. */\n check = window.setTimeout(() => {\n if (!isInside(document.activeElement)) leave();\n }, 0);\n };\n const onPointerUp = () => {\n pressInsideRef.current = false;\n };\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('pointerup', onPointerUp, true);\n document.addEventListener('pointercancel', onPointerUp, true);\n return () => {\n window.clearTimeout(check);\n document.removeEventListener('pointerdown', onPointerDown, true);\n document.removeEventListener('pointerup', onPointerUp, true);\n document.removeEventListener('pointercancel', onPointerUp, true);\n };\n }, [listensForBlur, isInside, leave]);\n\n const postsE164 = nameFormat === 'e164' && name !== undefined;\n const e164Value = postsE164\n ? (parsePhoneNumberFromString(displayValue, country)?.number ?? '')\n : '';\n\n const handleInputChange = (event: ChangeEvent<HTMLInputElement>) => {\n // A keystroke the formatter drops (or a read-only field refuses)\n // leaves the text as it was, so no render follows: ask for one, to\n // take the refused character out.\n syncDisplay();\n if (readOnly) return;\n const target = event.target;\n const raw = target.value;\n const caret = target.selectionStart ?? raw.length;\n const digitsBefore = countDigitsBefore(raw, caret);\n\n const formatter = new AsYouType(country);\n const formatted = formatter.input(raw);\n\n pendingCaretRef.current = positionAfterDigits(formatted, digitsBefore);\n setDisplayValue(formatted);\n emit(formatted, country);\n };\n\n const lastEmittedRefForHandle = lastEmittedRef;\n const agentHandle = useMemo<PhoneInputHandle>(\n () => ({\n getValue: () => lastEmittedRefForHandle.current,\n setValue: (next) => {\n if (next === '') {\n setDisplayValue('');\n emit('', country);\n return;\n }\n const parsed = parsePhoneNumberFromString(next);\n if (parsed?.country) {\n userSelectedCountryRef.current = true;\n setCountry(parsed.country);\n setDisplayValue(parsed.formatNational());\n emit(parsed.formatNational(), parsed.country);\n } else {\n const formatter = new AsYouType(country);\n const formatted = formatter.input(next);\n setDisplayValue(formatted);\n emit(formatted, country);\n }\n },\n clear: () => {\n setDisplayValue('');\n emit('', country);\n },\n focus: () => inputRef.current?.focus(),\n }),\n [country, emit, lastEmittedRefForHandle],\n );\n useAgentRegistration(phoneInputAgent, agentHandle, id);\n const exitOnTab = useNonModalTabExit(true, {\n getAnchor: findPopoverTrigger,\n onReturnToTrigger: () => setPickerOpen(false),\n });\n\n const handleCountrySelect = (nextCountry: CountryCode) => {\n if (nextCountry === country) {\n setPickerOpen(false);\n return;\n }\n const digits = displayValue.replace(/\\D/g, '');\n const formatter = new AsYouType(nextCountry);\n const reformatted = digits ? formatter.input(digits) : '';\n userSelectedCountryRef.current = true;\n setCountry(nextCountry);\n setDisplayValue(reformatted);\n setPickerOpen(false);\n setPickerSearch('');\n emit(reformatted, nextCountry);\n requestAnimationFrame(() => {\n inputRef.current?.focus();\n });\n };\n\n const countryRows = useMemo(\n () =>\n buildCountryRows(\n i18n.language,\n allowedList ?? (Array.from(supportedCountries) as CountryCode[]),\n ),\n [i18n.language, supportedCountries, allowedList],\n );\n\n const popularRows = useMemo(() => {\n if (!popularCountries || popularCountries.length === 0) return [];\n const byCode = new Map(countryRows.map((row) => [row.code, row]));\n return popularCountries\n .filter((code): code is CountryCode => supportedCountries.has(code))\n .map((code) => byCode.get(code))\n .filter((row): row is CountryRow => Boolean(row));\n }, [popularCountries, countryRows, supportedCountries]);\n\n const popularCodes = useMemo(\n () => new Set(popularRows.map((row) => row.code)),\n [popularRows],\n );\n\n const remainingRows = useMemo(\n () =>\n popularCodes.size > 0\n ? countryRows.filter((row) => !popularCodes.has(row.code))\n : countryRows,\n [countryRows, popularCodes],\n );\n\n const selected = useMemo(\n () => countryRows.find((row) => row.code === country),\n [countryRows, country],\n );\n const selectedDialCode = selected ? selected.dialCode : '';\n const selectedName = selected ? selected.name : country;\n\n const triggerLabel = t('inputs.phone.countryPickerLabel', 'Country');\n const triggerAccessibleName = `${triggerLabel}: ${selectedName}, +${selectedDialCode}`;\n\n const filterFn = useCallback(\n (candidate: string, searchStr: string, keywords?: string[]) => {\n const normalizedCandidate = normalizeDiacritics(candidate);\n const normalizedSearch = normalizeDiacritics(searchStr);\n const normalizedKeywords = keywords?.map(normalizeDiacritics);\n return defaultFilter(\n normalizedCandidate,\n normalizedSearch,\n normalizedKeywords,\n );\n },\n [],\n );\n\n const renderRow = (row: CountryRow) => {\n const accessibleLabel = `${row.name}, +${row.dialCode}`;\n return (\n <Command.Item\n key={row.code}\n value={row.code}\n keywords={[row.name, row.dialCode, `+${row.dialCode}`]}\n onSelect={() => handleCountrySelect(row.code)}\n className={pickerItemClasses}\n aria-label={accessibleLabel}\n >\n <Flag country={row.code} size={flagSizeBySize[size]} />\n <span className=\"ds:flex-1 ds:truncate\">{row.name}</span>\n <bdi dir=\"ltr\" className=\"ds:text-muted-foreground ds:tabular-nums\">\n +{row.dialCode}\n </bdi>\n </Command.Item>\n );\n };\n\n return (\n <div\n ref={wrapperRef}\n onFocus={handleFocus}\n onBlur={handleBlur}\n data-component=\"phone-input\"\n data-component-id={id}\n data-slot=\"phone-input\"\n className={phoneInputWrapperVariants({\n size,\n tone: effectiveTone,\n className,\n })}\n >\n {isCountryFixed ? (\n <span\n data-slot=\"phone-country-fixed\"\n className={`${countryTriggerVariants({ size })} ds:cursor-default ds:hover:bg-transparent`}\n >\n <span className=\"ds:sr-only\">{`${triggerLabel}: ${selectedName}`}</span>\n <Flag country={country} size={flagSizeBySize[size]} />\n <bdi dir=\"ltr\" className=\"ds:tabular-nums\">\n +{selectedDialCode}\n </bdi>\n </span>\n ) : (\n <Popover.Root open={pickerOpen} onOpenChange={setPickerOpen}>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n // A read-only number keeps its country too. The wrapper dims only for\n // a disabled number field, so a locked number stays legible.\n disabled={effectiveDisabled || Boolean(readOnly)}\n // What opens is a dialog: a search box over the list.\n aria-haspopup=\"dialog\"\n aria-expanded={pickerOpen}\n aria-label={triggerAccessibleName}\n className={countryTriggerVariants({ size })}\n >\n <Flag country={country} size={flagSizeBySize[size]} />\n <bdi dir=\"ltr\" className=\"ds:tabular-nums\">\n +{selectedDialCode}\n </bdi>\n <ChevronDown\n aria-hidden=\"true\"\n className={[\n chevronSizeBySize[size],\n 'ds:shrink-0 ds:text-muted-foreground',\n 'ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n pickerOpen ? 'ds:rotate-180' : '',\n ].join(' ')}\n />\n </button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n ref={pickerContentRef}\n onKeyDown={exitOnTab}\n sideOffset={6}\n align=\"start\"\n // Radix gives the content role=\"dialog\" with no name.\n aria-label={triggerLabel}\n className={pickerContentClasses}\n >\n <Command\n filter={filterFn}\n shouldFilter\n loop\n label={triggerLabel}\n >\n <Command.Input\n asChild\n value={pickerSearch}\n onValueChange={setPickerSearch}\n >\n <input\n data-phone-country-search=\"true\"\n type=\"text\"\n autoComplete=\"off\"\n autoCorrect=\"off\"\n spellCheck={false}\n placeholder={t(\n 'inputs.phone.searchCountry',\n 'Search countries…',\n )}\n className={pickerSearchClasses}\n />\n </Command.Input>\n <Command.List className={pickerListClasses}>\n <Command.Empty className={pickerEmptyClasses}>\n {t('inputs.phone.noCountryFound', 'No country found')}\n </Command.Empty>\n {popularRows.length > 0 ? (\n <Command.Group\n heading={\n <span className={pickerGroupHeadingClasses}>\n {t('inputs.phone.popularCountries', 'Popular')}\n </span>\n }\n >\n {popularRows.map(renderRow)}\n </Command.Group>\n ) : null}\n <Command.Group\n heading={\n popularRows.length > 0 ? (\n <span className={pickerGroupHeadingClasses}>\n {t('inputs.phone.allCountries', 'All countries')}\n </span>\n ) : undefined\n }\n >\n {remainingRows.map(renderRow)}\n </Command.Group>\n </Command.List>\n </Command>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n )}\n <input\n ref={composedInputRef}\n id={inputId}\n name={postsE164 ? undefined : name}\n type=\"tel\"\n inputMode=\"tel\"\n autoComplete=\"tel-national\"\n placeholder={resolvedPlaceholder}\n disabled={effectiveDisabled}\n readOnly={readOnly}\n required={effectiveRequired}\n aria-label={ariaLabel}\n aria-describedby={describedBy}\n aria-invalid={effectiveInvalid || undefined}\n onChange={handleInputChange}\n className={phoneNumberInputVariants({ size })}\n />\n {postsE164 ? (\n <input\n type=\"hidden\"\n name={name}\n value={e164Value}\n disabled={effectiveDisabled}\n />\n ) : null}\n </div>\n );\n },\n);\n\nPhoneInput.displayName = 'PhoneInput';\n\nexport {\n phoneInputWrapperVariants,\n countryTriggerVariants,\n phoneNumberInputVariants,\n};\n"],"names":["phoneInputAgent","handle","args","phoneInputWrapperVariants","cva","countryTriggerVariants","phoneNumberInputVariants","pickerContentClasses","pickerSearchClasses","pickerListClasses","pickerItemClasses","MENU_ROW_HIGHLIGHT","pickerGroupHeadingClasses","pickerEmptyClasses","chevronSizeBySize","flagSizeBySize","countDigitsBefore","str","position","digits","i","positionAfterDigits","targetDigits","count","resolveDefaultCountry","explicit","supported","detectBrowser","locale","allowedList","allowed","ok","code","fromNavigator","match","candidate","region","buildCountryRows","countries","displayNames","rows","getCountryCallingCode","collator","a","b","PhoneInput","forwardRef","value","defaultValue","defaultCountry","detectBrowserCountry","onChange","size","tone","disabled","readOnly","placeholder","popularCountries","allowedCountries","className","id","name","nameFormat","required","onBlur","ariaLabel","ref","t","i18n","useTranslation","ctx","useFormField","inFormField","useContext","FormFieldContext","supportedCountries","useMemo","getCountries","seen","filtered","isCountryFixed","initialState","resolvedCountry","raw","parsed","parsePhoneNumberFromString","AsYouType","country","setCountry","useState","displayValue","setDisplayValue","pickerOpen","setPickerOpen","pickerSearch","setPickerSearch","isControlled","lastEmittedRef","useRef","pendingCaretRef","userSelectedCountryRef","inputRef","composedInputRef","composeRefs","syncDisplay","useDomValue","wrapperRef","pickerContentRef","useEffect","next","prev","current","useIsomorphicLayoutEffect","pos","node","emit","useCallback","nextDisplay","nextCountry","e164","controlId","useFormFieldControlId","inputId","effectiveDisabled","effectiveRequired","effectiveInvalid","effectiveTone","describedBy","resolvedPlaceholder","onBlurRef","focusInsideRef","pressInsideRef","isInside","_a","_b","leave","handleFocus","handleBlur","event","listensForBlur","check","onPointerDown","onPointerUp","postsE164","e164Value","handleInputChange","target","caret","digitsBefore","formatted","lastEmittedRefForHandle","agentHandle","useAgentRegistration","exitOnTab","useNonModalTabExit","findPopoverTrigger","handleCountrySelect","formatter","reformatted","countryRows","popularRows","byCode","row","popularCodes","remainingRows","selected","selectedDialCode","selectedName","triggerLabel","triggerAccessibleName","filterFn","searchStr","keywords","normalizedCandidate","normalizeDiacritics","normalizedSearch","normalizedKeywords","defaultFilter","renderRow","accessibleLabel","jsxs","Command","jsx","Flag","Popover","ChevronDown"],"mappings":";;;;;;;;;;;;;;;;;AASO,MAAMA,KAAkD;AAAA,EAC7D,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA,EAC1B,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,SAAS;AAAA,MACP,MAAM;AAAA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;AAAA,cACZ,oBAAkB8D;AAAA,cAClB,gBAAcF,MAAoB;AAAA,cAClC,UAAUoB;AAAA,cACV,WAAW3I,GAAyB,EAAE,MAAA8C,EAAA,CAAM;AAAA,YAAA;AAAA,UAAA;AAAA,UAE7C2F,KACC,gBAAAuC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAAzH;AAAA,cACA,OAAOmF;AAAA,cACP,UAAUrB;AAAA,YAAA;AAAA,UAAA,IAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEA9E,GAAW,cAAc;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as p } from "./isSameWeek-
|
|
1
|
+
import { e as s, p as a, q as r, r as l } from "./format--x5jypvH.js";
|
|
2
|
+
import { i as p } from "./isSameWeek-DyVftHWi.js";
|
|
3
3
|
const w = {
|
|
4
4
|
lessThanXSeconds: {
|
|
5
5
|
one: {
|
|
@@ -511,4 +511,4 @@ const I = {
|
|
|
511
511
|
export {
|
|
512
512
|
Z as pl
|
|
513
513
|
};
|
|
514
|
-
//# sourceMappingURL=pl-
|
|
514
|
+
//# sourceMappingURL=pl-BLh7KO-s.js.map
|