@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
@@ -0,0 +1,298 @@
1
+ import { jsx as d, jsxs as N } from "react/jsx-runtime";
2
+ import { forwardRef as R, useId as fe, useRef as p, useState as pe, useEffect as ge, useLayoutEffect as K, useMemo as ve, useImperativeHandle as be, createContext as ye, useContext as he } from "react";
3
+ import { c as U } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as C } from "react-i18next";
5
+ import { u as xe } from "./registry-C9nwlNyL.js";
6
+ const ke = {
7
+ id: "progress",
8
+ capabilities: [],
9
+ state: {},
10
+ actions: {
11
+ set_value: {
12
+ safety: "read",
13
+ argsType: "{ value: number }",
14
+ description: "Set the displayed progress value (0–100).",
15
+ invoke: (a, i) => {
16
+ a.setValue(i.value);
17
+ }
18
+ }
19
+ },
20
+ domHooks: {
21
+ root: { attr: "data-component", value: "progress" },
22
+ instanceId: {
23
+ attr: "data-component-id",
24
+ sourceProp: "id",
25
+ description: "Sourced from the id prop."
26
+ }
27
+ }
28
+ }, j = ye(null);
29
+ function W() {
30
+ const a = he(j);
31
+ if (!a)
32
+ throw new Error("Progress sub-components must be used within <Progress>");
33
+ return a;
34
+ }
35
+ const M = {
36
+ sm: { viewBox: "0 0 24 24", cx: 12, cy: 12, r: 10 },
37
+ md: { viewBox: "0 0 40 40", cx: 20, cy: 20, r: 18 },
38
+ lg: { viewBox: "0 0 56 56", cx: 28, cy: 28, r: 26 }
39
+ }, Pe = U(
40
+ "ds:relative ds:w-full ds:overflow-hidden ds:rounded-[var(--radius-full)] ds:bg-[var(--progress-track)]",
41
+ {
42
+ variants: {
43
+ size: { sm: "ds:h-1", md: "ds:h-2", lg: "ds:h-3" }
44
+ },
45
+ defaultVariants: { size: "md" }
46
+ }
47
+ ), Q = U("", {
48
+ variants: {
49
+ size: {
50
+ sm: "ds:w-6 ds:h-6",
51
+ md: "ds:w-10 ds:h-10",
52
+ lg: "ds:w-14 ds:h-14"
53
+ }
54
+ },
55
+ defaultVariants: { size: "md" }
56
+ }), Y = R(({ children: a, className: i, ...e }, t) => {
57
+ const r = W(), { t: u, i18n: m } = C(), f = r.isIndeterminate ? u("ui.common.loading", "Loading...") : u("ui.common.progress_label", {
58
+ percent: new Intl.NumberFormat(m.language, {
59
+ style: "percent",
60
+ maximumFractionDigits: 0
61
+ }).format((r.value ?? 0) / r.max)
62
+ });
63
+ return /* @__PURE__ */ d(
64
+ "span",
65
+ {
66
+ ref: t,
67
+ id: r.labelId,
68
+ className: ["type-label ds:text-foreground", i].filter(Boolean).join(" "),
69
+ ...e,
70
+ children: a ?? f
71
+ }
72
+ );
73
+ });
74
+ Y.displayName = "Progress.Label";
75
+ const Z = R(({ className: a, ...i }, e) => {
76
+ const t = W(), { t: r, i18n: u } = C(), m = t.isIndeterminate ? r("ui.common.loading", "Loading...") : new Intl.NumberFormat(u.language, {
77
+ style: "percent",
78
+ maximumFractionDigits: 0
79
+ }).format((t.value ?? 0) / t.max);
80
+ return /* @__PURE__ */ d(
81
+ "span",
82
+ {
83
+ ref: e,
84
+ className: [
85
+ "type-body-sm ds:tabular-nums ds:text-muted-foreground",
86
+ a
87
+ ].filter(Boolean).join(" "),
88
+ ...i,
89
+ children: m
90
+ }
91
+ );
92
+ });
93
+ Z.displayName = "Progress.Value";
94
+ const $ = R(
95
+ ({
96
+ id: a,
97
+ value: i,
98
+ max: e = 100,
99
+ shape: t = "bar",
100
+ size: r = "md",
101
+ ariaLabel: u,
102
+ ariaValueText: m,
103
+ debouncePercent: f = 1,
104
+ disabled: S = !1,
105
+ className: z,
106
+ children: V,
107
+ ...L
108
+ }, ee) => {
109
+ const B = fe(), { t: D, i18n: re } = C(), x = p(null), k = p(null), P = p(null), w = p(null), g = p(null), s = i === void 0, c = s ? void 0 : Math.min(e, Math.max(0, i)), te = c !== void 0 ? c / e * 100 : void 0, [se, ae] = pe(!1);
110
+ ge(() => {
111
+ ae(!0);
112
+ }, []);
113
+ const v = se || s ? te : 0;
114
+ K(() => {
115
+ var n, l;
116
+ if (!(s || v === void 0))
117
+ if (t === "bar")
118
+ (n = k.current) == null || n.style.setProperty(
119
+ "--progress-value",
120
+ String(v)
121
+ );
122
+ else {
123
+ const { r: o } = M[r], h = 2 * Math.PI * o * (1 - v / 100);
124
+ (l = w.current) == null || l.style.setProperty(
125
+ "stroke-dashoffset",
126
+ String(h)
127
+ );
128
+ }
129
+ }, [s, v, t, r]), K(() => {
130
+ const n = t === "bar" ? x.current : P.current;
131
+ if (!n) return;
132
+ if (s) {
133
+ n.removeAttribute("aria-valuenow"), g.current = null;
134
+ return;
135
+ }
136
+ if (c === void 0) return;
137
+ const l = c / e * 100, o = g.current;
138
+ (o === null ? 1 / 0 : Math.abs(l - o)) >= f && (n.setAttribute("aria-valuenow", String(c)), g.current = l);
139
+ }, [s, c, e, f, t]);
140
+ const F = p(null), _ = ve(
141
+ () => ({
142
+ setValue: (n) => {
143
+ var G, J;
144
+ const l = Math.min(e, Math.max(0, n)), o = l / e * 100;
145
+ if (t === "bar")
146
+ (G = k.current) == null || G.style.setProperty(
147
+ "--progress-value",
148
+ String(o)
149
+ );
150
+ else {
151
+ const { r: ue } = M[r], me = 2 * Math.PI * ue * (1 - o / 100);
152
+ (J = w.current) == null || J.style.setProperty(
153
+ "stroke-dashoffset",
154
+ String(me)
155
+ );
156
+ }
157
+ const y = t === "bar" ? x.current : P.current, h = g.current;
158
+ (h === null ? 1 / 0 : Math.abs(o - h)) >= f && y && (y.setAttribute("aria-valuenow", String(l)), g.current = o);
159
+ }
160
+ }),
161
+ [e, t, r, f]
162
+ );
163
+ be(ee, () => _, [_]), xe(ke, _, a);
164
+ const ne = s ? D("ui.common.loading", "Loading...") : D("ui.common.progress_label", {
165
+ percent: new Intl.NumberFormat(re.language, {
166
+ style: "percent",
167
+ maximumFractionDigits: 0
168
+ }).format((c ?? 0) / e)
169
+ }), A = u ? { "aria-label": u } : { "aria-labelledby": B, "aria-label": ne }, E = s ? { "aria-busy": !0, "aria-valuemin": 0, "aria-valuemax": e } : {
170
+ "aria-valuemin": 0,
171
+ "aria-valuemax": e,
172
+ ...m ? { "aria-valuetext": m } : {}
173
+ }, T = S ? { "aria-disabled": !0 } : {}, H = [
174
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
175
+ S && "ds:opacity-50",
176
+ z
177
+ ].filter(Boolean).join(" "), O = {
178
+ labelId: B,
179
+ isIndeterminate: s,
180
+ value: c,
181
+ max: e
182
+ };
183
+ if (t === "bar") {
184
+ const n = s ? [
185
+ "ds:absolute ds:[inset-block:0] ds:bg-primary ds:rounded-[var(--radius-full)]",
186
+ "ds:[@media(prefers-reduced-motion:no-preference)]:animate-[progress-bar-indeterminate_1200ms_ease-in-out_infinite]",
187
+ "ds:[.theme-accessible_&]:animate-none",
188
+ "ds:motion-reduce:animate-[progress-indeterminate-pulse_var(--animation-duration)_ease-in-out_infinite]"
189
+ ].join(" ") : [
190
+ "ds:absolute ds:[inset-block:0] ds:start-0",
191
+ "ds:[inline-size:calc(var(--progress-value,0)*1%)]",
192
+ "ds:bg-primary ds:rounded-[var(--radius-full)]",
193
+ "ds:transition-[inline-size] ds:duration-[var(--animation-duration)]",
194
+ "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
195
+ ].join(" ");
196
+ return /* @__PURE__ */ d(j.Provider, { value: O, children: /* @__PURE__ */ N(
197
+ "div",
198
+ {
199
+ ref: F,
200
+ className: H,
201
+ "data-component": "progress",
202
+ "data-component-id": a,
203
+ ...L,
204
+ children: [
205
+ V,
206
+ /* @__PURE__ */ d(
207
+ "div",
208
+ {
209
+ ref: x,
210
+ role: "progressbar",
211
+ ...A,
212
+ ...E,
213
+ ...T,
214
+ className: Pe({ size: r }),
215
+ children: /* @__PURE__ */ d("div", { ref: k, className: n })
216
+ }
217
+ )
218
+ ]
219
+ }
220
+ ) });
221
+ }
222
+ const { viewBox: oe, cx: X, cy: q, r: I } = M[r], b = 2 * Math.PI * I, ie = b * 0.25, ce = s ? ie : b, le = s ? [
223
+ Q({ size: r }),
224
+ "ds:[transform:rotate(-90deg)]",
225
+ "ds:[@media(prefers-reduced-motion:no-preference)]:animate-[progress-circular-spin_1200ms_linear_infinite]",
226
+ "ds:[.theme-accessible_&]:animate-none",
227
+ "ds:motion-reduce:animate-[progress-indeterminate-pulse_var(--animation-duration)_ease-in-out_infinite]"
228
+ ].join(" ") : [
229
+ Q({ size: r }),
230
+ "ds:[transform:rotate(-90deg)]",
231
+ "ds:rtl:[transform:rotate(-90deg)_scaleX(-1)]"
232
+ ].join(" "), de = [
233
+ "ds:stroke-primary ds:[stroke-width:var(--spacing-xs)]",
234
+ !s && "ds:transition-[stroke-dashoffset] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
235
+ ].filter(Boolean).join(" ");
236
+ return /* @__PURE__ */ d(j.Provider, { value: O, children: /* @__PURE__ */ N(
237
+ "div",
238
+ {
239
+ ref: F,
240
+ className: H,
241
+ "data-component": "progress",
242
+ ...L,
243
+ children: [
244
+ V,
245
+ /* @__PURE__ */ N(
246
+ "svg",
247
+ {
248
+ ref: P,
249
+ role: "progressbar",
250
+ ...A,
251
+ ...E,
252
+ ...T,
253
+ viewBox: oe,
254
+ className: le,
255
+ children: [
256
+ /* @__PURE__ */ d(
257
+ "circle",
258
+ {
259
+ cx: X,
260
+ cy: q,
261
+ r: I,
262
+ fill: "none",
263
+ strokeDasharray: b,
264
+ className: "ds:[stroke:var(--progress-track)] ds:[stroke-width:var(--spacing-xs)]"
265
+ }
266
+ ),
267
+ /* @__PURE__ */ d(
268
+ "circle",
269
+ {
270
+ ref: w,
271
+ cx: X,
272
+ cy: q,
273
+ r: I,
274
+ fill: "none",
275
+ strokeLinecap: "round",
276
+ strokeDasharray: b,
277
+ strokeDashoffset: ce,
278
+ className: de
279
+ }
280
+ )
281
+ ]
282
+ }
283
+ )
284
+ ]
285
+ }
286
+ ) });
287
+ }
288
+ );
289
+ $.displayName = "Progress";
290
+ const Ce = Object.assign($, {
291
+ Label: Y,
292
+ Value: Z
293
+ });
294
+ export {
295
+ Ce as P,
296
+ ke as p
297
+ };
298
+ //# sourceMappingURL=progress-C11tqhoI.js.map
@@ -1,18 +1,60 @@
1
- import { jsxs as D, jsx as W } from "react/jsx-runtime";
2
- import { forwardRef as U, useRef as u, useState as q, useEffect as E, useImperativeHandle as G } from "react";
3
- import { useTranslation as J } from "react-i18next";
4
- import { u as K } from "./form-field-context-94LwgYTQ.js";
5
- import { u as Q } from "./use-theme-BMUhembX.js";
6
- const X = "https://www.google.com/recaptcha/api.js", L = "alfadocs-ui-recaptcha-loader";
1
+ import { jsxs as U, jsx as L } from "react/jsx-runtime";
2
+ import { forwardRef as q, useRef as u, useState as E, useEffect as G, useMemo as J, useImperativeHandle as K } from "react";
3
+ import { useTranslation as Q } from "react-i18next";
4
+ import { u as X } from "./form-field-context-B3APVHKx.js";
5
+ import { u as Y } from "./use-theme-B1cwAXJR.js";
6
+ import { u as Z } from "./registry-C9nwlNyL.js";
7
+ const z = {
8
+ id: "recaptcha-widget",
9
+ capabilities: ["submit"],
10
+ state: {
11
+ hasToken: {
12
+ type: "boolean",
13
+ descriptionKey: "ui.agent.recaptchaWidget.state.hasToken",
14
+ description: "True when the widget currently holds a valid verification token.",
15
+ read: (t) => t.getResponse().length > 0
16
+ }
17
+ },
18
+ actions: {
19
+ execute: {
20
+ safety: "write",
21
+ descriptionKey: "ui.agent.recaptchaWidget.actions.execute",
22
+ description: "Programmatically trigger the captcha challenge. Issues a token via the callback.",
23
+ invoke: (t) => {
24
+ t.execute();
25
+ }
26
+ },
27
+ reset: {
28
+ safety: "destructive",
29
+ descriptionKey: "ui.agent.recaptchaWidget.actions.reset",
30
+ description: "Clear the current token and re-roll the captcha. Irreversible.",
31
+ invoke: (t) => {
32
+ t.reset();
33
+ }
34
+ }
35
+ },
36
+ domHooks: {
37
+ root: {
38
+ attr: "data-component",
39
+ value: "recaptcha-widget",
40
+ description: "Marks the RecaptchaWidget wrapper."
41
+ },
42
+ instanceId: {
43
+ attr: "data-component-id",
44
+ sourceProp: "id",
45
+ description: "Sourced from the id prop (or the surrounding FormField id)."
46
+ }
47
+ }
48
+ }, C = "https://www.google.com/recaptcha/api.js", j = "alfadocs-ui-recaptcha-loader";
7
49
  let f = null;
