Repository navigation
v6.2.0
Minor Changes
-
d75a89d: Unify the semantic-state axis under
status.ModalandToastnow take a
statusprop (info | success | error | warning), matchingResult's
vocabulary, instead of spelling the same axistype. The oldtypeprop stays
as a deprecated alias, so this is non-breaking — existing
type="error"usage and everyModal.*/Toast.*call keep working.Modal.confirmis unchanged:confirmis an interaction mode (the two-button
footer), not a status, so it stays on its own axis rather than being folded into
status(ui-kit#318). -
62c4ae7: Add a
Slideratom. A numeric-range control built on the RadixSlider
primitive (draggable + keyboard-operable), following the existing
Checkbox/Switchshape: controlled/uncontrolled viauseControllableState,
withvalue/defaultValue/onChange,min/max/step,disabled, and
orientation. Pass a barenumberfor a single thumb or a[min, max]tuple
for a two-thumb range —onChangereturns the same shape. Consumers no longer
need to hand-roll<input type="range">(ui-kit#315). -
11b80bd:
Spacenow honours the globalcomponentSizefromConfig. Whensizeis
left unset it falls back to<Config componentSize>before the built-in
middle, matchingButton's resolution order — so a single
<Config componentSize="large">sizes both. An explicitsize(including
numeric/array gaps) still wins, so this is non-breaking (ui-kit#317). -
95b5eec: Align
Tag'svariant/colorvocabulary withButton(ui-kit#320), without
breaking existingTagusage:variant="filled"is the new canonical spelling of what used to be
variant="default"."default"still works as a deprecated alias (renders
identically) and will be removed in a future major.colornow also acceptsButton's shared preset palette (blue,purple,
cyan,green,magenta,pink,red,orange,yellow,volcano,
geekblue,lime,gold) alongside the existing named states
(primary/success/warning/danger). Presets are backed by the same
data-colorcustom-property system asButton(--tag-*mirrors--btn-*),
so a colour word renders the same hue on either component.
The preset list is now shared from
lib/colorsand consumed by bothButton
andTag. Existing named-state tags render byte-identical (they keep their
bespoke classes and never emitdata-color), so this is additive and
non-breaking — the vocabulary alignment ships as a minor with a deprecation
window rather than waiting for a major. -
157545d: Widen
Config'sdefaultPropsbeyondbutton.shape. Apps can now set
library-wide defaults for more of the settled prop surface in one place:defaultProps.button.variant/defaultProps.button.colordefaultProps.tag.variant/defaultProps.tag.colordefaultProps.modal.maskClosable
Each resolves
explicit prop ?? Config default ?? built-in, the same order
Buttonalready used forshape(forButton, a call-sitetypeshorthand
still wins over theConfigdefault). Additive and non-breaking — components
behave exactly as before when no default is set (ui-kit#319).
Patch Changes
- e197fcc: Add the
'use client'directive toSpace.SpacereadscomponentSizevia
useConfig(a React context hook), so it must be a client component like every
otherConfigconsumer (Button,Switch,Modal,Tag, …). Without the
directive, importing<Space>into a React Server Component tree could throw at
runtime. Non-behavioural fix — output is unchanged in existing client trees.
What's Changed
- ✨ feat(ui): let Space honour the global componentSize contract (#317) by @pjb0811 in #321
- ✨ feat(ui): unify Modal/Toast semantic axis under status (#318) by @pjb0811 in #323
- ✨ feat(ui): widen Config.defaultProps beyond button.shape (#319) by @pjb0811 in #324
- 🐛 fix(ui): mark Space as a client component by @pjb0811 in #325
- ✨ feat(ui): add Slider atom (radix-ui Slider primitive) by @pjb0811 in #326
- ✨ feat(ui): align Tag's variant/color vocabulary with Button (#320) by @pjb0811 in #327
- 🔖 chore: version packages by @github-actions[bot] in #322
Full Changelog: v6.1.0...v6.2.0