@k8ordo/ui 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (673) hide show
  1. package/README.md +197 -187
  2. package/dist/components/_internal/focus-ring.css +37 -0
  3. package/dist/components/_internal/focus-ring.module.mjs +9 -0
  4. package/dist/components/_internal/form-value.d.mts +34 -0
  5. package/dist/components/_internal/form-value.mjs +91 -0
  6. package/dist/components/_internal/high-contrast.css +18 -0
  7. package/dist/components/_internal/high-contrast.module.mjs +5 -0
  8. package/dist/components/_internal/ignore-changes.d.mts +20 -0
  9. package/dist/components/_internal/ignore-changes.mjs +37 -0
  10. package/dist/components/_internal/nav-link.css +78 -0
  11. package/dist/components/_internal/nav-link.d.mts +5 -0
  12. package/dist/components/_internal/nav-link.mjs +8 -0
  13. package/dist/components/_internal/nav-link.module.mjs +14 -0
  14. package/dist/components/_internal/sr-only.css +17 -0
  15. package/dist/components/_internal/sr-only.module.mjs +5 -0
  16. package/dist/components/_internal/status-tone.css +37 -0
  17. package/dist/components/_internal/status-tone.d.mts +20 -0
  18. package/dist/components/_internal/status-tone.mjs +22 -0
  19. package/dist/components/_internal/status-tone.module.mjs +14 -0
  20. package/dist/components/ai/_internal/attachment-preview.css +75 -0
  21. package/dist/components/ai/_internal/attachment-preview.d.mts +15 -0
  22. package/dist/components/ai/_internal/attachment-preview.mjs +50 -0
  23. package/dist/components/ai/_internal/attachment-preview.module.mjs +14 -0
  24. package/dist/components/ai/_internal/collapsible.css +62 -0
  25. package/dist/components/ai/_internal/collapsible.d.mts +4 -2
  26. package/dist/components/ai/_internal/collapsible.mjs +42 -33
  27. package/dist/components/ai/_internal/collapsible.module.mjs +12 -0
  28. package/dist/components/ai/_internal/icons.d.mts +8 -0
  29. package/dist/components/ai/_internal/icons.mjs +14 -0
  30. package/dist/components/ai/_internal/streaming-cursor.css +28 -0
  31. package/dist/components/ai/_internal/streaming-cursor.d.mts +2 -3
  32. package/dist/components/ai/_internal/streaming-cursor.mjs +2 -1
  33. package/dist/components/ai/_internal/streaming-cursor.module.mjs +8 -0
  34. package/dist/components/ai/attachment/attachment.css +17 -0
  35. package/dist/components/ai/attachment/attachment.d.mts +15 -0
  36. package/dist/components/ai/attachment/attachment.mjs +25 -0
  37. package/dist/components/ai/attachment/attachment.module.mjs +8 -0
  38. package/dist/components/ai/attachment/index.d.mts +13 -0
  39. package/dist/components/ai/attachment/index.mjs +8 -0
  40. package/dist/components/ai/conversation/conversation.css +71 -0
  41. package/dist/components/ai/conversation/conversation.d.mts +4 -4
  42. package/dist/components/ai/conversation/conversation.mjs +38 -34
  43. package/dist/components/ai/conversation/conversation.module.mjs +11 -0
  44. package/dist/components/ai/conversation/index.d.mts +2 -3
  45. package/dist/components/ai/index.d.mts +4 -2
  46. package/dist/components/ai/index.mjs +3 -1
  47. package/dist/components/ai/message/index.d.mts +29 -3
  48. package/dist/components/ai/message/index.mjs +7 -2
  49. package/dist/components/ai/message/message.css +71 -0
  50. package/dist/components/ai/message/message.d.mts +34 -3
  51. package/dist/components/ai/message/message.mjs +99 -9
  52. package/dist/components/ai/message/message.module.mjs +18 -0
  53. package/dist/components/ai/prompt-input/index.d.mts +11 -4
  54. package/dist/components/ai/prompt-input/index.mjs +3 -1
  55. package/dist/components/ai/prompt-input/prompt-input.css +101 -0
  56. package/dist/components/ai/prompt-input/prompt-input.d.mts +15 -5
  57. package/dist/components/ai/prompt-input/prompt-input.mjs +152 -37
  58. package/dist/components/ai/prompt-input/prompt-input.module.mjs +15 -0
  59. package/dist/components/ai/reasoning/index.mjs +1 -2
  60. package/dist/components/ai/reasoning/reasoning.css +16 -0
  61. package/dist/components/ai/reasoning/reasoning.d.mts +2 -2
  62. package/dist/components/ai/reasoning/reasoning.mjs +5 -5
  63. package/dist/components/ai/reasoning/reasoning.module.mjs +8 -0
  64. package/dist/components/ai/response/index.mjs +1 -2
  65. package/dist/components/ai/response/response.css +453 -0
  66. package/dist/components/ai/response/response.d.mts +4 -5
  67. package/dist/components/ai/response/response.mjs +20 -15
  68. package/dist/components/ai/response/response.module.mjs +8 -0
  69. package/dist/components/ai/source/index.d.mts +12 -0
  70. package/dist/components/ai/source/index.mjs +8 -0
  71. package/dist/components/ai/source/source.css +54 -0
  72. package/dist/components/ai/source/source.d.mts +14 -0
  73. package/dist/components/ai/source/source.mjs +51 -0
  74. package/dist/components/ai/source/source.module.mjs +12 -0
  75. package/dist/components/ai/suggestion/index.d.mts +2 -3
  76. package/dist/components/ai/suggestion/suggestion.css +32 -0
  77. package/dist/components/ai/suggestion/suggestion.d.mts +3 -3
  78. package/dist/components/ai/suggestion/suggestion.mjs +7 -6
  79. package/dist/components/ai/suggestion/suggestion.module.mjs +8 -0
  80. package/dist/components/ai/tool-invocation/approval-bar.css +26 -0
  81. package/dist/components/ai/tool-invocation/approval-bar.d.mts +12 -0
  82. package/dist/components/ai/tool-invocation/approval-bar.mjs +59 -0
  83. package/dist/components/ai/tool-invocation/approval-bar.module.mjs +9 -0
  84. package/dist/components/ai/tool-invocation/index.mjs +1 -2
  85. package/dist/components/ai/tool-invocation/tool-invocation.css +55 -0
  86. package/dist/components/ai/tool-invocation/tool-invocation.d.mts +5 -4
  87. package/dist/components/ai/tool-invocation/tool-invocation.mjs +39 -18
  88. package/dist/components/ai/tool-invocation/tool-invocation.module.mjs +15 -0
  89. package/dist/components/ai/types.d.mts +21 -4
  90. package/dist/components/buttons/button/button.css +158 -0
  91. package/dist/components/buttons/button/button.d.mts +32 -8
  92. package/dist/components/buttons/button/button.mjs +46 -36
  93. package/dist/components/buttons/button/button.module.mjs +23 -0
  94. package/dist/components/buttons/button/index.d.mts +2 -2
  95. package/dist/components/buttons/button/index.mjs +1 -2
  96. package/dist/components/buttons/copy-button/copy-button.css +15 -0
  97. package/dist/components/buttons/copy-button/copy-button.d.mts +10 -0
  98. package/dist/components/buttons/copy-button/copy-button.mjs +70 -0
  99. package/dist/components/buttons/copy-button/copy-button.module.mjs +8 -0
  100. package/dist/components/buttons/copy-button/index.d.mts +2 -0
  101. package/dist/components/buttons/copy-button/index.mjs +1 -0
  102. package/dist/components/buttons/icon-button/icon-button.css +81 -0
  103. package/dist/components/buttons/icon-button/icon-button.d.mts +39 -11
  104. package/dist/components/buttons/icon-button/icon-button.mjs +70 -57
  105. package/dist/components/buttons/icon-button/icon-button.module.mjs +15 -0
  106. package/dist/components/buttons/icon-button/index.d.mts +2 -2
  107. package/dist/components/buttons/icon-button/index.mjs +1 -2
  108. package/dist/components/buttons/toolbar/index.d.mts +14 -0
  109. package/dist/components/buttons/toolbar/index.mjs +9 -0
  110. package/dist/components/buttons/toolbar/toolbar.css +30 -0
  111. package/dist/components/buttons/toolbar/toolbar.d.mts +19 -0
  112. package/dist/components/buttons/toolbar/toolbar.mjs +111 -0
  113. package/dist/components/buttons/toolbar/toolbar.module.mjs +9 -0
  114. package/dist/components/data-display/accordion/accordion-button.css +48 -0
  115. package/dist/components/data-display/accordion/accordion-button.d.mts +2 -3
  116. package/dist/components/data-display/accordion/accordion-button.mjs +5 -4
  117. package/dist/components/data-display/accordion/accordion-button.module.mjs +9 -0
  118. package/dist/components/data-display/accordion/accordion-item.css +11 -0
  119. package/dist/components/data-display/accordion/accordion-item.d.mts +2 -3
  120. package/dist/components/data-display/accordion/accordion-item.mjs +2 -1
  121. package/dist/components/data-display/accordion/accordion-item.module.mjs +5 -0
  122. package/dist/components/data-display/accordion/accordion-panel.css +9 -0
  123. package/dist/components/data-display/accordion/accordion-panel.d.mts +2 -3
  124. package/dist/components/data-display/accordion/accordion-panel.mjs +2 -2
  125. package/dist/components/data-display/accordion/accordion-panel.module.mjs +5 -0
  126. package/dist/components/data-display/accordion/accordion.css +19 -0
  127. package/dist/components/data-display/accordion/accordion.d.mts +2 -3
  128. package/dist/components/data-display/accordion/accordion.mjs +2 -1
  129. package/dist/components/data-display/accordion/accordion.module.mjs +5 -0
  130. package/dist/components/data-display/accordion/context.d.mts +3 -3
  131. package/dist/components/data-display/accordion/index.d.mts +2 -3
  132. package/dist/components/data-display/avatar/avatar.css +95 -0
  133. package/dist/components/data-display/avatar/avatar.d.mts +2 -2
  134. package/dist/components/data-display/avatar/avatar.mjs +22 -6
  135. package/dist/components/data-display/avatar/avatar.module.mjs +18 -0
  136. package/dist/components/data-display/avatar/index.mjs +1 -2
  137. package/dist/components/data-display/badge/badge.css +160 -0
  138. package/dist/components/data-display/badge/badge.d.mts +2 -2
  139. package/dist/components/data-display/badge/badge.mjs +30 -5
  140. package/dist/components/data-display/badge/badge.module.mjs +21 -0
  141. package/dist/components/data-display/badge/index.mjs +1 -2
  142. package/dist/components/data-display/card/card.css +44 -0
  143. package/dist/components/data-display/card/card.d.mts +2 -2
  144. package/dist/components/data-display/card/card.mjs +12 -2
  145. package/dist/components/data-display/card/card.module.mjs +12 -0
  146. package/dist/components/data-display/card/index.mjs +1 -2
  147. package/dist/components/data-display/carousel/carousel.css +83 -0
  148. package/dist/components/data-display/carousel/carousel.d.mts +12 -0
  149. package/dist/components/data-display/carousel/carousel.mjs +186 -0
  150. package/dist/components/data-display/carousel/carousel.module.mjs +18 -0
  151. package/dist/components/data-display/carousel/index.d.mts +11 -0
  152. package/dist/components/data-display/carousel/index.mjs +8 -0
  153. package/dist/components/data-display/code/code.css +37 -0
  154. package/dist/components/data-display/code/code.d.mts +2 -2
  155. package/dist/components/data-display/code/code.mjs +7 -6
  156. package/dist/components/data-display/code/code.module.mjs +9 -0
  157. package/dist/components/data-display/code/find-all-colors.d.mts +2 -2
  158. package/dist/components/data-display/code/find-all-colors.mjs +0 -161
  159. package/dist/components/data-display/code/index.mjs +1 -2
  160. package/dist/components/data-display/code-block/code-block.css +161 -0
  161. package/dist/components/data-display/code-block/code-block.d.mts +13 -0
  162. package/dist/components/data-display/code-block/code-block.mjs +44 -0
  163. package/dist/components/data-display/code-block/code-block.module.mjs +11 -0
  164. package/dist/components/data-display/code-block/highlight.d.mts +10 -0
  165. package/dist/components/data-display/code-block/highlight.mjs +54 -0
  166. package/dist/components/data-display/code-block/index.d.mts +2 -0
  167. package/dist/components/data-display/code-block/index.mjs +1 -0
  168. package/dist/components/data-display/data-table/data-table.css +74 -0
  169. package/dist/components/data-display/data-table/data-table.d.mts +32 -0
  170. package/dist/components/data-display/data-table/data-table.mjs +155 -0
  171. package/dist/components/data-display/data-table/data-table.module.mjs +14 -0
  172. package/dist/components/data-display/data-table/index.d.mts +2 -0
  173. package/dist/components/data-display/data-table/index.mjs +1 -0
  174. package/dist/components/data-display/heading/heading.css +99 -0
  175. package/dist/components/data-display/heading/heading.d.mts +2 -2
  176. package/dist/components/data-display/heading/heading.mjs +15 -14
  177. package/dist/components/data-display/heading/heading.module.mjs +20 -0
  178. package/dist/components/data-display/heading/index.mjs +1 -2
  179. package/dist/components/data-display/kbd/index.d.mts +2 -0
  180. package/dist/components/data-display/kbd/index.mjs +1 -0
  181. package/dist/components/data-display/kbd/kbd.css +21 -0
  182. package/dist/components/data-display/kbd/kbd.d.mts +9 -0
  183. package/dist/components/data-display/kbd/kbd.mjs +17 -0
  184. package/dist/components/data-display/kbd/kbd.module.mjs +5 -0
  185. package/dist/components/data-display/prose/index.d.mts +2 -0
  186. package/dist/components/data-display/prose/index.mjs +1 -0
  187. package/dist/components/data-display/prose/prose.css +253 -0
  188. package/dist/components/data-display/prose/prose.d.mts +6 -0
  189. package/dist/components/data-display/prose/prose.mjs +10 -0
  190. package/dist/components/data-display/prose/prose.module.mjs +5 -0
  191. package/dist/components/data-display/table/index.mjs +1 -2
  192. package/dist/components/data-display/table/table.css +107 -0
  193. package/dist/components/data-display/table/table.d.mts +10 -8
  194. package/dist/components/data-display/table/table.mjs +26 -15
  195. package/dist/components/data-display/table/table.module.mjs +22 -0
  196. package/dist/components/data-display/tree/index.d.mts +2 -0
  197. package/dist/components/data-display/tree/index.mjs +1 -0
  198. package/dist/components/data-display/tree/tree.css +70 -0
  199. package/dist/components/data-display/tree/tree.d.mts +21 -0
  200. package/dist/components/data-display/tree/tree.mjs +144 -0
  201. package/dist/components/data-display/tree/tree.module.mjs +14 -0
  202. package/dist/components/feedback/alert/alert.css +42 -0
  203. package/dist/components/feedback/alert/alert.d.mts +3 -3
  204. package/dist/components/feedback/alert/alert.mjs +20 -23
  205. package/dist/components/feedback/alert/alert.module.mjs +14 -0
  206. package/dist/components/feedback/alert/index.mjs +1 -2
  207. package/dist/components/feedback/callout/callout.css +38 -0
  208. package/dist/components/feedback/callout/callout.d.mts +11 -0
  209. package/dist/components/feedback/callout/callout.mjs +38 -0
  210. package/dist/components/feedback/callout/callout.module.mjs +11 -0
  211. package/dist/components/feedback/callout/index.d.mts +2 -0
  212. package/dist/components/feedback/callout/index.mjs +1 -0
  213. package/dist/components/feedback/empty-state/empty-state.css +36 -0
  214. package/dist/components/feedback/empty-state/empty-state.d.mts +11 -0
  215. package/dist/components/feedback/empty-state/empty-state.mjs +27 -0
  216. package/dist/components/feedback/empty-state/empty-state.module.mjs +11 -0
  217. package/dist/components/feedback/empty-state/index.d.mts +2 -0
  218. package/dist/components/feedback/empty-state/index.mjs +1 -0
  219. package/dist/components/feedback/progress/index.mjs +1 -2
  220. package/dist/components/feedback/progress/progress.css +78 -0
  221. package/dist/components/feedback/progress/progress.d.mts +5 -4
  222. package/dist/components/feedback/progress/progress.mjs +17 -3
  223. package/dist/components/feedback/progress/progress.module.mjs +12 -0
  224. package/dist/components/feedback/skeleton/index.mjs +1 -2
  225. package/dist/components/feedback/skeleton/skeleton.css +64 -0
  226. package/dist/components/feedback/skeleton/skeleton.d.mts +2 -2
  227. package/dist/components/feedback/skeleton/skeleton.mjs +19 -2
  228. package/dist/components/feedback/skeleton/skeleton.module.mjs +17 -0
  229. package/dist/components/feedback/spinner/index.mjs +1 -2
  230. package/dist/components/feedback/spinner/spinner.css +40 -0
  231. package/dist/components/feedback/spinner/spinner.d.mts +2 -2
  232. package/dist/components/feedback/spinner/spinner.mjs +13 -7
  233. package/dist/components/feedback/spinner/spinner.module.mjs +12 -0
  234. package/dist/components/feedback/toast/context.d.mts +8 -9
  235. package/dist/components/feedback/toast/provider.css +69 -0
  236. package/dist/components/feedback/toast/provider.d.mts +2 -3
  237. package/dist/components/feedback/toast/provider.mjs +17 -13
  238. package/dist/components/feedback/toast/provider.module.mjs +12 -0
  239. package/dist/components/feedback/toast/toast.d.mts +2 -2
  240. package/dist/components/form/autocomplete/autocomplete.css +154 -0
  241. package/dist/components/form/autocomplete/autocomplete.d.mts +2 -2
  242. package/dist/components/form/autocomplete/autocomplete.mjs +70 -46
  243. package/dist/components/form/autocomplete/autocomplete.module.mjs +21 -0
  244. package/dist/components/form/autocomplete/index.mjs +1 -2
  245. package/dist/components/form/calendar/calendar.css +98 -0
  246. package/dist/components/form/calendar/calendar.d.mts +15 -0
  247. package/dist/components/form/calendar/calendar.mjs +182 -0
  248. package/dist/components/form/calendar/calendar.module.mjs +18 -0
  249. package/dist/components/form/calendar/index.d.mts +2 -0
  250. package/dist/components/form/calendar/index.mjs +1 -0
  251. package/dist/components/form/checkbox/checkbox.css +90 -0
  252. package/dist/components/form/checkbox/checkbox.d.mts +4 -2
  253. package/dist/components/form/checkbox/checkbox.mjs +29 -27
  254. package/dist/components/form/checkbox/checkbox.module.mjs +13 -0
  255. package/dist/components/form/checkbox/index.mjs +1 -2
  256. package/dist/components/form/checkbox-card/checkbox-card.css +138 -0
  257. package/dist/components/form/checkbox-card/checkbox-card.d.mts +3 -3
  258. package/dist/components/form/checkbox-card/checkbox-card.mjs +17 -23
  259. package/dist/components/form/checkbox-card/checkbox-card.module.mjs +17 -0
  260. package/dist/components/form/checkbox-card/index.mjs +1 -2
  261. package/dist/components/form/checkbox-group/checkbox-group.css +15 -0
  262. package/dist/components/form/checkbox-group/checkbox-group.d.mts +7 -5
  263. package/dist/components/form/checkbox-group/checkbox-group.mjs +12 -16
  264. package/dist/components/form/checkbox-group/checkbox-group.module.mjs +8 -0
  265. package/dist/components/form/checkbox-group/index.d.mts +4 -3
  266. package/dist/components/form/color-picker/color-picker.css +172 -0
  267. package/dist/components/form/color-picker/color-picker.d.mts +29 -0
  268. package/dist/components/form/color-picker/color-picker.mjs +239 -0
  269. package/dist/components/form/color-picker/color-picker.module.mjs +20 -0
  270. package/dist/components/form/color-picker/index.d.mts +2 -0
  271. package/dist/components/form/color-picker/index.mjs +1 -0
  272. package/dist/components/form/combobox/combobox.css +143 -0
  273. package/dist/components/form/combobox/combobox.d.mts +33 -0
  274. package/dist/components/form/combobox/combobox.mjs +278 -0
  275. package/dist/components/form/combobox/combobox.module.mjs +19 -0
  276. package/dist/components/form/combobox/index.d.mts +2 -0
  277. package/dist/components/form/combobox/index.mjs +1 -0
  278. package/dist/components/form/date-field/date-field.css +31 -0
  279. package/dist/components/form/date-field/date-field.d.mts +9 -0
  280. package/dist/components/form/date-field/date-field.mjs +20 -0
  281. package/dist/components/form/date-field/date-field.module.mjs +5 -0
  282. package/dist/components/form/date-field/index.d.mts +2 -0
  283. package/dist/components/form/date-field/index.mjs +1 -0
  284. package/dist/components/form/date-picker/date-picker.css +90 -0
  285. package/dist/components/form/date-picker/date-picker.d.mts +13 -0
  286. package/dist/components/form/date-picker/date-picker.mjs +77 -0
  287. package/dist/components/form/date-picker/date-picker.module.mjs +14 -0
  288. package/dist/components/form/date-picker/index.d.mts +2 -0
  289. package/dist/components/form/date-picker/index.mjs +1 -0
  290. package/dist/components/form/file-field/file-field.css +88 -0
  291. package/dist/components/form/file-field/file-field.d.mts +9 -6
  292. package/dist/components/form/file-field/file-field.mjs +130 -37
  293. package/dist/components/form/file-field/file-field.module.mjs +17 -0
  294. package/dist/components/form/file-field/index.d.mts +5 -3
  295. package/dist/components/form/file-field/index.mjs +2 -1
  296. package/dist/components/form/form/form.css +11 -0
  297. package/dist/components/form/form/form.d.mts +4 -3
  298. package/dist/components/form/form/form.mjs +2 -1
  299. package/dist/components/form/form/form.module.mjs +5 -0
  300. package/dist/components/form/form/index.mjs +1 -2
  301. package/dist/components/form/form-control/form-control.css +43 -0
  302. package/dist/components/form/form-control/form-control.d.mts +2 -2
  303. package/dist/components/form/form-control/form-control.mjs +11 -10
  304. package/dist/components/form/form-control/form-control.module.mjs +12 -0
  305. package/dist/components/form/form-control/index.mjs +1 -2
  306. package/dist/components/form/number-field/cast.d.mts +2 -3
  307. package/dist/components/form/number-field/cast.mjs +3 -22
  308. package/dist/components/form/number-field/index.mjs +1 -2
  309. package/dist/components/form/number-field/number-field.css +122 -0
  310. package/dist/components/form/number-field/number-field.d.mts +10 -9
  311. package/dist/components/form/number-field/number-field.mjs +126 -54
  312. package/dist/components/form/number-field/number-field.module.mjs +10 -0
  313. package/dist/components/form/password-input/index.mjs +1 -2
  314. package/dist/components/form/password-input/password-input.css +88 -0
  315. package/dist/components/form/password-input/password-input.d.mts +2 -2
  316. package/dist/components/form/password-input/password-input.mjs +15 -12
  317. package/dist/components/form/password-input/password-input.module.mjs +12 -0
  318. package/dist/components/form/radio/index.mjs +1 -2
  319. package/dist/components/form/radio/radio.css +89 -0
  320. package/dist/components/form/radio/radio.d.mts +3 -2
  321. package/dist/components/form/radio/radio.mjs +15 -19
  322. package/dist/components/form/radio/radio.module.mjs +16 -0
  323. package/dist/components/form/radio-card/index.mjs +1 -2
  324. package/dist/components/form/radio-card/radio-card.css +147 -0
  325. package/dist/components/form/radio-card/radio-card.d.mts +4 -3
  326. package/dist/components/form/radio-card/radio-card.mjs +17 -23
  327. package/dist/components/form/radio-card/radio-card.module.mjs +19 -0
  328. package/dist/components/form/range-slider/index.d.mts +2 -0
  329. package/dist/components/form/range-slider/index.mjs +1 -0
  330. package/dist/components/form/range-slider/range-slider.css +67 -0
  331. package/dist/components/form/range-slider/range-slider.d.mts +31 -0
  332. package/dist/components/form/range-slider/range-slider.mjs +135 -0
  333. package/dist/components/form/range-slider/range-slider.module.mjs +14 -0
  334. package/dist/components/form/select/index.mjs +1 -2
  335. package/dist/components/form/select/select.css +74 -0
  336. package/dist/components/form/select/select.d.mts +2 -2
  337. package/dist/components/form/select/select.mjs +25 -8
  338. package/dist/components/form/select/select.module.mjs +12 -0
  339. package/dist/components/form/slider/index.mjs +1 -2
  340. package/dist/components/form/slider/range-input-class.css +97 -0
  341. package/dist/components/form/slider/range-input-class.d.mts +7 -0
  342. package/dist/components/form/slider/range-input-class.mjs +10 -0
  343. package/dist/components/form/slider/range-input-class.module.mjs +8 -0
  344. package/dist/components/form/slider/slider.css +55 -0
  345. package/dist/components/form/slider/slider.d.mts +6 -6
  346. package/dist/components/form/slider/slider.mjs +44 -11
  347. package/dist/components/form/slider/slider.module.mjs +12 -0
  348. package/dist/components/form/switch/index.mjs +1 -2
  349. package/dist/components/form/switch/switch.css +103 -0
  350. package/dist/components/form/switch/switch.d.mts +2 -2
  351. package/dist/components/form/switch/switch.mjs +14 -17
  352. package/dist/components/form/switch/switch.module.mjs +16 -0
  353. package/dist/components/form/text-field/index.mjs +1 -2
  354. package/dist/components/form/text-field/text-field.css +41 -0
  355. package/dist/components/form/text-field/text-field.d.mts +4 -4
  356. package/dist/components/form/text-field/text-field.mjs +2 -3
  357. package/dist/components/form/text-field/text-field.module.mjs +5 -0
  358. package/dist/components/form/textarea/index.mjs +1 -2
  359. package/dist/components/form/textarea/textarea.css +50 -0
  360. package/dist/components/form/textarea/textarea.d.mts +3 -2
  361. package/dist/components/form/textarea/textarea.mjs +6 -20
  362. package/dist/components/form/textarea/textarea.module.mjs +9 -0
  363. package/dist/components/icons/base.css +40 -0
  364. package/dist/components/icons/base.d.mts +4 -5
  365. package/dist/components/icons/base.mjs +10 -10
  366. package/dist/components/icons/base.module.mjs +13 -0
  367. package/dist/components/icons/browsers.d.mts +5 -6
  368. package/dist/components/icons/color-scale.d.mts +2 -3
  369. package/dist/components/icons/github-mark.d.mts +2 -3
  370. package/dist/components/icons/logo.css +17 -0
  371. package/dist/components/icons/logo.d.mts +3 -4
  372. package/dist/components/icons/logo.mjs +4 -3
  373. package/dist/components/icons/logo.module.mjs +9 -0
  374. package/dist/components/icons/lucide-deep.d.mts +3 -1
  375. package/dist/components/icons/lucide-imports.d.mts +3 -1
  376. package/dist/components/icons/lucide-imports.mjs +3 -1
  377. package/dist/components/icons/lucide.d.mts +60 -60
  378. package/dist/components/icons/qiita.d.mts +2 -3
  379. package/dist/components/icons/twitter.css +9 -0
  380. package/dist/components/icons/twitter.d.mts +2 -3
  381. package/dist/components/icons/twitter.mjs +2 -1
  382. package/dist/components/icons/twitter.module.mjs +5 -0
  383. package/dist/components/icons/vertical-writing.d.mts +2 -3
  384. package/dist/components/index.d.mts +48 -9
  385. package/dist/components/index.mjs +32 -10
  386. package/dist/components/layout/_shared/gap.css +25 -0
  387. package/dist/components/layout/_shared/gap.d.mts +8 -9
  388. package/dist/components/layout/_shared/gap.mjs +6 -5
  389. package/dist/components/layout/_shared/gap.module.mjs +11 -0
  390. package/dist/components/layout/_shared/padding.css +25 -0
  391. package/dist/components/layout/_shared/padding.d.mts +8 -9
  392. package/dist/components/layout/_shared/padding.mjs +6 -5
  393. package/dist/components/layout/_shared/padding.module.mjs +11 -0
  394. package/dist/components/layout/grid/grid.css +93 -0
  395. package/dist/components/layout/grid/grid.d.mts +5 -6
  396. package/dist/components/layout/grid/grid.mjs +21 -20
  397. package/dist/components/layout/grid/grid.module.mjs +25 -0
  398. package/dist/components/layout/grid/index.mjs +1 -2
  399. package/dist/components/layout/resizable-panels/index.d.mts +18 -0
  400. package/dist/components/layout/resizable-panels/index.mjs +9 -0
  401. package/dist/components/layout/resizable-panels/resizable-panels.css +77 -0
  402. package/dist/components/layout/resizable-panels/resizable-panels.d.mts +22 -0
  403. package/dist/components/layout/resizable-panels/resizable-panels.mjs +164 -0
  404. package/dist/components/layout/resizable-panels/resizable-panels.module.mjs +16 -0
  405. package/dist/components/layout/separator/index.mjs +1 -2
  406. package/dist/components/layout/separator/separator.css +37 -0
  407. package/dist/components/layout/separator/separator.d.mts +2 -2
  408. package/dist/components/layout/separator/separator.mjs +12 -9
  409. package/dist/components/layout/separator/separator.module.mjs +12 -0
  410. package/dist/components/layout/stack/index.mjs +1 -2
  411. package/dist/components/layout/stack/stack.css +49 -0
  412. package/dist/components/layout/stack/stack.d.mts +3 -4
  413. package/dist/components/layout/stack/stack.mjs +11 -10
  414. package/dist/components/layout/stack/stack.module.mjs +17 -0
  415. package/dist/components/navigation/anchor/anchor.css +29 -0
  416. package/dist/components/navigation/anchor/anchor.d.mts +2 -2
  417. package/dist/components/navigation/anchor/anchor.mjs +5 -2
  418. package/dist/components/navigation/anchor/anchor.module.mjs +8 -0
  419. package/dist/components/navigation/anchor/index.mjs +1 -2
  420. package/dist/components/navigation/breadcrumb/breadcrumb.css +72 -0
  421. package/dist/components/navigation/breadcrumb/breadcrumb.d.mts +5 -5
  422. package/dist/components/navigation/breadcrumb/breadcrumb.mjs +15 -9
  423. package/dist/components/navigation/breadcrumb/breadcrumb.module.mjs +14 -0
  424. package/dist/components/navigation/breadcrumb/index.d.mts +2 -3
  425. package/dist/components/navigation/pagination/index.mjs +1 -2
  426. package/dist/components/navigation/pagination/pagination.css +36 -0
  427. package/dist/components/navigation/pagination/pagination.d.mts +2 -2
  428. package/dist/components/navigation/pagination/pagination.mjs +9 -8
  429. package/dist/components/navigation/pagination/pagination.module.mjs +11 -0
  430. package/dist/components/navigation/side-nav/index.d.mts +16 -0
  431. package/dist/components/navigation/side-nav/index.mjs +10 -0
  432. package/dist/components/navigation/side-nav/side-nav.css +73 -0
  433. package/dist/components/navigation/side-nav/side-nav.d.mts +32 -0
  434. package/dist/components/navigation/side-nav/side-nav.mjs +62 -0
  435. package/dist/components/navigation/side-nav/side-nav.module.mjs +11 -0
  436. package/dist/components/navigation/stepper/index.d.mts +2 -0
  437. package/dist/components/navigation/stepper/index.mjs +1 -0
  438. package/dist/components/navigation/stepper/stepper.css +151 -0
  439. package/dist/components/navigation/stepper/stepper.d.mts +20 -0
  440. package/dist/components/navigation/stepper/stepper.mjs +87 -0
  441. package/dist/components/navigation/stepper/stepper.module.mjs +29 -0
  442. package/dist/components/navigation/table-of-contents/index.d.mts +2 -0
  443. package/dist/components/navigation/table-of-contents/index.mjs +1 -0
  444. package/dist/components/navigation/table-of-contents/table-of-contents.css +17 -0
  445. package/dist/components/navigation/table-of-contents/table-of-contents.d.mts +12 -0
  446. package/dist/components/navigation/table-of-contents/table-of-contents.mjs +94 -0
  447. package/dist/components/navigation/table-of-contents/table-of-contents.module.mjs +8 -0
  448. package/dist/components/navigation/tabs/index.d.mts +2 -3
  449. package/dist/components/navigation/tabs/tabs.css +70 -0
  450. package/dist/components/navigation/tabs/tabs.d.mts +5 -6
  451. package/dist/components/navigation/tabs/tabs.mjs +51 -42
  452. package/dist/components/navigation/tabs/tabs.module.mjs +12 -0
  453. package/dist/components/observers/fragment-instance.d.mts +1 -0
  454. package/dist/components/observers/in-view/in-view.d.mts +11 -0
  455. package/dist/components/observers/in-view/in-view.mjs +60 -0
  456. package/dist/components/observers/in-view/index.d.mts +2 -0
  457. package/dist/components/observers/in-view/index.mjs +1 -0
  458. package/dist/components/observers/resize/index.d.mts +2 -0
  459. package/dist/components/observers/resize/index.mjs +1 -0
  460. package/dist/components/observers/resize/resize.d.mts +7 -0
  461. package/dist/components/observers/resize/resize.mjs +25 -0
  462. package/dist/components/overlays/_internal/modal-dialog-context.d.mts +4 -5
  463. package/dist/components/overlays/_internal/use-can-hover.d.mts +2 -3
  464. package/dist/components/overlays/_internal/use-hover-intent.d.mts +3 -4
  465. package/dist/components/overlays/_internal/use-list-navigation.d.mts +17 -11
  466. package/dist/components/overlays/_internal/use-list-navigation.mjs +42 -26
  467. package/dist/components/overlays/command-palette/command-palette.css +91 -0
  468. package/dist/components/overlays/command-palette/command-palette.d.mts +25 -0
  469. package/dist/components/overlays/command-palette/command-palette.mjs +139 -0
  470. package/dist/components/overlays/command-palette/command-palette.module.mjs +14 -0
  471. package/dist/components/overlays/command-palette/index.d.mts +2 -0
  472. package/dist/components/overlays/command-palette/index.mjs +1 -0
  473. package/dist/components/overlays/context-menu/context-menu.d.mts +13 -0
  474. package/dist/components/overlays/context-menu/context-menu.mjs +79 -0
  475. package/dist/components/overlays/context-menu/index.d.mts +21 -0
  476. package/dist/components/overlays/context-menu/index.mjs +13 -0
  477. package/dist/components/overlays/dialog/dialog.css +31 -0
  478. package/dist/components/overlays/dialog/dialog.d.mts +4 -5
  479. package/dist/components/overlays/dialog/dialog.mjs +10 -7
  480. package/dist/components/overlays/dialog/dialog.module.mjs +10 -0
  481. package/dist/components/overlays/dialog/index.d.mts +2 -3
  482. package/dist/components/overlays/drawer/drawer.css +48 -0
  483. package/dist/components/overlays/drawer/drawer.d.mts +2 -3
  484. package/dist/components/overlays/drawer/drawer.mjs +11 -10
  485. package/dist/components/overlays/drawer/drawer.module.mjs +13 -0
  486. package/dist/components/overlays/drawer/index.mjs +1 -2
  487. package/dist/components/overlays/dropdown-menu/dropdown-menu.d.mts +7 -10
  488. package/dist/components/overlays/dropdown-menu/dropdown-menu.mjs +10 -9
  489. package/dist/components/overlays/dropdown-menu/hooks.d.mts +7 -6
  490. package/dist/components/overlays/dropdown-menu/hooks.mjs +3 -3
  491. package/dist/components/overlays/dropdown-menu/index.d.mts +8 -10
  492. package/dist/components/overlays/dropdown-menu/shared.css +51 -0
  493. package/dist/components/overlays/dropdown-menu/shared.d.mts +3 -6
  494. package/dist/components/overlays/dropdown-menu/shared.mjs +4 -6
  495. package/dist/components/overlays/dropdown-menu/shared.module.mjs +8 -0
  496. package/dist/components/overlays/dropdown-menu/sub-menu.css +28 -0
  497. package/dist/components/overlays/dropdown-menu/sub-menu.d.mts +3 -6
  498. package/dist/components/overlays/dropdown-menu/sub-menu.mjs +15 -15
  499. package/dist/components/overlays/dropdown-menu/sub-menu.module.mjs +9 -0
  500. package/dist/components/overlays/dropdown-menu/use-safe-triangle.d.mts +2 -3
  501. package/dist/components/overlays/list-box/hooks.d.mts +6 -5
  502. package/dist/components/overlays/list-box/hooks.mjs +5 -4
  503. package/dist/components/overlays/list-box/index.d.mts +2 -3
  504. package/dist/components/overlays/list-box/list-box.css +74 -0
  505. package/dist/components/overlays/list-box/list-box.d.mts +5 -6
  506. package/dist/components/overlays/list-box/list-box.mjs +15 -13
  507. package/dist/components/overlays/list-box/list-box.module.mjs +10 -0
  508. package/dist/components/overlays/modal/index.mjs +1 -2
  509. package/dist/components/overlays/modal/modal.css +119 -0
  510. package/dist/components/overlays/modal/modal.d.mts +2 -3
  511. package/dist/components/overlays/modal/modal.mjs +14 -11
  512. package/dist/components/overlays/modal/modal.module.mjs +11 -0
  513. package/dist/components/overlays/popover/anchor-positioning.d.mts +4 -4
  514. package/dist/components/overlays/popover/escape-stack.d.mts +2 -3
  515. package/dist/components/overlays/popover/hooks.d.mts +7 -7
  516. package/dist/components/overlays/popover/index.d.mts +2 -2
  517. package/dist/components/overlays/popover/popover.css +51 -0
  518. package/dist/components/overlays/popover/popover.d.mts +4 -4
  519. package/dist/components/overlays/popover/popover.mjs +11 -5
  520. package/dist/components/overlays/popover/popover.module.mjs +11 -0
  521. package/dist/components/overlays/tooltip/bridge.css +68 -0
  522. package/dist/components/overlays/tooltip/bridge.d.mts +2 -3
  523. package/dist/components/overlays/tooltip/bridge.mjs +7 -21
  524. package/dist/components/overlays/tooltip/bridge.module.mjs +11 -0
  525. package/dist/components/overlays/tooltip/index.d.mts +2 -2
  526. package/dist/components/overlays/tooltip/tooltip.css +15 -0
  527. package/dist/components/overlays/tooltip/tooltip.d.mts +5 -6
  528. package/dist/components/overlays/tooltip/tooltip.mjs +3 -2
  529. package/dist/components/overlays/tooltip/tooltip.module.mjs +5 -0
  530. package/dist/components/providers/index.d.mts +1 -2
  531. package/dist/components/providers/portal-root.d.mts +9 -7
  532. package/dist/components/providers/portal-root.mjs +7 -7
  533. package/dist/components/providers/ui-provider.d.mts +2 -6
  534. package/dist/components/providers/ui-provider.mjs +1 -5
  535. package/dist/helpers/chain.d.mts +2 -2
  536. package/dist/helpers/chain.mjs +0 -23
  537. package/dist/helpers/create-safe-context.d.mts +2 -2
  538. package/dist/helpers/create-safe-context.mjs +0 -17
  539. package/dist/helpers/index.d.mts +1 -2
  540. package/dist/helpers/index.mjs +2 -3
  541. package/dist/helpers/merge-props.d.mts +2 -2
  542. package/dist/helpers/merge-props.mjs +2 -37
  543. package/dist/helpers/merge-refs.d.mts +2 -3
  544. package/dist/helpers/merge-refs.mjs +0 -32
  545. package/dist/hooks/click-away/index.d.mts +2 -3
  546. package/dist/hooks/controllable-state/index.d.mts +2 -2
  547. package/dist/hooks/controllable-state/index.mjs +9 -11
  548. package/dist/hooks/index.d.mts +2 -20
  549. package/dist/hooks/index.mjs +2 -19
  550. package/dist/hooks/writing-mode/index.d.mts +15 -5
  551. package/dist/hooks/writing-mode/index.mjs +21 -14
  552. package/dist/i18n/current.d.mts +23 -0
  553. package/dist/i18n/current.mjs +43 -0
  554. package/dist/i18n/en.d.mts +2 -3
  555. package/dist/i18n/en.mjs +46 -0
  556. package/dist/i18n/index.d.mts +3 -2
  557. package/dist/i18n/index.mjs +4 -3
  558. package/dist/i18n/ja.d.mts +2 -3
  559. package/dist/i18n/ja.mjs +46 -0
  560. package/dist/i18n/messages.d.mts +81 -3
  561. package/dist/i18n/usage.d.mts +8 -0
  562. package/dist/i18n/usage.mjs +131 -0
  563. package/dist/index.d.mts +29 -34
  564. package/dist/index.mjs +32 -35
  565. package/dist/integrations/_shared/openui-defs.d.mts +3 -4
  566. package/dist/integrations/_shared/openui-defs.mjs +123 -54
  567. package/dist/integrations/_shared/renderers.css +50 -0
  568. package/dist/integrations/_shared/renderers.d.mts +71 -52
  569. package/dist/integrations/_shared/renderers.mjs +288 -30
  570. package/dist/integrations/_shared/renderers.module.mjs +14 -0
  571. package/dist/integrations/_shared/schemas.d.mts +384 -102
  572. package/dist/integrations/_shared/schemas.mjs +165 -27
  573. package/dist/integrations/ai-sdk/index.d.mts +2 -2
  574. package/dist/integrations/ai-sdk/index.mjs +1 -2
  575. package/dist/integrations/ai-sdk/map-parts.d.mts +25 -7
  576. package/dist/integrations/ai-sdk/map-parts.mjs +28 -3
  577. package/dist/integrations/json-render/catalog.d.mts +336 -17
  578. package/dist/integrations/json-render/catalog.mjs +120 -57
  579. package/dist/integrations/json-render/registry.d.mts +3 -4
  580. package/dist/integrations/json-render/registry.mjs +38 -4
  581. package/dist/integrations/openui/form-views.d.mts +23 -18
  582. package/dist/integrations/openui/form-views.mjs +27 -3
  583. package/dist/integrations/openui/library.d.mts +59 -6
  584. package/dist/integrations/openui/library.mjs +18 -3
  585. package/dist/integrations/openui/prompt.d.mts +2 -3
  586. package/dist/internal/accepts-file.d.mts +8 -0
  587. package/dist/internal/accepts-file.mjs +19 -0
  588. package/dist/internal/carries-files.d.mts +3 -0
  589. package/dist/internal/carries-files.mjs +4 -0
  590. package/dist/internal/clamp.d.mts +2 -3
  591. package/dist/internal/clamp.mjs +0 -11
  592. package/dist/internal/commit-input-value.d.mts +10 -0
  593. package/dist/internal/commit-input-value.mjs +15 -0
  594. package/dist/internal/dropped-files.d.mts +3 -0
  595. package/dist/internal/dropped-files.mjs +8 -0
  596. package/dist/internal/focus-trap.d.mts +5 -6
  597. package/dist/internal/focus-trap.mjs +4 -4
  598. package/dist/internal/hex-color.d.mts +22 -0
  599. package/dist/internal/hex-color.mjs +53 -0
  600. package/dist/internal/iso-date.d.mts +39 -0
  601. package/dist/internal/iso-date.mjs +98 -0
  602. package/dist/internal/to-precision.d.mts +2 -3
  603. package/dist/internal/to-precision.mjs +0 -8
  604. package/dist/styles/index.css +513 -2526
  605. package/dist/styles/tailwind.css +217 -17
  606. package/dist/styles/tokens.d.mts +1 -2
  607. package/dist/styles/tokens.mjs +1 -2
  608. package/dist/types/variables.d.mts +7 -9
  609. package/docs/GUIDE.md +239 -72
  610. package/docs/llms.txt +11 -7
  611. package/docs/props.generated.json +2156 -309
  612. package/docs/references/ai-chat.md +345 -62
  613. package/docs/references/color.md +222 -78
  614. package/docs/references/components.md +1667 -242
  615. package/docs/references/generative-ui.md +126 -17
  616. package/docs/references/interaction-design.md +65 -35
  617. package/docs/references/spatial-design.md +83 -63
  618. package/docs/references/types.md +101 -0
  619. package/docs/references/typography.md +159 -51
  620. package/package.json +65 -63
  621. package/dist/components/_internal/focus-ring.d.mts +0 -8
  622. package/dist/components/_internal/focus-ring.mjs +0 -8
  623. package/dist/components/layout/scroll-linked/index.d.mts +0 -2
  624. package/dist/components/layout/scroll-linked/index.mjs +0 -2
  625. package/dist/components/layout/scroll-linked/scroll-linked.d.mts +0 -14
  626. package/dist/components/layout/scroll-linked/scroll-linked.mjs +0 -59
  627. package/dist/helpers/cn.d.mts +0 -5
  628. package/dist/helpers/cn.mjs +0 -27
  629. package/dist/hooks/breakpoint/index.d.mts +0 -5
  630. package/dist/hooks/breakpoint/index.mjs +0 -24
  631. package/dist/hooks/client/index.d.mts +0 -4
  632. package/dist/hooks/client/index.mjs +0 -6
  633. package/dist/hooks/clipboard/index.d.mts +0 -7
  634. package/dist/hooks/clipboard/index.mjs +0 -15
  635. package/dist/hooks/debounced-transition/index.d.mts +0 -5
  636. package/dist/hooks/debounced-transition/index.mjs +0 -49
  637. package/dist/hooks/deferred-debounce/index.d.mts +0 -4
  638. package/dist/hooks/deferred-debounce/index.mjs +0 -9
  639. package/dist/hooks/disclosure/index.d.mts +0 -10
  640. package/dist/hooks/disclosure/index.mjs +0 -20
  641. package/dist/hooks/hover/index.d.mts +0 -12
  642. package/dist/hooks/hover/index.mjs +0 -19
  643. package/dist/hooks/intersection-observer/index.d.mts +0 -3
  644. package/dist/hooks/intersection-observer/index.mjs +0 -3
  645. package/dist/hooks/intersection-observer/use-in-view.d.mts +0 -11
  646. package/dist/hooks/intersection-observer/use-in-view.mjs +0 -18
  647. package/dist/hooks/intersection-observer/use-intersection-observer.d.mts +0 -11
  648. package/dist/hooks/intersection-observer/use-intersection-observer.mjs +0 -33
  649. package/dist/hooks/interval/index.d.mts +0 -4
  650. package/dist/hooks/interval/index.mjs +0 -19
  651. package/dist/hooks/resize/index.d.mts +0 -8
  652. package/dist/hooks/resize/index.mjs +0 -24
  653. package/dist/hooks/scroll-direction/index.d.mts +0 -13
  654. package/dist/hooks/scroll-direction/index.mjs +0 -67
  655. package/dist/hooks/scroll-lock/index.d.mts +0 -9
  656. package/dist/hooks/scroll-lock/index.mjs +0 -59
  657. package/dist/hooks/step/index.d.mts +0 -15
  658. package/dist/hooks/step/index.mjs +0 -39
  659. package/dist/hooks/timeout/index.d.mts +0 -4
  660. package/dist/hooks/timeout/index.mjs +0 -19
  661. package/dist/hooks/window-resize/index.d.mts +0 -11
  662. package/dist/hooks/window-resize/index.mjs +0 -21
  663. package/dist/hooks/window-size/index.d.mts +0 -8
  664. package/dist/hooks/window-size/index.mjs +0 -31
  665. package/dist/i18n/context.d.mts +0 -9
  666. package/dist/i18n/context.mjs +0 -19
  667. package/dist/styles/base.css +0 -315
  668. package/dist/styles/tokens.css +0 -380
  669. package/dist/styles/tokens.generated.d.mts +0 -840
  670. package/dist/styles/tokens.generated.mjs +0 -813
  671. package/dist/styles/utilities.css +0 -62
  672. package/docs/references/helpers.md +0 -223
  673. package/docs/references/hooks.md +0 -301
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @k8ordo/ui
2
2
 
