Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

feat(Switch): add Switch compound component#142

Merged
johnleider merged 7 commits intomasterfrom
feat/switch-component
Mar 3, 2026
Merged

feat(Switch): add Switch compound component#142
johnleider merged 7 commits intomasterfrom
feat/switch-component

Conversation

@johnleider
Copy link
Member

@johnleider johnleider commented Mar 2, 2026

Summary

  • Add headless Switch compound component (Root, Group, Track, Thumb, HiddenInput, SelectAll) with dual-mode context (standalone boolean / group array)
  • Add documentation page with examples (basic, group, indeterminate) and recipes
  • Add JSDoc to all interfaces and barrel exports
  • Create AppSwitch wrapper and refactor inline switch implementations in docs to use it

Test plan

  • Verify standalone switch toggles on click and keyboard (Space/Enter)
  • Verify group mode with array v-model selects/deselects values
  • Verify SelectAll with indeterminate state (partial selection)
  • Verify aria-checked, role="switch", and hidden input for form submission
  • Verify docs page renders at /components/forms/switch
  • Verify AppSwitch renders correctly in AppSettingsToggle and DashboardConsumer

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 2, 2026

Open in StackBlitz

commit: 3e59f9c

@johnleider johnleider merged commit de8029c into master Mar 3, 2026
8 of 10 checks passed
@johnleider johnleider deleted the feat/switch-component branch March 3, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant