Repository navigation
fix(theme): align the checkbox group recipe with Open Components - #379
Merged
alexgrozav merged 3 commits intoOct 29, 2026
Merged
Conversation
…tandard The checkbox-group recipe now meets the stylesheet rules of the Open Components Checkbox Group page. It resets its fieldset and styles the legend at the options' text size in a heavier weight, dims the legend of a disabled fieldset, in GrayText in forced colors mode, and gives every box the invalid border from the group's aria-invalid. A horizontal row puts 24px between its options, and options after a select-all box sit in from it with padding-inline-start, so their boxes line up with its label. The stories render a fieldset with a legend, and add select-all, focus, invalid and disabled stories. The docs page describes the parts, the states and what the recipe does for each rule.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…GrayText The select-all box and the options wrapper take a full-width line with a width rather than a flex basis, which set their height in a column group and pulled them apart in a group taller than its content. A horizontal group keeps its wrapped lines together with align-content: flex-start. In forced colors mode, a disabled box in an invalid group keeps its GrayText border, which the group's invalid border outranked. The invalid-state test now checks the inset shadow's colour, the resizable test the legend's margin token, and the FAQ asks the question its answer gives.
7 of 13 tasks
This branch was successfully deployed
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.
Description
Brings
useCheckboxGroupRecipein line with the stylesheet rules of the Open Components Checkbox Group page, so a group built on it is named by a legible legend, lays its options out the way people scan them and shows the group's disabled and invalid states.<fieldset>: it resets its border, padding, margin and minimum width, and styles its<legend>in@color.text(4.5:1 against the page in both themes) at the options' text size, in@font-weight.semibold.checkboxGroupContrast.test.tschecks the legend, and the invalid border's 3:1 against the page and every box colour, in both themes.gap-x: @1.5) between its options and wraps rather than overflowing. The size axis now sets the row gap withgap-yrather thangap, with the same values.[data-slot="options"]after a[data-slot="select-all"]box sit in from it by its box and gap, withpadding-inline-start, so their boxes line up with its label, in either direction.<fieldset disabled>dims its legend to 50%, and in forced colors mode turns itGrayTextat full opacity. Each checkbox dims itself, as before.aria-invalid="true"gives every box the checkbox's@color.errorborder and inset pixel, so no box grows. The focus ring stays@color.focus, and nothing styles:invalid.Each size adds a
-size-<size>class to the group, which the legend's size and the indent hang off. Storybook renders a fieldset with a legend and adds select-all, focus, invalid and disabled stories, and the docs page gains a "Parts and states" section and a rewritten Accessibility section. No variant name, value, default or export changes.Related issue
None.
Type of change
Checklist
feat(theme): …)pnpm build:nodocs && pnpm lint && pnpm typecheck && pnpm testand everything passes (all pass except 8@styleframe/playgroundtests intest/theme.test.ts, which fail the same way on the base branch:localStorageis undefined under the local Node version)pnpm changeset) for changes to publishable packages, or this change only touches docs/storybook/app/playground/testsdist/,.styleframe/)mainand stays focused in scope (it targets thealign-component-styles-uxf-487integration branch, and stays focused in scope)Notes / screenshots
aria-invalidon to each option, so each one reads invalid. The recipe also draws the invalid border from the group's attribute alone, so a group whose options don't carry it still looks invalid.@font-weight.semibold, where the Radio Group's legend ismedium.