@hirobius/design-system 0.11.0 → 0.13.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 (93) hide show
  1. package/README.md +50 -9
  2. package/dist/brand.js +36 -0
  3. package/dist/contexts.js +63 -59
  4. package/dist/hirobius-ui.js +22636 -3818
  5. package/dist/manifest.js +9 -9
  6. package/dist/scroll.js +42 -0
  7. package/dist/static.css +388 -0
  8. package/dist/styles.css +1 -1
  9. package/dist/tokens.css +1 -1
  10. package/dist/tokens.js +14 -1
  11. package/dist/types/src/app/components/activity-feed.d.ts +24 -2
  12. package/dist/types/src/app/components/alert-dialog.d.ts +56 -0
  13. package/dist/types/src/app/components/app-shell.d.ts +38 -0
  14. package/dist/types/src/app/components/aspect-ratio.d.ts +25 -0
  15. package/dist/types/src/app/components/avatar-group.d.ts +22 -0
  16. package/dist/types/src/app/components/bleed.d.ts +39 -0
  17. package/dist/types/src/app/components/blockquote.d.ts +20 -0
  18. package/dist/types/src/app/components/box-sx.d.ts +69 -0
  19. package/dist/types/src/app/components/box.d.ts +42 -0
  20. package/dist/types/src/app/components/breadcrumb.d.ts +5 -0
  21. package/dist/types/src/app/components/button-group.d.ts +18 -0
  22. package/dist/types/src/app/components/calendar.d.ts +20 -0
  23. package/dist/types/src/app/components/card.d.ts +29 -13
  24. package/dist/types/src/app/components/carousel.d.ts +24 -0
  25. package/dist/types/src/app/components/center.d.ts +36 -0
  26. package/dist/types/src/app/components/circular-progress.d.ts +28 -0
  27. package/dist/types/src/app/components/cluster.d.ts +39 -0
  28. package/dist/types/src/app/components/code-block.d.ts +19 -1
  29. package/dist/types/src/app/components/command-palette.d.ts +44 -0
  30. package/dist/types/src/app/components/container.d.ts +10 -0
  31. package/dist/types/src/app/components/context-menu.d.ts +55 -0
  32. package/dist/types/src/app/components/cover.d.ts +43 -0
  33. package/dist/types/src/app/components/date-input.d.ts +31 -0
  34. package/dist/types/src/app/components/date-range-input.d.ts +34 -0
  35. package/dist/types/src/app/components/date-time-input.d.ts +30 -0
  36. package/dist/types/src/app/components/disclosure.d.ts +5 -1
  37. package/dist/types/src/app/components/divider.d.ts +14 -10
  38. package/dist/types/src/app/components/doc-link-card.d.ts +5 -1
  39. package/dist/types/src/app/components/field.d.ts +9 -11
  40. package/dist/types/src/app/components/file-input.d.ts +28 -0
  41. package/dist/types/src/app/components/frame.d.ts +38 -0
  42. package/dist/types/src/app/components/heading-stack.d.ts +15 -5
  43. package/dist/types/src/app/components/hover-card.d.ts +31 -0
  44. package/dist/types/src/app/components/image-lightbox.d.ts +13 -0
  45. package/dist/types/src/app/components/inline-code.d.ts +14 -3
  46. package/dist/types/src/app/components/input-group.d.ts +23 -0
  47. package/dist/types/src/app/components/kbd.d.ts +18 -0
  48. package/dist/types/src/app/components/metadata-list.d.ts +43 -0
  49. package/dist/types/src/app/components/multi-selector.d.ts +40 -0
  50. package/dist/types/src/app/components/nav-group.d.ts +7 -2
  51. package/dist/types/src/app/components/nav-item.d.ts +12 -2
  52. package/dist/types/src/app/components/overflow-list.d.ts +19 -0
  53. package/dist/types/src/app/components/pin.d.ts +30 -0
  54. package/dist/types/src/app/components/reveal.d.ts +31 -0
  55. package/dist/types/src/app/components/segmented-control.d.ts +37 -3
  56. package/dist/types/src/app/components/selectable-card.d.ts +29 -0
  57. package/dist/types/src/app/components/side-nav.d.ts +21 -0
  58. package/dist/types/src/app/components/sidebar.d.ts +45 -0
  59. package/dist/types/src/app/components/stat.d.ts +8 -10
  60. package/dist/types/src/app/components/status-dot.d.ts +25 -0
  61. package/dist/types/src/app/components/status-list-item.d.ts +10 -11
  62. package/dist/types/src/app/components/stepper.d.ts +31 -0
  63. package/dist/types/src/app/components/switcher.d.ts +41 -0
  64. package/dist/types/src/app/components/table.d.ts +12 -1
  65. package/dist/types/src/app/components/tag.d.ts +19 -18
  66. package/dist/types/src/app/components/text.d.ts +8 -2
  67. package/dist/types/src/app/components/time-input.d.ts +24 -0
  68. package/dist/types/src/app/components/timestamp.d.ts +24 -0
  69. package/dist/types/src/app/components/toast.d.ts +8 -2
  70. package/dist/types/src/app/components/toggle-button.d.ts +32 -0
  71. package/dist/types/src/app/components/token.d.ts +26 -1
  72. package/dist/types/src/app/components/tokenizer.d.ts +24 -0
  73. package/dist/types/src/app/components/toolbar.d.ts +36 -0
  74. package/dist/types/src/app/components/top-nav.d.ts +21 -0
  75. package/dist/types/src/app/components/tree-list.d.ts +28 -0
  76. package/dist/types/src/app/components/visually-hidden.d.ts +17 -0
  77. package/dist/types/src/app/context/TenantContext.d.ts +1 -1
  78. package/dist/types/src/app/data/nav-model.d.ts +39 -0
  79. package/dist/types/src/app/design-system/generated-token-refs.d.ts +13 -0
  80. package/dist/types/src/app/design-system/generated-token-values.d.ts +14 -1
  81. package/dist/types/src/app/{pages/hds → layouts}/HdsSystemDocLayout.d.ts +1 -1
  82. package/dist/types/src/app/lib/hds-search.d.ts +45 -0
  83. package/dist/types/src/brand/index.d.ts +9 -0
  84. package/dist/types/src/brand/overlay.d.ts +71 -0
  85. package/dist/types/src/index.d.ts +92 -2
  86. package/dist/types/src/scroll/index.d.ts +16 -0
  87. package/dist/types/src/scroll/smooth-scroll.d.ts +48 -0
  88. package/dist/types/src/scroll/use-scroll-progress.d.ts +34 -0
  89. package/dist/variables.css +16 -5
  90. package/hirobius.tokens.json +57 -10
  91. package/package.json +37 -67
  92. package/public/hds-manifest.json +6167 -4929
  93. package/dist/types/src/app/components/info-page.d.ts +0 -10
