@iziui/react 0.0.68-rc → 0.0.71-rc
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/.types/_internal/core/index.d.ts +1 -0
- package/dist/.types/_internal/core/options/CustomOptions.d.ts +0 -4
- package/dist/.types/_internal/core/system/Sx.d.ts +5 -0
- package/dist/.types/_internal/core/system/index.d.ts +1 -0
- package/dist/.types/actions/Button/Button.d.ts +1 -1
- package/dist/.types/actions/ButtonIcon/ButtonIcon.d.ts +1 -1
- package/dist/.types/core/createComponent.d.ts +1 -1
- package/dist/.types/core/createComponent.d.ts.map +1 -1
- package/dist/.types/display/Avatar/Avatar.d.ts +1 -1
- package/dist/.types/display/Card/Card.d.ts +1 -1
- package/dist/.types/display/Card/CardContent.d.ts +1 -1
- package/dist/.types/display/Chip/Chip.d.ts +1 -1
- package/dist/.types/display/Divider/Divider.d.ts +1 -1
- package/dist/.types/display/Icon/Icon.d.ts +1 -1
- package/dist/.types/display/Table/Table.d.ts +1 -1
- package/dist/.types/display/Table/TableCell.d.ts +1 -1
- package/dist/.types/display/Tooltip/Tooltip.d.ts +1 -1
- package/dist/.types/display/Typography/Typography.d.ts +1 -1
- package/dist/.types/display/index.d.ts +2 -0
- package/dist/.types/display/index.d.ts.map +1 -1
- package/dist/.types/feedback/Alert/Alert.d.ts +1 -1
- package/dist/.types/feedback/Loading/Loading.d.ts +1 -1
- package/dist/.types/feedback/Modal/Modal.d.ts +1 -1
- package/dist/.types/feedback/Modal/ModalFooter.d.ts +1 -1
- package/dist/.types/feedback/Skeleton/Skeleton.d.ts +1 -1
- package/dist/.types/feedback/Toast/Toast.d.ts +1 -1
- package/dist/.types/fields/Checkbox/Checkbox.d.ts +1 -1
- package/dist/.types/fields/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/.types/fields/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/.types/fields/Input/Input.d.ts +1 -1
- package/dist/.types/fields/InputFile/InputFile.d.ts +1 -1
- package/dist/.types/fields/Select/Select.d.ts +1 -1
- package/dist/.types/fields/Switchs/Switch.d.ts +1 -1
- package/dist/.types/layout/Box/Box.d.ts +1 -1
- package/dist/.types/layout/Container/Container.d.ts +1 -1
- package/dist/.types/layout/Stack/Stack.d.ts +1 -1
- package/dist/.types/navigation/Drawer/Drawer.d.ts +1 -1
- package/dist/.types/navigation/Drawer/DrawerContent.d.ts +1 -1
- package/dist/.types/navigation/Drawer/DrawerFooter.d.ts +1 -1
- package/dist/.types/navigation/Drawer/DrawerHeader.d.ts +1 -1
- package/dist/.types/navigation/Drawer/index.d.ts +9 -1
- package/dist/.types/navigation/Drawer/index.d.ts.map +1 -1
- package/dist/.types/navigation/Menu/Menu.d.ts +1 -1
- package/dist/.types/navigation/Menu/MenuButton.d.ts +1 -1
- package/dist/.types/navigation/index.d.ts +1 -1
- package/dist/.types/navigation/index.d.ts.map +1 -1
- package/dist/.types/theme/index.d.ts +3 -1
- package/dist/.types/theme/index.d.ts.map +1 -1
- package/dist/.types/theme/options.d.ts +2 -0
- package/dist/.types/theme/options.d.ts.map +1 -0
- package/dist/.types/theme/system.d.ts +2 -0
- package/dist/.types/theme/system.d.ts.map +1 -0
- package/dist/chunks/DrawerContent-B0yuNjrh.js +2 -0
- package/dist/chunks/DrawerContent-B0yuNjrh.js.map +1 -0
- package/dist/chunks/DrawerContent-XhAQ7dg_.cjs +2 -0
- package/dist/chunks/DrawerContent-XhAQ7dg_.cjs.map +1 -0
- package/dist/chunks/createComponent-CTufIEiN.cjs.map +1 -1
- package/dist/chunks/createComponent-WNQRXK89.js.map +1 -1
- package/dist/components/Drawer/index.cjs +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +10 -10
- package/package.json +1 -1
- package/dist/chunks/Drawer-0wOdungj.cjs +0 -2
- package/dist/chunks/Drawer-0wOdungj.cjs.map +0 -1
- package/dist/chunks/Drawer-D1lAWrdi.js +0 -2
- package/dist/chunks/Drawer-D1lAWrdi.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Sx';
|
|
@@ -8,6 +8,6 @@ export interface ButtonProps extends PropsWithChildren<ButtonHTMLAttributes<HTML
|
|
|
8
8
|
loading?: React.JSX.Element | boolean;
|
|
9
9
|
variant?: 'contained' | 'outlined' | 'text';
|
|
10
10
|
}
|
|
11
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
11
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<ButtonProps>>;
|
|
12
12
|
export default _default;
|
|
13
13
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -6,6 +6,6 @@ export interface ButtonIconProps extends PropsWithChildren<ButtonHTMLAttributes<
|
|
|
6
6
|
size?: number;
|
|
7
7
|
children: ReactElement<IconProps>;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: import('react').FC<import('../../
|
|
9
|
+
declare const _default: import('react').FC<import('../../theme').Sx<ButtonIconProps>>;
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=ButtonIcon.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ComponentType, FC } from 'react';
|
|
2
|
-
import { Sx } from '../_internal/core/
|
|
2
|
+
import { Sx } from '../_internal/core/system';
|
|
3
3
|
export default function createComponent<P>(WrappedComponent: ComponentType<P>): FC<Sx<P>>;
|
|
4
4
|
//# sourceMappingURL=createComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../../../src/core/createComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../../../src/core/createComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAW7C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,CAAC,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,aAwB5E"}
|
|
@@ -9,6 +9,6 @@ interface AvatarProps extends HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
variant?: 'rounded' | 'circular';
|
|
10
10
|
icon?: React.JSX.Element;
|
|
11
11
|
}
|
|
12
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
12
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<AvatarProps>>;
|
|
13
13
|
export default _default;
|
|
14
14
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -2,6 +2,6 @@ import { HTMLAttributes } from 'react';
|
|
|
2
2
|
interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
onClick?: (e?: any) => void;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
5
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<CardProps>>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
type CardContentProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
3
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<CardContentProps>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=CardContent.d.ts.map
|
|
@@ -8,6 +8,6 @@ export interface ChipProps extends Omit<HTMLAttributes<HTMLElement>, 'children'>
|
|
|
8
8
|
icon?: React.JSX.Element;
|
|
9
9
|
onDelete?: () => void;
|
|
10
10
|
}
|
|
11
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
11
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<ChipProps & import('react').RefAttributes<HTMLDivElement>>>;
|
|
12
12
|
export default _default;
|
|
13
13
|
//# sourceMappingURL=Chip.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
export type DividerProps = HTMLAttributes<HTMLElement>;
|
|
3
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
3
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<DividerProps>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -3,6 +3,6 @@ export interface IconProps extends HTMLAttributes<HTMLElement> {
|
|
|
3
3
|
name: string;
|
|
4
4
|
size?: number;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
6
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<IconProps>>;
|
|
7
7
|
export default _default;
|
|
8
8
|
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TableHTMLAttributes } from 'react';
|
|
2
2
|
export type TableProps = TableHTMLAttributes<HTMLTableElement>;
|
|
3
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
3
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<TableProps>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -3,6 +3,6 @@ interface TableCellProps extends TdHTMLAttributes<HTMLTableDataCellElement> {
|
|
|
3
3
|
align?: 'left' | 'center' | 'right';
|
|
4
4
|
children: React.JSX.Element | string | number | null;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
6
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<TableCellProps>>;
|
|
7
7
|
export default _default;
|
|
8
8
|
//# sourceMappingURL=TableCell.d.ts.map
|
|
@@ -6,6 +6,6 @@ export interface TooltipProps extends HTMLAttributes<HTMLElement> {
|
|
|
6
6
|
children: React.JSX.Element;
|
|
7
7
|
label: string | React.JSX.Element;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: import('react').FC<import('../../
|
|
9
|
+
declare const _default: import('react').FC<import('../../theme').Sx<TooltipProps>>;
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -8,6 +8,6 @@ export interface TypographyProps extends PropsWithChildren<HTMLAttributes<HTMLPa
|
|
|
8
8
|
textAlign?: CSSProperties['textAlign'];
|
|
9
9
|
weight?: 'bold' | 'normal' | 'light';
|
|
10
10
|
}
|
|
11
|
-
declare const _default: import('react').FC<import('../../
|
|
11
|
+
declare const _default: import('react').FC<import('../../theme').Sx<TypographyProps>>;
|
|
12
12
|
export default _default;
|
|
13
13
|
//# sourceMappingURL=Typography.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/display/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/display/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
|
|
@@ -6,6 +6,6 @@ export interface AlertProps extends HtmlHTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
onClose?: () => void;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
9
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<AlertProps>>;
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -4,6 +4,6 @@ export interface LoadingProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
4
4
|
color?: Colors;
|
|
5
5
|
size?: number | string;
|
|
6
6
|
}
|
|
7
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
7
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<LoadingProps>>;
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=Loading.d.ts.map
|
|
@@ -6,6 +6,6 @@ export interface ModalProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
|
6
6
|
title?: React.JSX.Element;
|
|
7
7
|
subtitle?: React.JSX.Element;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
9
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<ModalProps>>;
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface ModalFooterProps {
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
4
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<ModalFooterProps>>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=ModalFooter.d.ts.map
|
|
@@ -5,6 +5,6 @@ export interface SkeletonProps {
|
|
|
5
5
|
width: CSSProperties['width'];
|
|
6
6
|
height: CSSProperties['height'];
|
|
7
7
|
}
|
|
8
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
8
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<SkeletonProps>>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -12,6 +12,6 @@ export interface ToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
12
12
|
visible?: boolean;
|
|
13
13
|
onRemove: (id: string) => void;
|
|
14
14
|
}
|
|
15
|
-
declare const _default: import('react').FC<import('../../
|
|
15
|
+
declare const _default: import('react').FC<import('../../theme').Sx<ToastProps>>;
|
|
16
16
|
export default _default;
|
|
17
17
|
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -8,6 +8,6 @@ export interface CheckboxProps extends Omit<HTMLProps<HTMLInputElement>, 'id'> {
|
|
|
8
8
|
color?: Colors;
|
|
9
9
|
checked?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
11
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<CheckboxProps>>;
|
|
12
12
|
export default _default;
|
|
13
13
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -9,6 +9,6 @@ export interface CheckboxGroupProps {
|
|
|
9
9
|
values?: string[];
|
|
10
10
|
onChange?: (data: CheckboxData[]) => void;
|
|
11
11
|
}
|
|
12
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
12
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<CheckboxGroupProps>>;
|
|
13
13
|
export default _default;
|
|
14
14
|
//# sourceMappingURL=CheckboxGroup.d.ts.map
|
|
@@ -7,6 +7,6 @@ export interface ColorPickerProps extends Omit<InputHTMLAttributes<HTMLInputElem
|
|
|
7
7
|
fitContent?: boolean;
|
|
8
8
|
autoClose?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: import('react').FC<import('../../
|
|
10
|
+
declare const _default: import('react').FC<import('../../theme').Sx<ColorPickerProps>>;
|
|
11
11
|
export default _default;
|
|
12
12
|
//# sourceMappingURL=ColorPicker.d.ts.map
|
|
@@ -9,6 +9,6 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
9
9
|
endIcon?: React.JSX.Element | boolean;
|
|
10
10
|
startIcon?: React.JSX.Element | boolean;
|
|
11
11
|
}
|
|
12
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
12
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<InputProps>>;
|
|
13
13
|
export default _default;
|
|
14
14
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
export interface InputFileProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
4
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<InputFileProps>>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=InputFile.d.ts.map
|
|
@@ -7,6 +7,6 @@ export interface SelectProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
7
7
|
startIcon?: React.JSX.Element | boolean;
|
|
8
8
|
children: React.JSX.Element | React.JSX.Element[];
|
|
9
9
|
}
|
|
10
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
10
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<SelectProps>>;
|
|
11
11
|
export default _default;
|
|
12
12
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -7,6 +7,6 @@ export interface SwitchProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
7
7
|
color?: Colors;
|
|
8
8
|
auto?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
10
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<SwitchProps>>;
|
|
11
11
|
export default _default;
|
|
12
12
|
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -2,6 +2,6 @@ import { HTMLAttributes } from 'react';
|
|
|
2
2
|
export interface BoxProps extends HTMLAttributes<HTMLElement> {
|
|
3
3
|
tag?: React.ElementType;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
5
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<BoxProps & import('react').RefAttributes<HTMLElement>>>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -6,6 +6,6 @@ export interface ContainerProps extends HTMLAttributes<HTMLElement> {
|
|
|
6
6
|
md?: Width;
|
|
7
7
|
lg?: Width;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
9
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<ContainerProps & import('react').RefAttributes<HTMLElement>>>;
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -8,6 +8,6 @@ export interface StackProps extends HTMLAttributes<HTMLElement> {
|
|
|
8
8
|
alignSelf?: CSSProperties['alignSelf'];
|
|
9
9
|
flexWrap?: CSSProperties['flexWrap'];
|
|
10
10
|
}
|
|
11
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
11
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<StackProps & import('react').RefAttributes<HTMLElement>>>;
|
|
12
12
|
export default _default;
|
|
13
13
|
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -8,6 +8,6 @@ export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
footer?: React.JSX.Element;
|
|
9
9
|
onClose: () => void;
|
|
10
10
|
}
|
|
11
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
11
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<DrawerProps>>;
|
|
12
12
|
export default _default;
|
|
13
13
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HtmlHTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
type DrawerContentProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>;
|
|
3
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
3
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<DrawerContentProps>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=DrawerContent.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HtmlHTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
type DrawerFooterProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>;
|
|
3
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
3
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<DrawerFooterProps>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=DrawerFooter.d.ts.map
|
|
@@ -2,6 +2,6 @@ import { HtmlHTMLAttributes } from 'react';
|
|
|
2
2
|
interface DrawerHeaderProps extends HtmlHTMLAttributes<HTMLDivElement> {
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
5
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<DrawerHeaderProps>>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=DrawerHeader.d.ts.map
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export { default
|
|
1
|
+
export { default as useDrawer } from './useDrawer';
|
|
2
|
+
export { default as Drawer } from './Drawer';
|
|
3
|
+
export { default as DrawerFooter } from './DrawerFooter';
|
|
4
|
+
export { default as DrawerHeader } from './DrawerHeader';
|
|
5
|
+
export { default as DrawerContent } from './DrawerContent';
|
|
6
|
+
export * from './Drawer';
|
|
7
|
+
export * from './DrawerFooter';
|
|
8
|
+
export * from './DrawerHeader';
|
|
9
|
+
export * from './DrawerContent';
|
|
2
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/navigation/Drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/navigation/Drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
|
|
@@ -10,6 +10,6 @@ export interface MenuProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
children: React.JSX.Element | React.JSX.Element[];
|
|
11
11
|
onClose: (e?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
12
|
}
|
|
13
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
13
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<MenuProps & import('react').RefAttributes<HTMLDivElement>>>;
|
|
14
14
|
export default _default;
|
|
15
15
|
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -5,6 +5,6 @@ export interface MenuButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
5
5
|
color?: Colors;
|
|
6
6
|
icon?: React.JSX.Element;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: import('react').FC<import('../../_internal/core/
|
|
8
|
+
declare const _default: import('react').FC<import('../../_internal/core/system').Sx<MenuButtonProps>>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=MenuButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as useTheme } from './useTheme';
|
|
2
2
|
export { default as ThemeProvider } from './ThemeProvider';
|
|
3
|
-
export * from './Theme';
|
|
4
3
|
export * from './createTheme';
|
|
4
|
+
export * from './options';
|
|
5
|
+
export * from './system';
|
|
6
|
+
export * from './Theme';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/theme/options.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../src/theme/system.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useState as w,useEffect as _}from"react";import{jsxs as f,jsx as s}from"react/jsx-runtime";import{p as n}from"./index-CZ41y9Hn.js";import{j as o}from"./joinClass-anSpaauN.js";import{S as v}from"./Stack-DK5pfu2w.js";import{c as m}from"./createComponent-WNQRXK89.js";import{B as p}from"./ButtonIcon-CsX4oYeI.js";import{I}from"./Icon-CCIgEwA9.js";function M(t=!1){const[e,r]=w(!1);return _(()=>{r(t)},[t]),[e,()=>{r(i=>!i)}]}function g({open:t,header:e,body:r,footer:c,direction:i="right",onClose:D,...u}){const[d,l]=w({visible:!1,animation:"hide"}),h=300,N=o(`${n}-drawer`,u.className),$=o(`${n}-drawer__content`,`${n}-drawer__content--${i}`,`${n}-drawer__content--${i}--${d.animation}`),b=o(`${n}-drawer__overlay`,`${n}-drawer__overlay--${d.animation}`);_(()=>{let a;if(t){a=y();return}return a=C(),()=>{clearTimeout(a)}},[t]);const y=()=>(l(a=>({...a,visible:!0})),setTimeout(()=>{l(a=>({...a,animation:"show"})),document.body.style.overflow="hidden"},100)),C=()=>(l(a=>({...a,animation:"hide"})),setTimeout(()=>{l(a=>({...a,visible:!1})),document.body.style.overflow=""},h));return d.visible&&f("div",{...u,className:N,children:[f(v,{className:$,children:[e,r,c]}),s("div",{"data-testid":"drawer-overlay",className:b,onClick:D})]})}const R=m(g);function j({children:t,...e}){const r=o(`${n}-drawer__footer`,e.className);return s("div",{...e,className:r,children:t})}const U=m(j);function x({children:t,onClose:e,...r}){const c=o(`${n}-drawer__header`,r.className);return f(v,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",...r,className:c,children:[t,e&&s(p,{onClick:e,color:"primary","aria-label":"Fechar","data-testid":"drawer-close-button",children:s(I,{name:"times"})})]})}const q=m(x);function T({children:t,...e}){const r=o(`${n}-drawer__content__container`,e.className);return s("div",{...e,className:r,children:t})}const z=m(T);export{R as D,z as a,U as b,q as c,M as u};
|
|
2
|
+
//# sourceMappingURL=DrawerContent-B0yuNjrh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerContent-B0yuNjrh.js","sources":["../../src/navigation/Drawer/useDrawer.ts","../../src/navigation/Drawer/Drawer.tsx","../../src/navigation/Drawer/DrawerFooter.tsx","../../src/navigation/Drawer/DrawerHeader.tsx","../../src/navigation/Drawer/DrawerContent.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\ntype UseDrawer = [boolean, () => void]\n\nexport default function useDrawer(open = false): UseDrawer {\n const [_open, setOpen] = useState(false);\n\n useEffect(() => { setOpen(open); }, [open]);\n\n const toogleDrawer = () => { setOpen(prev => !prev); };\n\n return [_open, toogleDrawer];\n}","import { useEffect, useState, type HTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils';\n\nimport Stack from '@/layout/Stack';\n\nimport createComponent from '../../core/createComponent';\n\nimport '@iziui/styles/components/Drawer.scss';\n\ntype Direction = 'right' | 'left' | 'bottom';\ntype AnimationClass = 'show' | 'hide';\ntype Config = { animation: AnimationClass; visible: boolean };\n\nexport interface DrawerProps extends HTMLAttributes<HTMLDivElement> {\n open: boolean;\n direction?: Direction;\n body: React.JSX.Element;\n header?: React.JSX.Element;\n footer?: React.JSX.Element;\n onClose: () => void;\n};\n\nfunction Drawer({\n open,\n header,\n body,\n footer,\n direction = 'right',\n onClose,\n ...props\n}: DrawerProps) {\n const [config, setConfig] = useState<Config>({ visible: false, animation: 'hide' });\n\n const ANIMATION_DURATION = 300;\n\n const cls = joinClass(\n `${prefix}-drawer`,\n props.className\n );\n\n const contentCls = joinClass(\n `${prefix}-drawer__content`,\n `${prefix}-drawer__content--${direction}`,\n `${prefix}-drawer__content--${direction}--${config.animation}`,\n );\n\n const overlayCls = joinClass(\n `${prefix}-drawer__overlay`,\n `${prefix}-drawer__overlay--${config.animation}`,\n );\n\n useEffect(() => {\n let timer: NodeJS.Timeout;\n\n if (open) {\n timer = handleOpen();\n return;\n }\n\n timer = handleClose();\n\n return () => {\n clearTimeout(timer);\n };\n }, [open]);\n\n const handleOpen = () => {\n setConfig(prev => ({ ...prev, visible: true }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, animation: 'show' }));\n document.body.style.overflow = 'hidden';\n }, 100);\n };\n\n const handleClose = () => {\n setConfig(prev => ({ ...prev, animation: 'hide' }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, visible: false }));\n document.body.style.overflow = '';\n }, ANIMATION_DURATION);\n };\n\n return (\n config.visible && (\n <div {...props} className={cls}>\n <Stack className={contentCls}>\n {header}\n {body}\n {footer}\n </Stack>\n <div\n data-testid=\"drawer-overlay\"\n className={overlayCls}\n onClick={onClose}\n />\n </div>\n )\n );\n}\n\nexport default createComponent(Drawer);\n","import { HtmlHTMLAttributes, PropsWithChildren } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport createComponent from '../../core/createComponent';\n\ntype DrawerFooterProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>\n\nfunction DrawerFooter({ children, ...props }: DrawerFooterProps) {\n const cls = joinClass(\n `${prefix}-drawer__footer`,\n props.className\n );\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(DrawerFooter);\n","import { HtmlHTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport Stack from '@/layout/Stack';\nimport ButtonIcon from '@/actions/ButtonIcon';\nimport Icon from '@/display/Icon';\n\nimport createComponent from '../../core/createComponent';\n\ninterface DrawerHeaderProps extends HtmlHTMLAttributes<HTMLDivElement> {\n onClose: () => void;\n}\n\nfunction DrawerHeader({ children, onClose, ...props }: DrawerHeaderProps) {\n const cls = joinClass(\n `${prefix}-drawer__header`,\n props.className\n );\n\n return (\n <Stack\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n {...props}\n className={cls}\n >\n {children}\n {\n onClose && (\n <ButtonIcon\n onClick={onClose}\n color=\"primary\"\n aria-label=\"Fechar\"\n data-testid=\"drawer-close-button\"\n >\n <Icon name=\"times\" />\n </ButtonIcon>\n )\n }\n </Stack>\n );\n}\n\nexport default createComponent(DrawerHeader);","import { HtmlHTMLAttributes, PropsWithChildren } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport createComponent from '../../core/createComponent';\n\ntype DrawerContentProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>\n\nfunction DrawerContent({ children, ...props }: DrawerContentProps) {\n const cls = joinClass(\n `${prefix}-drawer__content__container`,\n props.className\n );\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(DrawerContent);"],"names":["useDrawer","open","_open","setOpen","useState","useEffect","prev","Drawer","header","body","footer","direction","onClose","props","config","setConfig","ANIMATION_DURATION","cls","joinClass","prefix","contentCls","overlayCls","timer","handleOpen","handleClose","jsxs","Stack","jsx","Drawer_default","createComponent","DrawerFooter","children","DrawerFooter_default","DrawerHeader","ButtonIcon","Icon","DrawerHeader_default","DrawerContent","DrawerContent_default"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const u=require("react"),s=require("react/jsx-runtime"),a=require("./index-DYxwT4uW.cjs"),o=require("./joinClass-Jk3EszKD.cjs"),m=require("./Stack-beBM7a60.cjs"),d=require("./createComponent-CTufIEiN.cjs"),N=require("./ButtonIcon-Cz8zJH-E.cjs"),$=require("./Icon-COl2Nhp9.cjs");function y(t=!1){const[e,r]=u.useState(!1);return u.useEffect(()=>{r(t)},[t]),[e,()=>{r(i=>!i)}]}function b({open:t,header:e,body:r,footer:c,direction:i="right",onClose:_,...w}){const[f,l]=u.useState({visible:!1,animation:"hide"}),C=300,x=o.joinClass(`${a.prefix}-drawer`,w.className),D=o.joinClass(`${a.prefix}-drawer__content`,`${a.prefix}-drawer__content--${i}`,`${a.prefix}-drawer__content--${i}--${f.animation}`),j=o.joinClass(`${a.prefix}-drawer__overlay`,`${a.prefix}-drawer__overlay--${f.animation}`);u.useEffect(()=>{let n;if(t){n=v();return}return n=h(),()=>{clearTimeout(n)}},[t]);const v=()=>(l(n=>({...n,visible:!0})),setTimeout(()=>{l(n=>({...n,animation:"show"})),document.body.style.overflow="hidden"},100)),h=()=>(l(n=>({...n,animation:"hide"})),setTimeout(()=>{l(n=>({...n,visible:!1})),document.body.style.overflow=""},C));return f.visible&&s.jsxs("div",{...w,className:x,children:[s.jsxs(m.Stack,{className:D,children:[e,r,c]}),s.jsx("div",{"data-testid":"drawer-overlay",className:j,onClick:_})]})}const p=d.createComponent(b);function q({children:t,...e}){const r=o.joinClass(`${a.prefix}-drawer__footer`,e.className);return s.jsx("div",{...e,className:r,children:t})}const I=d.createComponent(q);function g({children:t,onClose:e,...r}){const c=o.joinClass(`${a.prefix}-drawer__header`,r.className);return s.jsxs(m.Stack,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",...r,className:c,children:[t,e&&s.jsx(N.ButtonIcon,{onClick:e,color:"primary","aria-label":"Fechar","data-testid":"drawer-close-button",children:s.jsx($.Icon,{name:"times"})})]})}const k=d.createComponent(g);function S({children:t,...e}){const r=o.joinClass(`${a.prefix}-drawer__content__container`,e.className);return s.jsx("div",{...e,className:r,children:t})}const T=d.createComponent(S);exports.DrawerContent_default=T;exports.DrawerFooter_default=I;exports.DrawerHeader_default=k;exports.Drawer_default=p;exports.useDrawer=y;
|
|
2
|
+
//# sourceMappingURL=DrawerContent-XhAQ7dg_.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerContent-XhAQ7dg_.cjs","sources":["../../src/navigation/Drawer/useDrawer.ts","../../src/navigation/Drawer/Drawer.tsx","../../src/navigation/Drawer/DrawerFooter.tsx","../../src/navigation/Drawer/DrawerHeader.tsx","../../src/navigation/Drawer/DrawerContent.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\ntype UseDrawer = [boolean, () => void]\n\nexport default function useDrawer(open = false): UseDrawer {\n const [_open, setOpen] = useState(false);\n\n useEffect(() => { setOpen(open); }, [open]);\n\n const toogleDrawer = () => { setOpen(prev => !prev); };\n\n return [_open, toogleDrawer];\n}","import { useEffect, useState, type HTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils';\n\nimport Stack from '@/layout/Stack';\n\nimport createComponent from '../../core/createComponent';\n\nimport '@iziui/styles/components/Drawer.scss';\n\ntype Direction = 'right' | 'left' | 'bottom';\ntype AnimationClass = 'show' | 'hide';\ntype Config = { animation: AnimationClass; visible: boolean };\n\nexport interface DrawerProps extends HTMLAttributes<HTMLDivElement> {\n open: boolean;\n direction?: Direction;\n body: React.JSX.Element;\n header?: React.JSX.Element;\n footer?: React.JSX.Element;\n onClose: () => void;\n};\n\nfunction Drawer({\n open,\n header,\n body,\n footer,\n direction = 'right',\n onClose,\n ...props\n}: DrawerProps) {\n const [config, setConfig] = useState<Config>({ visible: false, animation: 'hide' });\n\n const ANIMATION_DURATION = 300;\n\n const cls = joinClass(\n `${prefix}-drawer`,\n props.className\n );\n\n const contentCls = joinClass(\n `${prefix}-drawer__content`,\n `${prefix}-drawer__content--${direction}`,\n `${prefix}-drawer__content--${direction}--${config.animation}`,\n );\n\n const overlayCls = joinClass(\n `${prefix}-drawer__overlay`,\n `${prefix}-drawer__overlay--${config.animation}`,\n );\n\n useEffect(() => {\n let timer: NodeJS.Timeout;\n\n if (open) {\n timer = handleOpen();\n return;\n }\n\n timer = handleClose();\n\n return () => {\n clearTimeout(timer);\n };\n }, [open]);\n\n const handleOpen = () => {\n setConfig(prev => ({ ...prev, visible: true }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, animation: 'show' }));\n document.body.style.overflow = 'hidden';\n }, 100);\n };\n\n const handleClose = () => {\n setConfig(prev => ({ ...prev, animation: 'hide' }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, visible: false }));\n document.body.style.overflow = '';\n }, ANIMATION_DURATION);\n };\n\n return (\n config.visible && (\n <div {...props} className={cls}>\n <Stack className={contentCls}>\n {header}\n {body}\n {footer}\n </Stack>\n <div\n data-testid=\"drawer-overlay\"\n className={overlayCls}\n onClick={onClose}\n />\n </div>\n )\n );\n}\n\nexport default createComponent(Drawer);\n","import { HtmlHTMLAttributes, PropsWithChildren } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport createComponent from '../../core/createComponent';\n\ntype DrawerFooterProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>\n\nfunction DrawerFooter({ children, ...props }: DrawerFooterProps) {\n const cls = joinClass(\n `${prefix}-drawer__footer`,\n props.className\n );\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(DrawerFooter);\n","import { HtmlHTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport Stack from '@/layout/Stack';\nimport ButtonIcon from '@/actions/ButtonIcon';\nimport Icon from '@/display/Icon';\n\nimport createComponent from '../../core/createComponent';\n\ninterface DrawerHeaderProps extends HtmlHTMLAttributes<HTMLDivElement> {\n onClose: () => void;\n}\n\nfunction DrawerHeader({ children, onClose, ...props }: DrawerHeaderProps) {\n const cls = joinClass(\n `${prefix}-drawer__header`,\n props.className\n );\n\n return (\n <Stack\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n {...props}\n className={cls}\n >\n {children}\n {\n onClose && (\n <ButtonIcon\n onClick={onClose}\n color=\"primary\"\n aria-label=\"Fechar\"\n data-testid=\"drawer-close-button\"\n >\n <Icon name=\"times\" />\n </ButtonIcon>\n )\n }\n </Stack>\n );\n}\n\nexport default createComponent(DrawerHeader);","import { HtmlHTMLAttributes, PropsWithChildren } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport createComponent from '../../core/createComponent';\n\ntype DrawerContentProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>\n\nfunction DrawerContent({ children, ...props }: DrawerContentProps) {\n const cls = joinClass(\n `${prefix}-drawer__content__container`,\n props.className\n );\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(DrawerContent);"],"names":["useDrawer","open","_open","setOpen","useState","useEffect","prev","Drawer","header","body","footer","direction","onClose","props","config","setConfig","ANIMATION_DURATION","cls","joinClass","prefix","contentCls","overlayCls","timer","handleOpen","handleClose","jsxs","Stack","jsx","Drawer_default","createComponent","DrawerFooter","children","DrawerFooter_default","DrawerHeader","ButtonIcon","Icon","DrawerHeader_default","DrawerContent","DrawerContent_default"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent-CTufIEiN.cjs","sources":["../../../../core/src/options/createOptions/createOptions.ts","../../../../core/src/plugin/color/defineColor/defineColor.ts","../../../../core/src/plugin/color/defineBackground/defineBackground.ts","../../../../core/src/plugin/color/defineBorderColor/defineBorderColor.ts","../../../../core/src/plugin/color/defineBackgroundColor/defineBackgroundColor.ts","../../../../core/src/plugin/shape/defineBorderRadius/defineBorderRadius.ts","../../../../core/src/plugin/spacing/defineMargin/defineMargin.ts","../../../../core/src/plugin/spacing/definePadding/definePadding.ts","../../../../core/src/plugin/behavior/defineBoxShadow/defineBoxShadow.ts","../../src/core/createComponent.tsx"],"sourcesContent":["import type { Properties } from 'csstype';\n\nimport type { Plugin } from '../../plugin';\nimport type { ThemeBuilded } from '../../theme';\nimport type { CustomOptions } from '../CustomOptions';\n\ntype Data = {\n sx: CustomOptions;\n theme: ThemeBuilded;\n}\n\nexport default function createOptions({ sx, theme }: Data, ...plugins: Plugin[]): Properties {\n return plugins.reduce<Properties>((acc, plugin) => {\n acc = { ...acc, ...plugin(theme, sx) };\n\n return acc;\n }, {});\n}","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { color }) => {\n const { palette } = theme;\n\n if (!color) { return {}; }\n\n return {\n color: color(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { background }) => {\n const { palette } = theme;\n\n if (!background) { return {}; }\n\n return {\n background: background(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { borderColor }) => {\n const { palette } = theme;\n\n if (!borderColor) { return {}; }\n\n return {\n borderColor: borderColor(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { backgroundColor }) => {\n const { palette } = theme;\n\n if (!backgroundColor) { return {}; }\n\n return {\n backgroundColor: backgroundColor(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { borderRadius }) => {\n const { shape } = theme;\n\n if (!borderRadius) { return {}; }\n\n return {\n borderRadius: `${shape.radius * borderRadius}px`\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { m, mb, ml, mr, mt, mx, my }) => {\n const { spacing } = theme;\n\n const calculateMargin = (mg?: number) => {\n return !!mg || mg === 0 ? `${String(mg * spacing)}px` : '';\n };\n\n const hasM = calculateMargin(m);\n\n const hasMt = calculateMargin(mt);\n const hasMb = calculateMargin(mb);\n\n const hasMy = calculateMargin(my);\n const hasMx = calculateMargin(mx);\n\n const hasMl = calculateMargin(ml);\n const hasMr = calculateMargin(mr);\n\n return {\n margin: hasM,\n marginTop: hasMt || hasMy || hasM,\n marginBottom: hasMb || hasMy || hasM,\n marginLeft: hasMl || hasMx || hasM,\n marginRight: hasMr || hasMx || hasM,\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { p, pb, pl, pr, pt, px, py }) => {\n const { spacing } = theme;\n\n const calculatePadding = (pd?: number) => {\n return !!pd || pd === 0 ? `${String(pd * spacing)}px` : '';\n };\n\n const hasP = calculatePadding(p);\n\n const hasPt = calculatePadding(pt);\n const hasPb = calculatePadding(pb);\n\n const hasPy = calculatePadding(py);\n const hasPx = calculatePadding(px);\n\n const hasPl = calculatePadding(pl);\n const hasPr = calculatePadding(pr);\n\n return {\n padding: hasP,\n paddingTop: hasPt || hasPy || hasP,\n paddingBottom: hasPb || hasPy || hasP,\n paddingLeft: hasPl || hasPx || hasP,\n paddingRight: hasPr || hasPx || hasP,\n };\n});","import { boxShadowSmall, boxShadowRegular, boxShadowLarge } from '@iziui/tokens/web/js';\n\nimport definePlugin from '../../definePlugin';\nimport type { CustomOptions } from '../../../options/CustomOptions';\n\ntype ExtractSize = NonNullable<CustomOptions['boxShadow']>;\n\nexport default definePlugin((_, { boxShadow }) => {\n\n if (!boxShadow) { return {}; }\n\n const sizes: { [s in ExtractSize]: string } = {\n sm: boxShadowSmall,\n md: boxShadowRegular,\n lg: boxShadowLarge,\n };\n\n return {\n boxShadow: sizes[boxShadow]\n };\n});","import type { ComponentType, FC } from 'react';\n\nimport type { Sx } from '@iziui/core/
|
|
1
|
+
{"version":3,"file":"createComponent-CTufIEiN.cjs","sources":["../../../../core/src/options/createOptions/createOptions.ts","../../../../core/src/plugin/color/defineColor/defineColor.ts","../../../../core/src/plugin/color/defineBackground/defineBackground.ts","../../../../core/src/plugin/color/defineBorderColor/defineBorderColor.ts","../../../../core/src/plugin/color/defineBackgroundColor/defineBackgroundColor.ts","../../../../core/src/plugin/shape/defineBorderRadius/defineBorderRadius.ts","../../../../core/src/plugin/spacing/defineMargin/defineMargin.ts","../../../../core/src/plugin/spacing/definePadding/definePadding.ts","../../../../core/src/plugin/behavior/defineBoxShadow/defineBoxShadow.ts","../../src/core/createComponent.tsx"],"sourcesContent":["import type { Properties } from 'csstype';\n\nimport type { Plugin } from '../../plugin';\nimport type { ThemeBuilded } from '../../theme';\nimport type { CustomOptions } from '../CustomOptions';\n\ntype Data = {\n sx: CustomOptions;\n theme: ThemeBuilded;\n}\n\nexport default function createOptions({ sx, theme }: Data, ...plugins: Plugin[]): Properties {\n return plugins.reduce<Properties>((acc, plugin) => {\n acc = { ...acc, ...plugin(theme, sx) };\n\n return acc;\n }, {});\n}","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { color }) => {\n const { palette } = theme;\n\n if (!color) { return {}; }\n\n return {\n color: color(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { background }) => {\n const { palette } = theme;\n\n if (!background) { return {}; }\n\n return {\n background: background(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { borderColor }) => {\n const { palette } = theme;\n\n if (!borderColor) { return {}; }\n\n return {\n borderColor: borderColor(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { backgroundColor }) => {\n const { palette } = theme;\n\n if (!backgroundColor) { return {}; }\n\n return {\n backgroundColor: backgroundColor(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { borderRadius }) => {\n const { shape } = theme;\n\n if (!borderRadius) { return {}; }\n\n return {\n borderRadius: `${shape.radius * borderRadius}px`\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { m, mb, ml, mr, mt, mx, my }) => {\n const { spacing } = theme;\n\n const calculateMargin = (mg?: number) => {\n return !!mg || mg === 0 ? `${String(mg * spacing)}px` : '';\n };\n\n const hasM = calculateMargin(m);\n\n const hasMt = calculateMargin(mt);\n const hasMb = calculateMargin(mb);\n\n const hasMy = calculateMargin(my);\n const hasMx = calculateMargin(mx);\n\n const hasMl = calculateMargin(ml);\n const hasMr = calculateMargin(mr);\n\n return {\n margin: hasM,\n marginTop: hasMt || hasMy || hasM,\n marginBottom: hasMb || hasMy || hasM,\n marginLeft: hasMl || hasMx || hasM,\n marginRight: hasMr || hasMx || hasM,\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { p, pb, pl, pr, pt, px, py }) => {\n const { spacing } = theme;\n\n const calculatePadding = (pd?: number) => {\n return !!pd || pd === 0 ? `${String(pd * spacing)}px` : '';\n };\n\n const hasP = calculatePadding(p);\n\n const hasPt = calculatePadding(pt);\n const hasPb = calculatePadding(pb);\n\n const hasPy = calculatePadding(py);\n const hasPx = calculatePadding(px);\n\n const hasPl = calculatePadding(pl);\n const hasPr = calculatePadding(pr);\n\n return {\n padding: hasP,\n paddingTop: hasPt || hasPy || hasP,\n paddingBottom: hasPb || hasPy || hasP,\n paddingLeft: hasPl || hasPx || hasP,\n paddingRight: hasPr || hasPx || hasP,\n };\n});","import { boxShadowSmall, boxShadowRegular, boxShadowLarge } from '@iziui/tokens/web/js';\n\nimport definePlugin from '../../definePlugin';\nimport type { CustomOptions } from '../../../options/CustomOptions';\n\ntype ExtractSize = NonNullable<CustomOptions['boxShadow']>;\n\nexport default definePlugin((_, { boxShadow }) => {\n\n if (!boxShadow) { return {}; }\n\n const sizes: { [s in ExtractSize]: string } = {\n sm: boxShadowSmall,\n md: boxShadowRegular,\n lg: boxShadowLarge,\n };\n\n return {\n boxShadow: sizes[boxShadow]\n };\n});","import type { ComponentType, FC } from 'react';\n\nimport type { Sx } from '@iziui/core/system';\nimport type { Plugin } from '@iziui/core/plugin';\nimport createOptions from '@iziui/core/options';\nimport * as plugins from '@iziui/core/plugin';\n\nimport { useTheme } from '@/theme';\n\nfunction extract(module: { [key: string]: Plugin }) {\n return Object.values(module).map((fn) => fn);\n}\n\nexport default function createComponent<P>(WrappedComponent: ComponentType<P>) {\n WrappedComponent.displayName = WrappedComponent.name;\n\n const EnhancedComponent: FC<Sx<P>> = ({ sx, fullWidth, ...props }) => {\n const { theme } = useTheme();\n\n const options = sx && createOptions({ theme, sx },\n ...extract(plugins),\n );\n\n return (\n <WrappedComponent\n {...(props as P)}\n style={{\n boxSizing: 'border-box',\n ...props['style'],\n ...options,\n ...(fullWidth ? { width: '100%' } : {}),\n }}\n />\n );\n };\n\n return EnhancedComponent;\n}"],"names":["createOptions","sx","theme","plugins","acc","plugin","defineColor","color","palette","defineBackground","background","defineBorderColor","borderColor","defineBackgroundColor","backgroundColor","defineBorderRadius","borderRadius","shape","defineMargin","m","mb","ml","mr","mt","mx","my","spacing","calculateMargin","mg","hasM","hasMt","hasMb","hasMy","hasMx","hasMl","hasMr","definePadding","p","pb","pl","pr","pt","px","py","calculatePadding","pd","hasP","hasPt","hasPb","hasPy","hasPx","hasPl","hasPr","defineBoxShadow","_","boxShadow","boxShadowSmall","boxShadowRegular","boxShadowLarge","extract","module","fn","createComponent","WrappedComponent","fullWidth","props","useTheme","options","jsx"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent-WNQRXK89.js","sources":["../../../../core/src/options/createOptions/createOptions.ts","../../../../core/src/plugin/color/defineColor/defineColor.ts","../../../../core/src/plugin/color/defineBackground/defineBackground.ts","../../../../core/src/plugin/color/defineBorderColor/defineBorderColor.ts","../../../../core/src/plugin/color/defineBackgroundColor/defineBackgroundColor.ts","../../../../core/src/plugin/shape/defineBorderRadius/defineBorderRadius.ts","../../../../core/src/plugin/spacing/defineMargin/defineMargin.ts","../../../../core/src/plugin/spacing/definePadding/definePadding.ts","../../../../core/src/plugin/behavior/defineBoxShadow/defineBoxShadow.ts","../../src/core/createComponent.tsx"],"sourcesContent":["import type { Properties } from 'csstype';\n\nimport type { Plugin } from '../../plugin';\nimport type { ThemeBuilded } from '../../theme';\nimport type { CustomOptions } from '../CustomOptions';\n\ntype Data = {\n sx: CustomOptions;\n theme: ThemeBuilded;\n}\n\nexport default function createOptions({ sx, theme }: Data, ...plugins: Plugin[]): Properties {\n return plugins.reduce<Properties>((acc, plugin) => {\n acc = { ...acc, ...plugin(theme, sx) };\n\n return acc;\n }, {});\n}","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { color }) => {\n const { palette } = theme;\n\n if (!color) { return {}; }\n\n return {\n color: color(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { background }) => {\n const { palette } = theme;\n\n if (!background) { return {}; }\n\n return {\n background: background(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { borderColor }) => {\n const { palette } = theme;\n\n if (!borderColor) { return {}; }\n\n return {\n borderColor: borderColor(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { backgroundColor }) => {\n const { palette } = theme;\n\n if (!backgroundColor) { return {}; }\n\n return {\n backgroundColor: backgroundColor(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { borderRadius }) => {\n const { shape } = theme;\n\n if (!borderRadius) { return {}; }\n\n return {\n borderRadius: `${shape.radius * borderRadius}px`\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { m, mb, ml, mr, mt, mx, my }) => {\n const { spacing } = theme;\n\n const calculateMargin = (mg?: number) => {\n return !!mg || mg === 0 ? `${String(mg * spacing)}px` : '';\n };\n\n const hasM = calculateMargin(m);\n\n const hasMt = calculateMargin(mt);\n const hasMb = calculateMargin(mb);\n\n const hasMy = calculateMargin(my);\n const hasMx = calculateMargin(mx);\n\n const hasMl = calculateMargin(ml);\n const hasMr = calculateMargin(mr);\n\n return {\n margin: hasM,\n marginTop: hasMt || hasMy || hasM,\n marginBottom: hasMb || hasMy || hasM,\n marginLeft: hasMl || hasMx || hasM,\n marginRight: hasMr || hasMx || hasM,\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { p, pb, pl, pr, pt, px, py }) => {\n const { spacing } = theme;\n\n const calculatePadding = (pd?: number) => {\n return !!pd || pd === 0 ? `${String(pd * spacing)}px` : '';\n };\n\n const hasP = calculatePadding(p);\n\n const hasPt = calculatePadding(pt);\n const hasPb = calculatePadding(pb);\n\n const hasPy = calculatePadding(py);\n const hasPx = calculatePadding(px);\n\n const hasPl = calculatePadding(pl);\n const hasPr = calculatePadding(pr);\n\n return {\n padding: hasP,\n paddingTop: hasPt || hasPy || hasP,\n paddingBottom: hasPb || hasPy || hasP,\n paddingLeft: hasPl || hasPx || hasP,\n paddingRight: hasPr || hasPx || hasP,\n };\n});","import { boxShadowSmall, boxShadowRegular, boxShadowLarge } from '@iziui/tokens/web/js';\n\nimport definePlugin from '../../definePlugin';\nimport type { CustomOptions } from '../../../options/CustomOptions';\n\ntype ExtractSize = NonNullable<CustomOptions['boxShadow']>;\n\nexport default definePlugin((_, { boxShadow }) => {\n\n if (!boxShadow) { return {}; }\n\n const sizes: { [s in ExtractSize]: string } = {\n sm: boxShadowSmall,\n md: boxShadowRegular,\n lg: boxShadowLarge,\n };\n\n return {\n boxShadow: sizes[boxShadow]\n };\n});","import type { ComponentType, FC } from 'react';\n\nimport type { Sx } from '@iziui/core/
|
|
1
|
+
{"version":3,"file":"createComponent-WNQRXK89.js","sources":["../../../../core/src/options/createOptions/createOptions.ts","../../../../core/src/plugin/color/defineColor/defineColor.ts","../../../../core/src/plugin/color/defineBackground/defineBackground.ts","../../../../core/src/plugin/color/defineBorderColor/defineBorderColor.ts","../../../../core/src/plugin/color/defineBackgroundColor/defineBackgroundColor.ts","../../../../core/src/plugin/shape/defineBorderRadius/defineBorderRadius.ts","../../../../core/src/plugin/spacing/defineMargin/defineMargin.ts","../../../../core/src/plugin/spacing/definePadding/definePadding.ts","../../../../core/src/plugin/behavior/defineBoxShadow/defineBoxShadow.ts","../../src/core/createComponent.tsx"],"sourcesContent":["import type { Properties } from 'csstype';\n\nimport type { Plugin } from '../../plugin';\nimport type { ThemeBuilded } from '../../theme';\nimport type { CustomOptions } from '../CustomOptions';\n\ntype Data = {\n sx: CustomOptions;\n theme: ThemeBuilded;\n}\n\nexport default function createOptions({ sx, theme }: Data, ...plugins: Plugin[]): Properties {\n return plugins.reduce<Properties>((acc, plugin) => {\n acc = { ...acc, ...plugin(theme, sx) };\n\n return acc;\n }, {});\n}","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { color }) => {\n const { palette } = theme;\n\n if (!color) { return {}; }\n\n return {\n color: color(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { background }) => {\n const { palette } = theme;\n\n if (!background) { return {}; }\n\n return {\n background: background(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { borderColor }) => {\n const { palette } = theme;\n\n if (!borderColor) { return {}; }\n\n return {\n borderColor: borderColor(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { backgroundColor }) => {\n const { palette } = theme;\n\n if (!backgroundColor) { return {}; }\n\n return {\n backgroundColor: backgroundColor(palette)\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { borderRadius }) => {\n const { shape } = theme;\n\n if (!borderRadius) { return {}; }\n\n return {\n borderRadius: `${shape.radius * borderRadius}px`\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { m, mb, ml, mr, mt, mx, my }) => {\n const { spacing } = theme;\n\n const calculateMargin = (mg?: number) => {\n return !!mg || mg === 0 ? `${String(mg * spacing)}px` : '';\n };\n\n const hasM = calculateMargin(m);\n\n const hasMt = calculateMargin(mt);\n const hasMb = calculateMargin(mb);\n\n const hasMy = calculateMargin(my);\n const hasMx = calculateMargin(mx);\n\n const hasMl = calculateMargin(ml);\n const hasMr = calculateMargin(mr);\n\n return {\n margin: hasM,\n marginTop: hasMt || hasMy || hasM,\n marginBottom: hasMb || hasMy || hasM,\n marginLeft: hasMl || hasMx || hasM,\n marginRight: hasMr || hasMx || hasM,\n };\n});","import definePlugin from '../../definePlugin';\n\nexport default definePlugin((theme, { p, pb, pl, pr, pt, px, py }) => {\n const { spacing } = theme;\n\n const calculatePadding = (pd?: number) => {\n return !!pd || pd === 0 ? `${String(pd * spacing)}px` : '';\n };\n\n const hasP = calculatePadding(p);\n\n const hasPt = calculatePadding(pt);\n const hasPb = calculatePadding(pb);\n\n const hasPy = calculatePadding(py);\n const hasPx = calculatePadding(px);\n\n const hasPl = calculatePadding(pl);\n const hasPr = calculatePadding(pr);\n\n return {\n padding: hasP,\n paddingTop: hasPt || hasPy || hasP,\n paddingBottom: hasPb || hasPy || hasP,\n paddingLeft: hasPl || hasPx || hasP,\n paddingRight: hasPr || hasPx || hasP,\n };\n});","import { boxShadowSmall, boxShadowRegular, boxShadowLarge } from '@iziui/tokens/web/js';\n\nimport definePlugin from '../../definePlugin';\nimport type { CustomOptions } from '../../../options/CustomOptions';\n\ntype ExtractSize = NonNullable<CustomOptions['boxShadow']>;\n\nexport default definePlugin((_, { boxShadow }) => {\n\n if (!boxShadow) { return {}; }\n\n const sizes: { [s in ExtractSize]: string } = {\n sm: boxShadowSmall,\n md: boxShadowRegular,\n lg: boxShadowLarge,\n };\n\n return {\n boxShadow: sizes[boxShadow]\n };\n});","import type { ComponentType, FC } from 'react';\n\nimport type { Sx } from '@iziui/core/system';\nimport type { Plugin } from '@iziui/core/plugin';\nimport createOptions from '@iziui/core/options';\nimport * as plugins from '@iziui/core/plugin';\n\nimport { useTheme } from '@/theme';\n\nfunction extract(module: { [key: string]: Plugin }) {\n return Object.values(module).map((fn) => fn);\n}\n\nexport default function createComponent<P>(WrappedComponent: ComponentType<P>) {\n WrappedComponent.displayName = WrappedComponent.name;\n\n const EnhancedComponent: FC<Sx<P>> = ({ sx, fullWidth, ...props }) => {\n const { theme } = useTheme();\n\n const options = sx && createOptions({ theme, sx },\n ...extract(plugins),\n );\n\n return (\n <WrappedComponent\n {...(props as P)}\n style={{\n boxSizing: 'border-box',\n ...props['style'],\n ...options,\n ...(fullWidth ? { width: '100%' } : {}),\n }}\n />\n );\n };\n\n return EnhancedComponent;\n}"],"names":["createOptions","sx","theme","plugins","acc","plugin","defineColor","color","palette","defineBackground","background","defineBorderColor","borderColor","defineBackgroundColor","backgroundColor","defineBorderRadius","borderRadius","shape","defineMargin","m","mb","ml","mr","mt","mx","my","spacing","calculateMargin","mg","hasM","hasMt","hasMb","hasMy","hasMx","hasMl","hasMr","definePadding","p","pb","pl","pr","pt","px","py","calculatePadding","pd","hasP","hasPt","hasPb","hasPy","hasPx","hasPl","hasPr","defineBoxShadow","_","boxShadow","boxShadowSmall","boxShadowRegular","boxShadowLarge","extract","module","fn","createComponent","WrappedComponent","fullWidth","props","useTheme","options","jsx"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/DrawerContent-XhAQ7dg_.cjs");require("react");require("react/jsx-runtime");require("../../chunks/index-DYxwT4uW.cjs");require("../../chunks/joinClass-Jk3EszKD.cjs");require("../../chunks/Stack-beBM7a60.cjs");require("../../chunks/createComponent-CTufIEiN.cjs");require("../../chunks/useTheme-DoESyi5h.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");require("../../chunks/ButtonIcon-Cz8zJH-E.cjs");require("../../chunks/convertPathToColor-BlQMLS4V.cjs");require("../../chunks/Ripple-Dy4i91j1.cjs");require("../../chunks/Icon-COl2Nhp9.cjs");exports.Drawer=e.Drawer_default;exports.DrawerContent=e.DrawerContent_default;exports.DrawerFooter=e.DrawerFooter_default;exports.DrawerHeader=e.DrawerHeader_default;exports.useDrawer=e.useDrawer;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as
|
|
1
|
+
import{D as c,a as d,b as f,c as x,u as C}from"../../chunks/DrawerContent-B0yuNjrh.js";import"react";import"react/jsx-runtime";import"../../chunks/index-CZ41y9Hn.js";import"../../chunks/joinClass-anSpaauN.js";import"../../chunks/Stack-DK5pfu2w.js";import"../../chunks/createComponent-WNQRXK89.js";import"../../chunks/useTheme-njpgklWP.js";import"../../chunks/generateSupportColors-BN5t8dA-.js";import"../../chunks/ButtonIcon-CsX4oYeI.js";import"../../chunks/convertPathToColor-D2SdAqGh.js";import"../../chunks/Ripple-Bq9bxg4k.js";import"../../chunks/Icon-CCIgEwA9.js";export{c as Drawer,d as DrawerContent,f as DrawerFooter,x as DrawerHeader,C as useDrawer};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./chunks/useTheme-DoESyi5h.cjs"),n=require("./chunks/Bounce-ByNbJjX0.cjs"),e=require("./chunks/useForm-TyKbw7O8.cjs"),i=require("./chunks/Fade-CM-5xRVt.cjs"),s=require("./chunks/Slide-D4aLHjYS.cjs"),a=require("./chunks/Zoom-BOnqwiDY.cjs"),r=require("./chunks/DrawerContent-XhAQ7dg_.cjs"),d=require("./chunks/useListenerResized-AwpsZLcP.cjs"),o=require("./chunks/useMenu-C0u9aTiR.cjs"),q=require("./chunks/useResize-B-oebgDR.cjs"),c=require("./chunks/Card-B8XSgLaD.cjs"),m=require("./chunks/CardContent-BivcVoIc.cjs"),t=require("./chunks/GridItem-wwo-SHGR.cjs"),C=require("./chunks/MenuButton-AyzSxRY0.cjs"),l=require("./chunks/Typography-CAQXUFSQ.cjs");require("react");require("react/jsx-runtime");require("./chunks/generateSupportColors-CTMoGhDf.cjs");require("./chunks/index-DYxwT4uW.cjs");require("./chunks/joinClass-Jk3EszKD.cjs");require("./chunks/Stack-beBM7a60.cjs");require("./chunks/createComponent-CTufIEiN.cjs");require("./chunks/ButtonIcon-Cz8zJH-E.cjs");require("./chunks/convertPathToColor-BlQMLS4V.cjs");require("./chunks/Ripple-Dy4i91j1.cjs");require("./chunks/Icon-COl2Nhp9.cjs");require("./chunks/uuid-omnJ9TjZ.cjs");exports.ThemeProvider=u.ThemeProvider;exports.createTheme=u.createTheme;exports.useTheme=u.useTheme;exports.Bounce=n.Bounce;exports.Control=e.Control;exports.Form=e.Form;exports.useControl=e.useControl;exports.useForm=e.useForm;exports.useFormGroup=e.useFormGroup;exports.Fade=i.Fade;exports.Slide=s.Slide;exports.Zoom=a.Zoom;exports.Drawer=r.Drawer_default;exports.DrawerContent=r.DrawerContent_default;exports.DrawerFooter=r.DrawerFooter_default;exports.DrawerHeader=r.DrawerHeader_default;exports.useDrawer=r.useDrawer;exports.useListenerResized=d.useListenerResized;exports.Menu=o.Menu;exports.useMenu=o.useMenu;exports.useResize=q.useResize;exports.Card=c.Card;exports.CardContent=m.CardContent;exports.Grid=t.Grid;exports.GridItem=t.GridItem;exports.MenuButton=C.MenuButton_default;exports.variants=l.variants;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as
|
|
1
|
+
import{T as C,c as F,u as D}from"./chunks/useTheme-njpgklWP.js";import{B as M}from"./chunks/Bounce-DP0PU3kr.js";import{C as G,F as T,u as h,a as l,b as v}from"./chunks/useForm-3oClzOJC.js";import{F as b}from"./chunks/Fade-spxq-W-Q.js";import{S as R}from"./chunks/Slide-BxEwoZ70.js";import{Z}from"./chunks/Zoom-DqgU4Wfv.js";import{D as I,a as L,b as P,c as g,u as j}from"./chunks/DrawerContent-B0yuNjrh.js";import{u as q}from"./chunks/useListenerResized-Bnqxrt7k.js";import{M as A,u as E}from"./chunks/useMenu-BNL22pOQ.js";import{u as K}from"./chunks/useResize-BjM6tiAF.js";import{C as O}from"./chunks/Card-DOsl4_nu.js";import{C as U}from"./chunks/CardContent-C8ypE7yH.js";import{G as W,a as X}from"./chunks/GridItem-CaoPZmBu.js";import{M as _}from"./chunks/MenuButton-DLf22r80.js";import{v as rr}from"./chunks/Typography-BIZP_DtQ.js";import"react";import"react/jsx-runtime";import"./chunks/generateSupportColors-BN5t8dA-.js";import"./chunks/index-CZ41y9Hn.js";import"./chunks/joinClass-anSpaauN.js";import"./chunks/Stack-DK5pfu2w.js";import"./chunks/createComponent-WNQRXK89.js";import"./chunks/ButtonIcon-CsX4oYeI.js";import"./chunks/convertPathToColor-D2SdAqGh.js";import"./chunks/Ripple-Bq9bxg4k.js";import"./chunks/Icon-CCIgEwA9.js";import"./chunks/uuid-dGvr9vBZ.js";export{M as Bounce,O as Card,U as CardContent,G as Control,I as Drawer,L as DrawerContent,P as DrawerFooter,g as DrawerHeader,b as Fade,T as Form,W as Grid,X as GridItem,A as Menu,_ as MenuButton,R as Slide,C as ThemeProvider,Z as Zoom,F as createTheme,h as useControl,j as useDrawer,l as useForm,v as useFormGroup,q as useListenerResized,E as useMenu,K as useResize,D as useTheme,rr as variants};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/style.css
CHANGED
|
@@ -29,9 +29,6 @@
|
|
|
29
29
|
/* assets/Typography-DNgVH0In.css */
|
|
30
30
|
.iziui-typography{transition:all .3s cubic-bezier(.4,0,.2,1);margin:0;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.iziui-typography--weight-bold{font-weight:700!important}.iziui-typography--weight-light{font-weight:300!important}.iziui-typography--weight-normal{font-weight:500!important}.iziui-typography--h1{font-size:clamp(2rem,1.65rem + 1.6vw,3rem);line-height:1.12;letter-spacing:-.02em}.iziui-typography--h2{font-size:clamp(1.75rem,1.5rem + 1.2vw,2.5rem);line-height:1.16;letter-spacing:-.015em;font-weight:700}.iziui-typography--h3{font-size:clamp(1.5rem,1.35rem + .9vw,2rem);line-height:1.2;letter-spacing:-.01em}.iziui-typography--h4{font-size:clamp(1.25rem,1.15rem + .6vw,1.5rem);line-height:1.25;letter-spacing:-.005em}.iziui-typography--h5{font-size:clamp(1.125rem,1.05rem + .4vw,1.25rem);line-height:1.3;letter-spacing:0;font-weight:600}.iziui-typography--h6{font-size:clamp(1rem,.98rem + .25vw,1.125rem);line-height:1.35;letter-spacing:.01em}.iziui-typography--subtitle1{font-size:clamp(1.0625rem,1.02rem + .25vw,1.125rem);line-height:1.5;letter-spacing:.005em}.iziui-typography--subtitle2{font-size:clamp(.9375rem,.92rem + .2vw,1rem);line-height:1.45;letter-spacing:.01em}.iziui-typography--body1{font-size:clamp(1rem,.95rem + .2vw,1.0625rem);line-height:1.6;letter-spacing:0}.iziui-typography--body2{font-size:clamp(.875rem,.85rem + .2vw,.9375rem);line-height:1.55;letter-spacing:0}
|
|
31
31
|
/*$vite$:1*/
|
|
32
|
-
/* assets/ButtonIcon-YI9r-K74.css */
|
|
33
|
-
.iziui-button-icon{position:relative;border-radius:50%;border:none;background-color:transparent;transition:all .3s cubic-bezier(.4,0,.2,1);cursor:pointer;padding:5px;display:flex;justify-content:center;align-items:center}.iziui-button-icon:hover{background-color:var(--divider)}.iziui-button-icon:disabled{background-color:var(--text-disabled);color:var(--text-secondary);cursor:not-allowed}.iziui-button-icon:disabled:hover{background-color:var(--text-disabled)!important}.iziui-button-icon--primary{color:var(--primary)}.iziui-button-icon--primary:hover{background-color:var(--primary-opacity)}.iziui-button-icon--secondary{color:var(--secondary)}.iziui-button-icon--secondary:hover{background-color:var(--secondary-opacity)}.iziui-button-icon--info{color:var(--info)}.iziui-button-icon--info:hover{background-color:var(--info-opacity)}.iziui-button-icon--error{color:var(--error)}.iziui-button-icon--error:hover{background-color:var(--error-opacity)}.iziui-button-icon--warning{color:var(--warning)}.iziui-button-icon--warning:hover{background-color:var(--warning-opacity)}.iziui-button-icon--success{color:var(--success)}.iziui-button-icon--success:hover{background-color:var(--success-opacity)}
|
|
34
|
-
/*$vite$:1*/
|
|
35
32
|
/* assets/index-yaM2yh8o.css */
|
|
36
33
|
.iziui-switch{position:relative}.iziui-switch__label{font-size:12px;color:var(--text-secondary);display:block;margin-bottom:5px}.iziui-switch__label--error{color:var(--error)}.iziui-switch__checkbox{height:0;width:0;visibility:hidden;position:absolute}.iziui-switch__checkbox:active+.iziui-switch__box .iziui-switch__button{width:36px}.iziui-switch__checkbox:checked+.iziui-switch__box .iziui-switch__button{left:100%;transform:translate(calc(-100% + 2px),-50%)}.iziui-switch__checkbox--primary:checked+.iziui-switch__box{background-color:var(--primary)}.iziui-switch__checkbox--secondary:checked+.iziui-switch__box{background-color:var(--secondary)}.iziui-switch__checkbox--info:checked+.iziui-switch__box{background-color:var(--info)}.iziui-switch__checkbox--error:checked+.iziui-switch__box{background-color:var(--error)}.iziui-switch__checkbox--warning:checked+.iziui-switch__box{background-color:var(--warning)}.iziui-switch__checkbox--success:checked+.iziui-switch__box{background-color:var(--success)}.iziui-switch__box{display:flex;align-items:center;justify-content:space-between;box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d;cursor:pointer;width:58px;height:24px;background:var(--divider);border-radius:100px;position:relative;transition:background-color .3s cubic-bezier(.4,0,.2,1)}.iziui-switch__button{content:"";position:absolute;top:50%;transform:translateY(-50%);left:-2px;width:28px;height:28px;border-radius:45px;transition:all .3s cubic-bezier(.4,0,.2,1);background:#fff;box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d}.iziui-switch__helper-text{opacity:0;transition:all .3s cubic-bezier(.4,0,.2,1);font-size:12px;transform:translateY(-10px)}.iziui-switch__helper-text--visible{opacity:1;transform:translateY(0)}.iziui-switch__helper-text--error{color:var(--error)}
|
|
37
34
|
/*$vite$:1*/
|
|
@@ -43,9 +40,6 @@
|
|
|
43
40
|
/* assets/index-BZMloLhA.css */
|
|
44
41
|
.iziui-input-container{width:100%;position:relative}.iziui-input-label{font-size:12px;color:var(--text-secondary);display:block;margin-bottom:5px}.iziui-input-label--error{color:var(--error)}.iziui-input{cursor:text;border-radius:var(--radius);border:1px solid var(--divider);position:relative;background-color:var(--background-default);transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;justify-content:space-between;align-items:center}.iziui-input:focus-within{outline:2px solid var(--primary)}.iziui-input--error{border-color:var(--error)}.iziui-input--disabled{cursor:not-allowed;background:var(--divider);color:var(--text-disabled)}.iziui-input input{background:transparent;height:100%;width:100%;border:none;outline:none;-webkit-user-select:none;user-select:none;padding:10.8px 14.4px;color:var(--text-primary);transition:all .3s cubic-bezier(.4,0,.2,1);font-size:16px}.iziui-input input:-internal-autofill-selected{-webkit-text-fill-color:var(--divider)}.iziui-input input::placeholder{color:var(--text-secondary);opacity:1}.iziui-input input:disabled{cursor:not-allowed}.iziui-input__helper-text{opacity:0;margin:6px 0 0;transition:all .3s cubic-bezier(.4,0,.2,1);font-size:12px;transform:translateY(-10px)}.iziui-input__helper-text--visible{opacity:1;transform:translateY(0)}.iziui-input__helper-text--error{color:var(--error)}.iziui-input__icon{color:var(--text-secondary)}.iziui-input__icon--margin-left{margin-right:8px;margin-left:-8px}.iziui-input__icon--margin-right{margin-right:-8px;margin-left:8px}.iziui-input__icon--padding-left{padding-right:8px;padding-left:-8px}.iziui-input__icon--padding-right{padding-right:-8px;padding-left:8px}
|
|
45
42
|
/*$vite$:1*/
|
|
46
|
-
/* assets/Icon-CUCHgWoe.css */
|
|
47
|
-
.iziui-icon{transition:all .3s cubic-bezier(.4,0,.2,1);color:currentColor}
|
|
48
|
-
/*$vite$:1*/
|
|
49
43
|
/* assets/index--P_EoDIE.css */
|
|
50
44
|
.iziui-checkbox-group .iziui-checkbox--primary--checked,.iziui-checkbox-group .iziui-checkbox--primary:hover{background-color:var(--primary-opacity)}.iziui-checkbox-group .iziui-checkbox--primary:active{background-color:var(--primary-light)}.iziui-checkbox-group .iziui-checkbox--secondary--checked,.iziui-checkbox-group .iziui-checkbox--secondary:hover{background-color:var(--secondary-opacity)}.iziui-checkbox-group .iziui-checkbox--secondary:active{background-color:var(--secondary-light)}.iziui-checkbox-group .iziui-checkbox--info--checked,.iziui-checkbox-group .iziui-checkbox--info:hover{background-color:var(--info-opacity)}.iziui-checkbox-group .iziui-checkbox--info:active{background-color:var(--info-light)}.iziui-checkbox-group .iziui-checkbox--error--checked,.iziui-checkbox-group .iziui-checkbox--error:hover{background-color:var(--error-opacity)}.iziui-checkbox-group .iziui-checkbox--error:active{background-color:var(--error-light)}.iziui-checkbox-group .iziui-checkbox--warning--checked,.iziui-checkbox-group .iziui-checkbox--warning:hover{background-color:var(--warning-opacity)}.iziui-checkbox-group .iziui-checkbox--warning:active{background-color:var(--warning-light)}.iziui-checkbox-group .iziui-checkbox--success--checked,.iziui-checkbox-group .iziui-checkbox--success:hover{background-color:var(--success-opacity)}.iziui-checkbox-group .iziui-checkbox--success:active{background-color:var(--success-light)}
|
|
51
45
|
/*$vite$:1*/
|
|
@@ -55,15 +49,18 @@
|
|
|
55
49
|
/* assets/Card-CsjbyRZq.css */
|
|
56
50
|
.iziui-card{position:relative;border-radius:var(--radius);border:1px solid var(--divider);background-color:var(--background-default);transition:all .3s cubic-bezier(.4,0,.2,1);overflow:hidden}.iziui-card--clickable{cursor:pointer}.iziui-card--clickable:hover{box-shadow:0 3px 6px #00000029,0 3px 6px #0000003b;border-color:var(--primary-light)}.iziui-card__content{padding:16px;border-radius:var(--radius)}
|
|
57
51
|
/*$vite$:1*/
|
|
58
|
-
/* assets/
|
|
59
|
-
.iziui-
|
|
52
|
+
/* assets/ButtonIcon-YI9r-K74.css */
|
|
53
|
+
.iziui-button-icon{position:relative;border-radius:50%;border:none;background-color:transparent;transition:all .3s cubic-bezier(.4,0,.2,1);cursor:pointer;padding:5px;display:flex;justify-content:center;align-items:center}.iziui-button-icon:hover{background-color:var(--divider)}.iziui-button-icon:disabled{background-color:var(--text-disabled);color:var(--text-secondary);cursor:not-allowed}.iziui-button-icon:disabled:hover{background-color:var(--text-disabled)!important}.iziui-button-icon--primary{color:var(--primary)}.iziui-button-icon--primary:hover{background-color:var(--primary-opacity)}.iziui-button-icon--secondary{color:var(--secondary)}.iziui-button-icon--secondary:hover{background-color:var(--secondary-opacity)}.iziui-button-icon--info{color:var(--info)}.iziui-button-icon--info:hover{background-color:var(--info-opacity)}.iziui-button-icon--error{color:var(--error)}.iziui-button-icon--error:hover{background-color:var(--error-opacity)}.iziui-button-icon--warning{color:var(--warning)}.iziui-button-icon--warning:hover{background-color:var(--warning-opacity)}.iziui-button-icon--success{color:var(--success)}.iziui-button-icon--success:hover{background-color:var(--success-opacity)}
|
|
60
54
|
/*$vite$:1*/
|
|
61
|
-
/* assets/
|
|
62
|
-
.iziui-
|
|
55
|
+
/* assets/Icon-CUCHgWoe.css */
|
|
56
|
+
.iziui-icon{transition:all .3s cubic-bezier(.4,0,.2,1);color:currentColor}
|
|
63
57
|
/*$vite$:1*/
|
|
64
58
|
/* assets/Stack-CaqHhBiY.css */
|
|
65
59
|
.iziui-stack{width:100%;display:flex}
|
|
66
60
|
/*$vite$:1*/
|
|
61
|
+
/* assets/Ripple-D71SUpze.css */
|
|
62
|
+
.iziui-ripple-container{position:absolute;inset:0;overflow:hidden;border-radius:inherit}.iziui-ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple-animation .8s ease-out;pointer-events:none;background-color:#fff9}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}
|
|
63
|
+
/*$vite$:1*/
|
|
67
64
|
/* assets/index-Di07gTyh.css */
|
|
68
65
|
.iziui-avatar{display:flex;position:relative;align-items:center;justify-content:center;flex-shrink:0;font-size:1.25rem;line-height:1;overflow:hidden;-webkit-user-select:none;user-select:none;border:1px solid var(--divider);transition:all .3s cubic-bezier(.4,0,.2,1)}.iziui-avatar--rounded{border-radius:var(--radius)}.iziui-avatar--circular{border-radius:50%}.iziui-avatar--clickable{cursor:pointer}.iziui-avatar--primary{color:var(--primary-contrast);background-color:var(--primary)}.iziui-avatar--secondary{color:var(--secondary-contrast);background-color:var(--secondary)}.iziui-avatar--info{color:var(--info-contrast);background-color:var(--info)}.iziui-avatar--error{color:var(--error-contrast);background-color:var(--error)}.iziui-avatar--warning{color:var(--warning-contrast);background-color:var(--warning)}.iziui-avatar--success{color:var(--success-contrast);background-color:var(--success)}.iziui-avatar__icon{color:currentColor!important}
|
|
69
66
|
/*$vite$:1*/
|
|
@@ -79,6 +76,9 @@
|
|
|
79
76
|
/* assets/useMenu-Bmun71gn.css */
|
|
80
77
|
.iziui-menu{position:absolute;word-break:break-all;white-space:pre-wrap;display:flex;flex-direction:column;z-index:4}.iziui-menu__overlay{position:fixed;height:100vh;width:100%;top:0;left:0;z-index:3;cursor:auto}.iziui-menu__card{box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d}.iziui-menu__card__content{overflow:auto;padding:8px 0}.iziui-menu--open{opacity:1;transform:translateY(0)}.iziui-menu--close{transform:translateY(-10px);opacity:0}.iziui-menu__item{border:none;padding:8px 16px;position:relative;white-space:nowrap;background-color:transparent;color:var(--text-primary);transition:all .3s cubic-bezier(.4,0,.2,1);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:flex-start}.iziui-menu__item:hover{background-color:var(--divider)}.iziui-menu__item--primary{color:var(--primary)}.iziui-menu__item--primary:hover{background-color:var(--primary-opacity)}.iziui-menu__item--secondary{color:var(--secondary)}.iziui-menu__item--secondary:hover{background-color:var(--secondary-opacity)}.iziui-menu__item--info{color:var(--info)}.iziui-menu__item--info:hover{background-color:var(--info-opacity)}.iziui-menu__item--error{color:var(--error)}.iziui-menu__item--error:hover{background-color:var(--error-opacity)}.iziui-menu__item--warning{color:var(--warning)}.iziui-menu__item--warning:hover{background-color:var(--warning-opacity)}.iziui-menu__item--success{color:var(--success)}.iziui-menu__item--success:hover{background-color:var(--success-opacity)}
|
|
81
78
|
/*$vite$:1*/
|
|
79
|
+
/* assets/DrawerContent-CPC_3egd.css */
|
|
80
|
+
.iziui-drawer{top:0;left:0;width:100%;height:100vh;position:fixed;overflow:hidden;transition:all ease-in-out .3s;z-index:50}.iziui-drawer__overlay{position:fixed;top:0;left:0;width:100%;height:100%;opacity:0;background-color:#000000a3;transition:all ease-in-out .3s;z-index:50}.iziui-drawer__overlay--show{opacity:1}.iziui-drawer__content{position:fixed;z-index:90;background-color:var(--background-default);transition:all ease-in-out .3s;width:570px;height:100vh}@media only screen and (max-width:899px){.iziui-drawer__content{width:100%}}.iziui-drawer__content__container{height:100%;padding:1rem;overflow-y:auto;overflow-x:hidden}.iziui-drawer__content__close-button{display:flex;padding:1rem}.iziui-drawer__content--right .iziui-drawer__content__close-button,.iziui-drawer__content--bottom .iziui-drawer__content__close-button{justify-content:flex-end}.iziui-drawer__content--left .iziui-drawer__content__close-button{justify-content:flex-start}.iziui-drawer__content--left{top:0;height:100%;transform:translate(-100%)}.iziui-drawer__content--left--show{transform:translate(0)}.iziui-drawer__content--right{top:0;right:0;height:100%;transform:translate(100%)}.iziui-drawer__content--right--show{transform:translate(0)}.iziui-drawer__content--bottom{bottom:0;width:100%;border-radius:var(--radius) var(--radius) 0 0;transform:translateY(100%);height:auto}.iziui-drawer__content--bottom--show{transform:translateY(0)}.iziui-drawer__header{width:100%;padding:1rem;box-sizing:border-box;border-bottom:1px solid var(--divider)}.iziui-drawer__footer{width:100%;padding:1rem;box-sizing:border-box;border-top:1px solid var(--divider)}
|
|
81
|
+
/*$vite$:1*/
|
|
82
82
|
/* assets/useTheme-d4AkXEDG.css */
|
|
83
83
|
*{box-sizing:border-box}html,body{margin:0;height:auto;transition:all .3s cubic-bezier(.4,0,.2,1)}h1,h2,h3,h4,h5,h6,p,a,button,label,span,th,tr,td,dl,dt,ul,li,ol{font-family:var(--typography)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{box-shadow:inset 0 0 5px gray}::-webkit-scrollbar-thumb{background:#a2a2a2;border-radius:10px}::selection{background:var(--primary);color:var(--primary-contrast)}
|
|
84
84
|
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),l=require("react"),t=require("./index-DYxwT4uW.cjs"),i=require("./joinClass-Jk3EszKD.cjs"),h=require("./Stack-beBM7a60.cjs"),j=require("./createComponent-CTufIEiN.cjs");function y({open:a,header:d,body:u,footer:f,direction:o="right",onClose:m,...c}){const[n,r]=l.useState({visible:!1,animation:"hide"}),w=300,_=i.joinClass(`${t.prefix}-drawer`,c.className),v=i.joinClass(`${t.prefix}-drawer__content`,`${t.prefix}-drawer__content--${o}`,`${t.prefix}-drawer__content--${o}--${n.animation}`),x=i.joinClass(`${t.prefix}-drawer__overlay`,`${t.prefix}-drawer__overlay--${n.animation}`);l.useEffect(()=>{let e;if(a){e=C();return}return e=$(),()=>{clearTimeout(e)}},[a]);const C=()=>(r(e=>({...e,visible:!0})),setTimeout(()=>{r(e=>({...e,animation:"show"})),document.body.style.overflow="hidden"},100)),$=()=>(r(e=>({...e,animation:"hide"})),setTimeout(()=>{r(e=>({...e,visible:!1})),document.body.style.overflow=""},w));return n.visible&&s.jsxs("div",{...c,className:_,children:[s.jsxs(h.Stack,{className:v,children:[d,u,f]}),s.jsx("div",{"data-testid":"drawer-overlay",className:x,onClick:m})]})}const N=j.createComponent(y);exports.Drawer_default=N;
|
|
2
|
-
//# sourceMappingURL=Drawer-0wOdungj.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer-0wOdungj.cjs","sources":["../../src/navigation/Drawer/Drawer.tsx"],"sourcesContent":["import { useEffect, useState, type HTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils';\n\nimport Stack from '@/layout/Stack';\n\nimport createComponent from '../../core/createComponent';\n\nimport '@iziui/styles/components/Drawer.scss';\n\ntype Direction = 'right' | 'left' | 'bottom';\ntype AnimationClass = 'show' | 'hide';\ntype Config = { animation: AnimationClass; visible: boolean };\n\nexport interface DrawerProps extends HTMLAttributes<HTMLDivElement> {\n open: boolean;\n direction?: Direction;\n body: React.JSX.Element;\n header?: React.JSX.Element;\n footer?: React.JSX.Element;\n onClose: () => void;\n};\n\nfunction Drawer({\n open,\n header,\n body,\n footer,\n direction = 'right',\n onClose,\n ...props\n}: DrawerProps) {\n const [config, setConfig] = useState<Config>({ visible: false, animation: 'hide' });\n\n const ANIMATION_DURATION = 300;\n\n const cls = joinClass(\n `${prefix}-drawer`,\n props.className\n );\n\n const contentCls = joinClass(\n `${prefix}-drawer__content`,\n `${prefix}-drawer__content--${direction}`,\n `${prefix}-drawer__content--${direction}--${config.animation}`,\n );\n\n const overlayCls = joinClass(\n `${prefix}-drawer__overlay`,\n `${prefix}-drawer__overlay--${config.animation}`,\n );\n\n useEffect(() => {\n let timer: NodeJS.Timeout;\n\n if (open) {\n timer = handleOpen();\n return;\n }\n\n timer = handleClose();\n\n return () => {\n clearTimeout(timer);\n };\n }, [open]);\n\n const handleOpen = () => {\n setConfig(prev => ({ ...prev, visible: true }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, animation: 'show' }));\n document.body.style.overflow = 'hidden';\n }, 100);\n };\n\n const handleClose = () => {\n setConfig(prev => ({ ...prev, animation: 'hide' }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, visible: false }));\n document.body.style.overflow = '';\n }, ANIMATION_DURATION);\n };\n\n return (\n config.visible && (\n <div {...props} className={cls}>\n <Stack className={contentCls}>\n {header}\n {body}\n {footer}\n </Stack>\n <div\n data-testid=\"drawer-overlay\"\n className={overlayCls}\n onClick={onClose}\n />\n </div>\n )\n );\n}\n\nexport default createComponent(Drawer);\n"],"names":["Drawer","open","header","body","footer","direction","onClose","props","config","setConfig","useState","ANIMATION_DURATION","cls","joinClass","prefix","contentCls","overlayCls","useEffect","timer","handleOpen","handleClose","prev","jsxs","Stack","jsx","Drawer_default","createComponent"],"mappings":"2NAyBA,SAASA,EAAO,CACd,KAAAC,EACA,OAAAC,EACA,KAAAC,EACA,OAAAC,EACA,UAAAC,EAAY,QACZ,QAAAC,EACA,GAAGC,CACL,EAAgB,CACd,KAAM,CAACC,EAAQC,CAAS,EAAIC,EAAAA,SAAiB,CAAE,QAAS,GAAO,UAAW,OAAQ,EAE5EC,EAAqB,IAErBC,EAAMC,EAAAA,UACV,GAAGC,EAAAA,MAAM,UACTP,EAAM,SAAA,EAGFQ,EAAaF,EAAAA,UACjB,GAAGC,EAAAA,MAAM,mBACT,GAAGA,EAAAA,MAAM,qBAAqBT,CAAS,GACvC,GAAGS,EAAAA,MAAM,qBAAqBT,CAAS,KAAKG,EAAO,SAAS,EAAA,EAGxDQ,EAAaH,EAAAA,UACjB,GAAGC,EAAAA,MAAM,mBACT,GAAGA,EAAAA,MAAM,qBAAqBN,EAAO,SAAS,EAAA,EAGhDS,EAAAA,UAAU,IAAM,CACd,IAAIC,EAEJ,GAAIjB,EAAM,CACRiB,EAAQC,EAAA,EACR,MACF,CAEA,OAAAD,EAAQE,EAAA,EAED,IAAM,CACX,aAAaF,CAAK,CACpB,CACF,EAAG,CAACjB,CAAI,CAAC,EAET,MAAMkB,EAAa,KACjBV,MAAmB,CAAE,GAAGY,EAAM,QAAS,IAAO,EAEvC,WAAW,IAAM,CACtBZ,MAAmB,CAAE,GAAGY,EAAM,UAAW,QAAS,EAClD,SAAS,KAAK,MAAM,SAAW,QACjC,EAAG,GAAG,GAGFD,EAAc,KAClBX,MAAmB,CAAE,GAAGY,EAAM,UAAW,QAAS,EAE3C,WAAW,IAAM,CACtBZ,MAAmB,CAAE,GAAGY,EAAM,QAAS,IAAQ,EAC/C,SAAS,KAAK,MAAM,SAAW,EACjC,EAAGV,CAAkB,GAGvB,OACEH,EAAO,SACLc,EAAAA,KAAC,OAAK,GAAGf,EAAO,UAAWK,EACzB,SAAA,CAAAU,EAAAA,KAACC,EAAAA,MAAA,CAAM,UAAWR,EACf,SAAA,CAAAb,EACAC,EACAC,CAAA,EACH,EACAoB,EAAAA,IAAC,MAAA,CACC,cAAY,iBACZ,UAAWR,EACX,QAASV,CAAA,CAAA,CACX,EACF,CAGN,CAEA,MAAAmB,EAAeC,EAAAA,gBAAgB1B,CAAM"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as l,jsx as p}from"react/jsx-runtime";import{useState as y,useEffect as C}from"react";import{p as t}from"./index-CZ41y9Hn.js";import{j as a}from"./joinClass-anSpaauN.js";import{S as N}from"./Stack-DK5pfu2w.js";import{c as b}from"./createComponent-WNQRXK89.js";function T({open:n,header:c,body:m,footer:d,direction:s="right",onClose:f,...i}){const[o,r]=y({visible:!1,animation:"hide"}),u=300,v=a(`${t}-drawer`,i.className),w=a(`${t}-drawer__content`,`${t}-drawer__content--${s}`,`${t}-drawer__content--${s}--${o.animation}`),_=a(`${t}-drawer__overlay`,`${t}-drawer__overlay--${o.animation}`);C(()=>{let e;if(n){e=$();return}return e=h(),()=>{clearTimeout(e)}},[n]);const $=()=>(r(e=>({...e,visible:!0})),setTimeout(()=>{r(e=>({...e,animation:"show"})),document.body.style.overflow="hidden"},100)),h=()=>(r(e=>({...e,animation:"hide"})),setTimeout(()=>{r(e=>({...e,visible:!1})),document.body.style.overflow=""},u));return o.visible&&l("div",{...i,className:v,children:[l(N,{className:w,children:[c,m,d]}),p("div",{"data-testid":"drawer-overlay",className:_,onClick:f})]})}const O=b(T);export{O as D};
|
|
2
|
-
//# sourceMappingURL=Drawer-D1lAWrdi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer-D1lAWrdi.js","sources":["../../src/navigation/Drawer/Drawer.tsx"],"sourcesContent":["import { useEffect, useState, type HTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils';\n\nimport Stack from '@/layout/Stack';\n\nimport createComponent from '../../core/createComponent';\n\nimport '@iziui/styles/components/Drawer.scss';\n\ntype Direction = 'right' | 'left' | 'bottom';\ntype AnimationClass = 'show' | 'hide';\ntype Config = { animation: AnimationClass; visible: boolean };\n\nexport interface DrawerProps extends HTMLAttributes<HTMLDivElement> {\n open: boolean;\n direction?: Direction;\n body: React.JSX.Element;\n header?: React.JSX.Element;\n footer?: React.JSX.Element;\n onClose: () => void;\n};\n\nfunction Drawer({\n open,\n header,\n body,\n footer,\n direction = 'right',\n onClose,\n ...props\n}: DrawerProps) {\n const [config, setConfig] = useState<Config>({ visible: false, animation: 'hide' });\n\n const ANIMATION_DURATION = 300;\n\n const cls = joinClass(\n `${prefix}-drawer`,\n props.className\n );\n\n const contentCls = joinClass(\n `${prefix}-drawer__content`,\n `${prefix}-drawer__content--${direction}`,\n `${prefix}-drawer__content--${direction}--${config.animation}`,\n );\n\n const overlayCls = joinClass(\n `${prefix}-drawer__overlay`,\n `${prefix}-drawer__overlay--${config.animation}`,\n );\n\n useEffect(() => {\n let timer: NodeJS.Timeout;\n\n if (open) {\n timer = handleOpen();\n return;\n }\n\n timer = handleClose();\n\n return () => {\n clearTimeout(timer);\n };\n }, [open]);\n\n const handleOpen = () => {\n setConfig(prev => ({ ...prev, visible: true }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, animation: 'show' }));\n document.body.style.overflow = 'hidden';\n }, 100);\n };\n\n const handleClose = () => {\n setConfig(prev => ({ ...prev, animation: 'hide' }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, visible: false }));\n document.body.style.overflow = '';\n }, ANIMATION_DURATION);\n };\n\n return (\n config.visible && (\n <div {...props} className={cls}>\n <Stack className={contentCls}>\n {header}\n {body}\n {footer}\n </Stack>\n <div\n data-testid=\"drawer-overlay\"\n className={overlayCls}\n onClick={onClose}\n />\n </div>\n )\n );\n}\n\nexport default createComponent(Drawer);\n"],"names":["Drawer","open","header","body","footer","direction","onClose","props","config","setConfig","useState","ANIMATION_DURATION","cls","joinClass","prefix","contentCls","overlayCls","useEffect","timer","handleOpen","handleClose","prev","jsxs","Stack","jsx","Drawer_default","createComponent"],"mappings":"gRAyBA,SAASA,EAAO,CACd,KAAAC,EACA,OAAAC,EACA,KAAAC,EACA,OAAAC,EACA,UAAAC,EAAY,QACZ,QAAAC,EACA,GAAGC,CACL,EAAgB,CACd,KAAM,CAACC,EAAQC,CAAS,EAAIC,EAAiB,CAAE,QAAS,GAAO,UAAW,OAAQ,EAE5EC,EAAqB,IAErBC,EAAMC,EACV,GAAGC,CAAM,UACTP,EAAM,SAAA,EAGFQ,EAAaF,EACjB,GAAGC,CAAM,mBACT,GAAGA,CAAM,qBAAqBT,CAAS,GACvC,GAAGS,CAAM,qBAAqBT,CAAS,KAAKG,EAAO,SAAS,EAAA,EAGxDQ,EAAaH,EACjB,GAAGC,CAAM,mBACT,GAAGA,CAAM,qBAAqBN,EAAO,SAAS,EAAA,EAGhDS,EAAU,IAAM,CACd,IAAIC,EAEJ,GAAIjB,EAAM,CACRiB,EAAQC,EAAA,EACR,MACF,CAEA,OAAAD,EAAQE,EAAA,EAED,IAAM,CACX,aAAaF,CAAK,CACpB,CACF,EAAG,CAACjB,CAAI,CAAC,EAET,MAAMkB,EAAa,KACjBV,MAAmB,CAAE,GAAGY,EAAM,QAAS,IAAO,EAEvC,WAAW,IAAM,CACtBZ,MAAmB,CAAE,GAAGY,EAAM,UAAW,QAAS,EAClD,SAAS,KAAK,MAAM,SAAW,QACjC,EAAG,GAAG,GAGFD,EAAc,KAClBX,MAAmB,CAAE,GAAGY,EAAM,UAAW,QAAS,EAE3C,WAAW,IAAM,CACtBZ,MAAmB,CAAE,GAAGY,EAAM,QAAS,IAAQ,EAC/C,SAAS,KAAK,MAAM,SAAW,EACjC,EAAGV,CAAkB,GAGvB,OACEH,EAAO,SACLc,EAAC,OAAK,GAAGf,EAAO,UAAWK,EACzB,SAAA,CAAAU,EAACC,EAAA,CAAM,UAAWR,EACf,SAAA,CAAAb,EACAC,EACAC,CAAA,EACH,EACAoB,EAAC,MAAA,CACC,cAAY,iBACZ,UAAWR,EACX,QAASV,CAAA,CAAA,CACX,EACF,CAGN,CAEA,MAAAmB,EAAeC,EAAgB1B,CAAM"}
|