@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,20 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
href?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function Breadcrumb({ label, items }: {
|
|
9
|
+
label: string;
|
|
10
|
+
items: readonly BreadcrumbItem[];
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export declare function Pagination({ label, page, pageCount, onPageChange, pageLabel, previousLabel, nextLabel, }: {
|
|
13
|
+
label: string;
|
|
14
|
+
page: number;
|
|
15
|
+
pageCount: number;
|
|
16
|
+
onPageChange: (page: number) => void;
|
|
17
|
+
pageLabel: (page: number) => string;
|
|
18
|
+
previousLabel: string;
|
|
19
|
+
nextLabel: string;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* PageContainer owns top-level responsive page width. Product
|
|
4
|
+
* workspaces are fluid by default so route changes never alter the outer frame.
|
|
5
|
+
* Reading-oriented surfaces may opt into contained; line-length constraints
|
|
6
|
+
* belong inside the page, never in an ad hoc top-level wrapper. Vertical padding
|
|
7
|
+
* stays per-page via className.
|
|
8
|
+
*/
|
|
9
|
+
export type PageContainerWidth = "contained" | "fluid";
|
|
10
|
+
export declare function PageContainer({ className, children, width, }: {
|
|
11
|
+
className?: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
width?: PageContainerWidth;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type ReactNode } from "react";
|
|
2
|
+
export declare function Popover({ trigger, title, closeLabel, children, open, onOpenChange, size, align, side, sideOffset, contentClassName, }: {
|
|
3
|
+
trigger: ReactElement;
|
|
4
|
+
title: string;
|
|
5
|
+
closeLabel?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
/** Use command width for dense searchable pickers; small remains the default. */
|
|
10
|
+
size?: "sm" | "command";
|
|
11
|
+
/** Align the popup to the trigger while retaining viewport collision handling. */
|
|
12
|
+
align?: "start" | "center" | "end";
|
|
13
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
14
|
+
sideOffset?: number;
|
|
15
|
+
contentClassName?: string;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
export interface MenuItem {
|
|
18
|
+
id: string;
|
|
19
|
+
label: ReactNode;
|
|
20
|
+
leading?: ReactNode;
|
|
21
|
+
trailing?: ReactNode;
|
|
22
|
+
kind?: "item" | "radio";
|
|
23
|
+
separatorBefore?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
danger?: boolean;
|
|
26
|
+
onSelect?: () => void;
|
|
27
|
+
}
|
|
28
|
+
export interface MenuChoiceGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
29
|
+
label: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function MenuChoiceGroup({ label, className, children, ...props }: MenuChoiceGroupProps): import("react").JSX.Element;
|
|
32
|
+
export interface MenuChoiceItemProps extends HTMLAttributes<HTMLElement> {
|
|
33
|
+
selected: boolean;
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function MenuChoiceItem({ selected, asChild, children, ...props }: MenuChoiceItemProps): import("react").JSX.Element;
|
|
37
|
+
export interface MenuCommandItemProps extends HTMLAttributes<HTMLElement> {
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare function MenuCommandItem({ asChild, children, ...props }: MenuCommandItemProps): import("react").JSX.Element;
|
|
41
|
+
export declare function Menu({ trigger, label, items, value, onValueChange, open, onOpenChange, align, side, contentClassName, }: {
|
|
42
|
+
trigger: ReactElement;
|
|
43
|
+
label: string;
|
|
44
|
+
items: readonly MenuItem[];
|
|
45
|
+
value?: string;
|
|
46
|
+
onValueChange?: (value: string) => void;
|
|
47
|
+
open?: boolean;
|
|
48
|
+
onOpenChange?: (open: boolean) => void;
|
|
49
|
+
align?: "start" | "center" | "end";
|
|
50
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
51
|
+
contentClassName?: string;
|
|
52
|
+
}): import("react").JSX.Element;
|
|
53
|
+
export declare function ContextMenu({ children, label, items, }: {
|
|
54
|
+
children: ReactNode;
|
|
55
|
+
label: string;
|
|
56
|
+
items: readonly MenuItem[];
|
|
57
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type ResizablePaneGroupProps = {
|
|
3
|
+
value: number;
|
|
4
|
+
onValueChange: (value: number) => void;
|
|
5
|
+
label: string;
|
|
6
|
+
first: ReactNode;
|
|
7
|
+
second: ReactNode;
|
|
8
|
+
direction?: "horizontal" | "vertical";
|
|
9
|
+
minimum?: number;
|
|
10
|
+
maximum?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function ResizablePaneGroup({ value, onValueChange, label, first, second, direction, minimum, maximum, step, className, }: ResizablePaneGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* ScrollLoadMore — standard infinite-scroll footer. Watches a bottom sentinel
|
|
4
|
+
* with IntersectionObserver and calls `onLoadMore` when it enters the scroll
|
|
5
|
+
* root (nearest overflow parent, else the viewport).
|
|
6
|
+
* Shows a spinner while loading and an optional end/progress label.
|
|
7
|
+
*/
|
|
8
|
+
export type ScrollLoadMoreProps = {
|
|
9
|
+
hasMore: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
onLoadMore: () => void;
|
|
12
|
+
/** Shown while the next page is fetching. */
|
|
13
|
+
loadingLabel?: string;
|
|
14
|
+
/** Shown when `hasMore` is false (list fully loaded). */
|
|
15
|
+
endLabel?: string;
|
|
16
|
+
/** Shown when more items exist but not currently loading. */
|
|
17
|
+
hintLabel?: string;
|
|
18
|
+
/** Optional skeleton / placeholder rendered above the footer while loading. */
|
|
19
|
+
loadingSlot?: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Distance before the sentinel enters view to prefetch the next page. */
|
|
22
|
+
rootMargin?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function ScrollLoadMore({ hasMore, loading, onLoadMore, loadingLabel, endLabel, hintLabel, loadingSlot, className, rootMargin, }: ScrollLoadMoreProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A segmented (pill) control whose white pill slides between options — used for
|
|
3
|
+
* compact two-state and multi-state controls. `tone` colors the active label.
|
|
4
|
+
* Measures the active item and lets CSS own the tween
|
|
5
|
+
* (transitions.dev 16). Token-only, dark-safe.
|
|
6
|
+
*/
|
|
7
|
+
export declare function SegSlider<T extends string>({ options, value, onChange, onBlocked, className, size, ariaLabel, }: {
|
|
8
|
+
options: {
|
|
9
|
+
key: T;
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
tone?: "up" | "down";
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}[];
|
|
14
|
+
value: T;
|
|
15
|
+
onChange: (k: T) => void;
|
|
16
|
+
/** Fired when a disabled option is clicked (e.g. show why live mode is locked). */
|
|
17
|
+
onBlocked?: (k: T) => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
/** `sm` for dense controls; `md` for the default form density. */
|
|
20
|
+
size?: "sm" | "md";
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type SegmentedControlOption<T extends string> = {
|
|
3
|
+
value: T;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/** Mutually exclusive, in-place mode switch. Use SlidingTabs for navigation. */
|
|
8
|
+
export declare function SegmentedControl<T extends string>({ value, options, onChange, ariaLabel, density, semantics, className, }: {
|
|
9
|
+
value: T;
|
|
10
|
+
options: SegmentedControlOption<T>[];
|
|
11
|
+
onChange: (value: T) => void;
|
|
12
|
+
ariaLabel: string;
|
|
13
|
+
density?: "compact" | "default" | "touch";
|
|
14
|
+
semantics?: "selection" | "tabs";
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface CheckboxProps {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onCheckedChange: (checked: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function Checkbox({ label, checked, onCheckedChange, disabled, className }: CheckboxProps): import("react").JSX.Element;
|
|
10
|
+
export interface SwitchProps {
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
checked: boolean;
|
|
13
|
+
onCheckedChange: (checked: boolean) => void;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
labelPosition?: "start" | "end";
|
|
16
|
+
hideLabel?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
labelClassName?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function Switch({ label, checked, onCheckedChange, disabled, labelPosition, hideLabel, className, labelClassName, }: SwitchProps): import("react").JSX.Element;
|
|
21
|
+
export interface RadioOption<T extends string> {
|
|
22
|
+
value: T;
|
|
23
|
+
label: ReactNode;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface RadioGroupProps<T extends string> {
|
|
27
|
+
label: string;
|
|
28
|
+
value: T;
|
|
29
|
+
options: readonly RadioOption<T>[];
|
|
30
|
+
onValueChange: (value: T) => void;
|
|
31
|
+
appearance?: "control" | "card";
|
|
32
|
+
className?: string;
|
|
33
|
+
optionClassName?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function RadioGroup<T extends string>({ label, value, options, onValueChange, appearance, className, optionClassName, }: RadioGroupProps<T>): import("react").JSX.Element;
|
|
36
|
+
export interface ToggleGroupOption<T extends string> {
|
|
37
|
+
value: T;
|
|
38
|
+
label: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ToggleGroupProps<T extends string> {
|
|
41
|
+
label: string;
|
|
42
|
+
value: T[];
|
|
43
|
+
options: readonly ToggleGroupOption<T>[];
|
|
44
|
+
onValueChange: (value: T[]) => void;
|
|
45
|
+
}
|
|
46
|
+
export declare function ToggleGroup<T extends string>({ label, value, options, onValueChange }: ToggleGroupProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export declare function Sidebar({ label, className, ...props }: HTMLAttributes<HTMLElement> & {
|
|
3
|
+
label: string;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
|
+
export declare function SidebarHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
6
|
+
export declare function SidebarContent({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
7
|
+
export declare function SidebarSection({ label, children, className }: {
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Skeleton — the single loading primitive. Project convention:
|
|
4
|
+
* loading states MUST render a skeleton shaped like the real content, never a
|
|
5
|
+
* spinner or bare text. Compose these blocks into a layout that mirrors the
|
|
6
|
+
* component that's loading (same grid, same rows, same sizes), so the page
|
|
7
|
+
* doesn't reflow when data arrives.
|
|
8
|
+
*
|
|
9
|
+
* <Skeleton className="h-4 w-24" /> // a line
|
|
10
|
+
* <Skeleton className="size-10 rounded-full" /> // an avatar
|
|
11
|
+
*
|
|
12
|
+
* Shimmer + tokens (`--sk-base`/`--sk-hi`, dark-aware) live in `.t-shimmer`
|
|
13
|
+
* (index.css). Pass `style={{ animationDelay }}` to stagger rows.
|
|
14
|
+
*/
|
|
15
|
+
export declare function Skeleton({ className, style }: {
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type SliderDensity = "compact" | "default";
|
|
2
|
+
export type SliderProps = {
|
|
3
|
+
value: number;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
density?: SliderDensity;
|
|
8
|
+
onChange: (v: number) => void;
|
|
9
|
+
onCommit?: (v: number) => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
formatValue?: (v: number) => string;
|
|
13
|
+
marks?: number[];
|
|
14
|
+
variant?: "plain" | "boxed" | "allocation";
|
|
15
|
+
className?: string;
|
|
16
|
+
testId?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function Slider({ value, min, max, step, density, onChange, onCommit, disabled, ariaLabel, formatValue, marks, variant, className, testId, }: SliderProps): import("react").JSX.Element;
|
|
19
|
+
export type AllocationSliderProps = Omit<SliderProps, "density" | "variant">;
|
|
20
|
+
/** Dense percentage allocation control with fill, marks, and a vertical thumb. */
|
|
21
|
+
export declare function AllocationSlider(props: AllocationSliderProps): import("react").JSX.Element;
|
|
22
|
+
export declare function RangeSlider({ value, min, max, step, density, onChange, onCommit, lowerLabel, upperLabel, formatValue, }: {
|
|
23
|
+
value: [number, number];
|
|
24
|
+
min?: number;
|
|
25
|
+
max?: number;
|
|
26
|
+
step?: number;
|
|
27
|
+
density?: SliderDensity;
|
|
28
|
+
onChange: (value: [number, number]) => void;
|
|
29
|
+
onCommit?: (value: [number, number]) => void;
|
|
30
|
+
lowerLabel: string;
|
|
31
|
+
upperLabel: string;
|
|
32
|
+
formatValue?: (value: number) => string;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Sliding-underline navigation tab primitive. The 2px underline
|
|
4
|
+
* slides between the active tab (`.t-tab-underline`, index.css), re-measuring on
|
|
5
|
+
* resize. Suitable for compact application headers and navigation
|
|
6
|
+
* hub tabs — register via `useShell({ header: <SlidingTabs …/> }, [value, lang])`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSlideIndicator<T extends string>(value: T): {
|
|
9
|
+
listRef: import("react").RefObject<HTMLDivElement | null>;
|
|
10
|
+
indRef: import("react").RefObject<HTMLSpanElement | null>;
|
|
11
|
+
setBtn: (k: T) => (el: HTMLElement | null) => void;
|
|
12
|
+
focusTab: (key: T) => void | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** A text tab bar whose 2px underline slides between the active option. */
|
|
15
|
+
export declare function SlidingTabs<T extends string>({ tabs, value, onChange, onReorder, size, variant, className, ariaLabel, }: {
|
|
16
|
+
tabs: {
|
|
17
|
+
key: T;
|
|
18
|
+
label: ReactNode;
|
|
19
|
+
count?: number;
|
|
20
|
+
live?: boolean;
|
|
21
|
+
liveLabel?: string;
|
|
22
|
+
testId?: string;
|
|
23
|
+
}[];
|
|
24
|
+
value: T;
|
|
25
|
+
onChange: (k: T) => void;
|
|
26
|
+
/** When set, tabs are HTML5-draggable; drop reorders via (fromKey, toKey). */
|
|
27
|
+
onReorder?: (from: T, to: T) => void;
|
|
28
|
+
size?: "sm" | "md";
|
|
29
|
+
variant?: "underline" | "toolbar";
|
|
30
|
+
className?: string;
|
|
31
|
+
ariaLabel?: string;
|
|
32
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type SpotlightRect = {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
export type SpotlightPlacement = "top" | "bottom" | "left" | "right" | "center";
|
|
9
|
+
export interface SpotlightTourProps {
|
|
10
|
+
open: boolean;
|
|
11
|
+
label: string;
|
|
12
|
+
target?: SpotlightRect | null;
|
|
13
|
+
preferredPlacement?: Exclude<SpotlightPlacement, "center"> | "auto";
|
|
14
|
+
onEscape: () => void;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Full-screen guided-tour owner with a target cutout and collision-aware card. */
|
|
19
|
+
export declare function SpotlightTour({ open, label, target, preferredPlacement, onEscape, children, className, }: SpotlightTourProps): import("react").ReactPortal | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** KPI display — big Sohne 480 number, caption label, green/red delta with arrow. */
|
|
2
|
+
export declare function StatCard({ label, value, delta, direction, }: {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
delta?: string;
|
|
6
|
+
direction?: "up" | "down";
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ButtonVariant } from "./button";
|
|
3
|
+
/**
|
|
4
|
+
* StateView — the one place the app renders "nothing here" moments: empty,
|
|
5
|
+
* error, and loading. Centered icon-in-a-soft-circle + title + optional
|
|
6
|
+
* description + optional action button(s), in three sizes. Replaces scattered
|
|
7
|
+
* bare centered <p> states so every empty/error looks the same and on-brand.
|
|
8
|
+
*
|
|
9
|
+
* <StateView variant="empty" title={t("state.empty")} />
|
|
10
|
+
* <StateView variant="error" title={t("state.error")} description={err}
|
|
11
|
+
* action={{ label: t("state.retry"), onClick: reload }} />
|
|
12
|
+
* <StateView variant="loading" size="sm" />
|
|
13
|
+
* <StateView
|
|
14
|
+
* variant="empty"
|
|
15
|
+
* size="lg"
|
|
16
|
+
* title={t("documents.empty")}
|
|
17
|
+
* actions={[
|
|
18
|
+
* { label: t("documents.create"), onClick: create },
|
|
19
|
+
* { label: t("documents.import"), onClick: pick, variant: "secondary" },
|
|
20
|
+
* ]}
|
|
21
|
+
* />
|
|
22
|
+
*/
|
|
23
|
+
export type StateViewVariant = "empty" | "error" | "loading";
|
|
24
|
+
export type StateViewSize = "sm" | "md" | "lg";
|
|
25
|
+
/** `scrim` = frosted overlay on interactive surfaces (guest gate, modals). */
|
|
26
|
+
export type StateViewTone = "default" | "scrim";
|
|
27
|
+
export type StateViewAction = {
|
|
28
|
+
label: string;
|
|
29
|
+
onClick: () => void;
|
|
30
|
+
/** Defaults to `primary` for the first action, `secondary` for the rest. */
|
|
31
|
+
variant?: ButtonVariant;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare function StateView({ variant, size, tone, icon, title, description,
|
|
35
|
+
/** Shorthand for a single primary action. Prefer `actions` when you need more than one. */
|
|
36
|
+
action, actions, children, className, "data-testid": testId, }: {
|
|
37
|
+
variant?: StateViewVariant;
|
|
38
|
+
size?: StateViewSize;
|
|
39
|
+
tone?: StateViewTone;
|
|
40
|
+
/** Override the default per-variant glyph. */
|
|
41
|
+
icon?: ReactNode;
|
|
42
|
+
title?: ReactNode;
|
|
43
|
+
description?: ReactNode;
|
|
44
|
+
action?: StateViewAction;
|
|
45
|
+
/** One or more CTAs. Button size follows `size`; variant defaults as above. */
|
|
46
|
+
actions?: StateViewAction[];
|
|
47
|
+
/** Extra content below description / above actions (e.g. helper links). */
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
className?: string;
|
|
50
|
+
"data-testid"?: string;
|
|
51
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HTMLAttributes, type TableHTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from "react";
|
|
2
|
+
/** Semantic table primitives for product-specific dense data compositions. */
|
|
3
|
+
export declare const Table: import("react").ForwardRefExoticComponent<TableHTMLAttributes<HTMLTableElement> & import("react").RefAttributes<HTMLTableElement>>;
|
|
4
|
+
export declare const TableHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
export declare const TableBody: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
export declare const TableRow: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
7
|
+
export declare const TableHead: import("react").ForwardRefExoticComponent<ThHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
8
|
+
export declare const TableCell: import("react").ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** Visual weight — higher levels read stronger on light cards. */
|
|
3
|
+
export type TagLevel = "emphasis" | "accent" | "default" | "muted";
|
|
4
|
+
export type TagSize = "xs" | "sm";
|
|
5
|
+
/** Compact label pill — use `level` to control contrast; default is readable on white cards. */
|
|
6
|
+
export declare function TagPill({ children, level, size, className, title, }: {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
level?: TagLevel;
|
|
9
|
+
size?: TagSize;
|
|
10
|
+
className?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
/** Render a truncated tag row with a muted overflow counter (single line — never wraps). */
|
|
14
|
+
export declare function TagList({ items, limit, size, levelForItem, labelForItem, className, }: {
|
|
15
|
+
items: string[];
|
|
16
|
+
limit?: number;
|
|
17
|
+
size?: TagSize;
|
|
18
|
+
levelForItem?: (item: string) => TagLevel;
|
|
19
|
+
labelForItem: (item: string) => string;
|
|
20
|
+
className?: string;
|
|
21
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type UiThemeSettings } from "../theme";
|
|
2
|
+
export interface ThemeEditorLabels {
|
|
3
|
+
preview: string;
|
|
4
|
+
previewEyebrow: string;
|
|
5
|
+
previewTitle: string;
|
|
6
|
+
previewMetric: string;
|
|
7
|
+
previewAction: string;
|
|
8
|
+
previewDescription: string;
|
|
9
|
+
previewPrimaryTab: string;
|
|
10
|
+
previewSecondaryTab: string;
|
|
11
|
+
previewSecondaryAction: string;
|
|
12
|
+
previewSwitch: string;
|
|
13
|
+
page: string;
|
|
14
|
+
mode: string;
|
|
15
|
+
light: string;
|
|
16
|
+
dark: string;
|
|
17
|
+
system: string;
|
|
18
|
+
shape: string;
|
|
19
|
+
sharp: string;
|
|
20
|
+
compact: string;
|
|
21
|
+
soft: string;
|
|
22
|
+
round: string;
|
|
23
|
+
colors: string;
|
|
24
|
+
brand: string;
|
|
25
|
+
accent: string;
|
|
26
|
+
neutral: string;
|
|
27
|
+
customBrand: string;
|
|
28
|
+
customAccent: string;
|
|
29
|
+
customNeutral: string;
|
|
30
|
+
semanticColors: string;
|
|
31
|
+
positive: string;
|
|
32
|
+
negative: string;
|
|
33
|
+
warning: string;
|
|
34
|
+
info: string;
|
|
35
|
+
customPositive: string;
|
|
36
|
+
customNegative: string;
|
|
37
|
+
customWarning: string;
|
|
38
|
+
customInfo: string;
|
|
39
|
+
colorPickerTitle: (label: string) => string;
|
|
40
|
+
colorPickerHex: string;
|
|
41
|
+
colorPickerHue: string;
|
|
42
|
+
colorPickerSaturation: string;
|
|
43
|
+
colorPickerPresets: string;
|
|
44
|
+
colorPickerClose: string;
|
|
45
|
+
controls: string;
|
|
46
|
+
solidStyle: string;
|
|
47
|
+
color: string;
|
|
48
|
+
inverse: string;
|
|
49
|
+
effect: string;
|
|
50
|
+
flat: string;
|
|
51
|
+
plastic: string;
|
|
52
|
+
advanced: string;
|
|
53
|
+
surface: string;
|
|
54
|
+
filled: string;
|
|
55
|
+
translucent: string;
|
|
56
|
+
dataStyle: string;
|
|
57
|
+
categorical: string;
|
|
58
|
+
divergent: string;
|
|
59
|
+
sequential: string;
|
|
60
|
+
motion: string;
|
|
61
|
+
all: string;
|
|
62
|
+
micro: string;
|
|
63
|
+
macro: string;
|
|
64
|
+
none: string;
|
|
65
|
+
fontScale: string;
|
|
66
|
+
radiusScale: string;
|
|
67
|
+
value: (value: number) => string;
|
|
68
|
+
}
|
|
69
|
+
export interface ThemeEditorProps {
|
|
70
|
+
settings: UiThemeSettings;
|
|
71
|
+
labels: ThemeEditorLabels;
|
|
72
|
+
onChange: (settings: UiThemeSettings) => void;
|
|
73
|
+
brands?: readonly `#${string}`[];
|
|
74
|
+
accents?: readonly `#${string}`[];
|
|
75
|
+
neutrals?: readonly `#${string}`[];
|
|
76
|
+
}
|
|
77
|
+
/** Locale-neutral editor for the complete Agent Factory theme settings contract. */
|
|
78
|
+
export declare function ThemeEditor({ settings, labels, onChange, brands, accents, neutrals, }: ThemeEditorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type ToastTone = "error" | "info" | "success";
|
|
3
|
+
export type ToastApi = {
|
|
4
|
+
show: (message: string, tone?: ToastTone) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function useToast(): ToastApi;
|
|
7
|
+
export declare function ToastProvider({ children, closeLabel, duration }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
closeLabel: string;
|
|
10
|
+
duration?: number;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
import { Toolbar as ToolbarPrimitive } from "radix-ui";
|
|
3
|
+
export declare function Toolbar({ label, children, className, variant, density }: {
|
|
4
|
+
label: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
variant?: "framed" | "bare";
|
|
8
|
+
density?: "compact" | "default";
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare function ToolbarButton(props: ComponentPropsWithoutRef<typeof ToolbarPrimitive.Button>): import("react").JSX.Element;
|
|
11
|
+
export declare function ToolbarToggleGroup({ children }: {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function ToolbarToggleItem(props: ComponentPropsWithoutRef<typeof ToolbarPrimitive.ToggleItem>): import("react").JSX.Element;
|
|
15
|
+
export declare function ToolbarSeparator(props: ComponentPropsWithoutRef<typeof ToolbarPrimitive.Separator>): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import { AspectRatio as AspectRatioPrimitive, ScrollArea as ScrollAreaPrimitive, Separator as SeparatorPrimitive } from "radix-ui";
|
|
3
|
+
export declare function Separator(props: ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>): import("react").JSX.Element;
|
|
4
|
+
export declare function ScrollArea(props: ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>): import("react").JSX.Element;
|
|
5
|
+
export declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
|
+
export type WidgetFrameProps = Omit<ComponentPropsWithoutRef<"section">, "title"> & {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
status?: ReactNode;
|
|
5
|
+
toolbar?: ReactNode;
|
|
6
|
+
headerContent?: ReactNode;
|
|
7
|
+
headerClassName?: string;
|
|
8
|
+
hideHeader?: boolean;
|
|
9
|
+
density?: "compact" | "default";
|
|
10
|
+
contentClassName?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function WidgetFrame({ title, status, toolbar, headerContent, headerClassName, hideHeader, density, children, className, contentClassName, ...props }: WidgetFrameProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type WidgetPickerCategory = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export type WidgetPickerItem = {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
category: string;
|
|
10
|
+
preview: ReactNode;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type WidgetPickerProps = {
|
|
14
|
+
label: string;
|
|
15
|
+
searchLabel: string;
|
|
16
|
+
searchPlaceholder: string;
|
|
17
|
+
categories: WidgetPickerCategory[];
|
|
18
|
+
category: string;
|
|
19
|
+
onCategoryChange: (value: string) => void;
|
|
20
|
+
query: string;
|
|
21
|
+
onQueryChange: (value: string) => void;
|
|
22
|
+
items: WidgetPickerItem[];
|
|
23
|
+
selected: string[];
|
|
24
|
+
onToggle: (id: string) => void;
|
|
25
|
+
addedLabel: string;
|
|
26
|
+
emptyLabel: string;
|
|
27
|
+
testIdPrefix?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
};
|
|
30
|
+
/** Searchable widget catalog used by modular application workspaces. */
|
|
31
|
+
export declare function WidgetPicker({ label, searchLabel, searchPlaceholder, categories, category, onCategoryChange, query, onQueryChange, items, selected, onToggle, addedLabel, emptyLabel, testIdPrefix, className, }: WidgetPickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type Layout } from "react-grid-layout";
|
|
3
|
+
import "react-grid-layout/css/styles.css";
|
|
4
|
+
export type WorkspaceGridLayout = Layout;
|
|
5
|
+
export type WorkspaceGridItem = {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
content: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export type WorkspaceGridProps = {
|
|
11
|
+
label: string;
|
|
12
|
+
moveLabel: (label: string) => string;
|
|
13
|
+
resizeLabel?: string;
|
|
14
|
+
items: readonly WorkspaceGridItem[];
|
|
15
|
+
initialLayout: WorkspaceGridLayout;
|
|
16
|
+
storageKey?: string;
|
|
17
|
+
columns?: number;
|
|
18
|
+
rows?: number;
|
|
19
|
+
gap?: number;
|
|
20
|
+
className?: string;
|
|
21
|
+
testId?: string;
|
|
22
|
+
onLayoutChange?: (layout: WorkspaceGridLayout) => void;
|
|
23
|
+
};
|
|
24
|
+
/** Draggable, resizable, serializable workspace for dense operational panels. */
|
|
25
|
+
export declare function WorkspaceGrid({ label, moveLabel, resizeLabel, items, initialLayout, storageKey, columns, rows, gap, className, testId, onLayoutChange, }: WorkspaceGridProps): import("react").JSX.Element;
|