@alfadocs/ui-kit-debug 0.25.0 → 0.25.2

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 (305) hide show
  1. package/dist/_chunks/{agenda-card-BmpaUG1h.js → agenda-card-CznB7K8e.js} +2 -2
  2. package/dist/_chunks/{agenda-card-BmpaUG1h.js.map → agenda-card-CznB7K8e.js.map} +1 -1
  3. package/dist/_chunks/{agenda-tray-DiInnVqk.js → agenda-tray-C_bha7oK.js} +4 -4
  4. package/dist/_chunks/{agenda-tray-DiInnVqk.js.map → agenda-tray-C_bha7oK.js.map} +1 -1
  5. package/dist/_chunks/{ai-prompt-input-B5MdixzR.js → ai-prompt-input-Bka3jX3i.js} +2 -2
  6. package/dist/_chunks/{ai-prompt-input-B5MdixzR.js.map → ai-prompt-input-Bka3jX3i.js.map} +1 -1
  7. package/dist/_chunks/{alia-sidebar-CUi2UCbY.js → alia-sidebar-CnvXq95r.js} +92 -109
  8. package/dist/_chunks/alia-sidebar-CnvXq95r.js.map +1 -0
  9. package/dist/_chunks/{audio-recorder-D4xM3H5i.js → audio-recorder-OB6IV9B1.js} +2 -2
  10. package/dist/_chunks/{audio-recorder-D4xM3H5i.js.map → audio-recorder-OB6IV9B1.js.map} +1 -1
  11. package/dist/_chunks/{autocomplete-C7xq06bP.js → autocomplete-CUh0f7Dj.js} +2 -2
  12. package/dist/_chunks/{autocomplete-C7xq06bP.js.map → autocomplete-CUh0f7Dj.js.map} +1 -1
  13. package/dist/_chunks/{avatar-BpFohgWG.js → avatar-D_H4emLo.js} +7 -7
  14. package/dist/_chunks/avatar-D_H4emLo.js.map +1 -0
  15. package/dist/_chunks/{benefit-card-DXmrAyfn.js → benefit-card-CjYM8vNr.js} +29 -29
  16. package/dist/_chunks/benefit-card-CjYM8vNr.js.map +1 -0
  17. package/dist/_chunks/booking-CXngC-1u.js +1743 -0
  18. package/dist/_chunks/booking-CXngC-1u.js.map +1 -0
  19. package/dist/_chunks/{calendar-zy0tUUVG.js → calendar-9eOXumpH.js} +113 -142
  20. package/dist/_chunks/calendar-9eOXumpH.js.map +1 -0
  21. package/dist/_chunks/{card-C353dU-H.js → card-DKTMLVrw.js} +11 -11
  22. package/dist/_chunks/card-DKTMLVrw.js.map +1 -0
  23. package/dist/_chunks/{carousel.agent-DnPiqijR.js → carousel.agent-C9swH-Uf.js} +2 -2
  24. package/dist/_chunks/{carousel.agent-DnPiqijR.js.map → carousel.agent-C9swH-Uf.js.map} +1 -1
  25. package/dist/_chunks/{chat-input-B3XmFGDw.js → chat-input-BfDcz1Yi.js} +2 -2
  26. package/dist/_chunks/{chat-input-B3XmFGDw.js.map → chat-input-BfDcz1Yi.js.map} +1 -1
  27. package/dist/_chunks/{chat-message-W3k8rLOA.js → chat-message-fg221-yx.js} +2 -2
  28. package/dist/_chunks/{chat-message-W3k8rLOA.js.map → chat-message-fg221-yx.js.map} +1 -1
  29. package/dist/_chunks/{command-palette-DkL-aW4O.js → command-palette-11BieSNq.js} +2 -2
  30. package/dist/_chunks/{command-palette-DkL-aW4O.js.map → command-palette-11BieSNq.js.map} +1 -1
  31. package/dist/_chunks/{contact-card-CjG7c-1q.js → contact-card-CeEfEAxh.js} +2 -2
  32. package/dist/_chunks/{contact-card-CjG7c-1q.js.map → contact-card-CeEfEAxh.js.map} +1 -1
  33. package/dist/_chunks/{date-picker-BIoSLRly.js → date-picker-D0Ry1dMz.js} +26 -27
  34. package/dist/_chunks/{date-picker-BIoSLRly.js.map → date-picker-D0Ry1dMz.js.map} +1 -1
  35. package/dist/_chunks/{date-range-picker-9gANFNG9.js → date-range-picker-DYgHzMOo.js} +19 -20
  36. package/dist/_chunks/{date-range-picker-9gANFNG9.js.map → date-range-picker-DYgHzMOo.js.map} +1 -1
  37. package/dist/_chunks/{date-time-picker-DG7BiGdb.js → date-time-picker-CGmGtcyc.js} +10 -11
  38. package/dist/_chunks/{date-time-picker-DG7BiGdb.js.map → date-time-picker-CGmGtcyc.js.map} +1 -1
  39. package/dist/_chunks/{description-list-Bsga4IW8.js → description-list-yl3y3QKg.js} +34 -24
  40. package/dist/_chunks/description-list-yl3y3QKg.js.map +1 -0
  41. package/dist/_chunks/{dialog-DUomPCRS.js → dialog-BBXqpZIt.js} +2 -2
  42. package/dist/_chunks/{dialog-DUomPCRS.js.map → dialog-BBXqpZIt.js.map} +1 -1
  43. package/dist/_chunks/{editable-currency-cell-renderer-DJB5MxAI.js → editable-currency-cell-renderer-DSReCae7.js} +7 -7
  44. package/dist/_chunks/{editable-currency-cell-renderer-DJB5MxAI.js.map → editable-currency-cell-renderer-DSReCae7.js.map} +1 -1
  45. package/dist/_chunks/{empty-state-3CLJIXSj.js → empty-state-BLy7tigq.js} +13 -33
  46. package/dist/_chunks/empty-state-BLy7tigq.js.map +1 -0
  47. package/dist/_chunks/eye-LHlSU38h.js +21 -0
  48. package/dist/_chunks/eye-LHlSU38h.js.map +1 -0
  49. package/dist/_chunks/{freemium-paywall-CM6V1zNf.js → freemium-paywall-B9c8Ylww.js} +11 -11
  50. package/dist/_chunks/{freemium-paywall-CM6V1zNf.js.map → freemium-paywall-B9c8Ylww.js.map} +1 -1
  51. package/dist/_chunks/{header-DqmKROIY.js → header-B8V_sNPy.js} +2 -2
  52. package/dist/_chunks/{header-DqmKROIY.js.map → header-B8V_sNPy.js.map} +1 -1
  53. package/dist/_chunks/icon-button-BRHSSFmZ.js +70 -0
  54. package/dist/_chunks/icon-button-BRHSSFmZ.js.map +1 -0
  55. package/dist/_chunks/{isSameDay-ecuM8PBB.js → isSameDay-DHG8Xade.js} +4 -4
  56. package/dist/_chunks/{isSameDay-ecuM8PBB.js.map → isSameDay-DHG8Xade.js.map} +1 -1
  57. package/dist/_chunks/{key-value-pair-DBuOCtIc.js → key-value-pair-CqeKiP__.js} +2 -2
  58. package/dist/_chunks/{key-value-pair-DBuOCtIc.js.map → key-value-pair-CqeKiP__.js.map} +1 -1
  59. package/dist/_chunks/{locale-picker-BxEUUPW7.js → locale-picker-BHxbTNmR.js} +297 -208
  60. package/dist/_chunks/locale-picker-BHxbTNmR.js.map +1 -0
  61. package/dist/_chunks/{map-view-CcwycFQX.js → map-view-DyB8tr6c.js} +9 -9
  62. package/dist/_chunks/{map-view-CcwycFQX.js.map → map-view-DyB8tr6c.js.map} +1 -1
  63. package/dist/_chunks/{matrix-rain-CRPMXcVx.js → matrix-rain-sDOUUwZp.js} +35 -35
  64. package/dist/_chunks/matrix-rain-sDOUUwZp.js.map +1 -0
  65. package/dist/_chunks/{message-card-i61k1TGc.js → message-card-DjRtA8GG.js} +3 -3
  66. package/dist/_chunks/{message-card-i61k1TGc.js.map → message-card-DjRtA8GG.js.map} +1 -1
  67. package/dist/_chunks/{message-tray-DrV7G-wR.js → message-tray-DfsAMncP.js} +3 -3
  68. package/dist/_chunks/{message-tray-DrV7G-wR.js.map → message-tray-DfsAMncP.js.map} +1 -1
  69. package/dist/_chunks/monitor-D-SFdbrU.js +16 -0
  70. package/dist/_chunks/monitor-D-SFdbrU.js.map +1 -0
  71. package/dist/_chunks/{notification-card-ejOw5g6g.js → notification-card-B_847w5g.js} +3 -3
  72. package/dist/_chunks/notification-card-B_847w5g.js.map +1 -0
  73. package/dist/_chunks/{notification-tray-D_69dXFY.js → notification-tray-6f7smmT1.js} +22 -19
  74. package/dist/_chunks/notification-tray-6f7smmT1.js.map +1 -0
  75. package/dist/_chunks/patient-shell-Bq8CjRYF.js +173 -0
  76. package/dist/_chunks/{patient-shell-B164drIa.js.map → patient-shell-Bq8CjRYF.js.map} +1 -1
  77. package/dist/_chunks/{payment-form-F7uh0Rqr.js → payment-form-Ds3rxvad.js} +2 -2
  78. package/dist/_chunks/{payment-form-F7uh0Rqr.js.map → payment-form-Ds3rxvad.js.map} +1 -1
  79. package/dist/_chunks/{pdf-viewer-CuYaVR1I.js → pdf-viewer-CIuaocnq.js} +2 -2
  80. package/dist/_chunks/{pdf-viewer-CuYaVR1I.js.map → pdf-viewer-CIuaocnq.js.map} +1 -1
  81. package/dist/_chunks/{popover--derJ_wq.js → popover-D0slaBB9.js} +17 -13
  82. package/dist/_chunks/popover-D0slaBB9.js.map +1 -0
  83. package/dist/_chunks/{privacy-lock-BKsI6ReN.js → privacy-lock-BI4vi9Ud.js} +2 -2
  84. package/dist/_chunks/{privacy-lock-BKsI6ReN.js.map → privacy-lock-BI4vi9Ud.js.map} +1 -1
  85. package/dist/_chunks/{public-header.agent-BQ3r6Hgq.js → public-header.agent-5U3S9QiC.js} +49 -41
  86. package/dist/_chunks/public-header.agent-5U3S9QiC.js.map +1 -0
  87. package/dist/_chunks/react-day-picker-D3yzgvDB.js +3127 -0
  88. package/dist/_chunks/react-day-picker-D3yzgvDB.js.map +1 -0
  89. package/dist/_chunks/{recaptcha-widget-Kp1XntuE.js → recaptcha-widget-BtBNb6tB.js} +2 -2
  90. package/dist/_chunks/{recaptcha-widget-Kp1XntuE.js.map → recaptcha-widget-BtBNb6tB.js.map} +1 -1
  91. package/dist/_chunks/{search-bar-DORSAzNt.js → search-bar-BRMW1-WG.js} +2 -2
  92. package/dist/_chunks/{search-bar-DORSAzNt.js.map → search-bar-BRMW1-WG.js.map} +1 -1
  93. package/dist/_chunks/{search-input-BtEJAJHa.js → search-input-CIA6pPfn.js} +2 -2
  94. package/dist/_chunks/{search-input-BtEJAJHa.js.map → search-input-CIA6pPfn.js.map} +1 -1
  95. package/dist/_chunks/{sheet-BT0izeoI.js → sheet-D8M8hf8B.js} +2 -2
  96. package/dist/_chunks/{sheet-BT0izeoI.js.map → sheet-D8M8hf8B.js.map} +1 -1
  97. package/dist/_chunks/{sign-in-with-alfadocs-button-4zZC-I6y.js → sign-in-with-alfadocs-button-BI0fVonM.js} +2 -2
  98. package/dist/_chunks/{sign-in-with-alfadocs-button-4zZC-I6y.js.map → sign-in-with-alfadocs-button-BI0fVonM.js.map} +1 -1
  99. package/dist/_chunks/{slot-grid-CgpYgBkW.js → slot-grid-DoodeQGZ.js} +4 -4
  100. package/dist/_chunks/{slot-grid-CgpYgBkW.js.map → slot-grid-DoodeQGZ.js.map} +1 -1
  101. package/dist/_chunks/sparkles-CuYXqQLg.js +23 -0
  102. package/dist/_chunks/sparkles-CuYXqQLg.js.map +1 -0
  103. package/dist/_chunks/{spinner-DirtWZNG.js → spinner-CCByyvcb.js} +2 -2
  104. package/dist/_chunks/spinner-CCByyvcb.js.map +1 -0
  105. package/dist/_chunks/stepper-accordion-BfS6lUB9.js +257 -0
  106. package/dist/_chunks/stepper-accordion-BfS6lUB9.js.map +1 -0
  107. package/dist/_chunks/stepper-accordion.agent-C4quJ-MD.js +71 -0
  108. package/dist/_chunks/stepper-accordion.agent-C4quJ-MD.js.map +1 -0
  109. package/dist/_chunks/stethoscope-B8kpbtjh.js +35 -0
  110. package/dist/_chunks/stethoscope-B8kpbtjh.js.map +1 -0
  111. package/dist/_chunks/{sun-Eweh5fvi.js → sun-BuXE0xUS.js} +3 -15
  112. package/dist/_chunks/sun-BuXE0xUS.js.map +1 -0
  113. package/dist/_chunks/{task-tray-B3A2fRGR.js → task-tray-Bcmrrs8m.js} +3 -3
  114. package/dist/_chunks/{task-tray-B3A2fRGR.js.map → task-tray-Bcmrrs8m.js.map} +1 -1
  115. package/dist/_chunks/{theme-toggle-FrotC2VI.js → theme-toggle-nPzb378f.js} +37 -36
  116. package/dist/_chunks/{theme-toggle-FrotC2VI.js.map → theme-toggle-nPzb378f.js.map} +1 -1
  117. package/dist/_chunks/{timeline-jmd7lfDf.js → timeline-CR7HjZCK.js} +3 -3
  118. package/dist/_chunks/{timeline-jmd7lfDf.js.map → timeline-CR7HjZCK.js.map} +1 -1
  119. package/dist/_chunks/{toast.agent-32WNQ-_x.js → toast.agent-CTF6nIj5.js} +2 -2
  120. package/dist/_chunks/{toast.agent-32WNQ-_x.js.map → toast.agent-CTF6nIj5.js.map} +1 -1
  121. package/dist/_chunks/{transcript-panel-DUrjx5sa.js → transcript-panel-QUQ9XJmf.js} +2 -2
  122. package/dist/_chunks/{transcript-panel-DUrjx5sa.js.map → transcript-panel-QUQ9XJmf.js.map} +1 -1
  123. package/dist/_chunks/{use-password-requirements-C9vKBSVn.js → use-password-requirements-E0sSfx5X.js} +38 -53
  124. package/dist/_chunks/use-password-requirements-E0sSfx5X.js.map +1 -0
  125. package/dist/_chunks/use-theme-C2dHKUAN.js +145 -0
  126. package/dist/_chunks/use-theme-C2dHKUAN.js.map +1 -0
  127. package/dist/_chunks/{workflow-map-BR6txfFX.js → workflow-map-BKsKdYvZ.js} +5 -5
  128. package/dist/_chunks/{workflow-map-BR6txfFX.js.map → workflow-map-BKsKdYvZ.js.map} +1 -1
  129. package/dist/agent-catalog.json +56 -51
  130. package/dist/components/agenda-card/index.js +1 -1
  131. package/dist/components/agenda-tray/index.js +1 -1
  132. package/dist/components/ai-prompt-input/index.js +1 -1
  133. package/dist/components/audio-recorder/index.js +1 -1
  134. package/dist/components/autocomplete/index.js +1 -1
  135. package/dist/components/avatar/avatar.d.ts.map +1 -1
  136. package/dist/components/avatar/index.js +1 -1
  137. package/dist/components/benefit-card/benefit-card.d.ts.map +1 -1
  138. package/dist/components/benefit-card/index.js +1 -1
  139. package/dist/components/booking/booking.agent.d.ts +4 -0
  140. package/dist/components/booking/booking.agent.d.ts.map +1 -0
  141. package/dist/components/booking/booking.d.ts +91 -0
  142. package/dist/components/booking/booking.d.ts.map +1 -0
  143. package/dist/components/booking/index.d.ts +4 -0
  144. package/dist/components/booking/index.d.ts.map +1 -0
  145. package/dist/components/booking/index.js +6 -0
  146. package/dist/components/button/icon-button.d.ts.map +1 -1
  147. package/dist/components/button/index.js +1 -1
  148. package/dist/components/calendar/index.js +1 -1
  149. package/dist/components/card/card.d.ts.map +1 -1
  150. package/dist/components/card/index.js +1 -1
  151. package/dist/components/carousel/index.js +1 -1
  152. package/dist/components/chat-input/index.js +1 -1
  153. package/dist/components/chat-message/index.js +1 -1
  154. package/dist/components/command-palette/index.js +1 -1
  155. package/dist/components/contact-card/index.js +1 -1
  156. package/dist/components/data-table/index.js +1 -1
  157. package/dist/components/date-picker/index.js +1 -1
  158. package/dist/components/date-range-picker/index.js +1 -1
  159. package/dist/components/date-time-picker/index.js +1 -1
  160. package/dist/components/description-list/description-list.d.ts.map +1 -1
  161. package/dist/components/description-list/index.js +1 -1
  162. package/dist/components/dialog/index.js +1 -1
  163. package/dist/components/empty-state/empty-state.d.ts.map +1 -1
  164. package/dist/components/empty-state/index.js +1 -1
  165. package/dist/components/freemium-paywall/index.js +1 -1
  166. package/dist/components/header/index.js +1 -1
  167. package/dist/components/header-settings/index.js +60 -48
  168. package/dist/components/header-settings/index.js.map +1 -1
  169. package/dist/components/icon-button/index.js +1 -1
  170. package/dist/components/index.d.ts +1 -1
  171. package/dist/components/index.d.ts.map +1 -1
  172. package/dist/components/key-value-pair/index.js +1 -1
  173. package/dist/components/locale-picker/index.js +1 -1
  174. package/dist/components/map-view/index.js +1 -1
  175. package/dist/components/matrix-rain/index.js +1 -1
  176. package/dist/components/message-card/index.js +1 -1
  177. package/dist/components/message-tray/index.js +1 -1
  178. package/dist/components/notification-card/index.js +1 -1
  179. package/dist/components/notification-tray/index.js +1 -1
  180. package/dist/components/notification-tray/notification-tray.d.ts.map +1 -1
  181. package/dist/components/password-input/index.js +1 -1
  182. package/dist/components/payment-form/index.js +1 -1
  183. package/dist/components/pdf-viewer/index.js +1 -1
  184. package/dist/components/popover/index.js +1 -1
  185. package/dist/components/popover/popover.d.ts.map +1 -1
  186. package/dist/components/privacy-lock/index.js +1 -1
  187. package/dist/components/public-header/index.js +1 -1
  188. package/dist/components/public-header/public-header.d.ts.map +1 -1
  189. package/dist/components/recaptcha-widget/index.js +1 -1
  190. package/dist/components/search-bar/index.js +1 -1
  191. package/dist/components/search-input/index.js +1 -1
  192. package/dist/components/sheet/index.js +1 -1
  193. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  194. package/dist/components/slot-grid/index.js +1 -1
  195. package/dist/components/spinner/index.js +1 -1
  196. package/dist/components/stepper-accordion/index.js +4 -3
  197. package/dist/components/stepper-accordion/index.js.map +1 -1
  198. package/dist/components/task-tray/index.js +1 -1
  199. package/dist/components/theme-toggle/index.js +1 -1
  200. package/dist/components/timeline/index.js +1 -1
  201. package/dist/components/toast/index.js +1 -1
  202. package/dist/components/transcript-panel/index.js +1 -1
  203. package/dist/components/workflow/index.js +1 -1
  204. package/dist/hooks/index.js +1 -1
  205. package/dist/hooks/use-theme.d.ts.map +1 -1
  206. package/dist/i18n/config.js +1090 -46
  207. package/dist/i18n/config.js.map +1 -1
  208. package/dist/i18n/locales/ar.d.ts +58 -0
  209. package/dist/i18n/locales/ar.d.ts.map +1 -1
  210. package/dist/i18n/locales/de.d.ts +58 -0
  211. package/dist/i18n/locales/de.d.ts.map +1 -1
  212. package/dist/i18n/locales/el.d.ts +58 -0
  213. package/dist/i18n/locales/el.d.ts.map +1 -1
  214. package/dist/i18n/locales/es.d.ts +58 -0
  215. package/dist/i18n/locales/es.d.ts.map +1 -1
  216. package/dist/i18n/locales/fr.d.ts +58 -0
  217. package/dist/i18n/locales/fr.d.ts.map +1 -1
  218. package/dist/i18n/locales/hi.d.ts +58 -0
  219. package/dist/i18n/locales/hi.d.ts.map +1 -1
  220. package/dist/i18n/locales/ja.d.ts +58 -0
  221. package/dist/i18n/locales/ja.d.ts.map +1 -1
  222. package/dist/i18n/locales/nl.d.ts +58 -0
  223. package/dist/i18n/locales/nl.d.ts.map +1 -1
  224. package/dist/i18n/locales/pl.d.ts +58 -0
  225. package/dist/i18n/locales/pl.d.ts.map +1 -1
  226. package/dist/i18n/locales/pt.d.ts +58 -0
  227. package/dist/i18n/locales/pt.d.ts.map +1 -1
  228. package/dist/i18n/locales/ro.d.ts +58 -0
  229. package/dist/i18n/locales/ro.d.ts.map +1 -1
  230. package/dist/i18n/locales/ru.d.ts +58 -0
  231. package/dist/i18n/locales/ru.d.ts.map +1 -1
  232. package/dist/i18n/locales/sq.d.ts +58 -0
  233. package/dist/i18n/locales/sq.d.ts.map +1 -1
  234. package/dist/i18n/locales/sv.d.ts +58 -0
  235. package/dist/i18n/locales/sv.d.ts.map +1 -1
  236. package/dist/i18n/locales/tr.d.ts +58 -0
  237. package/dist/i18n/locales/tr.d.ts.map +1 -1
  238. package/dist/i18n/locales/zh.d.ts +58 -0
  239. package/dist/i18n/locales/zh.d.ts.map +1 -1
  240. package/dist/i18n/resources.d.ts +116 -0
  241. package/dist/i18n/resources.d.ts.map +1 -1
  242. package/dist/index.js +270 -269
  243. package/dist/index.js.map +1 -1
  244. package/dist/locales/ar.json +59 -1
  245. package/dist/locales/de.json +59 -1
  246. package/dist/locales/el.json +59 -1
  247. package/dist/locales/en.json +59 -1
  248. package/dist/locales/es.json +59 -1
  249. package/dist/locales/fr.json +59 -1
  250. package/dist/locales/hi.json +59 -1
  251. package/dist/locales/it.json +59 -1
  252. package/dist/locales/ja.json +59 -1
  253. package/dist/locales/nl.json +59 -1
  254. package/dist/locales/pl.json +59 -1
  255. package/dist/locales/pt.json +59 -1
  256. package/dist/locales/ro.json +59 -1
  257. package/dist/locales/ru.json +59 -1
  258. package/dist/locales/sq.json +59 -1
  259. package/dist/locales/sv.json +59 -1
  260. package/dist/locales/tr.json +59 -1
  261. package/dist/locales/zh.json +59 -1
  262. package/dist/patterns/alia-assistant/index.js +1 -1
  263. package/dist/patterns/patient-shell/index.js +1 -1
  264. package/dist/patterns/patient-shell/patient-shell.d.ts.map +1 -1
  265. package/dist/tokens.css +1 -1
  266. package/package.json +5 -1
  267. package/dist/_chunks/alia-sidebar-CUi2UCbY.js.map +0 -1
  268. package/dist/_chunks/avatar-BpFohgWG.js.map +0 -1
  269. package/dist/_chunks/benefit-card-DXmrAyfn.js.map +0 -1
  270. package/dist/_chunks/calendar-zy0tUUVG.js.map +0 -1
  271. package/dist/_chunks/card-C353dU-H.js.map +0 -1
  272. package/dist/_chunks/description-list-Bsga4IW8.js.map +0 -1
  273. package/dist/_chunks/empty-state-3CLJIXSj.js.map +0 -1
  274. package/dist/_chunks/icon-button-C4CGcYuz.js +0 -54
  275. package/dist/_chunks/icon-button-C4CGcYuz.js.map +0 -1
  276. package/dist/_chunks/isSameMonth-5wNF2f4I.js +0 -1307
  277. package/dist/_chunks/isSameMonth-5wNF2f4I.js.map +0 -1
  278. package/dist/_chunks/locale-picker-BxEUUPW7.js.map +0 -1
  279. package/dist/_chunks/matrix-rain-CRPMXcVx.js.map +0 -1
  280. package/dist/_chunks/notification-card-ejOw5g6g.js.map +0 -1
  281. package/dist/_chunks/notification-tray-D_69dXFY.js.map +0 -1
  282. package/dist/_chunks/patient-shell-B164drIa.js +0 -173
  283. package/dist/_chunks/popover--derJ_wq.js.map +0 -1
  284. package/dist/_chunks/public-header.agent-BQ3r6Hgq.js.map +0 -1
  285. package/dist/_chunks/react-day-picker-C5F3-TTX.js +0 -1827
  286. package/dist/_chunks/react-day-picker-C5F3-TTX.js.map +0 -1
  287. package/dist/_chunks/spinner-DirtWZNG.js.map +0 -1
  288. package/dist/_chunks/stepper-C-sIpRRU.js +0 -7
  289. package/dist/_chunks/stepper-C-sIpRRU.js.map +0 -1
  290. package/dist/_chunks/stepper-accordion.agent-ckKYZCIP.js +0 -322
  291. package/dist/_chunks/stepper-accordion.agent-ckKYZCIP.js.map +0 -1
  292. package/dist/_chunks/stepper-calendar-BLOJUE0-.js +0 -648
  293. package/dist/_chunks/stepper-calendar-BLOJUE0-.js.map +0 -1
  294. package/dist/_chunks/sun-Eweh5fvi.js.map +0 -1
  295. package/dist/_chunks/use-password-requirements-C9vKBSVn.js.map +0 -1
  296. package/dist/_chunks/use-theme-B1cwAXJR.js +0 -145
  297. package/dist/_chunks/use-theme-B1cwAXJR.js.map +0 -1
  298. package/dist/components/stepper-calendar/index.d.ts +0 -4
  299. package/dist/components/stepper-calendar/index.d.ts.map +0 -1
  300. package/dist/components/stepper-calendar/index.js +0 -6
  301. package/dist/components/stepper-calendar/stepper-calendar.agent.d.ts +0 -4
  302. package/dist/components/stepper-calendar/stepper-calendar.agent.d.ts.map +0 -1
  303. package/dist/components/stepper-calendar/stepper-calendar.d.ts +0 -62
  304. package/dist/components/stepper-calendar/stepper-calendar.d.ts.map +0 -1
  305. /package/dist/components/{stepper-calendar → booking}/index.js.map +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"stepper-calendar-BLOJUE0-.js","sources":["../../node_modules/date-fns/subMonths.js","../../src/components/stepper-calendar/stepper-calendar.agent.ts","../../src/components/stepper-calendar/stepper-calendar.tsx"],"sourcesContent":["import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — StepperCalendar. */\n/* */\n/* The booking flow's four steps (service / date / time / details) are */\n/* presented as a single component. The adapter exposes the active step */\n/* + total + lets agents step forward / backward or jump to a step. */\n/* The booking value itself is owned by the consumer — the adapter */\n/* deliberately does NOT read selected serviceId / date / time, since */\n/* those flow through the consumer's `value` / `onChange` contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { StepperCalendarHandle } from './stepper-calendar';\n\nexport const stepperCalendarAgent: AgentAdapter<StepperCalendarHandle> = {\n id: 'stepper-calendar',\n capabilities: ['navigate', 'view_change'],\n state: {\n currentStep: {\n type: 'number',\n descriptionKey: 'ui.agent.stepperCalendar.state.currentStep',\n description:\n 'Zero-indexed active step (0 = service, 1 = date, 2 = time, 3 = details).',\n read: (handle) => handle.getCurrentStep(),\n },\n totalSteps: {\n type: 'number',\n descriptionKey: 'ui.agent.stepperCalendar.state.totalSteps',\n description: 'Total number of steps in the booking flow (always 4).',\n read: (handle) => handle.getTotalSteps(),\n },\n },\n actions: {\n goto_step: {\n safety: 'read',\n argsType: '{ step: number }',\n descriptionKey: 'ui.agent.stepperCalendar.actions.gotoStep',\n description:\n 'Jump to the given step. Steps beyond the first-incomplete are gated internally.',\n invoke: (handle, args: { step: number }) => {\n handle.gotoStep(args.step);\n },\n },\n next: {\n safety: 'read',\n descriptionKey: 'ui.agent.stepperCalendar.actions.next',\n description:\n 'Advance to the next step when the current step has a valid value.',\n invoke: (handle) => {\n handle.next();\n },\n },\n previous: {\n safety: 'read',\n descriptionKey: 'ui.agent.stepperCalendar.actions.previous',\n description: 'Return to the previous step.',\n invoke: (handle) => {\n handle.previous();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'stepper-calendar',\n description: 'Marks the StepperCalendar root region.',\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 useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n type KeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n addDays,\n addMonths,\n format as fnsFormat,\n isSameDay,\n isSameMonth,\n parseISO,\n startOfMonth,\n startOfWeek,\n subMonths,\n} from 'date-fns';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport type { StepSpec, StepStatus } from '../_shared/stepper';\nimport { stateForStep } from '../_shared/stepper';\nimport { StepperProgress } from '../stepper-progress/stepper-progress';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { stepperCalendarAgent } from './stepper-calendar.agent';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport {\n SlotGrid,\n type SlotGridDay,\n type SlotGridSlot,\n} from '../slot-grid/slot-grid';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { resolveFirstDay } from '../calendar/calendar';\n\n// Slot IDs use a fixed `${yyyy-mm-dd}T${HH:mm}` shape so the trailing time\n// segment can be safely peeled off in onSlotSelect. Validating against the\n// shape rather than splitting blindly so an unexpected ID surfaces as a\n// no-op rather than a malformed time value.\nconst SLOT_ID_PATTERN = /^(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2})$/;\n\n/* -------------------------------------------------------------------- */\n/* StepperCalendar */\n/* */\n/* Single-component, A/B-testable appointment-booking flow with 4 */\n/* fixed steps in this order: */\n/* 0. Service — pick from `services` */\n/* 1. Date — inline month grid; only `availableDates` are enabled */\n/* 2. Time — slot grid showing `availableSlots[selectedDate]` */\n/* 3. Details — render-prop slot for the consumer's form fields */\n/* -------------------------------------------------------------------- */\n\n/** Service offering rendered on Step 1. Data is API-driven by the consumer. */\nexport interface StepperCalendarService {\n id: string;\n /** Already-translated label (consumer is responsible for i18n of data). */\n label: string;\n /** Duration in minutes — shown alongside the label. */\n durationMin: number;\n /** Optional secondary line. */\n description?: string;\n}\n\n/** Re-exported for convenience. */\nexport type ServiceOption = StepperCalendarService;\n\n/** Booking selection — controlled by the consumer. */\nexport interface StepperCalendarValue {\n serviceId?: string;\n /** ISO yyyy-mm-dd. */\n date?: string;\n /** HH:mm (24h). */\n time?: string;\n}\n\nconst TOTAL_STEPS = 4;\n\nconst rootVariants = cva(\n 'ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-md)] ds:text-[var(--foreground)]',\n {\n variants: {\n layout: {\n vertical: 'ds:flex-col',\n horizontal: 'ds:lg:flex-row ds:lg:items-start',\n },\n density: {\n comfortable: 'ds:gap-[var(--spacing-md)]',\n compact: 'ds:gap-[var(--spacing-sm)]',\n },\n },\n defaultVariants: {\n layout: 'vertical',\n density: 'comfortable',\n },\n },\n);\n\nconst stepBodyVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-md)]',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:bg-[var(--card)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n ].join(' '),\n {\n variants: {\n density: {\n comfortable: 'ds:gap-[var(--spacing-md)]',\n compact: 'ds:gap-[var(--spacing-sm)]',\n },\n },\n defaultVariants: { density: 'comfortable' },\n },\n);\n\nconst serviceCardVariants = cva(\n [\n 'ds:group/service ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)] ds:text-start',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:bg-[var(--background)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:transition-[background-color,border-color] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n 'ds:motion-reduce:transition-none',\n 'ds:hover:enabled:bg-[var(--muted)]/40',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:aria-checked:border-[var(--primary)] ds:aria-checked:bg-[var(--primary)]/5',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed',\n ].join(' '),\n);\n\nconst monthHeaderVariants = cva(\n 'ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]',\n);\n\nconst monthGridVariants = cva(\n 'ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-xs)]',\n);\n\nconst dayCellVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n // `min-target-size` (44/48px) governs the rendered size — it always\n // exceeds the explicit floor below. Keeping the explicit floor for\n // grid layout stability when the cell content is empty (skeletons),\n // matching the precedent in `slot-grid`.\n 'ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]',\n 'ds:h-10 ds:w-10 ds:rounded-[var(--radius-sm)]',\n 'ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-medium)]',\n 'ds:border ds:border-transparent ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:transition-[background-color,border-color,color] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n 'ds:motion-reduce:transition-none',\n 'ds:hover:enabled:bg-[var(--muted)]/40',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:disabled:opacity-40 ds:disabled:cursor-not-allowed',\n 'ds:aria-selected:bg-[var(--primary)] ds:aria-selected:text-[var(--primary-foreground)]',\n 'ds:aria-selected:border-[var(--primary)]',\n 'ds:data-[outside=true]:text-[var(--muted-foreground)]',\n ].join(' '),\n);\n\nconst actionsRowVariants = cva(\n 'ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:mt-[var(--spacing-md)]',\n);\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nfunction isoDay(date: Date): string {\n return fnsFormat(date, 'yyyy-MM-dd');\n}\n\n/** Compute the first incomplete step from the current value. */\nfunction firstIncompleteStep(value: StepperCalendarValue): number {\n if (!value.serviceId) return 0;\n if (!value.date) return 1;\n if (!value.time) return 2;\n return 3;\n}\n\n/* -------------------------------------------------------------------- */\n/* Public props */\n/* -------------------------------------------------------------------- */\n\nexport interface StepperCalendarProps\n extends\n Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'onChange' | 'onSubmit'\n >,\n VariantProps<typeof rootVariants> {\n services: StepperCalendarService[];\n availableDates: string[];\n availableSlots: Record<string, string[]>;\n value: StepperCalendarValue;\n onChange: (next: StepperCalendarValue) => void;\n onSubmit?: (value: StepperCalendarValue) => void;\n detailsFields?: ReactNode;\n loadingDates?: boolean;\n loadingSlots?: boolean;\n /** Per-step status overrides — `error` will mark a step in the rail. */\n stepStatuses?: Partial<Record<0 | 1 | 2 | 3, StepStatus>>;\n 'aria-label'?: string;\n /**\n * Consumer-supplied instance id, surfaced as `data-component-id` so an\n * agent / UI bridge can address this instance.\n */\n id?: string;\n}\n\n/**\n * Imperative handle for agent-readiness. The booking value itself is\n * owned by the consumer through `value` / `onChange`, so the handle\n * deliberately exposes only step navigation — not the selected\n * service / date / time.\n */\nexport interface StepperCalendarHandle {\n getCurrentStep: () => number;\n getTotalSteps: () => number;\n gotoStep: (step: number) => void;\n next: () => void;\n previous: () => void;\n}\n\n/* -------------------------------------------------------------------- */\n/* Service grid (Step 0) */\n/* -------------------------------------------------------------------- */\n\ninterface ServiceGridProps {\n services: StepperCalendarService[];\n selectedId?: string;\n onSelect: (id: string) => void;\n durationLabel: (minutes: number) => string;\n groupLabel: string;\n}\n\nconst ServiceGrid = forwardRef<HTMLDivElement, ServiceGridProps>(\n ({ services, selectedId, onSelect, durationLabel, groupLabel }, ref) => {\n const itemRefs = useRef<(HTMLButtonElement | null)[]>([]);\n const focusedIndex = (() => {\n const i = services.findIndex((s) => s.id === selectedId);\n return i >= 0 ? i : 0;\n })();\n\n const moveFocus = (next: number) => {\n const wrapped = (next + services.length) % services.length;\n const target = itemRefs.current[wrapped];\n if (!target) return;\n // Per WAI-ARIA radiogroup, arrow keys move focus AND selection.\n target.focus();\n const svc = services[wrapped];\n if (svc) onSelect(svc.id);\n };\n\n const handleKeyDown = (\n event: KeyboardEvent<HTMLButtonElement>,\n currentIndex: number,\n ) => {\n // RTL inversion: in an RTL document, ArrowLeft visually advances forward.\n const isRtl =\n typeof document !== 'undefined' &&\n document.documentElement.dir === 'rtl';\n const forward = isRtl ? 'ArrowLeft' : 'ArrowRight';\n const back = isRtl ? 'ArrowRight' : 'ArrowLeft';\n if (event.key === forward || event.key === 'ArrowDown') {\n event.preventDefault();\n moveFocus(currentIndex + 1);\n return;\n }\n if (event.key === back || event.key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(currentIndex - 1);\n return;\n }\n if (event.key === 'Home') {\n event.preventDefault();\n moveFocus(0);\n return;\n }\n if (event.key === 'End') {\n event.preventDefault();\n moveFocus(services.length - 1);\n }\n };\n\n return (\n <div\n ref={ref}\n role=\"radiogroup\"\n aria-label={groupLabel}\n className=\"ds:grid ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2\"\n >\n {services.map((svc, index) => {\n const checked = svc.id === selectedId;\n const isRovingTabStop = index === focusedIndex;\n return (\n <button\n key={svc.id}\n ref={(el) => {\n itemRefs.current[index] = el;\n }}\n type=\"button\"\n role=\"radio\"\n aria-checked={checked}\n tabIndex={isRovingTabStop ? 0 : -1}\n onClick={() => onSelect(svc.id)}\n onKeyDown={(e) => handleKeyDown(e, index)}\n className={serviceCardVariants()}\n >\n <span className=\"type-body-sm ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]\">\n {svc.label}\n </span>\n {svc.description ? (\n <span className=\"type-meta ds:text-[var(--muted-foreground)]\">\n {svc.description}\n </span>\n ) : null}\n <span className=\"type-meta ds:text-[var(--muted-foreground)]\">\n {durationLabel(svc.durationMin)}\n </span>\n </button>\n );\n })}\n </div>\n );\n },\n);\nServiceGrid.displayName = 'StepperCalendar.ServiceGrid';\n\n/* -------------------------------------------------------------------- */\n/* Inline month grid (Step 1) */\n/* -------------------------------------------------------------------- */\n\ntype WeekStart = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\ninterface MonthGridProps {\n availableDates: Set<string>;\n selectedDate?: string;\n onSelectDate: (iso: string) => void;\n loading: boolean;\n locale: string;\n weekStartsOn: WeekStart;\n prevLabel: string;\n nextLabel: string;\n emptyLabel: string;\n}\n\nconst MonthGrid = forwardRef<HTMLDivElement, MonthGridProps>(\n (\n {\n availableDates,\n selectedDate,\n onSelectDate,\n loading,\n locale,\n weekStartsOn,\n prevLabel,\n nextLabel,\n emptyLabel,\n },\n ref,\n ) => {\n const initialMonth = useMemo(() => {\n if (selectedDate) return parseISO(selectedDate);\n const first = [...availableDates].sort()[0];\n return first ? parseISO(first) : new Date();\n }, [availableDates, selectedDate]);\n\n const [month, setMonth] = useState<Date>(initialMonth);\n const [focusedDay, setFocusedDay] = useState<Date>(\n selectedDate ? parseISO(selectedDate) : initialMonth,\n );\n\n // Build the 6x7 grid (always full weeks for stable layout).\n const monthStart = startOfMonth(month);\n const gridStart = startOfWeek(monthStart, { weekStartsOn });\n const days: Date[] = useMemo(() => {\n const cells: Date[] = [];\n for (let i = 0; i < 42; i += 1) {\n cells.push(addDays(gridStart, i));\n }\n return cells;\n }, [gridStart]);\n\n const weekdayLabels = useMemo(() => {\n const base = startOfWeek(new Date(), { weekStartsOn });\n const fmt = new Intl.DateTimeFormat(locale, { weekday: 'short' });\n return Array.from({ length: 7 }, (_, i) => fmt.format(addDays(base, i)));\n }, [locale, weekStartsOn]);\n\n const monthLabel = useMemo(() => {\n try {\n return new Intl.DateTimeFormat(locale, {\n month: 'long',\n year: 'numeric',\n }).format(month);\n } catch {\n return fnsFormat(month, 'MMMM yyyy');\n }\n }, [locale, month]);\n\n const isAvailable = useCallback(\n (d: Date) => availableDates.has(isoDay(d)),\n [availableDates],\n );\n\n const moveFocus = useCallback(\n (next: Date) => {\n setFocusedDay(next);\n if (!isSameMonth(next, month)) setMonth(startOfMonth(next));\n },\n [month],\n );\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n const map: Record<string, number> = {\n ArrowLeft: -1,\n ArrowRight: 1,\n ArrowUp: -7,\n ArrowDown: 7,\n };\n if (event.key in map) {\n event.preventDefault();\n moveFocus(addDays(focusedDay, map[event.key]));\n return;\n }\n if (event.key === 'Home') {\n event.preventDefault();\n moveFocus(startOfWeek(focusedDay, { weekStartsOn }));\n return;\n }\n if (event.key === 'End') {\n event.preventDefault();\n moveFocus(addDays(startOfWeek(focusedDay, { weekStartsOn }), 6));\n return;\n }\n if (event.key === 'PageUp') {\n event.preventDefault();\n moveFocus(subMonths(focusedDay, 1));\n return;\n }\n if (event.key === 'PageDown') {\n event.preventDefault();\n moveFocus(addMonths(focusedDay, 1));\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n if (isAvailable(focusedDay)) onSelectDate(isoDay(focusedDay));\n }\n };\n\n const focusedRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n // Move focus to the focused day when it changes. Note: when the parent\n // StepperCalendar transitions Service → Date, its own step-change focus\n // effect *also* tries to focus the body's first interactive element. In\n // practice this effect runs deeper in the tree and after mount, so it\n // wins — but consumers should be aware of the interaction if they\n // tweak the ordering.\n focusedRef.current?.focus();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [focusedDay.getTime()]);\n\n if (loading) {\n return (\n <div\n ref={ref}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n <Skeleton variant=\"text\" size=\"md\" width=\"40%\" />\n <div className={monthGridVariants()}>\n {Array.from({ length: 42 }, (_, i) => (\n <Skeleton\n key={`day-skeleton-${i}`}\n variant=\"rounded\"\n size=\"md\"\n height=\"40px\"\n />\n ))}\n </div>\n </div>\n );\n }\n\n if (availableDates.size === 0) {\n return (\n <div ref={ref}>\n <EmptyState variant=\"no-results\" title={emptyLabel} />\n </div>\n );\n }\n\n return (\n <div ref={ref} className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <div className={monthHeaderVariants()}>\n <IconButton\n icon={<ChevronLeft />}\n aria-label={prevLabel}\n size=\"sm\"\n intent=\"ghost\"\n flipIconInRtl\n onClick={() => setMonth(subMonths(month, 1))}\n />\n <span\n className=\"type-body-sm ds:font-[var(--font-weight-semibold)]\"\n aria-live=\"polite\"\n >\n {monthLabel}\n </span>\n <IconButton\n icon={<ChevronRight />}\n aria-label={nextLabel}\n size=\"sm\"\n intent=\"ghost\"\n flipIconInRtl\n onClick={() => setMonth(addMonths(month, 1))}\n />\n </div>\n {/* eslint-disable-next-line jsx-a11y/interactive-supports-focus -- inner gridcells are individually focusable via roving tabindex */}\n <div\n role=\"grid\"\n aria-label={monthLabel}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n onKeyDown={handleKeyDown}\n >\n <div className={monthGridVariants()} role=\"row\">\n {weekdayLabels.map((wd) => (\n <span\n key={wd}\n role=\"columnheader\"\n className=\"type-meta ds:text-center ds:text-[var(--muted-foreground)]\"\n >\n {wd}\n </span>\n ))}\n </div>\n {Array.from({ length: 6 }, (_, weekIndex) => {\n const week = days.slice(weekIndex * 7, weekIndex * 7 + 7);\n return (\n <div\n key={`week-${weekIndex}`}\n role=\"row\"\n className={monthGridVariants()}\n >\n {week.map((d) => {\n const iso = isoDay(d);\n const outside = !isSameMonth(d, month);\n const available = isAvailable(d);\n const selected = selectedDate === iso;\n const isFocused = isSameDay(d, focusedDay);\n return (\n <button\n key={iso}\n ref={isFocused ? focusedRef : undefined}\n type=\"button\"\n role=\"gridcell\"\n aria-selected={selected}\n aria-disabled={!available || undefined}\n disabled={!available}\n data-outside={outside || undefined}\n tabIndex={isFocused ? 0 : -1}\n onClick={() => available && onSelectDate(iso)}\n className={dayCellVariants()}\n >\n {fnsFormat(d, 'd')}\n </button>\n );\n })}\n </div>\n );\n })}\n </div>\n </div>\n );\n },\n);\nMonthGrid.displayName = 'StepperCalendar.MonthGrid';\n\n/* -------------------------------------------------------------------- */\n/* Time step body */\n/* -------------------------------------------------------------------- */\n\ninterface TimeStepBodyProps {\n date?: string;\n slots: string[];\n selectedTime?: string;\n loading: boolean;\n emptyLabel: string;\n onSelect: (time: string) => void;\n}\n\nfunction TimeStepBody({\n date,\n slots,\n selectedTime,\n loading,\n emptyLabel,\n onSelect,\n}: TimeStepBodyProps) {\n if (!date) return null;\n if (loading) {\n return <SlotGrid days={[{ date, slots: [] }]} state=\"loading\" />;\n }\n if (slots.length === 0) {\n return <EmptyState variant=\"no-results\" title={emptyLabel} />;\n }\n const slotObjects: SlotGridSlot[] = slots.map((time) => {\n // Build a Date from `date` + `time` for `Intl` formatting.\n const [h, m] = time.split(':');\n const start = parseISO(date);\n start.setHours(Number(h), Number(m), 0, 0);\n return {\n id: `${date}T${time}`,\n start,\n label: time,\n };\n });\n const day: SlotGridDay = { date, slots: slotObjects };\n return (\n <SlotGrid\n days={[day]}\n selectedSlotId={selectedTime ? `${date}T${selectedTime}` : undefined}\n onSlotSelect={(slot) => {\n // Validate against the documented `${yyyy-mm-dd}T${HH:mm}` shape so\n // an unexpected ID surfaces as a no-op rather than a malformed time.\n const match = SLOT_ID_PATTERN.exec(slot.id);\n if (match) onSelect(match[2]);\n }}\n />\n );\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nconst StepperCalendar = forwardRef<HTMLDivElement, StepperCalendarProps>(\n (\n {\n services,\n availableDates,\n availableSlots,\n value,\n onChange,\n onSubmit,\n detailsFields,\n loadingDates = false,\n loadingSlots = false,\n stepStatuses,\n layout = 'vertical',\n density = 'comfortable',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const locale = i18n.language ?? 'en';\n const weekStartsOn = useMemo(\n () => resolveFirstDay(locale) as WeekStart,\n [locale],\n );\n\n // Derive max-allowed step from value, then clamp internal active step.\n const maxAllowed = firstIncompleteStep(value);\n const [activeStep, setActiveStep] = useState<number>(maxAllowed);\n // If `value` regresses (consumer cleared a field), pull active back.\n useEffect(() => {\n if (activeStep > maxAllowed) setActiveStep(maxAllowed);\n }, [activeStep, maxAllowed]);\n\n const headingRef = useRef<HTMLHeadingElement>(null);\n const isFirstRenderRef = useRef(true);\n\n // Move focus to the new step's heading when activeStep changes (skip\n // first render to avoid stealing focus on mount). Targeting the heading\n // (rather than the first interactive control) is the pattern recommended\n // by 05-accessibility.mdx — screen-reader users hear the step label\n // before any field, and sighted keyboard users can Tab into the form.\n useEffect(() => {\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false;\n return;\n }\n headingRef.current?.focus();\n }, [activeStep]);\n\n const steps: StepSpec[] = useMemo(\n () => [\n {\n label: t('navigation.stepperCalendar.steps.service'),\n status: stepStatuses?.[0],\n },\n {\n label: t('navigation.stepperCalendar.steps.date'),\n status: stepStatuses?.[1],\n },\n {\n label: t('navigation.stepperCalendar.steps.time'),\n status: stepStatuses?.[2],\n },\n {\n label: t('navigation.stepperCalendar.steps.details'),\n status: stepStatuses?.[3],\n },\n ],\n [stepStatuses, t],\n );\n\n const label = ariaLabel ?? t('navigation.stepperCalendar.label');\n const backLabel = t('navigation.stepperCalendar.actions.back');\n const nextLabel = t('navigation.stepperCalendar.actions.next');\n const submitLabel = t('navigation.stepperCalendar.actions.submit');\n const emptyTimeLabel = t('navigation.stepperCalendar.time.empty');\n const prevMonthLabel = t('navigation.stepperCalendar.date.previousMonth');\n const nextMonthLabel = t('navigation.stepperCalendar.date.nextMonth');\n const serviceGroupLabel = t('navigation.stepperCalendar.steps.service');\n\n const durationLabel = useCallback(\n (minutes: number) =>\n t('navigation.stepperCalendar.service.duration', { minutes }),\n [t],\n );\n\n const canAdvance = (() => {\n if (activeStep === 0) return Boolean(value.serviceId);\n if (activeStep === 1) return Boolean(value.date);\n if (activeStep === 2) return Boolean(value.time);\n return false; // step 3 is terminal\n })();\n\n const handleServiceSelect = (serviceId: string) => {\n onChange({ ...value, serviceId });\n // Auto-advance for conversion. Use a short delay so users see the\n // selection register before the step swaps. Plain `setTimeout` (not\n // `window.setTimeout`) so the component does not assume a DOM global.\n setTimeout(() => {\n setActiveStep((s) => (s === 0 ? 1 : s));\n }, 120);\n };\n\n const handleDateSelect = (date: string) => {\n // Clear time when date changes.\n onChange({ ...value, date, time: undefined });\n };\n\n const handleTimeSelect = (time: string) => {\n onChange({ ...value, time });\n };\n\n const handleBack = () => setActiveStep((s) => Math.max(0, s - 1));\n const handleNext = () =>\n setActiveStep((s) => Math.min(TOTAL_STEPS - 1, s + 1));\n const handleSubmit = () => onSubmit?.(value);\n\n const headingId = `stepper-calendar-step-${activeStep}-heading`;\n const availableDateSet = useMemo(\n () => new Set(availableDates),\n [availableDates],\n );\n\n /* ---- Active step body ---- */\n let body: ReactNode = null;\n if (activeStep === 0) {\n body = (\n <ServiceGrid\n services={services}\n selectedId={value.serviceId}\n onSelect={handleServiceSelect}\n durationLabel={durationLabel}\n groupLabel={serviceGroupLabel}\n />\n );\n } else if (activeStep === 1) {\n body = (\n <MonthGrid\n availableDates={availableDateSet}\n selectedDate={value.date}\n onSelectDate={handleDateSelect}\n loading={loadingDates}\n locale={locale}\n weekStartsOn={weekStartsOn}\n prevLabel={prevMonthLabel}\n nextLabel={nextMonthLabel}\n emptyLabel={emptyTimeLabel}\n />\n );\n } else if (activeStep === 2) {\n body = (\n <TimeStepBody\n date={value.date}\n slots={value.date ? (availableSlots[value.date] ?? []) : []}\n selectedTime={value.time}\n loading={loadingSlots}\n emptyLabel={emptyTimeLabel}\n onSelect={handleTimeSelect}\n />\n );\n } else {\n body = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {detailsFields}\n </div>\n );\n }\n\n const isTerminal = activeStep === TOTAL_STEPS - 1;\n const activeState = stateForStep(\n activeStep,\n activeStep,\n stepStatuses?.[activeStep as 0 | 1 | 2 | 3],\n );\n\n const handle = useMemo<StepperCalendarHandle>(\n () => ({\n getCurrentStep: () => activeStep,\n getTotalSteps: () => TOTAL_STEPS,\n gotoStep: (step: number) => {\n const clamped = Math.max(0, Math.min(step, TOTAL_STEPS - 1));\n // Honour the same gating as the UI: don't jump past first-incomplete.\n const allowed = Math.min(clamped, maxAllowed);\n if (allowed !== activeStep) setActiveStep(allowed);\n },\n next: () => {\n if (activeStep < TOTAL_STEPS - 1 && canAdvance) {\n setActiveStep(activeStep + 1);\n }\n },\n previous: () => {\n if (activeStep > 0) setActiveStep(activeStep - 1);\n },\n }),\n [activeStep, maxAllowed, canAdvance],\n );\n const rootRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => rootRef.current as HTMLDivElement, []);\n useAgentRegistration(stepperCalendarAgent, handle, id);\n\n return (\n <div\n ref={rootRef}\n role=\"region\"\n aria-label={label}\n id={id}\n data-component=\"stepper-calendar\"\n data-component-id={id}\n className={rootVariants({ layout, density, className })}\n {...rest}\n >\n <StepperProgress\n activeStep={activeStep}\n steps={steps}\n aria-label={label}\n />\n <section\n aria-labelledby={headingId}\n className={stepBodyVariants({ density })}\n data-step={activeStep}\n data-state={activeState}\n >\n <h2\n ref={headingRef}\n id={headingId}\n tabIndex={-1}\n className=\"type-body-sm ds:font-[var(--font-weight-semibold)] ds:focus:outline-none\"\n >\n {steps[activeStep]?.label}\n </h2>\n {body}\n <div className={actionsRowVariants()}>\n <Button\n type=\"button\"\n intent=\"ghost\"\n size=\"md\"\n onClick={handleBack}\n disabled={activeStep === 0}\n >\n {backLabel}\n </Button>\n {isTerminal ? (\n <Button\n type=\"button\"\n intent=\"primary\"\n size=\"md\"\n onClick={handleSubmit}\n >\n {submitLabel}\n </Button>\n ) : (\n <Button\n type=\"button\"\n intent=\"primary\"\n size=\"md\"\n onClick={handleNext}\n disabled={!canAdvance}\n >\n {nextLabel}\n </Button>\n )}\n </div>\n </section>\n </div>\n );\n },\n);\nStepperCalendar.displayName = 'StepperCalendar';\n\nexport { StepperCalendar };\n"],"names":["subMonths","date","amount","options","addMonths","stepperCalendarAgent","handle","args","SLOT_ID_PATTERN","TOTAL_STEPS","rootVariants","cva","stepBodyVariants","serviceCardVariants","monthHeaderVariants","monthGridVariants","dayCellVariants","actionsRowVariants","isoDay","fnsFormat","firstIncompleteStep","value","ServiceGrid","forwardRef","services","selectedId","onSelect","durationLabel","groupLabel","ref","itemRefs","useRef","focusedIndex","i","moveFocus","next","wrapped","target","svc","handleKeyDown","event","currentIndex","isRtl","forward","back","jsx","index","checked","jsxs","el","e","MonthGrid","availableDates","selectedDate","onSelectDate","loading","locale","weekStartsOn","prevLabel","nextLabel","emptyLabel","initialMonth","useMemo","parseISO","first","month","setMonth","useState","focusedDay","setFocusedDay","monthStart","startOfMonth","gridStart","startOfWeek","days","cells","addDays","weekdayLabels","base","fmt","_","monthLabel","isAvailable","useCallback","d","isSameMonth","map","focusedRef","useEffect","_a","Skeleton","EmptyState","IconButton","ChevronLeft","ChevronRight","wd","weekIndex","week","iso","outside","available","selected","isFocused","isSameDay","TimeStepBody","slots","selectedTime","SlotGrid","slotObjects","time","h","m","start","slot","match","StepperCalendar","availableSlots","onChange","onSubmit","detailsFields","loadingDates","loadingSlots","stepStatuses","layout","density","ariaLabel","id","className","rest","t","i18n","useTranslation","resolveFirstDay","maxAllowed","activeStep","setActiveStep","headingRef","isFirstRenderRef","steps","label","backLabel","submitLabel","emptyTimeLabel","prevMonthLabel","nextMonthLabel","serviceGroupLabel","minutes","canAdvance","handleServiceSelect","serviceId","s","handleDateSelect","handleTimeSelect","handleBack","handleNext","handleSubmit","headingId","availableDateSet","body","isTerminal","activeState","stateForStep","step","clamped","allowed","rootRef","useImperativeHandle","useAgentRegistration","StepperProgress","Button"],"mappings":";;;;;;;;;;;;;;;;;AA4BO,SAASA,GAAUC,GAAMC,GAAQC,GAAS;AAC/C,SAAOC,EAAUH,GAAM,IAASE,CAAO;AACzC;AChBO,MAAME,KAA4D;AAAA,EACvE,IAAI;AAAA,EACJ,cAAc,CAAC,YAAY,aAAa;AAAA,EACxC,OAAO;AAAA,IACL,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,eAAA;AAAA,IAAe;AAAA,IAE1C,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,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ACd,UAAA;AAAA,kBAAA,gBAAA4B;AAAA,oBAAC4H;AAAA,oBAAA;AAAA,sBACC,MAAK;AAAA,sBACL,QAAO;AAAA,sBACP,MAAK;AAAA,sBACL,SAAShB;AAAA,sBACT,UAAUnB,MAAe;AAAA,sBAExB,UAAAM;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAEFmB,KACC,gBAAAlH;AAAA,oBAAC4H;AAAA,oBAAA;AAAA,sBACC,MAAK;AAAA,sBACL,QAAO;AAAA,sBACP,MAAK;AAAA,sBACL,SAASd;AAAA,sBAER,UAAAd;AAAA,oBAAA;AAAA,kBAAA,IAGH,gBAAAhG;AAAA,oBAAC4H;AAAA,oBAAA;AAAA,sBACC,MAAK;AAAA,sBACL,QAAO;AAAA,sBACP,MAAK;AAAA,sBACL,SAASf;AAAA,sBACT,UAAU,CAACP;AAAA,sBAEV,UAAAxF;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACH,EAAA,CAEJ;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAwD,GAAgB,cAAc;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sun-Eweh5fvi.js","sources":["../../node_modules/lucide-react/dist/esm/icons/monitor.js","../../node_modules/lucide-react/dist/esm/icons/moon.js","../../node_modules/lucide-react/dist/esm/icons/sun.js"],"sourcesContent":["/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"20\", height: \"14\", x: \"2\", y: \"3\", rx: \"2\", key: \"48i651\" }],\n [\"line\", { x1: \"8\", x2: \"16\", y1: \"21\", y2: \"21\", key: \"1svkeh\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"17\", y2: \"21\", key: \"vw1qmm\" }]\n];\nconst Monitor = createLucideIcon(\"monitor\", __iconNode);\n\nexport { __iconNode, Monitor as default };\n//# sourceMappingURL=monitor.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\",\n key: \"kfwtm\"\n }\n ]\n];\nconst Moon = createLucideIcon(\"moon\", __iconNode);\n\nexport { __iconNode, Moon as default };\n//# sourceMappingURL=moon.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }],\n [\"path\", { d: \"M12 2v2\", key: \"tus03m\" }],\n [\"path\", { d: \"M12 20v2\", key: \"1lh1kg\" }],\n [\"path\", { d: \"m4.93 4.93 1.41 1.41\", key: \"149t6j\" }],\n [\"path\", { d: \"m17.66 17.66 1.41 1.41\", key: \"ptbguv\" }],\n [\"path\", { d: \"M2 12h2\", key: \"1t8f8n\" }],\n [\"path\", { d: \"M20 12h2\", key: \"1q8mjw\" }],\n [\"path\", { d: \"m6.34 17.66-1.41 1.41\", key: \"1m8zz5\" }],\n [\"path\", { d: \"m19.07 4.93-1.41 1.41\", key: \"1shlcs\" }]\n];\nconst Sun = createLucideIcon(\"sun\", __iconNode);\n\nexport { __iconNode, Sun as default };\n//# sourceMappingURL=sun.js.map\n"],"names":["__iconNode","Monitor","createLucideIcon","Moon","Sun"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,MAAM,QAAQ,M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9vKBSVn.js","sources":["../../node_modules/lucide-react/dist/esm/icons/eye.js","../../src/components/password-input/password-input.agent.ts","../../src/components/password-input/password-input.tsx","../../src/components/password-input/use-password-requirements.ts"],"sourcesContent":["/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\",\n key: \"1nclc0\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }]\n];\nconst Eye = createLucideIcon(\"eye\", __iconNode);\n\nexport { __iconNode, Eye as default };\n//# sourceMappingURL=eye.js.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — PasswordInput. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { PasswordInputHandle } from './password-input';\n\nexport const passwordInputAgent: AgentAdapter<PasswordInputHandle> = {\n id: 'password-input',\n capabilities: ['edit_inline'],\n state: {\n value: {\n type: 'string',\n descriptionKey: 'ui.agent.passwordInput.state.value',\n description:\n 'Current password value. Never log or persist this off-device.',\n read: (handle) => handle.getValue(),\n },\n isEmpty: {\n type: 'boolean',\n descriptionKey: 'ui.agent.passwordInput.state.isEmpty',\n description: 'Whether the input has no value.',\n read: (handle) => handle.getValue() === '',\n },\n isRevealed: {\n type: 'boolean',\n descriptionKey: 'ui.agent.passwordInput.state.isRevealed',\n description: 'Whether the password is currently shown in plain text.',\n read: (handle) => handle.isRevealed(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: string }',\n descriptionKey: 'ui.agent.passwordInput.actions.setValue',\n description: 'Replace the password value.',\n invoke: (handle, args: { value: string }) => {\n handle.setValue(args.value);\n },\n },\n clear: {\n safety: 'destructive',\n descriptionKey: 'ui.agent.passwordInput.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.passwordInput.actions.focus',\n description: 'Move keyboard focus to the input.',\n invoke: (handle) => {\n handle.focus();\n },\n },\n toggle_visibility: {\n safety: 'read',\n descriptionKey: 'ui.agent.passwordInput.actions.toggleVisibility',\n description: 'Toggle between masked and plain-text display.',\n invoke: (handle) => {\n handle.toggleVisibility();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'password-input',\n description: 'Marks the PasswordInput 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 useEffect,\n useMemo,\n useRef,\n useState,\n type FocusEvent,\n type FormEvent,\n type KeyboardEvent,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { AlertTriangle, Check, Circle, Eye, EyeOff } from 'lucide-react';\nimport { TextInput, type TextInputProps } from '../text-input';\nimport { useFormField } from '../form-field/form-field-context';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { useAgentRegistration } from '../../agent';\nimport { passwordInputAgent } from './password-input.agent';\n\n/** Agent-readiness curated handle for PasswordInput. */\nexport interface PasswordInputHandle {\n getValue: () => string;\n setValue: (value: string) => void;\n clear: () => void;\n focus: () => void;\n isRevealed: () => boolean;\n toggleVisibility: () => void;\n}\n\ntype Strength = 0 | 1 | 2 | 3;\n\ntype SizeKey = NonNullable<TextInputProps['size']>;\n\nconst iconSizeClassBySize: Record<SizeKey, string> = {\n sm: 'ds:size-4',\n md: 'ds:size-[18px]',\n lg: 'ds:size-5',\n};\n\nconst toggleVariants = cva(\n [\n 'ds:absolute ds:inset-y-0 ds:end-0 ds:ps-2 ds:pe-3',\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:text-muted-foreground ds:hover:text-foreground',\n 'ds:bg-transparent ds:border-0 ds:cursor-pointer',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-w-[var(--min-target-size)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-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 ds:disabled:opacity-50',\n ].join(' '),\n);\n\nconst strengthTrackVariants = cva(\n 'ds:h-1 ds:w-full ds:overflow-hidden ds:rounded-[var(--radius-full)] ds:bg-muted',\n);\n\nconst strengthBarVariants = cva(\n [\n 'ds:h-full ds:rounded-[var(--radius-full)]',\n 'ds:transition-all ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n ].join(' '),\n {\n variants: {\n level: {\n 0: 'ds:w-1/4 ds:bg-destructive',\n 1: 'ds:w-1/2 ds:bg-warning',\n 2: 'ds:w-3/4 ds:bg-success',\n 3: 'ds:w-full ds:bg-success',\n },\n },\n defaultVariants: { level: 0 },\n },\n);\n\nconst strengthLabelByLevel: Record<\n Strength,\n 'weak' | 'fair' | 'good' | 'strong'\n> = {\n 0: 'weak',\n 1: 'fair',\n 2: 'good',\n 3: 'strong',\n};\n\nconst requirementRowVariants = cva(\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-meta',\n {\n variants: {\n met: {\n true: 'ds:text-success',\n false: 'ds:text-muted-foreground',\n },\n },\n defaultVariants: { met: false },\n },\n);\n\n/**\n * One row in the live requirements checklist. Consumers either build\n * these inline or pull a pre-built set from `usePasswordRequirements`.\n */\nexport interface PasswordRequirement {\n /** Stable id — keyed render + a11y. */\n id: string;\n /** Already-translated label. The consumer owns the wording. */\n label: string;\n /** Predicate against the current value. Pure, runs on every keystroke. */\n test: (value: string) => boolean;\n}\n\nexport interface PasswordInputProps\n extends\n Omit<TextInputProps, 'type' | 'endAdornment' | 'startAdornment'>,\n VariantProps<typeof strengthBarVariants> {\n /** Callback when reveal state changes (for analytics). */\n onRevealChange?: (revealed: boolean) => void;\n /** Show the strength meter below the input. */\n showStrength?: boolean;\n /** Strength score: 0 = weak, 1 = fair, 2 = good, 3 = strong. */\n strength?: Strength;\n /**\n * Live requirements checklist rendered between the input and the\n * strength meter / caps-lock notice. Each row's predicate runs on\n * every keystroke and the row's `data-state` flips between `\"met\"`\n * and `\"unmet\"`. Backed by `aria-live=\"polite\"` so screen readers\n * announce each transition as a visually-hidden suffix span flips\n * between localised \"met\" / \"not yet met\" copy.\n *\n * Tip: hoist or `useMemo` the array — inlining it in JSX makes the\n * predicate-results memo bust every render. The kit's\n * `usePasswordRequirements` helper already does this.\n */\n requirements?: ReadonlyArray<PasswordRequirement>;\n /**\n * When `true` AND `strength` is not provided, derive a 0–3 score\n * from the proportion of `requirements` satisfied. Lets consumers\n * get the strength bar \"for free\" once they declare requirements.\n */\n deriveStrength?: boolean;\n /**\n * Autocomplete hint. Defaults to 'current-password'.\n * Use 'new-password' for registration/change-password forms.\n */\n autoComplete?: 'current-password' | 'new-password' | (string & {});\n}\n\nexport const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(\n (\n {\n onRevealChange,\n showStrength = false,\n strength,\n requirements,\n deriveStrength = false,\n autoComplete,\n size = 'md',\n disabled,\n name,\n id,\n onKeyDown,\n onKeyUp,\n onBlur,\n onInput,\n defaultValue,\n value,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const ctx = useFormField();\n const effectiveDisabled = ctx.disabled || disabled;\n\n const innerInputRef = useRef<HTMLInputElement | null>(null);\n const composedRef = composeRefs(ref, innerInputRef);\n\n const [revealed, setRevealed] = useState(false);\n const [capsLock, setCapsLock] = useState(false);\n\n // Track the current value internally so the requirements checklist\n // can re-evaluate predicates without forcing consumers to lift the\n // input into a controlled state. The seed is whichever of\n // `value` / `defaultValue` was passed; the `input` listener then\n // keeps it in sync on every keystroke (covers both controlled and\n // uncontrolled callers — for controlled callers we resync to the\n // incoming `value` prop in the effect below).\n const [internalValue, setInternalValue] = useState<string>(() => {\n if (typeof value === 'string') return value;\n if (typeof defaultValue === 'string') return defaultValue;\n return '';\n });\n\n useEffect(() => {\n if (typeof value === 'string') setInternalValue(value);\n }, [value]);\n\n const handleInput = useCallback(\n (event: FormEvent<HTMLInputElement>) => {\n setInternalValue(event.currentTarget.value);\n onInput?.(event);\n },\n [onInput],\n );\n\n const writeValueToInput = useCallback((next: string) => {\n const node = innerInputRef.current;\n if (!node) return;\n const prototype = Object.getPrototypeOf(node) as HTMLInputElement;\n const setter = Object.getOwnPropertyDescriptor(prototype, 'value')?.set;\n setter?.call(node, next);\n node.dispatchEvent(new Event('input', { bubbles: true }));\n node.dispatchEvent(new Event('change', { bubbles: true }));\n }, []);\n\n const handleToggle = useCallback(() => {\n setRevealed((prev) => {\n const next = !prev;\n onRevealChange?.(next);\n return next;\n });\n }, [onRevealChange]);\n\n const detectCaps = useCallback((event: KeyboardEvent<HTMLInputElement>) => {\n if (typeof event.getModifierState === 'function') {\n setCapsLock(event.getModifierState('CapsLock'));\n }\n }, []);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n detectCaps(event);\n onKeyDown?.(event);\n },\n [detectCaps, onKeyDown],\n );\n\n const handleKeyUp = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n detectCaps(event);\n onKeyUp?.(event);\n },\n [detectCaps, onKeyUp],\n );\n\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLInputElement>) => {\n setCapsLock(false);\n onBlur?.(event);\n },\n [onBlur],\n );\n\n const agentHandle = useMemo<PasswordInputHandle>(\n () => ({\n getValue: () => innerInputRef.current?.value ?? '',\n setValue: (next) => writeValueToInput(next),\n clear: () => writeValueToInput(''),\n focus: () => innerInputRef.current?.focus(),\n isRevealed: () => revealed,\n toggleVisibility: () => {\n setRevealed((prev) => {\n const next = !prev;\n onRevealChange?.(next);\n return next;\n });\n },\n }),\n [onRevealChange, revealed, writeValueToInput],\n );\n useAgentRegistration(passwordInputAgent, agentHandle, id);\n\n const iconSizeClass = iconSizeClassBySize[size];\n const toggleLabel = t(\n revealed ? 'inputs.password.toggleHide' : 'inputs.password.toggleShow',\n revealed ? 'Hide password' : 'Show password',\n );\n\n // Evaluate each requirement against the current value. Cheap by\n // construction — predicates are pure regex/length checks supplied\n // by the consumer; the kit doesn't memoise per-row because the\n // map is O(n) over a handful of rules and React would re-render\n // the row anyway when its `data-state` flips.\n const requirementResults = useMemo(\n () =>\n requirements?.map((req) => ({\n ...req,\n met: req.test(internalValue),\n })) ?? null,\n [requirements, internalValue],\n );\n\n // Derive a 0–3 score from the satisfied proportion when the\n // consumer hasn't supplied an explicit `strength`. Formula:\n // `floor((satisfied / total) * 4)`, clamped to 3 so a fully-met\n // checklist matches the explicit \"strong\" level. With zero\n // requirements we fall back to 0 — meaningless on its own but\n // never displayed since `showStrength` is what controls the bar.\n const derivedStrength: Strength = useMemo(() => {\n if (!deriveStrength || !requirementResults?.length) return 0;\n const satisfied = requirementResults.filter((r) => r.met).length;\n const total = requirementResults.length;\n return Math.min(3, Math.floor((satisfied / total) * 4)) as Strength;\n }, [deriveStrength, requirementResults]);\n\n const effectiveStrength: Strength =\n strength !== undefined ? strength : deriveStrength ? derivedStrength : 0;\n const strengthKey = strengthLabelByLevel[effectiveStrength];\n const strengthText = t(\n `inputs.password.strength.${strengthKey}`,\n strengthKey.charAt(0).toUpperCase() + strengthKey.slice(1),\n );\n\n return (\n <div\n data-component=\"password-input\"\n data-component-id={id}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n >\n <div className=\"ds:relative\">\n <TextInput\n ref={composedRef}\n id={id}\n type={revealed ? 'text' : 'password'}\n autoComplete={autoComplete ?? 'current-password'}\n name={name ?? 'password'}\n spellCheck={false}\n autoCapitalize=\"none\"\n autoCorrect=\"off\"\n size={size}\n disabled={effectiveDisabled}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n onBlur={handleBlur}\n onInput={handleInput}\n value={value}\n defaultValue={defaultValue}\n endAdornment={\n <span aria-hidden=\"true\" className=\"ds:block ds:size-4\" />\n }\n className={className}\n {...rest}\n />\n <button\n type=\"button\"\n aria-pressed={revealed}\n aria-label={toggleLabel}\n disabled={effectiveDisabled}\n onClick={handleToggle}\n className={toggleVariants()}\n >\n {revealed ? (\n <EyeOff aria-hidden=\"true\" className={iconSizeClass} />\n ) : (\n <Eye aria-hidden=\"true\" className={iconSizeClass} />\n )}\n </button>\n </div>\n\n {requirementResults && requirementResults.length > 0 ? (\n // `role=\"list\"` / `role=\"listitem\"` are set explicitly even\n // though they're the implicit roles on <ul>/<li> — Safari\n // VoiceOver strips the implicit list role when CSS sets\n // `list-style: none` (which `ds:list-none` does), so the\n // redundancy is load-bearing for AT, not a lint nit.\n //\n // aria-live=\"polite\" announces transitions as the per-row\n // `.ds:sr-only` state suffix flips between \"met\" / \"not yet\n // met\". aria-live observes text-content mutations, not\n // attribute or class changes, so the data-state attribute\n // alone wouldn't trigger an announcement — the sr-only span\n // is the load-bearing piece for AT users.\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <ul\n role=\"list\"\n aria-live=\"polite\"\n data-component=\"password-requirements\"\n className=\"ds:list-none ds:m-0 ds:p-0 ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\"\n >\n {requirementResults.map((req) => (\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <li\n key={req.id}\n role=\"listitem\"\n data-state={req.met ? 'met' : 'unmet'}\n className={requirementRowVariants({ met: req.met })}\n >\n {req.met ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-3.5 ds:text-success ds:shrink-0\"\n />\n ) : (\n <Circle\n aria-hidden=\"true\"\n className=\"ds:size-3.5 ds:shrink-0\"\n />\n )}\n <span>{req.label}</span>\n <span className=\"ds:sr-only\">\n {' — '}\n {req.met\n ? t('inputs.password.requirements.met', 'met')\n : t('inputs.password.requirements.unmet', 'not yet met')}\n </span>\n </li>\n ))}\n </ul>\n ) : null}\n\n {capsLock ? (\n <span\n role=\"status\"\n aria-live=\"polite\"\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-meta ds:text-warning\"\n >\n <AlertTriangle aria-hidden=\"true\" className=\"ds:size-3.5\" />\n {t('inputs.password.capsLock', 'Caps Lock is on')}\n </span>\n ) : null}\n\n {showStrength ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <div\n role=\"progressbar\"\n aria-valuenow={effectiveStrength}\n aria-valuemin={0}\n aria-valuemax={3}\n aria-label={t(\n 'inputs.password.strengthLabel',\n 'Password strength',\n )}\n aria-valuetext={strengthText}\n className={strengthTrackVariants()}\n >\n <div\n className={strengthBarVariants({ level: effectiveStrength })}\n />\n </div>\n <span\n aria-hidden=\"true\"\n className=\"type-meta ds:text-muted-foreground\"\n >\n {strengthText}\n </span>\n </div>\n ) : null}\n </div>\n );\n },\n);\n\nPasswordInput.displayName = 'PasswordInput';\n","import { useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport type { PasswordRequirement } from './password-input';\n\nexport interface UsePasswordRequirementsOptions {\n /**\n * Minimum password length. When set, adds a \"length\" requirement.\n * Pass `12` (or whatever the server-side regex enforces) so the\n * inline checklist tells users the same rule they'll bounce off\n * server-side. When omitted, no length row is rendered.\n */\n minLength?: number;\n /** Adds an \"uppercase letter\" requirement when true. */\n uppercase?: boolean;\n /** Adds a \"lowercase letter\" requirement when true. */\n lowercase?: boolean;\n /** Adds a \"digit\" requirement when true. */\n digit?: boolean;\n /** Adds a \"symbol\" requirement when true. Matches anything outside `[A-Za-z0-9\\s]`. */\n symbol?: boolean;\n /**\n * Adds a \"no spaces\" requirement when true. Fails if the value\n * contains any whitespace character (space, tab, non-breaking space,\n * narrow no-break space, etc.). Useful to catch paste-time stray\n * whitespace from credential managers.\n */\n noSpaces?: boolean;\n}\n\n/**\n * Builds the common set of password requirements with i18n-resolved\n * labels. Designed for the AlfaDocs platform's patient-registration\n * server-side regex (`/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{12,}$/`) but\n * generic enough for any consumer.\n *\n * Each opt-in flag adds one row to the returned array, in a stable\n * visual order (length → uppercase → lowercase → digit → symbol → noSpaces).\n * Predicates are pure and run on every keystroke.\n *\n * @example\n * const requirements = usePasswordRequirements({\n * minLength: 12,\n * uppercase: true,\n * lowercase: true,\n * digit: true,\n * noSpaces: true,\n * });\n * <PasswordInput requirements={requirements} deriveStrength />\n */\nexport function usePasswordRequirements(\n opts: UsePasswordRequirementsOptions = {},\n): PasswordRequirement[] {\n const { t } = useTranslation();\n const { minLength, uppercase, lowercase, digit, symbol, noSpaces } = opts;\n\n return useMemo(() => {\n const list: PasswordRequirement[] = [];\n\n if (typeof minLength === 'number' && minLength > 0) {\n list.push({\n id: 'length',\n label: t('inputs.password.requirements.length', {\n count: minLength,\n defaultValue: `At least ${minLength} characters`,\n }),\n test: (v) => v.length >= minLength,\n });\n }\n\n if (uppercase) {\n list.push({\n id: 'uppercase',\n label: t(\n 'inputs.password.requirements.uppercase',\n 'One uppercase letter',\n ),\n test: (v) => /\\p{Lu}/u.test(v),\n });\n }\n\n if (lowercase) {\n list.push({\n id: 'lowercase',\n label: t(\n 'inputs.password.requirements.lowercase',\n 'One lowercase letter',\n ),\n test: (v) => /\\p{Ll}/u.test(v),\n });\n }\n\n if (digit) {\n list.push({\n id: 'digit',\n label: t('inputs.password.requirements.digit', 'One number'),\n test: (v) => /\\p{Nd}/u.test(v),\n });\n }\n\n if (symbol) {\n list.push({\n id: 'symbol',\n label: t('inputs.password.requirements.symbol', 'One symbol'),\n // Anything that isn't a letter, number, or whitespace counts.\n // `\\p{L}` + `\\p{N}` keep this Unicode-aware so non-Latin\n // alphabets (Arabic, Chinese, …) aren't mis-classified as\n // symbols.\n test: (v) => /[^\\p{L}\\p{N}\\s]/u.test(v),\n });\n }\n\n if (noSpaces) {\n list.push({\n id: 'no-spaces',\n label: t('inputs.password.requirements.noSpaces', 'No spaces'),\n // `\\s` covers ASCII space + tab + newline. The explicit\n // U+00A0 (non-breaking space) and U+202F (narrow no-break\n // space) catch the two paste-time characters credential\n // managers and rich-text editors most often inject without\n // the user noticing — those are NOT always in `\\s`.\n // Authored via hex escapes (not literal characters) so the\n // source file passes `no-irregular-whitespace`.\n test: (v) => !/[\\s\\u00A0\\u202F]/.test(v),\n });\n }\n\n return list;\n }, [t, minLength, uppercase, lowercase, digit, symbol, noSpaces]);\n}\n"],"names":["__iconNode","Eye","createLucideIcon","passwordInputAgent","handle","args","iconSizeClassBySize","toggleVariants","cva","strengthTrackVariants","strengthBarVariants","strengthLabelByLevel","requirementRowVariants","PasswordInput","forwardRef","onRevealChange","showStrength","strength","requirements","deriveStrength","autoComplete","size","disabled","name","id","onKeyDown","onKeyUp","onBlur","onInput","defaultValue","value","className","rest","ref","t","useTranslation","effectiveDisabled","useFormField","innerInputRef","useRef","composedRef","composeRefs","revealed","setRevealed","useState","capsLock","setCapsLock","internalValue","setInternalValue","useEffect","handleInput","useCallback","event","writeValueToInput","next","node","prototype","setter","_a","handleToggle","prev","detectCaps","handleKeyDown","handleKeyUp","handleBlur","agentHandle","useMemo","useAgentRegistration","iconSizeClass","toggleLabel","requirementResults","req","derivedStrength","satisfied","r","total","effectiveStrength","strengthKey","strengthText","jsxs","jsx","TextInput","EyeOff","Check","Circle","AlertTriangle","usePasswordRequirements","opts","minLength","uppercase","lowercase","digit","symbol","noSpaces","list","v"],"mappings":";;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE,CAAC,UAAU,EA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ACJ,OAAO5D,EAAE,sCAAsC,YAAY;AAAA,MAC3D,MAAM,CAAC6D,MAAM,WAAA,WAAA,GAAA,EAAU,KAAKA,CAAC;AAAA,IAAA,CAC9B,GAGCH,KACFE,EAAK,KAAK;AAAA,MACR,IAAI;AAAA,MACJ,OAAO5D,EAAE,uCAAuC,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,MAK5D,MAAM,CAAC6D,MAAM,mBAAmB,KAAKA,CAAC;AAAA,IAAA,CACvC,GAGCF,KACFC,EAAK,KAAK;AAAA,MACR,IAAI;AAAA,MACJ,OAAO5D,EAAE,yCAAyC,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAQ7D,MAAM,CAAC6D,MAAM,CAAC,mBAAmB,KAAKA,CAAC;AAAA,IAAA,CACxC,GAGID;AAAA,EACT,GAAG,CAAC5D,GAAGsD,GAAWC,GAAWC,GAAWC,GAAOC,GAAQC,CAAQ,CAAC;AAClE;","x_google_ignoreList":[0]}
