tharaday 0.8.4 → 0.8.7
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/ds.js +74 -80
- package/dist/ds.umd.cjs +1 -1
- package/dist/{components → src/components}/Accordion/Accordion.d.ts +1 -0
- package/dist/src/components/Accordion/Accordion.stories.d.ts +14 -0
- package/dist/src/components/Accordion/Accordion.types.d.ts +18 -0
- package/dist/{components → src/components}/Avatar/Avatar.d.ts +1 -0
- package/dist/src/components/Avatar/Avatar.stories.d.ts +14 -0
- package/dist/src/components/Avatar/Avatar.types.d.ts +10 -0
- package/dist/{components → src/components}/Badge/Badge.d.ts +1 -0
- package/dist/src/components/Badge/Badge.stories.d.ts +33 -0
- package/dist/src/components/Badge/Badge.types.d.ts +10 -0
- package/dist/{components → src/components}/Box/Box.d.ts +1 -0
- package/dist/src/components/Box/Box.stories.d.ts +38 -0
- package/dist/src/components/Box/Box.types.d.ts +52 -0
- package/dist/{components → src/components}/Box/helpers/getSpacingStyles.d.ts +2 -2
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.d.ts +1 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.stories.d.ts +13 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.types.d.ts +11 -0
- package/dist/{components → src/components}/Button/Button.d.ts +1 -0
- package/dist/src/components/Button/Button.stories.d.ts +22 -0
- package/dist/src/components/Button/Button.types.d.ts +12 -0
- package/dist/{components → src/components}/Card/Card.d.ts +1 -0
- package/dist/src/components/Card/Card.stories.d.ts +27 -0
- package/dist/src/components/Card/Card.types.d.ts +16 -0
- package/dist/{components → src/components}/Checkbox/Checkbox.d.ts +1 -0
- package/dist/src/components/Checkbox/Checkbox.stories.d.ts +17 -0
- package/dist/src/components/Checkbox/Checkbox.types.d.ts +7 -0
- package/dist/{components → src/components}/DatePicker/DatePicker.d.ts +1 -0
- package/dist/src/components/DatePicker/DatePicker.stories.d.ts +15 -0
- package/dist/src/components/DatePicker/DatePicker.types.d.ts +11 -0
- package/dist/{components → src/components}/Divider/Divider.d.ts +1 -0
- package/dist/src/components/Divider/Divider.stories.d.ts +15 -0
- package/dist/src/components/Divider/Divider.types.d.ts +10 -0
- package/dist/{components → src/components}/Drawer/Drawer.d.ts +2 -1
- package/dist/src/components/Drawer/Drawer.stories.d.ts +29 -0
- package/dist/src/components/Drawer/Drawer.types.d.ts +15 -0
- package/dist/{components → src/components}/Dropdown/Dropdown.d.ts +1 -0
- package/dist/src/components/Dropdown/Dropdown.stories.d.ts +12 -0
- package/dist/src/components/Dropdown/Dropdown.types.d.ts +24 -0
- package/dist/{components → src/components}/EmptyState/EmptyState.d.ts +1 -0
- package/dist/src/components/EmptyState/EmptyState.stories.d.ts +22 -0
- package/dist/src/components/EmptyState/EmptyState.types.d.ts +10 -0
- package/dist/{components → src/components}/Header/Header.d.ts +1 -0
- package/dist/src/components/Header/Header.stories.d.ts +20 -0
- package/dist/src/components/Header/Header.types.d.ts +16 -0
- package/dist/{components → src/components}/Input/Input.d.ts +1 -0
- package/dist/src/components/Input/Input.stories.d.ts +32 -0
- package/dist/src/components/Input/Input.types.d.ts +10 -0
- package/dist/{components → src/components}/List/List.d.ts +2 -2
- package/dist/src/components/List/List.stories.d.ts +25 -0
- package/dist/{components → src/components}/List/List.types.d.ts +3 -3
- package/dist/{components → src/components}/List/ListItem.d.ts +1 -1
- package/dist/{components → src/components}/List/ListItem.types.d.ts +1 -1
- package/dist/{components → src/components}/Loader/Loader.d.ts +1 -0
- package/dist/src/components/Loader/Loader.stories.d.ts +25 -0
- package/dist/src/components/Loader/Loader.types.d.ts +8 -0
- package/dist/{components → src/components}/Modal/Modal.d.ts +2 -1
- package/dist/src/components/Modal/Modal.stories.d.ts +28 -0
- package/dist/src/components/Modal/Modal.types.d.ts +12 -0
- package/dist/{components → src/components}/NavBar/NavBar.d.ts +1 -0
- package/dist/src/components/NavBar/NavBar.stories.d.ts +8 -0
- package/dist/src/components/NavBar/NavBar.types.d.ts +38 -0
- package/dist/{components → src/components}/Notification/Notification.d.ts +1 -0
- package/dist/src/components/Notification/Notification.stories.d.ts +26 -0
- package/dist/src/components/Notification/Notification.types.d.ts +9 -0
- package/dist/{components → src/components}/Pagination/Pagination.d.ts +1 -0
- package/dist/src/components/Pagination/Pagination.stories.d.ts +21 -0
- package/dist/src/components/Pagination/Pagination.types.d.ts +34 -0
- package/dist/{components → src/components}/Popover/Popover.d.ts +1 -0
- package/dist/src/components/Popover/Popover.stories.d.ts +21 -0
- package/dist/src/components/Popover/Popover.types.d.ts +11 -0
- package/dist/{components → src/components}/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/src/components/ProgressBar/ProgressBar.stories.d.ts +32 -0
- package/dist/src/components/ProgressBar/ProgressBar.types.d.ts +12 -0
- package/dist/{components → src/components}/RadioButton/RadioButton.d.ts +1 -0
- package/dist/src/components/RadioButton/RadioButton.stories.d.ts +30 -0
- package/dist/src/components/RadioButton/RadioButton.types.d.ts +9 -0
- package/dist/{components → src/components}/Select/Select.d.ts +1 -0
- package/dist/src/components/Select/Select.stories.d.ts +32 -0
- package/dist/src/components/Select/Select.types.d.ts +23 -0
- package/dist/{components → src/components}/Skeleton/Skeleton.d.ts +1 -0
- package/dist/src/components/Skeleton/Skeleton.stories.d.ts +15 -0
- package/dist/src/components/Skeleton/Skeleton.types.d.ts +9 -0
- package/dist/{components → src/components}/Slider/Slider.d.ts +1 -0
- package/dist/src/components/Slider/Slider.stories.d.ts +23 -0
- package/dist/src/components/Slider/Slider.types.d.ts +15 -0
- package/dist/{components → src/components}/Stepper/Step.d.ts +1 -0
- package/dist/src/components/Stepper/Step.types.d.ts +18 -0
- package/dist/{components → src/components}/Stepper/Stepper.d.ts +1 -0
- package/dist/src/components/Stepper/Stepper.stories.d.ts +15 -0
- package/dist/src/components/Stepper/Stepper.types.d.ts +14 -0
- package/dist/{components → src/components}/Stepper/stepper.utils.d.ts +2 -2
- package/dist/{components → src/components}/Switch/Switch.d.ts +1 -0
- package/dist/src/components/Switch/Switch.stories.d.ts +16 -0
- package/dist/src/components/Switch/Switch.types.d.ts +6 -0
- package/dist/{components → src/components}/Table/Table.d.ts +1 -0
- package/dist/src/components/Table/Table.stories.d.ts +27 -0
- package/dist/src/components/Table/Table.types.d.ts +19 -0
- package/dist/{components → src/components}/Tabs/Tabs.d.ts +1 -0
- package/dist/src/components/Tabs/Tabs.stories.d.ts +19 -0
- package/dist/src/components/Tabs/Tabs.types.d.ts +16 -0
- package/dist/{components → src/components}/Tag/Tag.d.ts +1 -0
- package/dist/src/components/Tag/Tag.stories.d.ts +27 -0
- package/dist/src/components/Tag/Tag.types.d.ts +13 -0
- package/dist/{components → src/components}/Text/Text.d.ts +1 -0
- package/dist/src/components/Text/Text.stories.d.ts +78 -0
- package/dist/src/components/Text/Text.types.d.ts +16 -0
- package/dist/{components → src/components}/Textarea/Textarea.d.ts +1 -0
- package/dist/src/components/Textarea/Textarea.stories.d.ts +32 -0
- package/dist/src/components/Textarea/Textarea.types.d.ts +11 -0
- package/dist/{components → src/components}/Tooltip/Tooltip.d.ts +1 -0
- package/dist/src/components/Tooltip/Tooltip.stories.d.ts +10 -0
- package/dist/src/components/Tooltip/Tooltip.types.d.ts +12 -0
- package/dist/{components → src/components}/Tree/Tree.d.ts +2 -2
- package/dist/src/components/Tree/Tree.stories.d.ts +27 -0
- package/dist/{components → src/components}/Tree/Tree.types.d.ts +1 -1
- package/dist/{components → src/components}/Tree/TreeItem.d.ts +1 -1
- package/dist/{components → src/components}/Tree/TreeItem.types.d.ts +1 -1
- package/dist/{hooks → src/hooks}/useClickOutside.d.ts +1 -1
- package/dist/{hooks → src/hooks}/useComponentId.d.ts +1 -1
- package/dist/{hooks → src/hooks}/useFocusTrap.d.ts +1 -1
- package/dist/{layouts → src/layouts}/AppLayout/AppLayout.d.ts +1 -0
- package/dist/src/layouts/AppLayout/AppLayout.stories.d.ts +13 -0
- package/dist/src/layouts/AppLayout/AppLayout.types.d.ts +13 -0
- package/dist/{layouts → src/layouts}/AuthLayout/AuthLayout.d.ts +1 -0
- package/dist/src/layouts/AuthLayout/AuthLayout.stories.d.ts +12 -0
- package/dist/src/layouts/AuthLayout/AuthLayout.types.d.ts +8 -0
- package/dist/{layouts → src/layouts}/DashboardLayout/DashboardLayout.d.ts +1 -0
- package/dist/src/layouts/DashboardLayout/DashboardLayout.stories.d.ts +11 -0
- package/dist/src/layouts/DashboardLayout/DashboardLayout.types.d.ts +10 -0
- package/dist/{layouts → src/layouts}/SettingsLayout/SettingsLayout.d.ts +1 -0
- package/dist/src/layouts/SettingsLayout/SettingsLayout.stories.d.ts +11 -0
- package/dist/src/layouts/SettingsLayout/SettingsLayout.types.d.ts +9 -0
- package/package.json +27 -42
- package/src/components/Box/Box.types.ts +7 -4
- package/src/components/Drawer/Drawer.types.ts +1 -1
- package/src/components/EmptyState/EmptyState.types.ts +3 -3
- package/src/components/Header/Header.types.ts +1 -1
- package/src/components/Modal/Modal.types.ts +1 -1
- package/src/components/Notification/Notification.types.ts +2 -2
- package/src/components/Slider/Slider.test.tsx +107 -1
- package/src/components/Slider/Slider.tsx +19 -16
- package/src/components/Text/Text.types.ts +3 -48
- package/vite.config.ts +1 -1
- package/dist/components/Box/Box.types.d.ts +0 -50
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ padding, shadow, bordered, borderColor, backgroundColor, className, children, ...props }: import('./Card.types.ts').CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
padding: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
shadow: {
|
|
15
|
+
control: "select";
|
|
16
|
+
options: string[];
|
|
17
|
+
};
|
|
18
|
+
bordered: {
|
|
19
|
+
control: "boolean";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Default: Story;
|
|
26
|
+
export declare const Simple: Story;
|
|
27
|
+
export declare const BackgroundColor: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { BoxBackgroundColor, BoxBorderColor } from '../Box/Box.types.ts';
|
|
3
|
+
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
className?: string;
|
|
5
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
6
|
+
shadow?: 'none' | 'sm' | 'md';
|
|
7
|
+
bordered?: boolean;
|
|
8
|
+
borderColor?: BoxBorderColor;
|
|
9
|
+
backgroundColor?: BoxBackgroundColor;
|
|
10
|
+
}
|
|
11
|
+
export interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
subtitle?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export type CardContentProps = HTMLAttributes<HTMLDivElement>;
|
|
16
|
+
export type CardFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ label, error, helperText, className, disabled, id, ...props }: import('./Checkbox.types.ts').CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const Checked: Story;
|
|
14
|
+
export declare const WithHelperText: Story;
|
|
15
|
+
export declare const Error: Story;
|
|
16
|
+
export declare const Disabled: Story;
|
|
17
|
+
export declare const All: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ value, onChange, placeholder, disabled, min, max, id, label, className, }: import('./DatePicker.types.ts').DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithPreselectedDate: Story;
|
|
14
|
+
export declare const Disabled: Story;
|
|
15
|
+
export declare const WithMinMax: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ orientation, thickness, length, spacing, inset, className, style, ...props }: import('./Divider.types.ts').DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
orientation: "horizontal";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Horizontal: Story;
|
|
13
|
+
export declare const Inset: Story;
|
|
14
|
+
export declare const Spacing: Story;
|
|
15
|
+
export declare const Vertical: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type DividerOrientation = 'horizontal' | 'vertical';
|
|
3
|
+
export interface DividerProps extends Omit<HTMLAttributes<HTMLHRElement>, 'color'> {
|
|
4
|
+
className?: string;
|
|
5
|
+
orientation?: DividerOrientation;
|
|
6
|
+
thickness?: number | string;
|
|
7
|
+
length?: number | string;
|
|
8
|
+
spacing?: number | string;
|
|
9
|
+
inset?: number | string;
|
|
10
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { DrawerProps } from './Drawer.types.ts';
|
|
2
|
+
export declare const Drawer: ({ isOpen, onClose, title, children, footer, placement, size, isLoading, className, id, }: DrawerProps) => import('react').ReactPortal | null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ isOpen, onClose, title, children, footer, placement, size, isLoading, className, id, }: import('./Drawer.types.ts').DrawerProps) => import('react').ReactPortal | null;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
placement: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
control: "select";
|
|
16
|
+
options: string[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
args: {
|
|
20
|
+
isOpen: false;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
export declare const Right: Story;
|
|
27
|
+
export declare const Left: Story;
|
|
28
|
+
export declare const WithFooter: Story;
|
|
29
|
+
export declare const Small: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|
|
3
|
+
export type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
4
|
+
export interface DrawerProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
footer?: ReactNode;
|
|
10
|
+
placement?: DrawerPlacement;
|
|
11
|
+
size?: DrawerSize;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Dropdown } from './Dropdown.tsx';
|
|
3
|
+
declare const meta: Meta<typeof Dropdown>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Dropdown>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const WithValue: Story;
|
|
9
|
+
export declare const Error: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
11
|
+
export declare const Sizes: Story;
|
|
12
|
+
export declare const FullWidth: Story;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type DropdownSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface DropdownOption {
|
|
4
|
+
value: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DropdownProps {
|
|
11
|
+
options: DropdownOption[];
|
|
12
|
+
value?: string | number;
|
|
13
|
+
defaultValue?: string | number;
|
|
14
|
+
onChange?: (value: string | number) => void;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
label?: string;
|
|
17
|
+
helperText?: string;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
size?: DropdownSize;
|
|
21
|
+
className?: string;
|
|
22
|
+
id?: string;
|
|
23
|
+
fullWidth?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ title, description, icon, action, size, className, ...props }: import('./EmptyState.types.ts').EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Default: Story;
|
|
19
|
+
export declare const WithIcon: Story;
|
|
20
|
+
export declare const WithAction: Story;
|
|
21
|
+
export declare const Small: Story;
|
|
22
|
+
export declare const Large: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type EmptyStateSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
action?: ReactNode;
|
|
8
|
+
size?: EmptyStateSize;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ id, logo, title, user, onLogin, onLogout, onCreateAccount, className, maxWidth, }: import('./Header.types.ts').HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
args: {
|
|
10
|
+
onLogin: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
11
|
+
onLogout: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
12
|
+
onCreateAccount: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const LoggedIn: Story;
|
|
18
|
+
export declare const LoggedOut: Story;
|
|
19
|
+
export declare const LoggedOutWithoutActions: Story;
|
|
20
|
+
export declare const LongContent: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type User = {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
export interface HeaderProps {
|
|
6
|
+
id?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
maxWidth?: string | number;
|
|
9
|
+
logo?: ReactNode;
|
|
10
|
+
title?: ReactNode;
|
|
11
|
+
user?: User;
|
|
12
|
+
onLogin?: () => void;
|
|
13
|
+
onLogout?: () => void;
|
|
14
|
+
onCreateAccount?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ size, error, label, helperText, fullWidth, className, id, ...props }: import('./Input.types.ts').InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
error: {
|
|
15
|
+
control: "boolean";
|
|
16
|
+
};
|
|
17
|
+
disabled: {
|
|
18
|
+
control: "boolean";
|
|
19
|
+
};
|
|
20
|
+
fullWidth: {
|
|
21
|
+
control: "boolean";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
export declare const Default: Story;
|
|
28
|
+
export declare const WithError: Story;
|
|
29
|
+
export declare const Disabled: Story;
|
|
30
|
+
export declare const Small: Story;
|
|
31
|
+
export declare const Large: Story;
|
|
32
|
+
export declare const All: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export type InputSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4
|
+
className?: string;
|
|
5
|
+
size?: InputSize;
|
|
6
|
+
error?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
helperText?: string;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ListProps } from './List.types';
|
|
2
2
|
export declare const List: {
|
|
3
3
|
({ children, variant, spacing, className, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, style, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
Item: ({ children, icon, className, ...props }: import(
|
|
4
|
+
Item: ({ children, icon, className, ...props }: import('./ListItem.types').ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
({ children, variant, spacing, className, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, style, ...props }: import('./List.types').ListProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Item: ({ children, icon, className, ...props }: import('./ListItem.types').ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {
|
|
10
|
+
variant: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
spacing: {
|
|
15
|
+
control: "number";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const Unordered: Story;
|
|
22
|
+
export declare const Ordered: Story;
|
|
23
|
+
export declare const Spacing: Story;
|
|
24
|
+
export declare const WithIcons: Story;
|
|
25
|
+
export declare const Nested: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { BoxMargin, BoxPadding } from '../Box/Box.types';
|
|
3
|
+
export type ListVariant = 'unordered' | 'ordered' | 'none';
|
|
4
4
|
export interface ListProps extends HTMLAttributes<HTMLUListElement | HTMLOListElement> {
|
|
5
5
|
/** The content of the list, usually ListItem components */
|
|
6
6
|
children: ReactNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ListItemProps } from './ListItem.types';
|
|
2
2
|
export declare const ListItem: ({ children, icon, className, ...props }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ id, size, intent, className }: import('./Loader.types.ts').LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
intent: {
|
|
15
|
+
control: "select";
|
|
16
|
+
options: string[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const Default: Story;
|
|
23
|
+
export declare const Intents: Story;
|
|
24
|
+
export declare const Sizes: Story;
|
|
25
|
+
export declare const All: Story;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ModalProps } from './Modal.types.ts';
|
|
2
|
+
export declare const Modal: ({ isOpen, onClose, title, children, footer, size, isLoading, className, id, }: ModalProps) => import('react').ReactPortal | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ isOpen, onClose, title, children, footer, size, isLoading, className, id, }: import('./Modal.types.ts').ModalProps) => import('react').ReactPortal | null;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
argTypes: {
|
|
15
|
+
size: {
|
|
16
|
+
control: "select";
|
|
17
|
+
options: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
args: {
|
|
21
|
+
onClose: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
export declare const Default: Story;
|
|
27
|
+
export declare const Large: Story;
|
|
28
|
+
export declare const WithForm: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
footer?: ReactNode;
|
|
9
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { NavBar } from './NavBar.tsx';
|
|
3
|
+
declare const meta: Meta<typeof NavBar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof NavBar>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithActions: Story;
|
|
8
|
+
export declare const Simple: Story;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface NavBarItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
href?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface NavBarProps {
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The list of navigation items
|
|
12
|
+
*/
|
|
13
|
+
items: NavBarItem[];
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the currently active item
|
|
16
|
+
*/
|
|
17
|
+
activeId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional logo or branding element
|
|
20
|
+
*/
|
|
21
|
+
logo?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Optional elements to show on the right side (e.g., user menu, search)
|
|
24
|
+
*/
|
|
25
|
+
actions?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Callback fired when an item is clicked
|
|
28
|
+
*/
|
|
29
|
+
onItemClick?: (id: string, item: NavBarItem) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Additional class names
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Optional max width for the container
|
|
36
|
+
*/
|
|
37
|
+
maxWidth?: string | number;
|
|
38
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ intent, title, children, onClose, className, ...props }: import('./Notification.types.ts').NotificationProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
intent: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
args: {
|
|
16
|
+
onClose: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const Info: Story;
|
|
22
|
+
export declare const Success: Story;
|
|
23
|
+
export declare const Warning: Story;
|
|
24
|
+
export declare const Danger: Story;
|
|
25
|
+
export declare const Neutral: Story;
|
|
26
|
+
export declare const All: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type NotificationIntent = 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
|
+
export interface NotificationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
4
|
+
className?: string;
|
|
5
|
+
intent?: NotificationIntent;
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
import { PaginationProps } from './Pagination.types.ts';
|
|
1
2
|
export declare const Pagination: ({ id, count, page, defaultPage, onPageChange, onFirstClick, onLastClick, onNextClick, onPrevClick, siblingCount, boundaryCount, showFirstLast, showPrevNext, showEllipsis, disabled, size, variant, intent, activeVariant, activeIntent, labels, ariaLabel, getPageLabel, className, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ id, count, page, defaultPage, onPageChange, onFirstClick, onLastClick, onNextClick, onPrevClick, siblingCount, boundaryCount, showFirstLast, showPrevNext, showEllipsis, disabled, size, variant, intent, activeVariant, activeIntent, labels, ariaLabel, getPageLabel, className, }: import('./Pagination.types.ts').PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const Compact: Story;
|
|
14
|
+
export declare const Minimal: Story;
|
|
15
|
+
export declare const WithEllipsis: Story;
|
|
16
|
+
export declare const FirstPage: Story;
|
|
17
|
+
export declare const LastPage: Story;
|
|
18
|
+
export declare const Disabled: Story;
|
|
19
|
+
export declare const CustomLabels: Story;
|
|
20
|
+
export declare const VariantIntent: Story;
|
|
21
|
+
export declare const WithActions: Story;
|