@alfadocs/ui-kit 0.1.9 → 0.2.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 (281) hide show
  1. package/README.md +30 -0
  2. package/dist/_chunks/accordion-DOmxGEWU.js +228 -0
  3. package/dist/_chunks/{agenda-card-DwLIxgi7.js → agenda-card-CalZqycc.js} +12 -3
  4. package/dist/_chunks/{agenda-tray-DUvengGQ.js → agenda-tray-3ffFDQZC.js} +54 -51
  5. package/dist/_chunks/{ai-prompt-input.agent-0NHYLTWD.js → ai-prompt-input-BBiDlEIS.js} +231 -231
  6. package/dist/_chunks/{alert-BlOUMkXj.js → alert-B1sj8Ss0.js} +24 -14
  7. package/dist/_chunks/{apexcharts-theme-BkSShpEy.js → apexcharts-theme-BJigns_V.js} +7 -2
  8. package/dist/_chunks/{app-frame-6d7Lu4ea.js → app-frame-CDJOgPXe.js} +7 -16
  9. package/dist/_chunks/{audio-recorder.agent--VKeykUp.js → audio-recorder-B4U1LuiQ.js} +161 -162
  10. package/dist/_chunks/{audio-visualiser-CeMPCZkd.js → audio-visualiser-ByDEFLNm.js} +25 -19
  11. package/dist/_chunks/autocomplete-D4oUZbsP.js +466 -0
  12. package/dist/_chunks/{badge-mrstWxve.js → badge-DKFbntoa.js} +16 -13
  13. package/dist/_chunks/{balance-cell-renderer-5CA7zpAi.js → balance-cell-renderer-B8zgIM-m.js} +63 -44
  14. package/dist/_chunks/{breadcrumb.agent-GM2hAKFX.js → breadcrumb-D1snXjPb.js} +165 -157
  15. package/dist/_chunks/{button-7mLWcMp_.js → button-DD_0Xdmr.js} +12 -2
  16. package/dist/_chunks/{calendar-nGEgelJs.js → calendar-zy0tUUVG.js} +13 -18
  17. package/dist/_chunks/{card-BEy58ZKp.js → card-CWzuTLYE.js} +40 -34
  18. package/dist/_chunks/{chart.agent-_pRYS17d.js → chart-BLvFl169.js} +147 -131
  19. package/dist/_chunks/chat-container-ClzsWXp2.js +220 -0
  20. package/dist/_chunks/chat-input-DOlsB1fm.js +333 -0
  21. package/dist/_chunks/{chat-message-ByouZpPP.js → chat-message-DoAhgUTj.js} +23 -13
  22. package/dist/_chunks/{collapsible.agent-DkS1jVyn.js → collapsible-CuxUBoHJ.js} +97 -99
  23. package/dist/_chunks/{color-picker-94qcBZqZ.js → color-picker-CTIcHlDF.js} +111 -45
  24. package/dist/_chunks/combobox-DCNXqbC7.js +460 -0
  25. package/dist/_chunks/command-palette-C_vgSgrI.js +441 -0
  26. package/dist/_chunks/{date-picker-BqPTn7bO.js → date-picker-B1PO1ZQP.js} +190 -181
  27. package/dist/_chunks/{date-range-picker-B2hGsffw.js → date-range-picker-mix2nEVC.js} +21 -8
  28. package/dist/_chunks/{date-time-picker-Bzt0S8yO.js → date-time-picker-Dnong_BY.js} +30 -15
  29. package/dist/_chunks/{description-list-DvJbp6Yg.js → description-list-BYA77Yud.js} +26 -23
  30. package/dist/_chunks/dialog-BPD7wlGE.js +211 -0
  31. package/dist/_chunks/dropdown-menu-CpiF6CPz.js +300 -0
  32. package/dist/_chunks/{empty-state-DQPtRp2b.js → empty-state-3CLJIXSj.js} +132 -101
  33. package/dist/_chunks/file-upload-C947ACDK.js +829 -0
  34. package/dist/_chunks/{floating-action-button-Cnw-f6AG.js → floating-action-button-C8OYj8mE.js} +9 -2
  35. package/dist/_chunks/{form-field-BfsPLTSc.js → form-field-Bmkeh7WY.js} +12 -11
  36. package/dist/_chunks/{form-field-context-94LwgYTQ.js → form-field-context-B3APVHKx.js} +4 -2
  37. package/dist/_chunks/{freemium-paywall.agent-_nQqLyRF.js → freemium-paywall-CnvceDav.js} +124 -117
  38. package/dist/_chunks/{header-BGn1mRp8.js → header-D0ULgQl3.js} +69 -68
  39. package/dist/_chunks/{icon-button-Wnnde5lc.js → icon-button-C4CGcYuz.js} +11 -3
  40. package/dist/_chunks/{kbd-8baVw3KU.js → kbd-Cglkd7CY.js} +6 -2
  41. package/dist/_chunks/{key-value-pair-JRFS9Xrh.js → key-value-pair-CgWvAIGb.js} +2 -2
  42. package/dist/_chunks/{leo-sidebar-BwINPdix.js → leo-sidebar-CfEY-xi2.js} +16 -20
  43. package/dist/_chunks/{link-QheANk74.js → link-8QmFjIz2.js} +2 -5
  44. package/dist/_chunks/list-qP6p0NTw.js +434 -0
  45. package/dist/_chunks/{logo-BpFoCL-s.js → logo-_Z-jLq80.js} +155 -26
  46. package/dist/_chunks/{matrix-rain-BEkvux64.js → matrix-rain-CRPMXcVx.js} +8 -2
  47. package/dist/_chunks/{message-card-qhoGv947.js → message-card-ChCX9Iv6.js} +63 -60
  48. package/dist/_chunks/{message-tray-xHUCra-Y.js → message-tray-n8q9ITXI.js} +71 -76
  49. package/dist/_chunks/{multi-select.agent-Do6CeQUT.js → multi-select-wqqrgjUQ.js} +326 -291
  50. package/dist/_chunks/{navigation-menu.agent-D69ND6Qq.js → navigation-menu-ClbHeawy.js} +136 -123
  51. package/dist/_chunks/{notification-card-CsVEYJE-.js → notification-card-hBlPN1-c.js} +3 -3
  52. package/dist/_chunks/{notification-tray-DTXMq42J.js → notification-tray-C5cnXbl9.js} +70 -66
  53. package/dist/_chunks/{number-input-fvGmnRy9.js → number-input-Q7wkHnvQ.js} +7 -3
  54. package/dist/_chunks/{otp-input-EglXOUue.js → otp-input-C9gUByF0.js} +6 -3
  55. package/dist/_chunks/{pagination.agent-BkZQl45y.js → pagination-3AC4zTsi.js} +234 -194
  56. package/dist/_chunks/{password-input-D6kuYXmr.js → password-input-C4LmjIH1.js} +6 -9
  57. package/dist/_chunks/{patient-shell-BRmrrUUW.js → patient-shell-BlsEUKWB.js} +10 -15
  58. package/dist/_chunks/{payment-form-BWaXas8z.js → payment-form-C3vT_npe.js} +195 -186
  59. package/dist/_chunks/{pdf-viewer.agent-BaGEDheA.js → pdf-viewer-CZIfY08H.js} +270 -241
  60. package/dist/_chunks/{phone-input-C8Op4sEc.js → phone-input-CSHJOJ13.js} +4 -9
  61. package/dist/_chunks/popover-DekUKNBk.js +293 -0
  62. package/dist/_chunks/{privacy-lock.agent-C1i1-T58.js → privacy-lock-BKsI6ReN.js} +117 -109
  63. package/dist/_chunks/progress-C11tqhoI.js +298 -0
  64. package/dist/_chunks/{recaptcha-widget.agent-BGHpU5zD.js → recaptcha-widget-NyfOfLII.js} +95 -86
  65. package/dist/_chunks/resizable-mpXXyIsN.js +483 -0
  66. package/dist/_chunks/{rich-text-editor.agent-DnE125Tz.js → rich-text-editor-C7TCIlQO.js} +298 -209
  67. package/dist/_chunks/{scroll-area-DLr5w9Dd.js → scroll-area-DEDU-lp-.js} +67 -54
  68. package/dist/_chunks/{search-bar.agent-DxFAxctc.js → search-bar-BTDfgYtg.js} +291 -268
  69. package/dist/_chunks/{search-input-Xw3cdWXW.js → search-input-CdJIEjFo.js} +116 -107
  70. package/dist/_chunks/{select-DY1Cb2Tg.js → select-y6bXV1f1.js} +84 -83
  71. package/dist/_chunks/{separator-B4wXDLNC.js → separator-CYU_bGFn.js} +2 -5
  72. package/dist/_chunks/{sheet-B9kH9pcI.js → sheet-4tgMFwj0.js} +135 -60
  73. package/dist/_chunks/{sidebar-CHF5xr_P.js → sidebar-Bx3wCDyy.js} +546 -457
  74. package/dist/_chunks/{sign-in-with-alfadocs-button-BN_FPGHT.js → sign-in-with-alfadocs-button-B9UrqOqH.js} +9 -5
  75. package/dist/_chunks/{signature-capture.agent-BpeDwFht.js → signature-capture-DjMlFOzS.js} +210 -212
  76. package/dist/_chunks/{skeleton-dtqyF09N.js → skeleton-CZbwyJAA.js} +9 -3
  77. package/dist/_chunks/{slider-CcsQTZTA.js → slider-BT2bZWsy.js} +138 -134
  78. package/dist/_chunks/{slot-grid-D_l5VsHG.js → slot-grid-CgpYgBkW.js} +105 -95
  79. package/dist/_chunks/{sparkline.agent-56Sj7nOP.js → sparkline-_gy8aJDG.js} +107 -100
  80. package/dist/_chunks/{spinner-GCcv67vh.js → spinner-DLaYfLPl.js} +66 -14
  81. package/dist/_chunks/{stat-DUB6g90R.js → stat-B9PHSPbN.js} +45 -27
  82. package/dist/_chunks/{stepper-calendar.agent-9iT3ClIB.js → stepper-calendar-BLOJUE0-.js} +189 -187
  83. package/dist/_chunks/stepper-progress-jFY8BSf7.js +208 -0
  84. package/dist/_chunks/{suggestion-chip-DhFrkRPj.js → suggestion-chip-C4Jz0LrM.js} +50 -52
  85. package/dist/_chunks/{switch-BYEH8I53.js → switch-C0psfIQF.js} +2 -2
  86. package/dist/_chunks/{tabs.agent-h7NvsTR1.js → tabs-DaFA3Muo.js} +183 -155
  87. package/dist/_chunks/{tag-BqidXKo3.js → tag-DuLMjRbF.js} +90 -32
  88. package/dist/_chunks/{task-card-CY5ztNkU.js → task-card-Dw_ZJDL8.js} +5 -2
  89. package/dist/_chunks/{task-tray-CCoUdorl.js → task-tray-XlIW9ueh.js} +50 -49
  90. package/dist/_chunks/{text-area-C_M8wliK.js → text-area-CO9Dz0qX.js} +2 -2
  91. package/dist/_chunks/{text-input-BX39e6T6.js → text-input-DZwt9L8H.js} +65 -62
  92. package/dist/_chunks/{theme-root-DDb0TJjd.js → theme-root-CSKD5ZRm.js} +9 -2
  93. package/dist/_chunks/{theme-toggle.agent-btmXTWdW.js → theme-toggle-B9zzCnvl.js} +179 -177
  94. package/dist/_chunks/{time-picker-B8AMIrX7.js → time-picker-DvPUmHH-.js} +95 -93
  95. package/dist/_chunks/{timeline.agent-CRPza9wc.js → timeline-BvmnQadS.js} +96 -96
  96. package/dist/_chunks/{toast.agent-BjEGuq1Z.js → toast.agent-BwKXA0km.js} +46 -8
  97. package/dist/_chunks/{tooth-scheme.agent-CWrQBjJM.js → tooth-scheme-3mITSXiZ.js} +146 -162
  98. package/dist/_chunks/{transcript-panel.agent-BXEYP6w-.js → transcript-panel-Bx5ANMsv.js} +110 -101
  99. package/dist/_chunks/{typing-indicator-CbUBf-Dx.js → typing-indicator-BZ5jXZPn.js} +27 -5
  100. package/dist/_chunks/{use-theme-BMUhembX.js → use-theme-B1cwAXJR.js} +2 -5
  101. package/dist/_chunks/{visually-hidden-Bw7vBHLm.js → visually-hidden-BHxEUGyT.js} +11 -2
  102. package/dist/_chunks/{warning-stack-8Pa3pekh.js → warning-stack-VygGHSqC.js} +11 -13
  103. package/dist/_chunks/{workflow-map-D2A7rTEG.js → workflow-map-C-nlogPC.js} +430 -452
  104. package/dist/agent-catalog.json +580 -15
  105. package/dist/components/_shared/index.d.ts +2 -2
  106. package/dist/components/accordion/index.d.ts +1 -1
  107. package/dist/components/accordion/index.js +5 -6
  108. package/dist/components/agenda-card/index.js +1 -1
  109. package/dist/components/agenda-tray/agenda-tray.d.ts +1 -1
  110. package/dist/components/agenda-tray/index.js +1 -1
  111. package/dist/components/ai-prompt-input/ai-prompt-input.d.ts +1 -1
  112. package/dist/components/ai-prompt-input/index.js +1 -1
  113. package/dist/components/alert/index.d.ts +1 -1
  114. package/dist/components/alert/index.js +1 -1
  115. package/dist/components/app-frame/index.js +1 -1
  116. package/dist/components/audio-recorder/index.js +1 -1
  117. package/dist/components/audio-visualiser/index.js +1 -1
  118. package/dist/components/autocomplete/index.js +1 -1
  119. package/dist/components/badge/index.js +1 -1
  120. package/dist/components/breadcrumb/breadcrumb.d.ts +1 -1
  121. package/dist/components/breadcrumb/index.js +1 -1
  122. package/dist/components/button/index.js +2 -2
  123. package/dist/components/calendar/index.js +1 -1
  124. package/dist/components/card/index.js +1 -1
  125. package/dist/components/chart/index.d.ts +1 -1
  126. package/dist/components/chart/index.js +1 -1
  127. package/dist/components/chat-container/chat-container.d.ts +1 -1
  128. package/dist/components/chat-container/index.js +2 -3
  129. package/dist/components/chat-input/chat-input.d.ts +1 -1
  130. package/dist/components/chat-input/index.js +3 -4
  131. package/dist/components/chat-message/index.js +1 -1
  132. package/dist/components/checkbox-group/index.d.ts +1 -1
  133. package/dist/components/collapsible/collapsible.d.ts +1 -1
  134. package/dist/components/collapsible/index.d.ts +1 -1
  135. package/dist/components/collapsible/index.js +1 -1
  136. package/dist/components/color-picker/index.js +1 -1
  137. package/dist/components/combobox/index.d.ts +1 -1
  138. package/dist/components/combobox/index.js +1 -1
  139. package/dist/components/command-palette/command-palette.d.ts +46 -13
  140. package/dist/components/command-palette/index.js +1 -1
  141. package/dist/components/data-table/data-table.d.ts +3 -1
  142. package/dist/components/data-table/index.js +1 -1
  143. package/dist/components/data-table/toolbar.d.ts +6 -5
  144. package/dist/components/date-picker/date-picker.d.ts +1 -1
  145. package/dist/components/date-picker/index.d.ts +1 -1
  146. package/dist/components/date-picker/index.js +1 -1
  147. package/dist/components/date-range-picker/index.js +1 -1
  148. package/dist/components/date-time-picker/index.d.ts +1 -1
  149. package/dist/components/date-time-picker/index.js +1 -1
  150. package/dist/components/description-list/description-list.d.ts +1 -2
  151. package/dist/components/description-list/index.js +1 -1
  152. package/dist/components/dialog/dialog.d.ts +2 -2
  153. package/dist/components/dialog/index.js +1 -1
  154. package/dist/components/dropdown-menu/dropdown-menu.d.ts +11 -16
  155. package/dist/components/dropdown-menu/index.js +3 -4
  156. package/dist/components/empty-state/index.js +1 -1
  157. package/dist/components/file-upload/index.d.ts +1 -1
  158. package/dist/components/file-upload/index.js +1 -1
  159. package/dist/components/floating-action-button/index.js +1 -1
  160. package/dist/components/form-field/index.js +2 -2
  161. package/dist/components/freemium-paywall/freemium-paywall.d.ts +1 -1
  162. package/dist/components/freemium-paywall/index.js +1 -1
  163. package/dist/components/header/index.js +1 -1
  164. package/dist/components/icon-button/index.js +1 -1
  165. package/dist/components/kbd/index.js +1 -1
  166. package/dist/components/key-value-pair/index.js +1 -1
  167. package/dist/components/link/index.js +1 -1
  168. package/dist/components/list/index.js +1 -1
  169. package/dist/components/logo/index.js +1 -1
  170. package/dist/components/matrix-rain/index.js +1 -1
  171. package/dist/components/message-card/index.d.ts +1 -1
  172. package/dist/components/message-card/index.js +1 -1
  173. package/dist/components/message-tray/index.js +1 -1
  174. package/dist/components/message-tray/message-tray.d.ts +1 -1
  175. package/dist/components/multi-select/index.js +1 -1
  176. package/dist/components/navigation-menu/index.js +1 -1
  177. package/dist/components/navigation-menu/navigation-menu.d.ts +1 -1
  178. package/dist/components/notification-card/index.d.ts +1 -1
  179. package/dist/components/notification-card/index.js +1 -1
  180. package/dist/components/notification-tray/index.js +1 -1
  181. package/dist/components/notification-tray/notification-tray.d.ts +1 -1
  182. package/dist/components/number-input/index.js +1 -1
  183. package/dist/components/otp-input/index.js +1 -1
  184. package/dist/components/pagination/index.js +1 -1
  185. package/dist/components/pagination/pagination.d.ts +4 -6
  186. package/dist/components/password-input/index.js +1 -1
  187. package/dist/components/payment-form/index.js +7 -8
  188. package/dist/components/payment-form/payment-form.d.ts +1 -1
  189. package/dist/components/pdf-viewer/index.js +1 -1
  190. package/dist/components/phone-input/index.d.ts +1 -1
  191. package/dist/components/phone-input/index.js +1 -1
  192. package/dist/components/popover/index.js +3 -4
  193. package/dist/components/privacy-lock/index.js +1 -1
  194. package/dist/components/privacy-lock/privacy-lock.d.ts +1 -1
  195. package/dist/components/progress/index.js +3 -4
  196. package/dist/components/recaptcha-widget/index.js +1 -1
  197. package/dist/components/resizable/index.d.ts +1 -1
  198. package/dist/components/resizable/index.js +1 -1
  199. package/dist/components/rich-text-editor/index.js +1 -1
  200. package/dist/components/scroll-area/index.js +1 -1
  201. package/dist/components/search-bar/index.js +1 -1
  202. package/dist/components/search-bar/search-bar.d.ts +1 -1
  203. package/dist/components/search-input/index.js +1 -1
  204. package/dist/components/select/index.js +1 -1
  205. package/dist/components/select/select.d.ts +1 -1
  206. package/dist/components/separator/index.js +1 -1
  207. package/dist/components/sheet/index.js +3 -4
  208. package/dist/components/sheet/sheet.d.ts +2 -2
  209. package/dist/components/sidebar/index.js +7 -8
  210. package/dist/components/sidebar/sidebar.d.ts +0 -2
  211. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  212. package/dist/components/signature-capture/index.js +1 -1
  213. package/dist/components/skeleton/index.js +1 -1
  214. package/dist/components/slider/index.js +1 -1
  215. package/dist/components/slot-grid/index.js +1 -1
  216. package/dist/components/sparkline/index.js +1 -1
  217. package/dist/components/spinner/index.js +1 -1
  218. package/dist/components/stat/index.js +1 -1
  219. package/dist/components/stepper-calendar/index.js +1 -1
  220. package/dist/components/stepper-calendar/stepper-calendar.d.ts +1 -1
  221. package/dist/components/stepper-progress/index.d.ts +1 -1
  222. package/dist/components/stepper-progress/index.js +1 -2
  223. package/dist/components/stepper-progress/stepper-progress.d.ts +1 -1
  224. package/dist/components/suggestion-chip/index.js +1 -1
  225. package/dist/components/switch/index.js +1 -1
  226. package/dist/components/tabs/index.d.ts +1 -1
  227. package/dist/components/tabs/index.js +1 -1
  228. package/dist/components/tag/index.js +1 -1
  229. package/dist/components/task-card/index.js +1 -1
  230. package/dist/components/task-tray/index.js +1 -1
  231. package/dist/components/task-tray/task-tray.d.ts +1 -1
  232. package/dist/components/text-area/index.js +1 -1
  233. package/dist/components/text-input/index.js +1 -1
  234. package/dist/components/theme-root/index.js +1 -1
  235. package/dist/components/theme-toggle/index.js +1 -1
  236. package/dist/components/theme-toggle/theme-toggle.d.ts +1 -1
  237. package/dist/components/time-picker/index.js +1 -1
  238. package/dist/components/time-picker/time-picker.d.ts +1 -1
  239. package/dist/components/timeline/index.js +1 -1
  240. package/dist/components/timeline/timeline.d.ts +1 -1
  241. package/dist/components/toast/index.js +1 -1
  242. package/dist/components/tooth-scheme/index.js +1 -1
  243. package/dist/components/tooth-scheme/tooth-scheme.d.ts +1 -1
  244. package/dist/components/transcript-panel/index.js +1 -1
  245. package/dist/components/transcript-panel/transcript-panel.d.ts +1 -1
  246. package/dist/components/typing-indicator/index.js +1 -1
  247. package/dist/components/visually-hidden/index.js +1 -1
  248. package/dist/components/warning-stack/index.js +1 -1
  249. package/dist/components/workflow/index.js +1 -1
  250. package/dist/components/workflow/workflow-editor.d.ts +1 -1
  251. package/dist/hooks/index.js +1 -1
  252. package/dist/index.js +392 -402
  253. package/dist/patterns/leo-assistant/index.js +1 -1
  254. package/dist/patterns/patient-shell/index.js +1 -1
  255. package/dist/safe-html/index.js +20 -3
  256. package/dist/tokens.css +2 -2
  257. package/package.json +12 -2
  258. package/dist/_chunks/accordion-BEnrZmAn.js +0 -120
  259. package/dist/_chunks/accordion.agent-BTjeO1Sx.js +0 -52
  260. package/dist/_chunks/autocomplete.agent-Dh7KioS6.js +0 -432
  261. package/dist/_chunks/chat-container-Dl0Kfy5a.js +0 -175
  262. package/dist/_chunks/chat-container.agent-CM4WModE.js +0 -27
  263. package/dist/_chunks/chat-input-C_tMQv92.js +0 -252
  264. package/dist/_chunks/chat-input.agent-Bsz3ckGa.js +0 -69
  265. package/dist/_chunks/combobox.agent-CAvUkkIe.js +0 -410
  266. package/dist/_chunks/command-palette.agent-HatEt_EM.js +0 -391
  267. package/dist/_chunks/dialog.agent-Daf1TTko.js +0 -179
  268. package/dist/_chunks/dropdown-menu-C7AZipNz.js +0 -219
  269. package/dist/_chunks/dropdown-menu.agent-BcxIKOjK.js +0 -43
  270. package/dist/_chunks/file-upload.agent-DJaH2dHg.js +0 -681
  271. package/dist/_chunks/list.agent-D0iWt4VI.js +0 -420
  272. package/dist/_chunks/payment-form.agent-kuIfodCj.js +0 -31
  273. package/dist/_chunks/popover-kFN8s84V.js +0 -229
  274. package/dist/_chunks/popover.agent-K_d1cfbj.js +0 -39
  275. package/dist/_chunks/progress-wNsqkw8I.js +0 -253
  276. package/dist/_chunks/progress.agent-C68rDOXL.js +0 -27
  277. package/dist/_chunks/resizable.agent-CMwZzvsi.js +0 -456
  278. package/dist/_chunks/sheet.agent-QAyTOxgk.js +0 -46
  279. package/dist/_chunks/sidebar.agent-C9TM_ZDZ.js +0 -49
  280. package/dist/_chunks/stepper-progress-Bmen-YXB.js +0 -149
  281. package/dist/_chunks/stepper-progress.agent-q9InWca4.js +0 -61
