@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
package/src/globals.css
ADDED
|
@@ -0,0 +1,3511 @@
|
|
|
1
|
+
/* Helix DS — global styles. Import once in your app entry. */
|
|
2
|
+
|
|
3
|
+
@import "tailwindcss";
|
|
4
|
+
@import "@helixds/tokens/helix.css";
|
|
5
|
+
|
|
6
|
+
/* ─── Tailwind v4 theme — expose Helix tokens as Tailwind utilities ─────────
|
|
7
|
+
Note: @theme values must be raw values, not var() references.
|
|
8
|
+
We set the most-used scales here for utility-class convenience.
|
|
9
|
+
Always prefer CSS custom properties in component code.
|
|
10
|
+
────────────────────────────────────────────────────────────────────────── */
|
|
11
|
+
|
|
12
|
+
@theme {
|
|
13
|
+
--font-sans: system-ui, -apple-system, 'Segoe UI', Helvetica, sans-serif;
|
|
14
|
+
--font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', ui-monospace, monospace;
|
|
15
|
+
|
|
16
|
+
--color-brand-50: #eff6ff;
|
|
17
|
+
--color-brand-100: #dbeafe;
|
|
18
|
+
--color-brand-500: #3b82f6;
|
|
19
|
+
--color-brand-600: #2563eb;
|
|
20
|
+
--color-brand-700: #1d4ed8;
|
|
21
|
+
|
|
22
|
+
--radius-xs: 2px;
|
|
23
|
+
--radius-s: 4px;
|
|
24
|
+
--radius-m: 6px;
|
|
25
|
+
--radius-l: 8px;
|
|
26
|
+
--radius-xl: 12px;
|
|
27
|
+
--radius-full: 9999px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ─── Base layer ─────────────────────────────────────────────────────────── */
|
|
31
|
+
|
|
32
|
+
@layer base {
|
|
33
|
+
*, *::before, *::after {
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
html {
|
|
38
|
+
-webkit-font-smoothing: antialiased;
|
|
39
|
+
-moz-osx-font-smoothing: grayscale;
|
|
40
|
+
text-rendering: optimizeLegibility;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body {
|
|
44
|
+
background: var(--helix-color-fill-page);
|
|
45
|
+
color: var(--helix-color-text-neutral);
|
|
46
|
+
font-size: var(--helix-primitive-fontSize-m);
|
|
47
|
+
line-height: var(--helix-primitive-lineHeight-normal);
|
|
48
|
+
font-family: var(--helix-primitive-fontFamily-sans);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:focus-visible {
|
|
52
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
53
|
+
outline-offset: 2px;
|
|
54
|
+
border-radius: var(--helix-radius-xs);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (prefers-reduced-motion: reduce) {
|
|
58
|
+
*, *::before, *::after {
|
|
59
|
+
animation-duration: 0.01ms !important;
|
|
60
|
+
animation-iteration-count: 1 !important;
|
|
61
|
+
transition-duration: 0.01ms !important;
|
|
62
|
+
scroll-behavior: auto !important;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* ─── Component layer ────────────────────────────────────────────────────── */
|
|
68
|
+
|
|
69
|
+
@layer components {
|
|
70
|
+
[data-helix-part="chart-root"] { position: relative; font-family: var(--helix-textStyle-body-s-regular-fontFamily); }
|
|
71
|
+
/* Legend: a square swatch + name per series. With 2+ series each entry is a ghost-style toggle button
|
|
72
|
+
(same semantic fills as Button ghost); a single series is a static label with no hover. */
|
|
73
|
+
[data-helix-part="chart-legend"] { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--helix-spacing-2xs); margin-top: var(--helix-spacing-xs); }
|
|
74
|
+
[data-helix-part="chart-legend-item"] {
|
|
75
|
+
display: inline-flex; align-items: center; gap: var(--helix-spacing-xs);
|
|
76
|
+
padding: var(--helix-spacing-2xs) var(--helix-spacing-xs);
|
|
77
|
+
border: 1px solid transparent; border-radius: var(--helix-radius-m);
|
|
78
|
+
background-color: transparent; color: var(--helix-color-text-neutral-light);
|
|
79
|
+
font: inherit; font-size: var(--helix-textStyle-body-s-regular-fontSize); line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
80
|
+
}
|
|
81
|
+
button[data-helix-part="chart-legend-item"] { cursor: pointer; }
|
|
82
|
+
/* Text goes to text-neutral on hover/press: text-neutral-light on the dark-mode press fill is 4.04:1. */
|
|
83
|
+
button[data-helix-part="chart-legend-item"]:hover { background-color: var(--helix-color-fill-secondary-interactive-default); color: var(--helix-color-text-neutral); }
|
|
84
|
+
button[data-helix-part="chart-legend-item"]:active { background-color: var(--helix-color-fill-secondary-interactive-hover); color: var(--helix-color-text-neutral); }
|
|
85
|
+
/* A hidden series: only its name goes gray (text-disabled) — the swatch keeps its color and shape.
|
|
86
|
+
Stays gray on hover too, so the off state never looks like it flipped back on. */
|
|
87
|
+
button[data-helix-part="chart-legend-item"][aria-pressed="false"],
|
|
88
|
+
button[data-helix-part="chart-legend-item"][aria-pressed="false"]:hover,
|
|
89
|
+
button[data-helix-part="chart-legend-item"][aria-pressed="false"]:active { color: var(--helix-color-text-disabled); }
|
|
90
|
+
[data-helix-part="chart-legend-swatch"] {
|
|
91
|
+
flex: none; width: var(--helix-spacing-s); height: var(--helix-spacing-s);
|
|
92
|
+
border-radius: var(--helix-radius-xs); background-color: var(--chart-swatch);
|
|
93
|
+
}
|
|
94
|
+
/* Visually hidden on a wrapper div, not the table itself: a <table> ignores height/overflow, so a hidden
|
|
95
|
+
table kept its full height and stretched the page under every chart. Empty values read "No data", not 0. */
|
|
96
|
+
[data-helix-part="chart-data"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
97
|
+
|
|
98
|
+
/* Storybook Docs preview block only: keep the prose light, darken the live example. */
|
|
99
|
+
:root[data-theme="dark"] .docs-story {
|
|
100
|
+
background: var(--helix-color-fill-page);
|
|
101
|
+
color: var(--helix-color-text-neutral);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
105
|
+
BUTTON
|
|
106
|
+
Contract: contracts/components/Button.json
|
|
107
|
+
Tokens: --helix-button-* (component layer)
|
|
108
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
109
|
+
|
|
110
|
+
[data-helix-part="button"] {
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
gap: var(--helix-primitive-spacing-50);
|
|
115
|
+
font-family: inherit;
|
|
116
|
+
border-radius: var(--helix-button-radius);
|
|
117
|
+
border: var(--helix-borderWidth-thin) solid transparent;
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
transition:
|
|
120
|
+
background-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
121
|
+
border-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
122
|
+
color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
123
|
+
box-shadow var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
user-select: none;
|
|
126
|
+
text-decoration: none;
|
|
127
|
+
outline: none;
|
|
128
|
+
flex-shrink: 0;
|
|
129
|
+
position: relative;
|
|
130
|
+
-webkit-appearance: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Sizes — use component tokens for height + padding */
|
|
134
|
+
[data-helix-part="button"][data-size="s"] {
|
|
135
|
+
height: var(--helix-button-height-s);
|
|
136
|
+
padding: 0 var(--helix-button-padding-x-s);
|
|
137
|
+
font-size: var(--helix-button-fontSize-s);
|
|
138
|
+
font-weight: var(--helix-button-fontWeight-s);
|
|
139
|
+
}
|
|
140
|
+
[data-helix-part="button"][data-size="m"] {
|
|
141
|
+
height: var(--helix-button-height-m);
|
|
142
|
+
padding: 0 var(--helix-button-padding-x-m);
|
|
143
|
+
font-size: var(--helix-button-fontSize-m);
|
|
144
|
+
font-weight: var(--helix-button-fontWeight-m);
|
|
145
|
+
}
|
|
146
|
+
[data-helix-part="button"][data-size="l"] {
|
|
147
|
+
height: var(--helix-button-height-l);
|
|
148
|
+
padding: 0 var(--helix-button-padding-x-l);
|
|
149
|
+
font-size: var(--helix-button-fontSize-l);
|
|
150
|
+
font-weight: var(--helix-button-fontWeight-l);
|
|
151
|
+
}
|
|
152
|
+
/* 16px button padding + 4px label box = 20px per side — two scale steps instead of an off-scale 20px (ADR-004). */
|
|
153
|
+
[data-helix-part="button"][data-size="l"] [data-helix-part="button-label"] {
|
|
154
|
+
padding: 0 var(--helix-button-label-padding-x-l);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Variant: primary */
|
|
158
|
+
[data-helix-part="button"][data-variant="primary"] {
|
|
159
|
+
background-color: var(--helix-button-fill-primary-default);
|
|
160
|
+
color: var(--helix-button-text-primary);
|
|
161
|
+
border-color: var(--helix-button-fill-primary-default);
|
|
162
|
+
}
|
|
163
|
+
[data-helix-part="button"][data-variant="primary"]:hover:not(:disabled):not([data-loading]) {
|
|
164
|
+
background-color: var(--helix-button-fill-primary-hover);
|
|
165
|
+
border-color: var(--helix-button-fill-primary-hover);
|
|
166
|
+
}
|
|
167
|
+
[data-helix-part="button"][data-variant="primary"]:active:not(:disabled):not([data-loading]) {
|
|
168
|
+
background-color: var(--helix-button-fill-primary-press);
|
|
169
|
+
border-color: var(--helix-button-fill-primary-press);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Variant: secondary */
|
|
173
|
+
[data-helix-part="button"][data-variant="secondary"] {
|
|
174
|
+
background-color: var(--helix-button-fill-secondary-default);
|
|
175
|
+
color: var(--helix-button-text-secondary);
|
|
176
|
+
border-color: var(--helix-button-border-secondary-default);
|
|
177
|
+
}
|
|
178
|
+
[data-helix-part="button"][data-variant="secondary"]:hover:not(:disabled):not([data-loading]) {
|
|
179
|
+
background-color: var(--helix-button-fill-secondary-hover);
|
|
180
|
+
border-color: var(--helix-button-border-secondary-hover);
|
|
181
|
+
}
|
|
182
|
+
[data-helix-part="button"][data-variant="secondary"]:active:not(:disabled):not([data-loading]) {
|
|
183
|
+
background-color: var(--helix-button-fill-secondary-press);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Variant: ghost */
|
|
187
|
+
[data-helix-part="button"][data-variant="ghost"] {
|
|
188
|
+
background-color: transparent;
|
|
189
|
+
color: var(--helix-button-text-ghost);
|
|
190
|
+
border-color: transparent;
|
|
191
|
+
}
|
|
192
|
+
/* Own ghost tokens, not secondary's: secondary-default is the page color (white in light mode), so
|
|
193
|
+
reusing it made the ghost hover invisible. Same semantic pair as IconButton ghost. */
|
|
194
|
+
[data-helix-part="button"][data-variant="ghost"]:hover:not(:disabled):not([data-loading]) {
|
|
195
|
+
background-color: var(--helix-button-fill-ghost-hover);
|
|
196
|
+
}
|
|
197
|
+
[data-helix-part="button"][data-variant="ghost"]:active:not(:disabled):not([data-loading]) {
|
|
198
|
+
background-color: var(--helix-button-fill-ghost-press);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Variant: danger */
|
|
202
|
+
[data-helix-part="button"][data-variant="danger"] {
|
|
203
|
+
background-color: var(--helix-button-fill-danger-default);
|
|
204
|
+
color: var(--helix-button-text-danger);
|
|
205
|
+
border-color: var(--helix-button-fill-danger-default);
|
|
206
|
+
}
|
|
207
|
+
[data-helix-part="button"][data-variant="danger"]:hover:not(:disabled):not([data-loading]) {
|
|
208
|
+
background-color: var(--helix-button-fill-danger-hover);
|
|
209
|
+
border-color: var(--helix-button-fill-danger-hover);
|
|
210
|
+
}
|
|
211
|
+
[data-helix-part="button"][data-variant="danger"]:active:not(:disabled):not([data-loading]) {
|
|
212
|
+
background-color: var(--helix-button-fill-danger-press);
|
|
213
|
+
border-color: var(--helix-button-fill-danger-press);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* States */
|
|
217
|
+
/* Loading keeps the variant's own colors — no graying, no opacity. The spinner in front of the
|
|
218
|
+
label is the only visible change; the button still reads as "this is a primary/danger/etc
|
|
219
|
+
action", just busy right now. `disabled` is native on the element while loading (see
|
|
220
|
+
Button.tsx), so every rule below has to say `:not([data-loading])` to stay loading-only. */
|
|
221
|
+
[data-helix-part="button"][data-loading] {
|
|
222
|
+
cursor: not-allowed;
|
|
223
|
+
pointer-events: none;
|
|
224
|
+
}
|
|
225
|
+
/* True disabled (not loading) — a solid gray state via real disabled tokens, never opacity.
|
|
226
|
+
Opacity is reserved for large surfaces/images going translucent as a whole (e.g. disabling an
|
|
227
|
+
entire table) — a small control like this gets its own explicit disabled colors instead. */
|
|
228
|
+
[data-helix-part="button"]:disabled:not([data-loading]) {
|
|
229
|
+
background-color: var(--helix-button-fill-disabled);
|
|
230
|
+
color: var(--helix-button-text-disabled);
|
|
231
|
+
border-color: var(--helix-button-border-disabled);
|
|
232
|
+
cursor: not-allowed;
|
|
233
|
+
pointer-events: none;
|
|
234
|
+
}
|
|
235
|
+
[data-helix-part="button"]:disabled:not([data-loading]) [data-helix-part="button-icon"],
|
|
236
|
+
[data-helix-part="button"]:disabled:not([data-loading]) [data-helix-part="button-icon-end"] {
|
|
237
|
+
color: var(--helix-button-icon-disabled);
|
|
238
|
+
}
|
|
239
|
+
[data-helix-part="button"]:focus-visible {
|
|
240
|
+
outline: 2px solid var(--helix-button-border-focus);
|
|
241
|
+
outline-offset: 2px;
|
|
242
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--helix-button-border-focus) 20%, transparent);
|
|
243
|
+
}
|
|
244
|
+
[data-helix-part="button"][data-full-width] {
|
|
245
|
+
width: 100%;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* Spinner animation */
|
|
249
|
+
[data-helix-part="button-spinner"] {
|
|
250
|
+
animation: helix-spin 0.7s linear infinite;
|
|
251
|
+
flex-shrink: 0;
|
|
252
|
+
}
|
|
253
|
+
@keyframes helix-spin {
|
|
254
|
+
to { transform: rotate(360deg); }
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* Swap in place (transitions.dev "icon swap" + "text morph") — Button.tsx keeps the outgoing content
|
|
258
|
+
for the length of the swap (data-swapping) and stacks it under the incoming one in the same grid
|
|
259
|
+
cell: the first child leaves, the last child arrives. The icon cross-fades with blur and scale
|
|
260
|
+
(scale/filter/opacity, never transform — the spinner's own spin owns transform); the label
|
|
261
|
+
cross-blurs while its width eases to the new text's (set inline by Button.tsx). The global
|
|
262
|
+
reduced-motion rule neutralises all of it, and Button.tsx doesn't stack anything under it. */
|
|
263
|
+
[data-helix-part="button-icon"][data-swapping] {
|
|
264
|
+
display: inline-grid;
|
|
265
|
+
place-items: center;
|
|
266
|
+
}
|
|
267
|
+
[data-helix-part="button-icon"][data-swapping] > * { grid-area: 1 / 1; }
|
|
268
|
+
[data-helix-part="button-icon"][data-swapping] > :first-child {
|
|
269
|
+
animation: helix-button-icon-out var(--helix-button-swap-duration-icon) var(--helix-button-swap-easing-icon) forwards;
|
|
270
|
+
}
|
|
271
|
+
[data-helix-part="button-icon"][data-swapping] > :last-child {
|
|
272
|
+
animation: helix-button-icon-in var(--helix-button-swap-duration-icon) var(--helix-button-swap-easing-icon);
|
|
273
|
+
}
|
|
274
|
+
[data-helix-part="button-icon"][data-swapping] > [data-helix-part="button-spinner"]:first-child {
|
|
275
|
+
animation: helix-button-icon-out var(--helix-button-swap-duration-icon) var(--helix-button-swap-easing-icon) forwards, helix-spin 0.7s linear infinite;
|
|
276
|
+
}
|
|
277
|
+
[data-helix-part="button-icon"][data-swapping] > [data-helix-part="button-spinner"]:last-child {
|
|
278
|
+
animation: helix-button-icon-in var(--helix-button-swap-duration-icon) var(--helix-button-swap-easing-icon), helix-spin 0.7s linear infinite;
|
|
279
|
+
}
|
|
280
|
+
@keyframes helix-button-icon-out {
|
|
281
|
+
to { opacity: 0; scale: var(--helix-button-swap-scale); filter: blur(var(--helix-button-swap-blur)); }
|
|
282
|
+
}
|
|
283
|
+
@keyframes helix-button-icon-in {
|
|
284
|
+
from { opacity: 0; scale: var(--helix-button-swap-scale); filter: blur(var(--helix-button-swap-blur)); }
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
[data-helix-part="button-label"] {
|
|
288
|
+
transition: width var(--helix-button-swap-duration-width) var(--helix-button-swap-easing-label);
|
|
289
|
+
}
|
|
290
|
+
[data-helix-part="button-label"][data-swapping] {
|
|
291
|
+
display: inline-grid;
|
|
292
|
+
justify-items: start;
|
|
293
|
+
white-space: nowrap;
|
|
294
|
+
}
|
|
295
|
+
[data-helix-part="button-label"][data-swapping] > * { grid-area: 1 / 1; white-space: pre; }
|
|
296
|
+
[data-helix-part="button-label"][data-swapping] > :first-child {
|
|
297
|
+
animation: helix-button-label-out var(--helix-button-swap-duration-label) var(--helix-button-swap-easing-label) forwards;
|
|
298
|
+
}
|
|
299
|
+
[data-helix-part="button-label"][data-swapping] > :last-child {
|
|
300
|
+
animation: helix-button-label-in var(--helix-button-swap-duration-label) var(--helix-button-swap-easing-label);
|
|
301
|
+
}
|
|
302
|
+
@keyframes helix-button-label-out {
|
|
303
|
+
to { opacity: 0; filter: blur(var(--helix-button-swap-blur)); }
|
|
304
|
+
}
|
|
305
|
+
@keyframes helix-button-label-in {
|
|
306
|
+
from { opacity: 0; filter: blur(var(--helix-button-swap-blur)); }
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* Icon sizing by size */
|
|
310
|
+
[data-helix-part="button-icon"],
|
|
311
|
+
[data-helix-part="button-icon-end"] {
|
|
312
|
+
display: flex;
|
|
313
|
+
align-items: center;
|
|
314
|
+
flex-shrink: 0;
|
|
315
|
+
}
|
|
316
|
+
/* Icon color per variant — icon tokens only, never inherited from button-text */
|
|
317
|
+
[data-helix-part="button"][data-variant="primary"] [data-helix-part="button-icon"],
|
|
318
|
+
[data-helix-part="button"][data-variant="primary"] [data-helix-part="button-icon-end"] {
|
|
319
|
+
color: var(--helix-button-icon-primary);
|
|
320
|
+
}
|
|
321
|
+
[data-helix-part="button"][data-variant="secondary"] [data-helix-part="button-icon"],
|
|
322
|
+
[data-helix-part="button"][data-variant="secondary"] [data-helix-part="button-icon-end"] {
|
|
323
|
+
color: var(--helix-button-icon-secondary);
|
|
324
|
+
}
|
|
325
|
+
[data-helix-part="button"][data-variant="ghost"] [data-helix-part="button-icon"],
|
|
326
|
+
[data-helix-part="button"][data-variant="ghost"] [data-helix-part="button-icon-end"] {
|
|
327
|
+
color: var(--helix-button-icon-ghost);
|
|
328
|
+
}
|
|
329
|
+
[data-helix-part="button"][data-variant="danger"] [data-helix-part="button-icon"],
|
|
330
|
+
[data-helix-part="button"][data-variant="danger"] [data-helix-part="button-icon-end"] {
|
|
331
|
+
color: var(--helix-button-icon-danger);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
336
|
+
ICON BUTTON
|
|
337
|
+
Contract: contracts/components/IconButton.json
|
|
338
|
+
Tokens: --helix-iconButton-* (component layer)
|
|
339
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
340
|
+
|
|
341
|
+
[data-helix-part="icon-button"] {
|
|
342
|
+
display: inline-flex;
|
|
343
|
+
align-items: center;
|
|
344
|
+
justify-content: center;
|
|
345
|
+
padding: 0;
|
|
346
|
+
border-radius: var(--helix-iconButton-radius);
|
|
347
|
+
border: var(--helix-borderWidth-thin) solid transparent;
|
|
348
|
+
cursor: pointer;
|
|
349
|
+
transition:
|
|
350
|
+
background-color var(--helix-iconButton-transition) var(--helix-primitive-easing-base),
|
|
351
|
+
border-color var(--helix-iconButton-transition) var(--helix-primitive-easing-base),
|
|
352
|
+
color var(--helix-iconButton-transition) var(--helix-primitive-easing-base);
|
|
353
|
+
outline: none;
|
|
354
|
+
flex-shrink: 0;
|
|
355
|
+
position: relative;
|
|
356
|
+
-webkit-appearance: none;
|
|
357
|
+
background-color: transparent;
|
|
358
|
+
border-color: transparent;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* Sizes — square: width matches height, same token */
|
|
362
|
+
[data-helix-part="icon-button"][data-size="s"] {
|
|
363
|
+
width: var(--helix-iconButton-height-s);
|
|
364
|
+
height: var(--helix-iconButton-height-s);
|
|
365
|
+
}
|
|
366
|
+
[data-helix-part="icon-button"][data-size="m"] {
|
|
367
|
+
width: var(--helix-iconButton-height-m);
|
|
368
|
+
height: var(--helix-iconButton-height-m);
|
|
369
|
+
}
|
|
370
|
+
[data-helix-part="icon-button"][data-size="l"] {
|
|
371
|
+
width: var(--helix-iconButton-height-l);
|
|
372
|
+
height: var(--helix-iconButton-height-l);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/* Variant: primary */
|
|
376
|
+
[data-helix-part="icon-button"][data-variant="primary"] {
|
|
377
|
+
background-color: var(--helix-iconButton-fill-primary-default);
|
|
378
|
+
color: var(--helix-iconButton-icon-primary);
|
|
379
|
+
border-color: var(--helix-iconButton-fill-primary-default);
|
|
380
|
+
}
|
|
381
|
+
[data-helix-part="icon-button"][data-variant="primary"]:hover:not(:disabled):not([data-loading]) {
|
|
382
|
+
background-color: var(--helix-iconButton-fill-primary-hover);
|
|
383
|
+
border-color: var(--helix-iconButton-fill-primary-hover);
|
|
384
|
+
}
|
|
385
|
+
[data-helix-part="icon-button"][data-variant="primary"]:active:not(:disabled):not([data-loading]) {
|
|
386
|
+
background-color: var(--helix-iconButton-fill-primary-press);
|
|
387
|
+
border-color: var(--helix-iconButton-fill-primary-press);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/* Variant: secondary */
|
|
391
|
+
[data-helix-part="icon-button"][data-variant="secondary"] {
|
|
392
|
+
background-color: var(--helix-iconButton-fill-secondary-default);
|
|
393
|
+
color: var(--helix-iconButton-icon-secondary);
|
|
394
|
+
border-color: var(--helix-iconButton-border-secondary-default);
|
|
395
|
+
}
|
|
396
|
+
[data-helix-part="icon-button"][data-variant="secondary"]:hover:not(:disabled):not([data-loading]) {
|
|
397
|
+
background-color: var(--helix-iconButton-fill-secondary-hover);
|
|
398
|
+
border-color: var(--helix-iconButton-border-secondary-hover);
|
|
399
|
+
}
|
|
400
|
+
[data-helix-part="icon-button"][data-variant="secondary"]:active:not(:disabled):not([data-loading]) {
|
|
401
|
+
background-color: var(--helix-iconButton-fill-secondary-press);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* Variant: ghost */
|
|
405
|
+
[data-helix-part="icon-button"][data-variant="ghost"] {
|
|
406
|
+
background-color: transparent;
|
|
407
|
+
color: var(--helix-iconButton-icon-ghost);
|
|
408
|
+
border-color: transparent;
|
|
409
|
+
}
|
|
410
|
+
[data-helix-part="icon-button"][data-variant="ghost"]:hover:not(:disabled):not([data-loading]) {
|
|
411
|
+
background-color: var(--helix-iconButton-fill-secondary-default);
|
|
412
|
+
}
|
|
413
|
+
[data-helix-part="icon-button"][data-variant="ghost"]:active:not(:disabled):not([data-loading]) {
|
|
414
|
+
background-color: var(--helix-iconButton-fill-secondary-hover);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/* Variant: danger */
|
|
418
|
+
[data-helix-part="icon-button"][data-variant="danger"] {
|
|
419
|
+
background-color: var(--helix-iconButton-fill-danger-default);
|
|
420
|
+
color: var(--helix-iconButton-icon-danger);
|
|
421
|
+
border-color: var(--helix-iconButton-fill-danger-default);
|
|
422
|
+
}
|
|
423
|
+
[data-helix-part="icon-button"][data-variant="danger"]:hover:not(:disabled):not([data-loading]) {
|
|
424
|
+
background-color: var(--helix-iconButton-fill-danger-hover);
|
|
425
|
+
border-color: var(--helix-iconButton-fill-danger-hover);
|
|
426
|
+
}
|
|
427
|
+
[data-helix-part="icon-button"][data-variant="danger"]:active:not(:disabled):not([data-loading]) {
|
|
428
|
+
background-color: var(--helix-iconButton-fill-danger-press);
|
|
429
|
+
border-color: var(--helix-iconButton-fill-danger-press);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/* States — see .ai/maps/patterns/disabled-state.md: loading keeps the variant's own colors,
|
|
433
|
+
disabled gets a real gray via dedicated tokens, never opacity. */
|
|
434
|
+
[data-helix-part="icon-button"][data-loading] {
|
|
435
|
+
cursor: not-allowed;
|
|
436
|
+
pointer-events: none;
|
|
437
|
+
}
|
|
438
|
+
[data-helix-part="icon-button"]:disabled:not([data-loading]) {
|
|
439
|
+
background-color: var(--helix-iconButton-fill-disabled);
|
|
440
|
+
color: var(--helix-iconButton-icon-disabled);
|
|
441
|
+
border-color: var(--helix-iconButton-border-disabled);
|
|
442
|
+
cursor: not-allowed;
|
|
443
|
+
pointer-events: none;
|
|
444
|
+
}
|
|
445
|
+
[data-helix-part="icon-button"]:focus-visible {
|
|
446
|
+
outline: 2px solid var(--helix-iconButton-border-focus);
|
|
447
|
+
outline-offset: 2px;
|
|
448
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--helix-iconButton-border-focus) 20%, transparent);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* Spinner animation — shares the same @keyframes helix-spin defined in BUTTON above */
|
|
452
|
+
[data-helix-part="icon-button-spinner"] {
|
|
453
|
+
animation: helix-spin 0.7s linear infinite;
|
|
454
|
+
flex-shrink: 0;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
459
|
+
FAB
|
|
460
|
+
Contract: contracts/components/FAB.json
|
|
461
|
+
Tokens: --helix-fab-* (component layer)
|
|
462
|
+
Motion: Speed-dial expand/collapse via Motion springs — see ADR-007 and
|
|
463
|
+
.ai/maps/patterns/motion-effects.md. Position/transform of the
|
|
464
|
+
trigger and its actions is owned by motion.button at the JS
|
|
465
|
+
layer (FAB.tsx) — this block only styles the buttons' own
|
|
466
|
+
resting look (fill/icon/radius/shadow), never their transform.
|
|
467
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
468
|
+
|
|
469
|
+
[data-helix-part="fab-root-wrapper"] {
|
|
470
|
+
position: relative;
|
|
471
|
+
display: inline-flex;
|
|
472
|
+
/* Explicit, guaranteed 48×48 box — fab-actions' `inset: 0` positions itself against THIS box, not
|
|
473
|
+
against whatever size <Liquid>'s own internal rendering happens to produce. Without this, the
|
|
474
|
+
stacked actions' resting anchor point is undefined and the morph offsets read as overlapping
|
|
475
|
+
instead of cleanly separated. */
|
|
476
|
+
width: var(--helix-fab-height);
|
|
477
|
+
height: var(--helix-fab-height);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
[data-helix-part="fab-root"] {
|
|
481
|
+
/* Above fab-actions, which now follow it in DOM order (Tab order = visual order): collapsing
|
|
482
|
+
actions must still slide in under the trigger, not over it. */
|
|
483
|
+
position: relative;
|
|
484
|
+
z-index: 1;
|
|
485
|
+
display: inline-flex;
|
|
486
|
+
align-items: center;
|
|
487
|
+
justify-content: center;
|
|
488
|
+
width: var(--helix-fab-height);
|
|
489
|
+
height: var(--helix-fab-height);
|
|
490
|
+
border-radius: var(--helix-fab-radius);
|
|
491
|
+
border: none;
|
|
492
|
+
padding: 0;
|
|
493
|
+
background-color: var(--helix-fab-fill-default);
|
|
494
|
+
color: var(--helix-fab-icon);
|
|
495
|
+
box-shadow: var(--helix-fab-shadow);
|
|
496
|
+
cursor: pointer;
|
|
497
|
+
outline: none;
|
|
498
|
+
flex-shrink: 0;
|
|
499
|
+
-webkit-appearance: none;
|
|
500
|
+
transition: background-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
501
|
+
}
|
|
502
|
+
[data-helix-part="fab-root"]:hover:not(:disabled) {
|
|
503
|
+
background-color: var(--helix-fab-fill-hover);
|
|
504
|
+
}
|
|
505
|
+
[data-helix-part="fab-root"]:active:not(:disabled) {
|
|
506
|
+
background-color: var(--helix-fab-fill-press);
|
|
507
|
+
}
|
|
508
|
+
/* Real disabled colors, not opacity — .ai/maps/patterns/disabled-state.md */
|
|
509
|
+
[data-helix-part="fab-root"]:disabled {
|
|
510
|
+
background-color: var(--helix-fab-fill-disabled);
|
|
511
|
+
color: var(--helix-fab-icon-disabled);
|
|
512
|
+
box-shadow: none;
|
|
513
|
+
cursor: not-allowed;
|
|
514
|
+
pointer-events: none;
|
|
515
|
+
}
|
|
516
|
+
[data-helix-part="fab-root"]:focus-visible {
|
|
517
|
+
outline: 2px solid var(--helix-fab-border-focus);
|
|
518
|
+
outline-offset: 2px;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/* Trigger icon rotates 45° when the speed-dial is expanded — a plain "+" reads as a close/"×" affordance
|
|
522
|
+
without needing a second icon swap. CSS transform only; independent of the Morph silhouette itself. */
|
|
523
|
+
[data-helix-part="fab-icon"] {
|
|
524
|
+
display: inline-flex;
|
|
525
|
+
transition: transform var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
526
|
+
}
|
|
527
|
+
[data-helix-part="fab-icon"][data-expanded="true"] {
|
|
528
|
+
transform: rotate(45deg);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
[data-helix-part="fab-actions"] {
|
|
532
|
+
position: absolute;
|
|
533
|
+
inset: 0;
|
|
534
|
+
pointer-events: none;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
[data-helix-part="fab-action"] {
|
|
538
|
+
display: inline-flex;
|
|
539
|
+
align-items: center;
|
|
540
|
+
justify-content: center;
|
|
541
|
+
width: var(--helix-fab-action-height);
|
|
542
|
+
height: var(--helix-fab-action-height);
|
|
543
|
+
border-radius: var(--helix-fab-radius);
|
|
544
|
+
border: 1px solid var(--helix-fab-action-border);
|
|
545
|
+
padding: 0;
|
|
546
|
+
background-color: var(--helix-fab-action-fill);
|
|
547
|
+
color: var(--helix-fab-action-icon);
|
|
548
|
+
box-shadow: var(--helix-fab-action-shadow);
|
|
549
|
+
cursor: pointer;
|
|
550
|
+
outline: none;
|
|
551
|
+
pointer-events: auto;
|
|
552
|
+
-webkit-appearance: none;
|
|
553
|
+
}
|
|
554
|
+
[data-helix-part="fab-action"]:disabled {
|
|
555
|
+
background-color: var(--helix-fab-action-fill-disabled);
|
|
556
|
+
border-color: var(--helix-fab-action-border-disabled);
|
|
557
|
+
color: var(--helix-fab-action-icon-disabled);
|
|
558
|
+
box-shadow: none;
|
|
559
|
+
cursor: not-allowed;
|
|
560
|
+
pointer-events: none;
|
|
561
|
+
}
|
|
562
|
+
[data-helix-part="fab-action"]:focus-visible {
|
|
563
|
+
outline: 2px solid var(--helix-fab-border-focus);
|
|
564
|
+
outline-offset: 2px;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
569
|
+
INPUT
|
|
570
|
+
Contract: contracts/components/Input.json
|
|
571
|
+
Tokens: --helix-input-* (component layer)
|
|
572
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
573
|
+
|
|
574
|
+
[data-helix-part="input-root"] {
|
|
575
|
+
display: flex;
|
|
576
|
+
flex-direction: column;
|
|
577
|
+
gap: var(--helix-input-gap);
|
|
578
|
+
/* Every form field shares one width and never grows or shrinks with its content (owner's rule 2026-10-21,
|
|
579
|
+
contracts/figma-conversion.json → patterns.form-field.width); fullWidth fills the container. A per-component
|
|
580
|
+
width, not a token (CLAUDE.md token policy: widths are a component characteristic). */
|
|
581
|
+
width: 320px;
|
|
582
|
+
max-width: 100%;
|
|
583
|
+
}
|
|
584
|
+
[data-helix-part="input-root"][data-full-width] {
|
|
585
|
+
width: 100%;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
[data-helix-part="input-label"] {
|
|
589
|
+
font-family: var(--helix-textStyle-body-m-medium-fontFamily); /* the one form label — same as checkbox-group/radio legends */
|
|
590
|
+
font-size: var(--helix-input-text-labelFontSize);
|
|
591
|
+
font-weight: var(--helix-input-text-labelFontWeight);
|
|
592
|
+
color: var(--helix-input-text-label);
|
|
593
|
+
line-height: var(--helix-textStyle-body-m-medium-lineHeight);
|
|
594
|
+
}
|
|
595
|
+
[data-helix-part="input-required"] {
|
|
596
|
+
color: var(--helix-color-text-danger);
|
|
597
|
+
margin-left: var(--helix-spacing-3xs);
|
|
598
|
+
}
|
|
599
|
+
/* Disabled dims every text part — .ai/maps/patterns/disabled-state.md */
|
|
600
|
+
[data-helix-part="input-root"][data-disabled] :is([data-helix-part="input-label"], [data-helix-part="input-required"], [data-helix-part="input-description"]) {
|
|
601
|
+
color: var(--helix-input-text-disabled);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
[data-helix-part="input-wrapper"] {
|
|
605
|
+
position: relative;
|
|
606
|
+
display: flex;
|
|
607
|
+
align-items: center;
|
|
608
|
+
background-color: var(--helix-input-fill-default);
|
|
609
|
+
border: var(--helix-borderWidth-thin) solid var(--helix-input-border-default);
|
|
610
|
+
border-radius: var(--helix-input-radius);
|
|
611
|
+
/* Height (border-box, border included) lives here, on the bordered element,
|
|
612
|
+
not on input-field — matching Button/Select's model where the sized,
|
|
613
|
+
bordered element are the same node. Previously input-field alone carried
|
|
614
|
+
a fixed height while this wrapper's own border sat outside it, making
|
|
615
|
+
Input ~3px taller than a same-size Button at the same nominal size. */
|
|
616
|
+
height: var(--helix-input-height-m);
|
|
617
|
+
transition:
|
|
618
|
+
border-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
619
|
+
border-width var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
620
|
+
box-shadow var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
621
|
+
}
|
|
622
|
+
/* :not(:focus-within) — without it, hover's own specificity (4 compound selectors) beats the
|
|
623
|
+
focus rule below (3), so a focused-AND-hovered field silently fell back to the gray hover
|
|
624
|
+
border instead of staying blue. Hover must yield whenever the field is actually focused. */
|
|
625
|
+
[data-helix-part="input-wrapper"]:hover:not([data-disabled]):not([data-invalid]):not(:focus-within) {
|
|
626
|
+
border-color: var(--helix-input-border-hover);
|
|
627
|
+
}
|
|
628
|
+
[data-helix-part="input-wrapper"]:focus-within:not([data-invalid]) {
|
|
629
|
+
border-color: var(--helix-input-border-focus);
|
|
630
|
+
box-shadow: var(--helix-input-shadow-focus);
|
|
631
|
+
}
|
|
632
|
+
[data-helix-part="input-wrapper"][data-invalid] {
|
|
633
|
+
border-color: var(--helix-input-border-invalid);
|
|
634
|
+
}
|
|
635
|
+
[data-helix-part="input-wrapper"][data-invalid]:focus-within {
|
|
636
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--helix-input-border-invalid) 20%, transparent);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/* Error-state shake — plays once when a field transitions into `invalid`
|
|
640
|
+
(see Input.tsx's remove/reflow/reapply on `data-shaking`), not a Motion
|
|
641
|
+
effect: bespoke per-segment easing authored in Figma, not the shared
|
|
642
|
+
duration/easing scale — same "plain CSS, not Motion" call as Checkbox/
|
|
643
|
+
RadioGroup's check pop-in. See .ai/maps/patterns/motion-effects.md.
|
|
644
|
+
Values are real tokens now (component.input.shake.* in tokens.json,
|
|
645
|
+
documented as an exception in component-token-exceptions.md) — no
|
|
646
|
+
longer declared locally here, `--helix-input-shake-*` comes from
|
|
647
|
+
@helixds/tokens/helix.css like every other component token. */
|
|
648
|
+
[data-helix-part="input-wrapper"][data-shaking="true"] {
|
|
649
|
+
animation: helix-input-shake calc(
|
|
650
|
+
var(--helix-input-shake-dur-a) * 2 + var(--helix-input-shake-dur-b) * 2
|
|
651
|
+
) linear;
|
|
652
|
+
}
|
|
653
|
+
@keyframes helix-input-shake {
|
|
654
|
+
0% { transform: translateX(0); animation-timing-function: var(--helix-input-shake-ease); }
|
|
655
|
+
28.57% { transform: translateX(var(--helix-input-shake-distance)); animation-timing-function: var(--helix-input-shake-ease); }
|
|
656
|
+
57.14% { transform: translateX(calc(var(--helix-input-shake-distance) * -1)); animation-timing-function: var(--helix-input-shake-ease); }
|
|
657
|
+
78.57% { transform: translateX(var(--helix-input-shake-overshoot)); animation-timing-function: var(--helix-input-shake-ease); }
|
|
658
|
+
100% { transform: translateX(0); }
|
|
659
|
+
}
|
|
660
|
+
@media (prefers-reduced-motion: reduce) {
|
|
661
|
+
[data-helix-part="input-wrapper"][data-shaking="true"] {
|
|
662
|
+
animation: none;
|
|
663
|
+
transform: none;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
[data-helix-part="input-wrapper"][data-disabled] {
|
|
668
|
+
background-color: var(--helix-input-fill-disabled);
|
|
669
|
+
border-color: var(--helix-input-border-disabled);
|
|
670
|
+
cursor: not-allowed;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
[data-helix-part="input-field"] {
|
|
674
|
+
flex: 1;
|
|
675
|
+
background: transparent;
|
|
676
|
+
border: none;
|
|
677
|
+
outline: none;
|
|
678
|
+
color: var(--helix-input-text-value);
|
|
679
|
+
font-family: inherit;
|
|
680
|
+
font-size: var(--helix-input-text-valueFontSize-m);
|
|
681
|
+
/* Own weight, never inherited — an Input placed in a bold context (a Card header) rendered its
|
|
682
|
+
value bold. Value text is always regular, like every other field. */
|
|
683
|
+
font-weight: var(--helix-textStyle-body-m-regular-fontWeight);
|
|
684
|
+
padding: 0 var(--helix-primitive-spacing-75);
|
|
685
|
+
min-width: 0;
|
|
686
|
+
/* Fills the wrapper's own height (see input-wrapper) — not an independent
|
|
687
|
+
fixed height, so it can never make the wrapper taller than its token. */
|
|
688
|
+
height: 100%;
|
|
689
|
+
}
|
|
690
|
+
/* line height from the shared scale (lineHeight-m = Figma's lineHeight/m) — one size, m: form fields share one size set */
|
|
691
|
+
[data-helix-part="input-field"] { line-height: var(--helix-lineHeight-m); }
|
|
692
|
+
[data-helix-part="input-field"]::placeholder {
|
|
693
|
+
color: var(--helix-input-text-placeholder);
|
|
694
|
+
}
|
|
695
|
+
[data-helix-part="input-field"]:disabled,
|
|
696
|
+
[data-helix-part="input-field"]:disabled::placeholder {
|
|
697
|
+
cursor: not-allowed;
|
|
698
|
+
color: var(--helix-input-text-disabled);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
[data-helix-part="input-icon"],
|
|
702
|
+
[data-helix-part="input-icon-end"],
|
|
703
|
+
[data-helix-part="input-spinner"] {
|
|
704
|
+
display: flex;
|
|
705
|
+
align-items: center;
|
|
706
|
+
color: var(--helix-input-icon-default);
|
|
707
|
+
flex-shrink: 0;
|
|
708
|
+
height: 100%;
|
|
709
|
+
}
|
|
710
|
+
[data-helix-part="input-icon"] {
|
|
711
|
+
padding-left: var(--helix-primitive-spacing-75);
|
|
712
|
+
padding-right: var(--helix-primitive-spacing-25);
|
|
713
|
+
}
|
|
714
|
+
[data-helix-part="input-icon-end"],
|
|
715
|
+
[data-helix-part="input-spinner"] {
|
|
716
|
+
padding-right: var(--helix-primitive-spacing-75);
|
|
717
|
+
padding-left: var(--helix-primitive-spacing-25);
|
|
718
|
+
}
|
|
719
|
+
[data-helix-part="input-spinner"] > svg {
|
|
720
|
+
animation: helix-spin 0.7s linear infinite; /* reduced motion: the global rule stops it after one turn */
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
[data-helix-part="input-description"] {
|
|
724
|
+
font-size: var(--helix-input-text-descriptionFontSize);
|
|
725
|
+
color: var(--helix-input-text-description);
|
|
726
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
727
|
+
}
|
|
728
|
+
[data-helix-part="input-error"] {
|
|
729
|
+
font-size: var(--helix-input-text-errorFontSize);
|
|
730
|
+
color: var(--helix-input-text-error);
|
|
731
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
732
|
+
display: flex;
|
|
733
|
+
align-items: center;
|
|
734
|
+
gap: var(--helix-primitive-spacing-25);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
739
|
+
BADGE
|
|
740
|
+
Contract: contracts/components/Badge.json
|
|
741
|
+
Tokens: --helix-badge-* (component layer)
|
|
742
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
743
|
+
|
|
744
|
+
[data-helix-part="badge"] {
|
|
745
|
+
display: inline-flex;
|
|
746
|
+
align-items: center;
|
|
747
|
+
box-sizing: border-box;
|
|
748
|
+
border-radius: var(--helix-badge-radius);
|
|
749
|
+
height: var(--helix-badge-height-s);
|
|
750
|
+
font-family: var(--helix-badge-fontFamily);
|
|
751
|
+
font-size: var(--helix-badge-fontSize);
|
|
752
|
+
font-weight: var(--helix-badge-fontWeight);
|
|
753
|
+
white-space: nowrap;
|
|
754
|
+
line-height: var(--helix-badge-lineHeight);
|
|
755
|
+
border: 1px solid transparent;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/* Side padding = badge padding + badge-content's 2px: xs 4+2 = 6px, s 8+2 = 10px — scale tokens only,
|
|
759
|
+
split across two nested boxes instead of an off-scale literal. No vertical padding: the height is
|
|
760
|
+
fixed and the content centered. */
|
|
761
|
+
[data-helix-part="badge"][data-size="xs"] {
|
|
762
|
+
padding: 0 var(--helix-spacing-2xs);
|
|
763
|
+
height: var(--helix-badge-height-xs);
|
|
764
|
+
}
|
|
765
|
+
[data-helix-part="badge"][data-size="s"] {
|
|
766
|
+
padding: 0 var(--helix-spacing-xs);
|
|
767
|
+
}
|
|
768
|
+
[data-helix-part="badge-content"] {
|
|
769
|
+
display: inline-flex;
|
|
770
|
+
align-items: center;
|
|
771
|
+
gap: var(--helix-spacing-2xs);
|
|
772
|
+
padding: 0 var(--helix-spacing-3xs);
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
[data-helix-part="badge"][data-variant="neutral"] {
|
|
776
|
+
background-color: var(--helix-badge-fill-neutral);
|
|
777
|
+
color: var(--helix-badge-text-neutral);
|
|
778
|
+
border-color: var(--helix-badge-border-neutral);
|
|
779
|
+
}
|
|
780
|
+
[data-helix-part="badge"][data-variant="info"] {
|
|
781
|
+
background-color: var(--helix-badge-fill-info);
|
|
782
|
+
color: var(--helix-badge-text-info);
|
|
783
|
+
border-color: var(--helix-badge-border-info);
|
|
784
|
+
}
|
|
785
|
+
[data-helix-part="badge"][data-variant="success"] {
|
|
786
|
+
background-color: var(--helix-badge-fill-success);
|
|
787
|
+
color: var(--helix-badge-text-success);
|
|
788
|
+
border-color: var(--helix-badge-border-success);
|
|
789
|
+
}
|
|
790
|
+
[data-helix-part="badge"][data-variant="warning"] {
|
|
791
|
+
background-color: var(--helix-badge-fill-warning);
|
|
792
|
+
color: var(--helix-badge-text-warning);
|
|
793
|
+
border-color: var(--helix-badge-border-warning);
|
|
794
|
+
}
|
|
795
|
+
[data-helix-part="badge"][data-variant="danger"] {
|
|
796
|
+
background-color: var(--helix-badge-fill-danger);
|
|
797
|
+
color: var(--helix-badge-text-danger);
|
|
798
|
+
border-color: var(--helix-badge-border-danger);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
[data-helix-part="badge-icon"] {
|
|
802
|
+
display: flex;
|
|
803
|
+
align-items: center;
|
|
804
|
+
flex-shrink: 0;
|
|
805
|
+
}
|
|
806
|
+
[data-helix-part="badge"][data-variant="neutral"] [data-helix-part="badge-icon"] {
|
|
807
|
+
color: var(--helix-badge-icon-neutral);
|
|
808
|
+
}
|
|
809
|
+
[data-helix-part="badge"][data-variant="info"] [data-helix-part="badge-icon"] {
|
|
810
|
+
color: var(--helix-badge-icon-info);
|
|
811
|
+
}
|
|
812
|
+
[data-helix-part="badge"][data-variant="success"] [data-helix-part="badge-icon"] {
|
|
813
|
+
color: var(--helix-badge-icon-success);
|
|
814
|
+
}
|
|
815
|
+
[data-helix-part="badge"][data-variant="warning"] [data-helix-part="badge-icon"] {
|
|
816
|
+
color: var(--helix-badge-icon-warning);
|
|
817
|
+
}
|
|
818
|
+
[data-helix-part="badge"][data-variant="danger"] [data-helix-part="badge-icon"] {
|
|
819
|
+
color: var(--helix-badge-icon-danger);
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
824
|
+
CHIP
|
|
825
|
+
Contract: contracts/components/Chip.json
|
|
826
|
+
Tokens: --helix-chip-* (component layer)
|
|
827
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
828
|
+
|
|
829
|
+
/* The pill lives on chip-shell, with the same 12px padding on both sides whatever it contains: the
|
|
830
|
+
icons and the dismiss button are plain show/hide parts that bring their own spacing (2px on the label
|
|
831
|
+
side, spacing-3xs), so toggling any of them never changes a padding — the same structure Figma uses,
|
|
832
|
+
where icon / iconEnd / dismissible are BOOLEAN properties (.ai/maps/patterns/show-hide-parts.md).
|
|
833
|
+
The chip button itself is transparent; its ::after stretches over the whole pill so the full chip is
|
|
834
|
+
still clickable, and the dismiss button sits above it. Hover/press follow the chip button, not the
|
|
835
|
+
shell, so pointing at the × shows only the ×'s own round hover. */
|
|
836
|
+
[data-helix-part="chip-shell"] {
|
|
837
|
+
position: relative;
|
|
838
|
+
display: inline-flex;
|
|
839
|
+
align-items: center;
|
|
840
|
+
box-sizing: border-box;
|
|
841
|
+
gap: var(--helix-chip-gap-m);
|
|
842
|
+
height: var(--helix-chip-height-m);
|
|
843
|
+
padding: 0 var(--helix-chip-padding-x-m);
|
|
844
|
+
border-radius: var(--helix-chip-radius);
|
|
845
|
+
border: var(--helix-chip-border-width) solid var(--helix-color-border-neutral);
|
|
846
|
+
background: var(--helix-color-fill-surface);
|
|
847
|
+
color: var(--helix-color-text-neutral);
|
|
848
|
+
font-size: var(--helix-chip-fontSize-m);
|
|
849
|
+
font-weight: var(--helix-chip-fontWeight);
|
|
850
|
+
line-height: var(--helix-textStyle-body-s-medium-lineHeight); /* Body / s / Medium, as in Figma (the 24/32px height keeps the label centered) */
|
|
851
|
+
white-space: nowrap;
|
|
852
|
+
user-select: none;
|
|
853
|
+
transition:
|
|
854
|
+
background-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
855
|
+
border-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
856
|
+
color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
857
|
+
}
|
|
858
|
+
[data-helix-part="chip-shell"][data-size="s"] {
|
|
859
|
+
gap: var(--helix-chip-gap-s);
|
|
860
|
+
height: var(--helix-chip-height-s);
|
|
861
|
+
padding: 0 var(--helix-chip-padding-x-s);
|
|
862
|
+
font-size: var(--helix-chip-fontSize-s);
|
|
863
|
+
}
|
|
864
|
+
[data-helix-part="chip-shell"][data-size="m"] {
|
|
865
|
+
gap: var(--helix-chip-gap-m);
|
|
866
|
+
height: var(--helix-chip-height-m);
|
|
867
|
+
padding: 0 var(--helix-chip-padding-x-m);
|
|
868
|
+
font-size: var(--helix-chip-fontSize-m);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
[data-helix-part="chip"] {
|
|
872
|
+
display: inline-flex;
|
|
873
|
+
align-items: center;
|
|
874
|
+
gap: inherit;
|
|
875
|
+
height: 100%;
|
|
876
|
+
padding: 0;
|
|
877
|
+
margin: 0;
|
|
878
|
+
border: none;
|
|
879
|
+
background: transparent;
|
|
880
|
+
color: inherit;
|
|
881
|
+
font: inherit;
|
|
882
|
+
line-height: inherit;
|
|
883
|
+
text-decoration: none;
|
|
884
|
+
outline: none;
|
|
885
|
+
-webkit-appearance: none;
|
|
886
|
+
appearance: none;
|
|
887
|
+
cursor: pointer;
|
|
888
|
+
}
|
|
889
|
+
[data-helix-part="chip"]::after {
|
|
890
|
+
content: '';
|
|
891
|
+
position: absolute;
|
|
892
|
+
inset: 0;
|
|
893
|
+
border-radius: var(--helix-chip-radius);
|
|
894
|
+
}
|
|
895
|
+
[data-helix-part="chip-shell"]:has([data-helix-part="chip"]:focus-visible) {
|
|
896
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
897
|
+
outline-offset: 2px;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
/* Disabled keeps the variant's colors at 0.72 opacity (as before the restructure). */
|
|
901
|
+
[data-helix-part="chip-shell"][data-disabled] {
|
|
902
|
+
opacity: 0.72;
|
|
903
|
+
cursor: not-allowed;
|
|
904
|
+
}
|
|
905
|
+
[data-helix-part="chip"]:disabled { cursor: not-allowed; }
|
|
906
|
+
|
|
907
|
+
/* One gray step per state on the neutral variant (fill.secondary-interactive-* ladder). */
|
|
908
|
+
[data-helix-part="chip-shell"][data-variant="neutral"] {
|
|
909
|
+
background: var(--helix-color-fill-surface);
|
|
910
|
+
color: var(--helix-color-text-neutral);
|
|
911
|
+
border-color: var(--helix-color-border-neutral);
|
|
912
|
+
}
|
|
913
|
+
[data-helix-part="chip-shell"][data-variant="neutral"]:not([data-disabled]):has([data-helix-part="chip"]:hover) {
|
|
914
|
+
background: var(--helix-color-fill-secondary-interactive-default);
|
|
915
|
+
border-color: var(--helix-color-border-neutral-dark);
|
|
916
|
+
}
|
|
917
|
+
[data-helix-part="chip-shell"][data-variant="neutral"]:not([data-disabled]):has([data-helix-part="chip"]:active) {
|
|
918
|
+
background: var(--helix-color-fill-secondary-interactive-hover);
|
|
919
|
+
}
|
|
920
|
+
[data-helix-part="chip-shell"][data-variant="info"] {
|
|
921
|
+
background: var(--helix-color-fill-info-light);
|
|
922
|
+
color: var(--helix-color-text-info);
|
|
923
|
+
border-color: var(--helix-color-border-info);
|
|
924
|
+
}
|
|
925
|
+
[data-helix-part="chip-shell"][data-variant="info"]:not([data-disabled]):has([data-helix-part="chip"]:hover) {
|
|
926
|
+
background: color-mix(in srgb, var(--helix-color-fill-info-light) 84%, var(--helix-color-fill-page));
|
|
927
|
+
}
|
|
928
|
+
[data-helix-part="chip-shell"][data-variant="info"]:not([data-disabled]):has([data-helix-part="chip"]:active) {
|
|
929
|
+
background: color-mix(in srgb, var(--helix-color-fill-info-light) 72%, var(--helix-color-fill-page));
|
|
930
|
+
}
|
|
931
|
+
[data-helix-part="chip-shell"][data-variant="success"] {
|
|
932
|
+
background: var(--helix-color-fill-success-light);
|
|
933
|
+
color: var(--helix-color-text-success);
|
|
934
|
+
border-color: var(--helix-color-border-success);
|
|
935
|
+
}
|
|
936
|
+
[data-helix-part="chip-shell"][data-variant="success"]:not([data-disabled]):has([data-helix-part="chip"]:hover) {
|
|
937
|
+
background: color-mix(in srgb, var(--helix-color-fill-success-light) 84%, var(--helix-color-fill-page));
|
|
938
|
+
}
|
|
939
|
+
[data-helix-part="chip-shell"][data-variant="success"]:not([data-disabled]):has([data-helix-part="chip"]:active) {
|
|
940
|
+
background: color-mix(in srgb, var(--helix-color-fill-success-light) 72%, var(--helix-color-fill-page));
|
|
941
|
+
}
|
|
942
|
+
[data-helix-part="chip-shell"][data-variant="warning"] {
|
|
943
|
+
background: var(--helix-color-fill-warning-light);
|
|
944
|
+
color: var(--helix-color-text-warning);
|
|
945
|
+
border-color: var(--helix-color-border-warning);
|
|
946
|
+
}
|
|
947
|
+
[data-helix-part="chip-shell"][data-variant="warning"]:not([data-disabled]):has([data-helix-part="chip"]:hover) {
|
|
948
|
+
background: color-mix(in srgb, var(--helix-color-fill-warning-light) 84%, var(--helix-color-fill-page));
|
|
949
|
+
}
|
|
950
|
+
[data-helix-part="chip-shell"][data-variant="warning"]:not([data-disabled]):has([data-helix-part="chip"]:active) {
|
|
951
|
+
background: color-mix(in srgb, var(--helix-color-fill-warning-light) 72%, var(--helix-color-fill-page));
|
|
952
|
+
}
|
|
953
|
+
[data-helix-part="chip-shell"][data-variant="danger"] {
|
|
954
|
+
background: var(--helix-color-fill-danger-interactive-light-default);
|
|
955
|
+
color: var(--helix-color-text-danger);
|
|
956
|
+
border-color: var(--helix-color-border-danger);
|
|
957
|
+
}
|
|
958
|
+
[data-helix-part="chip-shell"][data-variant="danger"]:not([data-disabled]):has([data-helix-part="chip"]:hover) {
|
|
959
|
+
background: color-mix(in srgb, var(--helix-color-fill-danger-interactive-light-default) 84%, var(--helix-color-fill-page));
|
|
960
|
+
}
|
|
961
|
+
[data-helix-part="chip-shell"][data-variant="danger"]:not([data-disabled]):has([data-helix-part="chip"]:active) {
|
|
962
|
+
background: color-mix(in srgb, var(--helix-color-fill-danger-interactive-light-default) 72%, var(--helix-color-fill-page));
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
[data-helix-part="chip-icon"],
|
|
966
|
+
[data-helix-part="chip-icon-end"] {
|
|
967
|
+
display: flex;
|
|
968
|
+
align-items: center;
|
|
969
|
+
flex-shrink: 0;
|
|
970
|
+
}
|
|
971
|
+
/* 4px chip gap + 2px here = 6px icon-to-label, built only from scale tokens (spacing-2xs + spacing-3xs). */
|
|
972
|
+
[data-helix-part="chip-icon"] { padding-right: var(--helix-spacing-3xs); }
|
|
973
|
+
[data-helix-part="chip-icon-end"] { padding-left: var(--helix-spacing-3xs); }
|
|
974
|
+
/* Icon color per variant — icon tokens on neutral; on a colored tint an icon matches its label's text tone. */
|
|
975
|
+
[data-helix-part="chip-shell"][data-variant="neutral"] :is([data-helix-part="chip-icon"], [data-helix-part="chip-icon-end"]) {
|
|
976
|
+
color: var(--helix-color-icon-neutral);
|
|
977
|
+
}
|
|
978
|
+
[data-helix-part="chip-shell"][data-variant="info"] :is([data-helix-part="chip-icon"], [data-helix-part="chip-icon-end"]) {
|
|
979
|
+
color: var(--helix-color-text-info);
|
|
980
|
+
}
|
|
981
|
+
[data-helix-part="chip-shell"][data-variant="success"] :is([data-helix-part="chip-icon"], [data-helix-part="chip-icon-end"]) {
|
|
982
|
+
color: var(--helix-color-text-success);
|
|
983
|
+
}
|
|
984
|
+
[data-helix-part="chip-shell"][data-variant="warning"] :is([data-helix-part="chip-icon"], [data-helix-part="chip-icon-end"]) {
|
|
985
|
+
color: var(--helix-color-text-warning);
|
|
986
|
+
}
|
|
987
|
+
[data-helix-part="chip-shell"][data-variant="danger"] :is([data-helix-part="chip-icon"], [data-helix-part="chip-icon-end"]) {
|
|
988
|
+
color: var(--helix-color-text-danger);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/* Dismiss: a show/hide part in the row, exactly like chip-icon-end — it takes 2px (spacing-3xs) + the 12px ×
|
|
992
|
+
of layout, and the chip keeps its own 12px end padding after it. The button box itself is a 24px square
|
|
993
|
+
centered on the × (WCAG 2.5.8 target size): 6px padding each side, pulled back with negative margins
|
|
994
|
+
(−4px left, −6px right) so the extra size takes no layout space. Its round hover/focus surface (20px on
|
|
995
|
+
s, 24px on m) is ::before, centered on the ×. */
|
|
996
|
+
[data-helix-part="chip-dismiss"] {
|
|
997
|
+
position: relative;
|
|
998
|
+
z-index: 1;
|
|
999
|
+
display: inline-flex;
|
|
1000
|
+
align-items: center;
|
|
1001
|
+
justify-content: center;
|
|
1002
|
+
flex-shrink: 0;
|
|
1003
|
+
box-sizing: border-box;
|
|
1004
|
+
height: var(--helix-primitive-size-150);
|
|
1005
|
+
padding: 0 calc(var(--helix-spacing-2xs) + var(--helix-spacing-3xs));
|
|
1006
|
+
margin: 0 calc(-1 * (var(--helix-spacing-2xs) + var(--helix-spacing-3xs))) 0 calc(-1 * var(--helix-spacing-2xs));
|
|
1007
|
+
border: none;
|
|
1008
|
+
background: none;
|
|
1009
|
+
color: var(--helix-color-text-neutral-light);
|
|
1010
|
+
cursor: pointer;
|
|
1011
|
+
outline: none;
|
|
1012
|
+
-webkit-appearance: none;
|
|
1013
|
+
appearance: none;
|
|
1014
|
+
}
|
|
1015
|
+
[data-helix-part="chip-dismiss"]::before {
|
|
1016
|
+
content: '';
|
|
1017
|
+
position: absolute;
|
|
1018
|
+
z-index: -1;
|
|
1019
|
+
top: 50%;
|
|
1020
|
+
left: 50%;
|
|
1021
|
+
transform: translate(-50%, -50%);
|
|
1022
|
+
width: var(--helix-primitive-size-150);
|
|
1023
|
+
height: var(--helix-primitive-size-150);
|
|
1024
|
+
border-radius: var(--helix-radius-full);
|
|
1025
|
+
background: transparent;
|
|
1026
|
+
transition: background-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
1027
|
+
}
|
|
1028
|
+
[data-helix-part="chip-shell"][data-size="s"] [data-helix-part="chip-dismiss"]::before {
|
|
1029
|
+
width: var(--helix-primitive-size-125);
|
|
1030
|
+
height: var(--helix-primitive-size-125);
|
|
1031
|
+
}
|
|
1032
|
+
[data-helix-part="chip-dismiss"]:hover:not(:disabled) { color: var(--helix-color-text-neutral); }
|
|
1033
|
+
[data-helix-part="chip-dismiss"]:hover:not(:disabled)::before { background-color: var(--helix-color-fill-surface-dark); }
|
|
1034
|
+
[data-helix-part="chip-dismiss"]:focus-visible::before {
|
|
1035
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
1036
|
+
outline-offset: 2px;
|
|
1037
|
+
}
|
|
1038
|
+
/* Real disabled color, not opacity — .ai/maps/patterns/disabled-state.md. */
|
|
1039
|
+
[data-helix-part="chip-dismiss"]:disabled {
|
|
1040
|
+
cursor: not-allowed;
|
|
1041
|
+
color: var(--helix-color-text-disabled);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1045
|
+
CHIP GROUP — just the chips side by side (no visible header): a wrapping
|
|
1046
|
+
row of real Chips, 4px apart in both directions (group-spacing.md).
|
|
1047
|
+
Semantic token directly — no component tokens of its own.
|
|
1048
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1049
|
+
|
|
1050
|
+
[data-helix-part="chip-group"] {
|
|
1051
|
+
display: flex;
|
|
1052
|
+
flex-wrap: wrap;
|
|
1053
|
+
gap: var(--helix-spacing-2xs);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1057
|
+
TEXTAREA
|
|
1058
|
+
Contract: contracts/components/Textarea.json
|
|
1059
|
+
Tokens: --helix-textarea-*
|
|
1060
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1061
|
+
|
|
1062
|
+
[data-helix-part="textarea-root"] {
|
|
1063
|
+
display: flex;
|
|
1064
|
+
flex-direction: column;
|
|
1065
|
+
gap: var(--helix-textarea-gap);
|
|
1066
|
+
/* Every form field shares one width and never grows or shrinks with its content (owner's rule 2026-10-21,
|
|
1067
|
+
contracts/figma-conversion.json → patterns.form-field.width); fullWidth fills the container. A per-component
|
|
1068
|
+
width, not a token (CLAUDE.md token policy: widths are a component characteristic). */
|
|
1069
|
+
width: 320px;
|
|
1070
|
+
max-width: 100%;
|
|
1071
|
+
}
|
|
1072
|
+
[data-helix-part="textarea-root"][data-full-width] { width: 100%; }
|
|
1073
|
+
|
|
1074
|
+
[data-helix-part="textarea-label"] {
|
|
1075
|
+
font-family: var(--helix-textStyle-body-m-medium-fontFamily); /* the one form label — same as checkbox-group/radio legends */
|
|
1076
|
+
font-size: var(--helix-textarea-text-labelFontSize);
|
|
1077
|
+
font-weight: var(--helix-textarea-text-labelFontWeight);
|
|
1078
|
+
color: var(--helix-textarea-text-label);
|
|
1079
|
+
line-height: var(--helix-textStyle-body-m-medium-lineHeight);
|
|
1080
|
+
}
|
|
1081
|
+
[data-helix-part="textarea-required"],
|
|
1082
|
+
[data-helix-part="select-required"],
|
|
1083
|
+
[data-helix-part="multi-select-required"] {
|
|
1084
|
+
color: var(--helix-color-text-danger);
|
|
1085
|
+
margin-left: var(--helix-spacing-3xs);
|
|
1086
|
+
}
|
|
1087
|
+
/* Disabled dims every text part — .ai/maps/patterns/disabled-state.md */
|
|
1088
|
+
[data-helix-part="textarea-root"][data-disabled] :is([data-helix-part="textarea-label"], [data-helix-part="textarea-required"], [data-helix-part="textarea-description"], [data-helix-part="textarea-counter"]) {
|
|
1089
|
+
color: var(--helix-textarea-text-disabled);
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
[data-helix-part="textarea-wrapper"] {
|
|
1093
|
+
position: relative;
|
|
1094
|
+
background-color: var(--helix-textarea-fill-default);
|
|
1095
|
+
border: var(--helix-borderWidth-thin) solid var(--helix-textarea-border-default);
|
|
1096
|
+
border-radius: var(--helix-textarea-radius);
|
|
1097
|
+
transition:
|
|
1098
|
+
border-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
1099
|
+
border-width var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
1100
|
+
box-shadow var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
1101
|
+
}
|
|
1102
|
+
/* :not(:focus-within) — same specificity fix as Input's own hover rule above. */
|
|
1103
|
+
[data-helix-part="textarea-wrapper"]:hover:not([data-disabled]):not([data-invalid]):not(:focus-within) {
|
|
1104
|
+
border-color: var(--helix-textarea-border-hover);
|
|
1105
|
+
}
|
|
1106
|
+
[data-helix-part="textarea-wrapper"]:focus-within:not([data-invalid]) {
|
|
1107
|
+
border-color: var(--helix-textarea-border-focus);
|
|
1108
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--helix-textarea-border-focus) 20%, transparent);
|
|
1109
|
+
}
|
|
1110
|
+
[data-helix-part="textarea-wrapper"][data-invalid] {
|
|
1111
|
+
border-color: var(--helix-textarea-border-invalid);
|
|
1112
|
+
}
|
|
1113
|
+
[data-helix-part="textarea-wrapper"][data-invalid]:focus-within {
|
|
1114
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--helix-textarea-border-invalid) 20%, transparent);
|
|
1115
|
+
}
|
|
1116
|
+
[data-helix-part="textarea-wrapper"][data-disabled] {
|
|
1117
|
+
background-color: var(--helix-textarea-fill-disabled);
|
|
1118
|
+
border-color: var(--helix-textarea-border-disabled);
|
|
1119
|
+
cursor: not-allowed;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
[data-helix-part="textarea-field"] {
|
|
1123
|
+
display: block;
|
|
1124
|
+
width: 100%;
|
|
1125
|
+
background: transparent;
|
|
1126
|
+
border: none;
|
|
1127
|
+
outline: none;
|
|
1128
|
+
color: var(--helix-textarea-text-value);
|
|
1129
|
+
font-family: inherit;
|
|
1130
|
+
font-size: var(--helix-textarea-text-valueFontSize-m);
|
|
1131
|
+
line-height: var(--helix-lineHeight-m);
|
|
1132
|
+
padding: var(--helix-primitive-spacing-75);
|
|
1133
|
+
min-width: 0;
|
|
1134
|
+
min-height: var(--helix-textarea-height);
|
|
1135
|
+
box-sizing: border-box;
|
|
1136
|
+
resize: vertical;
|
|
1137
|
+
}
|
|
1138
|
+
[data-helix-part="textarea-field"][data-resize="none"] { resize: none; }
|
|
1139
|
+
[data-helix-part="textarea-field"][data-resize="horizontal"] { resize: horizontal; }
|
|
1140
|
+
[data-helix-part="textarea-field"][data-resize="both"] { resize: both; }
|
|
1141
|
+
[data-helix-part="textarea-field"]::placeholder { color: var(--helix-textarea-text-placeholder); }
|
|
1142
|
+
[data-helix-part="textarea-field"]:disabled,
|
|
1143
|
+
[data-helix-part="textarea-field"]:disabled::placeholder { cursor: not-allowed; color: var(--helix-textarea-text-disabled); }
|
|
1144
|
+
|
|
1145
|
+
[data-helix-part="textarea-counter"] {
|
|
1146
|
+
position: absolute;
|
|
1147
|
+
bottom: var(--helix-primitive-spacing-50);
|
|
1148
|
+
right: var(--helix-primitive-spacing-75);
|
|
1149
|
+
font-size: var(--helix-textarea-text-counterFontSize);
|
|
1150
|
+
color: var(--helix-textarea-text-counter);
|
|
1151
|
+
pointer-events: none;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
[data-helix-part="textarea-description"] {
|
|
1155
|
+
font-size: var(--helix-textarea-text-descriptionFontSize);
|
|
1156
|
+
color: var(--helix-textarea-text-description);
|
|
1157
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1158
|
+
}
|
|
1159
|
+
[data-helix-part="textarea-error"] {
|
|
1160
|
+
font-size: var(--helix-textarea-text-errorFontSize);
|
|
1161
|
+
color: var(--helix-textarea-text-error);
|
|
1162
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1167
|
+
SELECT
|
|
1168
|
+
Contract: contracts/components/Select.json
|
|
1169
|
+
Tokens: --helix-select-*
|
|
1170
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1171
|
+
|
|
1172
|
+
/* A plain flex gap works here — label→trigger and trigger→description are both 8px per the
|
|
1173
|
+
form-field-spacing pattern (.ai/maps/patterns/form-field-spacing.md), so one shared value
|
|
1174
|
+
serves both without needing per-element margins. */
|
|
1175
|
+
[data-helix-part="select-root"] {
|
|
1176
|
+
display: flex;
|
|
1177
|
+
flex-direction: column;
|
|
1178
|
+
gap: var(--helix-select-gap);
|
|
1179
|
+
/* Every form field shares one width and never grows or shrinks with its content (owner's rule 2026-10-21,
|
|
1180
|
+
contracts/figma-conversion.json → patterns.form-field.width); fullWidth fills the container. A per-component
|
|
1181
|
+
width, not a token (CLAUDE.md token policy: widths are a component characteristic). */
|
|
1182
|
+
width: 320px;
|
|
1183
|
+
max-width: 100%;
|
|
1184
|
+
}
|
|
1185
|
+
[data-helix-part="select-root"][data-full-width] { width: 100%; }
|
|
1186
|
+
|
|
1187
|
+
[data-helix-part="select-label"] {
|
|
1188
|
+
font-family: var(--helix-textStyle-body-m-medium-fontFamily); /* the one form label — same as checkbox-group/radio legends */
|
|
1189
|
+
font-size: var(--helix-select-text-labelFontSize);
|
|
1190
|
+
font-weight: var(--helix-select-text-labelFontWeight);
|
|
1191
|
+
color: var(--helix-select-text-label);
|
|
1192
|
+
line-height: var(--helix-textStyle-body-m-medium-lineHeight);
|
|
1193
|
+
}
|
|
1194
|
+
/* Disabled dims every text part — .ai/maps/patterns/disabled-state.md */
|
|
1195
|
+
[data-helix-part="select-root"][data-disabled] :is([data-helix-part="select-label"], [data-helix-part="select-required"], [data-helix-part="select-description"]) {
|
|
1196
|
+
color: var(--helix-select-text-disabled);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
[data-helix-part="select-wrapper"] {
|
|
1200
|
+
position: relative;
|
|
1201
|
+
display: flex;
|
|
1202
|
+
}
|
|
1203
|
+
/* Invisible native input for form submit + required validation — pinned to the field's bottom
|
|
1204
|
+
edge so the browser's "fill in this field" bubble points at the Select, not the page corner. */
|
|
1205
|
+
[data-helix-part="select-native"] {
|
|
1206
|
+
position: absolute;
|
|
1207
|
+
left: 0;
|
|
1208
|
+
bottom: 0;
|
|
1209
|
+
width: 100%;
|
|
1210
|
+
height: 1px;
|
|
1211
|
+
padding: 0;
|
|
1212
|
+
margin: 0;
|
|
1213
|
+
border-width: 0;
|
|
1214
|
+
opacity: 0;
|
|
1215
|
+
pointer-events: none;
|
|
1216
|
+
}
|
|
1217
|
+
[data-helix-part="select-wrapper"][data-full-width],
|
|
1218
|
+
[data-helix-part="select-root"][data-full-width] [data-helix-part="select-wrapper"] {
|
|
1219
|
+
width: 100%;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
[data-helix-part="select-trigger"] {
|
|
1223
|
+
appearance: none;
|
|
1224
|
+
-webkit-appearance: none;
|
|
1225
|
+
display: flex;
|
|
1226
|
+
align-items: center;
|
|
1227
|
+
width: 100%;
|
|
1228
|
+
background-color: var(--helix-select-fill-default);
|
|
1229
|
+
border: var(--helix-borderWidth-thin) solid var(--helix-select-border-default);
|
|
1230
|
+
border-radius: var(--helix-select-radius);
|
|
1231
|
+
color: var(--helix-select-text-value);
|
|
1232
|
+
font-family: inherit;
|
|
1233
|
+
font-size: var(--helix-select-text-valueFontSize);
|
|
1234
|
+
height: var(--helix-select-height);
|
|
1235
|
+
padding: 0 var(--helix-primitive-spacing-250) 0 var(--helix-primitive-spacing-75);
|
|
1236
|
+
text-align: left;
|
|
1237
|
+
cursor: pointer;
|
|
1238
|
+
outline: none;
|
|
1239
|
+
transition:
|
|
1240
|
+
border-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
1241
|
+
border-width var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
1242
|
+
box-shadow var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
1243
|
+
}
|
|
1244
|
+
/* Own block, not inline text — lets the label truncate with an ellipsis inside a fixed-width
|
|
1245
|
+
trigger instead of overflowing or forcing the button (and everything measured from it,
|
|
1246
|
+
including the anchored Menu) to grow with a long option's label. */
|
|
1247
|
+
[data-helix-part="select-trigger-label"] {
|
|
1248
|
+
display: block;
|
|
1249
|
+
min-width: 0;
|
|
1250
|
+
flex: 1;
|
|
1251
|
+
overflow: hidden;
|
|
1252
|
+
white-space: nowrap;
|
|
1253
|
+
text-overflow: ellipsis;
|
|
1254
|
+
}
|
|
1255
|
+
/* :not([aria-expanded="true"]) and :not(:focus-visible) — without them, hover's higher
|
|
1256
|
+
specificity (3 compound selectors vs. 2) silently beat the open/focus rule below whenever the
|
|
1257
|
+
mouse stayed over an opened trigger, turning the border gray instead of staying blue. */
|
|
1258
|
+
[data-helix-part="select-wrapper"]:not([data-invalid]) [data-helix-part="select-trigger"]:hover:not(:disabled):not([aria-expanded="true"]):not(:focus-visible) {
|
|
1259
|
+
border-color: var(--helix-select-border-hover);
|
|
1260
|
+
}
|
|
1261
|
+
/* Same focus treatment on open as on focus — a hand-rolled trigger's "open" state IS its focus
|
|
1262
|
+
state (real DOM focus never leaves the button; see Select.tsx/Menu's contract), so both share one rule
|
|
1263
|
+
rather than the open state getting a weaker one-off. */
|
|
1264
|
+
[data-helix-part="select-trigger"]:focus-visible,
|
|
1265
|
+
[data-helix-part="select-trigger"][aria-expanded="true"] {
|
|
1266
|
+
border-color: var(--helix-select-border-focus);
|
|
1267
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--helix-select-border-focus) 20%, transparent);
|
|
1268
|
+
}
|
|
1269
|
+
[data-helix-part="select-wrapper"][data-invalid] [data-helix-part="select-trigger"] {
|
|
1270
|
+
border-color: var(--helix-select-border-invalid);
|
|
1271
|
+
}
|
|
1272
|
+
[data-helix-part="select-trigger"]:disabled {
|
|
1273
|
+
background-color: var(--helix-select-fill-disabled);
|
|
1274
|
+
border-color: var(--helix-select-border-disabled);
|
|
1275
|
+
color: var(--helix-select-text-disabled);
|
|
1276
|
+
cursor: not-allowed;
|
|
1277
|
+
}
|
|
1278
|
+
[data-helix-part="select-trigger"][data-placeholder] {
|
|
1279
|
+
color: var(--helix-select-text-placeholder);
|
|
1280
|
+
}
|
|
1281
|
+
[data-helix-part="select-trigger"][data-placeholder]:disabled {
|
|
1282
|
+
color: var(--helix-select-text-disabled);
|
|
1283
|
+
}
|
|
1284
|
+
[data-helix-part="select-trigger"]:disabled ~ [data-helix-part="select-chevron"],
|
|
1285
|
+
[data-helix-part="multi-select-field"][data-disabled] [data-helix-part="multi-select-chevron"] {
|
|
1286
|
+
color: var(--helix-select-icon-disabled);
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
[data-helix-part="select-chevron"] {
|
|
1290
|
+
position: absolute;
|
|
1291
|
+
right: var(--helix-primitive-spacing-75);
|
|
1292
|
+
top: 50%;
|
|
1293
|
+
transform: translateY(-50%) scaleY(1);
|
|
1294
|
+
transform-origin: center;
|
|
1295
|
+
color: var(--helix-select-icon-default);
|
|
1296
|
+
pointer-events: none;
|
|
1297
|
+
display: flex;
|
|
1298
|
+
align-items: center;
|
|
1299
|
+
transition: transform var(--helix-select-duration-chevron) var(--helix-select-easing-collapse);
|
|
1300
|
+
}
|
|
1301
|
+
[data-helix-part="select-trigger"][aria-expanded="true"] ~ [data-helix-part="select-chevron"] {
|
|
1302
|
+
transform: translateY(-50%) scaleY(-1);
|
|
1303
|
+
transition: transform var(--helix-select-duration-chevron) var(--helix-select-easing);
|
|
1304
|
+
}
|
|
1305
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1306
|
+
[data-helix-part="select-chevron"] { transition: none !important; }
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
[data-helix-part="select-description"] {
|
|
1310
|
+
font-size: var(--helix-select-text-descriptionFontSize);
|
|
1311
|
+
color: var(--helix-select-text-description);
|
|
1312
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1313
|
+
}
|
|
1314
|
+
[data-helix-part="select-error"] {
|
|
1315
|
+
font-size: var(--helix-select-text-errorFontSize);
|
|
1316
|
+
color: var(--helix-select-text-error);
|
|
1317
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1322
|
+
COMBOBOX
|
|
1323
|
+
Contract: contracts/components/Combobox.json
|
|
1324
|
+
Tokens: --helix-select-* (Select's field, shared on purpose — Combobox's contract, like MultiSelect)
|
|
1325
|
+
The field is a native <input> styled as Select's trigger, with a search icon at the start and
|
|
1326
|
+
Select's chevron at the end; the list is Menu.
|
|
1327
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1328
|
+
|
|
1329
|
+
[data-helix-part="combobox-root"] {
|
|
1330
|
+
display: flex;
|
|
1331
|
+
flex-direction: column;
|
|
1332
|
+
gap: var(--helix-select-gap);
|
|
1333
|
+
/* Every form field shares one width (owner's rule 2026-10-21, form-field pattern); fullWidth fills the container.
|
|
1334
|
+
A per-component width, not a token (CLAUDE.md token policy). */
|
|
1335
|
+
width: 320px;
|
|
1336
|
+
max-width: 100%;
|
|
1337
|
+
}
|
|
1338
|
+
[data-helix-part="combobox-root"][data-full-width] { width: 100%; }
|
|
1339
|
+
|
|
1340
|
+
[data-helix-part="combobox-label"] {
|
|
1341
|
+
font-family: var(--helix-textStyle-body-m-medium-fontFamily);
|
|
1342
|
+
font-size: var(--helix-select-text-labelFontSize);
|
|
1343
|
+
font-weight: var(--helix-select-text-labelFontWeight);
|
|
1344
|
+
color: var(--helix-select-text-label);
|
|
1345
|
+
line-height: var(--helix-textStyle-body-m-medium-lineHeight);
|
|
1346
|
+
}
|
|
1347
|
+
/* Same as the other fields' required mark — its own rule, so adding Combobox doesn't change theirs (figma-drift). */
|
|
1348
|
+
[data-helix-part="combobox-required"] {
|
|
1349
|
+
color: var(--helix-color-text-danger);
|
|
1350
|
+
margin-left: var(--helix-spacing-3xs);
|
|
1351
|
+
}
|
|
1352
|
+
/* Disabled dims every text part — .ai/maps/patterns/disabled-state.md */
|
|
1353
|
+
[data-helix-part="combobox-root"][data-disabled] :is([data-helix-part="combobox-label"], [data-helix-part="combobox-required"], [data-helix-part="combobox-description"]) {
|
|
1354
|
+
color: var(--helix-select-text-disabled);
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
[data-helix-part="combobox-wrapper"] {
|
|
1358
|
+
position: relative;
|
|
1359
|
+
display: flex;
|
|
1360
|
+
}
|
|
1361
|
+
[data-helix-part="combobox-native"] {
|
|
1362
|
+
position: absolute;
|
|
1363
|
+
left: 0;
|
|
1364
|
+
bottom: 0;
|
|
1365
|
+
width: 100%;
|
|
1366
|
+
height: 1px;
|
|
1367
|
+
padding: 0;
|
|
1368
|
+
margin: 0;
|
|
1369
|
+
border-width: 0;
|
|
1370
|
+
opacity: 0;
|
|
1371
|
+
pointer-events: none;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
[data-helix-part="combobox-input"] {
|
|
1375
|
+
appearance: none;
|
|
1376
|
+
-webkit-appearance: none;
|
|
1377
|
+
width: 100%;
|
|
1378
|
+
min-width: 0;
|
|
1379
|
+
background-color: var(--helix-select-fill-default);
|
|
1380
|
+
border: var(--helix-borderWidth-thin) solid var(--helix-select-border-default);
|
|
1381
|
+
border-radius: var(--helix-select-radius);
|
|
1382
|
+
color: var(--helix-select-text-value);
|
|
1383
|
+
font-family: inherit;
|
|
1384
|
+
font-size: var(--helix-select-text-valueFontSize);
|
|
1385
|
+
height: var(--helix-select-height);
|
|
1386
|
+
/* start: edge → icon (12) + icon (16) + icon → text (8); end: room for the chevron, as in Select */
|
|
1387
|
+
padding: 0 var(--helix-primitive-spacing-250) 0 calc(var(--helix-primitive-spacing-75) + var(--helix-spacing-m) + var(--helix-spacing-xs));
|
|
1388
|
+
text-overflow: ellipsis;
|
|
1389
|
+
outline: none;
|
|
1390
|
+
transition:
|
|
1391
|
+
border-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
1392
|
+
box-shadow var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
1393
|
+
}
|
|
1394
|
+
[data-helix-part="combobox-input"]::placeholder { color: var(--helix-select-text-placeholder); opacity: 1; }
|
|
1395
|
+
[data-helix-part="combobox-wrapper"]:not([data-invalid]) [data-helix-part="combobox-input"]:hover:not(:disabled):not([aria-expanded="true"]):not(:focus) {
|
|
1396
|
+
border-color: var(--helix-select-border-hover);
|
|
1397
|
+
}
|
|
1398
|
+
/* A text field shows focus on any focus (it takes typing), not only :focus-visible; open shares it, as in Select. */
|
|
1399
|
+
[data-helix-part="combobox-input"]:focus,
|
|
1400
|
+
[data-helix-part="combobox-input"][aria-expanded="true"] {
|
|
1401
|
+
border-color: var(--helix-select-border-focus);
|
|
1402
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--helix-select-border-focus) 20%, transparent);
|
|
1403
|
+
}
|
|
1404
|
+
[data-helix-part="combobox-wrapper"][data-invalid] [data-helix-part="combobox-input"] {
|
|
1405
|
+
border-color: var(--helix-select-border-invalid);
|
|
1406
|
+
}
|
|
1407
|
+
[data-helix-part="combobox-input"]:disabled {
|
|
1408
|
+
background-color: var(--helix-select-fill-disabled);
|
|
1409
|
+
border-color: var(--helix-select-border-disabled);
|
|
1410
|
+
color: var(--helix-select-text-disabled);
|
|
1411
|
+
cursor: not-allowed;
|
|
1412
|
+
}
|
|
1413
|
+
[data-helix-part="combobox-input"]:disabled::placeholder { color: var(--helix-select-text-disabled); }
|
|
1414
|
+
|
|
1415
|
+
[data-helix-part="combobox-icon"],
|
|
1416
|
+
[data-helix-part="combobox-chevron"] {
|
|
1417
|
+
position: absolute;
|
|
1418
|
+
top: 50%;
|
|
1419
|
+
display: flex;
|
|
1420
|
+
align-items: center;
|
|
1421
|
+
color: var(--helix-select-icon-default);
|
|
1422
|
+
pointer-events: none;
|
|
1423
|
+
}
|
|
1424
|
+
[data-helix-part="combobox-icon"] {
|
|
1425
|
+
left: var(--helix-primitive-spacing-75);
|
|
1426
|
+
transform: translateY(-50%);
|
|
1427
|
+
}
|
|
1428
|
+
[data-helix-part="combobox-chevron"] {
|
|
1429
|
+
right: var(--helix-primitive-spacing-75);
|
|
1430
|
+
transform: translateY(-50%) scaleY(1);
|
|
1431
|
+
transform-origin: center;
|
|
1432
|
+
transition: transform var(--helix-select-duration-chevron) var(--helix-select-easing-collapse);
|
|
1433
|
+
}
|
|
1434
|
+
[data-helix-part="combobox-input"][aria-expanded="true"] ~ [data-helix-part="combobox-chevron"] {
|
|
1435
|
+
transform: translateY(-50%) scaleY(-1);
|
|
1436
|
+
transition: transform var(--helix-select-duration-chevron) var(--helix-select-easing);
|
|
1437
|
+
}
|
|
1438
|
+
[data-helix-part="combobox-wrapper"][data-disabled] :is([data-helix-part="combobox-icon"], [data-helix-part="combobox-chevron"]) {
|
|
1439
|
+
color: var(--helix-select-icon-disabled);
|
|
1440
|
+
}
|
|
1441
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1442
|
+
[data-helix-part="combobox-chevron"] { transition: none !important; }
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
[data-helix-part="combobox-description"] {
|
|
1446
|
+
font-size: var(--helix-select-text-descriptionFontSize);
|
|
1447
|
+
color: var(--helix-select-text-description);
|
|
1448
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1449
|
+
}
|
|
1450
|
+
[data-helix-part="combobox-error"] {
|
|
1451
|
+
font-size: var(--helix-select-text-errorFontSize);
|
|
1452
|
+
color: var(--helix-select-text-error);
|
|
1453
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1458
|
+
MULTI SELECT
|
|
1459
|
+
Contract: contracts/components/MultiSelect.json
|
|
1460
|
+
Tokens: --helix-select-* (same field as Select, shared on purpose — MultiSelect's contract) + Chip's own
|
|
1461
|
+
The field is a container (chips + a combobox button), not a button: the chips' × can't nest
|
|
1462
|
+
inside a <button>. Chip s (24px) centered in the 32px field = 4px from the outer edge.
|
|
1463
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1464
|
+
|
|
1465
|
+
[data-helix-part="multi-select-root"] {
|
|
1466
|
+
display: flex;
|
|
1467
|
+
flex-direction: column;
|
|
1468
|
+
gap: var(--helix-select-gap);
|
|
1469
|
+
/* Every form field shares one width and never grows or shrinks with its content (owner's rule 2026-10-21,
|
|
1470
|
+
contracts/figma-conversion.json → patterns.form-field.width); fullWidth fills the container. A per-component
|
|
1471
|
+
width, not a token (CLAUDE.md token policy: widths are a component characteristic). */
|
|
1472
|
+
width: 320px;
|
|
1473
|
+
max-width: 100%;
|
|
1474
|
+
}
|
|
1475
|
+
[data-helix-part="multi-select-root"][data-full-width] { width: 100%; }
|
|
1476
|
+
|
|
1477
|
+
[data-helix-part="multi-select-label"] {
|
|
1478
|
+
font-family: var(--helix-textStyle-body-m-medium-fontFamily); /* the one form label — same as checkbox-group/radio legends */
|
|
1479
|
+
font-size: var(--helix-select-text-labelFontSize);
|
|
1480
|
+
font-weight: var(--helix-select-text-labelFontWeight);
|
|
1481
|
+
color: var(--helix-select-text-label);
|
|
1482
|
+
line-height: var(--helix-textStyle-body-m-medium-lineHeight);
|
|
1483
|
+
}
|
|
1484
|
+
/* Disabled dims every text part — .ai/maps/patterns/disabled-state.md (MultiSelect shares Select's tokens) */
|
|
1485
|
+
[data-helix-part="multi-select-root"][data-disabled] :is([data-helix-part="multi-select-label"], [data-helix-part="multi-select-required"], [data-helix-part="multi-select-description"]) {
|
|
1486
|
+
color: var(--helix-select-text-disabled);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
[data-helix-part="multi-select-field"] {
|
|
1490
|
+
position: relative;
|
|
1491
|
+
display: flex;
|
|
1492
|
+
flex-wrap: wrap;
|
|
1493
|
+
align-items: center;
|
|
1494
|
+
column-gap: var(--helix-spacing-2xs);
|
|
1495
|
+
row-gap: var(--helix-spacing-2xs);
|
|
1496
|
+
box-sizing: border-box;
|
|
1497
|
+
min-height: var(--helix-select-height);
|
|
1498
|
+
/* Chips centered in the 32px field: padding = (field − chip) / 2 − border, i.e. 4px from the OUTER
|
|
1499
|
+
edge on every side. The chevron side keeps Select's own trailing room. */
|
|
1500
|
+
padding: calc((var(--helix-select-height) - var(--helix-chip-height-s)) / 2 - var(--helix-borderWidth-thin))
|
|
1501
|
+
var(--helix-primitive-spacing-250)
|
|
1502
|
+
calc((var(--helix-select-height) - var(--helix-chip-height-s)) / 2 - var(--helix-borderWidth-thin))
|
|
1503
|
+
calc((var(--helix-select-height) - var(--helix-chip-height-s)) / 2 - var(--helix-borderWidth-thin));
|
|
1504
|
+
background-color: var(--helix-select-fill-default);
|
|
1505
|
+
border: var(--helix-borderWidth-thin) solid var(--helix-select-border-default);
|
|
1506
|
+
border-radius: var(--helix-select-radius);
|
|
1507
|
+
cursor: pointer;
|
|
1508
|
+
transition:
|
|
1509
|
+
border-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
1510
|
+
box-shadow var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
1511
|
+
}
|
|
1512
|
+
[data-helix-part="multi-select-root"][data-full-width] [data-helix-part="multi-select-field"] { width: 100%; }
|
|
1513
|
+
|
|
1514
|
+
[data-helix-part="multi-select-field"]:hover:not([data-disabled]):not([data-invalid]):not([data-open]):not(:has([data-helix-part="multi-select-trigger"]:focus-visible)) {
|
|
1515
|
+
border-color: var(--helix-select-border-hover);
|
|
1516
|
+
}
|
|
1517
|
+
/* Focus/open = Select's treatment (blue border + glow). The border keeps its width — only its color
|
|
1518
|
+
changes (border-always.md) — so the chips never shift and no padding compensation is needed. */
|
|
1519
|
+
[data-helix-part="multi-select-field"]:has([data-helix-part="multi-select-trigger"]:focus-visible),
|
|
1520
|
+
[data-helix-part="multi-select-field"][data-open] {
|
|
1521
|
+
border-color: var(--helix-select-border-focus);
|
|
1522
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--helix-select-border-focus) 20%, transparent);
|
|
1523
|
+
}
|
|
1524
|
+
[data-helix-part="multi-select-field"][data-invalid]:not([data-open]):not(:has([data-helix-part="multi-select-trigger"]:focus-visible)) {
|
|
1525
|
+
border-color: var(--helix-select-border-invalid);
|
|
1526
|
+
}
|
|
1527
|
+
[data-helix-part="multi-select-field"][data-disabled] {
|
|
1528
|
+
background-color: var(--helix-select-fill-disabled);
|
|
1529
|
+
border-color: var(--helix-select-border-disabled);
|
|
1530
|
+
cursor: not-allowed;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
[data-helix-part="multi-select-chip"] { display: inline-flex; }
|
|
1534
|
+
|
|
1535
|
+
/* The combobox fills whatever room the chips leave on the line; same height as a chip so a row never
|
|
1536
|
+
grows because of it. With no chips, its text lines up with Select's (12px inside the border). */
|
|
1537
|
+
[data-helix-part="multi-select-trigger"] {
|
|
1538
|
+
appearance: none;
|
|
1539
|
+
-webkit-appearance: none;
|
|
1540
|
+
flex: 1;
|
|
1541
|
+
min-width: 40px; /* room to click past the last chip — per-component min-width, not tokenized (CLAUDE.md) */
|
|
1542
|
+
height: var(--helix-chip-height-s);
|
|
1543
|
+
/* With no chips, the placeholder starts 12px inside the border like Select's text. */
|
|
1544
|
+
padding: 0 0 0 calc(var(--helix-primitive-spacing-75) - (var(--helix-select-height) - var(--helix-chip-height-s)) / 2 + var(--helix-borderWidth-thin));
|
|
1545
|
+
border: none;
|
|
1546
|
+
background: transparent;
|
|
1547
|
+
color: var(--helix-select-text-value);
|
|
1548
|
+
font-family: inherit;
|
|
1549
|
+
font-size: var(--helix-select-text-valueFontSize);
|
|
1550
|
+
text-align: left;
|
|
1551
|
+
cursor: pointer;
|
|
1552
|
+
outline: none;
|
|
1553
|
+
}
|
|
1554
|
+
[data-helix-part="multi-select-field"][data-has-value] [data-helix-part="multi-select-trigger"] { padding-left: 0; }
|
|
1555
|
+
[data-helix-part="multi-select-trigger"]:disabled,
|
|
1556
|
+
[data-helix-part="multi-select-trigger"]:disabled [data-helix-part="multi-select-placeholder"] { cursor: not-allowed; color: var(--helix-select-text-disabled); }
|
|
1557
|
+
|
|
1558
|
+
[data-helix-part="multi-select-placeholder"] {
|
|
1559
|
+
display: block;
|
|
1560
|
+
overflow: hidden;
|
|
1561
|
+
white-space: nowrap;
|
|
1562
|
+
text-overflow: ellipsis;
|
|
1563
|
+
color: var(--helix-select-text-placeholder);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
[data-helix-part="multi-select-chevron"] {
|
|
1567
|
+
position: absolute;
|
|
1568
|
+
right: var(--helix-primitive-spacing-75);
|
|
1569
|
+
top: 50%;
|
|
1570
|
+
transform: translateY(-50%) scaleY(1);
|
|
1571
|
+
transform-origin: center;
|
|
1572
|
+
color: var(--helix-select-icon-default);
|
|
1573
|
+
pointer-events: none;
|
|
1574
|
+
display: flex;
|
|
1575
|
+
align-items: center;
|
|
1576
|
+
transition: transform var(--helix-select-duration-chevron) var(--helix-select-easing-collapse);
|
|
1577
|
+
}
|
|
1578
|
+
[data-helix-part="multi-select-field"][data-open] [data-helix-part="multi-select-chevron"] {
|
|
1579
|
+
transform: translateY(-50%) scaleY(-1);
|
|
1580
|
+
transition: transform var(--helix-select-duration-chevron) var(--helix-select-easing);
|
|
1581
|
+
}
|
|
1582
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1583
|
+
[data-helix-part="multi-select-chevron"] { transition: none !important; }
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
[data-helix-part="multi-select-native"] {
|
|
1587
|
+
position: absolute;
|
|
1588
|
+
left: 0;
|
|
1589
|
+
bottom: 0;
|
|
1590
|
+
width: 100%;
|
|
1591
|
+
height: 1px;
|
|
1592
|
+
padding: 0;
|
|
1593
|
+
margin: 0;
|
|
1594
|
+
border-width: 0;
|
|
1595
|
+
opacity: 0;
|
|
1596
|
+
pointer-events: none;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
[data-helix-part="multi-select-description"] {
|
|
1600
|
+
font-size: var(--helix-select-text-descriptionFontSize);
|
|
1601
|
+
color: var(--helix-select-text-description);
|
|
1602
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1603
|
+
}
|
|
1604
|
+
[data-helix-part="multi-select-error"] {
|
|
1605
|
+
font-size: var(--helix-select-text-errorFontSize);
|
|
1606
|
+
color: var(--helix-select-text-error);
|
|
1607
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1612
|
+
MENU
|
|
1613
|
+
Contract: contracts/components/Menu.json
|
|
1614
|
+
Tokens: --helix-menu-*
|
|
1615
|
+
Portaled to document.body (Menu.tsx) — positioned via inline style computed
|
|
1616
|
+
by usePosition(), not CSS. See Menu's contract.
|
|
1617
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1618
|
+
|
|
1619
|
+
[data-helix-part="menu"] {
|
|
1620
|
+
background: var(--helix-menu-fill);
|
|
1621
|
+
border: var(--helix-borderWidth-thin) solid var(--helix-menu-border);
|
|
1622
|
+
border-radius: var(--helix-menu-radius);
|
|
1623
|
+
box-shadow: var(--helix-menu-shadow);
|
|
1624
|
+
padding: var(--helix-menu-padding);
|
|
1625
|
+
z-index: var(--helix-primitive-zIndex-dropdown);
|
|
1626
|
+
display: flex;
|
|
1627
|
+
flex-direction: column;
|
|
1628
|
+
max-height: 320px;
|
|
1629
|
+
overflow-y: auto;
|
|
1630
|
+
/* Grows from its trigger (transitions.dev "menu dropdown"): it always opens below the anchor at the
|
|
1631
|
+
anchor's width (Menu's contract), so the origin is the top edge's centre. Opens from scale-enter over
|
|
1632
|
+
duration-open; closes to the near-resting scale-exit over the shorter duration-close, while
|
|
1633
|
+
Menu.tsx keeps it mounted (data-state="closing"). The global reduced-motion rule neutralises both. */
|
|
1634
|
+
transform-origin: 50% 0;
|
|
1635
|
+
animation: helix-menu-enter var(--helix-menu-duration-open) var(--helix-menu-easing);
|
|
1636
|
+
}
|
|
1637
|
+
[data-helix-part="menu"][data-state="closing"] {
|
|
1638
|
+
pointer-events: none;
|
|
1639
|
+
animation: helix-menu-exit var(--helix-menu-duration-close) var(--helix-menu-easing) forwards;
|
|
1640
|
+
}
|
|
1641
|
+
@keyframes helix-menu-enter {
|
|
1642
|
+
from { opacity: 0; transform: scale(var(--helix-menu-scale-enter)); }
|
|
1643
|
+
}
|
|
1644
|
+
@keyframes helix-menu-exit {
|
|
1645
|
+
to { opacity: 0; transform: scale(var(--helix-menu-scale-exit)); }
|
|
1646
|
+
}
|
|
1647
|
+
/* Minimum popup width when the options are words — the menu takes its trigger's width, and a
|
|
1648
|
+
narrow trigger (Select has no minimum) would otherwise squeeze the options. Numeric-only lists
|
|
1649
|
+
(data-numeric: 1, 2, 1000…) have no minimum. Per-component min-width, not tokenized (CLAUDE.md). */
|
|
1650
|
+
[data-helix-part="menu"]:not([data-numeric]) { min-width: 150px; }
|
|
1651
|
+
|
|
1652
|
+
/* Full-width divider between groups — bleeds past the menu's own padding via a negative
|
|
1653
|
+
inline margin so it reaches both edges, per review feedback. Asymmetric on purpose: 8px above
|
|
1654
|
+
(to whatever content precedes it) but 16px below (to the group label/title right after it) —
|
|
1655
|
+
both real tokens, not one-off literals. Not rendered before the first group (Menu.tsx only
|
|
1656
|
+
emits one when something already precedes it). */
|
|
1657
|
+
[data-helix-part="menu-group-divider"] {
|
|
1658
|
+
height: 1px;
|
|
1659
|
+
border: none;
|
|
1660
|
+
background: var(--helix-menu-groupDivider-color);
|
|
1661
|
+
margin-top: var(--helix-menu-groupDivider-marginTop);
|
|
1662
|
+
margin-bottom: var(--helix-menu-groupDivider-marginBottom);
|
|
1663
|
+
margin-inline: calc(-1 * var(--helix-menu-padding));
|
|
1664
|
+
flex-shrink: 0;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
[data-helix-part="menu-group-label"] {
|
|
1668
|
+
padding: 0 var(--helix-menu-item-paddingX) var(--helix-menu-groupLabel-marginBottom);
|
|
1669
|
+
font-size: var(--helix-menu-groupLabel-fontSize);
|
|
1670
|
+
font-weight: var(--helix-menu-groupLabel-fontWeight);
|
|
1671
|
+
color: var(--helix-menu-groupLabel-text);
|
|
1672
|
+
text-transform: uppercase;
|
|
1673
|
+
flex-shrink: 0;
|
|
1674
|
+
}
|
|
1675
|
+
/* The first group has no divider above it to supply spacing (Menu.tsx only renders one before a
|
|
1676
|
+
non-first group), so its label would otherwise sit only the menu's own 4px padding from the top
|
|
1677
|
+
edge. Top up to the same 16px every other group gets below its divider, for visual consistency
|
|
1678
|
+
regardless of position — real tokens, not a literal (matches groupDivider's own marginBottom). */
|
|
1679
|
+
[data-helix-part="menu-group-label"]:first-child {
|
|
1680
|
+
margin-top: calc(var(--helix-menu-groupDivider-marginBottom) - var(--helix-menu-padding));
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
[data-helix-part="menu-item"] {
|
|
1684
|
+
display: flex;
|
|
1685
|
+
align-items: center;
|
|
1686
|
+
/* min-height, not height — a fixed height was clipping the hover/selected highlight to one
|
|
1687
|
+
line whenever an option's label wrapped to two (e.g. "Product Manager"), leaving the
|
|
1688
|
+
second line rendered outside its own highlight box. min-height keeps 24px as the floor and
|
|
1689
|
+
lets the row grow to actually hug wrapped content, per review feedback. */
|
|
1690
|
+
min-height: var(--helix-menu-item-height);
|
|
1691
|
+
padding: var(--helix-menu-item-paddingY) var(--helix-menu-item-paddingX);
|
|
1692
|
+
border-radius: var(--helix-menu-item-radius);
|
|
1693
|
+
border: none;
|
|
1694
|
+
background: transparent;
|
|
1695
|
+
color: var(--helix-menu-item-text);
|
|
1696
|
+
font-family: inherit;
|
|
1697
|
+
font-size: var(--helix-menu-item-fontSize);
|
|
1698
|
+
font-weight: var(--helix-menu-item-fontWeight);
|
|
1699
|
+
line-height: var(--helix-textStyle-body-m-regular-lineHeight); /* Body / m / Regular, as in Figma */
|
|
1700
|
+
text-align: left;
|
|
1701
|
+
width: 100%;
|
|
1702
|
+
cursor: pointer;
|
|
1703
|
+
flex-shrink: 0;
|
|
1704
|
+
margin-bottom: var(--helix-menu-gap);
|
|
1705
|
+
}
|
|
1706
|
+
[data-helix-part="menu-item"]:last-child,
|
|
1707
|
+
[data-helix-part="menu-item"]:has(+ [data-helix-part="menu-group-divider"]) {
|
|
1708
|
+
/* No trailing item-gap directly before the menu's own end or a group divider — the divider
|
|
1709
|
+
supplies its own full 8px margin-top, and stacking the item's 2px gap on top of that would
|
|
1710
|
+
make it 10px instead of the requested 8px. */
|
|
1711
|
+
margin-bottom: 0;
|
|
1712
|
+
}
|
|
1713
|
+
[data-helix-part="menu-item"]:hover:not(:disabled),
|
|
1714
|
+
[data-helix-part="menu-item"][data-active] {
|
|
1715
|
+
background: var(--helix-menu-item-fill-hover);
|
|
1716
|
+
}
|
|
1717
|
+
[data-helix-part="menu-item"][aria-selected="true"] {
|
|
1718
|
+
background: var(--helix-menu-item-fill-selected);
|
|
1719
|
+
color: var(--helix-menu-item-text-selected);
|
|
1720
|
+
font-weight: var(--helix-menu-item-fontWeight-selected);
|
|
1721
|
+
}
|
|
1722
|
+
[data-helix-part="menu-item"][aria-selected="true"]:hover,
|
|
1723
|
+
[data-helix-part="menu-item"][aria-selected="true"][data-active] {
|
|
1724
|
+
background: var(--helix-menu-item-fill-selected);
|
|
1725
|
+
}
|
|
1726
|
+
[data-helix-part="menu-item"]:disabled {
|
|
1727
|
+
color: var(--helix-menu-item-text-disabled);
|
|
1728
|
+
cursor: not-allowed;
|
|
1729
|
+
}
|
|
1730
|
+
/* labelEnd: secondary text on the end edge — muted, tabular figures so values line up down the list.
|
|
1731
|
+
A selected option's labelEnd takes the selected color; a disabled one, the disabled color. */
|
|
1732
|
+
[data-helix-part="menu-item-label"] { flex: 1; min-width: 0; }
|
|
1733
|
+
[data-helix-part="menu-item-label-end"] {
|
|
1734
|
+
flex: none; margin-inline-start: var(--helix-spacing-m);
|
|
1735
|
+
color: var(--helix-color-text-neutral-light);
|
|
1736
|
+
font-weight: var(--helix-textStyle-body-s-regular-fontWeight);
|
|
1737
|
+
font-variant-numeric: tabular-nums;
|
|
1738
|
+
}
|
|
1739
|
+
[data-helix-part="menu-item"][aria-selected="true"] [data-helix-part="menu-item-label-end"],
|
|
1740
|
+
[data-helix-part="menu-item"]:disabled [data-helix-part="menu-item-label-end"] { color: inherit; }
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1744
|
+
CHECKBOX
|
|
1745
|
+
Contract: contracts/components/Checkbox.json
|
|
1746
|
+
Tokens: --helix-checkbox-*
|
|
1747
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1748
|
+
|
|
1749
|
+
[data-helix-part="checkbox-root"] {
|
|
1750
|
+
display: flex;
|
|
1751
|
+
flex-direction: column;
|
|
1752
|
+
gap: var(--helix-checkbox-gapDescription);
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
[data-helix-part="checkbox-label"] {
|
|
1756
|
+
display: inline-flex;
|
|
1757
|
+
align-items: flex-start;
|
|
1758
|
+
gap: var(--helix-primitive-spacing-50);
|
|
1759
|
+
cursor: pointer;
|
|
1760
|
+
user-select: none;
|
|
1761
|
+
}
|
|
1762
|
+
/* Real disabled colors, not opacity — .ai/maps/patterns/disabled-state.md */
|
|
1763
|
+
[data-helix-part="checkbox-root"][data-disabled] [data-helix-part="checkbox-label"] {
|
|
1764
|
+
cursor: not-allowed;
|
|
1765
|
+
color: var(--helix-checkbox-text-disabled);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
/* sr-only hidden native input */
|
|
1769
|
+
[data-helix-part="checkbox-input"] {
|
|
1770
|
+
position: absolute;
|
|
1771
|
+
width: 1px;
|
|
1772
|
+
height: 1px;
|
|
1773
|
+
padding: 0;
|
|
1774
|
+
margin: -1px;
|
|
1775
|
+
overflow: hidden;
|
|
1776
|
+
clip: rect(0, 0, 0, 0);
|
|
1777
|
+
white-space: nowrap;
|
|
1778
|
+
border-width: 0;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
[data-helix-part="checkbox-control"] {
|
|
1782
|
+
flex-shrink: 0;
|
|
1783
|
+
width: var(--helix-checkbox-size);
|
|
1784
|
+
height: var(--helix-checkbox-size);
|
|
1785
|
+
border-radius: var(--helix-checkbox-radius);
|
|
1786
|
+
border: var(--helix-borderWidth-thin) solid var(--helix-checkbox-border-default);
|
|
1787
|
+
background: var(--helix-checkbox-fill-default);
|
|
1788
|
+
display: flex;
|
|
1789
|
+
align-items: center;
|
|
1790
|
+
justify-content: center;
|
|
1791
|
+
/* Centered on the label's first line, derived from tokens (14px × 1.5 = 21px line → 2.5px), not a
|
|
1792
|
+
raw 1px: Figma draws it as a 21px-tall box with the control centered. */
|
|
1793
|
+
margin-top: calc((var(--helix-checkbox-text-labelFontSize) * var(--helix-checkbox-text-labelLineHeight) - var(--helix-checkbox-size)) / 2);
|
|
1794
|
+
transition:
|
|
1795
|
+
background-color var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base),
|
|
1796
|
+
border-color var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base),
|
|
1797
|
+
border-width var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base);
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
/* Hover — input not checked */
|
|
1801
|
+
[data-helix-part="checkbox-label"]:hover [data-helix-part="checkbox-input"]:not(:checked):not([data-indeterminate]):not(:disabled) + [data-helix-part="checkbox-control"] {
|
|
1802
|
+
border-color: var(--helix-checkbox-border-hover);
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
/* Checked */
|
|
1806
|
+
[data-helix-part="checkbox-input"]:checked + [data-helix-part="checkbox-control"],
|
|
1807
|
+
[data-helix-part="checkbox-input"][data-indeterminate] + [data-helix-part="checkbox-control"] {
|
|
1808
|
+
/* Indeterminate fills like checked — without it the box stayed white and its white minus mark was
|
|
1809
|
+
invisible. The disabled rule below still wins (same specificity, later). */
|
|
1810
|
+
background: var(--helix-checkbox-fill-checked);
|
|
1811
|
+
border-color: var(--helix-checkbox-border-checked);
|
|
1812
|
+
}
|
|
1813
|
+
/* Indeterminate hovers like checked (it is filled like checked) — it used to get the unchecked gray border. */
|
|
1814
|
+
[data-helix-part="checkbox-label"]:hover [data-helix-part="checkbox-input"]:is(:checked, [data-indeterminate]):not(:disabled) + [data-helix-part="checkbox-control"] {
|
|
1815
|
+
background: var(--helix-checkbox-fill-checked-hover);
|
|
1816
|
+
border-color: var(--helix-checkbox-fill-checked-hover);
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
/* Focus-visible ring */
|
|
1820
|
+
[data-helix-part="checkbox-input"]:focus-visible + [data-helix-part="checkbox-control"] {
|
|
1821
|
+
outline: 2px solid var(--helix-checkbox-border-focus);
|
|
1822
|
+
outline-offset: 2px;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
/* Invalid — hover never takes the invalid border away (the fill still darkens when checked) */
|
|
1826
|
+
[data-helix-part="checkbox-root"][data-invalid] [data-helix-part="checkbox-control"],
|
|
1827
|
+
[data-helix-part="checkbox-root"][data-invalid] [data-helix-part="checkbox-label"]:hover [data-helix-part="checkbox-input"]:not(:disabled) + [data-helix-part="checkbox-control"] {
|
|
1828
|
+
border-color: var(--helix-checkbox-border-invalid);
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
/* Disabled — real gray fill/border, wins over :checked's colors (placed after it in source order,
|
|
1832
|
+
same specificity). .ai/maps/patterns/disabled-state.md */
|
|
1833
|
+
[data-helix-part="checkbox-input"]:disabled + [data-helix-part="checkbox-control"] {
|
|
1834
|
+
background: var(--helix-checkbox-fill-disabled);
|
|
1835
|
+
border-color: var(--helix-checkbox-border-disabled);
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
/* Pop-in via CSS transform/opacity, not Motion — the icon toggling needs to track :checked on the
|
|
1839
|
+
native input, which correctly reflects both controlled AND uncontrolled usage on its own (that's
|
|
1840
|
+
exactly the CSS mechanism Checkbox already relies on). Driving this with Motion would mean adding a
|
|
1841
|
+
JS-tracked boolean mirroring the input's checked state, which is precisely the kind of extra state
|
|
1842
|
+
layer that introduced the real uncontrolled-mode bug found and fixed in Switch earlier — not worth
|
|
1843
|
+
that risk here for a checkmark pop, where CSS already does the job correctly and can't drift out of
|
|
1844
|
+
sync with the real input. display:none couldn't transition at all before; scale+opacity can. */
|
|
1845
|
+
[data-helix-part="checkbox-indicator"] {
|
|
1846
|
+
color: var(--helix-checkbox-icon-color);
|
|
1847
|
+
display: flex;
|
|
1848
|
+
align-items: center;
|
|
1849
|
+
line-height: 1;
|
|
1850
|
+
transform: scale(0);
|
|
1851
|
+
opacity: 0;
|
|
1852
|
+
transition:
|
|
1853
|
+
transform var(--helix-primitive-duration-fast) cubic-bezier(0.34, 1.56, 0.64, 1),
|
|
1854
|
+
opacity var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base);
|
|
1855
|
+
}
|
|
1856
|
+
[data-helix-part="checkbox-input"]:checked + [data-helix-part="checkbox-control"] [data-helix-part="checkbox-indicator"],
|
|
1857
|
+
[data-helix-part="checkbox-input"][data-indeterminate] + [data-helix-part="checkbox-control"] [data-helix-part="checkbox-indicator"] {
|
|
1858
|
+
transform: scale(1);
|
|
1859
|
+
opacity: 1;
|
|
1860
|
+
}
|
|
1861
|
+
/* Disabled + checked/indeterminate — the checkmark itself also needs its own disabled color,
|
|
1862
|
+
not the inverse (white) it uses at rest; wins by coming after in source order. */
|
|
1863
|
+
[data-helix-part="checkbox-input"]:disabled + [data-helix-part="checkbox-control"] [data-helix-part="checkbox-indicator"] {
|
|
1864
|
+
color: var(--helix-checkbox-icon-disabled);
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
[data-helix-part="checkbox-text"] {
|
|
1868
|
+
font-family: var(--helix-checkbox-text-labelFontFamily);
|
|
1869
|
+
font-size: var(--helix-checkbox-text-labelFontSize);
|
|
1870
|
+
font-weight: var(--helix-checkbox-text-labelFontWeight);
|
|
1871
|
+
line-height: var(--helix-checkbox-text-labelLineHeight);
|
|
1872
|
+
color: var(--helix-checkbox-text-label);
|
|
1873
|
+
}
|
|
1874
|
+
/* The required indicator (the `required` prop) — its own part so Figma has a layer for the BOOLEAN. */
|
|
1875
|
+
[data-helix-part="checkbox-required"] {
|
|
1876
|
+
color: var(--helix-color-text-danger);
|
|
1877
|
+
margin-left: var(--helix-spacing-3xs);
|
|
1878
|
+
}
|
|
1879
|
+
/* checkbox-text sets its own color, so the disabled color on checkbox-label above never reached it. */
|
|
1880
|
+
[data-helix-part="checkbox-root"][data-disabled] [data-helix-part="checkbox-text"] {
|
|
1881
|
+
color: var(--helix-checkbox-text-disabled);
|
|
1882
|
+
}
|
|
1883
|
+
/* Disabled dims everything the checkbox says, not just its label: the required mark and the description
|
|
1884
|
+
(both kept their normal colors before — owner's review 2026-10-20). Inactive UI: no contrast minimum (1.4.3). */
|
|
1885
|
+
[data-helix-part="checkbox-root"][data-disabled] [data-helix-part="checkbox-required"],
|
|
1886
|
+
[data-helix-part="checkbox-root"][data-disabled] [data-helix-part="checkbox-description"] {
|
|
1887
|
+
color: var(--helix-checkbox-text-disabled);
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
[data-helix-part="checkbox-description"] {
|
|
1891
|
+
padding-left: calc(var(--helix-checkbox-size) + var(--helix-primitive-spacing-50));
|
|
1892
|
+
font-family: var(--helix-checkbox-text-descriptionFontFamily);
|
|
1893
|
+
font-size: var(--helix-checkbox-text-descriptionFontSize);
|
|
1894
|
+
font-weight: var(--helix-checkbox-text-descriptionFontWeight);
|
|
1895
|
+
line-height: var(--helix-checkbox-text-descriptionLineHeight);
|
|
1896
|
+
color: var(--helix-checkbox-text-description);
|
|
1897
|
+
}
|
|
1898
|
+
[data-helix-part="checkbox-error"] {
|
|
1899
|
+
padding-left: calc(var(--helix-checkbox-size) + var(--helix-primitive-spacing-50));
|
|
1900
|
+
font-family: var(--helix-checkbox-text-descriptionFontFamily);
|
|
1901
|
+
font-size: var(--helix-checkbox-text-descriptionFontSize);
|
|
1902
|
+
font-weight: var(--helix-checkbox-text-descriptionFontWeight);
|
|
1903
|
+
line-height: var(--helix-checkbox-text-descriptionLineHeight);
|
|
1904
|
+
color: var(--helix-checkbox-text-error);
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1908
|
+
CHECKBOX GROUP
|
|
1909
|
+
Contract: contracts/components/CheckboxGroup.json
|
|
1910
|
+
Composes real Checkbox instances internally — no new visual tokens, just
|
|
1911
|
+
fieldset/legend layout reusing the same primitive spacing/typography
|
|
1912
|
+
vocabulary RadioGroup already uses.
|
|
1913
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1914
|
+
|
|
1915
|
+
[data-helix-part="checkbox-group"] {
|
|
1916
|
+
border: none;
|
|
1917
|
+
padding: 0;
|
|
1918
|
+
margin: 0;
|
|
1919
|
+
display: flex;
|
|
1920
|
+
flex-direction: column;
|
|
1921
|
+
gap: var(--helix-checkbox-gap);
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
[data-helix-part="checkbox-group-legend"] {
|
|
1925
|
+
font-family: var(--helix-checkbox-text-legendFontFamily);
|
|
1926
|
+
font-size: var(--helix-checkbox-text-legendFontSize);
|
|
1927
|
+
font-weight: var(--helix-checkbox-text-legendFontWeight);
|
|
1928
|
+
/* Same label as every form field (input-label, select-label, multi-select-label...): body-m-medium,
|
|
1929
|
+
text-neutral, the text style's own line-height (as in Figma). No margin-bottom — the group's own 8px gap already separates it
|
|
1930
|
+
from the options (a margin here stacked on top of it, giving 16px). */
|
|
1931
|
+
line-height: var(--helix-textStyle-body-m-medium-lineHeight);
|
|
1932
|
+
color: var(--helix-checkbox-text-label);
|
|
1933
|
+
padding: 0;
|
|
1934
|
+
float: left;
|
|
1935
|
+
width: 100%;
|
|
1936
|
+
}
|
|
1937
|
+
[data-helix-part="checkbox-group-legend"] + * { clear: left; }
|
|
1938
|
+
[data-helix-part="checkbox-group-required"] {
|
|
1939
|
+
color: var(--helix-color-text-danger);
|
|
1940
|
+
margin-left: var(--helix-spacing-3xs);
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
[data-helix-part="checkbox-group-options"] {
|
|
1944
|
+
display: flex;
|
|
1945
|
+
flex-direction: column;
|
|
1946
|
+
gap: var(--helix-primitive-spacing-75);
|
|
1947
|
+
}
|
|
1948
|
+
[data-helix-part="checkbox-group-options"][data-orientation="horizontal"] {
|
|
1949
|
+
flex-direction: row;
|
|
1950
|
+
flex-wrap: wrap;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
/* Aligned with each option's own text, not with its checkbox square — same left offset the
|
|
1954
|
+
standalone Checkbox's own description/error already use. */
|
|
1955
|
+
[data-helix-part="checkbox-group-description"],
|
|
1956
|
+
[data-helix-part="checkbox-group-error"] {
|
|
1957
|
+
padding-left: calc(var(--helix-checkbox-size) + var(--helix-primitive-spacing-50));
|
|
1958
|
+
font-family: var(--helix-checkbox-text-descriptionFontFamily);
|
|
1959
|
+
font-size: var(--helix-checkbox-text-descriptionFontSize);
|
|
1960
|
+
font-weight: var(--helix-checkbox-text-descriptionFontWeight);
|
|
1961
|
+
line-height: var(--helix-checkbox-text-descriptionLineHeight);
|
|
1962
|
+
}
|
|
1963
|
+
[data-helix-part="checkbox-group-description"] { color: var(--helix-checkbox-text-description); }
|
|
1964
|
+
[data-helix-part="checkbox-group-error"] { color: var(--helix-checkbox-text-error); }
|
|
1965
|
+
/* Disabled dims every text part — .ai/maps/patterns/disabled-state.md */
|
|
1966
|
+
[data-helix-part="checkbox-group"][data-disabled] :is([data-helix-part="checkbox-group-legend"], [data-helix-part="checkbox-group-required"], [data-helix-part="checkbox-group-description"]) {
|
|
1967
|
+
color: var(--helix-checkbox-text-disabled);
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1972
|
+
RADIO GROUP
|
|
1973
|
+
Contract: contracts/components/RadioGroup.json
|
|
1974
|
+
Tokens: --helix-radio-*
|
|
1975
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1976
|
+
|
|
1977
|
+
[data-helix-part="radio-group"] {
|
|
1978
|
+
border: none;
|
|
1979
|
+
padding: 0;
|
|
1980
|
+
margin: 0;
|
|
1981
|
+
display: flex;
|
|
1982
|
+
flex-direction: column;
|
|
1983
|
+
gap: var(--helix-radio-gap);
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
[data-helix-part="radio-legend"] {
|
|
1987
|
+
font-family: var(--helix-radio-text-legendFontFamily);
|
|
1988
|
+
font-size: var(--helix-radio-text-legendFontSize);
|
|
1989
|
+
font-weight: var(--helix-radio-text-legendFontWeight);
|
|
1990
|
+
/* Same label as every form field (input-label, select-label, multi-select-label...): body-m-medium,
|
|
1991
|
+
text-neutral, the text style's own line-height (as in Figma). No margin-bottom — the group's own 8px gap already separates it
|
|
1992
|
+
from the options (a margin here stacked on top of it, giving 16px). */
|
|
1993
|
+
line-height: var(--helix-textStyle-body-m-medium-lineHeight);
|
|
1994
|
+
color: var(--helix-radio-text-label);
|
|
1995
|
+
padding: 0;
|
|
1996
|
+
float: left;
|
|
1997
|
+
width: 100%;
|
|
1998
|
+
}
|
|
1999
|
+
[data-helix-part="radio-legend"] + * { clear: left; }
|
|
2000
|
+
[data-helix-part="radio-required"] {
|
|
2001
|
+
color: var(--helix-color-text-danger);
|
|
2002
|
+
margin-left: var(--helix-spacing-3xs);
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
[data-helix-part="radio-options"] {
|
|
2006
|
+
display: flex;
|
|
2007
|
+
flex-direction: column;
|
|
2008
|
+
gap: var(--helix-primitive-spacing-75);
|
|
2009
|
+
}
|
|
2010
|
+
[data-helix-part="radio-options"][data-orientation="horizontal"] {
|
|
2011
|
+
flex-direction: row;
|
|
2012
|
+
flex-wrap: wrap;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
[data-helix-part="radio-item"] {
|
|
2016
|
+
display: inline-flex;
|
|
2017
|
+
align-items: flex-start;
|
|
2018
|
+
gap: var(--helix-primitive-spacing-50);
|
|
2019
|
+
cursor: pointer;
|
|
2020
|
+
user-select: none;
|
|
2021
|
+
}
|
|
2022
|
+
/* Real disabled colors, not opacity — .ai/maps/patterns/disabled-state.md */
|
|
2023
|
+
[data-helix-part="radio-item"][data-disabled] {
|
|
2024
|
+
cursor: not-allowed;
|
|
2025
|
+
}
|
|
2026
|
+
[data-helix-part="radio-item-required"] {
|
|
2027
|
+
color: var(--helix-color-text-danger);
|
|
2028
|
+
margin-left: var(--helix-spacing-3xs);
|
|
2029
|
+
}
|
|
2030
|
+
[data-helix-part="radio-item"][data-disabled] [data-helix-part="radio-item-label"],
|
|
2031
|
+
[data-helix-part="radio-item"][data-disabled] [data-helix-part="radio-item-required"],
|
|
2032
|
+
[data-helix-part="radio-item"][data-disabled] [data-helix-part="radio-item-description"] {
|
|
2033
|
+
color: var(--helix-radio-text-disabled);
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
/* sr-only native radio */
|
|
2037
|
+
[data-helix-part="radio-input"] {
|
|
2038
|
+
position: absolute;
|
|
2039
|
+
width: 1px;
|
|
2040
|
+
height: 1px;
|
|
2041
|
+
padding: 0;
|
|
2042
|
+
margin: -1px;
|
|
2043
|
+
overflow: hidden;
|
|
2044
|
+
clip: rect(0, 0, 0, 0);
|
|
2045
|
+
white-space: nowrap;
|
|
2046
|
+
border-width: 0;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
[data-helix-part="radio-control"] {
|
|
2050
|
+
flex-shrink: 0;
|
|
2051
|
+
width: var(--helix-radio-size);
|
|
2052
|
+
height: var(--helix-radio-size);
|
|
2053
|
+
border-radius: 50%;
|
|
2054
|
+
border: var(--helix-borderWidth-thin) solid var(--helix-radio-border-default);
|
|
2055
|
+
background: var(--helix-radio-fill-default);
|
|
2056
|
+
display: flex;
|
|
2057
|
+
align-items: center;
|
|
2058
|
+
justify-content: center;
|
|
2059
|
+
/* Centered on the label's first line, derived from tokens (see checkbox-control). */
|
|
2060
|
+
margin-top: calc((var(--helix-radio-text-labelFontSize) * var(--helix-radio-text-labelLineHeight) - var(--helix-radio-size)) / 2);
|
|
2061
|
+
transition:
|
|
2062
|
+
background-color var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base),
|
|
2063
|
+
border-color var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base),
|
|
2064
|
+
border-width var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base);
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
[data-helix-part="radio-item"]:hover [data-helix-part="radio-input"]:not(:checked):not(:disabled) + [data-helix-part="radio-control"] {
|
|
2068
|
+
border-color: var(--helix-radio-border-hover);
|
|
2069
|
+
}
|
|
2070
|
+
[data-helix-part="radio-input"]:checked + [data-helix-part="radio-control"] {
|
|
2071
|
+
background: var(--helix-radio-fill-checked);
|
|
2072
|
+
border-color: var(--helix-radio-border-checked);
|
|
2073
|
+
}
|
|
2074
|
+
[data-helix-part="radio-item"]:hover [data-helix-part="radio-input"]:checked:not(:disabled) + [data-helix-part="radio-control"] {
|
|
2075
|
+
background: var(--helix-radio-fill-checked-hover);
|
|
2076
|
+
border-color: var(--helix-radio-fill-checked-hover);
|
|
2077
|
+
}
|
|
2078
|
+
[data-helix-part="radio-input"]:focus-visible + [data-helix-part="radio-control"] {
|
|
2079
|
+
outline: 2px solid var(--helix-radio-border-focus);
|
|
2080
|
+
outline-offset: 2px;
|
|
2081
|
+
}
|
|
2082
|
+
[data-helix-part="radio-group"][data-invalid] [data-helix-part="radio-control"],
|
|
2083
|
+
[data-helix-part="radio-item"][data-invalid] [data-helix-part="radio-control"],
|
|
2084
|
+
/* hover never takes the invalid border away (the fill still darkens when checked) */
|
|
2085
|
+
:is([data-helix-part="radio-group"][data-invalid] [data-helix-part="radio-item"], [data-helix-part="radio-item"][data-invalid]):hover [data-helix-part="radio-input"]:not(:disabled) + [data-helix-part="radio-control"] {
|
|
2086
|
+
border-color: var(--helix-radio-border-invalid);
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
/* Disabled — real gray fill/border, wins over :checked's colors (placed after it in source
|
|
2090
|
+
order, same specificity). .ai/maps/patterns/disabled-state.md */
|
|
2091
|
+
[data-helix-part="radio-input"]:disabled + [data-helix-part="radio-control"] {
|
|
2092
|
+
background: var(--helix-radio-fill-disabled);
|
|
2093
|
+
border-color: var(--helix-radio-border-disabled);
|
|
2094
|
+
}
|
|
2095
|
+
[data-helix-part="radio-input"]:disabled + [data-helix-part="radio-control"] [data-helix-part="radio-dot"] {
|
|
2096
|
+
background: var(--helix-radio-dot-disabled);
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
/* Same reasoning as checkbox-indicator above: CSS transform/opacity, not Motion — :checked already
|
|
2100
|
+
tracks controlled/uncontrolled correctly on its own, no JS state worth adding just for this pop. */
|
|
2101
|
+
[data-helix-part="radio-dot"] {
|
|
2102
|
+
width: 6px;
|
|
2103
|
+
height: 6px;
|
|
2104
|
+
border-radius: 50%;
|
|
2105
|
+
background: var(--helix-radio-dot);
|
|
2106
|
+
display: block;
|
|
2107
|
+
transform: scale(0);
|
|
2108
|
+
transition: transform var(--helix-primitive-duration-fast) cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
2109
|
+
}
|
|
2110
|
+
[data-helix-part="radio-input"]:checked + [data-helix-part="radio-control"] [data-helix-part="radio-dot"] {
|
|
2111
|
+
transform: scale(1);
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
[data-helix-part="radio-item-content"] {
|
|
2115
|
+
display: flex;
|
|
2116
|
+
flex-direction: column;
|
|
2117
|
+
gap: var(--helix-radio-gapDescription);
|
|
2118
|
+
}
|
|
2119
|
+
[data-helix-part="radio-item-label"] {
|
|
2120
|
+
font-family: var(--helix-radio-text-labelFontFamily);
|
|
2121
|
+
font-size: var(--helix-radio-text-labelFontSize);
|
|
2122
|
+
font-weight: var(--helix-radio-text-labelFontWeight);
|
|
2123
|
+
line-height: var(--helix-radio-text-labelLineHeight);
|
|
2124
|
+
color: var(--helix-radio-text-label);
|
|
2125
|
+
}
|
|
2126
|
+
[data-helix-part="radio-item-description"] {
|
|
2127
|
+
font-family: var(--helix-radio-text-descriptionFontFamily);
|
|
2128
|
+
font-size: var(--helix-radio-text-descriptionFontSize);
|
|
2129
|
+
font-weight: var(--helix-radio-text-descriptionFontWeight);
|
|
2130
|
+
line-height: var(--helix-radio-text-descriptionLineHeight);
|
|
2131
|
+
color: var(--helix-radio-text-description);
|
|
2132
|
+
}
|
|
2133
|
+
[data-helix-part="radio-item-error"] {
|
|
2134
|
+
font-family: var(--helix-radio-text-descriptionFontFamily);
|
|
2135
|
+
font-size: var(--helix-radio-text-descriptionFontSize);
|
|
2136
|
+
font-weight: var(--helix-radio-text-descriptionFontWeight);
|
|
2137
|
+
line-height: var(--helix-radio-text-descriptionLineHeight);
|
|
2138
|
+
color: var(--helix-radio-text-error);
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
/* Aligned with each option's own text, not with its radio circle — same left offset the
|
|
2142
|
+
standalone RadioButton's own description already uses. */
|
|
2143
|
+
[data-helix-part="radio-description"],
|
|
2144
|
+
[data-helix-part="radio-error"] {
|
|
2145
|
+
padding-left: calc(var(--helix-radio-size) + var(--helix-primitive-spacing-50));
|
|
2146
|
+
font-family: var(--helix-radio-text-descriptionFontFamily);
|
|
2147
|
+
font-size: var(--helix-radio-text-descriptionFontSize);
|
|
2148
|
+
font-weight: var(--helix-radio-text-descriptionFontWeight);
|
|
2149
|
+
line-height: var(--helix-radio-text-descriptionLineHeight);
|
|
2150
|
+
}
|
|
2151
|
+
[data-helix-part="radio-description"] { color: var(--helix-radio-text-description); }
|
|
2152
|
+
[data-helix-part="radio-error"] { color: var(--helix-radio-text-error); }
|
|
2153
|
+
/* Disabled dims every text part — .ai/maps/patterns/disabled-state.md */
|
|
2154
|
+
[data-helix-part="radio-group"][data-disabled] :is([data-helix-part="radio-legend"], [data-helix-part="radio-required"], [data-helix-part="radio-description"]) {
|
|
2155
|
+
color: var(--helix-radio-text-disabled);
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2160
|
+
SWITCH
|
|
2161
|
+
Contract: contracts/components/Switch.json
|
|
2162
|
+
Tokens: --helix-switch-*
|
|
2163
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2164
|
+
|
|
2165
|
+
[data-helix-part="switch-root"] {
|
|
2166
|
+
display: flex;
|
|
2167
|
+
flex-direction: column;
|
|
2168
|
+
gap: var(--helix-primitive-spacing-25);
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
[data-helix-part="switch-row"] {
|
|
2172
|
+
display: inline-flex;
|
|
2173
|
+
align-items: center;
|
|
2174
|
+
gap: var(--helix-primitive-spacing-75);
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
[data-helix-part="switch-track"] {
|
|
2178
|
+
appearance: none;
|
|
2179
|
+
position: relative;
|
|
2180
|
+
overflow: hidden;
|
|
2181
|
+
border-radius: var(--helix-radius-full);
|
|
2182
|
+
background: var(--helix-switch-track-fill-off);
|
|
2183
|
+
border: none;
|
|
2184
|
+
cursor: pointer;
|
|
2185
|
+
padding: 0;
|
|
2186
|
+
flex-shrink: 0;
|
|
2187
|
+
transition:
|
|
2188
|
+
background-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
2189
|
+
}
|
|
2190
|
+
[data-helix-part="switch-track"][data-size="s"] {
|
|
2191
|
+
width: var(--helix-switch-width-s);
|
|
2192
|
+
height: var(--helix-switch-height-s);
|
|
2193
|
+
}
|
|
2194
|
+
[data-helix-part="switch-track"][data-size="m"] {
|
|
2195
|
+
width: var(--helix-switch-width-m);
|
|
2196
|
+
height: var(--helix-switch-height-m);
|
|
2197
|
+
}
|
|
2198
|
+
[data-helix-part="switch-track"][aria-checked="false"]:hover:not(:disabled) {
|
|
2199
|
+
background: var(--helix-switch-track-fill-off-hover);
|
|
2200
|
+
}
|
|
2201
|
+
[data-helix-part="switch-track"][aria-checked="true"] {
|
|
2202
|
+
background: var(--helix-switch-track-fill-on);
|
|
2203
|
+
}
|
|
2204
|
+
[data-helix-part="switch-track"][aria-checked="true"]:hover:not(:disabled) {
|
|
2205
|
+
background: var(--helix-switch-track-fill-on-hover);
|
|
2206
|
+
}
|
|
2207
|
+
[data-helix-part="switch-track"]:disabled {
|
|
2208
|
+
background: var(--helix-switch-track-fill-disabled);
|
|
2209
|
+
cursor: not-allowed;
|
|
2210
|
+
opacity: 0.5;
|
|
2211
|
+
}
|
|
2212
|
+
[data-helix-part="switch-track"]:focus-visible {
|
|
2213
|
+
outline: 2px solid var(--helix-switch-border-focus);
|
|
2214
|
+
outline-offset: 2px;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
/* Position/transform of the thumb is owned by motion.span at the JS layer (Switch.tsx) — see ADR-007
|
|
2218
|
+
and .ai/maps/patterns/motion-effects.md — so this block only styles the thumb's own resting look,
|
|
2219
|
+
never its position. */
|
|
2220
|
+
[data-helix-part="switch-thumb"] {
|
|
2221
|
+
display: block;
|
|
2222
|
+
border-radius: 50%;
|
|
2223
|
+
background: var(--helix-switch-thumb-fill);
|
|
2224
|
+
pointer-events: none;
|
|
2225
|
+
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
|
2226
|
+
}
|
|
2227
|
+
[data-helix-part="switch-track"][data-size="s"] [data-helix-part="switch-thumb"] {
|
|
2228
|
+
width: var(--helix-switch-thumb-size-s);
|
|
2229
|
+
height: var(--helix-switch-thumb-size-s);
|
|
2230
|
+
}
|
|
2231
|
+
[data-helix-part="switch-track"][data-size="m"] [data-helix-part="switch-thumb"] {
|
|
2232
|
+
width: var(--helix-switch-thumb-size-m);
|
|
2233
|
+
height: var(--helix-switch-thumb-size-m);
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
[data-helix-part="switch-label"] {
|
|
2237
|
+
font-family: var(--helix-textStyle-body-s-regular-fontFamily); /* "Body / s / Regular" in Figma */
|
|
2238
|
+
font-size: var(--helix-textStyle-body-s-regular-fontSize);
|
|
2239
|
+
color: var(--helix-switch-text-label);
|
|
2240
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
2241
|
+
cursor: pointer;
|
|
2242
|
+
}
|
|
2243
|
+
/* Real disabled color, not opacity — .ai/maps/patterns/disabled-state.md */
|
|
2244
|
+
[data-helix-part="switch-root"][data-disabled] [data-helix-part="switch-label"],
|
|
2245
|
+
[data-helix-part="switch-root"][data-disabled] [data-helix-part="switch-description"] {
|
|
2246
|
+
cursor: not-allowed;
|
|
2247
|
+
color: var(--helix-switch-text-disabled);
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
[data-helix-part="switch-description"] {
|
|
2251
|
+
font-family: var(--helix-textStyle-body-s-regular-fontFamily);
|
|
2252
|
+
font-size: var(--helix-textStyle-body-s-regular-fontSize);
|
|
2253
|
+
color: var(--helix-switch-text-description);
|
|
2254
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
2255
|
+
}
|
|
2256
|
+
[data-helix-part="switch-root"][data-size="s"] [data-helix-part="switch-description"] {
|
|
2257
|
+
padding-left: calc(var(--helix-switch-width-s) + var(--helix-primitive-spacing-75));
|
|
2258
|
+
}
|
|
2259
|
+
[data-helix-part="switch-root"][data-size="m"] [data-helix-part="switch-description"] {
|
|
2260
|
+
padding-left: calc(var(--helix-switch-width-m) + var(--helix-primitive-spacing-75));
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
|
|
2264
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2265
|
+
CARD
|
|
2266
|
+
Contract: contracts/components/Card.json
|
|
2267
|
+
Tokens: --helix-card-*
|
|
2268
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2269
|
+
|
|
2270
|
+
[data-helix-part="card-root"] {
|
|
2271
|
+
background-color: var(--helix-card-fill);
|
|
2272
|
+
border: 1px solid var(--helix-card-border);
|
|
2273
|
+
border-radius: var(--helix-card-radius);
|
|
2274
|
+
overflow: hidden;
|
|
2275
|
+
/* Each part carries its own spacing (.ai/maps/patterns/show-hide-parts.md): the 24px top lives on
|
|
2276
|
+
the root, so showing/hiding the header never changes the body's padding. */
|
|
2277
|
+
padding-top: var(--helix-card-padding);
|
|
2278
|
+
}
|
|
2279
|
+
[data-helix-part="card-root"][data-padding="none"] {
|
|
2280
|
+
padding-top: 0;
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
[data-helix-part="card-header"] {
|
|
2284
|
+
padding: 0 var(--helix-card-padding) var(--helix-card-header-paddingBottom);
|
|
2285
|
+
font-family: var(--helix-card-header-fontFamily);
|
|
2286
|
+
font-size: var(--helix-card-header-fontSize);
|
|
2287
|
+
font-weight: var(--helix-card-header-fontWeight);
|
|
2288
|
+
line-height: var(--helix-card-header-lineHeight);
|
|
2289
|
+
color: var(--helix-color-text-neutral);
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
[data-helix-part="card-body"] {
|
|
2293
|
+
padding: 0 var(--helix-card-padding) var(--helix-card-padding);
|
|
2294
|
+
font-family: var(--helix-textStyle-body-m-regular-fontFamily);
|
|
2295
|
+
font-size: var(--helix-textStyle-body-m-regular-fontSize);
|
|
2296
|
+
font-weight: var(--helix-textStyle-body-m-regular-fontWeight);
|
|
2297
|
+
line-height: var(--helix-textStyle-body-m-regular-lineHeight);
|
|
2298
|
+
color: var(--helix-color-text-neutral);
|
|
2299
|
+
}
|
|
2300
|
+
/* padding="none": the body goes edge to edge; a header keeps its own 24px top instead of the root's. */
|
|
2301
|
+
[data-helix-part="card-root"][data-padding="none"] [data-helix-part="card-header"] {
|
|
2302
|
+
padding-top: var(--helix-card-padding);
|
|
2303
|
+
}
|
|
2304
|
+
[data-helix-part="card-root"][data-padding="none"] [data-helix-part="card-body"] {
|
|
2305
|
+
padding: 0;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
|
|
2309
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2310
|
+
AVATAR
|
|
2311
|
+
Contract: contracts/components/Avatar.json
|
|
2312
|
+
Tokens: --helix-avatar-*
|
|
2313
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2314
|
+
|
|
2315
|
+
[data-helix-part="avatar-root"] {
|
|
2316
|
+
display: inline-flex;
|
|
2317
|
+
align-items: center;
|
|
2318
|
+
justify-content: center;
|
|
2319
|
+
flex-shrink: 0;
|
|
2320
|
+
border-radius: var(--helix-radius-full);
|
|
2321
|
+
overflow: hidden;
|
|
2322
|
+
background-color: var(--helix-avatar-fill);
|
|
2323
|
+
}
|
|
2324
|
+
[data-helix-part="avatar-root"][data-size="s"] { width: var(--helix-avatar-height-s); height: var(--helix-avatar-height-s); }
|
|
2325
|
+
[data-helix-part="avatar-root"][data-size="m"] { width: var(--helix-avatar-height-m); height: var(--helix-avatar-height-m); }
|
|
2326
|
+
[data-helix-part="avatar-root"][data-size="l"] { width: var(--helix-avatar-height-l); height: var(--helix-avatar-height-l); }
|
|
2327
|
+
|
|
2328
|
+
[data-helix-part="avatar-image"] {
|
|
2329
|
+
width: 100%;
|
|
2330
|
+
height: 100%;
|
|
2331
|
+
object-fit: cover;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
[data-helix-part="avatar-initials"] {
|
|
2335
|
+
line-height: 1;
|
|
2336
|
+
user-select: none;
|
|
2337
|
+
color: var(--helix-avatar-text);
|
|
2338
|
+
}
|
|
2339
|
+
[data-helix-part="avatar-root"][data-size="s"] [data-helix-part="avatar-initials"] { font-size: var(--helix-avatar-fontSize-s); font-weight: var(--helix-avatar-fontWeight-s); }
|
|
2340
|
+
[data-helix-part="avatar-root"][data-size="m"] [data-helix-part="avatar-initials"] { font-size: var(--helix-avatar-fontSize-m); font-weight: var(--helix-avatar-fontWeight-m); }
|
|
2341
|
+
[data-helix-part="avatar-root"][data-size="l"] [data-helix-part="avatar-initials"] { font-size: var(--helix-avatar-fontSize-l); font-weight: var(--helix-avatar-fontWeight-l); }
|
|
2342
|
+
|
|
2343
|
+
|
|
2344
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2345
|
+
AVATAR GROUP
|
|
2346
|
+
Contract: contracts/components/AvatarGroup.json
|
|
2347
|
+
Tokens: --helix-avatarGroup-*, --helix-avatar-height-*, fontSize-*, fontWeight-* (shared with Avatar
|
|
2348
|
+
for the overflow indicator's sizing/type, but its own neutral fill/text — never Avatar's
|
|
2349
|
+
tinted ones, see avatarGroup.overflow-fill/overflow-text)
|
|
2350
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2351
|
+
|
|
2352
|
+
[data-helix-part="avatar-group-root"] {
|
|
2353
|
+
display: inline-flex;
|
|
2354
|
+
align-items: center;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
[data-helix-part="avatar-group-item"] {
|
|
2358
|
+
display: inline-flex;
|
|
2359
|
+
flex-shrink: 0;
|
|
2360
|
+
position: relative;
|
|
2361
|
+
border-radius: var(--helix-radius-full);
|
|
2362
|
+
border: var(--helix-avatarGroup-border-width) solid var(--helix-avatarGroup-ring);
|
|
2363
|
+
transform: translateY(0) scale(1);
|
|
2364
|
+
transition: transform var(--helix-duration-base) var(--helix-easing-base);
|
|
2365
|
+
}
|
|
2366
|
+
[data-helix-part="avatar-group-item"] + [data-helix-part="avatar-group-item"] {
|
|
2367
|
+
margin-left: calc(-1 * var(--helix-avatarGroup-overlap));
|
|
2368
|
+
}
|
|
2369
|
+
/* Hover lift — only the hovered avatar moves, no cascade to siblings. Plain CSS :hover, no JS:
|
|
2370
|
+
see .ai/maps/patterns/motion-effects.md's AvatarGroup row for why Motion isn't used here.
|
|
2371
|
+
No z-index override here on purpose: the base rule already gives every item a `transform`
|
|
2372
|
+
(translateY(0) scale(1)), which establishes a stacking context per item ordered by DOM
|
|
2373
|
+
position alone — the item stacked later (visually on top, e.g. further right) already
|
|
2374
|
+
paints above an earlier one with no z-index needed. Forcing z-index:2 on hover used to make
|
|
2375
|
+
the hovered avatar jump above EVERY sibling, including a later one that normally sits on
|
|
2376
|
+
top of it — visually "covering" a neighbor it shouldn't. Removing it keeps each avatar's
|
|
2377
|
+
existing stacking order intact through the lift: it rises in place, never reordering
|
|
2378
|
+
relative to its neighbors. */
|
|
2379
|
+
[data-helix-part="avatar-group-item"]:hover {
|
|
2380
|
+
transform: translateY(var(--helix-avatarGroup-hover-lift)) scale(var(--helix-avatarGroup-hover-scale));
|
|
2381
|
+
transition-duration: var(--helix-duration-fast);
|
|
2382
|
+
transition-timing-function: var(--helix-easing-out);
|
|
2383
|
+
}
|
|
2384
|
+
/* Reduced motion: the hovered avatar doesn't move at all — no lift, no scale, no transition.
|
|
2385
|
+
The name still shows in its Tooltip. */
|
|
2386
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2387
|
+
[data-helix-part="avatar-group-item"],
|
|
2388
|
+
[data-helix-part="avatar-group-item"]:hover {
|
|
2389
|
+
transform: none;
|
|
2390
|
+
transition: none;
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
[data-helix-part="avatar-group-overflow"] {
|
|
2395
|
+
display: inline-flex;
|
|
2396
|
+
align-items: center;
|
|
2397
|
+
justify-content: center;
|
|
2398
|
+
border-radius: var(--helix-radius-full);
|
|
2399
|
+
user-select: none;
|
|
2400
|
+
background-color: var(--helix-avatarGroup-overflow-fill);
|
|
2401
|
+
color: var(--helix-avatarGroup-overflow-text);
|
|
2402
|
+
}
|
|
2403
|
+
[data-helix-part="avatar-group-root"][data-size="s"] [data-helix-part="avatar-group-overflow"] { width: var(--helix-avatar-height-s); height: var(--helix-avatar-height-s); font-size: var(--helix-avatar-fontSize-s); font-weight: var(--helix-avatar-fontWeight-s); line-height: var(--helix-textStyle-caption-semibold-lineHeight); }
|
|
2404
|
+
[data-helix-part="avatar-group-root"][data-size="m"] [data-helix-part="avatar-group-overflow"] { width: var(--helix-avatar-height-m); height: var(--helix-avatar-height-m); font-size: var(--helix-avatar-fontSize-m); font-weight: var(--helix-avatar-fontWeight-m); line-height: var(--helix-textStyle-caption-semibold-lineHeight); }
|
|
2405
|
+
[data-helix-part="avatar-group-root"][data-size="l"] [data-helix-part="avatar-group-overflow"] { width: var(--helix-avatar-height-l); height: var(--helix-avatar-height-l); font-size: var(--helix-avatar-fontSize-l); font-weight: var(--helix-avatar-fontWeight-l); line-height: var(--helix-textStyle-body-m-semibold-lineHeight); }
|
|
2406
|
+
|
|
2407
|
+
|
|
2408
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2409
|
+
TOOLTIP
|
|
2410
|
+
Contract: contracts/components/Tooltip.json
|
|
2411
|
+
Rationale: contracts/components/Tooltip.json — hand-rolled, CSS-only show/hide, no library.
|
|
2412
|
+
Tokens: --helix-tooltip-*, --helix-primitive-zIndex-tooltip
|
|
2413
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2414
|
+
|
|
2415
|
+
[data-helix-part="tooltip-root"] {
|
|
2416
|
+
position: relative;
|
|
2417
|
+
display: inline-flex;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
[data-helix-part="tooltip-content"] {
|
|
2421
|
+
position: absolute;
|
|
2422
|
+
z-index: var(--helix-primitive-zIndex-tooltip);
|
|
2423
|
+
width: max-content;
|
|
2424
|
+
max-width: 240px; /* content-driven width above the token scale — see Tooltip.json's sizing note */
|
|
2425
|
+
background-color: var(--helix-tooltip-fill);
|
|
2426
|
+
color: var(--helix-tooltip-text);
|
|
2427
|
+
border-radius: var(--helix-tooltip-radius);
|
|
2428
|
+
box-shadow: var(--helix-tooltip-shadow);
|
|
2429
|
+
padding: var(--helix-tooltip-padding-y) var(--helix-tooltip-padding-x);
|
|
2430
|
+
font-family: var(--helix-textStyle-caption-regular-fontFamily); /* "Caption / Regular" in Figma */
|
|
2431
|
+
font-size: var(--helix-tooltip-fontSize);
|
|
2432
|
+
font-weight: var(--helix-tooltip-fontWeight);
|
|
2433
|
+
line-height: var(--helix-textStyle-caption-regular-lineHeight);
|
|
2434
|
+
/* pre-line, not normal: AvatarGroup's overflow tooltip joins hidden names with '\n' so each
|
|
2435
|
+
renders on its own line — normal whitespace still collapses/wraps as usual. */
|
|
2436
|
+
white-space: pre-line;
|
|
2437
|
+
pointer-events: none;
|
|
2438
|
+
opacity: 0;
|
|
2439
|
+
visibility: hidden;
|
|
2440
|
+
/* Cross-axis centering + edge-clamp shift come from --tooltip-shift, set inline by Tooltip.tsx's
|
|
2441
|
+
auto-placement (Tooltip's contract) — CSS still owns `transform` itself so :hover/[data-expanded] below can
|
|
2442
|
+
animate the enter/leave `scale()`. Base (leave) state: quick 50ms ease-in, no delay. */
|
|
2443
|
+
transition: opacity var(--helix-tooltip-duration-out) var(--helix-easing-in),
|
|
2444
|
+
transform var(--helix-tooltip-duration-out) var(--helix-easing-in),
|
|
2445
|
+
visibility 0s linear var(--helix-tooltip-duration-out);
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
/* Show on hover/focus — delayed (Tooltip's contract: "don't show instantly"). Hide is immediate: leaving
|
|
2449
|
+
:hover/:focus-within drops back to the base rule above, whose transition-delay is 0s. */
|
|
2450
|
+
[data-helix-part="tooltip-root"]:hover [data-helix-part="tooltip-content"],
|
|
2451
|
+
[data-helix-part="tooltip-root"]:focus-within [data-helix-part="tooltip-content"] {
|
|
2452
|
+
opacity: 1;
|
|
2453
|
+
visibility: visible;
|
|
2454
|
+
transition-duration: var(--helix-tooltip-duration-in);
|
|
2455
|
+
transition-timing-function: var(--helix-easing-out);
|
|
2456
|
+
transition-delay: var(--helix-tooltip-delay), var(--helix-tooltip-delay), var(--helix-tooltip-delay);
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
/* `expanded` prop — forces visible/hidden regardless of interaction. */
|
|
2460
|
+
[data-helix-part="tooltip-root"][data-expanded="true"] [data-helix-part="tooltip-content"] {
|
|
2461
|
+
opacity: 1;
|
|
2462
|
+
visibility: visible;
|
|
2463
|
+
transition-delay: 0s, 0s, 0s;
|
|
2464
|
+
}
|
|
2465
|
+
[data-helix-part="tooltip-root"][data-expanded="false"] [data-helix-part="tooltip-content"] {
|
|
2466
|
+
opacity: 0 !important;
|
|
2467
|
+
visibility: hidden !important;
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
/* transform-origin sits at the edge nearest the trigger, so the scale-in reads as growing OUT of
|
|
2471
|
+
the trigger rather than from its own center. --tooltip-shift defaults to 0px when auto-placement
|
|
2472
|
+
hasn't run yet (first paint, before the layout effect measures). */
|
|
2473
|
+
[data-helix-part="tooltip-root"][data-placement="top"] [data-helix-part="tooltip-content"] {
|
|
2474
|
+
bottom: calc(100% + var(--helix-tooltip-offset));
|
|
2475
|
+
left: 50%;
|
|
2476
|
+
transform-origin: 50% 100%;
|
|
2477
|
+
transform: translateX(calc(-50% + var(--tooltip-shift, 0px))) scale(var(--helix-tooltip-scale-enter));
|
|
2478
|
+
}
|
|
2479
|
+
[data-helix-part="tooltip-root"][data-placement="bottom"] [data-helix-part="tooltip-content"] {
|
|
2480
|
+
top: calc(100% + var(--helix-tooltip-offset));
|
|
2481
|
+
left: 50%;
|
|
2482
|
+
transform-origin: 50% 0%;
|
|
2483
|
+
transform: translateX(calc(-50% + var(--tooltip-shift, 0px))) scale(var(--helix-tooltip-scale-enter));
|
|
2484
|
+
}
|
|
2485
|
+
[data-helix-part="tooltip-root"][data-placement="left"] [data-helix-part="tooltip-content"] {
|
|
2486
|
+
right: calc(100% + var(--helix-tooltip-offset));
|
|
2487
|
+
top: 50%;
|
|
2488
|
+
transform-origin: 100% 50%;
|
|
2489
|
+
transform: translateY(calc(-50% + var(--tooltip-shift, 0px))) scale(var(--helix-tooltip-scale-enter));
|
|
2490
|
+
}
|
|
2491
|
+
[data-helix-part="tooltip-root"][data-placement="right"] [data-helix-part="tooltip-content"] {
|
|
2492
|
+
left: calc(100% + var(--helix-tooltip-offset));
|
|
2493
|
+
top: 50%;
|
|
2494
|
+
transform-origin: 0% 50%;
|
|
2495
|
+
transform: translateY(calc(-50% + var(--tooltip-shift, 0px))) scale(var(--helix-tooltip-scale-enter));
|
|
2496
|
+
}
|
|
2497
|
+
[data-helix-part="tooltip-root"][data-placement="top"]:hover [data-helix-part="tooltip-content"],
|
|
2498
|
+
[data-helix-part="tooltip-root"][data-placement="top"]:focus-within [data-helix-part="tooltip-content"],
|
|
2499
|
+
[data-helix-part="tooltip-root"][data-placement="top"][data-expanded="true"] [data-helix-part="tooltip-content"],
|
|
2500
|
+
[data-helix-part="tooltip-root"][data-placement="bottom"]:hover [data-helix-part="tooltip-content"],
|
|
2501
|
+
[data-helix-part="tooltip-root"][data-placement="bottom"]:focus-within [data-helix-part="tooltip-content"],
|
|
2502
|
+
[data-helix-part="tooltip-root"][data-placement="bottom"][data-expanded="true"] [data-helix-part="tooltip-content"] {
|
|
2503
|
+
transform: translateX(calc(-50% + var(--tooltip-shift, 0px))) scale(1);
|
|
2504
|
+
}
|
|
2505
|
+
[data-helix-part="tooltip-root"][data-placement="left"]:hover [data-helix-part="tooltip-content"],
|
|
2506
|
+
[data-helix-part="tooltip-root"][data-placement="left"]:focus-within [data-helix-part="tooltip-content"],
|
|
2507
|
+
[data-helix-part="tooltip-root"][data-placement="left"][data-expanded="true"] [data-helix-part="tooltip-content"],
|
|
2508
|
+
[data-helix-part="tooltip-root"][data-placement="right"]:hover [data-helix-part="tooltip-content"],
|
|
2509
|
+
[data-helix-part="tooltip-root"][data-placement="right"]:focus-within [data-helix-part="tooltip-content"],
|
|
2510
|
+
[data-helix-part="tooltip-root"][data-placement="right"][data-expanded="true"] [data-helix-part="tooltip-content"] {
|
|
2511
|
+
transform: translateY(calc(-50% + var(--tooltip-shift, 0px))) scale(1);
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
|
|
2515
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2516
|
+
ACCORDION
|
|
2517
|
+
Contract: contracts/components/Accordion.json
|
|
2518
|
+
Tokens: --helix-accordion-*
|
|
2519
|
+
Built on native <details>/<summary> — the grid-rows 0fr↔1fr trick needs the panel to stay
|
|
2520
|
+
`display: grid` even while closed, which requires overriding the UA stylesheet's own
|
|
2521
|
+
`details:not([open]) > *:not(summary) { display: none }` rule — the `!important` below is that
|
|
2522
|
+
override, not decoration (same class of justified override as Tooltip's [data-expanded="false"]).
|
|
2523
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2524
|
+
|
|
2525
|
+
[data-helix-part="accordion-root"] {
|
|
2526
|
+
background-color: var(--helix-accordion-fill);
|
|
2527
|
+
border: 1px solid var(--helix-accordion-border);
|
|
2528
|
+
border-radius: var(--helix-accordion-radius);
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
[data-helix-part="accordion-header"] {
|
|
2532
|
+
display: flex;
|
|
2533
|
+
align-items: center;
|
|
2534
|
+
justify-content: space-between;
|
|
2535
|
+
gap: var(--helix-accordion-padding-y);
|
|
2536
|
+
padding: var(--helix-accordion-padding-y) var(--helix-accordion-padding-x);
|
|
2537
|
+
cursor: pointer;
|
|
2538
|
+
list-style: none;
|
|
2539
|
+
color: var(--helix-accordion-text);
|
|
2540
|
+
font-size: var(--helix-accordion-fontSize);
|
|
2541
|
+
font-weight: var(--helix-accordion-fontWeight);
|
|
2542
|
+
}
|
|
2543
|
+
[data-helix-part="accordion-header"]::-webkit-details-marker {
|
|
2544
|
+
display: none; /* Chrome/Safari's own disclosure triangle — replaced by our own chevron */
|
|
2545
|
+
}
|
|
2546
|
+
[data-helix-part="accordion-header"][aria-disabled="true"] {
|
|
2547
|
+
cursor: not-allowed;
|
|
2548
|
+
color: var(--helix-accordion-text-disabled);
|
|
2549
|
+
}
|
|
2550
|
+
/* Real disabled colors, not just a cursor — .ai/maps/patterns/disabled-state.md. Before this the
|
|
2551
|
+
disabled accordion looked exactly like an enabled one. */
|
|
2552
|
+
[data-helix-part="accordion-root"]:has(> [data-helix-part="accordion-header"][aria-disabled="true"]) {
|
|
2553
|
+
background-color: var(--helix-accordion-fill-disabled);
|
|
2554
|
+
border-color: var(--helix-accordion-border-disabled);
|
|
2555
|
+
}
|
|
2556
|
+
[data-helix-part="accordion-header"][aria-disabled="true"] [data-helix-part="accordion-chevron"] {
|
|
2557
|
+
color: var(--helix-accordion-chevron-disabled);
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
/* Keyed off data-state (open/closing/closed), not the native [open] attribute — [open] stays true
|
|
2561
|
+
for the entire close transition and only flips false once it finishes. See
|
|
2562
|
+
useDisclosureTransition.ts for why: the browser hides <details> content the instant [open] is
|
|
2563
|
+
removed, which happens synchronously on click and would otherwise skip the collapse transition
|
|
2564
|
+
entirely (only the expand direction would ever animate).
|
|
2565
|
+
|
|
2566
|
+
`height` is set inline by Accordion.tsx (measured via scrollHeight), not animated here via
|
|
2567
|
+
grid-template-rows 0fr/1fr — that technique's 'fr' unit interpolation doesn't track the same
|
|
2568
|
+
visual pace in both directions even with matched duration/easing, which read as a slow/laggy
|
|
2569
|
+
collapse. CSS only owns overflow + the transition itself; the real height value is JS's job,
|
|
2570
|
+
same "shift responsibilities" split as Tooltip's --tooltip-shift. */
|
|
2571
|
+
[data-helix-part="accordion-panel"] {
|
|
2572
|
+
display: block !important; /* overrides the UA's details-closed `display: none` */
|
|
2573
|
+
overflow: hidden;
|
|
2574
|
+
height: 0px;
|
|
2575
|
+
transition: height var(--helix-accordion-duration-collapse) var(--helix-accordion-easing-collapse);
|
|
2576
|
+
}
|
|
2577
|
+
[data-helix-part="accordion-root"][data-state="open"] > [data-helix-part="accordion-panel"] {
|
|
2578
|
+
transition: height var(--helix-accordion-duration-expand) var(--helix-accordion-easing);
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
[data-helix-part="accordion-panel-inner"] {
|
|
2582
|
+
opacity: 0;
|
|
2583
|
+
filter: blur(var(--helix-accordion-blur-enter));
|
|
2584
|
+
padding: 0 var(--helix-accordion-padding-x) var(--helix-accordion-padding-y);
|
|
2585
|
+
transition: opacity var(--helix-accordion-duration-collapse) var(--helix-accordion-easing-collapse),
|
|
2586
|
+
filter var(--helix-accordion-duration-collapse) var(--helix-accordion-easing-collapse);
|
|
2587
|
+
}
|
|
2588
|
+
[data-helix-part="accordion-root"][data-state="open"] [data-helix-part="accordion-panel-inner"] {
|
|
2589
|
+
opacity: 1;
|
|
2590
|
+
filter: blur(0);
|
|
2591
|
+
transition: opacity var(--helix-accordion-duration-expand) var(--helix-accordion-easing),
|
|
2592
|
+
filter var(--helix-accordion-duration-expand) var(--helix-accordion-easing);
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
[data-helix-part="accordion-chevron"] {
|
|
2596
|
+
display: inline-flex;
|
|
2597
|
+
color: var(--helix-accordion-chevron);
|
|
2598
|
+
transform: scaleY(1);
|
|
2599
|
+
transform-origin: center;
|
|
2600
|
+
transition: transform var(--helix-accordion-duration-chevron) var(--helix-accordion-easing-collapse);
|
|
2601
|
+
}
|
|
2602
|
+
[data-helix-part="accordion-root"][data-state="open"] [data-helix-part="accordion-chevron"] {
|
|
2603
|
+
transform: scaleY(-1);
|
|
2604
|
+
transition: transform var(--helix-accordion-duration-chevron) var(--helix-accordion-easing);
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
|
|
2608
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2609
|
+
MODAL
|
|
2610
|
+
Contract: contracts/components/Modal.json
|
|
2611
|
+
Rationale: contracts/components/Modal.json — native <dialog> + showModal(), JS-timed
|
|
2612
|
+
close via useDialogTransition (packages/core/src/lib/useDialogTransition.ts).
|
|
2613
|
+
Tokens: --helix-modal-*
|
|
2614
|
+
`data-state` (closed/open/closing) is written by useDialogTransition, not CSS-driven :open-style
|
|
2615
|
+
selectors — see the ADR for why this needs JS timing, not a pure media/attribute transition.
|
|
2616
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2617
|
+
|
|
2618
|
+
[data-helix-part="modal-root"] {
|
|
2619
|
+
/* Reset native <dialog> UA styles — border/padding/background are ours, not the browser's. */
|
|
2620
|
+
border: none;
|
|
2621
|
+
padding: 0;
|
|
2622
|
+
/* Explicit position+inset+margin, not left to the UA's own `dialog:modal` centering — Tailwind's
|
|
2623
|
+
preflight zeroes `margin` on every element (`*{margin:0}`), which cancels the UA's `margin:auto`
|
|
2624
|
+
centering trick. Re-declaring it here at author-level restores centering regardless of preflight. */
|
|
2625
|
+
position: fixed;
|
|
2626
|
+
inset: 0;
|
|
2627
|
+
margin: auto;
|
|
2628
|
+
min-height: 400px; /* per-component characteristic, not a token — same policy as min/max-width */
|
|
2629
|
+
max-width: min(560px, calc(100vw - var(--helix-spacing-xl) * 2));
|
|
2630
|
+
display: flex;
|
|
2631
|
+
flex-direction: column;
|
|
2632
|
+
border-radius: var(--helix-modal-radius);
|
|
2633
|
+
box-shadow: var(--helix-modal-shadow);
|
|
2634
|
+
background-color: var(--helix-modal-fill);
|
|
2635
|
+
color: var(--helix-modal-text);
|
|
2636
|
+
transform: scale(var(--helix-modal-scale-enter));
|
|
2637
|
+
opacity: 0;
|
|
2638
|
+
transition: transform var(--helix-modal-duration-close) var(--helix-modal-easing),
|
|
2639
|
+
opacity var(--helix-modal-duration-close) var(--helix-modal-easing);
|
|
2640
|
+
}
|
|
2641
|
+
/* A closed <dialog> must not render. The `display: flex` above overrides the UA's
|
|
2642
|
+
`dialog:not([open]) { display: none }`, so a closed Modal/SidePanel stayed in the page at opacity 0 and
|
|
2643
|
+
Tab reached its invisible buttons (found by the visible-focus check, WCAG 2.4.7 / 2.4.3). The close
|
|
2644
|
+
animation is unaffected: useDialogTransition keeps [open] until the transition has finished. */
|
|
2645
|
+
[data-helix-part="modal-root"]:not([open]),
|
|
2646
|
+
[data-helix-part="side-panel-root"]:not([open]) {
|
|
2647
|
+
display: none;
|
|
2648
|
+
}
|
|
2649
|
+
[data-helix-part="modal-root"][data-state="open"] {
|
|
2650
|
+
transform: scale(1);
|
|
2651
|
+
opacity: 1;
|
|
2652
|
+
transition-duration: var(--helix-modal-duration-open);
|
|
2653
|
+
}
|
|
2654
|
+
[data-helix-part="modal-root"][data-state="closing"] {
|
|
2655
|
+
transform: scale(var(--helix-modal-scale-enter));
|
|
2656
|
+
opacity: 0;
|
|
2657
|
+
transition-duration: var(--helix-modal-duration-close);
|
|
2658
|
+
}
|
|
2659
|
+
[data-helix-part="modal-root"]::backdrop {
|
|
2660
|
+
background-color: color-mix(in srgb, var(--helix-modal-overlay) calc(var(--helix-modal-overlay-opacity) * 100%), transparent);
|
|
2661
|
+
}
|
|
2662
|
+
[data-helix-part="modal-header"] {
|
|
2663
|
+
/* Right-padded clear of the absolutely-positioned close button (inset + its own ~40px box + a
|
|
2664
|
+
small gap), so a long title wraps before it, never runs under it. */
|
|
2665
|
+
padding: var(--helix-modal-padding) calc(var(--helix-modal-closeInset) * 2 + 40px) 0 var(--helix-modal-padding);
|
|
2666
|
+
}
|
|
2667
|
+
[data-helix-part="modal-title"] {
|
|
2668
|
+
margin: 0;
|
|
2669
|
+
font-family: var(--helix-textStyle-heading-xl-bold-fontFamily); /* "Heading / xl / Bold" in Figma */
|
|
2670
|
+
font-size: var(--helix-modal-titleFontSize);
|
|
2671
|
+
font-weight: var(--helix-modal-titleFontWeight);
|
|
2672
|
+
line-height: var(--helix-textStyle-heading-xl-bold-lineHeight);
|
|
2673
|
+
}
|
|
2674
|
+
[data-helix-part="modal-close"] {
|
|
2675
|
+
position: absolute;
|
|
2676
|
+
top: var(--helix-modal-closeInset);
|
|
2677
|
+
right: var(--helix-modal-closeInset);
|
|
2678
|
+
}
|
|
2679
|
+
[data-helix-part="modal-body"] {
|
|
2680
|
+
flex: 1;
|
|
2681
|
+
padding: var(--helix-modal-padding);
|
|
2682
|
+
}
|
|
2683
|
+
[data-helix-part="modal-footer"] {
|
|
2684
|
+
display: flex;
|
|
2685
|
+
flex-shrink: 0;
|
|
2686
|
+
justify-content: space-between;
|
|
2687
|
+
align-items: center;
|
|
2688
|
+
gap: var(--helix-modal-footerGap);
|
|
2689
|
+
padding: 0 var(--helix-modal-padding) var(--helix-modal-padding);
|
|
2690
|
+
}
|
|
2691
|
+
[data-helix-part="modal-footer-start"],
|
|
2692
|
+
[data-helix-part="modal-footer-end"] {
|
|
2693
|
+
display: flex;
|
|
2694
|
+
align-items: center;
|
|
2695
|
+
gap: var(--helix-modal-footerGap);
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
|
|
2699
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2700
|
+
SIDE PANEL
|
|
2701
|
+
Contract: contracts/components/SidePanel.json
|
|
2702
|
+
Rationale: contracts/components/Modal.json — same native <dialog> primitive as
|
|
2703
|
+
Modal, positioned against the right edge instead of centered.
|
|
2704
|
+
Tokens: --helix-sidePanel-*
|
|
2705
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2706
|
+
|
|
2707
|
+
[data-helix-part="side-panel-root"] {
|
|
2708
|
+
/* Reset native <dialog> UA centering — anchored to an edge instead, per `data-placement`. */
|
|
2709
|
+
border: none;
|
|
2710
|
+
margin: 0;
|
|
2711
|
+
padding: 0;
|
|
2712
|
+
position: fixed;
|
|
2713
|
+
display: flex;
|
|
2714
|
+
flex-direction: column;
|
|
2715
|
+
background-color: var(--helix-sidePanel-fill);
|
|
2716
|
+
color: var(--helix-sidePanel-text);
|
|
2717
|
+
opacity: 0;
|
|
2718
|
+
filter: blur(var(--helix-sidePanel-blur-enter));
|
|
2719
|
+
transition: transform var(--helix-sidePanel-duration-close) var(--helix-sidePanel-easing),
|
|
2720
|
+
opacity var(--helix-sidePanel-duration-close) var(--helix-sidePanel-easing),
|
|
2721
|
+
filter var(--helix-sidePanel-duration-close) var(--helix-sidePanel-easing);
|
|
2722
|
+
}
|
|
2723
|
+
[data-helix-part="side-panel-root"][data-state="open"] {
|
|
2724
|
+
opacity: 1;
|
|
2725
|
+
filter: blur(0);
|
|
2726
|
+
transition-duration: var(--helix-sidePanel-duration-open);
|
|
2727
|
+
}
|
|
2728
|
+
[data-helix-part="side-panel-root"][data-state="closing"] {
|
|
2729
|
+
opacity: 0;
|
|
2730
|
+
filter: blur(var(--helix-sidePanel-blur-enter));
|
|
2731
|
+
transition-duration: var(--helix-sidePanel-duration-close);
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2734
|
+
/* placement="right" (default) — full height, fixed width, slides in from the right edge.
|
|
2735
|
+
shadow (not shadowBottom): the visible edge facing the page is the left edge, and shadow.xl's
|
|
2736
|
+
blur radius already reaches it — no directional flip needed the way "bottom" does below. */
|
|
2737
|
+
[data-helix-part="side-panel-root"][data-placement="right"] {
|
|
2738
|
+
inset: 0 0 0 auto;
|
|
2739
|
+
height: 100vh;
|
|
2740
|
+
max-height: 100vh;
|
|
2741
|
+
width: var(--helix-sidePanel-width);
|
|
2742
|
+
max-width: calc(100vw - var(--helix-spacing-xl) * 2);
|
|
2743
|
+
box-shadow: var(--helix-sidePanel-shadow);
|
|
2744
|
+
transform: translateX(100%);
|
|
2745
|
+
}
|
|
2746
|
+
[data-helix-part="side-panel-root"][data-placement="right"][data-state="open"] {
|
|
2747
|
+
transform: translateX(0);
|
|
2748
|
+
}
|
|
2749
|
+
[data-helix-part="side-panel-root"][data-placement="right"][data-state="closing"] {
|
|
2750
|
+
transform: translateX(100%);
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
/* placement="bottom" — full width, content-driven height up to 80vh, slides up from the bottom edge.
|
|
2754
|
+
shadowBottom, not shadow: the visible edge facing the page is the TOP edge here, and shadow.xl's
|
|
2755
|
+
positive Y-offset casts most of its strength downward (off-screen, behind the sheet) — barely
|
|
2756
|
+
anything shows above. shadowBottom is the same weight/blur with the Y sign flipped, so the
|
|
2757
|
+
visible side actually gets the strong part of the shadow. */
|
|
2758
|
+
[data-helix-part="side-panel-root"][data-placement="bottom"] {
|
|
2759
|
+
inset: auto 0 0 0;
|
|
2760
|
+
width: 100vw;
|
|
2761
|
+
max-width: 100vw;
|
|
2762
|
+
max-height: 80vh;
|
|
2763
|
+
box-shadow: var(--helix-sidePanel-shadowBottom);
|
|
2764
|
+
transform: translateY(100%);
|
|
2765
|
+
}
|
|
2766
|
+
[data-helix-part="side-panel-root"][data-placement="bottom"][data-state="open"] {
|
|
2767
|
+
transform: translateY(0);
|
|
2768
|
+
}
|
|
2769
|
+
[data-helix-part="side-panel-root"][data-placement="bottom"][data-state="closing"] {
|
|
2770
|
+
transform: translateY(100%);
|
|
2771
|
+
}
|
|
2772
|
+
/* No scrim — unlike Modal, SidePanel leaves the page behind fully visible. showModal() still gives
|
|
2773
|
+
the focus trap/Escape/top-layer stacking. `background: transparent` here is NOT decorative —
|
|
2774
|
+
browsers apply their own default ::backdrop dimming (e.g. Chrome's ~10% black) even with no
|
|
2775
|
+
author rule at all, so simply omitting a background-color declaration still shows a grey scrim. */
|
|
2776
|
+
[data-helix-part="side-panel-root"]::backdrop {
|
|
2777
|
+
background: transparent;
|
|
2778
|
+
}
|
|
2779
|
+
[data-helix-part="side-panel-header"] {
|
|
2780
|
+
/* Right-padded clear of the absolutely-positioned close button — same reasoning as Modal's header. */
|
|
2781
|
+
padding: var(--helix-sidePanel-padding) calc(var(--helix-sidePanel-closeInset) * 2 + 40px) 0 var(--helix-sidePanel-padding);
|
|
2782
|
+
flex-shrink: 0;
|
|
2783
|
+
}
|
|
2784
|
+
[data-helix-part="side-panel-title"] {
|
|
2785
|
+
margin: 0;
|
|
2786
|
+
font-family: var(--helix-textStyle-heading-xl-bold-fontFamily); /* "Heading / xl / Bold" in Figma, like Modal's */
|
|
2787
|
+
font-size: var(--helix-sidePanel-titleFontSize);
|
|
2788
|
+
font-weight: var(--helix-sidePanel-titleFontWeight);
|
|
2789
|
+
line-height: var(--helix-textStyle-heading-xl-bold-lineHeight);
|
|
2790
|
+
}
|
|
2791
|
+
[data-helix-part="side-panel-close"] {
|
|
2792
|
+
position: absolute;
|
|
2793
|
+
top: var(--helix-sidePanel-closeInset);
|
|
2794
|
+
right: var(--helix-sidePanel-closeInset);
|
|
2795
|
+
}
|
|
2796
|
+
[data-helix-part="side-panel-body"] {
|
|
2797
|
+
padding: var(--helix-sidePanel-padding);
|
|
2798
|
+
overflow-y: auto;
|
|
2799
|
+
flex: 1;
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
|
|
2803
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2804
|
+
PAGE HEADER
|
|
2805
|
+
Contract: contracts/components/PageHeader.json
|
|
2806
|
+
Tokens: --helix-pageHeader-*
|
|
2807
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2808
|
+
|
|
2809
|
+
[data-helix-part="page-header-root"] {
|
|
2810
|
+
display: flex;
|
|
2811
|
+
flex-wrap: wrap; /* WCAG 1.4.10 Reflow: at 320px the actions drop below the title instead of being cut off */
|
|
2812
|
+
align-items: flex-start;
|
|
2813
|
+
justify-content: space-between;
|
|
2814
|
+
gap: var(--helix-primitive-spacing-100);
|
|
2815
|
+
}
|
|
2816
|
+
/* The title block takes the row and gives way to the actions only when there's room beside it. */
|
|
2817
|
+
[data-helix-part="page-header-root"] > :first-child {
|
|
2818
|
+
flex: 1 1 16rem;
|
|
2819
|
+
min-width: 0;
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
/* level 1 = "Heading / 2xl / Bold", level 2 = "Heading / xl / Bold" — the text styles, as in Figma */
|
|
2823
|
+
[data-helix-part="page-header-title"] {
|
|
2824
|
+
margin: 0;
|
|
2825
|
+
color: var(--helix-pageHeader-title-color);
|
|
2826
|
+
font-family: var(--helix-textStyle-heading-2xl-bold-fontFamily);
|
|
2827
|
+
}
|
|
2828
|
+
[data-helix-part="page-header-title"][data-level="1"] { font-size: var(--helix-pageHeader-title-fontSize-1); font-weight: var(--helix-pageHeader-title-fontWeight-1); line-height: var(--helix-textStyle-heading-2xl-bold-lineHeight); }
|
|
2829
|
+
[data-helix-part="page-header-title"][data-level="2"] { font-size: var(--helix-pageHeader-title-fontSize-2); font-weight: var(--helix-pageHeader-title-fontWeight-2); line-height: var(--helix-textStyle-heading-xl-bold-lineHeight); }
|
|
2830
|
+
|
|
2831
|
+
[data-helix-part="page-header-description"] {
|
|
2832
|
+
margin: var(--helix-primitive-spacing-25) 0 0;
|
|
2833
|
+
font-family: var(--helix-textStyle-body-s-regular-fontFamily); /* "Body / s / Regular" */
|
|
2834
|
+
font-size: var(--helix-pageHeader-description-fontSize);
|
|
2835
|
+
font-weight: var(--helix-pageHeader-description-fontWeight);
|
|
2836
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
2837
|
+
color: var(--helix-pageHeader-description-color);
|
|
2838
|
+
}
|
|
2839
|
+
|
|
2840
|
+
[data-helix-part="page-header-actions"] {
|
|
2841
|
+
display: flex;
|
|
2842
|
+
flex-wrap: wrap;
|
|
2843
|
+
align-items: center;
|
|
2844
|
+
gap: var(--helix-primitive-spacing-50);
|
|
2845
|
+
flex-shrink: 0;
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
|
|
2850
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2851
|
+
TABLE
|
|
2852
|
+
Contract: contracts/components/Table.json
|
|
2853
|
+
Tokens: --helix-table-*
|
|
2854
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2855
|
+
|
|
2856
|
+
[data-helix-part="table"] {
|
|
2857
|
+
width: 100%;
|
|
2858
|
+
border-collapse: collapse;
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
[data-helix-part="table-header-cell"] {
|
|
2862
|
+
padding: var(--helix-primitive-spacing-50) var(--helix-primitive-spacing-100);
|
|
2863
|
+
text-align: left;
|
|
2864
|
+
font-size: var(--helix-table-header-fontSize);
|
|
2865
|
+
font-weight: var(--helix-table-header-fontWeight);
|
|
2866
|
+
color: var(--helix-table-header-color);
|
|
2867
|
+
text-transform: uppercase;
|
|
2868
|
+
letter-spacing: var(--helix-primitive-letterSpacing-wide); /* "Label / Uppercase" + case/spacing at the call site */
|
|
2869
|
+
white-space: nowrap;
|
|
2870
|
+
border-bottom: 1px solid var(--helix-table-header-border);
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2873
|
+
[data-helix-part="table-row"] {
|
|
2874
|
+
border-bottom: 1px solid var(--helix-table-row-border);
|
|
2875
|
+
transition: background-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
2876
|
+
}
|
|
2877
|
+
[data-helix-part="table-body"] [data-helix-part="table-row"]:last-child {
|
|
2878
|
+
border-bottom: none;
|
|
2879
|
+
}
|
|
2880
|
+
[data-helix-part="table-body"] [data-helix-part="table-row"]:hover {
|
|
2881
|
+
background-color: var(--helix-table-row-hoverFill);
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
/* Drag-to-reorder (Motion Reorder pattern — the row sets data-dragging while it's being dragged).
|
|
2885
|
+
While any row is dragging: the dragged row stays highlighted, the others drop their hover fill and
|
|
2886
|
+
its transition — rows sliding under the pointer would otherwise fade the fill in/out (a flash) —
|
|
2887
|
+
and no text can be selected as the pointer crosses rows. */
|
|
2888
|
+
[data-helix-part="table-body"]:has([data-dragging]) {
|
|
2889
|
+
user-select: none;
|
|
2890
|
+
cursor: grabbing;
|
|
2891
|
+
}
|
|
2892
|
+
[data-helix-part="table-body"]:has([data-dragging]) [data-helix-part="table-row"] {
|
|
2893
|
+
transition: none;
|
|
2894
|
+
}
|
|
2895
|
+
[data-helix-part="table-body"]:has([data-dragging]) [data-helix-part="table-row"]:not([data-dragging]):hover {
|
|
2896
|
+
background-color: transparent;
|
|
2897
|
+
}
|
|
2898
|
+
[data-helix-part="table-body"] [data-helix-part="table-row"][data-dragging] {
|
|
2899
|
+
background-color: var(--helix-table-row-hoverFill);
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
[data-helix-part="table-cell"] {
|
|
2903
|
+
padding: var(--helix-primitive-spacing-75) var(--helix-primitive-spacing-100);
|
|
2904
|
+
font-size: var(--helix-table-cell-fontSize);
|
|
2905
|
+
font-weight: var(--helix-table-cell-fontWeight);
|
|
2906
|
+
color: var(--helix-table-cell-color);
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
|
|
2910
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2911
|
+
NAV ITEM
|
|
2912
|
+
Contract: contracts/components/NavItem.json
|
|
2913
|
+
Tokens: --helix-navItem-*
|
|
2914
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2915
|
+
|
|
2916
|
+
[data-helix-part="nav-item"] {
|
|
2917
|
+
position: relative;
|
|
2918
|
+
display: flex;
|
|
2919
|
+
align-items: center;
|
|
2920
|
+
gap: var(--helix-primitive-spacing-50);
|
|
2921
|
+
padding: var(--helix-primitive-spacing-50) var(--helix-primitive-spacing-75);
|
|
2922
|
+
border-radius: var(--helix-navItem-radius);
|
|
2923
|
+
text-decoration: none;
|
|
2924
|
+
cursor: pointer;
|
|
2925
|
+
transition: background-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
2926
|
+
}
|
|
2927
|
+
[data-helix-part="nav-item"]:hover:not([data-current]) {
|
|
2928
|
+
background-color: var(--helix-navItem-fill-hover);
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
/* The "current" background lives on this indicator, not the <a> itself — it's a motion.span with a
|
|
2932
|
+
shared layoutId (NavItem.tsx), so Motion animates it sliding from the previous current item to this
|
|
2933
|
+
one instead of the background just cutting over. Icon/label get z-index above it (position:relative,
|
|
2934
|
+
see below) since a positioned sibling with no z-index would otherwise paint over static content. */
|
|
2935
|
+
[data-helix-part="nav-item-indicator"] {
|
|
2936
|
+
position: absolute;
|
|
2937
|
+
inset: 0;
|
|
2938
|
+
z-index: 0;
|
|
2939
|
+
/* square on the left, where the bar sits; the other states keep all four corners (owner 2026-10-21) */
|
|
2940
|
+
border-radius: var(--helix-radius-none) var(--helix-navItem-radius) var(--helix-navItem-radius) var(--helix-radius-none);
|
|
2941
|
+
background-color: var(--helix-navItem-fill-current);
|
|
2942
|
+
}
|
|
2943
|
+
/* The blue bar at the left edge of the current item — part of the indicator, so it slides with it. */
|
|
2944
|
+
[data-helix-part="nav-item-indicator"]::before {
|
|
2945
|
+
content: '';
|
|
2946
|
+
position: absolute;
|
|
2947
|
+
top: 0;
|
|
2948
|
+
bottom: 0;
|
|
2949
|
+
left: 0;
|
|
2950
|
+
width: var(--helix-navItem-bar-width);
|
|
2951
|
+
border-radius: var(--helix-radius-full);
|
|
2952
|
+
background-color: var(--helix-navItem-fill-bar);
|
|
2953
|
+
}
|
|
2954
|
+
|
|
2955
|
+
[data-helix-part="nav-item-icon"] {
|
|
2956
|
+
position: relative;
|
|
2957
|
+
z-index: 1;
|
|
2958
|
+
display: flex;
|
|
2959
|
+
align-items: center;
|
|
2960
|
+
flex-shrink: 0;
|
|
2961
|
+
color: var(--helix-navItem-icon-default);
|
|
2962
|
+
}
|
|
2963
|
+
[data-helix-part="nav-item"][data-current] [data-helix-part="nav-item-icon"] {
|
|
2964
|
+
color: var(--helix-navItem-icon-current);
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
[data-helix-part="nav-item-label"] {
|
|
2968
|
+
position: relative;
|
|
2969
|
+
z-index: 1;
|
|
2970
|
+
font-size: var(--helix-navItem-fontSize);
|
|
2971
|
+
font-weight: var(--helix-navItem-fontWeight);
|
|
2972
|
+
color: var(--helix-navItem-text-default);
|
|
2973
|
+
white-space: nowrap;
|
|
2974
|
+
overflow: hidden;
|
|
2975
|
+
text-overflow: ellipsis;
|
|
2976
|
+
}
|
|
2977
|
+
[data-helix-part="nav-item"][data-current] [data-helix-part="nav-item-label"] {
|
|
2978
|
+
color: var(--helix-navItem-text-current);
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
|
|
2982
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
2983
|
+
SEGMENTED CONTROL
|
|
2984
|
+
Contract: contracts/components/SegmentedControl.json
|
|
2985
|
+
Tokens: --helix-segmentedControl-*
|
|
2986
|
+
The sliding pill reuses NavItem's exact layering: the pill is a motion.span
|
|
2987
|
+
with a shared layoutId (SegmentedControl.tsx), absolutely positioned to fill
|
|
2988
|
+
its parent button, with the label given z-index above it — see SegmentedControl's contract.
|
|
2989
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
2990
|
+
|
|
2991
|
+
[data-helix-part="segmented-control-root"] {
|
|
2992
|
+
position: relative;
|
|
2993
|
+
display: inline-flex;
|
|
2994
|
+
align-items: center;
|
|
2995
|
+
gap: var(--helix-segmentedControl-padding);
|
|
2996
|
+
padding: var(--helix-segmentedControl-padding);
|
|
2997
|
+
border-radius: var(--helix-segmentedControl-radius);
|
|
2998
|
+
background-color: var(--helix-segmentedControl-fill-track);
|
|
2999
|
+
}
|
|
3000
|
+
/* Real disabled colors, not opacity — .ai/maps/patterns/disabled-state.md */
|
|
3001
|
+
[data-helix-part="segmented-control-root"][data-disabled] {
|
|
3002
|
+
background-color: var(--helix-segmentedControl-fill-disabled);
|
|
3003
|
+
pointer-events: none;
|
|
3004
|
+
}
|
|
3005
|
+
[data-helix-part="segmented-control-root"][data-disabled] [data-helix-part="segmented-control-item-label"] {
|
|
3006
|
+
color: var(--helix-segmentedControl-text-disabled);
|
|
3007
|
+
}
|
|
3008
|
+
|
|
3009
|
+
[data-helix-part="segmented-control-item"] {
|
|
3010
|
+
position: relative;
|
|
3011
|
+
appearance: none;
|
|
3012
|
+
-webkit-appearance: none;
|
|
3013
|
+
border: 0;
|
|
3014
|
+
background-color: transparent;
|
|
3015
|
+
font-family: inherit;
|
|
3016
|
+
height: var(--helix-segmentedControl-height);
|
|
3017
|
+
padding: 0 var(--helix-segmentedControl-paddingX);
|
|
3018
|
+
border-radius: var(--helix-segmentedControl-radius);
|
|
3019
|
+
cursor: pointer;
|
|
3020
|
+
outline: none;
|
|
3021
|
+
transition: color var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base);
|
|
3022
|
+
}
|
|
3023
|
+
[data-helix-part="segmented-control-item"]:disabled {
|
|
3024
|
+
cursor: not-allowed;
|
|
3025
|
+
}
|
|
3026
|
+
[data-helix-part="segmented-control-item"]:focus-visible {
|
|
3027
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
3028
|
+
outline-offset: 2px;
|
|
3029
|
+
}
|
|
3030
|
+
|
|
3031
|
+
/* Same layering NavItem's indicator uses: absolutely positioned, z-index below the label, so a
|
|
3032
|
+
single shared motion.span (one per checked item at a time) can slide between siblings via
|
|
3033
|
+
Motion's layoutId instead of the background just cutting over. */
|
|
3034
|
+
[data-helix-part="segmented-control-pill"] {
|
|
3035
|
+
position: absolute;
|
|
3036
|
+
inset: 0;
|
|
3037
|
+
z-index: 0;
|
|
3038
|
+
border-radius: var(--helix-segmentedControl-radius);
|
|
3039
|
+
background-color: var(--helix-segmentedControl-fill-pill);
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
[data-helix-part="segmented-control-item-label"] {
|
|
3043
|
+
position: relative;
|
|
3044
|
+
z-index: 1;
|
|
3045
|
+
display: block;
|
|
3046
|
+
font-size: var(--helix-segmentedControl-fontSize);
|
|
3047
|
+
font-weight: var(--helix-segmentedControl-fontWeight);
|
|
3048
|
+
color: var(--helix-segmentedControl-text-default);
|
|
3049
|
+
white-space: nowrap;
|
|
3050
|
+
transition: color var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base);
|
|
3051
|
+
}
|
|
3052
|
+
[data-helix-part="segmented-control-item"][aria-checked="true"] [data-helix-part="segmented-control-item-label"],
|
|
3053
|
+
[data-helix-part="segmented-control-item"]:not([aria-checked="true"]):not(:disabled):hover [data-helix-part="segmented-control-item-label"] {
|
|
3054
|
+
color: var(--helix-segmentedControl-text-checked);
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
/* Icon-only option: the icon takes the label's colors; the label stays as the accessible name, hidden.
|
|
3058
|
+
Side padding drops to spacing-xs (8px) so the segment is close to square at the 24px height. */
|
|
3059
|
+
[data-helix-part="segmented-control-item"][data-icon-only] {
|
|
3060
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
3061
|
+
padding: 0 var(--helix-spacing-xs);
|
|
3062
|
+
}
|
|
3063
|
+
[data-helix-part="segmented-control-item-icon"] {
|
|
3064
|
+
position: relative; z-index: 1; display: inline-flex;
|
|
3065
|
+
color: var(--helix-segmentedControl-text-default);
|
|
3066
|
+
transition: color var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base);
|
|
3067
|
+
}
|
|
3068
|
+
[data-helix-part="segmented-control-item"][aria-checked="true"] [data-helix-part="segmented-control-item-icon"],
|
|
3069
|
+
[data-helix-part="segmented-control-item"]:not([aria-checked="true"]):not(:disabled):hover [data-helix-part="segmented-control-item-icon"] {
|
|
3070
|
+
color: var(--helix-segmentedControl-text-checked);
|
|
3071
|
+
}
|
|
3072
|
+
[data-helix-part="segmented-control-root"][data-disabled] [data-helix-part="segmented-control-item-icon"] {
|
|
3073
|
+
color: var(--helix-segmentedControl-text-disabled);
|
|
3074
|
+
}
|
|
3075
|
+
[data-helix-part="segmented-control-item"][data-icon-only] [data-helix-part="segmented-control-item-label"] {
|
|
3076
|
+
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
|
|
3077
|
+
clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
3078
|
+
}
|
|
3079
|
+
/* After the checked rule on purpose (same specificity): a disabled option reads as disabled whether
|
|
3080
|
+
it's one option or the whole group, checked or not — before, a disabled option looked exactly like
|
|
3081
|
+
an enabled one and a disabled group kept its checked label at full color. */
|
|
3082
|
+
[data-helix-part="segmented-control-item"]:disabled [data-helix-part="segmented-control-item-label"] {
|
|
3083
|
+
color: var(--helix-segmentedControl-text-disabled);
|
|
3084
|
+
}
|
|
3085
|
+
|
|
3086
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3087
|
+
[data-helix-part="segmented-control-pill"] { transition: none !important; }
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
|
+
|
|
3091
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
3092
|
+
POPOVER
|
|
3093
|
+
Contract: contracts/components/Popover.json
|
|
3094
|
+
Rationale: contracts/components/Popover.json — native popover="manual" (top layer, no z-index).
|
|
3095
|
+
Tokens: --helix-popover-*
|
|
3096
|
+
The UA's [popover] styles (inset: 0; margin: auto) are reset: Popover.tsx sets top/left from the
|
|
3097
|
+
trigger's rect (flip + clamp, Tooltip's contract). Shadow allowed: it floats above the page (ADR-005).
|
|
3098
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
3099
|
+
|
|
3100
|
+
[data-helix-part="popover-root"] {
|
|
3101
|
+
display: inline-flex;
|
|
3102
|
+
}
|
|
3103
|
+
|
|
3104
|
+
[data-helix-part="popover-content"] {
|
|
3105
|
+
position: fixed;
|
|
3106
|
+
inset: auto;
|
|
3107
|
+
margin: 0;
|
|
3108
|
+
box-sizing: border-box;
|
|
3109
|
+
width: max-content;
|
|
3110
|
+
max-width: min(320px, calc(100vw - 2 * var(--helix-spacing-xs)));
|
|
3111
|
+
display: none;
|
|
3112
|
+
flex-direction: column;
|
|
3113
|
+
gap: var(--helix-popover-gap);
|
|
3114
|
+
padding: var(--helix-popover-padding);
|
|
3115
|
+
background-color: var(--helix-popover-fill);
|
|
3116
|
+
color: var(--helix-popover-text);
|
|
3117
|
+
border: var(--helix-popover-borderWidth) solid var(--helix-popover-border);
|
|
3118
|
+
border-radius: var(--helix-popover-radius);
|
|
3119
|
+
box-shadow: var(--helix-popover-shadow);
|
|
3120
|
+
opacity: 0;
|
|
3121
|
+
transition: opacity var(--helix-popover-duration) var(--helix-popover-easing),
|
|
3122
|
+
display var(--helix-popover-duration) allow-discrete,
|
|
3123
|
+
overlay var(--helix-popover-duration) allow-discrete;
|
|
3124
|
+
}
|
|
3125
|
+
[data-helix-part="popover-content"]:popover-open {
|
|
3126
|
+
display: flex;
|
|
3127
|
+
opacity: 1;
|
|
3128
|
+
}
|
|
3129
|
+
@starting-style {
|
|
3130
|
+
[data-helix-part="popover-content"]:popover-open {
|
|
3131
|
+
opacity: 0;
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
[data-helix-part="popover-content"]:focus-visible {
|
|
3135
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
3136
|
+
outline-offset: 2px;
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
[data-helix-part="popover-title"] {
|
|
3140
|
+
margin: 0;
|
|
3141
|
+
font-size: var(--helix-popover-titleFontSize);
|
|
3142
|
+
font-weight: var(--helix-popover-titleFontWeight);
|
|
3143
|
+
}
|
|
3144
|
+
[data-helix-part="popover-body"] {
|
|
3145
|
+
display: flex;
|
|
3146
|
+
flex-direction: column;
|
|
3147
|
+
gap: var(--helix-popover-gap);
|
|
3148
|
+
font-size: var(--helix-popover-fontSize);
|
|
3149
|
+
font-weight: var(--helix-popover-fontWeight);
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
3153
|
+
TABS
|
|
3154
|
+
Contract: contracts/components/Tabs.json
|
|
3155
|
+
Rationale: contracts/components/Tabs.json — APG tablist, roving tabindex, automatic activation.
|
|
3156
|
+
Tokens: --helix-tabs-*
|
|
3157
|
+
The indicator is a motion.span with a shared layoutId (Tabs.tsx), absolutely positioned on the
|
|
3158
|
+
tab's bottom edge over the list's border — same layering as NavItem/SegmentedControl.
|
|
3159
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
3160
|
+
|
|
3161
|
+
[data-helix-part="tabs-root"] {
|
|
3162
|
+
display: flex;
|
|
3163
|
+
flex-direction: column;
|
|
3164
|
+
}
|
|
3165
|
+
|
|
3166
|
+
[data-helix-part="tabs-list"] {
|
|
3167
|
+
display: flex;
|
|
3168
|
+
align-items: flex-end;
|
|
3169
|
+
gap: var(--helix-tabs-gap);
|
|
3170
|
+
border-bottom: var(--helix-tabs-borderWidth) solid var(--helix-tabs-border);
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
[data-helix-part="tabs-tab"] {
|
|
3174
|
+
position: relative;
|
|
3175
|
+
appearance: none;
|
|
3176
|
+
-webkit-appearance: none;
|
|
3177
|
+
display: inline-flex;
|
|
3178
|
+
align-items: center;
|
|
3179
|
+
gap: var(--helix-tabs-gap);
|
|
3180
|
+
height: var(--helix-tabs-height);
|
|
3181
|
+
padding: 0 var(--helix-tabs-paddingX);
|
|
3182
|
+
margin-bottom: calc(-1 * var(--helix-tabs-borderWidth));
|
|
3183
|
+
border: 0;
|
|
3184
|
+
background-color: transparent;
|
|
3185
|
+
font-family: inherit;
|
|
3186
|
+
font-size: var(--helix-tabs-fontSize);
|
|
3187
|
+
font-weight: var(--helix-tabs-fontWeight);
|
|
3188
|
+
color: var(--helix-tabs-text-default);
|
|
3189
|
+
white-space: nowrap;
|
|
3190
|
+
cursor: pointer;
|
|
3191
|
+
transition: color var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base);
|
|
3192
|
+
}
|
|
3193
|
+
[data-helix-part="tabs-tab"][aria-selected="true"],
|
|
3194
|
+
[data-helix-part="tabs-tab"]:not([aria-selected="true"]):not(:disabled):hover {
|
|
3195
|
+
color: var(--helix-tabs-text-selected);
|
|
3196
|
+
}
|
|
3197
|
+
/* Real disabled colors, not opacity — .ai/maps/patterns/disabled-state.md */
|
|
3198
|
+
[data-helix-part="tabs-tab"]:disabled {
|
|
3199
|
+
color: var(--helix-tabs-text-disabled);
|
|
3200
|
+
cursor: not-allowed;
|
|
3201
|
+
}
|
|
3202
|
+
[data-helix-part="tabs-tab"]:focus-visible {
|
|
3203
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
3204
|
+
outline-offset: -2px;
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3207
|
+
[data-helix-part="tabs-tab-icon"] {
|
|
3208
|
+
display: inline-flex;
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3211
|
+
[data-helix-part="tabs-indicator"] {
|
|
3212
|
+
position: absolute;
|
|
3213
|
+
left: 0;
|
|
3214
|
+
right: 0;
|
|
3215
|
+
bottom: 0;
|
|
3216
|
+
height: var(--helix-tabs-indicatorWidth);
|
|
3217
|
+
background-color: var(--helix-tabs-indicator);
|
|
3218
|
+
}
|
|
3219
|
+
|
|
3220
|
+
[data-helix-part="tabs-panel"] {
|
|
3221
|
+
padding-top: var(--helix-tabs-panelGap);
|
|
3222
|
+
}
|
|
3223
|
+
[data-helix-part="tabs-panel"]:focus-visible {
|
|
3224
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
3225
|
+
outline-offset: 2px;
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
3229
|
+
TOP BAR
|
|
3230
|
+
Contract: contracts/components/TopBar.json
|
|
3231
|
+
Tokens: --helix-topBar-*
|
|
3232
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
3233
|
+
|
|
3234
|
+
[data-helix-part="topbar-root"] {
|
|
3235
|
+
display: flex;
|
|
3236
|
+
align-items: center;
|
|
3237
|
+
gap: var(--helix-primitive-spacing-75);
|
|
3238
|
+
height: var(--helix-topBar-height);
|
|
3239
|
+
flex-shrink: 0;
|
|
3240
|
+
padding: 0 var(--helix-primitive-spacing-150);
|
|
3241
|
+
background-color: var(--helix-topBar-fill);
|
|
3242
|
+
border-bottom: 1px solid var(--helix-topBar-border);
|
|
3243
|
+
}
|
|
3244
|
+
|
|
3245
|
+
/* Menu button of the collapsed SideNav — only inside an AppShell, only below its 768px (see APP SHELL). */
|
|
3246
|
+
[data-helix-part="topbar-menu"] {
|
|
3247
|
+
display: none;
|
|
3248
|
+
flex-shrink: 0;
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3251
|
+
[data-helix-part="topbar-start"] {
|
|
3252
|
+
flex: 1;
|
|
3253
|
+
min-width: 0; /* WCAG 1.4.10 Reflow: the search gives way on a narrow screen instead of pushing the end slot off it */
|
|
3254
|
+
max-width: 320px;
|
|
3255
|
+
}
|
|
3256
|
+
/* A search Input in the start slot keeps its natural width when there's room and shrinks when there
|
|
3257
|
+
isn't (input-root is fit-content and the native <input> has an intrinsic ~20ch width otherwise). */
|
|
3258
|
+
[data-helix-part="topbar-start"] [data-helix-part="input-root"],
|
|
3259
|
+
[data-helix-part="topbar-start"] [data-helix-part="input-wrapper"],
|
|
3260
|
+
[data-helix-part="topbar-start"] [data-helix-part="input-field"] {
|
|
3261
|
+
min-width: 0;
|
|
3262
|
+
max-width: 100%;
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
[data-helix-part="topbar-end"] {
|
|
3266
|
+
display: flex;
|
|
3267
|
+
align-items: center;
|
|
3268
|
+
gap: var(--helix-spacing-component-xs);
|
|
3269
|
+
margin-left: auto;
|
|
3270
|
+
flex-shrink: 0; /* actions keep their size; the search shrinks first */
|
|
3271
|
+
}
|
|
3272
|
+
|
|
3273
|
+
|
|
3274
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
3275
|
+
SIDE NAV
|
|
3276
|
+
Contract: contracts/components/SideNav.json
|
|
3277
|
+
Tokens: --helix-sideNav-*
|
|
3278
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
3279
|
+
|
|
3280
|
+
[data-helix-part="side-nav-root"] {
|
|
3281
|
+
display: flex;
|
|
3282
|
+
flex-direction: column;
|
|
3283
|
+
width: var(--helix-sideNav-width);
|
|
3284
|
+
flex-shrink: 0;
|
|
3285
|
+
background-color: var(--helix-sideNav-fill);
|
|
3286
|
+
/* Divider against the content — same tone as the TopBar's bottom border, so the two lines meet. */
|
|
3287
|
+
border-right: 1px solid var(--helix-sideNav-border);
|
|
3288
|
+
padding: var(--helix-primitive-spacing-75) 0;
|
|
3289
|
+
}
|
|
3290
|
+
|
|
3291
|
+
[data-helix-part="side-nav-brand"] {
|
|
3292
|
+
padding: var(--helix-primitive-spacing-50) var(--helix-primitive-spacing-75);
|
|
3293
|
+
margin-bottom: var(--helix-primitive-spacing-75);
|
|
3294
|
+
}
|
|
3295
|
+
|
|
3296
|
+
[data-helix-part="side-nav-items"] {
|
|
3297
|
+
flex: 1;
|
|
3298
|
+
display: flex;
|
|
3299
|
+
flex-direction: column;
|
|
3300
|
+
gap: var(--helix-primitive-spacing-25);
|
|
3301
|
+
padding: 0 var(--helix-primitive-spacing-50);
|
|
3302
|
+
overflow-y: auto;
|
|
3303
|
+
}
|
|
3304
|
+
|
|
3305
|
+
[data-helix-part="side-nav-footer"] {
|
|
3306
|
+
padding: var(--helix-primitive-spacing-50);
|
|
3307
|
+
margin: var(--helix-primitive-spacing-50);
|
|
3308
|
+
border-top: 1px solid var(--helix-sideNav-border);
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3311
|
+
|
|
3312
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
3313
|
+
APP SHELL
|
|
3314
|
+
Contract: contracts/components/AppShell.json
|
|
3315
|
+
Tokens: --helix-color-fill-page (no new component.* tokens needed)
|
|
3316
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
3317
|
+
|
|
3318
|
+
/* Exactly one viewport tall (the contract's "full-viewport-height" root), not min-height: with
|
|
3319
|
+
min-height the whole page grew with its content and main's overflow-y never kicked in. Now the
|
|
3320
|
+
SideNav and TopBar stay put and only main scrolls.
|
|
3321
|
+
It's also the size container the SideNav collapse answers to — the shell's own width, not the
|
|
3322
|
+
viewport's, so a shell in a narrow frame (a story, an embed) collapses too. */
|
|
3323
|
+
[data-helix-part="app-shell-root"] {
|
|
3324
|
+
container: app-shell / inline-size;
|
|
3325
|
+
position: relative;
|
|
3326
|
+
display: flex;
|
|
3327
|
+
height: 100vh;
|
|
3328
|
+
background-color: var(--helix-color-fill-page);
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
[data-helix-part="app-shell-nav"] {
|
|
3332
|
+
display: flex;
|
|
3333
|
+
flex-shrink: 0;
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
[data-helix-part="app-shell-content"] {
|
|
3337
|
+
flex: 1;
|
|
3338
|
+
display: flex;
|
|
3339
|
+
flex-direction: column;
|
|
3340
|
+
min-width: 0;
|
|
3341
|
+
min-height: 0;
|
|
3342
|
+
}
|
|
3343
|
+
|
|
3344
|
+
[data-helix-part="app-shell-main"] {
|
|
3345
|
+
flex: 1;
|
|
3346
|
+
min-height: 0; /* lets the flex item shrink below its content so overflow-y scrolls */
|
|
3347
|
+
overflow-y: auto;
|
|
3348
|
+
padding: var(--helix-spacing-l);
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
/* WCAG 1.4.10 Reflow: below primitive.breakpoint.tablet (768px — container queries can't read a var())
|
|
3352
|
+
the 224px side nav would leave ~96px for the page at 320px. With a TopBar, the nav collapses out of
|
|
3353
|
+
the flow and the TopBar's menu button slides it in over the content, under the TopBar. Hidden
|
|
3354
|
+
(visibility) while collapsed so its links leave the Tab order; visibility flips at the end of the
|
|
3355
|
+
slide-out and at the start of the slide-in. */
|
|
3356
|
+
@container app-shell (max-width: 767px) {
|
|
3357
|
+
[data-helix-part="app-shell-root"][data-collapsible="true"] [data-helix-part="topbar-menu"] {
|
|
3358
|
+
display: flex;
|
|
3359
|
+
}
|
|
3360
|
+
[data-helix-part="app-shell-root"][data-collapsible="true"] > [data-helix-part="app-shell-nav"] {
|
|
3361
|
+
position: absolute;
|
|
3362
|
+
top: var(--helix-topBar-height);
|
|
3363
|
+
bottom: 0;
|
|
3364
|
+
left: 0;
|
|
3365
|
+
z-index: var(--helix-primitive-zIndex-overlay);
|
|
3366
|
+
transform: translateX(-100%);
|
|
3367
|
+
visibility: hidden;
|
|
3368
|
+
transition: transform var(--helix-duration-slow) var(--helix-easing-base),
|
|
3369
|
+
visibility 0s linear var(--helix-duration-slow);
|
|
3370
|
+
}
|
|
3371
|
+
[data-helix-part="app-shell-root"][data-collapsible="true"] > [data-helix-part="app-shell-nav"][data-expanded="true"] {
|
|
3372
|
+
transform: none;
|
|
3373
|
+
visibility: visible;
|
|
3374
|
+
transition: transform var(--helix-duration-slow) var(--helix-easing-base), visibility 0s;
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
/* No TopBar, so no menu button to bring a collapsed nav back: below 768px the shell stacks instead —
|
|
3379
|
+
nav on top, full width, then the content, and the page scrolls as one column. */
|
|
3380
|
+
@media (max-width: 767px) {
|
|
3381
|
+
[data-helix-part="app-shell-root"]:not([data-collapsible="true"]) {
|
|
3382
|
+
flex-direction: column;
|
|
3383
|
+
height: auto;
|
|
3384
|
+
min-height: 100vh;
|
|
3385
|
+
}
|
|
3386
|
+
[data-helix-part="app-shell-root"]:not([data-collapsible="true"]) > [data-helix-part="app-shell-nav"],
|
|
3387
|
+
[data-helix-part="app-shell-root"]:not([data-collapsible="true"]) [data-helix-part="side-nav-root"] {
|
|
3388
|
+
width: 100%;
|
|
3389
|
+
}
|
|
3390
|
+
[data-helix-part="app-shell-root"]:not([data-collapsible="true"]) [data-helix-part="app-shell-main"] {
|
|
3391
|
+
overflow-y: visible;
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
|
|
3396
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
3397
|
+
TOAST
|
|
3398
|
+
Contract: contracts/components/Toast.json
|
|
3399
|
+
Rationale: contracts/components/Toast.json — imperative API, portal to document.body,
|
|
3400
|
+
JS-measured stacking (not grid/percentage tricks — see that ADR for why).
|
|
3401
|
+
Tokens: --helix-toast-*, --helix-badge-icon-* (icon color only — the one place variant
|
|
3402
|
+
color shows; background/text never tint per variant, unlike Badge itself).
|
|
3403
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
3404
|
+
|
|
3405
|
+
[data-helix-part="toast-viewport"] {
|
|
3406
|
+
position: fixed;
|
|
3407
|
+
top: var(--helix-spacing-l);
|
|
3408
|
+
right: var(--helix-spacing-l);
|
|
3409
|
+
width: var(--helix-toast-width);
|
|
3410
|
+
z-index: var(--helix-primitive-zIndex-toast);
|
|
3411
|
+
}
|
|
3412
|
+
|
|
3413
|
+
[data-helix-part="toast"] {
|
|
3414
|
+
position: absolute;
|
|
3415
|
+
top: 0;
|
|
3416
|
+
right: 0;
|
|
3417
|
+
width: var(--helix-toast-width);
|
|
3418
|
+
display: flex;
|
|
3419
|
+
align-items: flex-start;
|
|
3420
|
+
gap: var(--helix-toast-gap);
|
|
3421
|
+
padding: var(--helix-toast-padding);
|
|
3422
|
+
background-color: var(--helix-toast-fill);
|
|
3423
|
+
border-radius: var(--helix-toast-radius);
|
|
3424
|
+
box-shadow: var(--helix-toast-shadow);
|
|
3425
|
+
/* Top-center, not bottom — the viewport is anchored to the TOP of the screen, so depth grows
|
|
3426
|
+
downward into the page (see the depth/spread rules below), same reasoning as SidePanel's
|
|
3427
|
+
bottom placement needing its own shadow direction. */
|
|
3428
|
+
transform-origin: 50% 0%;
|
|
3429
|
+
will-change: transform, opacity, filter;
|
|
3430
|
+
transition:
|
|
3431
|
+
transform var(--helix-toast-durationClose) var(--helix-toast-easing),
|
|
3432
|
+
opacity var(--helix-toast-durationClose) var(--helix-toast-easing),
|
|
3433
|
+
filter var(--helix-toast-durationClose) var(--helix-toast-easing);
|
|
3434
|
+
}
|
|
3435
|
+
|
|
3436
|
+
[data-helix-part="toast-icon"] {
|
|
3437
|
+
flex-shrink: 0;
|
|
3438
|
+
display: flex; /* top-aligned with the title, no raw nudge — Figma draws the same */
|
|
3439
|
+
width: var(--helix-toast-iconSize);
|
|
3440
|
+
height: var(--helix-toast-iconSize);
|
|
3441
|
+
}
|
|
3442
|
+
/* flex, not the span's default inline: an inline wrapper added a 25px line box around the 24px button */
|
|
3443
|
+
[data-helix-part="toast-close"] { display: flex; flex-shrink: 0; }
|
|
3444
|
+
[data-helix-part="toast-content"] { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
3445
|
+
[data-helix-part="toast-title"] {
|
|
3446
|
+
font-size: var(--helix-primitive-fontSize-s);
|
|
3447
|
+
font-weight: var(--helix-primitive-fontWeight-bold);
|
|
3448
|
+
color: var(--helix-toast-text);
|
|
3449
|
+
}
|
|
3450
|
+
[data-helix-part="toast-description"] {
|
|
3451
|
+
font-size: var(--helix-primitive-fontSize-s);
|
|
3452
|
+
color: var(--helix-toast-textDescription);
|
|
3453
|
+
margin-top: var(--helix-spacing-3xs);
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3456
|
+
/* Depth grows DOWNWARD (positive translateY), not upward — the viewport is pinned to the top of the
|
|
3457
|
+
screen, so stacking upward would push older toasts off-screen. Same "must stay inside the visible
|
|
3458
|
+
page" principle Tooltip's auto-placement established.
|
|
3459
|
+
--peek-y is a measured pixel offset (React computes it in Toast.tsx from real offsetHeight), not
|
|
3460
|
+
`peek * depth` — a flat multiple only gives an equal-looking sliver between each pair of toasts
|
|
3461
|
+
when every toast happens to be the same height; two different heights (a 2-line description vs.
|
|
3462
|
+
a 1-line one) immediately made the gaps look uneven. Same root cause, and the same fix, as
|
|
3463
|
+
--spread-y below. */
|
|
3464
|
+
[data-helix-part="toast"][data-depth="0"] { z-index: 3; transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
|
|
3465
|
+
[data-helix-part="toast"][data-depth="1"] {
|
|
3466
|
+
z-index: 2;
|
|
3467
|
+
transform: translateY(var(--peek-y, 0px)) scale(calc(1 - var(--helix-toast-depthScale)));
|
|
3468
|
+
opacity: calc(1 - var(--helix-toast-depthFade));
|
|
3469
|
+
/* Toasts further back go softer — half the depth blur one step back, the full blur two steps back
|
|
3470
|
+
(transitions.dev banner stacking: 1px / 2px). Explicit blur(0) on the front toast and on spread,
|
|
3471
|
+
never an unset filter: blur → none isn't reliably interpolated and would snap. */
|
|
3472
|
+
filter: blur(calc(var(--helix-toast-depthBlur) * 0.5));
|
|
3473
|
+
}
|
|
3474
|
+
[data-helix-part="toast"][data-depth="2"] {
|
|
3475
|
+
z-index: 1;
|
|
3476
|
+
transform: translateY(var(--peek-y, 0px)) scale(calc(1 - var(--helix-toast-depthScale) * 2));
|
|
3477
|
+
opacity: calc(1 - var(--helix-toast-depthFade) * 1.6);
|
|
3478
|
+
filter: blur(var(--helix-toast-depthBlur));
|
|
3479
|
+
}
|
|
3480
|
+
|
|
3481
|
+
/* --spread-y is a real measured pixel offset (React sets it inline via offsetHeight — see
|
|
3482
|
+
Toast.tsx), not `100% * depth` — percentage math broke as soon as two toasts had different
|
|
3483
|
+
heights, since each only knows its OWN height, not the taller one actually sitting above it.
|
|
3484
|
+
See Toast's contract for the full story (caught in the pre-implementation preview, not after shipping). */
|
|
3485
|
+
[data-helix-part="toast-viewport"][data-spread="true"] [data-helix-part="toast"][data-depth="1"],
|
|
3486
|
+
[data-helix-part="toast-viewport"][data-spread="true"] [data-helix-part="toast"][data-depth="2"] {
|
|
3487
|
+
opacity: 1;
|
|
3488
|
+
transform: translateY(var(--spread-y, 0px)) scale(1);
|
|
3489
|
+
filter: blur(0);
|
|
3490
|
+
}
|
|
3491
|
+
|
|
3492
|
+
[data-helix-part="toast"][data-state="closed"] {
|
|
3493
|
+
transition: none !important;
|
|
3494
|
+
transform: translateY(calc(var(--helix-toast-rise) * -1)) scale(var(--helix-toast-scaleEnter));
|
|
3495
|
+
opacity: 0;
|
|
3496
|
+
filter: blur(var(--helix-toast-blurEnter));
|
|
3497
|
+
}
|
|
3498
|
+
[data-helix-part="toast"][data-state="open"] {
|
|
3499
|
+
transition-duration: var(--helix-toast-durationOpen);
|
|
3500
|
+
}
|
|
3501
|
+
[data-helix-part="toast"][data-state="closing"] {
|
|
3502
|
+
z-index: 0;
|
|
3503
|
+
transform: translateY(calc(var(--helix-toast-peek) * 3)) scale(calc(1 - var(--helix-toast-depthScale) * 3));
|
|
3504
|
+
opacity: 0;
|
|
3505
|
+
filter: blur(var(--helix-toast-blurEnter));
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3509
|
+
[data-helix-part="toast"] { transition: none !important; transform: none !important; filter: none !important; }
|
|
3510
|
+
}
|
|
3511
|
+
}
|