@@ -1,145 +0,0 @@
1
- import { useSyncExternalStore as A, useEffect as p, useCallback as b } from "react";
2
- const y = "alfadocs-ui.theme", w = "alfadocs-ui.accessibility", i = {
3
- light: "theme-light",
4
- dark: "theme-dark",
5
- accessible: "theme-accessible"
6
- }, M = "(prefers-color-scheme: dark)", C = "(prefers-contrast: more)";
7
- function S(e) {
8
- if (typeof window > "u") return null;
9
- try {
10
- return window.localStorage.getItem(e);
11
- } catch {
12
- return null;
13
- }
14
- }
15
- function g(e, t) {
16
- if (!(typeof window > "u"))
17
- try {
18
- t === null ? window.localStorage.removeItem(e) : window.localStorage.setItem(e, t);
19
- } catch {
20
- }
21
- }
22
- function L(e) {
23
- return e === "light" || e === "dark" || e === "system";
24
- }
25
- function T(e) {
26
- return e === "default" || e === "accessible" || e === "system";
27
- }
28
- function _() {
29
- const e = S(y), t = S(w), r = typeof window < "u" && typeof window.matchMedia == "function";
30
- return {
31
- theme: L(e) ? e : "system",
32
- accessibility: T(t) ? t : "system",
33
- prefersDark: r ? window.matchMedia(M).matches : !1,
34
- prefersMoreContrast: r ? window.matchMedia(C).matches : !1
35
- };
36
- }
37
- let s = _();
38
- const h = /* @__PURE__ */ new Set();
39
- function c(e) {
40
- e.theme === s.theme && e.accessibility === s.accessibility && e.prefersDark === s.prefersDark && e.prefersMoreContrast === s.prefersMoreContrast || (s = e, h.forEach((t) => t()));
41
- }
42
- function D(e) {
43
- return h.add(e), () => {
44
- h.delete(e);
45
- };
46
- }
47
- function I() {
48
- return s;
49
- }
50
- function R() {
51
- return {
52
- theme: "system",
53
- accessibility: "system",
54
- prefersDark: !1,
55
- prefersMoreContrast: !1
56
- };
57
- }
58
- let d = 0, u = null, f = null, l = null;
59
- function O(e) {
60
- c({ ...s, prefersDark: e.matches });
61
- }
62
- function V(e) {
63
- c({ ...s, prefersMoreContrast: e.matches });
64
- }
65
- function H(e) {
66
- if (e.key === y) {
67
- const t = L(e.newValue) ? e.newValue : "system";
68
- c({ ...s, theme: t });
69
- } else if (e.key === w) {
70
- const t = T(e.newValue) ? e.newValue : "system";
71
- c({ ...s, accessibility: t });
72
- }
73
- }
74
- function E(e, t) {
75
- return typeof e.addEventListener == "function" ? (e.addEventListener("change", t), () => e.removeEventListener("change", t)) : (e.addListener(t), () => e.removeListener(t));
76
- }
77
- function Y() {
78
- return d += 1, d > 1 || typeof window > "u" || (typeof window.matchMedia == "function" && (u = window.matchMedia(M), f = window.matchMedia(C), c({
79
- ...s,
80
- prefersDark: u.matches,
81
- prefersMoreContrast: f.matches
82
- }), a = E(u, O), o = E(f, V)), l = H, window.addEventListener("storage", l)), m;
83
- }
84
- let a = null, o = null;
85
- function m() {
86
- d -= 1, !(d > 0) && (a == null || a(), o == null || o(), a = null, o = null, u = null, f = null, l && typeof window < "u" && window.removeEventListener("storage", l), l = null);
87
- }
88
- function k(e) {
89
- const t = e.theme === "system" ? e.prefersDark ? "dark" : "light" : e.theme, r = e.accessibility === "system" ? e.prefersMoreContrast : e.accessibility === "accessible";
90
- return t === "dark" && r ? "dark-accessible" : t === "dark" ? "dark" : r ? "light-accessible" : "light";
91
- }
92
- function v(e) {
93
- switch (e) {
94
- case "light":
95
- return [i.light];
96
- case "dark":
97
- return [i.dark];
98
- case "light-accessible":
99
- return [i.light, i.accessible];
100
- case "dark-accessible":
101
- return [i.dark, i.accessible];
102
- }
103
- }
104
- const G = [
105
- i.light,
106
- i.dark,
107
- i.accessible
108
- ];
109
- function K(e) {
110
- if (typeof document > "u") return;
111
- const t = document.documentElement, r = new Set(v(e));
112
- G.forEach((n) => {
113
- r.has(n) ? t.classList.add(n) : t.classList.remove(n);
114
- });
115
- }
116
- function U() {
117
- const e = A(D, I, R);
118
- p(() => Y(), []), p(() => {
119
- K(k(e));
120
- }, [e]);
121
- const t = b((n) => {
122
- g(y, n === "system" ? null : n), c({ ...s, theme: n });
123
- }, []), r = b((n) => {
124
- g(
125
- w,
126
- n === "system" ? null : n
127
- ), c({ ...s, accessibility: n });
128
- }, []);
129
- return {
130
- theme: e.theme,
131
- accessibility: e.accessibility,
132
- resolvedTheme: k(e),
133
- setTheme: t,
134
- setAccessibility: r
135
- };
136
- }
137
- export {
138
- w as A,
139
- i as T,
140
- y as a,
141
- k as r,
142
- v as t,
143
- U as u
144
- };
145
- //# sourceMappingURL=use-theme-B1cwAXJR.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-theme-B1cwAXJR.js","sources":["../../src/hooks/use-theme.ts"],"sourcesContent":["import { useCallback, useEffect, useSyncExternalStore } from 'react';\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* */\n/* Modelled as two orthogonal axes per `src/docs/04-theming.mdx` — base */\n/* colour scheme and AAA contrast modifier — plus an explicit `system` */\n/* value meaning \"no user override, follow OS preferences\". The four */\n/* concrete applied themes called out in `hooks-gaps.mdx` are exposed */\n/* via `resolvedTheme` for code that needs to branch on the composed */\n/* result (e.g. data-visualisation libraries with their own theme */\n/* machinery). */\n/* -------------------------------------------------------------------- */\n\nexport type ThemeBase = 'light' | 'dark';\nexport type ThemePreference = ThemeBase | 'system';\nexport type AccessibilityPreference = 'default' | 'accessible' | 'system';\nexport type ResolvedTheme =\n | 'light'\n | 'dark'\n | 'light-accessible'\n | 'dark-accessible';\n\nexport interface UseThemeReturn {\n /** User's stored base-theme preference, or `'system'` when no override is set. */\n theme: ThemePreference;\n /** User's stored AAA-contrast preference, or `'system'` when no override is set. */\n accessibility: AccessibilityPreference;\n /** The theme actually applied to the DOM once the preferences + OS signals are resolved. */\n resolvedTheme: ResolvedTheme;\n /** Persist a new base-theme preference. Pass `'system'` to clear the override. */\n setTheme: (next: ThemePreference) => void;\n /** Persist a new AAA-contrast preference. Pass `'system'` to clear the override. */\n setAccessibility: (next: AccessibilityPreference) => void;\n}\n\n/* -------------------------------------------------------------------- */\n/* SSR-safe named constants */\n/* */\n/* Exported so a consuming app's SSR shim can plant the correct classes */\n/* on `<html>` at render time without importing the whole hook (which */\n/* pulls in React, `useSyncExternalStore`, etc.). See the acceptance */\n/* criterion in `src/user_stories/to-do/review-findings/hooks-gaps.mdx`. */\n/* -------------------------------------------------------------------- */\n\nexport const THEME_STORAGE_KEY = 'alfadocs-ui.theme';\nexport const ACCESSIBILITY_STORAGE_KEY = 'alfadocs-ui.accessibility';\n\nexport const THEME_CLASS = {\n light: 'theme-light',\n dark: 'theme-dark',\n accessible: 'theme-accessible',\n} as const;\n\nconst COLOR_SCHEME_QUERY = '(prefers-color-scheme: dark)';\nconst CONTRAST_QUERY = '(prefers-contrast: more)';\n\n/* -------------------------------------------------------------------- */\n/* Persistence — guarded against private-mode / disabled-storage throws */\n/* -------------------------------------------------------------------- */\n\nfunction safeReadStorage(key: string): string | null {\n if (typeof window === 'undefined') return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n}\n\nfunction safeWriteStorage(key: string, value: string | null): void {\n if (typeof window === 'undefined') return;\n try {\n if (value === null) {\n window.localStorage.removeItem(key);\n } else {\n window.localStorage.setItem(key, value);\n }\n } catch {\n /* Storage can throw in private mode or when quota is exceeded — the\n in-memory state is the source of truth, so a write failure is\n recoverable. Silent-fail matches how `usePrefersReducedMotion`\n handles `matchMedia` being unavailable. */\n }\n}\n\nfunction isValidTheme(value: unknown): value is ThemePreference {\n return value === 'light' || value === 'dark' || value === 'system';\n}\n\nfunction isValidAccessibility(\n value: unknown,\n): value is AccessibilityPreference {\n return value === 'default' || value === 'accessible' || value === 'system';\n}\n\n/* -------------------------------------------------------------------- */\n/* External store — singleton so every `useTheme()` consumer in the */\n/* tree reads the same snapshot and only one `matchMedia` / storage */\n/* subscription is registered per tab. */\n/* -------------------------------------------------------------------- */\n\ninterface ThemeSnapshot {\n theme: ThemePreference;\n accessibility: AccessibilityPreference;\n prefersDark: boolean;\n prefersMoreContrast: boolean;\n}\n\nfunction readInitialSnapshot(): ThemeSnapshot {\n const storedTheme = safeReadStorage(THEME_STORAGE_KEY);\n const storedA11y = safeReadStorage(ACCESSIBILITY_STORAGE_KEY);\n\n const hasMatchMedia =\n typeof window !== 'undefined' && typeof window.matchMedia === 'function';\n\n return {\n theme: isValidTheme(storedTheme) ? storedTheme : 'system',\n accessibility: isValidAccessibility(storedA11y) ? storedA11y : 'system',\n prefersDark: hasMatchMedia\n ? window.matchMedia(COLOR_SCHEME_QUERY).matches\n : false,\n prefersMoreContrast: hasMatchMedia\n ? window.matchMedia(CONTRAST_QUERY).matches\n : false,\n };\n}\n\nlet snapshot: ThemeSnapshot = readInitialSnapshot();\nconst listeners = new Set<() => void>();\n\nfunction commit(next: ThemeSnapshot): void {\n if (\n next.theme === snapshot.theme &&\n next.accessibility === snapshot.accessibility &&\n next.prefersDark === snapshot.prefersDark &&\n next.prefersMoreContrast === snapshot.prefersMoreContrast\n ) {\n return;\n }\n snapshot = next;\n listeners.forEach((listener) => listener());\n}\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\nfunction getSnapshot(): ThemeSnapshot {\n return snapshot;\n}\n\nfunction getServerSnapshot(): ThemeSnapshot {\n return {\n theme: 'system',\n accessibility: 'system',\n prefersDark: false,\n prefersMoreContrast: false,\n };\n}\n\n/* -------------------------------------------------------------------- */\n/* Media-query subscriptions — mounted once per tab, on the first time */\n/* `useTheme` is called in the browser. Cleanup happens via a ref-count */\n/* in the subscription effect below. */\n/* -------------------------------------------------------------------- */\n\nlet mediaSubscriberCount = 0;\nlet colorSchemeMql: MediaQueryList | null = null;\nlet contrastMql: MediaQueryList | null = null;\nlet storageHandler: ((event: StorageEvent) => void) | null = null;\n\nfunction onColorSchemeChange(event: MediaQueryListEvent): void {\n commit({ ...snapshot, prefersDark: event.matches });\n}\n\nfunction onContrastChange(event: MediaQueryListEvent): void {\n commit({ ...snapshot, prefersMoreContrast: event.matches });\n}\n\nfunction onStorage(event: StorageEvent): void {\n if (event.key === THEME_STORAGE_KEY) {\n const next = isValidTheme(event.newValue) ? event.newValue : 'system';\n commit({ ...snapshot, theme: next });\n } else if (event.key === ACCESSIBILITY_STORAGE_KEY) {\n const next = isValidAccessibility(event.newValue)\n ? event.newValue\n : 'system';\n commit({ ...snapshot, accessibility: next });\n }\n}\n\nfunction attachMqlListener(\n mql: MediaQueryList,\n handler: (event: MediaQueryListEvent) => void,\n): () => void {\n if (typeof mql.addEventListener === 'function') {\n mql.addEventListener('change', handler);\n return () => mql.removeEventListener('change', handler);\n }\n // Safari < 14 fallback.\n mql.addListener(handler);\n return () => mql.removeListener(handler);\n}\n\nfunction mountMediaSubscriptions(): () => void {\n mediaSubscriberCount += 1;\n if (mediaSubscriberCount > 1) {\n return disposeOneSubscriber;\n }\n\n if (typeof window === 'undefined') {\n return disposeOneSubscriber;\n }\n\n if (typeof window.matchMedia === 'function') {\n colorSchemeMql = window.matchMedia(COLOR_SCHEME_QUERY);\n contrastMql = window.matchMedia(CONTRAST_QUERY);\n // Re-sync the module snapshot in case the OS preferences changed\n // between initial read and first effect run (hydration window).\n commit({\n ...snapshot,\n prefersDark: colorSchemeMql.matches,\n prefersMoreContrast: contrastMql.matches,\n });\n detachColorScheme = attachMqlListener(colorSchemeMql, onColorSchemeChange);\n detachContrast = attachMqlListener(contrastMql, onContrastChange);\n }\n\n // Cross-tab sync — `storage` only fires on *other* tabs, so the local\n // tab still needs setTheme to update snapshot directly (it does).\n storageHandler = onStorage;\n window.addEventListener('storage', storageHandler);\n\n return disposeOneSubscriber;\n}\n\nlet detachColorScheme: (() => void) | null = null;\nlet detachContrast: (() => void) | null = null;\n\nfunction disposeOneSubscriber(): void {\n mediaSubscriberCount -= 1;\n if (mediaSubscriberCount > 0) return;\n detachColorScheme?.();\n detachContrast?.();\n detachColorScheme = null;\n detachContrast = null;\n colorSchemeMql = null;\n contrastMql = null;\n if (storageHandler && typeof window !== 'undefined') {\n window.removeEventListener('storage', storageHandler);\n }\n storageHandler = null;\n}\n\n/* -------------------------------------------------------------------- */\n/* Resolution helpers */\n/* -------------------------------------------------------------------- */\n\nexport function resolveTheme(state: ThemeSnapshot): ResolvedTheme {\n const base: ThemeBase =\n state.theme === 'system'\n ? state.prefersDark\n ? 'dark'\n : 'light'\n : state.theme;\n const accessible =\n state.accessibility === 'system'\n ? state.prefersMoreContrast\n : state.accessibility === 'accessible';\n if (base === 'dark' && accessible) return 'dark-accessible';\n if (base === 'dark') return 'dark';\n if (accessible) return 'light-accessible';\n return 'light';\n}\n\nexport function themeClassList(resolved: ResolvedTheme): string[] {\n switch (resolved) {\n case 'light':\n return [THEME_CLASS.light];\n case 'dark':\n return [THEME_CLASS.dark];\n case 'light-accessible':\n return [THEME_CLASS.light, THEME_CLASS.accessible];\n case 'dark-accessible':\n return [THEME_CLASS.dark, THEME_CLASS.accessible];\n }\n}\n\nconst ALL_THEME_CLASSES = [\n THEME_CLASS.light,\n THEME_CLASS.dark,\n THEME_CLASS.accessible,\n];\n\nfunction applyToDocument(resolved: ResolvedTheme): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n const next = new Set(themeClassList(resolved));\n ALL_THEME_CLASSES.forEach((cls) => {\n if (next.has(cls)) {\n root.classList.add(cls);\n } else {\n root.classList.remove(cls);\n }\n });\n}\n\n/* -------------------------------------------------------------------- */\n/* Public hook */\n/* -------------------------------------------------------------------- */\n\n/**\n * Read and update the DS theme preference.\n *\n * - `theme` / `accessibility` are the stored user preferences, with\n * `'system'` meaning \"no override — follow OS\".\n * - `resolvedTheme` composes preferences + live `matchMedia` state into\n * one of the four concrete themes.\n * - `setTheme` / `setAccessibility` persist the override to\n * `localStorage` and re-apply classes to `document.documentElement`\n * synchronously. Pass `'system'` to clear.\n *\n * Singleton under the hood — every hook call shares one `matchMedia`\n * subscription, so mounting the hook many times does not multiply the\n * listener count. The hook also listens for cross-tab `storage` events\n * so a theme change in tab A is reflected in tab B without a reload.\n */\nexport function useTheme(): UseThemeReturn {\n const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n\n useEffect(() => mountMediaSubscriptions(), []);\n\n useEffect(() => {\n applyToDocument(resolveTheme(state));\n }, [state]);\n\n const setTheme = useCallback((next: ThemePreference) => {\n safeWriteStorage(THEME_STORAGE_KEY, next === 'system' ? null : next);\n commit({ ...snapshot, theme: next });\n }, []);\n\n const setAccessibility = useCallback((next: AccessibilityPreference) => {\n safeWriteStorage(\n ACCESSIBILITY_STORAGE_KEY,\n next === 'system' ? null : next,\n );\n commit({ ...snapshot, accessibility: next });\n }, []);\n\n return {\n theme: state.theme,\n accessibility: state.accessibility,\n resolvedTheme: resolveTheme(state),\n setTheme,\n setAccessibility,\n };\n}\n\n/* -------------------------------------------------------------------- */\n/* Test hook — reset module-level state between tests. Not exported */\n/* from the barrel. */\n/* -------------------------------------------------------------------- */\n\nexport function __resetThemeStoreForTests(): void {\n snapshot = readInitialSnapshot();\n listeners.clear();\n mediaSubscriberCount = 0;\n detachColorScheme?.();\n detachContrast?.();\n detachColorScheme = null;\n detachContrast = null;\n colorSchemeMql = null;\n contrastMql = null;\n if (storageHandler && typeof window !== 'undefined') {\n window.removeEventListener('storage', storageHandler);\n }\n storageHandler = null;\n}\n"],"names":["THEME_STORAGE_KEY","ACCESSIBILITY_STORAGE_KEY","THEME_CLASS","COLOR_SCHEME_QUERY","CONTRAST_QUERY","safeReadStorage","key","safeWriteStorage","value","isValidTheme","isValidAccessibility","readInitialSnapshot","storedTheme","storedA11y","hasMatchMedia","snapshot","listeners","commit","next","listener","subscribe","getSnapshot","getServerSnapshot","mediaSubscriberCount","colorSchemeMql","contrastMql","storageHandler","onColorSchemeChange","event","onContrastChange","onStorage","attachMqlListener","mql","handler","mountMediaSubscriptions","detachColorScheme","detachContrast","disposeOneSubscriber","resolveTheme","state","base","accessible","themeClassList","resolved","ALL_THEME_CLASSES","applyToDocument","root","cls","useTheme","useSyncExternalStore","useEffect","setTheme","useCallback","setAccessibility"],"mappings":";AA6CO,MAAMA,IAAoB,qBACpBC,IAA4B,6BAE5BC,IAAc;AAAA,EACzB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,YAAY;AACd,GAEMC,IAAqB,gCACrBC,IAAiB;AAMvB,SAASC,EAAgBC,GAA4B;AACnD,MAAI,OAAO,SAAW,IAAa,QAAO;AAC1C,MAAI;AACF,WAAO,OAAO,aAAa,QAAQA,CAAG;AAAA,EACxC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAASC,EAAiBD,GAAaE,GAA4B;AACjE,MAAI,SAAO,SAAW;AACtB,QAAI;AACF,MAAIA,MAAU,OACZ,OAAO,aAAa,WAAWF,CAAG,IAElC,OAAO,aAAa,QAAQA,GAAKE,CAAK;AAAA,IAE1C,QAAQ;AAAA,IAKR;AACF;AAEA,SAASC,EAAaD,GAA0C;AAC9D,SAAOA,MAAU,WAAWA,MAAU,UAAUA,MAAU;AAC5D;AAEA,SAASE,EACPF,GACkC;AAClC,SAAOA,MAAU,aAAaA,MAAU,gBAAgBA,MAAU;AACpE;AAeA,SAASG,IAAqC;AAC5C,QAAMC,IAAcP,EAAgBL,CAAiB,GAC/Ca,IAAaR,EAAgBJ,C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AAAA,MACEN;AAAA,MACAiB,MAAS,WAAW,OAAOA;AAAA,IAAA,GAE7BD,EAAO,EAAE,GAAGF,GAAU,eAAeG,GAAM;AAAA,EAC7C,GAAG,CAAA,CAAE;AAEL,SAAO;AAAA,IACL,OAAOqB,EAAM;AAAA,IACb,eAAeA,EAAM;AAAA,IACrB,eAAeD,EAAaC,CAAK;AAAA,IACjC,UAAAY;AAAA,IACA,kBAAAE;AAAA,EAAA;AAEJ;"}
@@ -1,4 +0,0 @@
1
- export { StepperCalendar } from './stepper-calendar';
2
- export type { StepperCalendarProps, StepperCalendarHandle, StepperCalendarValue, ServiceOption, } from './stepper-calendar';
3
- export { stepperCalendarAgent } from './stepper-calendar.agent';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/stepper-calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,6 +0,0 @@
1
- import { S as r, s as p } from "../../_chunks/stepper-calendar-BLOJUE0-.js";
2
- export {
3
- r as StepperCalendar,
4
- p as stepperCalendarAgent
5
- };
6
- //# sourceMappingURL=index.js.map
@@ -1,4 +0,0 @@
1
- import type { AgentAdapter } from '../../agent/types';
2
- import type { StepperCalendarHandle } from './stepper-calendar';
3
- export declare const stepperCalendarAgent: AgentAdapter<StepperCalendarHandle>;
4
- //# sourceMappingURL=stepper-calendar.agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stepper-calendar.agent.d.ts","sourceRoot":"","sources":["../../../src/components/stepper-calendar/stepper-calendar.agent.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,qBAAqB,CA2DpE,CAAC"}
@@ -1,62 +0,0 @@
1
- import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
- import { type VariantProps } from 'class-variance-authority';
3
- import type { StepStatus } from '../_shared/stepper';
4
- /** Service offering rendered on Step 1. Data is API-driven by the consumer. */
5
- export interface StepperCalendarService {
6
- id: string;
7
- /** Already-translated label (consumer is responsible for i18n of data). */
8
- label: string;
9
- /** Duration in minutes — shown alongside the label. */
10
- durationMin: number;
11
- /** Optional secondary line. */
12
- description?: string;
13
- }
14
- /** Re-exported for convenience. */
15
- export type ServiceOption = StepperCalendarService;
16
- /** Booking selection — controlled by the consumer. */
17
- export interface StepperCalendarValue {
18
- serviceId?: string;
19
- /** ISO yyyy-mm-dd. */
20
- date?: string;
21
- /** HH:mm (24h). */
22
- time?: string;
23
- }
24
- declare const rootVariants: (props?: ({
25
- layout?: "horizontal" | "vertical" | null | undefined;
26
- density?: "compact" | "comfortable" | null | undefined;
27
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
28
- export interface StepperCalendarProps extends Omit<ComponentPropsWithoutRef<'div'>, 'aria-label' | 'onChange' | 'onSubmit'>, VariantProps<typeof rootVariants> {
29
- services: StepperCalendarService[];
30
- availableDates: string[];
31
- availableSlots: Record<string, string[]>;
32
- value: StepperCalendarValue;
33
- onChange: (next: StepperCalendarValue) => void;
34
- onSubmit?: (value: StepperCalendarValue) => void;
35
- detailsFields?: ReactNode;
36
- loadingDates?: boolean;
37
- loadingSlots?: boolean;
38
- /** Per-step status overrides — `error` will mark a step in the rail. */
39
- stepStatuses?: Partial<Record<0 | 1 | 2 | 3, StepStatus>>;
40
- 'aria-label'?: string;
41
- /**
42
- * Consumer-supplied instance id, surfaced as `data-component-id` so an
43
- * agent / UI bridge can address this instance.
44
- */
45
- id?: string;
46
- }
47
- /**
48
- * Imperative handle for agent-readiness. The booking value itself is
49
- * owned by the consumer through `value` / `onChange`, so the handle
50
- * deliberately exposes only step navigation — not the selected
51
- * service / date / time.
52
- */
53
- export interface StepperCalendarHandle {
54
- getCurrentStep: () => number;
55
- getTotalSteps: () => number;
56
- gotoStep: (step: number) => void;
57
- next: () => void;
58
- previous: () => void;
59
- }
60
- declare const StepperCalendar: import("react").ForwardRefExoticComponent<StepperCalendarProps & import("react").RefAttributes<HTMLDivElement>>;
61
- export { StepperCalendar };
62
- //# sourceMappingURL=stepper-calendar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stepper-calendar.d.ts","sourceRoot":"","sources":["../../../src/components/stepper-calendar/stepper-calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAclE,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAiC/D,+EAA+E;AAC/E,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,mCAAmC;AACnC,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAAC;AAEnD,sDAAsD;AACtD,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID,QAAA,MAAM,YAAY;;;8EAkBjB,CAAC;AA4FF,MAAM,WAAW,oBACf,SACE,IAAI,CACF,wBAAwB,CAAC,KAAK,CAAC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