reaxify 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +30 -0
  2. package/dist/axios/AxiosProvider.d.ts +13 -0
  3. package/dist/axios/index.d.ts +2 -0
  4. package/dist/axios/useAxios.d.ts +11 -0
  5. package/dist/components/Accordion/index.d.ts +27 -0
  6. package/dist/components/Accordion/index.stories.d.ts +6 -0
  7. package/dist/components/Badge/index.d.ts +11 -0
  8. package/dist/components/Badge/index.stories.d.ts +7 -0
  9. package/dist/components/Box/index.d.ts +3 -0
  10. package/dist/components/Box/index.stories.d.ts +5 -0
  11. package/dist/components/Button/index.d.ts +14 -0
  12. package/dist/components/Button/index.stories.d.ts +8 -0
  13. package/dist/components/ButtonGroup/index.d.ts +12 -0
  14. package/dist/components/ButtonGroup/index.stories.d.ts +9 -0
  15. package/dist/components/Card/index.d.ts +12 -0
  16. package/dist/components/Card/index.stories.d.ts +5 -0
  17. package/dist/components/Drawer/index.d.ts +33 -0
  18. package/dist/components/Drawer/index.stories.d.ts +6 -0
  19. package/dist/components/Form/index.d.ts +13 -0
  20. package/dist/components/Form/index.stories.d.ts +5 -0
  21. package/dist/components/InputGroup/index.d.ts +14 -0
  22. package/dist/components/InputGroup/index.stories.d.ts +5 -0
  23. package/dist/components/Menu/index.d.ts +15 -0
  24. package/dist/components/Menu/index.stories.d.ts +7 -0
  25. package/dist/components/Modal/index.d.ts +32 -0
  26. package/dist/components/Modal/index.stories.d.ts +5 -0
  27. package/dist/components/Portal/index.d.ts +2 -0
  28. package/dist/components/Progress/index.d.ts +10 -0
  29. package/dist/components/Progress/index.stories.d.ts +5 -0
  30. package/dist/components/Skeleton/index.d.ts +4 -0
  31. package/dist/components/Skeleton/index.stories.d.ts +5 -0
  32. package/dist/components/Stack/index.d.ts +9 -0
  33. package/dist/components/Stack/index.stories.d.ts +7 -0
  34. package/dist/components/Table/index.d.ts +39 -0
  35. package/dist/components/Table/index.stories.d.ts +5 -0
  36. package/dist/components/Tabs/index.d.ts +31 -0
  37. package/dist/components/Tabs/index.stories.d.ts +5 -0
  38. package/dist/components/Typography/index.d.ts +8 -0
  39. package/dist/components/Typography/index.stories.d.ts +5 -0
  40. package/dist/components/index.d.ts +17 -0
  41. package/dist/helpers/cn.d.ts +3 -0
  42. package/dist/helpers/copy.d.ts +1 -0
  43. package/dist/helpers/index.d.ts +10 -0
  44. package/dist/helpers/index.stories.d.ts +11 -0
  45. package/dist/helpers/isEmpty.d.ts +5 -0
  46. package/dist/helpers/isServer.d.ts +1 -0
  47. package/dist/helpers/matrixArray.d.ts +1 -0
  48. package/dist/helpers/randomID.d.ts +1 -0
  49. package/dist/helpers/replaceNonDigits.d.ts +1 -0
  50. package/dist/helpers/replacePersianNumbers.d.ts +1 -0
  51. package/dist/helpers/twoDigitNumber.d.ts +1 -0
  52. package/dist/helpers/wait.d.ts +1 -0
  53. package/dist/hooks/index.d.ts +10 -0
  54. package/dist/hooks/index.stories.d.ts +9 -0
  55. package/dist/hooks/useAutoFill.d.ts +2 -0
  56. package/dist/hooks/useCreateRipple.d.ts +2 -0
  57. package/dist/hooks/useDebounce.d.ts +2 -0
  58. package/dist/hooks/useDocumentVisible.d.ts +1 -0
  59. package/dist/hooks/useIsOffline.d.ts +1 -0
  60. package/dist/hooks/useKeyDown.d.ts +1 -0
  61. package/dist/hooks/useMouse.d.ts +1 -0
  62. package/dist/hooks/useOutsideClick.d.ts +4 -0
  63. package/dist/hooks/usePersistedState.d.ts +3 -0
  64. package/dist/hooks/useToggle.d.ts +1 -0
  65. package/dist/index.cjs.js +73 -0
  66. package/dist/index.cjs.js.map +1 -0
  67. package/dist/index.d.ts +5 -0
  68. package/dist/index.es.js +10717 -0
  69. package/dist/index.es.js.map +1 -0
  70. package/dist/providers/ThemeProvider.d.ts +4 -0
  71. package/dist/providers/index.d.ts +1 -0
  72. package/dist/style.css +1 -0
  73. package/dist/types/index.d.ts +23 -0
  74. package/package.json +70 -0
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
+
14
+ - Configure the top-level `parserOptions` property like this:
15
+
16
+ ```js
17
+ export default {
18
+ // other rules...
19
+ parserOptions: {
20
+ ecmaVersion: 'latest',
21
+ sourceType: 'module',
22
+ project: ['./tsconfig.json', './tsconfig.node.json'],
23
+ tsconfigRootDir: __dirname,
24
+ },
25
+ }
26
+ ```
27
+
28
+ - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29
+ - Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30
+ - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
@@ -0,0 +1,13 @@
1
+ import { ChildrenProps } from '../types';
2
+ import { AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from 'axios';
3
+ type Callback<T> = (input: T) => T | Promise<T>;
4
+ type BaseProps = {
5
+ config: CreateAxiosDefaults;
6
+ beforeRequest: Callback<InternalAxiosRequestConfig>[];
7
+ afterResponse: Callback<AxiosResponse>[];
8
+ afterError: Callback<any>[];
9
+ };
10
+ type Props = Partial<BaseProps> & ChildrenProps;
11
+ export declare const AxiosContext: import('react').Context<BaseProps>;
12
+ export default function AxiosProvider({ config, beforeRequest, afterResponse, afterError, children, }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as AxiosProvider } from './AxiosProvider';
2
+ export { default as useAxios } from './useAxios';
@@ -0,0 +1,11 @@
1
+ import { AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from 'axios';
2
+ type Error = any;
3
+ type Callback<T> = (input: T) => T | Promise<T>;
4
+ type Config = null | {
5
+ config?: CreateAxiosDefaults;
6
+ beforeRequest?: Callback<InternalAxiosRequestConfig>[];
7
+ afterResponse?: Callback<AxiosResponse>[];
8
+ afterError?: Callback<Error>[];
9
+ };
10
+ export default function useAxios(axiosConfig?: Config): readonly [import('axios').AxiosInstance, boolean, any];
11
+ export {};
@@ -0,0 +1,27 @@
1
+ import { ChildrenProps, ComponentPropsWithAs } from '../../types';
2
+ import { ComponentProps, Dispatch, ElementType } from 'react';
3
+ type EventKey = string;
4
+ type AccordionProps<T extends EventKey> = {
5
+ activeKey?: null | T | T[];
6
+ onChange?: Dispatch<EventKey>;
7
+ };
8
+ type AccordionItemProps = {
9
+ eventKey?: null | EventKey;
10
+ };
11
+ type AccordionCollapseProps = {
12
+ duration?: number;
13
+ } & ChildrenProps;
14
+ declare function Accordion<T extends EventKey = "string">({ activeKey, onChange, children, }: ChildrenProps & AccordionProps<T>): import("react/jsx-runtime").JSX.Element;
15
+ declare namespace Accordion {
16
+ var Item: typeof AccordionItem;
17
+ var Toggle: typeof AccordionToggle;
18
+ var Icon: typeof AccordionIcon;
19
+ var Collapse: typeof AccordionCollapse;
20
+ var Body: typeof AccordionBody;
21
+ }
22
+ declare function AccordionItem<E extends ElementType = "div">({ as, eventKey: initEventKey, className, children, ...props }: ComponentPropsWithAs<E, AccordionItemProps>): import("react/jsx-runtime").JSX.Element;
23
+ declare function AccordionToggle({ type, className, children, onClick, ...props }: ComponentProps<"button">): import("react/jsx-runtime").JSX.Element;
24
+ declare function AccordionIcon({ className, ...props }: Omit<ComponentProps<"svg">, "ref" | "children">): import("react/jsx-runtime").JSX.Element;
25
+ declare function AccordionCollapse({ duration, children, }: AccordionCollapseProps): import("react/jsx-runtime").JSX.Element;
26
+ declare function AccordionBody({ className, children, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
27
+ export default Accordion;
@@ -0,0 +1,6 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Accordion } from '.';
3
+ declare const meta: Meta<typeof Accordion>;
4
+ export declare function Single(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Multiple(): import("react/jsx-runtime").JSX.Element;
6
+ export default meta;
@@ -0,0 +1,11 @@
1
+ import { Color, ComponentPropsWithAs } from '../../types';
2
+ import { ElementType } from 'react';
3
+ type Variant = "solid" | "outline" | "soft";
4
+ type Size = "sm" | "md" | "lg";
5
+ type BadgeProps = {
6
+ variant?: Variant;
7
+ color?: Color | null;
8
+ size?: Size;
9
+ };
10
+ export default function Badge<E extends ElementType = "span">({ as, variant, color, size, className, children, ...props }: ComponentPropsWithAs<E, BadgeProps>): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Badge } from '.';
3
+ declare const meta: Meta<typeof Badge>;
4
+ export declare function Colors(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Variants(): import("react/jsx-runtime").JSX.Element;
6
+ export declare function Sizes(): import("react/jsx-runtime").JSX.Element;
7
+ export default meta;
@@ -0,0 +1,3 @@
1
+ import { ComponentPropsWithAs } from '../../types';
2
+ import { ElementType } from 'react';
3
+ export default function Box<E extends ElementType = "div">({ as, ...props }: ComponentPropsWithAs<E>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Box } from '.';
3
+ declare const meta: Meta<typeof Box>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,14 @@
1
+ import { Color, ComponentPropsWithAs, Size } from '../../types';
2
+ import { ElementType } from 'react';
3
+ type Variant = "solid" | "outline" | "text";
4
+ export type ButtonProps = {
5
+ variant?: Variant;
6
+ color?: Color | null;
7
+ size?: Size;
8
+ loading?: boolean;
9
+ stopPropagation?: boolean;
10
+ closeModal?: boolean;
11
+ closeDrawer?: boolean;
12
+ };
13
+ export default function Button<E extends ElementType = "button">({ as, variant: initVariant, color: initColor, size: initSize, loading: initLoading, stopPropagation, closeModal, closeDrawer, className, onClick, children, ...props }: ComponentPropsWithAs<E, ButtonProps>): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Button } from '.';
3
+ declare const meta: Meta<typeof Button>;
4
+ export declare function Colors(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Variants(): import("react/jsx-runtime").JSX.Element;
6
+ export declare function Sizes(): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Loading(): import("react/jsx-runtime").JSX.Element;
8
+ export default meta;
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithAs } from '../../types';
2
+ import { ElementType } from 'react';
3
+ import { ButtonProps } from '../Button';
4
+ type ButtonGroupProps = {
5
+ orientation?: "vertical" | "horizontal";
6
+ } & ButtonProps;
7
+ type Context = {
8
+ buttonClasses?: string;
9
+ } & ButtonProps;
10
+ export declare const ButtonGroupContext: import('react').Context<Context>;
11
+ export default function ButtonGroup<E extends ElementType = "div">({ as, variant, color, size, loading, orientation, className, children, ...props }: ComponentPropsWithAs<E, ButtonGroupProps>): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as ButtonGroup } from '.';
3
+ declare const meta: Meta<typeof ButtonGroup>;
4
+ export declare function Colors(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Variants(): import("react/jsx-runtime").JSX.Element;
6
+ export declare function Sizes(): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Loading(): import("react/jsx-runtime").JSX.Element;
8
+ export declare function Orientations(): import("react/jsx-runtime").JSX.Element;
9
+ export default meta;
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithAs } from '../../types';
2
+ import { ComponentProps, ElementType } from 'react';
3
+ declare function Card<E extends ElementType = "div">({ as, className, children, ...props }: ComponentPropsWithAs<E>): import("react/jsx-runtime").JSX.Element;
4
+ declare namespace Card {
5
+ var Header: typeof CardHeader;
6
+ var Body: typeof CardBody;
7
+ var Footer: typeof CardFooter;
8
+ }
9
+ declare function CardHeader({ className, children, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ declare function CardBody({ className, children, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ declare function CardFooter({ className, children, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
12
+ export default Card;
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Card } from '.';
3
+ declare const meta: Meta<typeof Card>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,33 @@
1
+ import { Callback, ComponentPropsWithAs, ToggleProps } from '../../types';
2
+ import { ComponentProps, ElementType } from 'react';
3
+ import { TransitionStatus } from 'react-transition-group';
4
+ type Anchor = "start" | "end" | "top" | "bottom";
5
+ type Context = {
6
+ open: boolean;
7
+ onClose: Callback;
8
+ duration: number;
9
+ anchor: Anchor;
10
+ transitionState: TransitionStatus;
11
+ };
12
+ type DrawerBaseProps = {
13
+ anchor?: Anchor;
14
+ duration?: number;
15
+ } & ToggleProps;
16
+ type DrawerProps<E extends ElementType> = ComponentPropsWithAs<E, DrawerBaseProps>;
17
+ type DrawerMenuProps = Omit<ComponentProps<"div">, "as" | "ref">;
18
+ type DrawerHeaderProps = ComponentProps<"div">;
19
+ type DrawerBodyProps = ComponentProps<"div">;
20
+ type DrawerFooterProps = ComponentProps<"div">;
21
+ export declare const DrawerContext: import('react').Context<Context>;
22
+ declare function Drawer<E extends ElementType = "div">({ as, open, onClose, duration, anchor, className, children, ...props }: DrawerProps<E>): import("react/jsx-runtime").JSX.Element;
23
+ declare namespace Drawer {
24
+ var Menu: typeof DrawerMenu;
25
+ var Header: typeof DrawerHeader;
26
+ var Body: typeof DrawerBody;
27
+ var Footer: typeof DrawerFooter;
28
+ }
29
+ declare function DrawerMenu({ children, className, ...props }: DrawerMenuProps): import("react/jsx-runtime").JSX.Element;
30
+ declare function DrawerHeader(props: DrawerHeaderProps): import("react/jsx-runtime").JSX.Element;
31
+ declare function DrawerBody({ className, ...props }: DrawerBodyProps): import("react/jsx-runtime").JSX.Element;
32
+ declare function DrawerFooter(props: DrawerFooterProps): import("react/jsx-runtime").JSX.Element;
33
+ export default Drawer;
@@ -0,0 +1,6 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Drawer } from '.';
3
+ declare const meta: Meta<typeof Drawer>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Anchor(): import("react/jsx-runtime").JSX.Element;
6
+ export default meta;
@@ -0,0 +1,13 @@
1
+ import { ComponentProps } from 'react';
2
+ type FormProps = ComponentProps<"form"> & {
3
+ disabled?: boolean;
4
+ };
5
+ type Callback = () => boolean;
6
+ type FormContextType = {
7
+ setFormControl?: (key: string, callback: Callback) => void;
8
+ removeFormControl?: (key: string) => void;
9
+ formDisabled?: boolean;
10
+ };
11
+ export declare const FormContext: import('react').Context<FormContextType>;
12
+ export default function Form({ disabled, onSubmit, onError, children, ...props }: FormProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Form } from '.';
3
+ declare const meta: Meta<typeof Form>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,14 @@
1
+ import { ComponentPropsWithAs } from '../../types';
2
+ import { ElementType } from 'react';
3
+ declare function InputGroup<E extends ElementType = "div">({ as, children, className, ...props }: ComponentPropsWithAs<E>): import("react/jsx-runtime").JSX.Element;
4
+ declare namespace InputGroup {
5
+ var Label: typeof InputGroupLabel;
6
+ var Stack: typeof InputGroupStack;
7
+ var Text: typeof InputGroupText;
8
+ var FormControl: typeof InputGroupFormControl;
9
+ }
10
+ declare function InputGroupLabel<E extends ElementType = "h6">({ as, children, className, ...props }: ComponentPropsWithAs<E>): import("react/jsx-runtime").JSX.Element;
11
+ declare function InputGroupStack<E extends ElementType = "div">({ as, children, className, ...props }: ComponentPropsWithAs<E>): import("react/jsx-runtime").JSX.Element;
12
+ declare function InputGroupText<E extends ElementType = "span">({ as, children, className, ...props }: ComponentPropsWithAs<E>): import("react/jsx-runtime").JSX.Element;
13
+ declare function InputGroupFormControl<E extends ElementType = "input">({ as, children, className, ...props }: ComponentPropsWithAs<E>): import("react/jsx-runtime").JSX.Element;
14
+ export default InputGroup;
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as InputGroup } from '.';
3
+ declare const meta: Meta<typeof InputGroup>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,15 @@
1
+ import { ElementType } from 'react';
2
+ import { ComponentPropsWithAs, ToggleProps } from '../../types';
3
+ type MenuProps = ToggleProps & {
4
+ anchorEl?: HTMLElement | null;
5
+ closeOnClick?: boolean;
6
+ };
7
+ type MenuItemProps = {
8
+ closeOnClick?: boolean;
9
+ };
10
+ declare function Menu<E extends ElementType = "div">({ as, open, onClose, closeOnClick, anchorEl, className, children, ...props }: ComponentPropsWithAs<E, MenuProps>): import("react/jsx-runtime").JSX.Element;
11
+ declare namespace Menu {
12
+ var Item: typeof MenuItem;
13
+ }
14
+ declare function MenuItem<E extends ElementType = "button">({ as, closeOnClick: itemCloseOnClick, type, className, children, onClick, ...props }: ComponentPropsWithAs<E, MenuItemProps>): import("react/jsx-runtime").JSX.Element;
15
+ export default Menu;
@@ -0,0 +1,7 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Menu } from '.';
3
+ declare const meta: Meta<typeof Menu>;
4
+ export declare function Dropdown(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function CloseOnClick(): import("react/jsx-runtime").JSX.Element;
6
+ export declare function CloseOnClickOneItem(): import("react/jsx-runtime").JSX.Element;
7
+ export default meta;
@@ -0,0 +1,32 @@
1
+ import { Callback, ComponentPropsWithAs, ToggleProps } from '../../types';
2
+ import { ComponentProps, ElementType } from 'react';
3
+ import { TransitionStatus } from 'react-transition-group';
4
+ type Size = "sm" | "md" | "lg";
5
+ type Context = {
6
+ size: Size;
7
+ open: boolean;
8
+ onClose: Callback;
9
+ transitionState: TransitionStatus;
10
+ duration: number;
11
+ };
12
+ type ModalProps = {
13
+ size?: Size;
14
+ duration?: number;
15
+ } & ToggleProps;
16
+ type ModalDialogProps = Omit<ComponentProps<"div">, "as" | "ref">;
17
+ type ModalHeaderProps = ComponentProps<"div">;
18
+ type ModalBodyProps = ComponentProps<"div">;
19
+ type ModalFooterProps = ComponentProps<"div">;
20
+ export declare const ModalContext: import('react').Context<Context>;
21
+ declare function Modal<E extends ElementType = "div">({ as, size, open, onClose, duration, className, children, ...props }: ComponentPropsWithAs<E, ModalProps>): import("react/jsx-runtime").JSX.Element;
22
+ declare namespace Modal {
23
+ var Dialog: typeof ModalDialog;
24
+ var Header: typeof ModalHeader;
25
+ var Body: typeof ModalBody;
26
+ var Footer: typeof ModalFooter;
27
+ }
28
+ declare function ModalDialog({ className, children, ...props }: ModalDialogProps): import("react/jsx-runtime").JSX.Element;
29
+ declare function ModalHeader(props: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
30
+ declare function ModalBody(props: ModalBodyProps): import("react/jsx-runtime").JSX.Element;
31
+ declare function ModalFooter(props: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
32
+ export default Modal;
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Modal } from '.';
3
+ declare const meta: Meta<typeof Modal>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,2 @@
1
+ import { ChildrenProps } from '../../types';
2
+ export declare function Portal({ children }: ChildrenProps): import('react').ReactPortal;
@@ -0,0 +1,10 @@
1
+ import { Color } from '../../types';
2
+ import { ComponentProps } from 'react';
3
+ type BaseProgressProps = {
4
+ color?: Color | null;
5
+ value: number;
6
+ children?: never;
7
+ };
8
+ type ProgressProps = BaseProgressProps & Omit<ComponentProps<"div">, keyof BaseProgressProps>;
9
+ export default function Progress({ color, value, className, ...props }: ProgressProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Progress } from '.';
3
+ declare const meta: Meta<typeof Progress>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from 'react';
2
+ type SkeletonProps = ComponentProps<"div">;
3
+ export default function Skeleton({ className, children, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
4
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Skeleton } from '.';
3
+ declare const meta: Meta<typeof Skeleton>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,9 @@
1
+ import { ComponentPropsWithAs } from '../../types';
2
+ import { ElementType } from 'react';
3
+ type Variants = "vertical" | "horizontal";
4
+ type StackProps = {
5
+ variant?: Variants;
6
+ wrap?: boolean;
7
+ };
8
+ export default function Stack<E extends ElementType = "div">({ as, variant, wrap, className, children, ...props }: ComponentPropsWithAs<E, StackProps>): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Stack } from '.';
3
+ declare const meta: Meta<typeof Stack>;
4
+ export declare function Horizontal(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Vertical(): import("react/jsx-runtime").JSX.Element;
6
+ export declare function Wrap(): import("react/jsx-runtime").JSX.Element;
7
+ export default meta;
@@ -0,0 +1,39 @@
1
+ import { ComponentProps } from 'react';
2
+ type Bordered = boolean | "dashed" | "solid";
3
+ type TableContainerProps = ComponentProps<"div">;
4
+ type BaseTableProps = {
5
+ striped?: boolean;
6
+ bordered?: Bordered;
7
+ hover?: boolean;
8
+ };
9
+ type TableProps = BaseTableProps & Omit<ComponentProps<"table">, keyof BaseTableProps>;
10
+ type BaseTableHeaderProps = {
11
+ sticky?: boolean;
12
+ };
13
+ type TableHeaderProps = BaseTableHeaderProps & Omit<ComponentProps<"thead">, keyof BaseTableHeaderProps>;
14
+ type TableBodyProps = ComponentProps<"tbody">;
15
+ type TableRowProps = ComponentProps<"tr">;
16
+ type BaseTableHeaderCellProps = {
17
+ sticky?: boolean;
18
+ };
19
+ type TableHeaderCellProps = BaseTableHeaderCellProps & Omit<ComponentProps<"th">, keyof BaseTableHeaderCellProps>;
20
+ type BaseTableDataCellProps = {
21
+ sticky?: boolean;
22
+ };
23
+ type TableDataCellProps = BaseTableDataCellProps & Omit<ComponentProps<"td">, keyof BaseTableDataCellProps>;
24
+ declare function TableContainer({ className, children, ...props }: TableContainerProps): import("react/jsx-runtime").JSX.Element;
25
+ declare function Table({ striped, bordered, hover, className, children, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
26
+ declare namespace Table {
27
+ var Container: typeof TableContainer;
28
+ var Header: typeof TableHeader;
29
+ var Body: typeof TableBody;
30
+ var Row: typeof TableRow;
31
+ var HeaderCell: typeof TableHeaderCell;
32
+ var DataCell: typeof TableDataCell;
33
+ }
34
+ declare function TableHeader({ sticky, className, children, ...props }: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
35
+ declare function TableBody({ className, children, ...props }: TableBodyProps): import("react/jsx-runtime").JSX.Element;
36
+ declare function TableRow({ className, children, ...props }: TableRowProps): import("react/jsx-runtime").JSX.Element;
37
+ declare function TableHeaderCell({ sticky, className, children, ...props }: TableHeaderCellProps): import("react/jsx-runtime").JSX.Element;
38
+ declare function TableDataCell({ sticky, className, children, ...props }: TableDataCellProps): import("react/jsx-runtime").JSX.Element;
39
+ export default Table;
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Table } from '.';
3
+ declare const meta: Meta<typeof Table>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,31 @@
1
+ import { ChildrenProps } from '../../types';
2
+ import { ComponentProps, Dispatch } from 'react';
3
+ import { default as Button } from '../Button';
4
+ type TabsProps = {
5
+ active?: null | string;
6
+ onChange?: Dispatch<string>;
7
+ } & ChildrenProps;
8
+ type TabButtonProps = {
9
+ eventKey: string;
10
+ type?: never;
11
+ ref?: never;
12
+ };
13
+ type TabItemProps = {
14
+ eventKey: string;
15
+ } & ChildrenProps;
16
+ type TabsContextType = {
17
+ active: null | string;
18
+ onChange: Dispatch<string>;
19
+ buttonGroupClasses: string;
20
+ };
21
+ export declare const TabsContext: import('react').Context<TabsContextType>;
22
+ declare function Tabs({ active, onChange, children }: TabsProps): import("react/jsx-runtime").JSX.Element;
23
+ declare namespace Tabs {
24
+ var Indicator: typeof TabIndicator;
25
+ var Button: typeof TabButton;
26
+ var Item: typeof TabItem;
27
+ }
28
+ declare function TabIndicator({ className, ...props }: Omit<ComponentProps<"span">, "children">): import("react/jsx-runtime").JSX.Element;
29
+ declare function TabButton({ eventKey, className, children, onClick, ...props }: TabButtonProps & Omit<ComponentProps<typeof Button<"button">>, keyof TabButtonProps>): import("react/jsx-runtime").JSX.Element;
30
+ declare function TabItem({ eventKey, children }: TabItemProps): import("react/jsx-runtime").JSX.Element | null;
31
+ export default Tabs;
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Tabs } from '.';
3
+ declare const meta: Meta<typeof Tabs>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,8 @@
1
+ import { ComponentPropsWithAs } from '../../types';
2
+ type Component = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label";
3
+ type Variant = "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "body-1" | "body-2";
4
+ type TypographyProps = {
5
+ variant?: Variant;
6
+ };
7
+ export default function Typography<E extends Component = "p">({ as, variant, className, ...props }: ComponentPropsWithAs<E, TypographyProps>): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { default as Typography } from '.';
3
+ declare const meta: Meta<typeof Typography>;
4
+ export declare function Default(): import("react/jsx-runtime").JSX.Element;
5
+ export default meta;
@@ -0,0 +1,17 @@
1
+ export { default as Accordion } from './Accordion';
2
+ export { default as Badge } from './Badge';
3
+ export { default as Box } from './Box';
4
+ export { default as Button } from './Button';
5
+ export { default as ButtonGroup } from './ButtonGroup';
6
+ export { default as Card } from './Card';
7
+ export { default as Drawer } from './Drawer';
8
+ export { default as Form } from './Form';
9
+ export { default as Menu } from './Menu';
10
+ export { default as Modal } from './Modal';
11
+ export { Portal } from './Portal';
12
+ export { default as Progress } from './Progress';
13
+ export { default as Skeleton } from './Skeleton';
14
+ export { default as Stack } from './Stack';
15
+ export { default as Table } from './Table';
16
+ export { default as Tabs } from './Tabs';
17
+ export { default as Typography } from './Typography';
@@ -0,0 +1,3 @@
1
+ type Classes = string | null | undefined | false;
2
+ export default function cn(...classes: Classes[]): string | undefined;
3
+ export {};
@@ -0,0 +1 @@
1
+ export default function copy(str: string): Promise<boolean>;
@@ -0,0 +1,10 @@
1
+ export { default as cn } from './cn';
2
+ export { default as copy } from './copy';
3
+ export { isEmpty, isEmptyArray, isEmptyObject, isEmptyString, isEmptyValue, } from './isEmpty';
4
+ export { default as isServer } from './isServer';
5
+ export { default as matrixArray } from './matrixArray';
6
+ export { default as randomID } from './randomID';
7
+ export { default as replaceNonDigits } from './replaceNonDigits';
8
+ export { default as replacePersianNumbers } from './replacePersianNumbers';
9
+ export { default as twoDigitNumber } from './twoDigitNumber';
10
+ export { default as wait } from './wait';
@@ -0,0 +1,11 @@
1
+ import { Meta } from '@storybook/react';
2
+ declare const meta: Meta;
3
+ export declare function ClassName(): import("react/jsx-runtime").JSX.Element;
4
+ export declare function Copy(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function IsEmpty(): import("react/jsx-runtime").JSX.Element;
6
+ export declare function MatrixArray(): import("react/jsx-runtime").JSX.Element;
7
+ export declare function RandomID(): import("react/jsx-runtime").JSX.Element;
8
+ export declare function ReplaceNonDigits(): import("react/jsx-runtime").JSX.Element;
9
+ export declare function TwoDigitNumber(): import("react/jsx-runtime").JSX.Element;
10
+ export declare function Wait(): import("react/jsx-runtime").JSX.Element;
11
+ export default meta;
@@ -0,0 +1,5 @@
1
+ export declare function isEmpty(value: unknown): boolean;
2
+ export declare function isEmptyValue(value: unknown): value is null | undefined;
3
+ export declare function isEmptyString(value: unknown): value is "";
4
+ export declare function isEmptyObject(value: unknown): boolean;
5
+ export declare function isEmptyArray(value: unknown): boolean;
@@ -0,0 +1 @@
1
+ export default function isServer(): boolean;
@@ -0,0 +1 @@
1
+ export default function matrixArray<T>(arr: T[], perSubArray?: number): T[][];
@@ -0,0 +1 @@
1
+ export default function randomID(): string;
@@ -0,0 +1 @@
1
+ export default function replaceNonDigits(str: string): string;
@@ -0,0 +1 @@
1
+ export default function replacePersianNumbers(str: string): string;
@@ -0,0 +1 @@
1
+ export default function twoDigitNumber(num: number): string;
@@ -0,0 +1 @@
1
+ export default function wait(ms: number): Promise<unknown>;
@@ -0,0 +1,10 @@
1
+ export { default as useAutoFill } from './useAutoFill';
2
+ export { default as useCreateRipple } from './useCreateRipple';
3
+ export { default as useDebounce } from './useDebounce';
4
+ export { default as useDocumentVisible } from './useDocumentVisible';
5
+ export { default as useIsOffline } from './useIsOffline';
6
+ export { default as useKeyDown } from './useKeyDown';
7
+ export { default as useMouse } from './useMouse';
8
+ export { default as useOutsideClick } from './useOutsideClick';
9
+ export { default as usePersistedState } from './usePersistedState';
10
+ export { default as useToggle } from './useToggle';