@hirobius/design-system 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE/main.tsx +21 -0
- package/README.md +124 -0
- package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +95 -0
- package/dist/chunks/form-DnGRy27o.js +63 -0
- package/dist/cn.js +8 -0
- package/dist/contexts.js +133 -0
- package/dist/form.js +62 -0
- package/dist/hirobius-ui.js +5611 -0
- package/dist/manifest.js +28 -0
- package/dist/tokens.css +1 -0
- package/dist/tokens.js +693 -0
- package/dist/types/src/app/components/activity-feed.d.ts +43 -0
- package/dist/types/src/app/components/alert.d.ts +18 -0
- package/dist/types/src/app/components/asset-img.d.ts +54 -0
- package/dist/types/src/app/components/avatar.d.ts +23 -0
- package/dist/types/src/app/components/badge.d.ts +20 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +26 -0
- package/dist/types/src/app/components/button.d.ts +37 -0
- package/dist/types/src/app/components/callout.d.ts +23 -0
- package/dist/types/src/app/components/card.d.ts +119 -0
- package/dist/types/src/app/components/checkbox.d.ts +20 -0
- package/dist/types/src/app/components/cinematic-link.d.ts +13 -0
- package/dist/types/src/app/components/code-block.d.ts +29 -0
- package/dist/types/src/app/components/combobox.d.ts +46 -0
- package/dist/types/src/app/components/component-instance-matrix.d.ts +21 -0
- package/dist/types/src/app/components/container.d.ts +31 -0
- package/dist/types/src/app/components/dialog.d.ts +73 -0
- package/dist/types/src/app/components/disclosure.d.ts +32 -0
- package/dist/types/src/app/components/divider.d.ts +21 -0
- package/dist/types/src/app/components/doc-link-card.d.ts +26 -0
- package/dist/types/src/app/components/empty-state.d.ts +24 -0
- package/dist/types/src/app/components/error-boundary.d.ts +25 -0
- package/dist/types/src/app/components/error-pattern.d.ts +9 -0
- package/dist/types/src/app/components/field.d.ts +25 -0
- package/dist/types/src/app/components/form.d.ts +106 -0
- package/dist/types/src/app/components/foundation-swatch.d.ts +39 -0
- package/dist/types/src/app/components/grid.d.ts +65 -0
- package/dist/types/src/app/components/heading-stack.d.ts +42 -0
- package/dist/types/src/app/components/history-card.d.ts +12 -0
- package/dist/types/src/app/components/icon-button.d.ts +23 -0
- package/dist/types/src/app/components/icon.d.ts +30 -0
- package/dist/types/src/app/components/info-page.d.ts +10 -0
- package/dist/types/src/app/components/inline-code.d.ts +12 -0
- package/dist/types/src/app/components/inline-link.d.ts +17 -0
- package/dist/types/src/app/components/input.d.ts +46 -0
- package/dist/types/src/app/components/lab/tokenUtils.d.ts +38 -0
- package/dist/types/src/app/components/menu.d.ts +56 -0
- package/dist/types/src/app/components/nav-group.d.ts +24 -0
- package/dist/types/src/app/components/nav-item.d.ts +21 -0
- package/dist/types/src/app/components/not-found-pattern.d.ts +1 -0
- package/dist/types/src/app/components/page.d.ts +43 -0
- package/dist/types/src/app/components/pagination.d.ts +24 -0
- package/dist/types/src/app/components/popover.d.ts +44 -0
- package/dist/types/src/app/components/progress.d.ts +25 -0
- package/dist/types/src/app/components/radio.d.ts +18 -0
- package/dist/types/src/app/components/segmented-control.d.ts +33 -0
- package/dist/types/src/app/components/skeleton.d.ts +25 -0
- package/dist/types/src/app/components/sketch.d.ts +13 -0
- package/dist/types/src/app/components/slider.d.ts +22 -0
- package/dist/types/src/app/components/spinner.d.ts +20 -0
- package/dist/types/src/app/components/stack.d.ts +39 -0
- package/dist/types/src/app/components/stat.d.ts +24 -0
- package/dist/types/src/app/components/status-list-item.d.ts +25 -0
- package/dist/types/src/app/components/status-tile.d.ts +22 -0
- package/dist/types/src/app/components/stepper-field.d.ts +13 -0
- package/dist/types/src/app/components/surface-padding.d.ts +18 -0
- package/dist/types/src/app/components/surface.d.ts +30 -0
- package/dist/types/src/app/components/table.d.ts +40 -0
- package/dist/types/src/app/components/tabs.d.ts +27 -0
- package/dist/types/src/app/components/tag.d.ts +32 -0
- package/dist/types/src/app/components/text-lockup.d.ts +38 -0
- package/dist/types/src/app/components/text.d.ts +26 -0
- package/dist/types/src/app/components/tile-grid.d.ts +17 -0
- package/dist/types/src/app/components/toast.d.ts +56 -0
- package/dist/types/src/app/components/toggle.d.ts +18 -0
- package/dist/types/src/app/components/token.d.ts +59 -0
- package/dist/types/src/app/components/tooltip.d.ts +33 -0
- package/dist/types/src/app/context/DemoStateContext.d.ts +21 -0
- package/dist/types/src/app/context/FontContext.d.ts +4 -0
- package/dist/types/src/app/context/LanguageContext.d.ts +23 -0
- package/dist/types/src/app/context/RouterContext.d.ts +61 -0
- package/dist/types/src/app/context/TenantContext.d.ts +29 -0
- package/dist/types/src/app/context/ThemeContext.d.ts +18 -0
- package/dist/types/src/app/context/TokenDisplayContext.d.ts +11 -0
- package/dist/types/src/app/context/index.d.ts +19 -0
- package/dist/types/src/app/data/manifest-types.d.ts +128 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +586 -0
- package/dist/types/src/app/design-system/generated-token-values.d.ts +223 -0
- package/dist/types/src/app/design-system/theme.d.ts +32 -0
- package/dist/types/src/app/design-system/tokens.d.ts +333 -0
- package/dist/types/src/app/hooks/useFocusVisible.d.ts +9 -0
- package/dist/types/src/app/hooks/useInteractionState.d.ts +27 -0
- package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +21 -0
- package/dist/types/src/app/layouts/DocLayout.d.ts +16 -0
- package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +6 -0
- package/dist/types/src/app/lib/nav-active.d.ts +16 -0
- package/dist/types/src/app/lib/navLevels.d.ts +4 -0
- package/dist/types/src/app/pages/hds/HdsSystemDocLayout.d.ts +7 -0
- package/dist/types/src/form/hds-form.d.ts +61 -0
- package/dist/types/src/form/index.d.ts +30 -0
- package/dist/types/src/form/use-hds-form.d.ts +23 -0
- package/dist/types/src/index.d.ts +2276 -0
- package/dist/types/src/lib/deprecation.d.ts +4 -0
- package/dist/types/src/lib/manifest-entry.d.ts +3 -0
- package/dist/types/src/lib/utils.d.ts +3 -0
- package/dist/variables.css +461 -0
- package/hirobius.tokens.json +2220 -0
- package/package.json +366 -0
- package/protocol/envelope.mjs +201 -0
- package/protocol/figma-snapshot.schema.json +190 -0
- package/public/hds-manifest.json +11230 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActivityFeed — chronological system event log.
|
|
3
|
+
* @category Display
|
|
4
|
+
* @tier pattern
|
|
5
|
+
* @doc-exempt: internal portfolio and systems timeline pattern; no standalone component doc page
|
|
6
|
+
*
|
|
7
|
+
* Renders a list of activity events using white space as the sole separator.
|
|
8
|
+
* No dividers, no borders between items. 48px gap (space.12) creates the
|
|
9
|
+
* visual grouping between events; 16px gap inside each item structures the
|
|
10
|
+
* content hierarchy.
|
|
11
|
+
*
|
|
12
|
+
* Typography mapping:
|
|
13
|
+
* title → heading3 (24px/1.25)
|
|
14
|
+
* description → body (16px/1.5)
|
|
15
|
+
* timestamp → technical (12px/1.0 mono)
|
|
16
|
+
* category → ui (14px/1.5)
|
|
17
|
+
*/
|
|
18
|
+
import type { ReactNode } from 'react';
|
|
19
|
+
/** @public */
|
|
20
|
+
export type ActivityStatus = 'success' | 'error' | 'warning' | 'info' | 'neutral';
|
|
21
|
+
export interface ActivityEvent {
|
|
22
|
+
id: string;
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
timestamp: string;
|
|
26
|
+
category: string;
|
|
27
|
+
icon: ReactNode;
|
|
28
|
+
status: ActivityStatus;
|
|
29
|
+
action?: {
|
|
30
|
+
label: string;
|
|
31
|
+
onClick?: () => void;
|
|
32
|
+
};
|
|
33
|
+
/** Optional structured metadata rendered between description and action.
|
|
34
|
+
* Reserved for compact metadata clusters like AgentTag (assignee,
|
|
35
|
+
* tier, cost). Keeps description as prose; meta is for chips/tags. */
|
|
36
|
+
meta?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export interface ActivityFeedProps {
|
|
39
|
+
events: ActivityEvent[];
|
|
40
|
+
}
|
|
41
|
+
/** @internal — demo placeholder data; supply your own ActivityEvent[] via the events prop. */
|
|
42
|
+
export declare const defaultActivityEvents: ActivityEvent[];
|
|
43
|
+
export declare function ActivityFeed({ events }: ActivityFeedProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert - compact feedback surface with contextual severity.
|
|
3
|
+
* @category Feedback
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
type AlertTone = 'success' | 'danger' | 'warning' | 'info';
|
|
8
|
+
interface AlertProps {
|
|
9
|
+
/** Feedback tone that controls icon, border, and surface treatment. */
|
|
10
|
+
tone?: AlertTone;
|
|
11
|
+
/** Optional heading shown above the body copy. */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Main alert message content. */
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/** @public */
|
|
17
|
+
export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AssetImg - responsive asset frame with fallback placeholder handling.
|
|
3
|
+
* Contexts: default, lightbox, and detail.
|
|
4
|
+
* @category Display
|
|
5
|
+
* @tier primitive
|
|
6
|
+
*/
|
|
7
|
+
import { CSSProperties } from 'react';
|
|
8
|
+
import type React from 'react';
|
|
9
|
+
type AssetImgContext = 'default' | 'lightbox' | 'detail';
|
|
10
|
+
interface AssetImgProps {
|
|
11
|
+
/** Image source path. */
|
|
12
|
+
src: string;
|
|
13
|
+
/** Accessible alt text. */
|
|
14
|
+
alt?: string;
|
|
15
|
+
/** Optional title attribute. */
|
|
16
|
+
title?: string;
|
|
17
|
+
/** Optional inline styles for layout adjustments. */
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
/** Optional class hook for parent-level styling. */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Whether the image can be dragged. */
|
|
22
|
+
draggable?: boolean;
|
|
23
|
+
/** Dark-mode hint used by certain asset treatments. */
|
|
24
|
+
isDark?: boolean;
|
|
25
|
+
/** Natural asset width used to preserve aspect ratio in placeholders. */
|
|
26
|
+
naturalWidth?: number;
|
|
27
|
+
/** Natural asset height used to preserve aspect ratio in placeholders. */
|
|
28
|
+
naturalHeight?: number;
|
|
29
|
+
/** Click handler for interactive assets. */
|
|
30
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
31
|
+
/** Pointer-down handler for interactive assets. */
|
|
32
|
+
onMouseDown?: (e: React.MouseEvent) => void;
|
|
33
|
+
/** Pointer-move handler for interactive assets. */
|
|
34
|
+
onMouseMove?: (e: React.MouseEvent) => void;
|
|
35
|
+
/** Pointer-up handler for interactive assets. */
|
|
36
|
+
onMouseUp?: (e: React.MouseEvent) => void;
|
|
37
|
+
/** Pointer-leave handler for interactive assets. */
|
|
38
|
+
onMouseLeave?: (e: React.MouseEvent) => void;
|
|
39
|
+
/** Whether the expandable tooltip is shown when the image is clickable. */
|
|
40
|
+
expandable?: boolean;
|
|
41
|
+
/** Override label for the expandable tooltip. */
|
|
42
|
+
expandLabel?: string;
|
|
43
|
+
/** Rendering mode for the placeholder and image frame. */
|
|
44
|
+
context?: AssetImgContext;
|
|
45
|
+
/** Image loading attribute: 'lazy' (default) for off-screen, 'eager' for above-the-fold. */
|
|
46
|
+
loading?: 'lazy' | 'eager';
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Display asset frame with fallback placeholder handling.
|
|
50
|
+
* @category Display
|
|
51
|
+
*/
|
|
52
|
+
/** @public */
|
|
53
|
+
export declare function AssetImg({ src, alt, title, style, className, draggable, isDark: _isDark, naturalWidth, naturalHeight, onClick, onMouseDown, onMouseMove, onMouseUp, onMouseLeave, expandable, expandLabel, context, loading, }: AssetImgProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Avatar - user or entity image with an initials fallback.
|
|
3
|
+
* @category Display
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*/
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
+
declare const avatarVariants: (props?: {
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
11
|
+
type AvatarVariantProps = VariantProps<typeof avatarVariants>;
|
|
12
|
+
/** @public */
|
|
13
|
+
export interface AvatarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'>, AvatarVariantProps {
|
|
14
|
+
/** Image source. When absent or it fails to load, the initials fallback shows. */
|
|
15
|
+
src?: string;
|
|
16
|
+
/** Required descriptive alt / accessible name (e.g. the person's name). */
|
|
17
|
+
alt: string;
|
|
18
|
+
/** Explicit initials. Falls back to the first letters derived from `alt`. */
|
|
19
|
+
initials?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Circular avatar. Renders the image when available, else initials from `alt`. */
|
|
22
|
+
export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Badge - compact feedback badge for neutral and semantic states.
|
|
3
|
+
* @category Feedback
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*/
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
8
|
+
declare const badgeVariants: (props?: {
|
|
9
|
+
tone?: "success" | "danger" | "warning" | "info" | "neutral";
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
11
|
+
type BadgeVariantProps = VariantProps<typeof badgeVariants>;
|
|
12
|
+
/** @public */
|
|
13
|
+
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'style'>, BadgeVariantProps {
|
|
14
|
+
/** Element rendered as the badge wrapper. Defaults to 'span'. */
|
|
15
|
+
as?: React.ElementType;
|
|
16
|
+
}
|
|
17
|
+
/** Compact metadata/status chip. Tone is the only styling input. */
|
|
18
|
+
export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
19
|
+
/** @internal — CVA variant helper; compose via Badge props instead. */
|
|
20
|
+
export { badgeVariants };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breadcrumb - hierarchical navigation trail.
|
|
3
|
+
* @category Navigation
|
|
4
|
+
* @tier pattern
|
|
5
|
+
*/
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
/** @public */
|
|
8
|
+
export interface BreadcrumbItem {
|
|
9
|
+
/** Visible label for the crumb. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Destination. Omit on the current (last) crumb to render it as plain text. */
|
|
12
|
+
href?: string;
|
|
13
|
+
}
|
|
14
|
+
/** @public */
|
|
15
|
+
export interface BreadcrumbProps extends Omit<React.HTMLAttributes<HTMLElement>, 'children'> {
|
|
16
|
+
/** Ordered trail from root → current. The last item renders as the current page. */
|
|
17
|
+
items: BreadcrumbItem[];
|
|
18
|
+
/** Accessible label for the nav landmark. */
|
|
19
|
+
label?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Breadcrumb trail. Links route through the HDS router seam (plain anchors with
|
|
23
|
+
* no router, client-side nav when a router adapter is provided). The final item
|
|
24
|
+
* is marked aria-current="page".
|
|
25
|
+
*/
|
|
26
|
+
export declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @category Actions
|
|
3
|
+
* @tier primitive
|
|
4
|
+
* @figma Variant=Button/Variant
|
|
5
|
+
* @figma Size=Button/Size
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
9
|
+
declare const buttonVariants: (props?: {
|
|
10
|
+
variant?: "primary" | "secondary" | "tertiary";
|
|
11
|
+
size?: "sm" | "md" | "lg";
|
|
12
|
+
iconOnly?: boolean;
|
|
13
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
14
|
+
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
15
|
+
/** @public */
|
|
16
|
+
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled'>, Omit<ButtonVariantProps, 'iconOnly'> {
|
|
17
|
+
/** Render the button chrome onto a single child element for link semantics. */
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
/** Optional accessible label used when children are not suitable as the name. */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** Show a busy indicator and disable interaction. */
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
/** Leading icon rendered before the label. */
|
|
24
|
+
iconLeft?: React.ReactNode;
|
|
25
|
+
/** Trailing icon rendered after the label. */
|
|
26
|
+
iconRight?: React.ReactNode;
|
|
27
|
+
/** Render the button as a square icon-only control. Requires aria-label. */
|
|
28
|
+
iconOnly?: boolean;
|
|
29
|
+
/** Disable interaction. Mirrors the native HTML attribute. */
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Triggers an action when activated.
|
|
34
|
+
*/
|
|
35
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
36
|
+
/** @internal — CVA variant helper; compose via Button props instead. */
|
|
37
|
+
export { buttonVariants };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @category Feedback
|
|
3
|
+
* @tier primitive
|
|
4
|
+
*/
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
7
|
+
type CalloutTone = 'accent' | 'info' | 'success' | 'warning' | 'danger';
|
|
8
|
+
declare const calloutVariants: (props?: {
|
|
9
|
+
tone?: "success" | "danger" | "warning" | "info" | "accent";
|
|
10
|
+
italic?: boolean;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
12
|
+
type CalloutVariantProps = VariantProps<typeof calloutVariants>;
|
|
13
|
+
export interface CalloutProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style'>, Omit<CalloutVariantProps, 'italic'> {
|
|
14
|
+
/** Tone — drives the left rule color and bg tint. */
|
|
15
|
+
tone?: CalloutTone;
|
|
16
|
+
/** Italicize the body content (quote / pull-quote pattern). */
|
|
17
|
+
italic?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Tone-driven side-rule callout for status, quotes, hypotheses.
|
|
21
|
+
*/
|
|
22
|
+
export declare const Callout: React.ForwardRefExoticComponent<CalloutProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export default Callout;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Card — surface container with slot anatomy (12d-card-anatomy).
|
|
3
|
+
* @category Display
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*
|
|
6
|
+
* Slot anatomy (DESIGN.md §"Card Anatomy"). Status, progress, and metadata are
|
|
7
|
+
* layout-bearing — they live in slots, never inline next to prose.
|
|
8
|
+
*
|
|
9
|
+
* <Card tone="accent">
|
|
10
|
+
* <Card.Header metadata={<Badge tone="warning">in-progress</Badge>}>
|
|
11
|
+
* <Card.Title>Discovery phase</Card.Title>
|
|
12
|
+
* <Card.Description>Stakeholder interviews and audit prep.</Card.Description>
|
|
13
|
+
* </Card.Header>
|
|
14
|
+
* <Card.Progress value={42} max={100} label="5 / 12 tasks" />
|
|
15
|
+
* <Card.Metric label="Retainer" value="$3,500" sub="Active" />
|
|
16
|
+
* <Card.Body>…</Card.Body>
|
|
17
|
+
* <Card.Footer>…</Card.Footer>
|
|
18
|
+
* </Card>
|
|
19
|
+
*
|
|
20
|
+
* Slot reservations:
|
|
21
|
+
* - Header: title (h3) + optional description (caption) + optional metadata
|
|
22
|
+
* zone (right-aligned, holds <Badge> / <Tag> for status, never raw spans).
|
|
23
|
+
* - Progress: full-width 4px bar in a reserved 16px vertical rail. Owns its
|
|
24
|
+
* spacing — never crowds adjacent prose.
|
|
25
|
+
* - Metric: single label-uppercase + big value (h2) + optional sub-line.
|
|
26
|
+
* Reserved vertical block. Use multiple side-by-side via flex/grid container.
|
|
27
|
+
* - Body: prose, lists, structured content. NO inline status, progress, or
|
|
28
|
+
* thin colored bars. Group sections via separate <Card.Body> blocks.
|
|
29
|
+
* - Footer: actions, secondary metadata, timestamps.
|
|
30
|
+
*
|
|
31
|
+
* Tone prop: 'default' (neutral border) | 'accent' (border-accent + raised bg)
|
|
32
|
+
* for highlighted variants like "recommended package", or feedback tones for
|
|
33
|
+
* status-driven cards. Tone replaces hand-rolled `pkgHighlight`-style overrides.
|
|
34
|
+
*
|
|
35
|
+
* Legacy props (padding / gap / noPadding / as / style) are retained.
|
|
36
|
+
* Existing callers that pass raw children continue to work; new callers
|
|
37
|
+
* should prefer compound parts + `padding="none"`.
|
|
38
|
+
*
|
|
39
|
+
* Depth comes from semantic.color.border.default (role.border) at rest;
|
|
40
|
+
* elevation tokens are not bound by default — pass `className="shadow-..."`
|
|
41
|
+
* for a hover/floating treatment on interactive cards.
|
|
42
|
+
*/
|
|
43
|
+
import * as React from 'react';
|
|
44
|
+
import hds from '../design-system/tokens';
|
|
45
|
+
import { type PaddingOption } from './surface-padding';
|
|
46
|
+
type GapOption = 'tight' | 'normal' | 'inset' | 'spacious' | keyof typeof hds.space;
|
|
47
|
+
type CardTone = 'default' | 'accent' | 'success' | 'warning' | 'danger';
|
|
48
|
+
/** @public */
|
|
49
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
50
|
+
/** Render-as element for the root wrapper. */
|
|
51
|
+
as?: React.ElementType;
|
|
52
|
+
/** Legacy padding prop for raw-children cards. Use `none` when composing parts. */
|
|
53
|
+
padding?: PaddingOption;
|
|
54
|
+
/** Legacy gap prop for the root flex container. */
|
|
55
|
+
gap?: GapOption;
|
|
56
|
+
/** Legacy convenience flag that removes inner padding. */
|
|
57
|
+
noPadding?: boolean;
|
|
58
|
+
/** Visual tone — controls border color/weight. Default is BORDERLESS;
|
|
59
|
+
* `accent` for highlighted entries (e.g. recommended package);
|
|
60
|
+
* semantic tones for status-driven cards (border IS the signal).
|
|
61
|
+
* For a neutral-bordered card without semantic meaning, pass
|
|
62
|
+
* `bordered` instead of overloading tone. */
|
|
63
|
+
tone?: CardTone;
|
|
64
|
+
/** Opt in to a neutral 1px border on the default tone. Use for genuinely
|
|
65
|
+
* discrete standalone records in sparse layouts where containment helps
|
|
66
|
+
* legibility. Default false — repeated cards in grids should stay
|
|
67
|
+
* borderless and rely on whitespace, rails, or section dividers. */
|
|
68
|
+
bordered?: boolean;
|
|
69
|
+
}
|
|
70
|
+
interface CardComponent extends React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> {
|
|
71
|
+
Header: typeof CardHeader;
|
|
72
|
+
Title: typeof CardTitle;
|
|
73
|
+
Description: typeof CardDescription;
|
|
74
|
+
Body: typeof CardBody;
|
|
75
|
+
Footer: typeof CardFooter;
|
|
76
|
+
Progress: typeof CardProgress;
|
|
77
|
+
Metric: typeof CardMetric;
|
|
78
|
+
}
|
|
79
|
+
interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
80
|
+
/** Top-of-card metadata zone — status badges, tags, eyebrow labels.
|
|
81
|
+
* Accepts <Badge>, <Tag>, or compound nodes. NEVER pass raw spans
|
|
82
|
+
* with status colors here; use the proper primitive so tone, padding,
|
|
83
|
+
* and accessibility role are consistent.
|
|
84
|
+
*
|
|
85
|
+
* Rendered ABOVE the title (Material/Polaris/Carbon convention) — no
|
|
86
|
+
* two-column flex, no crowding next to long titles, mobile-friendly. */
|
|
87
|
+
metadata?: React.ReactNode;
|
|
88
|
+
}
|
|
89
|
+
declare const CardHeader: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
90
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
91
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
92
|
+
declare const CardBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
93
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
94
|
+
interface CardProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'aria-valuemin' | 'aria-valuemax' | 'aria-valuenow'> {
|
|
95
|
+
/** Current value (0..max). */
|
|
96
|
+
value: number;
|
|
97
|
+
/** Maximum value. Defaults to 100. */
|
|
98
|
+
max?: number;
|
|
99
|
+
/** Optional caption rendered beneath the bar. Reserved baseline so it
|
|
100
|
+
* never crowds the slot above. Accepts strings or react nodes. */
|
|
101
|
+
label?: React.ReactNode;
|
|
102
|
+
/** Visual tone for the fill. Defaults to accent. Use feedback tones to
|
|
103
|
+
* signal status without a separate badge (e.g. red bar for over-budget). */
|
|
104
|
+
tone?: CardTone;
|
|
105
|
+
}
|
|
106
|
+
declare const CardProgress: React.ForwardRefExoticComponent<CardProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
107
|
+
interface CardMetricProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
108
|
+
/** Uppercase eyebrow label (e.g. "Retainer", "Open tasks"). */
|
|
109
|
+
label: React.ReactNode;
|
|
110
|
+
/** Big value (e.g. "$3,500", "12", "67%"). Rendered at h2 weight. */
|
|
111
|
+
value: React.ReactNode;
|
|
112
|
+
/** Optional sub-line beneath the value (e.g. "Active", "this week"). */
|
|
113
|
+
sub?: React.ReactNode;
|
|
114
|
+
/** Tone for the value — applies semantic color. Defaults to neutral. */
|
|
115
|
+
tone?: CardTone;
|
|
116
|
+
}
|
|
117
|
+
declare const CardMetric: React.ForwardRefExoticComponent<CardMetricProps & React.RefAttributes<HTMLDivElement>>;
|
|
118
|
+
export declare const Card: CardComponent;
|
|
119
|
+
export { CardHeader, CardTitle, CardDescription, CardBody, CardFooter, CardProgress, CardMetric };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HdsCheckbox — custom-drawn checkbox with check / indeterminate glyph.
|
|
3
|
+
* @category Inputs
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*/
|
|
6
|
+
import type { InputHTMLAttributes } from 'react';
|
|
7
|
+
/** HdsCheckbox — custom-drawn checkbox with check / indeterminate glyph. */
|
|
8
|
+
export type HdsCheckboxDemoState = 'rest' | 'hover' | 'focused' | 'pressed' | 'disabled';
|
|
9
|
+
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> {
|
|
10
|
+
/** Checkbox label displayed next to the control. */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Current checked state. */
|
|
13
|
+
checked: boolean;
|
|
14
|
+
/** Called when the checkbox changes. */
|
|
15
|
+
onChange: (v: boolean) => void;
|
|
16
|
+
/** Mixed state — visually a dash; supersedes the check glyph. */
|
|
17
|
+
indeterminate?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const HdsCheckbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CinematicLink - cinematic editorial link treatment for portfolio surfaces.
|
|
3
|
+
* @category Branding
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
interface CinematicLinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
8
|
+
href: string;
|
|
9
|
+
children: string;
|
|
10
|
+
}
|
|
11
|
+
/** @public */
|
|
12
|
+
export declare function CinematicLink({ href, children, style, className, ...rest }: CinematicLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeBlock - code display with copy button and optional collapsible toggle.
|
|
3
|
+
* @category Display
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*/
|
|
6
|
+
interface CodeBlockProps {
|
|
7
|
+
/** Code string displayed in the block. */
|
|
8
|
+
code: string;
|
|
9
|
+
/** Visual presentation mode for block snippets vs inline single-line code. */
|
|
10
|
+
variant?: 'block' | 'inline';
|
|
11
|
+
/** When true, inline code truncates from the start rather than the end. */
|
|
12
|
+
truncateFromStart?: boolean;
|
|
13
|
+
/** Optional language label shown in the header (also drives syntax coloring). */
|
|
14
|
+
language?: string;
|
|
15
|
+
/** Optional filename label shown in the header. */
|
|
16
|
+
filename?: string;
|
|
17
|
+
/**
|
|
18
|
+
* When true (block variant only), code is hidden behind a "Show code" toggle.
|
|
19
|
+
* Off by default to preserve backward compatibility for existing consumers.
|
|
20
|
+
*/
|
|
21
|
+
collapsible?: boolean;
|
|
22
|
+
/** When `collapsible`, controls the initial state. Defaults to collapsed. */
|
|
23
|
+
defaultExpanded?: boolean;
|
|
24
|
+
/** Optional class hook for layout-specific styling. */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/** @public */
|
|
28
|
+
export declare function CodeBlock({ code, variant, truncateFromStart, language, filename, collapsible, defaultExpanded, className, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Combobox — searchable single-select (Popover + filtered listbox).
|
|
3
|
+
* @category Inputs
|
|
4
|
+
* @tier pattern
|
|
5
|
+
* @doc-exempt: no Inputs-overlay doc page yet — add demo when created
|
|
6
|
+
*
|
|
7
|
+
* A select-with-search built on the HDS Popover. The trigger shows the current
|
|
8
|
+
* selection; opening reveals a search field that filters the option list.
|
|
9
|
+
* Full keyboard support (↑/↓ to move, Enter to choose, Esc/outside-click to
|
|
10
|
+
* close) and listbox/option ARIA. Controlled via `value` + `onChange`.
|
|
11
|
+
*
|
|
12
|
+
* <Combobox
|
|
13
|
+
* options={[{ value: 'us', label: 'United States' }, …]}
|
|
14
|
+
* value={country}
|
|
15
|
+
* onChange={setCountry}
|
|
16
|
+
* placeholder="Select a country"
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
import * as React from 'react';
|
|
20
|
+
/** @public */
|
|
21
|
+
export interface ComboboxOption {
|
|
22
|
+
value: string;
|
|
23
|
+
label: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** @public */
|
|
27
|
+
export interface ComboboxProps {
|
|
28
|
+
/** Selectable options. */
|
|
29
|
+
options: ComboboxOption[];
|
|
30
|
+
/** Currently selected value, or null when nothing is chosen. */
|
|
31
|
+
value: string | null;
|
|
32
|
+
/** Fired with the chosen option's value. */
|
|
33
|
+
onChange: (value: string) => void;
|
|
34
|
+
/** Trigger text when nothing is selected. */
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
/** Placeholder for the search field. */
|
|
37
|
+
searchPlaceholder?: string;
|
|
38
|
+
/** Shown when the filter matches no options. */
|
|
39
|
+
emptyMessage?: string;
|
|
40
|
+
/** Accessible label for the trigger (when not labelled by a <Field>). */
|
|
41
|
+
'aria-label'?: string;
|
|
42
|
+
className?: string;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/** @public */
|
|
46
|
+
export declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ComponentInstanceMatrix — responsive specimen matrix for variant and state parity.
|
|
3
|
+
*
|
|
4
|
+
* @category Utilities
|
|
5
|
+
* @tier primitive
|
|
6
|
+
* @doc-exempt: specimen matrix helper used by docs pages, not a consumer-facing HDS surface.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
/** @public */
|
|
10
|
+
export declare function ComponentInstanceMatrix({ componentName, dimensionX, dimensionY, title, isMobile: _isMobile, rowLabelWidth: _rowLabelWidth, rowLabelTone, freezeRowState, renderInstance, }: {
|
|
11
|
+
componentName: string;
|
|
12
|
+
dimensionX: string;
|
|
13
|
+
dimensionY: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
isMobile: boolean;
|
|
16
|
+
rowLabelWidth?: number;
|
|
17
|
+
rowLabelTone?: 'primary' | 'secondary';
|
|
18
|
+
/** Wrap each row's rendered instance in FreezeState so the visual state is frozen. */
|
|
19
|
+
freezeRowState?: boolean;
|
|
20
|
+
renderInstance: (rowKey: string, columnKey: string) => React.ReactNode;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Container — semantic width-constrained layout.
|
|
3
|
+
* @category Layout
|
|
4
|
+
* @tier primitive
|
|
5
|
+
*
|
|
6
|
+
* Centers content horizontally and applies semantic max-width constraints.
|
|
7
|
+
* - maxWidth options: 'content' (760px prose) | 'max' (1200px full layout)
|
|
8
|
+
* - No arbitrary pixel values allowed
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* <Container maxWidth="max">
|
|
12
|
+
* <div>...</div>
|
|
13
|
+
* </Container>
|
|
14
|
+
*/
|
|
15
|
+
import type { ReactNode, CSSProperties } from 'react';
|
|
16
|
+
type MaxWidthOption = 'content' | 'max';
|
|
17
|
+
interface ContainerProps {
|
|
18
|
+
/** Container content. */
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/** Max width: 'content' (760px for prose) | 'max' (1200px for full layouts). Defaults to 'max'. */
|
|
21
|
+
maxWidth?: MaxWidthOption;
|
|
22
|
+
/** Deprecated. Container no longer owns internal padding. */
|
|
23
|
+
padding?: string;
|
|
24
|
+
/** Optional inline styles for layout-specific adjustments. */
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
/** Optional class hook. */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/** @public */
|
|
30
|
+
export declare function Container({ children, maxWidth, padding, style, className, }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dialog — modal dialog (shadcn baseline, compound parts).
|
|
3
|
+
* @category Overlays
|
|
4
|
+
* @tier primitive
|
|
5
|
+
* @doc-exempt: no Overlays doc page yet — add demo when /ops/hds/components/overlays is created
|
|
6
|
+
*
|
|
7
|
+
* shadcn-baseline implementation (8s-7): Radix Dialog primitive
|
|
8
|
+
* (@radix-ui/react-dialog) themed with role tokens. Provides focus
|
|
9
|
+
* trap, scroll lock, ESC-to-close, backdrop scrim, and portal
|
|
10
|
+
* mounting out of the box.
|
|
11
|
+
*
|
|
12
|
+
* <Dialog>
|
|
13
|
+
* <Dialog.Trigger asChild>
|
|
14
|
+
* <Button>Open</Button>
|
|
15
|
+
* </Dialog.Trigger>
|
|
16
|
+
* <Dialog.Content>
|
|
17
|
+
* <Dialog.Header>
|
|
18
|
+
* <Dialog.Title>Confirm</Dialog.Title>
|
|
19
|
+
* <Dialog.Description>Are you sure?</Dialog.Description>
|
|
20
|
+
* </Dialog.Header>
|
|
21
|
+
* <Dialog.Footer>
|
|
22
|
+
* <Dialog.Close asChild>
|
|
23
|
+
* <Button variant="secondary">Cancel</Button>
|
|
24
|
+
* </Dialog.Close>
|
|
25
|
+
* </Dialog.Footer>
|
|
26
|
+
* </Dialog.Content>
|
|
27
|
+
* </Dialog>
|
|
28
|
+
*
|
|
29
|
+
* Surface uses role.popover (semantic.color.surface.overlay) +
|
|
30
|
+
* shadow-overlay (semantic.shadow.overlay from 8e-1). The scrim is
|
|
31
|
+
* a foreground/80 wash so it picks up the theme without a hardcoded
|
|
32
|
+
* black. The close affordance is rendered as an absolutely-positioned
|
|
33
|
+
* X inside Content; pass `hideClose` to opt out for fully-custom layouts.
|
|
34
|
+
*/
|
|
35
|
+
import * as React from 'react';
|
|
36
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
37
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
39
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
40
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
/** @public */
|
|
42
|
+
export interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
43
|
+
/** Hide the built-in close affordance. Useful for fully custom layouts. */
|
|
44
|
+
hideClose?: boolean;
|
|
45
|
+
}
|
|
46
|
+
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
declare const DialogHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
declare const DialogFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
50
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
51
|
+
export interface DialogProps extends React.ComponentProps<typeof DialogPrimitive.Root> {
|
|
52
|
+
/** Controlled open state. */
|
|
53
|
+
open?: boolean;
|
|
54
|
+
/** Initial open state for uncontrolled usage. */
|
|
55
|
+
defaultOpen?: boolean;
|
|
56
|
+
/** When true (default), traps focus and locks scroll while open. */
|
|
57
|
+
modal?: boolean;
|
|
58
|
+
/** Children — typically `Dialog.Trigger` and `Dialog.Content`. */
|
|
59
|
+
children?: React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
interface DialogComponent extends React.FC<DialogProps> {
|
|
62
|
+
Trigger: typeof DialogTrigger;
|
|
63
|
+
Portal: typeof DialogPortal;
|
|
64
|
+
Overlay: typeof DialogOverlay;
|
|
65
|
+
Content: typeof DialogContent;
|
|
66
|
+
Header: typeof DialogHeader;
|
|
67
|
+
Footer: typeof DialogFooter;
|
|
68
|
+
Title: typeof DialogTitle;
|
|
69
|
+
Description: typeof DialogDescription;
|
|
70
|
+
Close: typeof DialogClose;
|
|
71
|
+
}
|
|
72
|
+
export declare const Dialog: DialogComponent;
|
|
73
|
+
export { DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogClose, };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disclosure - compact disclosure surface for optional explanatory content.
|
|
3
|
+
* @category Layout
|
|
4
|
+
* @tier pattern
|
|
5
|
+
*/
|
|
6
|
+
import React, { type CSSProperties, type ReactNode } from 'react';
|
|
7
|
+
type DisclosureVariant = 'panel' | 'nav' | 'card';
|
|
8
|
+
type DisclosureProps = {
|
|
9
|
+
/** Summary label rendered in the disclosure trigger. Accepts a string or ReactNode for icon+label combos. */
|
|
10
|
+
label: ReactNode;
|
|
11
|
+
/** Whether the disclosure starts in the open state. */
|
|
12
|
+
defaultOpen?: boolean;
|
|
13
|
+
/** Controlled open state. */
|
|
14
|
+
open?: boolean;
|
|
15
|
+
/** Called whenever the disclosure toggles. */
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
/** Visual treatment for docs panels, nav groups, or summary cards. */
|
|
18
|
+
variant?: DisclosureVariant;
|
|
19
|
+
/** Keeps the disclosure visually highlighted even when closed. */
|
|
20
|
+
accent?: boolean;
|
|
21
|
+
/** Optional className passthrough for the trigger. */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Optional trigger style overrides. */
|
|
24
|
+
triggerStyle?: CSSProperties;
|
|
25
|
+
/** Optional inner content style overrides. */
|
|
26
|
+
contentStyle?: CSSProperties;
|
|
27
|
+
/** Content revealed when the disclosure is expanded. */
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
};
|
|
30
|
+
/** @public */
|
|
31
|
+
export declare const Disclosure: React.ForwardRefExoticComponent<DisclosureProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
export {};
|