@k8ordo/ui 2.3.1 → 4.0.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 (491) hide show
  1. package/README.md +75 -183
  2. package/dist/catalog/icon-map.d.mts +108 -0
  3. package/dist/catalog/icon-map.mjs +212 -0
  4. package/dist/catalog/icon-names.d.mts +1 -0
  5. package/dist/catalog/icon-names.mjs +108 -0
  6. package/dist/catalog/index.d.mts +1289 -0
  7. package/dist/catalog/index.mjs +419 -0
  8. package/dist/catalog/render.css +34 -0
  9. package/dist/catalog/render.d.mts +72 -0
  10. package/dist/catalog/render.mjs +631 -0
  11. package/dist/catalog/render.module.mjs +11 -0
  12. package/dist/{integrations/_shared → catalog}/schemas.d.mts +550 -307
  13. package/dist/{integrations/_shared → catalog}/schemas.mjs +191 -184
  14. package/dist/catalog/to-tree.d.mts +4 -0
  15. package/dist/catalog/to-tree.mjs +17 -0
  16. package/dist/components/_internal/checked-values.d.mts +1 -0
  17. package/dist/components/_internal/checked-values.mjs +5 -0
  18. package/dist/components/_internal/field-message.css +25 -0
  19. package/dist/components/_internal/field-message.d.mts +10 -0
  20. package/dist/components/_internal/field-message.mjs +22 -0
  21. package/dist/components/_internal/field-message.module.mjs +9 -0
  22. package/dist/components/_internal/focus-ring.css +1 -1
  23. package/dist/components/_internal/high-contrast.css +1 -0
  24. package/dist/components/{observers/in-view → _internal}/in-view.mjs +1 -1
  25. package/dist/components/{observers/resize → _internal}/resize.mjs +1 -1
  26. package/dist/components/ai/_internal/attachment-preview.mjs +3 -3
  27. package/dist/components/ai/_internal/collapsible.mjs +2 -2
  28. package/dist/components/ai/attachment/attachment.d.mts +1 -1
  29. package/dist/components/ai/attachment/index.d.mts +1 -1
  30. package/dist/components/ai/conversation/conversation.mjs +4 -4
  31. package/dist/components/ai/index.d.mts +2 -2
  32. package/dist/components/ai/message/index.d.mts +2 -2
  33. package/dist/components/ai/message/message.d.mts +2 -2
  34. package/dist/components/ai/message/message.mjs +14 -12
  35. package/dist/components/ai/prompt-input/prompt-input.mjs +5 -5
  36. package/dist/components/ai/reasoning/reasoning.mjs +1 -1
  37. package/dist/components/ai/source/index.d.mts +2 -2
  38. package/dist/components/ai/source/source.d.mts +2 -2
  39. package/dist/components/ai/source/source.mjs +2 -2
  40. package/dist/components/ai/tool-invocation/approval-bar.mjs +11 -22
  41. package/dist/components/ai/tool-invocation/tool-invocation.d.mts +2 -2
  42. package/dist/components/ai/tool-invocation/tool-invocation.mjs +2 -1
  43. package/dist/components/buttons/button/button.css +1 -1
  44. package/dist/components/buttons/button/button.d.mts +34 -37
  45. package/dist/components/buttons/button/button.mjs +37 -24
  46. package/dist/components/buttons/button/button.module.mjs +0 -1
  47. package/dist/components/buttons/button/index.d.mts +2 -2
  48. package/dist/components/buttons/copy-button/copy-button.mjs +6 -4
  49. package/dist/components/buttons/icon-button/icon-button.css +3 -3
  50. package/dist/components/buttons/icon-button/icon-button.d.mts +37 -43
  51. package/dist/components/buttons/icon-button/icon-button.mjs +73 -63
  52. package/dist/components/buttons/icon-button/icon-button.module.mjs +2 -2
  53. package/dist/components/buttons/icon-button/index.d.mts +2 -2
  54. package/dist/components/buttons/toolbar/toolbar.css +5 -1
  55. package/dist/components/buttons/toolbar/toolbar.mjs +1 -1
  56. package/dist/components/data-display/accordion/accordion-button.d.mts +4 -1
  57. package/dist/components/data-display/accordion/accordion-button.mjs +5 -5
  58. package/dist/components/data-display/accordion/index.d.mts +3 -3
  59. package/dist/components/data-display/card/card-action.d.mts +6 -0
  60. package/dist/components/data-display/card/card-action.mjs +21 -0
  61. package/dist/components/data-display/card/card.css +24 -0
  62. package/dist/components/data-display/card/card.d.mts +26 -3
  63. package/dist/components/data-display/card/card.mjs +46 -6
  64. package/dist/components/data-display/card/card.module.mjs +4 -1
  65. package/dist/components/data-display/card/index.d.mts +2 -2
  66. package/dist/components/data-display/carousel/carousel.mjs +3 -3
  67. package/dist/components/data-display/code/code.css +4 -0
  68. package/dist/components/data-display/code-block/code-block.mjs +1 -1
  69. package/dist/components/data-display/data-table/data-table.css +0 -3
  70. package/dist/components/data-display/data-table/data-table.mjs +25 -26
  71. package/dist/components/data-display/tree/tree.d.mts +1 -1
  72. package/dist/components/data-display/tree/tree.mjs +7 -6
  73. package/dist/components/feedback/alert/alert.d.mts +2 -7
  74. package/dist/components/feedback/alert/alert.mjs +12 -11
  75. package/dist/components/feedback/alert/index.d.mts +2 -2
  76. package/dist/components/feedback/callout/callout.mjs +3 -3
  77. package/dist/components/feedback/progress/progress.mjs +1 -1
  78. package/dist/components/feedback/toast/context.d.mts +4 -5
  79. package/dist/components/feedback/toast/index.d.mts +2 -2
  80. package/dist/components/feedback/toast/provider.d.mts +7 -2
  81. package/dist/components/feedback/toast/provider.mjs +7 -2
  82. package/dist/components/feedback/toast/toast.d.mts +2 -3
  83. package/dist/components/form/autocomplete/autocomplete.d.mts +2 -2
  84. package/dist/components/form/autocomplete/autocomplete.mjs +15 -12
  85. package/dist/components/form/calendar/calendar.mjs +4 -6
  86. package/dist/components/form/checkbox/checkbox.d.mts +3 -1
  87. package/dist/components/form/checkbox/checkbox.mjs +45 -45
  88. package/dist/components/form/checkbox-card/checkbox-card.d.mts +3 -2
  89. package/dist/components/form/checkbox-card/checkbox-card.mjs +13 -6
  90. package/dist/components/form/checkbox-group/checkbox-group.d.mts +15 -20
  91. package/dist/components/form/checkbox-group/checkbox-group.mjs +18 -26
  92. package/dist/components/form/checkbox-group/index.d.mts +2 -34
  93. package/dist/components/form/checkbox-group/index.mjs +1 -8
  94. package/dist/components/form/color-picker/color-picker.css +3 -5
  95. package/dist/components/form/color-picker/color-picker.d.mts +0 -1
  96. package/dist/components/form/color-picker/color-picker.mjs +4 -4
  97. package/dist/components/form/combobox/combobox.d.mts +0 -1
  98. package/dist/components/form/combobox/combobox.mjs +9 -8
  99. package/dist/components/form/date-picker/date-picker.css +0 -5
  100. package/dist/components/form/date-picker/date-picker.mjs +22 -23
  101. package/dist/components/form/file-field/file-field.d.mts +6 -3
  102. package/dist/components/form/file-field/file-field.mjs +42 -19
  103. package/dist/components/form/file-field/index.d.mts +4 -1
  104. package/dist/components/form/form/form.mjs +0 -1
  105. package/dist/components/form/form-control/form-control.css +0 -15
  106. package/dist/components/form/form-control/form-control.d.mts +3 -4
  107. package/dist/components/form/form-control/form-control.mjs +44 -46
  108. package/dist/components/form/form-control/form-control.module.mjs +0 -3
  109. package/dist/components/form/number-field/number-field.d.mts +2 -2
  110. package/dist/components/form/number-field/number-field.mjs +13 -52
  111. package/dist/components/form/password-input/password-input.mjs +3 -2
  112. package/dist/components/form/radio/radio.mjs +4 -2
  113. package/dist/components/form/radio-card/radio-card.mjs +9 -2
  114. package/dist/components/form/range-slider/range-slider.d.mts +4 -2
  115. package/dist/components/form/range-slider/range-slider.mjs +2 -4
  116. package/dist/components/form/select/select.css +6 -4
  117. package/dist/components/form/select/select.d.mts +5 -0
  118. package/dist/components/form/select/select.mjs +10 -7
  119. package/dist/components/form/slider/slider.d.mts +2 -2
  120. package/dist/components/form/slider/slider.mjs +3 -6
  121. package/dist/components/form/switch/switch.d.mts +3 -0
  122. package/dist/components/form/switch/switch.mjs +43 -31
  123. package/dist/components/form/text-field/index.d.mts +2 -2
  124. package/dist/components/form/text-field/text-field.css +4 -0
  125. package/dist/components/form/text-field/text-field.d.mts +1 -1
  126. package/dist/components/form/textarea/textarea.d.mts +0 -1
  127. package/dist/components/form/textarea/textarea.mjs +1 -1
  128. package/dist/components/icons/alert.d.mts +6 -0
  129. package/dist/components/icons/alert.mjs +17 -0
  130. package/dist/components/icons/{vertical-writing.d.mts → arrow-down.d.mts} +1 -1
  131. package/dist/components/icons/arrow-down.mjs +8 -0
  132. package/dist/components/icons/arrow-left.d.mts +3 -0
  133. package/dist/components/icons/arrow-left.mjs +8 -0
  134. package/dist/components/icons/arrow-right.d.mts +3 -0
  135. package/dist/components/icons/arrow-right.mjs +8 -0
  136. package/dist/components/icons/{twitter.d.mts → arrow-up.d.mts} +1 -1
  137. package/dist/components/icons/arrow-up.mjs +8 -0
  138. package/dist/components/icons/base.d.mts +0 -1
  139. package/dist/components/icons/base.mjs +1 -2
  140. package/dist/components/icons/{qiita.d.mts → bell.d.mts} +1 -1
  141. package/dist/components/icons/bell.mjs +8 -0
  142. package/dist/components/icons/{github-mark.d.mts → blend.d.mts} +1 -1
  143. package/dist/components/icons/blend.mjs +16 -0
  144. package/dist/components/icons/book-text.d.mts +3 -0
  145. package/dist/components/icons/book-text.mjs +8 -0
  146. package/dist/components/icons/bookmark.d.mts +3 -0
  147. package/dist/components/icons/bookmark.mjs +8 -0
  148. package/dist/components/icons/bot-message.d.mts +3 -0
  149. package/dist/components/icons/bot-message.mjs +8 -0
  150. package/dist/components/icons/bot.d.mts +3 -0
  151. package/dist/components/icons/bot.mjs +14 -0
  152. package/dist/components/icons/calendar.d.mts +3 -0
  153. package/dist/components/icons/calendar.mjs +14 -0
  154. package/dist/components/icons/check.d.mts +3 -0
  155. package/dist/components/icons/check.mjs +8 -0
  156. package/dist/components/icons/chevron-down.d.mts +3 -0
  157. package/dist/components/icons/chevron-down.mjs +8 -0
  158. package/dist/components/icons/chevron-left.d.mts +3 -0
  159. package/dist/components/icons/chevron-left.mjs +8 -0
  160. package/dist/components/icons/chevron-right.d.mts +3 -0
  161. package/dist/components/icons/chevron-right.mjs +8 -0
  162. package/dist/components/icons/chevron-up.d.mts +3 -0
  163. package/dist/components/icons/chevron-up.mjs +8 -0
  164. package/dist/components/icons/chevron.d.mts +6 -0
  165. package/dist/components/icons/chevron.mjs +17 -0
  166. package/dist/components/icons/chevrons-up-down.d.mts +3 -0
  167. package/dist/components/icons/chevrons-up-down.mjs +8 -0
  168. package/dist/components/icons/circle-alert.d.mts +3 -0
  169. package/dist/components/icons/circle-alert.mjs +12 -0
  170. package/dist/components/icons/circle-check.d.mts +3 -0
  171. package/dist/components/icons/circle-check.mjs +12 -0
  172. package/dist/components/icons/circle-help.d.mts +3 -0
  173. package/dist/components/icons/circle-help.mjs +12 -0
  174. package/dist/components/icons/circle-x.d.mts +3 -0
  175. package/dist/components/icons/circle-x.mjs +12 -0
  176. package/dist/components/icons/clipboard-check.d.mts +3 -0
  177. package/dist/components/icons/clipboard-check.mjs +18 -0
  178. package/dist/components/icons/clock.d.mts +3 -0
  179. package/dist/components/icons/clock.mjs +12 -0
  180. package/dist/components/icons/code.d.mts +3 -0
  181. package/dist/components/icons/code.mjs +8 -0
  182. package/dist/components/icons/color-scale.mjs +18 -30
  183. package/dist/components/icons/contrast.d.mts +3 -0
  184. package/dist/components/icons/contrast.mjs +15 -0
  185. package/dist/components/icons/copy.d.mts +3 -0
  186. package/dist/components/icons/copy.mjs +14 -0
  187. package/dist/components/icons/download.d.mts +3 -0
  188. package/dist/components/icons/download.mjs +8 -0
  189. package/dist/components/icons/ellipsis-vertical.d.mts +3 -0
  190. package/dist/components/icons/ellipsis-vertical.mjs +27 -0
  191. package/dist/components/icons/ellipsis.d.mts +3 -0
  192. package/dist/components/icons/ellipsis.mjs +27 -0
  193. package/dist/components/icons/external-link.d.mts +3 -0
  194. package/dist/components/icons/external-link.mjs +8 -0
  195. package/dist/components/icons/eye-closed.d.mts +3 -0
  196. package/dist/components/icons/eye-closed.mjs +8 -0
  197. package/dist/components/icons/eye.d.mts +3 -0
  198. package/dist/components/icons/eye.mjs +12 -0
  199. package/dist/components/icons/file-text.d.mts +3 -0
  200. package/dist/components/icons/file-text.mjs +12 -0
  201. package/dist/components/icons/file.d.mts +3 -0
  202. package/dist/components/icons/file.mjs +8 -0
  203. package/dist/components/icons/filter.d.mts +3 -0
  204. package/dist/components/icons/filter.mjs +8 -0
  205. package/dist/components/icons/flask.d.mts +3 -0
  206. package/dist/components/icons/flask.mjs +8 -0
  207. package/dist/components/icons/folder-open.d.mts +3 -0
  208. package/dist/components/icons/folder-open.mjs +8 -0
  209. package/dist/components/icons/folder.d.mts +3 -0
  210. package/dist/components/icons/folder.mjs +8 -0
  211. package/dist/components/icons/git-fork.d.mts +3 -0
  212. package/dist/components/icons/git-fork.mjs +25 -0
  213. package/dist/components/icons/git-pull-request.d.mts +3 -0
  214. package/dist/components/icons/git-pull-request.mjs +20 -0
  215. package/dist/components/icons/globe.d.mts +3 -0
  216. package/dist/components/icons/globe.mjs +12 -0
  217. package/dist/components/icons/grid.d.mts +3 -0
  218. package/dist/components/icons/grid.mjs +37 -0
  219. package/dist/components/icons/grip-vertical.d.mts +3 -0
  220. package/dist/components/icons/grip-vertical.mjs +45 -0
  221. package/dist/components/icons/heart.d.mts +3 -0
  222. package/dist/components/icons/heart.mjs +8 -0
  223. package/dist/components/icons/history.d.mts +3 -0
  224. package/dist/components/icons/history.mjs +8 -0
  225. package/dist/components/icons/home.d.mts +3 -0
  226. package/dist/components/icons/home.mjs +8 -0
  227. package/dist/components/icons/image.d.mts +3 -0
  228. package/dist/components/icons/image.mjs +22 -0
  229. package/dist/components/icons/index.d.mts +107 -9
  230. package/dist/components/icons/index.mjs +107 -8
  231. package/dist/components/icons/info.d.mts +3 -0
  232. package/dist/components/icons/info.mjs +12 -0
  233. package/dist/components/icons/lightbulb.d.mts +3 -0
  234. package/dist/components/icons/lightbulb.mjs +8 -0
  235. package/dist/components/icons/line-icon.d.mts +3 -0
  236. package/dist/components/icons/line-icon.mjs +17 -0
  237. package/dist/components/icons/link.d.mts +3 -0
  238. package/dist/components/icons/link.mjs +11 -0
  239. package/dist/components/icons/list.d.mts +3 -0
  240. package/dist/components/icons/list.mjs +8 -0
  241. package/dist/components/icons/lock-open.d.mts +3 -0
  242. package/dist/components/icons/lock-open.mjs +14 -0
  243. package/dist/components/icons/lock.d.mts +3 -0
  244. package/dist/components/icons/lock.mjs +14 -0
  245. package/dist/components/icons/log-in.d.mts +3 -0
  246. package/dist/components/icons/log-in.mjs +8 -0
  247. package/dist/components/icons/log-out.d.mts +3 -0
  248. package/dist/components/icons/log-out.mjs +8 -0
  249. package/dist/components/icons/mail.d.mts +3 -0
  250. package/dist/components/icons/mail.mjs +14 -0
  251. package/dist/components/icons/map-pin.d.mts +3 -0
  252. package/dist/components/icons/map-pin.mjs +12 -0
  253. package/dist/components/icons/maximize.d.mts +3 -0
  254. package/dist/components/icons/maximize.mjs +8 -0
  255. package/dist/components/icons/menu.d.mts +3 -0
  256. package/dist/components/icons/menu.mjs +8 -0
  257. package/dist/components/icons/message-circle.d.mts +3 -0
  258. package/dist/components/icons/message-circle.mjs +8 -0
  259. package/dist/components/icons/minimize.d.mts +3 -0
  260. package/dist/components/icons/minimize.mjs +8 -0
  261. package/dist/components/icons/minus.d.mts +3 -0
  262. package/dist/components/icons/minus.mjs +8 -0
  263. package/dist/components/icons/monitor.d.mts +3 -0
  264. package/dist/components/icons/monitor.mjs +14 -0
  265. package/dist/components/icons/moon.d.mts +3 -0
  266. package/dist/components/icons/moon.mjs +8 -0
  267. package/dist/components/icons/package.d.mts +3 -0
  268. package/dist/components/icons/package.mjs +8 -0
  269. package/dist/components/icons/paint-bucket.d.mts +3 -0
  270. package/dist/components/icons/paint-bucket.mjs +8 -0
  271. package/dist/components/icons/palette.d.mts +3 -0
  272. package/dist/components/icons/palette.mjs +8 -0
  273. package/dist/components/icons/panel-left.d.mts +3 -0
  274. package/dist/components/icons/panel-left.mjs +14 -0
  275. package/dist/components/icons/paperclip.d.mts +3 -0
  276. package/dist/components/icons/paperclip.mjs +11 -0
  277. package/dist/components/icons/pause.d.mts +3 -0
  278. package/dist/components/icons/pause.mjs +20 -0
  279. package/dist/components/icons/pencil.d.mts +3 -0
  280. package/dist/components/icons/pencil.mjs +8 -0
  281. package/dist/components/icons/pin.d.mts +3 -0
  282. package/dist/components/icons/pin.mjs +11 -0
  283. package/dist/components/icons/play.d.mts +3 -0
  284. package/dist/components/icons/play.mjs +8 -0
  285. package/dist/components/icons/plus.d.mts +3 -0
  286. package/dist/components/icons/plus.mjs +8 -0
  287. package/dist/components/icons/presentation.d.mts +3 -0
  288. package/dist/components/icons/presentation.mjs +8 -0
  289. package/dist/components/icons/redo.d.mts +3 -0
  290. package/dist/components/icons/redo.mjs +8 -0
  291. package/dist/components/icons/refresh.d.mts +3 -0
  292. package/dist/components/icons/refresh.mjs +8 -0
  293. package/dist/components/icons/rocket.d.mts +3 -0
  294. package/dist/components/icons/rocket.mjs +19 -0
  295. package/dist/components/icons/rss.d.mts +3 -0
  296. package/dist/components/icons/rss.mjs +13 -0
  297. package/dist/components/icons/search.d.mts +3 -0
  298. package/dist/components/icons/search.mjs +12 -0
  299. package/dist/components/icons/send.d.mts +3 -0
  300. package/dist/components/icons/send.mjs +8 -0
  301. package/dist/components/icons/settings.d.mts +3 -0
  302. package/dist/components/icons/settings.mjs +12 -0
  303. package/dist/components/icons/share.d.mts +3 -0
  304. package/dist/components/icons/share.mjs +25 -0
  305. package/dist/components/icons/shield-check.d.mts +3 -0
  306. package/dist/components/icons/shield-check.mjs +8 -0
  307. package/dist/components/icons/smile.d.mts +3 -0
  308. package/dist/components/icons/smile.mjs +12 -0
  309. package/dist/components/icons/sparkles.d.mts +3 -0
  310. package/dist/components/icons/sparkles.mjs +8 -0
  311. package/dist/components/icons/square.d.mts +3 -0
  312. package/dist/components/icons/square.mjs +14 -0
  313. package/dist/components/icons/squircle.d.mts +3 -0
  314. package/dist/components/icons/squircle.mjs +8 -0
  315. package/dist/components/icons/star.d.mts +3 -0
  316. package/dist/components/icons/star.mjs +8 -0
  317. package/dist/components/icons/sun.d.mts +3 -0
  318. package/dist/components/icons/sun.mjs +12 -0
  319. package/dist/components/icons/table.d.mts +3 -0
  320. package/dist/components/icons/table.mjs +14 -0
  321. package/dist/components/icons/tag.d.mts +3 -0
  322. package/dist/components/icons/tag.mjs +8 -0
  323. package/dist/components/icons/text-horizontal.d.mts +3 -0
  324. package/dist/components/icons/text-horizontal.mjs +8 -0
  325. package/dist/components/icons/text-vertical.d.mts +3 -0
  326. package/dist/components/icons/text-vertical.mjs +8 -0
  327. package/dist/components/icons/thumbs-down.d.mts +3 -0
  328. package/dist/components/icons/thumbs-down.mjs +8 -0
  329. package/dist/components/icons/thumbs-up.d.mts +3 -0
  330. package/dist/components/icons/thumbs-up.mjs +8 -0
  331. package/dist/components/icons/trash.d.mts +3 -0
  332. package/dist/components/icons/trash.mjs +8 -0
  333. package/dist/components/icons/triangle-alert.d.mts +3 -0
  334. package/dist/components/icons/triangle-alert.mjs +8 -0
  335. package/dist/components/icons/undo.d.mts +3 -0
  336. package/dist/components/icons/undo.mjs +8 -0
  337. package/dist/components/icons/upload.d.mts +3 -0
  338. package/dist/components/icons/upload.mjs +8 -0
  339. package/dist/components/icons/user.d.mts +3 -0
  340. package/dist/components/icons/user.mjs +12 -0
  341. package/dist/components/icons/users.d.mts +3 -0
  342. package/dist/components/icons/users.mjs +12 -0
  343. package/dist/components/icons/x.d.mts +3 -0
  344. package/dist/components/icons/x.mjs +8 -0
  345. package/dist/components/index.d.mts +58 -76
  346. package/dist/components/index.mjs +13 -27
  347. package/dist/components/layout/resizable-panels/resizable-panels.mjs +3 -3
  348. package/dist/components/navigation/anchor/anchor.css +3 -3
  349. package/dist/components/navigation/anchor/anchor.mjs +20 -7
  350. package/dist/components/navigation/anchor/anchor.module.mjs +1 -1
  351. package/dist/components/navigation/breadcrumb/breadcrumb.d.mts +6 -4
  352. package/dist/components/navigation/breadcrumb/breadcrumb.mjs +3 -2
  353. package/dist/components/navigation/pagination/pagination.d.mts +2 -2
  354. package/dist/components/navigation/pagination/pagination.mjs +3 -3
  355. package/dist/components/navigation/side-nav/side-nav.mjs +1 -1
  356. package/dist/components/navigation/stepper/stepper.mjs +3 -3
  357. package/dist/components/navigation/tabs/index.d.mts +10 -5
  358. package/dist/components/navigation/tabs/tabs.d.mts +11 -6
  359. package/dist/components/navigation/tabs/tabs.mjs +24 -27
  360. package/dist/components/overlays/_internal/modal-header.css +38 -0
  361. package/dist/components/overlays/_internal/modal-header.d.mts +7 -0
  362. package/dist/components/overlays/_internal/modal-header.mjs +32 -0
  363. package/dist/components/overlays/_internal/modal-header.module.mjs +10 -0
  364. package/dist/components/overlays/command-palette/command-palette.d.mts +2 -2
  365. package/dist/components/overlays/command-palette/command-palette.mjs +9 -8
  366. package/dist/components/overlays/context-menu/context-menu.mjs +3 -3
  367. package/dist/components/overlays/context-menu/index.d.mts +27 -2
  368. package/dist/components/overlays/dialog/dialog.css +3 -21
  369. package/dist/components/overlays/dialog/dialog.d.mts +20 -9
  370. package/dist/components/overlays/dialog/dialog.mjs +35 -73
  371. package/dist/components/overlays/dialog/dialog.module.mjs +1 -3
  372. package/dist/components/overlays/dialog/index.d.mts +2 -15
  373. package/dist/components/overlays/dialog/index.mjs +1 -8
  374. package/dist/components/overlays/drawer/drawer.css +4 -26
  375. package/dist/components/overlays/drawer/drawer.d.mts +7 -2
  376. package/dist/components/overlays/drawer/drawer.mjs +24 -37
  377. package/dist/components/overlays/drawer/drawer.module.mjs +2 -6
  378. package/dist/components/overlays/dropdown-menu/dropdown-menu.d.mts +35 -5
  379. package/dist/components/overlays/dropdown-menu/dropdown-menu.mjs +30 -12
  380. package/dist/components/overlays/dropdown-menu/hooks.d.mts +1 -1
  381. package/dist/components/overlays/dropdown-menu/hooks.mjs +1 -1
  382. package/dist/components/overlays/dropdown-menu/index.d.mts +34 -4
  383. package/dist/components/overlays/dropdown-menu/shared.css +1 -0
  384. package/dist/components/overlays/dropdown-menu/sub-menu.mjs +4 -4
  385. package/dist/components/overlays/list-box/hooks.mjs +2 -2
  386. package/dist/components/overlays/list-box/index.d.mts +2 -25
  387. package/dist/components/overlays/list-box/index.mjs +1 -9
  388. package/dist/components/overlays/list-box/list-box.d.mts +11 -16
  389. package/dist/components/overlays/list-box/list-box.mjs +24 -16
  390. package/dist/components/overlays/modal/modal.d.mts +8 -7
  391. package/dist/components/overlays/modal/modal.mjs +23 -32
  392. package/dist/components/overlays/popover/anchor-positioning.d.mts +3 -16
  393. package/dist/components/overlays/popover/anchor-positioning.mjs +14 -6
  394. package/dist/components/overlays/popover/hooks.d.mts +0 -2
  395. package/dist/components/overlays/popover/hooks.mjs +0 -2
  396. package/dist/components/overlays/popover/index.d.mts +19 -2
  397. package/dist/components/overlays/popover/index.mjs +7 -2
  398. package/dist/components/overlays/popover/popover.css +6 -0
  399. package/dist/components/overlays/popover/popover.d.mts +15 -2
  400. package/dist/components/overlays/popover/popover.mjs +28 -13
  401. package/dist/components/overlays/popover/popover.module.mjs +2 -1
  402. package/dist/components/overlays/tooltip/bridge.css +1 -1
  403. package/dist/components/overlays/tooltip/tooltip.mjs +5 -5
  404. package/dist/helpers/index.mjs +1 -1
  405. package/dist/i18n/en.mjs +1 -2
  406. package/dist/i18n/index.d.mts +3 -4
  407. package/dist/i18n/index.mjs +1 -2
  408. package/dist/i18n/ja.mjs +1 -2
  409. package/dist/i18n/messages.d.mts +2 -4
  410. package/dist/i18n/usage.d.mts +2 -1
  411. package/dist/i18n/usage.mjs +3 -3
  412. package/dist/index.d.mts +30 -45
  413. package/dist/index.mjs +4 -18
  414. package/dist/internal/iso-date.mjs +1 -1
  415. package/dist/styles/index.css +79 -231
  416. package/dist/styles/tailwind.css +1 -4
  417. package/dist/styles/tokens.css +281 -0
  418. package/dist/styles/tokens.d.mts +1 -1
  419. package/dist/styles/tokens.mjs +1 -1
  420. package/dist/types/index.d.mts +2 -2
  421. package/dist/types/variables.d.mts +4 -2
  422. package/docs/GUIDE.md +145 -69
  423. package/docs/llms.txt +38 -11
  424. package/docs/props.generated.json +1414 -645
  425. package/docs/references/ai-chat.md +94 -44
  426. package/docs/references/color.md +15 -15
  427. package/docs/references/components.md +636 -504
  428. package/docs/references/generative-ui.md +378 -187
  429. package/docs/references/interaction-design.md +6 -5
  430. package/docs/references/spatial-design.md +8 -8
  431. package/docs/references/types.md +22 -25
  432. package/package.json +43 -73
  433. package/dist/components/ai/_internal/icons.d.mts +0 -6
  434. package/dist/components/ai/_internal/icons.mjs +0 -13
  435. package/dist/components/form/date-field/date-field.css +0 -31
  436. package/dist/components/form/date-field/date-field.d.mts +0 -7
  437. package/dist/components/form/date-field/date-field.mjs +0 -19
  438. package/dist/components/form/date-field/date-field.module.mjs +0 -4
  439. package/dist/components/form/date-field/index.d.mts +0 -2
  440. package/dist/components/form/date-field/index.mjs +0 -1
  441. package/dist/components/icons/browsers.d.mts +0 -6
  442. package/dist/components/icons/browsers.mjs +0 -890
  443. package/dist/components/icons/github-mark.mjs +0 -18
  444. package/dist/components/icons/logo.css +0 -17
  445. package/dist/components/icons/logo.d.mts +0 -4
  446. package/dist/components/icons/logo.mjs +0 -29
  447. package/dist/components/icons/logo.module.mjs +0 -8
  448. package/dist/components/icons/lucide-imports.d.mts +0 -67
  449. package/dist/components/icons/lucide-imports.mjs +0 -67
  450. package/dist/components/icons/lucide.d.mts +0 -67
  451. package/dist/components/icons/lucide.mjs +0 -255
  452. package/dist/components/icons/qiita.mjs +0 -27
  453. package/dist/components/icons/twitter.css +0 -9
  454. package/dist/components/icons/twitter.mjs +0 -20
  455. package/dist/components/icons/twitter.module.mjs +0 -4
  456. package/dist/components/icons/vertical-writing.mjs +0 -25
  457. package/dist/components/observers/in-view/index.d.mts +0 -2
  458. package/dist/components/observers/in-view/index.mjs +0 -1
  459. package/dist/components/observers/resize/index.d.mts +0 -2
  460. package/dist/components/observers/resize/index.mjs +0 -1
  461. package/dist/components/overlays/_internal/modal-dialog-context.d.mts +0 -11
  462. package/dist/components/overlays/_internal/modal-dialog-context.mjs +0 -12
  463. package/dist/components/providers/index.d.mts +0 -3
  464. package/dist/components/providers/index.mjs +0 -3
  465. package/dist/components/providers/portal-root.d.mts +0 -8
  466. package/dist/components/providers/portal-root.mjs +0 -11
  467. package/dist/components/providers/ui-provider.d.mts +0 -2
  468. package/dist/components/providers/ui-provider.mjs +0 -6
  469. package/dist/integrations/_shared/openui-defs.d.mts +0 -15
  470. package/dist/integrations/_shared/openui-defs.mjs +0 -230
  471. package/dist/integrations/_shared/renderers.css +0 -50
  472. package/dist/integrations/_shared/renderers.d.mts +0 -88
  473. package/dist/integrations/_shared/renderers.mjs +0 -936
  474. package/dist/integrations/_shared/renderers.module.mjs +0 -13
  475. package/dist/integrations/ai-sdk/index.d.mts +0 -3
  476. package/dist/integrations/ai-sdk/index.mjs +0 -1
  477. package/dist/integrations/ai-sdk/map-parts.d.mts +0 -44
  478. package/dist/integrations/ai-sdk/map-parts.mjs +0 -56
  479. package/dist/integrations/json-render/catalog.d.mts +0 -1155
  480. package/dist/integrations/json-render/catalog.mjs +0 -373
  481. package/dist/integrations/json-render/registry.d.mts +0 -26
  482. package/dist/integrations/json-render/registry.mjs +0 -192
  483. package/dist/integrations/openui/form-views.d.mts +0 -24
  484. package/dist/integrations/openui/form-views.mjs +0 -89
  485. package/dist/integrations/openui/library.d.mts +0 -202
  486. package/dist/integrations/openui/library.mjs +0 -83
  487. package/dist/integrations/openui/prompt.d.mts +0 -2
  488. package/dist/integrations/openui/prompt.mjs +0 -18
  489. /package/dist/components/{observers → _internal}/fragment-instance.d.mts +0 -0
  490. /package/dist/components/{observers/in-view → _internal}/in-view.d.mts +0 -0
  491. /package/dist/components/{observers/resize → _internal}/resize.d.mts +0 -0
