@agent-factory-platform/ui-kit 0.2.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/dist/charts/basic.d.ts +66 -0
- package/dist/charts/chart-tooltip.d.ts +12 -0
- package/dist/charts/index.d.ts +2 -0
- package/dist/charts/theme.d.ts +38 -0
- package/dist/component-api.d.ts +21 -0
- package/dist/component-api.js +7 -0
- package/dist/components/alert.d.ts +11 -0
- package/dist/components/avatar.d.ts +27 -0
- package/dist/components/badge.d.ts +34 -0
- package/dist/components/button-group.d.ts +7 -0
- package/dist/components/button.d.ts +30 -0
- package/dist/components/card.d.ts +25 -0
- package/dist/components/chart-frame.d.ts +12 -0
- package/dist/components/color-picker.d.ts +18 -0
- package/dist/components/combobox.d.ts +18 -0
- package/dist/components/command-dialog.d.ts +26 -0
- package/dist/components/confirm-dialog.d.ts +36 -0
- package/dist/components/data-table.d.ts +16 -0
- package/dist/components/date-time.d.ts +39 -0
- package/dist/components/disclosure.d.ts +10 -0
- package/dist/components/drawer.d.ts +35 -0
- package/dist/components/dropdown-select.d.ts +22 -0
- package/dist/components/field.d.ts +16 -0
- package/dist/components/floating-window.d.ts +33 -0
- package/dist/components/heading.d.ts +16 -0
- package/dist/components/hover-tip.d.ts +23 -0
- package/dist/components/icon-tip.d.ts +9 -0
- package/dist/components/input-group.d.ts +12 -0
- package/dist/components/input-otp.d.ts +11 -0
- package/dist/components/input.d.ts +12 -0
- package/dist/components/item.d.ts +21 -0
- package/dist/components/kbd.d.ts +7 -0
- package/dist/components/line-chart.d.ts +12 -0
- package/dist/components/listbox.d.ts +13 -0
- package/dist/components/live-value.d.ts +13 -0
- package/dist/components/modal.d.ts +43 -0
- package/dist/components/multi-select.d.ts +14 -0
- package/dist/components/native-select.d.ts +12 -0
- package/dist/components/navigation.d.ts +20 -0
- package/dist/components/page.d.ts +14 -0
- package/dist/components/popover-menu.d.ts +57 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/resizable-pane.d.ts +14 -0
- package/dist/components/scroll-load-more.d.ts +24 -0
- package/dist/components/seg-slider.d.ts +22 -0
- package/dist/components/segmented-control.d.ts +16 -0
- package/dist/components/selection-controls.d.ts +46 -0
- package/dist/components/sidebar.d.ts +11 -0
- package/dist/components/skeleton.d.ts +18 -0
- package/dist/components/slider.d.ts +33 -0
- package/dist/components/sliding-tabs.d.ts +32 -0
- package/dist/components/spinner.d.ts +5 -0
- package/dist/components/spotlight-tour.d.ts +19 -0
- package/dist/components/stat-card.d.ts +7 -0
- package/dist/components/state-view.d.ts +51 -0
- package/dist/components/stats-table.d.ts +8 -0
- package/dist/components/table.d.ts +8 -0
- package/dist/components/tag-pill.d.ts +21 -0
- package/dist/components/theme-editor.d.ts +78 -0
- package/dist/components/toast.d.ts +11 -0
- package/dist/components/toolbar.d.ts +15 -0
- package/dist/components/utility.d.ts +5 -0
- package/dist/components/widget-frame.d.ts +12 -0
- package/dist/components/widget-picker.d.ts +31 -0
- package/dist/components/workspace-grid.d.ts +25 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +4506 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/focus-modality.d.ts +6 -0
- package/dist/lib/motion.d.ts +67 -0
- package/dist/lib/viewport.d.ts +19 -0
- package/dist/manifest.d.ts +17 -0
- package/dist/manifest.js +19 -0
- package/dist/styles.d.ts +1 -0
- package/dist/styles.js +1 -0
- package/dist/theme.d.ts +39 -0
- package/dist/ui-kit.css +1 -0
- package/package.json +66 -0
- package/src/fonts/BDOGrotesk-DemiBold.woff2 +0 -0
- package/src/fonts/BDOGrotesk-Medium.woff2 +0 -0
- package/src/fonts/BDOGrotesk-Regular.woff2 +0 -0
- package/src/fonts/GeistMono-Medium.woff2 +0 -0
- package/src/fonts/OFL-1.1.txt +93 -0
- package/src/fonts.css +31 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
/** Avatar badge — logo image, or pastel circle with 2-letter Ink monogram. */
|
|
3
|
+
export declare function AvatarBadge({ initials, tint, size, className, src, alt, }: {
|
|
4
|
+
initials: string;
|
|
5
|
+
tint?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
/** When set, render a circular logo/photo instead of initials. */
|
|
9
|
+
src?: string;
|
|
10
|
+
alt?: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export type ResourceIconProps = {
|
|
13
|
+
label: string;
|
|
14
|
+
fallback: string;
|
|
15
|
+
sources?: string[];
|
|
16
|
+
tint?: string;
|
|
17
|
+
size?: number;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Resource icon with ordered image fallbacks and a deterministic
|
|
22
|
+
* monogram. The image and fallback are mutually exclusive, so transparent or
|
|
23
|
+
* failed remote assets never leave visual residue behind the logo.
|
|
24
|
+
*/
|
|
25
|
+
export declare function ResourceIcon({ label, fallback, sources, tint, size, className }: ResourceIconProps): import("react").JSX.Element;
|
|
26
|
+
export type TagTone = "neutral" | "warm" | "cool" | "success" | "danger" | "warning";
|
|
27
|
+
export type TagScale = "micro" | "compact" | "default";
|
|
28
|
+
export type TagProps = Omit<ComponentPropsWithoutRef<"span">, "children"> & {
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
tone?: TagTone;
|
|
31
|
+
size?: TagScale;
|
|
32
|
+
};
|
|
33
|
+
/** Tag pill — fully rounded, tinted, low-emphasis label. */
|
|
34
|
+
export declare function Tag({ children, tone, size, className, ...props }: TagProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
export type ButtonVariant = "primary" | "accent" | "secondary" | "ghost" | "success" | "danger" | "text";
|
|
3
|
+
export type ButtonSize = "compact" | "default" | "touch" | "icon";
|
|
4
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Canonical command button. Use `compact` in dense application chrome, `default` in
|
|
12
|
+
* product forms, and `touch` for primary mobile actions. Icon-only buttons must
|
|
13
|
+
* provide an accessible name through `aria-label` or `title`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function Button({ asChild, variant, size, className, children, type, ...props }: ButtonProps): import("react").JSX.Element;
|
|
16
|
+
/** Keeps related commands aligned and allows actions to wrap on narrow screens. */
|
|
17
|
+
export declare function ActionGroup({ children }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
export interface PressableProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
21
|
+
asChild?: boolean;
|
|
22
|
+
active?: boolean;
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Unstyled interactive ownership boundary for router links and custom rows.
|
|
27
|
+
* It removes browser pointer-focus outlines while preserving the UIKit
|
|
28
|
+
* focus-visible ring for keyboard navigation.
|
|
29
|
+
*/
|
|
30
|
+
export declare const Pressable: import("react").ForwardRefExoticComponent<PressableProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
type Tone = "plain" | "warm" | "cool";
|
|
3
|
+
type Density = "none" | "compact" | "default";
|
|
4
|
+
export interface CardProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
/** Preserve semantic product elements such as `article` while UIKit owns the frame. */
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
as?: Extract<ElementType, "div" | "article" | "section" | "li">;
|
|
8
|
+
tone?: Tone;
|
|
9
|
+
density?: Density;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Framed content unit. Keep page sections unframed; use cards for repeated
|
|
14
|
+
* entities or genuinely bounded tools. `compact` is for dense workspace tiles.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Card({ asChild, as, tone, density, className, children, ...props }: CardProps): import("react").JSX.Element;
|
|
17
|
+
export declare function CardTitle({ children, className }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
export declare function CardLabel({ children, className }: {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
|
+
export type ChartStatus = "live" | "stale" | "loading" | "error";
|
|
3
|
+
export type ChartFrameProps = Omit<ComponentPropsWithoutRef<"figure">, "title"> & {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
summary: string;
|
|
6
|
+
status?: ChartStatus;
|
|
7
|
+
statusLabel?: string;
|
|
8
|
+
toolbar?: ReactNode;
|
|
9
|
+
legend?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/** Stable shell for engine-owned chart canvases, SVGs, toolbars and evidence. */
|
|
12
|
+
export declare function ChartFrame({ title, summary, status, statusLabel, toolbar, legend, className, children, ...props }: ChartFrameProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ColorPickerLabels {
|
|
2
|
+
trigger: string;
|
|
3
|
+
dialog: string;
|
|
4
|
+
hex: string;
|
|
5
|
+
hue: string;
|
|
6
|
+
saturation: string;
|
|
7
|
+
presets: string;
|
|
8
|
+
close: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ColorPickerProps {
|
|
11
|
+
value: `#${string}`;
|
|
12
|
+
onChange: (value: `#${string}`) => void;
|
|
13
|
+
labels: ColorPickerLabels;
|
|
14
|
+
presets?: readonly `#${string}`[];
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Locale-neutral precise color input with quick presets and HSV controls. */
|
|
18
|
+
export declare function ColorPicker({ value, onChange, labels, presets, disabled }: ColorPickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ComboboxOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
meta?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ComboboxProps {
|
|
8
|
+
value: string;
|
|
9
|
+
options: readonly ComboboxOption[];
|
|
10
|
+
onValueChange: (value: string) => void;
|
|
11
|
+
label: string;
|
|
12
|
+
resultsLabel: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
emptyText: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function Combobox({ value, options, onValueChange, label, resultsLabel, placeholder, emptyText, disabled, className, }: ComboboxProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { KeyboardEventHandler, ReactNode, Ref } from "react";
|
|
2
|
+
export type CommandDialogFilter<T extends string> = {
|
|
3
|
+
value: T;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type CommandDialogProps<T extends string> = {
|
|
8
|
+
open: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
title: string;
|
|
11
|
+
query: string;
|
|
12
|
+
onQueryChange: (value: string) => void;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
15
|
+
busy?: boolean;
|
|
16
|
+
filters: CommandDialogFilter<T>[];
|
|
17
|
+
filter: T;
|
|
18
|
+
onFilterChange: (value: T) => void;
|
|
19
|
+
filterAriaLabel: string;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
footer?: ReactNode;
|
|
22
|
+
onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
/** Search/command overlay chrome; callers own providers, rows and execution. */
|
|
26
|
+
export declare function CommandDialog<T extends string>({ open, onClose, title, query, onQueryChange, placeholder, inputRef, busy, filters, filter, onFilterChange, filterAriaLabel, children, footer, onKeyDown, className, }: CommandDialogProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type ButtonVariant } from "./button";
|
|
3
|
+
/**
|
|
4
|
+
* Reusable confirmation dialog for destructive / irreversible actions. Built on
|
|
5
|
+
* the shared `Modal` primitive, so it inherits the responsive shape, scrim +
|
|
6
|
+
* Esc/backdrop close, focus trap, and aria-modal chrome. The caller owns the
|
|
7
|
+
* `open` state and the action; this only gates it behind an explicit Confirm.
|
|
8
|
+
*
|
|
9
|
+
* `confirmVariant` selects the command tone. `busy`
|
|
10
|
+
* disables both buttons (and shows nothing else) while an async `onConfirm`
|
|
11
|
+
* resolves, so a slow request can't be double-fired or cancelled mid-flight.
|
|
12
|
+
* Token-only styling — no raw hex (theme-check gate).
|
|
13
|
+
*/
|
|
14
|
+
export declare function ConfirmDialog({ open, onClose, title, message, body, confirmLabel, cancelLabel, closeLabel, onConfirm, confirmVariant, busy, busyLabel, confirmDisabled, }: {
|
|
15
|
+
open: boolean;
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
title: string;
|
|
18
|
+
/** Body copy explaining the consequence of confirming. */
|
|
19
|
+
message: string;
|
|
20
|
+
/** Optional rich content rendered below the message (e.g. a diff preview). */
|
|
21
|
+
body?: ReactNode;
|
|
22
|
+
confirmLabel: string;
|
|
23
|
+
cancelLabel: string;
|
|
24
|
+
/** Accessible label for the title-bar close icon; defaults to `cancelLabel`. */
|
|
25
|
+
closeLabel?: string;
|
|
26
|
+
/** Run on confirm; may be async — keep `busy` true until it settles. */
|
|
27
|
+
onConfirm: () => void | Promise<void>;
|
|
28
|
+
/** Command tone, including destructive removes / deletes / signs out. */
|
|
29
|
+
confirmVariant?: Extract<ButtonVariant, "primary" | "accent" | "danger">;
|
|
30
|
+
/** Disable both buttons while an async confirm is in flight. */
|
|
31
|
+
busy?: boolean;
|
|
32
|
+
/** Confirm-button label while `busy` (defaults to `confirmLabel`). */
|
|
33
|
+
busyLabel?: string;
|
|
34
|
+
/** Disable only the confirm button (e.g. validation); cancel stays available. */
|
|
35
|
+
confirmDisabled?: boolean;
|
|
36
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface DataTableColumn<T> {
|
|
3
|
+
id: string;
|
|
4
|
+
header: ReactNode;
|
|
5
|
+
cell: (row: T) => ReactNode;
|
|
6
|
+
sortValue?: (row: T) => string | number;
|
|
7
|
+
align?: "left" | "right";
|
|
8
|
+
resizeLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function DataTable<T>({ label, columns, rows, rowKey, emptyText, }: {
|
|
11
|
+
label: string;
|
|
12
|
+
columns: readonly DataTableColumn<T>[];
|
|
13
|
+
rows: readonly T[];
|
|
14
|
+
rowKey: (row: T) => string;
|
|
15
|
+
emptyText: string;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface CalendarProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
label: string;
|
|
5
|
+
locale: string;
|
|
6
|
+
weekdayLabels: readonly string[];
|
|
7
|
+
previousMonthLabel: string;
|
|
8
|
+
nextMonthLabel: string;
|
|
9
|
+
dateLabel?: (value: string) => string;
|
|
10
|
+
minimum?: string;
|
|
11
|
+
maximum?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function Calendar({ value, onValueChange, label, locale, weekdayLabels, previousMonthLabel, nextMonthLabel, dateLabel, minimum, maximum, className, }: CalendarProps): import("react").JSX.Element;
|
|
15
|
+
export interface DatePickerProps extends Omit<CalendarProps, "label" | "className"> {
|
|
16
|
+
label: string;
|
|
17
|
+
calendarLabel: string;
|
|
18
|
+
placeholder: string;
|
|
19
|
+
displayValue?: (value: string) => string;
|
|
20
|
+
}
|
|
21
|
+
export declare function DatePicker({ value, onValueChange, label, calendarLabel, placeholder, displayValue, ...calendarProps }: DatePickerProps): import("react").JSX.Element;
|
|
22
|
+
export declare function DateRangePicker({ start, end, onChange, startLabel, endLabel, ...calendarProps }: Omit<DatePickerProps, "value" | "onValueChange" | "label" | "minimum" | "maximum"> & {
|
|
23
|
+
start: string;
|
|
24
|
+
end: string;
|
|
25
|
+
onChange: (range: {
|
|
26
|
+
start: string;
|
|
27
|
+
end: string;
|
|
28
|
+
}) => void;
|
|
29
|
+
startLabel: string;
|
|
30
|
+
endLabel: string;
|
|
31
|
+
}): import("react").JSX.Element;
|
|
32
|
+
export declare function TimeField({ label, value, onValueChange, timezone, minimum, maximum, }: {
|
|
33
|
+
label: string;
|
|
34
|
+
value: string;
|
|
35
|
+
onValueChange: (value: string) => void;
|
|
36
|
+
timezone: string;
|
|
37
|
+
minimum?: string;
|
|
38
|
+
maximum?: string;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare function Accordion({ value, title, children, }: {
|
|
3
|
+
value: string;
|
|
4
|
+
title: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function Collapsible({ title, children }: {
|
|
8
|
+
title: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
type AccessibleDrawerName = {
|
|
3
|
+
title: string;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
} | {
|
|
6
|
+
title?: undefined;
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
};
|
|
9
|
+
export type DrawerProps = AccessibleDrawerName & {
|
|
10
|
+
open: boolean;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
closeLabel?: string;
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
/** Sticky action area pinned below the scrollable body. */
|
|
16
|
+
footer?: ReactNode;
|
|
17
|
+
/** Desktop width: `sm` 380px · `md` 460px · `lg` 560px · `xl` 860px. */
|
|
18
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
19
|
+
bare?: boolean;
|
|
20
|
+
side?: "left" | "right";
|
|
21
|
+
mobilePlacement?: "bottom" | "side";
|
|
22
|
+
rootClassName?: string;
|
|
23
|
+
panelClassName?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Agent Factory side drawer — a panel that slides in from the right (desktop) / bottom
|
|
27
|
+
* (mobile). Use for secondary, scrollable surfaces that shouldn't steal the
|
|
28
|
+
* whole viewport like a modal: filters, detail side-views, config. Chrome only
|
|
29
|
+
* (scrim, sliding panel, title + close, optional sticky footer); the caller
|
|
30
|
+
* composes the body. AnimatePresence drives the slide via motion tokens, so it
|
|
31
|
+
* respects reduced-motion. a11y: portal to <body>, role/aria-modal, Esc + scrim
|
|
32
|
+
* close, body scroll-lock, focus moves into the panel on open. Token-only.
|
|
33
|
+
*/
|
|
34
|
+
export declare function Drawer({ open, onClose, title, ariaLabel, closeLabel, description, children, footer, size, bare, side, mobilePlacement, rootClassName, panelClassName, }: DrawerProps): import("react").ReactPortal | null;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type DropdownSelectOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
textValue?: string;
|
|
6
|
+
leading?: ReactNode;
|
|
7
|
+
meta?: ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function DropdownSelect({ value, options, onChange, ariaLabel, placeholder, disabled, density, menuAlign, portaled, className, }: {
|
|
11
|
+
value: string;
|
|
12
|
+
options: DropdownSelectOption[];
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
ariaLabel: string;
|
|
15
|
+
placeholder?: ReactNode;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
density?: "compact" | "default";
|
|
18
|
+
menuAlign?: "start" | "end";
|
|
19
|
+
/** Render the menu at the document root when an overflow-clipped workspace owns the trigger. */
|
|
20
|
+
portaled?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
type FieldControlProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
"aria-describedby"?: string;
|
|
5
|
+
"aria-invalid"?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export interface FieldProps {
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
children: ReactElement<FieldControlProps>;
|
|
10
|
+
hint?: ReactNode;
|
|
11
|
+
error?: ReactNode;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Field({ label, children, hint, error, required, className }: FieldProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A non-modal floating window — draggable by its header, resizable from the
|
|
4
|
+
* bottom-right corner, and pinnable. Unlike {@link Modal} it has NO scrim and
|
|
5
|
+
* does NOT lock page scroll: the page stays fully interactive underneath, so a
|
|
6
|
+
* user can keep interacting with the application while it floats above it.
|
|
7
|
+
*
|
|
8
|
+
* Narrow viewports (<640px): collapses to a near-fullscreen bottom sheet — drag /
|
|
9
|
+
* resize / pin are desktop-only affordances and get in the way of touch.
|
|
10
|
+
*
|
|
11
|
+
* - **Drag** — pointer-down on the header; `setPointerCapture` keeps the move
|
|
12
|
+
* stream flowing even when the cursor leaves the header, so fast drags stick.
|
|
13
|
+
* - **Resize** — the corner grip scales the box (min bounds enforced); the
|
|
14
|
+
* content (a `ResponsiveContainer` chart) re-fits, so resize == zoom.
|
|
15
|
+
* - **Pin** — when pinned the window persists (Esc is ignored); unpinned, Esc
|
|
16
|
+
* closes it. Position/size survive across closes so re-opening feels sticky.
|
|
17
|
+
*
|
|
18
|
+
* Token-only styling (theme-check clean), portalled to <body> so it escapes any
|
|
19
|
+
* transformed/backdrop-blur ancestor that would otherwise clip a fixed child.
|
|
20
|
+
*/
|
|
21
|
+
export declare function FloatingWindow({ open, onClose, title, children, initialW, initialH, minW, minH, pinLabel, unpinLabel, closeLabel, }: {
|
|
22
|
+
open: boolean;
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
title: string;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
initialW?: number;
|
|
27
|
+
initialH?: number;
|
|
28
|
+
minW?: number;
|
|
29
|
+
minH?: number;
|
|
30
|
+
pinLabel?: string;
|
|
31
|
+
unpinLabel?: string;
|
|
32
|
+
closeLabel?: string;
|
|
33
|
+
}): import("react").ReactPortal | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Display headings — page identity and editorial openers only.
|
|
4
|
+
* `display` 72 · `lg` 56 · `base` 40. Product panels use Subheading.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Heading({ level, as: As, className, children, }: {
|
|
7
|
+
level?: "display" | "lg" | "base";
|
|
8
|
+
as?: "h1" | "h2";
|
|
9
|
+
className?: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/** Product subheading — 20px, reserved for page/section hierarchy. */
|
|
13
|
+
export declare function Subheading({ children, className }: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HoverTip — a hover popover rendered through a portal so it's never clipped by a
|
|
3
|
+
* scroll container. It stays open while the pointer is over EITHER the anchor or
|
|
4
|
+
* the panel (a short close delay bridges the gap between them), so long lists can
|
|
5
|
+
* be hovered and scrolled. Hover/focus to open; supplementary info, so no focus
|
|
6
|
+
* trap. The panel is scrollable when tall.
|
|
7
|
+
*
|
|
8
|
+
* Positioning is viewport-clamped (and flips above near the bottom edge) so tips
|
|
9
|
+
* next to the composer send button are never truncated.
|
|
10
|
+
*/
|
|
11
|
+
import { type ReactNode } from "react";
|
|
12
|
+
export type HoverTipVariant = "panel" | "hint";
|
|
13
|
+
export declare function HoverTip({ content, children, width, variant, }: {
|
|
14
|
+
content: ReactNode;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Panel width in px. For `hint`, used as max-width so longer copy (e.g. context
|
|
18
|
+
* meter) can wrap instead of overflowing the viewport.
|
|
19
|
+
*/
|
|
20
|
+
width?: number;
|
|
21
|
+
/** `panel` = rich popover; `hint` = compact label under the anchor. */
|
|
22
|
+
variant?: HoverTipVariant;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Icon-only control — every icon button MUST expose a hover tooltip so intent is
|
|
4
|
+
* clear in both light and dark mode (native `title` alone is not enough).
|
|
5
|
+
*/
|
|
6
|
+
export declare function IconTip({ label, children, }: {
|
|
7
|
+
label: string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
type GroupControlProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function InputGroup({ label, start, end, children, className }: {
|
|
6
|
+
label: string;
|
|
7
|
+
start?: ReactNode;
|
|
8
|
+
end?: ReactNode;
|
|
9
|
+
children: ReactElement<GroupControlProps>;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface InputOtpProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
label: string;
|
|
5
|
+
length?: number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
inputMode?: "numeric" | "text";
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function InputOtp({ value, onValueChange, label, length, disabled, invalid, inputMode, className, }: InputOtpProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type InputHTMLAttributes, type TextareaHTMLAttributes } from "react";
|
|
2
|
+
export type FieldDensity = "compact" | "default" | "touch";
|
|
3
|
+
export type TextareaVariant = "outlined" | "bare";
|
|
4
|
+
/** Bordered field with the balanced product density. */
|
|
5
|
+
export declare const fieldInputClass: string;
|
|
6
|
+
export declare const fieldTextareaClass: string;
|
|
7
|
+
export declare const Input: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
|
|
8
|
+
density?: FieldDensity;
|
|
9
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
11
|
+
variant?: TextareaVariant;
|
|
12
|
+
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export declare function ItemList({ label, children, className }: {
|
|
3
|
+
label: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function Item({ className, density, ...props }: HTMLAttributes<HTMLLIElement> & {
|
|
8
|
+
density?: "compact" | "touch";
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare function ItemMedia({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
11
|
+
export declare function ItemContent({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
12
|
+
export declare function ItemTitle({ className, ...props }: HTMLAttributes<HTMLParagraphElement>): import("react").JSX.Element;
|
|
13
|
+
export declare function ItemDescription({ className, ...props }: HTMLAttributes<HTMLParagraphElement>): import("react").JSX.Element;
|
|
14
|
+
export declare function ItemMeta({ children, className }: {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function ItemAction({ children, className }: {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export declare function Kbd({ className, ...props }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
3
|
+
export declare function KbdGroup({ label, children, className }: {
|
|
4
|
+
label: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function LineChart({ current, previous, width, height, ariaLabel, }: {
|
|
2
|
+
current: number[];
|
|
3
|
+
previous?: number[];
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
ariaLabel: string;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
/** Donut with a Rust stroke — the canonical warm-card visualization. */
|
|
9
|
+
export declare function Donut({ pct, size }: {
|
|
10
|
+
pct: number;
|
|
11
|
+
size?: number;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface ListboxProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
label: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function Listbox({ label, className, children, ...props }: ListboxProps): import("react").JSX.Element;
|
|
7
|
+
export interface ListboxOptionProps extends HTMLAttributes<HTMLElement> {
|
|
8
|
+
selected: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function ListboxOption({ selected, disabled, asChild, className, children, ...props }: ListboxOptionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
export type LiveValueDirection = "up" | "down";
|
|
3
|
+
export interface LiveValueProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
/** Raw numeric value used only for direction comparison. */
|
|
5
|
+
value?: number | null;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Stable live-number presentation that briefly signals movement before
|
|
10
|
+
* returning to the caller's normal text color. Initial and invalid values do
|
|
11
|
+
* not flash; repeated ticks in the same direction restart the animation.
|
|
12
|
+
*/
|
|
13
|
+
export declare function LiveValue({ value, children, className, ...props }: LiveValueProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
type AccessibleDialogName = {
|
|
3
|
+
title: string;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
} | {
|
|
6
|
+
title?: undefined;
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
};
|
|
9
|
+
export type ModalProps = AccessibleDialogName & {
|
|
10
|
+
open: boolean;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
closeLabel?: string;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** Sticky action area pinned below the scrollable body. */
|
|
15
|
+
footer?: ReactNode;
|
|
16
|
+
/** Desktop width: `sm` 420px, `command` 680px, `lg` 820px, or `xl` 720px. */
|
|
17
|
+
size?: "sm" | "command" | "lg" | "xl" | "wide" | "full";
|
|
18
|
+
/** Render children straight into the panel (no title/padding) so the caller
|
|
19
|
+
* owns the internal chrome. `title` remains the accessible name unless an
|
|
20
|
+
* explicit `ariaLabel` is supplied. */
|
|
21
|
+
bare?: boolean;
|
|
22
|
+
sheetUntilPx?: number;
|
|
23
|
+
placement?: "responsive" | "center" | "bottom";
|
|
24
|
+
rootClassName?: string;
|
|
25
|
+
panelClassName?: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Agent Factory modal primitive with one responsive behavior:
|
|
29
|
+
* - **Mobile** (`<sm`): bottom sheet — full-width, pinned to the bottom edge,
|
|
30
|
+
* rounded top, respects the safe-area inset.
|
|
31
|
+
* **Desktop**: centered dialog card with the overlay radius token.
|
|
32
|
+
* AnimatePresence drives the scrim fade + panel rise (motion tokens, so it
|
|
33
|
+
* respects reduced-motion). Built-in a11y: role/aria-modal, Esc to close,
|
|
34
|
+
* scrim-click to close, body scroll-lock, focus moves into the dialog on open
|
|
35
|
+
* and is restored on close. Token-only styling — no raw hex, no borders >1px.
|
|
36
|
+
*
|
|
37
|
+
* Compose content with the page's own elements; this only owns the chrome
|
|
38
|
+
* (overlay, panel, optional title + close button).
|
|
39
|
+
*/
|
|
40
|
+
export declare function Modal({ open, onClose, title, ariaLabel, closeLabel, children, footer, size, bare,
|
|
41
|
+
/** Viewport width (px) at which the modal becomes a centered card; below stays bottom sheet. */
|
|
42
|
+
sheetUntilPx, placement, rootClassName, panelClassName, }: ModalProps): import("react").ReactPortal | null;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface MultiSelectOption<T extends string> {
|
|
3
|
+
value: T;
|
|
4
|
+
label: string;
|
|
5
|
+
meta?: ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function MultiSelect<T extends string>({ value, options, onValueChange, label, valueLabel, }: {
|
|
9
|
+
value: T[];
|
|
10
|
+
options: readonly MultiSelectOption<T>[];
|
|
11
|
+
onValueChange: (value: T[]) => void;
|
|
12
|
+
label: string;
|
|
13
|
+
valueLabel: (selected: readonly MultiSelectOption<T>[]) => ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SelectHTMLAttributes } from "react";
|
|
2
|
+
export interface NativeSelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface NativeSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "children" | "onChange"> {
|
|
8
|
+
label: string;
|
|
9
|
+
options: readonly NativeSelectOption[];
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function NativeSelect({ label, options, onChange, className, ...props }: NativeSelectProps): import("react").JSX.Element;
|