feat(radio): add RadioGroup component (CUI-17)#1114
Open
JeanMarcMilletScality wants to merge 2 commits into
Open
feat(radio): add RadioGroup component (CUI-17)#1114JeanMarcMilletScality wants to merge 2 commits into
JeanMarcMilletScality wants to merge 2 commits into
Conversation
Introduces RadioGroup as the public API for radio inputs: an options-driven component that owns selection, name, accessible label, and disabled state. Replaces the standalone Radio export. - Accessible name comes from one of label (fieldset/legend), aria-label, or aria-labelledby — supports FormGroup integration without duplicate labels. - Per-option disabledReason shown as a tooltip on hover. - Group-level disabled cascades to every option. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Hello jeanmarcmilletscality,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
- Re-export RadioGroupProps and RadioOption types from the package entry so consumers can type options arrays and extend the component. - Switch the RadioLabel styled-component to a transient $disabled prop so it no longer leaks an invalid attribute onto the underlying <label>. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
RadioGroupas the public API for radio inputs — options-driven, controlled component that owns selection, sharedname, accessible label, and disabled state.label(renders<fieldset>/<legend>),aria-label, oraria-labelledby— supportsFormGroupintegration without duplicating the label.disabledReasonshown as a tooltip on hover; group-leveldisabledcascades to every option.Radioexport (was unused outside the repo);Radio.component.tsxis gone.Ref: CUI-17
Test plan
npx jest --testPathPatterns=radiopasses (9 behavioural tests covering label sources, selection, mutual exclusivity, disabled cascade, single-option disable, shared name, disabledReason tooltip)npx tsc --noEmitcleannpm run lintcleannpm run storybook): visitComponents/Inputs/Radioand verifyRadioGroupExample,Horizontal,AllStates,DisabledGroup,WithDisabledReason,WithoutVisibleLabel,FormGroupExample🤖 Generated with Claude Code