@@ -0,0 +1,25 @@
1
+ @layer properties, theme, base;
2
+
3
+ @layer components {
4
+ .txpnMG_field {
5
+ flex-direction: column;
6
+ display: inline-flex;
7
+ }
8
+
9
+ .txpnMG_message {
10
+ margin-top: calc(var(--spacing) * 1);
11
+ padding-left: calc(var(--spacing) * .5);
12
+ font-size: var(--font-size-sm);
13
+ line-height: var(--line-height-sm);
14
+ }
15
+
16
+ .txpnMG_error {
17
+ color: var(--color-fg-error);
18
+ }
19
+
20
+ .txpnMG_help {
21
+ color: var(--color-fg-mute);
22
+ }
23
+ }
24
+
25
+ @layer utilities;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ type Props = {
3
+ id: string;
4
+ errorText: string | undefined;
5
+ helpText: string | undefined;
6
+ };
7
+ export declare const hasErrorText: (errorText: string | undefined) => boolean;
8
+ export declare const describedByWith: (own: string | undefined, message: Props) => string | undefined;
9
+ export declare const FieldMessage: FC<Props>;
10
+ export {};
@@ -0,0 +1,22 @@
1
+ import field_message_module_default from "./field-message.module.mjs";
2
+ import { clsx } from "clsx";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/components/_internal/field-message.tsx
5
+ const filled = (text) => text !== void 0 && text !== "";
6
+ const hasErrorText = (errorText) => filled(errorText);
7
+ const messageIdOf = ({ id, errorText, helpText }) => filled(errorText) ? `${id}-feedback` : filled(helpText) ? `${id}-helptext` : void 0;
8
+ const describedByWith = (own, message) => {
9
+ const ids = [own, messageIdOf(message)].filter(filled);
10
+ return ids.length === 0 ? void 0 : ids.join(" ");
11
+ };
12
+ const FieldMessage = ({ id, errorText, helpText }) => filled(errorText) ? /* @__PURE__ */ jsx("span", {
13
+ "aria-live": "polite",
14
+ className: clsx(field_message_module_default.message, field_message_module_default.error),
15
+ id: `${id}-feedback`,
16
+ children: errorText
17
+ }) : filled(helpText) ? /* @__PURE__ */ jsx("span", {
18
+ className: clsx(field_message_module_default.message, field_message_module_default.help),
19
+ id: `${id}-helptext`,
20
+ children: helpText
21
+ }) : null;
22
+ export { FieldMessage, describedByWith, hasErrorText };
@@ -0,0 +1,9 @@
1
+ import './field-message.css';
2
+ // src/components/_internal/field-message.module.css
3
+ var field_message_module_default = {
4
+ "error": "txpnMG_error",
5
+ "field": "txpnMG_field",
6
+ "help": "txpnMG_help",
7
+ "message": "txpnMG_message"
8
+ };
9
+ export { field_message_module_default as default };
@@ -1,7 +1,7 @@
1
1
  @layer properties, theme, base;
