@adea-ai/ui 0.153.0 → 0.154.1

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 (581) hide show
  1. package/README.md +10 -10
  2. package/dist/NOTICE +10 -1
  3. package/dist/components/composites/about-dialog/about-dialog.d.ts.map +1 -1
  4. package/dist/components/composites/about-dialog/about-dialog.js +3 -1
  5. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  6. package/dist/components/composites/accent-picker/accent-picker.js +20 -9
  7. package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
  8. package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
  9. package/dist/components/composites/account-menu/account-menu.js +20 -10
  10. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  11. package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
  12. package/dist/components/composites/action-button/action-button.js +37 -24
  13. package/dist/components/composites/action-button/action-button.js.map +1 -1
  14. package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
  15. package/dist/components/composites/appearance-editor/appearance-choices.js +7 -3
  16. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  17. package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
  18. package/dist/components/composites/appearance-editor/appearance-editor.js +11 -6
  19. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  20. package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
  21. package/dist/components/composites/appearance-editor/appearance-rows.js +8 -3
  22. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  23. package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
  24. package/dist/components/composites/appearance-editor/font-settings-group.js +8 -4
  25. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  26. package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts.map +1 -1
  27. package/dist/components/composites/catalog-browser/catalog-browser-group.js +7 -3
  28. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
  29. package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -1
  30. package/dist/components/composites/catalog-browser/catalog-browser.js +8 -4
  31. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  32. package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts.map +1 -1
  33. package/dist/components/composites/chain-of-thought/chain-of-thought.js +3 -1
  34. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  35. package/dist/components/composites/chat/chat.d.ts.map +1 -1
  36. package/dist/components/composites/chat/chat.js +5 -1
  37. package/dist/components/composites/chat/chat.js.map +1 -1
  38. package/dist/components/composites/checkpoint/checkpoint.d.ts.map +1 -1
  39. package/dist/components/composites/checkpoint/checkpoint.js +3 -1
  40. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  41. package/dist/components/composites/confirmation/confirmation.d.ts.map +1 -1
  42. package/dist/components/composites/confirmation/confirmation.js +11 -5
  43. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  44. package/dist/components/composites/context/context.d.ts.map +1 -1
  45. package/dist/components/composites/context/context.js +7 -4
  46. package/dist/components/composites/context/context.js.map +1 -1
  47. package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -1
  48. package/dist/components/composites/file-tree/file-tree.js +7 -3
  49. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  50. package/dist/components/composites/help-center/help-center.d.ts.map +1 -1
  51. package/dist/components/composites/help-center/help-center.js +3 -1
  52. package/dist/components/composites/help-center/help-center.js.map +1 -1
  53. package/dist/components/composites/icon-picker/icon-picker.d.ts +2 -2
  54. package/dist/components/composites/icon-picker/icon-picker.d.ts.map +1 -1
  55. package/dist/components/composites/icon-picker/icon-picker.js +77 -71
  56. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  57. package/dist/components/composites/icon-picker/shell-icons.d.ts.map +1 -1
  58. package/dist/components/composites/icon-picker/shell-icons.js +119 -59
  59. package/dist/components/composites/icon-picker/shell-icons.js.map +1 -1
  60. package/dist/components/composites/inline-citation/inline-citation.d.ts.map +1 -1
  61. package/dist/components/composites/inline-citation/inline-citation.js +5 -2
  62. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  63. package/dist/components/composites/list-row/list-row-control.d.ts.map +1 -1
  64. package/dist/components/composites/list-row/list-row-control.js +3 -4
  65. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  66. package/dist/components/composites/message-scroller/message-scroller.d.ts.map +1 -1
  67. package/dist/components/composites/message-scroller/message-scroller.js +5 -2
  68. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  69. package/dist/components/composites/model-selector/model-selector.d.ts +15 -1
  70. package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -1
  71. package/dist/components/composites/model-selector/model-selector.js +271 -33
  72. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  73. package/dist/components/composites/plan/plan.d.ts.map +1 -1
  74. package/dist/components/composites/plan/plan.js +3 -1
  75. package/dist/components/composites/plan/plan.js.map +1 -1
  76. package/dist/components/composites/queue/queue.d.ts.map +1 -1
  77. package/dist/components/composites/queue/queue.js +11 -5
  78. package/dist/components/composites/queue/queue.js.map +1 -1
  79. package/dist/components/composites/reasoning/reasoning.d.ts.map +1 -1
  80. package/dist/components/composites/reasoning/reasoning.js +3 -1
  81. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  82. package/dist/components/composites/scene-controls/scene-controls.d.ts.map +1 -1
  83. package/dist/components/composites/scene-controls/scene-controls.js +14 -7
  84. package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
  85. package/dist/components/composites/settings/settings.d.ts.map +1 -1
  86. package/dist/components/composites/settings/settings.js +77 -67
  87. package/dist/components/composites/settings/settings.js.map +1 -1
  88. package/dist/components/composites/sources/sources.d.ts.map +1 -1
  89. package/dist/components/composites/sources/sources.js +39 -39
  90. package/dist/components/composites/sources/sources.js.map +1 -1
  91. package/dist/components/composites/stack-trace/stack-trace.d.ts.map +1 -1
  92. package/dist/components/composites/stack-trace/stack-trace.js +9 -4
  93. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  94. package/dist/components/composites/stat/stat.d.ts.map +1 -1
  95. package/dist/components/composites/stat/stat.js +4 -1
  96. package/dist/components/composites/stat/stat.js.map +1 -1
  97. package/dist/components/composites/subagent/subagent.d.ts.map +1 -1
  98. package/dist/components/composites/subagent/subagent.js +3 -1
  99. package/dist/components/composites/subagent/subagent.js.map +1 -1
  100. package/dist/components/composites/task/task.d.ts.map +1 -1
  101. package/dist/components/composites/task/task.js +3 -1
  102. package/dist/components/composites/task/task.js.map +1 -1
  103. package/dist/components/composites/terminal/ansi.d.ts.map +1 -1
  104. package/dist/components/composites/terminal/ansi.js +16 -0
  105. package/dist/components/composites/terminal/ansi.js.map +1 -1
  106. package/dist/components/composites/terminal/terminal.d.ts.map +1 -1
  107. package/dist/components/composites/terminal/terminal.js +15 -7
  108. package/dist/components/composites/terminal/terminal.js.map +1 -1
  109. package/dist/components/composites/test-results/test-results.d.ts.map +1 -1
  110. package/dist/components/composites/test-results/test-results.js +15 -7
  111. package/dist/components/composites/test-results/test-results.js.map +1 -1
  112. package/dist/components/composites/tool/tool.d.ts.map +1 -1
  113. package/dist/components/composites/tool/tool.js +3 -1
  114. package/dist/components/composites/tool/tool.js.map +1 -1
  115. package/dist/components/composites/tree/tree.d.ts.map +1 -1
  116. package/dist/components/composites/tree/tree.js +3 -1
  117. package/dist/components/composites/tree/tree.js.map +1 -1
  118. package/dist/components/composites/update-dialog/update-dialog.d.ts.map +1 -1
  119. package/dist/components/composites/update-dialog/update-dialog.js +34 -24
  120. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  121. package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -1
  122. package/dist/components/composites/workspace-mark/workspace-mark.js +17 -12
  123. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  124. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.d.ts.map +1 -1
  125. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +5 -2
  126. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  127. package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts.map +1 -1
  128. package/dist/components/composites/workspace-switcher/workspace-switcher.js +9 -4
  129. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  130. package/dist/components/conversation/busy-send-button.d.ts.map +1 -1
  131. package/dist/components/conversation/busy-send-button.js +9 -5
  132. package/dist/components/conversation/busy-send-button.js.map +1 -1
  133. package/dist/components/conversation/conversation-avatar.d.ts.map +1 -1
  134. package/dist/components/conversation/conversation-avatar.js +6 -3
  135. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  136. package/dist/components/conversation/conversation-surface.d.ts.map +1 -1
  137. package/dist/components/conversation/conversation-surface.js +3 -1
  138. package/dist/components/conversation/conversation-surface.js.map +1 -1
  139. package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
  140. package/dist/components/conversation/internal/chat-composer-shell.js +9 -4
  141. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  142. package/dist/components/conversation/message-composer.d.ts.map +1 -1
  143. package/dist/components/conversation/message-composer.js +9 -4
  144. package/dist/components/conversation/message-composer.js.map +1 -1
  145. package/dist/components/conversation/message-row.d.ts.map +1 -1
  146. package/dist/components/conversation/message-row.js +11 -5
  147. package/dist/components/conversation/message-row.js.map +1 -1
  148. package/dist/components/conversation/thread-panel.d.ts.map +1 -1
  149. package/dist/components/conversation/thread-panel.js +3 -1
  150. package/dist/components/conversation/thread-panel.js.map +1 -1
  151. package/dist/components/conversation/transcript-composition.d.ts.map +1 -1
  152. package/dist/components/conversation/transcript-composition.js +3 -1
  153. package/dist/components/conversation/transcript-composition.js.map +1 -1
  154. package/dist/components/layout/floating-preview/floating-preview.d.ts.map +1 -1
  155. package/dist/components/layout/floating-preview/floating-preview.js +5 -2
  156. package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
  157. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -1
  158. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +3 -1
  159. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  160. package/dist/components/layout/shell-rail/shell-rail.d.ts.map +1 -1
  161. package/dist/components/layout/shell-rail/shell-rail.js +3 -1
  162. package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
  163. package/dist/components/layout/side-rail/side-rail.d.ts.map +1 -1
  164. package/dist/components/layout/side-rail/side-rail.js +46 -42
  165. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  166. package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
  167. package/dist/components/layout/sidebar-nav/sidebar-nav.js +3 -1
  168. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  169. package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
  170. package/dist/components/layout/split-layout/split-layout.js +5 -2
  171. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  172. package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
  173. package/dist/components/layout/top-bar/top-bar.js +16 -13
  174. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  175. package/dist/components/theme/appearance-panel.d.ts.map +1 -1
  176. package/dist/components/theme/appearance-panel.js +3 -1
  177. package/dist/components/theme/appearance-panel.js.map +1 -1
  178. package/dist/components/theme/theme-mode-toggle.d.ts.map +1 -1
  179. package/dist/components/theme/theme-mode-toggle.js +6 -3
  180. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  181. package/dist/components/theme/theme-toggle.d.ts.map +1 -1
  182. package/dist/components/theme/theme-toggle.js +6 -3
  183. package/dist/components/theme/theme-toggle.js.map +1 -1
  184. package/dist/components/ui/accordion/accordion.d.ts.map +1 -1
  185. package/dist/components/ui/accordion/accordion.js +3 -1
  186. package/dist/components/ui/accordion/accordion.js.map +1 -1
  187. package/dist/components/ui/alert/alert.d.ts.map +1 -1
  188. package/dist/components/ui/alert/alert.js +15 -9
  189. package/dist/components/ui/alert/alert.js.map +1 -1
  190. package/dist/components/ui/annotation-surface/annotation-surface.d.ts.map +1 -1
  191. package/dist/components/ui/annotation-surface/annotation-surface.js +5 -4
  192. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  193. package/dist/components/ui/attachment/attachment.d.ts.map +1 -1
  194. package/dist/components/ui/attachment/attachment.js +18 -9
  195. package/dist/components/ui/attachment/attachment.js.map +1 -1
  196. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  197. package/dist/components/ui/badge/badge.js +30 -11
  198. package/dist/components/ui/badge/badge.js.map +1 -1
  199. package/dist/components/ui/breadcrumb/breadcrumb.d.ts.map +1 -1
  200. package/dist/components/ui/breadcrumb/breadcrumb.js +5 -2
  201. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  202. package/dist/components/ui/button/button.d.ts.map +1 -1
  203. package/dist/components/ui/button/button.js +37 -13
  204. package/dist/components/ui/button/button.js.map +1 -1
  205. package/dist/components/ui/calendar/calendar.d.ts.map +1 -1
  206. package/dist/components/ui/calendar/calendar.js +5 -2
  207. package/dist/components/ui/calendar/calendar.js.map +1 -1
  208. package/dist/components/ui/carousel/carousel.d.ts.map +1 -1
  209. package/dist/components/ui/carousel/carousel.js +12 -6
  210. package/dist/components/ui/carousel/carousel.js.map +1 -1
  211. package/dist/components/ui/checkbox/checkbox.d.ts +13 -0
  212. package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
  213. package/dist/components/ui/checkbox/checkbox.js +296 -21
  214. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  215. package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
  216. package/dist/components/ui/code-block/code-block.js +9 -6
  217. package/dist/components/ui/code-block/code-block.js.map +1 -1
  218. package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
  219. package/dist/components/ui/combobox/combobox.js +8 -11
  220. package/dist/components/ui/combobox/combobox.js.map +1 -1
  221. package/dist/components/ui/command/command.d.ts.map +1 -1
  222. package/dist/components/ui/command/command.js +4 -2
  223. package/dist/components/ui/command/command.js.map +1 -1
  224. package/dist/components/ui/detail-panel/detail-panel.d.ts.map +1 -1
  225. package/dist/components/ui/detail-panel/detail-panel.js +3 -1
  226. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  227. package/dist/components/ui/dialog/dialog-layer.d.ts.map +1 -1
  228. package/dist/components/ui/dialog/dialog-layer.js +10 -10
  229. package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
  230. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  231. package/dist/components/ui/dialog/dialog.js +3 -1
  232. package/dist/components/ui/dialog/dialog.js.map +1 -1
  233. package/dist/components/ui/dropdown-menu/menu-parts.d.ts.map +1 -1
  234. package/dist/components/ui/dropdown-menu/menu-parts.js +7 -3
  235. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  236. package/dist/components/ui/empty/empty-state.d.ts.map +1 -1
  237. package/dist/components/ui/empty/empty-state.js +3 -1
  238. package/dist/components/ui/empty/empty-state.js.map +1 -1
  239. package/dist/components/ui/field/field.d.ts.map +1 -1
  240. package/dist/components/ui/field/field.js +12 -6
  241. package/dist/components/ui/field/field.js.map +1 -1
  242. package/dist/components/ui/input/input-control.d.ts +2 -0
  243. package/dist/components/ui/input/input-control.d.ts.map +1 -1
  244. package/dist/components/ui/input/input-control.js +24 -6
  245. package/dist/components/ui/input/input-control.js.map +1 -1
  246. package/dist/components/ui/input/input.d.ts.map +1 -1
  247. package/dist/components/ui/input/input.js +47 -48
  248. package/dist/components/ui/input/input.js.map +1 -1
  249. package/dist/components/ui/input-group/input-group.d.ts.map +1 -1
  250. package/dist/components/ui/input-group/input-group.js +1 -8
  251. package/dist/components/ui/input-group/input-group.js.map +1 -1
  252. package/dist/components/ui/kbd/kbd.d.ts +23 -10
  253. package/dist/components/ui/kbd/kbd.d.ts.map +1 -1
  254. package/dist/components/ui/kbd/kbd.js +42 -11
  255. package/dist/components/ui/kbd/kbd.js.map +1 -1
  256. package/dist/components/ui/message/index.d.ts +1 -1
  257. package/dist/components/ui/message/index.d.ts.map +1 -1
  258. package/dist/components/ui/message/index.js +2 -2
  259. package/dist/components/ui/message/message.d.ts.map +1 -1
  260. package/dist/components/ui/message/message.js +5 -3
  261. package/dist/components/ui/message/message.js.map +1 -1
  262. package/dist/components/ui/message/parse-message-text.d.ts +32 -0
  263. package/dist/components/ui/message/parse-message-text.d.ts.map +1 -1
  264. package/dist/components/ui/message/parse-message-text.js +63 -3
  265. package/dist/components/ui/message/parse-message-text.js.map +1 -1
  266. package/dist/components/ui/native-select/native-select.d.ts.map +1 -1
  267. package/dist/components/ui/native-select/native-select.js +4 -9
  268. package/dist/components/ui/native-select/native-select.js.map +1 -1
  269. package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
  270. package/dist/components/ui/navigation-menu/navigation-menu.js +3 -1
  271. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  272. package/dist/components/ui/pagination/pagination.d.ts.map +1 -1
  273. package/dist/components/ui/pagination/pagination.js +7 -3
  274. package/dist/components/ui/pagination/pagination.js.map +1 -1
  275. package/dist/components/ui/questionnaire/questionnaire.d.ts.map +1 -1
  276. package/dist/components/ui/questionnaire/questionnaire.js +9 -4
  277. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  278. package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
  279. package/dist/components/ui/radio-group/radio-group.js +4 -9
  280. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  281. package/dist/components/ui/resizable/resizable.d.ts.map +1 -1
  282. package/dist/components/ui/resizable/resizable.js +3 -1
  283. package/dist/components/ui/resizable/resizable.js.map +1 -1
  284. package/dist/components/ui/select/select.d.ts.map +1 -1
  285. package/dist/components/ui/select/select.js +7 -3
  286. package/dist/components/ui/select/select.js.map +1 -1
  287. package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
  288. package/dist/components/ui/sheet/sheet.js +3 -1
  289. package/dist/components/ui/sheet/sheet.js.map +1 -1
  290. package/dist/components/ui/spinner/spinner.d.ts.map +1 -1
  291. package/dist/components/ui/spinner/spinner.js +3 -1
  292. package/dist/components/ui/spinner/spinner.js.map +1 -1
  293. package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -1
  294. package/dist/components/ui/status-chip/status-chip.js +35 -30
  295. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  296. package/dist/components/ui/switch/switch.d.ts +7 -0
  297. package/dist/components/ui/switch/switch.d.ts.map +1 -1
  298. package/dist/components/ui/switch/switch.js +255 -17
  299. package/dist/components/ui/switch/switch.js.map +1 -1
  300. package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
  301. package/dist/components/ui/textarea/textarea.js +1 -8
  302. package/dist/components/ui/textarea/textarea.js.map +1 -1
  303. package/dist/components/ui/toast/toast.d.ts.map +1 -1
  304. package/dist/components/ui/toast/toast.js +3 -1
  305. package/dist/components/ui/toast/toast.js.map +1 -1
  306. package/dist/components/ui/tooltip/deferred-tooltip.d.ts.map +1 -1
  307. package/dist/components/ui/tooltip/deferred-tooltip.js +10 -4
  308. package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
  309. package/dist/components/ui/tooltip/index.d.ts +1 -0
  310. package/dist/components/ui/tooltip/index.d.ts.map +1 -1
  311. package/dist/components/ui/tooltip/index.js +2 -1
  312. package/dist/components/ui/tooltip/lazy-tooltip.d.ts +40 -0
  313. package/dist/components/ui/tooltip/lazy-tooltip.d.ts.map +1 -0
  314. package/dist/components/ui/tooltip/lazy-tooltip.js +61 -0
  315. package/dist/components/ui/tooltip/lazy-tooltip.js.map +1 -0
  316. package/dist/components/ui/trace/trace.d.ts.map +1 -1
  317. package/dist/components/ui/trace/trace.js +82 -68
  318. package/dist/components/ui/trace/trace.js.map +1 -1
  319. package/dist/components/ui/typography/typography.d.ts +1 -1
  320. package/dist/components/ui/typography/typography.d.ts.map +1 -1
  321. package/dist/components/ui/typography/typography.js +5 -6
  322. package/dist/components/ui/typography/typography.js.map +1 -1
  323. package/dist/index.js +3 -2
  324. package/dist/lib/clipboard.d.ts.map +1 -1
  325. package/dist/lib/clipboard.js +3 -0
  326. package/dist/lib/clipboard.js.map +1 -1
  327. package/dist/lib/fast-icon.d.ts +18 -0
  328. package/dist/lib/fast-icon.d.ts.map +1 -0
  329. package/dist/lib/fast-icon.js +75 -0
  330. package/dist/lib/fast-icon.js.map +1 -0
  331. package/dist/lib/form-field.d.ts +1 -1
  332. package/dist/lib/form-field.js +3 -1
  333. package/dist/lib/form-field.js.map +1 -1
  334. package/dist/lib/observe-resize.d.ts +14 -0
  335. package/dist/lib/observe-resize.d.ts.map +1 -0
  336. package/dist/lib/observe-resize.js +19 -0
  337. package/dist/lib/observe-resize.js.map +1 -0
  338. package/dist/lib/overlay.d.ts +1 -1
  339. package/dist/lib/overlay.d.ts.map +1 -1
  340. package/dist/lib/overlay.js +1 -1
  341. package/dist/lib/overlay.js.map +1 -1
  342. package/dist/lint/index.d.ts +1 -0
  343. package/dist/lint/index.d.ts.map +1 -1
  344. package/dist/lint.js +251 -118
  345. package/dist/lint.js.map +1 -1
  346. package/dist/r/action-button.json +3 -1
  347. package/dist/r/floating-preview.json +2 -1
  348. package/dist/r/icon-picker.json +0 -1
  349. package/dist/r/lib.json +10 -0
  350. package/dist/r/model-selector.json +1 -0
  351. package/dist/r/plan.json +2 -1
  352. package/dist/r/queue.json +2 -1
  353. package/dist/r/registry.json +33 -9
  354. package/dist/r/scene-controls.json +2 -1
  355. package/dist/r/side-rail.json +1 -0
  356. package/dist/r/src/components/composites/about-dialog/about-dialog.tsx +5 -1
  357. package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +22 -17
  358. package/dist/r/src/components/composites/account-menu/account-menu.tsx +21 -9
  359. package/dist/r/src/components/composites/action-button/action-button.tsx +38 -21
  360. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +7 -1
  361. package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
  362. package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +13 -1
  363. package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +13 -1
  364. package/dist/r/src/components/composites/catalog-browser/catalog-browser-group.tsx +11 -1
  365. package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +11 -1
  366. package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +5 -1
  367. package/dist/r/src/components/composites/chat/chat.tsx +11 -1
  368. package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +5 -1
  369. package/dist/r/src/components/composites/confirmation/confirmation.tsx +15 -1
  370. package/dist/r/src/components/composites/context/context.tsx +9 -1
  371. package/dist/r/src/components/composites/file-tree/file-tree.tsx +11 -1
  372. package/dist/r/src/components/composites/help-center/help-center.tsx +5 -1
  373. package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +59 -31
  374. package/dist/r/src/components/composites/icon-picker/shell-icons.ts +121 -59
  375. package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +6 -1
  376. package/dist/r/src/components/composites/list-row/list-row-control.tsx +7 -5
  377. package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +6 -1
  378. package/dist/r/src/components/composites/model-selector/model-selector.tsx +197 -11
  379. package/dist/r/src/components/composites/plan/plan.tsx +5 -1
  380. package/dist/r/src/components/composites/queue/queue.tsx +15 -1
  381. package/dist/r/src/components/composites/reasoning/reasoning.tsx +5 -1
  382. package/dist/r/src/components/composites/scene-controls/scene-controls.tsx +17 -1
  383. package/dist/r/src/components/composites/settings/settings.tsx +23 -14
  384. package/dist/r/src/components/composites/sources/sources.tsx +27 -20
  385. package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +13 -1
  386. package/dist/r/src/components/composites/stat/stat.tsx +9 -1
  387. package/dist/r/src/components/composites/subagent/subagent.tsx +5 -1
  388. package/dist/r/src/components/composites/task/task.tsx +5 -1
  389. package/dist/r/src/components/composites/terminal/ansi.ts +18 -0
  390. package/dist/r/src/components/composites/terminal/terminal.tsx +17 -7
  391. package/dist/r/src/components/composites/test-results/test-results.tsx +17 -7
  392. package/dist/r/src/components/composites/tool/tool.tsx +5 -1
  393. package/dist/r/src/components/composites/tree/tree.tsx +5 -1
  394. package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +35 -15
  395. package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +14 -7
  396. package/dist/r/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +6 -1
  397. package/dist/r/src/components/composites/workspace-switcher/workspace-switcher.tsx +13 -1
  398. package/dist/r/src/components/conversation/busy-send-button.tsx +11 -1
  399. package/dist/r/src/components/conversation/conversation-avatar.tsx +7 -1
  400. package/dist/r/src/components/conversation/conversation-surface.tsx +5 -1
  401. package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +13 -1
  402. package/dist/r/src/components/conversation/message-composer.tsx +13 -1
  403. package/dist/r/src/components/conversation/message-row.tsx +15 -1
  404. package/dist/r/src/components/conversation/thread-panel.tsx +5 -1
  405. package/dist/r/src/components/conversation/transcript-composition.tsx +5 -1
  406. package/dist/r/src/components/layout/floating-preview/floating-preview.tsx +6 -1
  407. package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +5 -1
  408. package/dist/r/src/components/layout/shell-rail/shell-rail.tsx +5 -1
  409. package/dist/r/src/components/layout/side-rail/side-rail.tsx +16 -19
  410. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +5 -1
  411. package/dist/r/src/components/layout/split-layout/split-layout.tsx +6 -1
  412. package/dist/r/src/components/layout/top-bar/top-bar.tsx +8 -8
  413. package/dist/r/src/components/theme/appearance-panel.tsx +6 -1
  414. package/dist/r/src/components/theme/theme-mode-toggle.tsx +7 -1
  415. package/dist/r/src/components/theme/theme-toggle.tsx +7 -1
  416. package/dist/r/src/components/ui/accordion/accordion.tsx +5 -1
  417. package/dist/r/src/components/ui/alert/alert.tsx +20 -3
  418. package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +6 -3
  419. package/dist/r/src/components/ui/attachment/attachment.tsx +19 -8
  420. package/dist/r/src/components/ui/badge/badge.tsx +24 -8
  421. package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +9 -1
  422. package/dist/r/src/components/ui/button/button.tsx +47 -16
  423. package/dist/r/src/components/ui/calendar/calendar.tsx +6 -1
  424. package/dist/r/src/components/ui/carousel/carousel.tsx +15 -5
  425. package/dist/r/src/components/ui/checkbox/checkbox.tsx +260 -22
  426. package/dist/r/src/components/ui/code-block/code-block.tsx +11 -5
  427. package/dist/r/src/components/ui/combobox/combobox.tsx +8 -9
  428. package/dist/r/src/components/ui/command/command.tsx +8 -4
  429. package/dist/r/src/components/ui/detail-panel/detail-panel.tsx +5 -1
  430. package/dist/r/src/components/ui/dialog/dialog-layer.tsx +16 -18
  431. package/dist/r/src/components/ui/dialog/dialog.tsx +5 -1
  432. package/dist/r/src/components/ui/dropdown-menu/menu-parts.tsx +11 -1
  433. package/dist/r/src/components/ui/empty/empty-state.tsx +5 -1
  434. package/dist/r/src/components/ui/field/field.tsx +14 -5
  435. package/dist/r/src/components/ui/input/input-control.tsx +28 -19
  436. package/dist/r/src/components/ui/input/input.tsx +9 -12
  437. package/dist/r/src/components/ui/input-group/input-group.tsx +1 -8
  438. package/dist/r/src/components/ui/kbd/kbd.tsx +53 -12
  439. package/dist/r/src/components/ui/message/index.ts +3 -0
  440. package/dist/r/src/components/ui/message/message.tsx +11 -2
  441. package/dist/r/src/components/ui/message/parse-message-text.ts +94 -2
  442. package/dist/r/src/components/ui/native-select/native-select.tsx +6 -9
  443. package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +5 -1
  444. package/dist/r/src/components/ui/pagination/pagination.tsx +11 -1
  445. package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +13 -1
  446. package/dist/r/src/components/ui/radio-group/radio-group.tsx +6 -9
  447. package/dist/r/src/components/ui/resizable/resizable.tsx +5 -1
  448. package/dist/r/src/components/ui/select/select.tsx +11 -1
  449. package/dist/r/src/components/ui/sheet/sheet.tsx +5 -1
  450. package/dist/r/src/components/ui/spinner/spinner.tsx +5 -1
  451. package/dist/r/src/components/ui/status-chip/status-chip.tsx +14 -7
  452. package/dist/r/src/components/ui/switch/switch.tsx +235 -28
  453. package/dist/r/src/components/ui/textarea/textarea.tsx +1 -8
  454. package/dist/r/src/components/ui/toast/toast.tsx +5 -1
  455. package/dist/r/src/components/ui/tooltip/deferred-tooltip.tsx +14 -8
  456. package/dist/r/src/components/ui/tooltip/index.ts +1 -0
  457. package/dist/r/src/components/ui/tooltip/lazy-tooltip.tsx +73 -0
  458. package/dist/r/src/components/ui/trace/trace.tsx +61 -28
  459. package/dist/r/src/components/ui/typography/typography.tsx +6 -5
  460. package/dist/r/src/lib/clipboard.ts +4 -0
  461. package/dist/r/src/lib/fast-icon.ts +88 -0
  462. package/dist/r/src/lib/form-field.ts +7 -7
  463. package/dist/r/src/lib/observe-resize.ts +28 -0
  464. package/dist/r/src/lib/overlay.ts +1 -1
  465. package/dist/r/subagent.json +2 -1
  466. package/dist/r/tool.json +2 -1
  467. package/dist/r/tooltip.json +5 -0
  468. package/dist/r/top-bar.json +1 -0
  469. package/dist/r/trace.json +0 -1
  470. package/package.json +1 -1
  471. package/registry.json +33 -9
  472. package/src/components/composites/about-dialog/about-dialog.tsx +5 -1
  473. package/src/components/composites/accent-picker/accent-picker.tsx +22 -17
  474. package/src/components/composites/account-menu/account-menu.tsx +21 -9
  475. package/src/components/composites/action-button/action-button.tsx +38 -21
  476. package/src/components/composites/appearance-editor/appearance-choices.tsx +7 -1
  477. package/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
  478. package/src/components/composites/appearance-editor/appearance-rows.tsx +13 -1
  479. package/src/components/composites/appearance-editor/font-settings-group.tsx +13 -1
  480. package/src/components/composites/catalog-browser/catalog-browser-group.tsx +11 -1
  481. package/src/components/composites/catalog-browser/catalog-browser.tsx +11 -1
  482. package/src/components/composites/chain-of-thought/chain-of-thought.tsx +5 -1
  483. package/src/components/composites/chat/chat.tsx +11 -1
  484. package/src/components/composites/checkpoint/checkpoint.tsx +5 -1
  485. package/src/components/composites/confirmation/confirmation.tsx +15 -1
  486. package/src/components/composites/context/context.tsx +9 -1
  487. package/src/components/composites/file-tree/file-tree.tsx +11 -1
  488. package/src/components/composites/help-center/help-center.tsx +5 -1
  489. package/src/components/composites/icon-picker/icon-picker.tsx +59 -31
  490. package/src/components/composites/icon-picker/shell-icons.ts +121 -59
  491. package/src/components/composites/inline-citation/inline-citation.tsx +6 -1
  492. package/src/components/composites/list-row/list-row-control.tsx +7 -5
  493. package/src/components/composites/message-scroller/message-scroller.tsx +6 -1
  494. package/src/components/composites/model-selector/model-selector.tsx +197 -11
  495. package/src/components/composites/plan/plan.tsx +5 -1
  496. package/src/components/composites/queue/queue.tsx +15 -1
  497. package/src/components/composites/reasoning/reasoning.tsx +5 -1
  498. package/src/components/composites/scene-controls/scene-controls.tsx +17 -1
  499. package/src/components/composites/settings/settings.tsx +23 -14
  500. package/src/components/composites/sources/sources.tsx +27 -20
  501. package/src/components/composites/stack-trace/stack-trace.tsx +13 -1
  502. package/src/components/composites/stat/stat.tsx +9 -1
  503. package/src/components/composites/subagent/subagent.tsx +5 -1
  504. package/src/components/composites/task/task.tsx +5 -1
  505. package/src/components/composites/terminal/ansi.ts +18 -0
  506. package/src/components/composites/terminal/terminal.tsx +17 -7
  507. package/src/components/composites/test-results/test-results.tsx +17 -7
  508. package/src/components/composites/tool/tool.tsx +5 -1
  509. package/src/components/composites/tree/tree.tsx +5 -1
  510. package/src/components/composites/update-dialog/update-dialog.tsx +35 -15
  511. package/src/components/composites/workspace-mark/workspace-mark.tsx +14 -7
  512. package/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +6 -1
  513. package/src/components/composites/workspace-switcher/workspace-switcher.tsx +13 -1
  514. package/src/components/conversation/busy-send-button.tsx +11 -1
  515. package/src/components/conversation/conversation-avatar.tsx +7 -1
  516. package/src/components/conversation/conversation-surface.tsx +5 -1
  517. package/src/components/conversation/internal/chat-composer-shell.tsx +13 -1
  518. package/src/components/conversation/message-composer.tsx +13 -1
  519. package/src/components/conversation/message-row.tsx +15 -1
  520. package/src/components/conversation/thread-panel.tsx +5 -1
  521. package/src/components/conversation/transcript-composition.tsx +5 -1
  522. package/src/components/layout/floating-preview/floating-preview.tsx +6 -1
  523. package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +5 -1
  524. package/src/components/layout/shell-rail/shell-rail.tsx +5 -1
  525. package/src/components/layout/side-rail/side-rail.tsx +16 -19
  526. package/src/components/layout/sidebar-nav/sidebar-nav.tsx +5 -1
  527. package/src/components/layout/split-layout/split-layout.tsx +6 -1
  528. package/src/components/layout/top-bar/top-bar.tsx +8 -8
  529. package/src/components/theme/appearance-panel.tsx +6 -1
  530. package/src/components/theme/theme-mode-toggle.tsx +7 -1
  531. package/src/components/theme/theme-toggle.tsx +7 -1
  532. package/src/components/ui/accordion/accordion.tsx +5 -1
  533. package/src/components/ui/alert/alert.tsx +20 -3
  534. package/src/components/ui/annotation-surface/annotation-surface.tsx +6 -3
  535. package/src/components/ui/attachment/attachment.tsx +19 -8
  536. package/src/components/ui/badge/badge.tsx +24 -8
  537. package/src/components/ui/breadcrumb/breadcrumb.tsx +9 -1
  538. package/src/components/ui/button/button.tsx +47 -16
  539. package/src/components/ui/calendar/calendar.tsx +6 -1
  540. package/src/components/ui/carousel/carousel.tsx +15 -5
  541. package/src/components/ui/checkbox/checkbox.tsx +260 -22
  542. package/src/components/ui/code-block/code-block.tsx +11 -5
  543. package/src/components/ui/combobox/combobox.tsx +8 -9
  544. package/src/components/ui/command/command.tsx +8 -4
  545. package/src/components/ui/detail-panel/detail-panel.tsx +5 -1
  546. package/src/components/ui/dialog/dialog-layer.tsx +16 -18
  547. package/src/components/ui/dialog/dialog.tsx +5 -1
  548. package/src/components/ui/dropdown-menu/menu-parts.tsx +11 -1
  549. package/src/components/ui/empty/empty-state.tsx +5 -1
  550. package/src/components/ui/field/field.tsx +14 -5
  551. package/src/components/ui/input/input-control.tsx +28 -19
  552. package/src/components/ui/input/input.tsx +9 -12
  553. package/src/components/ui/input-group/input-group.tsx +1 -8
  554. package/src/components/ui/kbd/kbd.tsx +53 -12
  555. package/src/components/ui/message/index.ts +3 -0
  556. package/src/components/ui/message/message.tsx +11 -2
  557. package/src/components/ui/message/parse-message-text.ts +94 -2
  558. package/src/components/ui/native-select/native-select.tsx +6 -9
  559. package/src/components/ui/navigation-menu/navigation-menu.tsx +5 -1
  560. package/src/components/ui/pagination/pagination.tsx +11 -1
  561. package/src/components/ui/questionnaire/questionnaire.tsx +13 -1
  562. package/src/components/ui/radio-group/radio-group.tsx +6 -9
  563. package/src/components/ui/resizable/resizable.tsx +5 -1
  564. package/src/components/ui/select/select.tsx +11 -1
  565. package/src/components/ui/sheet/sheet.tsx +5 -1
  566. package/src/components/ui/spinner/spinner.tsx +5 -1
  567. package/src/components/ui/status-chip/status-chip.tsx +14 -7
  568. package/src/components/ui/switch/switch.tsx +235 -28
  569. package/src/components/ui/textarea/textarea.tsx +1 -8
  570. package/src/components/ui/toast/toast.tsx +5 -1
  571. package/src/components/ui/tooltip/deferred-tooltip.tsx +14 -8
  572. package/src/components/ui/tooltip/index.ts +1 -0
  573. package/src/components/ui/tooltip/lazy-tooltip.tsx +73 -0
  574. package/src/components/ui/trace/trace.tsx +61 -28
  575. package/src/components/ui/typography/typography.tsx +6 -5
  576. package/src/lib/clipboard.ts +4 -0
  577. package/src/lib/fast-icon.ts +88 -0
  578. package/src/lib/form-field.ts +7 -7
  579. package/src/lib/observe-resize.ts +28 -0
  580. package/src/lib/overlay.ts +1 -1
  581. package/src/lint/index.ts +199 -0
