@cloudflare/kumo 1.17.0 → 1.19.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 (263) hide show
  1. package/CHANGELOG.md +143 -0
  2. package/ai/USAGE.md +38 -32
  3. package/ai/component-registry.json +289 -178
  4. package/ai/component-registry.md +980 -507
  5. package/ai/schemas.ts +20 -4
  6. package/dist/.build-complete +1 -1
  7. package/dist/ai/schemas.d.ts +95 -56
  8. package/dist/ai/schemas.d.ts.map +1 -1
  9. package/dist/ai/schemas.js +165 -148
  10. package/dist/ai/schemas.js.map +1 -1
  11. package/dist/chunks/{Legend-o0ntojbaplmszwk0.js → Legend-ks7se6149vsa3tze.js} +127 -118
  12. package/dist/chunks/Legend-ks7se6149vsa3tze.js.map +1 -0
  13. package/dist/chunks/badge-dan90i0rzy4pwa1j.js +102 -0
  14. package/dist/chunks/badge-dan90i0rzy4pwa1j.js.map +1 -0
  15. package/dist/chunks/{banner-nz0eryqnz3qd86ln.js → banner-eiwcnk7ts21s3bnb.js} +4 -4
  16. package/dist/chunks/{banner-nz0eryqnz3qd86ln.js.map → banner-eiwcnk7ts21s3bnb.js.map} +1 -1
  17. package/dist/chunks/{breadcrumbs-cjgn3w4drahvqnuj.js → breadcrumbs-ge20hcb3o5spswrk.js} +2 -2
  18. package/dist/chunks/{breadcrumbs-cjgn3w4drahvqnuj.js.map → breadcrumbs-ge20hcb3o5spswrk.js.map} +1 -1
  19. package/dist/chunks/{button-odxi0hp4fvi5i2w3.js → button-oaqi7ykdisyskoos.js} +8 -8
  20. package/dist/chunks/button-oaqi7ykdisyskoos.js.map +1 -0
  21. package/dist/chunks/{checkbox-dx8x0rzv582yjv7n.js → checkbox-mwgmohffm22ut13s.js} +15 -15
  22. package/dist/chunks/checkbox-mwgmohffm22ut13s.js.map +1 -0
  23. package/dist/chunks/{clipboard-text-kyk51d1ze7zvdn4q.js → clipboard-text-dxczqon3d27xp6f0.js} +10 -10
  24. package/dist/chunks/{clipboard-text-kyk51d1ze7zvdn4q.js.map → clipboard-text-dxczqon3d27xp6f0.js.map} +1 -1
  25. package/dist/chunks/{cloudflare-logo-bgts2jgsdh7sslw4.js → cloudflare-logo-pbavoe1wu8nr5c4n.js} +9 -9
  26. package/dist/chunks/{cloudflare-logo-bgts2jgsdh7sslw4.js.map → cloudflare-logo-pbavoe1wu8nr5c4n.js.map} +1 -1
  27. package/dist/chunks/{code-liq1g6f5lhee305d.js → code-cz0w1y5z4h29a9eg.js} +18 -18
  28. package/dist/chunks/code-cz0w1y5z4h29a9eg.js.map +1 -0
  29. package/dist/chunks/{combobox-9fhjzprab46csmon.js → combobox-eaowwt1xr4d23gsn.js} +113 -101
  30. package/dist/chunks/combobox-eaowwt1xr4d23gsn.js.map +1 -0
  31. package/dist/chunks/{command-palette-kenx2bbdzd4kpx36.js → command-palette-maqtbmpfev9mysqd.js} +20 -20
  32. package/dist/chunks/command-palette-maqtbmpfev9mysqd.js.map +1 -0
  33. package/dist/chunks/{dialog-e05ysa8t2fklw065.js → dialog-e3m5bhs7fds26p9y.js} +25 -25
  34. package/dist/chunks/dialog-e3m5bhs7fds26p9y.js.map +1 -0
  35. package/dist/chunks/{dropdown-g587px7zv3ssaxr4.js → dropdown-ewte287db3vyt8t5.js} +94 -92
  36. package/dist/chunks/{dropdown-g587px7zv3ssaxr4.js.map → dropdown-ewte287db3vyt8t5.js.map} +1 -1
  37. package/dist/chunks/{empty-fuz1un7r7mbz0kim.js → empty-dr1eckm2z40euns6.js} +2 -2
  38. package/dist/chunks/{empty-fuz1un7r7mbz0kim.js.map → empty-dr1eckm2z40euns6.js.map} +1 -1
  39. package/dist/chunks/{field-fq504lyu7ttsh5m9.js → field-bo5gmna16odrrb1q.js} +3 -3
  40. package/dist/chunks/{field-fq504lyu7ttsh5m9.js.map → field-bo5gmna16odrrb1q.js.map} +1 -1
  41. package/dist/chunks/{grid-m9r71jxo2b8q1972.js → grid-hj1ylz16p7g5uelh.js} +2 -2
  42. package/dist/chunks/{grid-m9r71jxo2b8q1972.js.map → grid-hj1ylz16p7g5uelh.js.map} +1 -1
  43. package/dist/chunks/input-area-jkkkjej6luumrqpa.js +78 -0
  44. package/dist/chunks/input-area-jkkkjej6luumrqpa.js.map +1 -0
  45. package/dist/chunks/input-cw05pbqdburghkus.js +113 -0
  46. package/dist/chunks/input-cw05pbqdburghkus.js.map +1 -0
  47. package/dist/chunks/{input-group-hbebbyh8fo6aqydn.js → input-group-lfugneuz71g42n0w.js} +27 -27
  48. package/dist/chunks/input-group-lfugneuz71g42n0w.js.map +1 -0
  49. package/dist/chunks/label-cvyvbqmt4mt757ff.js +68 -0
  50. package/dist/chunks/{label-j9owppbgnn35mebg.js.map → label-cvyvbqmt4mt757ff.js.map} +1 -1
  51. package/dist/chunks/layer-card-ljqth3yxgnk04v2o.js +46 -0
  52. package/dist/chunks/layer-card-ljqth3yxgnk04v2o.js.map +1 -0
  53. package/dist/chunks/{link-hmmf3k1xn6rm72rt.js → link-fjnhtxvfe5ieamjf.js} +2 -2
  54. package/dist/chunks/{link-hmmf3k1xn6rm72rt.js.map → link-fjnhtxvfe5ieamjf.js.map} +1 -1
  55. package/dist/chunks/{loader-m5wfmqwgucrr4i5v.js → loader-hr2w7cpqeev3p3vl.js} +9 -6
  56. package/dist/chunks/loader-hr2w7cpqeev3p3vl.js.map +1 -0
  57. package/dist/chunks/menubar-e5e4zwfagr0wx023.js +96 -0
  58. package/dist/chunks/menubar-e5e4zwfagr0wx023.js.map +1 -0
  59. package/dist/chunks/{meter-i84dte2f82qmvn7y.js → meter-duj3micor1lqj3y2.js} +2 -2
  60. package/dist/chunks/{meter-i84dte2f82qmvn7y.js.map → meter-duj3micor1lqj3y2.js.map} +1 -1
  61. package/dist/chunks/pagination-olaypvwr8swsmn8m.js +266 -0
  62. package/dist/chunks/pagination-olaypvwr8swsmn8m.js.map +1 -0
  63. package/dist/chunks/{popover-i951xjcgezeqr4iv.js → popover-nv9cmzbo7mf6bky0.js} +68 -72
  64. package/dist/chunks/popover-nv9cmzbo7mf6bky0.js.map +1 -0
  65. package/dist/chunks/{radio-l2vkcue40d84fmo1.js → radio-ihxbe37us2jnqtzf.js} +38 -38
  66. package/dist/chunks/radio-ihxbe37us2jnqtzf.js.map +1 -0
  67. package/dist/chunks/select-nx6ded5swra74iar.js +213 -0
  68. package/dist/chunks/select-nx6ded5swra74iar.js.map +1 -0
  69. package/dist/chunks/{sensitive-input-kznmknpp5h1grc6k.js → sensitive-input-00fujb510rrn61v9.js} +34 -34
  70. package/dist/chunks/{sensitive-input-kznmknpp5h1grc6k.js.map → sensitive-input-00fujb510rrn61v9.js.map} +1 -1
  71. package/dist/chunks/{sidebar-jepeq7gaf4issuw6.js → sidebar-ltbfius1eolkl8tb.js} +24 -28
  72. package/dist/chunks/sidebar-ltbfius1eolkl8tb.js.map +1 -0
  73. package/dist/chunks/surface-dfgurg5eu3et4vw1.js +29 -0
  74. package/dist/chunks/surface-dfgurg5eu3et4vw1.js.map +1 -0
  75. package/dist/chunks/{switch-i0zwcp3wq6vsxm1c.js → switch-fbv3iawqo3o3jgap.js} +104 -102
  76. package/dist/chunks/switch-fbv3iawqo3o3jgap.js.map +1 -0
  77. package/dist/chunks/table-of-contents-f813ivi7ta23vqdm.js +88 -0
  78. package/dist/chunks/table-of-contents-f813ivi7ta23vqdm.js.map +1 -0
  79. package/dist/chunks/table-olwwulga2l3hdwlx.js +189 -0
  80. package/dist/chunks/table-olwwulga2l3hdwlx.js.map +1 -0
  81. package/dist/chunks/{tabs-bw92jb303zxw7w4f.js → tabs-lohcglgppp6gj0hp.js} +16 -16
  82. package/dist/chunks/{tabs-bw92jb303zxw7w4f.js.map → tabs-lohcglgppp6gj0hp.js.map} +1 -1
  83. package/dist/chunks/{toast-lrnwby56drs7vtae.js → toast-dg52x89yd231mxhe.js} +30 -30
  84. package/dist/chunks/{toast-lrnwby56drs7vtae.js.map → toast-dg52x89yd231mxhe.js.map} +1 -1
  85. package/dist/chunks/{tooltip-cit9ltlxfuhwctuj.js → tooltip-hikjvdbg3xghnq1x.js} +38 -33
  86. package/dist/chunks/tooltip-hikjvdbg3xghnq1x.js.map +1 -0
  87. package/dist/chunks/{vendor-base-ui-n30qblevnpk9cc5c.js → vendor-base-ui-m5pz3e8c4grg5qmj.js} +46 -43
  88. package/dist/chunks/{vendor-base-ui-n30qblevnpk9cc5c.js.map → vendor-base-ui-m5pz3e8c4grg5qmj.js.map} +1 -1
  89. package/dist/code.js +1 -1
  90. package/dist/components/badge.js +1 -1
  91. package/dist/components/banner.js +1 -1
  92. package/dist/components/breadcrumbs.js +1 -1
  93. package/dist/components/button.js +1 -1
  94. package/dist/components/chart.js +1 -1
  95. package/dist/components/checkbox.js +1 -1
  96. package/dist/components/clipboard-text.js +1 -1
  97. package/dist/components/cloudflare-logo.js +1 -1
  98. package/dist/components/code.js +1 -1
  99. package/dist/components/combobox.js +1 -1
  100. package/dist/components/command-palette.js +1 -1
  101. package/dist/components/dialog.js +1 -1
  102. package/dist/components/dropdown.js +1 -1
  103. package/dist/components/empty.js +1 -1
  104. package/dist/components/field.js +1 -1
  105. package/dist/components/flow.js +2 -2
  106. package/dist/components/flow.js.map +1 -1
  107. package/dist/components/grid.js +1 -1
  108. package/dist/components/input.js +3 -3
  109. package/dist/components/label.js +1 -1
  110. package/dist/components/layer-card.js +1 -1
  111. package/dist/components/link.js +1 -1
  112. package/dist/components/loader.js +1 -1
  113. package/dist/components/menubar.js +1 -1
  114. package/dist/components/meter.js +1 -1
  115. package/dist/components/pagination.js +1 -1
  116. package/dist/components/popover.js +1 -1
  117. package/dist/components/radio.js +1 -1
  118. package/dist/components/select.js +1 -1
  119. package/dist/components/sensitive-input.js +1 -1
  120. package/dist/components/sidebar.js +1 -1
  121. package/dist/components/surface.js +1 -1
  122. package/dist/components/switch.js +1 -1
  123. package/dist/components/table-of-contents.js +8 -0
  124. package/dist/components/table-of-contents.js.map +1 -0
  125. package/dist/components/table.js +1 -1
  126. package/dist/components/tabs.js +1 -1
  127. package/dist/components/toast.js +2 -2
  128. package/dist/components/tooltip.js +1 -1
  129. package/dist/index.js +128 -124
  130. package/dist/index.js.map +1 -1
  131. package/dist/primitives/accordion.js +1 -1
  132. package/dist/primitives/alert-dialog.js +1 -1
  133. package/dist/primitives/autocomplete.js +1 -1
  134. package/dist/primitives/avatar.js +1 -1
  135. package/dist/primitives/button.js +1 -1
  136. package/dist/primitives/checkbox-group.js +1 -1
  137. package/dist/primitives/checkbox.js +1 -1
  138. package/dist/primitives/collapsible.js +1 -1
  139. package/dist/primitives/combobox.js +1 -1
  140. package/dist/primitives/context-menu.js +1 -1
  141. package/dist/primitives/csp-provider.js +1 -1
  142. package/dist/primitives/dialog.js +1 -1
  143. package/dist/primitives/direction-provider.js +1 -1
  144. package/dist/primitives/drawer.js +1 -1
  145. package/dist/primitives/field.js +1 -1
  146. package/dist/primitives/fieldset.js +1 -1
  147. package/dist/primitives/form.js +1 -1
  148. package/dist/primitives/input.js +1 -1
  149. package/dist/primitives/menu.js +1 -1
  150. package/dist/primitives/menubar.js +1 -1
  151. package/dist/primitives/meter.js +1 -1
  152. package/dist/primitives/navigation-menu.js +1 -1
  153. package/dist/primitives/number-field.js +1 -1
  154. package/dist/primitives/popover.js +1 -1
  155. package/dist/primitives/preview-card.js +1 -1
  156. package/dist/primitives/progress.js +1 -1
  157. package/dist/primitives/radio-group.js +1 -1
  158. package/dist/primitives/radio.js +1 -1
  159. package/dist/primitives/scroll-area.js +1 -1
  160. package/dist/primitives/select.js +1 -1
  161. package/dist/primitives/separator.js +1 -1
  162. package/dist/primitives/slider.js +1 -1
  163. package/dist/primitives/switch.js +1 -1
  164. package/dist/primitives/tabs.js +1 -1
  165. package/dist/primitives/toast.js +1 -1
  166. package/dist/primitives/toggle-group.js +1 -1
  167. package/dist/primitives/toggle.js +1 -1
  168. package/dist/primitives/toolbar.js +1 -1
  169. package/dist/primitives/tooltip.js +1 -1
  170. package/dist/primitives.js +1 -1
  171. package/dist/scripts/theme-generator/config.d.ts.map +1 -1
  172. package/dist/scripts/theme-generator/config.js +32 -113
  173. package/dist/scripts/theme-generator/config.js.map +1 -1
  174. package/dist/src/components/badge/badge.d.ts +61 -79
  175. package/dist/src/components/badge/badge.d.ts.map +1 -1
  176. package/dist/src/components/banner/banner.d.ts +3 -3
  177. package/dist/src/components/button/button.d.ts +3 -3
  178. package/dist/src/components/button/button.d.ts.map +1 -1
  179. package/dist/src/components/chart/EChart.d.ts +18 -2
  180. package/dist/src/components/chart/EChart.d.ts.map +1 -1
  181. package/dist/src/components/chart/TimeseriesChart.d.ts.map +1 -1
  182. package/dist/src/components/chart/index.d.ts +1 -1
  183. package/dist/src/components/chart/index.d.ts.map +1 -1
  184. package/dist/src/components/checkbox/checkbox.d.ts +1 -1
  185. package/dist/src/components/code/code.d.ts.map +1 -1
  186. package/dist/src/components/combobox/combobox.d.ts +16 -2
  187. package/dist/src/components/combobox/combobox.d.ts.map +1 -1
  188. package/dist/src/components/dropdown/dropdown.d.ts.map +1 -1
  189. package/dist/src/components/input/input-area.d.ts.map +1 -1
  190. package/dist/src/components/input/input.d.ts +1 -2
  191. package/dist/src/components/input/input.d.ts.map +1 -1
  192. package/dist/src/components/label/label.d.ts.map +1 -1
  193. package/dist/src/components/layer-card/layer-card.d.ts +39 -5
  194. package/dist/src/components/layer-card/layer-card.d.ts.map +1 -1
  195. package/dist/src/components/loader/loader.d.ts +7 -1
  196. package/dist/src/components/loader/loader.d.ts.map +1 -1
  197. package/dist/src/components/menubar/menubar.d.ts.map +1 -1
  198. package/dist/src/components/pagination/pagination.d.ts +62 -2
  199. package/dist/src/components/pagination/pagination.d.ts.map +1 -1
  200. package/dist/src/components/popover/popover.d.ts +35 -8
  201. package/dist/src/components/popover/popover.d.ts.map +1 -1
  202. package/dist/src/components/radio/radio.d.ts +2 -2
  203. package/dist/src/components/select/select.d.ts +115 -7
  204. package/dist/src/components/select/select.d.ts.map +1 -1
  205. package/dist/src/components/sensitive-input/sensitive-input.d.ts +1 -1
  206. package/dist/src/components/sidebar/sidebar.d.ts +2 -2
  207. package/dist/src/components/sidebar/sidebar.d.ts.map +1 -1
  208. package/dist/src/components/surface/index.d.ts +3 -0
  209. package/dist/src/components/surface/index.d.ts.map +1 -1
  210. package/dist/src/components/surface/surface.d.ts +14 -10
  211. package/dist/src/components/surface/surface.d.ts.map +1 -1
  212. package/dist/src/components/switch/switch.d.ts.map +1 -1
  213. package/dist/src/components/table/table.d.ts.map +1 -1
  214. package/dist/src/components/table-of-contents/index.d.ts +2 -0
  215. package/dist/src/components/table-of-contents/index.d.ts.map +1 -0
  216. package/dist/src/components/table-of-contents/table-of-contents.d.ts +70 -0
  217. package/dist/src/components/table-of-contents/table-of-contents.d.ts.map +1 -0
  218. package/dist/src/components/toast/toast.d.ts +1 -1
  219. package/dist/src/components/tooltip/tooltip.d.ts +25 -6
  220. package/dist/src/components/tooltip/tooltip.d.ts.map +1 -1
  221. package/dist/src/index.d.ts +6 -2
  222. package/dist/src/index.d.ts.map +1 -1
  223. package/dist/styles/kumo-binding.css +4 -0
  224. package/dist/styles/kumo-standalone.css +1 -1
  225. package/dist/styles/theme-fedramp.css +3 -3
  226. package/dist/styles/theme-kumo.css +66 -127
  227. package/package.json +5 -1
  228. package/scripts/component-registry/index.test.ts +4 -4
  229. package/scripts/component-registry/metadata.ts +3 -3
  230. package/scripts/theme-generator/config.ts +37 -116
  231. package/dist/chunks/Legend-o0ntojbaplmszwk0.js.map +0 -1
  232. package/dist/chunks/badge-n80t3z8u9ttlxi20.js +0 -120
  233. package/dist/chunks/badge-n80t3z8u9ttlxi20.js.map +0 -1
  234. package/dist/chunks/button-odxi0hp4fvi5i2w3.js.map +0 -1
  235. package/dist/chunks/checkbox-dx8x0rzv582yjv7n.js.map +0 -1
  236. package/dist/chunks/code-liq1g6f5lhee305d.js.map +0 -1
  237. package/dist/chunks/combobox-9fhjzprab46csmon.js.map +0 -1
  238. package/dist/chunks/command-palette-kenx2bbdzd4kpx36.js.map +0 -1
  239. package/dist/chunks/dialog-e05ysa8t2fklw065.js.map +0 -1
  240. package/dist/chunks/input-area-nq40szg9110on89c.js +0 -74
  241. package/dist/chunks/input-area-nq40szg9110on89c.js.map +0 -1
  242. package/dist/chunks/input-group-hbebbyh8fo6aqydn.js.map +0 -1
  243. package/dist/chunks/input-kvhyo3p4859bexvx.js +0 -109
  244. package/dist/chunks/input-kvhyo3p4859bexvx.js.map +0 -1
  245. package/dist/chunks/label-j9owppbgnn35mebg.js +0 -62
  246. package/dist/chunks/layer-card-l5yjvrxry1dhte57.js +0 -44
  247. package/dist/chunks/layer-card-l5yjvrxry1dhte57.js.map +0 -1
  248. package/dist/chunks/loader-m5wfmqwgucrr4i5v.js.map +0 -1
  249. package/dist/chunks/menubar-abojnm0uwjuni8ok.js +0 -92
  250. package/dist/chunks/menubar-abojnm0uwjuni8ok.js.map +0 -1
  251. package/dist/chunks/pagination-pbd7qqik97ac0l7m.js +0 -224
  252. package/dist/chunks/pagination-pbd7qqik97ac0l7m.js.map +0 -1
  253. package/dist/chunks/popover-i951xjcgezeqr4iv.js.map +0 -1
  254. package/dist/chunks/radio-l2vkcue40d84fmo1.js.map +0 -1
  255. package/dist/chunks/select-paedwa3nlhpq82ua.js +0 -132
  256. package/dist/chunks/select-paedwa3nlhpq82ua.js.map +0 -1
  257. package/dist/chunks/sidebar-jepeq7gaf4issuw6.js.map +0 -1
  258. package/dist/chunks/surface-blo81kgy9g0sexgm.js +0 -36
  259. package/dist/chunks/surface-blo81kgy9g0sexgm.js.map +0 -1
  260. package/dist/chunks/switch-i0zwcp3wq6vsxm1c.js.map +0 -1
  261. package/dist/chunks/table-nrcw19tlpduayukl.js +0 -183
  262. package/dist/chunks/table-nrcw19tlpduayukl.js.map +0 -1
  263. package/dist/chunks/tooltip-cit9ltlxfuhwctuj.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,148 @@