8
- function Y(t) {
50
+ function ee(t) {
9
51
  return typeof window > "u" ? Promise.reject(new Error("recaptcha: window is not available")) : window.grecaptcha && typeof window.grecaptcha.render == "function" ? Promise.resolve(window.grecaptcha) : f || (f = new Promise((d, g) => {
10
- const y = document.getElementById(
11
- L
52
+ const b = document.getElementById(
53
+ j
12
54
  ), i = () => {
13
55
  window.grecaptcha && typeof window.grecaptcha.render == "function" ? d(window.grecaptcha) : g(new Error("recaptcha: grecaptcha global missing after load"));
14
56
  };
15
- if (window.___grecaptchaOnLoad___ = i, y)
57
+ if (window.___grecaptchaOnLoad___ = i, b)
16
58
  return;
17
59
  const p = new URLSearchParams({
18
60
  onload: "___grecaptchaOnLoad___",
@@ -20,37 +62,37 @@ function Y(t) {
20
62
  });
21
63
  t && p.set("hl", t);
22
64
  const r = document.createElement("script");
23
- r.id = L, r.src = `${X}?${p.toString()}`, r.async = !0, r.defer = !0, r.onerror = () => {
65
+ r.id = j, r.src = `${C}?${p.toString()}`, r.async = !0, r.defer = !0, r.onerror = () => {
24
66
  f = null, g(new Error("recaptcha: script failed to load"));
25
67
  }, document.head.appendChild(r);
26
68
  }), f);
27
69
  }
28
- const re = U(function({
70
+ const oe = q(function({
29
71
  siteKey: d,
30
72
  theme: g,
31
- locale: y,
73
+ locale: b,
32
74
  size: i = "normal",
33
75
  onChange: p,
34
76
  onExpired: r,
35
77
  onError: T,
36
- error: b,
37
- id: j,
38
- className: B
39
- }, F) {
40
- const { t: R, i18n: M } = J(), k = K(), { resolvedTheme: N } = Q(), w = u(null), c = u(null), a = u(null), [$, h] = q(""), _ = j ?? k.id, H = b ? `${_}-error` : void 0, O = [k.describedBy, H].filter(Boolean).join(" ") || void 0, x = g ?? (N.startsWith("dark") ? "dark" : "light"), I = y ?? M.language, e = u(p), v = u(r), o = u(T);
41
- e.current = p, v.current = r, o.current = T;
42
- const S = R(
78
+ error: k,
79
+ id: B,
80
+ className: F
81
+ }, M) {
82
+ const { t: S, i18n: H } = Q(), _ = X(), { resolvedTheme: N } = Y(), w = u(null), a = u(null), c = u(null), [$, h] = E(""), v = B ?? _.id, A = k ? `${v}-error` : void 0, O = [_.describedBy, A].filter(Boolean).join(" ") || void 0, x = g ?? (N.startsWith("dark") ? "dark" : "light"), I = b ?? H.language, e = u(p), y = u(r), o = u(T);
83
+ e.current = p, y.current = r, o.current = T;
84
+ const W = S(
43
85
  "ui.inputs.recaptcha.expired",
44
86
  "Verification expired — please retry."
45
- ), P = R(
87
+ ), P = S(
46
88
  "ui.inputs.recaptcha.error",
47
89
  "Verification failed — please retry."
48
90
  );
49
- E(() => {
91
+ G(() => {
50
92
  if (!d || !w.current) return;
51
93
  let l = !1;
52
- return Y(I).then((m) => {
53
- l || !w.current || (a.current = m, c.current = m.render(w.current, {
94
+ return ee(I).then((m) => {
95
+ l || !w.current || (c.current = m, a.current = m.render(w.current, {
54
96
  sitekey: d,
55
97
  theme: x,
56
98
  size: i,
@@ -61,7 +103,7 @@ const re = U(function({
61
103
  },
62
104
  "expired-callback": () => {
63
105
  var s, n;
64
- h(S), (s = e.current) == null || s.call(e, null), (n = v.current) == null || n.call(v);
106
+ h(W), (s = e.current) == null || s.call(e, null), (n = y.current) == null || n.call(y);
65
107
  },
66
108
  "error-callback": () => {
67
109
  var s, n;
@@ -72,28 +114,36 @@ const re = U(function({
72
114
  var m;
73
115
  l || (h(P), (m = o.current) == null || m.call(o));
74
116
  }), () => {
75
- if (l = !0, a.current && c.current !== null)
117
+ if (l = !0, c.current && a.current !== null)
76
118
  try {
77
- a.current.reset(c.current);
119
+ c.current.reset(a.current);
78
120
  } catch {
79
121
  }
80
122
  };
81
- }, [d, x, I, i, S, P]), G(
82
- F,
123
+ }, [
124
+ d,
125
+ x,
126
+ I,
127
+ i,
128
+ W,
129
+ P
130
+ ]);
131
+ const R = J(
83
132
  () => ({
84
133
  reset: () => {
85
134
  var l;
86
- a.current && c.current !== null && (a.current.reset(c.current), h(""), (l = e.current) == null || l.call(e, null));
135
+ c.current && a.current !== null && (c.current.reset(a.current), h(""), (l = e.current) == null || l.call(e, null));
87
136
  },
88
- getResponse: () => a.current && c.current !== null ? a.current.getResponse(c.current) : "",
137
+ getResponse: () => c.current && a.current !== null ? c.current.getResponse(a.current) : "",
89
138
  execute: () => {
90
- a.current && c.current !== null && a.current.execute(c.current);
139
+ c.current && a.current !== null && c.current.execute(a.current);
91
140
  }
92
141
  }),
93
142
  []
94
143
  );
95
- const V = b || $, A = i === "invisible" ? "presentation" : void 0;
96
- return /* @__PURE__ */ D(
144
+ K(M, () => R, [R]), Z(z, R, v);
145
+ const V = k || $, D = i === "invisible" ? "presentation" : void 0;
146
+ return /* @__PURE__ */ U(
97
147
  "div",
98
148
  {
99
149
  className: [
@@ -101,27 +151,27 @@ const re = U(function({
101
151
  // Keep the iframe inside the wrapper's stacking context so
102
152
  // popovers etc. above the form continue to overlay correctly.
103
153
  "ds:relative ds:isolate",
104
- B
154
+ F
105
155
  ].filter(Boolean).join(" "),
106
156
  "data-component": "recaptcha-widget",
107
- "data-component-id": _,
157
+ "data-component-id": v,
108
158
  "data-size": i,
109
- role: A,
159
+ role: D,
110
160
  children: [
111
- /* @__PURE__ */ W(
161
+ /* @__PURE__ */ L(
112
162
  "div",
113
163
  {
114
164
  ref: w,
115
- id: _,
165
+ id: v,
116
166
  className: "g-recaptcha",
117
167
  "data-sitekey": d,
118
168
  "data-theme": x,
119
169
  "data-size": i,
120
170
  "aria-describedby": O,
121
- "aria-invalid": b || k.invalid ? !0 : void 0
171
+ "aria-invalid": k || _.invalid ? !0 : void 0
122
172
  }
123
173
  ),
124
- /* @__PURE__ */ W(
174
+ /* @__PURE__ */ L(
125
175
  "div",
126
176
  {
127
177
  role: "status",
@@ -134,50 +184,9 @@ const re = U(function({
134
184
  ]
135
185
  }
136
186
  );
137
- }), ce = {
138
- id: "recaptcha-widget",
139
- capabilities: ["submit"],
140
- state: {
141
- hasToken: {
142
- type: "boolean",
143
- descriptionKey: "ui.agent.recaptchaWidget.state.hasToken",
144
- description: "True when the widget currently holds a valid verification token.",
145
- read: (t) => t.getResponse().length > 0
146
- }
147
- },
148
- actions: {
149
- execute: {
150
- safety: "write",
151
- descriptionKey: "ui.agent.recaptchaWidget.actions.execute",
152
- description: "Programmatically trigger the captcha challenge. Issues a token via the callback.",
153
- invoke: (t) => {
154
- t.execute();
155
- }
156
- },
157
- reset: {
158
- safety: "destructive",
159
- descriptionKey: "ui.agent.recaptchaWidget.actions.reset",
160
- description: "Clear the current token and re-roll the captcha. Irreversible.",
161
- invoke: (t) => {
162
- t.reset();
163
- }
164
- }
165
- },
166
- domHooks: {
167
- root: {
168
- attr: "data-component",
169
- value: "recaptcha-widget",
170
- description: "Marks the RecaptchaWidget wrapper."
171
- },
172
- instanceId: {
173
- attr: "data-component-id",
174
- sourceProp: "id",
175
- description: "Sourced from the id prop (or the surrounding FormField id)."
176
- }
177
- }
178
- };
187
+ });
179
188
  export {
180
- re as R,
181
- ce as r
189
+ oe as R,
190
+ z as r
182
191
  };
183
- //# sourceMappingURL=recaptcha-widget.agent-BGHpU5zD.js.map
192
+ //# sourceMappingURL=recaptcha-widget-NyfOfLII.js.map