@hirobius/design-system 0.19.1 → 0.21.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 +123 -0
- package/CONSUMING.md +11 -6
- package/DESIGN.md +34 -21
- package/NOTICE.md +1 -1
- package/README.md +48 -13
- package/codemods/hds-prefix.mjs +231 -0
- package/codemods/jsx-fold.mjs +515 -0
- package/codemods/not-found-pattern.mjs +71 -0
- package/codemods/patterns-subpath.mjs +242 -81
- package/codemods/patterns-subpath.names.json +41 -15
- package/codemods/removed-0.20.json +194 -0
- package/codemods/tile-grid.mjs +283 -0
- package/codemods/unrewritable.mjs +291 -0
- package/dist/chunks/DemoStateContext-Cz5TmrYu.js +32 -0
- package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
- package/dist/chunks/form-By82qZcC.js +66 -0
- package/dist/contexts.js +157 -78
- package/dist/fonts/geist-mono-400.woff2 +0 -0
- package/dist/fonts/satoshi-400.woff2 +0 -0
- package/dist/fonts/satoshi-500.woff2 +0 -0
- package/dist/fonts/satoshi-700.woff2 +0 -0
- package/dist/fonts.css +53 -0
- package/dist/form.js +1 -1
- package/dist/hirobius-ui.js +1600 -5354
- package/dist/manifest.js +12 -13
- package/dist/patterns.js +796 -510
- package/dist/styles.css +2 -2
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +165 -65
- package/dist/types/src/app/components/alert-dialog.d.ts +5 -0
- package/dist/types/src/app/components/asset-img.d.ts +1 -0
- package/dist/types/src/app/components/avatar-group.d.ts +2 -2
- package/dist/types/src/app/components/badge.d.ts +8 -3
- package/dist/types/src/app/components/blockquote.d.ts +2 -2
- package/dist/types/src/app/components/box-sx.d.ts +110 -13
- package/dist/types/src/app/components/box.d.ts +6 -3
- package/dist/types/src/app/components/breadcrumb.d.ts +0 -5
- package/dist/types/src/app/components/button.d.ts +35 -4
- package/dist/types/src/app/components/card.d.ts +10 -10
- package/dist/types/src/app/components/combobox.d.ts +47 -11
- package/dist/types/src/app/components/container.d.ts +2 -2
- package/dist/types/src/app/components/data-table-section.d.ts +2 -1
- package/dist/types/src/app/components/destructive-section.d.ts +1 -0
- package/dist/types/src/app/components/dialog.d.ts +8 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -5
- package/dist/types/src/app/components/error-pattern.d.ts +6 -1
- package/dist/types/src/app/components/field.d.ts +1 -2
- package/dist/types/src/app/components/form-actions.d.ts +1 -0
- package/dist/types/src/app/components/form-control.d.ts +10 -0
- package/dist/types/src/app/components/grid.d.ts +15 -6
- package/dist/types/src/app/components/hds-tooltip.d.ts +12 -2
- package/dist/types/src/app/components/icon.d.ts +1 -0
- package/dist/types/src/app/components/inline-code.d.ts +1 -2
- package/dist/types/src/app/components/input.d.ts +8 -5
- package/dist/types/src/app/components/kbd.d.ts +2 -2
- package/dist/types/src/app/components/metadata-list.d.ts +2 -2
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
- package/dist/types/src/app/components/page-header.d.ts +0 -2
- package/dist/types/src/app/components/popover.d.ts +8 -0
- package/dist/types/src/app/components/progress.d.ts +33 -6
- package/dist/types/src/app/components/segmented-control.d.ts +2 -26
- package/dist/types/src/app/components/select.d.ts +10 -1
- package/dist/types/src/app/components/skeleton.d.ts +3 -4
- package/dist/types/src/app/components/spinner.d.ts +1 -2
- package/dist/types/src/app/components/stack.d.ts +4 -1
- package/dist/types/src/app/components/stat.d.ts +5 -5
- package/dist/types/src/app/components/status-list-item.d.ts +1 -2
- package/dist/types/src/app/components/status-tile.d.ts +3 -2
- package/dist/types/src/app/components/surface.d.ts +2 -3
- package/dist/types/src/app/components/switcher.d.ts +1 -1
- package/dist/types/src/app/components/table.d.ts +6 -15
- package/dist/types/src/app/components/tag.d.ts +0 -6
- package/dist/types/src/app/components/text.d.ts +54 -8
- package/dist/types/src/app/components/textarea.d.ts +1 -2
- package/dist/types/src/app/components/timestamp.d.ts +1 -0
- package/dist/types/src/app/components/toast.d.ts +1 -2
- package/dist/types/src/app/components/tooltip.d.ts +1 -1
- package/dist/types/src/app/context/DemoStateContext.d.ts +1 -1
- package/dist/types/src/app/context/RouterContext.d.ts +5 -5
- package/dist/types/src/app/data/manifest-types.d.ts +10 -5
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +45 -28
- package/dist/types/src/app/design-system/generated-token-values.d.ts +4 -0
- package/dist/types/src/app/design-system/tokens.d.ts +139 -18
- package/dist/types/src/icons.d.ts +1 -1
- package/dist/types/src/index.d.ts +76 -164
- package/dist/types/src/patterns.d.ts +20 -25
- package/dist/variables.css +47 -33
- package/docs/CONSUMING.md +80 -48
- package/hirobius.tokens.json +125 -88
- package/llms.txt +166 -59
- package/mcp/catalog.mjs +366 -0
- package/mcp/guide.mjs +315 -0
- package/mcp/hds-mcp.mjs +49 -0
- package/mcp/server.mjs +94 -0
- package/package.json +48 -27
- package/public/hds-manifest.json +2667 -6705
- package/public/llms/components.txt +45 -426
- package/public/llms/layout.txt +5 -5
- package/public/llms-full.txt +245 -506
- package/public/llms.txt +166 -59
- package/scripts/eslint-plugin-hds/index.d.mts +29 -0
- package/scripts/eslint-plugin-hds/index.mjs +55 -0
- package/scripts/eslint-plugin-hds/package.json +30 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-controls.mjs +47 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-hex.mjs +70 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-px-spacing.mjs +125 -0
- package/scripts/eslint-plugin-hds/rules/prefer-hds-layout-primitive.mjs +54 -0
- package/scripts/eslint-plugin-hds/rules/sx-token-first.mjs +111 -0
- package/scripts/eslint-plugin-hds/rules/utils.mjs +66 -0
- package/src/app/data/component-api.json +1082 -2913
- package/dist/chunks/LanguageContext-BxdCwiFg.js +0 -95
- package/dist/chunks/TokenDisplayContext-DKYJMVWk.js +0 -26
- package/dist/chunks/activity-feed-BGQ6v3wc.js +0 -22040
- package/dist/chunks/form-COP3vK9_.js +0 -66
- package/dist/types/src/app/components/activity-feed.d.ts +0 -73
- package/dist/types/src/app/components/app-shell.d.ts +0 -40
- package/dist/types/src/app/components/aspect-ratio.d.ts +0 -25
- package/dist/types/src/app/components/bleed.d.ts +0 -39
- package/dist/types/src/app/components/button-group.d.ts +0 -22
- package/dist/types/src/app/components/calendar.d.ts +0 -22
- package/dist/types/src/app/components/carousel.d.ts +0 -26
- package/dist/types/src/app/components/center.d.ts +0 -36
- package/dist/types/src/app/components/cinematic-link.d.ts +0 -18
- package/dist/types/src/app/components/circular-progress.d.ts +0 -28
- package/dist/types/src/app/components/cluster.d.ts +0 -39
- package/dist/types/src/app/components/command-palette.d.ts +0 -46
- package/dist/types/src/app/components/component-instance-matrix.d.ts +0 -27
- package/dist/types/src/app/components/context-menu.d.ts +0 -78
- package/dist/types/src/app/components/cover.d.ts +0 -43
- package/dist/types/src/app/components/date-input.d.ts +0 -31
- package/dist/types/src/app/components/date-range-input.d.ts +0 -34
- package/dist/types/src/app/components/date-time-input.d.ts +0 -30
- package/dist/types/src/app/components/doc-link-card.d.ts +0 -32
- package/dist/types/src/app/components/error-boundary.d.ts +0 -25
- package/dist/types/src/app/components/file-input.d.ts +0 -30
- package/dist/types/src/app/components/foundation-swatch.d.ts +0 -45
- package/dist/types/src/app/components/frame.d.ts +0 -38
- package/dist/types/src/app/components/heading-stack.d.ts +0 -52
- package/dist/types/src/app/components/history-card.d.ts +0 -12
- package/dist/types/src/app/components/hover-card.d.ts +0 -46
- package/dist/types/src/app/components/icon-button.d.ts +0 -22
- package/dist/types/src/app/components/image-lightbox.d.ts +0 -14
- package/dist/types/src/app/components/input-group.d.ts +0 -23
- package/dist/types/src/app/components/multi-selector.d.ts +0 -40
- package/dist/types/src/app/components/nav-group.d.ts +0 -29
- package/dist/types/src/app/components/nav-item.d.ts +0 -33
- package/dist/types/src/app/components/not-found-pattern.d.ts +0 -1
- package/dist/types/src/app/components/overflow-list.d.ts +0 -21
- package/dist/types/src/app/components/selectable-card.d.ts +0 -29
- package/dist/types/src/app/components/side-nav.d.ts +0 -23
- package/dist/types/src/app/components/sketch.d.ts +0 -19
- package/dist/types/src/app/components/stacked-card-rail.d.ts +0 -32
- package/dist/types/src/app/components/status-dot.d.ts +0 -25
- package/dist/types/src/app/components/stepper-field.d.ts +0 -12
- package/dist/types/src/app/components/stepper.d.ts +0 -33
- package/dist/types/src/app/components/text-lockup.d.ts +0 -38
- package/dist/types/src/app/components/tile-grid.d.ts +0 -17
- package/dist/types/src/app/components/time-input.d.ts +0 -24
- package/dist/types/src/app/components/toggle-button.d.ts +0 -32
- package/dist/types/src/app/components/token.d.ts +0 -90
- package/dist/types/src/app/components/tokenUtils.d.ts +0 -38
- package/dist/types/src/app/components/tokenizer.d.ts +0 -24
- package/dist/types/src/app/components/toolbar.d.ts +0 -36
- package/dist/types/src/app/components/top-nav.d.ts +0 -23
- package/dist/types/src/app/components/tree-list.d.ts +0 -30
- package/dist/types/src/app/data/nav-model.d.ts +0 -39
- package/dist/types/src/app/hooks/useFocusVisible.d.ts +0 -9
- package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +0 -20
- package/dist/types/src/app/layouts/DocLayout.d.ts +0 -14
- package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +0 -6
- package/dist/types/src/app/layouts/HdsDocsShell.d.ts +0 -72
- package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +0 -14
- package/dist/types/src/app/lib/hds-search.d.ts +0 -45
- package/dist/types/src/app/lib/nav-active.d.ts +0 -16
- package/dist/types/src/app/lib/navLevels.d.ts +0 -4
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* zone (right-aligned, holds <Badge> / <Tag> for status, never raw spans).
|
|
23
23
|
* - Progress: full-width 4px bar in a reserved 16px vertical rail. Owns its
|
|
24
24
|
* spacing — never crowds adjacent prose.
|
|
25
|
-
* - Metric: single label
|
|
25
|
+
* - Metric: single label + big value (title) + optional sub-line.
|
|
26
26
|
* Reserved vertical block. Use multiple side-by-side via flex/grid container.
|
|
27
27
|
* - Body: prose, lists, structured content. NO inline status, progress, or
|
|
28
28
|
* thin colored bars. Group sections via separate <Card.Body> blocks.
|
|
@@ -51,11 +51,6 @@ type GapOption = 'tight' | 'normal' | 'inset' | 'spacious' | keyof typeof hds.sp
|
|
|
51
51
|
export type CardVariant = 'default' | 'accent';
|
|
52
52
|
/** @public */
|
|
53
53
|
export type CardTone = 'neutral' | 'danger' | 'success' | 'warning' | 'info';
|
|
54
|
-
declare const cardVariants: (props?: ({
|
|
55
|
-
variant?: "default" | "accent" | null | undefined;
|
|
56
|
-
tone?: "success" | "danger" | "warning" | "info" | "neutral" | null | undefined;
|
|
57
|
-
bordered?: boolean | null | undefined;
|
|
58
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
59
54
|
/** @public */
|
|
60
55
|
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
61
56
|
/** Render-as element for the root wrapper. */
|
|
@@ -79,6 +74,12 @@ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
79
74
|
* legibility. Default false — repeated cards in grids should stay
|
|
80
75
|
* borderless and rely on whitespace, rails, or section dividers. */
|
|
81
76
|
bordered?: boolean;
|
|
77
|
+
/** Make the card one checkbox-like option (role="checkbox"): click or Space toggles it, Enter does not. A click on a control inside it is left to that control. */
|
|
78
|
+
selectable?: boolean;
|
|
79
|
+
/** Whether a selectable card is selected. Controlled: pair with onSelectedChange. */
|
|
80
|
+
selected?: boolean;
|
|
81
|
+
/** Called with the next selected state when a selectable card is toggled. */
|
|
82
|
+
onSelectedChange?: (selected: boolean) => void;
|
|
82
83
|
}
|
|
83
84
|
interface CardComponent extends React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> {
|
|
84
85
|
Header: typeof CardHeader;
|
|
@@ -129,21 +130,20 @@ export interface CardMetricProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
129
130
|
tone?: CardTone;
|
|
130
131
|
}
|
|
131
132
|
/**
|
|
132
|
-
* Card.Metric — one
|
|
133
|
+
* Card.Metric — one label, a large value and an optional sub-line inside a Card.
|
|
133
134
|
* @usage Show one headline figure (a KPI, a count, a total) with its label inside a Card.
|
|
134
135
|
* @whenNot A metric outside a Card, or several figures that share one label.
|
|
136
|
+
* @useInstead MetricTiles a row of headline numbers with no enclosing Card
|
|
135
137
|
*/
|
|
136
138
|
declare const CardMetric: React.ForwardRefExoticComponent<CardMetricProps & React.RefAttributes<HTMLDivElement>>;
|
|
137
139
|
/**
|
|
138
140
|
* Tagged per-export, not on the file block: this module exports eight
|
|
139
141
|
* components and a file-level @figma would hand all eight this one node.
|
|
140
142
|
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=39-11
|
|
141
|
-
* @usage Group related content on a raised surface with header, body, footer and metric slots.
|
|
143
|
+
* @usage Group related content on a raised surface with header, body, footer and metric slots, or as one selectable option.
|
|
142
144
|
* @whenNot A bare padded background with no slot anatomy, or a single headline figure.
|
|
143
145
|
* @useInstead Surface a padded background without slot anatomy
|
|
144
146
|
* @useInstead Card.Metric a single headline figure
|
|
145
147
|
*/
|
|
146
148
|
export declare const Card: CardComponent;
|
|
147
149
|
export { CardHeader, CardTitle, CardDescription, CardBody, CardFooter, CardProgress, CardMetric };
|
|
148
|
-
/** @internal — CVA variant helper; compose via Card props instead. */
|
|
149
|
-
export { cardVariants };
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Combobox — searchable single-select (Popover + filtered listbox).
|
|
2
|
+
* Combobox — searchable single- or multi-select (Popover + filtered listbox).
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier pattern
|
|
5
|
-
* @usage Pick one value from a long list of options, with a search field that filters as you type.
|
|
5
|
+
* @usage Pick one value, or several with `multiple`, from a long list of options, with a search field that filters as you type.
|
|
6
6
|
* @whenNot A short list that needs no search, or an action list.
|
|
7
7
|
* @useInstead Select a short list without search
|
|
8
8
|
* @useInstead Menu firing actions from a trigger
|
|
9
9
|
* @keyboard Enter/Space Opens the list from the trigger and moves focus to the search field.
|
|
10
10
|
* @keyboard ArrowDown/ArrowUp Moves the active option and wraps at the ends.
|
|
11
11
|
* @keyboard Character Filters the options to those matching the typed text.
|
|
12
|
-
* @keyboard Enter Commits the active option and closes the list.
|
|
12
|
+
* @keyboard Enter Commits the active option and closes the list; with `multiple`, toggles it and keeps the list open.
|
|
13
13
|
* @keyboard Escape Closes the list.
|
|
14
14
|
* @keyboard Tab Stays inside the open list.
|
|
15
15
|
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-237
|
|
16
16
|
* @doc-exempt: no Inputs-overlay doc page yet — add demo when created
|
|
17
17
|
*
|
|
18
18
|
* A select-with-search built on the HDS Popover. The trigger shows the current
|
|
19
|
-
* selection
|
|
19
|
+
* selection (with `multiple`, a count and a removable chip per value); opening
|
|
20
|
+
* reveals a search field that filters the option list.
|
|
20
21
|
* Full keyboard support (↑/↓ to move, Enter to choose, Esc/outside-click to
|
|
21
22
|
* close) and listbox/option ARIA. Controlled via `value` + `onChange`.
|
|
22
23
|
*
|
|
@@ -34,14 +35,10 @@ export interface ComboboxOption {
|
|
|
34
35
|
label: string;
|
|
35
36
|
disabled?: boolean;
|
|
36
37
|
}
|
|
37
|
-
/**
|
|
38
|
-
|
|
38
|
+
/** Props both arms share; consumers name an arm or `ComboboxAnyProps`. */
|
|
39
|
+
interface ComboboxBaseProps {
|
|
39
40
|
/** Selectable options. */
|
|
40
41
|
options: ComboboxOption[];
|
|
41
|
-
/** Currently selected value, or null when nothing is chosen. */
|
|
42
|
-
value: string | null;
|
|
43
|
-
/** Fired with the chosen option's value. */
|
|
44
|
-
onChange: (value: string) => void;
|
|
45
42
|
/** Trigger text when nothing is selected. */
|
|
46
43
|
placeholder?: string;
|
|
47
44
|
/** Placeholder for the search field. */
|
|
@@ -50,8 +47,47 @@ export interface ComboboxProps {
|
|
|
50
47
|
emptyMessage?: string;
|
|
51
48
|
/** Accessible label for the trigger (when not labelled by a <Field>). */
|
|
52
49
|
'aria-label'?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Id of the trigger, so a `<label for>` names it. `FormField` sets it, with
|
|
52
|
+
* `aria-describedby` and `aria-invalid`.
|
|
53
|
+
*/
|
|
54
|
+
id?: string;
|
|
55
|
+
/** Ids of the elements that describe the trigger (helper text, error). */
|
|
56
|
+
'aria-describedby'?: string;
|
|
57
|
+
/** Marks the trigger invalid, for example while the field shows an error. */
|
|
58
|
+
'aria-invalid'?: boolean;
|
|
53
59
|
className?: string;
|
|
54
60
|
disabled?: boolean;
|
|
55
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Single-select: one value, or none.
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export interface ComboboxProps extends ComboboxBaseProps {
|
|
67
|
+
/** Leave unset (or false) to pick one value. */
|
|
68
|
+
multiple?: false;
|
|
69
|
+
/** Currently selected value, or null when nothing is chosen. */
|
|
70
|
+
value: string | null;
|
|
71
|
+
/** Fired with the chosen option's value. */
|
|
72
|
+
onChange: (value: string) => void;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Multi-select (`multiple`): any number of values.
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
export interface ComboboxMultipleProps extends ComboboxBaseProps {
|
|
79
|
+
/** Pick any number of values. */
|
|
80
|
+
multiple: true;
|
|
81
|
+
/** Currently selected values, in the order they were picked. */
|
|
82
|
+
value: readonly string[];
|
|
83
|
+
/** Fired with the next selected values whenever one is added or removed. */
|
|
84
|
+
onChange: (value: string[]) => void;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Either arm: single-select `ComboboxProps` or `ComboboxMultipleProps`.
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export type ComboboxAnyProps = ComboboxProps | ComboboxMultipleProps;
|
|
56
91
|
/** @public */
|
|
57
|
-
export declare const Combobox: React.ForwardRefExoticComponent<
|
|
92
|
+
export declare const Combobox: React.ForwardRefExoticComponent<ComboboxAnyProps & React.RefAttributes<HTMLButtonElement>>;
|
|
93
|
+
export {};
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* NOT use the deprecated `padding` prop — it is a no-op; apply padding via
|
|
16
16
|
* Surface or a Stack instead. Do NOT import Container directly inside a page
|
|
17
17
|
* under src/app/pages — use Page, which wraps Container and owns vertical
|
|
18
|
-
* rhythm.
|
|
19
|
-
*
|
|
18
|
+
* rhythm. For a horizontal gutter, which Container does not support, put a
|
|
19
|
+
* Box with `style={{ paddingInline }}` inside it.
|
|
20
20
|
*
|
|
21
21
|
* Centers content horizontally and applies semantic max-width constraints.
|
|
22
22
|
* - maxWidth options: 'content' (760px prose) | 'max' (1200px full layout)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* DataTableSection - a titled table with a toolbar, row actions and an empty state.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components-Copy?node-id=2075-268
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { type TableColumn } from './table.js';
|
|
@@ -12,7 +13,7 @@ export interface DataTableSectionRow {
|
|
|
12
13
|
/** One node per column, in column order. */
|
|
13
14
|
cells: React.ReactNode[];
|
|
14
15
|
/**
|
|
15
|
-
* Row actions (a `Button` group, a `Menu` trigger, `
|
|
16
|
+
* Row actions (a `Button` group, a `Menu` trigger, icon-only `Button`s). Rendered in a
|
|
16
17
|
* trailing column; the pattern bakes in no icon.
|
|
17
18
|
*/
|
|
18
19
|
actions?: React.ReactNode;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* DestructiveSection - the one place a screen puts an irreversible action.
|
|
3
3
|
* @category Actions
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components-Copy?node-id=2076-3
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
/** @public */
|
|
@@ -81,11 +81,18 @@ interface DialogComponent extends React.FC<DialogProps> {
|
|
|
81
81
|
* and a file-level @figma would hand all ten this one node.
|
|
82
82
|
* @usage Interrupt the page with a modal that needs a decision or focused input before people continue.
|
|
83
83
|
* @whenNot A preview on hover, a message that needs no reply, or content that can stay inline.
|
|
84
|
-
* @useInstead
|
|
84
|
+
* @useInstead Tooltip a short hint on hover or focus
|
|
85
85
|
* @useInstead Alert a message that needs no reply
|
|
86
86
|
* @useInstead ToastProvider a brief confirmation
|
|
87
|
+
* @useInstead AlertDialog confirming a destructive or irreversible action
|
|
87
88
|
* @slot trigger The element that opens the dialog (Dialog.Trigger).
|
|
89
|
+
* @slot overlay The scrim that dims the page behind the dialog (Dialog.Overlay).
|
|
88
90
|
* @slot surface The modal surface (Dialog.Content).
|
|
91
|
+
* @slot header Groups the title and description (Dialog.Header).
|
|
92
|
+
* @slot title The heading that names the dialog (Dialog.Title).
|
|
93
|
+
* @slot description Supporting text announced with the title (Dialog.Description).
|
|
94
|
+
* @slot footer The row of actions (Dialog.Footer).
|
|
95
|
+
* @slot close The button that closes the dialog (Dialog.Close, or the X built into Dialog.Content).
|
|
89
96
|
* @keyboard Enter/Space Opens the dialog from the trigger and moves focus inside it.
|
|
90
97
|
* @keyboard Escape Closes the dialog and returns focus to the trigger.
|
|
91
98
|
* @keyboard Tab Cycles focus inside the open dialog.
|
|
@@ -9,9 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import React, { type CSSProperties, type ReactNode } from 'react';
|
|
11
11
|
type DisclosureVariant = 'panel' | 'nav' | 'card';
|
|
12
|
-
declare const disclosureTriggerVariants: (props?: ({
|
|
13
|
-
variant?: "nav" | "panel" | "card" | null | undefined;
|
|
14
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
15
12
|
export type DisclosureProps = {
|
|
16
13
|
/** Summary label rendered in the disclosure trigger. Accepts a string or ReactNode for icon+label combos. */
|
|
17
14
|
label: ReactNode;
|
|
@@ -36,5 +33,4 @@ export type DisclosureProps = {
|
|
|
36
33
|
};
|
|
37
34
|
/** @public */
|
|
38
35
|
export declare const Disclosure: React.ForwardRefExoticComponent<DisclosureProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
-
|
|
40
|
-
export { disclosureTriggerVariants };
|
|
36
|
+
export {};
|
|
@@ -3,8 +3,13 @@ export type ErrorPatternProps = {
|
|
|
3
3
|
displayText?: string;
|
|
4
4
|
/** Supporting message explaining the recovery state to the user. */
|
|
5
5
|
message?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Fill the viewport height and centre the surface in it, for a routed error page.
|
|
8
|
+
* Off by default: the pattern then fits its container and never exceeds it.
|
|
9
|
+
*/
|
|
10
|
+
fullPage?: boolean;
|
|
6
11
|
};
|
|
7
12
|
/**
|
|
8
13
|
* @public
|
|
9
14
|
*/
|
|
10
|
-
export declare function ErrorPattern({ displayText, message, }: ErrorPatternProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function ErrorPattern({ displayText, message, fullPage, }: ErrorPatternProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -24,5 +24,4 @@ export interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
24
24
|
* Caption label paired with a value — used in metadata grids and read-only forms.
|
|
25
25
|
*/
|
|
26
26
|
export declare const Field: React.ForwardRefExoticComponent<FieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
|
|
28
|
-
export { fieldValueVariants };
|
|
27
|
+
export {};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* FormActions - the footer row of a form: primary right-most, secondary to its left.
|
|
3
3
|
* @category Actions
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components-Copy?node-id=2075-87
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
/** @public */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared width contract for text-entry form controls (Input, Textarea, Select,
|
|
3
|
+
* Combobox, Slider): they fill their container up to a maximum, so a field in
|
|
4
|
+
* a wide Surface does not stretch to 1152px (hds#522).
|
|
5
|
+
*
|
|
6
|
+
* The cap is 40rem by default. Override it per tree or per control by setting
|
|
7
|
+
* the `--hds-form-control-max-width` custom property (any CSS length, or
|
|
8
|
+
* `none`), or pass `className="max-w-none"` where the control takes one.
|
|
9
|
+
*/
|
|
10
|
+
export declare const FORM_CONTROL_WIDTH = "w-full max-w-[var(--hds-form-control-max-width,40rem)]";
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
* @useInstead Stack a single row or column
|
|
8
8
|
* @useInstead Box one-off layout that no named primitive covers
|
|
9
9
|
* @ai-intent Solves multi-column layout and repeatable alignment with token-governed gaps, responsive column collapse, and a first-class subgrid escape hatch for nested structure.
|
|
10
|
-
* @ai-rules Use Grid for spatial layout, not for surface styling or content padding. Do NOT apply background, border, or internal padding directly to Grid to mimic a card. Do NOT use arbitrary CSS grid templates when fixed, auto-fit, or subgrid modes already express the layout. Do NOT use Grid for simple one-dimensional stacks where Stack is sufficient.
|
|
10
|
+
* @ai-rules Use Grid for spatial layout, not for surface styling or content padding. Do NOT apply background, border, or internal padding directly to Grid to mimic a card. Do NOT use arbitrary CSS grid templates when fixed, auto-fit, auto-fill, or subgrid modes already express the layout. Do NOT use Grid for simple one-dimensional stacks where Stack is sufficient.
|
|
11
11
|
*
|
|
12
12
|
* Enforces semantic gap and column values. No arbitrary CSS grid.
|
|
13
13
|
* - layout='fixed': responsive base (collapses via CSS at tablet/mobile).
|
|
14
14
|
* `columns` sets desktop count (default 12). Tablet/mobile
|
|
15
15
|
* clamp to min(8, cols) and min(4, cols) respectively.
|
|
16
16
|
* - layout='auto-fit': responsive card wrapping via auto-fit.
|
|
17
|
+
* - layout='auto-fill': tile wrapping at `minItemWidth` (TileGrid's recipe; 0.20.0 removed TileGrid).
|
|
17
18
|
* - subgrid=true: sets gridTemplateColumns:'subgrid' for nested alignment.
|
|
18
19
|
*
|
|
19
20
|
* Usage (default responsive 12-col):
|
|
@@ -29,16 +30,19 @@
|
|
|
29
30
|
* </Grid>
|
|
30
31
|
*/
|
|
31
32
|
import React, { type ReactNode, type CSSProperties } from 'react';
|
|
32
|
-
type SemanticGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
33
|
-
type GridLayout = 'fixed' | 'auto-fit';
|
|
34
|
-
|
|
33
|
+
type SemanticGap = 'medium' | 'tight' | 'normal' | 'inset' | 'spacious';
|
|
34
|
+
type GridLayout = 'fixed' | 'auto-fit' | 'auto-fill';
|
|
35
|
+
/** Grid's own props, plus any HTML attribute (role, aria-*, id) for its root element. */
|
|
36
|
+
export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
35
37
|
/** Grid content. */
|
|
36
38
|
children: ReactNode;
|
|
37
|
-
/** Grid layout mode: 'fixed' (responsive)
|
|
39
|
+
/** Grid layout mode: 'fixed' (responsive), 'auto-fit' (card wrapping) or 'auto-fill' (tile wrapping that keeps empty tracks). Defaults to 'fixed'. */
|
|
38
40
|
layout?: GridLayout;
|
|
41
|
+
/** Minimum item width before 'auto-fit' or 'auto-fill' wraps, capped at the container width. Defaults to 280px. */
|
|
42
|
+
minItemWidth?: string;
|
|
39
43
|
/** Desktop column count for layout='fixed'. Tablet clamps to min(8,n), mobile to min(4,n). Defaults to 12. */
|
|
40
44
|
columns?: number;
|
|
41
|
-
/** Gap between grid items: semantic only. Defaults to 'inset' (32px). */
|
|
45
|
+
/** Gap between grid items: semantic only. 'medium' is a fixed 12px. Defaults to 'inset' (32px). */
|
|
42
46
|
gap?: SemanticGap;
|
|
43
47
|
/** If true, sets gridTemplateColumns:'subgrid' for nested grid alignment. */
|
|
44
48
|
subgrid?: boolean;
|
|
@@ -46,6 +50,11 @@ export interface GridProps {
|
|
|
46
50
|
style?: CSSProperties;
|
|
47
51
|
/** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
|
|
48
52
|
className?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Cross-axis alignment of items in a row. Defaults to 'start': items hug their
|
|
55
|
+
* own height. Pass 'stretch' where a row of tiles must share one height.
|
|
56
|
+
*/
|
|
57
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
49
58
|
/** Element rendered as the outer wrapper. Defaults to 'div'. */
|
|
50
59
|
as?: React.ElementType;
|
|
51
60
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Tooltip — accessible hover/focus tooltip on Radix (Overlays).
|
|
3
3
|
* @category Overlays
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=93-15
|
|
5
6
|
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
6
7
|
*
|
|
7
8
|
* Radix Tooltip (@radix-ui/react-tooltip) themed with role tokens. Provides
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
*
|
|
13
14
|
* <Tooltip>
|
|
14
15
|
* <Tooltip.Trigger asChild>
|
|
15
|
-
* <
|
|
16
|
+
* <Button iconOnly label="Copy link" iconLeft={<Icon icon={Link} />} />
|
|
16
17
|
* </Tooltip.Trigger>
|
|
17
18
|
* <Tooltip.Content>Copy link</Tooltip.Content>
|
|
18
19
|
* </Tooltip>
|
|
@@ -21,7 +22,9 @@
|
|
|
21
22
|
* content text (semantic.color.content.inverse) — these are a designed pair, so
|
|
22
23
|
* the bubble reads correctly in BOTH themes (dark bubble/light text in light
|
|
23
24
|
* mode, light bubble/dark text in dark mode). Radius 4 (primitive.radius.4),
|
|
24
|
-
* shadow-
|
|
25
|
+
* shadow-floating (semantic.elevation.floating, the popover and dropdown
|
|
26
|
+
* shadow; shadow-overlay is for dialogs), and a matching arrow. Text reuses the
|
|
27
|
+
* caption type composite.
|
|
25
28
|
*/
|
|
26
29
|
import * as React from 'react';
|
|
27
30
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -51,6 +54,13 @@ interface HdsTooltipComponent extends React.FC<React.ComponentProps<typeof Toolt
|
|
|
51
54
|
* Tooltip root. Bakes in the Radix Provider so a single `<Tooltip>` is
|
|
52
55
|
* self-contained — no app-level provider required. Controlled via
|
|
53
56
|
* `open`/`onOpenChange`, or uncontrolled with `defaultOpen`.
|
|
57
|
+
* @usage Name an icon-only control, or add a short hint that appears on hover and keyboard focus.
|
|
58
|
+
* @whenNot Anything interactive, text people need to finish a task, or a hint touch users must see (touch has no hover).
|
|
59
|
+
* @useInstead Popover interactive or longer content that opens on click
|
|
60
|
+
* @useInstead Text a hint that must stay visible
|
|
61
|
+
* @keyboard Focus Opens the tooltip when the trigger receives keyboard focus.
|
|
62
|
+
* @keyboard Escape Closes the tooltip and keeps focus on the trigger.
|
|
63
|
+
* @keyboard Tab Moves on to the next control and closes the tooltip.
|
|
54
64
|
* @public
|
|
55
65
|
*/
|
|
56
66
|
declare const Tooltip: HdsTooltipComponent;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Icon — semantic icon wrapper for Lucide icons.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components-Copy?node-id=27-2
|
|
5
6
|
* @usage Draw a Lucide glyph at a size and colour from the design tokens.
|
|
6
7
|
* @whenNot A control someone can activate, or a picture that carries content.
|
|
7
8
|
* @useInstead Button a clickable control, with iconOnly for an icon-only one
|
|
@@ -22,5 +22,4 @@ export type InlineCodeProps = {
|
|
|
22
22
|
};
|
|
23
23
|
/** @public */
|
|
24
24
|
export declare function InlineCode({ children, style, density, compact, copyable, }: InlineCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
|
|
26
|
-
export { inlineCodeVariants };
|
|
25
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Input — text field primitive with label, helper, and error slots.
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier primitive
|
|
5
|
-
* @usage Collect a single line of text, a number, an email or a
|
|
5
|
+
* @usage Collect a single line of text, a number, an email, a password, a date or a time, with label, helper and error slots.
|
|
6
6
|
* @whenNot Multi-line text, or choosing from a fixed list of options.
|
|
7
7
|
* @useInstead Textarea multi-line text
|
|
8
8
|
* @useInstead Select a short fixed list
|
|
@@ -16,10 +16,10 @@ declare const inputVariants: (props?: ({
|
|
|
16
16
|
textStyle?: "body" | "mono" | null | undefined;
|
|
17
17
|
invalid?: boolean | null | undefined;
|
|
18
18
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
19
|
-
type InputFieldType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number';
|
|
19
|
+
type InputFieldType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number' | 'date' | 'time' | 'datetime-local';
|
|
20
20
|
/** @public */
|
|
21
21
|
export type InputSize = NonNullable<VariantProps<typeof inputVariants>['size']>;
|
|
22
|
-
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'disabled' | 'size'> {
|
|
22
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'disabled' | 'size' | 'prefix'> {
|
|
23
23
|
/** Native input type. */
|
|
24
24
|
type?: InputFieldType;
|
|
25
25
|
/** Field height tier. */
|
|
@@ -34,6 +34,10 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
34
34
|
leadingVisual?: React.ReactNode;
|
|
35
35
|
/** Optional trailing visual rendered inside the input shell. */
|
|
36
36
|
trailingVisual?: React.ReactNode;
|
|
37
|
+
/** In-flow content before the value, e.g. `https://` or `$`. Not part of the accessible name. */
|
|
38
|
+
prefix?: React.ReactNode;
|
|
39
|
+
/** In-flow content after the value, e.g. a unit such as `kg`. Not part of the accessible name. */
|
|
40
|
+
suffix?: React.ReactNode;
|
|
37
41
|
/** Disable interaction. */
|
|
38
42
|
disabled?: boolean;
|
|
39
43
|
/** Mark the field as invalid (sets aria-invalid + destructive border). */
|
|
@@ -48,5 +52,4 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
48
52
|
inputClassName?: string;
|
|
49
53
|
}
|
|
50
54
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
51
|
-
|
|
52
|
-
export { inputVariants };
|
|
55
|
+
export {};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Kbd — inline keyboard key / shortcut hint rendered as a native <kbd>.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components-Copy?node-id=2026-9
|
|
5
6
|
* @usage Show a keyboard key or shortcut hint inline, as a native kbd element.
|
|
6
7
|
* @whenNot Code samples, or a control that runs the shortcut.
|
|
7
8
|
* @useInstead Text inline code and other typography
|
|
@@ -17,5 +18,4 @@ export interface KbdProps extends React.HTMLAttributes<HTMLElement>, KbdVariantP
|
|
|
17
18
|
}
|
|
18
19
|
/** Renders a keyboard key or shortcut token, e.g. `<Kbd>⌘K</Kbd>`. */
|
|
19
20
|
export declare const Kbd: React.ForwardRefExoticComponent<KbdProps & React.RefAttributes<HTMLElement>>;
|
|
20
|
-
|
|
21
|
-
export { kbdVariants };
|
|
21
|
+
export {};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Owner, Updated…). The idiomatic replacement for badge-stickers-on-prose.
|
|
4
4
|
* @category Display
|
|
5
5
|
* @tier pattern
|
|
6
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components-Copy?node-id=2041-47
|
|
6
7
|
* @public
|
|
7
8
|
*/
|
|
8
9
|
import * as React from 'react';
|
|
@@ -39,5 +40,4 @@ export interface MetadataListProps extends Omit<React.HTMLAttributes<HTMLDListEl
|
|
|
39
40
|
}
|
|
40
41
|
/** Renders object metadata as a semantic `<dl>` of term/description pairs. */
|
|
41
42
|
export declare const MetadataList: React.ForwardRefExoticComponent<MetadataListProps & React.RefAttributes<HTMLDListElement>>;
|
|
42
|
-
|
|
43
|
-
export { metadataListVariants };
|
|
43
|
+
export {};
|
|
@@ -22,6 +22,7 @@ export interface MetricTileProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
22
22
|
* surface at one fixed min-height. Wraps `Card.Metric` (the sibling with the
|
|
23
23
|
* eyebrow / h2 / caption scale) and adds the surface and the fixed height, so a
|
|
24
24
|
* tile needs no enclosing `Card`.
|
|
25
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components-Copy?node-id=2075-114
|
|
25
26
|
*/
|
|
26
27
|
export declare const MetricTile: React.ForwardRefExoticComponent<MetricTileProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
28
|
/** @public */
|
|
@@ -27,8 +27,6 @@ export interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
27
27
|
* Screen header: breadcrumb slot, the title at the one canonical page-title size
|
|
28
28
|
* (`heading2`), a status slot and an actions slot. Every screen has exactly one.
|
|
29
29
|
* `display` and `h1` type are reserved for marketing and landing surfaces.
|
|
30
|
-
*
|
|
31
|
-
* Distinct from the docs-only page header in `src/docs-tooling`.
|
|
32
30
|
* @screenPattern
|
|
33
31
|
*/
|
|
34
32
|
export declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -51,6 +51,14 @@ interface PopoverComponent extends React.FC<React.ComponentProps<typeof PopoverP
|
|
|
51
51
|
/**
|
|
52
52
|
* Popover root + parts. Controlled via `open`/`onOpenChange`, or uncontrolled
|
|
53
53
|
* with `defaultOpen`.
|
|
54
|
+
* @usage Anchor interactive content, such as a short form, a filter set or a picker, to a trigger people click to open.
|
|
55
|
+
* @whenNot A short label on hover or focus, a list of actions, or a decision that must block the page.
|
|
56
|
+
* @useInstead Tooltip a short label shown on hover or focus
|
|
57
|
+
* @useInstead Menu a list of actions
|
|
58
|
+
* @useInstead Dialog a decision that blocks the page
|
|
59
|
+
* @keyboard Enter/Space Opens the popover from the trigger and moves focus inside it.
|
|
60
|
+
* @keyboard Escape Closes the popover and returns focus to the trigger.
|
|
61
|
+
* @keyboard Tab Cycles focus inside the open popover; the page behind stays reachable.
|
|
54
62
|
* @public
|
|
55
63
|
*/
|
|
56
64
|
declare const Popover: PopoverComponent;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Progress - linear
|
|
2
|
+
* Progress - linear bar or circular ring (determinate or indeterminate).
|
|
3
3
|
* @category Feedback
|
|
4
4
|
* @tier primitive
|
|
5
|
-
* @usage Show how far a task has got, as a bar that is determinate or indeterminate.
|
|
5
|
+
* @usage Show how far a task has got, as a bar or ring that is determinate or indeterminate.
|
|
6
6
|
* @whenNot A wait of unknown length with no bar, or content that is still loading.
|
|
7
7
|
* @useInstead Spinner a wait of unknown length
|
|
8
8
|
* @useInstead Skeleton placeholder shapes for loading content
|
|
@@ -13,18 +13,45 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
13
13
|
declare const progressTrackVariants: (props?: ({
|
|
14
14
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
16
|
+
declare const PROGRESS_TONES: {
|
|
17
|
+
readonly neutral: {
|
|
18
|
+
readonly bar: "bg-primary";
|
|
19
|
+
readonly ring: "text-primary";
|
|
20
|
+
};
|
|
21
|
+
readonly danger: {
|
|
22
|
+
readonly bar: "bg-feedback-danger";
|
|
23
|
+
readonly ring: "text-feedback-danger";
|
|
24
|
+
};
|
|
25
|
+
readonly success: {
|
|
26
|
+
readonly bar: "bg-feedback-success";
|
|
27
|
+
readonly ring: "text-feedback-success";
|
|
28
|
+
};
|
|
29
|
+
readonly warning: {
|
|
30
|
+
readonly bar: "bg-feedback-warning";
|
|
31
|
+
readonly ring: "text-feedback-warning";
|
|
32
|
+
};
|
|
33
|
+
readonly info: {
|
|
34
|
+
readonly bar: "bg-feedback-info";
|
|
35
|
+
readonly ring: "text-feedback-info";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
16
38
|
type ProgressVariantProps = VariantProps<typeof progressTrackVariants>;
|
|
17
39
|
/** @public */
|
|
18
40
|
export interface ProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'role'>, ProgressVariantProps {
|
|
19
41
|
/**
|
|
20
|
-
* Completion 0–
|
|
42
|
+
* Completion 0–max. Omit (or pass null) for an indeterminate bar that
|
|
21
43
|
* animates until the work completes.
|
|
22
44
|
*/
|
|
23
45
|
value?: number | null;
|
|
46
|
+
/** Upper bound for `value`. Defaults to 100. */
|
|
47
|
+
max?: number;
|
|
48
|
+
/** Shape: `linear` bar (default) or `circular` ring. */
|
|
49
|
+
variant?: 'linear' | 'circular';
|
|
50
|
+
/** Fill color: `neutral` (default) or a feedback tone. */
|
|
51
|
+
tone?: keyof typeof PROGRESS_TONES;
|
|
24
52
|
/** Accessible label for the progress bar. */
|
|
25
53
|
label?: string;
|
|
26
54
|
}
|
|
27
|
-
/** Linear
|
|
55
|
+
/** Linear bar or circular ring. Determinate when `value` is a number, else indeterminate. */
|
|
28
56
|
export declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
|
|
30
|
-
export { progressTrackVariants };
|
|
57
|
+
export {};
|
|
@@ -1,35 +1,12 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
declare const segmentedControlWrapperVariants: (props?: ({
|
|
3
|
-
fullWidth?: boolean | null | undefined;
|
|
4
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
|
-
declare const segmentedControlRailVariants: (props?: ({
|
|
6
|
-
variant?: "primary" | "secondary" | null | undefined;
|
|
7
|
-
fullWidth?: boolean | null | undefined;
|
|
8
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
9
2
|
declare const segmentedControlItemVariants: (props?: ({
|
|
10
3
|
size?: "sm" | "md" | null | undefined;
|
|
11
4
|
fullWidth?: boolean | null | undefined;
|
|
12
5
|
variant?: "primary" | "secondary" | null | undefined;
|
|
13
6
|
active?: boolean | null | undefined;
|
|
14
|
-
interaction?: "
|
|
7
|
+
interaction?: "hover" | "pressed" | "rest" | null | undefined;
|
|
15
8
|
disabled?: boolean | null | undefined;
|
|
16
9
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
17
|
-
declare const segmentedControlIndicatorVariants: (props?: ({
|
|
18
|
-
variant?: "primary" | "secondary" | null | undefined;
|
|
19
|
-
active?: boolean | null | undefined;
|
|
20
|
-
interaction?: "rest" | "hover" | "pressed" | null | undefined;
|
|
21
|
-
disabled?: boolean | null | undefined;
|
|
22
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
23
|
-
declare const segmentedControlDescriptionVariants: (props?: ({
|
|
24
|
-
variant?: "primary" | "secondary" | null | undefined;
|
|
25
|
-
active?: boolean | null | undefined;
|
|
26
|
-
interaction?: "rest" | "hover" | "pressed" | null | undefined;
|
|
27
|
-
disabled?: boolean | null | undefined;
|
|
28
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
29
|
-
declare const segmentedControlFocusRingVariants: (props?: ({
|
|
30
|
-
variant?: "primary" | "secondary" | null | undefined;
|
|
31
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
32
|
-
declare const segmentedControlLabelVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
33
10
|
type SegmentedItemVariantProps = VariantProps<typeof segmentedControlItemVariants>;
|
|
34
11
|
interface HdsSegmentedOption {
|
|
35
12
|
/** Value submitted when this option is selected. */
|
|
@@ -63,5 +40,4 @@ export interface SegmentedControlProps {
|
|
|
63
40
|
}
|
|
64
41
|
/** @public */
|
|
65
42
|
export declare const SegmentedControl: import("react").ForwardRefExoticComponent<SegmentedControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
66
|
-
|
|
67
|
-
export { segmentedControlWrapperVariants, segmentedControlRailVariants, segmentedControlItemVariants, segmentedControlIndicatorVariants, segmentedControlDescriptionVariants, segmentedControlFocusRingVariants, segmentedControlLabelVariants, };
|
|
43
|
+
export {};
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* tabs.tsx / command-palette.tsx; `ref` targets the trigger button.
|
|
24
24
|
*/
|
|
25
25
|
export interface SelectProps {
|
|
26
|
-
/** Select label rendered above the control. */
|
|
26
|
+
/** Select label rendered above the control. It names the trigger, also when hidden. */
|
|
27
27
|
label: string;
|
|
28
28
|
/** Controls whether the label is rendered. */
|
|
29
29
|
showLabel?: boolean;
|
|
@@ -41,5 +41,14 @@ export interface SelectProps {
|
|
|
41
41
|
* overlay inherits its theme; pass `null` to use `document.body`.
|
|
42
42
|
*/
|
|
43
43
|
container?: HTMLElement | null;
|
|
44
|
+
/**
|
|
45
|
+
* Id of the trigger, so a `<label for>` names it. `FormField` sets it, with
|
|
46
|
+
* `aria-describedby` and `aria-invalid`.
|
|
47
|
+
*/
|
|
48
|
+
id?: string;
|
|
49
|
+
/** Ids of the elements that describe the trigger (helper text, error). */
|
|
50
|
+
'aria-describedby'?: string;
|
|
51
|
+
/** Marks the trigger invalid, for example while the field shows an error. */
|
|
52
|
+
'aria-invalid'?: boolean;
|
|
44
53
|
}
|
|
45
54
|
export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLButtonElement>>;
|