1
1
  # @cloudflare/kumo
2
2
 
3
+ ## 1.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - da6eee1: feat(chart): rename `formatter` to `dangerousHtmlFormatter` for XSS awareness
8
+
9
+ BREAKING CHANGE: The `formatter` property in `KumoChartOption['tooltip']` has been renamed to `dangerousHtmlFormatter`. This change makes the security implications of using HTML formatters more explicit to developers. The API remains identical—only the name has changed.
10
+
11
+ Migration: Replace `formatter` with `dangerousHtmlFormatter` in your chart tooltip configurations.
12
+
13
+ - 4785c43: feat(tooltip, popover): deprecate `asChild` in favor of `render` prop
14
+
15
+ Unifies composition patterns across the library by adopting Base UI's `render` prop pattern. The `asChild` prop is now deprecated on:
16
+ - `Tooltip`
17
+ - `Popover.Trigger`
18
+ - `Popover.Close`
19
+
20
+ **Migration:**
21
+
22
+ ```diff
23
+ - <Tooltip content="Save" asChild>
24
+ - <Button>Save</Button>
25
+ - </Tooltip>
26
+ + <Tooltip content="Save" render={<Button>Save</Button>} />
27
+
28
+ - <Popover.Trigger asChild>
29
+ - <Button>Open</Button>
30
+ - </Popover.Trigger>
31
+ + <Popover.Trigger render={<Button>Open</Button>} />
32
+
33
+ - <Popover.Close asChild>
34
+ - <Button>Close</Button>
35
+ - </Popover.Close>
36
+ + <Popover.Close render={<Button>Close</Button>} />
37
+ ```
38
+
39
+ The `asChild` prop remains functional for backward compatibility but will be removed in a future major version.
40
+
41
+ - a0f2b18: feat(popover): expose `anchor` prop on `Popover.Content` for virtual positioning
42
+
43
+ Forwards Base UI's `anchor` prop through `Popover.Content` to the underlying `Positioner`, enabling popover positioning against custom elements, refs, or virtual points (e.g., a `DOMRect` from `getBoundingClientRect()`). This is useful when the popover trigger and the desired anchor are in different component trees, or when anchoring to a coordinate rather than a DOM element.
44
+
45
+ - 58b5777: Convert Table of Contents to exported Kumo component
46
+ - 0cae077: feat(Select): add size prop (xs/sm/base/lg) matching Input and Combobox heights
47
+
48
+ ### Patch Changes
49
+
50
+ - 1e7ba10: feat(layer-card): support simple card usage and deprecate Surface
51
+ - allow `LayerCard` to be used directly without `LayerCard.Primary` for simple single-layer card layouts
52
+ - keep `LayerCard.Secondary` and `LayerCard.Primary` supported for the existing layered card pattern
53
+ - deprecate `Surface` in favor of `LayerCard` while keeping the old API working as a compatibility wrapper
54
+ - update docs and examples to prefer `LayerCard`, including table examples that no longer need a nested `LayerCard.Primary`
55
+
56
+ - 2682319: fix(pagination): add ARIA attributes for screen reader accessibility
57
+ - Wrap pagination controls in `<nav>` for proper landmark navigation
58
+ - Add `aria-live="polite"` and `aria-atomic="true"` to status text for page change announcements
59
+ - Add `navigation` to `PaginationLabels` for i18n customization of the nav aria-label
60
+
61
+ - 9eb1306: fix(chart): escape HTML in tooltip series name and values
62
+
63
+ Escapes HTML entities in TimeseriesChart tooltip series names and values before rendering.
64
+
65
+ - 4565baa: fix(combobox): make TriggerInput caret button clickable for Playwright tests
66
+ - 4dfdc3f: fix(dropdown): pass children through when render prop is provided on DropdownMenu.Trigger
67
+ - 98e3170: fix(Select): TypeScript inference with `strictNullChecks` and `renderValue`/`placeholder` interaction
68
+
69
+ **TypeScript fix:** Under `strictNullChecks`, using `value={objectOrNull}` would cause `T` to be inferred as `never`, making callbacks like `onValueChange` and `renderValue` unusable. This is now fixed.
70
+
71
+ **Runtime fix:** `renderValue` is now only called with non-null values. When value is null, the `placeholder` is shown instead. Previously, `renderValue` would receive `null` at runtime despite being typed as `(value: T) => ReactNode`.
72
+
73
+ ```tsx
74
+ // Recommended pattern
75
+ <Select
76
+ placeholder="Select..."
77
+ value={value}
78
+ onValueChange={setValue} // value is T | null (works with strictNullChecks)
79
+ renderValue={(v) => v.name} // v is T (non-null), no defensive coding needed
80
+ />
81
+ ```
82
+
83
+ - 9c3cdbf: Fix sidebar collapsible content snapping shut instead of animating smoothly when closing.
84
+ - 27bcd59: fix(table): align sticky column colors with compact header variant
85
+ - a8adf02: fix(tokens): correct text-kumo-subtle dark mode value to provide visible contrast
86
+ - 547c7fa: Updated the token value for `kumo-line` and `kumo-hairline` in dark mode so they are more visible.
87
+ - replace `kumo-line` usages with `kumo-hairline` across Kumo components and docs UI/content styles
88
+ - use `ring-kumo-line` for shadowed surfaces (for example combobox, dialog, select, dropdown, toast, and related surface wrappers)
89
+ - adjust theme token configuration and generated styles to support updated neutral/hairline appearance
90
+
91
+ - 460a603: fix(a11y): add accessible labels to icon-only controls
92
+
93
+ ## 1.18.0
94
+
95
+ ### Minor Changes
96
+
97
+ - b1e51a8: Add Enter key navigation to Pagination page number input and new `pageSelector` prop for dropdown mode
98
+ - The page number input in `Pagination.Controls` now navigates on Enter key press (previously only on blur)
99
+ - New `pageSelector` prop on `Pagination.Controls`: set to `"dropdown"` to render a Select dropdown instead of a text input for page selection
100
+
101
+ - e676f0b: Add disabled option support, groups, group labels, and separators to Select
102
+ - `Select.Option` now accepts `disabled` and `className` props
103
+ - New `Select.Group` and `Select.GroupLabel` sub-components for organizing options under labeled headers
104
+ - New `Select.Separator` sub-component for visual dividers between groups
105
+ - The `items` object-map prop now accepts `SelectItemDescriptor` values with `disabled` metadata
106
+
107
+ - a685953: Expose `delay` and `closeDelay` props on Tooltip component to control open and close timing. These props are forwarded to the underlying Base UI Trigger component.
108
+
109
+ ### Patch Changes
110
+
111
+ - dacf445: Input and InputArea now automatically apply error styling when the `error` prop is truthy. You no longer need to set `variant="error"` separately - just pass an error message and the styling is applied automatically. The `variant="error"` prop is now deprecated but still works for backwards compatibility.
112
+ - 44c26f5: Adjust semantic tint usage for status/error ring styles across core form and feedback components.
113
+ - Update background styles in `Badge` and `Banner` components to use `*-tint` tokens.
114
+ - Update `kumo-danger` to a darker token to improve a11y contrast.
115
+ - Update error ring styling in form components to use semantic tokens (now darker with token swap).
116
+ - Removed `text-color-badge-red-subtle` token in replacement of the `danger` token.
117
+ - Update theme generator color mappings used by these tints to improve visual consistency.
118
+
119
+ - 2bb8628: Fix CodeBlock crash when an unsupported `lang` value is passed at runtime. The `codeVariants()` function now uses optional chaining with a nullish coalescing fallback to the default language, matching the defensive pattern already used by `switchVariants()` and `badgeVariants()`.
120
+ - e8bcf6f: fix(select): use ring-kumo-hairline token in Select popup (missed in PR #355)
121
+ - c3beded: Fix Select popup scrolling and height behavior; align popup/list structure with Base UI. Split popup into frame (Popup) and scroll container (List) to match Combobox pattern and fix touch scroll on long lists.
122
+ - 4a2fb02: fix(loader): add ARIA attributes for screen reader accessibility
123
+
124
+ Added `role="status"` and `aria-label="Loading"` to the Loader SVG component to make it accessible to screen readers. This resolves a WCAG 2.1 SC 4.1.3 (Status Messages) violation where assistive technology users received no indication that content was loading.
125
+
126
+ - 5e4c7b1: Refine badge semantics/fill styling and banner tone updates
127
+ - Rework `Badge` variant model to prioritize semantic variants (`primary`, `secondary`, `error`, `warning`, `success`, `info`) with updated descriptions and `primary` as default.
128
+ - Keep token color variants for product-specific use cases while updating class mappings so semantic and token variants are distinct.
129
+ - Slight updates to token color variants to meet a11y contrast requirements.
130
+ - Update token color variants by replacing `yellow` with `purple` since `yellow` doesn't meet a11y contrast requirements, and keeping docs/demo examples in sync.
131
+ - Update badge docs demos/content to focus on primary semantic badges and a consolidated "other variants" section.
132
+ - Adjust banner variant surfaces (`default`, `alert`, `error`) to stronger tinted backgrounds and borders.
133
+ - Update theme generator badge/semantic token mappings and regenerate `theme-kumo.css` to match the new badge color system.
134
+
135
+ - 6458fae: Fix Switch label click not toggling when a custom `id` prop is provided
136
+
137
+ The `id` was not being forwarded to Base UI's `Switch.Root`, causing a mismatch between the label's `htmlFor` and the button's actual `id`.
138
+
139
+ - cf6b917: Align semantic token documentation and docs presentation updates.
140
+ - Update `colors.mdx` token documentation structure.
141
+ - Replaced `kumo-ring` with `kumo-hairline` for border/ring colors and all its instances in kumo components and docs.
142
+ - Sync `packages/kumo/ai/USAGE.md` token reference categories and descriptions with the docs token guide.
143
+ - Adjust the typo in the recessed dark token value in theme generator config and regenerate `theme-kumo.css`.
144
+ - Updated `kumo-fill-hover` token value from `neutral-700` to `neutral-800`
145
+
3
146
  ## 1.17.0
4
147
 
5
148
  ### Minor Changes
package/ai/USAGE.md CHANGED
@@ -73,46 +73,52 @@ import { Button, Input, Dialog } from "@cloudflare/kumo";
73
73
 
74
74
  ## Semantic Token Reference
75
75
 
76
+ ### Surface Hierarchy
77
+ | Token | Purpose |
78
+ |-------|---------|
79
+ | `bg-kumo-canvas` | The outermost page background — sits behind everything |
80
+ | `bg-kumo-base` | Default component background |
81
+ | `bg-kumo-elevated` | Slightly elevated surface, e.g. `LayerCard.Secondary` |
82
+ | `bg-kumo-recessed` | Recessed surface with a subtly darker fill, e.g. segmented `Tabs` background |
83
+ | `bg-kumo-tint` | Subtle tinted background for tables or hover states |
84
+ | `bg-kumo-contrast` | High-contrast, inverted background |
85
+
86
+ ### Brand
87
+ | Token | Purpose |
88
+ |-------|---------|
89
+ | `bg-kumo-brand` | Primary brand background |
90
+ | `bg-kumo-brand-hover` | Hover state for brand backgrounds |
91
+
92
+ ### Semantic Status Colors
93
+ | Token | Purpose |
94
+ |-------|---------|
95
+ | `bg-kumo-info` | Info indicator (icon, dot, bar) |
96
+ | `bg-kumo-success` | Success indicator |
97
+ | `bg-kumo-warning` | Warning indicator |
98
+ | `bg-kumo-danger` | Error/destructive indicator |
99
+
100
+ Use the solid token on icons, status dots, and progress fills. Banners and badges use the solid fills with a reduced opacity.
101
+
76
102
  ### Text Colors
77
103
  | Token | Purpose |
78
104
  |-------|---------|
79
- | `text-kumo-default` | Primary text |
80
- | `text-kumo-inverse` | Inverse text (on dark backgrounds) |
81
- | `text-kumo-strong` | Secondary/muted-strong text |
82
- | `text-kumo-subtle` | Muted/placeholder text |
105
+ | `text-kumo-default` | Primary body text |
106
+ | `text-kumo-strong` | Secondary text with slightly less contrast than default |
107
+ | `text-kumo-subtle` | Muted text for descriptions, captions, or secondary labels |
108
+ | `text-kumo-inactive` | Disabled or inactive text |
109
+ | `text-kumo-placeholder` | Placeholder text in inputs |
110
+ | `text-kumo-inverse` | Text intended for use on high-contrast or inverted backgrounds |
83
111
  | `text-kumo-link` | Link text |
112
+ | `text-kumo-info` | Info-colored text |
113
+ | `text-kumo-success` | Success-colored text |
114
+ | `text-kumo-warning` | Warning-colored text |
84
115
  | `text-kumo-danger` | Error/destructive text |
85
- | `text-kumo-success` | Success text |
86
- | `text-kumo-warning` | Warning text |
87
- | `text-kumo-brand` | Brand-colored text |
88
116
 
89
- ### Background Colors
90
- | Token | Purpose |
91
- |-------|---------|
92
- | `bg-kumo-surface` | Page background |
93
- | `bg-kumo-base` | Component background |
94
- | `bg-kumo-elevated` | Slightly elevated surface |
95
- | `bg-kumo-recessed` | Recessed surface with a darker colour |
96
- | `bg-kumo-overlay` | Overlay/hover background |
97
- | `bg-kumo-contrast` | High-contrast background (inverted) |
98
- | `bg-kumo-control` | Form control background |
99
- | `bg-kumo-fill` | Muted fill (borders, badges) |
100
- | `bg-kumo-fill-hover` | Hover state for fills |
101
- | `bg-kumo-tint` | Subtle tinted background |
102
- | `bg-kumo-interact` | Interactive element background |
103
- | `bg-kumo-brand` | Brand primary background |
104
- | `bg-kumo-brand-hover` | Brand hover background |
105
- | `bg-kumo-danger` | Error/destructive background |
106
- | `bg-kumo-success` | Success background |
107
- | `bg-kumo-warning` | Warning background |
108
-
109
- ### Border/Ring Colors
117
+ ### Borders & Rings
110
118
  | Token | Purpose |
111
119
  |-------|---------|
112
- | `border-kumo-fill` | Default border |
113
- | `border-kumo-line` | Subtle separator line |
114
- | `ring-kumo-line` | Default ring (input borders) |
115
- | `ring-kumo-ring` | Focus ring |
120
+ | `kumo-hairline` | A border/ring color to distinguish between flat surfaces where no shadow is present (i.e. `LayerCard`). |
121
+ | `kumo-line` | A thicker border/ring color that defines the edge of an elevated surface alongside a shadow. |
116
122
 
117
123
  ## Icons
118
124