@alfadocs/ui-kit-debug 1.73.3 → 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.
Files changed (288) hide show
  1. package/dist/_chunks/alia-sidebar-CsTRAxC8.js +1323 -0
  2. package/dist/_chunks/alia-sidebar-CsTRAxC8.js.map +1 -0
  3. package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js → anamnesis-summary-rows-vNDyE5HW.js} +2 -2
  4. package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js.map → anamnesis-summary-rows-vNDyE5HW.js.map} +1 -1
  5. package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js → antenatal-schedule-timeline-BGewPfEX.js} +18 -18
  6. package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js.map → antenatal-schedule-timeline-BGewPfEX.js.map} +1 -1
  7. package/dist/_chunks/{appointment-timeline-CKwMXUid.js → appointment-timeline-1-Za2miy.js} +2 -2
  8. package/dist/_chunks/{appointment-timeline-CKwMXUid.js.map → appointment-timeline-1-Za2miy.js.map} +1 -1
  9. package/dist/_chunks/{ar-pLopgMbL.js → ar-C4YQVTH6.js} +2 -2
  10. package/dist/_chunks/{ar-pLopgMbL.js.map → ar-C4YQVTH6.js.map} +1 -1
  11. package/dist/_chunks/{auth-form-parts-DHv6LVV2.js → auth-form-parts-B3GWChvG.js} +2 -2
  12. package/dist/_chunks/{auth-form-parts-DHv6LVV2.js.map → auth-form-parts-B3GWChvG.js.map} +1 -1
  13. package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js → balance-badge-cell-B49xgL6H.js} +2 -2
  14. package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js.map → balance-badge-cell-B49xgL6H.js.map} +1 -1
  15. package/dist/_chunks/{booking-4BCeh7OY.js → booking-sq9sa29d.js} +8 -8
  16. package/dist/_chunks/{booking-4BCeh7OY.js.map → booking-sq9sa29d.js.map} +1 -1
  17. package/dist/_chunks/brand-mark-DLk9kD8g.js +63 -0
  18. package/dist/_chunks/brand-mark-DLk9kD8g.js.map +1 -0
  19. package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js → calendar-appointment-editor-dialog-CctI6mpd.js} +8 -8
  20. package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js.map → calendar-appointment-editor-dialog-CctI6mpd.js.map} +1 -1
  21. package/dist/_chunks/{cycle-calculator-Ycp3li61.js → cycle-calculator-HO3s5InI.js} +5 -5
  22. package/dist/_chunks/{cycle-calculator-Ycp3li61.js.map → cycle-calculator-HO3s5InI.js.map} +1 -1
  23. package/dist/_chunks/{date-picker-KcoNNsM0.js → date-picker-CdhXlgVI.js} +4 -4
  24. package/dist/_chunks/{date-picker-KcoNNsM0.js.map → date-picker-CdhXlgVI.js.map} +1 -1
  25. package/dist/_chunks/{date-picker-variants-DN37Oj5-.js → date-picker-variants-Dt6UbonG.js} +25 -25
  26. package/dist/_chunks/{date-picker-variants-DN37Oj5-.js.map → date-picker-variants-Dt6UbonG.js.map} +1 -1
  27. package/dist/_chunks/{date-range-picker-CjcjUJLW.js → date-range-picker-B_j4VQlV.js} +5 -5
  28. package/dist/_chunks/{date-range-picker-CjcjUJLW.js.map → date-range-picker-B_j4VQlV.js.map} +1 -1
  29. package/dist/_chunks/{date-time-picker-BVQNZ4yC.js → date-time-picker-n-yrlMJq.js} +3 -3
  30. package/dist/_chunks/{date-time-picker-BVQNZ4yC.js.map → date-time-picker-n-yrlMJq.js.map} +1 -1
  31. package/dist/_chunks/{de-lVkJRPnh.js → de-B1B3PIgY.js} +2 -2
  32. package/dist/_chunks/{de-lVkJRPnh.js.map → de-B1B3PIgY.js.map} +1 -1
  33. package/dist/_chunks/{due-date-calculator-B0gyOijA.js → due-date-calculator-CDWTSblh.js} +6 -6
  34. package/dist/_chunks/{due-date-calculator-B0gyOijA.js.map → due-date-calculator-CDWTSblh.js.map} +1 -1
  35. package/dist/_chunks/{el-CHzxNWPj.js → el-iLqGpapg.js} +16 -16
  36. package/dist/_chunks/{el-CHzxNWPj.js.map → el-iLqGpapg.js.map} +1 -1
  37. package/dist/_chunks/{en-GB-CwxYmmhU.js → en-GB-CxPRQbD6.js} +6 -6
  38. package/dist/_chunks/{en-GB-CwxYmmhU.js.map → en-GB-CxPRQbD6.js.map} +1 -1
  39. package/dist/_chunks/{es-Ck-oxbHW.js → es-Bg1oqwDs.js} +2 -2
  40. package/dist/_chunks/{es-Ck-oxbHW.js.map → es-Bg1oqwDs.js.map} +1 -1
  41. package/dist/_chunks/{forgot-password-form-D6kB72OD.js → forgot-password-form-BSOZVrZG.js} +3 -3
  42. package/dist/_chunks/{forgot-password-form-D6kB72OD.js.map → forgot-password-form-BSOZVrZG.js.map} +1 -1
  43. package/dist/_chunks/{format-D-1gTdHF.js → format--x5jypvH.js} +13 -13
  44. package/dist/_chunks/{format-D-1gTdHF.js.map → format--x5jypvH.js.map} +1 -1
  45. package/dist/_chunks/{fr-fWRnDcSD.js → fr-DpGxyOGI.js} +2 -2
  46. package/dist/_chunks/{fr-fWRnDcSD.js.map → fr-DpGxyOGI.js.map} +1 -1
  47. package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js → gestational-age-calculator-CTHeJJdb.js} +7 -7
  48. package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js.map → gestational-age-calculator-CTHeJJdb.js.map} +1 -1
  49. package/dist/_chunks/{hcg-doubling-BnopYgd-.js → hcg-doubling-BBk-a33g.js} +11 -11
  50. package/dist/_chunks/{hcg-doubling-BnopYgd-.js.map → hcg-doubling-BBk-a33g.js.map} +1 -1
  51. package/dist/_chunks/{hi-B5uX0h3V.js → hi-3Dtsksrw.js} +2 -2
  52. package/dist/_chunks/{hi-B5uX0h3V.js.map → hi-3Dtsksrw.js.map} +1 -1
  53. package/dist/_chunks/{isSameWeek-u81Z-J7h.js → isSameWeek-DyVftHWi.js} +2 -2
  54. package/dist/_chunks/{isSameWeek-u81Z-J7h.js.map → isSameWeek-DyVftHWi.js.map} +1 -1
  55. package/dist/_chunks/{it-DBoNIelY.js → it-Cp0CA13d.js} +3 -3
  56. package/dist/_chunks/{it-DBoNIelY.js.map → it-Cp0CA13d.js.map} +1 -1
  57. package/dist/_chunks/{ja-Du8gfg8p.js → ja-9FOyR1lb.js} +22 -22
  58. package/dist/_chunks/{ja-Du8gfg8p.js.map → ja-9FOyR1lb.js.map} +1 -1
  59. package/dist/_chunks/{kit-extensions-DgBi3tsK.js → kit-extensions-sNTZWkoo.js} +4 -4
  60. package/dist/_chunks/{kit-extensions-DgBi3tsK.js.map → kit-extensions-sNTZWkoo.js.map} +1 -1
  61. package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js → link-cell-renderer-B0riA_h_.js} +2 -2
  62. package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js.map → link-cell-renderer-B0riA_h_.js.map} +1 -1
  63. package/dist/_chunks/{login-dev-card-pnJbVaoQ.js → login-dev-card-DRxTPkE9.js} +3 -3
  64. package/dist/_chunks/{login-dev-card-pnJbVaoQ.js.map → login-dev-card-DRxTPkE9.js.map} +1 -1
  65. package/dist/_chunks/{nl-BCBwxYi8.js → nl-sfx-zJgR.js} +2 -2
  66. package/dist/_chunks/{nl-BCBwxYi8.js.map → nl-sfx-zJgR.js.map} +1 -1
  67. package/dist/_chunks/{notes-panel-C_QshXyI.js → notes-panel-CxjMovCh.js} +2 -2
  68. package/dist/_chunks/{notes-panel-C_QshXyI.js.map → notes-panel-CxjMovCh.js.map} +1 -1
  69. package/dist/_chunks/{parse-UB4FJGNA.js → parse-B0s7bY4d.js} +3 -3
  70. package/dist/_chunks/{parse-UB4FJGNA.js.map → parse-B0s7bY4d.js.map} +1 -1
  71. package/dist/_chunks/{parseISO-y3LncvfO.js → parseISO-DZZ5a-zK.js} +2 -2
  72. package/dist/_chunks/{parseISO-y3LncvfO.js.map → parseISO-DZZ5a-zK.js.map} +1 -1
  73. package/dist/_chunks/{patient-details-Cd_dCqkg.js → patient-details-Dgd_tocD.js} +2 -2
  74. package/dist/_chunks/{patient-details-Cd_dCqkg.js.map → patient-details-Dgd_tocD.js.map} +1 -1
  75. package/dist/_chunks/{patient-field-row-D6Ftm46u.js → patient-field-row-BFVlJnS9.js} +3 -3
  76. package/dist/_chunks/{patient-field-row-D6Ftm46u.js.map → patient-field-row-BFVlJnS9.js.map} +1 -1
  77. package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js → patient-summary-card-BTKvFUmh.js} +2 -2
  78. package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js.map → patient-summary-card-BTKvFUmh.js.map} +1 -1
  79. package/dist/_chunks/{phone-input-O9camxkq.js → phone-input-EwVuqFik.js} +74 -74
  80. package/dist/_chunks/phone-input-EwVuqFik.js.map +1 -0
  81. package/dist/_chunks/{pl-HwLM6gPs.js → pl-BLh7KO-s.js} +3 -3
  82. package/dist/_chunks/{pl-HwLM6gPs.js.map → pl-BLh7KO-s.js.map} +1 -1
  83. package/dist/_chunks/{pregnancy-dating-CvNFirHt.js → pregnancy-dating-JBAUbM40.js} +7 -7
  84. package/dist/_chunks/{pregnancy-dating-CvNFirHt.js.map → pregnancy-dating-JBAUbM40.js.map} +1 -1
  85. package/dist/_chunks/{pt-BxhT5ZQH.js → pt-CPKOrOLj.js} +2 -2
  86. package/dist/_chunks/{pt-BxhT5ZQH.js.map → pt-CPKOrOLj.js.map} +1 -1
  87. package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js → radiograph-panel.agent-DQh2SX8G.js} +3 -3
  88. package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js.map → radiograph-panel.agent-DQh2SX8G.js.map} +1 -1
  89. package/dist/_chunks/registration-form-B6qqeXP1.js +1310 -0
  90. package/dist/_chunks/registration-form-B6qqeXP1.js.map +1 -0
  91. package/dist/_chunks/{rich-text-editor-BXFgcvBW.js → rich-text-editor-BZTyxQBd.js} +1683 -1673
  92. package/dist/_chunks/rich-text-editor-BZTyxQBd.js.map +1 -0
  93. package/dist/_chunks/{ro-Do9W55ae.js → ro-Dc-oNqbF.js} +2 -2
  94. package/dist/_chunks/{ro-Do9W55ae.js.map → ro-Dc-oNqbF.js.map} +1 -1
  95. package/dist/_chunks/{ru-PDBX5gdf.js → ru-BtNpDZRR.js} +3 -3
  96. package/dist/_chunks/{ru-PDBX5gdf.js.map → ru-BtNpDZRR.js.map} +1 -1
  97. package/dist/_chunks/send-registration-link-form-pO2bGjGa.js +409 -0
  98. package/dist/_chunks/send-registration-link-form-pO2bGjGa.js.map +1 -0
  99. package/dist/_chunks/{slot-grid-uA9j7Nik.js → slot-grid-Bb13H9Rl.js} +3 -3
  100. package/dist/_chunks/{slot-grid-uA9j7Nik.js.map → slot-grid-Bb13H9Rl.js.map} +1 -1
  101. package/dist/_chunks/{sq-DnvsgyIh.js → sq-D4c7olaV.js} +2 -2
  102. package/dist/_chunks/{sq-DnvsgyIh.js.map → sq-D4c7olaV.js.map} +1 -1
  103. package/dist/_chunks/subDays-DKISP2nE.js +8 -0
  104. package/dist/_chunks/{subDays-xH7cpN6B.js.map → subDays-DKISP2nE.js.map} +1 -1
  105. package/dist/_chunks/{sv-CpFSK8xS.js → sv-Bf_dHPvh.js} +2 -2
  106. package/dist/_chunks/{sv-CpFSK8xS.js.map → sv-Bf_dHPvh.js.map} +1 -1
  107. package/dist/_chunks/{task-editor-BTeUFGUX.js → task-editor-CRhfwP9T.js} +2 -2
  108. package/dist/_chunks/{task-editor-BTeUFGUX.js.map → task-editor-CRhfwP9T.js.map} +1 -1
  109. package/dist/_chunks/{tr-DW4oQYHT.js → tr-xqQ6cbGY.js} +2 -2
  110. package/dist/_chunks/{tr-DW4oQYHT.js.map → tr-xqQ6cbGY.js.map} +1 -1
  111. package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js → use-appointment-details-read-BFslxbRr.js} +2 -2
  112. package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js.map → use-appointment-details-read-BFslxbRr.js.map} +1 -1
  113. package/dist/_chunks/use-field-match-C8ug3sdQ.js +30 -0
  114. package/dist/_chunks/use-field-match-C8ug3sdQ.js.map +1 -0
  115. package/dist/_chunks/use-registration-submit-CLGHxwoT.js +112 -0
  116. package/dist/_chunks/use-registration-submit-CLGHxwoT.js.map +1 -0
  117. package/dist/_chunks/{zh-CN-QGEs29fQ.js → zh-CN-C657DBCO.js} +3 -3
  118. package/dist/_chunks/{zh-CN-QGEs29fQ.js.map → zh-CN-C657DBCO.js.map} +1 -1
  119. package/dist/agent-catalog.json +87 -3
  120. package/dist/agent-i18n/en.json +9 -2
  121. package/dist/alia-asteroid-icon/index.js +52 -0
  122. package/dist/alia-asteroid-icon/index.js.map +1 -0
  123. package/dist/aws-transcribe/index.js +320 -0
  124. package/dist/aws-transcribe/index.js.map +1 -0
  125. package/dist/components/appointment-details-panel/index.js +1 -1
  126. package/dist/components/appointment-timeline/index.js +1 -1
  127. package/dist/components/booking/index.js +1 -1
  128. package/dist/components/cycle-calculator/index.js +1 -1
  129. package/dist/components/data-table/index.js +1 -1
  130. package/dist/components/date-picker/index.js +1 -1
  131. package/dist/components/date-range-picker/index.js +1 -1
  132. package/dist/components/date-time-picker/index.js +1 -1
  133. package/dist/components/due-date-calculator/index.js +2 -2
  134. package/dist/components/gestational-age-calculator/index.js +1 -1
  135. package/dist/components/hcg-doubling/index.js +1 -1
  136. package/dist/components/index.d.ts +1 -0
  137. package/dist/components/index.d.ts.map +1 -1
  138. package/dist/components/notes-panel/index.js +1 -1
  139. package/dist/components/patient-details/index.js +1 -1
  140. package/dist/components/patient-summary-card/index.js +1 -1
  141. package/dist/components/patient-table/index.js +1 -1
  142. package/dist/components/phone-input/index.js +1 -1
  143. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  144. package/dist/components/pregnancy-dating/index.js +1 -1
  145. package/dist/components/radiograph-panel/index.js +1 -1
  146. package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -1
  147. package/dist/components/rich-text-editor/index.js +2 -2
  148. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
  149. package/dist/components/slot-grid/index.js +1 -1
  150. package/dist/components/task-editor/index.js +1 -1
  151. package/dist/hooks/index.js +1 -1
  152. package/dist/hooks/use-field-match.d.ts +2 -2
  153. package/dist/hooks/use-field-match.d.ts.map +1 -1
  154. package/dist/i18n/locales/ar.d.ts +36 -0
  155. package/dist/i18n/locales/ar.d.ts.map +1 -1
  156. package/dist/i18n/locales/ar.js +38 -2
  157. package/dist/i18n/locales/ar.js.map +1 -1
  158. package/dist/i18n/locales/de.d.ts +36 -0
  159. package/dist/i18n/locales/de.d.ts.map +1 -1
  160. package/dist/i18n/locales/de.js +38 -2
  161. package/dist/i18n/locales/de.js.map +1 -1
  162. package/dist/i18n/locales/el.d.ts +36 -0
  163. package/dist/i18n/locales/el.d.ts.map +1 -1
  164. package/dist/i18n/locales/el.js +38 -2
  165. package/dist/i18n/locales/el.js.map +1 -1
  166. package/dist/i18n/locales/en.d.ts +36 -0
  167. package/dist/i18n/locales/en.d.ts.map +1 -1
  168. package/dist/i18n/locales/en.js +38 -2
  169. package/dist/i18n/locales/en.js.map +1 -1
  170. package/dist/i18n/locales/es.d.ts +36 -0
  171. package/dist/i18n/locales/es.d.ts.map +1 -1
  172. package/dist/i18n/locales/es.js +38 -2
  173. package/dist/i18n/locales/es.js.map +1 -1
  174. package/dist/i18n/locales/fr.d.ts +36 -0
  175. package/dist/i18n/locales/fr.d.ts.map +1 -1
  176. package/dist/i18n/locales/fr.js +38 -2
  177. package/dist/i18n/locales/fr.js.map +1 -1
  178. package/dist/i18n/locales/hi.d.ts +36 -0
  179. package/dist/i18n/locales/hi.d.ts.map +1 -1
  180. package/dist/i18n/locales/hi.js +38 -2
  181. package/dist/i18n/locales/hi.js.map +1 -1
  182. package/dist/i18n/locales/it.d.ts +36 -0
  183. package/dist/i18n/locales/it.d.ts.map +1 -1
  184. package/dist/i18n/locales/it.js +38 -2
  185. package/dist/i18n/locales/it.js.map +1 -1
  186. package/dist/i18n/locales/ja.d.ts +36 -0
  187. package/dist/i18n/locales/ja.d.ts.map +1 -1
  188. package/dist/i18n/locales/ja.js +38 -2
  189. package/dist/i18n/locales/ja.js.map +1 -1
  190. package/dist/i18n/locales/nl.d.ts +36 -0
  191. package/dist/i18n/locales/nl.d.ts.map +1 -1
  192. package/dist/i18n/locales/nl.js +38 -2
  193. package/dist/i18n/locales/nl.js.map +1 -1
  194. package/dist/i18n/locales/pl.d.ts +36 -0
  195. package/dist/i18n/locales/pl.d.ts.map +1 -1
  196. package/dist/i18n/locales/pl.js +38 -2
  197. package/dist/i18n/locales/pl.js.map +1 -1
  198. package/dist/i18n/locales/pt.d.ts +36 -0
  199. package/dist/i18n/locales/pt.d.ts.map +1 -1
  200. package/dist/i18n/locales/pt.js +38 -2
  201. package/dist/i18n/locales/pt.js.map +1 -1
  202. package/dist/i18n/locales/ro.d.ts +36 -0
  203. package/dist/i18n/locales/ro.d.ts.map +1 -1
  204. package/dist/i18n/locales/ro.js +38 -2
  205. package/dist/i18n/locales/ro.js.map +1 -1
  206. package/dist/i18n/locales/ru.d.ts +36 -0
  207. package/dist/i18n/locales/ru.d.ts.map +1 -1
  208. package/dist/i18n/locales/ru.js +38 -2
  209. package/dist/i18n/locales/ru.js.map +1 -1
  210. package/dist/i18n/locales/sq.d.ts +36 -0
  211. package/dist/i18n/locales/sq.d.ts.map +1 -1
  212. package/dist/i18n/locales/sq.js +38 -2
  213. package/dist/i18n/locales/sq.js.map +1 -1
  214. package/dist/i18n/locales/sv.d.ts +36 -0
  215. package/dist/i18n/locales/sv.d.ts.map +1 -1
  216. package/dist/i18n/locales/sv.js +38 -2
  217. package/dist/i18n/locales/sv.js.map +1 -1
  218. package/dist/i18n/locales/tr.d.ts +36 -0
  219. package/dist/i18n/locales/tr.d.ts.map +1 -1
  220. package/dist/i18n/locales/tr.js +38 -2
  221. package/dist/i18n/locales/tr.js.map +1 -1
  222. package/dist/i18n/locales/zh.d.ts +36 -0
  223. package/dist/i18n/locales/zh.d.ts.map +1 -1
  224. package/dist/i18n/locales/zh.js +38 -2
  225. package/dist/i18n/locales/zh.js.map +1 -1
  226. package/dist/index.js +296 -292
  227. package/dist/index.js.map +1 -1
  228. package/dist/locales/ar.json +38 -2
  229. package/dist/locales/de.json +38 -2
  230. package/dist/locales/el.json +38 -2
  231. package/dist/locales/en.json +38 -2
  232. package/dist/locales/es.json +38 -2
  233. package/dist/locales/fr.json +38 -2
  234. package/dist/locales/hi.json +38 -2
  235. package/dist/locales/it.json +38 -2
  236. package/dist/locales/ja.json +38 -2
  237. package/dist/locales/nl.json +38 -2
  238. package/dist/locales/pl.json +38 -2
  239. package/dist/locales/pt.json +38 -2
  240. package/dist/locales/ro.json +38 -2
  241. package/dist/locales/ru.json +38 -2
  242. package/dist/locales/sq.json +38 -2
  243. package/dist/locales/sv.json +38 -2
  244. package/dist/locales/tr.json +38 -2
  245. package/dist/locales/zh.json +38 -2
  246. package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
  247. package/dist/patterns/alia-assistant/alia-types.d.ts +22 -0
  248. package/dist/patterns/alia-assistant/alia-types.d.ts.map +1 -1
  249. package/dist/patterns/alia-assistant/index.js +7 -6
  250. package/dist/patterns/alia-assistant/index.js.map +1 -1
  251. package/dist/patterns/anamnesis/index.js +1 -1
  252. package/dist/patterns/calendar/index.js +1 -1
  253. package/dist/patterns/forgot-password-form/index.js +1 -1
  254. package/dist/patterns/login-form/index.js +1 -1
  255. package/dist/patterns/registration-form/index.d.ts +1 -0
  256. package/dist/patterns/registration-form/index.d.ts.map +1 -1
  257. package/dist/patterns/registration-form/index.js +1 -1
  258. package/dist/patterns/registration-form/registration-form.d.ts +43 -0
  259. package/dist/patterns/registration-form/registration-form.d.ts.map +1 -1
  260. package/dist/patterns/registration-form/registration-verification.d.ts +38 -0
  261. package/dist/patterns/registration-form/registration-verification.d.ts.map +1 -0
  262. package/dist/patterns/registration-form/use-contact-verification.d.ts +107 -0
  263. package/dist/patterns/registration-form/use-contact-verification.d.ts.map +1 -0
  264. package/dist/patterns/registration-form/verification-requests.d.ts +9 -0
  265. package/dist/patterns/registration-form/verification-requests.d.ts.map +1 -0
  266. package/dist/patterns/send-registration-link-form/index.d.ts +3 -0
  267. package/dist/patterns/send-registration-link-form/index.d.ts.map +1 -0
  268. package/dist/patterns/send-registration-link-form/index.js +6 -0
  269. package/dist/patterns/send-registration-link-form/index.js.map +1 -0
  270. package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts +80 -0
  271. package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts.map +1 -0
  272. package/dist/speech/aws-transcribe.d.ts +65 -0
  273. package/dist/speech/aws-transcribe.d.ts.map +1 -0
  274. package/dist/speech/event-stream.d.ts +13 -0
  275. package/dist/speech/event-stream.d.ts.map +1 -0
  276. package/dist/tokens.css +1 -1
  277. package/package.json +13 -1
  278. package/dist/_chunks/alia-sidebar-DZoyUFW8.js +0 -1290
  279. package/dist/_chunks/alia-sidebar-DZoyUFW8.js.map +0 -1
  280. package/dist/_chunks/phone-input-O9camxkq.js.map +0 -1
  281. package/dist/_chunks/registration-form-BGSVMAga.js +0 -819
  282. package/dist/_chunks/registration-form-BGSVMAga.js.map +0 -1
  283. package/dist/_chunks/rich-text-editor-BXFgcvBW.js.map +0 -1
  284. package/dist/_chunks/subDays-xH7cpN6B.js +0 -8
  285. package/dist/_chunks/use-field-match-pdbEnKvO.js +0 -28
  286. package/dist/_chunks/use-field-match-pdbEnKvO.js.map +0 -1
  287. package/dist/_chunks/use-registration-submit-eWAECgUC.js +0 -171
  288. package/dist/_chunks/use-registration-submit-eWAECgUC.js.map +0 -1
