@k8ordo/ui 1.0.0 → 2.1.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 (651) hide show
  1. package/README.md +206 -171
  2. package/dist/_virtual/_rolldown/runtime.mjs +13 -0
  3. package/dist/components/_internal/focus-ring.css +37 -0
  4. package/dist/components/_internal/focus-ring.module.mjs +9 -0
  5. package/dist/components/_internal/form-value.d.mts +33 -0
  6. package/dist/components/_internal/form-value.mjs +91 -0
  7. package/dist/components/_internal/high-contrast.css +18 -0
  8. package/dist/components/_internal/high-contrast.module.mjs +5 -0
  9. package/dist/components/_internal/ignore-changes.d.mts +20 -0
  10. package/dist/components/_internal/ignore-changes.mjs +37 -0
  11. package/dist/components/_internal/nav-link.css +78 -0
  12. package/dist/components/_internal/nav-link.d.mts +5 -0
  13. package/dist/components/_internal/nav-link.mjs +8 -0
  14. package/dist/components/_internal/nav-link.module.mjs +14 -0
  15. package/dist/components/_internal/sr-only.css +17 -0
  16. package/dist/components/_internal/sr-only.module.mjs +5 -0
  17. package/dist/components/_internal/status-tone.css +37 -0
  18. package/dist/components/_internal/status-tone.d.mts +20 -0
  19. package/dist/components/_internal/status-tone.mjs +22 -0
  20. package/dist/components/_internal/status-tone.module.mjs +14 -0
  21. package/dist/components/ai/_internal/attachment-preview.css +75 -0
  22. package/dist/components/ai/_internal/attachment-preview.d.mts +14 -0
  23. package/dist/components/ai/_internal/attachment-preview.mjs +50 -0
  24. package/dist/components/ai/_internal/attachment-preview.module.mjs +14 -0
  25. package/dist/components/ai/_internal/collapsible.css +62 -0
  26. package/dist/components/ai/_internal/collapsible.d.mts +4 -3
  27. package/dist/components/ai/_internal/collapsible.mjs +42 -33
  28. package/dist/components/ai/_internal/collapsible.module.mjs +12 -0
  29. package/dist/components/ai/_internal/icons.d.mts +7 -0
  30. package/dist/components/ai/_internal/icons.mjs +14 -0
  31. package/dist/components/ai/_internal/streaming-cursor.css +28 -0
  32. package/dist/components/ai/_internal/streaming-cursor.d.mts +2 -3
  33. package/dist/components/ai/_internal/streaming-cursor.mjs +2 -1
  34. package/dist/components/ai/_internal/streaming-cursor.module.mjs +8 -0
  35. package/dist/components/ai/attachment/attachment.css +17 -0
  36. package/dist/components/ai/attachment/attachment.d.mts +14 -0
  37. package/dist/components/ai/attachment/attachment.mjs +25 -0
  38. package/dist/components/ai/attachment/attachment.module.mjs +8 -0
  39. package/dist/components/ai/attachment/index.d.mts +13 -0
  40. package/dist/components/ai/attachment/index.mjs +8 -0
  41. package/dist/components/ai/conversation/conversation.css +71 -0
  42. package/dist/components/ai/conversation/conversation.d.mts +8 -11
  43. package/dist/components/ai/conversation/conversation.mjs +39 -40
  44. package/dist/components/ai/conversation/conversation.module.mjs +11 -0
  45. package/dist/components/ai/conversation/index.d.mts +15 -2
  46. package/dist/components/ai/conversation/index.mjs +8 -1
  47. package/dist/components/ai/index.d.mts +8 -10
  48. package/dist/components/ai/index.mjs +7 -5
  49. package/dist/components/ai/message/index.d.mts +39 -2
  50. package/dist/components/ai/message/index.mjs +12 -1
  51. package/dist/components/ai/message/message.css +71 -0
  52. package/dist/components/ai/message/message.d.mts +33 -5
  53. package/dist/components/ai/message/message.mjs +98 -12
  54. package/dist/components/ai/message/message.module.mjs +18 -0
  55. package/dist/components/ai/prompt-input/index.d.mts +31 -2
  56. package/dist/components/ai/prompt-input/index.mjs +10 -1
  57. package/dist/components/ai/prompt-input/prompt-input.css +101 -0
  58. package/dist/components/ai/prompt-input/prompt-input.d.mts +15 -8
  59. package/dist/components/ai/prompt-input/prompt-input.mjs +152 -42
  60. package/dist/components/ai/prompt-input/prompt-input.module.mjs +15 -0
  61. package/dist/components/ai/reasoning/reasoning.css +16 -0
  62. package/dist/components/ai/reasoning/reasoning.d.mts +2 -3
  63. package/dist/components/ai/reasoning/reasoning.mjs +5 -5
  64. package/dist/components/ai/reasoning/reasoning.module.mjs +8 -0
  65. package/dist/components/ai/response/response.css +453 -0
  66. package/dist/components/ai/response/response.d.mts +4 -6
  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 +13 -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 +13 -2
  76. package/dist/components/ai/suggestion/index.mjs +7 -1
  77. package/dist/components/ai/suggestion/suggestion.css +32 -0
  78. package/dist/components/ai/suggestion/suggestion.d.mts +3 -6
  79. package/dist/components/ai/suggestion/suggestion.mjs +8 -11
  80. package/dist/components/ai/suggestion/suggestion.module.mjs +8 -0
  81. package/dist/components/ai/tool-invocation/approval-bar.css +26 -0
  82. package/dist/components/ai/tool-invocation/approval-bar.d.mts +11 -0
  83. package/dist/components/ai/tool-invocation/approval-bar.mjs +59 -0
  84. package/dist/components/ai/tool-invocation/approval-bar.module.mjs +9 -0
  85. package/dist/components/ai/tool-invocation/tool-invocation.css +55 -0
  86. package/dist/components/ai/tool-invocation/tool-invocation.d.mts +5 -5
  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 -9
  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/copy-button/copy-button.css +15 -0
  96. package/dist/components/buttons/copy-button/copy-button.d.mts +10 -0
  97. package/dist/components/buttons/copy-button/copy-button.mjs +70 -0
  98. package/dist/components/buttons/copy-button/copy-button.module.mjs +8 -0
  99. package/dist/components/buttons/copy-button/index.d.mts +2 -0
  100. package/dist/components/buttons/copy-button/index.mjs +2 -0
  101. package/dist/components/buttons/icon-button/icon-button.css +81 -0
  102. package/dist/components/buttons/icon-button/icon-button.d.mts +39 -12
  103. package/dist/components/buttons/icon-button/icon-button.mjs +71 -58
  104. package/dist/components/buttons/icon-button/icon-button.module.mjs +15 -0
  105. package/dist/components/buttons/icon-button/index.d.mts +2 -2
  106. package/dist/components/buttons/toolbar/index.d.mts +14 -0
  107. package/dist/components/buttons/toolbar/index.mjs +9 -0
  108. package/dist/components/buttons/toolbar/toolbar.css +30 -0
  109. package/dist/components/buttons/toolbar/toolbar.d.mts +18 -0
  110. package/dist/components/buttons/toolbar/toolbar.mjs +111 -0
  111. package/dist/components/buttons/toolbar/toolbar.module.mjs +9 -0
  112. package/dist/components/data-display/accordion/accordion-button.css +48 -0
  113. package/dist/components/data-display/accordion/accordion-button.d.mts +2 -3
  114. package/dist/components/data-display/accordion/accordion-button.mjs +5 -4
  115. package/dist/components/data-display/accordion/accordion-button.module.mjs +9 -0
  116. package/dist/components/data-display/accordion/accordion-item.css +11 -0
  117. package/dist/components/data-display/accordion/accordion-item.d.mts +2 -3
  118. package/dist/components/data-display/accordion/accordion-item.mjs +2 -1
  119. package/dist/components/data-display/accordion/accordion-item.module.mjs +5 -0
  120. package/dist/components/data-display/accordion/accordion-panel.css +9 -0
  121. package/dist/components/data-display/accordion/accordion-panel.d.mts +2 -3
  122. package/dist/components/data-display/accordion/accordion-panel.mjs +2 -2
  123. package/dist/components/data-display/accordion/accordion-panel.module.mjs +5 -0
  124. package/dist/components/data-display/accordion/accordion.css +19 -0
  125. package/dist/components/data-display/accordion/accordion.d.mts +2 -3
  126. package/dist/components/data-display/accordion/accordion.mjs +2 -1
  127. package/dist/components/data-display/accordion/accordion.module.mjs +5 -0
  128. package/dist/components/data-display/accordion/context.d.mts +3 -3
  129. package/dist/components/data-display/accordion/index.d.mts +2 -3
  130. package/dist/components/data-display/avatar/avatar.css +95 -0
  131. package/dist/components/data-display/avatar/avatar.d.mts +2 -3
  132. package/dist/components/data-display/avatar/avatar.mjs +22 -6
  133. package/dist/components/data-display/avatar/avatar.module.mjs +18 -0
  134. package/dist/components/data-display/badge/badge.css +160 -0
  135. package/dist/components/data-display/badge/badge.d.mts +2 -3
  136. package/dist/components/data-display/badge/badge.mjs +30 -5
  137. package/dist/components/data-display/badge/badge.module.mjs +21 -0
  138. package/dist/components/data-display/card/card.css +44 -0
  139. package/dist/components/data-display/card/card.d.mts +2 -3
  140. package/dist/components/data-display/card/card.mjs +12 -2
  141. package/dist/components/data-display/card/card.module.mjs +12 -0
  142. package/dist/components/data-display/carousel/carousel.css +83 -0
  143. package/dist/components/data-display/carousel/carousel.d.mts +11 -0
  144. package/dist/components/data-display/carousel/carousel.mjs +186 -0
  145. package/dist/components/data-display/carousel/carousel.module.mjs +18 -0
  146. package/dist/components/data-display/carousel/index.d.mts +11 -0
  147. package/dist/components/data-display/carousel/index.mjs +8 -0
  148. package/dist/components/data-display/code/code.css +37 -0
  149. package/dist/components/data-display/code/code.d.mts +2 -3
  150. package/dist/components/data-display/code/code.mjs +7 -6
  151. package/dist/components/data-display/code/code.module.mjs +9 -0
  152. package/dist/components/data-display/code/find-all-colors.d.mts +2 -3
  153. package/dist/components/data-display/code/find-all-colors.mjs +0 -161
  154. package/dist/components/data-display/code-block/code-block.css +161 -0
  155. package/dist/components/data-display/code-block/code-block.d.mts +12 -0
  156. package/dist/components/data-display/code-block/code-block.mjs +44 -0
  157. package/dist/components/data-display/code-block/code-block.module.mjs +11 -0
  158. package/dist/components/data-display/code-block/highlight.d.mts +9 -0
  159. package/dist/components/data-display/code-block/highlight.mjs +54 -0
  160. package/dist/components/data-display/code-block/index.d.mts +2 -0
  161. package/dist/components/data-display/code-block/index.mjs +2 -0
  162. package/dist/components/data-display/data-table/data-table.css +74 -0
  163. package/dist/components/data-display/data-table/data-table.d.mts +31 -0
  164. package/dist/components/data-display/data-table/data-table.mjs +155 -0
  165. package/dist/components/data-display/data-table/data-table.module.mjs +14 -0
  166. package/dist/components/data-display/data-table/index.d.mts +2 -0
  167. package/dist/components/data-display/data-table/index.mjs +2 -0
  168. package/dist/components/data-display/heading/heading.css +99 -0
  169. package/dist/components/data-display/heading/heading.d.mts +2 -3
  170. package/dist/components/data-display/heading/heading.mjs +15 -14
  171. package/dist/components/data-display/heading/heading.module.mjs +20 -0
  172. package/dist/components/data-display/kbd/index.d.mts +2 -0
  173. package/dist/components/data-display/kbd/index.mjs +2 -0
  174. package/dist/components/data-display/kbd/kbd.css +21 -0
  175. package/dist/components/data-display/kbd/kbd.d.mts +8 -0
  176. package/dist/components/data-display/kbd/kbd.mjs +17 -0
  177. package/dist/components/data-display/kbd/kbd.module.mjs +5 -0
  178. package/dist/components/data-display/prose/index.d.mts +2 -0
  179. package/dist/components/data-display/prose/index.mjs +2 -0
  180. package/dist/components/data-display/prose/prose.css +253 -0
  181. package/dist/components/data-display/prose/prose.d.mts +5 -0
  182. package/dist/components/data-display/prose/prose.mjs +10 -0
  183. package/dist/components/data-display/prose/prose.module.mjs +5 -0
  184. package/dist/components/data-display/table/table.css +107 -0
  185. package/dist/components/data-display/table/table.d.mts +10 -9
  186. package/dist/components/data-display/table/table.mjs +26 -15
  187. package/dist/components/data-display/table/table.module.mjs +22 -0
  188. package/dist/components/data-display/tree/index.d.mts +2 -0
  189. package/dist/components/data-display/tree/index.mjs +2 -0
  190. package/dist/components/data-display/tree/tree.css +84 -0
  191. package/dist/components/data-display/tree/tree.d.mts +20 -0
  192. package/dist/components/data-display/tree/tree.mjs +151 -0
  193. package/dist/components/data-display/tree/tree.module.mjs +15 -0
  194. package/dist/components/feedback/alert/alert.css +42 -0
  195. package/dist/components/feedback/alert/alert.d.mts +3 -4
  196. package/dist/components/feedback/alert/alert.mjs +20 -23
  197. package/dist/components/feedback/alert/alert.module.mjs +14 -0
  198. package/dist/components/feedback/callout/callout.css +38 -0
  199. package/dist/components/feedback/callout/callout.d.mts +10 -0
  200. package/dist/components/feedback/callout/callout.mjs +38 -0
  201. package/dist/components/feedback/callout/callout.module.mjs +11 -0
  202. package/dist/components/feedback/callout/index.d.mts +2 -0
  203. package/dist/components/feedback/callout/index.mjs +2 -0
  204. package/dist/components/feedback/empty-state/empty-state.css +36 -0
  205. package/dist/components/feedback/empty-state/empty-state.d.mts +10 -0
  206. package/dist/components/feedback/empty-state/empty-state.mjs +27 -0
  207. package/dist/components/feedback/empty-state/empty-state.module.mjs +11 -0
  208. package/dist/components/feedback/empty-state/index.d.mts +2 -0
  209. package/dist/components/feedback/empty-state/index.mjs +2 -0
  210. package/dist/components/feedback/progress/progress.css +78 -0
  211. package/dist/components/feedback/progress/progress.d.mts +5 -5
  212. package/dist/components/feedback/progress/progress.mjs +17 -3
  213. package/dist/components/feedback/progress/progress.module.mjs +12 -0
  214. package/dist/components/feedback/skeleton/skeleton.css +64 -0
  215. package/dist/components/feedback/skeleton/skeleton.d.mts +2 -3
  216. package/dist/components/feedback/skeleton/skeleton.mjs +19 -2
  217. package/dist/components/feedback/skeleton/skeleton.module.mjs +17 -0
  218. package/dist/components/feedback/spinner/spinner.css +40 -0
  219. package/dist/components/feedback/spinner/spinner.d.mts +2 -3
  220. package/dist/components/feedback/spinner/spinner.mjs +13 -7
  221. package/dist/components/feedback/spinner/spinner.module.mjs +12 -0
  222. package/dist/components/feedback/toast/context.d.mts +8 -9
  223. package/dist/components/feedback/toast/provider.css +69 -0
  224. package/dist/components/feedback/toast/provider.d.mts +2 -3
  225. package/dist/components/feedback/toast/provider.mjs +17 -13
  226. package/dist/components/feedback/toast/provider.module.mjs +12 -0
  227. package/dist/components/feedback/toast/toast.d.mts +2 -3
  228. package/dist/components/form/autocomplete/autocomplete.css +154 -0
  229. package/dist/components/form/autocomplete/autocomplete.d.mts +2 -3
  230. package/dist/components/form/autocomplete/autocomplete.mjs +70 -46
  231. package/dist/components/form/autocomplete/autocomplete.module.mjs +21 -0
  232. package/dist/components/form/calendar/calendar.css +98 -0
  233. package/dist/components/form/calendar/calendar.d.mts +14 -0
  234. package/dist/components/form/calendar/calendar.mjs +182 -0
  235. package/dist/components/form/calendar/calendar.module.mjs +18 -0
  236. package/dist/components/form/calendar/index.d.mts +2 -0
  237. package/dist/components/form/calendar/index.mjs +2 -0
  238. package/dist/components/form/checkbox/checkbox.css +90 -0
  239. package/dist/components/form/checkbox/checkbox.d.mts +5 -3
  240. package/dist/components/form/checkbox/checkbox.mjs +30 -27
  241. package/dist/components/form/checkbox/checkbox.module.mjs +13 -0
  242. package/dist/components/form/checkbox-card/checkbox-card.css +138 -0
  243. package/dist/components/form/checkbox-card/checkbox-card.d.mts +3 -4
  244. package/dist/components/form/checkbox-card/checkbox-card.mjs +17 -23
  245. package/dist/components/form/checkbox-card/checkbox-card.module.mjs +17 -0
  246. package/dist/components/form/checkbox-group/checkbox-group.css +15 -0
  247. package/dist/components/form/checkbox-group/checkbox-group.d.mts +7 -5
  248. package/dist/components/form/checkbox-group/checkbox-group.mjs +12 -16
  249. package/dist/components/form/checkbox-group/checkbox-group.module.mjs +8 -0
  250. package/dist/components/form/checkbox-group/index.d.mts +5 -3
  251. package/dist/components/form/color-picker/color-picker.css +172 -0
  252. package/dist/components/form/color-picker/color-picker.d.mts +28 -0
  253. package/dist/components/form/color-picker/color-picker.mjs +239 -0
  254. package/dist/components/form/color-picker/color-picker.module.mjs +20 -0
  255. package/dist/components/form/color-picker/index.d.mts +2 -0
  256. package/dist/components/form/color-picker/index.mjs +2 -0
  257. package/dist/components/form/combobox/combobox.css +143 -0
  258. package/dist/components/form/combobox/combobox.d.mts +32 -0
  259. package/dist/components/form/combobox/combobox.mjs +278 -0
  260. package/dist/components/form/combobox/combobox.module.mjs +19 -0
  261. package/dist/components/form/combobox/index.d.mts +2 -0
  262. package/dist/components/form/combobox/index.mjs +2 -0
  263. package/dist/components/form/date-field/date-field.css +31 -0
  264. package/dist/components/form/date-field/date-field.d.mts +8 -0
  265. package/dist/components/form/date-field/date-field.mjs +20 -0
  266. package/dist/components/form/date-field/date-field.module.mjs +5 -0
  267. package/dist/components/form/date-field/index.d.mts +2 -0
  268. package/dist/components/form/date-field/index.mjs +2 -0
  269. package/dist/components/form/date-picker/date-picker.css +90 -0
  270. package/dist/components/form/date-picker/date-picker.d.mts +12 -0
  271. package/dist/components/form/date-picker/date-picker.mjs +77 -0
  272. package/dist/components/form/date-picker/date-picker.module.mjs +14 -0
  273. package/dist/components/form/date-picker/index.d.mts +2 -0
  274. package/dist/components/form/date-picker/index.mjs +2 -0
  275. package/dist/components/form/file-field/file-field.css +88 -0
  276. package/dist/components/form/file-field/file-field.d.mts +18 -19
  277. package/dist/components/form/file-field/file-field.mjs +130 -42
  278. package/dist/components/form/file-field/file-field.module.mjs +17 -0
  279. package/dist/components/form/file-field/index.d.mts +20 -2
  280. package/dist/components/form/file-field/index.mjs +9 -1
  281. package/dist/components/form/form/form.css +11 -0
  282. package/dist/components/form/form/form.d.mts +4 -4
  283. package/dist/components/form/form/form.mjs +2 -1
  284. package/dist/components/form/form/form.module.mjs +5 -0
  285. package/dist/components/form/form-control/form-control.css +43 -0
  286. package/dist/components/form/form-control/form-control.d.mts +2 -3
  287. package/dist/components/form/form-control/form-control.mjs +11 -10
  288. package/dist/components/form/form-control/form-control.module.mjs +12 -0
  289. package/dist/components/form/number-field/cast.d.mts +2 -3
  290. package/dist/components/form/number-field/cast.mjs +3 -22
  291. package/dist/components/form/number-field/number-field.css +122 -0
  292. package/dist/components/form/number-field/number-field.d.mts +10 -10
  293. package/dist/components/form/number-field/number-field.mjs +126 -54
  294. package/dist/components/form/number-field/number-field.module.mjs +10 -0
  295. package/dist/components/form/password-input/password-input.css +88 -0
  296. package/dist/components/form/password-input/password-input.d.mts +2 -3
  297. package/dist/components/form/password-input/password-input.mjs +15 -12
  298. package/dist/components/form/password-input/password-input.module.mjs +12 -0
  299. package/dist/components/form/radio/radio.css +89 -0
  300. package/dist/components/form/radio/radio.d.mts +4 -3
  301. package/dist/components/form/radio/radio.mjs +16 -19
  302. package/dist/components/form/radio/radio.module.mjs +16 -0
  303. package/dist/components/form/radio-card/radio-card.css +147 -0
  304. package/dist/components/form/radio-card/radio-card.d.mts +4 -4
  305. package/dist/components/form/radio-card/radio-card.mjs +17 -23
  306. package/dist/components/form/radio-card/radio-card.module.mjs +19 -0
  307. package/dist/components/form/range-slider/index.d.mts +2 -0
  308. package/dist/components/form/range-slider/index.mjs +2 -0
  309. package/dist/components/form/range-slider/range-slider.css +67 -0
  310. package/dist/components/form/range-slider/range-slider.d.mts +30 -0
  311. package/dist/components/form/range-slider/range-slider.mjs +135 -0
  312. package/dist/components/form/range-slider/range-slider.module.mjs +14 -0
  313. package/dist/components/form/select/select.css +74 -0
  314. package/dist/components/form/select/select.d.mts +2 -3
  315. package/dist/components/form/select/select.mjs +25 -8
  316. package/dist/components/form/select/select.module.mjs +12 -0
  317. package/dist/components/form/slider/range-input-class.css +97 -0
  318. package/dist/components/form/slider/range-input-class.d.mts +7 -0
  319. package/dist/components/form/slider/range-input-class.mjs +10 -0
  320. package/dist/components/form/slider/range-input-class.module.mjs +8 -0
  321. package/dist/components/form/slider/slider.css +55 -0
  322. package/dist/components/form/slider/slider.d.mts +6 -7
  323. package/dist/components/form/slider/slider.mjs +44 -11
  324. package/dist/components/form/slider/slider.module.mjs +12 -0
  325. package/dist/components/form/switch/switch.css +103 -0
  326. package/dist/components/form/switch/switch.d.mts +2 -3
  327. package/dist/components/form/switch/switch.mjs +14 -17
  328. package/dist/components/form/switch/switch.module.mjs +16 -0
  329. package/dist/components/form/text-field/text-field.css +41 -0
  330. package/dist/components/form/text-field/text-field.d.mts +4 -5
  331. package/dist/components/form/text-field/text-field.mjs +2 -3
  332. package/dist/components/form/text-field/text-field.module.mjs +5 -0
  333. package/dist/components/form/textarea/textarea.css +50 -0
  334. package/dist/components/form/textarea/textarea.d.mts +3 -3
  335. package/dist/components/form/textarea/textarea.mjs +6 -20
  336. package/dist/components/form/textarea/textarea.module.mjs +9 -0
  337. package/dist/components/icons/base.css +40 -0
  338. package/dist/components/icons/base.d.mts +4 -5
  339. package/dist/components/icons/base.mjs +10 -10
  340. package/dist/components/icons/base.module.mjs +13 -0
  341. package/dist/components/icons/browsers.d.mts +5 -6
  342. package/dist/components/icons/color-scale.d.mts +2 -3
  343. package/dist/components/icons/github-mark.d.mts +2 -3
  344. package/dist/components/icons/logo.css +17 -0
  345. package/dist/components/icons/logo.d.mts +3 -4
  346. package/dist/components/icons/logo.mjs +4 -3
  347. package/dist/components/icons/logo.module.mjs +9 -0
  348. package/dist/components/icons/lucide-deep.d.mts +3 -1
  349. package/dist/components/icons/lucide-imports.d.mts +3 -1
  350. package/dist/components/icons/lucide-imports.mjs +3 -1
  351. package/dist/components/icons/lucide.d.mts +60 -61
  352. package/dist/components/icons/qiita.d.mts +2 -3
  353. package/dist/components/icons/twitter.css +9 -0
  354. package/dist/components/icons/twitter.d.mts +2 -3
  355. package/dist/components/icons/twitter.mjs +2 -1
  356. package/dist/components/icons/twitter.module.mjs +5 -0
  357. package/dist/components/icons/vertical-writing.d.mts +2 -3
  358. package/dist/components/index.d.mts +62 -29
  359. package/dist/components/index.mjs +36 -14
  360. package/dist/components/layout/_shared/gap.css +25 -0
  361. package/dist/components/layout/_shared/gap.d.mts +8 -9
  362. package/dist/components/layout/_shared/gap.mjs +6 -5
  363. package/dist/components/layout/_shared/gap.module.mjs +11 -0
  364. package/dist/components/layout/_shared/padding.css +25 -0
  365. package/dist/components/layout/_shared/padding.d.mts +8 -9
  366. package/dist/components/layout/_shared/padding.mjs +6 -5
  367. package/dist/components/layout/_shared/padding.module.mjs +11 -0
  368. package/dist/components/layout/grid/grid.css +93 -0
  369. package/dist/components/layout/grid/grid.d.mts +5 -6
  370. package/dist/components/layout/grid/grid.mjs +21 -20
  371. package/dist/components/layout/grid/grid.module.mjs +25 -0
  372. package/dist/components/layout/resizable-panels/index.d.mts +18 -0
  373. package/dist/components/layout/resizable-panels/index.mjs +9 -0
  374. package/dist/components/layout/resizable-panels/resizable-panels.css +77 -0
  375. package/dist/components/layout/resizable-panels/resizable-panels.d.mts +21 -0
  376. package/dist/components/layout/resizable-panels/resizable-panels.mjs +164 -0
  377. package/dist/components/layout/resizable-panels/resizable-panels.module.mjs +16 -0
  378. package/dist/components/layout/separator/separator.css +37 -0
  379. package/dist/components/layout/separator/separator.d.mts +2 -3
  380. package/dist/components/layout/separator/separator.mjs +12 -9
  381. package/dist/components/layout/separator/separator.module.mjs +12 -0
  382. package/dist/components/layout/stack/stack.css +49 -0
  383. package/dist/components/layout/stack/stack.d.mts +3 -4
  384. package/dist/components/layout/stack/stack.mjs +11 -10
  385. package/dist/components/layout/stack/stack.module.mjs +17 -0
  386. package/dist/components/navigation/anchor/anchor.css +29 -0
  387. package/dist/components/navigation/anchor/anchor.d.mts +2 -3
  388. package/dist/components/navigation/anchor/anchor.mjs +5 -2
  389. package/dist/components/navigation/anchor/anchor.module.mjs +8 -0
  390. package/dist/components/navigation/breadcrumb/breadcrumb.css +72 -0
  391. package/dist/components/navigation/breadcrumb/breadcrumb.d.mts +5 -6
  392. package/dist/components/navigation/breadcrumb/breadcrumb.mjs +15 -9
  393. package/dist/components/navigation/breadcrumb/breadcrumb.module.mjs +14 -0
  394. package/dist/components/navigation/breadcrumb/index.d.mts +2 -3
  395. package/dist/components/navigation/pagination/pagination.css +36 -0
  396. package/dist/components/navigation/pagination/pagination.d.mts +2 -3
  397. package/dist/components/navigation/pagination/pagination.mjs +9 -8
  398. package/dist/components/navigation/pagination/pagination.module.mjs +11 -0
  399. package/dist/components/navigation/side-nav/index.d.mts +16 -0
  400. package/dist/components/navigation/side-nav/index.mjs +10 -0
  401. package/dist/components/navigation/side-nav/side-nav.css +73 -0
  402. package/dist/components/navigation/side-nav/side-nav.d.mts +31 -0
  403. package/dist/components/navigation/side-nav/side-nav.mjs +62 -0
  404. package/dist/components/navigation/side-nav/side-nav.module.mjs +11 -0
  405. package/dist/components/navigation/stepper/index.d.mts +2 -0
  406. package/dist/components/navigation/stepper/index.mjs +2 -0
  407. package/dist/components/navigation/stepper/stepper.css +151 -0
  408. package/dist/components/navigation/stepper/stepper.d.mts +19 -0
  409. package/dist/components/navigation/stepper/stepper.mjs +87 -0
  410. package/dist/components/navigation/stepper/stepper.module.mjs +29 -0
  411. package/dist/components/navigation/table-of-contents/index.d.mts +2 -0
  412. package/dist/components/navigation/table-of-contents/index.mjs +2 -0
  413. package/dist/components/navigation/table-of-contents/table-of-contents.css +17 -0
  414. package/dist/components/navigation/table-of-contents/table-of-contents.d.mts +12 -0
  415. package/dist/components/navigation/table-of-contents/table-of-contents.mjs +94 -0
  416. package/dist/components/navigation/table-of-contents/table-of-contents.module.mjs +8 -0
  417. package/dist/components/navigation/tabs/index.d.mts +19 -2
  418. package/dist/components/navigation/tabs/index.mjs +9 -1
  419. package/dist/components/navigation/tabs/tabs.css +70 -0
  420. package/dist/components/navigation/tabs/tabs.d.mts +16 -19
  421. package/dist/components/navigation/tabs/tabs.mjs +52 -49
  422. package/dist/components/navigation/tabs/tabs.module.mjs +12 -0
  423. package/dist/components/observers/fragment-instance.d.mts +1 -0
  424. package/dist/components/observers/in-view/in-view.d.mts +11 -0
  425. package/dist/components/observers/in-view/in-view.mjs +60 -0
  426. package/dist/components/observers/in-view/index.d.mts +2 -0
  427. package/dist/components/observers/in-view/index.mjs +2 -0
  428. package/dist/components/observers/resize/index.d.mts +2 -0
  429. package/dist/components/observers/resize/index.mjs +2 -0
  430. package/dist/components/observers/resize/resize.d.mts +7 -0
  431. package/dist/components/observers/resize/resize.mjs +25 -0
  432. package/dist/components/overlays/_internal/modal-dialog-context.d.mts +4 -5
  433. package/dist/components/overlays/_internal/use-can-hover.d.mts +2 -3
  434. package/dist/components/overlays/_internal/use-hover-intent.d.mts +3 -4
  435. package/dist/components/overlays/_internal/use-list-navigation.d.mts +17 -11
  436. package/dist/components/overlays/_internal/use-list-navigation.mjs +42 -26
  437. package/dist/components/overlays/command-palette/command-palette.css +91 -0
  438. package/dist/components/overlays/command-palette/command-palette.d.mts +24 -0
  439. package/dist/components/overlays/command-palette/command-palette.mjs +139 -0
  440. package/dist/components/overlays/command-palette/command-palette.module.mjs +14 -0
  441. package/dist/components/overlays/command-palette/index.d.mts +2 -0
  442. package/dist/components/overlays/command-palette/index.mjs +2 -0
  443. package/dist/components/overlays/context-menu/context-menu.d.mts +13 -0
  444. package/dist/components/overlays/context-menu/context-menu.mjs +79 -0
  445. package/dist/components/overlays/context-menu/index.d.mts +21 -0
  446. package/dist/components/overlays/context-menu/index.mjs +13 -0
  447. package/dist/components/overlays/dialog/dialog.css +31 -0
  448. package/dist/components/overlays/dialog/dialog.d.mts +12 -17
  449. package/dist/components/overlays/dialog/dialog.mjs +11 -13
  450. package/dist/components/overlays/dialog/dialog.module.mjs +10 -0
  451. package/dist/components/overlays/dialog/index.d.mts +17 -2
  452. package/dist/components/overlays/dialog/index.mjs +8 -1
  453. package/dist/components/overlays/drawer/drawer.css +48 -0
  454. package/dist/components/overlays/drawer/drawer.d.mts +2 -3
  455. package/dist/components/overlays/drawer/drawer.mjs +11 -10
  456. package/dist/components/overlays/drawer/drawer.module.mjs +13 -0
  457. package/dist/components/overlays/dropdown-menu/dropdown-menu.d.mts +19 -26
  458. package/dist/components/overlays/dropdown-menu/dropdown-menu.mjs +12 -20
  459. package/dist/components/overlays/dropdown-menu/hooks.d.mts +7 -7
  460. package/dist/components/overlays/dropdown-menu/hooks.mjs +3 -3
  461. package/dist/components/overlays/dropdown-menu/index.d.mts +30 -2
  462. package/dist/components/overlays/dropdown-menu/index.mjs +12 -1
  463. package/dist/components/overlays/dropdown-menu/shared.css +51 -0
  464. package/dist/components/overlays/dropdown-menu/shared.d.mts +3 -6
  465. package/dist/components/overlays/dropdown-menu/shared.mjs +4 -6
  466. package/dist/components/overlays/dropdown-menu/shared.module.mjs +8 -0
  467. package/dist/components/overlays/dropdown-menu/sub-menu.css +28 -0
  468. package/dist/components/overlays/dropdown-menu/sub-menu.d.mts +3 -6
  469. package/dist/components/overlays/dropdown-menu/sub-menu.mjs +16 -16
  470. package/dist/components/overlays/dropdown-menu/sub-menu.module.mjs +9 -0
  471. package/dist/components/overlays/dropdown-menu/use-safe-triangle.d.mts +2 -3
  472. package/dist/components/overlays/list-box/hooks.d.mts +6 -5
  473. package/dist/components/overlays/list-box/hooks.mjs +5 -4
  474. package/dist/components/overlays/list-box/index.d.mts +27 -2
  475. package/dist/components/overlays/list-box/index.mjs +9 -1
  476. package/dist/components/overlays/list-box/list-box.css +74 -0
  477. package/dist/components/overlays/list-box/list-box.d.mts +20 -23
  478. package/dist/components/overlays/list-box/list-box.mjs +17 -21
  479. package/dist/components/overlays/list-box/list-box.module.mjs +10 -0
  480. package/dist/components/overlays/modal/modal.css +119 -0
  481. package/dist/components/overlays/modal/modal.d.mts +2 -3
  482. package/dist/components/overlays/modal/modal.mjs +14 -11
  483. package/dist/components/overlays/modal/modal.module.mjs +11 -0
  484. package/dist/components/overlays/popover/anchor-positioning.d.mts +4 -5
  485. package/dist/components/overlays/popover/escape-stack.d.mts +2 -3
  486. package/dist/components/overlays/popover/hooks.d.mts +7 -8
  487. package/dist/components/overlays/popover/index.d.mts +25 -2
  488. package/dist/components/overlays/popover/index.mjs +8 -1
  489. package/dist/components/overlays/popover/popover.css +51 -0
  490. package/dist/components/overlays/popover/popover.d.mts +18 -20
  491. package/dist/components/overlays/popover/popover.mjs +13 -12
  492. package/dist/components/overlays/popover/popover.module.mjs +11 -0
  493. package/dist/components/overlays/tooltip/bridge.css +68 -0
  494. package/dist/components/overlays/tooltip/bridge.d.mts +2 -3
  495. package/dist/components/overlays/tooltip/bridge.mjs +7 -21
  496. package/dist/components/overlays/tooltip/bridge.module.mjs +11 -0
  497. package/dist/components/overlays/tooltip/index.d.mts +22 -2
  498. package/dist/components/overlays/tooltip/index.mjs +8 -1
  499. package/dist/components/overlays/tooltip/tooltip.css +15 -0
  500. package/dist/components/overlays/tooltip/tooltip.d.mts +19 -24
  501. package/dist/components/overlays/tooltip/tooltip.mjs +5 -9
  502. package/dist/components/overlays/tooltip/tooltip.module.mjs +5 -0
  503. package/dist/components/providers/index.d.mts +1 -2
  504. package/dist/components/providers/portal-root.d.mts +9 -7
  505. package/dist/components/providers/portal-root.mjs +7 -7
  506. package/dist/components/providers/ui-provider.d.mts +2 -6
  507. package/dist/components/providers/ui-provider.mjs +1 -5
  508. package/dist/helpers/chain.d.mts +2 -3
  509. package/dist/helpers/chain.mjs +0 -23
  510. package/dist/helpers/create-safe-context.d.mts +2 -3
  511. package/dist/helpers/create-safe-context.mjs +0 -17
  512. package/dist/helpers/index.d.mts +1 -2
  513. package/dist/helpers/index.mjs +2 -3
  514. package/dist/helpers/merge-props.d.mts +2 -3
  515. package/dist/helpers/merge-props.mjs +2 -37
  516. package/dist/helpers/merge-refs.d.mts +2 -3
  517. package/dist/helpers/merge-refs.mjs +0 -32
  518. package/dist/hooks/click-away/index.d.mts +2 -3
  519. package/dist/hooks/controllable-state/index.d.mts +2 -3
  520. package/dist/hooks/controllable-state/index.mjs +9 -11
  521. package/dist/hooks/index.d.mts +2 -23
  522. package/dist/hooks/index.mjs +2 -22
  523. package/dist/hooks/writing-mode/index.d.mts +15 -5
  524. package/dist/hooks/writing-mode/index.mjs +21 -14
  525. package/dist/i18n/current.d.mts +23 -0
  526. package/dist/i18n/current.mjs +43 -0
  527. package/dist/i18n/en.d.mts +2 -3
  528. package/dist/i18n/en.mjs +46 -0
  529. package/dist/i18n/index.d.mts +3 -2
  530. package/dist/i18n/index.mjs +4 -3
  531. package/dist/i18n/ja.d.mts +2 -3
  532. package/dist/i18n/ja.mjs +46 -0
  533. package/dist/i18n/messages.d.mts +81 -3
  534. package/dist/i18n/usage.d.mts +8 -0
  535. package/dist/i18n/usage.mjs +131 -0
  536. package/dist/index.d.mts +40 -47
  537. package/dist/index.mjs +36 -42
  538. package/dist/integrations/_shared/openui-defs.d.mts +3 -4
  539. package/dist/integrations/_shared/openui-defs.mjs +123 -54
  540. package/dist/integrations/_shared/renderers.css +50 -0
  541. package/dist/integrations/_shared/renderers.d.mts +71 -52
  542. package/dist/integrations/_shared/renderers.mjs +292 -34
  543. package/dist/integrations/_shared/renderers.module.mjs +14 -0
  544. package/dist/integrations/_shared/schemas.d.mts +388 -104
  545. package/dist/integrations/_shared/schemas.mjs +165 -27
  546. package/dist/integrations/ai-sdk/index.d.mts +2 -2
  547. package/dist/integrations/ai-sdk/map-parts.d.mts +25 -7
  548. package/dist/integrations/ai-sdk/map-parts.mjs +28 -3
  549. package/dist/integrations/json-render/catalog.d.mts +336 -18
  550. package/dist/integrations/json-render/catalog.mjs +120 -57
  551. package/dist/integrations/json-render/registry.d.mts +3 -4
  552. package/dist/integrations/json-render/registry.mjs +38 -4
  553. package/dist/integrations/openui/form-views.d.mts +23 -18
  554. package/dist/integrations/openui/form-views.mjs +27 -3
  555. package/dist/integrations/openui/library.d.mts +59 -7
  556. package/dist/integrations/openui/library.mjs +18 -3
  557. package/dist/integrations/openui/prompt.d.mts +2 -3
  558. package/dist/internal/accepts-file.d.mts +8 -0
  559. package/dist/internal/accepts-file.mjs +19 -0
  560. package/dist/internal/carries-files.d.mts +3 -0
  561. package/dist/internal/carries-files.mjs +4 -0
  562. package/dist/internal/clamp.d.mts +2 -3
  563. package/dist/internal/clamp.mjs +0 -11
  564. package/dist/internal/commit-input-value.d.mts +10 -0
  565. package/dist/internal/commit-input-value.mjs +15 -0
  566. package/dist/internal/dropped-files.d.mts +3 -0
  567. package/dist/internal/dropped-files.mjs +8 -0
  568. package/dist/{hooks/focus-trap/index.d.mts → internal/focus-trap.d.mts} +6 -7
  569. package/dist/{hooks/focus-trap/index.mjs → internal/focus-trap.mjs} +5 -5
  570. package/dist/internal/hex-color.d.mts +22 -0
  571. package/dist/internal/hex-color.mjs +53 -0
  572. package/dist/internal/iso-date.d.mts +39 -0
  573. package/dist/internal/iso-date.mjs +98 -0
  574. package/dist/internal/to-precision.d.mts +2 -3
  575. package/dist/internal/to-precision.mjs +0 -8
  576. package/dist/styles/index.css +513 -2534
  577. package/dist/styles/tailwind.css +217 -17
  578. package/dist/styles/tokens.d.mts +1 -2
  579. package/dist/styles/tokens.mjs +1 -2
  580. package/dist/types/variables.d.mts +7 -9
  581. package/docs/GUIDE.md +340 -158
  582. package/docs/llms.txt +18 -10
  583. package/docs/props.generated.json +2157 -292
  584. package/docs/references/ai-chat.md +396 -113
  585. package/docs/references/color.md +258 -113
  586. package/docs/references/components.md +1891 -461
  587. package/docs/references/generative-ui.md +163 -34
  588. package/docs/references/interaction-design.md +103 -73
  589. package/docs/references/spatial-design.md +112 -90
  590. package/docs/references/types.md +101 -0
  591. package/docs/references/typography.md +182 -73
  592. package/package.json +71 -70
  593. package/dist/components/_internal/focus-ring.d.mts +0 -8
  594. package/dist/components/_internal/focus-ring.mjs +0 -8
  595. package/dist/components/layout/scroll-linked/index.d.mts +0 -2
  596. package/dist/components/layout/scroll-linked/index.mjs +0 -2
  597. package/dist/components/layout/scroll-linked/scroll-linked.d.mts +0 -14
  598. package/dist/components/layout/scroll-linked/scroll-linked.mjs +0 -59
  599. package/dist/helpers/cn.d.mts +0 -5
  600. package/dist/helpers/cn.mjs +0 -27
  601. package/dist/hooks/breakpoint/index.d.mts +0 -5
  602. package/dist/hooks/breakpoint/index.mjs +0 -24
  603. package/dist/hooks/client/index.d.mts +0 -4
  604. package/dist/hooks/client/index.mjs +0 -6
  605. package/dist/hooks/clipboard/index.d.mts +0 -7
  606. package/dist/hooks/clipboard/index.mjs +0 -15
  607. package/dist/hooks/debounced-transition/index.d.mts +0 -5
  608. package/dist/hooks/debounced-transition/index.mjs +0 -49
  609. package/dist/hooks/deferred-debounce/index.d.mts +0 -4
  610. package/dist/hooks/deferred-debounce/index.mjs +0 -9
  611. package/dist/hooks/disclosure/index.d.mts +0 -10
  612. package/dist/hooks/disclosure/index.mjs +0 -20
  613. package/dist/hooks/hash/index.d.mts +0 -4
  614. package/dist/hooks/hash/index.mjs +0 -25
  615. package/dist/hooks/hover/index.d.mts +0 -12
  616. package/dist/hooks/hover/index.mjs +0 -19
  617. package/dist/hooks/intersection-observer/index.d.mts +0 -3
  618. package/dist/hooks/intersection-observer/index.mjs +0 -3
  619. package/dist/hooks/intersection-observer/use-in-view.d.mts +0 -11
  620. package/dist/hooks/intersection-observer/use-in-view.mjs +0 -18
  621. package/dist/hooks/intersection-observer/use-intersection-observer.d.mts +0 -11
  622. package/dist/hooks/intersection-observer/use-intersection-observer.mjs +0 -33
  623. package/dist/hooks/interval/index.d.mts +0 -4
  624. package/dist/hooks/interval/index.mjs +0 -19
  625. package/dist/hooks/local-storage/index.d.mts +0 -4
  626. package/dist/hooks/local-storage/index.mjs +0 -46
  627. package/dist/hooks/resize/index.d.mts +0 -8
  628. package/dist/hooks/resize/index.mjs +0 -24
  629. package/dist/hooks/scroll-direction/index.d.mts +0 -13
  630. package/dist/hooks/scroll-direction/index.mjs +0 -67
  631. package/dist/hooks/scroll-lock/index.d.mts +0 -9
  632. package/dist/hooks/scroll-lock/index.mjs +0 -59
  633. package/dist/hooks/session-storage/index.d.mts +0 -4
  634. package/dist/hooks/session-storage/index.mjs +0 -46
  635. package/dist/hooks/step/index.d.mts +0 -15
  636. package/dist/hooks/step/index.mjs +0 -39
  637. package/dist/hooks/timeout/index.d.mts +0 -4
  638. package/dist/hooks/timeout/index.mjs +0 -19
  639. package/dist/hooks/window-resize/index.d.mts +0 -11
  640. package/dist/hooks/window-resize/index.mjs +0 -21
  641. package/dist/hooks/window-size/index.d.mts +0 -8
  642. package/dist/hooks/window-size/index.mjs +0 -31
  643. package/dist/i18n/context.d.mts +0 -9
  644. package/dist/i18n/context.mjs +0 -19
  645. package/dist/styles/base.css +0 -315
  646. package/dist/styles/tokens.css +0 -380
  647. package/dist/styles/tokens.generated.d.mts +0 -840
  648. package/dist/styles/tokens.generated.mjs +0 -813
  649. package/dist/styles/utilities.css +0 -62
  650. package/docs/references/helpers.md +0 -120
  651. package/docs/references/hooks.md +0 -314
package/README.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # @k8ordo/ui
2
2
 
3
- A modern React UI component library built with TypeScript, Tailwind CSS, and accessibility in mind.
3
+ React components from [k8ordo](https://ordo.k8o.me) — semantic design
4
+ tokens, built-in wording that follows `@k8ordo/i18n` (Japanese and English included), and adapters that let an LLM generate
5
+ on-brand UIs.
4
6
 
5
- - **Documentation**: https://ordo.k8o.me
7
+ Like every k8ordo package it assumes React 19 and Server Components, uses only
8
+ what has reached Baseline, and ships no polyfills or legacy fallbacks.
9
+
10
+ - **Documentation**: https://ordo.k8o.me/ui
6
11
  - **Storybook**: https://main--687a213c85e2e4589d8db1bb.chromatic.com
7
12
 
8
13
  ## Installation
@@ -17,45 +22,75 @@ yarn add @k8ordo/ui
17
22
 
18
23
  ## Peer Dependencies
19
24
 
20
- Make sure you have the following peer dependencies installed:
25
+ Only React and `@k8ordo/i18n` are required:
21
26
 
22
27
  ```bash
23
- npm install react react-dom typescript
28
+ npm install react react-dom @k8ordo/i18n
24
29
  ```
25
30
 
26
- Required versions:
27
-
28
- - React ≥19.0.0
29
- - TypeScript ≥6.0.0
30
- - Tailwind CSS ≥4.0.0 — **optional**, only if you import the `tailwind.css` entry (see below)
31
+ Everything else is an optional peer, needed only for the entry point that uses
32
+ it. Install one when you import the entry it belongs to.
33
+
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.0.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.4.3 | 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` | ≥0.3.0 <0.4.0 | optional | `@k8ordo/ui/openui`, `@k8ordo/ui/openui/prompt` |
48
+ | `@openuidev/react-lang` | ≥0.3.0 <0.4.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.
31
64
 
32
65
  ## Quick Start
33
66
 
34
67
  1. Import the CSS and set up the provider.
35
68
 
36
- **No Tailwind in your project?** Import the prebuilt stylesheet — this single
37
- line is all you need. It works with CSS Modules or plain CSS: every library
38
- rule sits in `@layer`, so your own (unlayered) CSS takes precedence, and the
39
- 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)`, …).
40
75
 
41
76
  ```css
42
77
  @import '@k8ordo/ui/styles.css';
43
78
  ```
44
79
 
45
- **Using Tailwind CSS 4?** Import the source entry instead. It includes
46
- `@import 'tailwindcss'`, and it keeps the design tokens usable as Tailwind
47
- classes (`bg-bg-base`, …) in your own markup. Append your sources after the
48
- 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:
49
84
 
50
85
  ```css
86
+ @import 'tailwindcss';
51
87
  @import '@k8ordo/ui/tailwind.css';
52
- @source './src';
53
88
  ```
54
89
 
55
- Note that either entry applies a document-wide base: Tailwind preflight plus
56
- the library base layer (margins/list styles/heading sizes reset, `b`/`strong`
57
- weight and `i`/`em` style unset, `body` typography defaults). Adding it to an
58
- 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.
59
94
 
60
95
  ```tsx
61
96
  // In your app entry point
@@ -89,40 +124,20 @@ function MyPage() {
89
124
 
90
125
  ## Internationalization (i18n)
91
126
 
92
- 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.
93
-
94
- To switch to English, pass the `en` dictionary from `@k8ordo/ui/i18n`:
95
-
96
- ```tsx
97
- import { UIProvider } from '@k8ordo/ui';
98
- import { en } from '@k8ordo/ui/i18n';
99
-
100
- function App() {
101
- return (
102
- <UIProvider messages={en}>
103
- <YourApp />
104
- </UIProvider>
105
- );
106
- }
107
- ```
108
-
109
- `messages` takes a `Partial<Messages>`, so you can spread a dictionary and override only the keys you care about:
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:
110
128
 
111
- ```tsx
112
- <UIProvider messages={{ ...en, close: 'Dismiss' }}>
113
- <YourApp />
114
- </UIProvider>
115
- ```
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.
116
131
 
117
- 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.
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:
118
133
 
119
- The subpath exports both dictionaries and the type:
134
+ ```ts
135
+ import { en, registerMessages } from '@k8ordo/ui/i18n';
120
136
 
