Skip to content

feat(checkbox): add indeterminate state - #188

Merged
saescapa merged 1 commit into
mainfrom
feat/checkbox-indeterminate
Sep 28, 2026
Merged

saescapa merged 1 commit into
mainfrom
feat/checkbox-indeterminate

Conversation

@saescapa

@saescapa saescapa commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

This PR:

  • feat(checkbox): add indeterminate state

checked, value, and defaultChecked accept boolean | 'indeterminate'; onChange keeps emitting a boolean, so a {...field} spread still round-trips. Toggling from indeterminate emits true. The default/panel kinds render a dash glyph, surface renders the new Minus icon, and kind="switch" renders indeterminate as unchecked. Includes a minor changeset.

QA

  • Verify the Inputs/Checkbox › Indeterminate story: "Select all" shows the dash with a partial selection and checks/unchecks every option on click
  • Confirm the dash glyph for default, panel, and surface kinds in both light and dark themes, including disabled
  • Confirm existing checked/unchecked stories (Default, Surface, Panel, Switch, FormField) render and toggle as before
  • Verify the new Icon › Minus story renders

Testing

  • bun run typecheck — pass, by hand
  • bunx vitest run --project unit src/stories/checkbox src/stories/icon — 88 passed, by hand
  • bunx biome check on changed files — pass, by hand (repo-wide bun run lint fails on pre-existing Combobox.tsx and biome.json schema issues on main)
  • New indeterminate tests: aria-checked="mixed" for default/surface/panel kinds, click emits true, value alias, uncontrolled defaultChecked, no checked container class, switch renders unchecked
  • not run: visual check in Storybook — not done in this session

Risk

Low — additive API on one component; existing boolean usage is unchanged.

  • Blast radius: Checkbox rendering and onChange for all consumers
  • Rollback: revert the PR

checked, value, and defaultChecked accept 'indeterminate', rendering a
dash glyph (Minus icon for the surface kind) while onChange keeps
emitting a boolean. Switches render indeterminate as unchecked.
@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
paris Ready Ready Preview Sep 28, 2026 11:22pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f87b5fa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
paris Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

✅ CI — All checks passed · 923 tests

View workflow run · 923 passed

Check Status Details
Lint & Typecheck ✅ Biome + tsc passed
Unit Tests ✅ 774 passed across 38 files in 15.45s
Story Tests ✅ 149 passed across 30 stories in 10.04s · Chromium
Unit test breakdown
Component Tests Time Status
ciTestSummary 10 5ms ✅
useControllableState 11 23ms ✅
useOverlayCloseLifecycle 3 12ms ✅
accordion 15 314ms ✅
accordionselect 29 606ms ✅
button 43 279ms ✅
avatar 11 96ms ✅
callout 12 43ms ✅
card 12 94ms ✅
cardbutton 25 221ms ✅
checkbox 80 846ms ✅
codeinput 5 188ms ✅
combobox 38 1.64s ✅
dialog 20 570ms ✅
field 17 161ms ✅
drawer 57 1.58s ✅
icon 8 26ms ✅
informationaltooltip 13 819ms ✅
input 28 222ms ✅
markdown 26 168ms ✅
markdowneditor 13 145ms ✅
menu 17 786ms ✅
pagination 18 37ms ✅
popover 11 272ms ✅
select 68 1.25s ✅
phoneinput 8 1.83s ✅
phoneinput 19 1.99s ✅
phoneinput 10 5ms ✅
phoneinput 14 8ms ✅
styledlink 8 25ms ✅
table 19 159ms ✅
tabs 17 339ms ✅
tag 13 93ms ✅
text 11 42ms ✅
textarea 24 188ms ✅
tilt 24 140ms ✅
toast 8 195ms ✅
utility 9 38ms ✅

Vitest · 68 test files · View full run

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Docs audit — no documentation drift detected.

No documentation updates needed — the Checkbox indeterminate change's in-scope doc impacts (AGENTS.md component inventory, public/llms.txt usage line) were already updated within the change itself, and no other in-scope doc states any fact the diff contradicts.

Generated by docs-sentinel.

@saescapa
saescapa merged commit 34d7da3 into main Sep 28, 2026
12 checks passed
@saescapa
saescapa deleted the feat/checkbox-indeterminate branch September 28, 2026 23:45

This branch was successfully deployed

1 active deployment
Preview — f87b5fa1 Deployed Sep 28, 2026 by vercel[bot]
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