@helixds/react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +292 -0
- package/LICENSE +21 -0
- package/README.md +49 -2
- package/dist/components/Accordion/Accordion.d.ts +14 -0
- package/dist/components/Accordion/Accordion.doc.d.ts +4 -0
- package/dist/components/Accordion/Accordion.doc.js +27 -0
- package/dist/components/Accordion/Accordion.js +76 -0
- package/dist/components/Accordion/Accordion.types.d.ts +24 -0
- package/dist/components/Accordion/Accordion.types.js +2 -0
- package/dist/components/Accordion/index.d.ts +9 -0
- package/dist/components/Accordion/index.js +2 -0
- package/dist/components/Avatar/Avatar.d.ts +14 -0
- package/dist/components/Avatar/Avatar.doc.d.ts +4 -0
- package/dist/components/Avatar/Avatar.doc.js +34 -0
- package/dist/components/Avatar/Avatar.js +14 -0
- package/dist/components/Avatar/Avatar.types.d.ts +20 -0
- package/dist/components/Avatar/Avatar.types.js +2 -0
- package/dist/components/Avatar/index.d.ts +9 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +14 -0
- package/dist/components/AvatarGroup/AvatarGroup.doc.d.ts +4 -0
- package/dist/components/AvatarGroup/AvatarGroup.doc.js +30 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +15 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +21 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.js +2 -0
- package/dist/components/AvatarGroup/index.d.ts +9 -0
- package/dist/components/AvatarGroup/index.js +2 -0
- package/dist/components/Badge/Badge.d.ts +16 -0
- package/dist/components/Badge/Badge.doc.d.ts +4 -0
- package/dist/components/Badge/Badge.doc.js +69 -0
- package/dist/components/Badge/Badge.js +23 -0
- package/dist/components/Badge/Badge.types.d.ts +22 -0
- package/dist/components/Badge/Badge.types.js +2 -0
- package/dist/components/Badge/index.d.ts +9 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/Button/Button.d.ts +11 -0
- package/dist/components/Button/Button.doc.d.ts +4 -0
- package/dist/components/Button/Button.doc.js +98 -0
- package/dist/components/Button/Button.js +80 -0
- package/dist/components/Button/Button.types.d.ts +29 -0
- package/dist/components/Button/Button.types.js +2 -0
- package/dist/components/Button/index.d.ts +9 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Card/Card.d.ts +14 -0
- package/dist/components/Card/Card.doc.d.ts +4 -0
- package/dist/components/Card/Card.doc.js +44 -0
- package/dist/components/Card/Card.js +9 -0
- package/dist/components/Card/Card.types.d.ts +19 -0
- package/dist/components/Card/Card.types.js +2 -0
- package/dist/components/Card/index.d.ts +9 -0
- package/dist/components/Card/index.js +2 -0
- package/dist/components/Chart/Chart.d.ts +14 -0
- package/dist/components/Chart/Chart.doc.d.ts +4 -0
- package/dist/components/Chart/Chart.doc.js +49 -0
- package/dist/components/Chart/Chart.js +184 -0
- package/dist/components/Chart/Chart.types.d.ts +21 -0
- package/dist/components/Chart/Chart.types.js +2 -0
- package/dist/components/Chart/index.d.ts +9 -0
- package/dist/components/Chart/index.js +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +12 -0
- package/dist/components/Checkbox/Checkbox.doc.d.ts +4 -0
- package/dist/components/Checkbox/Checkbox.doc.js +54 -0
- package/dist/components/Checkbox/Checkbox.js +23 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +22 -0
- package/dist/components/Checkbox/Checkbox.types.js +2 -0
- package/dist/components/Checkbox/index.d.ts +9 -0
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +13 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.doc.d.ts +4 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.doc.js +56 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js +27 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.types.d.ts +28 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.types.js +2 -0
- package/dist/components/CheckboxGroup/index.d.ts +9 -0
- package/dist/components/CheckboxGroup/index.js +2 -0
- package/dist/components/Chip/Chip.d.ts +11 -0
- package/dist/components/Chip/Chip.doc.d.ts +4 -0
- package/dist/components/Chip/Chip.doc.js +105 -0
- package/dist/components/Chip/Chip.js +30 -0
- package/dist/components/Chip/Chip.types.d.ts +31 -0
- package/dist/components/Chip/Chip.types.js +2 -0
- package/dist/components/Chip/index.d.ts +9 -0
- package/dist/components/Chip/index.js +2 -0
- package/dist/components/ChipGroup/ChipGroup.d.ts +12 -0
- package/dist/components/ChipGroup/ChipGroup.doc.d.ts +4 -0
- package/dist/components/ChipGroup/ChipGroup.doc.js +31 -0
- package/dist/components/ChipGroup/ChipGroup.js +9 -0
- package/dist/components/ChipGroup/ChipGroup.types.d.ts +27 -0
- package/dist/components/ChipGroup/ChipGroup.types.js +2 -0
- package/dist/components/ChipGroup/index.d.ts +9 -0
- package/dist/components/ChipGroup/index.js +2 -0
- package/dist/components/FAB/FAB.d.ts +11 -0
- package/dist/components/FAB/FAB.doc.d.ts +4 -0
- package/dist/components/FAB/FAB.doc.js +52 -0
- package/dist/components/FAB/FAB.js +133 -0
- package/dist/components/FAB/FAB.types.d.ts +37 -0
- package/dist/components/FAB/FAB.types.js +2 -0
- package/dist/components/FAB/index.d.ts +9 -0
- package/dist/components/FAB/index.js +2 -0
- package/dist/components/Icon/Icon.d.ts +14 -0
- package/dist/components/Icon/Icon.doc.d.ts +4 -0
- package/dist/components/Icon/Icon.doc.js +38 -0
- package/dist/components/Icon/Icon.js +15 -0
- package/dist/components/Icon/Icon.types.d.ts +47 -0
- package/dist/components/Icon/Icon.types.js +2 -0
- package/dist/components/Icon/createIconAdapter.d.ts +24 -0
- package/dist/components/Icon/createIconAdapter.js +28 -0
- package/dist/components/Icon/iconStroke.d.ts +20 -0
- package/dist/components/Icon/iconStroke.js +54 -0
- package/dist/components/Icon/index.d.ts +12 -0
- package/dist/components/Icon/index.js +4 -0
- package/dist/components/IconButton/IconButton.d.ts +11 -0
- package/dist/components/IconButton/IconButton.doc.d.ts +4 -0
- package/dist/components/IconButton/IconButton.doc.js +76 -0
- package/dist/components/IconButton/IconButton.js +20 -0
- package/dist/components/IconButton/IconButton.types.d.ts +25 -0
- package/dist/components/IconButton/IconButton.types.js +2 -0
- package/dist/components/IconButton/index.d.ts +9 -0
- package/dist/components/IconButton/index.js +2 -0
- package/dist/components/Input/Input.d.ts +11 -0
- package/dist/components/Input/Input.doc.d.ts +4 -0
- package/dist/components/Input/Input.doc.js +68 -0
- package/dist/components/Input/Input.js +48 -0
- package/dist/components/Input/Input.types.d.ts +36 -0
- package/dist/components/Input/Input.types.js +2 -0
- package/dist/components/Input/index.d.ts +9 -0
- package/dist/components/Input/index.js +2 -0
- package/dist/components/Menu/Menu.d.ts +14 -0
- package/dist/components/Menu/Menu.doc.d.ts +4 -0
- package/dist/components/Menu/Menu.doc.js +46 -0
- package/dist/components/Menu/Menu.js +105 -0
- package/dist/components/Menu/Menu.types.d.ts +34 -0
- package/dist/components/Menu/Menu.types.js +2 -0
- package/dist/components/Menu/index.d.ts +9 -0
- package/dist/components/Menu/index.js +2 -0
- package/dist/components/Modal/Modal.d.ts +14 -0
- package/dist/components/Modal/Modal.doc.d.ts +4 -0
- package/dist/components/Modal/Modal.doc.js +52 -0
- package/dist/components/Modal/Modal.js +30 -0
- package/dist/components/Modal/Modal.types.d.ts +36 -0
- package/dist/components/Modal/Modal.types.js +2 -0
- package/dist/components/Modal/index.d.ts +9 -0
- package/dist/components/Modal/index.js +2 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +17 -0
- package/dist/components/MultiSelect/MultiSelect.doc.d.ts +4 -0
- package/dist/components/MultiSelect/MultiSelect.doc.js +37 -0
- package/dist/components/MultiSelect/MultiSelect.js +165 -0
- package/dist/components/MultiSelect/MultiSelect.types.d.ts +50 -0
- package/dist/components/MultiSelect/MultiSelect.types.js +2 -0
- package/dist/components/MultiSelect/index.d.ts +9 -0
- package/dist/components/MultiSelect/index.js +2 -0
- package/dist/components/NavItem/NavItem.d.ts +14 -0
- package/dist/components/NavItem/NavItem.doc.d.ts +4 -0
- package/dist/components/NavItem/NavItem.doc.js +31 -0
- package/dist/components/NavItem/NavItem.js +21 -0
- package/dist/components/NavItem/NavItem.types.d.ts +20 -0
- package/dist/components/NavItem/NavItem.types.js +2 -0
- package/dist/components/NavItem/index.d.ts +9 -0
- package/dist/components/NavItem/index.js +2 -0
- package/dist/components/RadioButton/RadioButton.d.ts +14 -0
- package/dist/components/RadioButton/RadioButton.doc.d.ts +4 -0
- package/dist/components/RadioButton/RadioButton.doc.js +35 -0
- package/dist/components/RadioButton/RadioButton.js +15 -0
- package/dist/components/RadioButton/RadioButton.types.d.ts +33 -0
- package/dist/components/RadioButton/RadioButton.types.js +2 -0
- package/dist/components/RadioButton/index.d.ts +9 -0
- package/dist/components/RadioButton/index.js +2 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +12 -0
- package/dist/components/RadioGroup/RadioGroup.doc.d.ts +4 -0
- package/dist/components/RadioGroup/RadioGroup.doc.js +80 -0
- package/dist/components/RadioGroup/RadioGroup.js +19 -0
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +28 -0
- package/dist/components/RadioGroup/RadioGroup.types.js +2 -0
- package/dist/components/RadioGroup/index.d.ts +9 -0
- package/dist/components/RadioGroup/index.js +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +13 -0
- package/dist/components/SegmentedControl/SegmentedControl.doc.d.ts +4 -0
- package/dist/components/SegmentedControl/SegmentedControl.doc.js +50 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +64 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.d.ts +26 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.js +2 -0
- package/dist/components/SegmentedControl/index.d.ts +9 -0
- package/dist/components/SegmentedControl/index.js +2 -0
- package/dist/components/Select/Select.d.ts +13 -0
- package/dist/components/Select/Select.doc.d.ts +4 -0
- package/dist/components/Select/Select.doc.js +66 -0
- package/dist/components/Select/Select.js +138 -0
- package/dist/components/Select/Select.types.d.ts +36 -0
- package/dist/components/Select/Select.types.js +2 -0
- package/dist/components/Select/index.d.ts +9 -0
- package/dist/components/Select/index.js +2 -0
- package/dist/components/SidePanel/SidePanel.d.ts +14 -0
- package/dist/components/SidePanel/SidePanel.doc.d.ts +4 -0
- package/dist/components/SidePanel/SidePanel.doc.js +29 -0
- package/dist/components/SidePanel/SidePanel.js +19 -0
- package/dist/components/SidePanel/SidePanel.types.d.ts +28 -0
- package/dist/components/SidePanel/SidePanel.types.js +2 -0
- package/dist/components/SidePanel/index.d.ts +9 -0
- package/dist/components/SidePanel/index.js +2 -0
- package/dist/components/Switch/Switch.d.ts +13 -0
- package/dist/components/Switch/Switch.doc.d.ts +4 -0
- package/dist/components/Switch/Switch.doc.js +56 -0
- package/dist/components/Switch/Switch.js +45 -0
- package/dist/components/Switch/Switch.types.d.ts +21 -0
- package/dist/components/Switch/Switch.types.js +2 -0
- package/dist/components/Switch/index.d.ts +9 -0
- package/dist/components/Switch/index.js +2 -0
- package/dist/components/Table/Table.d.ts +34 -0
- package/dist/components/Table/Table.doc.d.ts +4 -0
- package/dist/components/Table/Table.doc.js +48 -0
- package/dist/components/Table/Table.js +17 -0
- package/dist/components/Table/Table.types.d.ts +30 -0
- package/dist/components/Table/Table.types.js +2 -0
- package/dist/components/Table/index.d.ts +9 -0
- package/dist/components/Table/index.js +2 -0
- package/dist/components/Textarea/Textarea.d.ts +9 -0
- package/dist/components/Textarea/Textarea.doc.d.ts +4 -0
- package/dist/components/Textarea/Textarea.doc.js +60 -0
- package/dist/components/Textarea/Textarea.js +24 -0
- package/dist/components/Textarea/Textarea.types.d.ts +22 -0
- package/dist/components/Textarea/Textarea.types.js +2 -0
- package/dist/components/Textarea/index.d.ts +9 -0
- package/dist/components/Textarea/index.js +2 -0
- package/dist/components/Toast/Toast.d.ts +16 -0
- package/dist/components/Toast/Toast.doc.d.ts +4 -0
- package/dist/components/Toast/Toast.doc.js +37 -0
- package/dist/components/Toast/Toast.js +134 -0
- package/dist/components/Toast/Toast.types.d.ts +11 -0
- package/dist/components/Toast/Toast.types.js +2 -0
- package/dist/components/Toast/index.d.ts +10 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/toastStore.d.ts +36 -0
- package/dist/components/Toast/toastStore.js +57 -0
- package/dist/components/Tooltip/Tooltip.d.ts +14 -0
- package/dist/components/Tooltip/Tooltip.doc.d.ts +4 -0
- package/dist/components/Tooltip/Tooltip.doc.js +33 -0
- package/dist/components/Tooltip/Tooltip.js +105 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +21 -0
- package/dist/components/Tooltip/Tooltip.types.js +2 -0
- package/dist/components/Tooltip/index.d.ts +9 -0
- package/dist/components/Tooltip/index.js +2 -0
- package/dist/contracts/Accordion.json +174 -0
- package/dist/contracts/AppShell.json +118 -0
- package/dist/contracts/Avatar.json +157 -0
- package/dist/contracts/AvatarGroup.json +169 -0
- package/dist/contracts/Badge.json +212 -0
- package/dist/contracts/Button.json +295 -0
- package/dist/contracts/Card.json +125 -0
- package/dist/contracts/Chart.json +167 -0
- package/dist/contracts/Checkbox.json +333 -0
- package/dist/contracts/CheckboxGroup.json +200 -0
- package/dist/contracts/Chip.json +320 -0
- package/dist/contracts/ChipGroup.json +182 -0
- package/dist/contracts/FAB.json +215 -0
- package/dist/contracts/Icon.json +306 -0
- package/dist/contracts/IconButton.json +213 -0
- package/dist/contracts/Input.json +400 -0
- package/dist/contracts/Menu.json +197 -0
- package/dist/contracts/Modal.json +192 -0
- package/dist/contracts/MultiSelect.json +244 -0
- package/dist/contracts/NavItem.json +148 -0
- package/dist/contracts/PageHeader.json +134 -0
- package/dist/contracts/RadioButton.json +202 -0
- package/dist/contracts/RadioGroup.json +228 -0
- package/dist/contracts/SegmentedControl.json +193 -0
- package/dist/contracts/Select.json +241 -0
- package/dist/contracts/SideNav.json +138 -0
- package/dist/contracts/SidePanel.json +153 -0
- package/dist/contracts/Switch.json +201 -0
- package/dist/contracts/Table.json +130 -0
- package/dist/contracts/Textarea.json +353 -0
- package/dist/contracts/Toast.json +186 -0
- package/dist/contracts/Tooltip.json +168 -0
- package/dist/contracts/TopBar.json +127 -0
- package/dist/contracts/manifest.json +675 -0
- package/dist/index.d.ts +109 -0
- package/dist/index.js +73 -0
- package/dist/layout/AppShell/AppShell.d.ts +14 -0
- package/dist/layout/AppShell/AppShell.doc.d.ts +4 -0
- package/dist/layout/AppShell/AppShell.doc.js +27 -0
- package/dist/layout/AppShell/AppShell.js +9 -0
- package/dist/layout/AppShell/AppShell.types.d.ts +18 -0
- package/dist/layout/AppShell/AppShell.types.js +2 -0
- package/dist/layout/AppShell/index.d.ts +9 -0
- package/dist/layout/AppShell/index.js +2 -0
- package/dist/layout/PageHeader/PageHeader.d.ts +14 -0
- package/dist/layout/PageHeader/PageHeader.doc.d.ts +4 -0
- package/dist/layout/PageHeader/PageHeader.doc.js +30 -0
- package/dist/layout/PageHeader/PageHeader.js +10 -0
- package/dist/layout/PageHeader/PageHeader.types.d.ts +21 -0
- package/dist/layout/PageHeader/PageHeader.types.js +2 -0
- package/dist/layout/PageHeader/index.d.ts +9 -0
- package/dist/layout/PageHeader/index.js +2 -0
- package/dist/layout/SideNav/SideNav.d.ts +14 -0
- package/dist/layout/SideNav/SideNav.doc.d.ts +4 -0
- package/dist/layout/SideNav/SideNav.doc.js +32 -0
- package/dist/layout/SideNav/SideNav.js +9 -0
- package/dist/layout/SideNav/SideNav.types.d.ts +18 -0
- package/dist/layout/SideNav/SideNav.types.js +2 -0
- package/dist/layout/SideNav/index.d.ts +9 -0
- package/dist/layout/SideNav/index.js +2 -0
- package/dist/layout/TopBar/TopBar.d.ts +14 -0
- package/dist/layout/TopBar/TopBar.doc.d.ts +4 -0
- package/dist/layout/TopBar/TopBar.doc.js +28 -0
- package/dist/layout/TopBar/TopBar.js +9 -0
- package/dist/layout/TopBar/TopBar.types.d.ts +16 -0
- package/dist/layout/TopBar/TopBar.types.js +2 -0
- package/dist/layout/TopBar/index.d.ts +9 -0
- package/dist/layout/TopBar/index.js +2 -0
- package/dist/lib/component-doc.d.ts +34 -0
- package/dist/lib/component-doc.js +2 -0
- package/dist/lib/motionPresets.d.ts +37 -0
- package/dist/lib/motionPresets.js +35 -0
- package/dist/lib/resolveTokenPx.d.ts +11 -0
- package/dist/lib/resolveTokenPx.js +17 -0
- package/dist/lib/useDialogTransition.d.ts +21 -0
- package/dist/lib/useDialogTransition.js +86 -0
- package/dist/lib/useDisclosureTransition.d.ts +19 -0
- package/dist/lib/useDisclosureTransition.js +41 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.js +6 -0
- package/dist/patterns/action-bar.md +127 -0
- package/dist/patterns/border-always.md +40 -0
- package/dist/patterns/data-analytics.md +15 -0
- package/dist/patterns/disabled-state.md +80 -0
- package/dist/patterns/empty-state.md +130 -0
- package/dist/patterns/expand-collapse-chevron.md +101 -0
- package/dist/patterns/form-field-group.md +139 -0
- package/dist/patterns/form-field-spacing.md +99 -0
- package/dist/patterns/group-spacing.md +54 -0
- package/dist/patterns/motion-effects.md +100 -0
- package/dist/patterns/same-row-sizing.md +52 -0
- package/dist/patterns/search-filter.md +118 -0
- package/dist/patterns/show-hide-parts.md +53 -0
- package/dist/patterns/stat-card.md +105 -0
- package/dist/patterns/status-row.md +130 -0
- package/dist/patterns/view-toggle.md +81 -0
- package/dist/prop-map.md +80 -0
- package/package.json +70 -3
- package/src/globals.css +3195 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "PageHeader",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
|
|
7
|
+
"purpose": "Introduces a page or major section: title, optional supporting description, and trailing actions in one consistent row.",
|
|
8
|
+
"import": "import { PageHeader } from '@helixds/react';",
|
|
9
|
+
|
|
10
|
+
"neverUseFor": [
|
|
11
|
+
"Card or panel titles — use Card's own header slot instead",
|
|
12
|
+
"Breadcrumbs or wayfinding — PageHeader is the destination, not the trail",
|
|
13
|
+
"Repeated inside a scrollable list — PageHeader is a page-level element, used once per view"
|
|
14
|
+
],
|
|
15
|
+
|
|
16
|
+
"rationale": "PageHeader gives every view the same title, description and trailing-actions row so pages are predictable to scan (2.4.6 Headings and Labels). It's the destination, not the trail, and is used once per view — card titles and breadcrumbs are separate concerns.",
|
|
17
|
+
|
|
18
|
+
"governance": {
|
|
19
|
+
"mayExtendLocally": [
|
|
20
|
+
"Write the title and description per page",
|
|
21
|
+
"Put any Helix Buttons/IconButtons in the actions slot"
|
|
22
|
+
],
|
|
23
|
+
"mustEscalateToDS": [
|
|
24
|
+
"Adding breadcrumbs, tabs or new regions into PageHeader",
|
|
25
|
+
"Changing the title type scale or spacing tokens",
|
|
26
|
+
"Using PageHeader inside Cards or repeated in lists"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"states": {
|
|
31
|
+
"intrinsic": [],
|
|
32
|
+
"authored": []
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
"anatomy": [
|
|
36
|
+
{ "part": "page-header-root", "element": "div", "description": "Layout wrapper — title/description on one side, actions on the other." },
|
|
37
|
+
{ "part": "page-header-title", "element": "h1 or h2", "description": "The page or section title. Heading level set by the `level` prop." },
|
|
38
|
+
{ "part": "page-header-description", "element": "p", "description": "Supporting one-line description below the title.", "optional": true },
|
|
39
|
+
{ "part": "page-header-actions", "element": "div", "description": "Trailing slot for actions (Button, Badge, ...).", "optional": true }
|
|
40
|
+
],
|
|
41
|
+
|
|
42
|
+
"props": [
|
|
43
|
+
{ "name": "label", "type": "string", "required": true, "description": "The page or section title text." },
|
|
44
|
+
{ "name": "description", "type": "string | undefined", "description": "Supporting one-line description shown below the title." },
|
|
45
|
+
{ "name": "level", "type": "1 | 2", "default": 1, "description": "Heading level of the title — 1 for a page, 2 for a major in-page section. Never skip a level to change visual size; that's what CSS is for." },
|
|
46
|
+
{ "name": "actions", "type": "React.ReactNode | undefined", "description": "Trailing content — typically a Button and/or Badge." },
|
|
47
|
+
{ "name": "className", "type": "string | undefined", "description": "Additional className for the root." }
|
|
48
|
+
],
|
|
49
|
+
|
|
50
|
+
"tokenPolicy": {
|
|
51
|
+
"allowed": ["color.text", "fontSize", "fontWeight", "spacing"],
|
|
52
|
+
"forbidden": ["primitive.color"]
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
"a11y": {
|
|
56
|
+
"role": "banner (implicit only when PageHeader is the page's single top-level heading region — not applied automatically)",
|
|
57
|
+
"announces": ["heading"],
|
|
58
|
+
"wcag": ["1.3.1 Info and Relationships", "2.4.6 Headings and Labels"],
|
|
59
|
+
"applied": {
|
|
60
|
+
"nativeElement": "div",
|
|
61
|
+
"innerComponents": [
|
|
62
|
+
"Button"
|
|
63
|
+
],
|
|
64
|
+
"focus": [
|
|
65
|
+
{
|
|
66
|
+
"part": "(its inner controls)",
|
|
67
|
+
"delegatedTo": [
|
|
68
|
+
"Button"
|
|
69
|
+
],
|
|
70
|
+
"note": "focus is drawn by Button — see their a11y.applied.focus"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"aria": {},
|
|
74
|
+
"announced": [
|
|
75
|
+
"heading \"Team\" [level=1]",
|
|
76
|
+
"heading \"Danger zone\" [level=2]"
|
|
77
|
+
],
|
|
78
|
+
"contrast": {
|
|
79
|
+
"page-header-title": {
|
|
80
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
81
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
82
|
+
},
|
|
83
|
+
"page-header-description": {
|
|
84
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
85
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"targetSize": {},
|
|
89
|
+
"motion": [
|
|
90
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"results": {
|
|
94
|
+
"score": 100,
|
|
95
|
+
"meetsMinimum": true,
|
|
96
|
+
"checks": {
|
|
97
|
+
"contract": "pass",
|
|
98
|
+
"keys": "n/a",
|
|
99
|
+
"focus-return": "n/a",
|
|
100
|
+
"keyboard": "n/a",
|
|
101
|
+
"axe": "pass",
|
|
102
|
+
"contrast": "pass",
|
|
103
|
+
"focus-visible": "pass",
|
|
104
|
+
"target-size": "pass",
|
|
105
|
+
"reflow": "pass",
|
|
106
|
+
"screen-reader": "pass",
|
|
107
|
+
"ai-visual": "pass",
|
|
108
|
+
"human": "pending"
|
|
109
|
+
},
|
|
110
|
+
"notScored": [
|
|
111
|
+
"ai-visual",
|
|
112
|
+
"human"
|
|
113
|
+
],
|
|
114
|
+
"changed": "2026-10-12"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
"figma": {
|
|
119
|
+
"childProps": {"actions": [{"component": "Button", "property": null, "note": "the buttons placed in the actions slot"}]},
|
|
120
|
+
"states": ["default"],
|
|
121
|
+
"properties": [
|
|
122
|
+
{ "name": "level", "type": "VARIANT", "values": ["1", "2"], "codeProp": "level", "description": "1 = h1, Heading / 2xl / Bold · 2 = h2, Heading / xl / Bold." },
|
|
123
|
+
{ "name": "label", "type": "TEXT", "codeProp": "label" },
|
|
124
|
+
{ "name": "description.", "type": "BOOLEAN", "codeProp": "description", "description": "Show/hide part: the line carries its own 4px top (spacing/2xs), so hiding it changes nothing else." },
|
|
125
|
+
{ "name": "description", "type": "TEXT", "codeProp": "description" },
|
|
126
|
+
{ "name": "actions", "type": "BOOLEAN", "codeProp": "actions", "description": "Shows the actions slot (a primary Button instance as a placeholder; 8px gap — the slot can mix groups, e.g. Badge + Button)." }
|
|
127
|
+
],
|
|
128
|
+
"stories": {
|
|
129
|
+
"Default": "description.=true",
|
|
130
|
+
"WithActions": "actions=true, description.=true",
|
|
131
|
+
"SectionLevel": "level=2, description.=true"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "RadioButton",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
|
|
7
|
+
"purpose": "A single radio input — the individual option unit RadioGroup renders per choice, exposed on its own for cases that need one radio outside a full group (e.g. a single option embedded in a custom layout, or a hand-assembled set sharing `name`).",
|
|
8
|
+
"import": "import { RadioButton } from '@helixds/react';",
|
|
9
|
+
|
|
10
|
+
"neverUseFor": [
|
|
11
|
+
"A set of mutually exclusive options — use RadioGroup instead, which renders one of these per option with the correct fieldset/legend wrapper for free",
|
|
12
|
+
"A single independent on/off choice — use Checkbox or Switch instead",
|
|
13
|
+
"Anything needing search or many options — use Select instead"
|
|
14
|
+
],
|
|
15
|
+
|
|
16
|
+
"rationale": "RadioButton is the exact native radio option RadioGroup renders, exposed on its own only for custom layouts that still share a `name`. It keeps the same fixed 16px control as Checkbox; for a normal set of options RadioGroup should be used because it adds fieldset/legend for free.",
|
|
17
|
+
|
|
18
|
+
"governance": {
|
|
19
|
+
"mayExtendLocally": [
|
|
20
|
+
"Place a single radio inside a custom layout sharing `name`",
|
|
21
|
+
"Write the label per usage"
|
|
22
|
+
],
|
|
23
|
+
"mustEscalateToDS": [
|
|
24
|
+
"Adding a size prop or new control sizes",
|
|
25
|
+
"Replacing the native radio input",
|
|
26
|
+
"Building full option sets by hand instead of using RadioGroup"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"states": {
|
|
31
|
+
"intrinsic": ["hover", "focus", "active"],
|
|
32
|
+
"authored": [
|
|
33
|
+
{ "name": "checked", "description": "Whether this radio is selected. Controlled via `checked`, uncontrolled via `defaultChecked` — same split as Switch.", "aria": "native :checked state" },
|
|
34
|
+
{ "name": "invalid", "description": "Fails validation.", "aria": "aria-invalid='true'" },
|
|
35
|
+
{ "name": "disabled", "description": "Non-interactive.", "aria": "disabled (native HTML attribute)" }
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
"anatomy": [
|
|
40
|
+
{ "part": "radio-item", "element": "label", "description": "Wraps the input, visual control, and content — identical anatomy to one RadioGroup option, so it shares all of RadioGroup's CSS with no duplication." },
|
|
41
|
+
{ "part": "radio-input", "element": "input", "description": "The native radio input." },
|
|
42
|
+
{ "part": "radio-control", "element": "span", "description": "Visual circle — reflects checked state via CSS." },
|
|
43
|
+
{ "part": "radio-dot", "element": "span", "description": "Inner filled dot shown when checked.", "optional": true },
|
|
44
|
+
{ "part": "radio-item-content", "element": "span", "description": "Wraps the label and description." },
|
|
45
|
+
{ "part": "radio-item-label", "element": "span", "description": "Visible label. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
|
|
46
|
+
{ "part": "radio-item-required", "element": "span", "optional": true, "description": "The required indicator (*) inside the label, text/danger, 2px (spacing/3xs) after the text — shown by `required`, like Checkbox. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
|
|
47
|
+
{ "part": "radio-item-description", "element": "span", "description": "Helper text. Sits exactly 4px below the label — same structure as Checkbox's own description. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md).", "optional": true },
|
|
48
|
+
{ "part": "radio-item-error", "element": "span", "description": "Error text, shown instead of the description when `errorMessage` is set — identical structure to Checkbox's own error message.", "optional": true }
|
|
49
|
+
],
|
|
50
|
+
|
|
51
|
+
"props": [
|
|
52
|
+
{ "name": "label", "type": "string", "required": true, "description": "Visible label." },
|
|
53
|
+
{ "name": "name", "type": "string | undefined", "description": "Native radio group name, shared with any sibling RadioButtons it should be mutually exclusive with. Auto-generated (unique to this instance) if omitted — meaning it won't group with anything unless you set this explicitly." },
|
|
54
|
+
{ "name": "value", "type": "string | undefined", "description": "Native radio value, read from the form on submit. Defaults to the native 'on' if omitted." },
|
|
55
|
+
{ "name": "checked", "type": "boolean | undefined", "description": "Controlled checked state." },
|
|
56
|
+
{ "name": "defaultChecked", "type": "boolean", "default": false, "description": "Uncontrolled initial checked state." },
|
|
57
|
+
{ "name": "onChange", "type": "((checked: boolean) => void) | undefined", "description": "Change handler." },
|
|
58
|
+
{ "name": "description", "type": "string | undefined", "description": "Helper text shown under the label. Not shown when errorMessage is also set." },
|
|
59
|
+
{ "name": "errorMessage", "type": "string | undefined", "description": "Error text shown under the label when invalid is true — takes over from description." },
|
|
60
|
+
{ "name": "invalid", "type": "boolean", "default": false, "description": "Shows error styling." },
|
|
61
|
+
{ "name": "disabled", "type": "boolean", "default": false, "description": "Disables the input." },
|
|
62
|
+
{ "name": "required", "type": "boolean", "default": false, "description": "Marks the input as required." },
|
|
63
|
+
{ "name": "className", "type": "string | undefined", "description": "Additional className for the root." }
|
|
64
|
+
],
|
|
65
|
+
|
|
66
|
+
"sizing": {
|
|
67
|
+
"height": {
|
|
68
|
+
"mode": "fixed",
|
|
69
|
+
"values": { "default": 16 },
|
|
70
|
+
"unit": "px",
|
|
71
|
+
"note": "Same fixed 16px control as RadioGroup's own option — this IS that option, standalone."
|
|
72
|
+
},
|
|
73
|
+
"width": { "default": "hug" }
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
"tokenPolicy": {
|
|
77
|
+
"allowed": ["color.fill", "color.text", "color.border", "spacing", "radius", "fontSize"],
|
|
78
|
+
"forbidden": ["primitive.color"]
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
"a11y": {
|
|
82
|
+
"role": "radio (native input type=radio)",
|
|
83
|
+
"keyboardNav": ["Space — selects it", "Tab — moves focus to/from it"],
|
|
84
|
+
"wcag": ["2.1.1 Keyboard", "2.4.7 Focus Visible", "4.1.2 Name Role Value"],
|
|
85
|
+
"applied": {
|
|
86
|
+
"nativeElement": "label",
|
|
87
|
+
"focus": [
|
|
88
|
+
{
|
|
89
|
+
"part": "radio-input",
|
|
90
|
+
"when": ":focus-visible",
|
|
91
|
+
"outline": "2px solid var(--helix-radio-border-focus)",
|
|
92
|
+
"outline-offset": "2px"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"aria": {
|
|
96
|
+
"radio-control": {
|
|
97
|
+
"aria-hidden": [
|
|
98
|
+
"true"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"radio-input": {
|
|
102
|
+
"aria-invalid": [
|
|
103
|
+
"true"
|
|
104
|
+
],
|
|
105
|
+
"aria-describedby": [
|
|
106
|
+
"(id)"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"radio-item-error": {
|
|
110
|
+
"role": [
|
|
111
|
+
"alert"
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"announced": [
|
|
116
|
+
"radio \"Default\"",
|
|
117
|
+
"radio \"Checked\" [checked]",
|
|
118
|
+
"radio \"Disabled unchecked\" [disabled]",
|
|
119
|
+
"radio \"Disabled checked\" [checked] [disabled]",
|
|
120
|
+
"radio \"Free\" [checked]"
|
|
121
|
+
],
|
|
122
|
+
"contrast": {
|
|
123
|
+
"radio-item-label": {
|
|
124
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
125
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
126
|
+
},
|
|
127
|
+
"radio-item-error": {
|
|
128
|
+
"light": "6.47:1 — #b91c1c on #ffffff",
|
|
129
|
+
"dark": "12.65:1 — #fecdd3 on #0f172a"
|
|
130
|
+
},
|
|
131
|
+
"radio-item-description": {
|
|
132
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
133
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"targetSize": {
|
|
137
|
+
"radio-input": "smallest 53×21 px"
|
|
138
|
+
},
|
|
139
|
+
"motion": [
|
|
140
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"results": {
|
|
144
|
+
"score": 100,
|
|
145
|
+
"meetsMinimum": true,
|
|
146
|
+
"checks": {
|
|
147
|
+
"contract": "pass",
|
|
148
|
+
"keys": "pass",
|
|
149
|
+
"focus-return": "n/a",
|
|
150
|
+
"keyboard": "pass",
|
|
151
|
+
"axe": "pass",
|
|
152
|
+
"contrast": "pass",
|
|
153
|
+
"focus-visible": "pass",
|
|
154
|
+
"target-size": "pass",
|
|
155
|
+
"reflow": "n/a",
|
|
156
|
+
"screen-reader": "pass",
|
|
157
|
+
"ai-visual": "pass",
|
|
158
|
+
"human": "pending"
|
|
159
|
+
},
|
|
160
|
+
"notScored": [
|
|
161
|
+
"ai-visual",
|
|
162
|
+
"human"
|
|
163
|
+
],
|
|
164
|
+
"changed": "2026-10-12"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
"figma": {
|
|
169
|
+
"states": ["default", "hover", "focus"],
|
|
170
|
+
"properties": [
|
|
171
|
+
{
|
|
172
|
+
"name": "state",
|
|
173
|
+
"type": "VARIANT",
|
|
174
|
+
"values": ["default", "hover", "focus"],
|
|
175
|
+
"figmaOnly": true,
|
|
176
|
+
"description": "Figma-only axis: hover/focus are CSS pseudo-classes in code. checked, invalid and disabled are their own false/true toggles (contracts/figma-conversion.json, pattern checkable)."
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "description.",
|
|
180
|
+
"type": "BOOLEAN",
|
|
181
|
+
"codeProp": "description",
|
|
182
|
+
"description": "Show/hide part: a line in radio-item-content (4px gap only between shown lines)."
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "errorMessage.",
|
|
186
|
+
"type": "BOOLEAN",
|
|
187
|
+
"codeProp": "errorMessage",
|
|
188
|
+
"description": "Show/hide part: the error line. Code shows it instead of the description — turn description off when it is on."
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"structure": "radio-item > radio-control-box (21px = lineHeight/m, the circle centered on the label first line) + radio-item-content (radio-item-label [text + radio-item-required], description, error).",
|
|
192
|
+
"variantCombinations": "14 variants (2026-10-20): checked false/true × invalid false/true × state default/hover/focus = 12, plus disabled for each checked value at state default, valid = 2 — the standard rule for disabled. Disabled dims label, required * and description (text/disabled).",
|
|
193
|
+
"stories": {
|
|
194
|
+
"AllTypes": "layout",
|
|
195
|
+
"WithDescription": "description.=true",
|
|
196
|
+
"Invalid": "invalid=true, errorMessage.=true",
|
|
197
|
+
"Disabled": "disabled=true",
|
|
198
|
+
"Group": "layout",
|
|
199
|
+
"KeyboardSelect": {"figma": "state=focus", "reason": "keyboard focus — the focus ring is drawn in Figma (owner 2026-10-21: focus states are drawn)"}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "RadioGroup",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
|
|
7
|
+
"purpose": "Lets users choose exactly one option from a small, visible set of mutually exclusive choices.",
|
|
8
|
+
"import": "import { RadioGroup } from '@helixds/react';",
|
|
9
|
+
|
|
10
|
+
"neverUseFor": [
|
|
11
|
+
"A single independent on/off choice — use Checkbox or Switch instead",
|
|
12
|
+
"Large option sets or anything needing search — use Select instead",
|
|
13
|
+
"Multiple simultaneous selections — use a Checkbox group instead"
|
|
14
|
+
],
|
|
15
|
+
|
|
16
|
+
"rationale": "RadioGroup uses native fieldset/legend and radio inputs so arrow-key selection and the group label are handled by the browser. Like Checkbox it has one fixed 16px control outside the ADR-004 field scale, and it is for small visible sets — larger ones belong in Select.",
|
|
17
|
+
|
|
18
|
+
"governance": {
|
|
19
|
+
"mayExtendLocally": [
|
|
20
|
+
"Define the options, legend and helper text",
|
|
21
|
+
"Choose vertical or horizontal arrangement from the documented props"
|
|
22
|
+
],
|
|
23
|
+
"mustEscalateToDS": [
|
|
24
|
+
"Replacing native radios or the fieldset/legend wrapper",
|
|
25
|
+
"Adding sizes or card-style option variants",
|
|
26
|
+
"Changing option spacing tokens"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"states": {
|
|
31
|
+
"intrinsic": ["hover", "focus", "active"],
|
|
32
|
+
"authored": [
|
|
33
|
+
{ "name": "invalid", "description": "The selected value fails validation.", "aria": "aria-invalid='true' on each radio input" },
|
|
34
|
+
{ "name": "disabled", "description": "The whole group, or an individual option, is non-interactive.", "aria": "disabled (native HTML attribute)" },
|
|
35
|
+
{ "name": "required", "description": "A value must be selected before form submission.", "aria": "aria-required='true' on the fieldset" }
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
"anatomy": [
|
|
40
|
+
{ "part": "radio-group", "element": "fieldset", "description": "Root element — groups the legend and options for assistive tech." },
|
|
41
|
+
{ "part": "radio-legend", "element": "legend", "description": "Accessible group label. Sits exactly 8px above the options — see .ai/maps/patterns/form-field-spacing.md. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
|
|
42
|
+
{ "part": "radio-required", "element": "span", "optional": true, "description": "The required indicator (*) inside the legend, text/danger, 2px (spacing/3xs) after the text — shown by `required`. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
|
|
43
|
+
{ "part": "radio-options", "element": "div", "description": "Layout wrapper for the option list." },
|
|
44
|
+
{ "part": "radio-item", "element": "label", "description": "Wraps one option's input, visual control, and content." },
|
|
45
|
+
{ "part": "radio-input", "element": "input", "description": "The native radio input for one option." },
|
|
46
|
+
{ "part": "radio-control", "element": "span", "description": "Visual circle — reflects checked state via CSS." },
|
|
47
|
+
{ "part": "radio-dot", "element": "span", "description": "Inner filled dot shown when the option is checked.", "optional": true },
|
|
48
|
+
{ "part": "radio-item-content", "element": "span", "description": "Wraps one option's label and description." },
|
|
49
|
+
{ "part": "radio-item-label", "element": "span", "description": "Visible label for one option. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
|
|
50
|
+
{ "part": "radio-item-description", "element": "span", "description": "Helper text for one option. Sits exactly 8px below the label — see .ai/maps/patterns/form-field-spacing.md. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md).", "optional": true },
|
|
51
|
+
{ "part": "radio-description", "element": "span", "description": "Helper text for the whole group. Sits exactly 8px below the options — see .ai/maps/patterns/form-field-spacing.md. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md).", "optional": true },
|
|
52
|
+
{ "part": "radio-error", "element": "span", "description": "Error text shown when invalid=true.", "optional": true }
|
|
53
|
+
],
|
|
54
|
+
|
|
55
|
+
"props": [
|
|
56
|
+
{ "name": "label", "type": "string", "required": true, "description": "Accessible group label, rendered as the fieldset's legend." },
|
|
57
|
+
{ "name": "options", "type": "RadioOption[]", "required": true, "description": "The list of choices. Each option: { value, label, description?, disabled? }." },
|
|
58
|
+
{ "name": "value", "type": "string | undefined", "description": "Controlled selected value." },
|
|
59
|
+
{ "name": "defaultValue", "type": "string | undefined", "description": "Uncontrolled initial value." },
|
|
60
|
+
{ "name": "onChange", "type": "((value: string) => void) | undefined", "description": "Selection change handler." },
|
|
61
|
+
{ "name": "orientation", "type": "'vertical' | 'horizontal'", "default": "vertical", "description": "Layout direction of the option list." },
|
|
62
|
+
{ "name": "description", "type": "string | undefined", "description": "Helper text shown below the group." },
|
|
63
|
+
{ "name": "errorMessage", "type": "string | undefined", "description": "Error text shown when invalid=true." },
|
|
64
|
+
{ "name": "invalid", "type": "boolean", "default": false, "description": "Shows error styling and message." },
|
|
65
|
+
{ "name": "disabled", "type": "boolean", "default": false, "description": "Disables every option in the group." },
|
|
66
|
+
{ "name": "required", "type": "boolean", "default": false, "description": "Marks the group as required." },
|
|
67
|
+
{ "name": "name", "type": "string | undefined", "description": "Native radio group name shared by every input. Auto-generated if omitted." }
|
|
68
|
+
],
|
|
69
|
+
|
|
70
|
+
"sizing": {
|
|
71
|
+
"height": {
|
|
72
|
+
"mode": "fixed",
|
|
73
|
+
"values": { "default": 16 },
|
|
74
|
+
"unit": "px",
|
|
75
|
+
"note": "No size prop exists — each radio control is one fixed size (16px), matching Checkbox. Does not follow the ADR-004 field scale."
|
|
76
|
+
},
|
|
77
|
+
"width": {
|
|
78
|
+
"default": "hug"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
"tokenPolicy": {
|
|
83
|
+
"allowed": ["color.fill", "color.text", "color.border", "spacing", "radius", "fontSize"],
|
|
84
|
+
"forbidden": ["primitive.color"]
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
"a11y": {
|
|
88
|
+
"role": "radiogroup (native fieldset/legend + radio inputs)",
|
|
89
|
+
"keyboardNav": ["Arrow keys — move selection between options (native radio group behavior)", "Space — selects the focused option", "Tab — moves focus into and out of the group"],
|
|
90
|
+
"wcag": ["1.3.1 Info and Relationships", "2.1.1 Keyboard", "2.4.7 Focus Visible", "4.1.2 Name Role Value"],
|
|
91
|
+
"applied": {
|
|
92
|
+
"nativeElement": "fieldset",
|
|
93
|
+
"focus": [
|
|
94
|
+
{
|
|
95
|
+
"part": "radio-input",
|
|
96
|
+
"when": ":focus-visible",
|
|
97
|
+
"outline": "2px solid var(--helix-radio-border-focus)",
|
|
98
|
+
"outline-offset": "2px"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"aria": {
|
|
102
|
+
"radio-group": {
|
|
103
|
+
"role": [
|
|
104
|
+
"radiogroup"
|
|
105
|
+
],
|
|
106
|
+
"aria-describedby": [
|
|
107
|
+
"(id)"
|
|
108
|
+
],
|
|
109
|
+
"aria-required": [
|
|
110
|
+
"true"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"radio-control": {
|
|
114
|
+
"aria-hidden": [
|
|
115
|
+
"true"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"radio-input": {
|
|
119
|
+
"aria-invalid": [
|
|
120
|
+
"true"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"radio-error": {
|
|
124
|
+
"role": [
|
|
125
|
+
"alert"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"radio-required": {
|
|
129
|
+
"aria-hidden": [
|
|
130
|
+
"true"
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"announced": [
|
|
135
|
+
"radiogroup \"Plan\"",
|
|
136
|
+
"radiogroup \"Team size\""
|
|
137
|
+
],
|
|
138
|
+
"contrast": {
|
|
139
|
+
"radio-legend": {
|
|
140
|
+
"light": "2.56:1 — #94a3b8 on #ffffff",
|
|
141
|
+
"dark": "2.35:1 — #475569 on #0f172a"
|
|
142
|
+
},
|
|
143
|
+
"radio-item-label": {
|
|
144
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
145
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
146
|
+
},
|
|
147
|
+
"radio-item-description": {
|
|
148
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
149
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
150
|
+
},
|
|
151
|
+
"radio-error": {
|
|
152
|
+
"light": "6.47:1 — #b91c1c on #ffffff",
|
|
153
|
+
"dark": "12.65:1 — #fecdd3 on #0f172a"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"targetSize": {
|
|
157
|
+
"radio-input": "smallest 77×21 px"
|
|
158
|
+
},
|
|
159
|
+
"motion": [
|
|
160
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"results": {
|
|
164
|
+
"score": 100,
|
|
165
|
+
"meetsMinimum": true,
|
|
166
|
+
"checks": {
|
|
167
|
+
"contract": "pass",
|
|
168
|
+
"keys": "pass",
|
|
169
|
+
"focus-return": "n/a",
|
|
170
|
+
"keyboard": "pass",
|
|
171
|
+
"axe": "pass",
|
|
172
|
+
"contrast": "pass",
|
|
173
|
+
"focus-visible": "pass",
|
|
174
|
+
"target-size": "pass",
|
|
175
|
+
"reflow": "n/a",
|
|
176
|
+
"screen-reader": "pass",
|
|
177
|
+
"ai-visual": "pass",
|
|
178
|
+
"human": "pending"
|
|
179
|
+
},
|
|
180
|
+
"notScored": [
|
|
181
|
+
"ai-visual",
|
|
182
|
+
"human"
|
|
183
|
+
],
|
|
184
|
+
"changed": "2026-10-12"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
"figma": {
|
|
189
|
+
"childProps": {"options": [{"component": "RadioButton", "property": "label", "note": "each option's label"}]},
|
|
190
|
+
"states": ["default"],
|
|
191
|
+
"properties": [
|
|
192
|
+
{ "name": "options", "type": "VARIANT", "values": ["2", "3", "4", "5", "6", "7"], "codeProp": "options", "description": "How many options the group draws (list-count, owner's rule 2026-10-21) — code draws one RadioButton per entry in options." },
|
|
193
|
+
{ "name": "orientation", "type": "VARIANT", "values": ["vertical", "horizontal"], "codeProp": "orientation" },
|
|
194
|
+
{ "name": "label", "type": "TEXT", "codeProp": "label", "description": "The legend." },
|
|
195
|
+
{
|
|
196
|
+
"name": "required",
|
|
197
|
+
"type": "BOOLEAN",
|
|
198
|
+
"codeProp": "required",
|
|
199
|
+
"description": "Shows the danger * (radio-required) after the legend, 2px apart; text/disabled when disabled."
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "description.",
|
|
203
|
+
"type": "BOOLEAN",
|
|
204
|
+
"codeProp": "description",
|
|
205
|
+
"description": "Show/hide part: indented 24px (16px circle + 8px) to line up with the option text."
|
|
206
|
+
},
|
|
207
|
+
{ "name": "description", "type": "TEXT", "codeProp": "description" },
|
|
208
|
+
{
|
|
209
|
+
"name": "errorMessage.",
|
|
210
|
+
"type": "BOOLEAN",
|
|
211
|
+
"codeProp": "errorMessage",
|
|
212
|
+
"description": "Show/hide part: same indent; code shows it instead of the description."
|
|
213
|
+
},
|
|
214
|
+
{ "name": "errorMessage", "type": "TEXT", "codeProp": "errorMessage" }
|
|
215
|
+
],
|
|
216
|
+
"structure": "radio-group (8px gap) > radio-legend (text + radio-required), radio-options (12px gap, real RadioButton instances: Free, Pro checked, Team, Enterprise, Education, Nonprofit, Custom), radio-description, radio-error. options = how many RadioButton instances it draws (2–7); value has no Figma property.",
|
|
217
|
+
"variantCombinations": "36 variants (2026-10-21): options 2–7 (list-count — how many RadioButton instances the group draws, each with its own example label) × the 6 of 2026-10-20: orientation vertical/horizontal × invalid false/true, plus disabled for each orientation (valid) — the standard rule for disabled. No state axis: hover/focus live on each RadioButton option (pattern group). invalid/disabled pass down to every option; disabled dims legend, required * and description (text/disabled).",
|
|
218
|
+
"stories": {
|
|
219
|
+
"Default": "default",
|
|
220
|
+
"Horizontal": "orientation=horizontal",
|
|
221
|
+
"Invalid": "invalid=true, errorMessage.=true",
|
|
222
|
+
"Disabled": "disabled=true",
|
|
223
|
+
"WithDisabledOption": "layout",
|
|
224
|
+
"Required": "required=true",
|
|
225
|
+
"KeyboardNavigation": {"figma": "layout", "reason": "keyboard focus is drawn on the RadioButton inside it (state=focus)"}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|