@@ -0,0 +1,409 @@
1
+ import { jsx as n, jsxs as D } from "react/jsx-runtime";
2
+ import { forwardRef as Ke, useId as G, useState as f, useRef as I, useEffect as We } from "react";
3
+ import { useTranslation as Je } from "react-i18next";
4
+ import { c as Qe } from "./index-D2ZczOXr.js";
5
+ import { parsePhoneNumberFromString as Xe } from "libphonenumber-js/min";
6
+ import { i as Ye, E as pe } from "./email-input-C7THAwh2.js";
7
+ import { A as h } from "./alert-9kEwDza3.js";
8
+ import { B as he } from "./button-DohK_Ak_.js";
9
+ import { C as B } from "./card-BA4Ig_kn.js";
10
+ import { D as Ze } from "./date-picker-CdhXlgVI.js";
11
+ import { E as Ve } from "./error-summary-mGxIyDAY.js";
12
+ import { F } from "./form-field-Ani72sVY.js";
13
+ import { P as ue } from "./phone-input-EwVuqFik.js";
14
+ import { a as en, i as nn } from "./safe-href-5dbsfbQn.js";
15
+ import { u as ge } from "./use-state-backed-input-DhRQo6gM.js";
16
+ import { u as Ce } from "./use-field-match-C8ug3sdQ.js";
17
+ import { u as on, b as rn, a as tn } from "./use-registration-submit-CLGHxwoT.js";
18
+ import { s as we, i as an, f as sn } from "./format--x5jypvH.js";
19
+ import { p as mn } from "./parseISO-DZZ5a-zK.js";
20
+ import { i as ln, a as dn } from "./date-picker-variants-Dt6UbonG.js";
21
+ const q = [
22
+ "email",
23
+ "emailConfirm",
24
+ "phone",
25
+ "phoneConfirm",
26
+ "allowLoginUntil"
27
+ ], ve = Qe(
28
+ "ds:w-full ds:[max-inline-size:36rem] ds:text-start ds:text-[var(--foreground)]"
29
+ ), ye = (a) => sn(a, "yyyy-MM-dd"), M = (a) => {
30
+ if (!a) return;
31
+ const p = mn(a);
32
+ return an(p) ? we(p) : void 0;
33
+ }, cn = (a) => {
34
+ var p;
35
+ return ((p = Xe(a)) == null ? void 0 : p.isPossible()) ?? !1;
36
+ }, Le = (a) => Object.values(a).some(Boolean), fn = Ke(
37
+ ({
38
+ title: a,
39
+ headingLevel: p = 2,
40
+ guidance: k,
41
+ minDate: Re,
42
+ maxDate: be,
43
+ initialValues: r,
44
+ errors: C,
45
+ blockPaste: m,
46
+ submitLabel: De,
47
+ submitting: Fe = !1,
48
+ sent: w,
49
+ sendAnotherHref: T,
50
+ fieldNames: l,
51
+ action: O,
52
+ hiddenFields: Ee,
53
+ onSubmit: A,
54
+ className: H,
55
+ ...K
56
+ }, W) => {
57
+ const { t: i, i18n: Se } = Je("ui"), J = G(), Ue = G(), v = (e) => `${Ue}-${e}`, Q = G(), d = l !== void 0, X = `h${p}`, [xe] = f(() => {
58
+ const e = we(/* @__PURE__ */ new Date());
59
+ return e.setDate(e.getDate() + 1), e;
60
+ }), N = M(Re) ?? xe, R = M(be), Ie = (e) => !ln(e, N) && !(R && dn(e, R)), [t, Be] = f(() => ({
61
+ email: (r == null ? void 0 : r.email) ?? "",
62
+ emailConfirm: (r == null ? void 0 : r.emailConfirm) ?? "",
63
+ phone: (r == null ? void 0 : r.phone) ?? "",
64
+ phoneConfirm: (r == null ? void 0 : r.phoneConfirm) ?? ""
65
+ })), [c, qe] = f(
66
+ () => M(r == null ? void 0 : r.allowLoginUntil)
67
+ ), [Me, ke] = f(
68
+ () => cn((r == null ? void 0 : r.phone) ?? "")
69
+ ), [Te, Oe] = f(() => ({ email: !!(r != null && r.email) })), [j, Y] = f(!1), [Z, V] = f(() => C ?? {}), ee = (e) => V(
70
+ (o) => o[e] ? { ...o, [e]: void 0 } : o
71
+ ), E = (e, o) => {
72
+ Be((g) => ({ ...g, [e]: o })), ee(e);
73
+ }, S = (e) => Oe(
74
+ (o) => o[e] ? o : { ...o, [e]: !0 }
75
+ ), $ = Ce({
76
+ value: t.email,
77
+ confirmValue: t.emailConfirm,
78
+ kind: "email",
79
+ submitted: j
80
+ }), P = Ce({
81
+ value: t.phone,
82
+ confirmValue: t.phoneConfirm,
83
+ kind: "phone",
84
+ submitted: j
85
+ }), ne = {
86
+ email: !Ye(t.email),
87
+ emailConfirm: t.emailConfirm === "" || !$.matches,
88
+ phone: t.phone === "" || !Me,
89
+ phoneConfirm: t.phoneConfirm === "" || !P.matches,
90
+ allowLoginUntil: !c || !Ie(c)
91
+ }, y = i("registrationForm.required"), _ = (e) => new Intl.DateTimeFormat(Se.language, { dateStyle: "medium" }).format(
92
+ e
93
+ ), L = {
94
+ email: i("registrationForm.email"),
95
+ emailConfirm: i("registrationForm.emailConfirm"),
96
+ phone: i("sendRegistrationLink.phone"),
97
+ phoneConfirm: i("sendRegistrationLink.phoneConfirm"),
98
+ allowLoginUntil: i("sendRegistrationLink.allowLoginUntil")
99
+ }, Ae = (e) => j || (e === "allowLoginUntil" ? c !== void 0 : Te[e] === !0), b = (e, o) => Ae(e) && ne[e] ? o : void 0, Ne = {
100
+ email: b(
101
+ "email",
102
+ t.email === "" ? y : i("inputs.email.invalid")
103
+ ),
104
+ emailConfirm: t.emailConfirm === "" ? b("emailConfirm", y) : $.error,
105
+ phone: b(
106
+ "phone",
107
+ t.phone === "" ? y : i("registrationForm.phoneInvalid")
108
+ ),
109
+ phoneConfirm: t.phoneConfirm === "" ? b("phoneConfirm", y) : P.error,
110
+ allowLoginUntil: b(
111
+ "allowLoginUntil",
112
+ c ? i("sendRegistrationLink.dateOutOfRange", {
113
+ min: _(N),
114
+ max: R ? _(R) : "…"
115
+ }) : y
116
+ )
117
+ }, u = (e) => Z[e] ?? Ne[e], oe = I(null), re = I(null), je = I(null), $e = I(null), te = ge(t.email, je), ie = ge(
118
+ t.emailConfirm,
119
+ $e
120
+ ), Pe = (e) => {
121
+ var o, g, fe;
122
+ if (e === "form") {
123
+ (o = re.current) == null || o.focus();
124
+ return;
125
+ }
126
+ (fe = (g = oe.current) == null ? void 0 : g.querySelector(`[data-field="${e}"] input`)) == null || fe.focus();
127
+ }, ae = (e) => q.find((o) => e[o]) ?? (Le(e) ? "form" : void 0), [se] = f(
128
+ () => q.some((e) => !!(C != null && C[e]))
129
+ ), s = on(
130
+ q,
131
+ u,
132
+ se
133
+ ), [z, me] = f(() => {
134
+ const e = se ? void 0 : ae(C ?? {});
135
+ return e ? { target: e } : null;
136
+ });
137
+ We(() => {
138
+ z && Pe(z.target);
139
+ }, [z]);
140
+ const U = rn({
141
+ errors: C,
142
+ submitting: Fe,
143
+ native: d,
144
+ captcha: !1,
145
+ firstProblem: () => q.find((e) => ne[e]),
146
+ onRefused: (e) => {
147
+ Y(!0), s.open(() => me({ target: e }));
148
+ },
149
+ deliver: () => A == null ? void 0 : A({
150
+ ...t,
151
+ allowLoginUntil: c ? ye(c) : ""
152
+ }),
153
+ onAnswer: (e) => {
154
+ const o = e;
155
+ V(o), Le(o) && (Y(!1), s.open(() => {
156
+ const g = ae(o);
157
+ g && me({ target: g });
158
+ }));
159
+ }
160
+ }), le = (e) => d ? l[e] : e, _e = d && O && en(O) ? O : void 0, x = Z.form, ze = tn(
161
+ x,
162
+ s.listed.length > 0
163
+ ), Ge = new Set(Object.values(l ?? {})), He = d ? Object.entries(Ee ?? {}).filter(
164
+ ([e]) => !Ge.has(e)
165
+ ) : [], de = T && nn(T) ? T : void 0, ce = M(w == null ? void 0 : w.allowLoginUntil);
166
+ return w ? /* @__PURE__ */ n(
167
+ "div",
168
+ {
169
+ ref: W,
170
+ ...K,
171
+ "data-component": "send-registration-link-form",
172
+ "data-state": "sent",
173
+ className: ve({ className: H }),
174
+ children: /* @__PURE__ */ n(B, { variant: "elevated", children: /* @__PURE__ */ D(B.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
175
+ /* @__PURE__ */ n(X, { className: "type-title-card", children: a ?? i("sendRegistrationLink.title") }),
176
+ /* @__PURE__ */ D(h, { variant: "success", "data-slot": "sent", children: [
177
+ /* @__PURE__ */ n(h.Title, { as: "p", children: i("sendRegistrationLink.sentTitle") }),
178
+ /* @__PURE__ */ n(h.Description, { children: i("sendRegistrationLink.sentEmail", { email: w.email }) }),
179
+ ce && /* @__PURE__ */ n(h.Description, { children: i("sendRegistrationLink.sentUntil", {
180
+ date: _(ce)
181
+ }) })
182
+ ] }),
183
+ de && /* @__PURE__ */ n(he, { asChild: !0, intent: "secondary", "data-action": "send-another", children: /* @__PURE__ */ n("a", { href: de, children: i("sendRegistrationLink.sendAnother") }) })
184
+ ] }) })
185
+ }
186
+ ) : /* @__PURE__ */ n(
187
+ "div",
188
+ {
189
+ ref: W,
190
+ ...K,
191
+ "data-component": "send-registration-link-form",
192
+ className: ve({ className: H }),
193
+ children: /* @__PURE__ */ n(B, { variant: "elevated", children: /* @__PURE__ */ D(B.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
194
+ /* @__PURE__ */ n(X, { id: J, className: "type-title-card", children: a ?? i("sendRegistrationLink.title") }),
195
+ k && /* @__PURE__ */ D(h, { variant: "warning", "data-slot": "guidance", children: [
196
+ /* @__PURE__ */ n(h.Title, { as: "p", children: k.title }),
197
+ /* @__PURE__ */ 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", children: k.points.map((e) => /* @__PURE__ */ n("li", { children: e }, e)) })
198
+ ] }),
199
+ /* @__PURE__ */ D(
200
+ "form",
201
+ {
202
+ ref: oe,
203
+ noValidate: !0,
204
+ method: "post",
205
+ action: _e,
206
+ "aria-labelledby": J,
207
+ "aria-busy": U.busy || void 0,
208
+ onSubmit: U.handleSubmit,
209
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
210
+ children: [
211
+ /* @__PURE__ */ n(
212
+ Ve,
213
+ {
214
+ ref: s.ref,
215
+ headingLevel: p + 1,
216
+ "aria-describedby": x ? Q : void 0,
217
+ errors: s.listed.map((e) => {
218
+ const o = u(e) ?? "";
219
+ return {
220
+ field: e,
221
+ message: o,
222
+ label: o === y ? L[e] : void 0,
223
+ targetId: v(e)
224
+ };
225
+ })
226
+ }
227
+ ),
228
+ x && /* @__PURE__ */ n(
229
+ h,
230
+ {
231
+ ref: re,
232
+ id: Q,
233
+ variant: "error",
234
+ announce: ze,
235
+ tabIndex: -1,
236
+ "data-field": "form",
237
+ children: /* @__PURE__ */ n(h.Description, { children: x })
238
+ }
239
+ ),
240
+ /* @__PURE__ */ n(
241
+ F,
242
+ {
243
+ id: v("email"),
244
+ label: L.email,
245
+ required: !0,
246
+ error: u("email"),
247
+ announceError: !s.lists("email"),
248
+ "data-field": "email",
249
+ children: /* @__PURE__ */ n(
250
+ pe,
251
+ {
252
+ ref: te.ref,
253
+ name: le("email"),
254
+ errorMessage: null,
255
+ onChange: te.quiet(
256
+ (e) => E("email", e.target.value)
257
+ ),
258
+ onBlur: () => S("email"),
259
+ blockPaste: (m == null ? void 0 : m.includes("email")) ?? !1
260
+ }
261
+ )
262
+ }
263
+ ),
264
+ /* @__PURE__ */ n(
265
+ F,
266
+ {
267
+ id: v("emailConfirm"),
268
+ label: L.emailConfirm,
269
+ required: !0,
270
+ error: u("emailConfirm"),
271
+ announceError: !s.lists("emailConfirm"),
272
+ "data-field": "emailConfirm",
273
+ children: /* @__PURE__ */ n(
274
+ pe,
275
+ {
276
+ ref: ie.ref,
277
+ name: le("emailConfirm"),
278
+ disableBuiltInValidation: !0,
279
+ onChange: ie.quiet(
280
+ (e) => E("emailConfirm", e.target.value)
281
+ ),
282
+ onBlur: () => {
283
+ S("emailConfirm"), $.confirmProps.onBlur();
284
+ },
285
+ blockPaste: (m == null ? void 0 : m.includes("emailConfirm")) ?? !1
286
+ }
287
+ )
288
+ }
289
+ ),
290
+ /* @__PURE__ */ n(
291
+ F,
292
+ {
293
+ id: v("phone"),
294
+ label: L.phone,
295
+ required: !0,
296
+ description: i("sendRegistrationLink.phoneDescription"),
297
+ error: u("phone"),
298
+ announceError: !s.lists("phone"),
299
+ "data-field": "phone",
300
+ onBlur: () => S("phone"),
301
+ children: /* @__PURE__ */ n(
302
+ ue,
303
+ {
304
+ name: d ? void 0 : "phone",
305
+ value: t.phone,
306
+ onChange: (e, o) => {
307
+ E("phone", e), ke(o.isPossible);
308
+ }
309
+ }
310
+ )
311
+ }
312
+ ),
313
+ /* @__PURE__ */ n(
314
+ F,
315
+ {
316
+ id: v("phoneConfirm"),
317
+ label: L.phoneConfirm,
318
+ required: !0,
319
+ error: u("phoneConfirm"),
320
+ announceError: !s.lists("phoneConfirm"),
321
+ "data-field": "phoneConfirm",
322
+ onBlur: () => {
323
+ S("phoneConfirm"), P.confirmProps.onBlur();
324
+ },
325
+ onPasteCapture: m != null && m.includes("phoneConfirm") ? (e) => e.preventDefault() : void 0,
326
+ children: /* @__PURE__ */ n(
327
+ ue,
328
+ {
329
+ name: d ? void 0 : "phoneConfirm",
330
+ value: t.phoneConfirm,
331
+ onChange: (e) => E("phoneConfirm", e)
332
+ }
333
+ )
334
+ }
335
+ ),
336
+ /* @__PURE__ */ n(
337
+ F,
338
+ {
339
+ id: v("allowLoginUntil"),
340
+ label: L.allowLoginUntil,
341
+ required: !0,
342
+ error: u("allowLoginUntil"),
343
+ announceError: !s.lists("allowLoginUntil"),
344
+ "data-field": "allowLoginUntil",
345
+ children: /* @__PURE__ */ n(
346
+ Ze,
347
+ {
348
+ value: c,
349
+ minDate: N,
350
+ maxDate: R,
351
+ onChange: (e) => {
352
+ qe(e), ee("allowLoginUntil");
353
+ }
354
+ }
355
+ )
356
+ }
357
+ ),
358
+ d && l.phone && /* @__PURE__ */ n(
359
+ "input",
360
+ {
361
+ type: "hidden",
362
+ name: l.phone,
363
+ value: t.phone
364
+ }
365
+ ),
366
+ d && l.phoneConfirm && /* @__PURE__ */ n(
367
+ "input",
368
+ {
369
+ type: "hidden",
370
+ name: l.phoneConfirm,
371
+ value: t.phoneConfirm
372
+ }
373
+ ),
374
+ d && l.allowLoginUntil && /* @__PURE__ */ n(
375
+ "input",
376
+ {
377
+ type: "hidden",
378
+ name: l.allowLoginUntil,
379
+ value: c ? ye(c) : ""
380
+ }
381
+ ),
382
+ He.map(([e, o]) => /* @__PURE__ */ n("input", { type: "hidden", name: e, value: o }, e)),
383
+ /* @__PURE__ */ n(
384
+ he,
385
+ {
386
+ type: "submit",
387
+ intent: "primary",
388
+ size: "lg",
389
+ loading: U.busy,
390
+ className: "ds:w-full",
391
+ "data-action": "submit",
392
+ children: De ?? i("sendRegistrationLink.submit")
393
+ }
394
+ ),
395
+ /* @__PURE__ */ n("p", { role: "status", className: "ds:sr-only", children: U.busy ? i("chat.message.status.sending") : "" })
396
+ ]
397
+ }
398
+ )
399
+ ] }) })
400
+ }
401
+ );
402
+ }
403
+ );
404
+ fn.displayName = "SendRegistrationLinkForm";
405
+ export {
406
+ q as S,
407
+ fn as a
408
+ };
409
+ //# sourceMappingURL=send-registration-link-form-pO2bGjGa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-registration-link-form-pO2bGjGa.js","sources":["../../src/patterns/send-registration-link-form/send-registration-link-form.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* SendRegistrationLinkForm: the form sales use in the admin area to */\n/* send a doctor a registration link. */\n/* */\n/* Email, confirm email, mobile phone, confirm phone and the last day the link allows */\n/* login. Every prop is data, so a server-rendered page can mount it */\n/* from JSON. The browser posts a real form to the host's own field */\n/* names; the card checks what a browser can check first. The host */\n/* keeps every server rule. The link itself is never shown. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type HTMLAttributes,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\nimport {\n format,\n isAfter,\n isBefore,\n isValid,\n parseISO,\n startOfDay,\n} from 'date-fns';\nimport { parsePhoneNumberFromString } from 'libphonenumber-js/min';\nimport isEmail from 'validator/lib/isEmail';\nimport { Alert } from '../../components/alert';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { DatePicker } from '../../components/date-picker';\nimport { EmailInput } from '../../components/email-input';\nimport { ErrorSummary } from '../../components/error-summary';\nimport { FormField } from '../../components/form-field';\nimport { PhoneInput } from '../../components/phone-input';\nimport { isSafeHref, isSameSiteHref } from '../../components/_shared/safe-href';\nimport { useStateBackedInput } from '../../components/_shared/use-state-backed-input';\nimport { useFieldMatch } from '../../hooks/use-field-match';\nimport {\n useErrorSummary,\n useFormMessageAnnounce,\n} from '../_shared/use-error-summary';\nimport { useRegistrationSubmit } from '../registration-form/use-registration-submit';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** The fields of the form, in the order they appear. */\nexport const SEND_REGISTRATION_LINK_FIELDS = [\n 'email',\n 'emailConfirm',\n 'phone',\n 'phoneConfirm',\n 'allowLoginUntil',\n] as const;\n\nexport type SendRegistrationLinkField =\n (typeof SEND_REGISTRATION_LINK_FIELDS)[number];\n\n/** What `onSubmit` receives once every check has passed. */\nexport interface SendRegistrationLinkValues {\n email: string;\n /** As typed. It matches `email` apart from case and outer spaces. */\n emailConfirm: string;\n /** In E.164 form, e.g. `+393331234567`. */\n phone: string;\n /** In E.164 form. Equal to `phone`. */\n phoneConfirm: string;\n /** `yyyy-MM-dd`. */\n allowLoginUntil: string;\n}\n\n/** Values to show when the form opens, e.g. after a refused post.\n * `allowLoginUntil` is `yyyy-MM-dd`. */\nexport type SendRegistrationLinkInitialValues =\n Partial<SendRegistrationLinkValues>;\n\n/** Messages from the server, already translated by the host: one per\n * field, plus `form` for a message about the whole form. */\nexport type SendRegistrationLinkErrors = Partial<\n Record<SendRegistrationLinkField | 'form', string>\n>;\n\n/** The host's own form field names, e.g. `send_registration_link[email]`. */\nexport type SendRegistrationLinkFieldNames = Partial<\n Record<SendRegistrationLinkField, string>\n>;\n\n/** Guidance for the person sending, in the host's own words. */\nexport interface SendRegistrationLinkGuidance {\n /** The notice's heading. Pass it translated. */\n title: string;\n /** One short point each. Pass them translated. Plain text. */\n points: readonly string[];\n}\n\n/** The result of a send, shown instead of the form. */\nexport interface SendRegistrationLinkSent {\n /** The address the email went to. */\n email: string;\n /** The last day the link allows login, `yyyy-MM-dd`. */\n allowLoginUntil: string;\n}\n\nexport interface SendRegistrationLinkFormProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'onSubmit'\n> {\n /** Replaces the heading \"Send a registration link\". Pass it translated. */\n title?: string;\n /** The heading's level. Default 2, for a page that has its own `h1`. */\n headingLevel?: 1 | 2 | 3;\n /** A warning-style notice above the form. The kit has no copy for it. */\n guidance?: SendRegistrationLinkGuidance;\n /** The first day that can be chosen, `yyyy-MM-dd`. Default: tomorrow. */\n minDate?: string;\n /** The last day that can be chosen, `yyyy-MM-dd`. Default: no limit.\n * Keep it equal to the server's. */\n maxDate?: string;\n /** Values to show when the form opens. Read once. */\n initialValues?: SendRegistrationLinkInitialValues;\n /** Messages from the server. Each shows on its field until the user\n * changes that field, and the form takes focus when they are present\n * at load. */\n errors?: SendRegistrationLinkErrors;\n /** Fields that refuse paste, so the user types them. Default: none.\n * Refusing a paste in `phoneConfirm` is silent: use it with care. */\n blockPaste?: readonly ('email' | 'emailConfirm' | 'phoneConfirm')[];\n /** Replaces the button's \"Send registration link\". Translated. */\n submitLabel?: string;\n /** True while a React host sends the values. */\n submitting?: boolean;\n /** Shows the result instead of the form. */\n sent?: SendRegistrationLinkSent;\n /** Where \"Send another link\" leads. Same-site path or full address. */\n sendAnotherHref?: string;\n /** For a native form post: the host's field names. When set, the\n * browser posts the form. */\n fieldNames?: SendRegistrationLinkFieldNames;\n /** Where the post goes. Default: the current address. Same site only. */\n action?: string;\n /** Extra hidden inputs for a native post, by name: the CSRF token. */\n hiddenFields?: Readonly<Record<string, string>>;\n /** For React hosts: called once every check has passed. Not called when\n * `fieldNames` is set. */\n onSubmit?: (values: SendRegistrationLinkValues) => void;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:w-full ds:[max-inline-size:36rem] ds:text-start ds:text-[var(--foreground)]',\n);\n\nconst isoDay = (date: Date): string => format(date, 'yyyy-MM-dd');\n\n/** A `yyyy-MM-dd` string as a local date, or nothing. */\nconst readDay = (value: string | undefined): Date | undefined => {\n if (!value) return undefined;\n const day = parseISO(value);\n return isValid(day) ? startOfDay(day) : undefined;\n};\n\nconst isPossiblePhone = (e164: string): boolean =>\n parsePhoneNumberFromString(e164)?.isPossible() ?? false;\n\nconst hasMessage = (errors: SendRegistrationLinkErrors): boolean =>\n Object.values(errors).some(Boolean);\n\n/* -------------------------------------------------------------------- */\n/* SendRegistrationLinkForm */\n/* -------------------------------------------------------------------- */\n\nexport const SendRegistrationLinkForm = forwardRef<\n HTMLDivElement,\n SendRegistrationLinkFormProps\n>(\n (\n {\n title,\n headingLevel = 2,\n guidance,\n minDate,\n maxDate,\n initialValues,\n errors,\n blockPaste,\n submitLabel,\n submitting = false,\n sent,\n sendAnotherHref,\n fieldNames,\n action,\n hiddenFields,\n onSubmit,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const titleId = useId();\n const fieldIdBase = useId();\n const fieldId = (field: SendRegistrationLinkField) =>\n `${fieldIdBase}-${field}`;\n const formMessageId = useId();\n const native = fieldNames !== undefined;\n const Heading = `h${headingLevel}` as const;\n\n // The allowed days, whole days in the visitor's time zone. The default\n // first day is tomorrow, worked out once.\n const [tomorrow] = useState(() => {\n const day = startOfDay(new Date());\n day.setDate(day.getDate() + 1);\n return day;\n });\n const first = readDay(minDate) ?? tomorrow;\n const last = readDay(maxDate);\n const inRange = (day: Date) =>\n !isBefore(day, first) && !(last && isAfter(day, last));\n\n /* ------------------------------ State ----------------------------- */\n\n const [values, setValues] = useState(() => ({\n email: initialValues?.email ?? '',\n emailConfirm: initialValues?.emailConfirm ?? '',\n phone: initialValues?.phone ?? '',\n phoneConfirm: initialValues?.phoneConfirm ?? '',\n }));\n const [day, setDay] = useState<Date | undefined>(() =>\n readDay(initialValues?.allowLoginUntil),\n );\n const [phonePossible, setPhonePossible] = useState(() =>\n isPossiblePhone(initialValues?.phone ?? ''),\n );\n const [touched, setTouched] = useState<\n Partial<Record<SendRegistrationLinkField, boolean>>\n >(() => ({ email: Boolean(initialValues?.email) }));\n const [submitted, setSubmitted] = useState(false);\n const [serverErrors, setServerErrors] =\n useState<SendRegistrationLinkErrors>(() => errors ?? {});\n\n const clearServer = (field: SendRegistrationLinkField) =>\n setServerErrors((previous) =>\n previous[field] ? { ...previous, [field]: undefined } : previous,\n );\n const set = (\n field: 'email' | 'emailConfirm' | 'phone' | 'phoneConfirm',\n value: string,\n ) => {\n setValues((previous) => ({ ...previous, [field]: value }));\n clearServer(field);\n };\n const leave = (field: SendRegistrationLinkField) =>\n setTouched((previous) =>\n previous[field] ? previous : { ...previous, [field]: true },\n );\n\n /* ---------------------------- Validation -------------------------- */\n\n // The same comparison the server makes: trimmed, ignoring case.\n const emailMatch = useFieldMatch({\n value: values.email,\n confirmValue: values.emailConfirm,\n kind: 'email',\n submitted,\n });\n\n // Both phones are E.164 values, the ones the form posts.\n const phoneMatch = useFieldMatch({\n value: values.phone,\n confirmValue: values.phoneConfirm,\n kind: 'phone',\n submitted,\n });\n\n const invalid: Record<SendRegistrationLinkField, boolean> = {\n email: !isEmail(values.email),\n emailConfirm: values.emailConfirm === '' || !emailMatch.matches,\n phone: values.phone === '' || !phonePossible,\n phoneConfirm: values.phoneConfirm === '' || !phoneMatch.matches,\n allowLoginUntil: !day || !inRange(day),\n };\n const required = t('registrationForm.required');\n const formatDay = (value: Date) =>\n new Intl.DateTimeFormat(i18n.language, { dateStyle: 'medium' }).format(\n value,\n );\n const labels: Record<SendRegistrationLinkField, string> = {\n email: t('registrationForm.email'),\n emailConfirm: t('registrationForm.emailConfirm'),\n phone: t('sendRegistrationLink.phone'),\n phoneConfirm: t('sendRegistrationLink.phoneConfirm'),\n allowLoginUntil: t('sendRegistrationLink.allowLoginUntil'),\n };\n // A message shows once the user has left the field or tried to submit.\n // A date waits for a submit, or a value out of range: leaving the\n // field to open the calendar is not a mistake.\n const due = (field: SendRegistrationLinkField) =>\n submitted ||\n (field === 'allowLoginUntil'\n ? day !== undefined\n : touched[field] === true);\n const whenDue = (field: SendRegistrationLinkField, message: string) =>\n due(field) && invalid[field] ? message : undefined;\n const ownErrors: Record<SendRegistrationLinkField, string | undefined> = {\n email: whenDue(\n 'email',\n values.email === '' ? required : t('inputs.email.invalid'),\n ),\n emailConfirm:\n values.emailConfirm === ''\n ? whenDue('emailConfirm', required)\n : emailMatch.error,\n phone: whenDue(\n 'phone',\n values.phone === '' ? required : t('registrationForm.phoneInvalid'),\n ),\n phoneConfirm:\n values.phoneConfirm === ''\n ? whenDue('phoneConfirm', required)\n : phoneMatch.error,\n allowLoginUntil: whenDue(\n 'allowLoginUntil',\n !day\n ? required\n : t('sendRegistrationLink.dateOutOfRange', {\n min: formatDay(first),\n max: last ? formatDay(last) : '…',\n }),\n ),\n };\n const errorFor = (field: SendRegistrationLinkField) =>\n serverErrors[field] ?? ownErrors[field];\n\n /* ------------------------------ Focus ----------------------------- */\n\n const form = useRef<HTMLFormElement>(null);\n const formMessage = useRef<HTMLDivElement>(null);\n const emailRef = useRef<HTMLInputElement | null>(null);\n const emailConfirmRef = useRef<HTMLInputElement | null>(null);\n // The addresses stay out of the inputs' `value` attributes.\n const emailField = useStateBackedInput(values.email, emailRef);\n const emailConfirmField = useStateBackedInput(\n values.emailConfirm,\n emailConfirmRef,\n );\n\n const focusField = (field: SendRegistrationLinkField | 'form') => {\n if (field === 'form') {\n formMessage.current?.focus();\n return;\n }\n form.current\n ?.querySelector<HTMLElement>(`[data-field=\"${field}\"] input`)\n ?.focus();\n };\n const focusTargetFor = (messages: SendRegistrationLinkErrors) =>\n SEND_REGISTRATION_LINK_FIELDS.find((field) => messages[field]) ??\n (hasMessage(messages) ? ('form' as const) : undefined);\n\n const [openedWithFieldMessage] = useState(() =>\n SEND_REGISTRATION_LINK_FIELDS.some((field) => Boolean(errors?.[field])),\n );\n const summary = useErrorSummary(\n SEND_REGISTRATION_LINK_FIELDS,\n errorFor,\n openedWithFieldMessage,\n );\n const [focusRequest, setFocusRequest] = useState<{\n target: SendRegistrationLinkField | 'form';\n } | null>(() => {\n const target = openedWithFieldMessage\n ? undefined\n : focusTargetFor(errors ?? {});\n return target ? { target } : null;\n });\n useEffect(() => {\n if (focusRequest) focusField(focusRequest.target);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [focusRequest]);\n\n /* ------------------------------ Submit ---------------------------- */\n\n const submit = useRegistrationSubmit<SendRegistrationLinkField>({\n errors,\n submitting,\n native,\n captcha: false,\n firstProblem: () =>\n SEND_REGISTRATION_LINK_FIELDS.find((field) => invalid[field]),\n onRefused: (field) => {\n setSubmitted(true);\n summary.open(() => setFocusRequest({ target: field }));\n },\n deliver: () =>\n onSubmit?.({\n ...values,\n allowLoginUntil: day ? isoDay(day) : '',\n }),\n onAnswer: (answer) => {\n const next: SendRegistrationLinkErrors = answer;\n setServerErrors(next);\n if (!hasMessage(next)) return;\n setSubmitted(false);\n summary.open(() => {\n const target = focusTargetFor(next);\n if (target) setFocusRequest({ target });\n });\n },\n });\n\n /* ------------------------------ Render ---------------------------- */\n\n const name = (field: SendRegistrationLinkField) =>\n native ? fieldNames[field] : field;\n const formAction =\n native && action && isSameSiteHref(action) ? action : undefined;\n const formError = serverErrors.form;\n const formMessageAnnounce = useFormMessageAnnounce(\n formError,\n summary.listed.length > 0,\n );\n const ownNames = new Set(Object.values(fieldNames ?? {}));\n const extraFields = native\n ? Object.entries(hiddenFields ?? {}).filter(\n ([extra]) => !ownNames.has(extra),\n )\n : [];\n const anotherLink =\n sendAnotherHref && isSafeHref(sendAnotherHref)\n ? sendAnotherHref\n : undefined;\n const sentDay = readDay(sent?.allowLoginUntil);\n\n if (sent) {\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"send-registration-link-form\"\n data-state=\"sent\"\n className={rootVariants({ className })}\n >\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <Heading className=\"type-title-card\">\n {title ?? t('sendRegistrationLink.title')}\n </Heading>\n <Alert variant=\"success\" data-slot=\"sent\">\n <Alert.Title as=\"p\">\n {t('sendRegistrationLink.sentTitle')}\n </Alert.Title>\n <Alert.Description>\n {t('sendRegistrationLink.sentEmail', { email: sent.email })}\n </Alert.Description>\n {sentDay && (\n <Alert.Description>\n {t('sendRegistrationLink.sentUntil', {\n date: formatDay(sentDay),\n })}\n </Alert.Description>\n )}\n </Alert>\n {anotherLink && (\n <Button asChild intent=\"secondary\" data-action=\"send-another\">\n <a href={anotherLink}>\n {t('sendRegistrationLink.sendAnother')}\n </a>\n </Button>\n )}\n </Card.Body>\n </Card>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"send-registration-link-form\"\n className={rootVariants({ className })}\n >\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <Heading id={titleId} className=\"type-title-card\">\n {title ?? t('sendRegistrationLink.title')}\n </Heading>\n\n {guidance && (\n <Alert variant=\"warning\" data-slot=\"guidance\">\n <Alert.Title as=\"p\">{guidance.title}</Alert.Title>\n <ul className=\"ds:mx-0 ds:mb-0 ds:mt-[var(--spacing-xs)] ds:ps-[var(--spacing-lg)] ds:list-disc type-body-sm\">\n {guidance.points.map((point) => (\n <li key={point}>{point}</li>\n ))}\n </ul>\n </Alert>\n )}\n\n <form\n ref={form}\n noValidate\n method=\"post\"\n action={formAction}\n aria-labelledby={titleId}\n aria-busy={submit.busy || undefined}\n onSubmit={submit.handleSubmit}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n <ErrorSummary\n ref={summary.ref}\n headingLevel={(headingLevel + 1) as 2 | 3 | 4}\n aria-describedby={formError ? formMessageId : undefined}\n errors={summary.listed.map((field) => {\n const message = errorFor(field) ?? '';\n return {\n field,\n message,\n label: message === required ? labels[field] : undefined,\n targetId: fieldId(field),\n };\n })}\n />\n\n {formError && (\n <Alert\n ref={formMessage}\n id={formMessageId}\n variant=\"error\"\n announce={formMessageAnnounce}\n tabIndex={-1}\n data-field=\"form\"\n >\n <Alert.Description>{formError}</Alert.Description>\n </Alert>\n )}\n\n <FormField\n id={fieldId('email')}\n label={labels.email}\n required\n error={errorFor('email')}\n announceError={!summary.lists('email')}\n data-field=\"email\"\n >\n <EmailInput\n ref={emailField.ref}\n name={name('email')}\n errorMessage={null}\n onChange={emailField.quiet((event) =>\n set('email', event.target.value),\n )}\n onBlur={() => leave('email')}\n blockPaste={blockPaste?.includes('email') ?? false}\n />\n </FormField>\n\n <FormField\n id={fieldId('emailConfirm')}\n label={labels.emailConfirm}\n required\n error={errorFor('emailConfirm')}\n announceError={!summary.lists('emailConfirm')}\n data-field=\"emailConfirm\"\n >\n <EmailInput\n ref={emailConfirmField.ref}\n name={name('emailConfirm')}\n disableBuiltInValidation\n onChange={emailConfirmField.quiet((event) =>\n set('emailConfirm', event.target.value),\n )}\n onBlur={() => {\n leave('emailConfirm');\n emailMatch.confirmProps.onBlur();\n }}\n blockPaste={blockPaste?.includes('emailConfirm') ?? false}\n />\n </FormField>\n\n <FormField\n id={fieldId('phone')}\n label={labels.phone}\n required\n description={t('sendRegistrationLink.phoneDescription')}\n error={errorFor('phone')}\n announceError={!summary.lists('phone')}\n data-field=\"phone\"\n onBlur={() => leave('phone')}\n >\n {/* The visible input holds the number as typed; a hidden\n input carries the full international number. */}\n <PhoneInput\n name={native ? undefined : 'phone'}\n value={values.phone}\n onChange={(e164, meta) => {\n set('phone', e164);\n setPhonePossible(meta.isPossible);\n }}\n />\n </FormField>\n\n <FormField\n id={fieldId('phoneConfirm')}\n label={labels.phoneConfirm}\n required\n error={errorFor('phoneConfirm')}\n announceError={!summary.lists('phoneConfirm')}\n data-field=\"phoneConfirm\"\n onBlur={() => {\n leave('phoneConfirm');\n phoneMatch.confirmProps.onBlur();\n }}\n onPasteCapture={\n blockPaste?.includes('phoneConfirm')\n ? (event) => event.preventDefault()\n : undefined\n }\n >\n <PhoneInput\n name={native ? undefined : 'phoneConfirm'}\n value={values.phoneConfirm}\n onChange={(e164) => set('phoneConfirm', e164)}\n />\n </FormField>\n\n <FormField\n id={fieldId('allowLoginUntil')}\n label={labels.allowLoginUntil}\n required\n error={errorFor('allowLoginUntil')}\n announceError={!summary.lists('allowLoginUntil')}\n data-field=\"allowLoginUntil\"\n >\n <DatePicker\n value={day}\n minDate={first}\n maxDate={last}\n onChange={(next) => {\n setDay(next);\n clearServer('allowLoginUntil');\n }}\n />\n </FormField>\n\n {native && fieldNames.phone && (\n <input\n type=\"hidden\"\n name={fieldNames.phone}\n value={values.phone}\n />\n )}\n {native && fieldNames.phoneConfirm && (\n <input\n type=\"hidden\"\n name={fieldNames.phoneConfirm}\n value={values.phoneConfirm}\n />\n )}\n {native && fieldNames.allowLoginUntil && (\n <input\n type=\"hidden\"\n name={fieldNames.allowLoginUntil}\n value={day ? isoDay(day) : ''}\n />\n )}\n {extraFields.map(([extra, value]) => (\n <input key={extra} type=\"hidden\" name={extra} value={value} />\n ))}\n\n <Button\n type=\"submit\"\n intent=\"primary\"\n size=\"lg\"\n loading={submit.busy}\n className=\"ds:w-full\"\n data-action=\"submit\"\n >\n {submitLabel ?? t('sendRegistrationLink.submit')}\n </Button>\n <p role=\"status\" className=\"ds:sr-only\">\n {submit.busy ? t('chat.message.status.sending') : ''}\n </p>\n </form>\n </Card.Body>\n </Card>\n </div>\n );\n },\n);\nSendRegistrationLinkForm.displayName = 'SendRegistrationLinkForm';\n"],"names":["SEND_REGISTRATION_LINK_FIELDS","rootVariants","cva","isoDay","date","format","readDay","value","day","parseISO","isValid","startOfDay","isPossiblePhone","e164","_a","parsePhoneNumberFromString","hasMessage","errors","SendRegistrationLinkForm","forwardRef","title","headingLevel","guidance","minDate","maxDate","initialValues","blockPaste","submitLabel","submitting","sent","sendAnotherHref","fieldNames","action","hiddenFields","onSubmit","className","rest","ref","t","i18n","useTranslation","titleId","useId","fieldIdBase","fieldId","field","formMessageId","native","Heading","tomorrow","useState","first","last","inRange","isBefore","isAfter","values","setValues","setDay","phonePossible","setPhonePossible","touched","setTouched","submitted","setSubmitted","serverErrors","setServerErrors","clearServer","previous","set","leave","emailMatch","useFieldMatch","phoneMatch","invalid","isEmail","required","formatDay","labels","due","whenDue","message","ownErrors","errorFor","form","useRef","formMessage","emailRef","emailConfirmRef","emailField","useStateBackedInput","emailConfirmField","focusField","_c","_b","focusTargetFor","messages","openedWithFieldMessage","summary","useErrorSummary","focusRequest","setFocusRequest","target","useEffect","submit","useRegistrationSubmit","answer","next","name","formAction","isSameSiteHref","formError","formMessageAnnounce","useFormMessageAnnounce","ownNames","extraFields","extra","anotherLink","isSafeHref","sentDay","jsx","Card","jsxs","Alert","Button","point","ErrorSummary","FormField","EmailInput","event","PhoneInput","meta","DatePicker"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqDO,MAAMA,IAAgC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAkGMC,KAAeC;AAAA,EACnB;AACF,GAEMC,KAAS,CAACC,MAAuBC,GAAOD,GAAM,YAAY,GAG1DE,IAAU,CAACC,MAAgD;AAC/D,MAAI,CAACA,EAAO;AACZ,QAAMC,IAAMC,GAASF,CAAK;AAC1B,SAAOG,GAAQF,CAAG,IAAIG,GAAWH,CAAG,IAAI;AAC1C,GAEMI,KAAkB,CAACC,MAAA;;AACvB,WAAAC,IAAAC,GAA2BF,CAAI,MAA/B,gBAAAC,EAAkC,iBAAgB;AAAA,GAE9CE,KAAa,CAACC,MAClB,OAAO,OAAOA,CAAM,EAAE,KAAK,OAAO,GAMvBC,KAA2BC;AAAA,EAItC,CACE;AAAA,IACE,OAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC;AAAA,IACA,QAAAR;AAAA,IACA,YAAAS;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC,KAAa;AAAA,IACb,MAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,EAAE,GAAAC,GAAG,MAAAC,OAASC,GAAe,IAAI,GACjCC,IAAUC,EAAA,GACVC,KAAcD,EAAA,GACdE,IAAU,CAACC,MACf,GAAGF,EAAW,IAAIE,CA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U3g.js";
7
7
  import { E as xe } from "./empty-state-DwJ5YNzz.js";
8
8
  import { S as W } from "./skeleton-tTWJpvAq.js";
9
9
  import { u as Se } from "./registry-DvAUVLHh.js";
10
- import { b as ke, f as De } from "./format-D-1gTdHF.js";
11
- import { p as Ie } from "./parseISO-y3LncvfO.js";
10
+ import { d as ke, f as De } from "./format--x5jypvH.js";
11
+ import { p as Ie } from "./parseISO-DZZ5a-zK.js";
12
12
  const Ge = {
13
13
  id: "slot-grid",
14
14
  // pick → `select_slot` + the `selectedSlotId` state slot.
@@ -637,4 +637,4 @@ export {
637
637
  Qe as i,
638
638
  Ge as s
639
639
  };
640
- //# sourceMappingURL=slot-grid-uA9j7Nik.js.map
640
+ //# sourceMappingURL=slot-grid-Bb13H9Rl.js.map