2
2
 
3
3
  @layer components {
4
- .XbmKcG_ring:focus-visible {
4
+ .XbmKcG_ring:focus-visible, .XbmKcG_ring:where([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]):focus {
5
5
  box-shadow: var(--shadow-ring-info);
6
6
  outline-style: none;
7
7
 
@@ -11,6 +11,7 @@
11
11
  outline-offset: -1px;
12
12
  outline-width: 1px;
13
13
  outline-style: solid;
14
+ outline-color: var(--color-system-canvas-text);
14
15
  }
15
16
  }
16
17
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { Fragment, useEffect, useEffectEvent, useRef, useState } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
- // src/components/observers/in-view/in-view.tsx
4
+ // src/components/_internal/in-view.tsx
5
5
  const InView = ({ children, onChange, root = null, rootMargin = "0px", threshold = 0, once = false }) => {
6
6
  const [instance, setInstance] = useState(null);
7
7
  const handleChange = useEffectEvent(onChange);
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { Fragment, useEffect, useEffectEvent, useState } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
- // src/components/observers/resize/resize.tsx
4
+ // src/components/_internal/resize.tsx
5
5
  const Resize = ({ children, onChange }) => {
6
6
  const [instance, setInstance] = useState(null);
7
7
  const handleChange = useEffectEvent(onChange);
@@ -1,7 +1,7 @@
1
1
  import { getMessages } from "../../../i18n/current.mjs";
2
- import { CloseIcon } from "../../icons/lucide.mjs";
3
2
  import { IconButton } from "../../buttons/icon-button/icon-button.mjs";
4
- import { FileIcon } from "./icons.mjs";
3
+ import { FileIcon } from "../../icons/file.mjs";
4
+ import { XIcon } from "../../icons/x.mjs";
5
5
  import attachment_preview_module_default from "./attachment-preview.module.mjs";
6
6
  import { useId } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -41,7 +41,7 @@ const AttachmentPreview = ({ mediaType, filename, renderImage, onRemove }) => {
41
41
  label: messages.attachmentRemove,
42
42
  onClick: onRemove,
43
43
  size: "sm",
44
- children: /* @__PURE__ */ jsx(CloseIcon, { size: "xs" })
44
+ children: /* @__PURE__ */ jsx(XIcon, { size: "xs" })
45
45
  })
46
46
  })]
