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 button to architecture goals per issue #122 spec
- Focus ring: add ring-offset-1 (focus ring style and offset is always the same per spec)
- Disabled: add pointer-events-none to base (disabled state always blocks pointer events per spec)
- Stretch: add stretch variant (auto/full) for full-width layout axis (adjustable per spec);
expose as optional ButtonStretch prop on both ui and components tiers; add Stretch stories
- Loading label: add buttonLabelClass + group to root so the label span dims (group-aria-busy:opacity-50)
when the button is aria-busy, matching "label may dim" in spec; wrap children in <span> in
components/button to pick up the class
* Extract button anatomy parts; clear styling out of the components tier
The components-tier Button was composing raw elements with baked-in classes — a
`<span>` carrying buttonLabelClass, a LoaderCircle with size/spin classes, and a
bare NodeSlot — so styling leaked into the composition layer and the ui parts
stopped at the single root <button>.
Add three single-element ui parts (each with its own cva in ui/button/variants.ts):
ButtonIcon (decorative leading/trailing node slot, sized to --node-size),
ButtonLabel (the text, dims under aria-busy), and ButtonSpinner (the loading
indicator). The components-tier Button now only composes these — no className, cx,
or cva anywhere under components/button. Register the new parts as story
subcomponents and add a ui Anatomy story that composes them by hand.
* Make the button spinner a single-element slot
ButtonSpinner baked a LoaderCircle glyph; it is now a pure node-slot span
that sizes and spins its single child, with the default icon moved to the
components-tier Button (and to the ui Anatomy story) as explicit children.
0 commit comments