@alfadocs/ui-kit-debug 1.45.0 → 1.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/dist/_chunks/{actions-cell-renderer-BXBy9c0f.js → actions-cell-renderer-B5m9lwgC.js} +2 -2
  2. package/dist/_chunks/{actions-cell-renderer-BXBy9c0f.js.map → actions-cell-renderer-B5m9lwgC.js.map} +1 -1
  3. package/dist/_chunks/ai-credits-notice-xszqOZTC.js +90 -0
  4. package/dist/_chunks/ai-credits-notice-xszqOZTC.js.map +1 -0
  5. package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js +17 -0
  6. package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js.map +1 -0
  7. package/dist/_chunks/{ai-consent-banner-D7I2U-cz.js → ai-permission-notice-D7I2U-cz.js} +1 -1
  8. package/dist/_chunks/ai-permission-notice-D7I2U-cz.js.map +1 -0
  9. package/dist/_chunks/ai-sparkle-D23NT8Z_.js +45 -0
  10. package/dist/_chunks/ai-sparkle-D23NT8Z_.js.map +1 -0
  11. package/dist/_chunks/{anamnesis-summary-rows-DQUqwWc1.js → anamnesis-summary-rows-DI-UX5r6.js} +2 -2
  12. package/dist/_chunks/{anamnesis-summary-rows-DQUqwWc1.js.map → anamnesis-summary-rows-DI-UX5r6.js.map} +1 -1
  13. package/dist/_chunks/{appointment-card-TgR_2GKS.js → appointment-card-DluZy8Iv.js} +2 -2
  14. package/dist/_chunks/{appointment-card-TgR_2GKS.js.map → appointment-card-DluZy8Iv.js.map} +1 -1
  15. package/dist/_chunks/{appointment-peek-abiR0T9e.js → appointment-peek-BsfCpiJs.js} +3 -3
  16. package/dist/_chunks/{appointment-peek-abiR0T9e.js.map → appointment-peek-BsfCpiJs.js.map} +1 -1
  17. package/dist/_chunks/{appointment-timeline-CCnyUYKz.js → appointment-timeline-Cs5f9viN.js} +3 -3
  18. package/dist/_chunks/{appointment-timeline-CCnyUYKz.js.map → appointment-timeline-Cs5f9viN.js.map} +1 -1
  19. package/dist/_chunks/{appointment-tray-N0yEI8UF.js → appointment-tray-CLrGGnKR.js} +2 -2
  20. package/dist/_chunks/{appointment-tray-N0yEI8UF.js.map → appointment-tray-CLrGGnKR.js.map} +1 -1
  21. package/dist/_chunks/baby-Dku-Xvg9.js +23 -0
  22. package/dist/_chunks/baby-Dku-Xvg9.js.map +1 -0
  23. package/dist/_chunks/{balance-badge-cell-o6LldMUA.js → balance-badge-cell-YGrYdrvR.js} +3 -3
  24. package/dist/_chunks/{balance-badge-cell-o6LldMUA.js.map → balance-badge-cell-YGrYdrvR.js.map} +1 -1
  25. package/dist/_chunks/booking-C4MwImkS.js +3362 -0
  26. package/dist/_chunks/booking-C4MwImkS.js.map +1 -0
  27. package/dist/_chunks/button-group-CA1tmu39.js +325 -0
  28. package/dist/_chunks/button-group-CA1tmu39.js.map +1 -0
  29. package/dist/_chunks/{calendar-U6N0F99w.js → calendar-OzSeTb4V.js} +2 -2
  30. package/dist/_chunks/{calendar-U6N0F99w.js.map → calendar-OzSeTb4V.js.map} +1 -1
  31. package/dist/_chunks/{calendar-event-card-DKUnT9Be.js → calendar-event-card-B6N5h1dO.js} +57 -48
  32. package/dist/_chunks/{calendar-event-card-DKUnT9Be.js.map → calendar-event-card-B6N5h1dO.js.map} +1 -1
  33. package/dist/_chunks/calendar-workspace-DDnQmiIL.js +12427 -0
  34. package/dist/_chunks/calendar-workspace-DDnQmiIL.js.map +1 -0
  35. package/dist/_chunks/{chart-PF2krCZC.js → chart-D8ucl8hH.js} +2 -2
  36. package/dist/_chunks/{chart-PF2krCZC.js.map → chart-D8ucl8hH.js.map} +1 -1
  37. package/dist/_chunks/{data-table-CcAx_I1w.js → data-table-DnKOmEVw.js} +2 -2
  38. package/dist/_chunks/{data-table-CcAx_I1w.js.map → data-table-DnKOmEVw.js.map} +1 -1
  39. package/dist/_chunks/{editable-currency-cell-renderer-Psb6XKHR.js → editable-currency-cell-renderer-OUkUv7U4.js} +2 -2
  40. package/dist/_chunks/{editable-currency-cell-renderer-Psb6XKHR.js.map → editable-currency-cell-renderer-OUkUv7U4.js.map} +1 -1
  41. package/dist/_chunks/{face-scheme-Bm6pe7R8.js → face-scheme-mIhwrQXt.js} +3 -3
  42. package/dist/_chunks/{face-scheme-Bm6pe7R8.js.map → face-scheme-mIhwrQXt.js.map} +1 -1
  43. package/dist/_chunks/{file-manager-BfLQxF5t.js → file-manager-DOcJGIx2.js} +4 -4
  44. package/dist/_chunks/{file-manager-BfLQxF5t.js.map → file-manager-DOcJGIx2.js.map} +1 -1
  45. package/dist/_chunks/{freemium-paywall-Cz-O9lQD.js → freemium-paywall-BaW5ODc9.js} +2 -2
  46. package/dist/_chunks/{freemium-paywall-Cz-O9lQD.js.map → freemium-paywall-BaW5ODc9.js.map} +1 -1
  47. package/dist/_chunks/{header-settings-CTe45iDy.js → header-settings-BEfx_-TF.js} +2 -2
  48. package/dist/_chunks/{header-settings-CTe45iDy.js.map → header-settings-BEfx_-TF.js.map} +1 -1
  49. package/dist/_chunks/{help-me-write-templates-GUeEn3Ff.js → help-me-write-templates-DHIwa4xR.js} +205 -199
  50. package/dist/_chunks/help-me-write-templates-DHIwa4xR.js.map +1 -0
  51. package/dist/_chunks/{hover-card-BMJBVqIf.js → hover-card-nUae8NPJ.js} +67 -62
  52. package/dist/_chunks/{hover-card-BMJBVqIf.js.map → hover-card-nUae8NPJ.js.map} +1 -1
  53. package/dist/_chunks/{icon-button-group-DkkdIygu.js → icon-button-group-DZKC6KGf.js} +181 -168
  54. package/dist/_chunks/icon-button-group-DZKC6KGf.js.map +1 -0
  55. package/dist/_chunks/kit-extensions-DuoFF1R3.js +94 -0
  56. package/dist/_chunks/kit-extensions-DuoFF1R3.js.map +1 -0
  57. package/dist/_chunks/{marketplace-app-shell-DdwPj03y.js → marketplace-app-shell-PB89Dkk_.js} +2 -2
  58. package/dist/_chunks/{marketplace-app-shell-DdwPj03y.js.map → marketplace-app-shell-PB89Dkk_.js.map} +1 -1
  59. package/dist/_chunks/{notes-panel-Dkk9QPPX.js → notes-panel-CHbDDMx8.js} +83 -73
  60. package/dist/_chunks/notes-panel-CHbDDMx8.js.map +1 -0
  61. package/dist/_chunks/{patient-details-C8ImUrVg.js → patient-details-yrgkSeEY.js} +2 -2
  62. package/dist/_chunks/{patient-details-C8ImUrVg.js.map → patient-details-yrgkSeEY.js.map} +1 -1
  63. package/dist/_chunks/{patient-field-row-BRSOKvme.js → patient-field-row-DCMkFGqI.js} +3 -3
  64. package/dist/_chunks/patient-field-row-DCMkFGqI.js.map +1 -0
  65. package/dist/_chunks/{patient-summary-card-BhmKB2KR.js → patient-summary-card-CmEFflGS.js} +59 -45
  66. package/dist/_chunks/patient-summary-card-CmEFflGS.js.map +1 -0
  67. package/dist/_chunks/payment-form-DqJFiplX.js +881 -0
  68. package/dist/_chunks/payment-form-DqJFiplX.js.map +1 -0
  69. package/dist/_chunks/{phone-input-BsZIoE36.js → phone-input-IWrGOCwm.js} +40 -39
  70. package/dist/_chunks/{phone-input-BsZIoE36.js.map → phone-input-IWrGOCwm.js.map} +1 -1
  71. package/dist/_chunks/rich-text-editor-BwDV2XkZ.js +4153 -0
  72. package/dist/_chunks/rich-text-editor-BwDV2XkZ.js.map +1 -0
  73. package/dist/_chunks/{stepper-accordion-DmVykr5F.js → stepper-accordion-jMR8NaOB.js} +2 -1
  74. package/dist/_chunks/{stepper-accordion-DmVykr5F.js.map → stepper-accordion-jMR8NaOB.js.map} +1 -1
  75. package/dist/_chunks/{tasks-panel-CpcikOeY.js → tasks-panel-DncuBPIZ.js} +2 -2
  76. package/dist/_chunks/{tasks-panel-CpcikOeY.js.map → tasks-panel-DncuBPIZ.js.map} +1 -1
  77. package/dist/_chunks/{theme-toggle-bI0pgDDv.js → theme-toggle-BP0XRGMM.js} +2 -2
  78. package/dist/_chunks/{theme-toggle-bI0pgDDv.js.map → theme-toggle-BP0XRGMM.js.map} +1 -1
  79. package/dist/_chunks/use-ai-sparkle-Cf4yVTLB.js +76 -0
  80. package/dist/_chunks/use-ai-sparkle-Cf4yVTLB.js.map +1 -0
  81. package/dist/_chunks/{workflow-status-xeaJTzD3.js → workflow-status-CuJAOuKL.js} +43 -42
  82. package/dist/_chunks/{workflow-status-xeaJTzD3.js.map → workflow-status-CuJAOuKL.js.map} +1 -1
  83. package/dist/agent-catalog.json +36 -7
  84. package/dist/agent-i18n/en.json +3 -3
  85. package/dist/components/_shared/field-value.d.ts.map +1 -1
  86. package/dist/components/ai-credits-notice/ai-credits-notice.agent.d.ts +3 -0
  87. package/dist/components/ai-credits-notice/ai-credits-notice.agent.d.ts.map +1 -0
  88. package/dist/components/ai-credits-notice/ai-credits-notice.d.ts +48 -0
  89. package/dist/components/ai-credits-notice/ai-credits-notice.d.ts.map +1 -0
  90. package/dist/components/ai-credits-notice/index.d.ts +4 -0
  91. package/dist/components/ai-credits-notice/index.d.ts.map +1 -0
  92. package/dist/components/ai-credits-notice/index.js +7 -0
  93. package/dist/components/ai-credits-notice/index.js.map +1 -0
  94. package/dist/components/{ai-consent-banner/ai-consent-banner.agent.d.ts → ai-permission-notice/ai-permission-notice.agent.d.ts} +2 -2
  95. package/dist/components/ai-permission-notice/ai-permission-notice.agent.d.ts.map +1 -0
  96. package/dist/components/{ai-consent-banner/ai-consent-banner.d.ts → ai-permission-notice/ai-permission-notice.d.ts} +1 -1
  97. package/dist/components/ai-permission-notice/ai-permission-notice.d.ts.map +1 -0
  98. package/dist/components/ai-permission-notice/index.d.ts +4 -0
  99. package/dist/components/ai-permission-notice/index.d.ts.map +1 -0
  100. package/dist/components/{ai-consent-banner → ai-permission-notice}/index.js +1 -1
  101. package/dist/components/ai-sparkle/ai-sparkle.d.ts +3 -3
  102. package/dist/components/ai-sparkle/ai-sparkle.d.ts.map +1 -1
  103. package/dist/components/ai-sparkle/index.js +1 -1
  104. package/dist/components/appointment-card/index.js +2 -2
  105. package/dist/components/appointment-peek/index.js +1 -1
  106. package/dist/components/appointment-timeline/index.js +1 -1
  107. package/dist/components/booking/booking-types.d.ts +60 -1
  108. package/dist/components/booking/booking-types.d.ts.map +1 -1
  109. package/dist/components/booking/booking.agent.d.ts.map +1 -1
  110. package/dist/components/booking/booking.d.ts +1 -1
  111. package/dist/components/booking/booking.d.ts.map +1 -1
  112. package/dist/components/booking/details-form.d.ts +5 -1
  113. package/dist/components/booking/details-form.d.ts.map +1 -1
  114. package/dist/components/booking/index.d.ts +1 -1
  115. package/dist/components/booking/index.d.ts.map +1 -1
  116. package/dist/components/booking/index.js +1 -1
  117. package/dist/components/booking/payment.d.ts +9 -0
  118. package/dist/components/booking/payment.d.ts.map +1 -0
  119. package/dist/components/booking/use-booking-payment.d.ts +14 -0
  120. package/dist/components/booking/use-booking-payment.d.ts.map +1 -0
  121. package/dist/components/button-group/button-group.d.ts.map +1 -1
  122. package/dist/components/button-group/index.js +1 -1
  123. package/dist/components/calendar/index.js +1 -1
  124. package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -1
  125. package/dist/components/calendar-event-card/index.js +1 -1
  126. package/dist/components/chart/index.js +1 -1
  127. package/dist/components/data-table/index.js +3 -3
  128. package/dist/components/face-scheme/index.js +1 -1
  129. package/dist/components/file-manager/index.js +1 -1
  130. package/dist/components/freemium-paywall/index.js +1 -1
  131. package/dist/components/header-settings/index.js +1 -1
  132. package/dist/components/hover-card/hover-card.d.ts +4 -0
  133. package/dist/components/hover-card/hover-card.d.ts.map +1 -1
  134. package/dist/components/hover-card/index.d.ts +1 -1
  135. package/dist/components/hover-card/index.d.ts.map +1 -1
  136. package/dist/components/hover-card/index.js +3 -2
  137. package/dist/components/icon-button-group/icon-button-group.d.ts.map +1 -1
  138. package/dist/components/icon-button-group/index.js +1 -1
  139. package/dist/components/index.d.ts +2 -1
  140. package/dist/components/index.d.ts.map +1 -1
  141. package/dist/components/notes-panel/index.js +1 -1
  142. package/dist/components/notes-panel/notes-panel.d.ts +10 -0
  143. package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
  144. package/dist/components/patient-details/index.js +1 -1
  145. package/dist/components/patient-summary-card/index.js +1 -1
  146. package/dist/components/patient-summary-card/patient-summary-card.d.ts.map +1 -1
  147. package/dist/components/patient-table/index.js +1 -1
  148. package/dist/components/payment-form/index.d.ts +1 -1
  149. package/dist/components/payment-form/index.d.ts.map +1 -1
  150. package/dist/components/payment-form/index.js +1 -1
  151. package/dist/components/payment-form/payment-form.d.ts +35 -3
  152. package/dist/components/payment-form/payment-form.d.ts.map +1 -1
  153. package/dist/components/phone-input/index.js +1 -1
  154. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  155. package/dist/components/rich-text-editor/editor-extensions.d.ts +54 -0
  156. package/dist/components/rich-text-editor/editor-extensions.d.ts.map +1 -0
  157. package/dist/components/rich-text-editor/editor-toolbar.d.ts +2 -1
  158. package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -1
  159. package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +4 -0
  160. package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -1
  161. package/dist/components/rich-text-editor/index.d.ts +2 -0
  162. package/dist/components/rich-text-editor/index.d.ts.map +1 -1
  163. package/dist/components/rich-text-editor/index.js +6 -4
  164. package/dist/components/rich-text-editor/index.js.map +1 -1
  165. package/dist/components/rich-text-editor/kit-extensions.d.ts +4 -0
  166. package/dist/components/rich-text-editor/kit-extensions.d.ts.map +1 -0
  167. package/dist/components/rich-text-editor/rich-text-editor.d.ts +18 -2
  168. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
  169. package/dist/components/stepper-accordion/index.js +1 -1
  170. package/dist/components/stepper-accordion/stepper-accordion.d.ts.map +1 -1
  171. package/dist/components/tasks-panel/index.js +1 -1
  172. package/dist/components/theme-toggle/index.js +1 -1
  173. package/dist/components/workflow-status/index.js +1 -1
  174. package/dist/components/workflow-status/workflow-status.d.ts.map +1 -1
  175. package/dist/hooks/index.d.ts +1 -1
  176. package/dist/hooks/index.d.ts.map +1 -1
  177. package/dist/hooks/index.js +51 -53
  178. package/dist/hooks/use-ai-sparkle.d.ts +7 -25
  179. package/dist/hooks/use-ai-sparkle.d.ts.map +1 -1
  180. package/dist/host-compat.css +2 -2
  181. package/dist/i18n/locales/ar.d.ts +67 -1
  182. package/dist/i18n/locales/ar.d.ts.map +1 -1
  183. package/dist/i18n/locales/ar.js +69 -3
  184. package/dist/i18n/locales/ar.js.map +1 -1
  185. package/dist/i18n/locales/de.d.ts +67 -1
  186. package/dist/i18n/locales/de.d.ts.map +1 -1
  187. package/dist/i18n/locales/de.js +69 -3
  188. package/dist/i18n/locales/de.js.map +1 -1
  189. package/dist/i18n/locales/el.d.ts +67 -1
  190. package/dist/i18n/locales/el.d.ts.map +1 -1
  191. package/dist/i18n/locales/el.js +69 -3
  192. package/dist/i18n/locales/el.js.map +1 -1
  193. package/dist/i18n/locales/en.d.ts +67 -1
  194. package/dist/i18n/locales/en.d.ts.map +1 -1
  195. package/dist/i18n/locales/en.js +69 -3
  196. package/dist/i18n/locales/en.js.map +1 -1
  197. package/dist/i18n/locales/es.d.ts +67 -1
  198. package/dist/i18n/locales/es.d.ts.map +1 -1
  199. package/dist/i18n/locales/es.js +69 -3
  200. package/dist/i18n/locales/es.js.map +1 -1
  201. package/dist/i18n/locales/fr.d.ts +67 -1
  202. package/dist/i18n/locales/fr.d.ts.map +1 -1
  203. package/dist/i18n/locales/fr.js +69 -3
  204. package/dist/i18n/locales/fr.js.map +1 -1
  205. package/dist/i18n/locales/hi.d.ts +67 -1
  206. package/dist/i18n/locales/hi.d.ts.map +1 -1
  207. package/dist/i18n/locales/hi.js +69 -3
  208. package/dist/i18n/locales/hi.js.map +1 -1
  209. package/dist/i18n/locales/it.d.ts +67 -1
  210. package/dist/i18n/locales/it.d.ts.map +1 -1
  211. package/dist/i18n/locales/it.js +69 -3
  212. package/dist/i18n/locales/it.js.map +1 -1
  213. package/dist/i18n/locales/ja.d.ts +67 -1
  214. package/dist/i18n/locales/ja.d.ts.map +1 -1
  215. package/dist/i18n/locales/ja.js +69 -3
  216. package/dist/i18n/locales/ja.js.map +1 -1
  217. package/dist/i18n/locales/nl.d.ts +67 -1
  218. package/dist/i18n/locales/nl.d.ts.map +1 -1
  219. package/dist/i18n/locales/nl.js +69 -3
  220. package/dist/i18n/locales/nl.js.map +1 -1
  221. package/dist/i18n/locales/pl.d.ts +67 -1
  222. package/dist/i18n/locales/pl.d.ts.map +1 -1
  223. package/dist/i18n/locales/pl.js +69 -3
  224. package/dist/i18n/locales/pl.js.map +1 -1
  225. package/dist/i18n/locales/pt.d.ts +67 -1
  226. package/dist/i18n/locales/pt.d.ts.map +1 -1
  227. package/dist/i18n/locales/pt.js +69 -3
  228. package/dist/i18n/locales/pt.js.map +1 -1
  229. package/dist/i18n/locales/ro.d.ts +67 -1
  230. package/dist/i18n/locales/ro.d.ts.map +1 -1
  231. package/dist/i18n/locales/ro.js +69 -3
  232. package/dist/i18n/locales/ro.js.map +1 -1
  233. package/dist/i18n/locales/ru.d.ts +67 -1
  234. package/dist/i18n/locales/ru.d.ts.map +1 -1
  235. package/dist/i18n/locales/ru.js +69 -3
  236. package/dist/i18n/locales/ru.js.map +1 -1
  237. package/dist/i18n/locales/sq.d.ts +67 -1
  238. package/dist/i18n/locales/sq.d.ts.map +1 -1
  239. package/dist/i18n/locales/sq.js +69 -3
  240. package/dist/i18n/locales/sq.js.map +1 -1
  241. package/dist/i18n/locales/sv.d.ts +67 -1
  242. package/dist/i18n/locales/sv.d.ts.map +1 -1
  243. package/dist/i18n/locales/sv.js +69 -3
  244. package/dist/i18n/locales/sv.js.map +1 -1
  245. package/dist/i18n/locales/tr.d.ts +67 -1
  246. package/dist/i18n/locales/tr.d.ts.map +1 -1
  247. package/dist/i18n/locales/tr.js +69 -3
  248. package/dist/i18n/locales/tr.js.map +1 -1
  249. package/dist/i18n/locales/zh.d.ts +67 -1
  250. package/dist/i18n/locales/zh.d.ts.map +1 -1
  251. package/dist/i18n/locales/zh.js +69 -3
  252. package/dist/i18n/locales/zh.js.map +1 -1
  253. package/dist/index.js +648 -641
  254. package/dist/index.js.map +1 -1
  255. package/dist/locales/ar.json +69 -3
  256. package/dist/locales/de.json +69 -3
  257. package/dist/locales/el.json +69 -3
  258. package/dist/locales/en.json +69 -3
  259. package/dist/locales/es.json +69 -3
  260. package/dist/locales/fr.json +69 -3
  261. package/dist/locales/hi.json +69 -3
  262. package/dist/locales/it.json +69 -3
  263. package/dist/locales/ja.json +69 -3
  264. package/dist/locales/nl.json +69 -3
  265. package/dist/locales/pl.json +69 -3
  266. package/dist/locales/pt.json +69 -3
  267. package/dist/locales/ro.json +69 -3
  268. package/dist/locales/ru.json +69 -3
  269. package/dist/locales/sq.json +69 -3
  270. package/dist/locales/sv.json +69 -3
  271. package/dist/locales/tr.json +69 -3
  272. package/dist/locales/zh.json +69 -3
  273. package/dist/patterns/anamnesis/index.js +1 -1
  274. package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
  275. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts.map +1 -1
  276. package/dist/patterns/calendar/calendar-bookings-panel.d.ts.map +1 -1
  277. package/dist/patterns/calendar/calendar-editor-fields.d.ts +33 -0
  278. package/dist/patterns/calendar/calendar-editor-fields.d.ts.map +1 -0
  279. package/dist/patterns/calendar/calendar-sticky-offset.d.ts +20 -0
  280. package/dist/patterns/calendar/calendar-sticky-offset.d.ts.map +1 -0
  281. package/dist/patterns/calendar/calendar-task-editor.d.ts.map +1 -1
  282. package/dist/patterns/calendar/calendar-workspace.d.ts +6 -4
  283. package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
  284. package/dist/patterns/calendar/calendar.data.d.ts +26 -0
  285. package/dist/patterns/calendar/calendar.data.d.ts.map +1 -1
  286. package/dist/patterns/calendar/calendar.journey.d.ts +1 -1
  287. package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
  288. package/dist/patterns/calendar/calendar.sheets.d.ts +16 -5
  289. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  290. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  291. package/dist/patterns/calendar/calendar.types.d.ts +25 -9
  292. package/dist/patterns/calendar/calendar.types.d.ts.map +1 -1
  293. package/dist/patterns/calendar/index.js +1 -1
  294. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +11 -2
  295. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts.map +1 -1
  296. package/dist/patterns/help-me-write-templates/index.js +1 -1
  297. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  298. package/dist/tokens.css +1 -1
  299. package/package.json +14 -4
  300. package/dist/_chunks/ai-consent-banner-D7I2U-cz.js.map +0 -1
  301. package/dist/_chunks/ai-sparkle-DXeP_6a0.js +0 -52
  302. package/dist/_chunks/ai-sparkle-DXeP_6a0.js.map +0 -1
  303. package/dist/_chunks/booking-D43ASl8y.js +0 -3034
  304. package/dist/_chunks/booking-D43ASl8y.js.map +0 -1
  305. package/dist/_chunks/button-group-R32U7SyV.js +0 -307
  306. package/dist/_chunks/button-group-R32U7SyV.js.map +0 -1
  307. package/dist/_chunks/calendar-workspace-B7KvZ1_D.js +0 -12161
  308. package/dist/_chunks/calendar-workspace-B7KvZ1_D.js.map +0 -1
  309. package/dist/_chunks/help-me-write-templates-GUeEn3Ff.js.map +0 -1
  310. package/dist/_chunks/icon-button-group-DkkdIygu.js.map +0 -1
  311. package/dist/_chunks/notes-panel-Dkk9QPPX.js.map +0 -1
  312. package/dist/_chunks/patient-field-row-BRSOKvme.js.map +0 -1
  313. package/dist/_chunks/patient-summary-card-BhmKB2KR.js.map +0 -1
  314. package/dist/_chunks/payment-form-BHMDqW9C.js +0 -767
  315. package/dist/_chunks/payment-form-BHMDqW9C.js.map +0 -1
  316. package/dist/_chunks/rich-text-editor-BrAvNajV.js +0 -3779
  317. package/dist/_chunks/rich-text-editor-BrAvNajV.js.map +0 -1
  318. package/dist/_chunks/use-ai-sparkle-CyQSRTCe.js +0 -103
  319. package/dist/_chunks/use-ai-sparkle-CyQSRTCe.js.map +0 -1
  320. package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts.map +0 -1
  321. package/dist/components/ai-consent-banner/ai-consent-banner.d.ts.map +0 -1
  322. package/dist/components/ai-consent-banner/index.d.ts +0 -4
  323. package/dist/components/ai-consent-banner/index.d.ts.map +0 -1
  324. /package/dist/components/{ai-consent-banner → ai-permission-notice}/index.js.map +0 -0
