Skip to content

feat(ui): Select, Checkbox/Radio, Switch primitives, and Tabs segmented variant - #449

Open
meshackyaro wants to merge 4 commits into
SO4-Markets:mainfrom
all-opensource-projects:feat/design-system-select-checkbox-radio-switch-tabs
Open

feat(ui): Select, Checkbox/Radio, Switch primitives, and Tabs segmented variant#449
meshackyaro wants to merge 4 commits into
SO4-Markets:mainfrom
all-opensource-projects:feat/design-system-select-checkbox-radio-switch-tabs

Conversation

@meshackyaro

Copy link
Copy Markdown

Summary

Implements four Stellar Wave design-system issues, all built on the existing @base-ui/react primitives and matching the compact sizing / overlay-token conventions already used by popover.tsx and dropdown-menu.tsx.

  • DS-019 (DS-019: Build a shared Select component #406)packages/ui/src/components/select.tsx: Select with trigger, popup, groups, separators, selected/disabled item states. Arrow keys, Enter, Escape, and typeahead all work via Base UI's built-in behavior.
  • DS-020 (DS-020: Build Checkbox and Radio primitives #407)packages/ui/src/components/checkbox.tsx, radio-group.tsx: Checkbox with checked/indeterminate states; RadioGroup with keyboard navigation. Both expose visible focus rings and disabled styling.
  • DS-021 (DS-021: Build a Switch component #408)packages/ui/src/components/switch.tsx: controlled/uncontrolled switch with checked/focus/disabled states and a 44px touch target (via an invisible expanded hit area) without growing the visible track.
  • DS-022 (DS-022: Refine Tabs into line and segmented variants #409)packages/ui/src/components/tabs.tsx: adds an explicit segmented variant as the canonical name for the existing default style (default kept as a backwards-compatible alias, so all current call sites are unaffected). Active segmented tabs now get a subtle shadow so selection isn't communicated by color alone; line's underline indicator is untouched.

Each component ships with a *.test.tsx covering accessibility (axe), mouse interaction, keyboard navigation, and disabled states, following the pattern in dialog.test.tsx / slider.test.tsx / tabs.test.tsx.

Note: while setting up the repo I found bun install was broken on main due to unrelated corruption (duplicate script key in apps/web/package.json, corrupted bun.lock). Fixed separately in #448 rather than bundling it here.

Closes #406, Closes #407, Closes #408, Closes #409

Test plan

  • bun run test in packages/ui — all 5 new/updated test files pass (29 tests)
  • bun run typecheck in packages/ui — clean (pre-existing unrelated errors in stat.tsx and @repo/vitest-config untouched)
  • bun run lint on the touched files — clean

Compact Base UI Select with trigger, popup, groups, separators, and
selected/disabled item states. Supports arrow-key navigation, typeahead,
and Enter/Escape like the existing dropdown-menu and popover primitives.
Compact selection controls built on Base UI's checkbox and radio
primitives, with checked/indeterminate states, visible focus rings,
and disabled styling consistent with the other form controls.
Compact switch for binary preferences built on Base UI's switch
primitive. Works controlled and uncontrolled, and expands its hit area
to a 44px touch target without growing the visible track.
Introduces a `segmented` variant as the explicit name for the existing
default style, kept as a backwards-compatible alias so current call
sites are unaffected. Active tabs in the segmented/default variant now
get a subtle shadow so selection isn't communicated by color alone.
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@meshackyaro is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@meshackyaro Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@meshackyaro

Copy link
Copy Markdown
Author

For reviewers: this PR is based on main as-is, but bun install currently fails on a fresh clone of main due to unrelated corruption (duplicate test key in apps/web/package.json, corrupted bun.lock) — fixed separately in #448.

Suggested merge order: #448 first, then rebase/merge this one. Otherwise CI here may hit the same pre-existing bun install failure once workflows run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant