feat: add indeterminate state to Checkbox and align with Figma#675
Open
isaquebock wants to merge 6 commits into
Open
feat: add indeterminate state to Checkbox and align with Figma#675isaquebock wants to merge 6 commits into
isaquebock wants to merge 6 commits into
Conversation
- new `indeterminate` prop renders a horizontal-bar visual and sets `aria-checked="mixed"` plus the native `input.indeterminate` DOM property - `data-state` exposes `unchecked | checked | indeterminate` on the root - swap `--shape-button` for `--shape-elements` (same value, vocabulary aligned with Select/MultiSelect and the Figma frame) - adopt the Figma `0.8px` border via `border-[0.8px]` until `--border-width-default` lands in DESIGN.md - new Storybook story `Indeterminate`; all stories now bind `args` so the controls panel actually drives the component - spec bumped to v3 with the new prop, state, and theme gap entry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
indeterminateprop onCheckbox— renders a horizontal-bar visual, setsaria-checked="mixed", and syncs the nativeinput.indeterminateDOM property.data-stateon the root:unchecked | checked | indeterminate(legacydata-checkedretained for back-compat).2027:7311: token renamevar(--shape-button)→var(--shape-elements)(same value) andborder→border-[0.8px]to match--border-width-default.Indeterminatestory; all three stories now bindargsso the controls panel drives the component (previously hardcoded).spec_version: 3with the new prop, state, and a Theme gap entry for--border-width-default.Out of scope
.claude/rules/styling.md) is not refactored here. It is tech debt to be addressed separately so this PR stays a tight visual/behavior diff.Test plan
pnpm webkit:lint && pnpm webkit:type-check && pnpm webkit:type-coveragepnpm --filter storybook buildsucceeds.Defaultstory: togglebinary,indeterminate,disabled,readonlyfrom the controls panel and see the visual change.Indeterminatestory: shows the horizontal-bar visual.Disabledstory: both checked + unchecked variants render the disabled tokens.Indeterminatestory →<input aria-checked="mixed">andinput.indeterminate === true.