You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Align badge to architecture goals
- Fixes pill shape: moves border-radius from per-magnitude slots into the cva
base string as `rounded-full` (spec: "Pill shape — always the same").
- Adds required `variant` prop (BadgeVariant type, cva `variant` axis) with
`solid` as the only current value; "outline" is noted in the spec as a
potential future step — introducing the axis now keeps call sites
forward-compatible (closes#119).
- Drops the per-magnitude `rounded-sm`/`rounded-md` values; every step now
inherits the full-radius base.
- Updates all Badge call sites (badge stories + menu submenu story) to pass
the now-required `variant` prop.
* Give badge single-element anatomy parts
Break the badge into atomic single-element ui parts the way the accordion is:
the Badge pill now renders only its container, with the leading icon, label, and
the optional dismiss action each extracted into their own part (BadgeIcon,
BadgeLabel, BadgeDismiss), each with its own cva. The ready-made components/badge
composition wires them behind convenience props and carries no styling of its own.
* Make BadgeDismiss a glyph-free single-element slot
BadgeDismiss baked a default X glyph via children ?? <X />. Per the
single-element rule, a ui part renders only its child and bakes no
glyph. The default X now lives in the components-tier Badge composition
(passed in when onDismiss is set) and the ui story passes it explicitly.
0 commit comments