@helixds/react 0.0.0-stage → 0.2.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 +295 -0
- package/LICENSE +21 -0
- package/README.md +49 -2
- package/dist/archetypes/actions-navigation.md +62 -0
- package/dist/archetypes/data-display.md +68 -0
- package/dist/archetypes/feedback-status.md +54 -0
- package/dist/archetypes/form-selection.md +61 -0
- package/dist/archetypes/foundation.md +56 -0
- package/dist/archetypes/layout.md +53 -0
- package/dist/archetypes/overlays.md +54 -0
- package/dist/archetypes/text-input.md +58 -0
- 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/Combobox/Combobox.d.ts +17 -0
- package/dist/components/Combobox/Combobox.doc.d.ts +4 -0
- package/dist/components/Combobox/Combobox.doc.js +41 -0
- package/dist/components/Combobox/Combobox.js +141 -0
- package/dist/components/Combobox/Combobox.types.d.ts +31 -0
- package/dist/components/Combobox/Combobox.types.js +2 -0
- package/dist/components/Combobox/index.d.ts +9 -0
- package/dist/components/Combobox/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/Popover/Popover.d.ts +14 -0
- package/dist/components/Popover/Popover.doc.d.ts +4 -0
- package/dist/components/Popover/Popover.doc.js +47 -0
- package/dist/components/Popover/Popover.js +157 -0
- package/dist/components/Popover/Popover.types.d.ts +27 -0
- package/dist/components/Popover/Popover.types.js +2 -0
- package/dist/components/Popover/index.d.ts +9 -0
- package/dist/components/Popover/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/Tabs/Tabs.d.ts +13 -0
- package/dist/components/Tabs/Tabs.doc.d.ts +4 -0
- package/dist/components/Tabs/Tabs.doc.js +47 -0
- package/dist/components/Tabs/Tabs.js +61 -0
- package/dist/components/Tabs/Tabs.types.d.ts +33 -0
- package/dist/components/Tabs/Tabs.types.js +2 -0
- package/dist/components/Tabs/index.d.ts +9 -0
- package/dist/components/Tabs/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 +175 -0
- package/dist/contracts/AppShell.json +201 -0
- package/dist/contracts/Avatar.json +158 -0
- package/dist/contracts/AvatarGroup.json +170 -0
- package/dist/contracts/Badge.json +213 -0
- package/dist/contracts/Button.json +296 -0
- package/dist/contracts/Card.json +126 -0
- package/dist/contracts/Chart.json +168 -0
- package/dist/contracts/Checkbox.json +334 -0
- package/dist/contracts/CheckboxGroup.json +201 -0
- package/dist/contracts/Chip.json +321 -0
- package/dist/contracts/ChipGroup.json +183 -0
- package/dist/contracts/Combobox.json +431 -0
- package/dist/contracts/FAB.json +216 -0
- package/dist/contracts/Icon.json +307 -0
- package/dist/contracts/IconButton.json +214 -0
- package/dist/contracts/Input.json +401 -0
- package/dist/contracts/Menu.json +198 -0
- package/dist/contracts/Modal.json +193 -0
- package/dist/contracts/MultiSelect.json +245 -0
- package/dist/contracts/NavItem.json +149 -0
- package/dist/contracts/PageHeader.json +135 -0
- package/dist/contracts/Popover.json +322 -0
- package/dist/contracts/RadioButton.json +203 -0
- package/dist/contracts/RadioGroup.json +229 -0
- package/dist/contracts/SegmentedControl.json +194 -0
- package/dist/contracts/Select.json +241 -0
- package/dist/contracts/SideNav.json +139 -0
- package/dist/contracts/SidePanel.json +154 -0
- package/dist/contracts/Switch.json +202 -0
- package/dist/contracts/Table.json +131 -0
- package/dist/contracts/Tabs.json +353 -0
- package/dist/contracts/Textarea.json +354 -0
- package/dist/contracts/Toast.json +187 -0
- package/dist/contracts/Tooltip.json +169 -0
- package/dist/contracts/TopBar.json +129 -0
- package/dist/contracts/manifest.json +2170 -0
- package/dist/index.d.ts +118 -0
- package/dist/index.js +79 -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 +32 -0
- package/dist/layout/AppShell/AppShell.js +116 -0
- package/dist/layout/AppShell/AppShell.types.d.ts +24 -0
- package/dist/layout/AppShell/AppShell.types.js +2 -0
- package/dist/layout/AppShell/AppShellContext.d.ts +17 -0
- package/dist/layout/AppShell/AppShellContext.js +4 -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 +33 -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 +15 -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 +98 -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 +92 -3
- package/src/globals.css +3511 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "Select",
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"status": "beta",
|
|
6
|
+
|
|
7
|
+
"purpose": "Lets users choose a single value from a predefined list.",
|
|
8
|
+
"import": "import { Select } from '@helixds/react';",
|
|
9
|
+
"archetype": "form-selection",
|
|
10
|
+
|
|
11
|
+
"neverUseFor": [
|
|
12
|
+
"Free-form text entry - use Input instead",
|
|
13
|
+
"Multiple simultaneous selections - use MultiSelect or CheckboxGroup"
|
|
14
|
+
],
|
|
15
|
+
|
|
16
|
+
"rationale": "Select is a select-only combobox on a <button> plus Menu's listbox instead of a native <select>, so the popup can be styled with tokens; see Menu's contract for the popup itself. The trigger keeps real DOM focus and points at the highlighted option with aria-activedescendant. Moving off the native element gives up the OS mobile picker and native form handling, so form participation goes through an invisible native input carrying name and the value. It's a real text input, not type=\"hidden\" or readOnly, because those are excluded from constraint validation, so required blocks submit like a native <select>, and focus is handed back to the trigger when the browser reports the error. It has one fixed 32px height (semantic.size.m) on purpose, so the trigger and its 32px Menu rows read as one aligned scale.",
|
|
17
|
+
|
|
18
|
+
"governance": {
|
|
19
|
+
"mayExtendLocally": [
|
|
20
|
+
"Provide the options, label, placeholder and helper text",
|
|
21
|
+
"Control the value and validation from product logic"
|
|
22
|
+
],
|
|
23
|
+
"mustEscalateToDS": [
|
|
24
|
+
"Adding a size prop or new heights",
|
|
25
|
+
"Adding search or multi-select (use MultiSelect for several values)",
|
|
26
|
+
"Replacing the combobox/listbox keyboard model"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"states": {
|
|
31
|
+
"intrinsic": ["hover", "focus"],
|
|
32
|
+
"authored": [
|
|
33
|
+
{ "name": "invalid", "description": "The selected value fails validation.", "aria": "aria-invalid='true'" },
|
|
34
|
+
{ "name": "disabled", "description": "The field is non-interactive.", "aria": "disabled (native)" },
|
|
35
|
+
{ "name": "required", "description": "The field must have a value before form submission.", "aria": "aria-required='true' on the trigger. Enforced natively: an invisible real text input (select-native, not type=\"hidden\" and not readOnly) carries `required`, so the browser blocks submit while it's empty, same as a native <select>; when the browser focuses it to report the error, focus goes to the trigger — see rationale." },
|
|
36
|
+
{ "name": "open", "description": "The popup listbox is showing.", "aria": "aria-expanded='true'/'false' on the trigger button" }
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
"anatomy": [
|
|
41
|
+
{ "part": "select-root", "element": "div", "description": "Layout wrapper for label, field, and messages." },
|
|
42
|
+
{ "part": "select-label", "element": "label", "description": "Accessible label. Always rendered - visible or sr-only. Sits exactly 8px above the trigger — 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)." },
|
|
43
|
+
{ "part": "select-required", "element": "span", "optional": true, "description": "The required indicator (*) inside the label, the label color, 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)." },
|
|
44
|
+
{ "part": "select-wrapper", "element": "div", "description": "Positions the trigger button and chevron." },
|
|
45
|
+
{ "part": "select-trigger", "element": "button", "description": "The visible control. Real DOM focus stays here at all times — see Menu's contract rationale. `role` is implicit (button); `aria-haspopup=\"listbox\"`, `aria-expanded`, `aria-controls`, `aria-activedescendant` wire it to the portaled Menu." },
|
|
46
|
+
{ "part": "select-trigger-label", "element": "span", "description": "Wraps the trigger's own displayed text (selected option's label, or placeholder). Truncates with an ellipsis at a fixed/narrow consumer-set width instead of overflowing or forcing the trigger to grow — matches a native <select>'s own behavior." },
|
|
47
|
+
{ "part": "select-chevron", "element": "slot", "description": "Trailing chevron icon. Flips via `aria-expanded` on the trigger, same scaleY treatment as Accordion's chevron (.ai/maps/patterns/expand-collapse-chevron.md) — now real, not the earlier documented exception, since the trigger's own React state knows whether it's open.", "optional": true },
|
|
48
|
+
{ "part": "select-description", "element": "span", "description": "Helper text below the field. 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).", "optional": true },
|
|
49
|
+
{ "part": "select-error", "element": "span", "description": "Error text shown when invalid=true.", "optional": true }
|
|
50
|
+
],
|
|
51
|
+
|
|
52
|
+
"props": [
|
|
53
|
+
{ "name": "label", "type": "string", "required": true, "description": "Visible or screen-reader-only label. Required for a11y." },
|
|
54
|
+
{ "name": "options", "type": "(SelectOption | SelectOptionGroup)[]", "required": true, "description": "List of options and grouped options. Each option: { value, label, labelEnd?, disabled? } — labelEnd is short secondary text (a value, count or percentage) shown at the end of the option in the list; the trigger shows only the label." },
|
|
55
|
+
{ "name": "value", "type": "string | undefined", "description": "Controlled selected value." },
|
|
56
|
+
{ "name": "defaultValue", "type": "string | undefined", "description": "Uncontrolled initial value." },
|
|
57
|
+
{ "name": "onChange", "type": "(value: string) => void | undefined", "description": "Value change handler." },
|
|
58
|
+
{ "name": "placeholder", "type": "string | undefined", "description": "Placeholder option shown before a selection." },
|
|
59
|
+
{ "name": "description", "type": "string | undefined", "description": "Helper text shown below the field." },
|
|
60
|
+
{ "name": "errorMessage", "type": "string | undefined", "description": "Error text shown when invalid=true." },
|
|
61
|
+
{ "name": "invalid", "type": "boolean", "default": false, "description": "Shows error styling and message." },
|
|
62
|
+
{ "name": "disabled", "type": "boolean", "default": false, "description": "Non-interactive state." },
|
|
63
|
+
{ "name": "required", "type": "boolean", "default": false, "description": "Marks field as required. Enforced natively: an invisible form input carries the value, so an empty required Select blocks form submit exactly like a native <select> (the browser's validation message points at the field and focus lands on the trigger)." },
|
|
64
|
+
{ "name": "fullWidth", "type": "boolean", "default": false, "description": "Expands to container width." },
|
|
65
|
+
{ "name": "hideLabel", "type": "boolean", "default": false, "description": "Hides the label visually but keeps it accessible." },
|
|
66
|
+
{ "name": "id", "type": "string | undefined", "description": "Optional field id override." },
|
|
67
|
+
{ "name": "name", "type": "string | undefined", "description": "Native form field name." },
|
|
68
|
+
{ "name": "className", "type": "string | undefined", "description": "Additional className for the root. Use it to set a min-width so the trigger doesn't visibly resize when a shorter/longer option is selected — Select has no built-in minimum, per CLAUDE.md's min-width/max-width policy (a consumer/pattern decision, not a system token)." }
|
|
69
|
+
],
|
|
70
|
+
|
|
71
|
+
"sizing": {
|
|
72
|
+
"height": {
|
|
73
|
+
"mode": "fixed",
|
|
74
|
+
"values": { "default": 32 },
|
|
75
|
+
"unit": "px",
|
|
76
|
+
"note": "One fixed size only, deliberately — no size prop. Matches semantic.size.m, the same height Input/Textarea's own 'm' field uses, so a Select trigger and its Menu items read as one continuous, aligned scale (see Menu's contract rationale)."
|
|
77
|
+
},
|
|
78
|
+
"width": {"default": "fixed", "value": 320, "unit": "px", "modes": {"fixed": "320px — every form field shares it and never grows or shrinks with its content (owner's rule 2026-10-21, form-field pattern); max-width 100% so a narrow container can still hold it.", "fill": "fullWidth=true: 100% of the container (Figma: drawn at 600px, the field and its popup on Fill so they stretch)."}, "exceptions": "A field that must be narrower (a number stepper, a short code) says so here, with its width and why — the only way off 320px."}
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
"tokenPolicy": {
|
|
82
|
+
"allowed": ["color.fill", "color.text", "color.border", "spacing", "radius", "fontSize"],
|
|
83
|
+
"forbidden": ["primitive.color"]
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
"a11y": {
|
|
87
|
+
"role": "combobox on the <button> trigger (WAI-ARIA select-only combobox) + hand-rolled listbox popup (Menu) — see Menu's contract rationale. Not a native <select>.",
|
|
88
|
+
"keyboardNav": ["Arrow Up/Down - opens the menu, or moves the highlighted option while open", "Home/End - jump to first/last enabled option while open", "Enter/Space - open the menu, or confirm the highlighted option while open", "Escape - close without changing the selection", "Tab - move focus (closes the menu first)"],
|
|
89
|
+
"wcag": ["1.3.1 Info and Relationships", "1.4.3 Contrast (AA)", "2.1.1 Keyboard", "2.4.7 Focus Visible", "4.1.2 Name Role Value"],
|
|
90
|
+
"applied": {
|
|
91
|
+
"nativeElement": "div",
|
|
92
|
+
"innerComponents": [
|
|
93
|
+
"Menu"
|
|
94
|
+
],
|
|
95
|
+
"focus": [
|
|
96
|
+
{
|
|
97
|
+
"part": "select-wrapper",
|
|
98
|
+
"when": ":focus-visible",
|
|
99
|
+
"border-color": "var(--helix-select-border-hover)"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"part": "select-trigger",
|
|
103
|
+
"when": ":focus-visible",
|
|
104
|
+
"box-shadow": "0 0 0 3px color-mix(in srgb, var(--helix-select-border-focus) 20%, transparent)",
|
|
105
|
+
"border-color": "var(--helix-select-border-focus)"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"aria": {
|
|
109
|
+
"select-trigger": {
|
|
110
|
+
"role": [
|
|
111
|
+
"combobox"
|
|
112
|
+
],
|
|
113
|
+
"aria-haspopup": [
|
|
114
|
+
"listbox"
|
|
115
|
+
],
|
|
116
|
+
"aria-expanded": [
|
|
117
|
+
"false",
|
|
118
|
+
"true"
|
|
119
|
+
],
|
|
120
|
+
"aria-invalid": [
|
|
121
|
+
"true"
|
|
122
|
+
],
|
|
123
|
+
"aria-describedby": [
|
|
124
|
+
"(id)"
|
|
125
|
+
],
|
|
126
|
+
"aria-controls": [
|
|
127
|
+
"(id)"
|
|
128
|
+
],
|
|
129
|
+
"aria-required": [
|
|
130
|
+
"true"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"select-chevron": {
|
|
134
|
+
"aria-hidden": [
|
|
135
|
+
"true"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"select-error": {
|
|
139
|
+
"role": [
|
|
140
|
+
"alert"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"select-required": {
|
|
144
|
+
"aria-hidden": [
|
|
145
|
+
"true"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"announced": [
|
|
150
|
+
"combobox \"Role\": Choose a role…",
|
|
151
|
+
"combobox \"Role\" [disabled]: Designer",
|
|
152
|
+
"combobox \"Role\" [invalid]: Choose a role…",
|
|
153
|
+
"combobox \"Role\": Engineer",
|
|
154
|
+
"combobox \"Role\" [expanded]"
|
|
155
|
+
],
|
|
156
|
+
"contrast": {
|
|
157
|
+
"select-label": {
|
|
158
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
159
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
160
|
+
},
|
|
161
|
+
"select-trigger-label": {
|
|
162
|
+
"light": "4.75:1 — #64748b on #ffffff",
|
|
163
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
164
|
+
},
|
|
165
|
+
"select-error": {
|
|
166
|
+
"light": "6.47:1 — #b91c1c on #ffffff",
|
|
167
|
+
"dark": "12.65:1 — #fecdd3 on #0f172a"
|
|
168
|
+
},
|
|
169
|
+
"select-description": {
|
|
170
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
171
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"targetSize": {
|
|
175
|
+
"select-trigger": "smallest 60×32 px"
|
|
176
|
+
},
|
|
177
|
+
"motion": [
|
|
178
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"results": {
|
|
182
|
+
"score": 100,
|
|
183
|
+
"meetsMinimum": true,
|
|
184
|
+
"checks": {
|
|
185
|
+
"contract": "pass",
|
|
186
|
+
"keys": "pass",
|
|
187
|
+
"focus-return": "pass",
|
|
188
|
+
"keyboard": "pass",
|
|
189
|
+
"axe": "pass",
|
|
190
|
+
"contrast": "pass",
|
|
191
|
+
"focus-visible": "pass",
|
|
192
|
+
"target-size": "pass",
|
|
193
|
+
"reflow": "n/a",
|
|
194
|
+
"screen-reader": "pass",
|
|
195
|
+
"ai-visual": "pass",
|
|
196
|
+
"human": "pending"
|
|
197
|
+
},
|
|
198
|
+
"notScored": [
|
|
199
|
+
"ai-visual",
|
|
200
|
+
"human"
|
|
201
|
+
],
|
|
202
|
+
"changed": "2026-10-12"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
"figma": {
|
|
207
|
+
"states": ["default", "hover", "focus", "open"],
|
|
208
|
+
"properties": [
|
|
209
|
+
{
|
|
210
|
+
"name": "state",
|
|
211
|
+
"type": "VARIANT",
|
|
212
|
+
"values": ["default", "hover", "focus", "open"],
|
|
213
|
+
"figmaOnly": true,
|
|
214
|
+
"description": "Figma-only axis: hover/focus are CSS pseudo-classes, open is the listbox showing (aria-expanded). invalid, disabled and the secondary toggles are their own variants (contracts/figma-conversion.json, pattern form-field)."
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"propertyMap": {
|
|
218
|
+
"value": {
|
|
219
|
+
"codeType": "string | undefined",
|
|
220
|
+
"figma": [{"name": "value.", "type": "VARIANT", "values": ["empty", "selected"]}, {"name": "value", "type": "TEXT"}],
|
|
221
|
+
"approved": "2026-10-20",
|
|
222
|
+
"reason": "the trigger shows either the placeholder (empty) or the chosen option (selected) in one text layer, which Figma can bind to one text property only — so value picks the look and valueText is the chosen label; selected is drawn once (owner-approved option A)"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"structure": "select-root (8px gap) > select-label (text + select-required), select-wrapper > select-trigger (hugs its text like code: select-trigger-label + select-chevron; open uses an unrotated ChevronUp, code flips the chevron), select-description, select-error. state=open holds the listbox as a nested Menu instance named menu (multiple=false, options=5, exposed so its options 2–7 are picked from the Select's panel): absolute, 4px below select-trigger at its width, 150px minimum, like Menu.tsx; its MenuItems read Designer, Engineer, Product Manager, Tech Lead, Other (Storybook Default), none selected.",
|
|
226
|
+
"variantCombinations": "40 variants (2026-10-21): invalid × state default/hover/focus/open = 8, disabled = 1, value=selected once (default, valid, enabled) = 1 — each of those 10 drawn with fullWidth (320px) × hideLabel false/true = 40 (variants.secondary, owner's decision 2026-10-21). The option count is the nested Menu's options property, not a Select variant. value=empty binds the trigger label to placeholder, value=selected to valueText.",
|
|
227
|
+
"stories": {
|
|
228
|
+
"Default": "value.=empty",
|
|
229
|
+
"Controlled": "value.=selected",
|
|
230
|
+
"WithGroups": "state=open",
|
|
231
|
+
"WithLabelEnd": "state=open",
|
|
232
|
+
"WithDescription": "description.=true",
|
|
233
|
+
"Invalid": "invalid=true, errorMessage.=true",
|
|
234
|
+
"Disabled": "disabled=true, value.=selected",
|
|
235
|
+
"MinimumWidth": {"figma": null, "reason": "min-width behaviour — same look as Default", "approved": "2026-10-21"},
|
|
236
|
+
"Required": "required=true",
|
|
237
|
+
"Open": "state=open",
|
|
238
|
+
"KeyboardNavigation": {"figma": "state=focus", "reason": "keyboard focus — the focus ring is drawn in Figma (owner 2026-10-21: focus states are drawn)"}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "SideNav",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
|
|
7
|
+
"purpose": "The persistent vertical navigation rail of an app shell — brand mark, primary nav entries, and a footer slot for the current user.",
|
|
8
|
+
"import": "import { SideNav } from '@helixds/react';",
|
|
9
|
+
"archetype": "layout",
|
|
10
|
+
|
|
11
|
+
"neverUseFor": [
|
|
12
|
+
"In-page tabbed navigation — use Tabs",
|
|
13
|
+
"Breadcrumbs — SideNav is persistent app-level nav, breadcrumbs are per-page wayfinding",
|
|
14
|
+
"Anything other than NavItem as its direct nav entries — don't put a Button or a plain <a> among the items"
|
|
15
|
+
],
|
|
16
|
+
|
|
17
|
+
"rationale": "SideNav is the persistent <nav> rail of the app shell with a fixed 224px chrome width — a standalone dimension documented in component-token-exceptions.md. It accepts only NavItems as entries so every app's navigation shares the same link semantics and active styling.",
|
|
18
|
+
|
|
19
|
+
"governance": {
|
|
20
|
+
"mayExtendLocally": [
|
|
21
|
+
"Choose the brand mark, NavItems and footer content",
|
|
22
|
+
"Group NavItems into product-specific sections"
|
|
23
|
+
],
|
|
24
|
+
"mustEscalateToDS": [
|
|
25
|
+
"Changing the 224px width or adding a collapsed/mini mode",
|
|
26
|
+
"Putting Buttons or plain links among the nav entries",
|
|
27
|
+
"Adding nested multi-level navigation"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
"states": {
|
|
32
|
+
"intrinsic": [],
|
|
33
|
+
"authored": []
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
"anatomy": [
|
|
37
|
+
{ "part": "side-nav-root", "element": "nav", "description": "Root — always a native <nav>, fixed width, with a 1px right border (sideNav.border) dividing it from the content." },
|
|
38
|
+
{ "part": "side-nav-brand", "element": "div", "description": "Logo/product-name slot at the top.", "optional": true },
|
|
39
|
+
{ "part": "side-nav-items", "element": "div", "description": "Wraps the NavItem list (children)." },
|
|
40
|
+
{ "part": "side-nav-footer", "element": "div", "description": "Slot at the bottom — typically the current user row.", "optional": true }
|
|
41
|
+
],
|
|
42
|
+
|
|
43
|
+
"props": [
|
|
44
|
+
{ "name": "brand", "type": "React.ReactNode | undefined", "description": "Logo/product-name content, rendered at the top." },
|
|
45
|
+
{ "name": "children", "type": "React.ReactNode", "required": true, "description": "The nav entries — a list of NavItem." },
|
|
46
|
+
{ "name": "footer", "type": "React.ReactNode | undefined", "description": "Content pinned to the bottom — typically the current user." },
|
|
47
|
+
{ "name": "className", "type": "string | undefined", "description": "Additional className for the root." }
|
|
48
|
+
],
|
|
49
|
+
|
|
50
|
+
"sizing": {
|
|
51
|
+
"width": {
|
|
52
|
+
"default": "fixed",
|
|
53
|
+
"note": "224px, a standalone chrome dimension — no matching primitive/spacing/size rung, documented in component-token-exceptions.md."
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
"tokenPolicy": {
|
|
58
|
+
"allowed": ["color.fill", "color.border", "spacing"],
|
|
59
|
+
"forbidden": ["primitive.color"]
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
"a11y": {
|
|
63
|
+
"role": "navigation (implicit from <nav>)",
|
|
64
|
+
"wcag": ["1.3.1 Info and Relationships", "2.4.1 Bypass Blocks"],
|
|
65
|
+
"applied": {
|
|
66
|
+
"nativeElement": "nav",
|
|
67
|
+
"innerComponents": [
|
|
68
|
+
"NavItem"
|
|
69
|
+
],
|
|
70
|
+
"focus": [
|
|
71
|
+
{
|
|
72
|
+
"part": "(its inner controls)",
|
|
73
|
+
"delegatedTo": [
|
|
74
|
+
"NavItem"
|
|
75
|
+
],
|
|
76
|
+
"note": "focus is drawn by NavItem — see their a11y.applied.focus"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"aria": {},
|
|
80
|
+
"announced": [
|
|
81
|
+
"navigation"
|
|
82
|
+
],
|
|
83
|
+
"contrast": {
|
|
84
|
+
"side-nav-brand": {
|
|
85
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
86
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
87
|
+
},
|
|
88
|
+
"side-nav-footer": {
|
|
89
|
+
"light": "4.75:1 — #64748b on #ffffff",
|
|
90
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
91
|
+
},
|
|
92
|
+
"side-nav-brand (icon)": {
|
|
93
|
+
"light": "16.4:1 — #0f172a on #eff6ff",
|
|
94
|
+
"dark": "9.45:1 — #f1f5f9 on #1e3a8a"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"targetSize": {},
|
|
98
|
+
"motion": [
|
|
99
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"results": {
|
|
103
|
+
"score": 100,
|
|
104
|
+
"meetsMinimum": true,
|
|
105
|
+
"checks": {
|
|
106
|
+
"contract": "pass",
|
|
107
|
+
"keys": "n/a",
|
|
108
|
+
"focus-return": "n/a",
|
|
109
|
+
"keyboard": "n/a",
|
|
110
|
+
"axe": "pass",
|
|
111
|
+
"contrast": "pass",
|
|
112
|
+
"focus-visible": "pass",
|
|
113
|
+
"target-size": "pass",
|
|
114
|
+
"reflow": "pass",
|
|
115
|
+
"screen-reader": "pass",
|
|
116
|
+
"ai-visual": "pass",
|
|
117
|
+
"human": "pending"
|
|
118
|
+
},
|
|
119
|
+
"notScored": [
|
|
120
|
+
"ai-visual",
|
|
121
|
+
"human"
|
|
122
|
+
],
|
|
123
|
+
"changed": "2026-10-12"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
"figma": {
|
|
128
|
+
"childProps": {"children": [{"component": "NavItem", "property": "label", "note": "each link"}]},
|
|
129
|
+
"states": ["default"],
|
|
130
|
+
"properties": [
|
|
131
|
+
{ "name": "brand", "type": "BOOLEAN", "codeProp": "brand", "description": "Show/hide part: the brand row carries its own 12px bottom (code's margin-bottom), so hiding it leaves the items where the root's 12px top puts them." },
|
|
132
|
+
{ "name": "footer", "type": "BOOLEAN", "codeProp": "footer", "description": "Show/hide part: 8px margin + top border + 8px padding all live on the footer." }
|
|
133
|
+
],
|
|
134
|
+
"structure": "No variants — a single component: side-nav-brand > brand-content, side-nav-items (NavItem instances, fills the height), side-nav-footer > footer-content (Avatar instance + name/role).",
|
|
135
|
+
"stories": {
|
|
136
|
+
"Default": "brand=true, footer=true"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "SidePanel",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
|
|
7
|
+
"purpose": "A modal panel anchored to the right edge of the viewport, for a persistent secondary task alongside — but still blocking — the main page (details, a form, a filter builder).",
|
|
8
|
+
"import": "import { SidePanel } from '@helixds/react';",
|
|
9
|
+
"archetype": "overlays",
|
|
10
|
+
|
|
11
|
+
"neverUseFor": [
|
|
12
|
+
"A quick, focused decision that should fully interrupt the page — use Modal instead",
|
|
13
|
+
"Non-blocking supplementary info — use Tooltip or Popover instead",
|
|
14
|
+
"Primary navigation — use SideNav instead"
|
|
15
|
+
],
|
|
16
|
+
|
|
17
|
+
"rationale": "SidePanel uses native <dialog> and showModal() like Modal, so focus trapping, Escape and top-layer stacking come from the browser, with no library and no z-index. It shares Modal's open/close state machine, the useDialogTransition hook: data-state=\"open\" is set one animation frame after showModal() so the transition plays, and a close sets data-state=\"closing\", waits component.sidePanel.duration-close, then calls .close(). The native cancel event (Escape, backdrop click) is redirected through onDismiss so every dismissal animates the same way. Only its slide, blur and fade transition is its own CSS. It has no scrim, so the page behind stays visible, but ::backdrop is still set to transparent on purpose, because browsers paint a default dimming when no rule is given. It's anchored full-height to the right edge at a fixed 400px width (or to the bottom edge with placement) for secondary tasks that still block the page, and has no radius because it meets the viewport edge.",
|
|
18
|
+
|
|
19
|
+
"governance": {
|
|
20
|
+
"mayExtendLocally": [
|
|
21
|
+
"Compose forms, details or filters inside the body",
|
|
22
|
+
"Choose the title and footer actions"
|
|
23
|
+
],
|
|
24
|
+
"mustEscalateToDS": [
|
|
25
|
+
"Changing the 400px width or anchoring side",
|
|
26
|
+
"Replacing <dialog> or making it non-modal",
|
|
27
|
+
"Overriding focus-trap or backdrop behavior"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
"states": {
|
|
32
|
+
"intrinsic": [],
|
|
33
|
+
"authored": [
|
|
34
|
+
{ "name": "expanded", "description": "Whether the panel is open. Same native <dialog> + JS-timed close choreography as Modal — see Modal's contract rationale.", "aria": "native <dialog> semantics; role=\"dialog\" is implicit" }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
"anatomy": [
|
|
39
|
+
{ "part": "side-panel-root", "element": "dialog", "description": "Native <dialog>, opened via showModal(), styled to the right or bottom edge (see `placement`) instead of centered — same primitive as Modal (see Modal's contract rationale). No backdrop scrim (unlike Modal) — the page behind stays visible." },
|
|
40
|
+
{ "part": "side-panel-header", "element": "div", "description": "Contains the title." },
|
|
41
|
+
{ "part": "side-panel-title", "element": "h2", "description": "The panel's accessible name — referenced via aria-labelledby. Same text style as Modal's title." },
|
|
42
|
+
{ "part": "side-panel-close", "element": "slot", "description": "An IconButton (IconX, size l) positioned top-right, calls onDismiss.", "optional": true },
|
|
43
|
+
{ "part": "side-panel-body", "element": "div", "description": "The panel's content (children)." }
|
|
44
|
+
],
|
|
45
|
+
|
|
46
|
+
"props": [
|
|
47
|
+
{ "name": "label", "type": "string", "required": true, "description": "The panel's title — rendered visibly and used as its accessible name." },
|
|
48
|
+
{ "name": "children", "type": "React.ReactNode", "required": true, "description": "The panel's body content." },
|
|
49
|
+
{ "name": "expanded", "type": "boolean", "required": true, "description": "Whether the panel is open. Always controlled, same reasoning as Modal." },
|
|
50
|
+
{ "name": "onDismiss", "type": "() => void", "required": true, "description": "Called when the panel should close — the close (X) button, Escape, or a backdrop click." },
|
|
51
|
+
{ "name": "showCloseButton", "type": "boolean", "default": "true", "description": "Whether to render the header's close (X) button." },
|
|
52
|
+
{ "name": "closeOnBackdropClick", "type": "boolean", "default": "true", "description": "Whether clicking outside the panel dismisses it." },
|
|
53
|
+
{ "name": "placement", "type": "'right' | 'bottom'", "default": "right", "description": "Which edge of the viewport the panel is anchored to and slides from. Same vocabulary as Tooltip's `placement` — only the two edges that make sense for a full-height ('right') or full-width ('bottom') panel." },
|
|
54
|
+
{ "name": "className", "type": "string | undefined", "description": "Additional className for the root." }
|
|
55
|
+
],
|
|
56
|
+
|
|
57
|
+
"sizing": {
|
|
58
|
+
"width": { "mode": "fixed", "values": { "default": 400 }, "unit": "px", "note": "Fixed panel width, not on the shared size scale — same category of per-component literal as Tooltip's 240px max-width." },
|
|
59
|
+
"height": { "mode": "fixed", "note": "Full viewport height — anchored top-to-bottom against the right edge." }
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
"tokenPolicy": {
|
|
63
|
+
"allowed": ["color.fill", "color.text", "spacing", "fontSize", "fontWeight", "shadow"],
|
|
64
|
+
"forbidden": ["primitive.color", "radius"]
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
"a11y": {
|
|
68
|
+
"role": "dialog (implicit via native <dialog>)",
|
|
69
|
+
"keyboardNav": ["Escape — dismisses (native <dialog> cancel event, redirected through onDismiss per Modal's contract rationale)", "Tab — cycles focus, trapped inside the panel (native)"],
|
|
70
|
+
"wcag": ["2.4.3 Focus Order", "4.1.2 Name, Role, Value"],
|
|
71
|
+
"applied": {
|
|
72
|
+
"nativeElement": "dialog",
|
|
73
|
+
"innerComponents": [
|
|
74
|
+
"Button",
|
|
75
|
+
"IconButton"
|
|
76
|
+
],
|
|
77
|
+
"focus": [
|
|
78
|
+
{
|
|
79
|
+
"part": "(its inner controls)",
|
|
80
|
+
"delegatedTo": [
|
|
81
|
+
"Button",
|
|
82
|
+
"IconButton"
|
|
83
|
+
],
|
|
84
|
+
"note": "focus is drawn by Button, IconButton — see their a11y.applied.focus"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"aria": {
|
|
88
|
+
"side-panel-root": {
|
|
89
|
+
"aria-labelledby": [
|
|
90
|
+
"(id)"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"announced": [
|
|
95
|
+
"dialog \"Edit filters\""
|
|
96
|
+
],
|
|
97
|
+
"contrast": {
|
|
98
|
+
"side-panel-title": {
|
|
99
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
100
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
101
|
+
},
|
|
102
|
+
"side-panel-body": {
|
|
103
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
104
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"targetSize": {},
|
|
108
|
+
"motion": [
|
|
109
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"results": {
|
|
113
|
+
"score": 100,
|
|
114
|
+
"meetsMinimum": true,
|
|
115
|
+
"checks": {
|
|
116
|
+
"contract": "pass",
|
|
117
|
+
"keys": "pass",
|
|
118
|
+
"focus-return": "pass",
|
|
119
|
+
"keyboard": "pass",
|
|
120
|
+
"axe": "pass",
|
|
121
|
+
"contrast": "pass",
|
|
122
|
+
"focus-visible": "pass",
|
|
123
|
+
"target-size": "pass",
|
|
124
|
+
"reflow": "n/a",
|
|
125
|
+
"screen-reader": "pass",
|
|
126
|
+
"ai-visual": "pass",
|
|
127
|
+
"human": "pending"
|
|
128
|
+
},
|
|
129
|
+
"notScored": [
|
|
130
|
+
"ai-visual",
|
|
131
|
+
"human"
|
|
132
|
+
],
|
|
133
|
+
"changed": "2026-10-12"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
"figma": {
|
|
138
|
+
"states": ["default"],
|
|
139
|
+
"properties": [
|
|
140
|
+
{ "name": "placement", "type": "VARIANT", "values": ["right", "bottom"], "codeProp": "placement", "description": "right: 400px (sidePanel.width), full height, shadow / xl. bottom: full width, max 80vh, shadowBottom." },
|
|
141
|
+
{ "name": "label", "type": "TEXT", "codeProp": "label" },
|
|
142
|
+
{ "name": "content", "type": "TEXT", "codeProp": "children" },
|
|
143
|
+
{ "name": "showCloseButton", "type": "BOOLEAN", "codeProp": "showCloseButton" }
|
|
144
|
+
],
|
|
145
|
+
"structure": "Same header as Modal (24px top/left, 72px clear of the close button as 16 + 40 + 16 nested tokens, Heading / xl / Bold — raised from l on 2026-10-20 by the owner), body 24px padding, IconButton ghost l close 16px from the corner. shadowBottom is a literal in tokens.json (rgba values, no semantic shadow casts upward) — drawn as raw drop shadows in Figma.",
|
|
146
|
+
"stories": {
|
|
147
|
+
"Default": "default",
|
|
148
|
+
"BottomPlacement": "placement=bottom",
|
|
149
|
+
"RightPlacement": "placement=right",
|
|
150
|
+
"KeyboardDismiss": {"figma": "layout", "reason": "keyboard focus is drawn on the close IconButton inside it (state=focus)"},
|
|
151
|
+
"Opened": {"figma": null, "reason": "play test that opens it — same look as Default", "approved": "2026-10-21"}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|