@mithrl/design-system 0.1.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 +63 -0
- package/dist/components/account-menu/AccountMenu.d.ts +27 -0
- package/dist/components/avatar/Avatar.d.ts +38 -0
- package/dist/components/badge/Badge.d.ts +28 -0
- package/dist/components/button/Button.d.ts +28 -0
- package/dist/components/checkbox/Checkbox.d.ts +27 -0
- package/dist/components/dialog/Dialog.d.ts +94 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +102 -0
- package/dist/components/field/Field.d.ts +62 -0
- package/dist/components/field-label/FieldLabel.d.ts +32 -0
- package/dist/components/field-message/FieldMessage.d.ts +23 -0
- package/dist/components/file-dropzone/FileDropzone.d.ts +54 -0
- package/dist/components/global-app-bar/GlobalAppBar.d.ts +77 -0
- package/dist/components/icon/Icon.d.ts +41 -0
- package/dist/components/icon-button/IconButton.d.ts +57 -0
- package/dist/components/link/Link.d.ts +39 -0
- package/dist/components/panel-tabs/PanelTabs.d.ts +46 -0
- package/dist/components/progress-indicator/ProgressIndicator.d.ts +28 -0
- package/dist/components/project-card/ProjectCard.d.ts +59 -0
- package/dist/components/radio/Radio.d.ts +23 -0
- package/dist/components/segmented-tabs/SegmentedTabs.d.ts +61 -0
- package/dist/components/select/Select.d.ts +40 -0
- package/dist/components/separator/Separator.d.ts +35 -0
- package/dist/components/skeleton/Skeleton.d.ts +17 -0
- package/dist/components/standard-tabs/StandardTabs.d.ts +54 -0
- package/dist/components/switch/Switch.d.ts +61 -0
- package/dist/components/tag/Tag.d.ts +27 -0
- package/dist/components/text-field/TextField.d.ts +46 -0
- package/dist/components/textarea/Textarea.d.ts +44 -0
- package/dist/components/toggle-button/ToggleButton.d.ts +47 -0
- package/dist/components/tooltip/Tooltip.d.ts +46 -0
- package/dist/components/upload-queue/UploadQueue.d.ts +73 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +3869 -0
- package/dist/patterns/new-project-dialog/NewProjectDialog.d.ts +42 -0
- package/dist/patterns/project-library/ProjectLibrary.d.ts +101 -0
- package/dist/styles.css +2 -0
- package/dist/styles.d.ts +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type HTMLAttributes, type MouseEventHandler } from "react";
|
|
2
|
+
import { type AccountMenuProps } from "../account-menu/AccountMenu";
|
|
3
|
+
import { type DropdownMenuProps } from "../dropdown-menu/DropdownMenu";
|
|
4
|
+
import { type ThemeMode } from "../switch/Switch";
|
|
5
|
+
|
|
6
|
+
type BrandLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "className" | "href">;
|
|
7
|
+
type AccountButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-controls" | "aria-expanded" | "aria-haspopup" | "aria-label" | "children" | "className" | "onClick" | "type">;
|
|
8
|
+
export type GlobalAppBarProps = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
9
|
+
/** Home destination used by the official Mithrl brand action. */
|
|
10
|
+
brandHref?: string;
|
|
11
|
+
/** Accessible destination name for the brand action. */
|
|
12
|
+
brandLabel?: string;
|
|
13
|
+
/** Additional native attributes for the brand link. */
|
|
14
|
+
brandLinkProps?: BrandLinkProps;
|
|
15
|
+
/** Controlled active theme. */
|
|
16
|
+
theme?: ThemeMode;
|
|
17
|
+
/** Initial active theme for uncontrolled use. */
|
|
18
|
+
defaultTheme?: ThemeMode;
|
|
19
|
+
/** Called when the theme switch requests a new mode. */
|
|
20
|
+
onThemeChange?: (theme: ThemeMode) => void;
|
|
21
|
+
/** Required accessible name for the account-menu button. */
|
|
22
|
+
accountLabel: string;
|
|
23
|
+
/** Approved account-menu content rendered from the Avatar trigger. */
|
|
24
|
+
accountMenu: AccountMenuProps;
|
|
25
|
+
/** Optional account image passed to Avatar. */
|
|
26
|
+
accountImageSrc?: string;
|
|
27
|
+
/** One- or two-grapheme Avatar fallback. */
|
|
28
|
+
accountInitials?: string;
|
|
29
|
+
/** Called when the account-menu button is activated. */
|
|
30
|
+
onAccountClick?: MouseEventHandler<HTMLButtonElement>;
|
|
31
|
+
/** Controlled account-menu visibility. */
|
|
32
|
+
accountMenuOpen?: DropdownMenuProps["open"];
|
|
33
|
+
/** Initial account-menu visibility for uncontrolled use. */
|
|
34
|
+
defaultAccountMenuOpen?: DropdownMenuProps["defaultOpen"];
|
|
35
|
+
/** Called when account-menu visibility changes. */
|
|
36
|
+
onAccountMenuOpenChange?: DropdownMenuProps["onOpenChange"];
|
|
37
|
+
/** Additional native attributes for the account-menu button. */
|
|
38
|
+
accountButtonProps?: AccountButtonProps;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Persistent Home-level application anchor. Workspace structure, project
|
|
42
|
+
* context, search, creation, and page-local actions intentionally stay out of
|
|
43
|
+
* this composite.
|
|
44
|
+
*/
|
|
45
|
+
export declare const GlobalAppBar: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
46
|
+
/** Home destination used by the official Mithrl brand action. */
|
|
47
|
+
brandHref?: string;
|
|
48
|
+
/** Accessible destination name for the brand action. */
|
|
49
|
+
brandLabel?: string;
|
|
50
|
+
/** Additional native attributes for the brand link. */
|
|
51
|
+
brandLinkProps?: BrandLinkProps;
|
|
52
|
+
/** Controlled active theme. */
|
|
53
|
+
theme?: ThemeMode;
|
|
54
|
+
/** Initial active theme for uncontrolled use. */
|
|
55
|
+
defaultTheme?: ThemeMode;
|
|
56
|
+
/** Called when the theme switch requests a new mode. */
|
|
57
|
+
onThemeChange?: (theme: ThemeMode) => void;
|
|
58
|
+
/** Required accessible name for the account-menu button. */
|
|
59
|
+
accountLabel: string;
|
|
60
|
+
/** Approved account-menu content rendered from the Avatar trigger. */
|
|
61
|
+
accountMenu: AccountMenuProps;
|
|
62
|
+
/** Optional account image passed to Avatar. */
|
|
63
|
+
accountImageSrc?: string;
|
|
64
|
+
/** One- or two-grapheme Avatar fallback. */
|
|
65
|
+
accountInitials?: string;
|
|
66
|
+
/** Called when the account-menu button is activated. */
|
|
67
|
+
onAccountClick?: MouseEventHandler<HTMLButtonElement>;
|
|
68
|
+
/** Controlled account-menu visibility. */
|
|
69
|
+
accountMenuOpen?: DropdownMenuProps["open"];
|
|
70
|
+
/** Initial account-menu visibility for uncontrolled use. */
|
|
71
|
+
defaultAccountMenuOpen?: DropdownMenuProps["defaultOpen"];
|
|
72
|
+
/** Called when account-menu visibility changes. */
|
|
73
|
+
onAccountMenuOpenChange?: DropdownMenuProps["onOpenChange"];
|
|
74
|
+
/** Additional native attributes for the account-menu button. */
|
|
75
|
+
accountButtonProps?: AccountButtonProps;
|
|
76
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ComponentType, HTMLAttributes, SVGProps } from "react";
|
|
3
|
+
|
|
4
|
+
export declare const iconVariants: (props?: ({
|
|
5
|
+
size?: "default" | "large" | "medium" | "small" | "xsmall" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type IconSize = NonNullable<VariantProps<typeof iconVariants>["size"]>;
|
|
8
|
+
/**
|
|
9
|
+
* Component type that matches Lucide's React icon components. Any
|
|
10
|
+
* `lucide-react` glyph satisfies this contract; custom SVG components can
|
|
11
|
+
* conform by forwarding standard SVG attributes.
|
|
12
|
+
*/
|
|
13
|
+
export type IconGlyphComponent = ComponentType<SVGProps<SVGSVGElement> & {
|
|
14
|
+
size?: string | number;
|
|
15
|
+
strokeWidth?: string | number;
|
|
16
|
+
absoluteStrokeWidth?: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
export type IconProps = Omit<HTMLAttributes<HTMLSpanElement>, "aria-label" | "aria-hidden" | "role"> & VariantProps<typeof iconVariants> & {
|
|
19
|
+
/**
|
|
20
|
+
* Approved Lucide glyph component (or any SVG component with a
|
|
21
|
+
* compatible signature). Mirrors the Figma "Instance Swap" contract.
|
|
22
|
+
*/
|
|
23
|
+
glyph: IconGlyphComponent;
|
|
24
|
+
/**
|
|
25
|
+
* Accessible name. When present the wrapper is exposed as `role="img"`
|
|
26
|
+
* with `aria-label={label}`. When omitted the wrapper is decorative and
|
|
27
|
+
* hidden from assistive technology — the correct default for icons that
|
|
28
|
+
* sit next to a visible label.
|
|
29
|
+
*/
|
|
30
|
+
label?: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* A size-constrained, semantically colored wrapper around an approved
|
|
34
|
+
* Lucide glyph. Icon is visual content only; interactive behavior belongs
|
|
35
|
+
* to the owning control (Button, IconButton, link).
|
|
36
|
+
*
|
|
37
|
+
* Color follows the design system contract: the SVG uses `currentColor`
|
|
38
|
+
* so the owning component or a standalone semantic context provides color
|
|
39
|
+
* through CSS.
|
|
40
|
+
*/
|
|
41
|
+
export declare function Icon({ glyph: Glyph, size, label, className, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type ButtonHTMLAttributes } from "react";
|
|
3
|
+
import { type IconGlyphComponent } from "../icon/Icon";
|
|
4
|
+
|
|
5
|
+
export declare const iconButtonVariants: (props?: ({
|
|
6
|
+
variant?: "brand" | "destructive" | "ghost" | "outline" | "primary" | "secondary" | null | undefined;
|
|
7
|
+
size?: "comfortable" | "compact" | "default" | "large" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
export type IconButtonVariant = NonNullable<VariantProps<typeof iconButtonVariants>["variant"]>;
|
|
10
|
+
export type IconButtonSize = NonNullable<VariantProps<typeof iconButtonVariants>["size"]>;
|
|
11
|
+
export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "aria-label"> & VariantProps<typeof iconButtonVariants> & {
|
|
12
|
+
/**
|
|
13
|
+
* Approved Lucide glyph rendered inside the circular container. Mirrors
|
|
14
|
+
* the Figma "Icon" Instance Swap contract. Ignored while `loading` is
|
|
15
|
+
* `true` — the component renders `LoaderCircle` instead.
|
|
16
|
+
*/
|
|
17
|
+
icon: IconGlyphComponent;
|
|
18
|
+
/**
|
|
19
|
+
* Required accessible name. Icon Button has no visible text, so the
|
|
20
|
+
* accessible label is the only carrier of intent for assistive tech.
|
|
21
|
+
*/
|
|
22
|
+
"aria-label": string;
|
|
23
|
+
/**
|
|
24
|
+
* Replaces the icon with a rotating `LoaderCircle`, blocks activation,
|
|
25
|
+
* and exposes `aria-busy="true"`. Preserves circle and target geometry.
|
|
26
|
+
*/
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A circular, icon-only action control. Owns interactive semantics,
|
|
31
|
+
* state, focus, and loading behavior. Composes the `Icon` primitive for
|
|
32
|
+
* the glyph so stroke and sizing follow the design system contract.
|
|
33
|
+
*
|
|
34
|
+
* Icon Button is a separate primitive from Button (which requires a
|
|
35
|
+
* visible text label) and Icon (which is non-interactive visual content).
|
|
36
|
+
*/
|
|
37
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "children"> & VariantProps<(props?: ({
|
|
38
|
+
variant?: "brand" | "destructive" | "ghost" | "outline" | "primary" | "secondary" | null | undefined;
|
|
39
|
+
size?: "comfortable" | "compact" | "default" | "large" | null | undefined;
|
|
40
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
41
|
+
/**
|
|
42
|
+
* Approved Lucide glyph rendered inside the circular container. Mirrors
|
|
43
|
+
* the Figma "Icon" Instance Swap contract. Ignored while `loading` is
|
|
44
|
+
* `true` — the component renders `LoaderCircle` instead.
|
|
45
|
+
*/
|
|
46
|
+
icon: IconGlyphComponent;
|
|
47
|
+
/**
|
|
48
|
+
* Required accessible name. Icon Button has no visible text, so the
|
|
49
|
+
* accessible label is the only carrier of intent for assistive tech.
|
|
50
|
+
*/
|
|
51
|
+
"aria-label": string;
|
|
52
|
+
/**
|
|
53
|
+
* Replaces the icon with a rotating `LoaderCircle`, blocks activation,
|
|
54
|
+
* and exposes `aria-busy="true"`. Preserves circle and target geometry.
|
|
55
|
+
*/
|
|
56
|
+
loading?: boolean;
|
|
57
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type AnchorHTMLAttributes, type ReactNode } from "react";
|
|
3
|
+
import { type IconGlyphComponent } from "../icon/Icon";
|
|
4
|
+
|
|
5
|
+
export declare const linkVariants: (props?: ({
|
|
6
|
+
context?: "inline" | "standalone" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type LinkContext = NonNullable<VariantProps<typeof linkVariants>["context"]>;
|
|
9
|
+
export type LinkPreviewState = "hover" | "focus" | "pressed";
|
|
10
|
+
type NativeLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "aria-disabled" | "children" | "href"> & {
|
|
11
|
+
/** A Link always identifies a native anchor destination. */
|
|
12
|
+
href: string;
|
|
13
|
+
/** Required visible destination label or inline text content. */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
/** Storybook-only state hook used to review native CSS states. */
|
|
16
|
+
"data-preview-state"?: LinkPreviewState;
|
|
17
|
+
};
|
|
18
|
+
type InlineLinkProps = NativeLinkProps & {
|
|
19
|
+
context?: "inline";
|
|
20
|
+
leadingIcon?: never;
|
|
21
|
+
trailingIcon?: never;
|
|
22
|
+
};
|
|
23
|
+
type StandaloneLinkProps = NativeLinkProps & ({
|
|
24
|
+
context: "standalone";
|
|
25
|
+
leadingIcon?: IconGlyphComponent;
|
|
26
|
+
trailingIcon?: never;
|
|
27
|
+
} | {
|
|
28
|
+
context: "standalone";
|
|
29
|
+
leadingIcon?: never;
|
|
30
|
+
trailingIcon?: IconGlyphComponent;
|
|
31
|
+
});
|
|
32
|
+
export type LinkProps = InlineLinkProps | StandaloneLinkProps;
|
|
33
|
+
/**
|
|
34
|
+
* A native anchor for navigation and resource destinations. Inline and
|
|
35
|
+
* Standalone share the same semantic color and underline contract; optional
|
|
36
|
+
* decorative icons are limited to one slot on Standalone links.
|
|
37
|
+
*/
|
|
38
|
+
export declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
import { type IconGlyphComponent } from "../icon/Icon";
|
|
3
|
+
|
|
4
|
+
export type PanelTabItem = {
|
|
5
|
+
/** Stable value used for selection, closing, and change events. */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Visible label and accessible name for the tab. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Optional decorative leading glyph from the approved Icon inventory. */
|
|
10
|
+
icon?: IconGlyphComponent;
|
|
11
|
+
/** Shows the independent close affordance when `onClose` is provided. */
|
|
12
|
+
closable?: boolean;
|
|
13
|
+
/** Optional explicit label for the close action. */
|
|
14
|
+
closeLabel?: string;
|
|
15
|
+
/** ID of the panel controlled by this tab. */
|
|
16
|
+
panelId?: string;
|
|
17
|
+
/** Optional explicit tab ID used by the associated panel. */
|
|
18
|
+
id?: string;
|
|
19
|
+
};
|
|
20
|
+
export type PanelTabsProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & {
|
|
21
|
+
items: readonly PanelTabItem[];
|
|
22
|
+
/** Controlled selected value. */
|
|
23
|
+
value?: string;
|
|
24
|
+
/** Initial selected value for uncontrolled use. */
|
|
25
|
+
defaultValue?: string;
|
|
26
|
+
/** Called after a tab is selected. */
|
|
27
|
+
onValueChange?: (value: string) => void;
|
|
28
|
+
/** Called when a close affordance or the Delete key requests removal. */
|
|
29
|
+
onClose?: (value: string) => void;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Compact, scrollable tabs for switching among open tools, artifacts, files,
|
|
33
|
+
* and analyses inside a panel. Close is an independent action rather than a
|
|
34
|
+
* nested button inside the tab control.
|
|
35
|
+
*/
|
|
36
|
+
export declare const PanelTabs: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & {
|
|
37
|
+
items: readonly PanelTabItem[];
|
|
38
|
+
/** Controlled selected value. */
|
|
39
|
+
value?: string;
|
|
40
|
+
/** Initial selected value for uncontrolled use. */
|
|
41
|
+
defaultValue?: string;
|
|
42
|
+
/** Called after a tab is selected. */
|
|
43
|
+
onValueChange?: (value: string) => void;
|
|
44
|
+
/** Called when a close affordance or the Delete key requests removal. */
|
|
45
|
+
onClose?: (value: string) => void;
|
|
46
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type HTMLAttributes } from "react";
|
|
3
|
+
|
|
4
|
+
export declare const progressIndicatorVariants: (props?: ({
|
|
5
|
+
size?: "default" | "small" | "xsmall" | null | undefined;
|
|
6
|
+
tone?: "brand" | "neutral" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type ProgressIndicatorSize = NonNullable<VariantProps<typeof progressIndicatorVariants>["size"]>;
|
|
9
|
+
export type ProgressIndicatorTone = NonNullable<VariantProps<typeof progressIndicatorVariants>["tone"]>;
|
|
10
|
+
type RestrictedProgressIndicatorAttribute = "aria-atomic" | "aria-busy" | "aria-hidden" | "aria-label" | "aria-live" | "children" | "onClick" | "onDoubleClick" | "onKeyDown" | "onKeyUp" | "role" | "tabIndex";
|
|
11
|
+
type ProgressIndicatorBaseProps = Omit<HTMLAttributes<HTMLSpanElement>, RestrictedProgressIndicatorAttribute> & VariantProps<typeof progressIndicatorVariants>;
|
|
12
|
+
type InformativeProgressIndicatorProps = {
|
|
13
|
+
/** Concise accessible name announced through the status live region. */
|
|
14
|
+
label: string;
|
|
15
|
+
decorative?: false;
|
|
16
|
+
};
|
|
17
|
+
type DecorativeProgressIndicatorProps = {
|
|
18
|
+
/** Use only when nearby visible text already communicates progress. */
|
|
19
|
+
decorative: true;
|
|
20
|
+
label?: never;
|
|
21
|
+
};
|
|
22
|
+
export type ProgressIndicatorProps = ProgressIndicatorBaseProps & (InformativeProgressIndicatorProps | DecorativeProgressIndicatorProps);
|
|
23
|
+
/**
|
|
24
|
+
* Circular indeterminate progress feedback. Informative and decorative use
|
|
25
|
+
* are intentionally mutually exclusive so loading semantics stay explicit.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ProgressIndicator: import("react").ForwardRefExoticComponent<ProgressIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type AnchorHTMLAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
export type ProjectCardPresentation = "grid" | "list";
|
|
4
|
+
export type ProjectCardPreviewArtwork = "rings" | "split-response" | "mini-matrices" | "dot-series" | "broken-chain" | "orbital-pairs" | "pulse-clusters" | "ladder-sequence" | "alternating-targets" | "offset-constellations" | "mirrored-waves" | "binary-colonies" | "crossing-signals" | "nested-cadence" | "fragmented-axis";
|
|
5
|
+
export type ProjectCardPreviewState = "hover" | "pressed" | "focus-visible";
|
|
6
|
+
export type ProjectCardActivity = {
|
|
7
|
+
kind: "created" | "updated";
|
|
8
|
+
/** Localized human-readable date, without the Created/Updated prefix. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Complete machine-readable timestamp for the semantic time element. */
|
|
11
|
+
dateTime: string;
|
|
12
|
+
};
|
|
13
|
+
export type ProjectCardCreator = {
|
|
14
|
+
name: string;
|
|
15
|
+
initials?: string;
|
|
16
|
+
imageSrc?: string;
|
|
17
|
+
};
|
|
18
|
+
export type ProjectCardMetric = {
|
|
19
|
+
label: string;
|
|
20
|
+
value: number | string;
|
|
21
|
+
};
|
|
22
|
+
type NativeProjectCardProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "className" | "href" | "title">;
|
|
23
|
+
export type ProjectCardProps = NativeProjectCardProps & {
|
|
24
|
+
/** Native title tooltips conflict with the compact creator Tooltip. */
|
|
25
|
+
title?: never;
|
|
26
|
+
href: string;
|
|
27
|
+
name: string;
|
|
28
|
+
presentation?: ProjectCardPresentation;
|
|
29
|
+
previewArtwork: ProjectCardPreviewArtwork;
|
|
30
|
+
activity: ProjectCardActivity;
|
|
31
|
+
description?: string;
|
|
32
|
+
creator?: ProjectCardCreator;
|
|
33
|
+
metrics?: readonly ProjectCardMetric[];
|
|
34
|
+
headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6";
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Review-only forced state used by Storybook and visual regression tests. */
|
|
37
|
+
"data-preview-state"?: ProjectCardPreviewState;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* One native project destination for Home. Collection layout, project scope,
|
|
41
|
+
* sorting, and Grid/List switching remain owned by Project Library.
|
|
42
|
+
*/
|
|
43
|
+
export declare const ProjectCard: import("react").ForwardRefExoticComponent<NativeProjectCardProps & {
|
|
44
|
+
/** Native title tooltips conflict with the compact creator Tooltip. */
|
|
45
|
+
title?: never;
|
|
46
|
+
href: string;
|
|
47
|
+
name: string;
|
|
48
|
+
presentation?: ProjectCardPresentation;
|
|
49
|
+
previewArtwork: ProjectCardPreviewArtwork;
|
|
50
|
+
activity: ProjectCardActivity;
|
|
51
|
+
description?: string;
|
|
52
|
+
creator?: ProjectCardCreator;
|
|
53
|
+
metrics?: readonly ProjectCardMetric[];
|
|
54
|
+
headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6";
|
|
55
|
+
className?: string;
|
|
56
|
+
/** Review-only forced state used by Storybook and visual regression tests. */
|
|
57
|
+
"data-preview-state"?: ProjectCardPreviewState;
|
|
58
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
export type RadioPreviewState = "hover" | "pressed" | "focus";
|
|
4
|
+
export type RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, "aria-checked" | "children" | "className" | "type"> & {
|
|
5
|
+
/** Class applied to the 28px visual root. */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Class applied directly to the native radio input. */
|
|
8
|
+
inputClassName?: string;
|
|
9
|
+
/** Storybook-only hook for reviewing non-persistent CSS states. */
|
|
10
|
+
"data-preview-state"?: RadioPreviewState;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Native form radio with the approved compact Mithrl visual. Visible labels,
|
|
14
|
+
* descriptions, validation, and group policy belong to the owning composition.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "aria-checked" | "children" | "className" | "type"> & {
|
|
17
|
+
/** Class applied to the 28px visual root. */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Class applied directly to the native radio input. */
|
|
20
|
+
inputClassName?: string;
|
|
21
|
+
/** Storybook-only hook for reviewing non-persistent CSS states. */
|
|
22
|
+
"data-preview-state"?: RadioPreviewState;
|
|
23
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type HTMLAttributes } from "react";
|
|
3
|
+
import { type IconGlyphComponent } from "../icon/Icon";
|
|
4
|
+
|
|
5
|
+
export declare const segmentedTabsVariants: (props?: ({
|
|
6
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type SegmentedTabsSize = NonNullable<VariantProps<typeof segmentedTabsVariants>["size"]>;
|
|
9
|
+
export type SegmentedTabsActivationMode = "automatic" | "manual";
|
|
10
|
+
export type SegmentedTabItem = {
|
|
11
|
+
/** Stable value used for selection and change events. */
|
|
12
|
+
value: string;
|
|
13
|
+
/** Visible label and accessible name for the tab. */
|
|
14
|
+
label: string;
|
|
15
|
+
/** Optional decorative leading glyph from the approved Icon inventory. */
|
|
16
|
+
icon?: IconGlyphComponent;
|
|
17
|
+
/** Optional short count or compact status value. */
|
|
18
|
+
badge?: string | number;
|
|
19
|
+
/** Prevents selection and removes the tab from arrow-key navigation. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** ID of the panel controlled by this tab. */
|
|
22
|
+
panelId?: string;
|
|
23
|
+
/** Optional explicit tab ID used by the associated panel. */
|
|
24
|
+
id?: string;
|
|
25
|
+
};
|
|
26
|
+
type SegmentedTabsBaseProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & VariantProps<typeof segmentedTabsVariants> & {
|
|
27
|
+
items: readonly SegmentedTabItem[];
|
|
28
|
+
/** Controlled selected value. */
|
|
29
|
+
value?: string;
|
|
30
|
+
/** Initial selected value for uncontrolled use. */
|
|
31
|
+
defaultValue?: string;
|
|
32
|
+
/** Called after an enabled tab is selected. */
|
|
33
|
+
onValueChange?: (value: string) => void;
|
|
34
|
+
/** Selection follows focus by default. Manual mode waits for Enter/Space. */
|
|
35
|
+
activationMode?: SegmentedTabsActivationMode;
|
|
36
|
+
/** Distributes the items equally across the available width. */
|
|
37
|
+
fullWidth?: boolean;
|
|
38
|
+
};
|
|
39
|
+
export type SegmentedTabsProps = SegmentedTabsBaseProps;
|
|
40
|
+
/**
|
|
41
|
+
* Single-select local view navigation with roving keyboard focus.
|
|
42
|
+
*
|
|
43
|
+
* Segmented Tabs changes the active panel inside one local context. It is not
|
|
44
|
+
* a filter, multi-select control, action group, or top-level navigation.
|
|
45
|
+
*/
|
|
46
|
+
export declare const SegmentedTabs: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & VariantProps<(props?: ({
|
|
47
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
48
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
49
|
+
items: readonly SegmentedTabItem[];
|
|
50
|
+
/** Controlled selected value. */
|
|
51
|
+
value?: string;
|
|
52
|
+
/** Initial selected value for uncontrolled use. */
|
|
53
|
+
defaultValue?: string;
|
|
54
|
+
/** Called after an enabled tab is selected. */
|
|
55
|
+
onValueChange?: (value: string) => void;
|
|
56
|
+
/** Selection follows focus by default. Manual mode waits for Enter/Space. */
|
|
57
|
+
activationMode?: SegmentedTabsActivationMode;
|
|
58
|
+
/** Distributes the items equally across the available width. */
|
|
59
|
+
fullWidth?: boolean;
|
|
60
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type ReactNode, type SelectHTMLAttributes } from "react";
|
|
3
|
+
|
|
4
|
+
export declare const selectVariants: (props?: ({
|
|
5
|
+
size?: "comfortable" | "large" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type SelectSize = NonNullable<VariantProps<typeof selectVariants>["size"]>;
|
|
8
|
+
export type SelectPreviewState = "hover" | "focus";
|
|
9
|
+
export type SelectProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, "className" | "multiple" | "size"> & {
|
|
10
|
+
/** Multi-select is outside v1 and must not be forwarded at runtime. */
|
|
11
|
+
multiple?: never;
|
|
12
|
+
/** Approved control geometry. Native multi-row `size` is outside v1. */
|
|
13
|
+
size?: SelectSize;
|
|
14
|
+
/** Decorative, non-interactive visual shown before the selected value. */
|
|
15
|
+
leadingVisual?: ReactNode;
|
|
16
|
+
/** Class applied to the visual root. */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Class applied directly to the native select element. */
|
|
19
|
+
selectClassName?: string;
|
|
20
|
+
/** Storybook-only hook used to review non-persistent CSS states. */
|
|
21
|
+
"data-preview-state"?: SelectPreviewState;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A native single-select control. Labels, supporting messages, validation
|
|
25
|
+
* timing, and product-specific widths belong to the containing composition.
|
|
26
|
+
*/
|
|
27
|
+
export declare const Select: import("react").ForwardRefExoticComponent<Omit<SelectHTMLAttributes<HTMLSelectElement>, "className" | "multiple" | "size"> & {
|
|
28
|
+
/** Multi-select is outside v1 and must not be forwarded at runtime. */
|
|
29
|
+
multiple?: never;
|
|
30
|
+
/** Approved control geometry. Native multi-row `size` is outside v1. */
|
|
31
|
+
size?: SelectSize;
|
|
32
|
+
/** Decorative, non-interactive visual shown before the selected value. */
|
|
33
|
+
leadingVisual?: ReactNode;
|
|
34
|
+
/** Class applied to the visual root. */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Class applied directly to the native select element. */
|
|
37
|
+
selectClassName?: string;
|
|
38
|
+
/** Storybook-only hook used to review non-persistent CSS states. */
|
|
39
|
+
"data-preview-state"?: SelectPreviewState;
|
|
40
|
+
} & import("react").RefAttributes<HTMLSelectElement>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type HTMLAttributes } from "react";
|
|
3
|
+
|
|
4
|
+
export declare const separatorVariants: (props?: ({
|
|
5
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
6
|
+
emphasis?: "default" | "soft" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type SeparatorOrientation = NonNullable<VariantProps<typeof separatorVariants>["orientation"]>;
|
|
9
|
+
export type SeparatorEmphasis = NonNullable<VariantProps<typeof separatorVariants>["emphasis"]>;
|
|
10
|
+
export type SeparatorProps = Omit<HTMLAttributes<HTMLDivElement>, "aria-hidden" | "aria-orientation" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "children" | "role" | "tabIndex"> & {
|
|
11
|
+
/** Direction in which the one-pixel rule extends. */
|
|
12
|
+
orientation?: SeparatorOrientation;
|
|
13
|
+
/** Semantic color treatment for the rule. */
|
|
14
|
+
emphasis?: SeparatorEmphasis;
|
|
15
|
+
/**
|
|
16
|
+
* Removes the rule from the accessibility tree by default. Set to false
|
|
17
|
+
* only when the division itself conveys a meaningful content grouping.
|
|
18
|
+
*/
|
|
19
|
+
decorative?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A static one-pixel boundary between adjacent content groups or regions.
|
|
23
|
+
* Separator owns no spacing or interaction and is decorative by default.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Separator: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "aria-hidden" | "aria-orientation" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "children" | "role" | "tabIndex"> & {
|
|
26
|
+
/** Direction in which the one-pixel rule extends. */
|
|
27
|
+
orientation?: SeparatorOrientation;
|
|
28
|
+
/** Semantic color treatment for the rule. */
|
|
29
|
+
emphasis?: SeparatorEmphasis;
|
|
30
|
+
/**
|
|
31
|
+
* Removes the rule from the accessibility tree by default. Set to false
|
|
32
|
+
* only when the division itself conveys a meaningful content grouping.
|
|
33
|
+
*/
|
|
34
|
+
decorative?: boolean;
|
|
35
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type HTMLAttributes } from "react";
|
|
3
|
+
|
|
4
|
+
export declare const skeletonVariants: (props?: ({
|
|
5
|
+
radius?: "full" | "large" | "medium" | "small" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type SkeletonRadius = NonNullable<VariantProps<typeof skeletonVariants>["radius"]>;
|
|
8
|
+
type RestrictedSkeletonAttribute = "aria-atomic" | "aria-busy" | "aria-hidden" | "aria-label" | "aria-live" | "children" | "onClick" | "onDoubleClick" | "onKeyDown" | "onKeyUp" | "role" | "tabIndex";
|
|
9
|
+
export type SkeletonProps = Omit<HTMLAttributes<HTMLDivElement>, RestrictedSkeletonAttribute> & VariantProps<typeof skeletonVariants>;
|
|
10
|
+
/**
|
|
11
|
+
* Decorative loading surface. The owning composition supplies width, height,
|
|
12
|
+
* busy state, and one accessible loading message for the region.
|
|
13
|
+
*/
|
|
14
|
+
export declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, RestrictedSkeletonAttribute> & VariantProps<(props?: ({
|
|
15
|
+
radius?: "full" | "large" | "medium" | "small" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type HTMLAttributes } from "react";
|
|
3
|
+
|
|
4
|
+
export declare const standardTabsVariants: (props?: ({
|
|
5
|
+
size?: "compact" | "default" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type StandardTabsSize = NonNullable<VariantProps<typeof standardTabsVariants>["size"]>;
|
|
8
|
+
export type StandardTabsActivationMode = "automatic" | "manual";
|
|
9
|
+
export type StandardTabItem = {
|
|
10
|
+
/** Stable value used for selection and change events. */
|
|
11
|
+
value: string;
|
|
12
|
+
/** Required visible label and accessible name. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Prevents selection and removes the item from roving keyboard focus. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** ID of the tabpanel controlled by this item. */
|
|
17
|
+
panelId?: string;
|
|
18
|
+
/** Optional explicit tab ID for the tabpanel's aria-labelledby. */
|
|
19
|
+
id?: string;
|
|
20
|
+
};
|
|
21
|
+
type StandardTabsBaseProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & VariantProps<typeof standardTabsVariants> & {
|
|
22
|
+
items: readonly StandardTabItem[];
|
|
23
|
+
/** Controlled selected value. */
|
|
24
|
+
value?: string;
|
|
25
|
+
/** Initial selected value for uncontrolled use. */
|
|
26
|
+
defaultValue?: string;
|
|
27
|
+
/** Called after an enabled tab is selected. */
|
|
28
|
+
onValueChange?: (value: string) => void;
|
|
29
|
+
/** Selection follows focus by default. Manual mode waits for Enter/Space. */
|
|
30
|
+
activationMode?: StandardTabsActivationMode;
|
|
31
|
+
/** Gives every item an equal share of the available owner width. */
|
|
32
|
+
fullWidth?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type StandardTabsProps = StandardTabsBaseProps;
|
|
35
|
+
/**
|
|
36
|
+
* Quiet, horizontal single-select navigation for stable peer content views.
|
|
37
|
+
* The consumer owns the associated tabpanels and their mounting behavior.
|
|
38
|
+
*/
|
|
39
|
+
export declare const StandardTabs: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> & VariantProps<(props?: ({
|
|
40
|
+
size?: "compact" | "default" | null | undefined;
|
|
41
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
42
|
+
items: readonly StandardTabItem[];
|
|
43
|
+
/** Controlled selected value. */
|
|
44
|
+
value?: string;
|
|
45
|
+
/** Initial selected value for uncontrolled use. */
|
|
46
|
+
defaultValue?: string;
|
|
47
|
+
/** Called after an enabled tab is selected. */
|
|
48
|
+
onValueChange?: (value: string) => void;
|
|
49
|
+
/** Selection follows focus by default. Manual mode waits for Enter/Space. */
|
|
50
|
+
activationMode?: StandardTabsActivationMode;
|
|
51
|
+
/** Gives every item an equal share of the available owner width. */
|
|
52
|
+
fullWidth?: boolean;
|
|
53
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
|
+
export {};
|