47
47
  });
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
3
- import { ChevronIcon } from "../../icons/lucide.mjs";
4
2
  import { useControllableState } from "../../../hooks/controllable-state/index.mjs";
3
+ import { ChevronIcon } from "../../icons/chevron.mjs";
4
+ import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
5
5
  import collapsible_module_default from "./collapsible.module.mjs";
6
6
  import { clsx } from "clsx";
7
7
  import { useId } from "react";
@@ -7,7 +7,7 @@ export declare const List: FC<ListProps>;
7
7
  type ItemProps = {
8
8
  url: string;
9
9
  mediaType: string;
10
- filename?: string;
10
+ filename?: string | undefined;
11
11
  };
12
12
  export declare const Item: FC<ItemProps>;
13
13
  export {};
@@ -6,6 +6,6 @@ export declare const Attachment: {
6
6
  readonly Item: import("react").FC<{
7
7
  url: string;
8
8
  mediaType: string;
9
- filename?: string;
9
+ filename?: string | undefined;
10
10
  }>;
11
11
  };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
+ import { createSafeContext } from "../../../helpers/create-safe-context.mjs";
2
3
  import { getMessages } from "../../../i18n/current.mjs";
4
+ import { InView } from "../../_internal/in-view.mjs";
5
+ import { Resize } from "../../_internal/resize.mjs";
6
+ import { ChevronIcon } from "../../icons/chevron.mjs";
3
7
  import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
