@hirobius/design-system 0.15.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 +26 -70
- 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 +3590 -21800
- package/dist/manifest.js +11 -11
- 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 +74 -35
- 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/cinematic-link.d.ts +7 -1
- 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 +8 -2
- 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/foundation-swatch.d.ts +6 -0
- 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 +29 -0
- 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/sketch.d.ts +6 -0
- 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 +23 -17
- 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 +39 -6
- package/dist/types/src/app/design-system/generated-token-values.d.ts +12 -16
- package/dist/types/src/app/design-system/tokens.d.ts +16 -5
- package/dist/types/src/app/layouts/DocLayout.d.ts +0 -2
- package/dist/types/src/app/layouts/HdsDocsShell.d.ts +72 -0
- package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +8 -1
- package/dist/types/src/index.d.ts +216 -39
- package/dist/types/src/patterns.d.ts +37 -0
- package/dist/variables.css +100 -28
- package/hirobius.tokens.json +199 -88
- package/package.json +43 -28
- package/public/hds-manifest.json +1916 -601
- package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +0 -96
- /package/dist/types/src/app/components/{lab/tokenUtils.d.ts → tokenUtils.d.ts} +0 -0
|
@@ -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']>;
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
17
17
|
import { type VariantProps } from 'class-variance-authority';
|
|
18
|
-
declare const hdsToggleButtonVariants: (props?: {
|
|
19
|
-
variant?: "secondary" | "ghost";
|
|
20
|
-
size?: "sm" | "md" | "lg";
|
|
21
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
18
|
+
declare const hdsToggleButtonVariants: (props?: ({
|
|
19
|
+
variant?: "secondary" | "ghost" | null | undefined;
|
|
20
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
22
22
|
type ToggleButtonVariantProps = VariantProps<typeof hdsToggleButtonVariants>;
|
|
23
23
|
/** @public */
|
|
24
24
|
export interface ToggleButtonProps extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, ToggleButtonVariantProps {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Toggle — boolean on/off toggle with animated thumb.
|
|
3
3
|
* @category Inputs
|
|
4
4
|
* @tier primitive
|
|
5
5
|
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=37-19
|
|
6
6
|
*/
|
|
7
7
|
import type { InputHTMLAttributes } from 'react';
|
|
8
|
-
/**
|
|
8
|
+
/** Toggle — boolean on/off toggle with animated thumb. */
|
|
9
9
|
export type HdsToggleDemoState = 'rest' | 'hover' | 'focused' | 'pressed' | 'disabled';
|
|
10
10
|
export interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> {
|
|
11
11
|
/** Toggle label displayed next to the control. */
|
|
@@ -15,4 +15,4 @@ export interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
15
15
|
/** Called when the toggle changes. */
|
|
16
16
|
onChange: (v: boolean) => void;
|
|
17
17
|
}
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -12,22 +12,22 @@
|
|
|
12
12
|
* custom properties, same pixels, no CSS module.
|
|
13
13
|
*/
|
|
14
14
|
import React from 'react';
|
|
15
|
-
declare const tokenShellVariants: (props?: {
|
|
16
|
-
variant?: "node" | "diagram";
|
|
17
|
-
sourceNode?: boolean;
|
|
18
|
-
selected?: boolean;
|
|
19
|
-
fullWidth?: boolean;
|
|
20
|
-
asButton?: boolean;
|
|
21
|
-
nowrap?: boolean;
|
|
22
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
23
|
-
declare const tokenNodeInlineVariants: (props?: {
|
|
24
|
-
sourceNode?: boolean;
|
|
25
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
26
|
-
declare const tokenLabelVariants: (props?: {
|
|
27
|
-
sourceNode?: boolean;
|
|
28
|
-
truncateFromStart?: boolean;
|
|
29
|
-
selected?: boolean;
|
|
30
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
15
|
+
declare const tokenShellVariants: (props?: ({
|
|
16
|
+
variant?: "node" | "diagram" | null | undefined;
|
|
17
|
+
sourceNode?: boolean | null | undefined;
|
|
18
|
+
selected?: boolean | null | undefined;
|
|
19
|
+
fullWidth?: boolean | null | undefined;
|
|
20
|
+
asButton?: boolean | null | undefined;
|
|
21
|
+
nowrap?: boolean | null | undefined;
|
|
22
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
23
|
+
declare const tokenNodeInlineVariants: (props?: ({
|
|
24
|
+
sourceNode?: boolean | null | undefined;
|
|
25
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
26
|
+
declare const tokenLabelVariants: (props?: ({
|
|
27
|
+
sourceNode?: boolean | null | undefined;
|
|
28
|
+
truncateFromStart?: boolean | null | undefined;
|
|
29
|
+
selected?: boolean | null | undefined;
|
|
30
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
31
31
|
type TokenBaseProps = {
|
|
32
32
|
className?: string;
|
|
33
33
|
fullWidth?: boolean;
|
|
@@ -78,7 +78,13 @@ export type TokenProps = TokenNodeSurfaceProps | TokenDiagramProps;
|
|
|
78
78
|
* @removeIn 1.0.0) that now resolves to the same node treatment.
|
|
79
79
|
* Node content can use a left-side slot for swatches or other compact previews.
|
|
80
80
|
*/
|
|
81
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Token - reflective token specimen for unified node-based token views. The `variant` axis (node | diagram — diagram is a deprecated alias that resolves to the same node treatment) plus the `selected` / `fullWidth` / `asButton` / `nowrap` / `sourceNode` states used to be a Token.module.css `[data-*]` attribute stylesheet, with a duplicate `isSelected` branch re-painted inline on top of it. Both now live as one `cva` variant set — same `--semantic-*`/`--component-*`/`--primitive-*` custom properties, same pixels, no CSS module.
|
|
83
|
+
*
|
|
84
|
+
* @public
|
|
85
|
+
* @deprecated Token is an HDS docs/lab internal (reflective token specimen for the token/foundation doc pages), not a consumer-facing HDS surface. It will be retiered to `utility` (dropped from the published barrel) at the named major.
|
|
86
|
+
* @removeIn 1.0.0
|
|
87
|
+
*/
|
|
82
88
|
export declare function Token(props: TokenProps): import("react/jsx-runtime").JSX.Element;
|
|
83
89
|
/** @internal — CVA variant helpers; compose via Token props instead. */
|
|
84
90
|
export { tokenShellVariants, tokenNodeInlineVariants, tokenLabelVariants };
|
|
@@ -20,7 +20,7 @@ declare const ToolbarSeparator: React.ForwardRefExoticComponent<Omit<ToolbarPrim
|
|
|
20
20
|
declare const ToolbarToggleGroup: React.ForwardRefExoticComponent<(Omit<ToolbarPrimitive.ToolbarToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToolbarPrimitive.ToolbarToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
21
21
|
declare const ToolbarToggleItem: React.ForwardRefExoticComponent<Omit<ToolbarPrimitive.ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
22
22
|
declare const ToolbarLink: React.ForwardRefExoticComponent<Omit<ToolbarPrimitive.ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
23
|
-
interface ToolbarComponent extends React.FC<React.ComponentProps<typeof ToolbarPrimitive.Root>> {
|
|
23
|
+
export interface ToolbarComponent extends React.FC<React.ComponentProps<typeof ToolbarPrimitive.Root>> {
|
|
24
24
|
Button: typeof ToolbarButton;
|
|
25
25
|
Separator: typeof ToolbarSeparator;
|
|
26
26
|
ToggleGroup: typeof ToolbarToggleGroup;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @tier utility
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* ExpandTooltip — HDS image interaction tooltip
|
|
7
7
|
*
|
|
8
8
|
* A pill-shaped label (brand blue / white text) that indicates an image
|
|
9
9
|
* is expandable. Supports two render modes:
|
|
@@ -29,5 +29,5 @@ interface TooltipProps {
|
|
|
29
29
|
/** Cursor Y position in client coordinates. */
|
|
30
30
|
y?: number;
|
|
31
31
|
}
|
|
32
|
-
export declare function
|
|
32
|
+
export declare function ExpandTooltip({ visible, mode, label, x, y }: TooltipProps): import("react/jsx-runtime").JSX.Element | null;
|
|
33
33
|
export {};
|
|
@@ -17,5 +17,7 @@ export interface TopNavProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
17
17
|
/** Pins the bar to the top of its scroll container. */
|
|
18
18
|
sticky?: boolean;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Top navigation bar with brand, nav, and trailing action slots.
|
|
22
|
+
*/
|
|
21
23
|
export declare const TopNav: React.ForwardRefExoticComponent<TopNavProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -24,5 +24,7 @@ export interface TreeListProps extends Omit<React.HTMLAttributes<HTMLUListElemen
|
|
|
24
24
|
/** Called with a node's id when its label row is clicked. */
|
|
25
25
|
onSelect?: (id: string) => void;
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Renders a hierarchical `role="tree"` list; nodes with children get an expand/collapse toggle.
|
|
29
|
+
*/
|
|
28
30
|
export declare const TreeList: React.ForwardRefExoticComponent<TreeListProps & React.RefAttributes<HTMLUListElement>>;
|
|
@@ -138,7 +138,6 @@ export declare const tokenRefs: {
|
|
|
138
138
|
readonly mono: "var(--primitive-typography-family-mono)";
|
|
139
139
|
};
|
|
140
140
|
readonly size: {
|
|
141
|
-
readonly "2xs": "var(--primitive-typography-size-2xs)";
|
|
142
141
|
readonly xs: "var(--primitive-typography-size-xs)";
|
|
143
142
|
readonly sm: "var(--primitive-typography-size-sm)";
|
|
144
143
|
readonly base: "var(--primitive-typography-size-base)";
|
|
@@ -151,10 +150,8 @@ export declare const tokenRefs: {
|
|
|
151
150
|
readonly "6xl": "var(--primitive-typography-size-6xl)";
|
|
152
151
|
};
|
|
153
152
|
readonly weight: {
|
|
154
|
-
readonly light: "var(--primitive-typography-weight-light)";
|
|
155
153
|
readonly regular: "var(--primitive-typography-weight-regular)";
|
|
156
154
|
readonly medium: "var(--primitive-typography-weight-medium)";
|
|
157
|
-
readonly semibold: "var(--primitive-typography-weight-semibold)";
|
|
158
155
|
readonly bold: "var(--primitive-typography-weight-bold)";
|
|
159
156
|
};
|
|
160
157
|
readonly lineHeight: {
|
|
@@ -166,11 +163,8 @@ export declare const tokenRefs: {
|
|
|
166
163
|
readonly relaxed: "var(--primitive-typography-lineHeight-relaxed)";
|
|
167
164
|
};
|
|
168
165
|
readonly letterSpacing: {
|
|
169
|
-
readonly tighter: "var(--primitive-typography-letterSpacing-tighter)";
|
|
170
166
|
readonly tight: "var(--primitive-typography-letterSpacing-tight)";
|
|
171
167
|
readonly normal: "var(--primitive-typography-letterSpacing-normal)";
|
|
172
|
-
readonly wide: "var(--primitive-typography-letterSpacing-wide)";
|
|
173
|
-
readonly wider: "var(--primitive-typography-letterSpacing-wider)";
|
|
174
168
|
readonly caps: "var(--primitive-typography-letterSpacing-caps)";
|
|
175
169
|
};
|
|
176
170
|
};
|
|
@@ -211,9 +205,11 @@ export declare const tokenRefs: {
|
|
|
211
205
|
readonly "96": "var(--primitive-size-96)";
|
|
212
206
|
readonly interactive: {
|
|
213
207
|
readonly min: "var(--primitive-size-interactive-min)";
|
|
208
|
+
readonly minCompact: "var(--primitive-size-interactive-minCompact)";
|
|
214
209
|
};
|
|
215
210
|
readonly width: {
|
|
216
211
|
readonly "96": "var(--primitive-size-width-96)";
|
|
212
|
+
readonly "280": "var(--primitive-size-width-280)";
|
|
217
213
|
readonly "760": "var(--primitive-size-width-760)";
|
|
218
214
|
readonly "1200": "var(--primitive-size-width-1200)";
|
|
219
215
|
readonly "50ch": "var(--primitive-size-width-50ch)";
|
|
@@ -256,6 +252,7 @@ export declare const tokenRefs: {
|
|
|
256
252
|
readonly duration: "var(--hds-motion-exit-duration)";
|
|
257
253
|
readonly easing: "var(--hds-motion-exit-easing)";
|
|
258
254
|
};
|
|
255
|
+
readonly distance: "var(--semantic-motion-distance)";
|
|
259
256
|
};
|
|
260
257
|
readonly color: {
|
|
261
258
|
readonly surface: {
|
|
@@ -308,6 +305,19 @@ export declare const tokenRefs: {
|
|
|
308
305
|
};
|
|
309
306
|
};
|
|
310
307
|
readonly space: {
|
|
308
|
+
readonly scale: {
|
|
309
|
+
readonly xs: "var(--semantic-space-scale-xs)";
|
|
310
|
+
readonly sm: "var(--semantic-space-scale-sm)";
|
|
311
|
+
readonly md: "var(--semantic-space-scale-md)";
|
|
312
|
+
readonly lg: "var(--semantic-space-scale-lg)";
|
|
313
|
+
readonly xl: "var(--semantic-space-scale-xl)";
|
|
314
|
+
};
|
|
315
|
+
readonly surface: {
|
|
316
|
+
readonly padding: "var(--semantic-space-surface-padding)";
|
|
317
|
+
};
|
|
318
|
+
readonly region: {
|
|
319
|
+
readonly gutter: "var(--semantic-space-region-gutter)";
|
|
320
|
+
};
|
|
311
321
|
readonly subgrid: {
|
|
312
322
|
readonly hairline: "var(--semantic-space-subgrid-hairline)";
|
|
313
323
|
readonly xs: "var(--semantic-space-subgrid-xs)";
|
|
@@ -335,6 +345,7 @@ export declare const tokenRefs: {
|
|
|
335
345
|
readonly gap: "var(--semantic-space-sidebar-gap)";
|
|
336
346
|
readonly sectionGap: "var(--semantic-space-sidebar-sectionGap)";
|
|
337
347
|
readonly railPadding: "var(--semantic-space-sidebar-railPadding)";
|
|
348
|
+
readonly railWidth: "var(--semantic-space-sidebar-railWidth)";
|
|
338
349
|
};
|
|
339
350
|
};
|
|
340
351
|
readonly layout: {
|
|
@@ -454,6 +465,7 @@ export declare const tokenRefs: {
|
|
|
454
465
|
};
|
|
455
466
|
readonly radius: {
|
|
456
467
|
readonly action: "var(--semantic-radius-action)";
|
|
468
|
+
readonly control: "var(--semantic-radius-control)";
|
|
457
469
|
};
|
|
458
470
|
readonly borderWidth: {
|
|
459
471
|
readonly default: "var(--semantic-borderWidth-default)";
|
|
@@ -486,6 +498,27 @@ export declare const tokenRefs: {
|
|
|
486
498
|
readonly border: "var(--semantic-elevation-overlay-border)";
|
|
487
499
|
};
|
|
488
500
|
};
|
|
501
|
+
readonly size: {
|
|
502
|
+
readonly control: {
|
|
503
|
+
readonly sm: "var(--semantic-size-control-sm)";
|
|
504
|
+
readonly md: "var(--semantic-size-control-md)";
|
|
505
|
+
readonly lg: "var(--semantic-size-control-lg)";
|
|
506
|
+
};
|
|
507
|
+
readonly icon: {
|
|
508
|
+
readonly sm: "var(--semantic-size-icon-sm)";
|
|
509
|
+
readonly md: "var(--semantic-size-icon-md)";
|
|
510
|
+
readonly lg: "var(--semantic-size-icon-lg)";
|
|
511
|
+
};
|
|
512
|
+
readonly avatar: "var(--semantic-size-avatar)";
|
|
513
|
+
readonly row: {
|
|
514
|
+
readonly compact: "var(--semantic-size-row-compact)";
|
|
515
|
+
readonly comfortable: "var(--semantic-size-row-comfortable)";
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
readonly zIndex: {
|
|
519
|
+
readonly control: "var(--semantic-zIndex-control)";
|
|
520
|
+
readonly sticky: "var(--semantic-zIndex-sticky)";
|
|
521
|
+
};
|
|
489
522
|
};
|
|
490
523
|
readonly component: {
|
|
491
524
|
readonly nav: {
|
|
@@ -139,23 +139,20 @@ export declare const tokenValues: {
|
|
|
139
139
|
readonly mono: readonly ["Geist Mono", "Courier New", "monospace"];
|
|
140
140
|
};
|
|
141
141
|
readonly size: {
|
|
142
|
-
readonly
|
|
143
|
-
readonly
|
|
144
|
-
readonly
|
|
145
|
-
readonly
|
|
146
|
-
readonly
|
|
147
|
-
readonly
|
|
148
|
-
readonly "
|
|
149
|
-
readonly "
|
|
150
|
-
readonly "
|
|
151
|
-
readonly "
|
|
152
|
-
readonly "6xl": "80px";
|
|
142
|
+
readonly xs: "12px";
|
|
143
|
+
readonly sm: "14px";
|
|
144
|
+
readonly base: "16px";
|
|
145
|
+
readonly lg: "18px";
|
|
146
|
+
readonly xl: "20px";
|
|
147
|
+
readonly "2xl": "24px";
|
|
148
|
+
readonly "3xl": "30px";
|
|
149
|
+
readonly "4xl": "36px";
|
|
150
|
+
readonly "5xl": "48px";
|
|
151
|
+
readonly "6xl": "60px";
|
|
153
152
|
};
|
|
154
153
|
readonly weight: {
|
|
155
|
-
readonly light: "300";
|
|
156
154
|
readonly regular: "400";
|
|
157
155
|
readonly medium: "500";
|
|
158
|
-
readonly semibold: "600";
|
|
159
156
|
readonly bold: "700";
|
|
160
157
|
};
|
|
161
158
|
readonly lineHeight: {
|
|
@@ -167,11 +164,8 @@ export declare const tokenValues: {
|
|
|
167
164
|
readonly relaxed: "1.625";
|
|
168
165
|
};
|
|
169
166
|
readonly letterSpacing: {
|
|
170
|
-
readonly tighter: "-0.02em";
|
|
171
167
|
readonly tight: "-0.01em";
|
|
172
168
|
readonly normal: "0em";
|
|
173
|
-
readonly wide: "0.01em";
|
|
174
|
-
readonly wider: "0.02em";
|
|
175
169
|
readonly caps: "0.06em";
|
|
176
170
|
};
|
|
177
171
|
};
|
|
@@ -212,9 +206,11 @@ export declare const tokenValues: {
|
|
|
212
206
|
readonly "96": "96px";
|
|
213
207
|
readonly interactive: {
|
|
214
208
|
readonly min: "44px";
|
|
209
|
+
readonly minCompact: "24px";
|
|
215
210
|
};
|
|
216
211
|
readonly width: {
|
|
217
212
|
readonly "96": "96px";
|
|
213
|
+
readonly "280": "280px";
|
|
218
214
|
readonly "760": "760px";
|
|
219
215
|
readonly "1200": "1200px";
|
|
220
216
|
readonly "50ch": "50ch";
|
|
@@ -67,7 +67,6 @@ declare const hds: {
|
|
|
67
67
|
fontFamily: string;
|
|
68
68
|
monoFamily: string;
|
|
69
69
|
fontSize: {
|
|
70
|
-
'2xs': string;
|
|
71
70
|
xs: string;
|
|
72
71
|
sm: string;
|
|
73
72
|
base: string;
|
|
@@ -81,7 +80,6 @@ declare const hds: {
|
|
|
81
80
|
fontWeight: {
|
|
82
81
|
regular: string;
|
|
83
82
|
medium: string;
|
|
84
|
-
semibold: string;
|
|
85
83
|
bold: string;
|
|
86
84
|
};
|
|
87
85
|
lineHeight: {
|
|
@@ -93,11 +91,8 @@ declare const hds: {
|
|
|
93
91
|
relaxed: string;
|
|
94
92
|
};
|
|
95
93
|
letterSpacing: {
|
|
96
|
-
tighter: string;
|
|
97
94
|
tight: string;
|
|
98
95
|
normal: string;
|
|
99
|
-
wide: string;
|
|
100
|
-
wider: string;
|
|
101
96
|
};
|
|
102
97
|
semantic: {
|
|
103
98
|
color: {
|
|
@@ -110,19 +105,35 @@ declare const hds: {
|
|
|
110
105
|
};
|
|
111
106
|
};
|
|
112
107
|
space: {
|
|
108
|
+
scale: {
|
|
109
|
+
xs: string;
|
|
110
|
+
sm: string;
|
|
111
|
+
md: string;
|
|
112
|
+
lg: string;
|
|
113
|
+
xl: string;
|
|
114
|
+
};
|
|
115
|
+
surface: {
|
|
116
|
+
padding: string;
|
|
117
|
+
};
|
|
118
|
+
region: {
|
|
119
|
+
gutter: string;
|
|
120
|
+
};
|
|
113
121
|
subgrid: {
|
|
114
122
|
gap: string;
|
|
115
123
|
hairline: string;
|
|
116
124
|
xs: string;
|
|
117
125
|
};
|
|
118
126
|
component: {
|
|
127
|
+
/** @deprecated hds#206 — use `semantic.space.surface.padding`. */
|
|
119
128
|
padding: string;
|
|
129
|
+
/** @deprecated hds#206 — use `semantic.space.scale.xs`. */
|
|
120
130
|
gap: string;
|
|
121
131
|
};
|
|
122
132
|
stack: {
|
|
123
133
|
gap: string;
|
|
124
134
|
};
|
|
125
135
|
layout: {
|
|
136
|
+
/** @deprecated hds#206 — use `semantic.space.region.gutter`. */
|
|
126
137
|
gutter: string;
|
|
127
138
|
gap: string;
|
|
128
139
|
section: string;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
export declare const DOC_LAYOUT_STICKY_OFFSET: string;
|
|
3
|
-
export declare const DOC_LAYOUT_STICKY_VIEWPORT_HEIGHT: string;
|
|
4
2
|
declare const DOC_LAYOUT_CONTENT_WIDTHS: {
|
|
5
3
|
readonly content: "var(--semantic-layout-width-content)";
|
|
6
4
|
readonly max: "var(--semantic-layout-width-max)";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HdsDocsShell — three-region docs shell (left nav rail, content, right TOC
|
|
3
|
+
* rail), driven by grid columns that default to 0 and are set per breakpoint.
|
|
4
|
+
* @category Layout
|
|
5
|
+
* @tier pattern
|
|
6
|
+
* @public
|
|
7
|
+
*
|
|
8
|
+
* hds#280 slice: this is the SHELL MECHANICS ONLY — the smallest shippable
|
|
9
|
+
* piece of the docs-shell epic. It ships:
|
|
10
|
+
*
|
|
11
|
+
* - A 3-column grid (`leftRail | content | rightRail`), both rail columns
|
|
12
|
+
* defaulting to `0px` and set to `semantic.space.sidebar.railWidth`
|
|
13
|
+
* (hds#280 token, our own 280px — not HeroUI's 268px) per breakpoint via
|
|
14
|
+
* Tailwind's arbitrary-property + responsive-variant syntax, the same
|
|
15
|
+
* technique Fumadocs/HeroUI uses. `md768:` brings in the left rail,
|
|
16
|
+
* `xl1280:` brings in the right rail — matching the three-stage table in
|
|
17
|
+
* hds#280.
|
|
18
|
+
* - Each rail is `position: sticky` and scrolls independently of content
|
|
19
|
+
* and of the other rail, clipped to the viewport minus `topOffset`.
|
|
20
|
+
* - `topOffset` composes (it is one CSS length a caller supplies, e.g. its
|
|
21
|
+
* own sticky header's height token) rather than a hardcoded pixel value —
|
|
22
|
+
* the first stage of the row-cascade pattern hds#280 asks for. A second
|
|
23
|
+
* region (a tabs row, hds#280's PR-comment addendum) would extend this by
|
|
24
|
+
* adding its own height into the same `calc()` chain, not by hardcoding a
|
|
25
|
+
* second offset.
|
|
26
|
+
*
|
|
27
|
+
* Deliberately NOT in this slice (tracked as proposed follow-up issues, not
|
|
28
|
+
* filed — see the PR/commit this ships in):
|
|
29
|
+
* - Below the TOC breakpoint, `rightRail` is omitted from the grid rather
|
|
30
|
+
* than becoming a reachable popover. The DoD explicitly wants a popover,
|
|
31
|
+
* not "merely hidden" — that is real, separate UI work (a sticky
|
|
32
|
+
* current-section breadcrumb bar), not shell mechanics.
|
|
33
|
+
* - Left-rail collapsible groups (chevron, active-section pill) and
|
|
34
|
+
* right-rail active-anchor styling (vertical rule, filled pill) are
|
|
35
|
+
* content the caller supplies via `leftRail`/`rightRail` — this shell
|
|
36
|
+
* does not build SideNav/Disclosure/NavItem composition for the caller.
|
|
37
|
+
* - `check-rendered-geometry` verification at every breakpoint in the DoD's
|
|
38
|
+
* table (needs a built Storybook + a live run, not exercised here).
|
|
39
|
+
* - Named CSS `grid-template-areas` (the DoD's literal ask) — this ships a
|
|
40
|
+
* 3-column grid with DOM order instead, which is behaviorally identical
|
|
41
|
+
* for a single linear row of regions and needs no separate stylesheet.
|
|
42
|
+
* Areas earn their keep once a 4th region (a tabs row spanning full
|
|
43
|
+
* width) is added — call out then, not before.
|
|
44
|
+
*/
|
|
45
|
+
import * as React from 'react';
|
|
46
|
+
/** @public */
|
|
47
|
+
export interface HdsDocsShellProps {
|
|
48
|
+
/** Left nav rail. Hidden below the `md768` breakpoint (grid column width 0). */
|
|
49
|
+
leftRail?: React.ReactNode;
|
|
50
|
+
/** Main content column. Always rendered, always fluid. */
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Right "on this page" rail. Hidden below the `xl1280` breakpoint (grid
|
|
54
|
+
* column width 0) — see the deferred-popover note above; it is REMOVED
|
|
55
|
+
* from the grid at that breakpoint, not merely visually hidden, so no
|
|
56
|
+
* hidden interactive content sits in the DOM unreachable.
|
|
57
|
+
*/
|
|
58
|
+
rightRail?: React.ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* CSS length a caller supplies for a sticky header ABOVE this shell (e.g.
|
|
61
|
+
* TopNav's height token), so each rail's sticky offset and scrollable
|
|
62
|
+
* height compose against it instead of assuming the shell owns the whole
|
|
63
|
+
* viewport. Defaults to `'0px'`.
|
|
64
|
+
*/
|
|
65
|
+
topOffset?: string;
|
|
66
|
+
/** Escape hatch: only for narrow layout adjustments that don't belong in the primitive API. */
|
|
67
|
+
className?: string;
|
|
68
|
+
/** Escape hatch: only for narrow layout adjustments that don't belong in the primitive API. */
|
|
69
|
+
style?: React.CSSProperties;
|
|
70
|
+
}
|
|
71
|
+
/** @public */
|
|
72
|
+
export declare const HdsDocsShell: React.ForwardRefExoticComponent<HdsDocsShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { type DocLayoutContentMaxWidth } from './DocLayout.js';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* HdsSystemDocLayout — single centered content column for documentation pages.
|
|
5
|
+
* Thin wrapper around DocLayout: takes only `contentSlot` and `contentMaxWidth`,
|
|
6
|
+
* with no sidebar or nav region to pass one into. Not the three-column docs
|
|
7
|
+
* shell (left rail + content + right rail) — that is tracked as its own shell
|
|
8
|
+
* component (hds#280).
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
4
11
|
export declare function HdsSystemDocLayout({ contentSlot, contentMaxWidth, }: {
|
|
5
12
|
contentSlot: ReactNode;
|
|
6
13
|
contentMaxWidth?: DocLayoutContentMaxWidth;
|