@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
@@ -1,767 +0,0 @@
1
- import { jsx as t, jsxs as g, Fragment as me } from "react/jsx-runtime";
2
- import { forwardRef as pe, useState as z, useEffect as L, useRef as j, useMemo as X, useImperativeHandle as fe, useId as ye, useCallback as $ } from "react";
3
- import { c as D } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Y } from "react-i18next";
5
- import { S as oe } from "./spinner-hbwuKwMf.js";
6
- import { A as se } from "./alert-CiQ5Pa3Q.js";
7
- import { loadStripe as ge } from "@stripe/stripe-js";
8
- import { Elements as be, useStripe as ve, useElements as he, PaymentElement as Ie, AddressElement as we } from "@stripe/react-stripe-js";
9
- import { u as xe } from "./registry-DvAUVLHh.js";
10
- function ie() {
11
- return typeof document < "u" && typeof window < "u";
12
- }
13
- function Z(r) {
14
- if (!ie())
15
- return { theme: "stripe" };
16
- const n = r ?? document.documentElement, a = getComputedStyle(n), e = (o) => a.getPropertyValue(o).trim();
17
- return {
18
- theme: n.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 Se(r, n) {
95
- if (!ie()) return () => {
96
- };
97
- const a = document.documentElement, e = () => r(Z(n)), d = new MutationObserver(e);
98
- d.observe(a, {
99
- attributes: !0,
100
- attributeFilter: ["class", "dir", "lang"]
101
- });
102
- const o = window.matchMedia("(prefers-color-scheme: dark)"), m = window.matchMedia("(prefers-reduced-motion: reduce)");
103
- return o.addEventListener("change", e), m.addEventListener("change", e), () => {
104
- d.disconnect(), o.removeEventListener("change", e), m.removeEventListener("change", e);
105
- };
106
- }
107
- const ke = {
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 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: 'Reset the form to its initial state. Loses any in-progress input, and discards the previous attempt — `status` returns to "idle" and `errorKey` / `paymentIntentId` to null.',
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
- }, Ce = /* @__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 J(r, n, a) {
201
- const e = n.toUpperCase(), d = Ce.has(e) ? r : r / 100;
202
- try {
203
- return new Intl.NumberFormat(a, {
204
- style: "currency",
205
- currency: e
206
- }).format(d);
207
- } catch {
208
- return new Intl.NumberFormat("en", {
209
- style: "currency",
210
- currency: e
211
- }).format(d);
212
- }
213
- }
214
- function Ee(r) {
215
- if (r === void 0) return null;
216
- const n = r.trim();
217
- if (n === "" || typeof window > "u") return null;
218
- try {
219
- const a = new URL(n, window.location.href);
220
- return !(/* @__PURE__ */ new Set(["http:", "https:"])).has(a.protocol) || a.origin !== window.location.origin ? null : a.toString();
221
- } catch {
222
- return null;
223
- }
224
- }
225
- function Ne(r) {
226
- return r && r.replace(/\d{4,}/g, "****");
227
- }
228
- function Fe(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
- default:
251
- return "payment.error.generic";
252
- }
253
- }
254
- const Pe = D(
255
- [
256
- "ds:payment-form-alfadocs ds:flex ds:flex-col",
257
- "ds:gap-[var(--spacing-md)]",
258
- // Transparent, padding-less container — the consuming surface (a Card, the
259
- // check-in step, a checkout column) owns the card chrome + padding, so the
260
- // Stripe method boxes never read as cards nested inside another card.
261
- "ds:text-[var(--foreground)]",
262
- "ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed"
263
- ].join(" ")
264
- ), q = D(
265
- ["ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]"].join(" ")
266
- ), A = D(
267
- ["type-label", "ds:text-[var(--foreground)]"].join(" ")
268
- ), de = D(
269
- [
270
- "ds:flex ds:items-baseline ds:justify-between",
271
- "ds:gap-[var(--spacing-sm)]",
272
- "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
273
- "ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]",
274
- "ds:bg-[var(--muted)]",
275
- "ds:rounded-[var(--radius-sm)]",
276
- "ds:text-[var(--foreground)]"
277
- ].join(" ")
278
- ), ce = D(
279
- [
280
- "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
281
- "ds:[min-block-size:var(--min-target-size)]",
282
- "ds:[min-inline-size:var(--min-target-size)]",
283
- "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
284
- "ds:rounded-[var(--radius-sm)]",
285
- "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]",
286
- "ds:text-[length:var(--font-size-base)] ds:font-medium",
287
- "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
288
- "ds:hover:bg-[var(--primary-hover)]",
289
- "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
290
- "ds:focus-visible:outline-solid",
291
- "ds:focus-visible:outline-[var(--ring)]",
292
- "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
293
- "ds:forced-colors:focus-visible:outline-[CanvasText]",
294
- "ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed",
295
- "ds:aria-busy:cursor-wait"
296
- ].join(" ")
297
- );
298
- function _e(r) {
299
- const {
300
- amount: n,
301
- currency: a,
302
- locale: e,
303
- billingAddress: d,
304
- returnUrl: o,
305
- clientSecret: m,
306
- onCreatePaymentIntent: N,
307
- onSuccess: K,
308
- onError: F,
309
- layout: O,
310
- agentBridge: i
311
- } = r, { t: c } = Y(), p = ve(), h = he(), B = ye(), I = X(
312
- () => `pay-${B.replace(/[^a-zA-Z0-9-_]/g, "")}`,
313
- [B]
314
- ), U = `${I}-payment`, w = `${I}-address`, R = `${I}-error`, [f, S] = z(!1), [V, T] = z(!1), [b, G] = z(null), [H, u] = z(""), l = $(
315
- (s) => {
316
- i.current.status = s;
317
- },
318
- [i]
319
- ), P = $(
320
- (s) => {
321
- i.current.errorKey = s, G(s);
322
- },
323
- [i]
324
- ), le = $(
325
- (s) => {
326
- i.current.complete = s, T(s);
327
- },
328
- [i]
329
- ), k = j(K), C = j(F);
330
- L(() => {
331
- k.current = K, C.current = F;
332
- }, [K, F]);
333
- const _ = $(
334
- async (s) => {
335
- var ee, re, te;
336
- if (s && s.preventDefault(), !p || !h || f) return;
337
- S(!0), l("processing"), i.current.paymentIntentId = null, P(null), u("");
338
- const E = (v, M) => {
339
- var ne;
340
- const y = Fe(v), x = Ne(M ?? "");
341
- P(y), u(c(y)), l("failed"), (ne = C.current) == null || ne.call(C, {
342
- code: v,
343
- translatedMessage: x || c(y)
344
- });
345
- }, W = Ee(o);
346
- if (o !== void 0 && W === null) {
347
- P("payment.error.invalidReturnUrl"), u(c("payment.error.invalidReturnUrl")), l("failed"), (ee = C.current) == null || ee.call(C, {
348
- code: "invalid_return_url",
349
- translatedMessage: c("payment.error.invalidReturnUrl")
350
- }), S(!1);
351
- return;
352
- }
353
- const Q = W ? { return_url: W } : {};
354
- try {
355
- if (m !== void 0) {
356
- const x = await p.confirmPayment({
357
- elements: h,
358
- confirmParams: Q,
359
- redirect: "if_required"
360
- });
361
- if (x.error) {
362
- E(x.error.code ?? "generic", x.error.message);
363
- return;
364
- }
365
- x.paymentIntent && (i.current.paymentIntentId = x.paymentIntent.id, l("succeeded"), (re = k.current) == null || re.call(k, x.paymentIntent.id));
366
- return;
367
- }
368
- const { error: v } = await h.submit();
369
- if (v) {
370
- E(v.code ?? "generic", v.message);
371
- return;
372
- }
373
- if (!N) {
374
- l("idle");
375
- return;
376
- }
377
- const M = await N(), y = await p.confirmPayment({
378
- elements: h,
379
- clientSecret: M,
380
- confirmParams: Q,
381
- redirect: "if_required"
382
- });
383
- if (y.error) {
384
- E(y.error.code ?? "generic", y.error.message);
385
- return;
386
- }
387
- y.paymentIntent && (i.current.paymentIntentId = y.paymentIntent.id, l("succeeded"), (te = k.current) == null || te.call(k, y.paymentIntent.id));
388
- } catch (v) {
389
- const M = v instanceof Error ? v.message : "";
390
- E("unexpected", M);
391
- } finally {
392
- S(!1), i.current.status === "processing" && l("idle");
393
- }
394
- },
395
- [
396
- p,
397
- h,
398
- f,
399
- o,
400
- m,
401
- N,
402
- c,
403
- i,
404
- P,
405
- l
406
- ]
407
- );
408
- L(() => {
409
- const s = document.getElementById(I);
410
- if (!s) return;
411
- const E = () => {
412
- _();
413
- };
414
- return s.addEventListener("payment-form:submit", E), () => s.removeEventListener("payment-form:submit", E);
415
- }, [I, _]), L(() => {
416
- const s = i.current;
417
- return s.submit = _, () => {
418
- s.submit === _ && (s.submit = void 0);
419
- };
420
- }, [i, _]), L(() => {
421
- const s = i.current;
422
- return () => {
423
- s.complete = !1;
424
- };
425
- }, [i]);
426
- const ue = !p || !h || f || !(m === void 0 && !N) && !V;
427
- return /* @__PURE__ */ t(
428
- "form",
429
- {
430
- id: I,
431
- onSubmit: _,
432
- onReset: () => {
433
- P(null), u(""), l("idle"), i.current.paymentIntentId = null;
434
- },
435
- "aria-label": c("payment.ariaLabel"),
436
- "aria-busy": f || void 0,
437
- noValidate: !0,
438
- children: /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
439
- /* @__PURE__ */ g("div", { className: de(), children: [
440
- /* @__PURE__ */ t("span", { className: A(), children: c("payment.amountLabel") }),
441
- /* @__PURE__ */ t("span", { className: "type-title-card", "data-testid": "payment-amount", children: J(n, a, e) })
442
- ] }),
443
- /* @__PURE__ */ g(
444
- "label",
445
- {
446
- htmlFor: U,
447
- className: q(),
448
- "data-testid": "payment-field",
449
- children: [
450
- /* @__PURE__ */ t("span", { className: A(), children: c("payment.fields.card") }),
451
- /* @__PURE__ */ t(
452
- Ie,
453
- {
454
- id: U,
455
- options: {
456
- // `tabs` = method tiles (Card selected by default); `accordion`
457
- // = full-width stacked rows for narrow columns where the tab row
458
- // clips. Stripe owns overflow + tab alignment either way.
459
- layout: O === "accordion" ? { type: "accordion", defaultCollapsed: !0 } : { type: "tabs" }
460
- },
461
- onChange: (s) => {
462
- le(s.complete === !0), s.complete && (P(null), u(""), i.current.status === "failed" && l("idle"));
463
- }
464
- }
465
- )
466
- ]
467
- }
468
- ),
469
- d ? /* @__PURE__ */ g(
470
- "label",
471
- {
472
- htmlFor: w,
473
- className: q(),
474
- "data-testid": "payment-address",
475
- children: [
476
- /* @__PURE__ */ t("span", { className: A(), children: c("payment.billingAddress") }),
477
- /* @__PURE__ */ t(we, { id: w, options: { mode: "billing" } })
478
- ]
479
- }
480
- ) : null,
481
- b ? /* @__PURE__ */ t(
482
- se,
483
- {
484
- id: R,
485
- variant: "error",
486
- live: "polite",
487
- "data-testid": "payment-error",
488
- children: /* @__PURE__ */ t(se.Description, { children: H })
489
- }
490
- ) : null,
491
- /* @__PURE__ */ t(
492
- "button",
493
- {
494
- type: "submit",
495
- "aria-disabled": ue || void 0,
496
- "aria-busy": f || void 0,
497
- "aria-describedby": b ? R : void 0,
498
- className: ce(),
499
- "data-testid": "payment-submit",
500
- children: f ? /* @__PURE__ */ g(me, { children: [
501
- /* @__PURE__ */ t(
502
- oe,
503
- {
504
- variant: "pulse",
505
- size: "sm",
506
- label: c("payment.processing")
507
- }
508
- ),
509
- /* @__PURE__ */ t("span", { children: c("payment.processing") })
510
- ] }) : /* @__PURE__ */ t("span", { children: c("payment.submit", {
511
- amount: J(n, a, e)
512
- }) })
513
- }
514
- )
515
- ] })
516
- }
517
- );
518
- }
519
- const ae = /* @__PURE__ */ new Set([
520
- "auto",
521
- "ar",
522
- "bg",
523
- "cs",
524
- "da",
525
- "de",
526
- "el",
527
- "en",
528
- "en-AU",
529
- "en-CA",
530
- "en-NZ",
531
- "en-GB",
532
- "es",
533
- "es-ES",
534
- "es-419",
535
- "et",
536
- "fi",
537
- "fil",
538
- "fr",
539
- "fr-CA",
540
- "fr-FR",
541
- "he",
542
- "hu",
543
- "hr",
544
- "id",
545
- "it",
546
- "it-IT",
547
- "ja",
548
- "ko",
549
- "lt",
550
- "lv",
551
- "ms",
552
- "mt",
553
- "nb",
554
- "nl",
555
- "no",
556
- "pl",
557
- "pt",
558
- "pt-BR",
559
- "ro",
560
- "ru",
561
- "sk",
562
- "sl",
563
- "sv",
564
- "th",
565
- "tr",
566
- "vi",
567
- "zh",
568
- "zh-HK",
569
- "zh-TW"
570
- ]);
571
- function ze(r) {
572
- if (!r) return "auto";
573
- const n = r === "cn" ? "zh" : r;
574
- if (ae.has(n))
575
- return n;
576
- const a = n.split("-")[0];
577
- return ae.has(a) ? a : "auto";
578
- }
579
- const Le = pe(
580
- ({
581
- id: r,
582
- clientSecret: n,
583
- mode: a = "payment",
584
- onCreatePaymentIntent: e,
585
- publishableKey: d,
586
- currency: o,
587
- amount: m,
588
- onSuccess: N,
589
- onError: K,
590
- billingAddress: F = !1,
591
- locale: O,
592
- ariaLabel: i,
593
- returnUrl: c,
594
- stripePromise: p,
595
- layout: h = "tabs",
596
- className: B
597
- }, I) => {
598
- const { i18n: U } = Y(), w = ze(O ?? U.language ?? "en"), [R, f] = z(p ?? null);
599
- L(() => {
600
- if (p !== void 0) {
601
- f(p);
602
- return;
603
- }
604
- if (!d) {
605
- f(null);
606
- return;
607
- }
608
- f(ge(d));
609
- }, [p, d]);
610
- const [S, V] = z(
611
- () => Z()
612
- );
613
- L(() => (V(Z()), Se(V)), []);
614
- const T = j(null), b = j({
615
- status: "idle",
616
- complete: !1,
617
- errorKey: null,
618
- paymentIntentId: null
619
- }), G = X(
620
- () => ({
621
- submit: async () => {
622
- const u = b.current.submit;
623
- u && await u();
624
- },
625
- reset: () => {
626
- var l;
627
- const u = (l = T.current) == null ? void 0 : l.querySelector("form");
628
- u instanceof HTMLFormElement && u.reset();
629
- },
630
- getStatus: () => b.current.status,
631
- isComplete: () => b.current.complete,
632
- getErrorKey: () => b.current.errorKey,
633
- getPaymentIntentId: () => b.current.paymentIntentId
634
- }),
635
- []
636
- );
637
- fe(I, () => T.current, []), xe(ke, G, r);
638
- const H = X(
639
- () => n !== void 0 ? (
640
- // Immediate mode — the consumer already created the intent.
641
- { clientSecret: n, appearance: S, locale: w }
642
- ) : (
643
- // Deferred-intent mode — no secret yet; Stripe needs the intent
644
- // shape (mode + amount + currency) to render the Payment Element.
645
- // Stripe expects a lowercase ISO-4217 currency here.
646
- {
647
- mode: a,
648
- amount: m,
649
- currency: o.toLowerCase(),
650
- appearance: S,
651
- locale: w
652
- }
653
- ),
654
- [n, a, m, o, S, w]
655
- );
656
- return /* @__PURE__ */ t(
657
- "div",
658
- {
659
- ref: T,
660
- "aria-label": i,
661
- className: [Pe(), B].filter(Boolean).join(" "),
662
- "data-component": "payment-form",
663
- "data-component-id": r,
664
- "data-testid": "payment-form-root",
665
- children: R ? (
666
- // Render the real Payment Element whenever a Stripe instance is
667
- // available — in immediate mode (clientSecret present) AND in
668
- // deferred mode (no secret). The skeleton is reserved for the
669
- // no-Stripe case (missing publishableKey / injected null).
670
- /* @__PURE__ */ t(
671
- be,
672
- {
673
- stripe: R,
674
- options: H,
675
- children: /* @__PURE__ */ t(
676
- _e,
677
- {
678
- amount: m,
679
- currency: o,
680
- locale: w,
681
- billingAddress: F,
682
- returnUrl: c,
683
- clientSecret: n,
684
- onCreatePaymentIntent: e,
685
- onSuccess: N,
686
- onError: K,
687
- layout: h,
688
- agentBridge: b
689
- }
690
- )
691
- },
692
- n ?? "deferred"
693
- )
694
- ) : /* @__PURE__ */ t(
695
- Ae,
696
- {
697
- amount: m,
698
- currency: o,
699
- locale: w,
700
- billingAddress: F
701
- }
702
- )
703
- }
704
- );
705
- }
706
- );
707
- Le.displayName = "PaymentForm";
708
- function Ae(r) {
709
- const { amount: n, currency: a, locale: e, billingAddress: d } = r, { t: o } = Y();
710
- return /* @__PURE__ */ g(
711
- "div",
712
- {
713
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
714
- "data-testid": "payment-skeleton",
715
- "aria-busy": "true",
716
- children: [
717
- /* @__PURE__ */ g("div", { className: de(), children: [
718
- /* @__PURE__ */ t("span", { className: A(), children: o("payment.amountLabel") }),
719
- /* @__PURE__ */ t("span", { className: "type-title-card", children: J(n, a, e) })
720
- ] }),
721
- /* @__PURE__ */ g("div", { className: q(), children: [
722
- /* @__PURE__ */ t("span", { className: A(), children: o("payment.fields.card") }),
723
- /* @__PURE__ */ t(
724
- "div",
725
- {
726
- 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)]",
727
- "aria-hidden": "true"
728
- }
729
- )
730
- ] }),
731
- d ? /* @__PURE__ */ g("div", { className: q(), "data-testid": "payment-address", children: [
732
- /* @__PURE__ */ t("span", { className: A(), children: o("payment.billingAddress") }),
733
- /* @__PURE__ */ t(
734
- "div",
735
- {
736
- 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)]",
737
- "aria-hidden": "true"
738
- }
739
- )
740
- ] }) : null,
741
- /* @__PURE__ */ g(
742
- "button",
743
- {
744
- type: "button",
745
- "aria-disabled": "true",
746
- className: ce(),
747
- disabled: !0,
748
- children: [
749
- /* @__PURE__ */ t(oe, { variant: "pulse", size: "sm", label: o("payment.processing") }),
750
- /* @__PURE__ */ t("span", { children: o("payment.processing") })
751
- ]
752
- }
753
- )
754
- ]
755
- }
756
- );
757
- }
758
- export {
759
- Le as P,
760
- Pe as a,
761
- Ne as b,
762
- Fe as c,
763
- J as f,
764
- ke as p,
765
- ce as s
766
- };
767
- //# sourceMappingURL=payment-form-BHMDqW9C.js.map