4
- import { ChevronIcon } from "../../icons/lucide.mjs";
5
- import { createSafeContext } from "../../../helpers/create-safe-context.mjs";
6
- import { InView } from "../../observers/in-view/in-view.mjs";
7
- import { Resize } from "../../observers/resize/resize.mjs";
8
8
  import conversation_module_default from "./conversation.module.mjs";
9
9
  import { clsx } from "clsx";
10
10
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -6,7 +6,7 @@ import { Reasoning } from "./reasoning/reasoning.mjs";
6
6
  import "./reasoning/index.mjs";
7
7
  import { Source } from "./source/index.mjs";
8
8
  import { Suggestion } from "./suggestion/index.mjs";
9
- import { ChatStatus, MessageFeedback, ToolApproval, ToolApprovalResponse, ToolState } from "./types.mjs";
10
- import { ToolInvocation } from "./tool-invocation/tool-invocation.mjs";
11
9
  import "./tool-invocation/index.mjs";
10
+ import { ToolInvocation } from "./tool-invocation/tool-invocation.mjs";
11
+ import { ChatStatus, MessageFeedback, ToolApproval, ToolApprovalResponse, ToolState } from "./types.mjs";
12
12
  export { Attachment, type ChatStatus, Conversation, Message, type MessageFeedback, PromptInput, Reasoning, Source, Suggestion, type ToolApproval, type ToolApprovalResponse, ToolInvocation, type ToolState };
