@bricks-toolkit/toolkit 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/LICENSE +21 -0
- package/README.md +214 -0
- package/dist/components/Accordion/Accordion.d.ts +5 -0
- package/dist/components/Accordion/Accordion.types.d.ts +32 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +2 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +11 -0
- package/dist/components/Avatar/Avatar.test.d.ts +1 -0
- package/dist/components/Avatar/Avatar.types.d.ts +24 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +11 -0
- package/dist/components/Badge/Badge.stories.d.ts +21 -0
- package/dist/components/Badge/Badge.test.d.ts +1 -0
- package/dist/components/Badge/Badge.types.d.ts +43 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +13 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.test.d.ts +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +27 -0
- package/dist/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.stories.d.ts +20 -0
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Button/Button.types.d.ts +24 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +25 -0
- package/dist/components/Card/Card.stories.d.ts +8 -0
- package/dist/components/Card/Card.test.d.ts +1 -0
- package/dist/components/Card/Card.types.d.ts +14 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +16 -0
- package/dist/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +31 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ComboBox/ComboBox.d.ts +2 -0
- package/dist/components/ComboBox/ComboBox.stories.d.ts +12 -0
- package/dist/components/ComboBox/ComboBox.test.d.ts +1 -0
- package/dist/components/ComboBox/ComboBox.types.d.ts +57 -0
- package/dist/components/ComboBox/index.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +25 -0
- package/dist/components/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +27 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +6 -0
- package/dist/components/Dialog/Dialog.stories.d.ts +9 -0
- package/dist/components/Dialog/Dialog.test.d.ts +1 -0
- package/dist/components/Dialog/Dialog.types.d.ts +52 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +7 -0
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +9 -0
- package/dist/components/DropdownMenu/DropdownMenu.test.d.ts +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +24 -0
- package/dist/components/DropdownMenu/index.d.ts +2 -0
- package/dist/components/Email/Email.d.ts +2 -0
- package/dist/components/Email/Email.stories.d.ts +11 -0
- package/dist/components/Email/Email.test.d.ts +1 -0
- package/dist/components/Email/Email.types.d.ts +33 -0
- package/dist/components/Email/index.d.ts +2 -0
- package/dist/components/FileUpload/FileUpload.d.ts +2 -0
- package/dist/components/FileUpload/FileUpload.stories.d.ts +10 -0
- package/dist/components/FileUpload/FileUpload.test.d.ts +1 -0
- package/dist/components/FileUpload/FileUpload.types.d.ts +22 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/Header/Header.d.ts +7 -0
- package/dist/components/Header/Header.stories.d.ts +8 -0
- package/dist/components/Header/Header.test.d.ts +1 -0
- package/dist/components/Header/Header.types.d.ts +19 -0
- package/dist/components/Header/index.d.ts +2 -0
- package/dist/components/IconButton/IconButton.d.ts +2 -0
- package/dist/components/IconButton/IconButton.stories.d.ts +17 -0
- package/dist/components/IconButton/IconButton.types.d.ts +10 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/Image/Image.d.ts +6 -0
- package/dist/components/Image/Image.stories.d.ts +13 -0
- package/dist/components/Image/Image.test.d.ts +1 -0
- package/dist/components/Image/Image.types.d.ts +40 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/Link/Link.d.ts +2 -0
- package/dist/components/Link/Link.stories.d.ts +15 -0
- package/dist/components/Link/Link.test.d.ts +1 -0
- package/dist/components/Link/Link.types.d.ts +20 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/Loader/Loader.d.ts +2 -0
- package/dist/components/Loader/Loader.stories.d.ts +12 -0
- package/dist/components/Loader/Loader.test.d.ts +1 -0
- package/dist/components/Loader/Loader.types.d.ts +17 -0
- package/dist/components/Loader/index.d.ts +2 -0
- package/dist/components/Modal/Modal.d.ts +14 -0
- package/dist/components/Modal/Modal.stories.d.ts +14 -0
- package/dist/components/Modal/Modal.test.d.ts +1 -0
- package/dist/components/Modal/Modal.types.d.ts +100 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +2 -0
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +15 -0
- package/dist/components/MultiSelect/MultiSelect.test.d.ts +1 -0
- package/dist/components/MultiSelect/MultiSelect.types.d.ts +55 -0
- package/dist/components/MultiSelect/index.d.ts +2 -0
- package/dist/components/OtpInput/OtpInput.d.ts +2 -0
- package/dist/components/OtpInput/OtpInput.stories.d.ts +10 -0
- package/dist/components/OtpInput/OtpInput.test.d.ts +1 -0
- package/dist/components/OtpInput/OtpInput.types.d.ts +53 -0
- package/dist/components/OtpInput/index.d.ts +2 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +2 -0
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts +23 -0
- package/dist/components/PasswordInput/PasswordInput.test.d.ts +1 -0
- package/dist/components/PasswordInput/PasswordInput.types.d.ts +27 -0
- package/dist/components/PasswordInput/index.d.ts +2 -0
- package/dist/components/Phone/Phone.d.ts +2 -0
- package/dist/components/Phone/Phone.stories.d.ts +11 -0
- package/dist/components/Phone/Phone.test.d.ts +1 -0
- package/dist/components/Phone/Phone.types.d.ts +36 -0
- package/dist/components/Phone/countries.d.ts +8 -0
- package/dist/components/Phone/index.d.ts +2 -0
- package/dist/components/RadioButton/RadioButton.d.ts +2 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +21 -0
- package/dist/components/RadioButton/RadioButton.test.d.ts +1 -0
- package/dist/components/RadioButton/RadioButton.types.d.ts +51 -0
- package/dist/components/RadioButton/index.d.ts +2 -0
- package/dist/components/SearchInput/SearchInput.d.ts +6 -0
- package/dist/components/SearchInput/SearchInput.stories.d.ts +8 -0
- package/dist/components/SearchInput/SearchInput.test.d.ts +1 -0
- package/dist/components/SearchInput/SearchInput.types.d.ts +12 -0
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +2 -0
- package/dist/components/Select/Select.stories.d.ts +12 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/Select.types.d.ts +31 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.d.ts +7 -0
- package/dist/components/Sidebar/Sidebar.stories.d.ts +10 -0
- package/dist/components/Sidebar/Sidebar.test.d.ts +1 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts +87 -0
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +26 -0
- package/dist/components/Skeleton/Skeleton.stories.d.ts +13 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +47 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Stepper/Stepper.d.ts +2 -0
- package/dist/components/Stepper/Stepper.stories.d.ts +23 -0
- package/dist/components/Stepper/Stepper.test.d.ts +1 -0
- package/dist/components/Stepper/Stepper.types.d.ts +47 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Table/Pagination.d.ts +3 -0
- package/dist/components/Table/Table.d.ts +3 -0
- package/dist/components/Table/Table.stories.d.ts +13 -0
- package/dist/components/Table/Table.test.d.ts +1 -0
- package/dist/components/Table/Table.types.d.ts +85 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Tabs/Tabs.d.ts +2 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +17 -0
- package/dist/components/Tabs/Tabs.test.d.ts +1 -0
- package/dist/components/Tabs/Tabs.types.d.ts +21 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/TextInput/TextInput.d.ts +2 -0
- package/dist/components/TextInput/TextInput.stories.d.ts +25 -0
- package/dist/components/TextInput/TextInput.test.d.ts +1 -0
- package/dist/components/TextInput/TextInput.types.d.ts +29 -0
- package/dist/components/TextInput/index.d.ts +2 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +8 -0
- package/dist/components/ThemeProvider/ThemeProvider.stories.d.ts +16 -0
- package/dist/components/ThemeProvider/ThemeProvider.test.d.ts +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.types.d.ts +112 -0
- package/dist/components/ThemeProvider/index.d.ts +2 -0
- package/dist/components/TimePicker/TimePicker.d.ts +2 -0
- package/dist/components/TimePicker/TimePicker.stories.d.ts +23 -0
- package/dist/components/TimePicker/TimePicker.test.d.ts +1 -0
- package/dist/components/TimePicker/TimePicker.types.d.ts +27 -0
- package/dist/components/TimePicker/index.d.ts +2 -0
- package/dist/components/Toaster/Toaster.d.ts +2 -0
- package/dist/components/Toaster/Toaster.stories.d.ts +13 -0
- package/dist/components/Toaster/Toaster.test.d.ts +1 -0
- package/dist/components/Toaster/Toaster.types.d.ts +23 -0
- package/dist/components/Toaster/index.d.ts +2 -0
- package/dist/components/Toggle/Toggle.d.ts +2 -0
- package/dist/components/Toggle/Toggle.stories.d.ts +11 -0
- package/dist/components/Toggle/Toggle.types.d.ts +10 -0
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +13 -0
- package/dist/components/Tooltip/Tooltip.test.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +33 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/index.d.ts +75 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +481 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { ReactNode, ElementType, CSSProperties } from 'react';
|
|
2
|
+
export interface SidebarItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
href?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
badge?: ReactNode;
|
|
10
|
+
/** Optional component to use for the item (e.g., NavLink) */
|
|
11
|
+
component?: ElementType;
|
|
12
|
+
/** Optional props for the custom component */
|
|
13
|
+
componentProps?: Record<string, unknown>;
|
|
14
|
+
/** Optional nested items */
|
|
15
|
+
items?: SidebarItem[];
|
|
16
|
+
/** Whether the item is currently expanded (for nested items) */
|
|
17
|
+
isExpanded?: boolean;
|
|
18
|
+
/** Whether the item should be hidden */
|
|
19
|
+
hidden?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface SidebarGroup {
|
|
22
|
+
id: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
items: SidebarItem[];
|
|
25
|
+
/** Whether the group should be hidden */
|
|
26
|
+
hidden?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface SidebarClassNames {
|
|
29
|
+
root?: string;
|
|
30
|
+
header?: string;
|
|
31
|
+
content?: string;
|
|
32
|
+
footer?: string;
|
|
33
|
+
group?: string;
|
|
34
|
+
groupLabel?: string;
|
|
35
|
+
item?: string;
|
|
36
|
+
itemIcon?: string;
|
|
37
|
+
itemLabel?: string;
|
|
38
|
+
itemActive?: string;
|
|
39
|
+
itemCollapsed?: string;
|
|
40
|
+
toggleButton?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface SidebarStyles {
|
|
43
|
+
root?: CSSProperties;
|
|
44
|
+
header?: CSSProperties;
|
|
45
|
+
content?: CSSProperties;
|
|
46
|
+
footer?: CSSProperties;
|
|
47
|
+
group?: CSSProperties;
|
|
48
|
+
groupLabel?: CSSProperties;
|
|
49
|
+
item?: CSSProperties;
|
|
50
|
+
itemIcon?: CSSProperties;
|
|
51
|
+
itemLabel?: CSSProperties;
|
|
52
|
+
toggleButton?: CSSProperties;
|
|
53
|
+
}
|
|
54
|
+
export interface SidebarProps {
|
|
55
|
+
/** Groups of navigation items to display in the sidebar. */
|
|
56
|
+
groups: SidebarGroup[];
|
|
57
|
+
/** Whether the sidebar is in its collapsed state. */
|
|
58
|
+
isCollapsed?: boolean;
|
|
59
|
+
/** Callback triggered when the collapsed state changes. */
|
|
60
|
+
onToggleCollapse?: (isCollapsed: boolean) => void;
|
|
61
|
+
/** Optional logo or brand element to display at the top. */
|
|
62
|
+
logo?: ReactNode;
|
|
63
|
+
/** Optional footer content. */
|
|
64
|
+
footer?: ReactNode;
|
|
65
|
+
/** Additional CSS classes for the container. */
|
|
66
|
+
className?: string;
|
|
67
|
+
/** Whether to show the glass effect. */
|
|
68
|
+
glass?: boolean;
|
|
69
|
+
/** Custom width for expanded state (default: 288px / 72rem) */
|
|
70
|
+
width?: string | number;
|
|
71
|
+
/** Custom width for collapsed state (default: 80px / 20rem) */
|
|
72
|
+
collapsedWidth?: string | number;
|
|
73
|
+
/** Whether to show the built-in collapse toggle button */
|
|
74
|
+
showToggleButton?: boolean;
|
|
75
|
+
/** Position of the toggle button ('top' | 'bottom' | 'center') */
|
|
76
|
+
togglePosition?: 'top' | 'bottom' | 'center';
|
|
77
|
+
/** Placement of the sidebar */
|
|
78
|
+
position?: 'left' | 'right';
|
|
79
|
+
/** Whether icons should be centered when collapsed */
|
|
80
|
+
centerIcons?: boolean;
|
|
81
|
+
/** Deep customization of CSS classes */
|
|
82
|
+
classNames?: SidebarClassNames;
|
|
83
|
+
/** Deep customization of inline styles */
|
|
84
|
+
styles?: SidebarStyles;
|
|
85
|
+
/** Custom render function for items */
|
|
86
|
+
renderItem?: (item: SidebarItem, isCollapsed: boolean) => ReactNode;
|
|
87
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SkeletonProps, SkeletonTextProps, SkeletonAvatarProps, SkeletonCardProps, SkeletonTableProps } from './Skeleton.types';
|
|
2
|
+
/**
|
|
3
|
+
* Primitive skeleton block. Use this as the building brick for any custom
|
|
4
|
+
* layout skeleton you need.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
/**
|
|
8
|
+
* Multi-line text placeholder. The last line is intentionally shorter to
|
|
9
|
+
* mimic natural prose paragraph endings.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SkeletonText: React.ForwardRefExoticComponent<SkeletonTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
/**
|
|
13
|
+
* Circular avatar placeholder. Pairs naturally with SkeletonText to build
|
|
14
|
+
* user-card or comment-thread loaders.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SkeletonAvatar: React.ForwardRefExoticComponent<SkeletonAvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
/**
|
|
18
|
+
* Pre-composed card skeleton mirroring the Card component structure:
|
|
19
|
+
* optional hero image → title → description lines → action bar.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SkeletonCard: React.ForwardRefExoticComponent<SkeletonCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
/**
|
|
23
|
+
* Full table placeholder matching the Table component's visual grid.
|
|
24
|
+
* Renders a configurable number of column headers and body rows.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SkeletonTable: React.ForwardRefExoticComponent<SkeletonTableProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Skeleton } from './Skeleton';
|
|
3
|
+
declare const meta: Meta<typeof Skeleton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Skeleton>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Variants: Story;
|
|
8
|
+
export declare const Shapes: Story;
|
|
9
|
+
export declare const TextBlock: Story;
|
|
10
|
+
export declare const AvatarWithText: Story;
|
|
11
|
+
export declare const CardSkeleton: Story;
|
|
12
|
+
export declare const TableSkeleton: Story;
|
|
13
|
+
export declare const DashboardPageSkeleton: Story;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type SkeletonVariant = 'default' | 'wave' | 'pulse';
|
|
3
|
+
export type SkeletonShape = 'rectangle' | 'circle' | 'rounded';
|
|
4
|
+
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Animation style of the skeleton. Defaults to 'wave'. */
|
|
6
|
+
variant?: SkeletonVariant;
|
|
7
|
+
/** Shape of the skeleton block. Defaults to 'rectangle'. */
|
|
8
|
+
shape?: SkeletonShape;
|
|
9
|
+
/** Explicit width (e.g. '100%', '200px'). Falls back to the element's natural width. */
|
|
10
|
+
width?: string | number;
|
|
11
|
+
/** Explicit height (e.g. '1rem', 48). Falls back to the element's natural height. */
|
|
12
|
+
height?: string | number;
|
|
13
|
+
}
|
|
14
|
+
export interface SkeletonTextProps extends HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
/** Number of text lines to render. Defaults to 3. */
|
|
16
|
+
lines?: number;
|
|
17
|
+
/** Animation variant forwarded to each line. Defaults to 'wave'. */
|
|
18
|
+
variant?: SkeletonVariant;
|
|
19
|
+
/** When true the last line is shorter (≈ 60 %) to look like natural prose. Defaults to true. */
|
|
20
|
+
shortLast?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface SkeletonAvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
/** Diameter of the avatar circle in pixels. Defaults to 40. */
|
|
24
|
+
size?: number;
|
|
25
|
+
/** Animation variant. Defaults to 'wave'. */
|
|
26
|
+
variant?: SkeletonVariant;
|
|
27
|
+
}
|
|
28
|
+
export interface SkeletonCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
29
|
+
/** Show a header image placeholder at the top of the card. Defaults to true. */
|
|
30
|
+
showImage?: boolean;
|
|
31
|
+
/** Height of the image placeholder in pixels. Defaults to 160. */
|
|
32
|
+
imageHeight?: number;
|
|
33
|
+
/** Number of text-line skeletons in the body. Defaults to 3. */
|
|
34
|
+
lines?: number;
|
|
35
|
+
/** Animation variant forwarded to all children. Defaults to 'wave'. */
|
|
36
|
+
variant?: SkeletonVariant;
|
|
37
|
+
}
|
|
38
|
+
export interface SkeletonTableProps extends HTMLAttributes<HTMLDivElement> {
|
|
39
|
+
/** Number of rows to render. Defaults to 5. */
|
|
40
|
+
rows?: number;
|
|
41
|
+
/** Number of columns to render. Defaults to 4. */
|
|
42
|
+
columns?: number;
|
|
43
|
+
/** Animation variant. Defaults to 'wave'. */
|
|
44
|
+
variant?: SkeletonVariant;
|
|
45
|
+
/** Show a header row above the body rows. Defaults to true. */
|
|
46
|
+
showHeader?: boolean;
|
|
47
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Stepper } from './Stepper';
|
|
3
|
+
declare const meta: Meta<typeof Stepper>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
/** The default Stepper starting at step 2 (Profile). */
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
/** All four visual variants. */
|
|
9
|
+
export declare const Variants: Story;
|
|
10
|
+
/** All three size tokens. */
|
|
11
|
+
export declare const Sizes: Story;
|
|
12
|
+
/** Vertical orientation, great for sidebars or wizards. */
|
|
13
|
+
export declare const Vertical: Story;
|
|
14
|
+
/** All four variants in vertical orientation. */
|
|
15
|
+
export declare const VerticalVariants: Story;
|
|
16
|
+
/** Steps with custom Heroicon icons instead of numbers. */
|
|
17
|
+
export declare const WithIcons: Story;
|
|
18
|
+
/** A step can be marked with an error status. */
|
|
19
|
+
export declare const WithError: Story;
|
|
20
|
+
/** When `clickable` is true, users can jump to any step. */
|
|
21
|
+
export declare const Clickable: Story;
|
|
22
|
+
/** Fully controlled stepper driven by external state with next/back navigation. */
|
|
23
|
+
export declare const Controlled: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Visual style of the stepper. */
|
|
3
|
+
export type StepperVariant = 'default' | 'filled' | 'outlined' | 'minimal';
|
|
4
|
+
/** Size token for the stepper. */
|
|
5
|
+
export type StepperSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
/** Layout orientation. */
|
|
7
|
+
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
8
|
+
/** State of an individual step. */
|
|
9
|
+
export type StepStatus = 'completed' | 'active' | 'upcoming' | 'error';
|
|
10
|
+
export interface StepItem {
|
|
11
|
+
/** Unique identifier for the step. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Primary label shown below / beside the step indicator. */
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
/** Optional secondary description text. */
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
/** Optional custom icon to render inside the step indicator (overrides the step number). */
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
/** Marks the step as disabled — cannot be clicked. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Optional extra content/panel revealed when this step is active. */
|
|
22
|
+
content?: ReactNode;
|
|
23
|
+
/** Override status explicitly. When omitted, status is derived from `currentStep`. */
|
|
24
|
+
status?: StepStatus;
|
|
25
|
+
}
|
|
26
|
+
export interface StepperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
27
|
+
/** Ordered list of steps to render. */
|
|
28
|
+
steps: StepItem[];
|
|
29
|
+
/** Zero-based index of the currently active step. */
|
|
30
|
+
currentStep?: number;
|
|
31
|
+
/** Callback fired when the user clicks a step (passes zero-based index). */
|
|
32
|
+
onChange?: (index: number) => void;
|
|
33
|
+
/** Visual style. Defaults to `'default'`. */
|
|
34
|
+
variant?: StepperVariant;
|
|
35
|
+
/** Size. Defaults to `'md'`. */
|
|
36
|
+
size?: StepperSize;
|
|
37
|
+
/** Layout direction. Defaults to `'horizontal'`. */
|
|
38
|
+
orientation?: StepperOrientation;
|
|
39
|
+
/** Whether steps are clickable for navigation. Defaults to `false`. */
|
|
40
|
+
clickable?: boolean;
|
|
41
|
+
/** Show content panel of the active step below the stepper. Defaults to `true`. */
|
|
42
|
+
showContent?: boolean;
|
|
43
|
+
/** Extra class applied to the step connector line. */
|
|
44
|
+
connectorClassName?: string;
|
|
45
|
+
/** Extra class applied to each step wrapper. */
|
|
46
|
+
stepClassName?: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PaginationProps } from './Table.types';
|
|
3
|
+
export declare function Pagination({ total, page, pageSize, totalPages: propTotalPages, hasNextPage: propHasNextPage, hasPrevPage: propHasPrevPage, onPageChange, onPageSizeChange, pageSizeOptions, showSizeChanger, className, }: PaginationProps): React.JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TableProps } from './Table.types';
|
|
3
|
+
export declare function Table<T extends object>({ data, columns, rowKey, loading, emptyMessage, striped, bordered, hoverable, stickyHeader, size, sortState: externalSort, onSortChange, className, tableClassName, pagination, headerVariant, }: TableProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Table } from './Table';
|
|
3
|
+
declare const meta: Meta<typeof Table>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Basic: Story;
|
|
7
|
+
export declare const StripedBordered: Story;
|
|
8
|
+
export declare const Loading: Story;
|
|
9
|
+
export declare const Empty: Story;
|
|
10
|
+
export declare const WithPagination: Story;
|
|
11
|
+
export declare const Sortable: Story;
|
|
12
|
+
export declare const Sizes: Story;
|
|
13
|
+
export declare const PaginationStory: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export type TableAlign = 'left' | 'center' | 'right';
|
|
3
|
+
export type TableSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface TableColumn<T> {
|
|
5
|
+
/** Unique key identifying this column (also used as data accessor when render is omitted). */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Header label shown in <th>. */
|
|
8
|
+
header: ReactNode;
|
|
9
|
+
/** Custom cell renderer. Receives the row object and its index. */
|
|
10
|
+
render?: (row: T, rowIndex: number) => ReactNode;
|
|
11
|
+
/** When true a sort toggle is shown in the header. */
|
|
12
|
+
sortable?: boolean;
|
|
13
|
+
/** Column width, e.g. '120px' or '10%'. */
|
|
14
|
+
width?: CSSProperties['width'];
|
|
15
|
+
/** Text alignment for both header and cells. Defaults to 'left'. */
|
|
16
|
+
align?: TableAlign;
|
|
17
|
+
/** Extra class applied to every <td> in this column. */
|
|
18
|
+
cellClassName?: string;
|
|
19
|
+
/** Extra class applied to the <th> of this column. */
|
|
20
|
+
headerClassName?: string;
|
|
21
|
+
}
|
|
22
|
+
export type SortDirection = 'asc' | 'desc';
|
|
23
|
+
export interface SortState {
|
|
24
|
+
key: string;
|
|
25
|
+
direction: SortDirection;
|
|
26
|
+
}
|
|
27
|
+
export type TableHeaderVariant = 'light' | 'dark';
|
|
28
|
+
export interface TableProps<T extends object> {
|
|
29
|
+
/** Array of data rows. */
|
|
30
|
+
data: T[];
|
|
31
|
+
/** Column definitions. */
|
|
32
|
+
columns: TableColumn<T>[];
|
|
33
|
+
/** Returns a unique key for each row (required for React reconciliation). */
|
|
34
|
+
rowKey: (row: T) => string | number;
|
|
35
|
+
/** Show a loading skeleton overlay. */
|
|
36
|
+
loading?: boolean;
|
|
37
|
+
/** Message (or element) shown when data is empty. */
|
|
38
|
+
emptyMessage?: ReactNode;
|
|
39
|
+
/** Alternate row background colours. */
|
|
40
|
+
striped?: boolean;
|
|
41
|
+
/** Render outer and inner borders. */
|
|
42
|
+
bordered?: boolean;
|
|
43
|
+
/** Highlight row on hover. */
|
|
44
|
+
hoverable?: boolean;
|
|
45
|
+
/** Makes the header stick to the top when scrolling. */
|
|
46
|
+
stickyHeader?: boolean;
|
|
47
|
+
/** Cell padding size. Defaults to 'md'. */
|
|
48
|
+
size?: TableSize;
|
|
49
|
+
/** External sort state (controlled). When omitted, sorting is internal. */
|
|
50
|
+
sortState?: SortState;
|
|
51
|
+
/** Called when the user clicks a sortable header. */
|
|
52
|
+
onSortChange?: (sort: SortState) => void;
|
|
53
|
+
/** Additional class for the outer wrapper. */
|
|
54
|
+
className?: string;
|
|
55
|
+
/** Additional class for the <table> element. */
|
|
56
|
+
tableClassName?: string;
|
|
57
|
+
/** Pagination configuration. If null or undefined, pagination is hidden. */
|
|
58
|
+
pagination?: PaginationProps | null;
|
|
59
|
+
/** Variant for the table header */
|
|
60
|
+
headerVariant?: TableHeaderVariant;
|
|
61
|
+
}
|
|
62
|
+
export interface PaginationProps {
|
|
63
|
+
/** Total number of items across all pages. */
|
|
64
|
+
total: number;
|
|
65
|
+
/** Current page index (1-based). */
|
|
66
|
+
page: number;
|
|
67
|
+
/** Number of rows per page. */
|
|
68
|
+
pageSize: number;
|
|
69
|
+
/** Total number of pages. */
|
|
70
|
+
totalPages?: number;
|
|
71
|
+
/** Whether there is a next page. */
|
|
72
|
+
hasNextPage?: boolean;
|
|
73
|
+
/** Whether there is a previous page. */
|
|
74
|
+
hasPrevPage?: boolean;
|
|
75
|
+
/** Called when the user navigates to a new page. */
|
|
76
|
+
onPageChange: (page: number) => void;
|
|
77
|
+
/** Called when the user picks a new page size. */
|
|
78
|
+
onPageSizeChange?: (size: number) => void;
|
|
79
|
+
/** Available page-size options. Defaults to [10, 20, 50]. */
|
|
80
|
+
pageSizeOptions?: number[];
|
|
81
|
+
/** Show the page-size selector. Defaults to true when onPageSizeChange is provided. */
|
|
82
|
+
showSizeChanger?: boolean;
|
|
83
|
+
/** Additional class for the pagination wrapper. */
|
|
84
|
+
className?: string;
|
|
85
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Tabs } from './Tabs';
|
|
3
|
+
declare const meta: Meta<typeof Tabs>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
/** The default Tabs component. */
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
/** All five size variants stacked vertically. */
|
|
9
|
+
export declare const Sizes: Story;
|
|
10
|
+
/** All four visual variants. */
|
|
11
|
+
export declare const Variants: Story;
|
|
12
|
+
/** Tabs spanning the full width of their container. */
|
|
13
|
+
export declare const FullWidth: Story;
|
|
14
|
+
/** Individual tabs can be disabled. */
|
|
15
|
+
export declare const DisabledTabs: Story;
|
|
16
|
+
/** Controlled usage where the selection state is managed externally. */
|
|
17
|
+
export declare const Controlled: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export type TabsVariant = 'default' | 'filled' | 'flushed' | 'unstyled';
|
|
3
|
+
export type TabsSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export interface TabItem {
|
|
5
|
+
id: string;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
content: ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
11
|
+
items: TabItem[];
|
|
12
|
+
defaultSelectedId?: string;
|
|
13
|
+
selectedId?: string;
|
|
14
|
+
onChange?: (id: string) => void;
|
|
15
|
+
variant?: TabsVariant;
|
|
16
|
+
size?: TabsSize;
|
|
17
|
+
fullWidth?: boolean;
|
|
18
|
+
tabListClassName?: string;
|
|
19
|
+
tabClassName?: string;
|
|
20
|
+
tabPanelClassName?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { TextInput } from './TextInput';
|
|
3
|
+
declare const meta: Meta<typeof TextInput>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
/** The default input with a label, placeholder, and helper text. */
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
/** All five size variants stacked vertically. */
|
|
9
|
+
export declare const Sizes: Story;
|
|
10
|
+
/** All four visual variants. */
|
|
11
|
+
export declare const Variants: Story;
|
|
12
|
+
/** All four validation states. */
|
|
13
|
+
export declare const ValidationStates: Story;
|
|
14
|
+
/** Inline left and right elements (SVG icons). */
|
|
15
|
+
export declare const WithIcons: Story;
|
|
16
|
+
/** External prefix and suffix addon elements. */
|
|
17
|
+
export declare const WithPrefixSuffix: Story;
|
|
18
|
+
/** Required fields show a red asterisk beside the label. */
|
|
19
|
+
export declare const Required: Story;
|
|
20
|
+
/** Disabled input — read-only and non-interactive. */
|
|
21
|
+
export declare const Disabled: Story;
|
|
22
|
+
/** Override styles via `inputClassName` and `wrapperClassName`. */
|
|
23
|
+
export declare const CustomClassName: Story;
|
|
24
|
+
/** Input without a label — uses `aria-label` on the `<input>` instead. */
|
|
25
|
+
export declare const NoLabel: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type TextInputVariant = 'default' | 'filled' | 'flushed' | 'unstyled';
|
|
3
|
+
export type TextInputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export type TextInputState = 'default' | 'error' | 'success' | 'warning';
|
|
5
|
+
export interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
|
|
6
|
+
label?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
helperText?: string;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
successMessage?: string;
|
|
11
|
+
warningMessage?: string;
|
|
12
|
+
variant?: TextInputVariant;
|
|
13
|
+
size?: TextInputSize;
|
|
14
|
+
state?: TextInputState;
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
leftElement?: ReactNode;
|
|
17
|
+
rightElement?: ReactNode;
|
|
18
|
+
prefix?: ReactNode;
|
|
19
|
+
suffix?: ReactNode;
|
|
20
|
+
wrapperClassName?: string;
|
|
21
|
+
inputGroupClassName?: string;
|
|
22
|
+
inputClassName?: string;
|
|
23
|
+
labelClassName?: string;
|
|
24
|
+
helperClassName?: string;
|
|
25
|
+
clearable?: boolean;
|
|
26
|
+
isLoading?: boolean;
|
|
27
|
+
multiline?: boolean;
|
|
28
|
+
rows?: number;
|
|
29
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ThemeProviderProps, ThemeProviderState } from './ThemeProvider.types';
|
|
2
|
+
interface ThemeProviderComponent {
|
|
3
|
+
(props: ThemeProviderProps): React.JSX.Element;
|
|
4
|
+
displayName?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const ThemeProvider: ThemeProviderComponent;
|
|
7
|
+
export declare const useTheme: () => ThemeProviderState;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ThemeProvider } from './ThemeProvider';
|
|
3
|
+
/**
|
|
4
|
+
* The ThemeProvider is the heart of the design system. It manages theme state,
|
|
5
|
+
* synchronizes with user preferences, and injects a comprehensive set of
|
|
6
|
+
* CSS variables into the application root.
|
|
7
|
+
*/
|
|
8
|
+
declare const meta: Meta<typeof ThemeProvider>;
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
/** The default Storybook demonstration using the library's premium tokens. */
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
/** Demonstration of a high-contrast custom brand configuration. */
|
|
14
|
+
export declare const CustomBranding: Story;
|
|
15
|
+
/** A comprehensive gallery for auditing all theme design tokens. */
|
|
16
|
+
export declare const TokenGalleryStory: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Theme modes supported by the library. */
|
|
3
|
+
export type ThemeMode = 'light' | 'dark' | 'system';
|
|
4
|
+
/** A record of semantic design tokens for a single theme (light or dark). */
|
|
5
|
+
export interface SemanticColors {
|
|
6
|
+
/** Main primary color used for actions and highlights. */
|
|
7
|
+
primary?: string;
|
|
8
|
+
/** Hover state for primary actions. */
|
|
9
|
+
primaryHover?: string;
|
|
10
|
+
/** Active/pressed state for primary actions. */
|
|
11
|
+
primaryActive?: string;
|
|
12
|
+
/** Secondary actions or secondary emphasis. */
|
|
13
|
+
secondary?: string;
|
|
14
|
+
/** Hover state for secondary actions. */
|
|
15
|
+
secondaryHover?: string;
|
|
16
|
+
/** A vibrant accent color for specific focus or brand elements. */
|
|
17
|
+
accent?: string;
|
|
18
|
+
/** Main application background. */
|
|
19
|
+
background?: string;
|
|
20
|
+
/** Primary surface color for cards, modals, and navigation. */
|
|
21
|
+
surface?: string;
|
|
22
|
+
/** A darker/lighter alternate surface for contrast. */
|
|
23
|
+
surfaceSecondary?: string;
|
|
24
|
+
/** Default border color for elements like inputs or cards. */
|
|
25
|
+
border?: string;
|
|
26
|
+
/** A more subtle border for secondary grouping. */
|
|
27
|
+
borderLight?: string;
|
|
28
|
+
/** Explicit divider color between content blocks. */
|
|
29
|
+
divider?: string;
|
|
30
|
+
/** Standard high-contrast text for body and headings. */
|
|
31
|
+
text?: string;
|
|
32
|
+
/** Slightly lower contrast text for secondary descriptions. */
|
|
33
|
+
textSecondary?: string;
|
|
34
|
+
/** Muted text for captions, metadata, or disabled labels. */
|
|
35
|
+
textMuted?: string;
|
|
36
|
+
/** High-contrast text to be used on dark背景 (e.g. on primary buttons). */
|
|
37
|
+
textInverse?: string;
|
|
38
|
+
/** Color representing success (often green). */
|
|
39
|
+
success?: string;
|
|
40
|
+
/** Color representing warnings (often amber). */
|
|
41
|
+
warning?: string;
|
|
42
|
+
/** Color representing errors or destructive actions (often red). */
|
|
43
|
+
error?: string;
|
|
44
|
+
/** Color representing informational messages (often blue). */
|
|
45
|
+
info?: string;
|
|
46
|
+
/** Background color for item hover states (e.g. list items). */
|
|
47
|
+
hover?: string;
|
|
48
|
+
/** Background color for item active/selected states. */
|
|
49
|
+
active?: string;
|
|
50
|
+
/** Ring or outline color for focus states. */
|
|
51
|
+
focus?: string;
|
|
52
|
+
/** Color for disabled backgrounds or indicators. */
|
|
53
|
+
disabled?: string;
|
|
54
|
+
/** A subtle, tight shadow for small components. */
|
|
55
|
+
shadowSm?: string;
|
|
56
|
+
/** The standard shadow for cards and modals. */
|
|
57
|
+
shadowMd?: string;
|
|
58
|
+
/** A large, diffuse shadow for overlays. */
|
|
59
|
+
shadowLg?: string;
|
|
60
|
+
/** For quick interactions like hover entry. */
|
|
61
|
+
transitionFast?: string;
|
|
62
|
+
/** The default transition for most entry/exit animations. */
|
|
63
|
+
transitionNormal?: string;
|
|
64
|
+
/** For large surface changes or fade-ins. */
|
|
65
|
+
transitionSlow?: string;
|
|
66
|
+
/** Layer for dropdowns and popovers. */
|
|
67
|
+
zIndexDropdown?: string | number;
|
|
68
|
+
/** Layer for sticky headers or nav. */
|
|
69
|
+
zIndexSticky?: string | number;
|
|
70
|
+
/** Layer for modals and drawers. */
|
|
71
|
+
zIndexModal?: string | number;
|
|
72
|
+
/** Highest layer for tooltips and alerts. */
|
|
73
|
+
zIndexTooltip?: string | number;
|
|
74
|
+
primaryForeground?: string;
|
|
75
|
+
secondaryForeground?: string;
|
|
76
|
+
muted?: string;
|
|
77
|
+
mutedForeground?: string;
|
|
78
|
+
accentForeground?: string;
|
|
79
|
+
destructive?: string;
|
|
80
|
+
destructiveForeground?: string;
|
|
81
|
+
card?: string;
|
|
82
|
+
cardForeground?: string;
|
|
83
|
+
input?: string;
|
|
84
|
+
ring?: string;
|
|
85
|
+
}
|
|
86
|
+
/** Theme configuration that allows overriding light and dark properties. */
|
|
87
|
+
export interface ThemeConfig {
|
|
88
|
+
/** Light theme overrides. */
|
|
89
|
+
light?: SemanticColors;
|
|
90
|
+
/** Dark theme overrides. */
|
|
91
|
+
dark?: SemanticColors;
|
|
92
|
+
}
|
|
93
|
+
/** Props for the ThemeProvider component. */
|
|
94
|
+
export interface ThemeProviderProps {
|
|
95
|
+
/** The children to render within the provider. */
|
|
96
|
+
children: ReactNode;
|
|
97
|
+
/** The default theme mode ('light', 'dark', or 'system'). Default is 'system'. */
|
|
98
|
+
defaultTheme?: ThemeMode;
|
|
99
|
+
/** The key used to store the theme mode in localStorage. Default is 'ui-theme'. */
|
|
100
|
+
storageKey?: string;
|
|
101
|
+
/** Optional custom theme configuration to override default tokens. */
|
|
102
|
+
themeConfig?: ThemeConfig;
|
|
103
|
+
}
|
|
104
|
+
/** Context state provided by the ThemeProvider. */
|
|
105
|
+
export interface ThemeProviderState {
|
|
106
|
+
/** The currently active theme mode. */
|
|
107
|
+
theme: ThemeMode;
|
|
108
|
+
/** Function to update the theme mode. */
|
|
109
|
+
setTheme: (theme: ThemeMode) => void;
|
|
110
|
+
/** The currently active theme configuration (including overrides). */
|
|
111
|
+
themeConfig?: ThemeConfig;
|
|
112
|
+
}
|