@helixds/react 0.1.0 → 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 +4 -1
- 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/Badge/Badge.types.d.ts +1 -1
- 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/Icon/Icon.doc.js +2 -2
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Icon/Icon.types.d.ts +1 -1
- package/dist/components/Icon/iconStroke.d.ts +1 -1
- package/dist/components/Icon/iconStroke.js +1 -1
- package/dist/components/Menu/Menu.doc.js +4 -4
- package/dist/components/Menu/Menu.js +3 -3
- package/dist/components/Menu/Menu.types.d.ts +1 -1
- package/dist/components/Modal/Modal.doc.js +1 -1
- package/dist/components/Modal/Modal.types.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +2 -2
- package/dist/components/MultiSelect/MultiSelect.doc.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +4 -4
- 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/SegmentedControl/SegmentedControl.doc.js +2 -2
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/Select/Select.doc.js +2 -2
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/SidePanel/SidePanel.doc.js +1 -1
- package/dist/components/SidePanel/SidePanel.types.d.ts +1 -1
- 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/Toast/Toast.doc.js +1 -1
- package/dist/components/Toast/Toast.js +2 -2
- package/dist/components/Toast/toastStore.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.doc.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +5 -5
- package/dist/components/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/contracts/Accordion.json +5 -4
- package/dist/contracts/AppShell.json +111 -28
- package/dist/contracts/Avatar.json +3 -2
- package/dist/contracts/AvatarGroup.json +1 -0
- package/dist/contracts/Badge.json +2 -1
- package/dist/contracts/Button.json +2 -1
- package/dist/contracts/Card.json +3 -2
- package/dist/contracts/Chart.json +2 -1
- package/dist/contracts/Checkbox.json +1 -0
- package/dist/contracts/CheckboxGroup.json +1 -0
- package/dist/contracts/Chip.json +3 -2
- package/dist/contracts/ChipGroup.json +1 -0
- package/dist/contracts/Combobox.json +431 -0
- package/dist/contracts/FAB.json +3 -2
- package/dist/contracts/Icon.json +10 -9
- package/dist/contracts/IconButton.json +2 -1
- package/dist/contracts/Input.json +2 -1
- package/dist/contracts/Menu.json +7 -6
- package/dist/contracts/Modal.json +5 -4
- package/dist/contracts/MultiSelect.json +6 -5
- package/dist/contracts/NavItem.json +2 -1
- package/dist/contracts/PageHeader.json +1 -0
- package/dist/contracts/Popover.json +322 -0
- package/dist/contracts/RadioButton.json +1 -0
- package/dist/contracts/RadioGroup.json +1 -0
- package/dist/contracts/SegmentedControl.json +4 -3
- package/dist/contracts/Select.json +9 -9
- package/dist/contracts/SideNav.json +2 -1
- package/dist/contracts/SidePanel.json +5 -4
- package/dist/contracts/Switch.json +1 -0
- package/dist/contracts/Table.json +1 -0
- package/dist/contracts/Tabs.json +353 -0
- package/dist/contracts/Textarea.json +2 -1
- package/dist/contracts/Toast.json +6 -5
- package/dist/contracts/Tooltip.json +4 -3
- package/dist/contracts/TopBar.json +2 -0
- package/dist/contracts/manifest.json +1539 -44
- package/dist/index.d.ts +9 -0
- package/dist/index.js +6 -0
- package/dist/layout/AppShell/AppShell.d.ts +1 -1
- package/dist/layout/AppShell/AppShell.doc.js +5 -0
- package/dist/layout/AppShell/AppShell.js +109 -2
- package/dist/layout/AppShell/AppShell.types.d.ts +6 -0
- package/dist/layout/AppShell/AppShellContext.d.ts +17 -0
- package/dist/layout/AppShell/AppShellContext.js +4 -0
- package/dist/layout/SideNav/SideNav.doc.js +1 -0
- package/dist/layout/TopBar/TopBar.js +7 -1
- package/dist/lib/useDialogTransition.d.ts +1 -1
- package/dist/lib/useDialogTransition.js +1 -1
- package/dist/lib/useDisclosureTransition.d.ts +1 -1
- package/dist/lib/useDisclosureTransition.js +1 -1
- package/dist/patterns/expand-collapse-chevron.md +1 -1
- package/dist/patterns/motion-effects.md +2 -4
- package/package.json +26 -4
- package/src/globals.css +338 -22
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "A centered overlay that interrupts the page for a focused task or decision — blocks interaction with the rest of the page until dismissed.",
|
|
8
8
|
"import": "import { Modal } from '@helixds/react';",
|
|
9
|
+
"archetype": "overlays",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"Non-blocking supplementary info — use Tooltip or Popover instead",
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
"Simple confirmations that don't need to block the whole page — consider inline UI first"
|
|
14
15
|
],
|
|
15
16
|
|
|
16
|
-
"rationale": "Modal
|
|
17
|
+
"rationale": "Modal is a native <dialog> opened with showModal(), not the plain open attribute (which gives no backdrop and no focus trap) and not Radix Dialog, which would duplicate machinery the browser already ships. showModal() supplies the backdrop, the focus trap, Escape and top-layer stacking, so there is no z-index to manage. Closing is orchestrated in JS because .close() drops the dialog from the top layer at once, leaving no time for an exit transition, and @starting-style with transition-behavior: allow-discrete isn't broadly supported enough to rely on yet. On open it calls showModal() and sets data-state=\"open\" on the next animation frame, so the transition plays instead of snapping; on close it sets data-state=\"closing\", waits component.modal.duration-close, then calls .close(). The native cancel event (Escape, backdrop click) is prevented and routed through onDismiss, so every dismissal animates the same way. This state machine lives in the shared useDialogTransition hook that SidePanel also uses; only the scale-and-fade transition is Modal's own CSS. The ::backdrop takes its color from semantic.color.fill.overlay mixed at component.modal.overlay-opacity (0.6), so only the opacity is Modal-local.",
|
|
17
18
|
|
|
18
19
|
"governance": {
|
|
19
20
|
"mayExtendLocally": [
|
|
@@ -29,12 +30,12 @@
|
|
|
29
30
|
"states": {
|
|
30
31
|
"intrinsic": [],
|
|
31
32
|
"authored": [
|
|
32
|
-
{ "name": "expanded", "description": "Whether the modal is open. See
|
|
33
|
+
{ "name": "expanded", "description": "Whether the modal is open. See rationale for the open/close choreography (native `<dialog>` + `showModal()`, JS-timed close).", "aria": "native <dialog> semantics; role=\"dialog\" is implicit" }
|
|
33
34
|
]
|
|
34
35
|
},
|
|
35
36
|
|
|
36
37
|
"anatomy": [
|
|
37
|
-
{ "part": "modal-root", "element": "dialog", "description": "Native <dialog>, opened via showModal() — provides the backdrop, focus trap, Escape-to-close, and top-layer stacking for free (
|
|
38
|
+
{ "part": "modal-root", "element": "dialog", "description": "Native <dialog>, opened via showModal() — provides the backdrop, focus trap, Escape-to-close, and top-layer stacking for free (see rationale). Centered, min-height 400px." },
|
|
38
39
|
{ "part": "modal-header", "element": "div", "description": "Contains the title." },
|
|
39
40
|
{ "part": "modal-title", "element": "h2", "description": "The modal's accessible name — referenced via aria-labelledby." },
|
|
40
41
|
{ "part": "modal-close", "element": "slot", "description": "An IconButton (IconX, size l) positioned top-right, calls onDismiss.", "optional": true },
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
|
|
73
74
|
"a11y": {
|
|
74
75
|
"role": "dialog (implicit via native <dialog>)",
|
|
75
|
-
"keyboardNav": ["Escape — dismisses (native <dialog> cancel event, redirected through onDismiss per
|
|
76
|
+
"keyboardNav": ["Escape — dismisses (native <dialog> cancel event, redirected through onDismiss per rationale)", "Tab — cycles focus, trapped inside the modal (native)"],
|
|
76
77
|
"wcag": ["2.4.3 Focus Order", "4.1.2 Name, Role, Value", "1.4.13 Content on Hover or Focus"],
|
|
77
78
|
"notes": [
|
|
78
79
|
"showCloseButton=false with no footer action leaves the modal with no on-screen dismiss affordance — the component logs a dev-only console.warn in that case (Escape and closeOnBackdropClick, when enabled, still work)."
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
"$schema": "../component.schema.json",
|
|
3
3
|
"name": "MultiSelect",
|
|
4
4
|
"version": "0.1.0",
|
|
5
|
-
"status": "
|
|
5
|
+
"status": "beta",
|
|
6
6
|
|
|
7
7
|
"purpose": "Lets users choose several values from a predefined list, shown as removable chips inside the field.",
|
|
8
8
|
"import": "import { MultiSelect } from '@helixds/react';",
|
|
9
|
+
"archetype": "form-selection",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"A single value - use Select instead",
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
"Free-form tags the user types - use Input"
|
|
14
15
|
],
|
|
15
16
|
|
|
16
|
-
"rationale": "MultiSelect is
|
|
17
|
+
"rationale": "MultiSelect is Select's field and interaction model with the chosen values shown as removable Chips inside it, because CheckboxGroup doesn't scale past a handful of options and the native <select multiple> is a scrolling list box. It shares Select's --helix-select-* tokens on purpose, since it is the same field, so a change to Select's field changes MultiSelect too. It has a 32px minimum height that grows downward as chips wrap, with rows 4px apart; in a toolbar, keep it to values that fit on one line. Chips use Chip size s (24px), centered 4px from the field edge. That margin is derived as (field height − chip height) / 2, so it follows any change to either. A <button> can't contain the chips' dismiss buttons, so the field is a plain container holding the chips plus a role=\"combobox\" button that fills the remaining space and keeps real focus. The chips' main buttons are taken out of the tab order and hidden from assistive tech; the combobox announces \"N selected: A, B\" itself, so each chip's × is the only extra Tab stop. The popup is Menu with multiple selection, not a second listbox. Picking an option toggles it and keeps the menu open, so several values can be chosen in one go.",
|
|
17
18
|
|
|
18
19
|
"governance": {
|
|
19
20
|
"mayExtendLocally": [
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
{ "part": "multi-select-required", "element": "span", "optional": true, "description": "The required indicator (*) inside the label, the label color, 2px (spacing/3xs) after the text — shown by `required`. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
|
|
44
45
|
{ "part": "multi-select-field", "element": "div", "description": "The visible field: Select's border, fill and 32px minimum height. Holds the chips and the combobox; grows downward when the chips wrap. Clicking its empty area toggles the menu." },
|
|
45
46
|
{ "part": "multi-select-chip", "element": "slot", "description": "One dismissible Chip (size s, 24px) per selected value — 4px from the field's outer edge. Its × removes the value.", "optional": true },
|
|
46
|
-
{ "part": "multi-select-trigger", "element": "button", "description": "role=\"combobox\" button filling the rest of the field. Owns real DOM focus (
|
|
47
|
+
{ "part": "multi-select-trigger", "element": "button", "description": "role=\"combobox\" button filling the rest of the field. Owns real DOM focus (Menu's contract rationale); shows the placeholder when nothing is selected and announces the selection to assistive tech." },
|
|
47
48
|
{ "part": "multi-select-chevron", "element": "slot", "description": "Trailing chevron. Flips on open, same treatment as Select." },
|
|
48
49
|
{ "part": "multi-select-description", "element": "span", "description": "Helper text below the field. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md).", "optional": true },
|
|
49
50
|
{ "part": "multi-select-error", "element": "span", "description": "Error text shown when invalid=true.", "optional": true }
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
"mode": "fixed",
|
|
74
75
|
"values": { "default": 32 },
|
|
75
76
|
"unit": "px",
|
|
76
|
-
"note": "32px minimum, same as Select (semantic.size.m). Chip s (24px) is centered in it, 4px from the outer edge on every side. Grows downward when chips wrap (rows 4px apart) — see
|
|
77
|
+
"note": "32px minimum, same as Select (semantic.size.m). Chip s (24px) is centered in it, 4px from the outer edge on every side. Grows downward when chips wrap (rows 4px apart) — see rationale."
|
|
77
78
|
},
|
|
78
79
|
"width": {"default": "fixed", "value": 320, "unit": "px", "modes": {"fixed": "320px — every form field shares it and never grows or shrinks with its content (owner's rule 2026-10-21, form-field pattern); max-width 100% so a narrow container can still hold it.", "fill": "fullWidth=true: 100% of the container (Figma: drawn at 600px, the field and its popup on Fill so they stretch)."}, "exceptions": "A field that must be narrower (a number stepper, a short code) says so here, with its width and why — the only way off 320px."}
|
|
79
80
|
},
|
|
@@ -84,7 +85,7 @@
|
|
|
84
85
|
},
|
|
85
86
|
|
|
86
87
|
"a11y": {
|
|
87
|
-
"role": "combobox on a <button> inside the field (WAI-ARIA select-only combobox) + Menu listbox with aria-multiselectable=\"true\" — see
|
|
88
|
+
"role": "combobox on a <button> inside the field (WAI-ARIA select-only combobox) + Menu listbox with aria-multiselectable=\"true\" — see Menu's contract rationale and its own rationale. Chips' × buttons are the only other focus stops.",
|
|
88
89
|
"keyboardNav": [
|
|
89
90
|
"Arrow Up/Down - opens the menu, or moves the highlighted option while open",
|
|
90
91
|
"Home/End - jump to first/last enabled option while open",
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
"$schema": "../component.schema.json",
|
|
3
3
|
"name": "NavItem",
|
|
4
4
|
"version": "1.0.0",
|
|
5
|
-
"status": "
|
|
5
|
+
"status": "beta",
|
|
6
6
|
|
|
7
7
|
"purpose": "A single entry in a persistent navigation list (a SideNav, a tab rail) that links to another view.",
|
|
8
8
|
"import": "import { NavItem } from '@helixds/react';",
|
|
9
|
+
"archetype": "actions-navigation",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"Triggering an action (saving, deleting, opening a dialog) — use Button, which Button.json's own neverUseFor list already forbids for navigation",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "Introduces a page or major section: title, optional supporting description, and trailing actions in one consistent row.",
|
|
8
8
|
"import": "import { PageHeader } from '@helixds/react';",
|
|
9
|
+
"archetype": "layout",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"Card or panel titles — use Card's own header slot instead",
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "Popover",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
"purpose": "Shows a small, non-modal panel of rich content — a title, text and actions — anchored to the control that opened it, without blocking the rest of the page.",
|
|
7
|
+
"import": "import { Popover } from '@helixds/react';",
|
|
8
|
+
"archetype": "overlays",
|
|
9
|
+
"neverUseFor": [
|
|
10
|
+
"A short text hint on hover or focus — use Tooltip instead",
|
|
11
|
+
"A list of actions or commands — use Menu instead",
|
|
12
|
+
"A task that must be finished or dismissed before going back to the page — use Modal instead",
|
|
13
|
+
"Long forms or content that needs more than ~320px — use SidePanel instead"
|
|
14
|
+
],
|
|
15
|
+
"rationale": "Popover is built on the native popover=\"manual\" attribute: it renders in the top layer, so it needs no z-index or portal and can't be clipped by an ancestor's overflow. popover=\"auto\" was rejected because its light-dismiss closes the popover on the trigger's pointerdown, and the trigger's click then reopens it, so it could never be closed from its own trigger. That's why Escape and an outside pointerdown close it by hand. Escape returns focus to the trigger; an outside press leaves focus where the user put it. Placement follows Tooltip's flip-and-clamp rule, 8px from the viewport edge. Because the top layer is position: fixed, the position is recomputed from the trigger's bounding rect on open, on resize and on any scroll. That code is still a copy of Tooltip's; merge the two into one helper the next time either changes. It is a non-modal role=\"dialog\" named by its visible title, rendered right after the trigger so Tab walks into it in reading order. Focus moves into it on open, to the first focusable element or the panel itself, but it is never trapped. That's the line that separates it from Modal. It floats above the page, so it is one of the few surfaces allowed a shadow (shadow.l).",
|
|
16
|
+
"governance": {
|
|
17
|
+
"mayExtendLocally": [
|
|
18
|
+
"Choose the title, the body content and the actions inside it",
|
|
19
|
+
"Choose the trigger (Button, IconButton…) and the placement"
|
|
20
|
+
],
|
|
21
|
+
"mustEscalateToDS": [
|
|
22
|
+
"Making it modal or trapping focus",
|
|
23
|
+
"Adding an arrow, a close button in the chrome, or hover-to-open",
|
|
24
|
+
"Widening it beyond 320px"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"states": {
|
|
28
|
+
"intrinsic": [
|
|
29
|
+
"focus"
|
|
30
|
+
],
|
|
31
|
+
"authored": [
|
|
32
|
+
{
|
|
33
|
+
"name": "expanded",
|
|
34
|
+
"description": "The panel is open. Toggled by the trigger, or forced via the controlled `expanded` prop.",
|
|
35
|
+
"aria": "aria-expanded on the trigger"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"anatomy": [
|
|
40
|
+
{
|
|
41
|
+
"part": "popover-root",
|
|
42
|
+
"element": "span",
|
|
43
|
+
"description": "Wrapper around the trigger and the panel; the trigger gets aria-expanded, aria-controls and aria-haspopup=\"dialog\"."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"part": "popover-content",
|
|
47
|
+
"element": "div",
|
|
48
|
+
"description": "The panel — role=\"dialog\", popover=\"manual\", aria-labelledby the title. Fixed position, placed by `placement` with flip and clamp."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"part": "popover-title",
|
|
52
|
+
"element": "p",
|
|
53
|
+
"description": "The visible title (`label`), which names the dialog."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"part": "popover-body",
|
|
57
|
+
"element": "div",
|
|
58
|
+
"description": "The content (`children`): text, and any actions."
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"props": [
|
|
62
|
+
{
|
|
63
|
+
"name": "label",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"required": true,
|
|
66
|
+
"description": "The visible title of the panel. Also its accessible name (aria-labelledby)."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "children",
|
|
70
|
+
"type": "React.ReactNode",
|
|
71
|
+
"required": true,
|
|
72
|
+
"description": "The panel's content: text and, optionally, actions."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "trigger",
|
|
76
|
+
"type": "React.ReactElement",
|
|
77
|
+
"required": true,
|
|
78
|
+
"description": "The control that opens and closes the panel (a Button or IconButton). Popover adds onClick and the ARIA attributes to it."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "placement",
|
|
82
|
+
"type": "'top' | 'bottom' | 'left' | 'right'",
|
|
83
|
+
"default": "bottom",
|
|
84
|
+
"description": "Preferred side of the trigger. Flips to the opposite side when there isn't room, and is clamped to the viewport."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "expanded",
|
|
88
|
+
"type": "boolean | undefined",
|
|
89
|
+
"description": "Controlled open state."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "defaultExpanded",
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"default": false,
|
|
95
|
+
"description": "Uncontrolled initial open state."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "onExpandedChange",
|
|
99
|
+
"type": "((expanded: boolean) => void) | undefined",
|
|
100
|
+
"description": "Called when the panel opens or closes (trigger, Escape, outside click)."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "className",
|
|
104
|
+
"type": "string | undefined",
|
|
105
|
+
"description": "Additional className for the root element."
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"sizing": {
|
|
109
|
+
"width": {
|
|
110
|
+
"default": "hug",
|
|
111
|
+
"modes": {
|
|
112
|
+
"hug": "Width follows the content, up to max-width, where it wraps."
|
|
113
|
+
},
|
|
114
|
+
"maxWidth": 320,
|
|
115
|
+
"note": "Height is content-driven — no rung on the shared size scale."
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"tokenPolicy": {
|
|
119
|
+
"allowed": [
|
|
120
|
+
"color.fill",
|
|
121
|
+
"color.text",
|
|
122
|
+
"color.border",
|
|
123
|
+
"spacing",
|
|
124
|
+
"radius",
|
|
125
|
+
"fontSize",
|
|
126
|
+
"fontWeight",
|
|
127
|
+
"shadow",
|
|
128
|
+
"duration",
|
|
129
|
+
"easing"
|
|
130
|
+
],
|
|
131
|
+
"forbidden": [
|
|
132
|
+
"primitive.color"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"a11y": {
|
|
136
|
+
"role": "dialog (non-modal) on popover-content, labelled by popover-title",
|
|
137
|
+
"keyboardNav": [
|
|
138
|
+
"Enter/Space — on the trigger, opens or closes the panel and moves focus to its first focusable element",
|
|
139
|
+
"Escape — closes the panel and returns focus to the trigger",
|
|
140
|
+
"Tab — moves through the panel's content and out of it (focus is not trapped)"
|
|
141
|
+
],
|
|
142
|
+
"wcag": [
|
|
143
|
+
"1.3.1 Info and Relationships",
|
|
144
|
+
"2.1.1 Keyboard",
|
|
145
|
+
"2.1.2 No Keyboard Trap",
|
|
146
|
+
"2.4.3 Focus Order",
|
|
147
|
+
"2.4.7 Focus Visible",
|
|
148
|
+
"4.1.2 Name Role Value"
|
|
149
|
+
],
|
|
150
|
+
"applied": {
|
|
151
|
+
"nativeElement": "span",
|
|
152
|
+
"innerComponents": [
|
|
153
|
+
"Button",
|
|
154
|
+
"IconButton"
|
|
155
|
+
],
|
|
156
|
+
"focus": [
|
|
157
|
+
{
|
|
158
|
+
"part": "popover-content",
|
|
159
|
+
"when": ":focus-visible",
|
|
160
|
+
"outline": "2px solid var(--helix-color-border-focus)",
|
|
161
|
+
"outline-offset": "2px"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"aria": {
|
|
165
|
+
"popover-content": {
|
|
166
|
+
"role": [
|
|
167
|
+
"dialog"
|
|
168
|
+
],
|
|
169
|
+
"aria-labelledby": [
|
|
170
|
+
"(id)",
|
|
171
|
+
"helix-popover-_r_a_-title"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"announced": [
|
|
176
|
+
"dialog \"Share link\""
|
|
177
|
+
],
|
|
178
|
+
"contrast": {
|
|
179
|
+
"popover-title": {
|
|
180
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
181
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
182
|
+
},
|
|
183
|
+
"popover-body": {
|
|
184
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
185
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"targetSize": {},
|
|
189
|
+
"motion": [
|
|
190
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"results": {
|
|
194
|
+
"score": 100,
|
|
195
|
+
"meetsMinimum": true,
|
|
196
|
+
"checks": {
|
|
197
|
+
"contract": "pass",
|
|
198
|
+
"keys": "pass",
|
|
199
|
+
"focus-return": "pass",
|
|
200
|
+
"keyboard": "pass",
|
|
201
|
+
"axe": "pass",
|
|
202
|
+
"contrast": "pass",
|
|
203
|
+
"focus-visible": "pass",
|
|
204
|
+
"target-size": "pass",
|
|
205
|
+
"reflow": "n/a",
|
|
206
|
+
"screen-reader": "pass",
|
|
207
|
+
"ai-visual": "pending",
|
|
208
|
+
"human": "pending"
|
|
209
|
+
},
|
|
210
|
+
"notScored": [
|
|
211
|
+
"ai-visual",
|
|
212
|
+
"human"
|
|
213
|
+
],
|
|
214
|
+
"changed": "2026-12-05"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"figma": {
|
|
218
|
+
"triggers": [
|
|
219
|
+
"Button",
|
|
220
|
+
"IconButton"
|
|
221
|
+
],
|
|
222
|
+
"states": [
|
|
223
|
+
"default"
|
|
224
|
+
],
|
|
225
|
+
"properties": [
|
|
226
|
+
{
|
|
227
|
+
"name": "placement",
|
|
228
|
+
"type": "VARIANT",
|
|
229
|
+
"values": [
|
|
230
|
+
"top",
|
|
231
|
+
"bottom",
|
|
232
|
+
"left",
|
|
233
|
+
"right"
|
|
234
|
+
],
|
|
235
|
+
"codeProp": "placement"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "expanded",
|
|
239
|
+
"type": "VARIANT",
|
|
240
|
+
"values": [
|
|
241
|
+
"false",
|
|
242
|
+
"true"
|
|
243
|
+
],
|
|
244
|
+
"codeProp": "expanded"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "label",
|
|
248
|
+
"type": "TEXT",
|
|
249
|
+
"codeProp": "label"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "children",
|
|
253
|
+
"type": "TEXT",
|
|
254
|
+
"codeProp": "children",
|
|
255
|
+
"description": "The body text (popover-body). Actions in the body are drawn by placing Button instances inside it."
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "trigger",
|
|
259
|
+
"type": "INSTANCE_SWAP",
|
|
260
|
+
"codeProp": "trigger",
|
|
261
|
+
"description": "The trigger slot: a Button (default) or an IconButton."
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"structure": "popover-root (auto layout, 4px = spacing/component/xs) > trigger (INSTANCE_SWAP) + popover-content on the placement side: fill/page, border/neutral 1px, radius/l, shadow / l, padding spacing/component/l, gap spacing/component/m > popover-title (Body / s / Medium) + popover-body (Body / s / Regular). No arrow, like code.",
|
|
265
|
+
"variantCombinations": "5 variants (owner 2026-12-05, like Tooltip): placement top/bottom/left/right with expanded=true, plus expanded=false once (the trigger alone).",
|
|
266
|
+
"propertyMap": {
|
|
267
|
+
"trigger": {
|
|
268
|
+
"codeType": "React.ReactElement",
|
|
269
|
+
"figma": [
|
|
270
|
+
{
|
|
271
|
+
"name": "trigger",
|
|
272
|
+
"type": "INSTANCE_SWAP"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"approved": "2026-12-05",
|
|
276
|
+
"reason": "the trigger is a slot: an INSTANCE_SWAP lets the designer pick Button or IconButton, as Tooltip's children (owner's choice 2026-12-05)"
|
|
277
|
+
},
|
|
278
|
+
"children": {
|
|
279
|
+
"codeType": "React.ReactNode",
|
|
280
|
+
"figma": [
|
|
281
|
+
{
|
|
282
|
+
"name": "children",
|
|
283
|
+
"type": "TEXT"
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"approved": "2026-12-05",
|
|
287
|
+
"reason": "the body is text in most uses; actions are drawn by placing Buttons inside popover-body (owner's choice 2026-12-05, overlay pattern)"
|
|
288
|
+
},
|
|
289
|
+
"expanded": {
|
|
290
|
+
"codeType": "boolean | undefined",
|
|
291
|
+
"figma": [
|
|
292
|
+
{
|
|
293
|
+
"name": "expanded",
|
|
294
|
+
"type": "VARIANT",
|
|
295
|
+
"values": [
|
|
296
|
+
"false",
|
|
297
|
+
"true"
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
"approved": "2026-12-05",
|
|
302
|
+
"reason": "drawn next to its trigger like Tooltip, so open and closed are both real looks (owner's choice 2026-12-05)"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"stories": {
|
|
306
|
+
"Default": "default",
|
|
307
|
+
"WithActions": {
|
|
308
|
+
"figma": "layout",
|
|
309
|
+
"reason": "expanded=true with Button instances placed in popover-body (owner 2026-12-05)"
|
|
310
|
+
},
|
|
311
|
+
"OnIconButton": {
|
|
312
|
+
"figma": "layout",
|
|
313
|
+
"reason": "placement=right, expanded=true with the trigger swapped to IconButton (owner 2026-12-05)"
|
|
314
|
+
},
|
|
315
|
+
"Opened": "expanded=true",
|
|
316
|
+
"KeyboardNavigation": {
|
|
317
|
+
"figma": "expanded=true",
|
|
318
|
+
"reason": "opened from the keyboard; the trigger and the buttons inside draw their own focus (owner 2026-12-05)"
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "A single radio input — the individual option unit RadioGroup renders per choice, exposed on its own for cases that need one radio outside a full group (e.g. a single option embedded in a custom layout, or a hand-assembled set sharing `name`).",
|
|
8
8
|
"import": "import { RadioButton } from '@helixds/react';",
|
|
9
|
+
"archetype": "form-selection",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"A set of mutually exclusive options — use RadioGroup instead, which renders one of these per option with the correct fieldset/legend wrapper for free",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "Lets users choose exactly one option from a small, visible set of mutually exclusive choices.",
|
|
8
8
|
"import": "import { RadioGroup } from '@helixds/react';",
|
|
9
|
+
"archetype": "form-selection",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"A single independent on/off choice — use Checkbox or Switch instead",
|
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "Lets users switch between a small, fixed set of mutually exclusive modes or views, with no associated content panel.",
|
|
8
8
|
"import": "import { SegmentedControl } from '@helixds/react';",
|
|
9
|
+
"archetype": "form-selection",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
|
-
"Navigating between real pages or routes — use NavItem/
|
|
12
|
+
"Navigating between real pages or routes — use NavItem/Tabs instead",
|
|
12
13
|
"Content that switches inside an associated panel — that's a tabs pattern (tablist/tab), not this",
|
|
13
14
|
"More than ~5 options, or options with long labels — use RadioGroup or Select instead"
|
|
14
15
|
],
|
|
15
16
|
|
|
16
|
-
"rationale": "SegmentedControl is a hand-rolled radiogroup
|
|
17
|
+
"rationale": "SegmentedControl is a hand-rolled radiogroup on buttons, because no native element renders a segmented button set. It uses role=\"radiogroup\"/\"radio\" with aria-checked, not tablist/tab like the transitions.dev snippet it came from, because tabs imply a panel whose content changes, and this control switches modes with no associated panel. That's the line that separates it from Tabs. Unlike RadioGroup's native inputs, the roving tabindex and arrow keys are its own code and need their own tests. The sliding pill reuses NavItem's technique, a Motion layoutId with the shared SPRING_SNAPPY preset, instead of the snippet's offsetLeft measurement, and each instance gets its own layoutId so two controls on one page never animate into each other. It has one fixed size, semantic.size.s (24px), one step below Button's 32px, chosen after review. It adds no colors: the track is fill.secondary-interactive-default and the pill is fill.page. The pill has no shadow because it sits flush in its track and doesn't float.",
|
|
17
18
|
|
|
18
19
|
"governance": {
|
|
19
20
|
"mayExtendLocally": [
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
},
|
|
71
72
|
|
|
72
73
|
"a11y": {
|
|
73
|
-
"role": "radiogroup (hand-rolled — root is a plain div, options are buttons, not native inputs; see
|
|
74
|
+
"role": "radiogroup (hand-rolled — root is a plain div, options are buttons, not native inputs; see rationale)",
|
|
74
75
|
"keyboardNav": ["Arrow keys — move selection between options (roving tabindex, hand-rolled)", "Space/Enter — selects the focused option", "Tab — moves focus into and out of the group (only the checked option is in the tab order)"],
|
|
75
76
|
"wcag": ["1.3.1 Info and Relationships", "2.1.1 Keyboard", "2.4.7 Focus Visible", "4.1.2 Name Role Value"],
|
|
76
77
|
"applied": {
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
"$schema": "../component.schema.json",
|
|
3
3
|
"name": "Select",
|
|
4
4
|
"version": "1.1.0",
|
|
5
|
-
"status": "
|
|
5
|
+
"status": "beta",
|
|
6
6
|
|
|
7
7
|
"purpose": "Lets users choose a single value from a predefined list.",
|
|
8
8
|
"import": "import { Select } from '@helixds/react';",
|
|
9
|
+
"archetype": "form-selection",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"Free-form text entry - use Input instead",
|
|
12
|
-
"Multiple simultaneous selections - use MultiSelect or CheckboxGroup"
|
|
13
|
-
"Large option catalogs with search - use Combobox"
|
|
13
|
+
"Multiple simultaneous selections - use MultiSelect or CheckboxGroup"
|
|
14
14
|
],
|
|
15
15
|
|
|
16
|
-
"rationale": "Select is a select-only combobox on a <button> plus
|
|
16
|
+
"rationale": "Select is a select-only combobox on a <button> plus Menu's listbox instead of a native <select>, so the popup can be styled with tokens; see Menu's contract for the popup itself. The trigger keeps real DOM focus and points at the highlighted option with aria-activedescendant. Moving off the native element gives up the OS mobile picker and native form handling, so form participation goes through an invisible native input carrying name and the value. It's a real text input, not type=\"hidden\" or readOnly, because those are excluded from constraint validation, so required blocks submit like a native <select>, and focus is handed back to the trigger when the browser reports the error. It has one fixed 32px height (semantic.size.m) on purpose, so the trigger and its 32px Menu rows read as one aligned scale.",
|
|
17
17
|
|
|
18
18
|
"governance": {
|
|
19
19
|
"mayExtendLocally": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"mustEscalateToDS": [
|
|
24
24
|
"Adding a size prop or new heights",
|
|
25
|
-
"Adding search or multi-select (use
|
|
25
|
+
"Adding search or multi-select (use MultiSelect for several values)",
|
|
26
26
|
"Replacing the combobox/listbox keyboard model"
|
|
27
27
|
]
|
|
28
28
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"authored": [
|
|
33
33
|
{ "name": "invalid", "description": "The selected value fails validation.", "aria": "aria-invalid='true'" },
|
|
34
34
|
{ "name": "disabled", "description": "The field is non-interactive.", "aria": "disabled (native)" },
|
|
35
|
-
{ "name": "required", "description": "The field must have a value before form submission.", "aria": "aria-required='true'.
|
|
35
|
+
{ "name": "required", "description": "The field must have a value before form submission.", "aria": "aria-required='true' on the trigger. Enforced natively: an invisible real text input (select-native, not type=\"hidden\" and not readOnly) carries `required`, so the browser blocks submit while it's empty, same as a native <select>; when the browser focuses it to report the error, focus goes to the trigger — see rationale." },
|
|
36
36
|
{ "name": "open", "description": "The popup listbox is showing.", "aria": "aria-expanded='true'/'false' on the trigger button" }
|
|
37
37
|
]
|
|
38
38
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
{ "part": "select-label", "element": "label", "description": "Accessible label. Always rendered - visible or sr-only. Sits exactly 8px above the trigger — see .ai/maps/patterns/form-field-spacing.md. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
|
|
43
43
|
{ "part": "select-required", "element": "span", "optional": true, "description": "The required indicator (*) inside the label, the label color, 2px (spacing/3xs) after the text — shown by `required`. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
|
|
44
44
|
{ "part": "select-wrapper", "element": "div", "description": "Positions the trigger button and chevron." },
|
|
45
|
-
{ "part": "select-trigger", "element": "button", "description": "The visible control. Real DOM focus stays here at all times — see
|
|
45
|
+
{ "part": "select-trigger", "element": "button", "description": "The visible control. Real DOM focus stays here at all times — see Menu's contract rationale. `role` is implicit (button); `aria-haspopup=\"listbox\"`, `aria-expanded`, `aria-controls`, `aria-activedescendant` wire it to the portaled Menu." },
|
|
46
46
|
{ "part": "select-trigger-label", "element": "span", "description": "Wraps the trigger's own displayed text (selected option's label, or placeholder). Truncates with an ellipsis at a fixed/narrow consumer-set width instead of overflowing or forcing the trigger to grow — matches a native <select>'s own behavior." },
|
|
47
47
|
{ "part": "select-chevron", "element": "slot", "description": "Trailing chevron icon. Flips via `aria-expanded` on the trigger, same scaleY treatment as Accordion's chevron (.ai/maps/patterns/expand-collapse-chevron.md) — now real, not the earlier documented exception, since the trigger's own React state knows whether it's open.", "optional": true },
|
|
48
48
|
{ "part": "select-description", "element": "span", "description": "Helper text below the field. Sits exactly 8px below it — see .ai/maps/patterns/form-field-spacing.md. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md).", "optional": true },
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"mode": "fixed",
|
|
74
74
|
"values": { "default": 32 },
|
|
75
75
|
"unit": "px",
|
|
76
|
-
"note": "One fixed size only, deliberately — no size prop. Matches semantic.size.m, the same height Input/Textarea's own 'm' field uses, so a Select trigger and its Menu items read as one continuous, aligned scale (see
|
|
76
|
+
"note": "One fixed size only, deliberately — no size prop. Matches semantic.size.m, the same height Input/Textarea's own 'm' field uses, so a Select trigger and its Menu items read as one continuous, aligned scale (see Menu's contract rationale)."
|
|
77
77
|
},
|
|
78
78
|
"width": {"default": "fixed", "value": 320, "unit": "px", "modes": {"fixed": "320px — every form field shares it and never grows or shrinks with its content (owner's rule 2026-10-21, form-field pattern); max-width 100% so a narrow container can still hold it.", "fill": "fullWidth=true: 100% of the container (Figma: drawn at 600px, the field and its popup on Fill so they stretch)."}, "exceptions": "A field that must be narrower (a number stepper, a short code) says so here, with its width and why — the only way off 320px."}
|
|
79
79
|
},
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
},
|
|
85
85
|
|
|
86
86
|
"a11y": {
|
|
87
|
-
"role": "combobox on the <button> trigger (WAI-ARIA select-only combobox) + hand-rolled listbox popup (Menu) — see
|
|
87
|
+
"role": "combobox on the <button> trigger (WAI-ARIA select-only combobox) + hand-rolled listbox popup (Menu) — see Menu's contract rationale. Not a native <select>.",
|
|
88
88
|
"keyboardNav": ["Arrow Up/Down - opens the menu, or moves the highlighted option while open", "Home/End - jump to first/last enabled option while open", "Enter/Space - open the menu, or confirm the highlighted option while open", "Escape - close without changing the selection", "Tab - move focus (closes the menu first)"],
|
|
89
89
|
"wcag": ["1.3.1 Info and Relationships", "1.4.3 Contrast (AA)", "2.1.1 Keyboard", "2.4.7 Focus Visible", "4.1.2 Name Role Value"],
|
|
90
90
|
"applied": {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "The persistent vertical navigation rail of an app shell — brand mark, primary nav entries, and a footer slot for the current user.",
|
|
8
8
|
"import": "import { SideNav } from '@helixds/react';",
|
|
9
|
+
"archetype": "layout",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"In-page tabbed navigation — use Tabs",
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
},
|
|
34
35
|
|
|
35
36
|
"anatomy": [
|
|
36
|
-
{ "part": "side-nav-root", "element": "nav", "description": "Root — always a native <nav>, fixed width." },
|
|
37
|
+
{ "part": "side-nav-root", "element": "nav", "description": "Root — always a native <nav>, fixed width, with a 1px right border (sideNav.border) dividing it from the content." },
|
|
37
38
|
{ "part": "side-nav-brand", "element": "div", "description": "Logo/product-name slot at the top.", "optional": true },
|
|
38
39
|
{ "part": "side-nav-items", "element": "div", "description": "Wraps the NavItem list (children)." },
|
|
39
40
|
{ "part": "side-nav-footer", "element": "div", "description": "Slot at the bottom — typically the current user row.", "optional": true }
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "A modal panel anchored to the right edge of the viewport, for a persistent secondary task alongside — but still blocking — the main page (details, a form, a filter builder).",
|
|
8
8
|
"import": "import { SidePanel } from '@helixds/react';",
|
|
9
|
+
"archetype": "overlays",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"A quick, focused decision that should fully interrupt the page — use Modal instead",
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
"Primary navigation — use SideNav instead"
|
|
14
15
|
],
|
|
15
16
|
|
|
16
|
-
"rationale": "SidePanel uses native <dialog> and showModal() like Modal
|
|
17
|
+
"rationale": "SidePanel uses native <dialog> and showModal() like Modal, so focus trapping, Escape and top-layer stacking come from the browser, with no library and no z-index. It shares Modal's open/close state machine, the useDialogTransition hook: data-state=\"open\" is set one animation frame after showModal() so the transition plays, and a close sets data-state=\"closing\", waits component.sidePanel.duration-close, then calls .close(). The native cancel event (Escape, backdrop click) is redirected through onDismiss so every dismissal animates the same way. Only its slide, blur and fade transition is its own CSS. It has no scrim, so the page behind stays visible, but ::backdrop is still set to transparent on purpose, because browsers paint a default dimming when no rule is given. It's anchored full-height to the right edge at a fixed 400px width (or to the bottom edge with placement) for secondary tasks that still block the page, and has no radius because it meets the viewport edge.",
|
|
17
18
|
|
|
18
19
|
"governance": {
|
|
19
20
|
"mayExtendLocally": [
|
|
@@ -30,12 +31,12 @@
|
|
|
30
31
|
"states": {
|
|
31
32
|
"intrinsic": [],
|
|
32
33
|
"authored": [
|
|
33
|
-
{ "name": "expanded", "description": "Whether the panel is open. Same native <dialog> + JS-timed close choreography as Modal — see
|
|
34
|
+
{ "name": "expanded", "description": "Whether the panel is open. Same native <dialog> + JS-timed close choreography as Modal — see Modal's contract rationale.", "aria": "native <dialog> semantics; role=\"dialog\" is implicit" }
|
|
34
35
|
]
|
|
35
36
|
},
|
|
36
37
|
|
|
37
38
|
"anatomy": [
|
|
38
|
-
{ "part": "side-panel-root", "element": "dialog", "description": "Native <dialog>, opened via showModal(), styled to the right or bottom edge (see `placement`) instead of centered — same primitive as Modal (
|
|
39
|
+
{ "part": "side-panel-root", "element": "dialog", "description": "Native <dialog>, opened via showModal(), styled to the right or bottom edge (see `placement`) instead of centered — same primitive as Modal (see Modal's contract rationale). No backdrop scrim (unlike Modal) — the page behind stays visible." },
|
|
39
40
|
{ "part": "side-panel-header", "element": "div", "description": "Contains the title." },
|
|
40
41
|
{ "part": "side-panel-title", "element": "h2", "description": "The panel's accessible name — referenced via aria-labelledby. Same text style as Modal's title." },
|
|
41
42
|
{ "part": "side-panel-close", "element": "slot", "description": "An IconButton (IconX, size l) positioned top-right, calls onDismiss.", "optional": true },
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
|
|
66
67
|
"a11y": {
|
|
67
68
|
"role": "dialog (implicit via native <dialog>)",
|
|
68
|
-
"keyboardNav": ["Escape — dismisses (native <dialog> cancel event, redirected through onDismiss per
|
|
69
|
+
"keyboardNav": ["Escape — dismisses (native <dialog> cancel event, redirected through onDismiss per Modal's contract rationale)", "Tab — cycles focus, trapped inside the panel (native)"],
|
|
69
70
|
"wcag": ["2.4.3 Focus Order", "4.1.2 Name, Role, Value"],
|
|
70
71
|
"applied": {
|
|
71
72
|
"nativeElement": "dialog",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "Lets users toggle a single setting on or off, with the change taking effect immediately.",
|
|
8
8
|
"import": "import { Switch } from '@helixds/react';",
|
|
9
|
+
"archetype": "form-selection",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"A choice that requires explicit confirmation before taking effect — use Checkbox + Button instead",
|