@@ -1,9 +1,24 @@
1
1
  import { Checkbox as KobalteCheckbox } from '@kobalte/core/checkbox'
2
- import { Check, Minus } from 'lucide-solid'
2
+ import { Check as LucideCheck, Minus as LucideMinus } from 'lucide-solid'
3
3
  import type { ComponentProps, JSX } from 'solid-js'
4
- import { children as resolveChildren, splitProps } from 'solid-js'
4
+ import {
5
+ children as resolveChildren,
6
+ createEffect,
7
+ createSignal,
8
+ createUniqueId,
9
+ mergeProps,
10
+ onCleanup,
11
+ onMount,
12
+ Show,
13
+ splitProps,
14
+ } from 'solid-js'
5
15
  import { useFormFieldControl } from '../../../lib/form-field'
6
16
  import { cn } from '../../../lib/utils'
17
+ import { fastIcon } from '../../../lib/fast-icon'
18
+
19
+ // lucide icons drawn from a cloned template (see fastIcon).
20
+ const Check = fastIcon(LucideCheck)
21
+ const Minus = fastIcon(LucideMinus)
7
22
 
8
23
  /**
9
24
  * Checkbox.
@@ -33,7 +48,240 @@ export type CheckboxProps = Omit<ComponentProps<typeof KobalteCheckbox>, 'childr
33
48
  children?: JSX.Element
34
49
  }
35
50
 
51
+ const controlClass = (className?: string) =>
52
+ cn(
53
+ 'border-input bg-transparent flex size-4 shrink-0 items-center justify-center rounded-sm border',
54
+ 'transition-[color,box-shadow,border-color,background-color] ease-out outline-none',
55
+ 'peer-focus-visible:border-ring peer-focus-visible:ring-3 peer-focus-visible:ring-primary-subtle',
56
+ 'data-[checked]:bg-primary data-[checked]:border-primary data-[checked]:text-primary-foreground',
57
+ 'data-[indeterminate]:bg-primary data-[indeterminate]:border-primary data-[indeterminate]:text-primary-foreground',
58
+ 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',
59
+ 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',
60
+ className
61
+ )
62
+
63
+ const flag = (on: boolean | undefined) => (on ? '' : undefined)
64
+
65
+ /**
66
+ * Checkbox.
67
+ *
68
+ * Without `children` (the common case: a box, optionally with `label` and
69
+ * `description`) it renders a native checkbox and its painted control directly.
70
+ * Kobalte's Checkbox cost about 1 ms per box in its polymorphic parts and
71
+ * contexts, which a settings page or a selectable list pays once per row. The
72
+ * contract is Kobalte's: `checked`/`defaultChecked`/`onChange(checked)`,
73
+ * `indeterminate`, `name`, `value`, `required`, `disabled`, `readOnly`,
74
+ * `validationState`, and the same `data-*` state attributes on every part.
75
+ * With `children` the parts are composed by the caller, so it renders through
76
+ * Kobalte, whose context `CheckboxLabel` and `CheckboxDescription` need.
77
+ */
36
78
  export function Checkbox(props: CheckboxProps) {
79
+ if ('children' in props) return <ComposedCheckbox {...props} />
80
+ const [local, state, rest] = splitProps(
81
+ props,
82
+ [
83
+ 'class',
84
+ 'controlClass',
85
+ 'labelClass',
86
+ 'descriptionClass',
87
+ 'label',
88
+ 'description',
89
+ 'indeterminate',
90
+ 'aria-label',
91
+ 'aria-labelledby',
92
+ 'aria-describedby',
93
+ 'aria-invalid',
94
+ 'aria-errormessage',
95
+ 'aria-busy',
96
+ 'id',
97
+ 'inputId',
98
+ 'title',
99
+ ],
100
+ [
101
+ 'checked',
102
+ 'defaultChecked',
103
+ 'onChange',
104
+ 'name',
105
+ 'value',
106
+ 'required',
107
+ 'disabled',
108
+ 'readOnly',
109
+ 'validationState',
110
+ ]
111
+ )
112
+ const field = useFormFieldControl(
113
+ 'control',
114
+ mergeProps(local, {
115
+ get id() {
116
+ return local.inputId ?? local.id
117
+ },
118
+ })
119
+ )
120
+ const uid = createUniqueId()
121
+ // Kobalte's ids and defaults: the root names the input and, without a `name`, the form value.
122
+ const rootId = () => (field ? undefined : local.id) ?? `checkbox-${uid}`
123
+ const inputId = () => field?.id ?? local.inputId ?? `${rootId()}-input`
124
+ const descriptionId = `checkbox-${uid}-description`
125
+ const labelId = `checkbox-${uid}-label`
126
+ const [ownChecked, setOwnChecked] = createSignal(state.defaultChecked ?? false)
127
+ const checked = () => state.checked ?? ownChecked()
128
+ const setChecked = (next: boolean) => {
129
+ if (state.disabled || state.readOnly || next === checked()) return
130
+ if (state.checked === undefined) setOwnChecked(next)
131
+ state.onChange?.(next)
132
+ }
133
+ let input: HTMLInputElement | undefined
134
+ // A native form reset puts the input back on its default without an input or
135
+ // change event, so the state follows it, as Kobalte's does.
136
+ onMount(() => {
137
+ // The reset baseline (the `checked` attribute); `checked` above only sets the property.
138
+ if (input) input.defaultChecked = state.defaultChecked ?? false
139
+ const form = input?.form
140
+ if (!form) return
141
+ const reset = () => {
142
+ setChecked(state.defaultChecked ?? false)
143
+ // The browser resets the input after this event; then the input shows the state.
144
+ setTimeout(() => {
145
+ if (input) input.checked = checked()
146
+ })
147
+ }
148
+ form.addEventListener('reset', reset)
149
+ onCleanup(() => form.removeEventListener('reset', reset))
150
+ })
151
+ // `indeterminate` is a property with no attribute, so it is set on the node
152
+ // once the node exists, and again whenever the prop changes.
153
+ createEffect(() => {
154
+ const mixed = local.indeterminate ?? false
155
+ if (input) input.indeterminate = mixed
156
+ })
157
+
158
+ const label = resolveChildren(() => local.label)
159
+ const description = resolveChildren(() => local.description)
160
+ // Kobalte's naming rules: the label element, then the input itself when it
161
+ // also has an aria-label; the description before any caller's description.
162
+ const labelledBy = () => {
163
+ const external = field?.['aria-labelledby'] ?? local['aria-labelledby']
164
+ const own = label() ? labelId : undefined
165
+ const self = (external || own) && local['aria-label'] ? inputId() : undefined
166
+ return [external, own, self].filter(Boolean).join(' ') || undefined
167
+ }
168
+ const describedBy = () =>
169
+ [description() ? descriptionId : '', field?.['aria-describedby'] ?? local['aria-describedby']]
170
+ .filter(Boolean)
171
+ .join(' ') || undefined
172
+ const dataChecked = () => flag(checked())
173
+ const dataIndeterminate = () => flag(local.indeterminate)
174
+ const dataInvalid = () => flag(state.validationState === 'invalid')
175
+ const dataDisabled = () => flag(state.disabled)
176
+
177
+ return (
178
+ <div
179
+ data-slot="checkbox"
180
+ role="group"
181
+ id={rootId()}
182
+ title={local.title}
183
+ class={cn('group/checkbox relative flex items-start gap-2.5', local.class)}
184
+ data-checked={dataChecked()}
185
+ data-indeterminate={dataIndeterminate()}
186
+ data-invalid={dataInvalid()}
187
+ data-valid={flag(state.validationState === 'valid')}
188
+ data-required={flag(state.required)}
189
+ data-disabled={dataDisabled()}
190
+ data-readonly={flag(state.readOnly)}
191
+ {...(rest as ComponentProps<'div'>)}
192
+ >
193
+ {/*
194
+ * The name goes on the input, which is what carries the value and takes
195
+ * focus. On the root it would land on a plain div and name nothing: the
196
+ * box would announce its state with no subject.
197
+ */}
198
+ <input
199
+ ref={(element) => {
200
+ input = element
201
+ }}
202
+ type="checkbox"
203
+ class="peer sr-only"
204
+ id={inputId()}
205
+ name={state.name ?? rootId()}
206
+ value={state.value ?? 'on'}
207
+ checked={checked()}
208
+ required={state.required}
209
+ disabled={state.disabled}
210
+ readOnly={state.readOnly}
211
+ aria-label={local['aria-label']}
212
+ aria-labelledby={labelledBy()}
213
+ aria-describedby={describedBy()}
214
+ aria-invalid={
215
+ field?.['aria-invalid'] ??
216
+ local['aria-invalid'] ??
217
+ (state.validationState === 'invalid' || undefined)
218
+ }
219
+ aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}
220
+ aria-busy={local['aria-busy']}
221
+ aria-required={state.required}
222
+ aria-disabled={state.disabled}
223
+ aria-readonly={state.readOnly}
224
+ title={local.title}
225
+ data-checked={dataChecked()}
226
+ data-indeterminate={dataIndeterminate()}
227
+ onChange={(event) => {
228
+ event.stopPropagation()
229
+ setChecked(event.currentTarget.checked)
230
+ // Controlled: the box shows the value the host keeps, not the click.
231
+ event.currentTarget.checked = checked()
232
+ }}
233
+ />
234
+ <div
235
+ data-checked={dataChecked()}
236
+ data-indeterminate={dataIndeterminate()}
237
+ data-invalid={dataInvalid()}
238
+ data-disabled={dataDisabled()}
239
+ class={controlClass(local.controlClass)}
240
+ onClick={() => {
241
+ setChecked(!checked())
242
+ input?.focus({ preventScroll: true })
243
+ }}
244
+ >
245
+ <Show when={checked() || local.indeterminate}>
246
+ <div
247
+ class="flex items-center justify-center"
248
+ data-checked={dataChecked()}
249
+ data-indeterminate={dataIndeterminate()}
250
+ >
251
+ {local.indeterminate ? <Minus class="size-3" /> : <Check class="size-3" />}
252
+ </div>
253
+ </Show>
254
+ </div>
255
+ <Show when={label() || description()}>
256
+ <div class="grid gap-0.5">
257
+ <Show when={label()}>
258
+ <label
259
+ id={labelId}
260
+ for={inputId()}
261
+ class={cn('text-sm font-medium', local.labelClass)}
262
+ data-checked={dataChecked()}
263
+ data-disabled={dataDisabled()}
264
+ >
265
+ {label()}
266
+ </label>
267
+ </Show>
268
+ <Show when={description()}>
269
+ <div
270
+ id={descriptionId}
271
+ class={cn('text-muted-foreground text-sm', local.descriptionClass)}
272
+ data-checked={dataChecked()}
273
+ data-disabled={dataDisabled()}
274
+ >
275
+ {description()}
276
+ </div>
277
+ </Show>
278
+ </div>
279
+ </Show>
280
+ </div>
281
+ )
282
+ }
283
+
284
+ function ComposedCheckbox(props: CheckboxProps) {
37
285
  const [local, rest] = splitProps(props, [
38
286
  'class',
39
287
  'controlClass',
@@ -53,14 +301,14 @@ export function Checkbox(props: CheckboxProps) {
53
301
  'inputId',
54
302
  'title',
55
303
  ])
56
- const field = useFormFieldControl('control', {
57
- id: local.inputId ?? local.id,
58
- 'aria-label': local['aria-label'],
59
- 'aria-labelledby': local['aria-labelledby'],
60
- 'aria-describedby': local['aria-describedby'],
61
- 'aria-invalid': local['aria-invalid'],
62
- 'aria-errormessage': local['aria-errormessage'],
63
- })
304
+ const field = useFormFieldControl(
305
+ 'control',
306
+ mergeProps(local, {
307
+ get id() {
308
+ return local.inputId ?? local.id
309
+ },
310
+ })
311
+ )
64
312
 
65
313
  // Slots are JSX getters that build per read; resolve each once.
66
314
  const label = resolveChildren(() => local.label)
@@ -79,6 +327,7 @@ export function Checkbox(props: CheckboxProps) {
79
327
  * box would announce its state with no subject.
80
328
  */}
81
329
  <KobalteCheckbox.Input
330
+ class="peer"
82
331
  id={field?.id ?? local.inputId}
83
332
  aria-label={local['aria-label']}
84
333
  aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}
@@ -88,18 +337,7 @@ export function Checkbox(props: CheckboxProps) {
88
337
  aria-busy={local['aria-busy']}
89
338
  title={local.title}
90
339
  />
91
- <KobalteCheckbox.Control
92
- class={cn(
93
- 'border-input bg-transparent flex size-4 shrink-0 items-center justify-center rounded-sm border',
94
- 'transition-[color,box-shadow,border-color,background-color] ease-out outline-none',
95
- 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',
96
- 'data-[checked]:bg-primary data-[checked]:border-primary data-[checked]:text-primary-foreground',
97
- 'data-[indeterminate]:bg-primary data-[indeterminate]:border-primary data-[indeterminate]:text-primary-foreground',
98
- 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',
99
- 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',
100
- local.controlClass
101
- )}
102
- >
340
+ <KobalteCheckbox.Control class={controlClass(local.controlClass)}>
103
341
  <KobalteCheckbox.Indicator class="flex items-center justify-center">
104
342
  {local.indeterminate ? <Minus class="size-3" /> : <Check class="size-3" />}
105
343
  </KobalteCheckbox.Indicator>
@@ -11,11 +11,17 @@ import {
11
11
  type ComponentProps,
12
12
  type JSX,
13
13
  } from 'solid-js'
14
- import { Check, Copy } from 'lucide-solid'
14
+ import { Check as LucideCheck, Copy as LucideCopy } from 'lucide-solid'
15
15
  import { createCopyFeedback } from '../../../lib/clipboard'
16
+ import { observeResize } from '../../../lib/observe-resize'
16
17
  import { cn } from '../../../lib/utils'
17
18
  import { ActionButton } from '../../composites/action-button'
18
19
  import { Button } from '../button'
20
+ import { fastIcon } from '../../../lib/fast-icon'
21
+
22
+ // lucide icons drawn from a cloned template (see fastIcon).
23
+ const Check = fastIcon(LucideCheck)
24
+ const Copy = fastIcon(LucideCopy)
19
25
 
20
26
  /**
21
27
  * CodeBlock.
@@ -275,17 +281,17 @@ export function CodeBlock(props: CodeBlockProps) {
275
281
  // it as an uncaught "loop completed with undelivered notifications" error).
276
282
  // The footer's own height is left out of the measure for the same reason: a
277
283
  // block is tall by its content, not by the row that tallness adds.
278
- const observer = new ResizeObserver(() => {
284
+ // One observer is shared by every block (see observeResize).
285
+ const measure = () => {
279
286
  const footer = element.querySelector<HTMLElement>('[data-code-block-footer]')
280
287
  setTall(
281
288
  element.offsetHeight - (footer?.offsetHeight ?? 0) >
282
289
  (local.tallThreshold ?? TALL_CODE_BLOCK_PX)
283
290
  )
284
- })
291
+ }
285
292
  onMount(() => {
286
- if (bodyElement) observer.observe(bodyElement)
293
+ if (bodyElement) onCleanup(observeResize(bodyElement, measure))
287
294
  })
288
- onCleanup(() => observer.disconnect())
289
295
  }}
290
296
  >
291
297
  <div
@@ -1,10 +1,16 @@
1
1
  import { Combobox as KobalteCombobox } from '@kobalte/core/combobox'
2
- import { Check, ChevronDown, X } from 'lucide-solid'
2
+ import { Check as LucideCheck, ChevronDown as LucideChevronDown, X as LucideX } from 'lucide-solid'
3
3
  import type { ComponentProps } from 'solid-js'
4
4
  import { Show, splitProps } from 'solid-js'
5
5
  import { menuContentPadding, menuItem, popoverArrow, topLayerProps } from '../../../lib/overlay'
6
6
  import { useFormFieldControl } from '../../../lib/form-field'
7
7
  import { cn } from '../../../lib/utils'
8
+ import { fastIcon } from '../../../lib/fast-icon'
9
+
10
+ // lucide icons drawn from a cloned template (see fastIcon).
11
+ const Check = fastIcon(LucideCheck)
12
+ const ChevronDown = fastIcon(LucideChevronDown)
13
+ const X = fastIcon(LucideX)
8
14
 
9
15
  /**
10
16
  * Combobox.
@@ -53,14 +59,7 @@ export function ComboboxInput(props: ComponentProps<typeof KobalteCombobox.Input
53
59
  'aria-invalid',
54
60
  'aria-errormessage',
55
61
  ])
56
- const field = useFormFieldControl('control', {
57
- id: local.id,
58
- 'aria-label': local['aria-label'],
59
- 'aria-labelledby': local['aria-labelledby'],
60
- 'aria-describedby': local['aria-describedby'],
61
- 'aria-invalid': local['aria-invalid'],
62
- 'aria-errormessage': local['aria-errormessage'],
63
- })
62
+ const field = useFormFieldControl('control', local)
64
63
 
65
64
  return (
66
65
  <KobalteCombobox.Input
@@ -11,12 +11,16 @@ import {
11
11
  useCommandState,
12
12
  } from 'cmdk-solid'
13
13
  import { Dialog as KobalteDialog } from '@kobalte/core/dialog'
14
- import { Search } from 'lucide-solid'
14
+ import { Search as LucideSearch } from 'lucide-solid'
15
15
  import type { ComponentProps } from 'solid-js'
16
16
  import { createEffect, createSignal, splitProps } from 'solid-js'
17
17
  import { createDialogLayer } from '../dialog/dialog-layer'
18
18
  import { menuItem, menuShortcut, overlaySurface, overlayZoom } from '../../../lib/overlay'
19
19
  import { cn } from '../../../lib/utils'
20
+ import { fastIcon } from '../../../lib/fast-icon'
21
+
22
+ // lucide icons drawn from a cloned template (see fastIcon).
23
+ const Search = fastIcon(LucideSearch)
20
24
 
21
25
  // cmdk emits data-disabled="false" on enabled items, unlike the presence-only
22
26
  // attributes Kobalte menu rows use. Apply those shared disabled styles only when
@@ -181,9 +185,9 @@ export function CommandList(props: ComponentProps<typeof CmdkList>) {
181
185
  createEffect(() => {
182
186
  const root = wrapper()
183
187
  if (!root) return
184
- for (const selector of ['[cmdk-list-sizer]', '[cmdk-separator]']) {
185
- root.querySelector(selector)?.setAttribute('role', 'presentation')
186
- }
188
+ // Every separator, not the first: a palette with three groups has two.
189
+ for (const node of root.querySelectorAll('[cmdk-list-sizer], [cmdk-separator]'))
190
+ node.setAttribute('role', 'presentation')
187
191
 
188
192
  /*
189
193
  * A `listbox` must own at least one `option`, so a listbox with nothing in it
@@ -1,7 +1,11 @@
1
1
  import { createUniqueId, Show, splitProps, type ComponentProps, type JSX } from 'solid-js'
2
- import { X } from 'lucide-solid'
2
+ import { X as LucideX } from 'lucide-solid'
3
3
  import { Button } from '../button'
4
4
  import { cn } from '../../../lib/utils'
5
+ import { fastIcon } from '../../../lib/fast-icon'
6
+
7
+ // lucide icons drawn from a cloned template (see fastIcon).
8
+ const X = fastIcon(LucideX)
5
9
 
6
10
  /**
7
11
  * DetailPanel.
@@ -34,8 +34,8 @@ type FocusCycle = {
34
34
  closed: boolean
35
35
  focusMovedOutside: boolean
36
36
  closeAutoFocusScheduled: boolean
37
- /** The restore deadline passed: stop waiting on the opener after the frame that is due. */
38
- deadlinePassed: boolean
37
+ /** Restore frames that found the opener still hidden; see FOCUS_RESTORE_FRAME_BUDGET. */
38
+ hiddenFrames: number
39
39
  frame?: number
40
40
  fallbackTimer?: number
41
41
  observer?: MutationObserver
@@ -78,8 +78,13 @@ function anotherLayerOpen(content: HTMLElement, opener: HTMLElement): boolean {
78
78
  * The focus-return half of the layer rules, for a layer whose open state is
79
79
  * `open`. Returns the autofocus handlers to give the Kobalte content.
80
80
  */
81
- /** How long a closed layer may wait for its opener to become focusable again. */
82
- const FOCUS_RESTORE_DEADLINE_MS = 1000
81
+ /**
82
+ * How many restore frames a closed layer may spend on an opener that is still
83
+ * hidden. It counts frames, not time: Kobalte clears its own markers when the
84
+ * overlay finishes unmounting, which on a loaded machine (WebKit in CI) can be
85
+ * well over a second, and a frame count slows down with the page.
86
+ */
87
+ const FOCUS_RESTORE_FRAME_BUDGET = 120
83
88
 
84
89
  export function createDialogFocusReturn(
85
90
  open: Accessor<boolean>,
@@ -150,7 +155,8 @@ export function createDialogFocusReturn(
150
155
  // Kobalte removes the `inert` / `aria-hidden` it put on the background
151
156
  // only after the layer unmounts; the observer below brings us back here.
152
157
  if (opener.closest('[inert], [aria-hidden="true"]')) {
153
- if (cycle.deadlinePassed) finishFocusCycle(cycle)
158
+ cycle.hiddenFrames += 1
159
+ if (cycle.hiddenFrames >= FOCUS_RESTORE_FRAME_BUDGET) finishFocusCycle(cycle)
154
160
  return
155
161
  }
156
162
  if (cycle.openerEligible && canRestoreFocus(opener)) {
@@ -180,7 +186,7 @@ export function createDialogFocusReturn(
180
186
  closed: false,
181
187
  focusMovedOutside: false,
182
188
  closeAutoFocusScheduled: false,
183
- deadlinePassed: false,
189
+ hiddenFrames: 0,
184
190
  onFocusIn: (focusEvent) => {
185
191
  const target = focusEvent.target
186
192
  if (
@@ -231,19 +237,11 @@ export function createDialogFocusReturn(
231
237
  childList: true,
232
238
  subtree: true,
233
239
  })
234
- scheduleFocusRestore(cycle)
235
240
  // The observer watches every mutation in the document. If the opener stays
236
- // under an `inert` or `aria-hidden` that is not this layer's, nothing above
237
- // finishes the cycle, and a streaming page would schedule a frame per DOM
238
- // change for good. Kobalte clears its own markers within a frame or two.
239
- // The deadline stops the watching, not a restore already asked for: a busy
240
- // or throttled page (WebKit under load) can hold the frame past it.
241
- cycle.fallbackTimer = window.setTimeout(() => {
242
- cycle.fallbackTimer = undefined
243
- cycle.deadlinePassed = true
244
- cycle.observer?.disconnect()
245
- if (cycle.frame === undefined) finishFocusCycle(cycle)
246
- }, FOCUS_RESTORE_DEADLINE_MS)
241
+ // under an `inert` or `aria-hidden` that is not this layer's, a streaming
242
+ // page would schedule a frame per DOM change for good, so the frames that
243
+ // find it hidden are capped. A quiet page schedules none while it waits.
244
+ scheduleFocusRestore(cycle)
247
245
  }
248
246
 
249
247
  onCleanup(() => {
@@ -4,7 +4,7 @@ import {
4
4
  Overlay as KobalteDialogOverlay,
5
5
  } from '@kobalte/core/dialog'
6
6
  // AlertDialog assigns to the shared DialogRoot.Content object, so these named exports stay role-stable.
7
- import { X } from 'lucide-solid'
7
+ import { X as LucideX } from 'lucide-solid'
8
8
  import type { Accessor, ComponentProps, JSX } from 'solid-js'
9
9
  import { children as resolveChildren, Show, splitProps } from 'solid-js'
10
10
  import {
@@ -22,6 +22,10 @@ import {
22
22
  import { cn } from '../../../lib/utils'
23
23
  import { Tooltip, TooltipContent, TooltipTrigger } from '../tooltip'
24
24
  import { createDialogLayer, DialogEscapeTarget } from './dialog-layer'
25
+ import { fastIcon } from '../../../lib/fast-icon'
26
+
27
+ // lucide icons drawn from a cloned template (see fastIcon).
28
+ const X = fastIcon(LucideX)
25
29
 
26
30
  /**
27
31
  * Dialog.
@@ -1,5 +1,9 @@
1
1
  import type { DropdownMenu as KobalteDropdownMenu } from '@kobalte/core/dropdown-menu'
2
- import { Check, ChevronRight, Circle } from 'lucide-solid'
2
+ import {
3
+ Check as LucideCheck,
4
+ ChevronRight as LucideChevronRight,
5
+ Circle as LucideCircle,
6
+ } from 'lucide-solid'
3
7
  import type { ComponentProps } from 'solid-js'
4
8
  import { Show, splitProps } from 'solid-js'
5
9
  import {
@@ -16,6 +20,12 @@ import {
16
20
  type MenuSwatchTone,
17
21
  } from '../../../lib/overlay'
18
22
  import { cn } from '../../../lib/utils'
23
+ import { fastIcon } from '../../../lib/fast-icon'
24
+
25
+ // lucide icons drawn from a cloned template (see fastIcon).
26
+ const Check = fastIcon(LucideCheck)
27
+ const ChevronRight = fastIcon(LucideChevronRight)
28
+ const Circle = fastIcon(LucideCircle)
19
29
 
20
30
  /**
21
31
  * The rows and panels every Kobalte menu family draws alike: DropdownMenu,
@@ -1,10 +1,14 @@
1
- import { Search } from 'lucide-solid'
1
+ import { Search as LucideSearch } from 'lucide-solid'
2
2
  import type { ComponentProps, JSX } from 'solid-js'
3
3
  import { children as resolveChildren, Show, splitProps } from 'solid-js'
4
4
  import { ActionButton } from '../../composites/action-button'
5
5
  import { cn } from '../../../lib/utils'
6
6
  import { Spinner } from '../spinner'
7
7
  import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from './empty'
8
+ import { fastIcon } from '../../../lib/fast-icon'
9
+
10
+ // lucide icons drawn from a cloned template (see fastIcon).
11
+ const Search = fastIcon(LucideSearch)
8
12
 
9
13
  type EmptyStateSecondaryAction =
10
14
  | {
@@ -1,6 +1,6 @@
1
1
  import { TextField as KobalteTextField } from '@kobalte/core/text-field'
2
2
  import type { ComponentProps, JSX } from 'solid-js'
3
- import { createUniqueId, Show, splitProps } from 'solid-js'
3
+ import { children as resolveChildren, createUniqueId, Show, splitProps } from 'solid-js'
4
4
  import { Label } from '../label'
5
5
  import { createFormFieldContext, FormFieldContext } from '../../../lib/form-field'
6
6
  import { cn } from '../../../lib/utils'
@@ -91,8 +91,11 @@ export function FormField(props: FormFieldProps) {
91
91
  </>
92
92
  )
93
93
 
94
- return (
95
- <FormFieldContext.Provider value={field}>
94
+ // Rendered under the provider so the control sees the field context. The control is
95
+ // built once: switching `group` moves the same control between the two layouts.
96
+ const Body = () => {
97
+ const control = resolveChildren(() => local.children)
98
+ return (
96
99
  <div class={cn('flex flex-col gap-1.5', local.class)} {...rest}>
97
100
  {local.group ? (
98
101
  <FieldSet
@@ -103,7 +106,7 @@ export function FormField(props: FormFieldProps) {
103
106
  <FieldLegend id={labelId} variant="label">
104
107
  {local.label}
105
108
  </FieldLegend>
106
- {local.children}
109
+ {control()}
107
110
  {help()}
108
111
  </FieldSet>
109
112
  ) : (
@@ -111,11 +114,17 @@ export function FormField(props: FormFieldProps) {
111
114
  <Label id={labelId} for={field.controlId()}>
112
115
  {local.label}
113
116
  </Label>
114
- {local.children}
117
+ {control()}
115
118
  {help()}
116
119
  </>
117
120
  )}
118
121
  </div>
122
+ )
123
+ }
124
+
125
+ return (
126
+ <FormFieldContext.Provider value={field}>
127
+ <Body />
119
128
  </FormFieldContext.Provider>
120
129
  )
121
130
  }