@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,175 +0,0 @@
1
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as R, useRef as h, useState as V, useCallback as L, useImperativeHandle as B, useEffect as C, useLayoutEffect as E } from "react";
3
- import { c as b } from "./index-D2ZczOXr.js";
4
- import { useTranslation as O } from "react-i18next";
5
- import { u as j } from "./index-CJE9uQmb.js";
6
- import { F as H } from "./floating-action-button-Cnw-f6AG.js";
7
- import { u as M } from "./use-prefers-reduced-motion-BMwIQRjB.js";
8
- import { C as S } from "./chevron-down-BX_NP2Yh.js";
9
- const $ = b(
10
- "ds:relative ds:flex ds:w-full ds:flex-col ds:overflow-hidden ds:bg-background",
11
- {
12
- variants: {
13
- density: {
14
- default: "ds:gap-[var(--spacing-md)]",
15
- compact: "ds:gap-[var(--spacing-sm)]"
16
- }
17
- },
18
- defaultVariants: { density: "default" }
19
- }
20
- ), D = b(
21
- [
22
- "ds:flex-1 ds:min-h-0 ds:overflow-y-auto ds:overflow-x-hidden",
23
- "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
24
- "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
25
- "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
26
- "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
27
- "ds:scroll-smooth ds:motion-reduce:scroll-auto ds:[.theme-accessible_&]:scroll-auto",
28
- // Edge fade — content near the scroll boundaries fades into the
29
- // container surface instead of clipping abruptly against the header
30
- // or composer, so avatars / bubbles don't look "cut in half" as they
31
- // pass the viewport edge. Fade width matches the viewport padding so
32
- // a row can slide fully behind the mask before disappearing.
33
- // Disabled under HCM (mask strips content), reduced motion (less
34
- // decoration when motion is off), and the accessible theme.
35
- "ds:[mask-image:linear-gradient(to_bottom,transparent_0,black_var(--spacing-md),black_calc(100%-var(--spacing-md)),transparent_100%)]",
36
- "ds:motion-reduce:[mask-image:none]",
37
- "ds:[.theme-accessible_&]:[mask-image:none]",
38
- "ds:forced-colors:[mask-image:none]"
39
- ].join(" ")
40
- ), F = 100, K = 48, P = R(
41
- ({
42
- messages: a,
43
- composer: m,
44
- density: x = "default",
45
- className: w,
46
- id: N,
47
- onAutoScrollChange: o,
48
- showScrollToLatest: k = !1,
49
- ...I
50
- }, y) => {
51
- const { t: u } = O(), n = h(null), f = h(null), [d, T] = V(!0), p = M(), i = L(
52
- (s) => {
53
- const e = n.current;
54
- if (!e) return;
55
- const r = ((s == null ? void 0 : s.smooth) ?? !0) && !p;
56
- e.scrollTo({ top: e.scrollHeight, behavior: r ? "smooth" : "auto" });
57
- },
58
- [p]
59
- );
60
- B(
61
- y,
62
- () => ({
63
- scrollToBottom: i,
64
- getScrollViewport: () => n.current
65
- }),
66
- [i]
67
- ), C(() => {
68
- const s = n.current, e = f.current;
69
- if (!s || !e) return;
70
- const r = new IntersectionObserver(
71
- (z) => {
72
- const g = z[0];
73
- T(g.isIntersecting), o == null || o(g.isIntersecting);
74
- },
75
- {
76
- root: s,
77
- // Fire when the sentinel is within BOTTOM_SLACK_PX of being visible.
78
- rootMargin: `0px 0px ${K}px 0px`,
79
- threshold: 0
80
- }
81
- );
82
- return r.observe(e), () => r.disconnect();
83
- }, [o]);
84
- const _ = a.length;
85
- E(() => {
86
- d && i({ smooth: !1 });
87
- }, [_, d, i]);
88
- const v = a.length > F, l = j({
89
- count: v ? a.length : 0,
90
- getScrollElement: () => n.current,
91
- estimateSize: () => 80,
92
- overscan: 6,
93
- getItemKey: (s) => {
94
- var e;
95
- return ((e = a[s]) == null ? void 0 : e.id) ?? s;
96
- }
97
- });
98
- return /* @__PURE__ */ c("div", { className: $({ density: x, className: w }), "data-component": "chat-container", "data-component-id": N, ...I, children: [
99
- /* @__PURE__ */ c("div", { className: "ds:relative ds:flex-1 ds:min-h-0 ds:flex ds:flex-col", children: [
100
- /* @__PURE__ */ c(
101
- "div",
102
- {
103
- ref: n,
104
- role: "log",
105
- "aria-live": "polite",
106
- "aria-relevant": "additions",
107
- "aria-label": u("ui.chat.container"),
108
- tabIndex: 0,
109
- className: D(),
110
- children: [
111
- v ? /* @__PURE__ */ t(
112
- "ol",
113
- {
114
- className: "ds:relative ds:list-none ds:ps-0 ds:m-0",
115
- style: { blockSize: `${l.getTotalSize()}px` },
116
- children: l.getVirtualItems().map((s) => {
117
- const e = a[s.index];
118
- return e ? /* @__PURE__ */ t(
119
- "li",
120
- {
121
- "data-index": s.index,
122
- ref: l.measureElement,
123
- className: "ds:absolute ds:start-0 ds:end-0 ds:top-0 ds:w-full",
124
- style: { transform: `translateY(${s.start}px)` },
125
- children: /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: e.node })
126
- },
127
- e.id
128
- ) : null;
129
- })
130
- }
131
- ) : /* @__PURE__ */ t("ol", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:list-none ds:ps-0 ds:m-0", children: a.map((s) => /* @__PURE__ */ t("li", { children: s.node }, s.id)) }),
132
- /* @__PURE__ */ t("div", { ref: f, "aria-hidden": "true", className: "ds:h-1 ds:w-full" })
133
- ]
134
- }
135
- ),
136
- k && !d ? /* @__PURE__ */ t(
137
- "div",
138
- {
139
- className: [
140
- "ds:pointer-events-none ds:absolute ds:inset-inline-end-0",
141
- // `bottom` is measured from the bottom of the scroll
142
- // column (i.e. the top edge of the composer slot). A
143
- // small spacing-md gap keeps the FAB clear of the
144
- // divider border above the composer.
145
- "ds:bottom-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
146
- // Enter animation — fade + scale in from 95%. The FAB only
147
- // unmounts when the user returns to bottom, so an exit
148
- // animation isn't justified (abrupt disappearance reads as
149
- // "task complete" when they've scrolled back).
150
- "ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:zoom-in-95",
151
- "ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]"
152
- ].join(" "),
153
- children: /* @__PURE__ */ t("div", { className: "ds:pointer-events-auto", children: /* @__PURE__ */ t(
154
- H,
155
- {
156
- icon: /* @__PURE__ */ t(S, {}),
157
- "aria-label": u("ui.chat.scrollToLatest"),
158
- size: "sm",
159
- variant: "secondary",
160
- position: "static",
161
- onClick: () => i({ smooth: !0 })
162
- }
163
- ) })
164
- }
165
- ) : null
166
- ] }),
167
- m ? /* @__PURE__ */ t("div", { className: "ds:shrink-0 ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)] ds:bg-background", children: m }) : null
168
- ] });
169
- }
170
- );
171
- P.displayName = "ChatContainer";
172
- export {
173
- P as C
174
- };
175
- //# sourceMappingURL=chat-container-Dl0Kfy5a.js.map
@@ -1,27 +0,0 @@
1
- const e = {
2
- id: "chat-container",
3
- capabilities: ["navigate"],
4
- state: {},
5
- actions: {
6
- scroll_to_bottom: {
7
- safety: "read",
8
- argsType: "{ smooth?: boolean }",
9
- description: "Scroll the conversation viewport to the latest message.",
10
- invoke: (t, o) => {
11
- t.scrollToBottom(o);
12
- }
13
- }
14
- },
15
- domHooks: {
16
- root: { attr: "data-component", value: "chat-container" },
17
- instanceId: {
18
- attr: "data-component-id",
19
- sourceProp: "id",
20
- description: "Sourced from the id prop."
21
- }
22
- }
23
- };
24
- export {
25
- e as c
26
- };
27
- //# sourceMappingURL=chat-container.agent-CM4WModE.js.map
@@ -1,252 +0,0 @@
1
- import { jsxs as d, jsx as r, Fragment as ge } from "react/jsx-runtime";
2
- import { forwardRef as he, useId as ve, useRef as H, useCallback as K, useState as be, useLayoutEffect as ye, useImperativeHandle as xe } from "react";
3
- import { c as Ie } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Ce } from "react-i18next";
5
- import { I as W } from "./icon-button-Wnnde5lc.js";
6
- import { c as Ne } from "./createLucideIcon-CrFbzy84.js";
7
- import { C as ke } from "./circle-alert-ChA9opNA.js";
8
- import { S as ze } from "./send-CySZIRPJ.js";
9
- /**
10
- * @license lucide-react v1.8.0 - ISC
11
- *
12
- * This source code is licensed under the ISC license.
13
- * See the LICENSE file in the root directory of this source tree.
14
- */
15
- const we = [
16
- [
17
- "path",
18
- {
19
- d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
20
- key: "1miecu"
21
- }
22
- ]
23
- ], Fe = Ne("paperclip", we), He = Ie(
24
- [
25
- "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full",
26
- // Soft drop-shadow + transparent border replaces a flat
27
- // `border-border` (grey-800 since the WCAG 1.4.11 bump). Border kept
28
- // at 1px so the focus-within color override + forced-colors
29
- // fallback still paint a visible edge.
30
- "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-sm)] ds:border ds:border-transparent",
31
- "ds:bg-background ds:focus-within:border-[color:var(--primary)]",
32
- "ds:transition-[border-color] ds:duration-[var(--animation-duration)]",
33
- "ds:motion-reduce:transition-none",
34
- "ds:forced-colors:border-[CanvasText]"
35
- ].join(" "),
36
- {
37
- variants: {
38
- size: {
39
- sm: "ds:text-[length:var(--font-size-sm)]",
40
- md: "ds:text-[length:var(--font-size-base)]",
41
- lg: "ds:text-[length:var(--font-size-lg)]"
42
- }
43
- },
44
- defaultVariants: { size: "md" }
45
- }
46
- );
47
- function Te(c, u) {
48
- if (typeof Intl < "u" && typeof Intl.Segmenter == "function")
49
- try {
50
- const p = new Intl.Segmenter(u, { granularity: "grapheme" });
51
- let t = 0;
52
- for (const T of p.segment(c)) t += 1;
53
- return t;
54
- } catch {
55
- }
56
- return Array.from(c).length;
57
- }
58
- const Ve = he(
59
- ({
60
- size: c = "md",
61
- value: u,
62
- defaultValue: p,
63
- maxLength: t,
64
- submitOnEnter: T = !1,
65
- minRows: y = 1,
66
- maxRows: V = 8,
67
- onSubmit: x,
68
- onAttach: f,
69
- accept: Y,
70
- disabled: m,
71
- toolbar: q,
72
- label: j,
73
- placeholder: G,
74
- className: J,
75
- onChange: I,
76
- onKeyDown: C,
77
- onCompositionStart: N,
78
- onCompositionEnd: k,
79
- id: B,
80
- ...L
81
- }, O) => {
82
- const { t: i, i18n: Q } = Ce(), U = ve(), g = H(!1), E = H(null), z = H(null), X = K(
83
- (e) => {
84
- z.current = e;
85
- },
86
- []
87
- ), a = u !== void 0, [Z, h] = be(
88
- String(p ?? "")
89
- ), s = a ? String(u) : Z, w = Te(s, Q.language), v = typeof t == "number" && t > 0, D = v ? Math.max(0, t - w) : 0, A = v && w > t * 0.9, o = v && w >= t, M = K(() => {
90
- const e = z.current;
91
- if (!e) return;
92
- const n = window.getComputedStyle(e), b = parseFloat(n.lineHeight) || 24, de = parseFloat(n.paddingTop) || 0, ce = parseFloat(n.paddingBottom) || 0, ue = parseFloat(n.borderTopWidth) || 0, pe = parseFloat(n.borderBottomWidth) || 0, R = de + ce + ue + pe, fe = b * y + R, _ = b * V + R;
93
- e.style.height = "auto";
94
- const me = Math.max(fe, Math.min(e.scrollHeight, _));
95
- e.style.height = `${me}px`, e.style.overflowY = e.scrollHeight > _ ? "auto" : "hidden";
96
- }, [y, V]);
97
- ye(() => {
98
- M();
99
- }, [M, s]);
100
- const ee = (e) => {
101
- a || h(e.target.value), !g.current && (I == null || I(e));
102
- }, te = (e) => {
103
- g.current = !0, N == null || N(e);
104
- }, se = (e) => {
105
- g.current = !1, k == null || k(e);
106
- }, re = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || g.current, F = () => {
107
- !s.trim() || m || o || (x == null || x(s), a || h(""));
108
- };
109
- xe(
110
- O,
111
- () => ({
112
- getValue: () => s,
113
- isEmpty: () => !s.trim(),
114
- setValue: (e) => {
115
- a || h(e);
116
- },
117
- clear: () => {
118
- a || h("");
119
- },
120
- submit: () => {
121
- F();
122
- },
123
- focus: () => {
124
- var e;
125
- (e = z.current) == null || e.focus();
126
- }
127
- }),
128
- // `submit` is a local closure that always sees the latest currentValue
129
- // via React's render cycle — depend on currentValue + isControlled so
130
- // the handle picks up new values across renders.
131
- // eslint-disable-next-line react-hooks/exhaustive-deps
132
- [s, a]
133
- );
134
- const ae = (e) => {
135
- if (C == null || C(e), !e.defaultPrevented && !re(e) && e.key === "Enter") {
136
- const n = e.metaKey || e.ctrlKey, b = T && !e.shiftKey;
137
- (n || b) && (e.preventDefault(), F());
138
- }
139
- }, ne = () => {
140
- var e;
141
- (e = E.current) == null || e.click();
142
- }, ie = (e) => {
143
- e.target.files && e.target.files.length > 0 && (f == null || f(e.target.files)), e.target.value = "";
144
- }, l = B ?? U, P = `${l}-label`, S = v ? `${l}-counter` : void 0, $ = `${l}-hint`, oe = G ?? i("chat.input.placeholder"), le = j ?? i("chat.prompt");
145
- return /* @__PURE__ */ d("div", { "data-component": "chat-input", "data-component-id": B, className: He({ size: c, className: J }), children: [
146
- /* @__PURE__ */ r("label", { id: P, htmlFor: l, className: j ? "type-label ds:ps-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)]" : "ds:sr-only", children: le }),
147
- /* @__PURE__ */ r(
148
- "textarea",
149
- {
150
- ref: X,
151
- id: l,
152
- value: a ? s : void 0,
153
- defaultValue: a ? void 0 : p,
154
- disabled: m,
155
- rows: y,
156
- maxLength: t,
157
- placeholder: oe,
158
- "aria-labelledby": P,
159
- "aria-describedby": [S, $].filter(Boolean).join(" ") || void 0,
160
- "aria-invalid": o || void 0,
161
- onChange: ee,
162
- onKeyDown: ae,
163
- onCompositionStart: te,
164
- onCompositionEnd: se,
165
- className: [
166
- "ds:w-full ds:resize-none ds:bg-transparent",
167
- "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)]",
168
- "ds:placeholder:text-[color:var(--muted-foreground)]",
169
- "ds:leading-[var(--line-height-base)]",
170
- "ds:disabled:opacity-50 ds:disabled:cursor-not-allowed",
171
- // Tokenised focus ring on the textarea itself — the 1px border
172
- // shift on the wrapper alone fails the 3px accessible-theme
173
- // requirement. See a11y-critical-fixes.mdx.
174
- "ds:outline-none",
175
- "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
176
- "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
177
- "ds:rounded-[var(--radius-sm)]",
178
- "ds:forced-colors:focus-visible:outline-[CanvasText]"
179
- ].join(" "),
180
- ...L
181
- }
182
- ),
183
- /* @__PURE__ */ d("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: [
184
- f ? /* @__PURE__ */ d(ge, { children: [
185
- /* @__PURE__ */ r(
186
- "input",
187
- {
188
- ref: E,
189
- type: "file",
190
- className: "ds:sr-only",
191
- multiple: !0,
192
- accept: Y,
193
- onChange: ie
194
- }
195
- ),
196
- /* @__PURE__ */ r(
197
- W,
198
- {
199
- icon: /* @__PURE__ */ r(Fe, {}),
200
- "aria-label": i("chat.input.attach"),
201
- intent: "ghost",
202
- size: "sm",
203
- onClick: ne,
204
- disabled: m
205
- }
206
- )
207
- ] }) : null,
208
- q,
209
- /* @__PURE__ */ d("div", { className: "ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
210
- A ? /* @__PURE__ */ d(
211
- "span",
212
- {
213
- id: S,
214
- "aria-live": "polite",
215
- className: [
216
- "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
217
- "type-meta ds:tabular-nums",
218
- o ? "ds:text-[color:var(--destructive)]" : "ds:text-[color:var(--muted-foreground)]"
219
- ].join(" "),
220
- children: [
221
- o ? (
222
- // Icon pairs with --destructive colour so the at-limit
223
- // state is not conveyed by hue alone (WCAG 1.4.1).
224
- /* @__PURE__ */ r(ke, { "aria-hidden": "true", className: "ds:size-3.5" })
225
- ) : null,
226
- i("chat.input.remaining", { count: D })
227
- ]
228
- }
229
- ) : null,
230
- /* @__PURE__ */ r("span", { id: $, className: "ds:sr-only", children: i("chat.input.sendHint") }),
231
- /* @__PURE__ */ r(
232
- W,
233
- {
234
- icon: /* @__PURE__ */ r(ze, {}),
235
- "aria-label": i("chat.send"),
236
- intent: "primary",
237
- size: "sm",
238
- disabled: m || !s.trim() || o,
239
- onClick: F,
240
- "aria-keyshortcuts": "Meta+Enter Control+Enter"
241
- }
242
- )
243
- ] })
244
- ] })
245
- ] });
246
- }
247
- );
248
- Ve.displayName = "ChatInput";
249
- export {
250
- Ve as C
251
- };
252
- //# sourceMappingURL=chat-input-C_tMQv92.js.map
@@ -1,69 +0,0 @@
1
- const i = {
2
- id: "chat-input",
3
- capabilities: ["edit_inline", "submit"],
4
- state: {
5
- value: {
6
- type: "string",
7
- descriptionKey: "ui.agent.chatInput.state.value",
8
- description: "Current text in the composer.",
9
- read: (t) => t.getValue()
10
- },
11
- isEmpty: {
12
- type: "boolean",
13
- descriptionKey: "ui.agent.chatInput.state.isEmpty",
14
- description: "True when the composer has no text.",
15
- read: (t) => t.isEmpty()
16
- }
17
- },
18
- actions: {
19
- set_value: {
20
- safety: "write",
21
- argsType: "{ value: string }",
22
- descriptionKey: "ui.agent.chatInput.actions.setValue",
23
- description: "Replace the composer text.",
24
- invoke: (t, e) => {
25
- t.setValue(e.value);
26
- }
27
- },
28
- clear: {
29
- safety: "destructive",
30
- descriptionKey: "ui.agent.chatInput.actions.clear",
31
- description: "Clear the composer. Irreversible from the same UI.",
32
- invoke: (t) => {
33
- t.clear();
34
- }
35
- },
36
- submit: {
37
- safety: "write",
38
- descriptionKey: "ui.agent.chatInput.actions.submit",
39
- description: "Submit the current composer state via onSubmit.",
40
- invoke: (t) => {
41
- t.submit();
42
- }
43
- },
44
- focus: {
45
- safety: "read",
46
- descriptionKey: "ui.agent.chatInput.actions.focus",
47
- description: "Move keyboard focus into the textarea.",
48
- invoke: (t) => {
49
- t.focus();
50
- }
51
- }
52
- },
53
- domHooks: {
54
- root: {
55
- attr: "data-component",
56
- value: "chat-input",
57
- description: "Marks the ChatInput wrapper."
58
- },
59
- instanceId: {
60
- attr: "data-component-id",
61
- sourceProp: "id",
62
- description: "Sourced from the id prop."
63
- }
64
- }
65
- };
66
- export {
67
- i as c
68
- };
69
- //# sourceMappingURL=chat-input.agent-Bsz3ckGa.js.map