@hirobius/design-system 0.8.1

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.
Files changed (111) hide show
  1. package/LICENSE/main.tsx +21 -0
  2. package/README.md +124 -0
  3. package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +95 -0
  4. package/dist/chunks/form-DnGRy27o.js +63 -0
  5. package/dist/cn.js +8 -0
  6. package/dist/contexts.js +133 -0
  7. package/dist/form.js +62 -0
  8. package/dist/hirobius-ui.js +5611 -0
  9. package/dist/manifest.js +28 -0
  10. package/dist/tokens.css +1 -0
  11. package/dist/tokens.js +693 -0
  12. package/dist/types/src/app/components/activity-feed.d.ts +43 -0
  13. package/dist/types/src/app/components/alert.d.ts +18 -0
  14. package/dist/types/src/app/components/asset-img.d.ts +54 -0
  15. package/dist/types/src/app/components/avatar.d.ts +23 -0
  16. package/dist/types/src/app/components/badge.d.ts +20 -0
  17. package/dist/types/src/app/components/breadcrumb.d.ts +26 -0
  18. package/dist/types/src/app/components/button.d.ts +37 -0
  19. package/dist/types/src/app/components/callout.d.ts +23 -0
  20. package/dist/types/src/app/components/card.d.ts +119 -0
  21. package/dist/types/src/app/components/checkbox.d.ts +20 -0
  22. package/dist/types/src/app/components/cinematic-link.d.ts +13 -0
  23. package/dist/types/src/app/components/code-block.d.ts +29 -0
  24. package/dist/types/src/app/components/combobox.d.ts +46 -0
  25. package/dist/types/src/app/components/component-instance-matrix.d.ts +21 -0
  26. package/dist/types/src/app/components/container.d.ts +31 -0
  27. package/dist/types/src/app/components/dialog.d.ts +73 -0
  28. package/dist/types/src/app/components/disclosure.d.ts +32 -0
  29. package/dist/types/src/app/components/divider.d.ts +21 -0
  30. package/dist/types/src/app/components/doc-link-card.d.ts +26 -0
  31. package/dist/types/src/app/components/empty-state.d.ts +24 -0
  32. package/dist/types/src/app/components/error-boundary.d.ts +25 -0
  33. package/dist/types/src/app/components/error-pattern.d.ts +9 -0
  34. package/dist/types/src/app/components/field.d.ts +25 -0
  35. package/dist/types/src/app/components/form.d.ts +106 -0
  36. package/dist/types/src/app/components/foundation-swatch.d.ts +39 -0
  37. package/dist/types/src/app/components/grid.d.ts +65 -0
  38. package/dist/types/src/app/components/heading-stack.d.ts +42 -0
  39. package/dist/types/src/app/components/history-card.d.ts +12 -0
  40. package/dist/types/src/app/components/icon-button.d.ts +23 -0
  41. package/dist/types/src/app/components/icon.d.ts +30 -0
  42. package/dist/types/src/app/components/info-page.d.ts +10 -0
  43. package/dist/types/src/app/components/inline-code.d.ts +12 -0
  44. package/dist/types/src/app/components/inline-link.d.ts +17 -0
  45. package/dist/types/src/app/components/input.d.ts +46 -0
  46. package/dist/types/src/app/components/lab/tokenUtils.d.ts +38 -0
  47. package/dist/types/src/app/components/menu.d.ts +56 -0
  48. package/dist/types/src/app/components/nav-group.d.ts +24 -0
  49. package/dist/types/src/app/components/nav-item.d.ts +21 -0
  50. package/dist/types/src/app/components/not-found-pattern.d.ts +1 -0
  51. package/dist/types/src/app/components/page.d.ts +43 -0
  52. package/dist/types/src/app/components/pagination.d.ts +24 -0
  53. package/dist/types/src/app/components/popover.d.ts +44 -0
  54. package/dist/types/src/app/components/progress.d.ts +25 -0
  55. package/dist/types/src/app/components/radio.d.ts +18 -0
  56. package/dist/types/src/app/components/segmented-control.d.ts +33 -0
  57. package/dist/types/src/app/components/skeleton.d.ts +25 -0
  58. package/dist/types/src/app/components/sketch.d.ts +13 -0
  59. package/dist/types/src/app/components/slider.d.ts +22 -0
  60. package/dist/types/src/app/components/spinner.d.ts +20 -0
  61. package/dist/types/src/app/components/stack.d.ts +39 -0
  62. package/dist/types/src/app/components/stat.d.ts +24 -0
  63. package/dist/types/src/app/components/status-list-item.d.ts +25 -0
  64. package/dist/types/src/app/components/status-tile.d.ts +22 -0
  65. package/dist/types/src/app/components/stepper-field.d.ts +13 -0
  66. package/dist/types/src/app/components/surface-padding.d.ts +18 -0
  67. package/dist/types/src/app/components/surface.d.ts +30 -0
  68. package/dist/types/src/app/components/table.d.ts +40 -0
  69. package/dist/types/src/app/components/tabs.d.ts +27 -0
  70. package/dist/types/src/app/components/tag.d.ts +32 -0
  71. package/dist/types/src/app/components/text-lockup.d.ts +38 -0
  72. package/dist/types/src/app/components/text.d.ts +26 -0
  73. package/dist/types/src/app/components/tile-grid.d.ts +17 -0
  74. package/dist/types/src/app/components/toast.d.ts +56 -0
  75. package/dist/types/src/app/components/toggle.d.ts +18 -0
  76. package/dist/types/src/app/components/token.d.ts +59 -0
  77. package/dist/types/src/app/components/tooltip.d.ts +33 -0
  78. package/dist/types/src/app/context/DemoStateContext.d.ts +21 -0
  79. package/dist/types/src/app/context/FontContext.d.ts +4 -0
  80. package/dist/types/src/app/context/LanguageContext.d.ts +23 -0
  81. package/dist/types/src/app/context/RouterContext.d.ts +61 -0
  82. package/dist/types/src/app/context/TenantContext.d.ts +29 -0
  83. package/dist/types/src/app/context/ThemeContext.d.ts +18 -0
  84. package/dist/types/src/app/context/TokenDisplayContext.d.ts +11 -0
  85. package/dist/types/src/app/context/index.d.ts +19 -0
  86. package/dist/types/src/app/data/manifest-types.d.ts +128 -0
  87. package/dist/types/src/app/design-system/generated-token-refs.d.ts +586 -0
  88. package/dist/types/src/app/design-system/generated-token-values.d.ts +223 -0
  89. package/dist/types/src/app/design-system/theme.d.ts +32 -0
  90. package/dist/types/src/app/design-system/tokens.d.ts +333 -0
  91. package/dist/types/src/app/hooks/useFocusVisible.d.ts +9 -0
  92. package/dist/types/src/app/hooks/useInteractionState.d.ts +27 -0
  93. package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +21 -0
  94. package/dist/types/src/app/layouts/DocLayout.d.ts +16 -0
  95. package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +6 -0
  96. package/dist/types/src/app/lib/nav-active.d.ts +16 -0
  97. package/dist/types/src/app/lib/navLevels.d.ts +4 -0
  98. package/dist/types/src/app/pages/hds/HdsSystemDocLayout.d.ts +7 -0
  99. package/dist/types/src/form/hds-form.d.ts +61 -0
  100. package/dist/types/src/form/index.d.ts +30 -0
  101. package/dist/types/src/form/use-hds-form.d.ts +23 -0
  102. package/dist/types/src/index.d.ts +2276 -0
  103. package/dist/types/src/lib/deprecation.d.ts +4 -0
  104. package/dist/types/src/lib/manifest-entry.d.ts +3 -0
  105. package/dist/types/src/lib/utils.d.ts +3 -0
  106. package/dist/variables.css +461 -0
  107. package/hirobius.tokens.json +2220 -0
  108. package/package.json +366 -0
  109. package/protocol/envelope.mjs +201 -0
  110. package/protocol/figma-snapshot.schema.json +190 -0
  111. package/public/hds-manifest.json +11230 -0
