@hirobius/design-system 0.16.0 → 0.17.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 +25 -69
- package/dist/chunks/LanguageContext-CH_bwzCq.js +83 -0
- package/dist/chunks/TokenDisplayContext-evZi_214.js +18 -0
- package/dist/chunks/activity-feed-C8_e-Btq.js +19955 -0
- package/dist/contexts.js +17 -16
- package/dist/hirobius-ui.js +3652 -23311
- package/dist/manifest.js +5 -5
- package/dist/patterns.js +423 -0
- package/dist/static.css +4 -4
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +34 -13
- package/dist/types/src/app/components/activity-feed.d.ts +6 -4
- package/dist/types/src/app/components/app-shell.d.ts +6 -4
- package/dist/types/src/app/components/asset-img.d.ts +3 -1
- package/dist/types/src/app/components/avatar-group.d.ts +3 -3
- package/dist/types/src/app/components/avatar.d.ts +3 -3
- package/dist/types/src/app/components/badge.d.ts +3 -3
- package/dist/types/src/app/components/blockquote.d.ts +3 -3
- package/dist/types/src/app/components/breadcrumb.d.ts +3 -3
- package/dist/types/src/app/components/button-group.d.ts +3 -3
- package/dist/types/src/app/components/button.d.ts +6 -6
- package/dist/types/src/app/components/calendar.d.ts +3 -1
- package/dist/types/src/app/components/callout.d.ts +4 -4
- package/dist/types/src/app/components/card.d.ts +5 -5
- package/dist/types/src/app/components/carousel.d.ts +6 -4
- package/dist/types/src/app/components/checkbox.d.ts +3 -3
- package/dist/types/src/app/components/circular-progress.d.ts +3 -3
- package/dist/types/src/app/components/code-block.d.ts +20 -18
- package/dist/types/src/app/components/command-palette.d.ts +9 -9
- package/dist/types/src/app/components/component-instance-matrix.d.ts +1 -1
- package/dist/types/src/app/components/disclosure.d.ts +3 -3
- package/dist/types/src/app/components/divider.d.ts +4 -4
- package/dist/types/src/app/components/doc-link-card.d.ts +6 -4
- package/dist/types/src/app/components/error-pattern.d.ts +3 -1
- package/dist/types/src/app/components/field.d.ts +4 -4
- package/dist/types/src/app/components/file-input.d.ts +7 -5
- package/dist/types/src/app/components/hds-tooltip.d.ts +11 -11
- package/dist/types/src/app/components/heading-stack.d.ts +6 -6
- package/dist/types/src/app/components/hover-card.d.ts +1 -1
- package/dist/types/src/app/components/image-lightbox.d.ts +2 -0
- package/dist/types/src/app/components/inline-code.d.ts +3 -3
- package/dist/types/src/app/components/input-group.d.ts +3 -3
- package/dist/types/src/app/components/input.d.ts +5 -5
- package/dist/types/src/app/components/kbd.d.ts +3 -3
- package/dist/types/src/app/components/metadata-list.d.ts +3 -3
- package/dist/types/src/app/components/nav-group.d.ts +3 -3
- package/dist/types/src/app/components/nav-item.d.ts +10 -8
- package/dist/types/src/app/components/overflow-list.d.ts +3 -1
- package/dist/types/src/app/components/page.d.ts +3 -1
- package/dist/types/src/app/components/progress.d.ts +3 -3
- package/dist/types/src/app/components/radio.d.ts +3 -3
- package/dist/types/src/app/components/reveal.d.ts +3 -1
- package/dist/types/src/app/components/segmented-control.d.ts +31 -31
- package/dist/types/src/app/components/select.d.ts +3 -3
- package/dist/types/src/app/components/selectable-card.d.ts +3 -3
- package/dist/types/src/app/components/side-nav.d.ts +6 -4
- package/dist/types/src/app/components/skeleton.d.ts +3 -3
- package/dist/types/src/app/components/slider.d.ts +3 -3
- package/dist/types/src/app/components/spinner.d.ts +3 -3
- package/dist/types/src/app/components/stacked-card-rail.d.ts +32 -0
- package/dist/types/src/app/components/stat.d.ts +3 -3
- package/dist/types/src/app/components/status-dot.d.ts +4 -4
- package/dist/types/src/app/components/status-list-item.d.ts +3 -3
- package/dist/types/src/app/components/stepper.d.ts +6 -4
- package/dist/types/src/app/components/surface.d.ts +4 -4
- package/dist/types/src/app/components/table.d.ts +22 -11
- package/dist/types/src/app/components/tag.d.ts +4 -4
- package/dist/types/src/app/components/text.d.ts +3 -3
- package/dist/types/src/app/components/textarea.d.ts +4 -4
- package/dist/types/src/app/components/time-input.d.ts +3 -3
- package/dist/types/src/app/components/toast.d.ts +3 -3
- package/dist/types/src/app/components/toggle-button.d.ts +4 -4
- package/dist/types/src/app/components/toggle.d.ts +3 -3
- package/dist/types/src/app/components/token.d.ts +16 -16
- package/dist/types/src/app/components/toolbar.d.ts +1 -1
- package/dist/types/src/app/components/tooltip.d.ts +2 -2
- package/dist/types/src/app/components/top-nav.d.ts +3 -1
- package/dist/types/src/app/components/tree-list.d.ts +3 -1
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +36 -0
- package/dist/types/src/app/design-system/generated-token-values.d.ts +10 -10
- package/dist/types/src/app/design-system/tokens.d.ts +16 -0
- package/dist/types/src/index.d.ts +193 -8
- package/dist/types/src/patterns.d.ts +37 -0
- package/dist/variables.css +42 -22
- package/hirobius.tokens.json +178 -57
- package/package.json +12 -9
- package/public/hds-manifest.json +473 -445
- package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +0 -96
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
declare const inlineCodeVariants: (props?: {
|
|
4
|
-
density?: "compact" | "comfortable";
|
|
5
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
3
|
+
declare const inlineCodeVariants: (props?: ({
|
|
4
|
+
density?: "compact" | "comfortable" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
type InlineCodeVariantProps = VariantProps<typeof inlineCodeVariants>;
|
|
7
7
|
export type InlineCodeProps = {
|
|
8
8
|
children: ReactNode;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
-
declare const inputGroupVariants: (props?: {
|
|
9
|
-
size?: "sm" | "md" | "lg";
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
|
+
declare const inputGroupVariants: (props?: ({
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
11
|
type InputGroupVariantProps = VariantProps<typeof inputGroupVariants>;
|
|
12
12
|
/** @public */
|
|
13
13
|
export interface InputGroupProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, InputGroupVariantProps {
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
9
|
-
declare const inputVariants: (props?: {
|
|
10
|
-
size?: "sm" | "md" | "lg";
|
|
11
|
-
textStyle?: "body" | "mono";
|
|
12
|
-
invalid?: boolean;
|
|
13
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
9
|
+
declare const inputVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
+
textStyle?: "body" | "mono" | null | undefined;
|
|
12
|
+
invalid?: boolean | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
14
14
|
type InputFieldType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number';
|
|
15
15
|
/** @public */
|
|
16
16
|
export type InputSize = NonNullable<VariantProps<typeof inputVariants>['size']>;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
-
declare const kbdVariants: (props?: {
|
|
9
|
-
size?: "sm" | "md" | "lg";
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
|
+
declare const kbdVariants: (props?: ({
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
11
|
type KbdVariantProps = VariantProps<typeof kbdVariants>;
|
|
12
12
|
/** @public */
|
|
13
13
|
export interface KbdProps extends React.HTMLAttributes<HTMLElement>, KbdVariantProps {
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { type VariantProps } from 'class-variance-authority';
|
|
10
|
-
declare const metadataListVariants: (props?: {
|
|
11
|
-
orientation?: "horizontal" | "vertical";
|
|
12
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
10
|
+
declare const metadataListVariants: (props?: ({
|
|
11
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
13
13
|
type MetadataListVariantProps = VariantProps<typeof metadataListVariants>;
|
|
14
14
|
/** A single term/description pair rendered by MetadataList. */
|
|
15
15
|
export interface MetadataListItem {
|
|
@@ -7,9 +7,9 @@ type NavItem = {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
};
|
|
9
9
|
type NavGroupVariant = 'side' | 'toc';
|
|
10
|
-
declare const navGroupLabelVariants: (props?: {
|
|
11
|
-
variant?: "side" | "toc";
|
|
12
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
10
|
+
declare const navGroupLabelVariants: (props?: ({
|
|
11
|
+
variant?: "side" | "toc" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
13
13
|
export type NavGroupProps = {
|
|
14
14
|
label?: string;
|
|
15
15
|
variant?: NavGroupVariant;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, MouseEvent } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { type NavLevel } from '../lib/navLevels.js';
|
|
4
|
-
declare const navItemVariants: (props?: {
|
|
5
|
-
variant?: "side" | "toc";
|
|
6
|
-
state?: "default" | "active" | "disabled" | "focus" | "hover";
|
|
7
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
|
-
declare const navIndicatorVariants: (props?: {
|
|
9
|
-
state?: "default" | "active" | "disabled" | "focus" | "hover";
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
4
|
+
declare const navItemVariants: (props?: ({
|
|
5
|
+
variant?: "side" | "toc" | null | undefined;
|
|
6
|
+
state?: "default" | "active" | "disabled" | "focus" | "hover" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare const navIndicatorVariants: (props?: ({
|
|
9
|
+
state?: "default" | "active" | "disabled" | "focus" | "hover" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
11
|
type NavItemVariantProps = VariantProps<typeof navItemVariants>;
|
|
12
12
|
type NavVariant = NonNullable<NavItemVariantProps['variant']>;
|
|
13
13
|
type NavNativeProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'onClick'>;
|
|
@@ -25,7 +25,9 @@ export interface NavProps extends NavNativeProps {
|
|
|
25
25
|
/** Navigation callback fired before the browser follows the link. */
|
|
26
26
|
onNavigate?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
29
31
|
export declare function NavItem({ variant, label, href, active, disabled, level, onNavigate, className, style, onFocus, onMouseEnter, onMouseLeave, onPointerDown, onPointerUp, onPointerCancel, onBlur, ...rest }: NavProps): import("react/jsx-runtime").JSX.Element;
|
|
30
32
|
/** @internal — CVA variant helpers; compose via NavItem props instead. */
|
|
31
33
|
export { navItemVariants, navIndicatorVariants };
|
|
@@ -15,5 +15,7 @@ export interface OverflowListProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
15
15
|
/** Custom renderer for the overflow node. Defaults to a muted `+N` chip. */
|
|
16
16
|
renderOverflow?: (count: number) => React.ReactNode;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Renders up to `max` children followed by a `+N` overflow chip (or custom node).
|
|
20
|
+
*/
|
|
19
21
|
export declare const OverflowList: React.ForwardRefExoticComponent<OverflowListProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -38,6 +38,8 @@ export interface PageProps {
|
|
|
38
38
|
style?: CSSProperties;
|
|
39
39
|
className?: string;
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
42
44
|
export declare function Page({ children, maxWidth, paddingY, style, className, }: PageProps): import("react/jsx-runtime").JSX.Element;
|
|
43
45
|
export {};
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
9
|
-
declare const progressTrackVariants: (props?: {
|
|
10
|
-
size?: "sm" | "md" | "lg";
|
|
11
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
9
|
+
declare const progressTrackVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
12
12
|
type ProgressVariantProps = VariantProps<typeof progressTrackVariants>;
|
|
13
13
|
/** @public */
|
|
14
14
|
export interface ProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'role'>, ProgressVariantProps {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Radio — radio button with animated selection indicator.
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier primitive
|
|
5
5
|
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=36-17
|
|
6
6
|
*/
|
|
7
7
|
import type { InputHTMLAttributes } from 'react';
|
|
8
|
-
/**
|
|
8
|
+
/** Radio — radio button with animated selection indicator. */
|
|
9
9
|
export type HdsRadioDemoState = 'rest' | 'hover' | 'focused' | 'pressed' | 'disabled';
|
|
10
10
|
export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> {
|
|
11
11
|
/** Radio label displayed next to the control. */
|
|
@@ -15,4 +15,4 @@ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
15
15
|
/** Called when the radio changes. */
|
|
16
16
|
onChange: (v: boolean) => void;
|
|
17
17
|
}
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -26,5 +26,7 @@ export interface RevealProps {
|
|
|
26
26
|
/** Element rendered as the wrapper. Defaults to 'div'. */
|
|
27
27
|
as?: React.ElementType;
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
30
32
|
export declare const Reveal: React.ForwardRefExoticComponent<RevealProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
declare const segmentedControlWrapperVariants: (props?: {
|
|
3
|
-
fullWidth?: boolean;
|
|
4
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
5
|
-
declare const segmentedControlRailVariants: (props?: {
|
|
6
|
-
variant?: "primary" | "secondary";
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
9
|
-
declare const segmentedControlItemVariants: (props?: {
|
|
10
|
-
size?: "sm" | "md";
|
|
11
|
-
fullWidth?: boolean;
|
|
12
|
-
variant?: "primary" | "secondary";
|
|
13
|
-
active?: boolean;
|
|
14
|
-
interaction?: "rest" | "hover" | "pressed";
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
17
|
-
declare const segmentedControlIndicatorVariants: (props?: {
|
|
18
|
-
variant?: "primary" | "secondary";
|
|
19
|
-
active?: boolean;
|
|
20
|
-
interaction?: "rest" | "hover" | "pressed";
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
23
|
-
declare const segmentedControlDescriptionVariants: (props?: {
|
|
24
|
-
variant?: "primary" | "secondary";
|
|
25
|
-
active?: boolean;
|
|
26
|
-
interaction?: "rest" | "hover" | "pressed";
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
29
|
-
declare const segmentedControlFocusRingVariants: (props?: {
|
|
30
|
-
variant?: "primary" | "secondary";
|
|
31
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
32
|
-
declare const segmentedControlLabelVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
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
|
+
declare const segmentedControlItemVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "md" | null | undefined;
|
|
11
|
+
fullWidth?: boolean | null | undefined;
|
|
12
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
13
|
+
active?: boolean | null | undefined;
|
|
14
|
+
interaction?: "rest" | "hover" | "pressed" | null | undefined;
|
|
15
|
+
disabled?: boolean | null | undefined;
|
|
16
|
+
} & 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
33
|
type SegmentedItemVariantProps = VariantProps<typeof segmentedControlItemVariants>;
|
|
34
34
|
interface HdsSegmentedOption {
|
|
35
35
|
/** Value submitted when this option is selected. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Select — dropdown selector built on Radix Select.
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier primitive
|
|
5
5
|
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-49
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Select — dropdown selector built on Radix Select (ADR-001 Radix convention).
|
|
9
9
|
* Radix owns the listbox a11y contract: managed focus + active-descendant, typeahead,
|
|
10
10
|
* full keyboard (Home/End/PageUp-Down/wrap), Popper collision/flip positioning, and
|
|
11
11
|
* dismissal. The HDS surface is styled with the token-backed Tailwind idiom used by
|
|
@@ -26,4 +26,4 @@ export interface SelectProps {
|
|
|
26
26
|
/** Called when the user picks a different option. */
|
|
27
27
|
onChange: (v: string) => void;
|
|
28
28
|
}
|
|
29
|
-
export declare const
|
|
29
|
+
export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { type VariantProps } from 'class-variance-authority';
|
|
13
|
-
declare const selectableCardVariants: (props?: {
|
|
14
|
-
selected?: boolean;
|
|
15
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
13
|
+
declare const selectableCardVariants: (props?: ({
|
|
14
|
+
selected?: boolean | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
16
16
|
type SelectableCardVariantProps = VariantProps<typeof selectableCardVariants>;
|
|
17
17
|
/** @public */
|
|
18
18
|
export interface SelectableCardProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, 'onSelect'>, Omit<SelectableCardVariantProps, 'selected'> {
|
|
@@ -12,10 +12,12 @@ export interface SideNavProps {
|
|
|
12
12
|
indent?: boolean | number;
|
|
13
13
|
onNavigate?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
14
14
|
}
|
|
15
|
-
declare const sideNavVariants: (props?: {
|
|
16
|
-
level?: "root" | "nested";
|
|
17
|
-
state?: "default" | "active" | "disabled" | "focus" | "hover";
|
|
18
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
15
|
+
declare const sideNavVariants: (props?: ({
|
|
16
|
+
level?: "root" | "nested" | null | undefined;
|
|
17
|
+
state?: "default" | "active" | "disabled" | "focus" | "hover" | null | undefined;
|
|
18
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
19
|
+
/**
|
|
20
|
+
*/
|
|
19
21
|
export declare function SideNav({ label, href, active, disabled, titleLabel, level, indent, onNavigate, }: SideNavProps): import("react/jsx-runtime").JSX.Element;
|
|
20
22
|
/** @internal — CVA variant helper; compose via SideNav props instead. */
|
|
21
23
|
export { sideNavVariants };
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
9
|
-
declare const skeletonVariants: (props?: {
|
|
10
|
-
variant?: "text" | "rectangular" | "circular";
|
|
11
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
9
|
+
declare const skeletonVariants: (props?: ({
|
|
10
|
+
variant?: "text" | "rectangular" | "circular" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
12
12
|
type SkeletonVariantProps = VariantProps<typeof skeletonVariants>;
|
|
13
13
|
/** @public */
|
|
14
14
|
export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, SkeletonVariantProps {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Slider — range slider with label and value display.
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier primitive
|
|
5
5
|
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-265
|
|
6
6
|
*/
|
|
7
|
-
/**
|
|
7
|
+
/** Slider — range slider with label and value display. */
|
|
8
8
|
export interface SliderProps {
|
|
9
9
|
/** Slider label. */
|
|
10
10
|
label: string;
|
|
@@ -19,4 +19,4 @@ export interface SliderProps {
|
|
|
19
19
|
/** Called when the slider value changes. */
|
|
20
20
|
onChange: (v: number) => void;
|
|
21
21
|
}
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
9
|
-
declare const spinnerVariants: (props?: {
|
|
10
|
-
size?: "sm" | "md" | "lg";
|
|
11
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
9
|
+
declare const spinnerVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
12
12
|
type SpinnerVariantProps = VariantProps<typeof spinnerVariants>;
|
|
13
13
|
/** @public */
|
|
14
14
|
export interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement>, SpinnerVariantProps {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StackedCardRail — horizontally-scrolling stacked card carousel.
|
|
3
|
+
*
|
|
4
|
+
* Scroll mechanism: vertical scroll on an absolutely-positioned inner container
|
|
5
|
+
* is mapped to horizontal scroll on a sticky inner strip via a single scroll
|
|
6
|
+
* event listener. Cards use CSS scroll-driven animation (animation-timeline:
|
|
7
|
+
* view(x …)) for the stack/unstack effect where the browser supports it;
|
|
8
|
+
* a plain horizontal rail is the graceful fallback.
|
|
9
|
+
*
|
|
10
|
+
* Browser compat note:
|
|
11
|
+
* - animation-timeline: view() — Chrome 115+, Firefox 110+ (behind flag until
|
|
12
|
+
* v114), Safari 18+ (TP only as of 2025). The @supports guard ensures the
|
|
13
|
+
* stacking animation is only applied when the feature is available; all other
|
|
14
|
+
* browsers get a clean scrollable row.
|
|
15
|
+
* - :has() selector (neighbour shift on hover) — Chrome 105+, FF 121+, Safari 15.4+.
|
|
16
|
+
* Gated with @supports selector(:has(+ *)).
|
|
17
|
+
*
|
|
18
|
+
* @category Display
|
|
19
|
+
* @tier pattern
|
|
20
|
+
*/
|
|
21
|
+
export interface StackedCardRailCard {
|
|
22
|
+
id: string;
|
|
23
|
+
title: string;
|
|
24
|
+
category?: string;
|
|
25
|
+
coverImage?: string;
|
|
26
|
+
href?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface StackedCardRailProps {
|
|
29
|
+
cards: StackedCardRailCard[];
|
|
30
|
+
}
|
|
31
|
+
export declare function StackedCardRail({ cards }: StackedCardRailProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default StackedCardRail;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
-
declare const statVariants: (props?: {
|
|
9
|
-
tone?: "success" | "danger" | "warning" | "info" | "neutral";
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
|
+
declare const statVariants: (props?: ({
|
|
9
|
+
tone?: "success" | "danger" | "warning" | "info" | "neutral" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
11
|
type StatVariantProps = VariantProps<typeof statVariants>;
|
|
12
12
|
/** @public */
|
|
13
13
|
export interface StatProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, StatVariantProps {
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
-
declare const statusDotVariants: (props?: {
|
|
9
|
-
tone?: "success" | "danger" | "warning" | "info" | "neutral" | "inProgress";
|
|
10
|
-
size?: "sm" | "md" | "lg";
|
|
11
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
|
+
declare const statusDotVariants: (props?: ({
|
|
9
|
+
tone?: "success" | "danger" | "warning" | "info" | "neutral" | "inProgress" | null | undefined;
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
12
12
|
type StatusDotVariantProps = VariantProps<typeof statusDotVariants>;
|
|
13
13
|
/** @public */
|
|
14
14
|
export interface StatusDotProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'>, StatusDotVariantProps {
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
-
declare const statusListItemDotVariants: (props?: {
|
|
9
|
-
tone?: "success" | "danger" | "warning" | "info" | "neutral";
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
|
+
declare const statusListItemDotVariants: (props?: ({
|
|
9
|
+
tone?: "success" | "danger" | "warning" | "info" | "neutral" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
11
|
type StatusListItemVariantProps = VariantProps<typeof statusListItemDotVariants>;
|
|
12
12
|
/** @public */
|
|
13
13
|
export type StatusListItemTone = NonNullable<StatusListItemVariantProps['tone']>;
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
/** @internal */
|
|
9
|
-
declare const stepMarkerVariants: (props?: {
|
|
10
|
-
state?: "current" | "complete" | "upcoming";
|
|
11
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
9
|
+
declare const stepMarkerVariants: (props?: ({
|
|
10
|
+
state?: "current" | "complete" | "upcoming" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
12
12
|
/** @public */
|
|
13
13
|
export interface Step {
|
|
14
14
|
/** Visible label for the step. */
|
|
@@ -25,7 +25,9 @@ export interface StepperProps extends React.HTMLAttributes<HTMLOListElement> {
|
|
|
25
25
|
/** Layout direction. Defaults to 'horizontal'. */
|
|
26
26
|
orientation?: 'horizontal' | 'vertical';
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Step indicator for multi-step flows. Purely presentational — no navigation.
|
|
30
|
+
*/
|
|
29
31
|
export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLOListElement>>;
|
|
30
32
|
/** @internal — CVA variant helper; compose via Stepper's internal state instead. */
|
|
31
33
|
export { stepMarkerVariants };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { type CSSProperties, type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import type { PaddingOption } from './surface-padding.js';
|
|
4
|
-
declare const surfaceVariants: (props?: {
|
|
5
|
-
padding?: "none" | "item" | "px16" | "px24" | "component";
|
|
6
|
-
shadow?: boolean;
|
|
7
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
4
|
+
declare const surfaceVariants: (props?: ({
|
|
5
|
+
padding?: "none" | "item" | "px16" | "px24" | "component" | null | undefined;
|
|
6
|
+
shadow?: boolean | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
8
|
type SurfaceVariantProps = VariantProps<typeof surfaceVariants>;
|
|
9
9
|
export interface SurfaceProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style' | 'className'>, Omit<SurfaceVariantProps, 'shadow'> {
|
|
10
10
|
/** Surface content. */
|
|
@@ -5,23 +5,34 @@
|
|
|
5
5
|
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=89-300
|
|
6
6
|
*/
|
|
7
7
|
import { type ReactNode } from 'react';
|
|
8
|
-
declare const tableHeaderCellVariants: (props?: {
|
|
9
|
-
align?: "left" | "right" |
|
|
10
|
-
density?: "compact" | "comfortable";
|
|
11
|
-
sticky?: boolean;
|
|
12
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
13
|
-
declare const
|
|
14
|
-
align?: "left" | "right" |
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
declare const tableHeaderCellVariants: (props?: ({
|
|
9
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
10
|
+
density?: "compact" | "comfortable" | null | undefined;
|
|
11
|
+
sticky?: boolean | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
13
|
+
declare const tableSortButtonVariants: (props?: ({
|
|
14
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
16
|
+
declare const tableDataCellVariants: (props?: ({
|
|
17
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
18
|
+
density?: "compact" | "comfortable" | null | undefined;
|
|
19
|
+
divider?: boolean | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
18
21
|
/** @public */
|
|
19
22
|
export type TableColumnAlign = 'left' | 'center' | 'right';
|
|
23
|
+
/** @public */
|
|
24
|
+
export type TableSortDirection = 'ascending' | 'descending' | 'none';
|
|
20
25
|
export type TableColumn = {
|
|
21
26
|
key: string;
|
|
22
27
|
label: ReactNode;
|
|
23
28
|
width?: string;
|
|
24
29
|
align?: TableColumnAlign;
|
|
30
|
+
/** Renders the header as a button and sets `aria-sort` on the header cell. */
|
|
31
|
+
sortable?: boolean;
|
|
32
|
+
/** Current sort state for this column; defaults to `'none'` when `sortable`. */
|
|
33
|
+
sortDirection?: TableSortDirection;
|
|
34
|
+
/** Called when the sort button is activated (click, Enter, or Space). */
|
|
35
|
+
onSort?: () => void;
|
|
25
36
|
};
|
|
26
37
|
export type TableCellSlot = 'label' | 'value' | 'description' | 'token' | 'code' | 'custom' | 'icon' | 'badge' | 'action';
|
|
27
38
|
export type TableCell = {
|
|
@@ -49,4 +60,4 @@ export declare function Table({ columns, rows, caption, captionAction, descripti
|
|
|
49
60
|
stickyHeader?: boolean;
|
|
50
61
|
}): import("react/jsx-runtime").JSX.Element;
|
|
51
62
|
/** @internal — CVA variant helpers; compose via Table props instead. */
|
|
52
|
-
export { tableHeaderCellVariants, tableDataCellVariants };
|
|
63
|
+
export { tableHeaderCellVariants, tableDataCellVariants, tableSortButtonVariants };
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
* contract expects, just keyed by selection instead of tone/size/density.
|
|
18
18
|
*/
|
|
19
19
|
import * as React from 'react';
|
|
20
|
-
declare const tagButtonVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
21
|
-
declare const tagPillVariants: (props?: {
|
|
22
|
-
selected?: boolean;
|
|
23
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
20
|
+
declare const tagButtonVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
21
|
+
declare const tagPillVariants: (props?: ({
|
|
22
|
+
selected?: boolean | null | undefined;
|
|
23
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
24
24
|
/** @public */
|
|
25
25
|
export interface TagProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
26
26
|
/** Tag content displayed inside the pill. */
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { type CSSProperties, type ElementType, type HTMLAttributes, type ReactNode } from 'react';
|
|
9
9
|
import { type VariantProps } from 'class-variance-authority';
|
|
10
|
-
declare const textVariants: (props?: {
|
|
11
|
-
variant?: "display" | "caption" | "body" | "heading1" | "heading2" | "heading3" | "ui" | "eyebrow" | "technical" | "badge" | "docLede" | "docBody" | "docSmall" | "docCode";
|
|
12
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
10
|
+
declare const textVariants: (props?: ({
|
|
11
|
+
variant?: "display" | "caption" | "body" | "heading1" | "heading2" | "heading3" | "ui" | "eyebrow" | "technical" | "badge" | "docLede" | "docBody" | "docSmall" | "docCode" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
13
13
|
type TextVariantProps = VariantProps<typeof textVariants>;
|
|
14
14
|
type TextVariant = NonNullable<TextVariantProps['variant']>;
|
|
15
15
|
type TextTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { type VariantProps } from 'class-variance-authority';
|
|
13
|
-
declare const textareaVariants: (props?: {
|
|
14
|
-
resize?: "none" | "both" | "vertical";
|
|
15
|
-
invalid?: boolean;
|
|
16
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
13
|
+
declare const textareaVariants: (props?: ({
|
|
14
|
+
resize?: "none" | "both" | "vertical" | null | undefined;
|
|
15
|
+
invalid?: boolean | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
17
17
|
/** @public */
|
|
18
18
|
export type TextareaResize = NonNullable<VariantProps<typeof textareaVariants>['resize']>;
|
|
19
19
|
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'disabled'> {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import { type VariantProps } from 'class-variance-authority';
|
|
14
|
-
declare const hdsTimeInputVariants: (props?: {
|
|
15
|
-
size?: "sm" | "md" | "lg";
|
|
16
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
14
|
+
declare const hdsTimeInputVariants: (props?: ({
|
|
15
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
17
17
|
type TimeInputVariantProps = VariantProps<typeof hdsTimeInputVariants>;
|
|
18
18
|
/** @public */
|
|
19
19
|
export interface TimeInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'>, TimeInputVariantProps {
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
import * as React from 'react';
|
|
22
22
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
|
23
23
|
import { type VariantProps } from 'class-variance-authority';
|
|
24
|
-
declare const toastIconVariants: (props?: {
|
|
25
|
-
tone?: "success" | "danger" | "warning" | "info" | "neutral";
|
|
26
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
24
|
+
declare const toastIconVariants: (props?: ({
|
|
25
|
+
tone?: "success" | "danger" | "warning" | "info" | "neutral" | null | undefined;
|
|
26
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
27
27
|
type ToastIconVariantProps = VariantProps<typeof toastIconVariants>;
|
|
28
28
|
/** @public */
|
|
29
29
|
export type ToastTone = NonNullable<ToastIconVariantProps['tone']>;
|