@hirobius/design-system 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -1
- package/dist/brand.js +36 -0
- package/dist/contexts.js +63 -59
- package/dist/hirobius-ui.js +22641 -3700
- package/dist/manifest.js +9 -9
- package/dist/scroll.js +42 -0
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +26 -5
- package/dist/types/src/app/components/activity-feed.d.ts +24 -2
- package/dist/types/src/app/components/alert-dialog.d.ts +56 -0
- package/dist/types/src/app/components/app-shell.d.ts +38 -0
- package/dist/types/src/app/components/aspect-ratio.d.ts +25 -0
- package/dist/types/src/app/components/avatar-group.d.ts +22 -0
- package/dist/types/src/app/components/bleed.d.ts +39 -0
- package/dist/types/src/app/components/blockquote.d.ts +20 -0
- package/dist/types/src/app/components/box-sx.d.ts +69 -0
- package/dist/types/src/app/components/box.d.ts +42 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +5 -0
- package/dist/types/src/app/components/button-group.d.ts +18 -0
- package/dist/types/src/app/components/calendar.d.ts +20 -0
- package/dist/types/src/app/components/card.d.ts +29 -13
- package/dist/types/src/app/components/carousel.d.ts +24 -0
- package/dist/types/src/app/components/center.d.ts +36 -0
- package/dist/types/src/app/components/circular-progress.d.ts +28 -0
- package/dist/types/src/app/components/cluster.d.ts +39 -0
- package/dist/types/src/app/components/code-block.d.ts +19 -1
- package/dist/types/src/app/components/command-palette.d.ts +44 -0
- package/dist/types/src/app/components/container.d.ts +10 -0
- package/dist/types/src/app/components/context-menu.d.ts +55 -0
- package/dist/types/src/app/components/cover.d.ts +43 -0
- package/dist/types/src/app/components/date-input.d.ts +31 -0
- package/dist/types/src/app/components/date-range-input.d.ts +34 -0
- package/dist/types/src/app/components/date-time-input.d.ts +30 -0
- package/dist/types/src/app/components/disclosure.d.ts +5 -1
- package/dist/types/src/app/components/divider.d.ts +14 -10
- package/dist/types/src/app/components/doc-link-card.d.ts +5 -1
- package/dist/types/src/app/components/field.d.ts +9 -11
- package/dist/types/src/app/components/file-input.d.ts +28 -0
- package/dist/types/src/app/components/frame.d.ts +38 -0
- package/dist/types/src/app/components/hds-tooltip.d.ts +45 -0
- package/dist/types/src/app/components/heading-stack.d.ts +15 -5
- package/dist/types/src/app/components/hover-card.d.ts +31 -0
- package/dist/types/src/app/components/image-lightbox.d.ts +13 -0
- package/dist/types/src/app/components/inline-code.d.ts +14 -3
- package/dist/types/src/app/components/input-group.d.ts +23 -0
- package/dist/types/src/app/components/kbd.d.ts +18 -0
- package/dist/types/src/app/components/metadata-list.d.ts +43 -0
- package/dist/types/src/app/components/multi-selector.d.ts +40 -0
- package/dist/types/src/app/components/nav-group.d.ts +7 -2
- package/dist/types/src/app/components/nav-item.d.ts +12 -2
- package/dist/types/src/app/components/overflow-list.d.ts +19 -0
- package/dist/types/src/app/components/pin.d.ts +30 -0
- package/dist/types/src/app/components/reveal.d.ts +31 -0
- package/dist/types/src/app/components/segmented-control.d.ts +37 -3
- package/dist/types/src/app/components/selectable-card.d.ts +29 -0
- package/dist/types/src/app/components/side-nav.d.ts +21 -0
- package/dist/types/src/app/components/sidebar.d.ts +45 -0
- package/dist/types/src/app/components/stat.d.ts +8 -10
- package/dist/types/src/app/components/status-dot.d.ts +25 -0
- package/dist/types/src/app/components/status-list-item.d.ts +10 -11
- package/dist/types/src/app/components/stepper.d.ts +31 -0
- package/dist/types/src/app/components/switcher.d.ts +41 -0
- package/dist/types/src/app/components/table.d.ts +12 -1
- package/dist/types/src/app/components/tag.d.ts +19 -18
- package/dist/types/src/app/components/text.d.ts +8 -2
- package/dist/types/src/app/components/textarea.d.ts +38 -0
- package/dist/types/src/app/components/time-input.d.ts +24 -0
- package/dist/types/src/app/components/timestamp.d.ts +24 -0
- package/dist/types/src/app/components/toast.d.ts +8 -2
- package/dist/types/src/app/components/toggle-button.d.ts +32 -0
- package/dist/types/src/app/components/token.d.ts +26 -1
- package/dist/types/src/app/components/tokenizer.d.ts +24 -0
- package/dist/types/src/app/components/toolbar.d.ts +36 -0
- package/dist/types/src/app/components/top-nav.d.ts +21 -0
- package/dist/types/src/app/components/tree-list.d.ts +28 -0
- package/dist/types/src/app/components/visually-hidden.d.ts +17 -0
- package/dist/types/src/app/context/TenantContext.d.ts +1 -1
- package/dist/types/src/app/context/hds-theme.d.ts +68 -0
- package/dist/types/src/app/data/nav-model.d.ts +39 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +20 -0
- package/dist/types/src/app/design-system/generated-token-values.d.ts +14 -1
- package/dist/types/src/app/{pages/hds → layouts}/HdsSystemDocLayout.d.ts +1 -1
- package/dist/types/src/app/lib/hds-search.d.ts +45 -0
- package/dist/types/src/brand/index.d.ts +9 -0
- package/dist/types/src/brand/overlay.d.ts +71 -0
- package/dist/types/src/index.d.ts +109 -2
- package/dist/types/src/scroll/index.d.ts +16 -0
- package/dist/types/src/scroll/smooth-scroll.d.ts +48 -0
- package/dist/types/src/scroll/use-scroll-progress.d.ts +34 -0
- package/dist/variables.css +22 -5
- package/hirobius.tokens.json +70 -10
- package/package.json +41 -68
- package/public/hds-manifest.json +6057 -4732
- package/dist/types/src/app/components/info-page.d.ts +0 -10
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
* @tier primitive
|
|
5
5
|
*/
|
|
6
6
|
import { type ReactNode } from 'react';
|
|
7
|
+
declare const tableHeaderCellVariants: (props?: {
|
|
8
|
+
align?: "left" | "right" | "center";
|
|
9
|
+
density?: "compact" | "comfortable";
|
|
10
|
+
sticky?: boolean;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
12
|
+
declare const tableDataCellVariants: (props?: {
|
|
13
|
+
align?: "left" | "right" | "center";
|
|
14
|
+
density?: "compact" | "comfortable";
|
|
15
|
+
divider?: boolean;
|
|
16
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
7
17
|
/** @public */
|
|
8
18
|
export type TableColumnAlign = 'left' | 'center' | 'right';
|
|
9
19
|
export type TableColumn = {
|
|
@@ -37,4 +47,5 @@ export declare function Table({ columns, rows, caption, captionAction, descripti
|
|
|
37
47
|
flush?: boolean;
|
|
38
48
|
stickyHeader?: boolean;
|
|
39
49
|
}): import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
|
|
50
|
+
/** @internal — CVA variant helpers; compose via Table props instead. */
|
|
51
|
+
export { tableHeaderCellVariants, tableDataCellVariants };
|
|
@@ -5,28 +5,29 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The outer <button> carries the accessible 44px hit target directly via the
|
|
7
7
|
* size token while the inner pill keeps the visible surface compact. Colors
|
|
8
|
-
* (background, border-color, color)
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* (background, border-color, color) live in the pill's cva variants, painted
|
|
9
|
+
* through `group-hover`/`group-active` so the pill reacts to interaction on
|
|
10
|
+
* the shared outer button (converted off the former .hds-tag-btn/.hds-tag-pill
|
|
11
|
+
* theme.css rules for #60 — same behavior, now token-driven Tailwind classes).
|
|
11
12
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
13
|
+
* The `active` prop (aria-pressed selected state) is not one of the variant
|
|
14
|
+
* contract's four axes — it's expressed as the pill's `selected` cva variant,
|
|
15
|
+
* carrying the same rest → hover → pressed → focus-visible state matrix the
|
|
16
|
+
* contract expects, just keyed by selection instead of tone/size/density.
|
|
14
17
|
*/
|
|
15
|
-
import
|
|
16
|
-
|
|
18
|
+
import * as React from 'react';
|
|
19
|
+
declare const tagButtonVariants: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
|
20
|
+
declare const tagPillVariants: (props?: {
|
|
21
|
+
selected?: boolean;
|
|
22
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
23
|
+
/** @public */
|
|
24
|
+
export interface TagProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
17
25
|
/** Tag content displayed inside the pill. */
|
|
18
|
-
children: ReactNode;
|
|
19
|
-
/** Whether the tag is active. */
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
/** Whether the tag is active (selected). */
|
|
20
28
|
active?: boolean;
|
|
21
|
-
/** Click handler for toggling the tag. */
|
|
22
|
-
onClick?: () => void;
|
|
23
|
-
/** Optional class hook for parent-level styling. */
|
|
24
|
-
className?: string;
|
|
25
|
-
/** Native tooltip for explicit file/path affordance. */
|
|
26
|
-
title?: string;
|
|
27
|
-
/** Accessible label when the visible text is abbreviated. */
|
|
28
|
-
'aria-label'?: string;
|
|
29
29
|
}
|
|
30
30
|
/** @public */
|
|
31
31
|
export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
-
|
|
32
|
+
/** @internal — CVA variant helpers; compose via Tag props instead. */
|
|
33
|
+
export { tagButtonVariants, tagPillVariants };
|
|
@@ -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
|
-
|
|
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
|
-
|
|
31
|
+
/** @internal — CVA variant helper; compose via Text props instead. */
|
|
32
|
+
export { textVariants };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Textarea — multi-line text field primitive with label, helper, and error slots.
|
|
3
|
+
* @category Inputs
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*
|
|
6
|
+
* Mirrors Input's shell + token skin as a native `<textarea>`. Figma parity:
|
|
7
|
+
* the four states Default / Focus / Error / Disabled map to the focus-ring,
|
|
8
|
+
* `error`, and `disabled` treatments below.
|
|
9
|
+
*/
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
12
|
+
declare const textareaVariants: (props?: {
|
|
13
|
+
resize?: "none" | "both" | "vertical";
|
|
14
|
+
invalid?: boolean;
|
|
15
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
16
|
+
/** @public */
|
|
17
|
+
export type TextareaResize = NonNullable<VariantProps<typeof textareaVariants>['resize']>;
|
|
18
|
+
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'disabled'> {
|
|
19
|
+
/** Field label rendered above the textarea. */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** Supporting helper text rendered below when not in error. */
|
|
22
|
+
helperText?: string;
|
|
23
|
+
/** Disable interaction. */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** Mark the field as invalid (sets aria-invalid + destructive border). */
|
|
26
|
+
error?: boolean;
|
|
27
|
+
/** Error message rendered below the textarea when `error` is true. */
|
|
28
|
+
errorMessage?: string;
|
|
29
|
+
/** User resize affordance. Defaults to vertical-only. */
|
|
30
|
+
resize?: TextareaResize;
|
|
31
|
+
/** Class hook for the outer wrapper. */
|
|
32
|
+
className?: string;
|
|
33
|
+
/** Class hook for the textarea element itself. */
|
|
34
|
+
textareaClassName?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
37
|
+
/** @internal — CVA variant helper; compose via Textarea props instead. */
|
|
38
|
+
export { textareaVariants };
|
|
@@ -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 = '
|
|
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
|
-
|
|
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
|
-
|
|
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,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HdsThemeProvider — framework-agnostic theming contract for HDS.
|
|
3
|
+
* @category Theming
|
|
4
|
+
* @tier primitive
|
|
5
|
+
* @doc-exempt: API/contract primitive, documented in README (no doc page yet)
|
|
6
|
+
*
|
|
7
|
+
* HDS theming is driven entirely by root attributes + CSS custom properties, so
|
|
8
|
+
* it works with ZERO JavaScript (the Astro / static path just sets the same
|
|
9
|
+
* attributes on a layout element). The four override "dials":
|
|
10
|
+
*
|
|
11
|
+
* dial attribute / var values default
|
|
12
|
+
* ─────── ──────────────────────── ───────────────────────────── ──────────
|
|
13
|
+
* theme data-theme "dark" (light = unset) light
|
|
14
|
+
* density data-density "compact" (comfortable = unset) comfortable
|
|
15
|
+
* brand data-brand + data-tenant overlay slug (e.g. "acme") base
|
|
16
|
+
* font --hds-font-family(-mono) any CSS font-family value Satoshi / Geist Mono
|
|
17
|
+
*
|
|
18
|
+
* This provider is a thin, typed convenience that renders a `data-hds` scope
|
|
19
|
+
* wrapper carrying those attributes — it does NOT own state, storage, or a
|
|
20
|
+
* toggle (that is the in-app ThemeContext's job). Styles do not require it; it
|
|
21
|
+
* exists so React apps can set the contract declaratively and read it back via
|
|
22
|
+
* `useHdsTheme()`.
|
|
23
|
+
*
|
|
24
|
+
* <HdsThemeProvider theme="dark" density="compact" brand="acme">
|
|
25
|
+
* <App />
|
|
26
|
+
* </HdsThemeProvider>
|
|
27
|
+
*
|
|
28
|
+
* Equivalent zero-JS markup:
|
|
29
|
+
* <div data-hds data-theme="dark" data-density="compact" data-brand="acme">…</div>
|
|
30
|
+
*/
|
|
31
|
+
import * as React from 'react';
|
|
32
|
+
/** @public */
|
|
33
|
+
export type HdsTheme = 'light' | 'dark';
|
|
34
|
+
/** @public */
|
|
35
|
+
export type HdsDensity = 'comfortable' | 'compact';
|
|
36
|
+
/** @public */
|
|
37
|
+
export interface HdsThemeValue {
|
|
38
|
+
/** Colour theme. `"dark"` activates the dark token overrides; omit for light. */
|
|
39
|
+
theme?: HdsTheme;
|
|
40
|
+
/** Spacing density. `"compact"` activates the compact overrides; omit for comfortable. */
|
|
41
|
+
density?: HdsDensity;
|
|
42
|
+
/** Brand-overlay slug (compiled `[data-brand]`/`[data-tenant]` block). Omit for the base brand. */
|
|
43
|
+
brand?: string;
|
|
44
|
+
/** Body font-family override (`--hds-font-family`). */
|
|
45
|
+
fontFamily?: string;
|
|
46
|
+
/** Monospace font-family override (`--hds-font-family-mono`). */
|
|
47
|
+
fontFamilyMono?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Read the nearest HdsThemeProvider's active dial values. Returns an empty
|
|
51
|
+
* object when no provider is present (styles still work off the defaults).
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export declare function useHdsTheme(): HdsThemeValue;
|
|
55
|
+
/** @public */
|
|
56
|
+
export interface HdsThemeProviderProps extends HdsThemeValue {
|
|
57
|
+
children: React.ReactNode;
|
|
58
|
+
/** Wrapper element type for the `data-hds` scope. Default `"div"`. */
|
|
59
|
+
as?: React.ElementType;
|
|
60
|
+
className?: string;
|
|
61
|
+
style?: React.CSSProperties;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Renders a `data-hds` scope wrapper that carries the four theming dials as
|
|
65
|
+
* root attributes + CSS vars, and exposes them to `useHdsTheme()`.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
export declare function HdsThemeProvider({ theme, density, brand, fontFamily, fontFamilyMono, as: Comp, className, style, children, }: HdsThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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)";
|
|
@@ -384,6 +397,13 @@ export declare const tokenRefs: {
|
|
|
384
397
|
readonly lineHeight: "var(--semantic-typography-ui-line-height)";
|
|
385
398
|
readonly maxWidth: "var(--semantic-typography-ui-max-width)";
|
|
386
399
|
};
|
|
400
|
+
readonly caption: {
|
|
401
|
+
readonly fontFamily: "var(--semantic-typography-caption-font-family)";
|
|
402
|
+
readonly fontSize: "var(--semantic-typography-caption-font-size)";
|
|
403
|
+
readonly fontWeight: "var(--semantic-typography-caption-font-weight)";
|
|
404
|
+
readonly letterSpacing: "var(--semantic-typography-caption-letter-spacing)";
|
|
405
|
+
readonly lineHeight: "var(--semantic-typography-caption-line-height)";
|
|
406
|
+
};
|
|
387
407
|
readonly eyebrow: {
|
|
388
408
|
readonly fontFamily: "var(--semantic-typography-eyebrow-font-family)";
|
|
389
409
|
readonly fontSize: "var(--semantic-typography-eyebrow-font-size)";
|
|
@@ -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 ["
|
|
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 '
|
|
2
|
+
import { type DocLayoutContentMaxWidth } from './DocLayout';
|
|
3
3
|
/** @public */
|
|
4
4
|
export declare function HdsSystemDocLayout({ contentSlot, contentMaxWidth, }: {
|
|
5
5
|
contentSlot: ReactNode;
|