@@ -1,10 +1,14 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as L, useRef as c, useEffect as b } from "react";
3
3
  import { useTranslation as y } from "react-i18next";
4
- import { B as E } from "./button-7mLWcMp_.js";
5
- import { L as I } from "./logo-BpFoCL-s.js";
6
- import { S as g } from "./spinner-GCcv67vh.js";
7
- const A = /* @__PURE__ */ new Set(["primary", "secondary", "tonal"]), B = L(
4
+ import { B as E } from "./button-DD_0Xdmr.js";
5
+ import { L as I } from "./logo-_Z-jLq80.js";
6
+ import { S as g } from "./spinner-DLaYfLPl.js";
7
+ const A = /* @__PURE__ */ new Set([
8
+ "primary",
9
+ "secondary",
10
+ "tonal"
11
+ ]), B = L(
8
12
  ({
9
13
  intent: r = "primary",
10
14
  size: n,
@@ -42,4 +46,4 @@ B.displayName = "SignInWithAlfadocsButton";
42
46
  export {
43
47
  B as S
44
48
  };
45
- //# sourceMappingURL=sign-in-with-alfadocs-button-BN_FPGHT.js.map
49
+ //# sourceMappingURL=sign-in-with-alfadocs-button-B9UrqOqH.js.map
@@ -1,9 +1,49 @@
1
- import { jsxs as _, jsx as b } from "react/jsx-runtime";
2
- import { forwardRef as ge, useId as pe, useMemo as ve, useRef as S, useState as T, useEffect as N, useCallback as A, useImperativeHandle as me } from "react";
3
- import be from "signature_pad";
1
+ import { jsxs as W, jsx as b } from "react/jsx-runtime";
2
+ import { forwardRef as ve, useId as me, useMemo as Y, useRef as S, useState as R, useEffect as M, useCallback as N, useImperativeHandle as be } from "react";
3
+ import he from "signature_pad";
4
4
  import { c as k } from "./index-D2ZczOXr.js";
5
- import { useTranslation as he } from "react-i18next";
6
- const ye = k(
5
+ import { useTranslation as ye } from "react-i18next";
6
+ import { u as we } from "./registry-C9nwlNyL.js";
7
+ const xe = {
8
+ id: "signature-capture",
9
+ capabilities: ["edit_inline", "submit"],
10
+ state: {
11
+ isEmpty: {
12
+ type: "boolean",
13
+ description: "True when no signature has been drawn or typed.",
14
+ read: (t) => t.isEmpty()
15
+ }
16
+ },
17
+ actions: {
18
+ clear: {
19
+ safety: "destructive",
20
+ description: "Erase the current signature. Loses unsaved input.",
21
+ invoke: (t) => {
22
+ t.clear();
23
+ }
24
+ },
25
+ undo: {
26
+ safety: "write",
27
+ description: "Undo the last stroke.",
28
+ invoke: (t) => {
29
+ t.undo();
30
+ }
31
+ },
32
+ confirm: {
33
+ safety: "write",
34
+ description: "Commit the signature and return its serialised payload.",
35
+ invoke: (t) => t.confirm()
36
+ }
37
+ },
38
+ domHooks: {
39
+ root: { attr: "data-component", value: "signature-capture" },
40
+ instanceId: {
41
+ attr: "data-component-id",
42
+ sourceProp: "id",
43
+ description: "Sourced from the id prop."
44
+ }
45
+ }
46
+ }, ke = k(
7
47
  [
8
48
  "ds:signature-capture-alfadocs ds:flex ds:flex-col",
9
49
  "ds:gap-[var(--spacing-sm)]",
@@ -12,7 +52,7 @@ const ye = k(
12
52
  "ds:p-[var(--spacing-sm)]",
13
53
  "ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed"
14
54
  ].join(" ")
15
- ), we = k(
55
+ ), ze = k(
16
56
  [
17
57
  "ds:relative ds:block",
18
58
  "ds:inline-size-[var(--signature-width)]",
@@ -27,7 +67,7 @@ const ye = k(
27
67
  "ds:focus-visible:outline-[var(--ring)]",
28
68
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
29
69
  ].join(" ")
30
- ), xe = k(
70
+ ), Ce = k(
31
71
  [
32
72
  "ds:block",
33
73
  "ds:inline-size-full",
@@ -35,9 +75,9 @@ const ye = k(
35
75
  "ds:touch-none",
36
76
  "ds:select-none"
37
77
  ].join(" ")
38
- ), ke = k(
78
+ ), Se = k(
39
79
  ["ds:flex ds:items-center ds:flex-wrap ds:gap-[var(--spacing-xs)]"].join(" ")
40
- ), W = k(
80
+ ), X = k(
41
81
  [
42
82
  "ds:inline-flex ds:items-center ds:justify-center",
43
83
  "ds:min-block-size-[var(--min-target-size)]",
@@ -57,7 +97,7 @@ const ye = k(
57
97
  "ds:forced-colors:focus-visible:outline-[CanvasText]",
58
98
  "ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed"
59
99
  ].join(" ")
60
- ), ze = k(
100
+ ), Ae = k(
61
101
  [
62
102
  "ds:inline-flex ds:items-center ds:justify-center",
63
103
  "ds:min-block-size-[var(--min-target-size)]",
@@ -75,7 +115,7 @@ const ye = k(
75
115
  "ds:forced-colors:focus-visible:outline-[CanvasText]",
76
116
  "ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed"
77
117
  ].join(" ")
78
- ), Ce = k(
118
+ ), Me = k(
79
119
  [
80
120
  "ds:block ds:inline-size-full",
81
121
  "ds:min-block-size-[var(--min-target-size)]",
@@ -92,7 +132,7 @@ const ye = k(
92
132
  "ds:focus-visible:outline-[var(--ring)]",
93
133
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
94
134
  ].join(" ")
95
- ), Se = k(
135
+ ), Ne = k(
96
136
  [
97
137
  "ds:flex ds:items-center ds:justify-center",
98
138
  "ds:inline-size-[var(--signature-width)]",
@@ -107,17 +147,17 @@ const ye = k(
107
147
  "ds:p-[var(--spacing-md)]"
108
148
  ].join(" ")
109
149
  );
110
- function Q(t) {
150
+ function ee(t) {
111
151
  return typeof document > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(t).trim();
112
152
  }
113
- function Y(t, n) {
153
+ function te(t, n) {
114
154
  return typeof t == "number" ? `${t}px` : typeof t == "string" && t.length > 0 ? t : n;
115
155
  }
116
- function ee(t, n) {
156
+ function re(t, n) {
117
157
  const s = parseFloat(t);
118
158
  return Number.isFinite(s) ? s : n;
119
159
  }
120
- function Me(t) {
160
+ function Ee(t) {
121
161
  let n = "";
122
162
  for (let s = 0; s < t.length; s += 1) {
123
163
  const o = t[s];
@@ -125,7 +165,7 @@ function Me(t) {
125
165
  }
126
166
  return n;
127
167
  }
128
- function Ne(t) {
168
+ function Re(t) {
129
169
  if (typeof atob == "function") {
130
170
  const s = atob(t), o = new Uint8Array(s.length);
131
171
  for (let i = 0; i < s.length; i += 1) o[i] = s.charCodeAt(i);
@@ -134,24 +174,27 @@ function Ne(t) {
134
174
  const n = globalThis;
135
175
  return n.Buffer ? n.Buffer.from(t, "base64") : new Uint8Array();
136
176
  }
137
- async function Ae(t) {
177
+ async function Te(t) {
138
178
  var s;
139
179
  const n = globalThis;
140
180
  if ((s = n.crypto) != null && s.subtle) {
141
181
  const o = new Uint8Array(t.byteLength);
142
182
  o.set(t);
143
183
  const i = await n.crypto.subtle.digest("SHA-256", o.buffer);
144
- return Me(new Uint8Array(i));
184
+ return Ee(new Uint8Array(i));
145
185
  }
146
186
  return "";
147
187
  }
148
- function Ee(t, n, s, o, i) {
149
- const p = Math.max(1, typeof window < "u" ? window.devicePixelRatio : 1), x = document.createElement("canvas");
188
+ function Ve(t, n, s, o, i) {
189
+ const p = Math.max(
190
+ 1,
191
+ typeof window < "u" ? window.devicePixelRatio : 1
192
+ ), x = document.createElement("canvas");
150
193
  x.width = Math.floor(n * p), x.height = Math.floor(s * p);
151
194
  const c = x.getContext("2d");
152
195
  return c && (c.setTransform(p, 0, 0, p, 0, 0), c.fillStyle = i, c.fillRect(0, 0, n, s), c.fillStyle = o, c.font = "32px italic sans-serif", c.textAlign = "center", c.textBaseline = "middle", c.fillText(t, n / 2, s / 2, n - 16)), x;
153
196
  }
154
- const Te = ge(
197
+ const je = ve(
155
198
  ({
156
199
  id: t,
157
200
  onConfirm: n,
@@ -161,29 +204,29 @@ const Te = ge(
161
204
  height: p = 200,
162
205
  penColor: x,
163
206
  backgroundColor: c,
164
- allowTypedFallback: te = !0,
207
+ allowTypedFallback: ne = !0,
165
208
  disabled: u = !1,
166
- ariaLabel: re,
167
- className: ne
168
- }, se) => {
169
- const { t: d } = he(), X = pe(), q = `${ve(
170
- () => `sig-${X.replace(/[^a-zA-Z0-9-_]/g, "")}`,
171
- [X]
172
- )}-live`, ae = S(null), F = S(null), h = S(null), [f, ie] = T("draw"), [z, L] = T(""), oe = S("empty"), [de, ce] = T(""), [v, le] = T(""), [y, ue] = T(""), V = S(o), j = S(s), R = S(n);
173
- N(() => {
174
- V.current = o, j.current = s, R.current = n;
209
+ ariaLabel: se,
210
+ className: ae
211
+ }, ie) => {
212
+ const { t: d } = ye(), q = me(), G = `${Y(
213
+ () => `sig-${q.replace(/[^a-zA-Z0-9-_]/g, "")}`,
214
+ [q]
215
+ )}-live`, oe = S(null), F = S(null), h = S(null), [f, de] = R("draw"), [z, L] = R(""), ce = S("empty"), [le, ue] = R(""), [v, fe] = R(""), [y, ge] = R(""), T = S(o), V = S(s), j = S(n);
216
+ M(() => {
217
+ T.current = o, V.current = s, j.current = n;
175
218
  }, [o, s, n]);
176
- const g = A(
219
+ const g = N(
177
220
  (e) => {
178
- oe.current = e, ce(d(`signature.state.${e}`));
221
+ ce.current = e, ue(d(`signature.state.${e}`));
179
222
  },
180
223
  [d]
181
224
  );
182
- N(() => {
225
+ M(() => {
183
226
  if (typeof document > "u") return;
184
227
  function e() {
185
- const a = x ?? Q("--foreground"), m = c ?? Q("--background");
186
- le(a || "currentColor"), ue(m || "transparent");
228
+ const a = x ?? ee("--foreground"), m = c ?? ee("--background");
229
+ fe(a || "currentColor"), ge(m || "transparent");
187
230
  }
188
231
  e();
189
232
  const r = new MutationObserver(() => {
@@ -193,14 +236,14 @@ const Te = ge(
193
236
  attributes: !0,
194
237
  attributeFilter: ["class"]
195
238
  }), () => r.disconnect();
196
- }, [x, c]), N(() => {
239
+ }, [x, c]), M(() => {
197
240
  const e = h.current;
198
241
  e && (v && (e.penColor = v), y && (e.backgroundColor = y));
199
- }, [v, y]), N(() => {
242
+ }, [v, y]), M(() => {
200
243
  if (f !== "draw") return;
201
244
  const e = F.current;
202
245
  if (!e) return;
203
- const r = new be(e, {
246
+ const r = new he(e, {
204
247
  penColor: v || "currentColor",
205
248
  backgroundColor: y || "transparent",
206
249
  minWidth: 0.5,
@@ -210,28 +253,32 @@ const Te = ge(
210
253
  h.current = r;
211
254
  const a = () => {
212
255
  var C;
213
- g("drawing"), (C = V.current) == null || C.call(V);
256
+ g("drawing"), (C = T.current) == null || C.call(T);
214
257
  }, m = () => {
215
258
  };
216
259
  return r.addEventListener("beginStroke", a), r.addEventListener("endStroke", m), B(e), g("empty"), () => {
217
260
  r.removeEventListener("beginStroke", a), r.removeEventListener("endStroke", m), r.clear(), r.off(), h.current = null;
218
261
  };
219
- }, [f]), N(() => {
262
+ }, [f]), M(() => {
220
263
  const e = h.current;
221
264
  e && (u ? e.off() : e.on());
222
265
  }, [u, f]);
223
- const G = 4096, B = A((e) => {
224
- const r = e.getBoundingClientRect(), a = Math.max(
225
- 1,
226
- typeof window < "u" ? window.devicePixelRatio : 1
227
- ), m = Math.max(1, Math.floor(r.width * a)), C = Math.max(1, Math.floor(r.height * a)), $ = Math.min(m, G), D = Math.min(C, G);
228
- if (e.width === $ && e.height === D) return;
229
- const w = h.current, M = w ? w.toData() : null;
230
- e.width = $, e.height = D;
231
- const E = e.getContext("2d");
232
- E && E.scale(a, a), w && (y && (w.backgroundColor = y), v && (w.penColor = v), w.clear(), M && M.length > 0 && w.fromData(M));
233
- }, [y, v]);
234
- N(() => {
266
+ const Z = 4096, B = N(
267
+ (e) => {
268
+ const r = e.getBoundingClientRect(), a = Math.max(
269
+ 1,
270
+ typeof window < "u" ? window.devicePixelRatio : 1
271
+ ), m = Math.max(1, Math.floor(r.width * a)), C = Math.max(1, Math.floor(r.height * a)), $ = Math.min(m, Z), D = Math.min(C, Z);
272
+ if (e.width === $ && e.height === D)
273
+ return;
274
+ const w = h.current, A = w ? w.toData() : null;
275
+ e.width = $, e.height = D;
276
+ const E = e.getContext("2d");
277
+ E && E.scale(a, a), w && (y && (w.backgroundColor = y), v && (w.penColor = v), w.clear(), A && A.length > 0 && w.fromData(A));
278
+ },
279
+ [y, v]
280
+ );
281
+ M(() => {
235
282
  const e = F.current;
236
283
  if (!e) return;
237
284
  if (typeof ResizeObserver > "u") {
@@ -243,25 +290,25 @@ const Te = ge(
243
290
  });
244
291
  return r.observe(e), () => r.disconnect();
245
292
  }, [B]);
246
- const P = A(() => {
293
+ const P = N(() => {
247
294
  var r;
248
295
  const e = h.current;
249
- e && e.clear(), L(""), g("cleared"), (r = j.current) == null || r.call(j);
250
- }, [g]), I = A(() => {
296
+ e && e.clear(), L(""), g("cleared"), (r = V.current) == null || r.call(V);
297
+ }, [g]), I = N(() => {
251
298
  const e = h.current;
252
299
  if (!e) return;
253
300
  const r = e.toData();
254
301
  !r || r.length === 0 || (r.pop(), e.fromData(r), r.length === 0 && g("empty"));
255
- }, [g]), U = A(() => {
302
+ }, [g]), U = N(() => {
256
303
  if (f === "typed") return z.trim().length === 0;
257
304
  const e = h.current;
258
305
  return e ? e.isEmpty() : !0;
259
- }, [f, z]), H = A(async () => {
260
- var J;
261
- const e = ee(
306
+ }, [f, z]), H = N(async () => {
307
+ var K;
308
+ const e = re(
262
309
  typeof i == "number" ? `${i}` : String(i),
263
310
  400
264
- ), r = ee(
311
+ ), r = re(
265
312
  typeof p == "number" ? `${p}` : String(p),
266
313
  200
267
314
  );
@@ -273,21 +320,21 @@ const Te = ge(
273
320
  } else {
274
321
  const l = z.trim();
275
322
  if (l.length === 0) return null;
276
- a = Ee(
323
+ a = Ve(
277
324
  l,
278
325
  e,
279
326
  r,
280
327
  v || "currentColor",
281
328
  y || "transparent"
282
329
  ).toDataURL("image/png");
283
- const O = l.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
284
- m = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${e} ${r}" width="${e}" height="${r}"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="sans-serif" font-style="italic" font-size="32" fill="${v || "currentColor"}" letter-spacing="3">${O}</text></svg>`;
330
+ const _ = l.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
331
+ m = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${e} ${r}" width="${e}" height="${r}"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="sans-serif" font-style="italic" font-size="32" fill="${v || "currentColor"}" letter-spacing="3">${_}</text></svg>`;
285
332
  }
286
333
  const $ = e * 25.4 / 96, D = r * 25.4 / 96, w = (/* @__PURE__ */ new Date()).toISOString();
287
- let M = "";
334
+ let A = "";
288
335
  if (a) {
289
- const l = a.indexOf(","), K = l >= 0 ? a.slice(l + 1) : "", O = Ne(K);
290
- M = await Ae(O);
336
+ const l = a.indexOf(","), Q = l >= 0 ? a.slice(l + 1) : "", _ = Re(Q);
337
+ A = await Te(_);
291
338
  }
292
339
  const E = {
293
340
  png: a,
@@ -295,21 +342,11 @@ const Te = ge(
295
342
  widthMm: $,
296
343
  heightMm: D,
297
344
  capturedAt: w,
298
- sha256: M,
345
+ sha256: A,
299
346
  strokes: C
300
347
  };
301
- return g("captured"), (J = R.current) == null || J.call(R, E), E;
302
- }, [
303
- f,
304
- z,
305
- i,
306
- p,
307
- v,
308
- y,
309
- g
310
- ]);
311
- me(
312
- se,
348
+ return g("captured"), (K = j.current) == null || K.call(j, E), E;
349
+ }, [f, z, i, p, v, y, g]), O = Y(
313
350
  () => ({
314
351
  clear: P,
315
352
  undo: I,
@@ -318,38 +355,38 @@ const Te = ge(
318
355
  }),
319
356
  [P, I, U, H]
320
357
  );
321
- const Z = u || U(), fe = {
322
- "--signature-width": Y(i, "var(--signature-default-width)"),
323
- "--signature-height": Y(p, "var(--signature-default-height)")
358
+ be(ie, () => O, [O]), we(xe, O, t);
359
+ const J = u || U(), pe = {
360
+ "--signature-width": te(
361
+ i,
362
+ "var(--signature-default-width)"
363
+ ),
364
+ "--signature-height": te(
365
+ p,
366
+ "var(--signature-default-height)"
367
+ )
324
368
  };
325
- return /* @__PURE__ */ _(
369
+ return /* @__PURE__ */ W(
326
370
  "div",
327
371
  {
328
- role: "region",
329
- "aria-label": re ?? d("signature.padLabel"),
372
+ role: "group",
373
+ "aria-label": se ?? d("signature.padLabel"),
330
374
  "aria-disabled": u || void 0,
331
- className: [ye(), ne].filter(Boolean).join(" "),
332
- style: fe,
375
+ className: [ke(), ae].filter(Boolean).join(" "),
376
+ style: pe,
333
377
  "data-component": "signature-capture",
334
378
  "data-component-id": t,
335
379
  children: [
336
- f === "draw" ? /* @__PURE__ */ b(
337
- "div",
380
+ f === "draw" ? /* @__PURE__ */ b("div", { ref: oe, className: ze(), children: /* @__PURE__ */ b(
381
+ "canvas",
338
382
  {
339
- ref: ae,
340
- className: we(),
341
- children: /* @__PURE__ */ b(
342
- "canvas",
343
- {
344
- ref: F,
345
- role: "img",
346
- "aria-label": d("signature.padLabel"),
347
- className: xe(),
348
- "data-testid": "signature-canvas"
349
- }
350
- )
383
+ ref: F,
384
+ role: "img",
385
+ "aria-label": d("signature.padLabel"),
386
+ className: Ce(),
387
+ "data-testid": "signature-canvas"
351
388
  }
352
- ) : /* @__PURE__ */ _("label", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
389
+ ) }) : /* @__PURE__ */ W("label", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
353
390
  /* @__PURE__ */ b("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: d("signature.typedFallback.label") }),
354
391
  /* @__PURE__ */ b(
355
392
  "input",
@@ -362,131 +399,92 @@ const Te = ge(
362
399
  placeholder: d("signature.typedFallback.placeholder"),
363
400
  "aria-label": d("signature.typedFallback.label"),
364
401
  disabled: u,
365
- className: Ce(),
402
+ className: Me(),
366
403
  "data-testid": "signature-typed-input"
367
404
  }
368
405
  ),
369
- z ? /* @__PURE__ */ b(
370
- "div",
371
- {
372
- className: Se(),
373
- "aria-hidden": "true",
374
- children: z
375
- }
376
- ) : null
406
+ z ? /* @__PURE__ */ b("div", { className: Ne(), "aria-hidden": "true", children: z }) : null
377
407
  ] }),
378
408
  /* @__PURE__ */ b(
379
409
  "div",
380
410
  {
381
- id: q,
411
+ id: G,
382
412
  "aria-live": "polite",
383
413
  "aria-atomic": "true",
384
414
  className: "ds:sr-only",
385
415
  "data-testid": "signature-live",
386
- children: de
416
+ children: le
387
417
  }
388
418
  ),
389
- /* @__PURE__ */ _("div", { className: ke(), role: "group", "aria-label": d("signature.padLabel"), children: [
390
- /* @__PURE__ */ b(
391
- "button",
392
- {
393
- type: "button",
394
- onClick: () => {
395
- u || P();
396
- },
397
- "aria-disabled": u || void 0,
398
- className: W(),
399
- children: d("signature.clear")
400
- }
401
- ),
402
- f === "draw" ? /* @__PURE__ */ b(
403
- "button",
404
- {
405
- type: "button",
406
- onClick: () => {
407
- u || I();
408
- },
409
- "aria-disabled": u || void 0,
410
- className: W(),
411
- children: d("signature.undo")
412
- }
413
- ) : null,
414
- te ? /* @__PURE__ */ b(
415
- "button",
416
- {
417
- type: "button",
418
- onClick: () => {
419
- u || (L(""), ie((e) => e === "draw" ? "typed" : "draw"), g("cleared"));
420
- },
421
- "aria-disabled": u || void 0,
422
- className: W(),
423
- "aria-pressed": f === "typed",
424
- children: d(f === "draw" ? "signature.typedFallback.toggle" : "signature.typedFallback.toggleDraw")
425
- }
426
- ) : null,
427
- /* @__PURE__ */ b(
428
- "button",
429
- {
430
- type: "button",
431
- onClick: () => {
432
- Z || H();
433
- },
434
- "aria-disabled": Z || void 0,
435
- "aria-describedby": q,
436
- className: ze(),
437
- "data-testid": "signature-confirm",
438
- children: d("signature.confirm")
439
- }
440
- )
441
- ] })
419
+ /* @__PURE__ */ W(
420
+ "div",
421
+ {
422
+ className: Se(),
423
+ role: "group",
424
+ "aria-label": d("signature.padLabel"),
425
+ children: [
426
+ /* @__PURE__ */ b(
427
+ "button",
428
+ {
429
+ type: "button",
430
+ onClick: () => {
431
+ u || P();
432
+ },
433
+ "aria-disabled": u || void 0,
434
+ className: X(),
435
+ children: d("signature.clear")
436
+ }
437
+ ),
438
+ f === "draw" ? /* @__PURE__ */ b(
439
+ "button",
440
+ {
441
+ type: "button",
442
+ onClick: () => {
443
+ u || I();
444
+ },
445
+ "aria-disabled": u || void 0,
446
+ className: X(),
447
+ children: d("signature.undo")
448
+ }
449
+ ) : null,
450
+ ne ? /* @__PURE__ */ b(
451
+ "button",
452
+ {
453
+ type: "button",
454
+ onClick: () => {
455
+ u || (L(""), de((e) => e === "draw" ? "typed" : "draw"), g("cleared"));
456
+ },
457
+ "aria-disabled": u || void 0,
458
+ className: X(),
459
+ "aria-pressed": f === "typed",
460
+ children: d(f === "draw" ? "signature.typedFallback.toggle" : "signature.typedFallback.toggleDraw")
461
+ }
462
+ ) : null,
463
+ /* @__PURE__ */ b(
464
+ "button",
465
+ {
466
+ type: "button",
467
+ onClick: () => {
468
+ J || H();
469
+ },
470
+ "aria-disabled": J || void 0,
471
+ "aria-describedby": G,
472
+ className: Ae(),
473
+ "data-testid": "signature-confirm",
474
+ children: d("signature.confirm")
475
+ }
476
+ )
477
+ ]
478
+ }
479
+ )
442
480
  ]
443
481
  }
444
482
  );
445
483
  }
446
484
  );
447
- Te.displayName = "SignatureCapture";
448
- const Fe = {
449
- id: "signature-capture",
450
- capabilities: ["edit_inline", "submit"],
451
- state: {
452
- isEmpty: {
453
- type: "boolean",
454
- description: "True when no signature has been drawn or typed.",
455
- read: (t) => t.isEmpty()
456
- }
457
- },
458
- actions: {
459
- clear: {
460
- safety: "destructive",
461
- description: "Erase the current signature. Loses unsaved input.",
462
- invoke: (t) => {
463
- t.clear();
464
- }
465
- },
466
- undo: {
467
- safety: "write",
468
- description: "Undo the last stroke.",
469
- invoke: (t) => {
470
- t.undo();
471
- }
472
- },
473
- confirm: {
474
- safety: "write",
475
- description: "Commit the signature and return its serialised payload.",
476
- invoke: (t) => t.confirm()
477
- }
478
- },
479
- domHooks: {
480
- root: { attr: "data-component", value: "signature-capture" },
481
- instanceId: {
482
- attr: "data-component-id",
483
- sourceProp: "id",
484
- description: "Sourced from the id prop."
485
- }
486
- }
487
- };
485
+ je.displayName = "SignatureCapture";
488
486
  export {
489
- Te as S,
490
- Fe as s
487
+ je as S,
488
+ xe as s
491
489
  };
492
- //# sourceMappingURL=signature-capture.agent-BpeDwFht.js.map
490
+ //# sourceMappingURL=signature-capture-DjMlFOzS.js.map