tharaday 0.8.5 → 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 +26 -41
- 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,34 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonIntent, ButtonSize, ButtonVariant } from '../Button/Button.types.ts';
|
|
3
|
+
export interface PaginationLabels {
|
|
4
|
+
first?: ReactNode;
|
|
5
|
+
last?: ReactNode;
|
|
6
|
+
next?: ReactNode;
|
|
7
|
+
prev?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface PaginationProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
count: number;
|
|
12
|
+
page?: number;
|
|
13
|
+
defaultPage?: number;
|
|
14
|
+
onPageChange?: (page: number) => void;
|
|
15
|
+
onFirstClick?: (page: number) => void;
|
|
16
|
+
onLastClick?: (page: number) => void;
|
|
17
|
+
onNextClick?: (page: number) => void;
|
|
18
|
+
onPrevClick?: (page: number) => void;
|
|
19
|
+
siblingCount?: number;
|
|
20
|
+
boundaryCount?: number;
|
|
21
|
+
showFirstLast?: boolean;
|
|
22
|
+
showPrevNext?: boolean;
|
|
23
|
+
showEllipsis?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
size?: ButtonSize;
|
|
26
|
+
variant?: ButtonVariant;
|
|
27
|
+
intent?: ButtonIntent;
|
|
28
|
+
activeVariant?: ButtonVariant;
|
|
29
|
+
activeIntent?: ButtonIntent;
|
|
30
|
+
labels?: PaginationLabels;
|
|
31
|
+
ariaLabel?: string;
|
|
32
|
+
getPageLabel?: (page: number, isCurrent: boolean) => string;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ trigger, children, placement, isOpen: controlledOpen, onOpenChange, className, id, }: import('./Popover.types.ts').PopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
placement: {
|
|
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 Top: Story;
|
|
20
|
+
export declare const Right: Story;
|
|
21
|
+
export declare const WithActions: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export interface PopoverProps {
|
|
4
|
+
trigger: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
placement?: PopoverPlacement;
|
|
7
|
+
isOpen?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ value, max, size, intent, showLabel, label, className, id, }: import('./ProgressBar.types.ts').ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
value: {
|
|
11
|
+
control: {
|
|
12
|
+
type: "range";
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
size: {
|
|
18
|
+
control: "select";
|
|
19
|
+
options: string[];
|
|
20
|
+
};
|
|
21
|
+
intent: {
|
|
22
|
+
control: "select";
|
|
23
|
+
options: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
29
|
+
export declare const Default: Story;
|
|
30
|
+
export declare const Intents: Story;
|
|
31
|
+
export declare const Sizes: Story;
|
|
32
|
+
export declare const All: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ProgressBarSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export type ProgressBarIntent = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
3
|
+
export interface ProgressBarProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
value: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
size?: ProgressBarSize;
|
|
8
|
+
intent?: ProgressBarIntent;
|
|
9
|
+
showLabel?: boolean;
|
|
10
|
+
label?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ size, label, helperText, error, className, id, ...props }: import('./RadioButton.types.ts').RadioButtonProps) => 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
|
+
disabled: {
|
|
15
|
+
control: "boolean";
|
|
16
|
+
};
|
|
17
|
+
error: {
|
|
18
|
+
control: "boolean";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Default: Story;
|
|
25
|
+
export declare const Group: Story;
|
|
26
|
+
export declare const Sizes: Story;
|
|
27
|
+
export declare const WithHelperText: Story;
|
|
28
|
+
export declare const Error: Story;
|
|
29
|
+
export declare const Disabled: Story;
|
|
30
|
+
export declare const Gallery: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export type RadioButtonSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface RadioButtonProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4
|
+
className?: string;
|
|
5
|
+
size?: RadioButtonSize;
|
|
6
|
+
label?: string;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
error?: boolean;
|
|
9
|
+
}
|
|
@@ -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, options, children, ...props }: import('./Select.types.ts').SelectProps) => 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 Gallery: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode, SelectHTMLAttributes } from 'react';
|
|
2
|
+
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
type SelectBaseProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> & {
|
|
9
|
+
className?: string;
|
|
10
|
+
size?: SelectSize;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
helperText?: string;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type SelectProps = (SelectBaseProps & {
|
|
17
|
+
options: SelectOption[];
|
|
18
|
+
children?: never;
|
|
19
|
+
}) | (SelectBaseProps & {
|
|
20
|
+
options?: never;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
});
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ variant, width, height, animation, className, style, "aria-hidden": ariaHidden, ...props }: import('./Skeleton.types.ts').SkeletonProps) => 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 Rectangular: Story;
|
|
13
|
+
export declare const Circular: Story;
|
|
14
|
+
export declare const Text: Story;
|
|
15
|
+
export declare const Combined: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type SkeletonVariant = 'text' | 'circular' | 'rectangular' | 'rounded';
|
|
3
|
+
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
className?: string;
|
|
5
|
+
variant?: SkeletonVariant;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
height?: string | number;
|
|
8
|
+
animation?: 'pulse' | 'wave' | 'none';
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ size, label, helperText, fullWidth, showValue, showInputs, className, id, value, defaultValue, onValueChange, ...props }: import('./Slider.types.ts').SliderProps) => 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 Disabled: Story;
|
|
20
|
+
export declare const Sizes: Story;
|
|
21
|
+
export declare const FullWidth: Story;
|
|
22
|
+
export declare const DualValue: Story;
|
|
23
|
+
export declare const WithInputs: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export type SliderSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type SliderValue = number | [number, number];
|
|
4
|
+
export interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'value' | 'defaultValue' | 'onChange'> {
|
|
5
|
+
className?: string;
|
|
6
|
+
size?: SliderSize;
|
|
7
|
+
label?: string;
|
|
8
|
+
helperText?: string;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
showValue?: boolean;
|
|
11
|
+
showInputs?: boolean;
|
|
12
|
+
value?: SliderValue;
|
|
13
|
+
defaultValue?: SliderValue;
|
|
14
|
+
onValueChange?: (value: SliderValue) => void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type StepperStatus = 'completed' | 'current' | 'upcoming' | 'error';
|
|
2
|
+
export interface StepOptions {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
status?: StepperStatus;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface StepProps {
|
|
10
|
+
className?: string;
|
|
11
|
+
step: StepOptions;
|
|
12
|
+
index: number;
|
|
13
|
+
status: StepperStatus;
|
|
14
|
+
isInteractive: boolean;
|
|
15
|
+
onStepClick?: (step: StepOptions, index: number) => void;
|
|
16
|
+
isLast: boolean;
|
|
17
|
+
id?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ steps, currentStep, orientation, size, onStepClick, ariaLabel, className, id, ...props }: import('./Stepper.types.ts').StepperProps) => 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 Vertical: Story;
|
|
14
|
+
export declare const WithStatuses: Story;
|
|
15
|
+
export declare const Clickable: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { StepOptions } from './Step.types.ts';
|
|
3
|
+
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
4
|
+
export type StepperSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface StepperProps extends HTMLAttributes<HTMLOListElement> {
|
|
6
|
+
className?: string;
|
|
7
|
+
steps: StepOptions[];
|
|
8
|
+
currentStep?: number | string;
|
|
9
|
+
orientation?: StepperOrientation;
|
|
10
|
+
size?: StepperSize;
|
|
11
|
+
onStepClick?: (step: StepOptions, index: number) => void;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
id?: string;
|
|
14
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StepOptions, StepperStatus } from './Step.types.ts';
|
|
2
2
|
export declare const resolveCurrentIndex: (currentStep: number | string | undefined, steps: StepOptions[]) => number;
|
|
3
|
-
export declare const getStepStatus: (index: number, currentIndex: number, stepStatus?:
|
|
3
|
+
export declare const getStepStatus: (index: number, currentIndex: number, stepStatus?: StepperStatus) => StepperStatus;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ label, helperText, className, disabled, id, ...props }: import('./Switch.types.ts').SwitchProps) => 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 Disabled: Story;
|
|
16
|
+
export declare const All: Story;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TableBodyProps, TableCellProps, TableFooterProps, TableHeaderProps, TableHeadProps, TableProps, TableRowProps } from './Table.types.ts';
|
|
1
2
|
export declare const Table: ({ children, className, striped, hoverable, dense, isLoading, caption, ...props }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
3
|
export declare const TableHeader: ({ children, className, ...props }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export declare const TableBody: ({ children, className, ...props }: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ children, className, striped, hoverable, dense, isLoading, caption, ...props }: import('./Table.types.ts').TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
striped: {
|
|
11
|
+
control: "boolean";
|
|
12
|
+
};
|
|
13
|
+
hoverable: {
|
|
14
|
+
control: "boolean";
|
|
15
|
+
};
|
|
16
|
+
dense: {
|
|
17
|
+
control: "boolean";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export declare const Default: Story;
|
|
24
|
+
export declare const Striped: Story;
|
|
25
|
+
export declare const Hoverable: Story;
|
|
26
|
+
export declare const Dense: Story;
|
|
27
|
+
export declare const TanStackTableExample: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
|
+
export interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
3
|
+
className?: string;
|
|
4
|
+
striped?: boolean;
|
|
5
|
+
hoverable?: boolean;
|
|
6
|
+
dense?: boolean;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
caption?: string;
|
|
9
|
+
}
|
|
10
|
+
export type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
11
|
+
export type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
12
|
+
export type TableFooterProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
13
|
+
export type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
|
|
14
|
+
export interface TableHeadProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
15
|
+
align?: 'left' | 'center' | 'right' | 'justify' | 'char';
|
|
16
|
+
}
|
|
17
|
+
export interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
|
|
18
|
+
align?: 'left' | 'center' | 'right' | 'justify' | 'char';
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ items, defaultActiveId, activeId: controlledActiveId, onChange, className, variant, id, }: import('./Tabs.types.ts').TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Line: Story;
|
|
18
|
+
export declare const Pill: Story;
|
|
19
|
+
export declare const WithDisabled: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface TabsProps {
|
|
9
|
+
id?: string;
|
|
10
|
+
items: TabItem[];
|
|
11
|
+
defaultActiveId?: string;
|
|
12
|
+
activeId?: string;
|
|
13
|
+
onChange?: (id: string) => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
variant?: 'line' | 'pill';
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ label, intent, size, onRemove, onClick, icon, disabled, className, ...props }: import('./Tag.types.ts').TagProps) => 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
|
+
size: {
|
|
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 Dismissible: Story;
|
|
24
|
+
export declare const Clickable: Story;
|
|
25
|
+
export declare const WithIcon: Story;
|
|
26
|
+
export declare const Disabled: Story;
|
|
27
|
+
export declare const Gallery: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type TagIntent = 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
|
+
export type TagSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'onClick'> {
|
|
5
|
+
label: string;
|
|
6
|
+
intent?: TagIntent;
|
|
7
|
+
size?: TagSize;
|
|
8
|
+
onRemove?: () => void;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
import { TextProps } from './Text.types.ts';
|
|
1
2
|
export declare const Text: ({ children, variant, as, align, weight, color, noWrap, className, style, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ children, variant, as, align, weight, color, noWrap, className, style, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, ...props }: import('./Text.types.ts').TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
argTypes: {
|
|
7
|
+
variant: {
|
|
8
|
+
control: "select";
|
|
9
|
+
options: string[];
|
|
10
|
+
};
|
|
11
|
+
align: {
|
|
12
|
+
control: "select";
|
|
13
|
+
options: string[];
|
|
14
|
+
};
|
|
15
|
+
weight: {
|
|
16
|
+
control: "select";
|
|
17
|
+
options: string[];
|
|
18
|
+
};
|
|
19
|
+
color: {
|
|
20
|
+
control: "select";
|
|
21
|
+
options: string[];
|
|
22
|
+
};
|
|
23
|
+
as: {
|
|
24
|
+
control: "text";
|
|
25
|
+
};
|
|
26
|
+
margin: {
|
|
27
|
+
control: "number";
|
|
28
|
+
};
|
|
29
|
+
marginX: {
|
|
30
|
+
control: "number";
|
|
31
|
+
};
|
|
32
|
+
marginY: {
|
|
33
|
+
control: "number";
|
|
34
|
+
};
|
|
35
|
+
marginTop: {
|
|
36
|
+
control: "number";
|
|
37
|
+
};
|
|
38
|
+
marginBottom: {
|
|
39
|
+
control: "number";
|
|
40
|
+
};
|
|
41
|
+
marginLeft: {
|
|
42
|
+
control: "number";
|
|
43
|
+
};
|
|
44
|
+
marginRight: {
|
|
45
|
+
control: "number";
|
|
46
|
+
};
|
|
47
|
+
padding: {
|
|
48
|
+
control: "number";
|
|
49
|
+
};
|
|
50
|
+
paddingX: {
|
|
51
|
+
control: "number";
|
|
52
|
+
};
|
|
53
|
+
paddingY: {
|
|
54
|
+
control: "number";
|
|
55
|
+
};
|
|
56
|
+
paddingTop: {
|
|
57
|
+
control: "number";
|
|
58
|
+
};
|
|
59
|
+
paddingBottom: {
|
|
60
|
+
control: "number";
|
|
61
|
+
};
|
|
62
|
+
paddingLeft: {
|
|
63
|
+
control: "number";
|
|
64
|
+
};
|
|
65
|
+
paddingRight: {
|
|
66
|
+
control: "number";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export default meta;
|
|
71
|
+
type Story = StoryObj<typeof meta>;
|
|
72
|
+
export declare const Default: Story;
|
|
73
|
+
export declare const Spacing: Story;
|
|
74
|
+
export declare const Headings: Story;
|
|
75
|
+
export declare const Body: Story;
|
|
76
|
+
export declare const Other: Story;
|
|
77
|
+
export declare const Colors: Story;
|
|
78
|
+
export declare const NoWrap: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { SpacingProps } from '../Box/Box.types.ts';
|
|
3
|
+
export type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-lg' | 'body-md' | 'body-sm' | 'label' | 'code';
|
|
4
|
+
export type TextAlign = 'left' | 'center' | 'right' | 'justify';
|
|
5
|
+
export type FontWeight = 'regular' | 'medium' | 'bold';
|
|
6
|
+
export type TextColor = 'main' | 'subtle' | 'on-brand' | 'danger' | 'success' | 'warning' | 'info';
|
|
7
|
+
export interface TextProps extends HTMLAttributes<HTMLElement>, SpacingProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
variant?: TextVariant;
|
|
11
|
+
as?: ElementType;
|
|
12
|
+
align?: TextAlign;
|
|
13
|
+
weight?: FontWeight;
|
|
14
|
+
color?: TextColor;
|
|
15
|
+
noWrap?: boolean;
|
|
16
|
+
}
|