3
3
  React components from [k8ordo](https://ordo.k8o.me) — semantic design
4
- tokens, built-in Japanese/English wording, and adapters that let an LLM generate
4
+ tokens, built-in wording that follows `@k8ordo/i18n` (Japanese and English included), and adapters that let an LLM generate
5
5
  on-brand UIs.
6
6
 
7
7
  Like every k8ordo package it assumes React 19 and Server Components, uses only
@@ -22,63 +22,75 @@ yarn add @k8ordo/ui
22
22
 
23
23
  ## Peer Dependencies
24
24
 
25
- Only React is required:
25
+ Only React and `@k8ordo/i18n` are required:
26
26
 
27
27
  ```bash
28
- npm install react react-dom
28
+ npm install react react-dom @k8ordo/i18n
29
29
  ```
30
30
 
31
- | Package | Version |
32
- | ----------- | ------- |
33
- | `react` | ≥19.2.6 |
34
- | `react-dom` | ≥19.2.6 |
35
-
36
31
  Everything else is an optional peer, needed only for the entry point that uses
37
32
  it. Install one when you import the entry it belongs to.
38
33
 
39
- | Package | Version | Needed for |
40
- | ----------------------------------------- | -------- | ----------------------------------------------------------------------------- |
41
- | `typescript` | ≥7.0.2 | the shipped type declarations |
42
- | `@types/react` | ≥19.2.18 | the shipped type declarations |
43
- | `@types/react-dom` | ≥19.2.4 | the shipped type declarations |
44
- | `tailwindcss` | ≥4.3.3 | the `tailwind.css` entry (see [Imports & Bundle Size](#imports--bundle-size)) |
45
- | `zod` | ≥4.4.3 | generative-UI schemas |
46
- | `@json-render/core`, `@json-render/react` | ≥0.19.0 | `@k8ordo/ui/json-render` |
47
- | `@openuidev/lang-core` | ≥0.2.10 | `@k8ordo/ui/openui` |
48
- | `@openuidev/react-lang` | ≥0.2.9 | `@k8ordo/ui/openui` |
49
- | `ai` | ≥7.0.51 | `@k8ordo/ui/ai-sdk` |
50
- | `streamdown` | ≥2.5.0 | `@k8ordo/ui/ai/response` |
51
-
52
- The `styles.css` entry needs no peer at all — it is prebuilt CSS, so CSS Modules
53
- and plain-CSS projects can use the components without Tailwind.
34
+ <!-- peers -->
35
+
36
+ | Package | Version | Required | Needed for |
37
+ | ----------------------- | --------------- | -------- | ------------------------------------------------- |
38
+ | `react` | ≥19.3.0 | yes | the components and hooks |
39
+ | `react-dom` | ≥19.3.0 | yes | portals and `useFormStatus` |
40
+ | `@k8ordo/i18n` | ^1.1.0 | yes | the locale the components' own wording is read in |
41
+ | `typescript` | ≥7.0.0 | optional | the shipped type declarations |
42
+ | `@types/react` | ≥19.3.0 | optional | the shipped type declarations |
43
+ | `@types/react-dom` | ≥19.3.0 | optional | the shipped type declarations |
44
+ | `zod` | ^4.6.6 | optional | generative-UI schemas |
45
+ | `@json-render/core` | ≥0.21.0 <0.22.0 | optional | `@k8ordo/ui/json-render` |
46
+ | `@json-render/react` | ≥0.21.0 <0.22.0 | optional | `@k8ordo/ui/json-render` |
47
+ | `@openuidev/lang-core` | ^1.0.0 | optional | `@k8ordo/ui/openui`, `@k8ordo/ui/openui/prompt` |
48
+ | `@openuidev/react-lang` | ^1.0.0 | optional | `@k8ordo/ui/openui` |
49
+ | `ai` | ≥7.0.51 | optional | `@k8ordo/ui/ai-sdk` |
50
+ | `streamdown` | ≥2.5.0 | optional | `@k8ordo/ui/ai/response` |
51
+
52
+ <!-- /peers -->
53
+
54
+ The generative-UI peers are 0.x, where a minor bump is a breaking release, so
55
+ the declared range stops at the next minor: `@k8ordo/ui` only claims the line it
56
+ is tested against. Resolve exactly **one copy** of each — the adapters read the
57
+ framework's own React context, so two copies let every schema check and the
58
+ build pass while the form views throw at render time.
59
+
60
+ The components need no CSS tooling of their own: they are written in CSS Modules
61
+ and ship compiled CSS, which each component imports. The package does not
62
+ depend on `tailwindcss`, not even for the optional `tailwind.css` entry, which
63
+ reads the Tailwind your project already has.
54
64
 
55
65
  ## Quick Start
56
66
 
57
67
  1. Import the CSS and set up the provider.
58
68
 
59
- **No Tailwind in your project?** Import the prebuilt stylesheet — this single
60
- line is all you need. It works with CSS Modules or plain CSS: every library
61
- rule sits in `@layer`, so your own (unlayered) CSS takes precedence, and the
62
- design tokens are available as CSS custom properties (`var(--fg-mute)`, …).
69
+ Import `styles.css` once — the layer order, the design tokens, a reset, and the
70
+ page-wide defaults. Each component brings its own CSS through its JavaScript
71
+ import, so a page loads only the CSS of the components it uses. Every library
72
+ rule sits in a cascade layer (`components` for the components), so your own
73
+ (unlayered) CSS takes precedence, and the design tokens are available as CSS
74
+ custom properties (`var(--color-fg-mute)`, `calc(var(--spacing) * 6)`, …).
63
75
 
64
76
  ```css
65
77
  @import '@k8ordo/ui/styles.css';
66
78
  ```
67
79
 
68
- **Using Tailwind CSS 4?** Import the source entry instead. It includes
69
- `@import 'tailwindcss'`, and it keeps the design tokens usable as Tailwind
70
- classes (`bg-bg-base`, …) in your own markup. Append your sources after the
71
- import to add your own utility classes:
80
+ **Using Tailwind CSS 4?** Import the bridge after Tailwind, instead of
81
+ `styles.css`. It includes `styles.css`, and its theme makes the design tokens
82
+ usable as Tailwind classes (`bg-bg-base`, `text-md`, `p-6`, …) in your own
83
+ markup:
72
84
 
73
85
  ```css
86
+ @import 'tailwindcss';
74
87
  @import '@k8ordo/ui/tailwind.css';
75
- @source './src';
76
88
  ```
77
89
 
78
- Note that either entry applies a document-wide base: Tailwind preflight plus
79
- the library base layer (margins/list styles/heading sizes reset, `b`/`strong`
80
- weight and `i`/`em` style unset, `body` typography defaults). Adding it to an
81
- existing app restyles more than the library components.
90
+ Note that `styles.css` applies a document-wide base: a reset with the same
91
+ rules as Tailwind's preflight, plus the library base layer (`b`/`strong` weight
92
+ and `i`/`em` style unset, `body` typography defaults). Adding it to an existing
93
+ app restyles more than the library components.
82
94
 
83
95
  ```tsx
84
96
  // In your app entry point
@@ -112,40 +124,20 @@ function MyPage() {
112
124
 
113
125
  ## Internationalization (i18n)
114
126
 
115
- The wording that components own internally — "close", "required", "loading", and so on — comes from a message dictionary. **It defaults to Japanese**, and that default applies even without a provider, so a Japanese app needs no setup at all.
127
+ The wording that components own internally — "close", "required", "loading", and so on — is read in [`@k8ordo/i18n`](https://ordo.k8o.me/i18n)'s current locale. There is no provider and nothing to pass:
116
128
 
117
- To switch to English, pass the `en` dictionary from `@k8ordo/ui/i18n`:
129
+ - an application that defines its locale set with `defineLocales` gets the locale its messages render in;
130
+ - an application that defines none gets **English**, whatever its URL starts with.
118
131
 
119
- ```tsx
120
- import { UIProvider } from '@k8ordo/ui';
121
- import { en } from '@k8ordo/ui/i18n';
132
+ `ja` and `en` ship with the library. Register any other locale, or replace a built-in one, next to where the set is defined:
122
133
 
123
- function App() {
124
- return (
125
- <UIProvider messages={en}>
126
- <YourApp />
127
- </UIProvider>
128
- );
129
- }
130
- ```
134
+ ```ts
135
+ import { en, registerMessages } from '@k8ordo/ui/i18n';
131
136
 
132
- `messages` takes a `Partial<Messages>`, so you can spread a dictionary and override only the keys you care about:
133
-
134
- ```tsx
135
- <UIProvider messages={{ ...en, close: 'Dismiss' }}>
136
- <YourApp />
137
- </UIProvider>
137
+ registerMessages('en', { ...en, close: 'Dismiss' });
138
138
  ```
139
139
 
140
- Resolution order is **component prop > provider dictionary > built-in default (Japanese)**. Components that expose a wording prop of their own — `Spinner`'s `label`, `Alert`'s `closeLabel`, `PasswordInput`'s `showLabel` / `hideLabel`, `Pagination`'s `prevLabel` / `nextLabel` — take that prop over the dictionary.
141
-
142
- The subpath exports both dictionaries and the type:
143
-
144
- ```tsx
145
- import { en, ja, type Messages } from '@k8ordo/ui/i18n';
146
- ```
147
-
148
- `ja` / `en` live behind `@k8ordo/ui/i18n` rather than the root entry so the dictionaries stay out of the main bundle. See [docs/references/components.md](docs/references/components.md) for the full key list.
140
+ Resolution order is **component prop > registered dictionary > built-in dictionary**. Components that expose a wording prop of their own — `Spinner`'s `label`, `Alert`'s `closeLabel`, `PasswordInput`'s `showLabel` / `hideLabel`, `Pagination`'s `prevLabel` / `nextLabel` — take it over the dictionary. `getMessages()` returns the wording in effect for elements you draw yourself; it is not a hook, so a Server Component calls it too. See [docs/references/components.md](docs/references/components.md) for the full key list.
149
141
 
150
142
  ## AI Agent Documentation
151
143
 
@@ -159,8 +151,9 @@ Point your agent at it once by pasting this into your project's `CLAUDE.md` /
159
151
  Use `@k8ordo/ui` for UI. Before writing or changing UI, read
160
152
  `node_modules/@k8ordo/ui/docs/GUIDE.md`, then follow only the
161
153
  `docs/references/*.md` links it lists that the task actually needs.
162
- Colors, spacing, radii and font weights go through semantic tokens —
163
- never raw values such as `bg-teal-500` or `font-semibold`.
154
+ Colors, spacing, radii and font weights go through the semantic tokens
155
+ (`var(--color-fg-mute)`, `calc(var(--spacing) * 6)`) — never raw values or
156
+ the palette (`--teal-500`).
164
157
  Look up component props in `docs/references/components.md` instead of
165
158
  recalling them; a component that is not listed there does not exist.
166
159
  ```
@@ -191,73 +184,113 @@ stories and rendered props rather than relying on trained knowledge:
191
184
 
192
185
  ## Component Categories
193
186
 
187
+ Every component, grouped by its folder in `src/components/`. Each links to its
188
+ entry in [docs/references/components.md](docs/references/components.md).
189
+
190
+ <!-- generated:component-categories -->
191
+
194
192
  ### Buttons
195
193
 
196
- - **Button** - Primary action button (use `renderItem` to render as a link)
197
- - **IconButton** - Button with icon only (use `renderItem` to render as a link)
194
+ - [Button](docs/references/components.md#button)
195
+ - [CopyButton](docs/references/components.md#copybutton)
196
+ - [IconButton](docs/references/components.md#iconbutton)
197
+ - [Toolbar](docs/references/components.md#toolbar)
198
198
 
199
199
  ### Navigation
200
200
 
201
- - **Anchor** - Text link with external-link awareness
202
- - **Breadcrumb** - Navigation path indicator
203
- - **Pagination** - Page navigation controls
204
- - **Tabs** - Tab-based content organization
205
-
206
- ### Form Controls
207
-
208
- - **Autocomplete** - Search with suggestions
209
- - **Checkbox** / **CheckboxCard** / **CheckboxGroup** - Multi-selection inputs
210
- - **FileField** - File upload with composite pattern
211
- - **Form** / **FormControl** - Form wrapper and field with label/validation
212
- - **NumberField** - Numeric input with controls
213
- - **PasswordInput** - Password input with show/hide toggle
214
- - **Radio** / **RadioCard** - Single-selection inputs
215
- - **Select** - Dropdown selection
216
- - **Slider** - Slider input control
217
- - **Switch** - Toggle switch
218
- - **TextField** - Single-line text input
219
- - **Textarea** - Multi-line text input
220
-
221
- ### Data Display
222
-
223
- - **Accordion** - Collapsible content panels
224
- - **Avatar** - User/entity avatar
225
- - **Badge** - Status/label indicator
226
- - **Card** - Flexible content container (hover interaction via `interactive`)
227
- - **Code** - Formatted code display
228
- - **Heading** - Typography heading component
229
- - **Table** - Tabular data display
201
+ - [Anchor](docs/references/components.md#anchor)
202
+ - [Breadcrumb](docs/references/components.md#breadcrumb)
203
+ - [Pagination](docs/references/components.md#pagination)
204
+ - [SideNav](docs/references/components.md#sidenav)
205
+ - [Stepper](docs/references/components.md#stepper)
206
+ - [TableOfContents](docs/references/components.md#tableofcontents)
207
+ - [Tabs](docs/references/components.md#tabs)
208
+
209
+ ### Forms
210
+
211
+ - [Autocomplete](docs/references/components.md#autocomplete)
212
+ - [Calendar](docs/references/components.md#calendar)
213
+ - [Checkbox](docs/references/components.md#checkbox)
214
+ - [CheckboxCard](docs/references/components.md#checkboxcard)
215
+ - [CheckboxGroup](docs/references/components.md#checkboxgroup)
216
+ - [ColorPicker](docs/references/components.md#colorpicker)
217
+ - [Combobox](docs/references/components.md#combobox)
218
+ - [DateField](docs/references/components.md#datefield)
219
+ - [DatePicker](docs/references/components.md#datepicker)
220
+ - [FileField](docs/references/components.md#filefield)
221
+ - [Form](docs/references/components.md#form)
222
+ - [FormControl](docs/references/components.md#formcontrol)
223
+ - [NumberField](docs/references/components.md#numberfield)
224
+ - [PasswordInput](docs/references/components.md#passwordinput)
225
+ - [Radio](docs/references/components.md#radio)
226
+ - [RadioCard](docs/references/components.md#radiocard)
227
+ - [RangeSlider](docs/references/components.md#rangeslider)
228
+ - [Select](docs/references/components.md#select)
229
+ - [Slider](docs/references/components.md#slider)
230
+ - [Switch](docs/references/components.md#switch)
231
+ - [Textarea](docs/references/components.md#textarea)
232
+ - [TextField](docs/references/components.md#textfield)
233
+
234
+ ### Data display
235
+
236
+ - [Accordion](docs/references/components.md#accordion)
237
+ - [Avatar](docs/references/components.md#avatar)
238
+ - [Badge](docs/references/components.md#badge)
239
+ - [Card](docs/references/components.md#card)
240
+ - [Carousel](docs/references/components.md#carousel)
241
+ - [Code](docs/references/components.md#code)
242
+ - [CodeBlock](docs/references/components.md#codeblock)
243
+ - [DataTable](docs/references/components.md#datatable)
244
+ - [Heading](docs/references/components.md#heading)
245
+ - [Kbd](docs/references/components.md#kbd)
246
+ - [Prose](docs/references/components.md#prose)
247
+ - [Table](docs/references/components.md#table)
248
+ - [Tree](docs/references/components.md#tree)
230
249
 
231
250
  ### Feedback
232
251
 
233
- - **Alert** - Important messages and notifications
234
- - **Progress** - Progress indication
235
- - **Skeleton** - Content loading placeholder
236
- - **Spinner** - Loading indicator
237
- - **ToastProvider** / **useToast** - Temporary notification messages
252
+ - [Alert](docs/references/components.md#alert)
253
+ - [Callout](docs/references/components.md#callout)
254
+ - [EmptyState](docs/references/components.md#emptystate)
255
+ - [Progress](docs/references/components.md#progress)
256
+ - [Skeleton](docs/references/components.md#skeleton)
257
+ - [Spinner](docs/references/components.md#spinner)
258
+ - [ToastProvider](docs/references/components.md#toastprovider)
238
259
 
239
260
  ### Overlays
240
261
 
241
- - **Dialog** - Modal dialog boxes
242
- - **Drawer** - Slide-out panel
243
- - **DropdownMenu** - Action menu component
244
- - **ListBox** - Selectable list component
245
- - **Modal** - Overlay modal component
246
- - **Popover** - Floating content container
247
- - **Tooltip** - Contextual help text
262
+ - [CommandPalette](docs/references/components.md#commandpalette)
263
+ - [ContextMenu](docs/references/components.md#contextmenu)
264
+ - [Dialog](docs/references/components.md#dialog)
265
+ - [Drawer](docs/references/components.md#drawer)
266
+ - [DropdownMenu](docs/references/components.md#dropdownmenu)
267
+ - [ListBox](docs/references/components.md#listbox)
268
+ - [Modal](docs/references/components.md#modal)
269
+ - [Popover](docs/references/components.md#popover)
270
+ - [Tooltip](docs/references/components.md#tooltip)
248
271
 
249
272
  ### Layout
250
273
 
251
- - **Grid** - CSS grid with token-based gaps and responsive auto-fill/auto-fit columns
252
- - **Stack** - Flex layout with token-based gaps
253
- - **ScrollLinked** - Scroll progress indicator
254
- - **Separator** - Visual content divider
274
+ - [Grid](docs/references/components.md#grid)
275
+ - [ResizablePanels](docs/references/components.md#resizablepanels)
276
+ - [Separator](docs/references/components.md#separator)
277
+ - [Stack](docs/references/components.md#stack)
278
+
279
+ ### Observers
280
+
281
+ - [InView](docs/references/components.md#inview)
282
+ - [Resize](docs/references/components.md#resize)
283
+
284
+ ### Icons
255
285
 
256
- ### Utilities
286
+ - [Icons](docs/references/components.md#icons) — decorative icon components (`CloseIcon`, `ChevronIcon`, …)
257
287
 
258
- - **UIProvider** - Root provider for the library
259
- - **PortalRootProvider** / **usePortalRoot** - Customize the portal mount root
260
- - **Icons** - Icon component collection
288
+ ### Providers
289
+
290
+ - [PortalRootProvider](docs/references/components.md#portalrootprovider)
291
+ - [UIProvider](docs/references/components.md#uiprovider)
292
+
293
+ <!-- /generated:component-categories -->
261
294
 
262
295
  ## Usage Examples
263
296
 
@@ -339,40 +372,44 @@ function MyComponent() {
339
372
 
340
373
  ## Imports & Bundle Size
341
374
 
342
- All components and hooks ship from a single ESM entry point — there are no per-component subpaths. The package is tree-shakeable (`sideEffects` is limited to CSS), so bundlers drop everything you don't import:
375
+ The core UI components ship from the root entry — there are no per-component subpaths; the AI chat components live under `@k8ordo/ui/ai`, with `Response` under `@k8ordo/ui/ai/response`, and `CodeBlock` under `@k8ordo/ui/code-block` so the highlighter stays out of everything else. The package is tree-shakeable (`sideEffects` is limited to CSS), so bundlers drop everything you don't import — the CSS too, since each component imports its own stylesheet:
343
376
 
344
377
  ```tsx
345
378
  // Named imports from the root entry — unused exports are tree-shaken away
346
- import { Button, Card, useClickAway, useDisclosure } from '@k8ordo/ui';
379
+ import { Button, Card, Stack } from '@k8ordo/ui';
347
380
  ```
348
381
 
349
382
  Optional features live behind dedicated subpath exports:
350
383
 
351
- | Subpath | Contents |
352
- | --------------------------------- | --------------------------------------------------------------- |
353
- | `@k8ordo/ui` | All components and hooks |
354
- | `@k8ordo/ui/tokens` | Design token definitions |
355
- | `@k8ordo/ui/i18n` | Message dictionaries (`ja` / `en`) and the `Messages` type |
356
- | `@k8ordo/ui/ai` | AI chat components |
357
- | `@k8ordo/ui/ai/response` | `Response` Markdown renderer (needs optional peer `streamdown`) |
358
- | `@k8ordo/ui/ai-sdk` | AI SDK adapter (needs optional peer `ai`) |
359
- | `@k8ordo/ui/json-render` | json-render catalog (server-safe) |
360
- | `@k8ordo/ui/json-render/registry` | json-render registry (`'use client'`) |
361
- | `@k8ordo/ui/openui` | OpenUI library (`'use client'`) |
362
- | `@k8ordo/ui/openui/prompt` | OpenUI prompt generation (server-safe) |
363
- | `@k8ordo/ui/styles.css` | Prebuilt stylesheet (no Tailwind required) |
364
- | `@k8ordo/ui/tailwind.css` | Tailwind source entry (requires Tailwind CSS 4) |
384
+ | Subpath | Contents |
385
+ | --------------------------------- | ----------------------------------------------------------------------------------------- |
386
+ | `@k8ordo/ui` | Core UI components, their types, and provider hooks |
387
+ | `@k8ordo/ui/tokens` | Design tokens as a DTCG resolver document |
388
+ | `@k8ordo/ui/props.json` | Every component's props as JSON, generated from the types |
389
+ | `@k8ordo/ui/i18n` | `ja` / `en`, `registerMessages`, `getMessages`, `messageUsage`, and the `Messages` type |
390
+ | `@k8ordo/ui/ai` | AI chat components |
391
+ | `@k8ordo/ui/ai/response` | `Response` Markdown renderer (needs optional peer `streamdown`) |
392
+ | `@k8ordo/ui/ai-sdk` | AI SDK adapter (needs optional peer `ai`) |
393
+ | `@k8ordo/ui/code-block` | `CodeBlock`, highlighted on the server with shiki (Server Component) |
394
+ | `@k8ordo/ui/json-render` | json-render catalog (server-safe) |
395
+ | `@k8ordo/ui/json-render/registry` | json-render registry (`'use client'`) |
396
+ | `@k8ordo/ui/openui` | OpenUI library (`'use client'`) |
397
+ | `@k8ordo/ui/openui/prompt` | OpenUI prompt generation (server-safe) |
398
+ | `@k8ordo/ui/styles.css` | Layer order, tokens, reset and base (required) |
399
+ | `@k8ordo/ui/tailwind.css` | Tailwind CSS 4 bridge, imported after Tailwind: `styles.css` and utilities for the tokens |
365
400
 
366
401
  ## AI Chat Components
367
402
 
368
403
  `@k8ordo/ui/ai` ships building blocks for chat UIs:
369
404
 
370
405
  - **Conversation** (`Root` / `Messages` / `ScrollButton`) - Scroll container with stick-to-bottom behavior and a scroll-to-bottom button
371
- - **Message** (`Root` / `Content`) - Chat bubble, styled by `from="user" | "assistant"`
372
- - **PromptInput** (`Root` / `Textarea` / `Submit`) - Message input form with IME-aware Enter-to-send and a stop button while streaming
406
+ - **Message** (`Root` / `Content` / `Actions` / `Action` / `Copy` / `Regenerate` / `Feedback`) - Chat bubble, styled by `from="user" | "assistant"`, with an optional `avatar`; `Actions` holds copy, regenerate, and good/bad feedback under the message
407
+ - **PromptInput** (`Root` / `Attachments` / `Attach` / `Textarea` / `Submit`) - Message input form with IME-aware Enter-to-send and a stop button while streaming; pass `accept` to take attachments from a file picker, drag and drop, or paste
373
408
  - **Reasoning** - Collapsible display of the model's thinking text
374
409
  - **Suggestion** (`List` / `Item`) - Suggested prompt chips
375
- - **ToolInvocation** - Tool call display with input/output and `state` (`'input-streaming' | 'input-available' | 'output-available' | 'output-error'`)
410
+ - **ToolInvocation** - Tool call display with input/output and `state` (`'input-streaming' | 'input-available' | 'approval-requested' | 'approval-responded' | 'output-available' | 'output-error' | 'output-denied'`); with `approval` and `onApprovalResponse` it asks the user to allow or deny the call and answers with the approval `id`
411
+ - **Attachment** (`List` / `Item`) - Files attached to a message: image thumbnails, or a name and media-type chip
412
+ - **Source** (`List` / `Item`) - The sources a response cites, as links (http(s) only) or document titles
376
413
  - **Response** (from `@k8ordo/ui/ai/response`) - Streaming-safe Markdown renderer built on streamdown
377
414
 
378
415
  Two of these need optional peer dependencies:
@@ -421,18 +458,17 @@ function Chat() {
421
458
  }
422
459
  ```
423
460
 
424
- To render assistant Markdown, wrap it in `Response` (children must be a string). Besides installing `streamdown`, import its stylesheet once and register its classes with Tailwind. Note that `Response` is the one component that requires a Tailwind CSS 4 build (the `tailwind.css` entry plus the `@source` line below) — streamdown's styling lives in its own class names, which the prebuilt `styles.css` does not include:
461
+ To render assistant Markdown, wrap it in `Response` (children must be a string). It styles what streamdown renders itself, through the `data-streamdown` attribute on each element, so no Tailwind is involved; import `streamdown/styles.css` only if you turn on streamdown's `animated` option:
425
462
 
426
463
  ```tsx
427
464
  import { Response } from '@k8ordo/ui/ai/response';
428
- import 'streamdown/styles.css';
429
465
 
430
466
  <Message.Content>
431
467
  <Response isStreaming>{markdownText}</Response>
432
468
  </Message.Content>;
433
469
  ```
434
470
 
435
- `Response` forwards the rest of streamdown's props (`translations`, `controls`, `linkSafety`, `plugins`, …); only `className` and `mode` are owned by the library. Built-in labels come from the message dictionary, so they follow the app's language by default.
471
+ `Response` forwards the rest of streamdown's props (`translations`, `controls`, `linkSafety`, `plugins`, …); only `className`, `mode` and `portal` are owned by the library. Built-in labels come from the message dictionary, so they follow the app's language by default.
436
472
 
437
473
  `linkSafety` defaults to **disabled** here, unlike streamdown. With it enabled, links render as `<button>` instead of `<a>`, which loses ⌘-click, middle-click, "copy link address", and the `link` role for assistive tech. Dangerous schemes such as `javascript:` are neutralized by rehype-harden regardless, so links stay safe with the default. Opt in when you want the confirmation dialog:
438
474
 
@@ -440,12 +476,7 @@ import 'streamdown/styles.css';
440
476
  <Response linkSafety={{ enabled: true }}>{markdownText}</Response>
441
477
  ```
442
478
 
443
- ```css
444
- /* In your CSS entry (path is relative to the CSS file) */
445
- @source '../node_modules/streamdown/dist/*.js';
446
- ```
447
-
448
- With the [AI SDK](https://ai-sdk.dev), `mapMessageParts` from `@k8ordo/ui/ai-sdk` converts a `UIMessage` into a flat array of `{ kind: 'text' | 'reasoning' | 'tool', ... }` parts that map 1:1 onto `Response`, `Reasoning`, and `ToolInvocation`.
479
+ With the [AI SDK](https://ai-sdk.dev), `mapMessageParts` from `@k8ordo/ui/ai-sdk` converts a `UIMessage` into a flat array of `{ kind: 'text' | 'reasoning' | 'tool' | 'file' | 'source' | 'data', ... }` parts that map onto `Response`, `Reasoning`, `ToolInvocation`, `Attachment`, and `Source`; `data` parts are yours to render. A tool part keeps its `approval`, so `onApprovalResponse={addToolApprovalResponse}` answers the SDK directly.
449
480
 
450
481
  ## Generative UI integrations
451
482
 
@@ -456,19 +487,22 @@ These integrations are exposed as optional subpath exports. Install the framewor
456
487
  ```bash
457
488
  # json-render
458
489
  pnpm add @json-render/core @json-render/react zod
459
- # OpenUI
460
- pnpm add @openuidev/react-lang zod
461
- # OpenUI server-safe prompt entry (@k8ordo/ui/openui/prompt) additionally needs:
462
- pnpm add @openuidev/lang-core
490
+ # OpenUI (both entries import lang-core directly, so install both packages)
491
+ pnpm add @openuidev/react-lang @openuidev/lang-core zod
463
492
  ```
464
493
 
465
- Supported components (**all 49**, both frameworks):
494
+ Supported components (both frameworks):
466
495
 
467
- - **Layout / containers**: `Stack`, `Grid`, `Card`, `Form`
468
- - **Buttons / nav**: `Button`, `IconButton`, `Anchor`, `Breadcrumb`, `Pagination`
469
- - **Display**: `Badge`, `Heading`, `Avatar`, `Code`, `Icon`, `ChevronIcon`, `StatusIcon`, `Alert`, `Spinner`, `Progress`, `Skeleton`, `Separator`, `Tabs`, `Accordion`, `Table`, `ScrollLinked`
496
+ - **Layout / containers**: `Stack`, `Grid`, `Card`, `Form`, `Carousel`
497
+ - **Buttons / nav**: `Button`, `IconButton`, `CopyButton`, `Toolbar`, `Anchor`, `Breadcrumb`, `Pagination`, `Stepper`, `SideNav`
498
+ - **Display**: `Badge`, `Heading`, `Avatar`, `Code`, `Kbd`, `EmptyState`, `Icon`, `ChevronIcon`, `StatusIcon`, `Alert`, `Callout`, `Spinner`, `Progress`, `Skeleton`, `Separator`, `Tabs`, `Accordion`, `Table`, `DataTable`, `Tree`
470
499
  - **Overlays (self-contained widgets)**: `Modal`, `Dialog`, `Drawer`, `Popover`, `Tooltip`, `DropdownMenu`, `Toast`
471
- - **Form**: `TextField`, `Textarea`, `PasswordInput`, `NumberField`, `Slider`, `Checkbox`, `Switch`, `Select`, `Radio`, `RadioCard`, `CheckboxCard`, `ListBox`, `CheckboxGroup`, `Autocomplete`, `FileField`, `FormControl`
500
+ - **Form**: `TextField`, `Textarea`, `PasswordInput`, `NumberField`, `Slider`, `RangeSlider`, `DateField`, `DatePicker`, `Calendar`, `ColorPicker`, `Combobox`, `Checkbox`, `Switch`, `Select`, `Radio`, `RadioCard`, `CheckboxCard`, `ListBox`, `CheckboxGroup`, `Autocomplete`, `FileField`, `FormControl`
501
+
502
+ The rest of the exports — `CommandPalette`, `ContextMenu`, `ResizablePanels`, the
503
+ observers, the providers, and the AI chat components — are left out on purpose;
504
+ [docs/references/generative-ui.md](docs/references/generative-ui.md#what-the-catalog-leaves-out)
505
+ says why.
472
506
 
473
507
  Overlays are exposed as **self-contained widgets**: a `Modal`/`Dialog`/`Drawer`/`Popover` declares its own trigger button via `triggerLabel`, manages open/close internally, and renders the supplied children inside the surface. This lets a model generate UIs that include overlays without modelling imperative open/close state. `Tooltip`/`DropdownMenu`/`Toast` follow the same self-contained pattern (trigger + content).
474
508
 
@@ -490,9 +524,10 @@ const systemPrompt = catalog.prompt({ customRules: [...uiRules] });
490
524
  // `JsonRenderUI` wires JSONUIProvider + Renderer and the registry for you —
491
525
  // just pass a spec. Pass `onStateChange` to collect form values.
492
526
  'use client';
527
+ import type { UISpec } from '@k8ordo/ui/json-render';
493
528
  import { JsonRenderUI } from '@k8ordo/ui/json-render/registry';
494
529
 
495
- export function GenUi({ spec }: { spec: unknown }) {
530
+ export function GenUi({ spec }: { spec: UISpec }) {
496
531
  return <JsonRenderUI spec={spec} />;
497
532
  }
498
533
  ```
@@ -560,35 +595,8 @@ To generate the prompt inside the client bundle instead, `library.prompt()` stil
560
595
  > **Notes**
561
596
  >
562
597
  > - Make sure `@k8ordo/ui/styles.css` (or `tailwind.css` in Tailwind CSS 4 projects) is loaded and the app is wrapped in `UIProvider`.
563
- > - `@k8ordo/ui/openui/prompt` needs the optional peer `@openuidev/lang-core` (React-free).
598
+ > - Both OpenUI entries need `@openuidev/lang-core` — `openui/prompt` is the React-free one, and `openui` builds its component library with it. Install it alongside `@openuidev/react-lang`: pnpm will not resolve it for you just because `react-lang` depends on it.
564
599
  > - `Tabs` panels are text content (`tabs: [{ label, content }]`); rich-component panels are a future enhancement.
565
- > - In OpenUI, `Card` can contain a `Stack` or `Grid`, but `Stack`/`Grid` cannot directly nest a `Stack`/`Grid`/`Card` (no self-referential schemas) — put nested layout inside a `Card`. json-render nests freely (slots-based).
566
-
567
- ## Custom Hooks
568
-
569
- The library includes several useful hooks:
570
-
571
- - **useBreakpoint** - Tailwind breakpoint matcher
572
- - **useClickAway** - Detect clicks outside an element
573
- - **useClient** - Client-side rendering detection
574
- - **useClipboard** - Clipboard operations
575
- - **useControllableState** - Controlled/uncontrolled state pattern
576
- - **useDebouncedTransition** - Rate-limited transition with `AbortSignal`
577
- - **useDeferredDebounce** - `useDeferredValue` with pending flag
578
- - **useDisclosure** - Open/close/toggle disclosure state
579
- - **useHover** - Element hover detection
580
- - **useIntersectionObserver** / **useInView** - Element visibility
581
- - **useInterval** - Interval timer management
582
- - **useResize** - Element resize detection (ResizeObserver)
583
- - **useScrollDirection** - Scroll direction detection
584
- - **useScrollLock** - Body/element scroll lock
585
- - **useStep** - Step-based state management
586
- - **useTimeout** - Timeout management
587
- - **useWindowResize** - Window resize events
588
- - **useWindowSize** - Window size tracking
589
- - **useWritingMode** - Detect horizontal/vertical `writing-mode`
590
-
591
- State that lives in a place — the URL, a history entry, localStorage, memory — is [`@k8ordo/state`](https://www.npmjs.com/package/@k8ordo/state)'s job (`defineLocalState` and friends), not a hook here: a package that owned it twice would give an app two answers.
592
600
 
593
601
  ## Accessibility
594
602
 
@@ -603,11 +611,13 @@ All components follow WCAG accessibility guidelines:
603
611
 
604
612
  ## Styling & Customization
605
613
 
606
- Components are built with Tailwind CSS and support customization through:
614
+ Components are written in CSS Modules and placed in the `components` cascade
615
+ layer. Customize them through:
607
616
 
608
- - CSS custom properties (semantic design tokens)
609
- - Tailwind utility classes
610
- - Light / Dark mode via semantic color tokens
617
+ - CSS custom properties (semantic design tokens), overridden after `styles.css`
618
+ - `renderItem` / `renderAnchor`, which hand you the component's `className`
619
+ - Light / Dark mode via semantic color tokens (`.dark`)
620
+ - Tailwind utility classes on your own markup, through `tailwind.css`
611
621
 
612
622
  ## Development
613
623
 
@@ -0,0 +1,37 @@
1
+ @layer properties, theme, base;
2
+
3
+ @layer components {
4
+ .XbmKcG_ring:focus-visible {
5
+ box-shadow: var(--shadow-ring-info);
6
+ border-color: #0000;
7
+ outline-style: none;
8
+
9
+ @media (forced-colors: active) {
10
+ outline-offset: 2px;
11
+ outline: 2px solid #0000;
12
+ }
13
+ }
14
+
15
+ .XbmKcG_ringNoBorder:focus-visible {
16
+ box-shadow: var(--shadow-ring-info);
17
+ outline-style: none;
18
+
19
+ @media (forced-colors: active) {
20
+ outline-offset: 2px;
21
+ outline: 2px solid #0000;
22
+ }
23
+ }
24
+
25
+ .XbmKcG_ringWithin:focus-within {
26
+ box-shadow: var(--shadow-ring-info);
27
+ border-color: #0000;
28
+ outline-style: none;
29
+
30
+ @media (forced-colors: active) {
31
+ outline-offset: 2px;
32
+ outline: 2px solid #0000;
33
+ }
34
+ }
35
+ }
36
+
37
+ @layer utilities;
@@ -0,0 +1,9 @@
1
+ import './focus-ring.css';
2
+ //#region src/components/_internal/focus-ring.module.css
3
+ var focus_ring_module_default = {
4
+ "ring": "XbmKcG_ring",
5
+ "ringNoBorder": "XbmKcG_ringNoBorder",
6
+ "ringWithin": "XbmKcG_ringWithin"
7
+ };
8
+ //#endregion
9
+ export { focus_ring_module_default as default };
@@ -0,0 +1,34 @@
1
+ import { FC, RefObject } from "react";
2
+ //#region src/components/_internal/form-value.d.ts
3
+ type Props = {
4
+ name: string | undefined;
5
+ /** What the visible control holds now. */
6
+ values: readonly string[];
7
+ /**
8
+ * What a reset goes back to, and what the form measures dirtiness against.
9
+ * `undefined` for a controlled caller: the values it mounted with.
10
+ */
11
+ defaultValues: readonly string[] | undefined;
12
+ multiple: boolean;
13
+ required: boolean;
14
+ disabled: boolean;
15
+ /**
16
+ * Put the visible control's own state back to `defaultValues`. The browser
17
+ * restores this element itself.
18
+ */
19
+ onReset: () => void;
20
+ /** Where focus goes when the form focuses this element after a failure. */
21
+ focusTarget: RefObject<HTMLElement | null>;
22
+ };
23
+ /**
24
+ * The named control a composite component submits through. `type="hidden"`
25
+ * would not do: it is barred from constraint validation, it cannot take focus
26
+ * when the form moves to a failure, and with nothing selected there would be
27
+ * no element carrying the name at all — so neither `required` nor a rule could
28
+ * reach it. A `<select>` is always present, validates natively (`required`
29
+ * means "at least one"), restores itself on reset, and keeps the baseline in
30
+ * each option's `defaultSelected`, where dirtiness is read from.
31
+ */
32
+ export declare const FormValue: FC<Props>;
33
+ //#endregion
34
+ export {};