121
- ```tsx
122
- import { en, ja, type Messages } from '@k8ordo/ui/i18n';
137
+ registerMessages('en', { ...en, close: 'Dismiss' });
123
138
  ```
124
139
 
125
- `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.
126
141
 
127
142
  ## AI Agent Documentation
128
143
 
@@ -136,8 +151,9 @@ Point your agent at it once by pasting this into your project's `CLAUDE.md` /
136
151
  Use `@k8ordo/ui` for UI. Before writing or changing UI, read
137
152
  `node_modules/@k8ordo/ui/docs/GUIDE.md`, then follow only the
138
153
  `docs/references/*.md` links it lists that the task actually needs.
139
- Colors, spacing, radii and font weights go through semantic tokens —
140
- 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`).
141
157
  Look up component props in `docs/references/components.md` instead of
142
158
  recalling them; a component that is not listed there does not exist.
143
159
  ```
@@ -168,71 +184,113 @@ stories and rendered props rather than relying on trained knowledge:
168
184
 
169
185
  ## Component Categories
170
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
+
171
192
  ### Buttons
172
193
 
173
- - **Button** - Primary action button (use `renderItem` to render as a link)
174
- - **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)
175
198
 
176
199
  ### Navigation
177
200
 
178
- - **Anchor** - Text link with external-link awareness
179
- - **Breadcrumb** - Navigation path indicator
180
- - **Pagination** - Page navigation controls
181
- - **Tabs** - Tab-based content organization
182
-
183
- ### Form Controls
184
-
185
- - **Autocomplete** - Search with suggestions
186
- - **Checkbox** / **CheckboxCard** / **CheckboxGroup** - Multi-selection inputs
187
- - **FileField** - File upload with composite pattern
188
- - **Form** / **FormControl** - Form wrapper and field with label/validation
189
- - **NumberField** - Numeric input with controls
190
- - **PasswordInput** - Password input with show/hide toggle
191
- - **Radio** / **RadioCard** - Single-selection inputs
192
- - **Select** - Dropdown selection
193
- - **Slider** - Slider input control
194
- - **Switch** - Toggle switch
195
- - **TextField** - Single-line text input
196
- - **Textarea** - Multi-line text input
197
-
198
- ### Data Display
199
-
200
- - **Accordion** - Collapsible content panels
201
- - **Avatar** - User/entity avatar
202
- - **Badge** - Status/label indicator
203
- - **Card** - Flexible content container (hover interaction via `interactive`)
204
- - **Code** - Formatted code display
205
- - **Heading** - Typography heading component
206
- - **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)
207
249
 
208
250
  ### Feedback
209
251
 
210
- - **Alert** - Important messages and notifications
211
- - **Progress** - Progress indication
212
- - **Skeleton** - Content loading placeholder
213
- - **Spinner** - Loading indicator
214
- - **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)
215
259
 
216
260
  ### Overlays
217
261
 
218
- - **Dialog** - Modal dialog boxes
219
- - **Drawer** - Slide-out panel
220
- - **DropdownMenu** - Action menu component
221
- - **ListBox** - Selectable list component
222
- - **Modal** - Overlay modal component
223
- - **Popover** - Floating content container
224
- - **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)
225
271
 
226
272
  ### Layout
227
273
 
228
- - **ScrollLinked** - Scroll progress indicator
229
- - **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
230
285
 
231
- ### Utilities
286
+ - [Icons](docs/references/components.md#icons) — decorative icon components (`CloseIcon`, `ChevronIcon`, …)
232
287
 
233
- - **UIProvider** - Root provider for the library
234
- - **PortalRootProvider** / **usePortalRoot** - Customize the portal mount root
235
- - **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 -->
236
294
 
237
295
  ## Usage Examples
238
296
 
@@ -314,40 +372,44 @@ function MyComponent() {
314
372
 
315
373
  ## Imports & Bundle Size
316
374
 
317
- 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:
318
376
 
319
377
  ```tsx
320
378
  // Named imports from the root entry — unused exports are tree-shaken away
321
- import { Button, Card, useClickAway, useLocalStorage } from '@k8ordo/ui';
379
+ import { Button, Card, Stack } from '@k8ordo/ui';
322
380
  ```
323
381
 
324
382
  Optional features live behind dedicated subpath exports:
325
383
 
326
- | Subpath | Contents |
327
- | --------------------------------- | --------------------------------------------------------------- |
328
- | `@k8ordo/ui` | All components and hooks |
329
- | `@k8ordo/ui/tokens` | Design token definitions |
330
- | `@k8ordo/ui/i18n` | Message dictionaries (`ja` / `en`) and the `Messages` type |
331
- | `@k8ordo/ui/ai` | AI chat components |
332
- | `@k8ordo/ui/ai/response` | `Response` Markdown renderer (needs optional peer `streamdown`) |
333
- | `@k8ordo/ui/ai-sdk` | AI SDK adapter (needs optional peer `ai`) |
334
- | `@k8ordo/ui/json-render` | json-render catalog (server-safe) |
335
- | `@k8ordo/ui/json-render/registry` | json-render registry (`'use client'`) |
336
- | `@k8ordo/ui/openui` | OpenUI library (`'use client'`) |
337
- | `@k8ordo/ui/openui/prompt` | OpenUI prompt generation (server-safe) |
338
- | `@k8ordo/ui/styles.css` | Prebuilt stylesheet (no Tailwind required) |
339
- | `@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 |
340
400
 
341
401
  ## AI Chat Components
342
402
 
343
403
  `@k8ordo/ui/ai` ships building blocks for chat UIs:
344
404
 
345
405
  - **Conversation** (`Root` / `Messages` / `ScrollButton`) - Scroll container with stick-to-bottom behavior and a scroll-to-bottom button
346
- - **Message** (`Root` / `Content`) - Chat bubble, styled by `from="user" | "assistant"`
347
- - **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
348
408
  - **Reasoning** - Collapsible display of the model's thinking text
349
409
  - **Suggestion** (`List` / `Item`) - Suggested prompt chips
350
- - **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
351
413
  - **Response** (from `@k8ordo/ui/ai/response`) - Streaming-safe Markdown renderer built on streamdown
352
414
 
353
415
  Two of these need optional peer dependencies:
@@ -396,18 +458,17 @@ function Chat() {
396
458
  }
397
459
  ```
398
460
 
399
- 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:
400
462
 
401
463
  ```tsx
402
464
  import { Response } from '@k8ordo/ui/ai/response';
403
- import 'streamdown/styles.css';
404
465
 
405
466
  <Message.Content>
406
467
  <Response isStreaming>{markdownText}</Response>
407
468
  </Message.Content>;
408
469
  ```
409
470
 
410
- `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.
411
472
 
412
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:
413
474
 
@@ -415,12 +476,7 @@ import 'streamdown/styles.css';
415
476
  <Response linkSafety={{ enabled: true }}>{markdownText}</Response>
416
477
  ```
417
478
 
418
- ```css
419
- /* In your CSS entry (path is relative to the CSS file) */
420
- @source '../node_modules/streamdown/dist/*.js';
421
- ```
422
-
423
- 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.
424
480
 
425
481
  ## Generative UI integrations
426
482
 
@@ -431,19 +487,22 @@ These integrations are exposed as optional subpath exports. Install the framewor
431
487
  ```bash