@@ -0,0 +1,24 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import { type NavLevel } from '../lib/navLevels';
3
+ import { NavItem } from './nav-item';
4
+ type NavItem = {
5
+ path: string;
6
+ label: string;
7
+ disabled?: boolean;
8
+ };
9
+ type NavGroupProps = {
10
+ label?: string;
11
+ variant?: 'side' | 'toc';
12
+ level?: NavLevel;
13
+ items?: NavItem[];
14
+ children?: ReactNode;
15
+ collapsible?: boolean;
16
+ onNavigate?: () => void;
17
+ getExact?: (item: NavItem) => boolean;
18
+ className?: string;
19
+ style?: CSSProperties;
20
+ contentStyle?: CSSProperties;
21
+ };
22
+ /** @public */
23
+ export declare function NavGroup({ label, variant, level, items, children, collapsible, onNavigate, getExact, className, style, contentStyle, }: NavGroupProps): import("react/jsx-runtime").JSX.Element;
24
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { AnchorHTMLAttributes, MouseEvent } from 'react';
2
+ import { type NavLevel } from '../lib/navLevels';
3
+ type NavVariant = 'side' | 'toc';
4
+ type NavNativeProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'onClick'>;
5
+ interface NavProps extends NavNativeProps {
6
+ /** Visual layout variant for side nav or table of contents usage. */
7
+ variant?: NavVariant;
8
+ /** Text label displayed inside the navigation row. */
9
+ label: string;
10
+ /** Marks the item as the current route. */
11
+ active?: boolean;
12
+ /** Disables interaction and muted the nav row. */
13
+ disabled?: boolean;
14
+ /** Visual hierarchy level for the navigation row. */
15
+ level?: NavLevel;
16
+ /** Navigation callback fired before the browser follows the link. */
17
+ onNavigate?: (event: MouseEvent<HTMLAnchorElement>) => void;
18
+ }
19
+ /** @public */
20
+ 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;
21
+ export {};
@@ -0,0 +1 @@
1
+ export declare function NotFoundPattern(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Page — standard page shell.
3
+ * @category Layout
4
+ * @tier primitive
5
+ *
6
+ * Wraps page content in Container (width constraint) and applies the
7
+ * canonical vertical padding so content breathes against the viewport edges
8
+ * on scroll. Use as the outermost element of any new page so vertical rhythm
9
+ * is consistent across the system without per-page reinvention.
10
+ *
11
+ * Footer: every page mounted under HDSLayout (the standard route shell) gets
12
+ * a shared footer rendered after this component's content, with bottom space
13
+ * below the footer owned by the layout shell. Page intentionally does not
14
+ * render its own footer — the shell is the single source of truth.
15
+ *
16
+ * Use Container directly only for full-bleed surfaces (sketches, hero
17
+ * sections, embedded canvases) where the page owns its own vertical padding.
18
+ *
19
+ * Usage:
20
+ * <Page>
21
+ * <Stack direction="column" gap="spacious">...</Stack>
22
+ * </Page>
23
+ *
24
+ * <Page maxWidth="content" paddingY="compact">
25
+ * <article>...</article>
26
+ * </Page>
27
+ */
28
+ import type { ReactNode, CSSProperties } from 'react';
29
+ type MaxWidth = 'content' | 'max';
30
+ type PaddingY = 'default' | 'compact' | 'none';
31
+ interface PageProps {
32
+ children: ReactNode;
33
+ /** Max width: 'content' (760px for prose) | 'max' (1200px). Defaults to 'max'. */
34
+ maxWidth?: MaxWidth;
35
+ /** Vertical padding token: 'default' (48/64) | 'compact' (24/32) | 'none'. Defaults to 'default'. */
36
+ paddingY?: PaddingY;
37
+ /** Escape hatch for narrow page-specific adjustments. */
38
+ style?: CSSProperties;
39
+ className?: string;
40
+ }
41
+ /** @public */
42
+ export declare function Page({ children, maxWidth, paddingY, style, className, }: PageProps): import("react/jsx-runtime").JSX.Element;
43
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Pagination - paged navigation control with truncation.
3
+ * @category Navigation
4
+ * @tier pattern
5
+ */
6
+ import * as React from 'react';
7
+ type PageToken = number | 'ellipsis';
8
+ export declare function paginationRange(page: number, count: number, siblingCount?: number): PageToken[];
9
+ /** @public */
10
+ export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {
11
+ /** Current page (1-based). */
12
+ page: number;
13
+ /** Total number of pages. */
14
+ count: number;
15
+ /** Fired with the next page when a control is activated. */
16
+ onPageChange: (page: number) => void;
17
+ /** Pages shown either side of the current page before truncating. */
18
+ siblingCount?: number;
19
+ /** Accessible label for the nav landmark. */
20
+ label?: string;
21
+ }
22
+ /** Paged navigation with first/last anchors, sibling pages, and ellipses. */
23
+ export declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
24
+ export {};
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Popover — floating surface anchored to a trigger (shadcn baseline, compound parts).
3
+ * @category Overlays
4
+ * @tier primitive
5
+ * @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
6
+ *
7
+ * Radix Popover (@radix-ui/react-popover) themed with role tokens. Provides
8
+ * focus management, outside-click + ESC dismissal, collision-aware positioning,
9
+ * and portal mounting out of the box.
10
+ *
11
+ * <Popover>
12
+ * <Popover.Trigger asChild>
13
+ * <Button>Open</Button>
14
+ * </Popover.Trigger>
15
+ * <Popover.Content>
16
+ * …content…
17
+ * </Popover.Content>
18
+ * </Popover>
19
+ *
20
+ * Surface uses role.popover (semantic.color.surface.overlay via the `popover`
21
+ * token) + shadow-overlay. Mirrors Dialog's surface treatment so overlays read
22
+ * as one family.
23
+ */
24
+ import * as React from 'react';
25
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
26
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
27
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
28
+ declare const PopoverClose: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
29
+ /** @public */
30
+ export type PopoverContentProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>;
31
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
32
+ interface PopoverComponent extends React.FC<React.ComponentProps<typeof PopoverPrimitive.Root>> {
33
+ Trigger: typeof PopoverTrigger;
34
+ Anchor: typeof PopoverAnchor;
35
+ Content: typeof PopoverContent;
36
+ Close: typeof PopoverClose;
37
+ }
38
+ /**
39
+ * Popover root + parts. Controlled via `open`/`onOpenChange`, or uncontrolled
40
+ * with `defaultOpen`.
41
+ * @public
42
+ */
43
+ declare const Popover: PopoverComponent;
44
+ export { Popover };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Progress - linear progress bar (determinate or indeterminate).
3
+ * @category Feedback
4
+ * @tier primitive
5
+ */
6
+ import * as React from 'react';
7
+ import { type VariantProps } from 'class-variance-authority';
8
+ declare const progressTrackVariants: (props?: {
9
+ size?: "sm" | "md" | "lg";
10
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
11
+ type ProgressVariantProps = VariantProps<typeof progressTrackVariants>;
12
+ /** @public */
13
+ export interface ProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'role'>, ProgressVariantProps {
14
+ /**
15
+ * Completion 0–100. Omit (or pass null) for an indeterminate bar that
16
+ * animates until the work completes.
17
+ */
18
+ value?: number | null;
19
+ /** Accessible label for the progress bar. */
20
+ label?: string;
21
+ }
22
+ /** Linear progress. Determinate when `value` is a number, else indeterminate. */
23
+ export declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
24
+ /** @internal — CVA variant helper; compose via Progress props instead. */
25
+ export { progressTrackVariants };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * HdsRadio — radio button with animated selection indicator.
3
+ * @category Inputs
4
+ * @tier primitive
5
+ */
6
+ import type { InputHTMLAttributes } from 'react';
7
+ /** HdsRadio — radio button with animated selection indicator. */
8
+ export type HdsRadioDemoState = 'rest' | 'hover' | 'focused' | 'pressed' | 'disabled';
9
+ interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> {
10
+ /** Radio label displayed next to the control. */
11
+ label: string;
12
+ /** Current checked state. */
13
+ checked: boolean;
14
+ /** Called when the radio changes. */
15
+ onChange: (v: boolean) => void;
16
+ }
17
+ export declare const HdsRadio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
18
+ export {};
@@ -0,0 +1,33 @@
1
+ interface HdsSegmentedOption {
2
+ /** Value submitted when this option is selected. */
3
+ value: string;
4
+ /** Visible label for the option. */
5
+ label: string;
6
+ /** Optional supporting description shown below the label. */
7
+ description?: string;
8
+ }
9
+ interface SegmentedControlProps {
10
+ /** Accessible label for the control. */
11
+ label?: string;
12
+ /** Accessible label when no visible label should be rendered. */
13
+ 'aria-label'?: string;
14
+ /** Option set rendered inside the segmented rail. */
15
+ options: HdsSegmentedOption[];
16
+ /** Currently selected value. */
17
+ value: string;
18
+ /** Called when the user selects a different option. */
19
+ onChange: (value: string) => void;
20
+ /** Size on the sm/md ramp shared with Button/Input. */
21
+ size?: 'sm' | 'md';
22
+ /** Visual treatment for the rail and active segment. */
23
+ variant?: 'primary' | 'secondary';
24
+ /** Whether the control should stretch to the width of its container. */
25
+ fullWidth?: boolean;
26
+ /** Padding inside the rail container. */
27
+ railPadding?: React.CSSProperties['padding'];
28
+ /** Horizontal padding inside each segment. */
29
+ segmentPaddingX?: React.CSSProperties['paddingLeft'];
30
+ }
31
+ /** @public */
32
+ export declare const SegmentedControl: import("react").ForwardRefExoticComponent<SegmentedControlProps & import("react").RefAttributes<HTMLDivElement>>;
33
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Skeleton - placeholder shimmer for content that is still loading.
3
+ * @category Feedback
4
+ * @tier primitive
5
+ */
6
+ import * as React from 'react';
7
+ import { type VariantProps } from 'class-variance-authority';
8
+ declare const skeletonVariants: (props?: {
9
+ variant?: "text" | "rectangular" | "circular";
10
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
11
+ type SkeletonVariantProps = VariantProps<typeof skeletonVariants>;
12
+ /** @public */
13
+ export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, SkeletonVariantProps {
14
+ /** Explicit width (number → px, or any CSS length). */
15
+ width?: number | string;
16
+ /** Explicit height (number → px, or any CSS length). For `text`, defaults to 1em. */
17
+ height?: number | string;
18
+ }
19
+ /**
20
+ * Decorative loading placeholder. Marked aria-hidden — announce the loading
21
+ * state on the surrounding region (e.g. aria-busy) rather than per skeleton.
22
+ */
23
+ export declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
24
+ /** @internal — CVA variant helper; compose via Skeleton props instead. */
25
+ export { skeletonVariants };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Sketch — shared shell for generative canvases and WebGL sketches.
3
+ * @category Layout
4
+ * @tier pattern
5
+ */
6
+ import type { ReactNode } from 'react';
7
+ /** @public */
8
+ export interface SketchProps {
9
+ title: string;
10
+ children: ReactNode;
11
+ controls?: ReactNode;
12
+ }
13
+ export declare function Sketch({ title, children, controls }: SketchProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * HdsSlider — range slider with label and value display.
3
+ * @category Inputs
4
+ * @tier primitive
5
+ */
6
+ /** HdsSlider — range slider with label and value display. */
7
+ interface SliderProps {
8
+ /** Slider label. */
9
+ label: string;
10
+ /** Minimum value in the range. */
11
+ min: number;
12
+ /** Maximum value in the range. */
13
+ max: number;
14
+ /** Step increment for the range input. */
15
+ step?: number;
16
+ /** Current slider value. */
17
+ value: number;
18
+ /** Called when the slider value changes. */
19
+ onChange: (v: number) => void;
20
+ }
21
+ export declare const HdsSlider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<HTMLInputElement>>;
22
+ export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Spinner - indeterminate loading indicator.
3
+ * @category Feedback
4
+ * @tier primitive
5
+ */
6
+ import * as React from 'react';
7
+ import { type VariantProps } from 'class-variance-authority';
8
+ declare const spinnerVariants: (props?: {
9
+ size?: "sm" | "md" | "lg";
10
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
11
+ type SpinnerVariantProps = VariantProps<typeof spinnerVariants>;
12
+ /** @public */
13
+ export interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement>, SpinnerVariantProps {
14
+ /** Accessible label announced to assistive tech. Defaults to "Loading". */
15
+ label?: string;
16
+ }
17
+ /** Indeterminate spinner. Inherits the surrounding text color via currentColor. */
18
+ export declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLSpanElement>>;
19
+ /** @internal — CVA variant helper; compose via Spinner props instead. */
20
+ export { spinnerVariants };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Stack — one-dimensional layout primitive.
3
+ * @category Layout
4
+ * @tier primitive
5
+ * @ai-intent Solves vertical and horizontal rhythm with tokenized flex gaps so agents can compose sequences of content without inventing ad hoc spacer divs or margin-based stacking.
6
+ * @ai-rules Use Stack for flow spacing and simple flex alignment only. Do NOT use Stack to create card chrome, internal surface padding, or page-width constraints. Do NOT apply arbitrary margins to Stack to fake spacing between children when the gap prop should own that rhythm. Do NOT use Stack for true two-dimensional layouts that require Grid.
7
+ */
8
+ import React from 'react';
9
+ import hds from '../design-system/tokens';
10
+ type SemanticGap = 'tight' | 'normal' | 'inset' | 'spacious';
11
+ type ComponentGap = 'gap' | 'medium';
12
+ type SubgridGap = 'hairline' | 'xs' | 'gap';
13
+ type SectionGap = 'stack';
14
+ type GapOption = SemanticGap | ComponentGap | SubgridGap | SectionGap | keyof typeof hds.space;
15
+ type FlexAlign = 'start' | 'center' | 'end' | 'stretch';
16
+ type FlexJustify = 'start' | 'center' | 'end' | 'space-between';
17
+ interface StackProps {
18
+ /** Stack content rendered inside the flex wrapper. */
19
+ children: React.ReactNode;
20
+ /** Flex direction for the stack. */
21
+ direction?: 'row' | 'column';
22
+ /** Gap token: semantic (tight, normal, inset, spacious) or primitive (px4, px8, etc). Defaults to 'tight' (16px). */
23
+ gap?: GapOption;
24
+ /** Cross-axis alignment: start | center | end | stretch. */
25
+ align?: FlexAlign;
26
+ /** Main-axis distribution: start | center | end | space-between. */
27
+ justify?: FlexJustify;
28
+ /** Whether children may wrap. */
29
+ wrap?: React.CSSProperties['flexWrap'];
30
+ /** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
31
+ className?: string;
32
+ /** Escape hatch: only use for narrow layout adjustments that do not belong in the primitive API. */
33
+ style?: React.CSSProperties;
34
+ /** Element rendered as the outer wrapper. */
35
+ as?: React.ElementType;
36
+ }
37
+ /** @public */
38
+ export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
39
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @category Display
3
+ * @tier primitive
4
+ */
5
+ import * as React from 'react';
6
+ declare const TONE_CLASSES: {
7
+ readonly default: "text-foreground";
8
+ readonly success: "text-[var(--semantic-color-feedback-success)]";
9
+ readonly warning: "text-[var(--semantic-color-feedback-warning)]";
10
+ readonly danger: "text-[var(--semantic-color-feedback-error)]";
11
+ };
12
+ export type StatTone = keyof typeof TONE_CLASSES;
13
+ /** @public */
14
+ export interface StatProps extends React.HTMLAttributes<HTMLDivElement> {
15
+ label: string;
16
+ value: React.ReactNode;
17
+ sub?: React.ReactNode;
18
+ tone?: StatTone;
19
+ }
20
+ /**
21
+ * Headline metric — large value, uppercase caption label, optional sub-line.
22
+ */
23
+ export declare const Stat: React.ForwardRefExoticComponent<StatProps & React.RefAttributes<HTMLDivElement>>;
24
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @category Display
3
+ * @tier pattern
4
+ */
5
+ import * as React from 'react';
6
+ declare const DOT_TONE: {
7
+ readonly success: "bg-[var(--semantic-color-feedback-success)]";
8
+ readonly warning: "bg-[var(--semantic-color-feedback-warning)]";
9
+ readonly danger: "bg-[var(--semantic-color-feedback-error)]";
10
+ readonly info: "bg-[var(--semantic-color-content-accent)]";
11
+ readonly neutral: "bg-[var(--semantic-color-border-default)]";
12
+ };
13
+ export type StatusListItemTone = keyof typeof DOT_TONE;
14
+ /** @public */
15
+ export interface StatusListItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
16
+ tone?: StatusListItemTone;
17
+ title: React.ReactNode;
18
+ notes?: React.ReactNode[];
19
+ trailing?: React.ReactNode;
20
+ }
21
+ /**
22
+ * Status dot + title row with optional muted notes and trailing slot (e.g. badge).
23
+ */
24
+ export declare const StatusListItem: React.ForwardRefExoticComponent<StatusListItemProps & React.RefAttributes<HTMLDivElement>>;
25
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @category Display
3
+ * @tier pattern
4
+ */
5
+ import * as React from 'react';
6
+ export type StatusTileTone = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
7
+ /** @public */
8
+ export interface StatusTileProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
9
+ /** Tone metadata kept for downstream consumers (e.g., the trailing badge). The tile itself does not paint a tone-bearing rule. */
10
+ tone?: StatusTileTone;
11
+ title: React.ReactNode;
12
+ notes?: React.ReactNode[];
13
+ trailing?: React.ReactNode;
14
+ }
15
+ /**
16
+ * Block-layout sibling of StatusListItem. Renders a raised surface tile with
17
+ * title, optional muted notes, and a trailing slot for a badge or affordance.
18
+ * Status colour belongs in the trailing slot, never as a left rule on the tile
19
+ * — every tile should look the same so feedback signals stay reserved for
20
+ * genuinely interrupting states.
21
+ */
22
+ export declare const StatusTile: React.ForwardRefExoticComponent<StatusTileProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
1
+ interface StepperFieldProps {
2
+ label: string;
3
+ value: number;
4
+ min: number;
5
+ max: number;
6
+ step: number;
7
+ onChange: (value: number) => void;
8
+ inputStep?: number;
9
+ precision?: number;
10
+ }
11
+ /** @public */
12
+ export declare function StepperField({ label, value, min, max, step, onChange, inputStep, precision, }: StepperFieldProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * surface-padding — the single source of truth for the inset-padding contract
3
+ * shared by Surface and Card (D3).
4
+ *
5
+ * Both primitives expose the same 5-option padding scale. Previously each owned
6
+ * a parallel resolver (Card mapped to inline px values, Surface to CVA Tailwind
7
+ * classes) — same numbers, two declarations, free to drift. This module owns the
8
+ * option vocabulary + the resolved values; Card consumes the values inline.
9
+ *
10
+ * Surface keeps its CVA `p-[…]` class literals (Tailwind's JIT only generates CSS
11
+ * for class strings it can see in source), but types its variant against
12
+ * `PaddingOption` here so the two stay in lockstep.
13
+ */
14
+ export type PaddingOption = 'component' | 'item' | 'px16' | 'px24' | 'none';
15
+ /** Resolved CSS padding value for each option (inline-style form, used by Card). */
16
+ export declare const PADDING_VALUES: Record<PaddingOption, string>;
17
+ /** Resolve a padding option to its CSS value (falls back to 0 for safety). */
18
+ export declare function resolvePaddingValue(option: PaddingOption): string;
@@ -0,0 +1,30 @@
1
+ import React, { type CSSProperties, type HTMLAttributes, type ReactNode } from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import type { PaddingOption } from './surface-padding';
4
+ declare const surfaceVariants: (props?: {
5
+ padding?: "none" | "item" | "px16" | "px24" | "component";
6
+ shadow?: boolean;
7
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
8
+ type SurfaceVariantProps = VariantProps<typeof surfaceVariants>;
9
+ interface SurfaceProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style' | 'className'>, Omit<SurfaceVariantProps, 'shadow'> {
10
+ /** Surface content. */
11
+ children?: ReactNode;
12
+ /** Padding: 'component' (24px, default) | 'item' (16px) | primitive px values | 'none' (0px). */
13
+ padding?: PaddingOption;
14
+ /** Apply the two-layer card elevation shadow for lift. */
15
+ shadow?: boolean;
16
+ /** Override CSS overflow. */
17
+ overflow?: CSSProperties['overflow'];
18
+ /** Force a theme regardless of context: 'dark' | 'light'. Defaults to context value. */
19
+ theme?: 'dark' | 'light';
20
+ /** Escape hatch: only use for narrow layout adjustments that do not belong in the primitive API. */
21
+ style?: CSSProperties;
22
+ /** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
23
+ className?: string;
24
+ /** Element rendered as the outer wrapper. Defaults to 'div'. */
25
+ as?: React.ElementType;
26
+ }
27
+ /** @public */
28
+ export declare const Surface: React.ForwardRefExoticComponent<SurfaceProps & React.RefAttributes<HTMLDivElement>>;
29
+ /** @internal — CVA variant helper; compose via Surface props instead. */
30
+ export { surfaceVariants };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Table - structured data table primitive for documentation and compact UI matrices.
3
+ * @category Display
4
+ * @tier primitive
5
+ */
6
+ import { type ReactNode } from 'react';
7
+ /** @public */
8
+ export type TableColumnAlign = 'left' | 'center' | 'right';
9
+ export type TableColumn = {
10
+ key: string;
11
+ label: ReactNode;
12
+ width?: string;
13
+ align?: TableColumnAlign;
14
+ };
15
+ export type TableCellSlot = 'label' | 'value' | 'description' | 'token' | 'code' | 'custom' | 'icon' | 'badge' | 'action';
16
+ export type TableCell = {
17
+ slot: TableCellSlot;
18
+ content: ReactNode;
19
+ align?: TableColumnAlign;
20
+ colSpan?: number;
21
+ rowSpan?: number;
22
+ };
23
+ export type TableRow = {
24
+ key?: string;
25
+ cells: TableCell[];
26
+ };
27
+ type TableDensity = 'compact' | 'comfortable';
28
+ export declare function Table({ columns, rows, caption, captionAction, description, minWidth, density, flush, stickyHeader, }: {
29
+ columns: TableColumn[];
30
+ rows: TableRow[];
31
+ caption?: ReactNode;
32
+ /** Optional action rendered to the right of the caption. */
33
+ captionAction?: ReactNode;
34
+ description?: ReactNode;
35
+ minWidth?: number | string;
36
+ density?: TableDensity;
37
+ flush?: boolean;
38
+ stickyHeader?: boolean;
39
+ }): import("react/jsx-runtime").JSX.Element;
40
+ export {};
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Tabs — Radix-backed underline tabs (Root, List, Trigger, Content).
3
+ *
4
+ * Underline pattern math:
5
+ * - TabsList carries `border-b border-border/40` (the divider, half-strength
6
+ * so it anchors the strip without competing with content).
7
+ * - TabsTrigger has `border-b-2 border-transparent -mb-px` at rest.
8
+ * The `-mb-px` offsets the trigger DOWN by 1px so the trigger sits
9
+ * on top of the list divider; the active 2px bottom border visually
10
+ * REPLACES that 1px segment instead of stacking on it.
11
+ * - Active state pairs the underline with a soft `bg-accent/5` tint that
12
+ * extends down into TabsContent — the active tab visually "claims" its
13
+ * content panel (folder-tab affordance, modern-soft).
14
+ *
15
+ * Overflow:
16
+ * TabsList is horizontally scrollable (`overflow-x-auto whitespace-nowrap`)
17
+ * for cases like /ops/atlas with 8 tabs at narrow viewports. Scrollbar
18
+ * chrome is hidden cross-browser (-webkit / firefox / IE).
19
+ *
20
+ * @category Navigation
21
+ * @tier primitive
22
+ */
23
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
24
+ export declare const Tabs: import("react").ForwardRefExoticComponent<TabsPrimitive.TabsProps & import("react").RefAttributes<HTMLDivElement>>;
25
+ export declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
26
+ export declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
27
+ export declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Tag — interactive filter and category chip.
3
+ * @category Inputs
4
+ * @tier primitive
5
+ *
6
+ * The outer <button> carries the accessible 44px hit target directly via the
7
+ * size token while the inner pill keeps the visible surface compact. Colors
8
+ * (background, border-color, color) are owned by .hds-tag-btn / .hds-tag-pill
9
+ * in theme.css so :hover transitions work — inline styles beat :hover
10
+ * selectors and would silently break the effect.
11
+ *
12
+ * Active state: brand fill via [data-active="true"] in theme.css.
13
+ * Hover states: inactive → subtle tint + brand border; active → brand-hover fill.
14
+ */
15
+ import React, { type ReactNode } from 'react';
16
+ interface TagProps {
17
+ /** Tag content displayed inside the pill. */
18
+ children: ReactNode;
19
+ /** Whether the tag is active. */
20
+ active?: boolean;
21
+ /** Click handler for toggling the tag. */
22
+ onClick?: () => void;
23
+ /** Optional class hook for parent-level styling. */
24
+ className?: string;
25
+ /** Native tooltip for explicit file/path affordance. */
26
+ title?: string;
27
+ /** Accessible label when the visible text is abbreviated. */
28
+ 'aria-label'?: string;
29
+ }
30
+ /** @public */
31
+ export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLButtonElement>>;
32
+ export {};
@@ -0,0 +1,38 @@
1
+ /**
2
+ * TextLockup - governed title-and-description pairing primitive.
3
+ * @category Display
4
+ * @tier pattern
5
+ * @ai-intent Solves recurring heading, eyebrow, and supporting-copy composition with predefined typographic pairings so agents can express hierarchy without manually tuning text stacks.
6
+ * @ai-rules Use TextLockup when content is a semantic title lockup with optional eyebrow and supporting text. Do NOT use TextLockup for arbitrary prose groups, data tables, or freeform mixed layouts. Do NOT restyle the internal type pairing with custom heading stacks when an existing size already fits. Do NOT use TextLockup to replace standalone body text or labels that do not form a title-description unit.
7
+ */
8
+ import { type ElementType, type ReactNode } from 'react';
9
+ type TextLockupSize = 'hero' | 'heroXl' | 'section' | 'metric' | 'detail' | 'numbered';
10
+ type TextLockupAlign = 'left' | 'center';
11
+ type TextLockupTitleTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
12
+ type TextLockupDescriptionTag = 'div' | 'p' | 'span';
13
+ /** @public */
14
+ export type TextLockupProps = {
15
+ /** Primary heading copy rendered by the lockup. */
16
+ title: string;
17
+ /** Supporting body copy paired with the title. */
18
+ description?: ReactNode;
19
+ /** Optional overline or category cue displayed above the title. */
20
+ eyebrow?: string;
21
+ /** Preset controlling title and body type pairing. */
22
+ size: TextLockupSize;
23
+ /** Horizontal alignment for the text pair. */
24
+ align?: TextLockupAlign;
25
+ /**
26
+ * When provided on the `numbered` size, renders a copy-anchor action
27
+ * next to the title on hover. Should match the section's DOM id.
28
+ */
29
+ id?: string;
30
+ /** Override the semantic wrapper while preserving the governed layout styles. */
31
+ as?: ElementType;
32
+ /** Override the title tag without altering the visual type ramp. */
33
+ titleAs?: TextLockupTitleTag;
34
+ /** Override the description tag without altering the visual type ramp. */
35
+ descriptionAs?: TextLockupDescriptionTag;
36
+ };
37
+ export declare const TextLockup: import("react").ForwardRefExoticComponent<TextLockupProps & import("react").RefAttributes<HTMLElement>>;
38
+ export {};