@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,30 +0,0 @@
1
- /**
2
- * DateTimeInput — combined date + time field pairing a text date input with
3
- * a calendar popover and a native time field, so picking a moment in time
4
- * reads as one control instead of two disconnected inputs glued together by
5
- * a consuming app.
6
- * @category Inputs
7
- * @tier pattern
8
- * @public
9
- *
10
- * Composes the HDS Popover (trigger = calendar icon button) with Calendar
11
- * for the date grid, and TimeInput for the time-of-day, keeping both parts
12
- * in sync with a single `Date` value via date-fns.
13
- *
14
- * <DateTimeInput value={date} onChange={setDate} />
15
- */
16
- import * as React from 'react';
17
- /** @public */
18
- export interface DateTimeInputProps {
19
- /** Currently selected date + time, or undefined when empty. */
20
- value?: Date;
21
- /** Fired with the next combined date/time, or undefined when cleared. */
22
- onChange?: (date: Date | undefined) => void;
23
- /** date-fns format string used to display and parse the date portion. */
24
- dateFormat?: string;
25
- disabled?: boolean;
26
- id?: string;
27
- 'aria-label'?: string;
28
- }
29
- /** Text date field + calendar popover, paired with a native time field, producing one Date. */
30
- export declare const DateTimeInput: React.ForwardRefExoticComponent<DateTimeInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,32 +0,0 @@
1
- import { type LucideIcon } from 'lucide-react';
2
- export interface DocLinkCardProps {
3
- /** Primary title displayed in the card. */
4
- title: string;
5
- /** Supporting body copy shown below the title. */
6
- description?: string;
7
- /** Destination route or URL. */
8
- href: string;
9
- /** Icon rendered in the card header. */
10
- icon: LucideIcon;
11
- /** Optional metadata label rendered above the title. */
12
- meta?: string;
13
- /** Typography style used for the meta label. */
14
- metaStyle?: 'caption' | 'ui';
15
- /** Tint the card surface for emphasis. */
16
- accent?: boolean;
17
- /** Card layout variant. */
18
- variant?: 'feature' | 'pager';
19
- /** Disable navigation and reduce contrast. */
20
- disabled?: boolean;
21
- /** Directional affordance for the header icon. */
22
- affordance?: 'up-right' | 'right' | 'left';
23
- }
24
- declare const docLinkCardVariants: (props?: ({
25
- variant?: "feature" | "pager" | null | undefined;
26
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
27
- /**
28
- * @public
29
- */
30
- export declare function DocLinkCard({ title, description, href, icon: CardIcon, meta, metaStyle, accent, variant, disabled, affordance, }: DocLinkCardProps): import("react/jsx-runtime").JSX.Element;
31
- /** @internal — CVA variant helper; compose via DocLinkCard props instead. */
32
- export { docLinkCardVariants };
@@ -1,25 +0,0 @@
1
- /** @internal — utility-tier component; not part of @hirobius/design-system public API. */
2
- /**
3
- * ErrorBoundary — slot-scoped recovery surface for runtime render failures.
4
- * @category Feedback
5
- * @tier utility
6
- * @doc-exempt: runtime safety infra, not an LLM-facing layout primitive
7
- */
8
- import { Component, type ErrorInfo, type ReactNode } from 'react';
9
- export interface ErrorBoundaryProps {
10
- children: ReactNode;
11
- slotLabel?: string;
12
- minHeight?: string;
13
- }
14
- interface ErrorBoundaryState {
15
- error: Error | null;
16
- retryNonce: number;
17
- }
18
- export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
19
- state: ErrorBoundaryState;
20
- static getDerivedStateFromError(error: Error): Pick<ErrorBoundaryState, 'error'>;
21
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
22
- private handleRetry;
23
- render(): import("react/jsx-runtime").JSX.Element;
24
- }
25
- export {};
@@ -1,30 +0,0 @@
1
- /**
2
- * FileInput — styled dropzone that wraps a real native file input for full
3
- * keyboard and screen-reader accessibility, with optional drag-and-drop.
4
- * @category Inputs
5
- * @tier pattern
6
- * @public
7
- */
8
- import * as React from 'react';
9
- declare const fileInputVariants: (props?: ({
10
- dragging?: boolean | null | undefined;
11
- disabled?: boolean | null | undefined;
12
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
13
- export interface FileInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
14
- /** Called with the selected (or dropped) files. */
15
- onFiles?: (files: File[]) => void;
16
- /** Dropzone prompt content. */
17
- label?: React.ReactNode;
18
- /** Native `accept` attribute, e.g. `"image/*"`. */
19
- accept?: string;
20
- /** Allow selecting more than one file. */
21
- multiple?: boolean;
22
- /** Disable interaction. */
23
- disabled?: boolean;
24
- }
25
- /**
26
- * A dashed dropzone that opens the native file picker or accepts a drag-and-drop.
27
- */
28
- export declare const FileInput: React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<HTMLInputElement>>;
29
- /** @internal — CVA variant helper; compose via FileInput props instead. */
30
- export { fileInputVariants };
@@ -1,45 +0,0 @@
1
- /**
2
- * FoundationSwatch - governed foundation specimen for color and semantic role previews.
3
- * @category Utilities
4
- * @tier pattern
5
- */
6
- import type { ReactNode } from 'react';
7
- type FoundationSwatchPreviewPosition = 'bottom-left' | 'top-left' | 'center';
8
- type FoundationSwatchTokenDisplayPreset = 'depth1' | 'depth2' | 'full';
9
- /** @public */
10
- export type FoundationSwatchProps = {
11
- /** Primary label rendered inside or below the swatch. */
12
- label: string;
13
- /** Whether to hide the preview label inside the swatch specimen. */
14
- hidePreviewLabel?: boolean;
15
- /** Optional token path rendered as a condensed node inside the swatch surface. */
16
- tokenPath?: string;
17
- /** Shorthand preset for how the token path renders inside the specimen. */
18
- tokenDisplayPreset?: FoundationSwatchTokenDisplayPreset;
19
- /** Placement of the specimen content inside the swatch surface. */
20
- previewPosition?: FoundationSwatchPreviewPosition;
21
- /** Background fill or tone shown by the specimen. */
22
- background: string;
23
- /** Optional text/value line shown inside the specimen. */
24
- value?: string;
25
- /** Optional supporting lines shown inside the specimen. */
26
- details?: string[];
27
- /** Foreground color used for text inside the specimen. */
28
- foreground?: string;
29
- /** Custom specimen content rendered inside card-style swatches. */
30
- specimen?: ReactNode;
31
- /** Optional note rendered below card-style swatches. */
32
- note?: ReactNode;
33
- /** Whether to show a bordered specimen surface. */
34
- bordered?: boolean;
35
- /** Explicit color value (hex or CSS var name) to pin the token chip's swatch square, overriding auto-resolution from tokenPath. */
36
- swatchVar?: string;
37
- };
38
- /**
39
- * FoundationSwatch - governed foundation specimen for color and semantic role previews.
40
- *
41
- * @deprecated FoundationSwatch is an HDS docs/lab internal (foundation specimen preview 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.
42
- * @removeIn 1.0.0
43
- */
44
- export declare function FoundationSwatch({ label, hidePreviewLabel, tokenPath, tokenDisplayPreset, previewPosition, background, value, details, foreground, specimen, note, bordered, swatchVar, }: FoundationSwatchProps): import("react/jsx-runtime").JSX.Element;
45
- export {};
@@ -1,38 +0,0 @@
1
- /**
2
- * Frame — aspect-ratio-locked, token-clipped media box.
3
- * @category Layout
4
- * @tier primitive
5
- * @ai-intent Solves "media that must reserve a fixed aspect ratio and never
6
- * cause layout shift while it loads, cropped to a token-governed corner
7
- * radius" — a thin, token-skinned wrapper over `AspectRatio`
8
- * (`@radix-ui/react-aspect-ratio`), which already owns the ratio-lock
9
- * mechanics. Frame adds the overflow-hidden clip and semantic radius that a
10
- * bare media frame needs and `AspectRatio` deliberately leaves undecorated.
11
- * @ai-rules Reach for this named layout intent before Box/sx when framing
12
- * media (image, video, embed, map tile). radius MUST use a semantic
13
- * borderRadius token, never a raw px value. Do NOT reach for bare
14
- * `AspectRatio` in product code just to add a border-radius by hand — use
15
- * Frame. Do NOT use Frame for non-media layout — it exists purely as a media
16
- * clipping frame.
17
- *
18
- * Every Layout reference: https://every-layout.dev/layouts/frame/
19
- */
20
- import React from 'react';
21
- type FrameRadius = 'none' | 'sm' | 'md' | 'full';
22
- export interface FrameProps {
23
- /** Media rendered inside the locked-ratio, clipped frame. */
24
- children: React.ReactNode;
25
- /** Desired width-to-height ratio, e.g. `16 / 9`. Defaults to `16 / 9`. */
26
- ratio?: number;
27
- /** Corner radius token applied to the clipped frame. Defaults to 'md'. */
28
- radius?: FrameRadius;
29
- /** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
30
- className?: string;
31
- /** Escape hatch: only use for narrow layout adjustments that do not belong in the primitive API. */
32
- style?: React.CSSProperties;
33
- /** Element rendered as the outer clipping wrapper. Defaults to 'div'. */
34
- as?: React.ElementType;
35
- }
36
- /** @public */
37
- export declare const Frame: React.ForwardRefExoticComponent<FrameProps & React.RefAttributes<HTMLDivElement>>;
38
- export {};
@@ -1,52 +0,0 @@
1
- /**
2
- * HeadingStack — enforced vertical rhythm for heading + subheading pairs.
3
- *
4
- * Automatically handles gap and secondary color, preventing manual stacking.
5
- * - Heading level: 'heading1' | 'heading2' | 'heading3'
6
- * - Gap: px4 (tight) | px8 (default)
7
- * - Subheading color: always var(--semantic-color-content-secondary)
8
- *
9
- * GUARDRAIL: Never manually stack headings using Stack. Always use HeadingStack.
10
- *
11
- * Usage:
12
- * <HeadingStack level="heading1" heading="Main Title" subheading="Subtitle text" />
13
- * <HeadingStack level="heading2" heading="Section" subheading="Description" gap="px4" />
14
- *
15
- * @category Typography
16
- * @tier primitive
17
- * @doc-exempt: internal typography lockup utility, documented through page composition rather than a standalone component page
18
- */
19
- import { type ElementType } from 'react';
20
- import { type VariantProps } from 'class-variance-authority';
21
- declare const headingStackVariants: (props?: ({
22
- gap?: "px4" | "px8" | null | undefined;
23
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
24
- declare const headingStackLevelVariants: (props?: ({
25
- level?: "heading1" | "heading2" | "heading3" | null | undefined;
26
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
27
- type HeadingStackGapVariantProps = VariantProps<typeof headingStackVariants>;
28
- type HeadingStackLevelVariantProps = VariantProps<typeof headingStackLevelVariants>;
29
- type HdsHeadingLevel = NonNullable<HeadingStackLevelVariantProps['level']>;
30
- type HdsHeadingGap = NonNullable<HeadingStackGapVariantProps['gap']>;
31
- type HdsHeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
32
- type HdsSupportingTag = 'p' | 'div' | 'span';
33
- export interface HeadingStackProps {
34
- /** The heading content (string). */
35
- heading: string;
36
- /** The supporting copy rendered beneath the heading. */
37
- subheading: string;
38
- /** Semantic heading level: heading1 | heading2 | heading3. */
39
- level: HdsHeadingLevel;
40
- /** Gap between heading and subheading: px4 (tight) | px8 (default). */
41
- gap?: HdsHeadingGap;
42
- /** Override the root semantic wrapper while preserving the governed layout styles. */
43
- as?: ElementType;
44
- /** Override the heading tag without altering the applied typography style. */
45
- headingAs?: HdsHeadingTag;
46
- /** Override the supporting-copy tag. */
47
- subheadingAs?: HdsSupportingTag;
48
- }
49
- /** @public */
50
- export declare const HeadingStack: import("react").ForwardRefExoticComponent<HeadingStackProps & import("react").RefAttributes<HTMLElement>>;
51
- /** @internal — CVA variant helpers; compose via HeadingStack props instead. */
52
- export { headingStackVariants, headingStackLevelVariants };
@@ -1,12 +0,0 @@
1
- /** @public */
2
- export type HistoryCardCommit = {
3
- hash: string | null;
4
- date: string;
5
- message: string;
6
- displayMessage?: string;
7
- };
8
- export interface HistoryCardProps {
9
- commit: HistoryCardCommit;
10
- href: string;
11
- }
12
- export declare function HistoryCard({ commit, href }: HistoryCardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,46 +0,0 @@
1
- /**
2
- * HoverCard — rich preview shown on hover/focus, on Radix HoverCard.
3
- * @category Overlays
4
- * @tier primitive
5
- * @usage Preview extra detail about a link or mention when it is hovered or focused, without navigating.
6
- * @whenNot Content people must reach, or a label for an interactive control.
7
- * @useInstead Dialog content people must act on
8
- * @useInstead Tooltip a short label for a control
9
- * @slot trigger The link or element that opens the card (HoverCard.Trigger).
10
- * @slot content The preview (HoverCard.Content).
11
- * @keyboard Focus Opens the card when the trigger receives keyboard focus.
12
- * @keyboard Escape Closes the card and keeps focus on the trigger.
13
- * @keyboard Tab Moves on to the next element and closes the card.
14
- * @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
15
- *
16
- * Radix HoverCard (@radix-ui/react-hover-card) themed with the overlay role
17
- * tokens to match Menu/Popover. For sighted-pointer preview affordances (user
18
- * cards, link previews) — it is NOT a replacement for an accessible tooltip on
19
- * an interactive control; use Tooltip for labelling.
20
- *
21
- * <HoverCard>
22
- * <HoverCard.Trigger asChild><InlineLink href="…">@ada</InlineLink></HoverCard.Trigger>
23
- * <HoverCard.Content>Ada Lovelace — first programmer.</HoverCard.Content>
24
- * </HoverCard>
25
- */
26
- import * as React from 'react';
27
- import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
28
- declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
29
- declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
30
- /**
31
- * Element to portal into. Defaults to the nearest `data-hds` scope, so the
32
- * overlay inherits its theme; pass `null` to use `document.body`.
33
- */
34
- container?: HTMLElement | null;
35
- } & React.RefAttributes<HTMLDivElement>>;
36
- interface HoverCardComponent extends React.FC<React.ComponentProps<typeof HoverCardPrimitive.Root>> {
37
- Trigger: typeof HoverCardTrigger;
38
- Content: typeof HoverCardContent;
39
- }
40
- /**
41
- * HoverCard root + parts. Controlled via `open`/`onOpenChange`, or uncontrolled
42
- * with `defaultOpen`; tune timing with `openDelay`/`closeDelay`.
43
- * @public
44
- */
45
- export declare const HoverCard: HoverCardComponent;
46
- export {};
@@ -1,22 +0,0 @@
1
- import type { LucideIcon } from 'lucide-react';
2
- import { ButtonProps } from './button.js';
3
- import { IconSize } from './icon.js';
4
- export interface IconButtonProps extends Omit<ButtonProps, 'iconOnly' | 'children' | 'size'> {
5
- /** Lucide icon rendered inside the button. */
6
- icon: LucideIcon;
7
- /** Size token for the button itself. */
8
- size?: 'sm' | 'md' | 'lg';
9
- /** Override the inner icon size; defaults to the matching button ramp size. */
10
- iconSize?: IconSize;
11
- /** Override the inner icon color. */
12
- iconColor?: string;
13
- /** Accessible label for the icon button. */
14
- label?: string;
15
- /** Accessible label fallback for backward compatibility. */
16
- 'aria-label'?: string;
17
- }
18
- /**
19
- * IconButton — compact icon-only action surface.
20
- */
21
- /** @public */
22
- export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,14 +0,0 @@
1
- export interface LightboxProps {
2
- open: boolean;
3
- onClose: () => void;
4
- src: string;
5
- alt?: string;
6
- naturalWidth?: number;
7
- naturalHeight?: number;
8
- caption?: string;
9
- captionHref?: string;
10
- captionLabel?: string;
11
- }
12
- /**
13
- */
14
- export declare function Lightbox({ open, onClose, src, alt, naturalWidth, naturalHeight, caption, captionHref, captionLabel, }: LightboxProps): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +0,0 @@
1
- /**
2
- * InputGroup — a text input framed with leading and/or trailing adornments.
3
- * @category Inputs
4
- * @tier primitive
5
- */
6
- import * as React from 'react';
7
- import { type VariantProps } from 'class-variance-authority';
8
- declare const inputGroupVariants: (props?: ({
9
- size?: "sm" | "md" | "lg" | null | undefined;
10
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
11
- type InputGroupVariantProps = VariantProps<typeof inputGroupVariants>;
12
- /** @public */
13
- export interface InputGroupProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, InputGroupVariantProps {
14
- /** Content rendered before the input, e.g. an icon or a static prefix. */
15
- leading?: React.ReactNode;
16
- /** Content rendered after the input, e.g. a unit or a clear button. */
17
- trailing?: React.ReactNode;
18
- /** Class applied to the wrapper (the input itself stays transparent). */
19
- className?: string;
20
- }
21
- /** A single-line input with optional `leading`/`trailing` adornments. */
22
- export declare const InputGroup: React.ForwardRefExoticComponent<InputGroupProps & React.RefAttributes<HTMLInputElement>>;
23
- export {};
@@ -1,40 +0,0 @@
1
- /**
2
- * MultiSelector — multi-select dropdown composing the existing Popover with
3
- * a checkbox option list, so choosing several values from a fixed set reads
4
- * as one overlay pattern with Combobox and Menu rather than a bespoke widget.
5
- * @category Inputs
6
- * @tier pattern
7
- * @public
8
- *
9
- * No new dependency — built entirely on the HDS Popover. The trigger reads
10
- * like a secondary Button, showing a placeholder or a `${n} selected` count;
11
- * the content is a token-skinned list where each row is a checkbox toggling
12
- * membership in `value`.
13
- *
14
- * <MultiSelector
15
- * options={[{ value: 'a', label: 'Apple' }, { value: 'b', label: 'Banana' }]}
16
- * value={fruits}
17
- * onChange={setFruits}
18
- * />
19
- */
20
- import * as React from 'react';
21
- /** @public */
22
- export interface MultiSelectorOption {
23
- value: string;
24
- label: string;
25
- }
26
- /** @public */
27
- export interface MultiSelectorProps {
28
- /** Selectable options. */
29
- options: MultiSelectorOption[];
30
- /** Currently selected values. */
31
- value: string[];
32
- /** Fired with the next selected-values array whenever an option is toggled. */
33
- onChange: (next: string[]) => void;
34
- /** Trigger text when nothing is selected. */
35
- placeholder?: string;
36
- disabled?: boolean;
37
- className?: string;
38
- }
39
- /** @public */
40
- export declare const MultiSelector: React.ForwardRefExoticComponent<MultiSelectorProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,29 +0,0 @@
1
- import type { CSSProperties, ReactNode } from 'react';
2
- import { type NavLevel } from '../lib/navLevels.js';
3
- import { NavItem } from './nav-item.js';
4
- type NavItem = {
5
- path: string;
6
- label: string;
7
- disabled?: boolean;
8
- };
9
- type NavGroupVariant = 'side' | 'toc';
10
- declare const navGroupLabelVariants: (props?: ({
11
- variant?: "side" | "toc" | null | undefined;
12
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
13
- export type NavGroupProps = {
14
- label?: string;
15
- variant?: NavGroupVariant;
16
- level?: NavLevel;
17
- items?: NavItem[];
18
- children?: ReactNode;
19
- collapsible?: boolean;
20
- onNavigate?: () => void;
21
- getExact?: (item: NavItem) => boolean;
22
- className?: string;
23
- style?: CSSProperties;
24
- contentStyle?: CSSProperties;
25
- };
26
- /** @public */
27
- export declare function NavGroup({ label, variant, level, items, children, collapsible, onNavigate, getExact, className, style, contentStyle, }: NavGroupProps): import("react/jsx-runtime").JSX.Element;
28
- /** @internal — CVA variant helper; compose via NavGroup props instead. */
29
- export { navGroupLabelVariants };
@@ -1,33 +0,0 @@
1
- import type { AnchorHTMLAttributes, MouseEvent } from 'react';
2
- import { type VariantProps } from 'class-variance-authority';
3
- import { type NavLevel } from '../lib/navLevels.js';
4
- declare const navItemVariants: (props?: ({
5
- variant?: "side" | "toc" | null | undefined;
6
- state?: "default" | "active" | "disabled" | "focus" | "hover" | null | undefined;
7
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
- declare const navIndicatorVariants: (props?: ({
9
- state?: "default" | "active" | "disabled" | "focus" | "hover" | null | undefined;
10
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
11
- type NavItemVariantProps = VariantProps<typeof navItemVariants>;
12
- type NavVariant = NonNullable<NavItemVariantProps['variant']>;
13
- type NavNativeProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'onClick'>;
14
- export interface NavProps extends NavNativeProps {
15
- /** Visual layout variant for side nav or table of contents usage. */
16
- variant?: NavVariant;
17
- /** Text label displayed inside the navigation row. */
18
- label: string;
19
- /** Marks the item as the current route. */
20
- active?: boolean;
21
- /** Disables interaction and muted the nav row. */
22
- disabled?: boolean;
23
- /** Visual hierarchy level for the navigation row. */
24
- level?: NavLevel;
25
- /** Navigation callback fired before the browser follows the link. */
26
- onNavigate?: (event: MouseEvent<HTMLAnchorElement>) => void;
27
- }
28
- /**
29
- * @public
30
- */
31
- export declare function NavItem({ variant, label, href, active, disabled, level, onNavigate, className, style, onFocus, onMouseEnter, onMouseLeave, onPointerDown, onPointerUp, onPointerCancel, onBlur, ...rest }: NavProps): import("react/jsx-runtime").JSX.Element;
32
- /** @internal — CVA variant helpers; compose via NavItem props instead. */
33
- export { navItemVariants, navIndicatorVariants };
@@ -1 +0,0 @@
1
- export declare function NotFoundPattern(): import("react/jsx-runtime").JSX.Element;
@@ -1,21 +0,0 @@
1
- /**
2
- * OverflowList — a horizontal list that caps visible children by count and
3
- * collapses the remainder into a trailing +N chip. Count-based (via `max`),
4
- * not width-measured, so layout is deterministic and safe under SSR and jsdom.
5
- * @category Layout
6
- * @tier pattern
7
- */
8
- import * as React from 'react';
9
- /** @public */
10
- export interface OverflowListProps extends React.HTMLAttributes<HTMLDivElement> {
11
- /** Items to lay out. Extra items beyond `max` collapse into the overflow node. */
12
- children: React.ReactNode;
13
- /** Maximum items shown before collapsing into overflow. Unset or >= count shows all. */
14
- max?: number;
15
- /** Custom renderer for the overflow node. Defaults to a muted `+N` chip. */
16
- renderOverflow?: (count: number) => React.ReactNode;
17
- }
18
- /**
19
- * Renders up to `max` children followed by a `+N` overflow chip (or custom node).
20
- */
21
- export declare const OverflowList: React.ForwardRefExoticComponent<OverflowListProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,29 +0,0 @@
1
- /**
2
- * SelectableCard — a full-surface card that behaves as a single checkbox-like
3
- * selectable option, with native aria-checked semantics and full keyboard support.
4
- * @category Actions
5
- * @tier pattern
6
- *
7
- * <SelectableCard selected={selected} onSelectedChange={setSelected}>
8
- * Plan A
9
- * </SelectableCard>
10
- */
11
- import * as React from 'react';
12
- import { type VariantProps } from 'class-variance-authority';
13
- declare const selectableCardVariants: (props?: ({
14
- selected?: boolean | null | undefined;
15
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
16
- type SelectableCardVariantProps = VariantProps<typeof selectableCardVariants>;
17
- /** @public */
18
- export interface SelectableCardProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, 'onSelect'>, Omit<SelectableCardVariantProps, 'selected'> {
19
- /** Whether this card is currently selected. */
20
- selected?: boolean;
21
- /** Called with the toggled selection state when the card is activated. */
22
- onSelectedChange?: (selected: boolean) => void;
23
- /** Disable interaction. */
24
- disabled?: boolean;
25
- }
26
- /** A card-shaped single checkbox — click or activate to toggle selection. */
27
- export declare const SelectableCard: React.ForwardRefExoticComponent<SelectableCardProps & React.RefAttributes<HTMLButtonElement>>;
28
- /** @internal — CVA variant helper; compose via SelectableCard props instead. */
29
- export { selectableCardVariants };
@@ -1,23 +0,0 @@
1
- import type { MouseEvent } from 'react';
2
- export type SideNavLevel = 'root' | 'nested';
3
- export interface SideNavProps {
4
- label: string;
5
- href?: string;
6
- active?: boolean;
7
- disabled?: boolean;
8
- titleLabel?: boolean;
9
- /** Visual level — root matches group-header altitude, nested is an indented page link. */
10
- level?: SideNavLevel;
11
- /** Nested depth offset applied via inner padding while keeping the row full width. */
12
- indent?: boolean | number;
13
- onNavigate?: (event: MouseEvent<HTMLAnchorElement>) => void;
14
- }
15
- declare const sideNavVariants: (props?: ({
16
- level?: "root" | "nested" | null | undefined;
17
- state?: "default" | "active" | "disabled" | "focus" | "hover" | null | undefined;
18
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
19
- /**
20
- */
21
- export declare function SideNav({ label, href, active, disabled, titleLabel, level, indent, onNavigate, }: SideNavProps): import("react/jsx-runtime").JSX.Element;
22
- /** @internal — CVA variant helper; compose via SideNav props instead. */
23
- export { sideNavVariants };
@@ -1,19 +0,0 @@
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
- /**
14
- * Sketch — shared shell for generative canvases and WebGL sketches.
15
- *
16
- * @deprecated Sketch is an HDS docs/lab internal (shell for generative canvas/WebGL specimen pages), not a consumer-facing HDS surface. It will be retiered to `utility` (dropped from the published barrel) at the named major.
17
- * @removeIn 1.0.0
18
- */
19
- export declare function Sketch({ title, children, controls }: SketchProps): import("react/jsx-runtime").JSX.Element;
@@ -1,32 +0,0 @@
1
- /**
2
- * StackedCardRail — horizontally-scrolling stacked card carousel.
3
- *
4
- * Scroll mechanism: vertical scroll on an absolutely-positioned inner container
5
- * is mapped to horizontal scroll on a sticky inner strip via a single scroll
6
- * event listener. Cards use CSS scroll-driven animation (animation-timeline:
7
- * view(x …)) for the stack/unstack effect where the browser supports it;
8
- * a plain horizontal rail is the graceful fallback.
9
- *
10
- * Browser compat note:
11
- * - animation-timeline: view() — Chrome 115+, Firefox 110+ (behind flag until
12
- * v114), Safari 18+ (TP only as of 2025). The @supports guard ensures the
13
- * stacking animation is only applied when the feature is available; all other
14
- * browsers get a clean scrollable row.
15
- * - :has() selector (neighbour shift on hover) — Chrome 105+, FF 121+, Safari 15.4+.
16
- * Gated with @supports selector(:has(+ *)).
17
- *
18
- * @category Display
19
- * @tier pattern
20
- */
21
- export interface StackedCardRailCard {
22
- id: string;
23
- title: string;
24
- category?: string;
25
- coverImage?: string;
26
- href?: string;
27
- }
28
- export interface StackedCardRailProps {
29
- cards: StackedCardRailCard[];
30
- }
31
- export declare function StackedCardRail({ cards }: StackedCardRailProps): import("react/jsx-runtime").JSX.Element;
32
- export default StackedCardRail;
@@ -1,12 +0,0 @@
1
- export 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;