@@ -16,7 +16,7 @@ export declare const Message: {
16
16
  }>;
17
17
  readonly Action: import("react").FC<{
18
18
  label: string;
19
- onAction?: () => void | Promise<void>;
19
+ action?: () => void | Promise<void>;
20
20
  disabled?: boolean;
21
21
  children: import("react").ReactNode;
22
22
  }>;
@@ -25,7 +25,7 @@ export declare const Message: {
25
25
  label?: string;
26
26
  }>;
27
27
  readonly Regenerate: import("react").FC<{
28
- onAction: () => void | Promise<void>;
28
+ action: () => void | Promise<void>;
29
29
  label?: string;
30
30
  disabled?: boolean;
31
31
  }>;
@@ -19,7 +19,7 @@ type ActionsProps = {
19
19
  export declare const Actions: FC<ActionsProps>;
20
20
  type ActionProps = {
21
21
  label: string;
22
- onAction?: () => void | Promise<void>;
22
+ action?: () => void | Promise<void>;
23
23
  disabled?: boolean;
24
24
  children: ReactNode;
25
25
  };
@@ -30,7 +30,7 @@ type CopyProps = {
30
30
  };
31
31
  export declare const Copy: FC<CopyProps>;
32
32
  type RegenerateProps = {
33
- onAction: () => void | Promise<void>;
33
+ action: () => void | Promise<void>;
34
34
  label?: string;
35
35
  disabled?: boolean;
36
36
  };
@@ -1,12 +1,14 @@
1
1
  "use client";
2
- import { getMessages } from "../../../i18n/current.mjs";
3
- import { BadIcon, GoodIcon, RefreshIcon } from "../../icons/lucide.mjs";
4
2
  import { createSafeContext } from "../../../helpers/create-safe-context.mjs";
5
3
  import { useControllableState } from "../../../hooks/controllable-state/index.mjs";
6
- import { IconButton } from "../../buttons/icon-button/icon-button.mjs";
4
+ import { getMessages } from "../../../i18n/current.mjs";
7
5
  import { CopyButton } from "../../buttons/copy-button/copy-button.mjs";
8
- import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
6
+ import { IconButton } from "../../buttons/icon-button/icon-button.mjs";
7
+ import { RefreshIcon } from "../../icons/refresh.mjs";
8
+ import { ThumbsDownIcon } from "../../icons/thumbs-down.mjs";
9
+ import { ThumbsUpIcon } from "../../icons/thumbs-up.mjs";
9
10
  import { StreamingCursor } from "../_internal/streaming-cursor.mjs";
11
+ import high_contrast_module_default from "../../_internal/high-contrast.module.mjs";
10
12
  import message_module_default from "./message.module.mjs";
11
13
  import { clsx } from "clsx";
12
14
  import { useMemo } from "react";
@@ -58,10 +60,10 @@ const Actions = ({ label, children }) => {
58
60
  children
59
61
  });
60
62
  };
