Skip to content

v6.1.0

Choose a tag to compare

@github-actions github-actions released this 01 Sep 09:05
· 205 commits to main since this release
078f502

Minor Changes

  • 87327a8: Button's type prop is now proper syntactic sugar for a (color, variant)
    pair, matching antd's spec — and is no longer deprecated.

    Previously type only mapped to a variant and left color untouched, so
    type="primary" rendered a grey solid button instead of a primary-coloured
    one, and type="link" rendered a link-styled button in the default colour.
    Measured against antd's documented behaviour (<Button type="primary"> ≡
    <Button color="primary" variant="solid">), that mapping was incomplete.

    type now equivalent to previously
    primary color="primary" variant="solid" variant="solid"
    default color="default" variant="outlined" variant="outlined"
    dashed color="default" variant="dashed" variant="dashed"
    text color="default" variant="text" variant="text"
    link color="primary" variant="link" variant="link"

    Visible change: type="primary" and type="link" now pick up the primary
    colour. The other three values are unchanged. Explicit color and variant
    still win over whatever type maps to, so type="primary" variant="filled"
    keeps the primary colour but renders filled, and danger still overrides the
    resolved colour.

    The @deprecated marker added in the previous release is withdrawn: type and
    variant are not duplicates on one axis — type sets two axes at once, which
    is exactly why its value names overlap with variant's.

Patch Changes

  • 916eef3: Radio.Group's first option no longer looks misaligned in horizontal
    orientation on hosts that style prose lists.

    The <ul> these groups render already reset margin/padding/list-style
    (#253), but their <li> children did not. Without preflight, a host's own
    list rules still reach the items — Docusaurus/Infima ships
    .markdown li + li { margin-top: 0.25rem }, which gives every option but the
    first a top margin. In a horizontal (flex-row) group that pushes options 2..n
    down 4px and stretches the first item's flex line, so the first radio sits
    higher than the rest; with optionType="button" the first segment ends up 4px
    taller than its neighbours. Measured on this repo's own docs site: item 1 at
    y=288.3, h=23.3 vs items 2/3 at y=292.3, h=19.3.

    The list items in Radio.Group, Checkbox.Group, Menu and Upload now
    carry that m-0 reset themselves. classNames.wrapper/classNames.item
    still win, so per-item margins remain overridable.

    Checkbox.Group also spaces its options with flex + gap in both
    orientations instead of space-y-2 when vertical. space-y works by putting
    margins on the children, which is exactly what the new reset clears — the
    rendered spacing (8px) is unchanged.

What's Changed

  • ✨ feat(ui): make Button's type sugar for a (color, variant) pair by @pjb0811 in #312
  • 🐛 fix(ui): reset list-item margins so horizontal Radio.Group's first option stays aligned by @pjb0811 in #316
  • 🔖 chore: version packages by @github-actions[bot] in #313

Full Changelog: v6.0.1...v6.1.0