@cloudflare/kumo 1.19.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +239 -0
- package/ai/component-registry.json +758 -118
- package/ai/component-registry.md +1151 -153
- package/ai/schemas.ts +42 -14
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +153 -21
- package/dist/ai/schemas.d.ts.map +1 -1
- package/dist/ai/schemas.js +1994 -1956
- package/dist/ai/schemas.js.map +1 -1
- package/dist/chunks/Legend-ibjxhfm9pn2vrb6f.js +430 -0
- package/dist/chunks/Legend-ibjxhfm9pn2vrb6f.js.map +1 -0
- package/dist/chunks/autocomplete-cs3fwy6lwzlyirpq.js +174 -0
- package/dist/chunks/autocomplete-cs3fwy6lwzlyirpq.js.map +1 -0
- package/dist/chunks/{breadcrumbs-ge20hcb3o5spswrk.js → breadcrumbs-cxcwf2l1ki3ffg5d.js} +2 -2
- package/dist/chunks/{breadcrumbs-ge20hcb3o5spswrk.js.map → breadcrumbs-cxcwf2l1ki3ffg5d.js.map} +1 -1
- package/dist/chunks/{button-oaqi7ykdisyskoos.js → button-6by9ntsa3nj553mq.js} +23 -24
- package/dist/chunks/button-6by9ntsa3nj553mq.js.map +1 -0
- package/dist/chunks/checkbox-eren6w2csum1xghg.js +210 -0
- package/dist/chunks/checkbox-eren6w2csum1xghg.js.map +1 -0
- package/dist/chunks/{clipboard-text-dxczqon3d27xp6f0.js → clipboard-text-f9q753udny1uyxr5.js} +45 -41
- package/dist/chunks/{clipboard-text-dxczqon3d27xp6f0.js.map → clipboard-text-f9q753udny1uyxr5.js.map} +1 -1
- package/dist/chunks/collapsible-k8urhi16pg90jvxa.js +71 -0
- package/dist/chunks/collapsible-k8urhi16pg90jvxa.js.map +1 -0
- package/dist/chunks/{combobox-eaowwt1xr4d23gsn.js → combobox-n9qht9h9ag6kh5sn.js} +86 -74
- package/dist/chunks/combobox-n9qht9h9ag6kh5sn.js.map +1 -0
- package/dist/chunks/{command-palette-maqtbmpfev9mysqd.js → command-palette-gk9m34ymp2b3hfc5.js} +126 -126
- package/dist/chunks/command-palette-gk9m34ymp2b3hfc5.js.map +1 -0
- package/dist/chunks/{date-range-picker-j318zxjyqz4o3dak.js → date-range-picker-c9wnx9tbwohai7jy.js} +26 -26
- package/dist/chunks/{date-range-picker-j318zxjyqz4o3dak.js.map → date-range-picker-c9wnx9tbwohai7jy.js.map} +1 -1
- package/dist/chunks/{dialog-e3m5bhs7fds26p9y.js → dialog-94v7wiz7j3in6528.js} +3 -3
- package/dist/chunks/{dialog-e3m5bhs7fds26p9y.js.map → dialog-94v7wiz7j3in6528.js.map} +1 -1
- package/dist/chunks/{dropdown-ewte287db3vyt8t5.js → dropdown-zbax0zowy6m9zhmt.js} +87 -87
- package/dist/chunks/dropdown-zbax0zowy6m9zhmt.js.map +1 -0
- package/dist/chunks/{empty-dr1eckm2z40euns6.js → empty-kpymw59thjf2ip8g.js} +9 -9
- package/dist/chunks/{empty-dr1eckm2z40euns6.js.map → empty-kpymw59thjf2ip8g.js.map} +1 -1
- package/dist/chunks/{field-bo5gmna16odrrb1q.js → field-lnj619xpe8zjd26r.js} +7 -7
- package/dist/chunks/{field-bo5gmna16odrrb1q.js.map → field-lnj619xpe8zjd26r.js.map} +1 -1
- package/dist/chunks/{input-area-jkkkjej6luumrqpa.js → input-area-h8xbqturegdfm1mi.js} +4 -4
- package/dist/chunks/{input-area-jkkkjej6luumrqpa.js.map → input-area-h8xbqturegdfm1mi.js.map} +1 -1
- package/dist/chunks/input-group-dh4pg8p20rh4mdi0.js +505 -0
- package/dist/chunks/input-group-dh4pg8p20rh4mdi0.js.map +1 -0
- package/dist/chunks/{input-cw05pbqdburghkus.js → input-lpa5fc75tgrraafv.js} +46 -46
- package/dist/chunks/input-lpa5fc75tgrraafv.js.map +1 -0
- package/dist/chunks/{label-cvyvbqmt4mt757ff.js → label-be8m7qzlakzig2sl.js} +3 -3
- package/dist/chunks/{label-cvyvbqmt4mt757ff.js.map → label-be8m7qzlakzig2sl.js.map} +1 -1
- package/dist/chunks/{layer-card-ljqth3yxgnk04v2o.js → layer-card-hvivdirwwnyq88wa.js} +5 -5
- package/dist/chunks/{layer-card-ljqth3yxgnk04v2o.js.map → layer-card-hvivdirwwnyq88wa.js.map} +1 -1
- package/dist/chunks/{link-fjnhtxvfe5ieamjf.js → link-kt74pxkud4olmcer.js} +4 -4
- package/dist/chunks/{link-fjnhtxvfe5ieamjf.js.map → link-kt74pxkud4olmcer.js.map} +1 -1
- package/dist/chunks/menubar-hwev159bm4rw9ixk.js +96 -0
- package/dist/chunks/menubar-hwev159bm4rw9ixk.js.map +1 -0
- package/dist/chunks/{meter-duj3micor1lqj3y2.js → meter-bqetlujwg8gm2u7m.js} +2 -2
- package/dist/chunks/{meter-duj3micor1lqj3y2.js.map → meter-bqetlujwg8gm2u7m.js.map} +1 -1
- package/dist/chunks/{pagination-olaypvwr8swsmn8m.js → pagination-ho8zesqfyp6ckmrl.js} +21 -21
- package/dist/chunks/pagination-ho8zesqfyp6ckmrl.js.map +1 -0
- package/dist/chunks/{popover-nv9cmzbo7mf6bky0.js → popover-iayd9ya5yhujz6ve.js} +5 -5
- package/dist/chunks/{popover-nv9cmzbo7mf6bky0.js.map → popover-iayd9ya5yhujz6ve.js.map} +1 -1
- package/dist/chunks/{radio-ihxbe37us2jnqtzf.js → radio-datzh3pilz8ojak1.js} +86 -74
- package/dist/chunks/radio-datzh3pilz8ojak1.js.map +1 -0
- package/dist/chunks/{select-nx6ded5swra74iar.js → select-kpfbib9l8xrrmzpz.js} +64 -62
- package/dist/chunks/select-kpfbib9l8xrrmzpz.js.map +1 -0
- package/dist/chunks/{sensitive-input-00fujb510rrn61v9.js → sensitive-input-i1upqytzaw2pus8v.js} +42 -42
- package/dist/chunks/sensitive-input-i1upqytzaw2pus8v.js.map +1 -0
- package/dist/chunks/{sidebar-ltbfius1eolkl8tb.js → sidebar-kh37grvfxto14ek6.js} +129 -126
- package/dist/chunks/sidebar-kh37grvfxto14ek6.js.map +1 -0
- package/dist/chunks/{surface-dfgurg5eu3et4vw1.js → surface-o63tktyrifcjejyb.js} +2 -2
- package/dist/chunks/{surface-dfgurg5eu3et4vw1.js.map → surface-o63tktyrifcjejyb.js.map} +1 -1
- package/dist/chunks/{switch-fbv3iawqo3o3jgap.js → switch-lclhiplr9zqf73tj.js} +86 -78
- package/dist/chunks/switch-lclhiplr9zqf73tj.js.map +1 -0
- package/dist/chunks/{table-olwwulga2l3hdwlx.js → table-fyy8gl875yyevqs3.js} +89 -71
- package/dist/chunks/table-fyy8gl875yyevqs3.js.map +1 -0
- package/dist/chunks/table-of-contents-fzyv7uhnnyr13dqu.js +102 -0
- package/dist/chunks/table-of-contents-fzyv7uhnnyr13dqu.js.map +1 -0
- package/dist/chunks/{tabs-lohcglgppp6gj0hp.js → tabs-jywwt8ebjqjkux75.js} +19 -19
- package/dist/chunks/{tabs-lohcglgppp6gj0hp.js.map → tabs-jywwt8ebjqjkux75.js.map} +1 -1
- package/dist/chunks/{text-nmyi1rkwdj37f30f.js → text-f7t467waymhb30sx.js} +8 -8
- package/dist/chunks/text-f7t467waymhb30sx.js.map +1 -0
- package/dist/chunks/{toast-dg52x89yd231mxhe.js → toast-h573o0tc7tefivk2.js} +11 -11
- package/dist/chunks/{toast-dg52x89yd231mxhe.js.map → toast-h573o0tc7tefivk2.js.map} +1 -1
- package/dist/chunks/{tooltip-hikjvdbg3xghnq1x.js → tooltip-odudhkxe282wxinq.js} +5 -5
- package/dist/chunks/{tooltip-hikjvdbg3xghnq1x.js.map → tooltip-odudhkxe282wxinq.js.map} +1 -1
- package/dist/chunks/vendor-base-ui-ie71jahf0czyf58j.js +24638 -0
- package/dist/chunks/vendor-base-ui-ie71jahf0czyf58j.js.map +1 -0
- package/dist/chunks/vendor-floating-ui-dwag5e88viikh2zs.js +1311 -0
- package/dist/chunks/vendor-floating-ui-dwag5e88viikh2zs.js.map +1 -0
- package/dist/chunks/vendor-utils-ixnhxmehwihk5tr7.js +534 -0
- package/dist/chunks/vendor-utils-ixnhxmehwihk5tr7.js.map +1 -0
- package/dist/code.js +1 -1
- package/dist/components/autocomplete.js +9 -0
- package/dist/components/autocomplete.js.map +1 -0
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/input-group.js +8 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.js +9 -7
- package/dist/components/label.js +1 -1
- package/dist/components/layer-card.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/meter.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sensitive-input.js +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/surface.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table-of-contents.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/tooltip.js +1 -1
- package/dist/index.js +148 -143
- package/dist/index.js.map +1 -1
- package/dist/primitives/accordion.js +1 -1
- package/dist/primitives/alert-dialog.js +1 -1
- package/dist/primitives/autocomplete.js +1 -1
- package/dist/primitives/avatar.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/checkbox-group.js +1 -1
- package/dist/primitives/checkbox.js +1 -1
- package/dist/primitives/collapsible.js +1 -1
- package/dist/primitives/combobox.js +1 -1
- package/dist/primitives/context-menu.js +1 -1
- package/dist/primitives/csp-provider.js +1 -1
- package/dist/primitives/dialog.js +1 -1
- package/dist/primitives/direction-provider.js +1 -1
- package/dist/primitives/drawer.js +2 -2
- package/dist/primitives/field.js +1 -1
- package/dist/primitives/fieldset.js +1 -1
- package/dist/primitives/form.js +1 -1
- package/dist/primitives/input.js +1 -1
- package/dist/primitives/menu.js +1 -1
- package/dist/primitives/menubar.js +1 -1
- package/dist/primitives/meter.js +1 -1
- package/dist/primitives/navigation-menu.js +1 -1
- package/dist/primitives/number-field.js +1 -1
- package/dist/primitives/otp-field.js +6 -0
- package/dist/primitives/otp-field.js.map +1 -0
- package/dist/primitives/popover.js +1 -1
- package/dist/primitives/preview-card.js +2 -2
- package/dist/primitives/progress.js +1 -1
- package/dist/primitives/radio-group.js +1 -1
- package/dist/primitives/radio.js +1 -1
- package/dist/primitives/scroll-area.js +1 -1
- package/dist/primitives/select.js +1 -1
- package/dist/primitives/separator.js +1 -1
- package/dist/primitives/slider.js +1 -1
- package/dist/primitives/switch.js +1 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/primitives/toast.js +1 -1
- package/dist/primitives/toggle-group.js +1 -1
- package/dist/primitives/toggle.js +1 -1
- package/dist/primitives/toolbar.js +1 -1
- package/dist/primitives/tooltip.js +1 -1
- package/dist/primitives.js +22 -21
- package/dist/scripts/theme-generator/config.d.ts.map +1 -1
- package/dist/scripts/theme-generator/config.js +10 -0
- package/dist/scripts/theme-generator/config.js.map +1 -1
- package/dist/src/components/autocomplete/autocomplete.d.ts +180 -0
- package/dist/src/components/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/src/components/autocomplete/index.d.ts +2 -0
- package/dist/src/components/autocomplete/index.d.ts.map +1 -0
- package/dist/src/components/button/button.d.ts +3 -3
- package/dist/src/components/button/button.d.ts.map +1 -1
- package/dist/src/components/chart/Color.d.ts +36 -52
- package/dist/src/components/chart/Color.d.ts.map +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +37 -14
- package/dist/src/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/src/components/checkbox/index.d.ts +1 -1
- package/dist/src/components/checkbox/index.d.ts.map +1 -1
- package/dist/src/components/clipboard-text/clipboard-text.d.ts.map +1 -1
- package/dist/src/components/collapsible/collapsible.d.ts +77 -40
- package/dist/src/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/src/components/collapsible/index.d.ts +1 -1
- package/dist/src/components/collapsible/index.d.ts.map +1 -1
- package/dist/src/components/combobox/combobox.d.ts +3 -1
- package/dist/src/components/combobox/combobox.d.ts.map +1 -1
- package/dist/src/components/command-palette/command-palette.d.ts +2 -11
- package/dist/src/components/command-palette/command-palette.d.ts.map +1 -1
- package/dist/src/components/command-palette/index.d.ts +1 -1
- package/dist/src/components/command-palette/index.d.ts.map +1 -1
- package/dist/src/components/command-palette/types.d.ts +13 -1
- package/dist/src/components/command-palette/types.d.ts.map +1 -1
- package/dist/src/components/input/index.d.ts +16 -1
- package/dist/src/components/input/index.d.ts.map +1 -1
- package/dist/src/components/input/input.d.ts +2 -2
- package/dist/src/components/input/input.d.ts.map +1 -1
- package/dist/src/components/input-group/context.d.ts +96 -0
- package/dist/src/components/input-group/context.d.ts.map +1 -0
- package/dist/src/components/input-group/index.d.ts +2 -0
- package/dist/src/components/input-group/index.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group-addon.d.ts +15 -0
- package/dist/src/components/input-group/input-group-addon.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group-button.d.ts +36 -0
- package/dist/src/components/input-group/input-group-button.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group-input.d.ts +9 -0
- package/dist/src/components/input-group/input-group-input.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group-suffix.d.ts +13 -0
- package/dist/src/components/input-group/input-group-suffix.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group.d.ts +43 -0
- package/dist/src/components/input-group/input-group.d.ts.map +1 -0
- package/dist/src/components/menubar/menubar.d.ts.map +1 -1
- package/dist/src/components/radio/index.d.ts +1 -1
- package/dist/src/components/radio/index.d.ts.map +1 -1
- package/dist/src/components/radio/radio.d.ts +43 -7
- package/dist/src/components/radio/radio.d.ts.map +1 -1
- package/dist/src/components/select/select.d.ts +3 -3
- package/dist/src/components/select/select.d.ts.map +1 -1
- package/dist/src/components/sensitive-input/sensitive-input.d.ts +2 -2
- package/dist/src/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/src/components/switch/index.d.ts +1 -1
- package/dist/src/components/switch/index.d.ts.map +1 -1
- package/dist/src/components/switch/switch.d.ts +31 -3
- package/dist/src/components/switch/switch.d.ts.map +1 -1
- package/dist/src/components/table/table.d.ts +17 -2
- package/dist/src/components/table/table.d.ts.map +1 -1
- package/dist/src/components/table-of-contents/table-of-contents.d.ts +9 -7
- package/dist/src/components/table-of-contents/table-of-contents.d.ts.map +1 -1
- package/dist/src/components/text/text.d.ts +34 -6
- package/dist/src/components/text/text.d.ts.map +1 -1
- package/dist/src/components/text/text.type-spec.d.ts +44 -0
- package/dist/src/components/text/text.type-spec.d.ts.map +1 -0
- package/dist/src/components/toast/toast.d.ts +1 -1
- package/dist/src/components/toast/toast.d.ts.map +1 -1
- package/dist/src/index.d.ts +8 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/primitives/index.d.ts +1 -0
- package/dist/src/primitives/index.d.ts.map +1 -1
- package/dist/src/primitives/otp-field.d.ts +13 -0
- package/dist/src/primitives/otp-field.d.ts.map +1 -0
- package/dist/styles/kumo-binding.css +18 -0
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/styles/kumo.css +2 -2
- package/dist/styles/theme-kumo.css +7 -0
- package/package.json +14 -2
- package/scripts/component-registry/discovery.ts +1 -0
- package/scripts/component-registry/index.test.ts +265 -0
- package/scripts/component-registry/index.ts +14 -0
- package/scripts/component-registry/metadata.ts +55 -7
- package/scripts/component-registry/sub-components.ts +81 -50
- package/scripts/component-registry/types.ts +2 -0
- package/scripts/theme-generator/config.ts +10 -0
- package/dist/chunks/Legend-ks7se6149vsa3tze.js +0 -430
- package/dist/chunks/Legend-ks7se6149vsa3tze.js.map +0 -1
- package/dist/chunks/button-oaqi7ykdisyskoos.js.map +0 -1
- package/dist/chunks/checkbox-mwgmohffm22ut13s.js +0 -211
- package/dist/chunks/checkbox-mwgmohffm22ut13s.js.map +0 -1
- package/dist/chunks/collapsible-jhzee3ks51d3xowb.js +0 -58
- package/dist/chunks/collapsible-jhzee3ks51d3xowb.js.map +0 -1
- package/dist/chunks/combobox-eaowwt1xr4d23gsn.js.map +0 -1
- package/dist/chunks/command-palette-maqtbmpfev9mysqd.js.map +0 -1
- package/dist/chunks/dropdown-ewte287db3vyt8t5.js.map +0 -1
- package/dist/chunks/input-cw05pbqdburghkus.js.map +0 -1
- package/dist/chunks/input-group-lfugneuz71g42n0w.js +0 -111
- package/dist/chunks/input-group-lfugneuz71g42n0w.js.map +0 -1
- package/dist/chunks/menubar-e5e4zwfagr0wx023.js +0 -96
- package/dist/chunks/menubar-e5e4zwfagr0wx023.js.map +0 -1
- package/dist/chunks/pagination-olaypvwr8swsmn8m.js.map +0 -1
- package/dist/chunks/radio-ihxbe37us2jnqtzf.js.map +0 -1
- package/dist/chunks/select-nx6ded5swra74iar.js.map +0 -1
- package/dist/chunks/sensitive-input-00fujb510rrn61v9.js.map +0 -1
- package/dist/chunks/sidebar-ltbfius1eolkl8tb.js.map +0 -1
- package/dist/chunks/switch-fbv3iawqo3o3jgap.js.map +0 -1
- package/dist/chunks/table-of-contents-f813ivi7ta23vqdm.js +0 -88
- package/dist/chunks/table-of-contents-f813ivi7ta23vqdm.js.map +0 -1
- package/dist/chunks/table-olwwulga2l3hdwlx.js.map +0 -1
- package/dist/chunks/text-nmyi1rkwdj37f30f.js.map +0 -1
- package/dist/chunks/vendor-base-ui-m5pz3e8c4grg5qmj.js +0 -22813
- package/dist/chunks/vendor-base-ui-m5pz3e8c4grg5qmj.js.map +0 -1
- package/dist/chunks/vendor-floating-ui-gr9m6tsa1cpqwn99.js +0 -1286
- package/dist/chunks/vendor-floating-ui-gr9m6tsa1cpqwn99.js.map +0 -1
- package/dist/chunks/vendor-utils-fxk97j6xi1g42z2v.js +0 -740
- package/dist/chunks/vendor-utils-fxk97j6xi1g42z2v.js.map +0 -1
- package/dist/src/components/input/input-group.d.ts +0 -39
- package/dist/src/components/input/input-group.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,244 @@
|
|
|
1
1
|
# @cloudflare/kumo
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- bf68ac0: **BREAKING:** Checkbox `onCheckedChange` now receives event details as second argument
|
|
8
|
+
|
|
9
|
+
The `onCheckedChange` callback signature now matches Base UI, providing access to the underlying event:
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
// Before
|
|
13
|
+
onCheckedChange={(checked) => console.log(checked)}
|
|
14
|
+
|
|
15
|
+
// After (event details available as optional second arg)
|
|
16
|
+
onCheckedChange={(checked, eventDetails) => {
|
|
17
|
+
console.log(checked);
|
|
18
|
+
console.log(eventDetails.event); // native event
|
|
19
|
+
}}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Removed deprecated props:**
|
|
23
|
+
- `onChange` - use `onCheckedChange` instead
|
|
24
|
+
- `onValueChange` on individual checkboxes - use `onCheckedChange` instead
|
|
25
|
+
- `onClick` - was redundant, use standard React event handling via spread props
|
|
26
|
+
|
|
27
|
+
**Migration:**
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
// Before (deprecated)
|
|
31
|
+
<Checkbox onChange={(e) => console.log(e.target.checked)} />
|
|
32
|
+
<Checkbox onValueChange={(checked) => setChecked(checked)} />
|
|
33
|
+
|
|
34
|
+
// After
|
|
35
|
+
<Checkbox onCheckedChange={(checked) => setChecked(checked)} />
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Note: `Checkbox.Group`'s `onValueChange` prop is unchanged - it still accepts `(values: string[]) => void`.
|
|
39
|
+
|
|
40
|
+
- f9ba3f9: feat(Collapsible)!: refactor to compound component API
|
|
41
|
+
|
|
42
|
+
**Breaking change:** Collapsible now uses a compound component pattern matching other Kumo components like Popover and Dialog.
|
|
43
|
+
|
|
44
|
+
### Before
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
<Collapsible label="Show details" open={open} onOpenChange={setOpen}>
|
|
48
|
+
Content here
|
|
49
|
+
</Collapsible>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### After
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
<Collapsible.Root open={open} onOpenChange={setOpen}>
|
|
56
|
+
<Collapsible.Trigger>Show details</Collapsible.Trigger>
|
|
57
|
+
<Collapsible.Panel>Content here</Collapsible.Panel>
|
|
58
|
+
</Collapsible.Root>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Migration
|
|
62
|
+
|
|
63
|
+
For the quickest migration, use the new `DefaultTrigger` and `DefaultPanel` components which preserve the previous styling:
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
<Collapsible.Root open={open} onOpenChange={setOpen}>
|
|
67
|
+
<Collapsible.DefaultTrigger>Show details</Collapsible.DefaultTrigger>
|
|
68
|
+
<Collapsible.DefaultPanel>Content here</Collapsible.DefaultPanel>
|
|
69
|
+
</Collapsible.Root>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### New Sub-components
|
|
73
|
+
|
|
74
|
+
| Component | Description |
|
|
75
|
+
| ---------------------------- | ----------------------------------------------------------- |
|
|
76
|
+
| `Collapsible.Root` | Manages open state |
|
|
77
|
+
| `Collapsible.Trigger` | Composable trigger with `render` prop support |
|
|
78
|
+
| `Collapsible.Panel` | Content container |
|
|
79
|
+
| `Collapsible.DefaultTrigger` | Pre-styled trigger with caret icon (migration helper) |
|
|
80
|
+
| `Collapsible.DefaultPanel` | Pre-styled panel with border-left accent (migration helper) |
|
|
81
|
+
|
|
82
|
+
- 3256a7b: feat(Text): decouple visual heading variants from semantic HTML elements
|
|
83
|
+
|
|
84
|
+
**Breaking change:** `heading1`, `heading2`, `heading3` variants no longer auto-render `<h1>`, `<h2>`, `<h3>` tags. They now render as `<span>` by default. Use the `as` prop to set the appropriate semantic heading level for your document outline.
|
|
85
|
+
|
|
86
|
+
Before:
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
<Text variant="heading1">Title</Text> // rendered <h1>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
After:
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
<Text variant="heading1" as="h1">
|
|
96
|
+
Title
|
|
97
|
+
</Text> // explicit semantic element
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The `as` prop is now restricted to valid text elements: `"h1"` through `"h6"`, `"p"`, and `"span"`.
|
|
101
|
+
|
|
102
|
+
- 267ba7a: **BREAKING (v2):** `Text` requires an explicit `as` prop when `variant` is a heading (`"heading1"`, `"heading2"`, `"heading3"`).
|
|
103
|
+
|
|
104
|
+
The previous major bump ([#393](https://github.com/cloudflare/kumo/pull/393)) decoupled heading variants from semantic HTML — heading variants render as `<span>` unless an `as` prop is provided. That made the library more flexible but introduced a silent accessibility footgun: forgetting `as` on a real section heading produced a `<span>`, excluding it from the document outline without any type-level feedback.
|
|
105
|
+
|
|
106
|
+
This change makes `as` **required** for heading variants via a discriminated union. Body and monospace variants are unchanged (`as` remains optional; defaults to `<p>` and `<span>` respectively).
|
|
107
|
+
|
|
108
|
+
### Migration
|
|
109
|
+
|
|
110
|
+
Every `<Text variant="heading1">`, `<Text variant="heading2">`, `<Text variant="heading3">` must now pass `as`. TypeScript will flag each call site:
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
// Before (compiled, silently produced a <span>)
|
|
114
|
+
<Text variant="heading1">Page Title</Text>
|
|
115
|
+
|
|
116
|
+
// After (required)
|
|
117
|
+
<Text variant="heading1" as="h1">Page Title</Text>
|
|
118
|
+
|
|
119
|
+
// Still allowed — decorative heading-styled text that is NOT a section heading:
|
|
120
|
+
<Text variant="heading1" as="span">Big bold card label</Text>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
For each heading call site, decide whether it's a real section heading (use `as="h1"`/`"h2"`/etc.) or decorative (use `as="span"`). Codemod cannot make this choice mechanically — it is a semantic judgment per usage.
|
|
124
|
+
|
|
125
|
+
Body and monospace variants: no changes required.
|
|
126
|
+
|
|
127
|
+
### Minor Changes
|
|
128
|
+
|
|
129
|
+
- 1954aa8: feat(radio, checkbox, switch): add composable Legend sub-component for group components
|
|
130
|
+
- Add `Radio.Legend`, `Checkbox.Legend`, and `Switch.Legend` sub-components
|
|
131
|
+
- Accepts `className` for full styling control (e.g. `className="sr-only"` to visually hide)
|
|
132
|
+
- Make `legend` string prop optional when using the sub-component instead
|
|
133
|
+
- Useful when a parent Field already provides a visible label and the legend would be redundant
|
|
134
|
+
- **Breaking:** `Switch.Group` no longer renders a visible border/padding/rounded container — now consistent with `Radio.Group` and `Checkbox.Group`. Use `className` to add a border if needed.
|
|
135
|
+
|
|
136
|
+
- 1eee41a: Add `InputGroup` compound component for composing decorated inputs
|
|
137
|
+
|
|
138
|
+
Compound structure: `InputGroup`, `InputGroup.Input`, `InputGroup.Addon`, `InputGroup.Suffix`, `InputGroup.Button`.
|
|
139
|
+
- Field integration — pass `label`, `description`, `error`, `required`, and `labelTooltip` directly to `InputGroup`
|
|
140
|
+
- Size variants (`xs`, `sm`, `base`, `lg`) propagate to all sub-components via context, including icon sizing in addons
|
|
141
|
+
- `InputGroup.Addon` — positions icons, text, or buttons at `align="start"` (default) or `align="end"` of the input
|
|
142
|
+
- `InputGroup.Suffix` — inline text suffix (e.g. `.workers.dev`)
|
|
143
|
+
- `InputGroup.Button` — ghost button for secondary actions with tooltip support
|
|
144
|
+
- Deprecated `InputGroup.Label` — use `InputGroup.Addon` instead
|
|
145
|
+
- Deprecated `InputGroup.Description` — use `InputGroup.Suffix` instead
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
{
|
|
149
|
+
/* Reveal / hide password */
|
|
150
|
+
}
|
|
151
|
+
<InputGroup>
|
|
152
|
+
<InputGroup.Input
|
|
153
|
+
type={show ? "text" : "password"}
|
|
154
|
+
defaultValue="password"
|
|
155
|
+
aria-label="Password"
|
|
156
|
+
/>
|
|
157
|
+
<InputGroup.Addon align="end" className="pr-1">
|
|
158
|
+
<InputGroup.Button
|
|
159
|
+
size="sm"
|
|
160
|
+
aria-label={show ? "Hide password" : "Show password"}
|
|
161
|
+
onClick={() => setShow(!show)}
|
|
162
|
+
>
|
|
163
|
+
{show ? <EyeSlashIcon size={16} /> : <EyeIcon size={16} />}
|
|
164
|
+
</InputGroup.Button>
|
|
165
|
+
</InputGroup.Addon>
|
|
166
|
+
</InputGroup>;
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
{
|
|
171
|
+
/* Search input */
|
|
172
|
+
}
|
|
173
|
+
<InputGroup>
|
|
174
|
+
<InputGroup.Addon>
|
|
175
|
+
<MagnifyingGlassIcon className="text-kumo-subtle" />
|
|
176
|
+
</InputGroup.Addon>
|
|
177
|
+
<InputGroup.Input placeholder="Search..." />
|
|
178
|
+
</InputGroup>;
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
- 353faea: Adds Autocomplete component. A free-form text input with an optional filtered suggestion list. Unlike Combobox, the value is not constrained to the items list.
|
|
182
|
+
- 431de04: feat(radio): accept ReactNode for `Radio.Item` label and honor `controlPosition` on card appearance
|
|
183
|
+
- `Radio.Item`'s `label` prop now accepts `ReactNode`, allowing icons, badges, or other markup alongside text.
|
|
184
|
+
- `Radio.Group`'s `controlPosition` prop now takes effect on `appearance="card"`. Card appearance continues to default to `"end"` (radio on the right); pass `controlPosition="start"` to render the radio on the left of the label and description.
|
|
185
|
+
|
|
186
|
+
- f9d8b76: Polish TableOfContents indicator and semantic HTML
|
|
187
|
+
- Replace pill/background-tint hover with left-border indicator pattern
|
|
188
|
+
- Switch to semantic `ul`/`li` HTML structure
|
|
189
|
+
- Add `href` and `active` props to `TableOfContents.Group` for clickable labels
|
|
190
|
+
|
|
191
|
+
- 07426f6: feat(table): add `onCheckedChange` prop to `Table.CheckCell` and `Table.CheckHead`, aligning with the `Checkbox` component's signature.
|
|
192
|
+
|
|
193
|
+
The new prop exposes an optional second argument with event details, matching Base UI's idiom:
|
|
194
|
+
|
|
195
|
+
```tsx
|
|
196
|
+
<Table.CheckCell
|
|
197
|
+
checked={selected.has(row.id)}
|
|
198
|
+
onCheckedChange={(checked, eventDetails) => {
|
|
199
|
+
toggle(row.id);
|
|
200
|
+
eventDetails?.event.stopPropagation();
|
|
201
|
+
}}
|
|
202
|
+
/>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
The existing `onValueChange` prop still works but is now deprecated and flagged by the `no-deprecated-props` lint rule. It will be removed in a future major version. Migrate by renaming the prop — the single-argument callback shape is preserved.
|
|
206
|
+
|
|
207
|
+
This change is additive and does not require consumer code changes at this time.
|
|
208
|
+
|
|
209
|
+
- c1c60c8: Expand `Text` component's `as` prop to accept additional HTML text elements: `label`, `dt`, `dd`, `li`, `figcaption`, `legend`, `pre`, `code`, `em`, `strong`, `small`, `abbr`, and `time`. This unblocks downstream usage in Stratus where `Text` needs to render as definition list terms, labels, and code elements.
|
|
210
|
+
|
|
211
|
+
### Patch Changes
|
|
212
|
+
|
|
213
|
+
- ac6df5f: Remove invalid hover border utility from secondary button variants to keep hover styling consistent and avoid unintended class output.
|
|
214
|
+
- ec73bc5: Update chart color docs and demos, including sequential heatmap/CVD coverage and improved chart demo behavior.
|
|
215
|
+
- 7d12918: `Combobox.Item` now renders a visible disabled state when the `disabled` prop is set. Previously the prop was forwarded to Base UI (so click/keyboard selection were correctly blocked) but the row looked identical to an enabled one. Adds `data-[disabled]:*` Tailwind classes for muted text, `cursor-not-allowed`, reduced opacity, and suppresses the highlight background on disabled rows during keyboard navigation. Also fixes `className` passthrough — user-supplied classes are now merged via `cn()` instead of being overridden.
|
|
216
|
+
- 69bfc53: Improve focus ring consistency and clipping behavior across inputs and related controls.
|
|
217
|
+
- Move the command palette focus ring to the input header container with `focus-within` and remove duplicate input-level ring styles.
|
|
218
|
+
- Update `Select` trigger and option focus styles to use inset focus rings to prevent clipping in rounded/overflow contexts.
|
|
219
|
+
- Fix clipboard copy button focus ring clipping by using inset focus-visible ring, matching border-radius inheritance, and isolated stacking.
|
|
220
|
+
- Align `InputGroup` and `InputGroup.Button` focus ring color to `ring-kumo-focus`, including hybrid container-zone focus ring classes.
|
|
221
|
+
- Update InputGroup tests to match inline focus ring class changes.
|
|
222
|
+
- Set DatePicker (`react-day-picker`) focus ring token to `var(--color-kumo-brand)`.
|
|
223
|
+
- Update InputGroup container and hybrid keyboard outlines in `kumo-binding.css` to use `var(--color-kumo-focus)` at 1px weight.
|
|
224
|
+
|
|
225
|
+
- 30bfd82: Allow `CommandPalette.Input` to accept standard HTML input attributes (`autoComplete`, `autoCorrect`, `autoCapitalize`, `spellCheck`, `data-*`, etc.) by extending its props type with `InputHTMLAttributes<HTMLInputElement>`. Export new `CommandPaletteInputProps` type.
|
|
226
|
+
- b923281: Fix `InputGroup` hover state incorrectly propagating to the first child button (e.g. in `Pagination.Controls`). Root now renders as `<div>` instead of `<label>` when it contains multiple labelable controls.
|
|
227
|
+
- 06b8852: Fix Table body cells rendering at 16px. The Table root now sets text-base (14px) so <td> cells match Kumo's default body font-size instead of inheriting the browser default. Also replaces an arbitrary text-[14px] in Empty with text-base.
|
|
228
|
+
- c019b41: Improved focus and keyboard accessibility styles across Kumo components and docs navigation.
|
|
229
|
+
- Added the `kumo-focus` semantic token to the theme generator config and generated `theme-kumo.css` output.
|
|
230
|
+
- Updated focus ring behavior across interactive components (including `Button`, `Input`, `InputGroup`, `Select`, `Checkbox`, `Radio`, `Switch`, `Sidebar`, `Tabs`, `Menubar`, and related controls) for more consistent and visible keyboard focus visibility.
|
|
231
|
+
- Text-entry controls use a lighter opacity `kumo-focus` ring to keep pointer and keyboard focus visually consistent where browsers apply `:focus-visible` heuristics to typed-input controls.
|
|
232
|
+
- Refined `Select` and `Input` styling/state combinations to align focus visuals with current semantic token usage.
|
|
233
|
+
- Updated docs `SidebarNav` keyboard-focus affordances (links, section toggles, search trigger) and adjusted collapsible list overflow so focus rings remain visible.
|
|
234
|
+
- Replace raw colors in `Select` with kumo semantic tokens.
|
|
235
|
+
|
|
236
|
+
- 21ed1a1: Fix `InputGroup` container className to enforce `mb-0`, ensuring all container variants (not just the standalone `<label>` mode) reset inherited bottom margin.
|
|
237
|
+
- fa991d9: Fix `InputGroup` label wrappers to enforce `mb-0`, preventing inherited label margins from shifting layout and click-target overlays.
|
|
238
|
+
- 6765526: chore: update @base-ui/react to v1.4.0
|
|
239
|
+
|
|
240
|
+
Bugfix release with improvements to Popover hover state, Checkbox/Switch readOnly mode, Select touch handling, Tabs activation direction, Toast timers, and various other fixes. No breaking changes.
|
|
241
|
+
|
|
3
242
|
## 1.19.0
|
|
4
243
|
|
|
5
244
|
### Minor Changes
|