61
- const Action = ({ label, onAction, disabled, children }) => /* @__PURE__ */ jsx(IconButton, {
63
+ const Action = ({ label, action, disabled, children }) => /* @__PURE__ */ jsx(IconButton, {
64
+ action,
62
65
  disabled,
63
66
  label,
64
- onAction,
65
67
  size: "sm",
66
68
  children
67
69
  });
@@ -71,12 +73,12 @@ const Copy = ({ value, label }) => /* @__PURE__ */ jsx(CopyButton, {
71
73
  size: "sm",
72
74
  value
73
75
  });
74
- const Regenerate = ({ onAction, label, disabled }) => {
76
+ const Regenerate = ({ action, label, disabled }) => {
75
77
  const messages = getMessages();
76
78
  return /* @__PURE__ */ jsx(Action, {
79
+ action,
77
80
  disabled,
78
81
  label: label ?? messages.regenerate,
79
- onAction,
80
82
  children: /* @__PURE__ */ jsx(RefreshIcon, { size: "sm" })
81
83
  });
82
84
  };
@@ -92,7 +94,7 @@ const Feedback = ({ value, defaultValue = null, onChange }) => {
92
94
  };
93
95
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(IconButton, {
94
96
  "aria-pressed": feedback === "positive",
95
- color: feedback === "positive" ? "primary" : "transparent",
97
+ variant: feedback === "positive" ? "solid" : "skeleton",
96
98
  label: messages.feedbackPositive,
97
99
  onClick: () => {
98
100
  toggle("positive");
@@ -100,11 +102,11 @@ const Feedback = ({ value, defaultValue = null, onChange }) => {
100
102
  size: "sm",
101
103
  children: /* @__PURE__ */ jsx("span", {
102
104
  className: clsx(feedback === "positive" && message_module_default.selected),
103
- children: /* @__PURE__ */ jsx(GoodIcon, { size: "sm" })
105
+ children: /* @__PURE__ */ jsx(ThumbsUpIcon, { size: "sm" })
104
106
  })
105
107
  }), /* @__PURE__ */ jsx(IconButton, {
106
108
  "aria-pressed": feedback === "negative",
107
- color: feedback === "negative" ? "primary" : "transparent",
109
+ variant: feedback === "negative" ? "solid" : "skeleton",
108
110
  label: messages.feedbackNegative,
109
111
  onClick: () => {
110
112
  toggle("negative");
@@ -112,7 +114,7 @@ const Feedback = ({ value, defaultValue = null, onChange }) => {
112
114
  size: "sm",
113
115
  children: /* @__PURE__ */ jsx("span", {
114
116
  className: clsx(feedback === "negative" && message_module_default.selected),
115
- children: /* @__PURE__ */ jsx(BadIcon, { size: "sm" })
117
+ children: /* @__PURE__ */ jsx(ThumbsDownIcon, { size: "sm" })
116
118
  })
117
119
  })] });
118
120
  };
@@ -1,15 +1,15 @@
1
1
  "use client";
2
- import { getMessages } from "../../../i18n/current.mjs";
3
- import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
4
- import { SendIcon } from "../../icons/lucide.mjs";
5
2
  import { createSafeContext } from "../../../helpers/create-safe-context.mjs";
6
3
  import { useControllableState } from "../../../hooks/controllable-state/index.mjs";
4
+ import { getMessages } from "../../../i18n/current.mjs";
7
5
  import { acceptsFile } from "../../../internal/accepts-file.mjs";
8
6
  import { carriesFiles } from "../../../internal/carries-files.mjs";
9
7
  import { droppedFiles } from "../../../internal/dropped-files.mjs";
10
- import { AttachIcon } from "../_internal/icons.mjs";
8
+ import { PaperclipIcon } from "../../icons/paperclip.mjs";
9
+ import { SendIcon } from "../../icons/send.mjs";
11
10
  import { AttachmentPreview, isImageMediaType } from "../_internal/attachment-preview.mjs";
12
11
  import { List } from "../attachment/attachment.mjs";
12
+ import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
13
13
  import prompt_input_module_default from "./prompt-input.module.mjs";
14
14
  import { clsx } from "clsx";
15
15
  import { useCallback, useMemo, useRef, useState } from "react";
@@ -190,7 +190,7 @@ const Attach = ({ label }) => {
190
190
  inputRef.current?.click();
191
191
  },
192
192
  type: "button",
193
- children: /* @__PURE__ */ jsx(AttachIcon, { size: "sm" })
193
+ children: /* @__PURE__ */ jsx(PaperclipIcon, { size: "sm" })
194
194
  })] });
195
195
  };
196
196
  const Submit = ({ sendLabel, stopLabel }) => {
@@ -1,5 +1,5 @@
1
1
  import { getMessages } from "../../../i18n/current.mjs";
2
- import { SparklesIcon } from "../../icons/lucide.mjs";
2
+ import { SparklesIcon } from "../../icons/sparkles.mjs";
3
3
  import { Collapsible } from "../_internal/collapsible.mjs";
4
4
  import reasoning_module_default from "./reasoning.module.mjs";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -4,7 +4,7 @@ export declare const Source: {
4
4
  children: import("react").ReactNode;
5
5
  }>;
6
6
  readonly Item: import("react").FC<{
7
- href?: string;
8
- title?: string;
7
+ href?: string | undefined;
8
+ title?: string | undefined;
9
9
  }>;
10
10
  };
@@ -5,8 +5,8 @@ type ListProps = {
5
5
  };
6
6
  export declare const List: FC<ListProps>;
7
7
  type ItemProps = {
8
- href?: string;
9
- title?: string;
8
+ href?: string | undefined;
9
+ title?: string | undefined;
10
10
  };
11
11
  export declare const Item: FC<ItemProps>;
12
12
  export {};
@@ -1,7 +1,7 @@
1
1
  import { getMessages } from "../../../i18n/current.mjs";
2
+ import { ExternalLinkIcon } from "../../icons/external-link.mjs";
3
+ import { FileIcon } from "../../icons/file.mjs";
2
4
  import focus_ring_module_default from "../../_internal/focus-ring.module.mjs";
3
- import { ExternalLinkIcon } from "../../icons/lucide.mjs";
4
- import { FileIcon } from "../_internal/icons.mjs";
5
5
  import source_module_default from "./source.module.mjs";
6
6
  import { clsx } from "clsx";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -2,25 +2,20 @@
2
2
  import { getMessages } from "../../../i18n/current.mjs";
3
3
  import { Button } from "../../buttons/button/button.mjs";
4
4
  import approval_bar_module_default from "./approval-bar.module.mjs";
