@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,431 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "Combobox",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
"purpose": "Lets users find and choose a single value from a long list by typing to filter it.",
|
|
7
|
+
"import": "import { Combobox } from '@helixds/react';",
|
|
8
|
+
"archetype": "form-selection",
|
|
9
|
+
"neverUseFor": [
|
|
10
|
+
"A short list (about 7 options or fewer) - use Select or RadioGroup",
|
|
11
|
+
"Free-form text entry, or a value that isn't one of the options - use Input",
|
|
12
|
+
"Multiple simultaneous selections - use MultiSelect"
|
|
13
|
+
],
|
|
14
|
+
"rationale": "Combobox is Select's field with a real <input> as the trigger, filtering Menu's listbox as the user types: the WAI-ARIA editable combobox with list autocomplete. A native <datalist> was rejected because every browser draws it differently (Safari puts it beside the field), and it can't be styled or positioned. It shares Select's --helix-select-* tokens and its one 32px height on purpose, so both read as the same field, and a change to Select's field changes Combobox too. A search icon always marks it as searchable. Real focus stays on the input, and aria-activedescendant points at the highlighted option, which starts on the first match. Matching is case-insensitive \"contains\" on the visible label only. Opening from a chosen value shows every option, and focusing selects the field's text so typing replaces it. The popup is Menu itself (its portal, below-only placement and 32px rows), and when nothing matches it shows one disabled \"No results\" row, a fixed English string for now. A value is always an option from the list: leaving the field puts the chosen label back or empties it, and free text is never kept, because that would be an Input. Grouped options, async loading, multi-select and free-text values are out of scope.",
|
|
15
|
+
"governance": {
|
|
16
|
+
"mayExtendLocally": [
|
|
17
|
+
"Provide the options, label, placeholder and helper text",
|
|
18
|
+
"Control the value and validation from product logic"
|
|
19
|
+
],
|
|
20
|
+
"mustEscalateToDS": [
|
|
21
|
+
"Adding a size prop or new heights",
|
|
22
|
+
"Async loading, grouped options, multi-select or free-text values",
|
|
23
|
+
"Changing the matching rule or the combobox/listbox keyboard model"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"states": {
|
|
27
|
+
"intrinsic": [
|
|
28
|
+
"hover",
|
|
29
|
+
"focus"
|
|
30
|
+
],
|
|
31
|
+
"authored": [
|
|
32
|
+
{
|
|
33
|
+
"name": "invalid",
|
|
34
|
+
"description": "The chosen value fails validation.",
|
|
35
|
+
"aria": "aria-invalid='true'"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "disabled",
|
|
39
|
+
"description": "The field is non-interactive.",
|
|
40
|
+
"aria": "disabled (native)"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "required",
|
|
44
|
+
"description": "The field must have a value before form submission.",
|
|
45
|
+
"aria": "aria-required='true'"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "open",
|
|
49
|
+
"description": "The filtered listbox is showing.",
|
|
50
|
+
"aria": "aria-expanded='true'/'false' on the input"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"anatomy": [
|
|
55
|
+
{
|
|
56
|
+
"part": "combobox-root",
|
|
57
|
+
"element": "div",
|
|
58
|
+
"description": "Layout wrapper for label, field and messages (Select's spacing: 8px between them)."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"part": "combobox-label",
|
|
62
|
+
"element": "label",
|
|
63
|
+
"description": "Accessible label. Always rendered - visible or sr-only. Disabled: dims to text.disabled with the rest of the text."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"part": "combobox-required",
|
|
67
|
+
"element": "span",
|
|
68
|
+
"optional": true,
|
|
69
|
+
"description": "The required indicator (*) inside the label - shown by `required`."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"part": "combobox-wrapper",
|
|
73
|
+
"element": "div",
|
|
74
|
+
"description": "Positions the input with its search icon and chevron."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"part": "combobox-icon",
|
|
78
|
+
"element": "slot",
|
|
79
|
+
"description": "Leading search icon, always shown (see rationale): marks the field as searchable. 16px, Select's icon color."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"part": "combobox-input",
|
|
83
|
+
"element": "input",
|
|
84
|
+
"description": "The visible field, a native <input> with role=combobox. Real DOM focus stays here; aria-activedescendant points at the highlighted option of the portaled Menu."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"part": "combobox-chevron",
|
|
88
|
+
"element": "slot",
|
|
89
|
+
"optional": true,
|
|
90
|
+
"description": "Trailing chevron. Flips while open, same scaleY treatment as Select's."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"part": "combobox-description",
|
|
94
|
+
"element": "span",
|
|
95
|
+
"optional": true,
|
|
96
|
+
"description": "Helper text below the field."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"part": "combobox-error",
|
|
100
|
+
"element": "span",
|
|
101
|
+
"optional": true,
|
|
102
|
+
"description": "Error text shown when invalid=true."
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"props": [
|
|
106
|
+
{
|
|
107
|
+
"name": "label",
|
|
108
|
+
"type": "string",
|
|
109
|
+
"required": true,
|
|
110
|
+
"description": "Visible or screen-reader-only label. Required for a11y."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "options",
|
|
114
|
+
"type": "ComboboxOption[]",
|
|
115
|
+
"required": true,
|
|
116
|
+
"description": "The options to search and pick from. Each option: { value, label, disabled? }. Typing filters them by label (case-insensitive, contains)."
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "value",
|
|
120
|
+
"type": "string | undefined",
|
|
121
|
+
"description": "Controlled selected value."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "defaultValue",
|
|
125
|
+
"type": "string | undefined",
|
|
126
|
+
"description": "Uncontrolled initial value."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "onChange",
|
|
130
|
+
"type": "(value: string) => void | undefined",
|
|
131
|
+
"description": "Value change handler."
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "placeholder",
|
|
135
|
+
"type": "string | undefined",
|
|
136
|
+
"description": "Hint shown in the empty field before anything is typed or chosen."
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "description",
|
|
140
|
+
"type": "string | undefined",
|
|
141
|
+
"description": "Helper text shown below the field."
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "errorMessage",
|
|
145
|
+
"type": "string | undefined",
|
|
146
|
+
"description": "Error text shown when invalid=true."
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "invalid",
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"default": false,
|
|
152
|
+
"description": "Shows error styling and message."
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "disabled",
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"default": false,
|
|
158
|
+
"description": "Non-interactive state."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "required",
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"default": false,
|
|
164
|
+
"description": "Marks field as required. Enforced natively: an invisible form input carries the value, so an empty required Combobox blocks form submit like a native field."
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "fullWidth",
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"default": false,
|
|
170
|
+
"description": "Expands to container width."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "hideLabel",
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"default": false,
|
|
176
|
+
"description": "Hides the label visually but keeps it accessible."
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "id",
|
|
180
|
+
"type": "string | undefined",
|
|
181
|
+
"description": "Optional field id override."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "name",
|
|
185
|
+
"type": "string | undefined",
|
|
186
|
+
"description": "Native form field name."
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "className",
|
|
190
|
+
"type": "string | undefined",
|
|
191
|
+
"description": "Additional className for the root."
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"sizing": {
|
|
195
|
+
"height": {
|
|
196
|
+
"mode": "fixed",
|
|
197
|
+
"values": {
|
|
198
|
+
"default": 32
|
|
199
|
+
},
|
|
200
|
+
"unit": "px",
|
|
201
|
+
"note": "One fixed size only, deliberately — no size prop. Matches semantic.size.m, Select's height, the same height Input/Textarea's own 'm' field uses, so a Combobox field and its Menu items read as one continuous, aligned scale (see Menu's contract rationale)."
|
|
202
|
+
},
|
|
203
|
+
"width": {
|
|
204
|
+
"default": "fixed",
|
|
205
|
+
"value": 320,
|
|
206
|
+
"unit": "px",
|
|
207
|
+
"modes": {
|
|
208
|
+
"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.",
|
|
209
|
+
"fill": "fullWidth=true: 100% of the container (Figma: drawn at 600px, the field and its popup on Fill so they stretch)."
|
|
210
|
+
},
|
|
211
|
+
"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."
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"tokenPolicy": {
|
|
215
|
+
"allowed": [
|
|
216
|
+
"color.fill",
|
|
217
|
+
"color.text",
|
|
218
|
+
"color.border",
|
|
219
|
+
"spacing",
|
|
220
|
+
"radius",
|
|
221
|
+
"fontSize"
|
|
222
|
+
],
|
|
223
|
+
"forbidden": [
|
|
224
|
+
"primitive.color"
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
"a11y": {
|
|
228
|
+
"role": "combobox on a native <input> (WAI-ARIA editable combobox with list autocomplete, aria-autocomplete=list) + the Menu listbox popup - see rationale.",
|
|
229
|
+
"keyboardNav": [
|
|
230
|
+
"Typing - filters the options and opens the menu, highlighting the first match",
|
|
231
|
+
"Arrow Up/Down - opens the menu, or moves the highlighted option while open",
|
|
232
|
+
"Enter - confirms the highlighted option while open",
|
|
233
|
+
"Escape - closes the menu and puts the chosen option's label back",
|
|
234
|
+
"Tab - move focus (closes the menu first and puts the chosen option's label back)"
|
|
235
|
+
],
|
|
236
|
+
"wcag": [
|
|
237
|
+
"1.3.1 Info and Relationships",
|
|
238
|
+
"1.4.3 Contrast (AA)",
|
|
239
|
+
"2.1.1 Keyboard",
|
|
240
|
+
"2.4.7 Focus Visible",
|
|
241
|
+
"4.1.2 Name Role Value"
|
|
242
|
+
],
|
|
243
|
+
"applied": {
|
|
244
|
+
"nativeElement": "div",
|
|
245
|
+
"innerComponents": [
|
|
246
|
+
"Button",
|
|
247
|
+
"Menu"
|
|
248
|
+
],
|
|
249
|
+
"focus": [
|
|
250
|
+
{
|
|
251
|
+
"part": "combobox-wrapper",
|
|
252
|
+
"when": ":focus",
|
|
253
|
+
"border-color": "var(--helix-select-border-hover)"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"part": "combobox-input",
|
|
257
|
+
"when": ":focus",
|
|
258
|
+
"box-shadow": "0 0 0 3px color-mix(in srgb, var(--helix-select-border-focus) 20%, transparent)",
|
|
259
|
+
"border-color": "var(--helix-select-border-focus)"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"aria": {
|
|
263
|
+
"combobox-icon": {
|
|
264
|
+
"aria-hidden": [
|
|
265
|
+
"true"
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
"combobox-input": {
|
|
269
|
+
"role": [
|
|
270
|
+
"combobox"
|
|
271
|
+
],
|
|
272
|
+
"aria-autocomplete": [
|
|
273
|
+
"list"
|
|
274
|
+
],
|
|
275
|
+
"aria-expanded": [
|
|
276
|
+
"false",
|
|
277
|
+
"true"
|
|
278
|
+
],
|
|
279
|
+
"aria-controls": [
|
|
280
|
+
"(id)"
|
|
281
|
+
],
|
|
282
|
+
"aria-activedescendant": [
|
|
283
|
+
"(id)"
|
|
284
|
+
],
|
|
285
|
+
"aria-invalid": [
|
|
286
|
+
"true"
|
|
287
|
+
],
|
|
288
|
+
"aria-describedby": [
|
|
289
|
+
"(id)"
|
|
290
|
+
],
|
|
291
|
+
"aria-required": [
|
|
292
|
+
"true"
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
"combobox-chevron": {
|
|
296
|
+
"aria-hidden": [
|
|
297
|
+
"true"
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
"combobox-error": {
|
|
301
|
+
"role": [
|
|
302
|
+
"alert"
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"combobox-required": {
|
|
306
|
+
"aria-hidden": [
|
|
307
|
+
"true"
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"announced": [
|
|
312
|
+
"combobox \"Country\": Spain",
|
|
313
|
+
"combobox \"Country\"",
|
|
314
|
+
"combobox \"Country\" [disabled]: Spain",
|
|
315
|
+
"combobox \"Country\" [expanded]: land",
|
|
316
|
+
"combobox \"Country\" [invalid]"
|
|
317
|
+
],
|
|
318
|
+
"contrast": {
|
|
319
|
+
"combobox-label": {
|
|
320
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
321
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
322
|
+
},
|
|
323
|
+
"combobox-input": {
|
|
324
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
325
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
326
|
+
},
|
|
327
|
+
"combobox-error": {
|
|
328
|
+
"light": "6.47:1 — #b91c1c on #ffffff",
|
|
329
|
+
"dark": "12.65:1 — #fecdd3 on #0f172a"
|
|
330
|
+
},
|
|
331
|
+
"combobox-description": {
|
|
332
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
333
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"targetSize": {
|
|
337
|
+
"combobox-input": "smallest 320×32 px"
|
|
338
|
+
},
|
|
339
|
+
"motion": [
|
|
340
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
"results": {
|
|
344
|
+
"score": 100,
|
|
345
|
+
"meetsMinimum": true,
|
|
346
|
+
"checks": {
|
|
347
|
+
"contract": "pass",
|
|
348
|
+
"keys": "pass",
|
|
349
|
+
"focus-return": "pass",
|
|
350
|
+
"keyboard": "pass",
|
|
351
|
+
"axe": "pass",
|
|
352
|
+
"contrast": "pass",
|
|
353
|
+
"focus-visible": "pass",
|
|
354
|
+
"target-size": "pass",
|
|
355
|
+
"reflow": "n/a",
|
|
356
|
+
"screen-reader": "pass",
|
|
357
|
+
"ai-visual": "pending",
|
|
358
|
+
"human": "pending"
|
|
359
|
+
},
|
|
360
|
+
"notScored": [
|
|
361
|
+
"ai-visual",
|
|
362
|
+
"human"
|
|
363
|
+
],
|
|
364
|
+
"changed": "2026-12-05"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"figma": {
|
|
368
|
+
"states": [
|
|
369
|
+
"default",
|
|
370
|
+
"hover",
|
|
371
|
+
"focus",
|
|
372
|
+
"open"
|
|
373
|
+
],
|
|
374
|
+
"properties": [
|
|
375
|
+
{
|
|
376
|
+
"name": "state",
|
|
377
|
+
"type": "VARIANT",
|
|
378
|
+
"values": [
|
|
379
|
+
"default",
|
|
380
|
+
"hover",
|
|
381
|
+
"focus",
|
|
382
|
+
"open"
|
|
383
|
+
],
|
|
384
|
+
"figmaOnly": true,
|
|
385
|
+
"description": "Figma-only axis: hover/focus are CSS pseudo-classes, open is the list showing (aria-expanded). invalid, disabled and the secondary toggles are their own variants (contracts/figma-conversion.json, pattern form-field) — same as Select."
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"propertyMap": {
|
|
389
|
+
"value": {
|
|
390
|
+
"codeType": "string | undefined",
|
|
391
|
+
"figma": [
|
|
392
|
+
{
|
|
393
|
+
"name": "value.",
|
|
394
|
+
"type": "VARIANT",
|
|
395
|
+
"values": [
|
|
396
|
+
"empty",
|
|
397
|
+
"selected"
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"name": "value",
|
|
402
|
+
"type": "TEXT"
|
|
403
|
+
}
|
|
404
|
+
],
|
|
405
|
+
"approved": "2026-12-05",
|
|
406
|
+
"reason": "same model as Select (approved 2026-10-20): the field shows either the placeholder (empty) or the chosen option's label (selected) in one text layer — value. picks the look and value is the text; selected is drawn once"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
"structure": "combobox-root (8px gap) > combobox-label (text + combobox-required), combobox-wrapper (the field: Select's tokens, 32px, border always) > combobox-icon (Search, 16px, always shown) + combobox-input (placeholder or the chosen label) + combobox-chevron (ChevronDown; open uses an unrotated ChevronUp, code flips it), combobox-description, combobox-error. state=open holds the list as a nested Menu instance named menu (multiple=false, options=5, exposed so its options 2–7 are picked from the Combobox's panel): absolute, 4px below the field at its width, like Select.",
|
|
410
|
+
"variantCombinations": "72 variants, like Select: invalid × state default/hover/focus/open = 8, disabled (state=default, valid) = 1 — those 9 for each value. empty/selected × fullWidth false/true × hideLabel false/true = 72. The option count is the nested Menu's options property, not a Combobox variant (list-delegated).",
|
|
411
|
+
"stories": {
|
|
412
|
+
"Default": "value.=empty",
|
|
413
|
+
"Controlled": "value.=selected",
|
|
414
|
+
"WithDescription": "description.=true",
|
|
415
|
+
"Invalid": "invalid=true, errorMessage.=true",
|
|
416
|
+
"Disabled": "disabled=true, value.=selected",
|
|
417
|
+
"Required": "required=true",
|
|
418
|
+
"Open": "state=open",
|
|
419
|
+
"Filtered": "state=open",
|
|
420
|
+
"NoResults": {
|
|
421
|
+
"figma": null,
|
|
422
|
+
"reason": "the filter's empty result — behaviour; Menu draws the disabled row",
|
|
423
|
+
"approved": "2026-12-05"
|
|
424
|
+
},
|
|
425
|
+
"KeyboardNavigation": {
|
|
426
|
+
"figma": "state=focus",
|
|
427
|
+
"reason": "keyboard focus — the focus ring is drawn in Figma (owner 2026-10-21: focus states are drawn)"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "FAB",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
|
|
7
|
+
"purpose": "A single, prominent floating action reachable from anywhere in the current view — optionally expanding into 1-3 closely related actions via a speed-dial.",
|
|
8
|
+
"import": "import { FAB } from '@helixds/react';",
|
|
9
|
+
"archetype": "actions-navigation",
|
|
10
|
+
|
|
11
|
+
"neverUseFor": [
|
|
12
|
+
"The only way to reach an action also available inline — FAB is a shortcut, not the sole path; if removing it would make an action unreachable, it belongs in the page's normal flow instead",
|
|
13
|
+
"A toggle/pressed state — same exclusion as IconButton; use Switch instead",
|
|
14
|
+
"More than 3 revealed actions — a speed-dial with many actions is a Menu wearing a costume; use Menu once it exists",
|
|
15
|
+
"Anything other than the single most important action in the current view — a second FAB on the same screen competes with itself"
|
|
16
|
+
],
|
|
17
|
+
|
|
18
|
+
"rationale": "FAB is a single prominent floating shortcut: it reuses semantic.size.xl (48px) as its one 'm' rung per ADR-004 and is one of the few surfaces allowed a shadow because it genuinely floats (ADR-005). It must never be the only path to an action, and the speed-dial is capped at 1-3 related actions.",
|
|
19
|
+
|
|
20
|
+
"governance": {
|
|
21
|
+
"mayExtendLocally": [
|
|
22
|
+
"Choose the icon, accessible label and 1-3 speed-dial actions",
|
|
23
|
+
"Decide which views show a FAB"
|
|
24
|
+
],
|
|
25
|
+
"mustEscalateToDS": [
|
|
26
|
+
"Adding sizes, extended (text) FABs or more than three actions",
|
|
27
|
+
"Making FAB the only way to reach an action",
|
|
28
|
+
"Adding toggle/pressed state or changing its position model"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
"states": {
|
|
33
|
+
"intrinsic": ["hover", "focus", "active"],
|
|
34
|
+
"authored": [
|
|
35
|
+
{
|
|
36
|
+
"name": "expanded",
|
|
37
|
+
"description": "The speed-dial actions are revealed. Rendered inline (no portal) — same hand-rolled-disclosure category as Select/Checkbox, not a Modal/Popover/Menu primitive decision.",
|
|
38
|
+
"aria": "aria-expanded={expanded}"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "disabled",
|
|
42
|
+
"description": "The FAB is non-interactive.",
|
|
43
|
+
"aria": "disabled (native HTML attribute)"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
"anatomy": [
|
|
49
|
+
{ "part": "fab-root", "element": "button", "description": "Root — always a real <button>, circular (width = height, radius.full), fixed-position by the consumer's layout, never by the component itself." },
|
|
50
|
+
{ "part": "fab-icon", "element": "slot", "description": "The trigger's icon, rendered via the Icon component." },
|
|
51
|
+
{ "part": "fab-actions", "element": "div", "description": "The speed-dial group — inline sibling buttons revealed when expanded=true, mirrored into the Liquid morph group.", "optional": true },
|
|
52
|
+
{ "part": "fab-action", "element": "button", "description": "One revealed action — icon + accessible label, visually smaller than the trigger.", "optional": true }
|
|
53
|
+
],
|
|
54
|
+
|
|
55
|
+
"props": [
|
|
56
|
+
{ "name": "icon", "type": "TablerIcon", "required": true, "description": "The trigger's icon, passed by reference (e.g. IconPlus), not pre-instantiated.", "usage": "icon={IconPlus}" },
|
|
57
|
+
{ "name": "label", "type": "string", "required": true, "description": "Accessible name for the trigger — there is no visible text, so this is required, rendered as aria-label." },
|
|
58
|
+
{ "name": "actions", "type": "Array<{ icon: TablerIcon; label: string; onClick: () => void }>", "description": "The speed-dial actions revealed when expanded. Omit for a plain single-action FAB with no speed-dial at all." },
|
|
59
|
+
{ "name": "expanded", "type": "boolean | undefined", "description": "Controlled expanded state. Omit `actions` to skip the speed-dial entirely rather than passing expanded with nothing to reveal." },
|
|
60
|
+
{ "name": "defaultExpanded", "type": "boolean", "default": false, "description": "Uncontrolled initial expanded state." },
|
|
61
|
+
{ "name": "onExpandedChange", "type": "((expanded: boolean) => void) | undefined", "description": "Fired when the speed-dial opens or closes (trigger press, action press, or outside click)." },
|
|
62
|
+
{ "name": "disabled", "type": "boolean", "default": false, "description": "Disables interaction." },
|
|
63
|
+
{ "name": "onClick", "type": "React.MouseEventHandler<HTMLButtonElement> | undefined", "description": "Trigger press handler — fires whether or not `actions` is set. When `actions` is set, pressing the trigger also toggles `expanded`." },
|
|
64
|
+
{ "name": "className", "type": "string | undefined", "description": "Additional className for the root. Positioning (fixed/absolute + inset) is the consumer's responsibility — FAB does not position itself." }
|
|
65
|
+
],
|
|
66
|
+
|
|
67
|
+
"sizing": {
|
|
68
|
+
"height": {
|
|
69
|
+
"mode": "fixed",
|
|
70
|
+
"values": { "m": 48 },
|
|
71
|
+
"unit": "px",
|
|
72
|
+
"note": "Single size only, v1 — reuses the existing semantic.size.xl token (48px), already defined but unwired to any component before this. Per ADR-004, a component with only one rung must still label it 'm'. Revealed actions (fab-action) render at 36px (primitive.size.225), a documented local exception, same category as Badge/Chip's local density model."
|
|
73
|
+
},
|
|
74
|
+
"width": {
|
|
75
|
+
"default": "fixed",
|
|
76
|
+
"note": "Always equal to height (circular) — aliases the same token as height, not an independent value, same pattern as IconButton."
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
"tokenPolicy": {
|
|
81
|
+
"allowed": ["color.fill", "color.icon", "color.border", "radius", "shadow"],
|
|
82
|
+
"forbidden": ["primitive.color", "color.text"]
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
"a11y": {
|
|
86
|
+
"role": "button (native)",
|
|
87
|
+
"keyboardNav": [
|
|
88
|
+
"Enter/Space — activates the trigger (toggles the speed-dial if actions exist)",
|
|
89
|
+
"Escape — collapses the speed-dial when expanded",
|
|
90
|
+
"Tab — moves focus through revealed actions in order when expanded"
|
|
91
|
+
],
|
|
92
|
+
"wcag": [
|
|
93
|
+
"4.1.2 Name, Role, Value (label is required — no visible text to fall back on)",
|
|
94
|
+
"1.4.3 Contrast (AA)",
|
|
95
|
+
"2.1.1 Keyboard"
|
|
96
|
+
],
|
|
97
|
+
"applied": {
|
|
98
|
+
"nativeElement": "button",
|
|
99
|
+
"focus": [
|
|
100
|
+
{
|
|
101
|
+
"part": "fab-root",
|
|
102
|
+
"when": ":focus-visible",
|
|
103
|
+
"outline": "2px solid var(--helix-fab-border-focus)",
|
|
104
|
+
"outline-offset": "2px"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"part": "fab-action",
|
|
108
|
+
"when": ":focus-visible",
|
|
109
|
+
"outline": "2px solid var(--helix-fab-border-focus)",
|
|
110
|
+
"outline-offset": "2px"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"aria": {
|
|
114
|
+
"fab-root": {
|
|
115
|
+
"aria-label": [
|
|
116
|
+
"Add"
|
|
117
|
+
],
|
|
118
|
+
"aria-expanded": [
|
|
119
|
+
"true",
|
|
120
|
+
"false"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"fab-action": {
|
|
124
|
+
"aria-label": [
|
|
125
|
+
"Add member",
|
|
126
|
+
"Export"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"announced": [
|
|
131
|
+
"button \"Add\"",
|
|
132
|
+
"button \"Add\" [disabled]",
|
|
133
|
+
"button \"Add\" [expanded]",
|
|
134
|
+
"button \"Add member\"",
|
|
135
|
+
"button \"Export\""
|
|
136
|
+
],
|
|
137
|
+
"contrast": {
|
|
138
|
+
"fab-icon (icon)": {
|
|
139
|
+
"light": "5.17:1 — #ffffff on #2563eb",
|
|
140
|
+
"dark": "5.17:1 — #ffffff on #2563eb"
|
|
141
|
+
},
|
|
142
|
+
"fab-action (icon)": {
|
|
143
|
+
"light": "3.45:1 — #0f172a on #2563eb",
|
|
144
|
+
"dark": "16.3:1 — #f1f5f9 on #0f172a"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"targetSize": {
|
|
148
|
+
"fab-root": "smallest 45×45 px",
|
|
149
|
+
"fab-action": "smallest 18×18 px"
|
|
150
|
+
},
|
|
151
|
+
"motion": [
|
|
152
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule",
|
|
153
|
+
"Motion (JS): inside <MotionConfig reducedMotion=\"user\">"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"results": {
|
|
157
|
+
"score": 100,
|
|
158
|
+
"meetsMinimum": true,
|
|
159
|
+
"checks": {
|
|
160
|
+
"contract": "pass",
|
|
161
|
+
"keys": "pass",
|
|
162
|
+
"focus-return": "pass",
|
|
163
|
+
"keyboard": "pass",
|
|
164
|
+
"axe": "pass",
|
|
165
|
+
"contrast": "pass",
|
|
166
|
+
"focus-visible": "pass",
|
|
167
|
+
"target-size": "pass",
|
|
168
|
+
"reflow": "n/a",
|
|
169
|
+
"screen-reader": "pass",
|
|
170
|
+
"ai-visual": "pass",
|
|
171
|
+
"human": "pending"
|
|
172
|
+
},
|
|
173
|
+
"notScored": [
|
|
174
|
+
"ai-visual",
|
|
175
|
+
"human"
|
|
176
|
+
],
|
|
177
|
+
"changed": "2026-10-12"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
"figma": {
|
|
182
|
+
"states": ["default", "hover", "press", "focus"],
|
|
183
|
+
"properties": [
|
|
184
|
+
{
|
|
185
|
+
"name": "actions",
|
|
186
|
+
"type": "VARIANT",
|
|
187
|
+
"values": ["2", "3", "4", "5", "6", "7"],
|
|
188
|
+
"codeProp": "actions",
|
|
189
|
+
"description": "How many actions the open speed dial draws (list-count, owner's rule 2026-10-21) — code draws one fab-action per entry. Drawn only with expanded=true; collapsed variants keep actions=2 (the actions aren't on screen)."
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "expanded",
|
|
193
|
+
"type": "VARIANT",
|
|
194
|
+
"values": ["false", "true"],
|
|
195
|
+
"codeProp": "expanded",
|
|
196
|
+
"description": "true = the speed dial open: actions stacked above the trigger, 8px apart (code's baseOffset/step), the trigger icon turned 45°. Only state=default exists for it — a disabled FAB can't open."
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "state",
|
|
200
|
+
"type": "VARIANT",
|
|
201
|
+
"values": ["default", "hover", "press", "focus"],
|
|
202
|
+
"figmaOnly": true,
|
|
203
|
+
"description": "Figma-only axis: CSS pseudo-classes. disabled / isLoading are their own false/true toggles (contracts/figma-conversion.json, pattern action)."
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"structure": "fab-root 48px (size/xl, radius/full, fill/primary, shadow / m, 20px icon) and fab-action 36px (fill/page, 1px border/neutral in the layout, shadow / s, 16px icon). Icons are swapped per instance (icon / actions[].icon).",
|
|
207
|
+
"variantCombinations": "29 variants (2026-10-21): expanded=true × actions 2–7 × state default/hover/press/focus = 24 (extra actions above Share / Pencil: Download, UserPlus, Copy, Trash, Star); expanded=false × state = 4 plus disabled collapsed = 1, all at actions=2 — collapsed draws no actions and a disabled FAB cannot open. label is the aria-label: no Figma property.",
|
|
208
|
+
"stories": {
|
|
209
|
+
"Default": "expanded=false",
|
|
210
|
+
"SpeedDial": "expanded=false",
|
|
211
|
+
"Expanded": "expanded=true",
|
|
212
|
+
"Disabled": "disabled=true",
|
|
213
|
+
"KeyboardSpeedDial": {"figma": "state=focus", "reason": "keyboard focus — the focus ring is drawn in Figma (owner 2026-10-21: focus states are drawn)"}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|