@@ -6,7 +6,12 @@
6
6
  * @doc-exempt: typography primitive is documented through the Typography ramp page (TypographyPage), not as a standalone component card
7
7
  */
8
8
  import { type CSSProperties, type ElementType, type HTMLAttributes, type ReactNode } from 'react';
9
- type TextVariant = 'display' | 'heading1' | 'heading2' | 'heading3' | 'body' | 'ui' | 'eyebrow' | 'caption' | 'technical' | 'badge' | 'docLede' | 'docBody' | 'docSmall' | 'docCode';
9
+ import { type VariantProps } from 'class-variance-authority';
10
+ declare const textVariants: (props?: {
11
+ variant?: "display" | "caption" | "body" | "heading1" | "heading2" | "heading3" | "ui" | "eyebrow" | "technical" | "badge" | "docLede" | "docBody" | "docSmall" | "docCode";
12
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
13
+ type TextVariantProps = VariantProps<typeof textVariants>;
14
+ type TextVariant = NonNullable<TextVariantProps['variant']>;
10
15
  type TextTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
11
16
  /** @public */
12
17
  export type TextProps = {
@@ -23,4 +28,5 @@ export declare const Text: import("react").ForwardRefExoticComponent<{
23
28
  className?: string;
24
29
  style?: CSSProperties;
25
30
  } & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
26
- export {};
31
+ /** @internal — CVA variant helper; compose via Text props instead. */
32
+ export { textVariants };
@@ -0,0 +1,24 @@
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";
16
+ } & import("class-variance-authority/dist/types").ClassProp) => 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 };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Timestamp — renders a date/time as a semantic <time> element.
3
+ * @category Display
4
+ * @tier primitive
5
+ */
6
+ import * as React from 'react';
7
+ /** @public */
8
+ export type TimestampFormat = 'date' | 'time' | 'datetime' | 'relative';
9
+ /** @public */
10
+ export interface TimestampProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'children'> {
11
+ /** The moment to render — a Date, epoch millis, or an ISO string. */
12
+ date: Date | string | number;
13
+ /** How to present it. Defaults to `datetime`. */
14
+ format?: TimestampFormat;
15
+ /** BCP-47 locale override; defaults to the runtime locale. */
16
+ locale?: string;
17
+ /**
18
+ * Reference point for `relative` formatting. Defaults to the current time;
19
+ * pass an explicit value for deterministic rendering/tests.
20
+ */
21
+ now?: Date | string | number;
22
+ }
23
+ /** Presents a date/time with a machine-readable `dateTime` for accessibility. */
24
+ export declare const Timestamp: React.ForwardRefExoticComponent<TimestampProps & React.RefAttributes<HTMLTimeElement>>;
@@ -19,8 +19,13 @@
19
19
  */
