reaxify 0.0.84 → 0.0.86
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/components/Alert/index.cjs.js +1 -0
- package/dist/components/Alert/index.es.js +8 -0
- package/dist/components/Badge/index.cjs.js +1 -1
- package/dist/components/Badge/index.es.js +36 -36
- package/dist/components/Button/index.cjs.js +1 -1
- package/dist/components/Button/index.es.js +75 -57
- package/dist/components/Drawer/index.cjs.js +1 -1
- package/dist/components/Drawer/index.es.js +75 -71
- package/dist/components/Menu/index.cjs.js +1 -1
- package/dist/components/Menu/index.es.js +91 -88
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.es.js +76 -69
- package/dist/components/Progress/index.cjs.js +1 -1
- package/dist/components/Progress/index.es.js +21 -21
- package/dist/components/Spacer/index.cjs.js +1 -1
- package/dist/components/Spacer/index.es.js +13 -7
- package/dist/components/Stack/index.cjs.js +1 -1
- package/dist/components/Stack/index.es.js +28 -28
- package/dist/components/Switch/index.cjs.js +1 -1
- package/dist/components/Switch/index.es.js +1 -1
- package/dist/components/Tabs/index.cjs.js +1 -1
- package/dist/components/Tabs/index.es.js +9 -9
- package/dist/helpers/scrollIntoView.cjs.js +1 -1
- package/dist/helpers/scrollIntoView.es.js +4 -3
- package/dist/hooks/index.cjs.js +1 -1
- package/dist/hooks/index.es.js +6 -8
- package/dist/node_modules/@tanstack/hotkeys/dist/constants.cjs.js +1 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/constants.es.js +206 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/format.cjs.js +1 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/format.es.js +10 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/hotkey-manager.cjs.js +1 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/hotkey-manager.es.js +276 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/manager.utils.cjs.js +1 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/manager.utils.es.js +48 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/match.cjs.js +1 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/match.es.js +27 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/parse.cjs.js +1 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/parse.es.js +72 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/HotkeysProvider.cjs.js +1 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/HotkeysProvider.es.js +10 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js +1 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js +35 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/utils.cjs.js +1 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/utils.es.js +7 -0
- package/dist/node_modules/@tanstack/store/dist/esm/alien.cjs.js +1 -0
- package/dist/node_modules/@tanstack/store/dist/esm/alien.es.js +129 -0
- package/dist/node_modules/@tanstack/store/dist/esm/atom.cjs.js +1 -0
- package/dist/node_modules/@tanstack/store/dist/esm/atom.es.js +124 -0
- package/dist/node_modules/@tanstack/store/dist/esm/store.cjs.js +1 -0
- package/dist/node_modules/@tanstack/store/dist/esm/store.es.js +24 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.cjs.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.es.js +2 -2
- package/dist/node_modules/react-transition-group/esm/Transition.cjs.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.es.js +2 -2
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.es.js +745 -553
- package/dist/reaxify.css +1 -1
- package/dist/{axios → src/axios}/AxiosProvider.d.ts +1 -1
- package/dist/{components → src/components}/Accordion/index.d.ts +1 -1
- package/dist/src/components/Alert/index.d.ts +26 -0
- package/dist/{components → src/components}/Badge/index.d.ts +1 -1
- package/dist/{components → src/components}/Button/index.d.ts +3 -3
- package/dist/{components → src/components}/ButtonGroup/index.d.ts +1 -1
- package/dist/{components → src/components}/Card/index.d.ts +1 -1
- package/dist/{components → src/components}/Drawer/index.d.ts +6 -6
- package/dist/src/components/Fill/index.d.ts +3 -0
- package/dist/{components → src/components}/InputGroup/index.d.ts +1 -1
- package/dist/src/components/Menu/index.d.ts +16 -0
- package/dist/{components → src/components}/Modal/index.d.ts +5 -6
- package/dist/{components → src/components}/Portal/index.d.ts +1 -1
- package/dist/{components → src/components}/Progress/index.d.ts +1 -1
- package/dist/src/components/Spacer/index.d.ts +6 -0
- package/dist/{components → src/components}/Spinner/index.d.ts +1 -1
- package/dist/src/components/Stack/index.d.ts +10 -0
- package/dist/{components → src/components}/Switch/index.d.ts +1 -1
- package/dist/{components → src/components}/Tabs/index.d.ts +1 -1
- package/dist/{components → src/components}/Tooltip/index.d.ts +2 -2
- package/dist/{components → src/components}/Typography/index.d.ts +1 -1
- package/dist/src/helpers/scrollIntoView.d.ts +1 -0
- package/dist/{hooks → src/hooks}/index.d.ts +0 -1
- package/dist/{hooks → src/hooks}/useClasses.d.ts +2 -2
- package/dist/{providers → src/providers}/ThemeProvider.d.ts +28 -5
- package/dist/{types → src/types}/index.d.ts +8 -3
- package/package.json +26 -26
- package/dist/components/Menu/index.d.ts +0 -15
- package/dist/components/Spacer/index.d.ts +0 -6
- package/dist/components/Stack/index.d.ts +0 -10
- package/dist/helpers/scrollIntoView.d.ts +0 -1
- package/dist/hooks/useKeyDown.cjs.js +0 -1
- package/dist/hooks/useKeyDown.d.ts +0 -6
- package/dist/hooks/useKeyDown.es.js +0 -17
- /package/dist/{axios → src/axios}/index.d.ts +0 -0
- /package/dist/{axios → src/axios}/types.d.ts +0 -0
- /package/dist/{axios → src/axios}/useAxios.d.ts +0 -0
- /package/dist/{components → src/components}/Skeleton/index.d.ts +0 -0
- /package/dist/{components → src/components}/Table/index.d.ts +0 -0
- /package/dist/{components → src/components}/index.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/cn.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/copy.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/index.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/isEmpty.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/isServer.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/randomID.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/replaceNonDigits.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/replacePersianNumbers.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/twoDigitNumber.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/wait.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useCreateRipple.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useDebounce.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useDocumentVisible.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useIsOffline.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/usePersistedState.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useToggle.d.ts +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{providers → src/providers}/index.d.ts +0 -0
package/dist/reaxify.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tailwindcss v4.
|
|
1
|
+
/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */body:has([data-open=true]){overscroll-behavior:none;overflow:hidden}input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=password]::-ms-reveal{display:none!important}input[type=password]::-ms-clear{display:none!important}input[type=password]::-webkit-clear-button{display:none!important}input[type=password]::-webkit-credentials-auto-fill-button{display:none!important}input[type=password]{-webkit-text-security:disc}textarea::-webkit-scrollbar{display:none}textarea{-ms-overflow-style:none;scrollbar-width:none}strong,b{font-weight:700}.animate-linear-progress-1{animation:3.2s cubic-bezier(.65,.815,.735,.395) infinite linear-progress-1}.animate-linear-progress-2{animation:3.2s cubic-bezier(.165,.84,.44,1) 1.2s infinite linear-progress-2}@keyframes linear-progress-1{0%{width:35%;inset-inline-start:-35%}60%{width:100%;inset-inline-start:100%}to{width:100%;inset-inline-start:100%}}@keyframes linear-progress-2{0%{width:100%;inset-inline-start:-200%}60%{width:10%;inset-inline-start:107%}to{width:10%;inset-inline-start:107%}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChildrenProps, ComponentPropsWithAs } from '
|
|
1
|
+
import { ChildrenProps, ComponentPropsWithAs } from '../../../types';
|
|
2
2
|
import { ComponentProps, Dispatch, ElementType } from 'react';
|
|
3
3
|
type EventKey = string;
|
|
4
4
|
type AccordionSingleProps<T extends EventKey> = {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AlertVariant, ButtonVariant, Color, ComponentPropsWithAs, ComponentPropsWithoutAs } from '../../../types';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
import { default as Typography } from '../Typography';
|
|
4
|
+
type AlertProps = {
|
|
5
|
+
variant?: AlertVariant;
|
|
6
|
+
color?: Color;
|
|
7
|
+
};
|
|
8
|
+
type AlertContextType = {
|
|
9
|
+
buttonVariant?: ButtonVariant;
|
|
10
|
+
color?: Color;
|
|
11
|
+
};
|
|
12
|
+
export declare const AlertContext: import('react').Context<AlertContextType>;
|
|
13
|
+
declare function Alert<E extends ElementType = "div">({ as, variant, color, children, className, ...props }: ComponentPropsWithAs<E, AlertProps>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare namespace Alert {
|
|
15
|
+
var Icon: typeof AlertIcon;
|
|
16
|
+
var Content: typeof AlertContent;
|
|
17
|
+
var Title: typeof AlertTitle;
|
|
18
|
+
var Description: typeof AlertDescription;
|
|
19
|
+
var Action: typeof AlertAction;
|
|
20
|
+
}
|
|
21
|
+
declare function AlertIcon({ children, className, ...props }: ComponentPropsWithoutAs<"div">): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function AlertContent({ children, className, ...props }: ComponentPropsWithoutAs<"div">): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function AlertTitle({ children, className, ...props }: ComponentPropsWithoutAs<typeof Typography<"h6">>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function AlertDescription({ children, className, ...props }: ComponentPropsWithoutAs<typeof Typography<"p">>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function AlertAction({ children, className, ...props }: ComponentPropsWithoutAs<"div">): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export default Alert;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ButtonVariant, Color, ComponentPropsWithAs
|
|
1
|
+
import { ButtonSize, ButtonVariant, Color, ComponentPropsWithAs } from '../../../types';
|
|
2
2
|
import { ElementType } from 'react';
|
|
3
3
|
export type ButtonProps = {
|
|
4
4
|
variant?: ButtonVariant;
|
|
5
|
-
color?: Color
|
|
6
|
-
size?:
|
|
5
|
+
color?: Color;
|
|
6
|
+
size?: ButtonSize;
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
stopPropagation?: boolean;
|
|
9
9
|
preventDefault?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentPropsWithAs } from '
|
|
1
|
+
import { ComponentPropsWithAs } from '../../../types';
|
|
2
2
|
import { ComponentProps, ElementType } from 'react';
|
|
3
3
|
declare function Card<E extends ElementType = "div">({ as, className, children, ...props }: ComponentPropsWithAs<E>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare namespace Card {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ComponentPropsWithAs, ToggleProps } from '
|
|
1
|
+
import { ComponentPropsWithAs, ToggleProps } from '../../../types';
|
|
2
2
|
import { ComponentProps, ElementType } from 'react';
|
|
3
3
|
import { TransitionStatus } from 'react-transition-group';
|
|
4
4
|
type Anchor = "start" | "end" | "top" | "bottom";
|
|
5
5
|
type Context = {
|
|
6
|
-
open: boolean;
|
|
7
|
-
onClose: VoidFunction;
|
|
8
6
|
duration: number;
|
|
9
7
|
anchor: Anchor;
|
|
10
8
|
transitionState: TransitionStatus;
|
|
11
|
-
|
|
9
|
+
preventClose: boolean;
|
|
10
|
+
} & ToggleProps;
|
|
12
11
|
type DrawerBaseProps = {
|
|
13
12
|
anchor?: Anchor;
|
|
14
13
|
duration?: number;
|
|
15
|
-
|
|
14
|
+
preventClose?: boolean;
|
|
15
|
+
} & Partial<ToggleProps>;
|
|
16
16
|
type DrawerProps<E extends ElementType> = ComponentPropsWithAs<E, DrawerBaseProps>;
|
|
17
17
|
type DrawerMenuProps = Omit<ComponentProps<"div">, "as" | "ref">;
|
|
18
18
|
type DrawerHeaderProps = ComponentProps<"div">;
|
|
19
19
|
type DrawerBodyProps = ComponentProps<"div">;
|
|
20
20
|
type DrawerFooterProps = ComponentProps<"div">;
|
|
21
21
|
export declare const DrawerContext: import('react').Context<Context>;
|
|
22
|
-
declare function Drawer<E extends ElementType = "div">({ as, ref, open, onClose, duration, anchor, className, children, ...props }: DrawerProps<E>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function Drawer<E extends ElementType = "div">({ as, ref, open, onClose, duration, preventClose, anchor, className, children, ...props }: DrawerProps<E>): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
declare namespace Drawer {
|
|
24
24
|
var Menu: typeof DrawerMenu;
|
|
25
25
|
var Header: typeof DrawerHeader;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentPropsWithAs } from '
|
|
1
|
+
import { ComponentPropsWithAs } from '../../../types';
|
|
2
2
|
import { ElementType } from 'react';
|
|
3
3
|
declare function InputGroup<E extends ElementType = "div">({ as, children, className, ...props }: ComponentPropsWithAs<E>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare namespace InputGroup {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentPropsWithAs, ToggleProps } from '../../../types';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
type MenuProps = {
|
|
4
|
+
anchorEl?: HTMLElement | null;
|
|
5
|
+
closeOnClick?: boolean;
|
|
6
|
+
preventClose?: boolean;
|
|
7
|
+
} & ToggleProps;
|
|
8
|
+
type MenuItemProps = {
|
|
9
|
+
closeOnClick?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare function Menu<E extends ElementType = "div">({ as, ref, open, onClose, closeOnClick, preventClose, anchorEl, className, children, ...props }: ComponentPropsWithAs<E, MenuProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace Menu {
|
|
13
|
+
var Item: typeof MenuItem;
|
|
14
|
+
}
|
|
15
|
+
declare function MenuItem<E extends ElementType = "button">({ as, closeOnClick: itemCloseOnClick, className, children, onClick, ...props }: ComponentPropsWithAs<E, MenuItemProps>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default Menu;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { ComponentPropsWithAs, Size, ToggleProps } from '
|
|
1
|
+
import { ComponentPropsWithAs, Size, ToggleProps } from '../../../types';
|
|
2
2
|
import { ComponentProps, ElementType } from 'react';
|
|
3
3
|
import { TransitionStatus } from 'react-transition-group';
|
|
4
4
|
type Context = {
|
|
5
5
|
size: Size;
|
|
6
|
-
open: boolean;
|
|
7
|
-
onClose: VoidFunction;
|
|
8
6
|
transitionState: TransitionStatus;
|
|
9
7
|
duration: number;
|
|
10
|
-
};
|
|
8
|
+
} & ToggleProps;
|
|
11
9
|
type ModalProps = {
|
|
12
10
|
size?: Size;
|
|
13
11
|
duration?: number;
|
|
14
|
-
|
|
12
|
+
preventClose?: boolean;
|
|
13
|
+
} & Partial<ToggleProps>;
|
|
15
14
|
type ModalDialogProps = Omit<ComponentProps<"div">, "as" | "ref">;
|
|
16
15
|
type ModalHeaderProps = ComponentProps<"div">;
|
|
17
16
|
type ModalBodyProps = ComponentProps<"div">;
|
|
18
17
|
type ModalFooterProps = ComponentProps<"div">;
|
|
19
18
|
export declare const ModalContext: import('react').Context<Context>;
|
|
20
|
-
declare function Modal<E extends ElementType = "div">({ as, ref, size, open, onClose, duration, className, children, ...props }: ComponentPropsWithAs<E, ModalProps>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function Modal<E extends ElementType = "div">({ as, ref, size, open, onClose, duration, preventClose, className, children, ...props }: ComponentPropsWithAs<E, ModalProps>): import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
declare namespace Modal {
|
|
22
21
|
var Dialog: typeof ModalDialog;
|
|
23
22
|
var Header: typeof ModalHeader;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChildrenProps } from '
|
|
1
|
+
import { ChildrenProps } from '../../../types';
|
|
2
2
|
export default function Portal({ children }: ChildrenProps): import('react').ReactPortal | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentPropsWithAs } from '../../../types';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
type Directions = "row" | "column";
|
|
4
|
+
type StackProps = {
|
|
5
|
+
direction?: Directions;
|
|
6
|
+
wrap?: boolean | "reverse";
|
|
7
|
+
reverse?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export default function Stack<E extends ElementType = "div">({ as, direction, wrap, reverse, className, children, ...props }: ComponentPropsWithAs<E, StackProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color, ComponentPropsWithoutAs } from '
|
|
1
|
+
import { Color, ComponentPropsWithoutAs } from '../../../types';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
type Placement = "top" | "end" | "bottom" | "start";
|
|
4
4
|
type Props = {
|
|
@@ -6,7 +6,7 @@ type Props = {
|
|
|
6
6
|
color?: Color;
|
|
7
7
|
duration?: number;
|
|
8
8
|
placement?: Placement;
|
|
9
|
-
children?: ReactElement
|
|
9
|
+
children?: ReactElement<any>;
|
|
10
10
|
};
|
|
11
11
|
export default function Tooltip({ title, color, placement, duration, className, children, ...props }: ComponentPropsWithoutAs<"span", Props>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentPropsWithAs, TypographyVariant } from '
|
|
1
|
+
import { ComponentPropsWithAs, TypographyVariant } from '../../../types';
|
|
2
2
|
type Component = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label";
|
|
3
3
|
type TypographyProps = {
|
|
4
4
|
variant?: TypographyVariant;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function scrollIntoView(el: HTMLElement | string, option?: ScrollIntoViewOptions | boolean | undefined): void;
|
|
@@ -3,6 +3,5 @@ export { default as useCreateRipple } from './useCreateRipple';
|
|
|
3
3
|
export { default as useDebounce } from './useDebounce';
|
|
4
4
|
export { default as useDocumentVisible } from './useDocumentVisible';
|
|
5
5
|
export { default as useIsOffline } from './useIsOffline';
|
|
6
|
-
export { default as useKeyDown } from './useKeyDown';
|
|
7
6
|
export { default as usePersistedState } from './usePersistedState';
|
|
8
7
|
export { default as useToggle } from './useToggle';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ThemeProviderContextType } from '
|
|
2
|
-
import { DeepPartial } from '
|
|
1
|
+
import { ThemeProviderContextType } from '../../providers/ThemeProvider';
|
|
2
|
+
import { DeepPartial } from '../../types';
|
|
3
3
|
type Classes = ThemeProviderContextType["extendClasses"];
|
|
4
4
|
export default function useClasses<T = string>(selector: (extendClasses: Classes) => T): DeepPartial<T> | null;
|
|
5
5
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BadgeVariant, ButtonVariant, ChildrenProps, Color, DeepPartial, Size, TypographyVariant } from '
|
|
1
|
+
import { AlertVariant, BadgeVariant, ButtonSize, ButtonVariant, ChildrenProps, Color, DeepPartial, Size, TypographyVariant } from '../../types';
|
|
2
2
|
type ColorClasses<T> = Record<Color, T>;
|
|
3
3
|
type SizeClasses = Record<Size, string>;
|
|
4
|
+
type ButtonSizeClasses = Record<ButtonSize, string>;
|
|
4
5
|
type ActiveClasses = {
|
|
5
6
|
active: string;
|
|
6
7
|
inactive: string;
|
|
@@ -32,9 +33,28 @@ export type ThemeProviderContextType = {
|
|
|
32
33
|
button: {
|
|
33
34
|
base: string;
|
|
34
35
|
color: ColorClasses<Record<ButtonVariant, string>>;
|
|
35
|
-
size:
|
|
36
|
+
size: ButtonSizeClasses;
|
|
36
37
|
loading: ActiveClasses;
|
|
37
38
|
};
|
|
39
|
+
alert: {
|
|
40
|
+
base: string;
|
|
41
|
+
color: ColorClasses<Record<AlertVariant, string>>;
|
|
42
|
+
icon: {
|
|
43
|
+
base: string;
|
|
44
|
+
};
|
|
45
|
+
content: {
|
|
46
|
+
base: string;
|
|
47
|
+
};
|
|
48
|
+
title: {
|
|
49
|
+
base: string;
|
|
50
|
+
};
|
|
51
|
+
description: {
|
|
52
|
+
base: string;
|
|
53
|
+
};
|
|
54
|
+
action: {
|
|
55
|
+
base: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
38
58
|
buttonGroup: {
|
|
39
59
|
base: string;
|
|
40
60
|
orientation: {
|
|
@@ -136,11 +156,14 @@ export type ThemeProviderContextType = {
|
|
|
136
156
|
};
|
|
137
157
|
stack: {
|
|
138
158
|
base: string;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
159
|
+
directions: {
|
|
160
|
+
row: string;
|
|
161
|
+
column: string;
|
|
142
162
|
};
|
|
143
163
|
};
|
|
164
|
+
fill: {
|
|
165
|
+
base: string;
|
|
166
|
+
};
|
|
144
167
|
table: {
|
|
145
168
|
base: string;
|
|
146
169
|
container: {
|
|
@@ -7,6 +7,8 @@ export interface ExtendBadgeVariant {
|
|
|
7
7
|
}
|
|
8
8
|
export interface ExtendButtonVariant {
|
|
9
9
|
}
|
|
10
|
+
export interface ExtendAlertVariant {
|
|
11
|
+
}
|
|
10
12
|
export interface ExtendTypographyVariant {
|
|
11
13
|
}
|
|
12
14
|
export interface ExtendColor {
|
|
@@ -14,15 +16,18 @@ export interface ExtendColor {
|
|
|
14
16
|
export interface ExtendSize {
|
|
15
17
|
}
|
|
16
18
|
type BaseBadgeVariant = "solid" | "outline" | "soft";
|
|
17
|
-
type BaseButtonVariant = "solid" | "outline" | "text";
|
|
19
|
+
type BaseButtonVariant = "solid" | "outline" | "text" | "soft";
|
|
20
|
+
type BaseAlertVariant = "solid" | "outline" | "soft";
|
|
18
21
|
type BaseTypographyVariant = "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "body-1" | "body-2" | "body-3";
|
|
19
22
|
type BaseColor = "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "dark" | "light";
|
|
20
23
|
type BaseSize = "sm" | "md" | "lg";
|
|
21
24
|
export type BadgeVariant = BaseBadgeVariant | keyof ExtendBadgeVariant;
|
|
22
25
|
export type ButtonVariant = BaseButtonVariant | keyof ExtendButtonVariant;
|
|
26
|
+
export type AlertVariant = BaseAlertVariant | keyof ExtendAlertVariant;
|
|
23
27
|
export type TypographyVariant = BaseTypographyVariant | keyof ExtendTypographyVariant;
|
|
24
28
|
export type Color = BaseColor | keyof ExtendColor;
|
|
25
29
|
export type Size = BaseSize | keyof ExtendSize;
|
|
30
|
+
export type ButtonSize = BaseSize | "icon" | keyof ExtendSize;
|
|
26
31
|
export type ClassNameProps = {
|
|
27
32
|
className?: string;
|
|
28
33
|
};
|
|
@@ -30,8 +35,8 @@ export type ChildrenProps = {
|
|
|
30
35
|
children?: ReactNode;
|
|
31
36
|
};
|
|
32
37
|
export type ToggleProps = {
|
|
33
|
-
open
|
|
34
|
-
onClose
|
|
38
|
+
open: boolean;
|
|
39
|
+
onClose: VoidFunction;
|
|
35
40
|
};
|
|
36
41
|
export type RecursivePartial<T> = {
|
|
37
42
|
[P in keyof T]?: RecursivePartial<T[P]>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reaxify",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.86",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -51,46 +51,46 @@
|
|
|
51
51
|
"build-storybook": "storybook build"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"@tanstack/react-hotkeys": "^0.9.1",
|
|
54
55
|
"iconsax-react": "^0.0.8",
|
|
55
56
|
"react-animate-height": "^3.2.3",
|
|
56
57
|
"react-transition-group": "^4.4.5",
|
|
57
|
-
"tailwind-merge": "^3.
|
|
58
|
+
"tailwind-merge": "^3.5.0"
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {
|
|
61
|
+
"axios": ">=1.0.0",
|
|
60
62
|
"react": ">=19.0.0",
|
|
61
|
-
"react-dom": ">=19.0.0"
|
|
62
|
-
"axios": ">=1.0.0"
|
|
63
|
+
"react-dom": ">=19.0.0"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
|
-
"@chromatic-com/storybook": "^
|
|
66
|
-
"@storybook/addon-essentials": "^8.6.
|
|
67
|
-
"@storybook/addon-interactions": "^8.6.
|
|
68
|
-
"@storybook/addon-links": "^8.6.
|
|
69
|
-
"@storybook/addon-onboarding": "^8.6.
|
|
70
|
-
"@storybook/blocks": "^8.6.
|
|
71
|
-
"@storybook/react": "^8.6.
|
|
72
|
-
"@storybook/react-vite": "^8.6.
|
|
73
|
-
"@storybook/test": "^8.6.
|
|
66
|
+
"@chromatic-com/storybook": "^3.2.4",
|
|
67
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
68
|
+
"@storybook/addon-interactions": "^8.6.14",
|
|
69
|
+
"@storybook/addon-links": "^8.6.14",
|
|
70
|
+
"@storybook/addon-onboarding": "^8.6.14",
|
|
71
|
+
"@storybook/blocks": "^8.6.14",
|
|
72
|
+
"@storybook/react": "^8.6.14",
|
|
73
|
+
"@storybook/react-vite": "^8.6.14",
|
|
74
|
+
"@storybook/test": "^8.6.15",
|
|
74
75
|
"@tailwindcss/vite": "^4.1.16",
|
|
75
|
-
"@types/react": "^
|
|
76
|
-
"@types/react-dom": "^
|
|
76
|
+
"@types/react": "^19.2.14",
|
|
77
|
+
"@types/react-dom": "^19.2.3",
|
|
77
78
|
"@types/react-transition-group": "^4.4.11",
|
|
78
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
79
|
-
"@typescript-eslint/parser": "^
|
|
80
|
-
"@vitejs/plugin-react-swc": "^3.
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^8.59.0",
|
|
80
|
+
"@typescript-eslint/parser": "^8.59.0",
|
|
81
|
+
"@vitejs/plugin-react-swc": "^4.3.0",
|
|
81
82
|
"axios": "^1.13.1",
|
|
82
|
-
"eslint": "^
|
|
83
|
-
"eslint-plugin-react-hooks": "^
|
|
84
|
-
"eslint-plugin-react-refresh": "^0.
|
|
85
|
-
"eslint-plugin-storybook": "^0.10.1",
|
|
83
|
+
"eslint": "^10.2.1",
|
|
84
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
85
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
86
86
|
"react": "^19.2.0",
|
|
87
87
|
"react-dom": "^19.2.0",
|
|
88
|
-
"storybook": "^8.6.
|
|
88
|
+
"storybook": "^8.6.14",
|
|
89
89
|
"tailwindcss": "^4.1.16",
|
|
90
|
-
"typescript": "^
|
|
90
|
+
"typescript": "^6.0.3",
|
|
91
91
|
"vite": "^6.3.5",
|
|
92
92
|
"vite-plugin-dts": "^4.5.4",
|
|
93
|
-
"vite-plugin-static-copy": "^
|
|
94
|
-
"vite-tsconfig-paths": "^
|
|
93
|
+
"vite-plugin-static-copy": "^4.1.0",
|
|
94
|
+
"vite-tsconfig-paths": "^6.1.1"
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithAs, ToggleProps } from '../../types';
|
|
2
|
-
import { ElementType } from 'react';
|
|
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, ref, 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;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithAs } from '../../types';
|
|
2
|
-
import { ElementType } from 'react';
|
|
3
|
-
type Variants = "vertical" | "horizontal";
|
|
4
|
-
type StackProps = {
|
|
5
|
-
variant?: Variants;
|
|
6
|
-
wrap?: boolean | "reverse";
|
|
7
|
-
reverse?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export default function Stack<E extends ElementType = "div">({ as, variant, wrap, reverse, className, children, ...props }: ComponentPropsWithAs<E, StackProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function scrollIntoView(element: HTMLElement, option?: ScrollIntoViewOptions): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const s=require("react");function o(r,{skip:t=!1,targetKey:e=null}={}){const u=s.useRef(r);u.current=r,s.useEffect(()=>{if(t)return;const c=n=>e?Array.isArray(e)?e.includes(n):n===e:!0,i=n=>{c(n.key)&&u.current(n.key)};return window.addEventListener("keydown",i),()=>{window.removeEventListener("keydown",i)}},[e,t])}module.exports=o;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useRef as f, useEffect as s } from "react";
|
|
3
|
-
function d(r, { skip: u = !1, targetKey: e = null } = {}) {
|
|
4
|
-
const t = f(r);
|
|
5
|
-
t.current = r, s(() => {
|
|
6
|
-
if (u) return;
|
|
7
|
-
const o = (n) => e ? Array.isArray(e) ? e.includes(n) : n === e : !0, i = (n) => {
|
|
8
|
-
o(n.key) && t.current(n.key);
|
|
9
|
-
};
|
|
10
|
-
return window.addEventListener("keydown", i), () => {
|
|
11
|
-
window.removeEventListener("keydown", i);
|
|
12
|
-
};
|
|
13
|
-
}, [e, u]);
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
d as default
|
|
17
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|