@@ -0,0 +1,881 @@
1
+ import { jsx as n, jsxs as v, Fragment as De } from "react/jsx-runtime";
2
+ import { forwardRef as Te, useMemo as pe, useState as _, useEffect as V, useRef as b, useImperativeHandle as Me, useId as Ve, useCallback as me } from "react";
3
+ import { c as re } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as he } from "react-i18next";
5
+ import { S as Pe } from "./spinner-hbwuKwMf.js";
6
+ import { A as xe } from "./alert-CiQ5Pa3Q.js";
7
+ import { loadStripe as Ae } from "@stripe/stripe-js/pure";
8
+ import { Elements as $e, useStripe as je, useElements as Ue, AddressElement as Ee, PaymentElement as qe } from "@stripe/react-stripe-js";
9
+ import { u as Ge } from "./registry-DvAUVLHh.js";
10
+ function Fe() {
11
+ return typeof document < "u" && typeof window < "u";
12
+ }
13
+ function be(r) {
14
+ if (!Fe())
15
+ return { theme: "stripe" };
16
+ const s = r ?? document.documentElement, o = getComputedStyle(s), e = (a) => o.getPropertyValue(a).trim();
17
+ return {
18
+ theme: s.classList.contains("theme-dark") ? "night" : "stripe",
19
+ variables: {
20
+ colorPrimary: e("--primary"),
21
+ colorBackground: e("--background"),
22
+ colorText: e("--foreground"),
23
+ colorDanger: e("--destructive"),
24
+ colorTextSecondary: e("--muted-foreground"),
25
+ colorTextPlaceholder: e("--muted-foreground"),
26
+ borderRadius: e("--radius-md"),
27
+ fontFamily: e("--font-sans"),
28
+ fontSizeBase: e("--font-size-base"),
29
+ // Stripe multiplies spacingUnit throughout every Element; --spacing-sm
30
+ // gives readable density. Keep this in sync with the JSDoc above.
31
+ spacingUnit: e("--spacing-sm")
32
+ },
33
+ rules: {
34
+ ".Input": {
35
+ backgroundColor: e("--background"),
36
+ border: `1px solid ${e("--border")}`,
37
+ color: e("--foreground"),
38
+ padding: e("--spacing-sm"),
39
+ transition: `border-color ${e("--animation-duration")} ease-out`
40
+ },
41
+ ".Input:focus": {
42
+ borderColor: e("--primary"),
43
+ boxShadow: `0 0 0 ${e("--focus-ring-width")} ${e("--ring")}`,
44
+ outline: "none"
45
+ },
46
+ ".Input--invalid": {
47
+ borderColor: e("--destructive"),
48
+ color: e("--foreground")
49
+ },
50
+ ".Label": {
51
+ color: e("--foreground"),
52
+ fontWeight: e("--font-weight-medium"),
53
+ fontSize: e("--font-size-sm")
54
+ },
55
+ ".Error": {
56
+ color: e("--destructive"),
57
+ fontSize: e("--font-size-sm")
58
+ },
59
+ ".Tab": {
60
+ border: `1px solid ${e("--border")}`,
61
+ backgroundColor: e("--background"),
62
+ color: e("--foreground")
63
+ },
64
+ ".Tab--selected": {
65
+ borderColor: e("--primary"),
66
+ backgroundColor: e("--background"),
67
+ color: e("--primary")
68
+ },
69
+ // Accordion method rows (the `accordion` layout): keep Stripe's native
70
+ // per-method card structure, restyled with our tokens — our border +
71
+ // radius, our background, `--primary` on the selected row, no extra shadow.
72
+ ".AccordionItem": {
73
+ backgroundColor: e("--background"),
74
+ border: `1px solid ${e("--border")}`,
75
+ borderRadius: e("--radius-md"),
76
+ boxShadow: "none"
77
+ },
78
+ ".AccordionItem--selected": {
79
+ borderColor: e("--primary"),
80
+ backgroundColor: e("--background")
81
+ },
82
+ // Stripe's in-method notice blocks (e.g. PayPal's "you'll be redirected")
83
+ // otherwise render in their own bordered box — a card nested inside the
84
+ // selected method card. Flatten to inline icon + text, no inner box.
85
+ ".Block": {
86
+ border: "none",
87
+ borderRadius: "0",
88
+ boxShadow: "none",
89
+ backgroundColor: "transparent"
90
+ }
91
+ }
92
+ };
93
+ }
94
+ function He(r, s) {
95
+ if (!Fe()) return () => {
96
+ };
97
+ const o = document.documentElement, e = () => r(be(s)), u = new MutationObserver(e);
98
+ u.observe(o, {
99
+ attributes: !0,
100
+ attributeFilter: ["class", "dir", "lang"]
101
+ });
102
+ const a = window.matchMedia("(prefers-color-scheme: dark)"), d = window.matchMedia("(prefers-reduced-motion: reduce)");
103
+ return a.addEventListener("change", e), d.addEventListener("change", e), () => {
104
+ u.disconnect(), a.removeEventListener("change", e), d.removeEventListener("change", e);
105
+ };
106
+ }
107
+ const We = {
108
+ id: "payment-form",
109
+ capabilities: ["submit"],
110
+ // The kit's only destructive + openWorld action that moves real money,
111
+ // so it is also the one that most needs to be verifiable. `submit`
112
+ // resolves once the charge attempt has settled; these four slots are
113
+ // how an agent then tells success from decline from never-fired, and
114
+ // how it recovers the receipt.
115
+ //
116
+ // A9: the PaymentIntent id and the i18n error KEY only. Never card
117
+ // fields (they live in Stripe's cross-origin iframes and never reach
118
+ // this origin), never the translated Stripe message, never
119
+ // `clientSecret`.
120
+ state: {
121
+ status: {
122
+ type: "'idle' | 'processing' | 'succeeded' | 'failed'",
123
+ descriptionKey: "ui.agent.paymentForm.state.status",
124
+ description: "Lifecycle of the current payment attempt. `succeeded` is only reached once Stripe confirmed the PaymentIntent; `failed` covers validation, decline and processor errors alike. Still `idle` after `submit` means the attempt never fired — Stripe had not mounted.",
125
+ read: (r) => r.getStatus()
126
+ },
127
+ complete: {
128
+ type: "boolean",
129
+ descriptionKey: "ui.agent.paymentForm.state.complete",
130
+ description: "True when Stripe reports the payment fields, and any required billing address, as complete. Read this before `submit` — outside preview mode the submit control is disabled while it is false, so the call will not be accepted.",
131
+ read: (r) => r.isComplete()
132
+ },
133
+ errorKey: {
134
+ type: "string | null",
135
+ descriptionKey: "ui.agent.paymentForm.state.errorKey",
136
+ description: "i18n key of the current error (e.g. `payment.error.cardDeclined`), or null. The key is the structural datum — the translated message is free text and is never exposed.",
137
+ read: (r) => r.getErrorKey()
138
+ },
139
+ paymentIntentId: {
140
+ type: "string | null",
141
+ descriptionKey: "ui.agent.paymentForm.state.paymentIntentId",
142
+ description: "Opaque Stripe PaymentIntent id once a charge succeeded, else null. The receipt — the attribution handle for the money that moved. Never the client secret.",
143
+ read: (r) => r.getPaymentIntentId()
144
+ }
145
+ },
146
+ actions: {
147
+ submit: {
148
+ safety: "destructive",
149
+ // Charges an external payment processor — irreversible, hits a system
150
+ // outside this UI.
151
+ openWorld: !0,
152
+ returns: "Promise<void>",
153
+ errors: [
154
+ 'Validation failed (incomplete or invalid card details) — `status` is "failed", `errorKey` names which.',
155
+ 'Payment was declined by the processor — `status` is "failed", `errorKey` is `payment.error.cardDeclined`.',
156
+ 'Network or processor error during the charge — `status` is "failed".',
157
+ 'Stripe had not mounted, so nothing was attempted — `status` is still "idle".'
158
+ ],
159
+ descriptionKey: "ui.agent.paymentForm.actions.submit",
160
+ description: "Submit the payment. Charges the configured payment method — irreversible. Resolves once the attempt has settled; the outcome is never in the resolved value, so read `status`, then `errorKey` on failure or `paymentIntentId` on success.",
161
+ invoke: (r) => r.submit()
162
+ },
163
+ reset: {
164
+ safety: "destructive",
165
+ idempotent: !0,
166
+ descriptionKey: "ui.agent.paymentForm.actions.reset",
167
+ description: 'Clear recoverable errors and return their status to "idle". Stripe fields remain unchanged. Pending or paid attempts cannot be reset and require a new session.',
168
+ invoke: (r) => {
169
+ r.reset();
170
+ }
171
+ }
172
+ },
173
+ domHooks: {
174
+ root: { attr: "data-component", value: "payment-form" },
175
+ instanceId: {
176
+ attr: "data-component-id",
177
+ sourceProp: "id",
178
+ description: "Sourced from the id prop."
179
+ }
180
+ }
181
+ }, Oe = /* @__PURE__ */ new Set([
182
+ "BIF",
183
+ "CLP",
184
+ "DJF",
185
+ "GNF",
186
+ "IDR",
187
+ "JPY",
188
+ "KMF",
189
+ "KRW",
190
+ "MGA",
191
+ "PYG",
192
+ "RWF",
193
+ "UGX",
194
+ "VND",
195
+ "VUV",
196
+ "XAF",
197
+ "XOF",
198
+ "XPF"
199
+ ]);
200
+ function ve(r, s, o) {
201
+ const e = s.toUpperCase(), u = Oe.has(e) ? r : r / 100;
202
+ try {
203
+ return new Intl.NumberFormat(o, {
204
+ style: "currency",
205
+ currency: e
206
+ }).format(u);
207
+ } catch {
208
+ return new Intl.NumberFormat("en", {
209
+ style: "currency",
210
+ currency: e
211
+ }).format(u);
212
+ }
213
+ }
214
+ function Xe(r) {
215
+ if (r === void 0) return null;
216
+ const s = r.trim();
217
+ if (s === "" || typeof window > "u") return null;
218
+ try {
219
+ const o = new URL(s, window.location.href);
220
+ return !(/* @__PURE__ */ new Set(["http:", "https:"])).has(o.protocol) || o.origin !== window.location.origin ? null : o.toString();
221
+ } catch {
222
+ return null;
223
+ }
224
+ }
225
+ function Ze(r) {
226
+ return r && r.replace(/\d{4,}/g, "****");
227
+ }
228
+ function Je(r) {
229
+ switch (r) {
230
+ case "incorrect_number":
231
+ case "invalid_number":
232
+ return "payment.error.cardNumber";
233
+ case "invalid_expiry_month":
234
+ case "invalid_expiry_year":
235
+ case "expired_card":
236
+ return "payment.error.expiry";
237
+ case "invalid_cvc":
238
+ case "incorrect_cvc":
239
+ return "payment.error.cvc";
240
+ case "incorrect_zip":
241
+ case "invalid_zip":
242
+ return "payment.error.postalCode";
243
+ case "card_declined":
244
+ case "do_not_honor":
245
+ case "generic_decline":
246
+ return "payment.error.declined";
247
+ case "network_error":
248
+ case "api_connection_error":
249
+ return "payment.error.network";
250
+ case "billing_address_incomplete":
251
+ return "payment.error.billingAddressIncomplete";
252
+ case "billing_details_save":
253
+ return "payment.error.billingDetailsSave";
254
+ case "billing_details_changed":
255
+ return "payment.error.billingDetailsChanged";
256
+ default:
257
+ return "payment.error.generic";
258
+ }
259
+ }
260
+ const Ye = re(
261
+ [
262
+ "ds:payment-form-alfadocs ds:flex ds:flex-col",
263
+ "ds:gap-[var(--spacing-md)]",
264
+ // Transparent, padding-less container — the consuming surface (a Card, the
265
+ // check-in step, a checkout column) owns the card chrome + padding, so the
266
+ // Stripe method boxes never read as cards nested inside another card.
267
+ "ds:text-[var(--foreground)]",
268
+ "ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed"
269
+ ].join(" ")
270
+ ), fe = re(
271
+ ["ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]"].join(" ")
272
+ ), G = re(
273
+ ["type-label", "ds:text-[var(--foreground)]"].join(" ")
274
+ ), Ke = re(
275
+ [
276
+ "ds:flex ds:items-baseline ds:justify-between",
277
+ "ds:gap-[var(--spacing-sm)]",
278
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
279
+ "ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]",
280
+ "ds:bg-[var(--muted)]",
281
+ "ds:rounded-[var(--radius-sm)]",
282
+ "ds:text-[var(--foreground)]"
283
+ ].join(" ")
284
+ ), Le = re(
285
+ [
286
+ "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
287
+ "ds:[min-block-size:var(--min-target-size)]",
288
+ "ds:[min-inline-size:var(--min-target-size)]",
289
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
290
+ "ds:rounded-[var(--radius-sm)]",
291
+ "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]",
292
+ "ds:text-[length:var(--font-size-base)] ds:font-medium",
293
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
294
+ "ds:hover:bg-[var(--primary-hover)]",
295
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
296
+ "ds:focus-visible:outline-solid",
297
+ "ds:focus-visible:outline-[var(--ring)]",
298
+ "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
299
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
300
+ "ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed",
301
+ "ds:aria-busy:cursor-wait"
302
+ ].join(" ")
303
+ );
304
+ function Qe(r) {
305
+ const {
306
+ amount: s,
307
+ currency: o,
308
+ locale: e,
309
+ billingAddress: u,
310
+ requireBillingAddress: a,
311
+ defaultBillingDetails: d,
312
+ onBillingDetails: $,
313
+ returnUrl: h,
314
+ clientSecret: p,
315
+ onCreatePaymentIntent: P,
316
+ onPreviewValidated: H,
317
+ onSuccess: W,
318
+ onPaymentStatusChange: O,
319
+ onError: X,
320
+ layout: ye,
321
+ agentBridge: i
322
+ } = r, { t: c } = he(), j = je(), C = Ue(), [U] = _(
323
+ () => d ? {
324
+ name: d.name,
325
+ address: {
326
+ line1: d.address.line1,
327
+ line2: d.address.line2,
328
+ city: d.address.city,
329
+ state: d.address.state,
330
+ postal_code: d.address.postalCode,
331
+ country: d.address.country
332
+ }
333
+ } : void 0
334
+ ), te = Ve(), k = pe(
335
+ () => `pay-${te.replace(/[^a-zA-Z0-9-_]/g, "")}`,
336
+ [te]
337
+ ), ne = `${k}-payment`, se = `${k}-address`, x = `${k}-error`, [F, K] = _(!1), [L, ae] = _(!1), z = b(!1), l = b(!0), [A, ie] = _(!1), [w, E] = _(!1), Z = b(0), [J, f] = _(null), [N, I] = _("");
338
+ V(() => {
339
+ i.current.complete = A && (!a || w);
340
+ }, [i, A, a, w]);
341
+ const y = me(
342
+ (t) => {
343
+ i.current.status = t;
344
+ },
345
+ [i]
346
+ ), R = me(
347
+ (t) => {
348
+ i.current.errorKey = t, f(t);
349
+ },
350
+ [i]
351
+ ), ze = me(
352
+ (t) => {
353
+ i.current.complete = t && (!a || w), ie(t);
354
+ },
355
+ [i, a, w]
356
+ ), oe = b(W), de = b(O), B = b(X), we = b($), ce = b(H);
357
+ V(() => {
358
+ oe.current = W, de.current = O, B.current = X, we.current = $, ce.current = H;
359
+ }, [
360
+ W,
361
+ O,
362
+ X,
363
+ $,
364
+ H
365
+ ]);
366
+ const q = me(
367
+ async (t) => {
368
+ var Se, _e, Ce, ke;
369
+ if (t && t.preventDefault(), !j || !C || z.current || !l.current) return;
370
+ z.current = !0, K(!0), y("processing"), i.current.paymentIntentId = null, R(null), I("");
371
+ const m = (S, Y) => {
372
+ var D;
373
+ const Q = Je(S), ee = Ze(Y ?? "");
374
+ R(Q), I(c(Q)), y("failed"), (D = B.current) == null || D.call(B, {
375
+ code: S,
376
+ translatedMessage: ee || c(Q)
377
+ });
378
+ }, ge = Xe(h);
379
+ if (h !== void 0 && ge === null) {
380
+ R("payment.error.invalidReturnUrl"), I(c("payment.error.invalidReturnUrl")), y("failed"), (Se = B.current) == null || Se.call(B, {
381
+ code: "invalid_return_url",
382
+ translatedMessage: c("payment.error.invalidReturnUrl")
383
+ }), K(!1), z.current = !1;
384
+ return;
385
+ }
386
+ const Be = ge ? { return_url: ge } : {};
387
+ let le = !1;
388
+ const Ie = we.current;
389
+ try {
390
+ let S;
391
+ if (p === void 0) {
392
+ const { error: T } = await C.submit();
393
+ if (!l.current) return;
394
+ if (T) {
395
+ m(T.code ?? "generic", T.message);
396
+ return;
397
+ }
398
+ }
399
+ let Y;
400
+ const Q = Z.current, ee = () => a && Q !== Z.current;
401
+ if (a) {
402
+ const T = C.getElement(Ee), ue = await (T == null ? void 0 : T.getValue());
403
+ if (!l.current) return;
404
+ if (ee()) {
405
+ m("billing_details_changed", void 0);
406
+ return;
407
+ }
408
+ if (!(ue != null && ue.complete)) {
409
+ m("billing_address_incomplete", void 0);
410
+ return;
411
+ }
412
+ const M = ue.value;
413
+ Y = {
414
+ name: M.name,
415
+ address: {
416
+ line1: M.address.line1,
417
+ line2: M.address.line2,
418
+ city: M.address.city,
419
+ state: M.address.state,
420
+ postalCode: M.address.postal_code,
421
+ country: M.address.country
422
+ }
423
+ };
424
+ }
425
+ if (p === void 0 && !P) {
426
+ await ((_e = ce.current) == null ? void 0 : _e.call(ce));
427
+ return;
428
+ }
429
+ if (Y && Ie) {
430
+ try {
431
+ await Ie(Y);
432
+ } catch {
433
+ l.current && m("billing_details_save", void 0);
434
+ return;
435
+ }
436
+ if (!l.current) return;
437
+ }
438
+ if (ee()) {
439
+ m("billing_details_changed", void 0);
440
+ return;
441
+ }
442
+ if (p === void 0 && P && (S = await P(), !l.current))
443
+ return;
444
+ if (ee()) {
445
+ m("billing_details_changed", void 0);
446
+ return;
447
+ }
448
+ const D = await j.confirmPayment({
449
+ elements: C,
450
+ ...S === void 0 ? {} : { clientSecret: S },
451
+ confirmParams: Be,
452
+ redirect: "if_required"
453
+ });
454
+ if (!l.current) return;
455
+ if (D.error) {
456
+ m(D.error.code ?? "generic", D.error.message);
457
+ return;
458
+ }
459
+ const g = D.paymentIntent;
460
+ if (le = !0, !g) return;
461
+ g.status === "succeeded" ? (i.current.paymentIntentId = g.id, y("succeeded"), ae(!0), K(!1)) : (g.status === "requires_payment_method" || g.status === "canceled") && (le = !1, m(g.status, void 0));
462
+ try {
463
+ (Ce = de.current) == null || Ce.call(de, g.status, g.id);
464
+ } catch {
465
+ }
466
+ g.status === "succeeded" && ((ke = oe.current) == null || ke.call(oe, g.id));
467
+ } catch (S) {
468
+ l.current && !le && m("unexpected", S instanceof Error ? S.message : "");
469
+ } finally {
470
+ l.current && !le && (z.current = !1, K(!1), i.current.status === "processing" && y("idle"));
471
+ }
472
+ },
473
+ [
474
+ j,
475
+ C,
476
+ h,
477
+ p,
478
+ P,
479
+ a,
480
+ c,
481
+ i,
482
+ R,
483
+ y
484
+ ]
485
+ );
486
+ V(() => {
487
+ const t = document.getElementById(k);
488
+ if (!t) return;
489
+ const m = () => {
490
+ q();
491
+ };
492
+ return t.addEventListener("payment-form:submit", m), () => t.removeEventListener("payment-form:submit", m);
493
+ }, [k, q]), V(() => {
494
+ const t = i.current;
495
+ return t.submit = q, () => {
496
+ t.submit === q && (t.submit = void 0);
497
+ };
498
+ }, [i, q]), V(() => {
499
+ const t = i.current;
500
+ return l.current = !0, t.status = "idle", t.paymentIntentId = null, t.errorKey = null, t.complete = !1, () => {
501
+ l.current = !1, t.complete = !1, t.status = "idle", t.paymentIntentId = null, t.errorKey = null;
502
+ };
503
+ }, [i]);
504
+ const Re = !j || !C || F || L || !(p === void 0 && !P) && (!A || a && !w);
505
+ return /* @__PURE__ */ n(
506
+ "form",
507
+ {
508
+ id: k,
509
+ onSubmit: q,
510
+ onReset: () => {
511
+ z.current || (R(null), I(""), y("idle"), i.current.paymentIntentId = null);
512
+ },
513
+ "aria-label": c("payment.ariaLabel"),
514
+ "aria-busy": F || void 0,
515
+ noValidate: !0,
516
+ children: /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
517
+ /* @__PURE__ */ v("div", { className: Ke(), children: [
518
+ /* @__PURE__ */ n("span", { className: G(), children: c("payment.amountLabel") }),
519
+ /* @__PURE__ */ n("span", { className: "type-title-card", "data-testid": "payment-amount", children: ve(s, o, e) })
520
+ ] }),
521
+ /* @__PURE__ */ v(
522
+ "label",
523
+ {
524
+ htmlFor: ne,
525
+ className: fe(),
526
+ "data-testid": "payment-field",
527
+ children: [
528
+ /* @__PURE__ */ n("span", { className: G(), children: c("payment.fields.card") }),
529
+ /* @__PURE__ */ n(
530
+ qe,
531
+ {
532
+ id: ne,
533
+ options: {
534
+ // `tabs` = method tiles (Card selected by default); `accordion`
535
+ // = full-width stacked rows for narrow columns where the tab row
536
+ // clips. Stripe owns overflow + tab alignment either way.
537
+ layout: ye === "accordion" ? { type: "accordion", defaultCollapsed: !0 } : { type: "tabs" }
538
+ },
539
+ onChange: (t) => {
540
+ ze(t.complete === !0), t.complete && (R(null), I(""), i.current.status === "failed" && y("idle"));
541
+ }
542
+ }
543
+ )
544
+ ]
545
+ }
546
+ ),
547
+ u ? /* @__PURE__ */ v(
548
+ "label",
549
+ {
550
+ htmlFor: se,
551
+ className: fe(),
552
+ "data-testid": "payment-address",
553
+ children: [
554
+ /* @__PURE__ */ n("span", { className: G(), children: c("payment.billingAddress") }),
555
+ /* @__PURE__ */ n(
556
+ Ee,
557
+ {
558
+ id: se,
559
+ options: {
560
+ mode: "billing",
561
+ ...U ? { defaultValues: U } : {}
562
+ },
563
+ onChange: (t) => {
564
+ Z.current += 1, E(t.complete), i.current.complete = A && (!a || t.complete), t.complete && J === "payment.error.billingAddressIncomplete" && (R(null), I(""), y("idle"));
565
+ }
566
+ }
567
+ )
568
+ ]
569
+ }
570
+ ) : null,
571
+ J ? /* @__PURE__ */ n(
572
+ xe,
573
+ {
574
+ id: x,
575
+ variant: "error",
576
+ live: "polite",
577
+ "data-testid": "payment-error",
578
+ children: /* @__PURE__ */ n(xe.Description, { children: N })
579
+ }
580
+ ) : null,
581
+ /* @__PURE__ */ n(
582
+ "button",
583
+ {
584
+ type: "submit",
585
+ "aria-disabled": Re || void 0,
586
+ "aria-busy": F || void 0,
587
+ "aria-describedby": J ? x : void 0,
588
+ className: Le(),
589
+ "data-testid": "payment-submit",
590
+ children: F ? /* @__PURE__ */ v(De, { children: [
591
+ /* @__PURE__ */ n(
592
+ Pe,
593
+ {
594
+ variant: "pulse",
595
+ size: "sm",
596
+ label: c("payment.processing")
597
+ }
598
+ ),
599
+ /* @__PURE__ */ n("span", { children: c("payment.processing") })
600
+ ] }) : /* @__PURE__ */ n("span", { children: c("payment.submit", {
601
+ amount: ve(s, o, e)
602
+ }) })
603
+ }
604
+ )
605
+ ] })
606
+ }
607
+ );
608
+ }
609
+ const Ne = /* @__PURE__ */ new Set([
610
+ "auto",
611
+ "ar",
612
+ "bg",
613
+ "cs",
614
+ "da",
615
+ "de",
616
+ "el",
617
+ "en",
618
+ "en-AU",
619
+ "en-CA",
620
+ "en-NZ",
621
+ "en-GB",
622
+ "es",
623
+ "es-ES",
624
+ "es-419",
625
+ "et",
626
+ "fi",
627
+ "fil",
628
+ "fr",
629
+ "fr-CA",
630
+ "fr-FR",
631
+ "he",
632
+ "hu",
633
+ "hr",
634
+ "id",
635
+ "it",
636
+ "it-IT",
637
+ "ja",
638
+ "ko",
639
+ "lt",
640
+ "lv",
641
+ "ms",
642
+ "mt",
643
+ "nb",
644
+ "nl",
645
+ "no",
646
+ "pl",
647
+ "pt",
648
+ "pt-BR",
649
+ "ro",
650
+ "ru",
651
+ "sk",
652
+ "sl",
653
+ "sv",
654
+ "th",
655
+ "tr",
656
+ "vi",
657
+ "zh",
658
+ "zh-HK",
659
+ "zh-TW"
660
+ ]);
661
+ function er(r) {
662
+ if (!r) return "auto";
663
+ const s = r === "cn" ? "zh" : r;
664
+ if (Ne.has(s))
665
+ return s;
666
+ const o = s.split("-")[0];
667
+ return Ne.has(o) ? o : "auto";
668
+ }
669
+ const rr = Te(
670
+ ({
671
+ id: r,
672
+ clientSecret: s,
673
+ mode: o = "payment",
674
+ cardOnly: e = !1,
675
+ onCreatePaymentIntent: u,
676
+ onPreviewValidated: a,
677
+ publishableKey: d,
678
+ stripeAccount: $,
679
+ currency: h,
680
+ amount: p,
681
+ onSuccess: P,
682
+ onPaymentStatusChange: H,
683
+ onError: W,
684
+ billingAddress: O = !1,
685
+ requireBillingAddress: X = !1,
686
+ defaultBillingDetails: ye,
687
+ onBillingDetails: i,
688
+ locale: c,
689
+ ariaLabel: j,
690
+ returnUrl: C,
691
+ stripePromise: U,
692
+ layout: te = "tabs",
693
+ className: k
694
+ }, ne) => {
695
+ const { i18n: se } = he(), x = er(c ?? se.language ?? "en"), F = X || i !== void 0, K = O || F, L = pe(
696
+ () => ({ injectedStripe: U, publishableKey: d, stripeAccount: $ }),
697
+ [U, d, $]
698
+ ), [ae, z] = _(() => ({
699
+ source: L,
700
+ instance: U ?? null
701
+ })), l = ae.source === L ? ae.instance : null;
702
+ V(() => {
703
+ const {
704
+ injectedStripe: f,
705
+ publishableKey: N,
706
+ stripeAccount: I
707
+ } = L, y = f !== void 0 ? f : N ? I ? Ae(N, { stripeAccount: I }) : Ae(N) : null;
708
+ z({ source: L, instance: y });
709
+ }, [L]);
710
+ const [A, ie] = _(
711
+ () => be()
712
+ );
713
+ V(() => (ie(be()), He(ie)), []);
714
+ const w = b(null), E = b({
715
+ status: "idle",
716
+ complete: !1,
717
+ errorKey: null,
718
+ paymentIntentId: null
719
+ }), Z = pe(
720
+ () => ({
721
+ submit: async () => {
722
+ const f = E.current.submit;
723
+ f && await f();
724
+ },
725
+ reset: () => {
726
+ var N;
727
+ const f = (N = w.current) == null ? void 0 : N.querySelector("form");
728
+ f instanceof HTMLFormElement && f.reset();
729
+ },
730
+ getStatus: () => E.current.status,
731
+ isComplete: () => E.current.complete,
732
+ getErrorKey: () => E.current.errorKey,
733
+ getPaymentIntentId: () => E.current.paymentIntentId
734
+ }),
735
+ []
736
+ );
737
+ Me(ne, () => w.current, []), Ge(We, Z, r);
738
+ const J = pe(
739
+ () => s !== void 0 ? (
740
+ // Immediate mode — the consumer already created the intent.
741
+ { clientSecret: s, appearance: A, locale: x }
742
+ ) : (
743
+ // Deferred-intent mode — no secret yet; Stripe needs the intent
744
+ // shape (mode + amount + currency) to render the Payment Element.
745
+ // Stripe expects a lowercase ISO-4217 currency here.
746
+ {
747
+ mode: o,
748
+ amount: p,
749
+ currency: h.toLowerCase(),
750
+ ...e ? { paymentMethodTypes: ["card"] } : {},
751
+ appearance: A,
752
+ locale: x
753
+ }
754
+ ),
755
+ [
756
+ s,
757
+ o,
758
+ e,
759
+ p,
760
+ h,
761
+ A,
762
+ x
763
+ ]
764
+ );
765
+ return /* @__PURE__ */ n(
766
+ "div",
767
+ {
768
+ ref: w,
769
+ "aria-label": j,
770
+ className: [Ye(), k].filter(Boolean).join(" "),
771
+ "data-component": "payment-form",
772
+ "data-component-id": r,
773
+ "data-testid": "payment-form-root",
774
+ children: l ? (
775
+ // Render the real Payment Element whenever a Stripe instance is
776
+ // available — in immediate mode (clientSecret present) AND in
777
+ // deferred mode (no secret). The skeleton is reserved for the
778
+ // no-Stripe case (missing publishableKey / injected null).
779
+ /* @__PURE__ */ n(
780
+ $e,
781
+ {
782
+ stripe: l,
783
+ options: J,
784
+ children: /* @__PURE__ */ n(
785
+ Qe,
786
+ {
787
+ amount: p,
788
+ currency: h,
789
+ locale: x,
790
+ billingAddress: K,
791
+ requireBillingAddress: F,
792
+ defaultBillingDetails: ye,
793
+ onBillingDetails: i,
794
+ returnUrl: C,
795
+ clientSecret: s,
796
+ onCreatePaymentIntent: u,
797
+ onPreviewValidated: a,
798
+ onSuccess: P,
799
+ onPaymentStatusChange: H,
800
+ onError: W,
801
+ layout: te,
802
+ agentBridge: E
803
+ }
804
+ )
805
+ },
806
+ s ?? `deferred:${o}:${p}:${h}:${e}`
807
+ )
808
+ ) : /* @__PURE__ */ n(
809
+ tr,
810
+ {
811
+ amount: p,
812
+ currency: h,
813
+ locale: x,
814
+ billingAddress: K
815
+ }
816
+ )
817
+ }
818
+ );
819
+ }
820
+ );
821
+ rr.displayName = "PaymentForm";
822
+ function tr(r) {
823
+ const { amount: s, currency: o, locale: e, billingAddress: u } = r, { t: a } = he();
824
+ return /* @__PURE__ */ v(
825
+ "div",
826
+ {
827
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
828
+ "data-testid": "payment-skeleton",
829
+ "aria-busy": "true",
830
+ children: [
831
+ /* @__PURE__ */ v("div", { className: Ke(), children: [
832
+ /* @__PURE__ */ n("span", { className: G(), children: a("payment.amountLabel") }),
833
+ /* @__PURE__ */ n("span", { className: "type-title-card", children: ve(s, o, e) })
834
+ ] }),
835
+ /* @__PURE__ */ v("div", { className: fe(), children: [
836
+ /* @__PURE__ */ n("span", { className: G(), children: a("payment.fields.card") }),
837
+ /* @__PURE__ */ n(
838
+ "div",
839
+ {
840
+ className: "ds:[min-block-size:var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:bg-[var(--muted)]",
841
+ "aria-hidden": "true"
842
+ }
843
+ )
844
+ ] }),
845
+ u ? /* @__PURE__ */ v("div", { className: fe(), "data-testid": "payment-address", children: [
846
+ /* @__PURE__ */ n("span", { className: G(), children: a("payment.billingAddress") }),
847
+ /* @__PURE__ */ n(
848
+ "div",
849
+ {
850
+ className: "ds:[min-block-size:calc(var(--min-target-size)*2)] ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:bg-[var(--muted)]",
851
+ "aria-hidden": "true"
852
+ }
853
+ )
854
+ ] }) : null,
855
+ /* @__PURE__ */ v(
856
+ "button",
857
+ {
858
+ type: "button",
859
+ "aria-disabled": "true",
860
+ className: Le(),
861
+ disabled: !0,
862
+ children: [
863
+ /* @__PURE__ */ n(Pe, { variant: "pulse", size: "sm", label: a("payment.processing") }),
864
+ /* @__PURE__ */ n("span", { children: a("payment.processing") })
865
+ ]
866
+ }
867
+ )
868
+ ]
869
+ }
870
+ );
871
+ }
872
+ export {
873
+ rr as P,
874
+ Ye as a,
875
+ Ze as b,
876
+ Je as c,
877
+ ve as f,
878
+ We as p,
879
+ Le as s
880
+ };
881
+ //# sourceMappingURL=payment-form-DqJFiplX.js.map