432
488
  # json-render
433
489
  pnpm add @json-render/core @json-render/react zod
434
- # OpenUI
435
- pnpm add @openuidev/react-lang zod
436
- # OpenUI server-safe prompt entry (@k8ordo/ui/openui/prompt) additionally needs:
437
- 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
438
492
  ```
439
493
 
440
- Supported components (**all 49**, both frameworks):
494
+ Supported components (both frameworks):
441
495
 
442
- - **Layout / containers**: `Stack`, `Grid`, `Card`, `Form`
443
- - **Buttons / nav**: `Button`, `IconButton`, `Anchor`, `Breadcrumb`, `Pagination`
444
- - **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`
445
499
  - **Overlays (self-contained widgets)**: `Modal`, `Dialog`, `Drawer`, `Popover`, `Tooltip`, `DropdownMenu`, `Toast`
446
- - **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.
447
506
 
448
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).
449
508
 
@@ -465,9 +524,10 @@ const systemPrompt = catalog.prompt({ customRules: [...uiRules] });
465
524
  // `JsonRenderUI` wires JSONUIProvider + Renderer and the registry for you —
466
525
  // just pass a spec. Pass `onStateChange` to collect form values.
467
526
  'use client';
527
+ import type { UISpec } from '@k8ordo/ui/json-render';
468
528
  import { JsonRenderUI } from '@k8ordo/ui/json-render/registry';
