@hirobius/design-system 0.13.1 → 0.15.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/README.md +49 -6
- package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +1 -0
- package/dist/chunks/form-DnGRy27o.js +1 -0
- package/dist/contexts.js +63 -60
- package/dist/form.js +1 -0
- package/dist/hirobius-ui.js +4092 -3389
- package/dist/manifest.js +7 -7
- package/dist/scroll.js +1 -0
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/types/src/app/components/activity-feed.d.ts +6 -0
- package/dist/types/src/app/components/alert.d.ts +1 -1
- package/dist/types/src/app/components/asset-img.d.ts +1 -1
- package/dist/types/src/app/components/avatar.d.ts +1 -0
- package/dist/types/src/app/components/badge.d.ts +1 -0
- package/dist/types/src/app/components/bleed.d.ts +1 -1
- package/dist/types/src/app/components/box.d.ts +2 -2
- package/dist/types/src/app/components/breadcrumb.d.ts +1 -0
- package/dist/types/src/app/components/button.d.ts +1 -0
- package/dist/types/src/app/components/callout.d.ts +1 -0
- package/dist/types/src/app/components/card.d.ts +10 -5
- package/dist/types/src/app/components/center.d.ts +1 -1
- package/dist/types/src/app/components/checkbox.d.ts +2 -2
- package/dist/types/src/app/components/cinematic-link.d.ts +1 -2
- package/dist/types/src/app/components/cluster.d.ts +1 -1
- package/dist/types/src/app/components/code-block.d.ts +2 -1
- package/dist/types/src/app/components/combobox.d.ts +1 -0
- package/dist/types/src/app/components/container.d.ts +1 -1
- package/dist/types/src/app/components/cover.d.ts +1 -1
- package/dist/types/src/app/components/dialog.d.ts +5 -0
- package/dist/types/src/app/components/disclosure.d.ts +2 -1
- package/dist/types/src/app/components/divider.d.ts +4 -0
- package/dist/types/src/app/components/doc-link-card.d.ts +1 -1
- package/dist/types/src/app/components/empty-state.d.ts +1 -0
- package/dist/types/src/app/components/error-boundary.d.ts +1 -1
- package/dist/types/src/app/components/error-pattern.d.ts +1 -2
- package/dist/types/src/app/components/field.d.ts +1 -0
- package/dist/types/src/app/components/form.d.ts +7 -1
- package/dist/types/src/app/components/frame.d.ts +1 -1
- package/dist/types/src/app/components/grid.d.ts +2 -2
- package/dist/types/src/app/components/heading-stack.d.ts +1 -1
- package/dist/types/src/app/components/icon-button.d.ts +3 -4
- package/dist/types/src/app/components/icon.d.ts +1 -1
- package/dist/types/src/app/components/image-lightbox.d.ts +1 -2
- package/dist/types/src/app/components/inline-code.d.ts +4 -1
- package/dist/types/src/app/components/inline-link.d.ts +2 -2
- package/dist/types/src/app/components/input.d.ts +1 -0
- package/dist/types/src/app/components/menu.d.ts +1 -0
- package/dist/types/src/app/components/nav-group.d.ts +3 -3
- package/dist/types/src/app/components/nav-item.d.ts +2 -2
- package/dist/types/src/app/components/page.d.ts +1 -1
- package/dist/types/src/app/components/pagination.d.ts +1 -0
- package/dist/types/src/app/components/pin.d.ts +1 -2
- package/dist/types/src/app/components/popover.d.ts +1 -0
- package/dist/types/src/app/components/progress.d.ts +1 -0
- package/dist/types/src/app/components/radio.d.ts +2 -2
- package/dist/types/src/app/components/reveal.d.ts +1 -2
- package/dist/types/src/app/components/segmented-control.d.ts +1 -1
- package/dist/types/src/app/components/sidebar.d.ts +1 -1
- package/dist/types/src/app/components/skeleton.d.ts +1 -0
- package/dist/types/src/app/components/slider.d.ts +2 -2
- package/dist/types/src/app/components/spinner.d.ts +1 -0
- package/dist/types/src/app/components/stack.d.ts +2 -2
- package/dist/types/src/app/components/stat.d.ts +1 -0
- package/dist/types/src/app/components/status-list-item.d.ts +1 -0
- package/dist/types/src/app/components/status-tile.d.ts +1 -0
- package/dist/types/src/app/components/stepper-field.d.ts +1 -2
- package/dist/types/src/app/components/surface.d.ts +2 -2
- package/dist/types/src/app/components/switcher.d.ts +1 -1
- package/dist/types/src/app/components/table.d.ts +1 -0
- package/dist/types/src/app/components/tabs.d.ts +6 -0
- package/dist/types/src/app/components/tag.d.ts +1 -0
- package/dist/types/src/app/components/textarea.d.ts +1 -0
- package/dist/types/src/app/components/toast.d.ts +1 -0
- package/dist/types/src/app/components/toggle.d.ts +2 -2
- package/dist/types/src/app/components/token.d.ts +1 -1
- package/dist/types/src/app/context/TenantContext.d.ts +19 -5
- package/dist/types/src/app/context/index.d.ts +7 -7
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +1 -1
- package/dist/types/src/app/design-system/generated-token-values.d.ts +1 -1
- package/dist/types/src/app/design-system/theme.d.ts +1 -1
- package/dist/types/src/app/design-system/tokens.d.ts +2 -2
- package/dist/types/src/app/hooks/useHdsMotion.d.ts +1 -1
- package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +2 -3
- package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +1 -1
- package/dist/types/src/app/lib/hds-search.d.ts +1 -1
- package/dist/types/src/brand/index.d.ts +1 -1
- package/dist/types/src/form/index.d.ts +3 -3
- package/dist/types/src/index.d.ts +116 -116
- package/dist/types/src/lib/env.d.ts +31 -0
- package/dist/types/src/lib/manifest-entry.d.ts +1 -1
- package/dist/types/src/scroll/index.d.ts +2 -2
- package/hirobius.tokens.json +3 -3
- package/package.json +9 -6
- package/public/hds-manifest.json +785 -92
|
@@ -21,6 +21,10 @@ import type { ReactNode } from 'react';
|
|
|
21
21
|
* fixed HDS tone vocabulary (`neutral | danger | success | warning | info`,
|
|
22
22
|
* see docs/architecture/variant-contract.md). `'error'` remains supported
|
|
23
23
|
* here as a back-compat alias for `'danger'`; new code should use `tone`.
|
|
24
|
+
*
|
|
25
|
+
* @removeIn 1.0.0 — CHANGELOG 0.13.0 already states `status`/`ActivityStatus`
|
|
26
|
+
* go in a future major. Dropping a prop is breaking, so 1.0.0 is the first
|
|
27
|
+
* version that can carry it.
|
|
24
28
|
*/
|
|
25
29
|
export type ActivityStatus = 'success' | 'error' | 'warning' | 'info' | 'neutral';
|
|
26
30
|
/** @public */
|
|
@@ -40,6 +44,8 @@ export interface ActivityEvent {
|
|
|
40
44
|
/**
|
|
41
45
|
* @deprecated Use `tone` instead. Retained for back-compat; `'error'`
|
|
42
46
|
* resolves to the `danger` tone.
|
|
47
|
+
*
|
|
48
|
+
* @removeIn 1.0.0 — paired with ActivityStatus above; both go together.
|
|
43
49
|
*/
|
|
44
50
|
status?: ActivityStatus;
|
|
45
51
|
action?: {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
type AlertTone = 'success' | 'danger' | 'warning' | 'info';
|
|
9
|
-
interface AlertProps {
|
|
9
|
+
export interface AlertProps {
|
|
10
10
|
/** Feedback tone that controls icon, border, and surface treatment. */
|
|
11
11
|
tone?: AlertTone;
|
|
12
12
|
/** Optional heading shown above the body copy. */
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { CSSProperties } from 'react';
|
|
8
8
|
import type React from 'react';
|
|
9
9
|
type AssetImgContext = 'default' | 'lightbox' | 'detail';
|
|
10
|
-
interface AssetImgProps {
|
|
10
|
+
export interface AssetImgProps {
|
|
11
11
|
/** Image source path. */
|
|
12
12
|
src: string;
|
|
13
13
|
/** Accessible alt text. */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Avatar - user or entity image with an initials fallback.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=34-18
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Badge - compact feedback badge for neutral and semantic states.
|
|
3
3
|
* @category Feedback
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=31-15
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import React from 'react';
|
|
21
21
|
type LayoutGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
22
22
|
type BleedAxis = 'x' | 'y' | 'both';
|
|
23
|
-
interface BleedProps {
|
|
23
|
+
export interface BleedProps {
|
|
24
24
|
/** Bleed content. */
|
|
25
25
|
children: React.ReactNode;
|
|
26
26
|
/** Semantic space step to negate. Defaults to 'normal'. */
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
* See `box-sx.ts` for the pure resolver + hashing/injection engine.
|
|
28
28
|
*/
|
|
29
29
|
import React from 'react';
|
|
30
|
-
import { type SxObject } from './box-sx';
|
|
31
|
-
export type { SxObject, SxValue, ResponsiveValue, Breakpoint } from './box-sx';
|
|
30
|
+
import { type SxObject } from './box-sx.js';
|
|
31
|
+
export type { SxObject, SxValue, ResponsiveValue, Breakpoint } from './box-sx.js';
|
|
32
32
|
/** @public */
|
|
33
33
|
export interface BoxProps extends React.HTMLAttributes<HTMLElement> {
|
|
34
34
|
/** Element (or component) rendered as the outer wrapper. Defaults to 'div'. */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Breadcrumb - hierarchical navigation trail.
|
|
3
3
|
* @category Navigation
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=86-159
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
declare const crumbLabelVariants: (props?: {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
* for a hover/floating treatment on interactive cards.
|
|
45
45
|
*/
|
|
46
46
|
import * as React from 'react';
|
|
47
|
-
import hds from '../design-system/tokens';
|
|
48
|
-
import { type PaddingOption } from './surface-padding';
|
|
47
|
+
import hds from '../design-system/tokens.js';
|
|
48
|
+
import { type PaddingOption } from './surface-padding.js';
|
|
49
49
|
type GapOption = 'tight' | 'normal' | 'inset' | 'spacious' | keyof typeof hds.space;
|
|
50
50
|
/** @public */
|
|
51
51
|
export type CardVariant = 'default' | 'accent';
|
|
@@ -89,7 +89,7 @@ interface CardComponent extends React.ForwardRefExoticComponent<CardProps & Reac
|
|
|
89
89
|
Progress: typeof CardProgress;
|
|
90
90
|
Metric: typeof CardMetric;
|
|
91
91
|
}
|
|
92
|
-
interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
92
|
+
export interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
93
93
|
/** Top-of-card metadata zone — status badges, tags, eyebrow labels.
|
|
94
94
|
* Accepts <Badge>, <Tag>, or compound nodes. NEVER pass raw spans
|
|
95
95
|
* with status colors here; use the proper primitive so tone, padding,
|
|
@@ -104,7 +104,7 @@ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HT
|
|
|
104
104
|
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
105
105
|
declare const CardBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
106
106
|
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
107
|
-
interface CardProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'aria-valuemin' | 'aria-valuemax' | 'aria-valuenow'> {
|
|
107
|
+
export interface CardProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'aria-valuemin' | 'aria-valuemax' | 'aria-valuenow'> {
|
|
108
108
|
/** Current value (0..max). */
|
|
109
109
|
value: number;
|
|
110
110
|
/** Maximum value. Defaults to 100. */
|
|
@@ -118,7 +118,7 @@ interface CardProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
118
118
|
tone?: CardTone;
|
|
119
119
|
}
|
|
120
120
|
declare const CardProgress: React.ForwardRefExoticComponent<CardProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
121
|
-
interface CardMetricProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
121
|
+
export interface CardMetricProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
122
122
|
/** Uppercase eyebrow label (e.g. "Retainer", "Open tasks"). */
|
|
123
123
|
label: React.ReactNode;
|
|
124
124
|
/** Big value (e.g. "$3,500", "12", "67%"). Rendered at h2 weight. */
|
|
@@ -129,6 +129,11 @@ interface CardMetricProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
129
129
|
tone?: CardTone;
|
|
130
130
|
}
|
|
131
131
|
declare const CardMetric: React.ForwardRefExoticComponent<CardMetricProps & React.RefAttributes<HTMLDivElement>>;
|
|
132
|
+
/**
|
|
133
|
+
* Tagged per-export, not on the file block: this module exports eight
|
|
134
|
+
* components and a file-level @figma would hand all eight this one node.
|
|
135
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=39-11
|
|
136
|
+
*/
|
|
132
137
|
export declare const Card: CardComponent;
|
|
133
138
|
export { CardHeader, CardTitle, CardDescription, CardBody, CardFooter, CardProgress, CardMetric };
|
|
134
139
|
/** @internal — CVA variant helper; compose via Card props instead. */
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
type CenterMaxWidth = 'content' | 'max';
|
|
19
19
|
type LayoutGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
20
|
-
interface CenterProps {
|
|
20
|
+
export interface CenterProps {
|
|
21
21
|
/** Center content. */
|
|
22
22
|
children: React.ReactNode;
|
|
23
23
|
/** Max width: 'content' (760px prose) | 'max' (1200px full layouts). Defaults to 'content'. */
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* HdsCheckbox — custom-drawn checkbox with check / indeterminate glyph.
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=35-29
|
|
5
6
|
*/
|
|
6
7
|
import type { InputHTMLAttributes } from 'react';
|
|
7
8
|
/** HdsCheckbox — custom-drawn checkbox with check / indeterminate glyph. */
|
|
8
9
|
export type HdsCheckboxDemoState = 'rest' | 'hover' | 'focused' | 'pressed' | 'disabled';
|
|
9
|
-
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> {
|
|
10
|
+
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> {
|
|
10
11
|
/** Checkbox label displayed next to the control. */
|
|
11
12
|
label: string;
|
|
12
13
|
/** Current checked state. */
|
|
@@ -17,4 +18,3 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'typ
|
|
|
17
18
|
indeterminate?: boolean;
|
|
18
19
|
}
|
|
19
20
|
export declare const HdsCheckbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
20
|
-
export {};
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* @tier primitive
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
-
interface CinematicLinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
7
|
+
export interface CinematicLinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
8
8
|
href: string;
|
|
9
9
|
children: string;
|
|
10
10
|
}
|
|
11
11
|
/** @public */
|
|
12
12
|
export declare function CinematicLink({ href, children, style, className, ...rest }: CinematicLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -18,7 +18,7 @@ import React from 'react';
|
|
|
18
18
|
type LayoutGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
19
19
|
type ClusterAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
20
20
|
type ClusterJustify = 'start' | 'center' | 'end' | 'space-between';
|
|
21
|
-
interface ClusterProps {
|
|
21
|
+
export interface ClusterProps {
|
|
22
22
|
/** Cluster content — items that wrap as a unit. */
|
|
23
23
|
children: React.ReactNode;
|
|
24
24
|
/** Gap token applied to both axes (row and column). Defaults to 'tight'. */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* CodeBlock - code display with copy button and optional collapsible toggle.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-154
|
|
5
6
|
*/
|
|
6
7
|
declare const blockContainerVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
7
8
|
declare const inlineWrapperVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
@@ -20,7 +21,7 @@ declare const blockCodeTextVariants: (props?: import("class-variance-authority/d
|
|
|
20
21
|
declare const prePanelVariants: (props?: {
|
|
21
22
|
panelBackground?: boolean;
|
|
22
23
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
23
|
-
interface CodeBlockProps {
|
|
24
|
+
export interface CodeBlockProps {
|
|
24
25
|
/** Code string displayed in the block. */
|
|
25
26
|
code: string;
|
|
26
27
|
/** Visual presentation mode for block snippets vs inline single-line code. */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Combobox — searchable single-select (Popover + filtered listbox).
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-237
|
|
5
6
|
* @doc-exempt: no Inputs-overlay doc page yet — add demo when created
|
|
6
7
|
*
|
|
7
8
|
* A select-with-search built on the HDS Popover. The trigger shows the current
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import type { ReactNode, CSSProperties } from 'react';
|
|
26
26
|
type MaxWidthOption = 'content' | 'max';
|
|
27
|
-
interface ContainerProps {
|
|
27
|
+
export interface ContainerProps {
|
|
28
28
|
/** Container content. */
|
|
29
29
|
children: ReactNode;
|
|
30
30
|
/** Max width: 'content' (760px for prose) | 'max' (1200px for full layouts). Defaults to 'max'. */
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import React from 'react';
|
|
20
20
|
type LayoutGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
21
|
-
interface CoverProps {
|
|
21
|
+
export interface CoverProps {
|
|
22
22
|
/** The centered main region — takes the remaining space via auto margins. Also available as `centerSlot`. */
|
|
23
23
|
children?: React.ReactNode;
|
|
24
24
|
/** Alias for `children` — the centered main region. If both are set, `centerSlot` wins. */
|
|
@@ -69,5 +69,10 @@ interface DialogComponent extends React.FC<DialogProps> {
|
|
|
69
69
|
Description: typeof DialogDescription;
|
|
70
70
|
Close: typeof DialogClose;
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Tagged per-export, not on the file block: this module exports ten components
|
|
74
|
+
* and a file-level @figma would hand all ten this one node.
|
|
75
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=93-27
|
|
76
|
+
*/
|
|
72
77
|
export declare const Dialog: DialogComponent;
|
|
73
78
|
export { DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogClose, };
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* Disclosure - compact disclosure surface for optional explanatory content.
|
|
3
3
|
* @category Layout
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-453
|
|
5
6
|
*/
|
|
6
7
|
import React, { type CSSProperties, type ReactNode } from 'react';
|
|
7
8
|
type DisclosureVariant = 'panel' | 'nav' | 'card';
|
|
8
9
|
declare const disclosureTriggerVariants: (props?: {
|
|
9
10
|
variant?: "nav" | "panel" | "card";
|
|
10
11
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
11
|
-
type DisclosureProps = {
|
|
12
|
+
export type DisclosureProps = {
|
|
12
13
|
/** Summary label rendered in the disclosure trigger. Accepts a string or ReactNode for icon+label combos. */
|
|
13
14
|
label: ReactNode;
|
|
14
15
|
/** Whether the disclosure starts in the open state. */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Divider — semantic separator between content regions.
|
|
3
3
|
* @category Layout
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-26
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -17,6 +18,9 @@ export interface DividerProps extends Omit<React.HTMLAttributes<HTMLHRElement>,
|
|
|
17
18
|
/**
|
|
18
19
|
* @deprecated Use `variant="strong"` instead. Kept for backward
|
|
19
20
|
* compatibility; when set, it takes precedence over `variant`.
|
|
21
|
+
*
|
|
22
|
+
* @removeIn 1.0.0 — a boolean superseded by a variant axis. Removing it
|
|
23
|
+
* is breaking, so it waits for the major.
|
|
20
24
|
*/
|
|
21
25
|
strong?: boolean;
|
|
22
26
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* EmptyState — consistent no-data placeholder for lists, grids, and sections.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-352
|
|
5
6
|
* @ai-intent Inline empty-state placeholder so any list, grid, or section can
|
|
6
7
|
* communicate "no data yet" with consistent muted typography instead of agents
|
|
7
8
|
* inventing one-off `<p>No items.</p>` lines.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @doc-exempt: runtime safety infra, not an LLM-facing layout primitive
|
|
7
7
|
*/
|
|
8
8
|
import { Component, type ErrorInfo, type ReactNode } from 'react';
|
|
9
|
-
interface ErrorBoundaryProps {
|
|
9
|
+
export interface ErrorBoundaryProps {
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
slotLabel?: string;
|
|
12
12
|
minHeight?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ErrorPatternProps = {
|
|
1
|
+
export type ErrorPatternProps = {
|
|
2
2
|
/** Large recovery headline rendered through the animated cascade treatment. */
|
|
3
3
|
displayText?: string;
|
|
4
4
|
/** Supporting message explaining the recovery state to the user. */
|
|
@@ -6,4 +6,3 @@ type ErrorPatternProps = {
|
|
|
6
6
|
};
|
|
7
7
|
/** @public */
|
|
8
8
|
export declare function ErrorPattern({ displayText, message, }: ErrorPatternProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -32,7 +32,13 @@
|
|
|
32
32
|
import * as React from 'react';
|
|
33
33
|
/** @public */
|
|
34
34
|
export type FormProps = React.FormHTMLAttributes<HTMLFormElement>;
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Styled `<form>` with consistent vertical field rhythm.
|
|
37
|
+
*
|
|
38
|
+
* Tagged per-export: FormField and FormFieldShell share this module and have no
|
|
39
|
+
* Figma node, so a file-level @figma would claim this one for all three.
|
|
40
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=85-94
|
|
41
|
+
*/
|
|
36
42
|
export declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
|
|
37
43
|
/** @public */
|
|
38
44
|
export interface FieldWiringInput {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import React from 'react';
|
|
21
21
|
type FrameRadius = 'none' | 'sm' | 'md' | 'full';
|
|
22
|
-
interface FrameProps {
|
|
22
|
+
export interface FrameProps {
|
|
23
23
|
/** Media rendered inside the locked-ratio, clipped frame. */
|
|
24
24
|
children: React.ReactNode;
|
|
25
25
|
/** Desired width-to-height ratio, e.g. `16 / 9`. Defaults to `16 / 9`. */
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import React, { type ReactNode, type CSSProperties } from 'react';
|
|
28
28
|
type SemanticGap = 'tight' | 'normal' | 'inset' | 'spacious';
|
|
29
29
|
type GridLayout = 'fixed' | 'auto-fit';
|
|
30
|
-
interface GridProps {
|
|
30
|
+
export interface GridProps {
|
|
31
31
|
/** Grid content. */
|
|
32
32
|
children: ReactNode;
|
|
33
33
|
/** Grid layout mode: 'fixed' (responsive) or 'auto-fit' (card wrapping). Defaults to 'fixed'. */
|
|
@@ -45,7 +45,7 @@ interface GridProps {
|
|
|
45
45
|
/** Element rendered as the outer wrapper. Defaults to 'div'. */
|
|
46
46
|
as?: React.ElementType;
|
|
47
47
|
}
|
|
48
|
-
interface GridItemProps {
|
|
48
|
+
export interface GridItemProps {
|
|
49
49
|
children: ReactNode;
|
|
50
50
|
/** Number of columns this item spans (out of the grid's column count). */
|
|
51
51
|
colSpan?: number;
|
|
@@ -30,7 +30,7 @@ type HdsHeadingLevel = NonNullable<HeadingStackLevelVariantProps['level']>;
|
|
|
30
30
|
type HdsHeadingGap = NonNullable<HeadingStackGapVariantProps['gap']>;
|
|
31
31
|
type HdsHeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
32
32
|
type HdsSupportingTag = 'p' | 'div' | 'span';
|
|
33
|
-
interface HeadingStackProps {
|
|
33
|
+
export interface HeadingStackProps {
|
|
34
34
|
/** The heading content (string). */
|
|
35
35
|
heading: string;
|
|
36
36
|
/** The supporting copy rendered beneath the heading. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LucideIcon } from 'lucide-react';
|
|
2
|
-
import { ButtonProps } from './button';
|
|
3
|
-
import { IconSize } from './icon';
|
|
4
|
-
interface IconButtonProps extends Omit<ButtonProps, 'iconOnly' | 'children' | 'size'> {
|
|
2
|
+
import { ButtonProps } from './button.js';
|
|
3
|
+
import { IconSize } from './icon.js';
|
|
4
|
+
export interface IconButtonProps extends Omit<ButtonProps, 'iconOnly' | 'children' | 'size'> {
|
|
5
5
|
/** Lucide icon rendered inside the button. */
|
|
6
6
|
icon: LucideIcon;
|
|
7
7
|
/** Size token for the button itself. */
|
|
@@ -20,4 +20,3 @@ interface IconButtonProps extends Omit<ButtonProps, 'iconOnly' | 'children' | 's
|
|
|
20
20
|
*/
|
|
21
21
|
/** @public */
|
|
22
22
|
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
23
|
-
export {};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import type { LucideIcon } from 'lucide-react';
|
|
8
|
-
import hds from '../design-system/tokens';
|
|
8
|
+
import hds from '../design-system/tokens.js';
|
|
9
9
|
/** @public */
|
|
10
10
|
export type IconSize = keyof typeof hds.iconSize | number | string;
|
|
11
11
|
export interface IconProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface LightboxProps {
|
|
1
|
+
export interface LightboxProps {
|
|
2
2
|
open: boolean;
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
src: string;
|
|
@@ -10,4 +10,3 @@ interface LightboxProps {
|
|
|
10
10
|
captionLabel?: string;
|
|
11
11
|
}
|
|
12
12
|
export declare function Lightbox({ open, onClose, src, alt, naturalWidth, naturalHeight, caption, captionHref, captionLabel, }: LightboxProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -4,7 +4,7 @@ declare const inlineCodeVariants: (props?: {
|
|
|
4
4
|
density?: "compact" | "comfortable";
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
6
6
|
type InlineCodeVariantProps = VariantProps<typeof inlineCodeVariants>;
|
|
7
|
-
type InlineCodeProps = {
|
|
7
|
+
export type InlineCodeProps = {
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
style?: CSSProperties;
|
|
10
10
|
/** Layout density. `compact` tightens vertical rhythm for dense body copy and table prose. Defaults to `comfortable`. */
|
|
@@ -12,6 +12,9 @@ type InlineCodeProps = {
|
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated Use `density="compact"` instead. Kept for backward
|
|
14
14
|
* compatibility; when set, it takes precedence over `density`.
|
|
15
|
+
*
|
|
16
|
+
* @removeIn 1.0.0 — a boolean superseded by a variant axis, breaking to
|
|
17
|
+
* remove, so it waits for the major.
|
|
15
18
|
*/
|
|
16
19
|
compact?: boolean;
|
|
17
20
|
/** Show a copy-to-clipboard button. children must be a string when true. */
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* InlineLink ” inline navigation and external-link primitive for body copy.
|
|
3
3
|
* @category Navigation
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-161
|
|
5
6
|
*/
|
|
6
7
|
import React from 'react';
|
|
7
|
-
interface InlineLinkProps {
|
|
8
|
+
export interface InlineLinkProps {
|
|
8
9
|
/** Destination route or URL. */
|
|
9
10
|
href: string;
|
|
10
11
|
/** Inline label or content to render inside the link. */
|
|
@@ -14,4 +15,3 @@ interface InlineLinkProps {
|
|
|
14
15
|
}
|
|
15
16
|
/** @public */
|
|
16
17
|
export declare function InlineLink({ href, children, externalIcon }: InlineLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Input — text field primitive with label, helper, and error slots.
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=38-20
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Menu — dropdown menu (shadcn baseline, compound parts).
|
|
3
3
|
* @category Overlays
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=93-59
|
|
5
6
|
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
6
7
|
*
|
|
7
8
|
* Radix DropdownMenu (@radix-ui/react-dropdown-menu) themed with the overlay
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { type NavLevel } from '../lib/navLevels';
|
|
3
|
-
import { NavItem } from './nav-item';
|
|
2
|
+
import { type NavLevel } from '../lib/navLevels.js';
|
|
3
|
+
import { NavItem } from './nav-item.js';
|
|
4
4
|
type NavItem = {
|
|
5
5
|
path: string;
|
|
6
6
|
label: string;
|
|
@@ -10,7 +10,7 @@ type NavGroupVariant = 'side' | 'toc';
|
|
|
10
10
|
declare const navGroupLabelVariants: (props?: {
|
|
11
11
|
variant?: "side" | "toc";
|
|
12
12
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
13
|
-
type NavGroupProps = {
|
|
13
|
+
export type NavGroupProps = {
|
|
14
14
|
label?: string;
|
|
15
15
|
variant?: NavGroupVariant;
|
|
16
16
|
level?: NavLevel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, MouseEvent } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { type NavLevel } from '../lib/navLevels';
|
|
3
|
+
import { type NavLevel } from '../lib/navLevels.js';
|
|
4
4
|
declare const navItemVariants: (props?: {
|
|
5
5
|
variant?: "side" | "toc";
|
|
6
6
|
state?: "default" | "active" | "disabled" | "focus" | "hover";
|
|
@@ -11,7 +11,7 @@ declare const navIndicatorVariants: (props?: {
|
|
|
11
11
|
type NavItemVariantProps = VariantProps<typeof navItemVariants>;
|
|
12
12
|
type NavVariant = NonNullable<NavItemVariantProps['variant']>;
|
|
13
13
|
type NavNativeProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'onClick'>;
|
|
14
|
-
interface NavProps extends NavNativeProps {
|
|
14
|
+
export interface NavProps extends NavNativeProps {
|
|
15
15
|
/** Visual layout variant for side nav or table of contents usage. */
|
|
16
16
|
variant?: NavVariant;
|
|
17
17
|
/** Text label displayed inside the navigation row. */
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
import type { ReactNode, CSSProperties } from 'react';
|
|
29
29
|
type MaxWidth = 'content' | 'max';
|
|
30
30
|
type PaddingY = 'default' | 'compact' | 'none';
|
|
31
|
-
interface PageProps {
|
|
31
|
+
export interface PageProps {
|
|
32
32
|
children: ReactNode;
|
|
33
33
|
/** Max width: 'content' (760px for prose) | 'max' (1200px). Defaults to 'max'. */
|
|
34
34
|
maxWidth?: MaxWidth;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Pagination - paged navigation control with truncation.
|
|
3
3
|
* @category Navigation
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=86-194
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
type PageToken = number | 'ellipsis';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* `@hirobius/design-system/scroll`. See ADR-021.
|
|
14
14
|
*/
|
|
15
15
|
import React from 'react';
|
|
16
|
-
interface PinProps {
|
|
16
|
+
export interface PinProps {
|
|
17
17
|
/** Content pinned within the scroll region. */
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
/** Sticky offset from the top of the scroll region (CSS length). Defaults to '0'. */
|
|
@@ -27,4 +27,3 @@ interface PinProps {
|
|
|
27
27
|
}
|
|
28
28
|
/** @public */
|
|
29
29
|
export declare const Pin: React.ForwardRefExoticComponent<PinProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
export {};
|
|
@@ -2,6 +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/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=93-32
|
|
5
6
|
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
6
7
|
*
|
|
7
8
|
* Radix Popover (@radix-ui/react-popover) themed with role tokens. Provides
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Progress - linear progress bar (determinate or indeterminate).
|
|
3
3
|
* @category Feedback
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=88-91
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* HdsRadio — radio button with animated selection indicator.
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=36-17
|
|
5
6
|
*/
|
|
6
7
|
import type { InputHTMLAttributes } from 'react';
|
|
7
8
|
/** HdsRadio — radio button with animated selection indicator. */
|
|
8
9
|
export type HdsRadioDemoState = 'rest' | 'hover' | 'focused' | 'pressed' | 'disabled';
|
|
9
|
-
interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> {
|
|
10
|
+
export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> {
|
|
10
11
|
/** Radio label displayed next to the control. */
|
|
11
12
|
label: string;
|
|
12
13
|
/** Current checked state. */
|
|
@@ -15,4 +16,3 @@ interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'
|
|
|
15
16
|
onChange: (v: boolean) => void;
|
|
16
17
|
}
|
|
17
18
|
export declare const HdsRadio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
18
|
-
export {};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import React from 'react';
|
|
16
16
|
export type RevealAnimation = 'fade' | 'fade-up' | 'fade-down' | 'scale';
|
|
17
|
-
interface RevealProps {
|
|
17
|
+
export interface RevealProps {
|
|
18
18
|
/** Content revealed as it scrolls into view. */
|
|
19
19
|
children: React.ReactNode;
|
|
20
20
|
/** Entrance animation. Defaults to 'fade-up'. */
|
|
@@ -28,4 +28,3 @@ interface RevealProps {
|
|
|
28
28
|
}
|
|
29
29
|
/** @public */
|
|
30
30
|
export declare const Reveal: React.ForwardRefExoticComponent<RevealProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
-
export {};
|