@helixds/react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +292 -0
- package/LICENSE +21 -0
- package/README.md +49 -2
- package/dist/components/Accordion/Accordion.d.ts +14 -0
- package/dist/components/Accordion/Accordion.doc.d.ts +4 -0
- package/dist/components/Accordion/Accordion.doc.js +27 -0
- package/dist/components/Accordion/Accordion.js +76 -0
- package/dist/components/Accordion/Accordion.types.d.ts +24 -0
- package/dist/components/Accordion/Accordion.types.js +2 -0
- package/dist/components/Accordion/index.d.ts +9 -0
- package/dist/components/Accordion/index.js +2 -0
- package/dist/components/Avatar/Avatar.d.ts +14 -0
- package/dist/components/Avatar/Avatar.doc.d.ts +4 -0
- package/dist/components/Avatar/Avatar.doc.js +34 -0
- package/dist/components/Avatar/Avatar.js +14 -0
- package/dist/components/Avatar/Avatar.types.d.ts +20 -0
- package/dist/components/Avatar/Avatar.types.js +2 -0
- package/dist/components/Avatar/index.d.ts +9 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +14 -0
- package/dist/components/AvatarGroup/AvatarGroup.doc.d.ts +4 -0
- package/dist/components/AvatarGroup/AvatarGroup.doc.js +30 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +15 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +21 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.js +2 -0
- package/dist/components/AvatarGroup/index.d.ts +9 -0
- package/dist/components/AvatarGroup/index.js +2 -0
- package/dist/components/Badge/Badge.d.ts +16 -0
- package/dist/components/Badge/Badge.doc.d.ts +4 -0
- package/dist/components/Badge/Badge.doc.js +69 -0
- package/dist/components/Badge/Badge.js +23 -0
- package/dist/components/Badge/Badge.types.d.ts +22 -0
- package/dist/components/Badge/Badge.types.js +2 -0
- package/dist/components/Badge/index.d.ts +9 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/Button/Button.d.ts +11 -0
- package/dist/components/Button/Button.doc.d.ts +4 -0
- package/dist/components/Button/Button.doc.js +98 -0
- package/dist/components/Button/Button.js +80 -0
- package/dist/components/Button/Button.types.d.ts +29 -0
- package/dist/components/Button/Button.types.js +2 -0
- package/dist/components/Button/index.d.ts +9 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Card/Card.d.ts +14 -0
- package/dist/components/Card/Card.doc.d.ts +4 -0
- package/dist/components/Card/Card.doc.js +44 -0
- package/dist/components/Card/Card.js +9 -0
- package/dist/components/Card/Card.types.d.ts +19 -0
- package/dist/components/Card/Card.types.js +2 -0
- package/dist/components/Card/index.d.ts +9 -0
- package/dist/components/Card/index.js +2 -0
- package/dist/components/Chart/Chart.d.ts +14 -0
- package/dist/components/Chart/Chart.doc.d.ts +4 -0
- package/dist/components/Chart/Chart.doc.js +49 -0
- package/dist/components/Chart/Chart.js +184 -0
- package/dist/components/Chart/Chart.types.d.ts +21 -0
- package/dist/components/Chart/Chart.types.js +2 -0
- package/dist/components/Chart/index.d.ts +9 -0
- package/dist/components/Chart/index.js +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +12 -0
- package/dist/components/Checkbox/Checkbox.doc.d.ts +4 -0
- package/dist/components/Checkbox/Checkbox.doc.js +54 -0
- package/dist/components/Checkbox/Checkbox.js +23 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +22 -0
- package/dist/components/Checkbox/Checkbox.types.js +2 -0
- package/dist/components/Checkbox/index.d.ts +9 -0
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +13 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.doc.d.ts +4 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.doc.js +56 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js +27 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.types.d.ts +28 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.types.js +2 -0
- package/dist/components/CheckboxGroup/index.d.ts +9 -0
- package/dist/components/CheckboxGroup/index.js +2 -0
- package/dist/components/Chip/Chip.d.ts +11 -0
- package/dist/components/Chip/Chip.doc.d.ts +4 -0
- package/dist/components/Chip/Chip.doc.js +105 -0
- package/dist/components/Chip/Chip.js +30 -0
- package/dist/components/Chip/Chip.types.d.ts +31 -0
- package/dist/components/Chip/Chip.types.js +2 -0
- package/dist/components/Chip/index.d.ts +9 -0
- package/dist/components/Chip/index.js +2 -0
- package/dist/components/ChipGroup/ChipGroup.d.ts +12 -0
- package/dist/components/ChipGroup/ChipGroup.doc.d.ts +4 -0
- package/dist/components/ChipGroup/ChipGroup.doc.js +31 -0
- package/dist/components/ChipGroup/ChipGroup.js +9 -0
- package/dist/components/ChipGroup/ChipGroup.types.d.ts +27 -0
- package/dist/components/ChipGroup/ChipGroup.types.js +2 -0
- package/dist/components/ChipGroup/index.d.ts +9 -0
- package/dist/components/ChipGroup/index.js +2 -0
- package/dist/components/FAB/FAB.d.ts +11 -0
- package/dist/components/FAB/FAB.doc.d.ts +4 -0
- package/dist/components/FAB/FAB.doc.js +52 -0
- package/dist/components/FAB/FAB.js +133 -0
- package/dist/components/FAB/FAB.types.d.ts +37 -0
- package/dist/components/FAB/FAB.types.js +2 -0
- package/dist/components/FAB/index.d.ts +9 -0
- package/dist/components/FAB/index.js +2 -0
- package/dist/components/Icon/Icon.d.ts +14 -0
- package/dist/components/Icon/Icon.doc.d.ts +4 -0
- package/dist/components/Icon/Icon.doc.js +38 -0
- package/dist/components/Icon/Icon.js +15 -0
- package/dist/components/Icon/Icon.types.d.ts +47 -0
- package/dist/components/Icon/Icon.types.js +2 -0
- package/dist/components/Icon/createIconAdapter.d.ts +24 -0
- package/dist/components/Icon/createIconAdapter.js +28 -0
- package/dist/components/Icon/iconStroke.d.ts +20 -0
- package/dist/components/Icon/iconStroke.js +54 -0
- package/dist/components/Icon/index.d.ts +12 -0
- package/dist/components/Icon/index.js +4 -0
- package/dist/components/IconButton/IconButton.d.ts +11 -0
- package/dist/components/IconButton/IconButton.doc.d.ts +4 -0
- package/dist/components/IconButton/IconButton.doc.js +76 -0
- package/dist/components/IconButton/IconButton.js +20 -0
- package/dist/components/IconButton/IconButton.types.d.ts +25 -0
- package/dist/components/IconButton/IconButton.types.js +2 -0
- package/dist/components/IconButton/index.d.ts +9 -0
- package/dist/components/IconButton/index.js +2 -0
- package/dist/components/Input/Input.d.ts +11 -0
- package/dist/components/Input/Input.doc.d.ts +4 -0
- package/dist/components/Input/Input.doc.js +68 -0
- package/dist/components/Input/Input.js +48 -0
- package/dist/components/Input/Input.types.d.ts +36 -0
- package/dist/components/Input/Input.types.js +2 -0
- package/dist/components/Input/index.d.ts +9 -0
- package/dist/components/Input/index.js +2 -0
- package/dist/components/Menu/Menu.d.ts +14 -0
- package/dist/components/Menu/Menu.doc.d.ts +4 -0
- package/dist/components/Menu/Menu.doc.js +46 -0
- package/dist/components/Menu/Menu.js +105 -0
- package/dist/components/Menu/Menu.types.d.ts +34 -0
- package/dist/components/Menu/Menu.types.js +2 -0
- package/dist/components/Menu/index.d.ts +9 -0
- package/dist/components/Menu/index.js +2 -0
- package/dist/components/Modal/Modal.d.ts +14 -0
- package/dist/components/Modal/Modal.doc.d.ts +4 -0
- package/dist/components/Modal/Modal.doc.js +52 -0
- package/dist/components/Modal/Modal.js +30 -0
- package/dist/components/Modal/Modal.types.d.ts +36 -0
- package/dist/components/Modal/Modal.types.js +2 -0
- package/dist/components/Modal/index.d.ts +9 -0
- package/dist/components/Modal/index.js +2 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +17 -0
- package/dist/components/MultiSelect/MultiSelect.doc.d.ts +4 -0
- package/dist/components/MultiSelect/MultiSelect.doc.js +37 -0
- package/dist/components/MultiSelect/MultiSelect.js +165 -0
- package/dist/components/MultiSelect/MultiSelect.types.d.ts +50 -0
- package/dist/components/MultiSelect/MultiSelect.types.js +2 -0
- package/dist/components/MultiSelect/index.d.ts +9 -0
- package/dist/components/MultiSelect/index.js +2 -0
- package/dist/components/NavItem/NavItem.d.ts +14 -0
- package/dist/components/NavItem/NavItem.doc.d.ts +4 -0
- package/dist/components/NavItem/NavItem.doc.js +31 -0
- package/dist/components/NavItem/NavItem.js +21 -0
- package/dist/components/NavItem/NavItem.types.d.ts +20 -0
- package/dist/components/NavItem/NavItem.types.js +2 -0
- package/dist/components/NavItem/index.d.ts +9 -0
- package/dist/components/NavItem/index.js +2 -0
- package/dist/components/RadioButton/RadioButton.d.ts +14 -0
- package/dist/components/RadioButton/RadioButton.doc.d.ts +4 -0
- package/dist/components/RadioButton/RadioButton.doc.js +35 -0
- package/dist/components/RadioButton/RadioButton.js +15 -0
- package/dist/components/RadioButton/RadioButton.types.d.ts +33 -0
- package/dist/components/RadioButton/RadioButton.types.js +2 -0
- package/dist/components/RadioButton/index.d.ts +9 -0
- package/dist/components/RadioButton/index.js +2 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +12 -0
- package/dist/components/RadioGroup/RadioGroup.doc.d.ts +4 -0
- package/dist/components/RadioGroup/RadioGroup.doc.js +80 -0
- package/dist/components/RadioGroup/RadioGroup.js +19 -0
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +28 -0
- package/dist/components/RadioGroup/RadioGroup.types.js +2 -0
- package/dist/components/RadioGroup/index.d.ts +9 -0
- package/dist/components/RadioGroup/index.js +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +13 -0
- package/dist/components/SegmentedControl/SegmentedControl.doc.d.ts +4 -0
- package/dist/components/SegmentedControl/SegmentedControl.doc.js +50 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +64 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.d.ts +26 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.js +2 -0
- package/dist/components/SegmentedControl/index.d.ts +9 -0
- package/dist/components/SegmentedControl/index.js +2 -0
- package/dist/components/Select/Select.d.ts +13 -0
- package/dist/components/Select/Select.doc.d.ts +4 -0
- package/dist/components/Select/Select.doc.js +66 -0
- package/dist/components/Select/Select.js +138 -0
- package/dist/components/Select/Select.types.d.ts +36 -0
- package/dist/components/Select/Select.types.js +2 -0
- package/dist/components/Select/index.d.ts +9 -0
- package/dist/components/Select/index.js +2 -0
- package/dist/components/SidePanel/SidePanel.d.ts +14 -0
- package/dist/components/SidePanel/SidePanel.doc.d.ts +4 -0
- package/dist/components/SidePanel/SidePanel.doc.js +29 -0
- package/dist/components/SidePanel/SidePanel.js +19 -0
- package/dist/components/SidePanel/SidePanel.types.d.ts +28 -0
- package/dist/components/SidePanel/SidePanel.types.js +2 -0
- package/dist/components/SidePanel/index.d.ts +9 -0
- package/dist/components/SidePanel/index.js +2 -0
- package/dist/components/Switch/Switch.d.ts +13 -0
- package/dist/components/Switch/Switch.doc.d.ts +4 -0
- package/dist/components/Switch/Switch.doc.js +56 -0
- package/dist/components/Switch/Switch.js +45 -0
- package/dist/components/Switch/Switch.types.d.ts +21 -0
- package/dist/components/Switch/Switch.types.js +2 -0
- package/dist/components/Switch/index.d.ts +9 -0
- package/dist/components/Switch/index.js +2 -0
- package/dist/components/Table/Table.d.ts +34 -0
- package/dist/components/Table/Table.doc.d.ts +4 -0
- package/dist/components/Table/Table.doc.js +48 -0
- package/dist/components/Table/Table.js +17 -0
- package/dist/components/Table/Table.types.d.ts +30 -0
- package/dist/components/Table/Table.types.js +2 -0
- package/dist/components/Table/index.d.ts +9 -0
- package/dist/components/Table/index.js +2 -0
- package/dist/components/Textarea/Textarea.d.ts +9 -0
- package/dist/components/Textarea/Textarea.doc.d.ts +4 -0
- package/dist/components/Textarea/Textarea.doc.js +60 -0
- package/dist/components/Textarea/Textarea.js +24 -0
- package/dist/components/Textarea/Textarea.types.d.ts +22 -0
- package/dist/components/Textarea/Textarea.types.js +2 -0
- package/dist/components/Textarea/index.d.ts +9 -0
- package/dist/components/Textarea/index.js +2 -0
- package/dist/components/Toast/Toast.d.ts +16 -0
- package/dist/components/Toast/Toast.doc.d.ts +4 -0
- package/dist/components/Toast/Toast.doc.js +37 -0
- package/dist/components/Toast/Toast.js +134 -0
- package/dist/components/Toast/Toast.types.d.ts +11 -0
- package/dist/components/Toast/Toast.types.js +2 -0
- package/dist/components/Toast/index.d.ts +10 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/toastStore.d.ts +36 -0
- package/dist/components/Toast/toastStore.js +57 -0
- package/dist/components/Tooltip/Tooltip.d.ts +14 -0
- package/dist/components/Tooltip/Tooltip.doc.d.ts +4 -0
- package/dist/components/Tooltip/Tooltip.doc.js +33 -0
- package/dist/components/Tooltip/Tooltip.js +105 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +21 -0
- package/dist/components/Tooltip/Tooltip.types.js +2 -0
- package/dist/components/Tooltip/index.d.ts +9 -0
- package/dist/components/Tooltip/index.js +2 -0
- package/dist/contracts/Accordion.json +174 -0
- package/dist/contracts/AppShell.json +118 -0
- package/dist/contracts/Avatar.json +157 -0
- package/dist/contracts/AvatarGroup.json +169 -0
- package/dist/contracts/Badge.json +212 -0
- package/dist/contracts/Button.json +295 -0
- package/dist/contracts/Card.json +125 -0
- package/dist/contracts/Chart.json +167 -0
- package/dist/contracts/Checkbox.json +333 -0
- package/dist/contracts/CheckboxGroup.json +200 -0
- package/dist/contracts/Chip.json +320 -0
- package/dist/contracts/ChipGroup.json +182 -0
- package/dist/contracts/FAB.json +215 -0
- package/dist/contracts/Icon.json +306 -0
- package/dist/contracts/IconButton.json +213 -0
- package/dist/contracts/Input.json +400 -0
- package/dist/contracts/Menu.json +197 -0
- package/dist/contracts/Modal.json +192 -0
- package/dist/contracts/MultiSelect.json +244 -0
- package/dist/contracts/NavItem.json +148 -0
- package/dist/contracts/PageHeader.json +134 -0
- package/dist/contracts/RadioButton.json +202 -0
- package/dist/contracts/RadioGroup.json +228 -0
- package/dist/contracts/SegmentedControl.json +193 -0
- package/dist/contracts/Select.json +241 -0
- package/dist/contracts/SideNav.json +138 -0
- package/dist/contracts/SidePanel.json +153 -0
- package/dist/contracts/Switch.json +201 -0
- package/dist/contracts/Table.json +130 -0
- package/dist/contracts/Textarea.json +353 -0
- package/dist/contracts/Toast.json +186 -0
- package/dist/contracts/Tooltip.json +168 -0
- package/dist/contracts/TopBar.json +127 -0
- package/dist/contracts/manifest.json +675 -0
- package/dist/index.d.ts +109 -0
- package/dist/index.js +73 -0
- package/dist/layout/AppShell/AppShell.d.ts +14 -0
- package/dist/layout/AppShell/AppShell.doc.d.ts +4 -0
- package/dist/layout/AppShell/AppShell.doc.js +27 -0
- package/dist/layout/AppShell/AppShell.js +9 -0
- package/dist/layout/AppShell/AppShell.types.d.ts +18 -0
- package/dist/layout/AppShell/AppShell.types.js +2 -0
- package/dist/layout/AppShell/index.d.ts +9 -0
- package/dist/layout/AppShell/index.js +2 -0
- package/dist/layout/PageHeader/PageHeader.d.ts +14 -0
- package/dist/layout/PageHeader/PageHeader.doc.d.ts +4 -0
- package/dist/layout/PageHeader/PageHeader.doc.js +30 -0
- package/dist/layout/PageHeader/PageHeader.js +10 -0
- package/dist/layout/PageHeader/PageHeader.types.d.ts +21 -0
- package/dist/layout/PageHeader/PageHeader.types.js +2 -0
- package/dist/layout/PageHeader/index.d.ts +9 -0
- package/dist/layout/PageHeader/index.js +2 -0
- package/dist/layout/SideNav/SideNav.d.ts +14 -0
- package/dist/layout/SideNav/SideNav.doc.d.ts +4 -0
- package/dist/layout/SideNav/SideNav.doc.js +32 -0
- package/dist/layout/SideNav/SideNav.js +9 -0
- package/dist/layout/SideNav/SideNav.types.d.ts +18 -0
- package/dist/layout/SideNav/SideNav.types.js +2 -0
- package/dist/layout/SideNav/index.d.ts +9 -0
- package/dist/layout/SideNav/index.js +2 -0
- package/dist/layout/TopBar/TopBar.d.ts +14 -0
- package/dist/layout/TopBar/TopBar.doc.d.ts +4 -0
- package/dist/layout/TopBar/TopBar.doc.js +28 -0
- package/dist/layout/TopBar/TopBar.js +9 -0
- package/dist/layout/TopBar/TopBar.types.d.ts +16 -0
- package/dist/layout/TopBar/TopBar.types.js +2 -0
- package/dist/layout/TopBar/index.d.ts +9 -0
- package/dist/layout/TopBar/index.js +2 -0
- package/dist/lib/component-doc.d.ts +34 -0
- package/dist/lib/component-doc.js +2 -0
- package/dist/lib/motionPresets.d.ts +37 -0
- package/dist/lib/motionPresets.js +35 -0
- package/dist/lib/resolveTokenPx.d.ts +11 -0
- package/dist/lib/resolveTokenPx.js +17 -0
- package/dist/lib/useDialogTransition.d.ts +21 -0
- package/dist/lib/useDialogTransition.js +86 -0
- package/dist/lib/useDisclosureTransition.d.ts +19 -0
- package/dist/lib/useDisclosureTransition.js +41 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.js +6 -0
- package/dist/patterns/action-bar.md +127 -0
- package/dist/patterns/border-always.md +40 -0
- package/dist/patterns/data-analytics.md +15 -0
- package/dist/patterns/disabled-state.md +80 -0
- package/dist/patterns/empty-state.md +130 -0
- package/dist/patterns/expand-collapse-chevron.md +101 -0
- package/dist/patterns/form-field-group.md +139 -0
- package/dist/patterns/form-field-spacing.md +99 -0
- package/dist/patterns/group-spacing.md +54 -0
- package/dist/patterns/motion-effects.md +100 -0
- package/dist/patterns/same-row-sizing.md +52 -0
- package/dist/patterns/search-filter.md +118 -0
- package/dist/patterns/show-hide-parts.md +53 -0
- package/dist/patterns/stat-card.md +105 -0
- package/dist/patterns/status-row.md +130 -0
- package/dist/patterns/view-toggle.md +81 -0
- package/dist/prop-map.md +80 -0
- package/package.json +70 -3
- package/src/globals.css +3195 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using SidePanel, read its contract: node_modules/@helixds/react/dist/contracts/SidePanel.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import type { SidePanelProps } from './SidePanel.types.js';
|
|
9
|
+
declare const SidePanel: {
|
|
10
|
+
({ label, children, expanded, onDismiss, showCloseButton, closeOnBackdropClick, placement, className, }: SidePanelProps): React.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export { SidePanel };
|
|
14
|
+
//# sourceMappingURL=SidePanel.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const doc = {
|
|
2
|
+
name: 'SidePanel',
|
|
3
|
+
purpose: 'A modal panel anchored to the right edge of the viewport, for a persistent secondary task alongside the main page.',
|
|
4
|
+
contract: 'contracts/components/SidePanel.json',
|
|
5
|
+
a11y: [
|
|
6
|
+
'Same native <dialog> + showModal() primitive as Modal — focus trap, Escape-to-close, top-layer stacking (see ADR-010). No backdrop scrim, unlike Modal — the page behind stays visible.',
|
|
7
|
+
'The title is referenced via aria-labelledby, giving the panel its accessible name.',
|
|
8
|
+
'SidePanel never closes itself — it always calls onDismiss and expects the consumer to set expanded to false.',
|
|
9
|
+
],
|
|
10
|
+
variants: [],
|
|
11
|
+
sizes: [],
|
|
12
|
+
tokens: [
|
|
13
|
+
{ part: 'side-panel-root', label: 'fill', token: '--helix-sidePanel-fill', kind: 'color' },
|
|
14
|
+
{ part: 'side-panel-root', label: 'shadow (placement=right)', token: '--helix-sidePanel-shadow', kind: 'shadow' },
|
|
15
|
+
{ part: 'side-panel-root', label: 'shadow (placement=bottom)', token: '--helix-sidePanel-shadowBottom', kind: 'shadow' },
|
|
16
|
+
{ part: 'side-panel-root', label: 'width', token: '--helix-sidePanel-width', kind: 'space' },
|
|
17
|
+
],
|
|
18
|
+
features: [
|
|
19
|
+
'label — the panel\'s title / accessible name',
|
|
20
|
+
'expanded / onDismiss — always controlled, no uncontrolled form',
|
|
21
|
+
'showCloseButton — toggles the header\'s X button',
|
|
22
|
+
'closeOnBackdropClick — toggles dismissal on a click outside the panel',
|
|
23
|
+
'placement — \'right\' (default, full height) or \'bottom\' (full width) — same vocabulary as Tooltip\'s placement prop',
|
|
24
|
+
],
|
|
25
|
+
examples: [
|
|
26
|
+
{ label: 'Basic', code: `<SidePanel label="Edit filters" expanded={isOpen} onDismiss={() => setIsOpen(false)}>...</SidePanel>` },
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=SidePanel.doc.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { IconX } from '@tabler/icons-react';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { IconButton } from '../IconButton/index.js';
|
|
6
|
+
import { useDialogTransition } from '../../lib/useDialogTransition.js';
|
|
7
|
+
let idCounter = 0;
|
|
8
|
+
const SidePanel = ({ label, children, expanded, onDismiss, showCloseButton = true, closeOnBackdropClick = true, placement = 'right', className, }) => {
|
|
9
|
+
const titleId = `helix-sidePanel-title-${++idCounter}`;
|
|
10
|
+
const { ref, state } = useDialogTransition(expanded, '--helix-sidePanel-duration-close', onDismiss, closeOnBackdropClick);
|
|
11
|
+
return (_jsxs("dialog", { ref: ref, "data-helix-part": "side-panel-root", "data-state": state, "data-placement": placement, "aria-labelledby": titleId, className: cn(className), children: [_jsx("div", { "data-helix-part": "side-panel-header", children: _jsx("h2", { "data-helix-part": "side-panel-title", id: titleId, children: label }) }), showCloseButton && (
|
|
12
|
+
// Wrapped, not passed data-helix-part directly — see Modal.tsx's identical comment: IconButton
|
|
13
|
+
// spreads ...props after its own hardcoded data-helix-part="icon-button", so passing the same
|
|
14
|
+
// prop name here would silently detach every IconButton CSS rule, hover included.
|
|
15
|
+
_jsx("span", { "data-helix-part": "side-panel-close", children: _jsx(IconButton, { icon: IconX, label: "Close", size: "l", variant: "ghost", onClick: onDismiss }) })), _jsx("div", { "data-helix-part": "side-panel-body", children: children })] }));
|
|
16
|
+
};
|
|
17
|
+
SidePanel.displayName = 'SidePanel';
|
|
18
|
+
export { SidePanel };
|
|
19
|
+
//# sourceMappingURL=SidePanel.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using SidePanel, read its contract: node_modules/@helixds/react/dist/contracts/SidePanel.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
import type * as React from 'react';
|
|
8
|
+
/** Same vocabulary as Tooltip's `placement` — only the two edges that make sense for a full-height/full-width panel. */
|
|
9
|
+
export type SidePanelPlacement = 'right' | 'bottom';
|
|
10
|
+
export interface SidePanelProps {
|
|
11
|
+
/** Which edge of the viewport the panel is anchored to and slides from. Default: 'right' */
|
|
12
|
+
placement?: SidePanelPlacement;
|
|
13
|
+
/** The panel's title — rendered visibly and used as its accessible name. */
|
|
14
|
+
label: string;
|
|
15
|
+
/** The panel's body content. */
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
/** Whether the panel is open. Always controlled — see ADR-010. */
|
|
18
|
+
expanded: boolean;
|
|
19
|
+
/** Called when the panel should close (close button, Escape, or a backdrop click). SidePanel never closes itself — set `expanded` to false in response. */
|
|
20
|
+
onDismiss: () => void;
|
|
21
|
+
/** Whether to render the header's close (X) button. Default: true */
|
|
22
|
+
showCloseButton?: boolean;
|
|
23
|
+
/** Whether clicking outside the panel dismisses it. Default: true */
|
|
24
|
+
closeOnBackdropClick?: boolean;
|
|
25
|
+
/** Additional className for the root. */
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=SidePanel.types.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using SidePanel, read its contract: node_modules/@helixds/react/dist/contracts/SidePanel.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
export { SidePanel } from './SidePanel.js';
|
|
8
|
+
export type { SidePanelProps } from './SidePanel.types.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Switch, read its contract: node_modules/@helixds/react/dist/contracts/Switch.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import type { SwitchProps } from './Switch.types.js';
|
|
9
|
+
export declare function Switch({ label, hideLabel, description, checked, defaultChecked, onChange, disabled, size, id: idProp, name, }: SwitchProps): React.JSX.Element;
|
|
10
|
+
export declare namespace Switch {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const doc = {
|
|
2
|
+
name: 'Switch',
|
|
3
|
+
purpose: 'Toggles a single setting on or off immediately, with no separate save step.',
|
|
4
|
+
contract: 'contracts/components/Switch.json',
|
|
5
|
+
a11y: [
|
|
6
|
+
'Renders a real `role="switch"` button plus a visually-hidden native checkbox for form submission.',
|
|
7
|
+
'The `label` prop is required and is bound to the visible control via a real `<label htmlFor>`.',
|
|
8
|
+
'Toggling calls `onChange` immediately — Switch is for instant-effect settings, not for state that needs a separate Save action (use Checkbox for that).',
|
|
9
|
+
],
|
|
10
|
+
variants: [],
|
|
11
|
+
sizes: ['s', 'm'],
|
|
12
|
+
tokens: [
|
|
13
|
+
{ part: 'switch-track', label: 'Off fill', token: '--helix-switch-track-fill-off', kind: 'color' },
|
|
14
|
+
{ part: 'switch-track', label: 'On fill', token: '--helix-switch-track-fill-on', kind: 'color' },
|
|
15
|
+
{ part: 'switch-track', label: 'On fill', token: '--helix-switch-track-fill-on-hover', kind: 'color', state: 'hover', meta: 'Hover while on — off state has no dedicated hover token' },
|
|
16
|
+
{ part: 'switch-track', label: 'Disabled fill', token: '--helix-switch-track-fill-disabled', kind: 'color', state: 'disabled' },
|
|
17
|
+
{ part: 'switch-thumb', label: 'Thumb fill', token: '--helix-switch-thumb-fill', kind: 'color' },
|
|
18
|
+
{ part: 'switch-track', label: 'Focus outline', token: '--helix-switch-border-focus', kind: 'color' },
|
|
19
|
+
{ part: 'switch-label', label: 'Label text', token: '--helix-switch-text-label', kind: 'color' },
|
|
20
|
+
{ part: 'switch-description', label: 'Description text', token: '--helix-switch-text-description', kind: 'color' },
|
|
21
|
+
{ part: 'switch-label', label: 'label', token: '--helix-primitive-fontSize-s', kind: 'typography', meta: 'Body small' },
|
|
22
|
+
{ part: 'switch-description', label: 'description', token: '--helix-primitive-fontSize-s', kind: 'typography', meta: 'Body xsmall' },
|
|
23
|
+
{ part: 'switch-track', label: 'track.width.s', token: '--helix-switch-width-s', kind: 'space', axis: 'horizontal', size: 's', meta: 'The one width-typed sizing token — sizing defaults to vertical everywhere else' },
|
|
24
|
+
{ part: 'switch-track', label: 'track.width.m', token: '--helix-switch-width-m', kind: 'space', axis: 'horizontal', size: 'm' },
|
|
25
|
+
{ part: 'switch-track', label: 'track.height.s', token: '--helix-switch-height-s', kind: 'space', size: 's' },
|
|
26
|
+
{ part: 'switch-track', label: 'track.height.m', token: '--helix-switch-height-m', kind: 'space', size: 'm' },
|
|
27
|
+
{ part: 'switch-thumb', label: 'thumb.size.s', token: '--helix-switch-thumb-size-s', kind: 'space', size: 's' },
|
|
28
|
+
{ part: 'switch-thumb', label: 'thumb.size.m', token: '--helix-switch-thumb-size-m', kind: 'space', size: 'm' },
|
|
29
|
+
{ part: 'switch-row', label: 'gap.track.label', token: '--helix-primitive-spacing-75', kind: 'space', axis: 'horizontal' },
|
|
30
|
+
{ part: 'switch-root', label: 'gap.row.description', token: '--helix-primitive-spacing-25', kind: 'space', axis: 'vertical' },
|
|
31
|
+
{ part: 'switch-track', label: 'switch.track', token: '--helix-radius-full', kind: 'radius' },
|
|
32
|
+
{ part: 'switch-thumb', label: 'switch.thumb', value: '50%', kind: 'radius', meta: 'Always a full circle, independent of the track radius token' },
|
|
33
|
+
{ part: 'switch-root', label: 'display', value: 'flex' },
|
|
34
|
+
{ part: 'switch-root', label: 'flex-direction', value: 'column' },
|
|
35
|
+
{ part: 'switch-row', label: 'display', value: 'inline-flex' },
|
|
36
|
+
{ part: 'switch-row', label: 'align-items', value: 'center' },
|
|
37
|
+
{ part: 'switch-track', label: 'cursor', value: 'pointer' },
|
|
38
|
+
{ part: 'switch-track', label: 'cursor.disabled', value: 'not-allowed' },
|
|
39
|
+
],
|
|
40
|
+
features: [
|
|
41
|
+
'label — required accessible label',
|
|
42
|
+
'hideLabel — visually hides the label while keeping it as the accessible name',
|
|
43
|
+
'description — optional helper copy below the row',
|
|
44
|
+
'size — s or m track/thumb scale',
|
|
45
|
+
'checked / defaultChecked — controlled or uncontrolled boolean state',
|
|
46
|
+
'onChange fires immediately on toggle — no separate confirm step',
|
|
47
|
+
'Thumb slides via a Motion spring (ADR-007) instead of a flat CSS transition; internal only, no new prop',
|
|
48
|
+
],
|
|
49
|
+
examples: [
|
|
50
|
+
{ label: 'Default', code: `<Switch label="Enable notifications" />` },
|
|
51
|
+
{ label: 'With description', code: `<Switch label="Auto-save" description="Save changes as you type" />` },
|
|
52
|
+
{ label: 'Small', code: `<Switch label="Compact mode" size="s" />` },
|
|
53
|
+
{ label: 'Checked', code: `<Switch label="Dark mode" defaultChecked />` },
|
|
54
|
+
],
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=Switch.doc.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { motion, MotionConfig } from 'motion/react';
|
|
4
|
+
import { resolveTokenPx } from '../../lib/resolveTokenPx.js';
|
|
5
|
+
import { SPRING_SNAPPY } from '../../lib/motionPresets.js';
|
|
6
|
+
let idCounter = 0;
|
|
7
|
+
// Thumb offset needs a measured pixel value regardless of animation engine — Switch's own contract says
|
|
8
|
+
// track/thumb widths are fixed per size ("not consumer-configurable"), so reading them from tokens is
|
|
9
|
+
// exact, no ResizeObserver needed.
|
|
10
|
+
function useThumbOffset(size) {
|
|
11
|
+
const [x, setX] = React.useState(0);
|
|
12
|
+
React.useEffect(() => {
|
|
13
|
+
const trackWidth = resolveTokenPx(`--helix-switch-width-${size}`);
|
|
14
|
+
const thumbWidth = resolveTokenPx(`--helix-switch-thumb-size-${size}`);
|
|
15
|
+
// Resting position is `left: 2px`; the checked position is `trackWidth - thumbWidth - 2px` from the
|
|
16
|
+
// track's left edge, so the extra slide distance on top of that 2px base is trackWidth-thumbWidth-4.
|
|
17
|
+
setX(trackWidth - thumbWidth - 4);
|
|
18
|
+
}, [size]);
|
|
19
|
+
return x;
|
|
20
|
+
}
|
|
21
|
+
export function Switch({ label, hideLabel = false, description, checked, defaultChecked = false, onChange, disabled = false, size = 'm', id: idProp, name, }) {
|
|
22
|
+
const uid = `helix-switch-${++idCounter}`;
|
|
23
|
+
const id = idProp ?? uid;
|
|
24
|
+
const descId = description ? `${id}-desc` : undefined;
|
|
25
|
+
const offset = useThumbOffset(size);
|
|
26
|
+
// True uncontrolled state — without this, a Switch used with only `defaultChecked` (no `checked` +
|
|
27
|
+
// `onChange` wired back by the consumer) never visually toggles.
|
|
28
|
+
const [uncontrolledChecked, setUncontrolledChecked] = React.useState(defaultChecked);
|
|
29
|
+
const isControlled = checked !== undefined;
|
|
30
|
+
const isChecked = isControlled ? checked : uncontrolledChecked;
|
|
31
|
+
const handleToggle = () => {
|
|
32
|
+
const next = !isChecked;
|
|
33
|
+
if (!isControlled)
|
|
34
|
+
setUncontrolledChecked(next);
|
|
35
|
+
onChange?.(next);
|
|
36
|
+
};
|
|
37
|
+
return (_jsxs("div", { "data-helix-part": "switch-root", "data-size": size, ...(disabled ? { 'data-disabled': '' } : {}), children: [_jsxs("div", { "data-helix-part": "switch-row", children: [_jsx("input", { type: "checkbox", id: `${id}-native`, name: name, checked: isChecked, disabled: disabled, style: { position: 'absolute', width: 1, height: 1, overflow: 'hidden', clip: 'rect(0,0,0,0)' }, onChange: () => { }, "aria-hidden": "true", tabIndex: -1 }), _jsx("button", { id: id, type: "button", role: "switch", "data-helix-part": "switch-track", "data-size": size, "aria-checked": isChecked, "aria-describedby": descId, disabled: disabled, onClick: handleToggle, children: _jsx(MotionConfig, { reducedMotion: "user", children: _jsx(motion.span, { "data-helix-part": "switch-thumb", "aria-hidden": "true", style: { position: 'absolute', top: 2, left: 2 }, animate: { x: isChecked ? offset : 0 },
|
|
38
|
+
// `type` here is Motion's own Transition.type key ('spring'), not a Helix prop —
|
|
39
|
+
// verify:props flags it as a false positive against prop-map.md's `variant` mapping.
|
|
40
|
+
// Shared with NavItem's indicator via ../../lib/motionPresets — both are "a small
|
|
41
|
+
// element snapping to its new resting position" and are meant to feel identical.
|
|
42
|
+
transition: SPRING_SNAPPY }) }) }), _jsx("label", { "data-helix-part": "switch-label", htmlFor: id, style: hideLabel ? { position: 'absolute', width: 1, height: 1, overflow: 'hidden', clip: 'rect(0,0,0,0)' } : undefined, children: label })] }), description && (_jsx("span", { id: descId, "data-helix-part": "switch-description", children: description }))] }));
|
|
43
|
+
}
|
|
44
|
+
Switch.displayName = 'Switch';
|
|
45
|
+
//# sourceMappingURL=Switch.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Switch, read its contract: node_modules/@helixds/react/dist/contracts/Switch.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
export type SwitchSize = 's' | 'm';
|
|
8
|
+
export interface SwitchProps {
|
|
9
|
+
label: string;
|
|
10
|
+
/** Hides the label visually while keeping it announced by screen readers. Default: false */
|
|
11
|
+
hideLabel?: boolean;
|
|
12
|
+
description?: string;
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
defaultChecked?: boolean;
|
|
15
|
+
onChange?: (checked: boolean) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
size?: SwitchSize;
|
|
18
|
+
id?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=Switch.types.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Switch, read its contract: node_modules/@helixds/react/dist/contracts/Switch.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
export { Switch } from './Switch.js';
|
|
8
|
+
export type { SwitchProps, SwitchSize } from './Switch.types.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Table, read its contract: node_modules/@helixds/react/dist/contracts/Table.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import type { TableProps, TableSectionProps, TableRowProps, TableHeaderCellProps, TableCellProps } from './Table.types.js';
|
|
9
|
+
declare const Table: {
|
|
10
|
+
({ children, className }: TableProps): React.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const TableHead: {
|
|
14
|
+
({ children, className }: TableSectionProps): React.JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
declare const TableBody: {
|
|
18
|
+
({ children, className }: TableSectionProps): React.JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
declare const TableRow: {
|
|
22
|
+
({ children, className }: TableRowProps): React.JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
declare const TableHeaderCell: {
|
|
26
|
+
({ children, className }: TableHeaderCellProps): React.JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
declare const TableCell: {
|
|
30
|
+
({ children, className }: TableCellProps): React.JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
export { Table, TableHead, TableBody, TableRow, TableHeaderCell, TableCell };
|
|
34
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export const doc = {
|
|
2
|
+
name: 'Table',
|
|
3
|
+
purpose: 'Displays tabular data edge-to-edge — rows and columns of related records.',
|
|
4
|
+
contract: 'contracts/components/Table.json',
|
|
5
|
+
a11y: [
|
|
6
|
+
'Uses real <table>/<thead>/<tbody>/<tr>/<th>/<td> elements — full table semantics for free, nothing hand-rolled.',
|
|
7
|
+
'Row hover is CSS-only (:hover) — never a JS mouseenter/mouseleave handler mutating inline styles.',
|
|
8
|
+
],
|
|
9
|
+
variants: [],
|
|
10
|
+
sizes: [],
|
|
11
|
+
tokens: [
|
|
12
|
+
{ part: 'table-header-cell', label: 'fontSize', token: '--helix-table-header-fontSize', kind: 'typography', meta: 'Caption / Semibold' },
|
|
13
|
+
{ part: 'table-header-cell', label: 'fontWeight', token: '--helix-table-header-fontWeight', kind: 'typography', meta: 'Caption / Semibold' },
|
|
14
|
+
{ part: 'table-header-cell', label: 'color', token: '--helix-table-header-color', kind: 'color' },
|
|
15
|
+
{ part: 'table-header-cell', label: 'border-bottom', token: '--helix-table-header-border', kind: 'color' },
|
|
16
|
+
{ part: 'table-row', label: 'border-bottom', token: '--helix-table-row-border', kind: 'color' },
|
|
17
|
+
{ part: 'table-row', label: 'hover fill', token: '--helix-table-row-hoverFill', kind: 'color', state: 'hover' },
|
|
18
|
+
{ part: 'table-cell', label: 'fontSize', token: '--helix-table-cell-fontSize', kind: 'typography', meta: 'Body / s / Regular' },
|
|
19
|
+
{ part: 'table-cell', label: 'fontWeight', token: '--helix-table-cell-fontWeight', kind: 'typography', meta: 'Body / s / Regular' },
|
|
20
|
+
{ part: 'table-cell', label: 'color', token: '--helix-table-cell-color', kind: 'color' },
|
|
21
|
+
],
|
|
22
|
+
features: [
|
|
23
|
+
'Table / TableHead / TableBody / TableRow / TableHeaderCell / TableCell — one wrapper per native table element',
|
|
24
|
+
'Cell content is fully consumer-controlled — a TableCell can hold text, Avatar, Badge, Button, anything',
|
|
25
|
+
'v1 scope: rendering only, no built-in sorting or pagination',
|
|
26
|
+
'Drag-to-reorder rows is NOT a Table prop — a consumer can compose real rows with Motion\'s Reorder.Group/Reorder.Item (as="tbody"/as="tr") for that. Try it live in the "DragReorder" story on this page, or see it in context in Storybook\'s Team Dashboard page. Storybook-only pattern today, not part of this contract — see .ai/maps/patterns/motion-effects.md.',
|
|
27
|
+
],
|
|
28
|
+
examples: [
|
|
29
|
+
{
|
|
30
|
+
label: 'Basic table',
|
|
31
|
+
code: `<Table>
|
|
32
|
+
<TableHead>
|
|
33
|
+
<TableRow>
|
|
34
|
+
<TableHeaderCell>Name</TableHeaderCell>
|
|
35
|
+
<TableHeaderCell>Status</TableHeaderCell>
|
|
36
|
+
</TableRow>
|
|
37
|
+
</TableHead>
|
|
38
|
+
<TableBody>
|
|
39
|
+
<TableRow>
|
|
40
|
+
<TableCell>Ana García</TableCell>
|
|
41
|
+
<TableCell><Badge variant="success" label="Active" /></TableCell>
|
|
42
|
+
</TableRow>
|
|
43
|
+
</TableBody>
|
|
44
|
+
</Table>`,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=Table.doc.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
const Table = ({ children, className }) => (_jsx("table", { "data-helix-part": "table", className: cn(className), children: children }));
|
|
5
|
+
Table.displayName = 'Table';
|
|
6
|
+
const TableHead = ({ children, className }) => (_jsx("thead", { "data-helix-part": "table-head", className: cn(className), children: children }));
|
|
7
|
+
TableHead.displayName = 'TableHead';
|
|
8
|
+
const TableBody = ({ children, className }) => (_jsx("tbody", { "data-helix-part": "table-body", className: cn(className), children: children }));
|
|
9
|
+
TableBody.displayName = 'TableBody';
|
|
10
|
+
const TableRow = ({ children, className }) => (_jsx("tr", { "data-helix-part": "table-row", className: cn(className), children: children }));
|
|
11
|
+
TableRow.displayName = 'TableRow';
|
|
12
|
+
const TableHeaderCell = ({ children, className }) => (_jsx("th", { "data-helix-part": "table-header-cell", className: cn(className), children: children }));
|
|
13
|
+
TableHeaderCell.displayName = 'TableHeaderCell';
|
|
14
|
+
const TableCell = ({ children, className }) => (_jsx("td", { "data-helix-part": "table-cell", className: cn(className), children: children }));
|
|
15
|
+
TableCell.displayName = 'TableCell';
|
|
16
|
+
export { Table, TableHead, TableBody, TableRow, TableHeaderCell, TableCell };
|
|
17
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Table, read its contract: node_modules/@helixds/react/dist/contracts/Table.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
import type * as React from 'react';
|
|
8
|
+
export interface TableProps {
|
|
9
|
+
/** Table content — typically a TableHead and a TableBody. */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/** Additional className for the root <table>. */
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TableSectionProps {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface TableRowProps {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface TableHeaderCellProps {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TableCellProps {
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=Table.types.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Table, read its contract: node_modules/@helixds/react/dist/contracts/Table.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
export { Table, TableHead, TableBody, TableRow, TableHeaderCell, TableCell } from './Table.js';
|
|
8
|
+
export type { TableProps, TableSectionProps, TableRowProps, TableHeaderCellProps, TableCellProps, } from './Table.types.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Textarea, read its contract: node_modules/@helixds/react/dist/contracts/Textarea.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
import type { TextareaProps } from './Textarea.types.js';
|
|
8
|
+
export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
9
|
+
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export const doc = {
|
|
2
|
+
name: 'Textarea',
|
|
3
|
+
purpose: 'Lets users enter multi-line free-form text.',
|
|
4
|
+
contract: 'contracts/components/Textarea.json',
|
|
5
|
+
a11y: [
|
|
6
|
+
'The `label` prop is required. Use `hideLabel` only when a visible label would be redundant.',
|
|
7
|
+
'Pair `invalid` with `errorMessage` and keep the counter meaningful when `showCount` is enabled.',
|
|
8
|
+
],
|
|
9
|
+
variants: [],
|
|
10
|
+
sizes: [],
|
|
11
|
+
tokens: [
|
|
12
|
+
{ part: 'textarea-wrapper', label: 'Default fill', token: '--helix-textarea-fill-default', kind: 'color' },
|
|
13
|
+
{ part: 'textarea-wrapper', label: 'Default border', token: '--helix-textarea-border-default', kind: 'color' },
|
|
14
|
+
{ part: 'textarea-wrapper', label: 'Default border', token: '--helix-textarea-border-hover', kind: 'color', state: 'hover' },
|
|
15
|
+
{ part: 'textarea-wrapper', label: 'Focus border', token: '--helix-textarea-border-focus', kind: 'color' },
|
|
16
|
+
{ part: 'textarea-wrapper', label: 'Disabled fill', token: '--helix-textarea-fill-disabled', kind: 'color', state: 'disabled' },
|
|
17
|
+
{ part: 'textarea-wrapper', label: 'Disabled border', token: '--helix-textarea-border-disabled', kind: 'color', state: 'disabled' },
|
|
18
|
+
{ part: 'textarea-field', label: 'Disabled text', token: '--helix-textarea-text-disabled', kind: 'color', state: 'disabled' },
|
|
19
|
+
{ part: 'textarea-field', label: 'Value text', token: '--helix-textarea-text-value', kind: 'color' },
|
|
20
|
+
{ part: 'textarea-field', label: 'Placeholder text', token: '--helix-textarea-text-placeholder', kind: 'color' },
|
|
21
|
+
{ part: 'textarea-counter', label: 'Counter text', token: '--helix-textarea-text-counter', kind: 'color' },
|
|
22
|
+
{ part: 'textarea-label', label: 'label', token: '--helix-primitive-fontSize-s', kind: 'typography', meta: 'Label' },
|
|
23
|
+
{ part: 'textarea-label', label: 'label.weight', token: '--helix-primitive-fontWeight-medium', kind: 'typography', meta: 'Medium' },
|
|
24
|
+
{ part: 'textarea-field', label: 'value', token: '--helix-primitive-fontSize-s', kind: 'typography', meta: 'Body small' },
|
|
25
|
+
{ part: 'textarea-description', label: 'description', token: '--helix-primitive-fontSize-s', kind: 'typography', meta: 'Body xsmall' },
|
|
26
|
+
{ part: 'textarea-error', label: 'error', token: '--helix-primitive-fontSize-s', kind: 'typography', meta: 'Body xsmall' },
|
|
27
|
+
{ part: 'textarea-root', label: 'gap.label.field', token: '--helix-primitive-spacing-25', kind: 'space', axis: 'vertical' },
|
|
28
|
+
{ part: 'textarea-field', label: 'padding.top', token: '--helix-primitive-spacing-75', kind: 'space', axis: 'vertical' },
|
|
29
|
+
{ part: 'textarea-field', label: 'padding.bottom', token: '--helix-primitive-spacing-75', kind: 'space', axis: 'vertical' },
|
|
30
|
+
{ part: 'textarea-field', label: 'padding.start', token: '--helix-primitive-spacing-75', kind: 'space', axis: 'horizontal' },
|
|
31
|
+
{ part: 'textarea-field', label: 'padding.end', token: '--helix-primitive-spacing-75', kind: 'space', axis: 'horizontal' },
|
|
32
|
+
{ part: 'textarea-wrapper', label: 'textarea.root', token: '--helix-textarea-radius', kind: 'radius' },
|
|
33
|
+
{ part: 'textarea-field', label: 'min-height', token: '--helix-textarea-height', kind: 'space', meta: 'Floor height (32px, semantic.size.m) — not a per-size ladder; visible height above it is rows-driven' },
|
|
34
|
+
{ part: 'textarea-root', label: 'display', value: 'flex' },
|
|
35
|
+
{ part: 'textarea-root', label: 'flex-direction', value: 'column' },
|
|
36
|
+
{ part: 'textarea-root', label: 'width', value: 'fit-content' },
|
|
37
|
+
{ part: 'textarea-field', label: 'background', value: 'transparent' },
|
|
38
|
+
{ part: 'textarea-field', label: 'border', value: 'none' },
|
|
39
|
+
{ part: 'textarea-field', label: 'outline', value: 'none' },
|
|
40
|
+
{ part: 'textarea-field', label: 'font-family', value: 'inherit' },
|
|
41
|
+
{ part: 'textarea-field', label: 'resize', value: 'vertical' },
|
|
42
|
+
{ part: 'textarea-field', label: 'resize.none', value: 'none' },
|
|
43
|
+
{ part: 'textarea-field', label: 'resize.horizontal', value: 'horizontal' },
|
|
44
|
+
{ part: 'textarea-field', label: 'resize.both', value: 'both' },
|
|
45
|
+
{ part: 'textarea-field', label: 'cursor.disabled', value: 'not-allowed' },
|
|
46
|
+
],
|
|
47
|
+
features: [
|
|
48
|
+
'label / hideLabel — accessible label support',
|
|
49
|
+
'one size only (the field scale\'s m, owner\'s decision 2026-10-20 — like Select and MultiSelect); min-height is a single 32px floor (--helix-textarea-height), visible height is rows-driven',
|
|
50
|
+
'rows — controls visible height',
|
|
51
|
+
'showCount + maxLength — live character counter',
|
|
52
|
+
'resize — native resize behavior',
|
|
53
|
+
],
|
|
54
|
+
examples: [
|
|
55
|
+
{ label: 'Default', code: `<Textarea label="Notes" />` },
|
|
56
|
+
{ label: 'With counter', code: `<Textarea label="Bio" maxLength={160} showCount />` },
|
|
57
|
+
{ label: 'Invalid', code: `<Textarea label="Feedback" invalid errorMessage="Please add more detail" />` },
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=Textarea.doc.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useId, useRef, useState } from 'react';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
let idCounter = 0;
|
|
5
|
+
export const Textarea = forwardRef(({ label, description, errorMessage, invalid = false, required = false, fullWidth = false, hideLabel = false, rows = 4, maxLength, resize = 'vertical', showCount = false, disabled, onChange, onKeyDown, className, ...rest }, ref) => {
|
|
6
|
+
const uid = `helix-textarea-${++idCounter}`;
|
|
7
|
+
const id = rest.id ?? uid;
|
|
8
|
+
const descId = description && !invalid ? `${id}-desc` : undefined;
|
|
9
|
+
const errId = invalid && errorMessage ? `${id}-err` : undefined;
|
|
10
|
+
const describedby = [descId, errId].filter(Boolean).join(' ') || undefined;
|
|
11
|
+
const [count, setCount] = useState(typeof rest.defaultValue === 'string' ? rest.defaultValue.length : 0);
|
|
12
|
+
function handleChange(e) {
|
|
13
|
+
setCount(e.target.value.length);
|
|
14
|
+
onChange?.(e);
|
|
15
|
+
}
|
|
16
|
+
return (_jsxs("div", { "data-helix-part": "textarea-root", ...(fullWidth ? { 'data-full-width': '' } : {}), ...(disabled ? { 'data-disabled': '' } : {}), ...(invalid ? { 'data-invalid': '' } : {}), className: cn(className), children: [_jsxs("label", { "data-helix-part": "textarea-label", htmlFor: id, style: hideLabel ? { position: 'absolute', width: 1, height: 1, overflow: 'hidden', clip: 'rect(0,0,0,0)' } : undefined, children: [label, required && _jsx("span", { "data-helix-part": "textarea-required", "aria-hidden": "true", children: " *" })] }), _jsxs("div", { "data-helix-part": "textarea-wrapper", ...(disabled ? { 'data-disabled': '' } : {}), ...(invalid ? { 'data-invalid': '' } : {}), children: [_jsx("textarea", { ref: ref, id: id, "data-helix-part": "textarea-field", "data-resize": resize, rows: rows, maxLength: maxLength, disabled: disabled, required: required, "aria-invalid": invalid || undefined, "aria-describedby": describedby, "aria-required": required || undefined, onChange: handleChange, ...rest, onKeyDown: e => {
|
|
17
|
+
onKeyDown?.(e);
|
|
18
|
+
// Contract a11y.keyboardNav: Escape blurs the field (unless the consumer handled it).
|
|
19
|
+
if (e.key === 'Escape' && !e.defaultPrevented)
|
|
20
|
+
e.currentTarget.blur();
|
|
21
|
+
} }), showCount && maxLength && (_jsxs("span", { "data-helix-part": "textarea-counter", "aria-live": "polite", children: [count, "/", maxLength] }))] }), description && !invalid && (_jsx("span", { id: descId, "data-helix-part": "textarea-description", children: description })), invalid && errorMessage && (_jsx("span", { id: errId, "data-helix-part": "textarea-error", role: "alert", children: errorMessage }))] }));
|
|
22
|
+
});
|
|
23
|
+
Textarea.displayName = 'Textarea';
|
|
24
|
+
//# sourceMappingURL=Textarea.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Textarea, read its contract: node_modules/@helixds/react/dist/contracts/Textarea.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
import type { TextareaHTMLAttributes } from 'react';
|
|
8
|
+
export type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
9
|
+
export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
|
|
10
|
+
label: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
invalid?: boolean;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
hideLabel?: boolean;
|
|
17
|
+
rows?: number;
|
|
18
|
+
maxLength?: number;
|
|
19
|
+
resize?: TextareaResize;
|
|
20
|
+
showCount?: boolean;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=Textarea.types.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Textarea, read its contract: node_modules/@helixds/react/dist/contracts/Textarea.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
export { Textarea } from './Textarea.js';
|
|
8
|
+
export type { TextareaProps, TextareaResize } from './Textarea.types.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @helixds/react — agent note
|
|
3
|
+
* Before using Toast, read its contract: node_modules/@helixds/react/dist/contracts/Toast.json
|
|
4
|
+
* (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
|
|
5
|
+
* Guide: node_modules/@helixds/react/AGENTS.md
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import type { ToastProps } from './Toast.types.js';
|
|
9
|
+
export { toast } from './toastStore.js';
|
|
10
|
+
export type { ToastVariant, ToastRecord, ToastOptions } from './toastStore.js';
|
|
11
|
+
declare const Toast: {
|
|
12
|
+
({ className }: ToastProps): React.ReactPortal | null;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export { Toast };
|
|
16
|
+
//# sourceMappingURL=Toast.d.ts.map
|