feat(button-group): 2nd-gen component with API, a11y, storybook, and tests#6334
feat(button-group): 2nd-gen component with API, a11y, storybook, and tests#6334Rajdeepc wants to merge 1 commit into
Conversation
…tests Implements the full 2nd-gen button-group component: - Core: ButtonGroupBase class with orientation, align, disabled, size propagation, role="group", and dev-mode validation warnings - SWC: Concrete ButtonGroup with CSS (S2 tokens), classMap render - Stories: Full Storybook documentation with all sections, Figma link, args table, upcoming features, and accessibility guidance - Tests: Play-function unit tests (5 sections) and Playwright a11y tests (ARIA snapshots, keyboard interactions, aXe validation) - Marks SizedMixin._size as @internal Co-authored-by: Cursor <cursoragent@cursor.com>
|
📚 Branch Preview Links🔍 First Generation Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Summary
Implements the full 2nd-gen
<swc-button-group>component covering file structure, API, accessibility, Storybook documentation, and test suites.What's included
ButtonGroupBase): Abstract base class withorientation,align,disabled,sizepropagation to slotted children,role="group"semantics, and dev-mode validation warningsButtonGroup): Concrete class with S2-token-based CSS,classMaprendering for all variantsgetStorybookHelpersargs table, Figma link, Stackblitz link, upcoming features section, accessibility guidance, and production vs local-only story designation_sizefield as@internalBreaking changes from 1st-gen
sp-button-groupswc-button-groupverticalbooleanorientation="horizontal|vertical"--mod-buttongroup-*--swc-button-group-*noDefaultSize)mrole="group"automaticNew APIs
align:start|center|end— main-axis alignmentdisabled: Group-level disable propagated to childrenTest plan
yarn buildpasses in bothcoreandswcpackagesESLint and stylelint pass with no errors
Storybook renders all stories without console errors
Play-function tests pass via
test:storybookPlaywright a11y tests pass via
test:a11yaXe reports no WCAG violations
Visual review in Storybook for all sizes, orientations, alignments
Fixes SWC 2074, SWC-2075, SWC-2076