tharaday 0.1.1
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/.gitignore +30 -0
- package/.prettierrc.json +10 -0
- package/.storybook/main.ts +8 -0
- package/.storybook/preview.ts +50 -0
- package/.versionrc.json +6 -0
- package/README.md +73 -0
- package/dist/components/Accordion/Accordion.d.ts +2 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +14 -0
- package/dist/components/Accordion/Accordion.types.d.ts +18 -0
- package/dist/components/Avatar/Avatar.d.ts +2 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +14 -0
- package/dist/components/Avatar/Avatar.types.d.ts +10 -0
- package/dist/components/Badge/Badge.d.ts +2 -0
- package/dist/components/Badge/Badge.stories.d.ts +33 -0
- package/dist/components/Badge/Badge.types.d.ts +9 -0
- package/dist/components/Box/Box.d.ts +2 -0
- package/dist/components/Box/Box.stories.d.ts +38 -0
- package/dist/components/Box/Box.types.d.ts +49 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +13 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +11 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.stories.d.ts +22 -0
- package/dist/components/Button/Button.types.d.ts +12 -0
- package/dist/components/Card/Card.d.ts +5 -0
- package/dist/components/Card/Card.stories.d.ts +27 -0
- package/dist/components/Card/Card.types.d.ts +15 -0
- package/dist/components/Checkbox/Checkbox.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +17 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +6 -0
- package/dist/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.stories.d.ts +12 -0
- package/dist/components/Dropdown/Dropdown.types.d.ts +24 -0
- package/dist/components/Header/Header.d.ts +2 -0
- package/dist/components/Header/Header.stories.d.ts +18 -0
- package/dist/components/Header/Header.types.d.ts +14 -0
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.stories.d.ts +29 -0
- package/dist/components/Input/Input.types.d.ts +8 -0
- package/dist/components/Loader/Loader.d.ts +2 -0
- package/dist/components/Loader/Loader.stories.d.ts +25 -0
- package/dist/components/Loader/Loader.types.d.ts +8 -0
- package/dist/components/Modal/Modal.d.ts +2 -0
- package/dist/components/Modal/Modal.stories.d.ts +22 -0
- package/dist/components/Modal/Modal.types.d.ts +12 -0
- package/dist/components/NavBar/NavBar.d.ts +6 -0
- package/dist/components/NavBar/NavBar.stories.d.ts +8 -0
- package/dist/components/NavBar/NavBar.types.d.ts +34 -0
- package/dist/components/Notification/Notification.d.ts +2 -0
- package/dist/components/Notification/Notification.stories.d.ts +26 -0
- package/dist/components/Notification/Notification.types.d.ts +8 -0
- package/dist/components/Pagination/Pagination.d.ts +2 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +21 -0
- package/dist/components/Pagination/Pagination.types.d.ts +34 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts +32 -0
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +12 -0
- package/dist/components/RadioButton/RadioButton.d.ts +2 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +30 -0
- package/dist/components/RadioButton/RadioButton.types.d.ts +8 -0
- package/dist/components/Select/Select.d.ts +2 -0
- package/dist/components/Select/Select.stories.d.ts +29 -0
- package/dist/components/Select/Select.types.d.ts +15 -0
- package/dist/components/Skeleton/Skeleton.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.stories.d.ts +15 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +8 -0
- package/dist/components/Stepper/Step.d.ts +2 -0
- package/dist/components/Stepper/Step.types.d.ts +17 -0
- package/dist/components/Stepper/Stepper.d.ts +2 -0
- package/dist/components/Stepper/Stepper.stories.d.ts +15 -0
- package/dist/components/Stepper/Stepper.types.d.ts +13 -0
- package/dist/components/Stepper/stepper.utils.d.ts +3 -0
- package/dist/components/Switch/Switch.d.ts +2 -0
- package/dist/components/Switch/Switch.stories.d.ts +16 -0
- package/dist/components/Switch/Switch.types.d.ts +5 -0
- package/dist/components/Table/Table.d.ts +8 -0
- package/dist/components/Table/Table.stories.d.ts +27 -0
- package/dist/components/Table/Table.types.d.ts +17 -0
- package/dist/components/Tabs/Tabs.d.ts +2 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
- package/dist/components/Tabs/Tabs.types.d.ts +16 -0
- package/dist/components/Text/Text.d.ts +2 -0
- package/dist/components/Text/Text.stories.d.ts +35 -0
- package/dist/components/Text/Text.types.d.ts +21 -0
- package/dist/components/Textarea/Textarea.d.ts +2 -0
- package/dist/components/Textarea/Textarea.stories.d.ts +29 -0
- package/dist/components/Textarea/Textarea.types.d.ts +9 -0
- package/dist/components/Tooltip/Tooltip.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +10 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +12 -0
- package/dist/ds.css +1 -0
- package/dist/ds.js +1930 -0
- package/dist/ds.umd.cjs +1 -0
- package/dist/index.d.ts +63 -0
- package/dist/layouts/AppLayout/AppLayout.d.ts +8 -0
- package/dist/layouts/AppLayout/AppLayout.stories.d.ts +19 -0
- package/dist/layouts/AppLayout/AppLayout.types.d.ts +50 -0
- package/dist/layouts/AuthLayout/AuthLayout.d.ts +2 -0
- package/dist/layouts/AuthLayout/AuthLayout.stories.d.ts +12 -0
- package/dist/layouts/AuthLayout/AuthLayout.types.d.ts +7 -0
- package/dist/layouts/DashboardLayout/DashboardLayout.d.ts +2 -0
- package/dist/layouts/DashboardLayout/DashboardLayout.stories.d.ts +17 -0
- package/dist/layouts/DashboardLayout/DashboardLayout.types.d.ts +15 -0
- package/dist/layouts/SettingsLayout/SettingsLayout.d.ts +2 -0
- package/dist/layouts/SettingsLayout/SettingsLayout.stories.d.ts +17 -0
- package/dist/layouts/SettingsLayout/SettingsLayout.types.d.ts +14 -0
- package/eslint.config.js +45 -0
- package/package.json +100 -0
- package/src/components/Accordion/Accordion.module.css +158 -0
- package/src/components/Accordion/Accordion.stories.tsx +133 -0
- package/src/components/Accordion/Accordion.tsx +68 -0
- package/src/components/Accordion/Accordion.types.ts +21 -0
- package/src/components/Avatar/Avatar.module.css +58 -0
- package/src/components/Avatar/Avatar.stories.tsx +41 -0
- package/src/components/Avatar/Avatar.tsx +64 -0
- package/src/components/Avatar/Avatar.types.ts +12 -0
- package/src/components/Badge/Badge.module.css +98 -0
- package/src/components/Badge/Badge.stories.tsx +108 -0
- package/src/components/Badge/Badge.tsx +22 -0
- package/src/components/Badge/Badge.types.ts +11 -0
- package/src/components/Box/Box.module.css +638 -0
- package/src/components/Box/Box.stories.tsx +109 -0
- package/src/components/Box/Box.tsx +95 -0
- package/src/components/Box/Box.types.ts +65 -0
- package/src/components/Breadcrumbs/Breadcrumbs.module.css +41 -0
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +40 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +54 -0
- package/src/components/Breadcrumbs/Breadcrumbs.types.ts +13 -0
- package/src/components/Button/Button.module.css +247 -0
- package/src/components/Button/Button.stories.tsx +93 -0
- package/src/components/Button/Button.tsx +31 -0
- package/src/components/Button/Button.types.ts +14 -0
- package/src/components/Card/Card.module.css +112 -0
- package/src/components/Card/Card.stories.tsx +86 -0
- package/src/components/Card/Card.tsx +70 -0
- package/src/components/Card/Card.types.ts +20 -0
- package/src/components/Checkbox/Checkbox.module.css +88 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +65 -0
- package/src/components/Checkbox/Checkbox.tsx +57 -0
- package/src/components/Checkbox/Checkbox.types.ts +7 -0
- package/src/components/Dropdown/Dropdown.module.css +140 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +86 -0
- package/src/components/Dropdown/Dropdown.tsx +251 -0
- package/src/components/Dropdown/Dropdown.types.ts +27 -0
- package/src/components/Header/Header.module.css +38 -0
- package/src/components/Header/Header.stories.tsx +53 -0
- package/src/components/Header/Header.tsx +49 -0
- package/src/components/Header/Header.types.ts +15 -0
- package/src/components/Input/Input.module.css +87 -0
- package/src/components/Input/Input.stories.tsx +101 -0
- package/src/components/Input/Input.tsx +41 -0
- package/src/components/Input/Input.types.ts +10 -0
- package/src/components/Loader/Loader.module.css +49 -0
- package/src/components/Loader/Loader.stories.tsx +75 -0
- package/src/components/Loader/Loader.tsx +15 -0
- package/src/components/Loader/Loader.types.ts +9 -0
- package/src/components/Modal/Modal.module.css +88 -0
- package/src/components/Modal/Modal.stories.tsx +94 -0
- package/src/components/Modal/Modal.tsx +115 -0
- package/src/components/Modal/Modal.types.ts +13 -0
- package/src/components/NavBar/NavBar.module.css +77 -0
- package/src/components/NavBar/NavBar.stories.tsx +55 -0
- package/src/components/NavBar/NavBar.tsx +50 -0
- package/src/components/NavBar/NavBar.types.ts +36 -0
- package/src/components/Notification/Notification.module.css +72 -0
- package/src/components/Notification/Notification.stories.tsx +81 -0
- package/src/components/Notification/Notification.tsx +34 -0
- package/src/components/Notification/Notification.types.ts +10 -0
- package/src/components/Pagination/Pagination.module.css +31 -0
- package/src/components/Pagination/Pagination.stories.tsx +128 -0
- package/src/components/Pagination/Pagination.tsx +245 -0
- package/src/components/Pagination/Pagination.types.ts +37 -0
- package/src/components/ProgressBar/ProgressBar.module.css +67 -0
- package/src/components/ProgressBar/ProgressBar.stories.tsx +91 -0
- package/src/components/ProgressBar/ProgressBar.tsx +49 -0
- package/src/components/ProgressBar/ProgressBar.types.ts +13 -0
- package/src/components/RadioButton/RadioButton.module.css +162 -0
- package/src/components/RadioButton/RadioButton.stories.tsx +114 -0
- package/src/components/RadioButton/RadioButton.tsx +43 -0
- package/src/components/RadioButton/RadioButton.types.ts +10 -0
- package/src/components/Select/Select.module.css +88 -0
- package/src/components/Select/Select.stories.tsx +99 -0
- package/src/components/Select/Select.tsx +51 -0
- package/src/components/Select/Select.types.ts +18 -0
- package/src/components/Skeleton/Skeleton.module.css +71 -0
- package/src/components/Skeleton/Skeleton.stories.tsx +54 -0
- package/src/components/Skeleton/Skeleton.tsx +32 -0
- package/src/components/Skeleton/Skeleton.types.ts +10 -0
- package/src/components/Stepper/Step.module.css +162 -0
- package/src/components/Stepper/Step.tsx +62 -0
- package/src/components/Stepper/Step.types.ts +19 -0
- package/src/components/Stepper/Stepper.module.css +39 -0
- package/src/components/Stepper/Stepper.stories.tsx +88 -0
- package/src/components/Stepper/Stepper.tsx +47 -0
- package/src/components/Stepper/Stepper.types.ts +16 -0
- package/src/components/Stepper/stepper.utils.ts +41 -0
- package/src/components/Switch/Switch.module.css +74 -0
- package/src/components/Switch/Switch.stories.tsx +56 -0
- package/src/components/Switch/Switch.tsx +36 -0
- package/src/components/Switch/Switch.types.ts +6 -0
- package/src/components/Table/Table.module.css +78 -0
- package/src/components/Table/Table.stories.tsx +124 -0
- package/src/components/Table/Table.tsx +75 -0
- package/src/components/Table/Table.types.ts +29 -0
- package/src/components/Tabs/Tabs.module.css +74 -0
- package/src/components/Tabs/Tabs.stories.tsx +48 -0
- package/src/components/Tabs/Tabs.tsx +113 -0
- package/src/components/Tabs/Tabs.types.ts +18 -0
- package/src/components/Text/Text.module.css +126 -0
- package/src/components/Text/Text.stories.tsx +128 -0
- package/src/components/Text/Text.tsx +50 -0
- package/src/components/Text/Text.types.ts +43 -0
- package/src/components/Textarea/Textarea.module.css +82 -0
- package/src/components/Textarea/Textarea.stories.tsx +99 -0
- package/src/components/Textarea/Textarea.tsx +43 -0
- package/src/components/Textarea/Textarea.types.ts +11 -0
- package/src/components/Tooltip/Tooltip.module.css +125 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +68 -0
- package/src/components/Tooltip/Tooltip.tsx +87 -0
- package/src/components/Tooltip/Tooltip.types.ts +14 -0
- package/src/index.ts +132 -0
- package/src/layouts/AppLayout/AppLayout.module.css +17 -0
- package/src/layouts/AppLayout/AppLayout.stories.tsx +124 -0
- package/src/layouts/AppLayout/AppLayout.tsx +46 -0
- package/src/layouts/AppLayout/AppLayout.types.ts +50 -0
- package/src/layouts/AuthLayout/AuthLayout.module.css +49 -0
- package/src/layouts/AuthLayout/AuthLayout.stories.tsx +109 -0
- package/src/layouts/AuthLayout/AuthLayout.tsx +27 -0
- package/src/layouts/AuthLayout/AuthLayout.types.tsx +8 -0
- package/src/layouts/DashboardLayout/DashboardLayout.module.css +37 -0
- package/src/layouts/DashboardLayout/DashboardLayout.stories.tsx +144 -0
- package/src/layouts/DashboardLayout/DashboardLayout.tsx +41 -0
- package/src/layouts/DashboardLayout/DashboardLayout.types.tsx +14 -0
- package/src/layouts/SettingsLayout/SettingsLayout.module.css +39 -0
- package/src/layouts/SettingsLayout/SettingsLayout.stories.tsx +103 -0
- package/src/layouts/SettingsLayout/SettingsLayout.tsx +37 -0
- package/src/layouts/SettingsLayout/SettingsLayout.types.tsx +13 -0
- package/src/styles/ds.css +12 -0
- package/src/styles/semantic.css +56 -0
- package/src/styles/themes/dark.css +58 -0
- package/src/styles/themes/light.css +58 -0
- package/src/styles/themes/retro.css +58 -0
- package/src/styles/tokens.css +138 -0
- package/tsconfig.app.json +28 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +26 -0
- package/vite.config.ts +33 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ size, error, label, helperText, 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
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Default: Story;
|
|
25
|
+
export declare const WithError: Story;
|
|
26
|
+
export declare const Disabled: Story;
|
|
27
|
+
export declare const Small: Story;
|
|
28
|
+
export declare const Large: Story;
|
|
29
|
+
export declare const All: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export type InputSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4
|
+
size?: InputSize;
|
|
5
|
+
error?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
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 Default: Story;
|
|
22
|
+
export declare const Large: 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?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
footer?: ReactNode;
|
|
9
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NavBarProps } from './NavBar.types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* NavBar is a navigation component typically used for application-wide navigation.
|
|
4
|
+
* It differs from Header as it focuses on navigational links rather than just branding and user actions.
|
|
5
|
+
*/
|
|
6
|
+
export declare const NavBar: ({ id, items, activeId, logo, actions, onItemClick, className, }: NavBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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,34 @@
|
|
|
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) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Additional class names
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type NotificationIntent = 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
|
+
export interface NotificationProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
intent?: NotificationIntent;
|
|
5
|
+
title?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { PaginationProps } from './Pagination.types.ts';
|
|
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;
|
|
@@ -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,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 = '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,8 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export type RadioButtonSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface RadioButtonProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4
|
+
size?: RadioButtonSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
error?: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ size, error, label, helperText, 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
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Default: Story;
|
|
25
|
+
export declare const WithError: Story;
|
|
26
|
+
export declare const Disabled: Story;
|
|
27
|
+
export declare const Small: Story;
|
|
28
|
+
export declare const Large: Story;
|
|
29
|
+
export declare const Gallery: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SelectHTMLAttributes, ReactNode } 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
|
+
export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
9
|
+
size?: SelectSize;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
helperText?: string;
|
|
13
|
+
options?: SelectOption[];
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type SkeletonVariant = 'text' | 'circular' | 'rectangular' | 'rounded';
|
|
3
|
+
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
variant?: SkeletonVariant;
|
|
5
|
+
width?: string | number;
|
|
6
|
+
height?: string | number;
|
|
7
|
+
animation?: 'pulse' | 'wave' | 'none';
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
step: StepOptions;
|
|
11
|
+
index: number;
|
|
12
|
+
status: StepperStatus;
|
|
13
|
+
isInteractive: boolean;
|
|
14
|
+
onStepClick?: (step: StepOptions, index: number) => void;
|
|
15
|
+
isLast: boolean;
|
|
16
|
+
id?: string;
|
|
17
|
+
}
|
|
@@ -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,13 @@
|
|
|
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
|
+
steps: StepOptions[];
|
|
7
|
+
currentStep?: number | string;
|
|
8
|
+
orientation?: StepperOrientation;
|
|
9
|
+
size?: StepperSize;
|
|
10
|
+
onStepClick?: (step: StepOptions, index: number) => void;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { StepperStatus, StepOptions } from './Step.types.ts';
|
|
2
|
+
export declare const resolveCurrentIndex: (currentStep: number | string | undefined, steps: StepOptions[]) => number;
|
|
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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TableProps, TableHeaderProps, TableBodyProps, TableFooterProps, TableRowProps, TableHeadProps, TableCellProps } from './Table.types.ts';
|
|
2
|
+
export declare const Table: ({ children, className, striped, hoverable, dense, isLoading, ...props }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const TableHeader: ({ children, className, ...props }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const TableBody: ({ children, className, ...props }: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const TableFooter: ({ children, className, ...props }: TableFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const TableRow: ({ children, className, ...props }: TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const TableHead: ({ children, className, align, ...props }: TableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const TableCell: ({ children, className, align, ...props }: TableCellProps) => 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, ...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,17 @@
|
|
|
1
|
+
import { HTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
|
+
export interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
3
|
+
striped?: boolean;
|
|
4
|
+
hoverable?: boolean;
|
|
5
|
+
dense?: boolean;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
9
|
+
export type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
10
|
+
export type TableFooterProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
11
|
+
export type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
|
|
12
|
+
export interface TableHeadProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
13
|
+
align?: 'left' | 'center' | 'right' | 'justify' | 'char';
|
|
14
|
+
}
|
|
15
|
+
export interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
|
|
16
|
+
align?: 'left' | 'center' | 'right' | 'justify' | 'char';
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Line: Story;
|
|
13
|
+
export declare const Pill: Story;
|
|
14
|
+
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
|
+
}
|