@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,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "Chart",
|
|
4
|
+
"version": "1.2.0",
|
|
5
|
+
"status": "beta",
|
|
6
|
+
"purpose": "Visualizes a metric with a token-branded, accessible chart so people can understand trends, comparisons, composition, or events.",
|
|
7
|
+
"import": "import { Chart } from '@helixds/react';",
|
|
8
|
+
"neverUseFor": ["Raw ECharts options or a product-specific chart renderer", "Precise audit values without an accompanying Table", "More than six donut categories"],
|
|
9
|
+
|
|
10
|
+
"rationale": "Chart wraps the charting engine behind a token-branded API (ADR-021) so series colors, axes and typography come from --helix-* tokens rather than raw library options, and every chart ships with a labelled data table for 1.1.1 Non-text Content. Consumers describe the metric; Helix owns the rendering, palette and accessibility. The palette is all blue: series 1 is the primary Button's blue and every next series is a blue far from the one before it, never a near tone, and every series meets 3:1 on the page with no outline — dark blues alternate in light mode, light blues in dark mode (ADR-021 amendment). Stacked segments and donut slices are split by a page-colored gap. Charts draw in on load — lines sweep over semantic.duration.draw with each point appearing as the line reaches it, bars and series follow semantic.duration.stagger apart, eased with semantic.easing.gentle — and render finished under prefers-reduced-motion. The area fill fades from component.chart.area-opacity to transparent. A donut whose categories stay the same but whose values change does not draw in again: each slice eases to its new angle over component.chart.duration-update with component.chart.easing-update, the gaps between slices staying even (transitions.dev donut chart).",
|
|
11
|
+
|
|
12
|
+
"governance": {
|
|
13
|
+
"mayExtendLocally": [
|
|
14
|
+
"Choose the chart type and data series from the documented props",
|
|
15
|
+
"Pair a Chart with a Table for precise audit values",
|
|
16
|
+
"Compose Charts inside Cards to build dashboards"
|
|
17
|
+
],
|
|
18
|
+
"mustEscalateToDS": [
|
|
19
|
+
"Passing raw engine options or a product-specific renderer",
|
|
20
|
+
"Adding new chart types or series colors outside the token palette",
|
|
21
|
+
"Removing the accessible data table"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"states": { "intrinsic": [], "authored": [] },
|
|
25
|
+
"anatomy": [{ "part": "chart-root", "element": "div", "description": "Token-branded chart container." }, { "part": "chart-canvas", "element": "div", "description": "Apache ECharts canvas with accessible name." }, { "part": "chart-legend", "element": "div", "description": "Legend below the canvas. With two or more entries it is a group of toggle buttons." }, { "part": "chart-legend-item", "element": "button | span", "description": "One series (or donut category): a ghost-style toggle button with aria-pressed when there are several, a static label when there is one." }, { "part": "chart-legend-swatch", "element": "span", "description": "Square series-color swatch — unchanged while the series is hidden; only the item's text turns gray." }, { "part": "chart-data", "element": "div > table", "description": "Visually hidden source-data table for non-visual access — hidden on a wrapper div (a table ignores height/overflow). Missing values read \"No data\", never 0." }],
|
|
26
|
+
"props": [{ "name": "variant", "type": "'line' | 'area' | 'bar' | 'stacked-bar' | 'donut' | 'timeline'", "required": true, "description": "Metric relationship to visualize." }, { "name": "categories", "type": "string[]", "required": true, "description": "Ordered labels." }, { "name": "series", "type": "ChartSeries[]", "required": true, "description": "Named numeric series." }, { "name": "label", "type": "string", "required": true, "description": "Accessible chart name." }, { "name": "description", "type": "string | undefined", "description": "Optional accessible takeaway." }, { "name": "height", "type": "number | undefined", "description": "Chart drawing height." },
|
|
27
|
+
{ "name": "className", "type": "string | undefined", "description": "Additional className for the root element." }],
|
|
28
|
+
"figma": {
|
|
29
|
+
"listCount": { "categories": { "min": 2, "max": 12 }, "series": { "min": 1, "max": 6 } },
|
|
30
|
+
"propertyMap": {
|
|
31
|
+
"label": { "codeType": "string", "figma": [], "approved": "2026-10-21", "reason": "the chart's accessible name — aria-label of the canvas and the caption of the hidden data table, never drawn; the visible legend texts are each series' name (series → ChartLegendItem label)" }
|
|
32
|
+
},
|
|
33
|
+
"childProps": {"hover": [{"component": "ChartTooltip", "property": null, "note": "state=hover: the box and its line — placement., series and line. live on the child"}], "categories": [{"component": "ChartLegendItem", "property": "label", "note": "donut only: each slice's name, in the legend (the other types draw categories as the axis labels)"}], "series": [{"component": "ChartLegendItem", "property": "label", "note": "each series' name, in the legend (not on the donut)"}]},
|
|
34
|
+
"hover": "Exception (owner's decision 2026-10-21): code shows ECharts' hover only while the pointer is over the chart, but it's part of how the chart looks, so Figma draws it — state=hover, one per variant at its story's sample counts. chart-pointer (absolute over the plot, left padding bound to a spacing variable — change it to move the line along the axis) holds an exposed instance of the child ChartTooltip: placement. (top / right / bottom / left — where the box sits from the line), series (1–6 rows) and line. (off on the donut) live on that child, not on Chart, so Chart doesn't multiply its variants. The box: fill/page, 1px border/neutral, radius/l, spacing/s padding, shadow / s; the line dashed 1px border/neutral — the same tokens code sets on ECharts' tooltip and axisPointer (Chart.tsx). At rest Chart draws every count: categories 2–12 × series 1–6 (donut: slices 2–12), with deterministic sample data.",
|
|
35
|
+
"states": ["default", "hover", "press", "focus"],
|
|
36
|
+
"properties": [
|
|
37
|
+
{ "name": "variant", "type": "VARIANT", "values": ["line", "area", "bar", "stacked-bar", "donut", "timeline"], "codeProp": "variant", "description": "One Chart variant per type, each drawn with the matching story's sample data (Line, Area, Bar, Stacked Bar, Donut, Timeline). The canvas is a static drawing of what ECharts renders: series in chart/series/1…6, axis and split lines border/neutral, axis labels Body / s / Regular text/neutral/light; stacked segments and donut slices separated by a fill/page gap. The area fill is the series color at the area-opacity (15%) as layer opacity — Figma can't bind a variable to a gradient stop, so the fade to transparent isn't drawn." },
|
|
38
|
+
{ "name": "state", "type": "VARIANT", "values": ["default", "hover", "press", "focus"], "figmaOnly": true, "description": "On ChartLegendItem (the legend toggle): hover/press are CSS pseudo-classes in code (fill/secondary/interactive/default and /hover, text/neutral); focus is the global focus ring." },
|
|
39
|
+
{ "name": "pressed", "type": "VARIANT", "values": ["true", "false"], "codeProp": "aria-pressed (series shown/hidden)", "description": "On ChartLegendItem: a hidden series (aria-pressed false) keeps its swatch and turns its name text/disabled. A VARIANT, not a BOOLEAN — it changes a color, not a part's visibility." },
|
|
40
|
+
{ "name": "label", "type": "TEXT", "codeProp": "series[].name", "description": "On ChartLegendItem: the series (or donut category) name." }
|
|
41
|
+
],
|
|
42
|
+
"structure": "Chart = chart-root (vertical, 560 wide like the stories, 8px to the legend = spacing/xs) > chart-canvas (280 high = the height prop's default) + chart-legend (wrapping row, centered, 4px apart = spacing/2xs) of ChartLegendItem instances. ChartLegendItem = 4/8 padding (spacing/2xs, spacing/xs), 8px gap, radius/m, a 1px border that is always transparent (hidden stroke, border-always), a 12px swatch (spacing/s, radius/xs) in the series' chart/series/N — overridden per instance — and the name in Body / s / Regular. The data table (chart-data) is visually hidden in code and not drawn.",
|
|
43
|
+
"stories": {
|
|
44
|
+
"Default": "variant=line",
|
|
45
|
+
"Line": "variant=line",
|
|
46
|
+
"Area": "variant=area",
|
|
47
|
+
"Bar": "variant=bar",
|
|
48
|
+
"LegendToggle": {"figma": null, "reason": "click on a legend item hides its series — behaviour test", "approved": "2026-10-21"},
|
|
49
|
+
"SingleSeriesLegend": "variant=area",
|
|
50
|
+
"StackedBar": "variant=stacked-bar",
|
|
51
|
+
"Donut": "variant=donut",
|
|
52
|
+
"Timeline": "variant=timeline"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
"tokenPolicy": { "allowed": ["color.fill", "color.text", "color.border", "spacing", "radius", "shadow", "textStyle"], "forbidden": ["primitive.color"] },
|
|
57
|
+
"a11y": {
|
|
58
|
+
"role": "img with labelled data table; legend entries are toggle buttons (aria-pressed) when there are several", "keyboardNav": ["Tab — moves focus through the legend's toggle buttons", "Space/Enter — shows or hides the focused series"], "wcag": ["1.1.1 Non-text Content", "1.4.1 Use of Color", "1.4.3 Contrast (AA)", "2.1.1 Keyboard", "4.1.2 Name Role Value"],
|
|
59
|
+
"applied": {
|
|
60
|
+
"nativeElement": "div",
|
|
61
|
+
"focus": [
|
|
62
|
+
{
|
|
63
|
+
"part": "(any focusable element)",
|
|
64
|
+
"when": ":focus-visible",
|
|
65
|
+
"inherited": "global rule",
|
|
66
|
+
"outline": "2px solid var(--helix-color-border-focus)",
|
|
67
|
+
"outline-offset": "2px"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"aria": {
|
|
71
|
+
"chart-canvas": {
|
|
72
|
+
"role": [
|
|
73
|
+
"img"
|
|
74
|
+
],
|
|
75
|
+
"aria-label": [
|
|
76
|
+
"Storage used. Storage use rose every month.",
|
|
77
|
+
"Revenue by month. May was the strongest month.",
|
|
78
|
+
"Monthly active users. Active users grew steadily through the",
|
|
79
|
+
"Traffic by source. Search brings in about half of all visits"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"chart-legend-swatch": {
|
|
83
|
+
"aria-hidden": [
|
|
84
|
+
"true"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"chart-legend": {
|
|
88
|
+
"role": [
|
|
89
|
+
"group"
|
|
90
|
+
],
|
|
91
|
+
"aria-label": [
|
|
92
|
+
"Revenue by month — show or hide series",
|
|
93
|
+
"Traffic by source — show or hide series",
|
|
94
|
+
"Tickets by priority — show or hide series"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"chart-legend-item": {
|
|
98
|
+
"aria-pressed": [
|
|
99
|
+
"true"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"announced": [
|
|
104
|
+
"img \"Storage used. Storage use rose every month.\"",
|
|
105
|
+
"img \"Revenue by month. May was the strongest month.\"",
|
|
106
|
+
"img \"Monthly active users. Active users grew steadily through the first half of the year.\"",
|
|
107
|
+
"img \"Traffic by source. Search brings in about half of all visits.\"",
|
|
108
|
+
"img \"Tickets by priority. Low-priority tickets make up most of the volume.\""
|
|
109
|
+
],
|
|
110
|
+
"contrast": {
|
|
111
|
+
"chart-legend-item (area)": {
|
|
112
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
113
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
114
|
+
},
|
|
115
|
+
"chart-legend-item (bar)": {
|
|
116
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
117
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
118
|
+
},
|
|
119
|
+
"chart-legend-item (line)": {
|
|
120
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
121
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
122
|
+
},
|
|
123
|
+
"chart-legend-item (donut)": {
|
|
124
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
125
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
126
|
+
},
|
|
127
|
+
"chart-legend-item (stacked-bar)": {
|
|
128
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
129
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
130
|
+
},
|
|
131
|
+
"chart-legend-item (timeline)": {
|
|
132
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
133
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"targetSize": {
|
|
137
|
+
"chart-legend-item": "smallest 62×28 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-13"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "Checkbox",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
"purpose": "Lets users select one or more independent options from a set, or confirm a single binary choice.",
|
|
7
|
+
"import": "import { Checkbox } from '@helixds/react';",
|
|
8
|
+
"neverUseFor": [
|
|
9
|
+
"Multiple mutually exclusive choices — use RadioGroup instead",
|
|
10
|
+
"A single on/off setting applied immediately — use Switch instead",
|
|
11
|
+
"Triggering an action — use Button instead"
|
|
12
|
+
],
|
|
13
|
+
"rationale": "Checkbox wraps a native <input type='checkbox'> so Space-to-toggle, focus and the checked state come from the browser. It deliberately has one fixed 16px control and no size prop — it does not follow the ADR-004 field scale, because a selection mark doesn't need density variants and a single size keeps forms visually consistent.",
|
|
14
|
+
"governance": {
|
|
15
|
+
"mayExtendLocally": [
|
|
16
|
+
"Write the label and helper text per usage",
|
|
17
|
+
"Control the checked/indeterminate state from product logic"
|
|
18
|
+
],
|
|
19
|
+
"mustEscalateToDS": [
|
|
20
|
+
"Adding a size prop or new control sizes",
|
|
21
|
+
"Replacing the native input with a styled div",
|
|
22
|
+
"Changing the checkmark, border or fill tokens"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"states": {
|
|
26
|
+
"intrinsic": [
|
|
27
|
+
"hover",
|
|
28
|
+
"focus",
|
|
29
|
+
"active"
|
|
30
|
+
],
|
|
31
|
+
"authored": [
|
|
32
|
+
{
|
|
33
|
+
"name": "disabled",
|
|
34
|
+
"description": "The checkbox is non-interactive.",
|
|
35
|
+
"aria": "disabled (native HTML attribute)"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "invalid",
|
|
39
|
+
"description": "The checkbox value fails validation.",
|
|
40
|
+
"aria": "aria-invalid='true'"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "required",
|
|
44
|
+
"description": "The checkbox must be checked before form submission.",
|
|
45
|
+
"aria": "aria-required='true'"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "indeterminate",
|
|
49
|
+
"description": "Mixed state — neither fully checked nor unchecked (e.g. a 'select all' controlling a partial selection).",
|
|
50
|
+
"aria": "indeterminate is a native DOM property, not an HTML attribute — set imperatively via ref"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"anatomy": [
|
|
55
|
+
{
|
|
56
|
+
"part": "checkbox-root",
|
|
57
|
+
"element": "div",
|
|
58
|
+
"description": "Layout wrapper for the control, label, and messages."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"part": "checkbox-label",
|
|
62
|
+
"element": "label",
|
|
63
|
+
"description": "Wraps the native input, visual control, and text."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"part": "checkbox-input",
|
|
67
|
+
"element": "input",
|
|
68
|
+
"description": "The native checkbox input. Visually styled via sibling selector, not hidden."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"part": "checkbox-control",
|
|
72
|
+
"element": "span",
|
|
73
|
+
"description": "Visual box — reflects checked/indeterminate state via CSS.",
|
|
74
|
+
"optional": false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"part": "checkbox-indicator",
|
|
78
|
+
"element": "slot",
|
|
79
|
+
"description": "Check or minus icon inside the control."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"part": "checkbox-text",
|
|
83
|
+
"element": "span",
|
|
84
|
+
"description": "Visible label text. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"part": "checkbox-required",
|
|
88
|
+
"element": "span",
|
|
89
|
+
"optional": true,
|
|
90
|
+
"description": "The required indicator (*), text/danger, 2px (spacing/3xs) after the label — shown by `required`. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"part": "checkbox-description",
|
|
94
|
+
"element": "span",
|
|
95
|
+
"description": "Helper text below the control. Sits exactly 8px below it — 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).",
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"part": "checkbox-error",
|
|
100
|
+
"element": "span",
|
|
101
|
+
"description": "Error text shown when invalid=true.",
|
|
102
|
+
"optional": true
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"props": [
|
|
106
|
+
{
|
|
107
|
+
"name": "label",
|
|
108
|
+
"type": "string",
|
|
109
|
+
"required": true,
|
|
110
|
+
"description": "Visible label text."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "description",
|
|
114
|
+
"type": "string | undefined",
|
|
115
|
+
"description": "Helper text shown below the control."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "errorMessage",
|
|
119
|
+
"type": "string | undefined",
|
|
120
|
+
"description": "Error text shown when invalid=true."
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "checked",
|
|
124
|
+
"type": "boolean | undefined",
|
|
125
|
+
"description": "Controlled checked state."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "defaultChecked",
|
|
129
|
+
"type": "boolean | undefined",
|
|
130
|
+
"description": "Uncontrolled initial checked state."
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "onChange",
|
|
134
|
+
"type": "((checked: boolean) => void) | undefined",
|
|
135
|
+
"description": "Checked-state change handler."
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "disabled",
|
|
139
|
+
"type": "boolean",
|
|
140
|
+
"default": false,
|
|
141
|
+
"description": "Non-interactive state."
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "required",
|
|
145
|
+
"type": "boolean",
|
|
146
|
+
"default": false,
|
|
147
|
+
"description": "Marks the field as required."
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "invalid",
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"default": false,
|
|
153
|
+
"description": "Shows error styling and message."
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "indeterminate",
|
|
157
|
+
"type": "boolean",
|
|
158
|
+
"default": false,
|
|
159
|
+
"description": "Renders the mixed/indeterminate visual state."
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "id",
|
|
163
|
+
"type": "string | undefined",
|
|
164
|
+
"description": "Optional id override."
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "name",
|
|
168
|
+
"type": "string | undefined",
|
|
169
|
+
"description": "Native form field name."
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "value",
|
|
173
|
+
"type": "string | undefined",
|
|
174
|
+
"description": "Native form field value."
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"sizing": {
|
|
178
|
+
"height": {
|
|
179
|
+
"mode": "fixed",
|
|
180
|
+
"values": {
|
|
181
|
+
"default": 16
|
|
182
|
+
},
|
|
183
|
+
"unit": "px",
|
|
184
|
+
"note": "No size prop exists — Checkbox has one fixed control size (--helix-checkbox-size, 16px). Unlike Input/Select/Textarea, it does not follow the ADR-004 field scale."
|
|
185
|
+
},
|
|
186
|
+
"width": {
|
|
187
|
+
"default": "hug"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"tokenPolicy": {
|
|
191
|
+
"allowed": [
|
|
192
|
+
"color.fill",
|
|
193
|
+
"color.text",
|
|
194
|
+
"color.border",
|
|
195
|
+
"spacing",
|
|
196
|
+
"radius",
|
|
197
|
+
"fontSize"
|
|
198
|
+
],
|
|
199
|
+
"forbidden": [
|
|
200
|
+
"primitive.color"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"a11y": {
|
|
204
|
+
"role": "checkbox (native input)",
|
|
205
|
+
"keyboardNav": [
|
|
206
|
+
"Space — toggles checked state",
|
|
207
|
+
"Tab — moves focus"
|
|
208
|
+
],
|
|
209
|
+
"wcag": [
|
|
210
|
+
"2.1.1 Keyboard",
|
|
211
|
+
"2.4.7 Focus Visible",
|
|
212
|
+
"4.1.2 Name Role Value"
|
|
213
|
+
],
|
|
214
|
+
"applied": {
|
|
215
|
+
"nativeElement": "div",
|
|
216
|
+
"focus": [
|
|
217
|
+
{
|
|
218
|
+
"part": "checkbox-input",
|
|
219
|
+
"when": ":focus-visible",
|
|
220
|
+
"outline": "2px solid var(--helix-checkbox-border-focus)",
|
|
221
|
+
"outline-offset": "2px"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"aria": {
|
|
225
|
+
"checkbox-control": {
|
|
226
|
+
"aria-hidden": [
|
|
227
|
+
"true"
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
"checkbox-input": {
|
|
231
|
+
"aria-invalid": [
|
|
232
|
+
"true"
|
|
233
|
+
],
|
|
234
|
+
"aria-describedby": [
|
|
235
|
+
"(id)"
|
|
236
|
+
],
|
|
237
|
+
"aria-required": [
|
|
238
|
+
"true"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"checkbox-error": {
|
|
242
|
+
"role": [
|
|
243
|
+
"alert"
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
"checkbox-required": {
|
|
247
|
+
"aria-hidden": [
|
|
248
|
+
"true"
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"announced": [
|
|
253
|
+
"checkbox \"Default\"",
|
|
254
|
+
"checkbox \"Checked\" [checked]",
|
|
255
|
+
"checkbox \"Indeterminate\" [checked=mixed]",
|
|
256
|
+
"checkbox \"Disabled unchecked\" [disabled]",
|
|
257
|
+
"checkbox \"Disabled checked\" [checked] [disabled]"
|
|
258
|
+
],
|
|
259
|
+
"contrast": {
|
|
260
|
+
"checkbox-text": {
|
|
261
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
262
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
263
|
+
},
|
|
264
|
+
"checkbox-error": {
|
|
265
|
+
"light": "6.47:1 — #b91c1c on #ffffff",
|
|
266
|
+
"dark": "12.65:1 — #fecdd3 on #0f172a"
|
|
267
|
+
},
|
|
268
|
+
"checkbox-description": {
|
|
269
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
270
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"targetSize": {
|
|
274
|
+
"checkbox-input": "smallest 71×21 px"
|
|
275
|
+
},
|
|
276
|
+
"motion": [
|
|
277
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
"results": {
|
|
281
|
+
"score": 100,
|
|
282
|
+
"meetsMinimum": true,
|
|
283
|
+
"checks": {
|
|
284
|
+
"contract": "pass",
|
|
285
|
+
"keys": "pass",
|
|
286
|
+
"focus-return": "n/a",
|
|
287
|
+
"keyboard": "pass",
|
|
288
|
+
"axe": "pass",
|
|
289
|
+
"contrast": "pass",
|
|
290
|
+
"focus-visible": "pass",
|
|
291
|
+
"target-size": "pass",
|
|
292
|
+
"reflow": "n/a",
|
|
293
|
+
"screen-reader": "pass",
|
|
294
|
+
"ai-visual": "pass",
|
|
295
|
+
"human": "pending"
|
|
296
|
+
},
|
|
297
|
+
"notScored": [
|
|
298
|
+
"ai-visual",
|
|
299
|
+
"human"
|
|
300
|
+
],
|
|
301
|
+
"changed": "2026-10-12"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"figma": {
|
|
305
|
+
"states": ["default", "hover", "focus"],
|
|
306
|
+
"properties": [
|
|
307
|
+
{
|
|
308
|
+
"name": "state",
|
|
309
|
+
"type": "VARIANT",
|
|
310
|
+
"values": ["default", "hover", "focus"],
|
|
311
|
+
"figmaOnly": true,
|
|
312
|
+
"description": "Figma-only axis: hover/focus are CSS pseudo-classes in code. invalid, disabled, checked and indeterminate are their own false/true toggles (contracts/figma-conversion.json, pattern checkable)."
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"name": "indeterminate",
|
|
316
|
+
"type": "VARIANT",
|
|
317
|
+
"values": ["false", "true"],
|
|
318
|
+
"codeProp": "indeterminate",
|
|
319
|
+
"description": "Shown when checked is false or true alike in code; the mark is a minus and the box fills like checked."
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"variantCombinations": "21 variants, only the ones code can show (owner-approved 2026-10-20). Enabled: mark (unchecked = checked false + indeterminate false · checked = checked true + indeterminate false · indeterminate = checked false + indeterminate true) × invalid false/true × state default/hover/focus = 18. Disabled: the 3 marks with invalid false and state default = 3 — a disabled checkbox takes no hover or focus, and disabled overrides invalid. checked + indeterminate together is not drawn: indeterminate wins in code, it would duplicate the indeterminate variant. Disabled dims the label, the required * and the description (text/disabled).",
|
|
323
|
+
"stories": {
|
|
324
|
+
"AllTypes": "layout",
|
|
325
|
+
"WithDescription": "description.=true",
|
|
326
|
+
"Invalid": "invalid=true, errorMessage.=true",
|
|
327
|
+
"Disabled": "disabled=true",
|
|
328
|
+
"Group": "layout",
|
|
329
|
+
"Required": "required=true",
|
|
330
|
+
"KeyboardToggle": {"figma": "state=focus", "reason": "keyboard focus — the focus ring is drawn in Figma (owner 2026-10-21: focus states are drawn)"}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|