@hirobius/design-system 0.19.0 → 0.20.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.
Files changed (144) hide show
  1. package/CONSUMING.md +9 -6
  2. package/DESIGN.md +7 -5
  3. package/README.md +14 -11
  4. package/codemods/hds-prefix.mjs +231 -0
  5. package/codemods/jsx-fold.mjs +515 -0
  6. package/codemods/not-found-pattern.mjs +71 -0
  7. package/codemods/patterns-subpath.mjs +242 -81
  8. package/codemods/patterns-subpath.names.json +41 -15
  9. package/codemods/removed-0.20.json +194 -0
  10. package/codemods/tile-grid.mjs +283 -0
  11. package/codemods/unrewritable.mjs +291 -0
  12. package/dist/chunks/DemoStateContext-Cz5TmrYu.js +32 -0
  13. package/dist/chunks/empty-state-BBqhCx0S.js +1217 -0
  14. package/dist/chunks/{form-BvNNnJ0t.js → form-COP3vK9_.js} +29 -27
  15. package/dist/contexts.js +157 -78
  16. package/dist/form.js +1 -1
  17. package/dist/hirobius-ui.js +1826 -5503
  18. package/dist/manifest.js +12 -13
  19. package/dist/patterns.js +820 -561
  20. package/dist/styles.css +1 -1
  21. package/dist/tokens.css +1 -1
  22. package/dist/tokens.js +29 -8
  23. package/dist/types/src/app/components/avatar-group.d.ts +1 -2
  24. package/dist/types/src/app/components/badge.d.ts +8 -3
  25. package/dist/types/src/app/components/blockquote.d.ts +1 -2
  26. package/dist/types/src/app/components/box-sx.d.ts +110 -13
  27. package/dist/types/src/app/components/box.d.ts +6 -3
  28. package/dist/types/src/app/components/breadcrumb.d.ts +0 -5
  29. package/dist/types/src/app/components/button.d.ts +33 -4
  30. package/dist/types/src/app/components/card.d.ts +7 -8
  31. package/dist/types/src/app/components/combobox.d.ts +47 -11
  32. package/dist/types/src/app/components/container.d.ts +2 -2
  33. package/dist/types/src/app/components/data-table-section.d.ts +1 -1
  34. package/dist/types/src/app/components/dialog.d.ts +7 -1
  35. package/dist/types/src/app/components/disclosure.d.ts +1 -5
  36. package/dist/types/src/app/components/field.d.ts +1 -2
  37. package/dist/types/src/app/components/grid.d.ts +10 -6
  38. package/dist/types/src/app/components/hds-tooltip.d.ts +12 -2
  39. package/dist/types/src/app/components/inline-code.d.ts +1 -2
  40. package/dist/types/src/app/components/input.d.ts +8 -5
  41. package/dist/types/src/app/components/kbd.d.ts +1 -2
  42. package/dist/types/src/app/components/metadata-list.d.ts +1 -2
  43. package/dist/types/src/app/components/page-header.d.ts +0 -2
  44. package/dist/types/src/app/components/popover.d.ts +8 -0
  45. package/dist/types/src/app/components/progress.d.ts +33 -6
  46. package/dist/types/src/app/components/segmented-control.d.ts +2 -26
  47. package/dist/types/src/app/components/select.d.ts +10 -1
  48. package/dist/types/src/app/components/skeleton.d.ts +2 -3
  49. package/dist/types/src/app/components/spinner.d.ts +1 -2
  50. package/dist/types/src/app/components/stack.d.ts +4 -1
  51. package/dist/types/src/app/components/stat.d.ts +1 -2
  52. package/dist/types/src/app/components/status-dot.d.ts +18 -4
  53. package/dist/types/src/app/components/status-list-item.d.ts +1 -2
  54. package/dist/types/src/app/components/surface.d.ts +2 -3
  55. package/dist/types/src/app/components/switcher.d.ts +1 -1
  56. package/dist/types/src/app/components/table.d.ts +1 -15
  57. package/dist/types/src/app/components/tag.d.ts +0 -6
  58. package/dist/types/src/app/components/text.d.ts +1 -2
  59. package/dist/types/src/app/components/textarea.d.ts +1 -2
  60. package/dist/types/src/app/components/toast.d.ts +1 -2
  61. package/dist/types/src/app/components/tooltip.d.ts +1 -1
  62. package/dist/types/src/app/context/DemoStateContext.d.ts +1 -1
  63. package/dist/types/src/app/context/RouterContext.d.ts +5 -5
  64. package/dist/types/src/app/data/manifest-types.d.ts +6 -5
  65. package/dist/types/src/app/design-system/generated-token-refs.d.ts +8 -0
  66. package/dist/types/src/app/design-system/generated-token-values.d.ts +1 -0
  67. package/dist/types/src/app/design-system/tokens.d.ts +22 -3
  68. package/dist/types/src/icons.d.ts +1 -1
  69. package/dist/types/src/index.d.ts +33 -124
  70. package/dist/types/src/patterns.d.ts +20 -25
  71. package/dist/variables.css +6 -0
  72. package/docs/CONSUMING.md +21 -13
  73. package/hirobius.tokens.json +48 -15
  74. package/llms.txt +19 -20
  75. package/package.json +18 -22
  76. package/public/hds-manifest.json +2400 -6488
  77. package/public/llms/components.txt +41 -423
  78. package/public/llms/layout.txt +4 -4
  79. package/public/llms-full.txt +67 -448
  80. package/public/llms.txt +19 -20
  81. package/src/app/data/component-api.json +1379 -3271
  82. package/dist/chunks/LanguageContext-CH_bwzCq.js +0 -83
  83. package/dist/chunks/TokenDisplayContext-evZi_214.js +0 -18
  84. package/dist/chunks/activity-feed-DIMeUJpW.js +0 -21950
  85. package/dist/types/src/app/components/activity-feed.d.ts +0 -73
  86. package/dist/types/src/app/components/app-shell.d.ts +0 -40
  87. package/dist/types/src/app/components/aspect-ratio.d.ts +0 -25
  88. package/dist/types/src/app/components/bleed.d.ts +0 -39
  89. package/dist/types/src/app/components/button-group.d.ts +0 -22
  90. package/dist/types/src/app/components/calendar.d.ts +0 -22
  91. package/dist/types/src/app/components/carousel.d.ts +0 -26
  92. package/dist/types/src/app/components/center.d.ts +0 -36
  93. package/dist/types/src/app/components/cinematic-link.d.ts +0 -18
  94. package/dist/types/src/app/components/circular-progress.d.ts +0 -28
  95. package/dist/types/src/app/components/cluster.d.ts +0 -39
  96. package/dist/types/src/app/components/command-palette.d.ts +0 -46
  97. package/dist/types/src/app/components/component-instance-matrix.d.ts +0 -27
  98. package/dist/types/src/app/components/context-menu.d.ts +0 -78
  99. package/dist/types/src/app/components/cover.d.ts +0 -43
  100. package/dist/types/src/app/components/date-input.d.ts +0 -31
  101. package/dist/types/src/app/components/date-range-input.d.ts +0 -34
  102. package/dist/types/src/app/components/date-time-input.d.ts +0 -30
  103. package/dist/types/src/app/components/doc-link-card.d.ts +0 -32
  104. package/dist/types/src/app/components/error-boundary.d.ts +0 -25
  105. package/dist/types/src/app/components/file-input.d.ts +0 -30
  106. package/dist/types/src/app/components/foundation-swatch.d.ts +0 -45
  107. package/dist/types/src/app/components/frame.d.ts +0 -38
  108. package/dist/types/src/app/components/heading-stack.d.ts +0 -52
  109. package/dist/types/src/app/components/history-card.d.ts +0 -12
  110. package/dist/types/src/app/components/hover-card.d.ts +0 -46
  111. package/dist/types/src/app/components/icon-button.d.ts +0 -22
  112. package/dist/types/src/app/components/image-lightbox.d.ts +0 -14
  113. package/dist/types/src/app/components/input-group.d.ts +0 -23
  114. package/dist/types/src/app/components/multi-selector.d.ts +0 -40
  115. package/dist/types/src/app/components/nav-group.d.ts +0 -29
  116. package/dist/types/src/app/components/nav-item.d.ts +0 -33
  117. package/dist/types/src/app/components/not-found-pattern.d.ts +0 -1
  118. package/dist/types/src/app/components/overflow-list.d.ts +0 -21
  119. package/dist/types/src/app/components/selectable-card.d.ts +0 -29
  120. package/dist/types/src/app/components/side-nav.d.ts +0 -23
  121. package/dist/types/src/app/components/sketch.d.ts +0 -19
  122. package/dist/types/src/app/components/stacked-card-rail.d.ts +0 -32
  123. package/dist/types/src/app/components/stepper-field.d.ts +0 -12
  124. package/dist/types/src/app/components/stepper.d.ts +0 -33
  125. package/dist/types/src/app/components/text-lockup.d.ts +0 -38
  126. package/dist/types/src/app/components/tile-grid.d.ts +0 -17
  127. package/dist/types/src/app/components/time-input.d.ts +0 -24
  128. package/dist/types/src/app/components/toggle-button.d.ts +0 -32
  129. package/dist/types/src/app/components/token.d.ts +0 -90
  130. package/dist/types/src/app/components/tokenUtils.d.ts +0 -38
  131. package/dist/types/src/app/components/tokenizer.d.ts +0 -24
  132. package/dist/types/src/app/components/toolbar.d.ts +0 -36
  133. package/dist/types/src/app/components/top-nav.d.ts +0 -23
  134. package/dist/types/src/app/components/tree-list.d.ts +0 -30
  135. package/dist/types/src/app/data/nav-model.d.ts +0 -39
  136. package/dist/types/src/app/hooks/useFocusVisible.d.ts +0 -9
  137. package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +0 -20
  138. package/dist/types/src/app/layouts/DocLayout.d.ts +0 -14
  139. package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +0 -6
  140. package/dist/types/src/app/layouts/HdsDocsShell.d.ts +0 -72
  141. package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +0 -14
  142. package/dist/types/src/app/lib/hds-search.d.ts +0 -45
  143. package/dist/types/src/app/lib/nav-active.d.ts +0 -16
  144. package/dist/types/src/app/lib/navLevels.d.ts +0 -4