20
20
  import * as React from 'react';
21
21
  import * as ToastPrimitive from '@radix-ui/react-toast';
22
+ import { type VariantProps } from 'class-variance-authority';
23
+ declare const toastIconVariants: (props?: {
24
+ tone?: "success" | "danger" | "warning" | "info" | "neutral";
25
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
26
+ type ToastIconVariantProps = VariantProps<typeof toastIconVariants>;
22
27
  /** @public */
23
- export type ToastTone = 'neutral' | 'info' | 'success' | 'danger' | 'warning';
28
+ export type ToastTone = NonNullable<ToastIconVariantProps['tone']>;
24
29
  /** @public */
25
30
  export interface ToastOptions {
26
31
  /** Headline line — the primary message. */
@@ -53,4 +58,5 @@ export interface ToastProviderProps {
53
58
  * @public
54
59
  */
55
60
  export declare function ToastProvider({ children, duration, swipeDirection, }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
56
- export {};
61
+ /** @internal — CVA variant helper; compose via ToastOptions.tone instead. */
62
+ export { toastIconVariants };
@@ -0,0 +1,32 @@
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";
20
+ size?: "sm" | "md" | "lg";
21
+ } & import("class-variance-authority/dist/types").ClassProp) => 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 };
@@ -2,8 +2,32 @@
2
2
  * Token - reflective token specimen for unified node-based token views.
3
3
  * @category Display
4
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.
5
13
  */
6
14
  import React from 'react';
15
+ declare const tokenShellVariants: (props?: {
16
+ variant?: "node" | "diagram";
17
+ sourceNode?: boolean;
18
+ selected?: boolean;
19
+ fullWidth?: boolean;
20
+ asButton?: boolean;
21
+ nowrap?: boolean;
22
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
23
+ declare const tokenNodeInlineVariants: (props?: {
24
+ sourceNode?: boolean;
25
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
26
+ declare const tokenLabelVariants: (props?: {
27
+ sourceNode?: boolean;
28
+ truncateFromStart?: boolean;
29
+ selected?: boolean;
30
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
7
31
  type TokenBaseProps = {
8
32
  className?: string;
9
33
  fullWidth?: boolean;
@@ -56,4 +80,5 @@ type TokenProps = TokenNodeSurfaceProps | TokenDiagramProps;
56
80
  */
57
81
  /** @public */
58
82
  export declare function Token(props: TokenProps): import("react/jsx-runtime").JSX.Element;
59
- export {};
83
+ /** @internal — CVA variant helpers; compose via Token props instead. */
84
+ export { tokenShellVariants, tokenNodeInlineVariants, tokenLabelVariants };
@@ -0,0 +1,24 @@
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>>;
@@ -0,0 +1,36 @@
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
+ 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 {};
@@ -0,0 +1,21 @@
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
+ /** Top navigation bar with brand, nav, and trailing action slots. */
21
+ export declare const TopNav: React.ForwardRefExoticComponent<TopNavProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,28 @@
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
+ /** Renders a hierarchical `role="tree"` list; nodes with children get an expand/collapse toggle. */
28
+ export declare const TreeList: React.ForwardRefExoticComponent<TreeListProps & React.RefAttributes<HTMLUListElement>>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * VisuallyHidden — content available to assistive tech but hidden visually.
3
+ * @category Utility
4
+ * @tier primitive
5
+ */
6
+ import * as React from 'react';
7
+ /** @public */
8
+ export interface VisuallyHiddenProps extends React.HTMLAttributes<HTMLElement> {
9
+ /** Element rendered as the wrapper. Defaults to 'span'. */
10
+ as?: React.ElementType;
11
+ }
12
+ /**
13
+ * Renders its children off-screen (Tailwind `sr-only`) so they are announced by
14
+ * screen readers without occupying visual space — e.g. a text label for an
15
+ * icon-only control.
16
+ */
17
+ export declare const VisuallyHidden: React.ForwardRefExoticComponent<VisuallyHiddenProps & React.RefAttributes<HTMLElement>>;
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- export type TenantSlug = 'hirobius' | 'concrete-creations' | (string & {});
2
+ export type TenantSlug = 'hirobius' | 'concrete-creations' | 'lilac-bonds' | (string & {});
3
3
  interface TenantCtx {
4
4
  /** Active tenant slug, or null in single-tenant mode. */
5
5
  tenantSlug: TenantSlug | null;
@@ -0,0 +1,39 @@
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;
@@ -61,6 +61,19 @@ export declare const tokenRefs: {
61
61
  readonly "700": "var(--primitive-color-violet-700)";
62
62
  readonly "950": "var(--primitive-color-violet-950)";
63
63
  };
64
+ readonly lilac: {
65
+ readonly "50": "var(--primitive-color-lilac-50)";
66
+ readonly "100": "var(--primitive-color-lilac-100)";
67
+ readonly "200": "var(--primitive-color-lilac-200)";
68
+ readonly "300": "var(--primitive-color-lilac-300)";
69
+ readonly "400": "var(--primitive-color-lilac-400)";
70
+ readonly "450": "var(--primitive-color-lilac-450)";
71
+ readonly "500": "var(--primitive-color-lilac-500)";
72
+ readonly "600": "var(--primitive-color-lilac-600)";
73
+ readonly "700": "var(--primitive-color-lilac-700)";
74
+ readonly "800": "var(--primitive-color-lilac-800)";
75
+ readonly "900": "var(--primitive-color-lilac-900)";
76
+ };
64
77
  readonly amber: {
65
78
  readonly "50": "var(--primitive-color-amber-50)";
66
79
  readonly "400": "var(--primitive-color-amber-400)";
@@ -62,6 +62,19 @@ export declare const tokenValues: {
62
62
  readonly "700": "#6d28d9";
63
63
  readonly "950": "#2e1065";
64
64
  };
65
+ readonly lilac: {
66
+ readonly "50": "#f7f4fe";
67
+ readonly "100": "#efe9fd";
68
+ readonly "200": "#ddd0fb";
69
+ readonly "300": "#c3aef6";
70
+ readonly "400": "#a585ee";
71
+ readonly "450": "#9a6fe8";
72
+ readonly "500": "#6f3fd4";
73
+ readonly "600": "#5f33c0";
74
+ readonly "700": "#4f2aa3";
75
+ readonly "800": "#3a1f78";
76
+ readonly "900": "#2a1659";
77
+ };
65
78
  readonly amber: {
66
79
  readonly "50": "#fffbeb";
67
80
  readonly "400": "#fbbf24";
@@ -122,7 +135,7 @@ export declare const tokenValues: {
122
135
  readonly typography: {
123
136
  readonly family: {
124
137
  readonly primary: readonly ["Satoshi", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "sans-serif"];
125
- readonly display: readonly ["Clash Display", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "sans-serif"];
138
+ readonly display: readonly ["Satoshi", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "sans-serif"];
126
139
  readonly mono: readonly ["Geist Mono", "Courier New", "monospace"];
127
140
  };
128
141
  readonly size: {
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import { type DocLayoutContentMaxWidth } from '../../layouts/DocLayout';
2
+ import { type DocLayoutContentMaxWidth } from './DocLayout';
3
3
  /** @public */
4
4
  export declare function HdsSystemDocLayout({ contentSlot, contentMaxWidth, }: {
5
5
  contentSlot: ReactNode;
@@ -0,0 +1,45 @@
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';
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[];
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @hirobius/design-system/brand — palette → HDS-semantic overlay bridge.
3
+ *
4
+ * Framework-free helpers that theme any render target (static Astro, SSR, email)
5
+ * from a small brand palette while inheriting the HDS semantic contract. Imports
6
+ * no React and no Node built-ins, so it is safe to pull into a build step or an
7
+ * edge runtime. See ./overlay.ts and docs on the Astro consumption path.
8
+ */
9
+ export { brandOverlayVars, brandOverlayStyle, brandOverlayCss, type BrandPalette } from './overlay';
@@ -0,0 +1,71 @@
1
+ /**
2
+ * overlay.ts — pure palette → HDS-semantic overlay bridge.
3
+ *
4
+ * The seam that lets a downstream render target (a static Astro site, an email,
5
+ * an SSR shell) theme itself from a small brand palette while inheriting HDS's
6
+ * semantic contract — contrast-checked pairs, accent states, density, dark mode.
7
+ *
8
+ * A consumer resolves a brand palette (six colours + optional font/radius) and
9
+ * this module maps it onto the HDS semantic custom properties. Everything HDS
10
+ * ships downstream of those semantics (component tokens, utilities) then reads
11
+ * the brand automatically via the `var()` reference chain — the same strategy
12
+ * as the checked-in `[data-brand]` tenant overlays (`src/styles/tenants.css`),
13
+ * but computed at the consumer instead of at HDS build time, so HDS never has
14
+ * to know the client roster.
15
+ *
16
+ * Deliberately dependency-free (no React, no Node) so it runs in any render
17
+ * target and is unit-testable in isolation. Mirrors the zero-dependency idiom
18
+ * of `box-sx.ts`.
19
+ *
20
+ * Interactive accent states (hover/pressed/subtle) are derived from the primary
21
+ * with CSS `color-mix()` — no colour-math dependency, resolved by the browser.
22
+ * `color-mix()` is Baseline-supported (all evergreen engines since 2023); the
23
+ * factory ships new sites, so this is a safe floor.
24
+ *
25
+ * @packageDocumentation
26
+ */
27
+ /** A resolved brand palette — the minimal input needed to theme a surface. */
28
+ export interface BrandPalette {
29
+ /** Primary brand colour — accent rest, key surfaces, links. */
30
+ primary: string;
31
+ /** Text/icon colour that sits on top of `primary`. */
32
+ onPrimary: string;
33
+ /** Page background. */
34
+ bg: string;
35
+ /** Body/foreground text colour. */
36
+ fg: string;
37
+ /** Muted surface — raised cards, subtle fills. */
38
+ muted: string;
39
+ /** Optional secondary accent. Kept brand-level (HDS has one accent ramp). */
40
+ accent?: string;
41
+ /** Optional corner radius as a CSS length (e.g. `'8px'`). */
42
+ radius?: string;
43
+ /** Optional heading font stack. */
44
+ fontHeading?: string;
45
+ /** Optional body font stack. */
46
+ fontBody?: string;
47
+ }
48
+ /**
49
+ * Map a brand palette onto HDS semantic (and a few primitive) custom
50
+ * properties. Returns a flat `--var` → value record; the caller decides how to
51
+ * apply it (inline style string via {@link brandOverlayStyle} or a scoped CSS
52
+ * rule via {@link brandOverlayCss}).
53
+ *
54
+ * Only the accent ramp, page/content colours, and — when provided — radius and
55
+ * font families are overridden. All other semantics inherit HDS defaults
56
+ * unchanged, so a partial palette still yields a coherent theme.
57
+ */
58
+ export declare function brandOverlayVars(palette: BrandPalette): Record<string, string>;
59
+ /**
60
+ * Serialize a palette to an inline `style` string (`k:v;k:v`) for the `<html>`
61
+ * element. Inline element styles beat stylesheet rules, so this is the most
62
+ * direct per-surface theming path (the model the clients factory already uses).
63
+ */
64
+ export declare function brandOverlayStyle(palette: BrandPalette): string;
65
+ /**
66
+ * Serialize a palette to a scoped CSS rule (`<selector>{ --var: value; }`) for
67
+ * a static stylesheet — e.g. `[data-brand="acme"]` blocks in an Astro layout,
68
+ * mirroring the checked-in tenant overlays. `selector` is emitted verbatim; the
69
+ * caller owns its trust (typically a slug it controls).
70
+ */
71
+ export declare function brandOverlayCss(selector: string, palette: BrandPalette): string;