5
- import { useCallback, useTransition } from "react";
5
+ import { useCallback, useOptimistic } from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  // src/components/ai/tool-invocation/approval-bar.tsx
8
- const renderFocusable = ({ disabled: _disabled, ...props }) => /* @__PURE__ */ jsx("button", {
9
- ...props,
10
- type: "button"
11
- });
12
8
  const ApprovalBar = ({ approval, nameId, triggerId, onApprovalResponse }) => {
13
9
  const messages = getMessages();
14
- const [isResponding, startTransition] = useTransition();
10
+ const [answering, setAnswering] = useOptimistic(void 0);
15
11
  const keepFocusOnAnswer = useCallback((group) => () => {
16
12
  if (group.contains(document.activeElement)) document.querySelector(`#${CSS.escape(triggerId)}`)?.focus();
17
13
  }, [triggerId]);
18
- const respond = (approved) => {
19
- startTransition(async () => {
20
- await onApprovalResponse?.({
21
- id: approval.id,
22
- approved
23
- });
14
+ const respond = (approved) => async () => {
15
+ setAnswering(approved);
16
+ await onApprovalResponse?.({
17
+ id: approval.id,
18
+ approved
24
19
  });
25
20
  };
26
21
  return /* @__PURE__ */ jsxs("div", {
@@ -34,21 +29,15 @@ const ApprovalBar = ({ approval, nameId, triggerId, onApprovalResponse }) => {
34
29
  }), onApprovalResponse !== void 0 && /* @__PURE__ */ jsxs("div", {
35
30
  className: approval_bar_module_default.buttons,
36
31
  children: [/* @__PURE__ */ jsx(Button, {
32
+ action: respond(false),
37
33
  color: "base",
38
- disabled: isResponding,
39
- onClick: () => {
40
- respond(false);
41
- },
42
- renderItem: renderFocusable,
34
+ disabled: answering === true,
43
35
  size: "sm",
44
36
  variant: "outline",
45
37
  children: messages.toolDeny
46
38
  }), /* @__PURE__ */ jsx(Button, {
47
- disabled: isResponding,
48
- onClick: () => {
49
- respond(true);
50
- },
51
- renderItem: renderFocusable,
39
+ action: respond(true),
40
+ disabled: answering === false,
52
41
  size: "sm",
53
42
  children: messages.toolApprove
54
43
  })]
@@ -5,8 +5,8 @@ type Props = {
5
5
  state: ToolState;
6
6
  input?: unknown;
7
7
  output?: ReactNode;
8
- errorText?: string;
9
- approval?: ToolApproval;
8
+ errorText?: string | undefined;
9
+ approval?: ToolApproval | undefined;
10
10
  onApprovalResponse?: (response: ToolApprovalResponse) => void | PromiseLike<void>;
11
11
  isOpen?: boolean;
12
12
  defaultOpen?: boolean;
@@ -1,6 +1,7 @@
1
1
  import { getMessages } from "../../../i18n/current.mjs";
2
2
  import { Spinner } from "../../feedback/spinner/spinner.mjs";
3
- import { AlertIcon, CheckIcon } from "../../icons/lucide.mjs";
3
+ import { AlertIcon } from "../../icons/alert.mjs";
4
+ import { CheckIcon } from "../../icons/check.mjs";
4
5
  import { Collapsible } from "../_internal/collapsible.mjs";
5
6
  import { ApprovalBar } from "./approval-bar.mjs";
6
7
  import tool_invocation_module_default from "./tool-invocation.module.mjs";
@@ -145,7 +145,7 @@
145
145
  justify-content: space-between;
146
146
  }
147
147
 
148
- ._8QHOaq_active {
148
+ ._8QHOaq_skeleton:where([aria-pressed="true"], [aria-current]:not([aria-current="false"])) {
149
149
  color: var(--color-fg-info);
150
150
  }
151
151
 
@@ -1,49 +1,46 @@
1
- import { ButtonHTMLAttributes, ComponentPropsWithRef, FC, MouseEventHandler, ReactNode, RefCallback } from "react";
2
- /**
3
- * `renderItem` が受け取る props。既定の `<button>` に渡すものと同じ
4
- * オブジェクトで、`<button>` にはそのまま展開できる。`<a>` など別の要素を
5
- * 描画するときは `<button>` 専用の `disabled` / `type` を分割代入で外してから
6
- * 残りを展開する。無効状態は同梱の `aria-disabled` で表現でき、
7
- * `onClick` は無効なら何もしないので `<a>` でも遷移しない。
8
- *
9
- * `disabled` が表すのは利用者が渡した `disabled` だけ。`onAction` の保留中と、
10
- * `type="submit"` で属するフォームの送信が保留中のあいだは、`aria-disabled` と
11
- * `aria-busy` が立っても `disabled` は `false` のままで、押された要素はフォーカスを
12
- * 保つ。その間に押されても `onClick` が何もしない。
13
- *
14
- * ハンドラの要素型を `HTMLButtonElement` ではなく `HTMLElement` にしているのは、
15
- * `ClipboardEventHandler<HTMLButtonElement>` のような兄弟型が `<a>` の同名 props
16
- * に代入できず、束ごと展開できなくなるため。
17
- */
18
- export type ButtonRenderItemProps = Omit<ButtonHTMLAttributes<HTMLElement>, 'aria-busy' | 'aria-disabled' | 'children' | 'className' | 'disabled' | 'onClick' | 'style' | 'type'> & {
19
- ref: RefCallback<HTMLElement> | undefined;
1
+ import { ComponentPropsWithRef, MouseEventHandler, ReactNode } from "react";
2
+ type AnchorAttributes = Omit<ComponentPropsWithRef<'a'>, 'aria-disabled' | 'children' | 'className' | 'href' | 'style' | 'type'>;
3
+ type RenderAnchorProps<T extends string> = {
4
+ href: NoInfer<T>;
20
5
  className: string;
21
6
  children: ReactNode;
22
- type: 'button' | 'submit';
23
- disabled: boolean;
24
- 'aria-busy': true | undefined;
7
+ onClick: MouseEventHandler<HTMLAnchorElement> | undefined;
25
8
  'aria-disabled': true | undefined;
26
- onClick: MouseEventHandler<HTMLElement> | undefined;
27
- };
28
- type Props = {
29
- type?: 'button' | 'submit';
9
+ } & Omit<AnchorAttributes, 'onClick'>;
10
+ type Look = {
30
11
  size?: 'sm' | 'md' | 'lg';
31
12
  color?: 'primary' | 'secondary' | 'base';
32
13
  variant?: 'solid' | 'outline' | 'skeleton';
33
14
  fullWidth?: boolean;
34
- isActive?: boolean;
35
15
  startIcon?: ReactNode;
36
16
  endIcon?: ReactNode;
17
+ children?: ReactNode;
18
+ disabled?: boolean;
19
+ };
20
+ type ButtonProps = Look & {
21
+ href?: undefined;
22
+ type?: 'button' | 'submit' | 'reset';
37
23
  /**
38
- * クリック時の処理。`onAction` は非同期処理を `useTransition` で包み、保留中は
39
- * 自動でスピナーを表示する糖衣。保留中は押しても何もしないが、ボタンは
40
- * フォーカスを持ったままでいる。素のクリックイベント(`event` が必要、
41
- * `preventDefault` したい等)は `onClick` を使う。両者は併用可能で、
42
- * `onClick` → `onAction` の順に実行される(`onClick` が `preventDefault`
43
- * した場合は `onAction` をスキップ)。
24
+ * 押したときに transition の中で走らせる処理。返した Promise が解決するまで
25
+ * スピナーを出し、`aria-busy` と `aria-disabled` を立て、押されても何もしない。
26
+ * ボタンはフォーカスを持ったままでいる。続けて押す同期の更新や、イベントが
27
+ * 要る処理は `onClick` に書く。両方あれば `onClick` → `action` の順に呼び、
28
+ * `onClick` が `preventDefault` したら `action` は呼ばない。
44
29
  */
45
- onAction?: () => void | Promise<void>;
46
- renderItem?: (props: ButtonRenderItemProps) => ReactNode;
47
- } & Omit<ComponentPropsWithRef<'button'>, 'type' | 'className' | 'style'>;
48
- export declare const Button: FC<Props>;
30
+ action?: () => void | Promise<void>;
31
+ renderAnchor?: never;
32
+ } & Omit<ComponentPropsWithRef<'button'>, 'children' | 'className' | 'disabled' | 'style' | 'type'>;
33
+ type LinkProps<T extends string> = Look & {
34
+ /** あれば `<button>` の代わりに `<a>` を描く。 */
35
+ href: T;
36
+ type?: never;
37
+ action?: never;
38
+ /** `<a>` の代わりに描く要素。Next.js の `Link` などに受け取った props を展開する。 */
39
+ renderAnchor?: (props: RenderAnchorProps<T>) => ReactNode;
40
+ } & AnchorAttributes;
41
+ type ButtonComponent = {
42
+ <T extends string>(props: LinkProps<T>): ReactNode;
43
+ (props: ButtonProps): ReactNode;
44
+ };
45
+ export declare const Button: ButtonComponent;
49
46
  export {};