@hirobius/design-system 0.20.0 → 0.22.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 +125 -0
- package/CHANGELOG.md +969 -0
- package/CONSUMING.md +27 -11
- package/DESIGN.md +28 -17
- package/MIGRATIONS.md +603 -0
- package/NOTICE.md +1 -1
- package/README.md +39 -5
- package/UPGRADING.md +222 -0
- package/codemods/hds-prefix.mjs +28 -13
- package/codemods/jsx-fold.mjs +28 -13
- package/codemods/lib/atomic-write.mjs +28 -0
- package/codemods/lib/installed-version.mjs +354 -0
- package/codemods/lib/project.mjs +395 -0
- package/codemods/lib/record.mjs +110 -0
- package/codemods/lib/scan.mjs +323 -0
- package/codemods/lib/semver.mjs +57 -0
- package/codemods/not-found-pattern.mjs +3 -3
- package/codemods/patterns-subpath.mjs +28 -12
- package/codemods/registry.mjs +67 -0
- package/codemods/tile-grid.mjs +3 -3
- package/codemods/upgrade.mjs +909 -0
- package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
- package/dist/chunks/form-By82qZcC.js +66 -0
- 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 +876 -877
- package/dist/manifest.js +3 -3
- package/dist/patterns.js +189 -170
- package/dist/styles.css +2 -2
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +136 -57
- package/dist/types/src/app/components/alert-dialog.d.ts +5 -0
- package/dist/types/src/app/components/alert.d.ts +1 -1
- package/dist/types/src/app/components/asset-img.d.ts +1 -0
- package/dist/types/src/app/components/avatar-group.d.ts +1 -0
- package/dist/types/src/app/components/avatar.d.ts +1 -1
- package/dist/types/src/app/components/badge.d.ts +2 -2
- package/dist/types/src/app/components/blockquote.d.ts +1 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +1 -1
- package/dist/types/src/app/components/button.d.ts +3 -1
- package/dist/types/src/app/components/callout.d.ts +1 -1
- package/dist/types/src/app/components/card.d.ts +4 -3
- package/dist/types/src/app/components/checkbox.d.ts +1 -1
- package/dist/types/src/app/components/code-block.d.ts +1 -1
- package/dist/types/src/app/components/combobox.d.ts +1 -1
- package/dist/types/src/app/components/data-table-section.d.ts +1 -0
- package/dist/types/src/app/components/destructive-section.d.ts +1 -0
- package/dist/types/src/app/components/dialog.d.ts +2 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -1
- package/dist/types/src/app/components/divider.d.ts +1 -1
- package/dist/types/src/app/components/empty-state.d.ts +1 -1
- package/dist/types/src/app/components/error-pattern.d.ts +6 -1
- package/dist/types/src/app/components/field.d.ts +1 -1
- 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/form.d.ts +1 -1
- package/dist/types/src/app/components/grid.d.ts +5 -0
- package/dist/types/src/app/components/hds-tooltip.d.ts +1 -1
- package/dist/types/src/app/components/icon.d.ts +1 -0
- package/dist/types/src/app/components/inline-link.d.ts +1 -1
- package/dist/types/src/app/components/input.d.ts +1 -1
- package/dist/types/src/app/components/kbd.d.ts +1 -0
- package/dist/types/src/app/components/menu.d.ts +1 -1
- package/dist/types/src/app/components/metadata-list.d.ts +1 -0
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
- package/dist/types/src/app/components/pagination.d.ts +1 -1
- package/dist/types/src/app/components/popover.d.ts +1 -1
- package/dist/types/src/app/components/progress.d.ts +2 -2
- package/dist/types/src/app/components/radio.d.ts +1 -1
- package/dist/types/src/app/components/select.d.ts +1 -1
- package/dist/types/src/app/components/skeleton.d.ts +2 -2
- package/dist/types/src/app/components/slider.d.ts +1 -1
- package/dist/types/src/app/components/spinner.d.ts +1 -1
- package/dist/types/src/app/components/stat.d.ts +5 -4
- package/dist/types/src/app/components/status-list-item.d.ts +1 -1
- package/dist/types/src/app/components/status-tile.d.ts +4 -3
- package/dist/types/src/app/components/table.d.ts +6 -1
- package/dist/types/src/app/components/tabs.d.ts +1 -1
- package/dist/types/src/app/components/tag.d.ts +1 -1
- package/dist/types/src/app/components/text.d.ts +53 -6
- package/dist/types/src/app/components/textarea.d.ts +1 -1
- package/dist/types/src/app/components/timestamp.d.ts +1 -0
- package/dist/types/src/app/components/toast.d.ts +1 -1
- package/dist/types/src/app/components/toggle.d.ts +1 -1
- package/dist/types/src/app/data/manifest-types.d.ts +4 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +37 -28
- package/dist/types/src/app/design-system/generated-token-values.d.ts +3 -0
- package/dist/types/src/app/design-system/tokens.d.ts +117 -15
- package/dist/types/src/index.d.ts +122 -72
- package/dist/variables.css +41 -33
- package/docs/CONSUMING.md +63 -39
- package/hirobius.tokens.json +163 -112
- package/llms.txt +158 -50
- package/mcp/catalog.mjs +369 -0
- package/mcp/core-set.mjs +66 -0
- package/mcp/guide.mjs +272 -0
- package/mcp/hds-mcp.mjs +49 -0
- package/mcp/server.mjs +94 -0
- package/package.json +53 -11
- package/public/hds-manifest.json +430 -336
- package/public/llms/components.txt +4 -3
- package/public/llms/layout.txt +1 -1
- package/public/llms-full.txt +190 -70
- package/public/llms.txt +158 -50
- 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 +154 -93
- package/upgrade/index.json +208 -0
- package/upgrade/releases/0.17.0.json +962 -0
- package/upgrade/releases/0.18.0.json +8 -0
- package/upgrade/releases/0.19.0.json +233 -0
- package/upgrade/releases/0.19.1.json +8 -0
- package/upgrade/releases/0.20.0.json +5108 -0
- package/upgrade/releases/0.21.0.json +538 -0
- package/upgrade/releases/0.22.0.json +94 -0
- package/upgrade/schema.json +989 -0
- package/dist/chunks/empty-state-BBqhCx0S.js +0 -1217
- package/dist/chunks/form-COP3vK9_.js +0 -66
- package/dist/types/src/app/components/status-dot.d.ts +0 -39
|
@@ -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?node-id=2075-114
|
|
25
26
|
*/
|
|
26
27
|
export declare const MetricTile: React.ForwardRefExoticComponent<MetricTileProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
28
|
/** @public */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @usage Move between pages of a long result set, with truncated page numbers.
|
|
6
6
|
* @whenNot A hierarchy trail, or a short list that fits on one page.
|
|
7
7
|
* @useInstead Breadcrumb a hierarchy trail
|
|
8
|
-
* @figma https://www.figma.com/design/
|
|
8
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=86-194
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
type PageToken = number | 'ellipsis';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Popover — floating surface anchored to a trigger (shadcn baseline, compound parts).
|
|
3
3
|
* @category Overlays
|
|
4
4
|
* @tier primitive
|
|
5
|
-
* @figma https://www.figma.com/design/
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=93-32
|
|
6
6
|
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
7
7
|
*
|
|
8
8
|
* Radix Popover (@radix-ui/react-popover) themed with role tokens. Provides
|
|
@@ -6,7 +6,7 @@
|
|
|
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
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=88-91
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -15,7 +15,7 @@ declare const progressTrackVariants: (props?: ({
|
|
|
15
15
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
16
16
|
declare const PROGRESS_TONES: {
|
|
17
17
|
readonly neutral: {
|
|
18
|
-
readonly bar: "bg-
|
|
18
|
+
readonly bar: "bg-primary";
|
|
19
19
|
readonly ring: "text-primary";
|
|
20
20
|
};
|
|
21
21
|
readonly danger: {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @useInstead Checkbox independent options that can be ticked together
|
|
8
8
|
* @useInstead Select a long list that can collapse into a dropdown
|
|
9
9
|
* @useInstead SegmentedControl a compact switch between two to five views or modes
|
|
10
|
-
* @figma https://www.figma.com/design/
|
|
10
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=36-17
|
|
11
11
|
*/
|
|
12
12
|
import type { InputHTMLAttributes } from 'react';
|
|
13
13
|
/** Radio — radio button with animated selection indicator. */
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @keyboard Enter Commits the highlighted option and returns focus to the trigger.
|
|
14
14
|
* @keyboard Escape Closes the listbox and returns focus to the trigger.
|
|
15
15
|
* @keyboard Tab Does not leave the open listbox.
|
|
16
|
-
* @figma https://www.figma.com/design/
|
|
16
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=82-49
|
|
17
17
|
*/
|
|
18
18
|
/**
|
|
19
19
|
* Select — dropdown selector built on Radix Select (ADR-001 Radix convention).
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot A task with measurable progress, or a wait with no layout to reserve.
|
|
7
7
|
* @useInstead Progress a task with measurable progress
|
|
8
8
|
* @useInstead Spinner a short wait with no layout to reserve
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=88-95
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -18,7 +18,7 @@ type SkeletonVariantProps = VariantProps<typeof skeletonVariants>;
|
|
|
18
18
|
export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, SkeletonVariantProps {
|
|
19
19
|
/** Explicit width (number → px, or any CSS length). */
|
|
20
20
|
width?: number | string;
|
|
21
|
-
/** Explicit height (number → px, or any CSS length). For `text`, defaults to 1em. */
|
|
21
|
+
/** Explicit height (number → px, or any CSS length). For `text`, defaults to 1em; for `rectangular`, 5rem. */
|
|
22
22
|
height?: number | string;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @usage Pick a number within a known range by dragging, when the exact value matters less than the position.
|
|
6
6
|
* @whenNot A precise number the person must type or read exactly.
|
|
7
7
|
* @useInstead Input a precise typed value (type="number")
|
|
8
|
-
* @figma https://www.figma.com/design/
|
|
8
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=82-265
|
|
9
9
|
*/
|
|
10
10
|
/** Slider — range slider with label and value display. */
|
|
11
11
|
export interface SliderProps {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot A task with measurable progress, or a region whose layout is known.
|
|
7
7
|
* @useInstead Progress a task with measurable progress
|
|
8
8
|
* @useInstead Skeleton a region whose layout is known
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=88-106
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @category Display
|
|
3
3
|
* @tier primitive
|
|
4
|
-
* @figma https://www.figma.com/design/
|
|
4
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=88-247
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -16,9 +16,10 @@ export interface StatProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'c
|
|
|
16
16
|
sub?: React.ReactNode;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Headline metric — large value,
|
|
20
|
-
* @usage Show one
|
|
21
|
-
* @whenNot A figure inside a Card, or a status with a trailing badge.
|
|
19
|
+
* Headline metric — large value, caption label, optional sub-line.
|
|
20
|
+
* @usage Show one headline figure inline, inside prose or a dense list, with its label and an optional sub-line.
|
|
21
|
+
* @whenNot A row of headline numbers on a screen, a figure inside a Card, or a status with a trailing badge.
|
|
22
|
+
* @useInstead MetricTiles a row of headline numbers (one MetricTile per number)
|
|
22
23
|
* @useInstead Card.Metric a figure inside a Card (hds#254 folds Stat into the Card slot)
|
|
23
24
|
* @useInstead StatusTile a titled status with notes and a trailing badge
|
|
24
25
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @category Display
|
|
3
3
|
* @tier pattern
|
|
4
|
-
* @figma https://www.figma.com/design/
|
|
4
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=88-350
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @category Display
|
|
3
3
|
* @tier pattern
|
|
4
|
-
* @figma https://www.figma.com/design/
|
|
4
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=88-292
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
export type StatusTileTone = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
@@ -20,8 +20,9 @@ export interface StatusTileProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
20
20
|
* — every tile should look the same so feedback signals stay reserved for
|
|
21
21
|
* genuinely interrupting states.
|
|
22
22
|
* @usage Show a titled status block with optional notes and a trailing badge or affordance.
|
|
23
|
-
* @whenNot A
|
|
24
|
-
* @useInstead
|
|
23
|
+
* @whenNot A headline number (never a value), or a row inside a list.
|
|
24
|
+
* @useInstead MetricTiles a row of headline numbers
|
|
25
|
+
* @useInstead Card.Metric a headline figure inside a Card (hds#254 folds StatusTile into the Card slot)
|
|
25
26
|
* @useInstead StatusListItem a status row inside a list
|
|
26
27
|
*/
|
|
27
28
|
export declare const StatusTile: React.ForwardRefExoticComponent<StatusTileProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot A single record, a short list of links, or content that reflows as cards.
|
|
7
7
|
* @useInstead Field one record as label and value pairs
|
|
8
8
|
* @useInstead Stack a short list of items
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=89-300
|
|
10
10
|
*/
|
|
11
11
|
import { type ReactNode } from 'react';
|
|
12
12
|
/** @public */
|
|
@@ -75,6 +75,11 @@ export declare function Table({ columns, rows, caption, captionAction, descripti
|
|
|
75
75
|
* default, compact inside `[data-density="compact"]`); pass a value to fix it.
|
|
76
76
|
*/
|
|
77
77
|
density?: TableDensity;
|
|
78
|
+
/**
|
|
79
|
+
* Drop the scroll region's own inset. On by default: every cell already carries the
|
|
80
|
+
* surface inset, so a padded region doubled it (48px at the edges, hds#522). Pass
|
|
81
|
+
* `flush={false}` to restore the extra region padding.
|
|
82
|
+
*/
|
|
78
83
|
flush?: boolean;
|
|
79
84
|
stickyHeader?: boolean;
|
|
80
85
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -29,7 +29,7 @@ import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
|
29
29
|
* @whenNot A compact mode switch with no panels, or content that must all be visible.
|
|
30
30
|
* @useInstead SegmentedControl a compact switch with no panels
|
|
31
31
|
* @useInstead Disclosure optional content that expands in place
|
|
32
|
-
* @figma https://www.figma.com/design/
|
|
32
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=86-89
|
|
33
33
|
*/
|
|
34
34
|
export declare const Tabs: import("react").ForwardRefExoticComponent<TabsPrimitive.TabsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
35
|
export declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @usage Show an interactive filter or category chip that people can toggle.
|
|
6
6
|
* @whenNot A read-only status or count label.
|
|
7
7
|
* @useInstead Badge a read-only status or count
|
|
8
|
-
* @figma https://www.figma.com/design/
|
|
8
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=32-11
|
|
9
9
|
*
|
|
10
10
|
* The outer <button> carries the accessible 44px hit target directly via the
|
|
11
11
|
* size token while the inner pill keeps the visible surface compact. Colors
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @category Typography
|
|
5
5
|
* @tier primitive
|
|
6
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2022-31
|
|
6
7
|
* @usage Set any text on the type ramp, with the element chosen by `as`.
|
|
7
8
|
* @whenNot Navigation links, or a keyboard hint.
|
|
8
9
|
* @useInstead InlineLink a link inside body copy
|
|
@@ -10,12 +11,58 @@
|
|
|
10
11
|
* @doc-exempt: typography primitive is documented through the Typography ramp page (TypographyPage), not as a standalone component card
|
|
11
12
|
*/
|
|
12
13
|
import { type CSSProperties, type ElementType, type HTMLAttributes, type ReactNode } from 'react';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/** The six roles of the type ramp, plus the deprecated names that still resolve. */
|
|
15
|
+
export type TextVariant = 'display' | 'title' | 'body' | 'ui' | 'caption' | 'mono'
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated hds#483 — use `title`.
|
|
18
|
+
* @removeIn 1.0.0
|
|
19
|
+
*/
|
|
20
|
+
| 'heading1'
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated hds#483 — use `title`.
|
|
23
|
+
* @removeIn 1.0.0
|
|
24
|
+
*/
|
|
25
|
+
| 'heading2'
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated hds#483 — use `title`.
|
|
28
|
+
* @removeIn 1.0.0
|
|
29
|
+
*/
|
|
30
|
+
| 'heading3'
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated hds#483 — use `mono`.
|
|
33
|
+
* @removeIn 1.0.0
|
|
34
|
+
*/
|
|
35
|
+
| 'technical'
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated hds#483 — use `caption`.
|
|
38
|
+
* @removeIn 1.0.0
|
|
39
|
+
*/
|
|
40
|
+
| 'eyebrow'
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated hds#483 — use `caption`.
|
|
43
|
+
* @removeIn 1.0.0
|
|
44
|
+
*/
|
|
45
|
+
| 'badge'
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated hds#483 — use `body`.
|
|
48
|
+
* @removeIn 1.0.0
|
|
49
|
+
*/
|
|
50
|
+
| 'docLede'
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated hds#483 — use `body`.
|
|
53
|
+
* @removeIn 1.0.0
|
|
54
|
+
*/
|
|
55
|
+
| 'docBody'
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated hds#483 — use `ui`.
|
|
58
|
+
* @removeIn 1.0.0
|
|
59
|
+
*/
|
|
60
|
+
| 'docSmall'
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated hds#483 — use `mono`.
|
|
63
|
+
* @removeIn 1.0.0
|
|
64
|
+
*/
|
|
65
|
+
| 'docCode';
|
|
19
66
|
type TextTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
|
|
20
67
|
/** @public */
|
|
21
68
|
export type TextProps = {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @usage Collect multi-line free text such as a message, note or description.
|
|
6
6
|
* @whenNot A single line of text, or choosing from a list.
|
|
7
7
|
* @useInstead Input a single line of text
|
|
8
|
-
* @figma https://www.figma.com/design/
|
|
8
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=85-14
|
|
9
9
|
*
|
|
10
10
|
* Mirrors Input's shell + token skin as a native `<textarea>`. Figma parity:
|
|
11
11
|
* the four states Default / Focus / Error / Disabled map to the focus-ring,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot A message people must act on or that must stay next to its content.
|
|
7
7
|
* @useInstead Alert a message that stays next to its content
|
|
8
8
|
* @useInstead Dialog a message that needs a decision
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=93-367
|
|
10
10
|
* @doc-exempt: no Overlays/Feedback-overlay doc page yet — add demo when created
|
|
11
11
|
*
|
|
12
12
|
* Imperative API: wrap the app once in <ToastProvider>, then call
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot A choice that only takes effect after submitting a form, or picking from several options.
|
|
7
7
|
* @useInstead Checkbox a form option confirmed on submit
|
|
8
8
|
* @useInstead Radio one choice from a set
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=37-19
|
|
10
10
|
*/
|
|
11
11
|
import type { InputHTMLAttributes } from 'react';
|
|
12
12
|
/** Toggle — boolean on/off toggle with animated thumb. */
|
|
@@ -78,6 +78,8 @@ export type ManifestComponentSpec = {
|
|
|
78
78
|
hidden?: boolean;
|
|
79
79
|
docExempt?: boolean;
|
|
80
80
|
tier?: string;
|
|
81
|
+
/** In the ratified core set (hds#254, ADR-031). Present only as `true`; independent of `tier`. */
|
|
82
|
+
core?: true;
|
|
81
83
|
stability?: 'stable' | 'beta';
|
|
82
84
|
consumers?: string[];
|
|
83
85
|
tokenMapping?: Record<string, string>;
|
|
@@ -129,6 +131,8 @@ export type ManifestApiComponent = {
|
|
|
129
131
|
hidden?: boolean;
|
|
130
132
|
figmaUrl?: string | null;
|
|
131
133
|
description?: string;
|
|
134
|
+
/** In the ratified core set (hds#254, ADR-031). Present only as `true`. */
|
|
135
|
+
core?: true;
|
|
132
136
|
usage?: ManifestUsage;
|
|
133
137
|
keyboard?: ManifestKeyboardEntry[];
|
|
134
138
|
aiRules?: string;
|
|
@@ -148,6 +148,7 @@ export declare const tokenRefs: {
|
|
|
148
148
|
readonly "4xl": "var(--primitive-typography-size-4xl)";
|
|
149
149
|
readonly "5xl": "var(--primitive-typography-size-5xl)";
|
|
150
150
|
readonly "6xl": "var(--primitive-typography-size-6xl)";
|
|
151
|
+
readonly code: "var(--primitive-typography-size-code)";
|
|
151
152
|
};
|
|
152
153
|
readonly weight: {
|
|
153
154
|
readonly regular: "var(--primitive-typography-weight-regular)";
|
|
@@ -161,6 +162,8 @@ export declare const tokenRefs: {
|
|
|
161
162
|
readonly snug: "var(--primitive-typography-lineHeight-snug)";
|
|
162
163
|
readonly normal: "var(--primitive-typography-lineHeight-normal)";
|
|
163
164
|
readonly relaxed: "var(--primitive-typography-lineHeight-relaxed)";
|
|
165
|
+
readonly display: "var(--primitive-typography-lineHeight-display)";
|
|
166
|
+
readonly body: "var(--primitive-typography-lineHeight-body)";
|
|
164
167
|
};
|
|
165
168
|
readonly letterSpacing: {
|
|
166
169
|
readonly tight: "var(--primitive-typography-letterSpacing-tight)";
|
|
@@ -389,26 +392,12 @@ export declare const tokenRefs: {
|
|
|
389
392
|
readonly letterSpacing: "var(--semantic-typography-display-letter-spacing)";
|
|
390
393
|
readonly lineHeight: "var(--semantic-typography-display-line-height)";
|
|
391
394
|
};
|
|
392
|
-
readonly
|
|
393
|
-
readonly fontFamily: "var(--semantic-typography-
|
|
394
|
-
readonly fontSize: "var(--semantic-typography-
|
|
395
|
-
readonly fontWeight: "var(--semantic-typography-
|
|
396
|
-
readonly letterSpacing: "var(--semantic-typography-
|
|
397
|
-
readonly lineHeight: "var(--semantic-typography-
|
|
398
|
-
};
|
|
399
|
-
readonly h2: {
|
|
400
|
-
readonly fontFamily: "var(--semantic-typography-h2-font-family)";
|
|
401
|
-
readonly fontSize: "var(--semantic-typography-h2-font-size)";
|
|
402
|
-
readonly fontWeight: "var(--semantic-typography-h2-font-weight)";
|
|
403
|
-
readonly letterSpacing: "var(--semantic-typography-h2-letter-spacing)";
|
|
404
|
-
readonly lineHeight: "var(--semantic-typography-h2-line-height)";
|
|
405
|
-
};
|
|
406
|
-
readonly h3: {
|
|
407
|
-
readonly fontFamily: "var(--semantic-typography-h3-font-family)";
|
|
408
|
-
readonly fontSize: "var(--semantic-typography-h3-font-size)";
|
|
409
|
-
readonly fontWeight: "var(--semantic-typography-h3-font-weight)";
|
|
410
|
-
readonly letterSpacing: "var(--semantic-typography-h3-letter-spacing)";
|
|
411
|
-
readonly lineHeight: "var(--semantic-typography-h3-line-height)";
|
|
395
|
+
readonly title: {
|
|
396
|
+
readonly fontFamily: "var(--semantic-typography-title-font-family)";
|
|
397
|
+
readonly fontSize: "var(--semantic-typography-title-font-size)";
|
|
398
|
+
readonly fontWeight: "var(--semantic-typography-title-font-weight)";
|
|
399
|
+
readonly letterSpacing: "var(--semantic-typography-title-letter-spacing)";
|
|
400
|
+
readonly lineHeight: "var(--semantic-typography-title-line-height)";
|
|
412
401
|
};
|
|
413
402
|
readonly body: {
|
|
414
403
|
readonly fontFamily: "var(--semantic-typography-body-font-family)";
|
|
@@ -433,14 +422,6 @@ export declare const tokenRefs: {
|
|
|
433
422
|
readonly letterSpacing: "var(--semantic-typography-caption-letter-spacing)";
|
|
434
423
|
readonly lineHeight: "var(--semantic-typography-caption-line-height)";
|
|
435
424
|
};
|
|
436
|
-
readonly eyebrow: {
|
|
437
|
-
readonly fontFamily: "var(--semantic-typography-eyebrow-font-family)";
|
|
438
|
-
readonly fontSize: "var(--semantic-typography-eyebrow-font-size)";
|
|
439
|
-
readonly fontWeight: "var(--semantic-typography-eyebrow-font-weight)";
|
|
440
|
-
readonly letterSpacing: "var(--semantic-typography-eyebrow-letter-spacing)";
|
|
441
|
-
readonly lineHeight: "var(--semantic-typography-eyebrow-line-height)";
|
|
442
|
-
readonly textTransform: "var(--semantic-typography-eyebrow-text-transform)";
|
|
443
|
-
};
|
|
444
425
|
readonly mono: {
|
|
445
426
|
readonly fontFamily: "var(--semantic-typography-mono-font-family)";
|
|
446
427
|
readonly fontSize: "var(--semantic-typography-mono-font-size)";
|
|
@@ -449,6 +430,34 @@ export declare const tokenRefs: {
|
|
|
449
430
|
readonly lineHeight: "var(--semantic-typography-mono-line-height)";
|
|
450
431
|
readonly maxWidth: "var(--semantic-typography-mono-max-width)";
|
|
451
432
|
};
|
|
433
|
+
readonly h1: {
|
|
434
|
+
readonly fontFamily: "var(--semantic-typography-h1-font-family)";
|
|
435
|
+
readonly fontSize: "var(--semantic-typography-h1-font-size)";
|
|
436
|
+
readonly fontWeight: "var(--semantic-typography-h1-font-weight)";
|
|
437
|
+
readonly letterSpacing: "var(--semantic-typography-h1-letter-spacing)";
|
|
438
|
+
readonly lineHeight: "var(--semantic-typography-h1-line-height)";
|
|
439
|
+
};
|
|
440
|
+
readonly h2: {
|
|
441
|
+
readonly fontFamily: "var(--semantic-typography-h2-font-family)";
|
|
442
|
+
readonly fontSize: "var(--semantic-typography-h2-font-size)";
|
|
443
|
+
readonly fontWeight: "var(--semantic-typography-h2-font-weight)";
|
|
444
|
+
readonly letterSpacing: "var(--semantic-typography-h2-letter-spacing)";
|
|
445
|
+
readonly lineHeight: "var(--semantic-typography-h2-line-height)";
|
|
446
|
+
};
|
|
447
|
+
readonly h3: {
|
|
448
|
+
readonly fontFamily: "var(--semantic-typography-h3-font-family)";
|
|
449
|
+
readonly fontSize: "var(--semantic-typography-h3-font-size)";
|
|
450
|
+
readonly fontWeight: "var(--semantic-typography-h3-font-weight)";
|
|
451
|
+
readonly letterSpacing: "var(--semantic-typography-h3-letter-spacing)";
|
|
452
|
+
readonly lineHeight: "var(--semantic-typography-h3-line-height)";
|
|
453
|
+
};
|
|
454
|
+
readonly eyebrow: {
|
|
455
|
+
readonly fontFamily: "var(--semantic-typography-eyebrow-font-family)";
|
|
456
|
+
readonly fontSize: "var(--semantic-typography-eyebrow-font-size)";
|
|
457
|
+
readonly fontWeight: "var(--semantic-typography-eyebrow-font-weight)";
|
|
458
|
+
readonly letterSpacing: "var(--semantic-typography-eyebrow-letter-spacing)";
|
|
459
|
+
readonly lineHeight: "var(--semantic-typography-eyebrow-line-height)";
|
|
460
|
+
};
|
|
452
461
|
readonly lineHeight: {
|
|
453
462
|
readonly none: "var(--semantic-typography-lineHeight-none)";
|
|
454
463
|
};
|
|
@@ -149,6 +149,7 @@ export declare const tokenValues: {
|
|
|
149
149
|
readonly "4xl": "36px";
|
|
150
150
|
readonly "5xl": "48px";
|
|
151
151
|
readonly "6xl": "60px";
|
|
152
|
+
readonly code: "13px";
|
|
152
153
|
};
|
|
153
154
|
readonly weight: {
|
|
154
155
|
readonly regular: "400";
|
|
@@ -162,6 +163,8 @@ export declare const tokenValues: {
|
|
|
162
163
|
readonly snug: "1.375";
|
|
163
164
|
readonly normal: "1.5";
|
|
164
165
|
readonly relaxed: "1.625";
|
|
166
|
+
readonly display: "1.05";
|
|
167
|
+
readonly body: "1.6";
|
|
165
168
|
};
|
|
166
169
|
readonly letterSpacing: {
|
|
167
170
|
readonly tight: "-0.01em";
|
|
@@ -159,41 +159,143 @@ declare const hds: {
|
|
|
159
159
|
};
|
|
160
160
|
};
|
|
161
161
|
typography: {
|
|
162
|
+
/** @deprecated hds#483 — use `typeStyles.ui`.
|
|
163
|
+
* @removeIn 1.0.0 */
|
|
162
164
|
label: React.CSSProperties;
|
|
165
|
+
/** @deprecated hds#483 — use `typeStyles.ui`.
|
|
166
|
+
* @removeIn 1.0.0 */
|
|
163
167
|
labelDescriptive: React.CSSProperties;
|
|
168
|
+
/** @deprecated hds#483 — use `typeStyles.mono`.
|
|
169
|
+
* @removeIn 1.0.0 */
|
|
164
170
|
labelTechnical: React.CSSProperties;
|
|
165
171
|
};
|
|
166
172
|
};
|
|
167
173
|
typeStyles: {
|
|
168
174
|
display: React.CSSProperties;
|
|
169
|
-
|
|
170
|
-
h2: React.CSSProperties;
|
|
171
|
-
h3: React.CSSProperties;
|
|
175
|
+
title: React.CSSProperties;
|
|
172
176
|
body: React.CSSProperties;
|
|
173
177
|
ui: React.CSSProperties;
|
|
174
|
-
eyebrow: React.CSSProperties;
|
|
175
|
-
mono: React.CSSProperties;
|
|
176
|
-
small: React.CSSProperties;
|
|
177
178
|
caption: React.CSSProperties;
|
|
179
|
+
mono: React.CSSProperties;
|
|
180
|
+
/**
|
|
181
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
182
|
+
* @removeIn 1.0.0
|
|
183
|
+
*/
|
|
184
|
+
h1: React.CSSProperties;
|
|
185
|
+
/**
|
|
186
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
187
|
+
* @removeIn 1.0.0
|
|
188
|
+
*/
|
|
189
|
+
h2: React.CSSProperties;
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
192
|
+
* @removeIn 1.0.0
|
|
193
|
+
*/
|
|
194
|
+
h3: React.CSSProperties;
|
|
195
|
+
/**
|
|
196
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
197
|
+
* @removeIn 1.0.0
|
|
198
|
+
*/
|
|
178
199
|
heading1: React.CSSProperties;
|
|
200
|
+
/**
|
|
201
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
202
|
+
* @removeIn 1.0.0
|
|
203
|
+
*/
|
|
179
204
|
heading2: React.CSSProperties;
|
|
205
|
+
/**
|
|
206
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
207
|
+
* @removeIn 1.0.0
|
|
208
|
+
*/
|
|
180
209
|
heading3: React.CSSProperties;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
display1: React.CSSProperties;
|
|
186
|
-
display2: React.CSSProperties;
|
|
210
|
+
/**
|
|
211
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
212
|
+
* @removeIn 1.0.0
|
|
213
|
+
*/
|
|
187
214
|
headingHero: React.CSSProperties;
|
|
215
|
+
/**
|
|
216
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
217
|
+
* @removeIn 1.0.0
|
|
218
|
+
*/
|
|
188
219
|
headingSection: React.CSSProperties;
|
|
189
|
-
|
|
220
|
+
/**
|
|
221
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
222
|
+
* @removeIn 1.0.0
|
|
223
|
+
*/
|
|
224
|
+
display2: React.CSSProperties;
|
|
225
|
+
/**
|
|
226
|
+
* @deprecated hds#483 — use `typeStyles.display`.
|
|
227
|
+
* @removeIn 1.0.0
|
|
228
|
+
*/
|
|
229
|
+
displayXl: React.CSSProperties;
|
|
230
|
+
/**
|
|
231
|
+
* @deprecated hds#483 — use `typeStyles.display`.
|
|
232
|
+
* @removeIn 1.0.0
|
|
233
|
+
*/
|
|
234
|
+
display1: React.CSSProperties;
|
|
235
|
+
/**
|
|
236
|
+
* @deprecated hds#483 — use `typeStyles.body`.
|
|
237
|
+
* @removeIn 1.0.0
|
|
238
|
+
*/
|
|
190
239
|
body2: React.CSSProperties;
|
|
240
|
+
/**
|
|
241
|
+
* @deprecated hds#483 — use `typeStyles.body`.
|
|
242
|
+
* @removeIn 1.0.0
|
|
243
|
+
*/
|
|
191
244
|
bodyLarge: React.CSSProperties;
|
|
245
|
+
/**
|
|
246
|
+
* @deprecated hds#483 — use `typeStyles.ui`.
|
|
247
|
+
* @removeIn 1.0.0
|
|
248
|
+
*/
|
|
249
|
+
small: React.CSSProperties;
|
|
250
|
+
/**
|
|
251
|
+
* @deprecated hds#483 — use `typeStyles.ui`.
|
|
252
|
+
* @removeIn 1.0.0
|
|
253
|
+
*/
|
|
192
254
|
bodySmall: React.CSSProperties;
|
|
193
|
-
|
|
194
|
-
|
|
255
|
+
/**
|
|
256
|
+
* @deprecated hds#483 — use `typeStyles.ui`.
|
|
257
|
+
* @removeIn 1.0.0
|
|
258
|
+
*/
|
|
195
259
|
label: React.CSSProperties;
|
|
260
|
+
/**
|
|
261
|
+
* @deprecated hds#483 — use `typeStyles.ui`.
|
|
262
|
+
* @removeIn 1.0.0
|
|
263
|
+
*/
|
|
196
264
|
labelDescriptive: React.CSSProperties;
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated hds#483 — use `typeStyles.caption`.
|
|
267
|
+
* @removeIn 1.0.0
|
|
268
|
+
*/
|
|
269
|
+
eyebrow: React.CSSProperties;
|
|
270
|
+
/**
|
|
271
|
+
* @deprecated hds#483 — use `typeStyles.caption`.
|
|
272
|
+
* @removeIn 1.0.0
|
|
273
|
+
*/
|
|
274
|
+
badge: React.CSSProperties;
|
|
275
|
+
/**
|
|
276
|
+
* @deprecated hds#483 — use `typeStyles.caption`.
|
|
277
|
+
* @removeIn 1.0.0
|
|
278
|
+
*/
|
|
279
|
+
micro: React.CSSProperties;
|
|
280
|
+
/**
|
|
281
|
+
* @deprecated hds#483 — use `typeStyles.mono`.
|
|
282
|
+
* @removeIn 1.0.0
|
|
283
|
+
*/
|
|
284
|
+
technical: React.CSSProperties;
|
|
285
|
+
/**
|
|
286
|
+
* @deprecated hds#483 — use `typeStyles.mono`.
|
|
287
|
+
* @removeIn 1.0.0
|
|
288
|
+
*/
|
|
289
|
+
monoXs: React.CSSProperties;
|
|
290
|
+
/**
|
|
291
|
+
* @deprecated hds#483 — use `typeStyles.mono`.
|
|
292
|
+
* @removeIn 1.0.0
|
|
293
|
+
*/
|
|
294
|
+
monoSm: React.CSSProperties;
|
|
295
|
+
/**
|
|
296
|
+
* @deprecated hds#483 — use `typeStyles.mono`.
|
|
297
|
+
* @removeIn 1.0.0
|
|
298
|
+
*/
|
|
197
299
|
labelTechnical: React.CSSProperties;
|
|
198
300
|
};
|
|
199
301
|
iconSize: {
|