469
529
 
470
- export function GenUi({ spec }: { spec: unknown }) {
530
+ export function GenUi({ spec }: { spec: UISpec }) {
471
531
  return <JsonRenderUI spec={spec} />;
472
532
  }
473
533
  ```
@@ -535,35 +595,8 @@ To generate the prompt inside the client bundle instead, `library.prompt()` stil
535
595
  > **Notes**
536
596
  >
537
597
  > - Make sure `@k8ordo/ui/styles.css` (or `tailwind.css` in Tailwind CSS 4 projects) is loaded and the app is wrapped in `UIProvider`.
538
- > - `@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.
539
599
  > - `Tabs` panels are text content (`tabs: [{ label, content }]`); rich-component panels are a future enhancement.
540
- > - 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).
541
-
542
- ## Custom Hooks
543
-
544
- The library includes several useful hooks:
545
-
546
- - **useBreakpoint** - Tailwind breakpoint matcher
547
- - **useClickAway** - Detect clicks outside an element
548
- - **useClient** - Client-side rendering detection
549
- - **useClipboard** - Clipboard operations
550
- - **useControllableState** - Controlled/uncontrolled state pattern
551
- - **useDebouncedTransition** - Rate-limited transition with `AbortSignal`
552
- - **useDeferredDebounce** - `useDeferredValue` with pending flag
553
- - **useDisclosure** - Open/close/toggle disclosure state
554
- - **useHash** - URL hash management
555
- - **useHover** - Element hover detection
556
- - **useIntersectionObserver** / **useInView** - Element visibility
557
- - **useInterval** - Interval timer management
558
- - **useLocalStorage** / **useSessionStorage** - Web Storage with React state
559
- - **useResize** - Element resize detection (ResizeObserver)
560
- - **useScrollDirection** - Scroll direction detection
561
- - **useScrollLock** - Body/element scroll lock
562
- - **useStep** - Step-based state management
563
- - **useTimeout** - Timeout management
564
- - **useWindowResize** - Window resize events
565
- - **useWindowSize** - Window size tracking
566
- - **useWritingMode** - Detect horizontal/vertical `writing-mode`
567
600
 
568
601
  ## Accessibility
569
602
 
@@ -578,11 +611,13 @@ All components follow WCAG accessibility guidelines:
578
611
 
579
612
  ## Styling & Customization
580
613
 
581
- 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:
582
616
 
583
- - CSS custom properties (semantic design tokens)
584
- - Tailwind utility classes
585
- - 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`
586
621
 
587
622
  ## Development
588
623
 
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll };
@@ -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,33 @@
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