@@ -1,33 +0,0 @@
1
- /**
2
- * Stepper - horizontal or vertical step indicator for multi-step wizard and
3
- * checkout flows, marking each step as complete, current, or upcoming.
4
- * @category Navigation
5
- * @tier pattern
6
- */
7
- import * as React from 'react';
8
- /** @internal */
9
- declare const stepMarkerVariants: (props?: ({
10
- state?: "current" | "complete" | "upcoming" | null | undefined;
11
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
- /** @public */
13
- export interface Step {
14
- /** Visible label for the step. */
15
- label: React.ReactNode;
16
- /** Optional supporting copy shown under the label. */
17
- description?: React.ReactNode;
18
- }
19
- /** @public */
20
- export interface StepperProps extends React.HTMLAttributes<HTMLOListElement> {
21
- /** Ordered steps from first to last. */
22
- steps: Step[];
23
- /** 0-based index of the current step. */
24
- activeStep: number;
25
- /** Layout direction. Defaults to 'horizontal'. */
26
- orientation?: 'horizontal' | 'vertical';
27
- }
28
- /**
29
- * Step indicator for multi-step flows. Purely presentational — no navigation.
30
- */
31
- export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLOListElement>>;
32
- /** @internal — CVA variant helper; compose via Stepper's internal state instead. */
33
- export { stepMarkerVariants };
@@ -1,38 +0,0 @@
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 {};
@@ -1,17 +0,0 @@
1
- /**
2
- * @category Layout
3
- * @tier primitive
4
- */
5
- import * as React from 'react';
6
- /** @public */
7
- export interface TileGridProps extends React.HTMLAttributes<HTMLDivElement> {
8
- /** Minimum tile width before the grid wraps. Defaults to 260px. */
9
- minTileWidth?: string;
10
- /** Gap token between tiles. Defaults to 'sm' (12px). */
11
- gap?: 'xs' | 'sm' | 'md';
12
- }
13
- /**
14
- * Auto-fill responsive grid for status/micro tiles. Wraps tile children in a
15
- * one-line grid declaration so pages don't repeat the auto-fill minmax recipe.
16
- */
17
- export declare const TileGrid: React.ForwardRefExoticComponent<TileGridProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,24 +0,0 @@
1
- /**
2
- * TimeInput — token-skinned time field on a native <input type="time">.
3
- * @category Inputs
4
- * @tier primitive
5
- * @public
6
- *
7
- * The time-only member of the date/time family (ADR-020). It deliberately does
8
- * NOT pull in the calendar dependency — a native `<input type="time">` gives the
9
- * platform time picker, keyboard entry, and locale formatting for free, skinned
10
- * with the same chrome as `Input`.
11
- */
12
- import * as React from 'react';
13
- import { type VariantProps } from 'class-variance-authority';
14
- declare const hdsTimeInputVariants: (props?: ({
15
- size?: "sm" | "md" | "lg" | null | undefined;
16
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
17
- type TimeInputVariantProps = VariantProps<typeof hdsTimeInputVariants>;
18
- /** @public */
19
- export interface TimeInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'>, TimeInputVariantProps {
20
- }
21
- /** A native time field skinned with HDS input chrome. Value is a `HH:mm` string. */
22
- export declare const TimeInput: React.ForwardRefExoticComponent<TimeInputProps & React.RefAttributes<HTMLInputElement>>;
23
- /** @internal — CVA variant helper; compose via TimeInput props instead. */
24
- export { hdsTimeInputVariants };
@@ -1,32 +0,0 @@
1
- /**
2
- * ToggleButton — a two-state (on/off) pressable button on Radix Toggle.
3
- * @category Actions
4
- * @tier primitive
5
- *
6
- * Radix Toggle (@radix-ui/react-toggle) themed as a button-shaped control with
7
- * a native aria-pressed contract, keyboard support, and data-[state=on] active
8
- * styling. Use for a single independent toggle (bold, mute, pin); for a set of
9
- * mutually-related toggles reach for the segmented control instead.
10
- *
11
- * <ToggleButton aria-label="Bold" pressed={bold} onPressedChange={setBold}>
12
- * <Bold />
13
- * </ToggleButton>
14
- */
15
- import * as React from 'react';
16
- import * as TogglePrimitive from '@radix-ui/react-toggle';
17
- import { type VariantProps } from 'class-variance-authority';
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
- type ToggleButtonVariantProps = VariantProps<typeof hdsToggleButtonVariants>;
23
- /** @public */
24
- export interface ToggleButtonProps extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, ToggleButtonVariantProps {
25
- }
26
- /**
27
- * A single two-state toggle button exposing a native `aria-pressed` contract —
28
- * use for one independent on/off control such as bold, mute, or pin.
29
- */
30
- export declare const ToggleButton: React.ForwardRefExoticComponent<ToggleButtonProps & React.RefAttributes<HTMLButtonElement>>;
31
- /** @internal — CVA variant helper; compose via ToggleButton props instead. */
32
- export { hdsToggleButtonVariants };
@@ -1,90 +0,0 @@
1
- /**
2
- * Token - reflective token specimen for unified node-based token views.
3
- * @category Display
4
- * @tier primitive
5
- *
6
- * The `variant` axis (node | diagram — diagram is a deprecated alias that
7
- * resolves to the same node treatment) plus the `selected` / `fullWidth` /
8
- * `asButton` / `nowrap` / `sourceNode` states used to be a
9
- * Token.module.css `[data-*]` attribute stylesheet, with a duplicate
10
- * `isSelected` branch re-painted inline on top of it. Both now live as one
11
- * `cva` variant set — same `--semantic-*`/`--component-*`/`--primitive-*`
12
- * custom properties, same pixels, no CSS module.
13
- */
14
- import React from 'react';
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
- type TokenBaseProps = {
32
- className?: string;
33
- fullWidth?: boolean;
34
- nowrap?: boolean;
35
- isSourceNode?: boolean;
36
- pathDisplayMode?: 'full' | 'compressed';
37
- pathDisplayDepth?: number;
38
- pathDisplayLeadingDot?: boolean;
39
- nodeRef?: (el: HTMLElement | null) => void;
40
- 'aria-label'?: string;
41
- /** When true, overflow ellipsis appears at the start (left) instead of the end. */
42
- truncateFromStart?: boolean;
43
- };
44
- type TokenNodeSurfaceProps = TokenBaseProps & {
45
- variant?: 'node';
46
- children: React.ReactNode;
47
- /** Optional explicit token path for deep-linking node instances. Falls back to children when omitted. */
48
- tokenPath?: string;
49
- isSelected?: boolean;
50
- onClick?: () => void;
51
- swatchVar?: string;
52
- /** Optional left-side slot for compact node content, e.g. curve previews. */
53
- leadingSlot?: React.ReactNode;
54
- };
55
- /**
56
- * @deprecated `variant="diagram"` is a compatibility alias that resolves to the
57
- * canonical `variant="node"` treatment; its diagram-only props (value,
58
- * accentColor, description, rawValue) are no longer rendered. Migrate to
59
- * `variant="node"`.
60
- * @removeIn 1.0.0
61
- */
62
- type TokenDiagramProps = TokenBaseProps & {
63
- variant: 'diagram';
64
- label: string;
65
- value: string;
66
- accentColor: string;
67
- swatchVar?: string;
68
- description?: React.ReactNode;
69
- rawValue?: React.ReactNode;
70
- onClick?: () => void;
71
- };
72
- export type TokenProps = TokenNodeSurfaceProps | TokenDiagramProps;
73
- /**
74
- * Token - unified token component.
75
- *
76
- * variant="node" renders the canonical token surface.
77
- * variant="diagram" is a DEPRECATED compatibility alias (see TokenDiagramProps;
78
- * @removeIn 1.0.0) that now resolves to the same node treatment.
79
- * Node content can use a left-side slot for swatches or other compact previews.
80
- */
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
- */
88
- export declare function Token(props: TokenProps): import("react/jsx-runtime").JSX.Element;
89
- /** @internal — CVA variant helpers; compose via Token props instead. */
90
- export { tokenShellVariants, tokenNodeInlineVariants, tokenLabelVariants };
@@ -1,38 +0,0 @@
1
- /**
2
- * tokenUtils — flatten hirobius.tokens.json into a searchable list
3
- * and trace alias chains through the three-tier hierarchy.
4
- */
5
- export type Tier = 'primitive' | 'semantic' | 'component';
6
- export interface FlatToken {
7
- path: string;
8
- cssVar: string;
9
- tier: Tier;
10
- type: string;
11
- category: string;
12
- rawValue: unknown;
13
- isAlias: boolean;
14
- description?: string;
15
- lightAlias?: string | number;
16
- darkAlias?: string | number;
17
- composite?: Record<string, unknown>;
18
- }
19
- export declare function formatCategoryLabel(category: string): string;
20
- export declare const allTokens: FlatToken[];
21
- export declare function getTokensByTier(tier: Tier): FlatToken[];
22
- export declare function getTierCategories(tier: Tier): string[];
23
- export declare function formatTokenValue(rawValue: unknown): string;
24
- /** Follow a token reference string to its FlatToken. Returns null if not found. */
25
- export declare function resolveAlias(ref: unknown): FlatToken | null;
26
- /**
27
- * Resolves a token reference to a CSS variable string.
28
- * Returns the original string when no token is found so callers can fail safely.
29
- */
30
- export declare function resolveAliasCssVar(ref: unknown): string;
31
- /**
32
- * Resolves a token reference to its concrete authored value.
33
- * Useful for contrast math and other places that need literal colors,
34
- * while the UI may still consume CSS vars end-to-end.
35
- */
36
- export declare function resolveTokenLiteralValue(ref: unknown, mode?: 'light' | 'dark', depth?: number): string | null;
37
- /** Group a flat token list by category (second segment). */
38
- export declare function groupByCategory(tokens: FlatToken[]): Record<string, FlatToken[]>;
@@ -1,24 +0,0 @@
1
- /**
2
- * Tokenizer — free-text token/chip input where committed entries render as
3
- * removable Tag chips ahead of the live text field. Enter commits the typed
4
- * draft as a new token; Backspace on an empty draft removes the trailing one.
5
- * @category Inputs
6
- * @tier pattern
7
- * @public
8
- */
9
- import * as React from 'react';
10
- /** @public */
11
- export interface TokenizerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
12
- /** Committed tokens rendered as chips. */
13
- value: string[];
14
- /** Called with the next token list whenever tokens are added or removed. */
15
- onChange: (next: string[]) => void;
16
- /** Placeholder shown in the trailing text field when empty. */
17
- placeholder?: string;
18
- /** Disable the field and all token interactions. */
19
- disabled?: boolean;
20
- /** Class hook for the outer wrapper. */
21
- className?: string;
22
- }
23
- /** A bordered field of Tag chips followed by a text input for adding more. */
24
- export declare const Tokenizer: React.ForwardRefExoticComponent<TokenizerProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,36 +0,0 @@
1
- /**
2
- * Toolbar — horizontal container that groups related controls (buttons,
3
- * toggles, separators) with a single roving tab-stop, built on Radix Toolbar.
4
- * @category Actions
5
- * @tier pattern
6
- * @public
7
- *
8
- * <Toolbar aria-label="Formatting">
9
- * <Toolbar.ToggleGroup type="single">
10
- * <Toolbar.ToggleItem value="bold">Bold</Toolbar.ToggleItem>
11
- * </Toolbar.ToggleGroup>
12
- * <Toolbar.Separator />
13
- * <Toolbar.Button>Share</Toolbar.Button>
14
- * </Toolbar>
15
- */
16
- import * as React from 'react';
17
- import * as ToolbarPrimitive from '@radix-ui/react-toolbar';
18
- declare const ToolbarButton: React.ForwardRefExoticComponent<Omit<ToolbarPrimitive.ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
- declare const ToolbarSeparator: React.ForwardRefExoticComponent<Omit<ToolbarPrimitive.ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
- declare const ToolbarToggleGroup: React.ForwardRefExoticComponent<(Omit<ToolbarPrimitive.ToolbarToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToolbarPrimitive.ToolbarToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
21
- declare const ToolbarToggleItem: React.ForwardRefExoticComponent<Omit<ToolbarPrimitive.ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
22
- declare const ToolbarLink: React.ForwardRefExoticComponent<Omit<ToolbarPrimitive.ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
23
- export interface ToolbarComponent extends React.FC<React.ComponentProps<typeof ToolbarPrimitive.Root>> {
24
- Button: typeof ToolbarButton;
25
- Separator: typeof ToolbarSeparator;
26
- ToggleGroup: typeof ToolbarToggleGroup;
27
- ToggleItem: typeof ToolbarToggleItem;
28
- Link: typeof ToolbarLink;
29
- }
30
- /**
31
- * Toolbar root. Groups related controls with a single roving tab-stop.
32
- * Supports the native `orientation` prop (`horizontal` | `vertical`).
33
- * @public
34
- */
35
- export declare const Toolbar: ToolbarComponent;
36
- export {};
@@ -1,23 +0,0 @@
1
- /**
2
- * TopNav — top-of-page navigation bar with brand, nav links, and trailing
3
- * actions rendered as a semantic <header> row, optionally sticky to the top.
4
- * @category Navigation
5
- * @tier pattern
6
- * @public
7
- */
8
- import * as React from 'react';
9
- /** @public */
10
- export interface TopNavProps extends React.HTMLAttributes<HTMLElement> {
11
- /** Leading brand slot (e.g. logo/wordmark). */
12
- brand?: React.ReactNode;
13
- /** Nav links, placed left after the brand and wrapped in a <nav>. */
14
- children?: React.ReactNode;
15
- /** Trailing actions, pushed to the far right. */
16
- trailing?: React.ReactNode;
17
- /** Pins the bar to the top of its scroll container. */
18
- sticky?: boolean;
19
- }
20
- /**
21
- * Top navigation bar with brand, nav, and trailing action slots.
22
- */
23
- export declare const TopNav: React.ForwardRefExoticComponent<TopNavProps & React.RefAttributes<HTMLElement>>;
@@ -1,30 +0,0 @@
1
- /**
2
- * TreeList - a hierarchical, expandable list with correct tree ARIA semantics
3
- * for browsing nested navigation, file, or content structures.
4
- * @category Navigation
5
- * @tier pattern
6
- * @public
7
- */
8
- import * as React from 'react';
9
- /** @public */
10
- export interface TreeNode {
11
- /** Stable identifier for the node, passed to `onSelect` when its label is clicked. */
12
- id: string;
13
- /** Rendered label content for the node's row. */
14
- label: React.ReactNode;
15
- /** Nested child nodes. A non-empty array renders a toggle and a nested group. */
16
- children?: TreeNode[];
17
- }
18
- /** @public */
19
- export interface TreeListProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'onSelect'> {
20
- /** Root-level nodes to render. */
21
- items: TreeNode[];
22
- /** Node ids expanded on mount. */
23
- defaultExpandedIds?: string[];
24
- /** Called with a node's id when its label row is clicked. */
25
- onSelect?: (id: string) => void;
26
- }
27
- /**
28
- * Renders a hierarchical `role="tree"` list; nodes with children get an expand/collapse toggle.
29
- */
30
- export declare const TreeList: React.ForwardRefExoticComponent<TreeListProps & React.RefAttributes<HTMLUListElement>>;
@@ -1,39 +0,0 @@
1
- /** Per-page navigation metadata a docs page module exports (Phase 2 target). */
2
- export interface HdsPageMeta {
3
- /** Canonical, root-relative route (no `/hds/` prefix). */
4
- path: string;
5
- /** Human label shown in the sidebar / search / breadcrumb. */
6
- title: string;
7
- /** Sidebar section heading this page groups under. */
8
- section: string;
9
- /** Sort order within the section. */
10
- order: number;
11
- /** Short description — used by the Cmd-K search corpus. */
12
- description?: string;
13
- /** Lifecycle status — drives a metadata slot, never a decorative badge. */
14
- status?: 'stable' | 'beta' | 'draft' | 'internal';
15
- }
16
- /** A single sidebar link in the derived model. */
17
- export interface NavLink {
18
- path: string;
19
- label: string;
20
- /** Short description — surfaced by the Cmd-K search corpus (not the sidebar). */
21
- description?: string;
22
- /** Match this route exactly (not by prefix) for active state. */
23
- exact?: boolean;
24
- /** Render with sub-item indentation. */
25
- indent?: boolean;
26
- }
27
- /** A labelled group of sidebar links. */
28
- export interface NavSection {
29
- label: string;
30
- items: NavLink[];
31
- }
32
- /** The full derived navigation model. */
33
- export interface NavModel {
34
- /** Generator provenance marker. */
35
- $generated?: string;
36
- sections: NavSection[];
37
- }
38
- /** The generated docs navigation model (see `scripts/generate-nav-model.mjs`). */
39
- export declare const navModel: NavModel;
@@ -1,9 +0,0 @@
1
- export interface FocusVisibleState {
2
- /** True when the current focus should render a visible focus ring. */
3
- isFocusVisible: boolean;
4
- /** Call from `onFocus`, passing the focused element. */
5
- onFocus: (target: Element) => void;
6
- /** Call from `onBlur` / `onPointerDown` to drop the focus ring. */
7
- clearFocusVisible: () => void;
8
- }
9
- export declare function useFocusVisible(): FocusVisibleState;
@@ -1,20 +0,0 @@
1
- /**
2
- * CaseStudyLayout — macro-layout skeleton for portfolio case study pages.
3
- * @category Layout
4
- *
5
- * Invisible structure only. No Surface, no decorative chrome.
6
- * Slot anatomy:
7
- * heroSlot → full-width (maxWidth="max") — hero image + headline
8
- * introSlot → prose-width (maxWidth="content") — narrative, Brief/Problem/Solution
9
- * metricsSlot → full-width (maxWidth="max") — KPI or summary cards (optional)
10
- * contentSlot → full-width (maxWidth="max") — chapters, galleries, learnings
11
- */
12
- import type { ReactNode } from 'react';
13
- export interface CaseStudyLayoutProps {
14
- heroSlot: ReactNode;
15
- introSlot: ReactNode;
16
- metricsSlot?: ReactNode;
17
- contentSlot: ReactNode;
18
- }
19
- /** @public */
20
- export declare function CaseStudyLayout({ heroSlot, introSlot, metricsSlot, contentSlot, }: CaseStudyLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- declare const DOC_LAYOUT_CONTENT_WIDTHS: {
3
- readonly content: "var(--semantic-layout-width-content)";
4
- readonly max: "var(--semantic-layout-width-max)";
5
- };
6
- type DocLayoutMaxWidth = keyof typeof DOC_LAYOUT_CONTENT_WIDTHS;
7
- export type DocLayoutContentMaxWidth = DocLayoutMaxWidth;
8
- interface DocLayoutProps {
9
- contentSlot: ReactNode;
10
- bottomSlot?: ReactNode;
11
- contentMaxWidth?: DocLayoutContentMaxWidth;
12
- }
13
- export declare function DocLayout({ contentSlot, bottomSlot, contentMaxWidth, }: DocLayoutProps): import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,6 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- export declare function EmbeddedDocLayoutProvider({ bottomSlot, children, }: {
3
- bottomSlot: ReactNode | null;
4
- children: ReactNode;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- export declare function useEmbeddedDocLayoutBottomSlot(): ReactNode;
@@ -1,72 +0,0 @@
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,14 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import { type DocLayoutContentMaxWidth } from './DocLayout.js';
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
- */
11
- export declare function HdsSystemDocLayout({ contentSlot, contentMaxWidth, }: {
12
- contentSlot: ReactNode;
13
- contentMaxWidth?: DocLayoutContentMaxWidth;
14
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,45 +0,0 @@
1
- /** @internal — search engine behind the CommandPalette; not part of the public API. */
2
- /**
3
- * hds-search — the manifest search engine extracted from CommandPalette.
4
- *
5
- * A dependency-free subsequence + position scorer (think micro-fzf) over four
6
- * corpora drawn from `virtual:hds-manifest`: component specs, utilities, role
7
- * tokens, and curated foundation sections. Pure and side-effect-free — the
8
- * manifest is passed in, never read from a module global — so it is unit-tested
9
- * directly (see scripts/../tests/hds-search.test.ts) rather than through a
10
- * component test hook.
11
- *
12
- * Lifted from command-palette.tsx per ADR-011's review (deep module behind a
13
- * narrow interface): the UI shell now imports { buildIndex, rank } and owns no
14
- * search logic.
15
- */
16
- import type { ManifestSpec, RoleToken, SystemManifest } from '../data/manifest-types.js';
17
- export type { ManifestSpec, RoleToken, SystemManifest };
18
- export type ResultKind = 'component' | 'pattern' | 'template' | 'utility' | 'token' | 'section';
19
- export interface PaletteResult {
20
- id: string;
21
- label: string;
22
- description: string;
23
- kind: ResultKind;
24
- /** Where Enter/click navigates — relative React Router path. */
25
- to: string;
26
- /** Source string used for fuzzy matching (lowercased). */
27
- haystack: string;
28
- }
29
- export declare const KIND_LABEL: Record<ResultKind, string>;
30
- export declare const MAX_RESULTS = 30;
31
- export declare function sanitize(text: string): string;
32
- /** Build the searchable index from a manifest. Pure — pass the manifest in. */
33
- export declare function buildIndex(manifest: SystemManifest): PaletteResult[];
34
- /**
35
- * Subsequence + position scorer:
36
- * - Every char in `query` must appear in order inside `haystack`.
37
- * - Earlier matches score higher (heavy weight on first hit).
38
- * - Adjacent-char streaks score higher (clustered matches).
39
- * - Word-start hits get a bonus.
40
- *
41
- * Returns -Infinity if `query` is not a subsequence of `haystack`.
42
- */
43
- export declare function fuzzyScore(query: string, haystack: string): number;
44
- /** Rank items against a query. Empty query → a stable starter set. */
45
- export declare function rank(query: string, items: PaletteResult[]): PaletteResult[];
@@ -1,16 +0,0 @@
1
- /**
2
- * nav-active — the single active-state rule for navigation items.
3
- *
4
- * Previously this 3-line predicate was copy-pasted in three places (NavGroup,
5
- * and HDSLayout's NestedNavGroup + SideNavItem). Centralized here so "is this
6
- * nav item active?" has exactly one definition (ADR-017, Phase 4).
7
- */
8
- /**
9
- * Whether a nav item is active for the current path.
10
- *
11
- * - `exact`: the route must match precisely (e.g. `/` or a landing page that
12
- * shares a prefix with its children).
13
- * - otherwise: active when the current path equals the item path OR is a
14
- * descendant route (`/components` is active on `/components/actions`).
15
- */
16
- export declare function isNavItemActive(currentPath: string, itemPath: string, exact?: boolean): boolean;
@@ -1,4 +0,0 @@
1
- export type NavLevel = 'root' | 'section' | 'nested' | 'deep';
2
- export declare function getNavLevelInset(level: NavLevel): string;
3
- export declare function getNavLevelLeadingPadding(level: NavLevel): string;
4
- export declare function getNextNavLevel(level: NavLevel): NavLevel;