@iziui/react 0.0.88-rc → 0.0.90-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/options/CustomOptions.d.ts +6 -1
- package/dist/.types/_internal/core/options/createOptions/createOptions.d.ts +1 -1
- package/dist/.types/_internal/core/plugin/behavior/defineBoxShadow/defineBoxShadow.d.ts +5 -1
- package/dist/.types/_internal/core/plugin/breakpoint/defineBreakpoint/defineBreakpoint.d.ts +2 -0
- package/dist/.types/_internal/core/plugin/breakpoint/defineBreakpoint/index.d.ts +1 -0
- package/dist/.types/_internal/core/plugin/breakpoint/index.d.ts +1 -0
- package/dist/.types/_internal/core/plugin/color/defineBackground/defineBackground.d.ts +5 -1
- package/dist/.types/_internal/core/plugin/color/defineBackgroundColor/defineBackgroundColor.d.ts +5 -1
- package/dist/.types/_internal/core/plugin/color/defineBorderColor/defineBorderColor.d.ts +5 -1
- package/dist/.types/_internal/core/plugin/color/defineColor/defineColor.d.ts +5 -1
- package/dist/.types/_internal/core/plugin/definePlugin/definePlugin.d.ts +2 -3
- package/dist/.types/_internal/core/plugin/index.d.ts +1 -0
- package/dist/.types/_internal/core/plugin/plugin.d.ts +2 -1
- package/dist/.types/_internal/core/plugin/shape/defineBorderRadius/defineBorderRadius.d.ts +5 -1
- package/dist/.types/_internal/core/plugin/spacing/defineMargin/defineMargin.d.ts +7 -1
- package/dist/.types/_internal/core/plugin/spacing/definePadding/definePadding.d.ts +7 -1
- package/dist/.types/_internal/toolkit/string/string.d.ts +1 -0
- package/dist/.types/_internal/toolkit/uuid/index.d.ts +1 -1
- package/dist/.types/_internal/toolkit/uuid/uuid.d.ts +1 -0
- package/dist/.types/actions/Button/Button.d.ts.map +1 -1
- package/dist/.types/core/createComponent.d.ts.map +1 -1
- package/dist/.types/hooks/useResize/useResize.d.ts +1 -1
- package/dist/.types/hooks/useResize/useResize.d.ts.map +1 -1
- package/dist/.types/layout/Stack/Stack.stories.d.ts +1 -0
- package/dist/.types/layout/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/chunks/{Alert-Cc5S-AfT.cjs → Alert-CUgp08gU.cjs} +2 -2
- package/dist/chunks/{Alert-Cc5S-AfT.cjs.map → Alert-CUgp08gU.cjs.map} +1 -1
- package/dist/chunks/{Alert-DJexLc9y.js → Alert-mOXPwc3e.js} +2 -2
- package/dist/chunks/{Alert-DJexLc9y.js.map → Alert-mOXPwc3e.js.map} +1 -1
- package/dist/chunks/{Box-D7fnBKFY.cjs → Box-DdpIV_Bl.cjs} +2 -2
- package/dist/chunks/{Box-D7fnBKFY.cjs.map → Box-DdpIV_Bl.cjs.map} +1 -1
- package/dist/chunks/{Box-BzStXj3R.js → Box-O2jw08Hf.js} +2 -2
- package/dist/chunks/{Box-BzStXj3R.js.map → Box-O2jw08Hf.js.map} +1 -1
- package/dist/chunks/{ButtonIcon-B-M87M5L.cjs → ButtonIcon-BMOZPxpN.cjs} +2 -2
- package/dist/chunks/{ButtonIcon-B-M87M5L.cjs.map → ButtonIcon-BMOZPxpN.cjs.map} +1 -1
- package/dist/chunks/{ButtonIcon-D0YH7wS6.js → ButtonIcon-CYO1Crb-.js} +2 -2
- package/dist/chunks/{ButtonIcon-D0YH7wS6.js.map → ButtonIcon-CYO1Crb-.js.map} +1 -1
- package/dist/chunks/{Card-wBDtOPXO.js → Card-D_RFnUk2.js} +2 -2
- package/dist/chunks/{Card-wBDtOPXO.js.map → Card-D_RFnUk2.js.map} +1 -1
- package/dist/chunks/{Card-DqoL_8z0.cjs → Card-DtjP8NP7.cjs} +2 -2
- package/dist/chunks/{Card-DqoL_8z0.cjs.map → Card-DtjP8NP7.cjs.map} +1 -1
- package/dist/chunks/{CardContent-BOuRiZyj.cjs → CardContent-BqqU9iwO.cjs} +2 -2
- package/dist/chunks/{CardContent-BOuRiZyj.cjs.map → CardContent-BqqU9iwO.cjs.map} +1 -1
- package/dist/chunks/{CardContent-D0o8c1Yf.js → CardContent-BsSfxSQH.js} +2 -2
- package/dist/chunks/{CardContent-D0o8c1Yf.js.map → CardContent-BsSfxSQH.js.map} +1 -1
- package/dist/chunks/{DrawerContent-DswF1783.js → DrawerContent-CYQSz1G-.js} +2 -2
- package/dist/chunks/{DrawerContent-DswF1783.js.map → DrawerContent-CYQSz1G-.js.map} +1 -1
- package/dist/chunks/{DrawerContent-CvWZGjje.cjs → DrawerContent-Dyc1evVF.cjs} +2 -2
- package/dist/chunks/{DrawerContent-CvWZGjje.cjs.map → DrawerContent-Dyc1evVF.cjs.map} +1 -1
- package/dist/chunks/{Icon-Dv3oduiN.cjs → Icon-CIrgQex7.cjs} +2 -2
- package/dist/chunks/{Icon-Dv3oduiN.cjs.map → Icon-CIrgQex7.cjs.map} +1 -1
- package/dist/chunks/{Icon-0KfCwKWR.js → Icon-imOBrsbL.js} +2 -2
- package/dist/chunks/{Icon-0KfCwKWR.js.map → Icon-imOBrsbL.js.map} +1 -1
- package/dist/chunks/{MenuButton-DbrtU31-.js → MenuButton-CvQxSdho.js} +2 -2
- package/dist/chunks/{MenuButton-DbrtU31-.js.map → MenuButton-CvQxSdho.js.map} +1 -1
- package/dist/chunks/{MenuButton-BF6coRYt.cjs → MenuButton-D0cPZU6x.cjs} +2 -2
- package/dist/chunks/{MenuButton-BF6coRYt.cjs.map → MenuButton-D0cPZU6x.cjs.map} +1 -1
- package/dist/chunks/{Stack-DsVkiTT_.cjs → Stack-B_lU0ez7.cjs} +2 -2
- package/dist/chunks/{Stack-DsVkiTT_.cjs.map → Stack-B_lU0ez7.cjs.map} +1 -1
- package/dist/chunks/{Stack-D0feJnm7.js → Stack-Deow48Th.js} +2 -2
- package/dist/chunks/{Stack-D0feJnm7.js.map → Stack-Deow48Th.js.map} +1 -1
- package/dist/chunks/{TableHeader-BDY2xI-0.js → TableHeader-DnifrYxO.js} +2 -2
- package/dist/chunks/{TableHeader-BDY2xI-0.js.map → TableHeader-DnifrYxO.js.map} +1 -1
- package/dist/chunks/{TableHeader-DNnzAUGG.cjs → TableHeader-SKzj2zHB.cjs} +2 -2
- package/dist/chunks/{TableHeader-DNnzAUGG.cjs.map → TableHeader-SKzj2zHB.cjs.map} +1 -1
- package/dist/chunks/{Typography-hazfs4Ye.js → Typography-BrJZyxiT.js} +2 -2
- package/dist/chunks/{Typography-hazfs4Ye.js.map → Typography-BrJZyxiT.js.map} +1 -1
- package/dist/chunks/{Typography-C7B3jwUf.cjs → Typography-DW57lh3e.cjs} +2 -2
- package/dist/chunks/{Typography-C7B3jwUf.cjs.map → Typography-DW57lh3e.cjs.map} +1 -1
- package/dist/chunks/createComponent-CovqNaAJ.js +8 -0
- package/dist/chunks/createComponent-CovqNaAJ.js.map +1 -0
- package/dist/chunks/createComponent-Dkt68kvT.cjs +8 -0
- package/dist/chunks/createComponent-Dkt68kvT.cjs.map +1 -0
- package/dist/chunks/useMenu-DewYBiar.cjs +2 -0
- package/dist/chunks/{useMenu-Bw3Im-FW.cjs.map → useMenu-DewYBiar.cjs.map} +1 -1
- package/dist/chunks/useMenu-DuX7EGHi.js +2 -0
- package/dist/chunks/{useMenu-DU5PYJUH.js.map → useMenu-DuX7EGHi.js.map} +1 -1
- package/dist/chunks/useResize-BUftB918.js +2 -0
- package/dist/chunks/useResize-BUftB918.js.map +1 -0
- package/dist/chunks/useResize-Dnf6Ktrn.cjs +2 -0
- package/dist/chunks/useResize-Dnf6Ktrn.cjs.map +1 -0
- package/dist/chunks/{useTheme-g5gOUmLf.js → useTheme-BYuNiCiH.js} +2 -2
- package/dist/chunks/{useTheme-g5gOUmLf.js.map → useTheme-BYuNiCiH.js.map} +1 -1
- package/dist/chunks/{useTheme-DhX2tM8O.cjs → useTheme-DsrjDJKC.cjs} +2 -2
- package/dist/chunks/{useTheme-DhX2tM8O.cjs.map → useTheme-DsrjDJKC.cjs.map} +1 -1
- package/dist/components/Alert/index.cjs +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Avatar/index.cjs +1 -1
- package/dist/components/Avatar/index.cjs.map +1 -1
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Avatar/index.js.map +1 -1
- package/dist/components/Box/index.cjs +1 -1
- package/dist/components/Box/index.js +1 -1
- package/dist/components/Button/index.cjs +1 -1
- package/dist/components/Button/index.cjs.map +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/ButtonIcon/index.cjs +1 -1
- package/dist/components/ButtonIcon/index.js +1 -1
- package/dist/components/Card/index.cjs +1 -1
- package/dist/components/Card/index.js +1 -1
- package/dist/components/Checkbox/index.cjs +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CheckboxGroup/index.cjs +1 -1
- package/dist/components/CheckboxGroup/index.js +1 -1
- package/dist/components/Chip/index.cjs +1 -1
- package/dist/components/Chip/index.js +1 -1
- package/dist/components/ColorPicker/index.cjs +1 -1
- package/dist/components/ColorPicker/index.cjs.map +1 -1
- package/dist/components/ColorPicker/index.js +1 -1
- package/dist/components/ColorPicker/index.js.map +1 -1
- package/dist/components/Container/index.cjs +1 -1
- package/dist/components/Container/index.js +1 -1
- package/dist/components/Divider/index.cjs +1 -1
- package/dist/components/Divider/index.js +1 -1
- package/dist/components/Drawer/index.cjs +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Input/index.cjs +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputFile/index.cjs +1 -1
- package/dist/components/InputFile/index.js +1 -1
- package/dist/components/Loading/index.cjs +1 -1
- package/dist/components/Loading/index.js +1 -1
- package/dist/components/Menu/index.cjs +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Select/index.cjs +1 -1
- package/dist/components/Select/index.cjs.map +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Skeleton/index.cjs +1 -1
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/Stack/index.cjs +1 -1
- package/dist/components/Stack/index.js +1 -1
- package/dist/components/Switch/index.cjs +1 -1
- package/dist/components/Switch/index.cjs.map +1 -1
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Switch/index.js.map +1 -1
- package/dist/components/Table/index.cjs +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Toast/index.cjs +1 -1
- package/dist/components/Toast/index.cjs.map +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toast/index.js.map +1 -1
- package/dist/components/Tooltip/index.cjs +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/Typography/index.cjs +1 -1
- package/dist/components/Typography/index.js +1 -1
- package/dist/hooks/useResize/index.cjs +1 -1
- package/dist/hooks/useResize/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +3 -3
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/createComponent-BBXW0GJ6.cjs +0 -2
- package/dist/chunks/createComponent-BBXW0GJ6.cjs.map +0 -1
- package/dist/chunks/createComponent-DZqrA_Tp.js +0 -2
- package/dist/chunks/createComponent-DZqrA_Tp.js.map +0 -1
- package/dist/chunks/useMenu-Bw3Im-FW.cjs +0 -2
- package/dist/chunks/useMenu-DU5PYJUH.js +0 -2
- package/dist/chunks/useResize-B-oebgDR.cjs +0 -2
- package/dist/chunks/useResize-B-oebgDR.cjs.map +0 -1
- package/dist/chunks/useResize-BjM6tiAF.js +0 -2
- package/dist/chunks/useResize-BjM6tiAF.js.map +0 -1
- package/dist/chunks/uuid-dGvr9vBZ.js +0 -2
- package/dist/chunks/uuid-dGvr9vBZ.js.map +0 -1
- package/dist/chunks/uuid-omnJ9TjZ.cjs +0 -2
- package/dist/chunks/uuid-omnJ9TjZ.cjs.map +0 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { Properties } from 'csstype';
|
|
1
2
|
import type { PaletteBuilded } from '../theme';
|
|
2
|
-
export type CustomOptions = Partial<ColorOptions & ShapeOptions & SpacingOptions & BehaviorOptions>;
|
|
3
|
+
export type CustomOptions = Partial<ColorOptions & ShapeOptions & SpacingOptions & BehaviorOptions & MediaQueryOptions>;
|
|
4
|
+
type MediaQuery = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
type MediaQueryOptions = {
|
|
6
|
+
[M in MediaQuery]: Properties;
|
|
7
|
+
};
|
|
3
8
|
type Size = 'sm' | 'md' | 'lg';
|
|
4
9
|
type Spacing = 'p' | 'py' | 'px' | 'pt' | 'pb' | 'pl' | 'pr' | 'm' | 'my' | 'mx' | 'mt' | 'mb' | 'ml' | 'mr';
|
|
5
10
|
type SpacingOptions = {
|
|
@@ -6,5 +6,5 @@ type Data = {
|
|
|
6
6
|
sx: CustomOptions;
|
|
7
7
|
theme: ThemeBuilded;
|
|
8
8
|
};
|
|
9
|
-
export default function createOptions({ sx, theme }: Data, ...plugins: Plugin[]): Properties
|
|
9
|
+
export default function createOptions({ sx, theme }: Data, ...plugins: Plugin[]): Properties<0 | (string & {}), string & {}>;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './defineBreakpoint';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as defineBreakpoint } from './defineBreakpoint';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Properties } from 'csstype';
|
|
2
1
|
import type { ThemeBuilded } from '../../theme';
|
|
3
2
|
import type { CustomOptions } from '../../options';
|
|
4
|
-
import type { Plugin } from '../plugin';
|
|
5
|
-
export default function definePlugin(cb: (theme: ThemeBuilded, options: CustomOptions) =>
|
|
3
|
+
import type { Plugin, Return } from '../plugin';
|
|
4
|
+
export default function definePlugin<T extends Return>(cb: (theme: ThemeBuilded, options: CustomOptions) => T): Plugin<T>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Properties } from 'csstype';
|
|
2
2
|
import type { ThemeBuilded } from '../theme';
|
|
3
3
|
import type { CustomOptions } from '../options';
|
|
4
|
-
export type
|
|
4
|
+
export type Return = Properties | string;
|
|
5
|
+
export type Plugin<T extends Return = Properties> = (theme: ThemeBuilded, options: CustomOptions) => T;
|
|
@@ -2,3 +2,4 @@ export declare function sanitize(value: string): string;
|
|
|
2
2
|
export declare function getInitials(name: string): string;
|
|
3
3
|
export declare function slug(str: string): string;
|
|
4
4
|
export declare function capitalize(str: string): string;
|
|
5
|
+
export declare function toKebabCase(value: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './uuid';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/actions/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAgB,MAAM,OAAO,CAAC;AAIxF,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAStD,OAAO,sCAAsC,CAAC;AAE9C,MAAM,WAAW,WAAY,SAAQ,iBAAiB,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAC7F,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC;IACtC,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;CAC7C;;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/actions/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAgB,MAAM,OAAO,CAAC;AAIxF,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAStD,OAAO,sCAAsC,CAAC;AAE9C,MAAM,WAAW,WAAY,SAAQ,iBAAiB,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAC7F,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC;IACtC,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;CAC7C;;AAoDD,wBAAuC"}
|
|
@@ -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,oBAAoB,CAAC;AAW7C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,CAAC,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,
|
|
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,aA8B5E"}
|
|
@@ -15,5 +15,5 @@ export interface Callback {
|
|
|
15
15
|
onLg?: () => void;
|
|
16
16
|
onXl?: () => void;
|
|
17
17
|
}
|
|
18
|
-
export default function useResize({ onXs, onSm, onMd, onLg, onXl }: Callback
|
|
18
|
+
export default function useResize({ onXs, onSm, onMd, onLg, onXl }: Callback): void;
|
|
19
19
|
//# sourceMappingURL=useResize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResize.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useResize/useResize.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;;;;;CAS7B,CAAC;
|
|
1
|
+
{"version":3,"file":"useResize.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useResize/useResize.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;;;;;CAS7B,CAAC;AAIF,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;CACnB;AAUD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,QAAQ,QAgD3E"}
|
|
@@ -2,6 +2,7 @@ import { Meta, StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { default as Stack } from './Stack';
|
|
3
3
|
export declare const _Row: StoryObj<typeof Stack>;
|
|
4
4
|
export declare const _Column: StoryObj<typeof Stack>;
|
|
5
|
+
export declare const WithBreakPoint: StoryObj<typeof Stack>;
|
|
5
6
|
export declare const Playground: StoryObj<typeof Stack>;
|
|
6
7
|
declare const meta: Meta<typeof Stack>;
|
|
7
8
|
export default meta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../src/layout/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,KAAK,MAAM,SAAS,CAAC;AAe5B,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,OAAO,KAAK,CAUvC,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,OAAO,KAAK,CAU1C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,KAAK,CAE7C,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA0G5B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../src/layout/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,KAAK,MAAM,SAAS,CAAC;AAe5B,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,OAAO,KAAK,CAUvC,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,OAAO,KAAK,CAU1C,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,OAAO,KAAK,CAiBjD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,KAAK,CAE7C,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA0G5B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),d=require("react"),t=require("./index-DYxwT4uW.cjs"),i=require("./joinClass-Jk3EszKD.cjs"),j=require("./useTheme-
|
|
2
|
-
//# sourceMappingURL=Alert-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),d=require("react"),t=require("./index-DYxwT4uW.cjs"),i=require("./joinClass-Jk3EszKD.cjs"),j=require("./useTheme-DsrjDJKC.cjs"),a=require("./Stack-B_lU0ez7.cjs"),$=require("./Typography-DW57lh3e.cjs"),q=require("./ButtonIcon-BMOZPxpN.cjs"),y=require("./createComponent-Dkt68kvT.cjs"),h=require("./Icon-CIrgQex7.cjs");function g({children:n,icon:s,color:r="primary",onClose:c,...o}){const{theme:{mode:l}}=j.useTheme(),u=i.joinClass(`${t.prefix}-alert`,`${t.prefix}-alert--${l}`,`${t.prefix}-alert--${r}`,o.className),m=i.joinClass(`${t.prefix}-alert__button`,`${t.prefix}-alert__button--${r}`),x=()=>typeof n=="string"?e.jsx($.Typography,{variant:"body1",style:{color:"currentcolor"},children:n}):n,f=p=>d.cloneElement(p,{color:`${r}.dark`});return e.jsxs(a.Stack,{fullWidth:!0,gap:0,flexDirection:"row",alignItems:"center",justifyContent:"center",...o,className:u,children:[e.jsxs(a.Stack,{fullWidth:!0,gap:8,flexDirection:"row",alignItems:"center",className:`${t.prefix}-alert__content`,children:[s&&f(s),x()]}),c&&e.jsx("div",{children:e.jsx(q.ButtonIcon,{className:m,onClick:c,color:r,style:{color:"currentColor"},children:e.jsx(h.Icon,{name:"times"})})})]})}const C=y.createComponent(g);exports.Alert=C;
|
|
2
|
+
//# sourceMappingURL=Alert-CUgp08gU.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert-
|
|
1
|
+
{"version":3,"file":"Alert-CUgp08gU.cjs","sources":["../../src/feedback/Alert/Alert.tsx"],"sourcesContent":["import { cloneElement, type HtmlHTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport type { Colors } from '@iziui/core/theme';\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport { useTheme } from '@/theme';\nimport Stack from '@/layout/Stack';\nimport Typography from '@/display/Typography';\nimport ButtonIcon from '@/actions/ButtonIcon';\nimport createComponent from '@/core/createComponent';\nimport Icon, { type IconProps } from '@/display/Icon';\n\nimport '@iziui/styles/components/Alert.scss';\n\nexport interface AlertProps extends HtmlHTMLAttributes<HTMLDivElement> {\n color?: Colors;\n icon?: React.JSX.Element;\n children: React.ReactNode;\n onClose?: () => void;\n}\n\nfunction Alert({\n children,\n icon,\n color = 'primary',\n onClose,\n ...props\n}: AlertProps) {\n const { theme: { mode } } = useTheme();\n\n const className = joinClass(\n `${prefix}-alert`,\n `${prefix}-alert--${mode}`,\n `${prefix}-alert--${color}`,\n props.className\n );\n\n const classNameAction = joinClass(\n `${prefix}-alert__button`,\n `${prefix}-alert__button--${color}`,\n );\n\n const renderMessage = () => {\n if (typeof children === 'string') {\n return (\n <Typography variant=\"body1\" style={{ color: 'currentcolor' }}>\n {children}\n </Typography>\n );\n }\n\n return children;\n };\n\n const renderIcon = (icon: React.JSX.Element) => {\n return cloneElement<IconProps>(icon, {\n color: `${color}.dark`\n });\n };\n\n return (\n <Stack\n fullWidth\n gap={0}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n {...props}\n className={className}\n >\n <Stack\n fullWidth\n gap={8}\n flexDirection=\"row\"\n alignItems=\"center\"\n className={`${prefix}-alert__content`}\n >\n {icon && renderIcon(icon)}\n {renderMessage()}\n </Stack>\n {\n onClose && (\n <div>\n <ButtonIcon\n className={classNameAction}\n onClick={onClose}\n color={color}\n style={{ color: 'currentColor' }}\n >\n <Icon name=\"times\" />\n </ButtonIcon>\n </div>)\n }\n </Stack>\n );\n}\n\nexport default createComponent(Alert);"],"names":["Alert","children","icon","color","onClose","props","mode","useTheme","className","joinClass","prefix","classNameAction","renderMessage","jsx","Typography","renderIcon","cloneElement","jsxs","Stack","ButtonIcon","Icon","createComponent"],"mappings":"+WAuBA,SAASA,EAAM,CACb,SAAAC,EACA,KAAAC,EACA,MAAAC,EAAQ,UACR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t}from"./index-CZ41y9Hn.js";import{j as c}from"./joinClass-anSpaauN.js";import{u as g}from"./useTheme-
|
|
2
|
-
//# sourceMappingURL=Alert-
|
|
1
|
+
import{jsxs as m,jsx as e}from"react/jsx-runtime";import{cloneElement as y}from"react";import{p as t}from"./index-CZ41y9Hn.js";import{j as c}from"./joinClass-anSpaauN.js";import{u as g}from"./useTheme-BYuNiCiH.js";import{S as i}from"./Stack-Deow48Th.js";import{T as h}from"./Typography-BrJZyxiT.js";import{B as x}from"./ButtonIcon-CYO1Crb-.js";import{c as I}from"./createComponent-CovqNaAJ.js";import{I as _}from"./Icon-imOBrsbL.js";function j({children:o,icon:n,color:r="primary",onClose:a,...s}){const{theme:{mode:l}}=g(),f=c(`${t}-alert`,`${t}-alert--${l}`,`${t}-alert--${r}`,s.className),p=c(`${t}-alert__button`,`${t}-alert__button--${r}`),u=()=>typeof o=="string"?e(h,{variant:"body1",style:{color:"currentcolor"},children:o}):o,$=d=>y(d,{color:`${r}.dark`});return m(i,{fullWidth:!0,gap:0,flexDirection:"row",alignItems:"center",justifyContent:"center",...s,className:f,children:[m(i,{fullWidth:!0,gap:8,flexDirection:"row",alignItems:"center",className:`${t}-alert__content`,children:[n&&$(n),u()]}),a&&e("div",{children:e(x,{className:p,onClick:a,color:r,style:{color:"currentColor"},children:e(_,{name:"times"})})})]})}const S=I(j);export{S as A};
|
|
2
|
+
//# sourceMappingURL=Alert-mOXPwc3e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert-
|
|
1
|
+
{"version":3,"file":"Alert-mOXPwc3e.js","sources":["../../src/feedback/Alert/Alert.tsx"],"sourcesContent":["import { cloneElement, type HtmlHTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport type { Colors } from '@iziui/core/theme';\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport { useTheme } from '@/theme';\nimport Stack from '@/layout/Stack';\nimport Typography from '@/display/Typography';\nimport ButtonIcon from '@/actions/ButtonIcon';\nimport createComponent from '@/core/createComponent';\nimport Icon, { type IconProps } from '@/display/Icon';\n\nimport '@iziui/styles/components/Alert.scss';\n\nexport interface AlertProps extends HtmlHTMLAttributes<HTMLDivElement> {\n color?: Colors;\n icon?: React.JSX.Element;\n children: React.ReactNode;\n onClose?: () => void;\n}\n\nfunction Alert({\n children,\n icon,\n color = 'primary',\n onClose,\n ...props\n}: AlertProps) {\n const { theme: { mode } } = useTheme();\n\n const className = joinClass(\n `${prefix}-alert`,\n `${prefix}-alert--${mode}`,\n `${prefix}-alert--${color}`,\n props.className\n );\n\n const classNameAction = joinClass(\n `${prefix}-alert__button`,\n `${prefix}-alert__button--${color}`,\n );\n\n const renderMessage = () => {\n if (typeof children === 'string') {\n return (\n <Typography variant=\"body1\" style={{ color: 'currentcolor' }}>\n {children}\n </Typography>\n );\n }\n\n return children;\n };\n\n const renderIcon = (icon: React.JSX.Element) => {\n return cloneElement<IconProps>(icon, {\n color: `${color}.dark`\n });\n };\n\n return (\n <Stack\n fullWidth\n gap={0}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n {...props}\n className={className}\n >\n <Stack\n fullWidth\n gap={8}\n flexDirection=\"row\"\n alignItems=\"center\"\n className={`${prefix}-alert__content`}\n >\n {icon && renderIcon(icon)}\n {renderMessage()}\n </Stack>\n {\n onClose && (\n <div>\n <ButtonIcon\n className={classNameAction}\n onClick={onClose}\n color={color}\n style={{ color: 'currentColor' }}\n >\n <Icon name=\"times\" />\n </ButtonIcon>\n </div>)\n }\n </Stack>\n );\n}\n\nexport default createComponent(Alert);"],"names":["Alert","children","icon","color","onClose","props","mode","useTheme","className","joinClass","prefix","classNameAction","renderMessage","jsx","Typography","renderIcon","cloneElement","jsxs","Stack","ButtonIcon","Icon","Alert$1","createComponent"],"mappings":"ibAuBA,SAASA,EAAM,CACb,SAAAC,EACA,KAAAC,EACA,MAAAC,EAAQ,UACR,QAAAC,EACA,GAAGC,CACL,EAAe,CACb,KAAM,CAAE,MAAO,CAAE,KAAAC,CAAA,CAAK,EAAMC,EAAA,EAEtBC,EAAYC,EAChB,GAAGC,CAAM,SACT,GAAGA,CAAM,WAAWJ,CAAI,GACxB,GAAGI,CAAM,WAAWP,CAAK,GACzBE,EAAM,SAAA,EAGFM,EAAkBF,EACtB,GAAGC,CAAM,iBACT,GAAGA,CAAM,mBAAmBP,CAAK,EAAA,EAG7BS,EAAgB,IAChB,OAAOX,GAAa,SAEpBY,EAACC,GAAW,QAAQ,QAAQ,MAAO,CAAE,MAAO,gBACzC,SAAAb,EACH,EAIGA,EAGHc,EAAcb,GACXc,EAAwBd,EAAM,CACnC,MAAO,GAAGC,CAAK,OAAA,CAChB,EAGH,OACEc,EAACC,EAAA,CACC,UAAS,GACT,IAAK,EACL,cAAc,MACd,WAAW,SACX,eAAe,SACd,GAAGb,EACJ,UAAAG,EAEA,SAAA,CAAAS,EAACC,EAAA,CACC,UAAS,GACT,IAAK,EACL,cAAc,MACd,WAAW,SACX,UAAW,GAAGR,CAAM,kBAEnB,SAAA,CAAAR,GAAQa,EAAWb,CAAI,EACvBU,EAAA,CAAc,CAAA,CAAA,EAGfR,KACG,MAAA,CACC,SAAAS,EAACM,EAAA,CACC,UAAWR,EACX,QAASP,EACT,MAAAD,EACA,MAAO,CAAE,MAAO,cAAA,EAEhB,SAAAU,EAACO,EAAA,CAAK,KAAK,OAAA,CAAQ,CAAA,CAAA,CACrB,CACF,CAAA,CAAA,CAAA,CAIV,CAEA,MAAAC,EAAeC,EAAgBtB,CAAK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),s=require("react"),u=require("./createComponent-
|
|
2
|
-
//# sourceMappingURL=Box-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),s=require("react"),u=require("./createComponent-Dkt68kvT.cjs"),i=s.forwardRef(function({tag:e="div",children:o,...t},n){const r=e;return c.jsx(r,{ref:n,...t,children:o})}),x=u.createComponent(i);exports.Box=x;
|
|
2
|
+
//# sourceMappingURL=Box-DdpIV_Bl.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box-
|
|
1
|
+
{"version":3,"file":"Box-DdpIV_Bl.cjs","sources":["../../src/layout/Box/Box.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes } from 'react';\n\nimport createComponent from '@/core';\n\nexport interface BoxProps extends HTMLAttributes<HTMLElement> {\n tag?: React.ElementType;\n}\n\nconst Box = forwardRef<HTMLElement, BoxProps>(\n function Box({ tag = 'div', children, ...props }, ref) {\n const CustomTag = tag;\n\n return (\n <CustomTag ref={ref} {...props}>\n {children}\n </CustomTag>\n );\n }\n);\n\nexport default createComponent(Box);"],"names":["Box","forwardRef","tag","children","props","ref","CustomTag","jsx","createComponent"],"mappings":"iHAQMA,EAAMC,EAAAA,WACV,SAAa,CAAE,IAAAC,EAAM,MAAO,SAAAC,EAAU,GAAGC,CAAA,EAASC,EAAK,CACrD,MAAMC,EAAYJ,EAElB,OACEK,EAAAA,IAACD,EAAA,CAAU,IAAAD,EAAW,GAAGD,EACtB,SAAAD,EACH,CAEJ,CACF,EAEAH,EAAeQ,EAAAA,gBAAgBR,CAAG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import{forwardRef as s}from"react";import{c as a}from"./createComponent-
|
|
2
|
-
//# sourceMappingURL=Box-
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{forwardRef as s}from"react";import{c as a}from"./createComponent-CovqNaAJ.js";const c=s(function({tag:o="div",children:t,...r},m){return n(o,{ref:m,...r,children:t})}),u=a(c);export{u as B};
|
|
2
|
+
//# sourceMappingURL=Box-O2jw08Hf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box-
|
|
1
|
+
{"version":3,"file":"Box-O2jw08Hf.js","sources":["../../src/layout/Box/Box.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes } from 'react';\n\nimport createComponent from '@/core';\n\nexport interface BoxProps extends HTMLAttributes<HTMLElement> {\n tag?: React.ElementType;\n}\n\nconst Box = forwardRef<HTMLElement, BoxProps>(\n function Box({ tag = 'div', children, ...props }, ref) {\n const CustomTag = tag;\n\n return (\n <CustomTag ref={ref} {...props}>\n {children}\n </CustomTag>\n );\n }\n);\n\nexport default createComponent(Box);"],"names":["Box","forwardRef","tag","children","props","ref","jsx","Box$1","createComponent"],"mappings":"6HAQA,MAAMA,EAAMC,EACV,SAAa,CAAE,IAAAC,EAAM,MAAO,SAAAC,EAAU,GAAGC,CAAA,EAASC,EAAK,CAGrD,OACEC,EAHgBJ,EAGf,CAAU,IAAAG,EAAW,GAAGD,EACtB,SAAAD,EACH,CAEJ,CACF,EAEAI,EAAeC,EAAgBR,CAAG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),m=require("react"),c=require("./index-DYxwT4uW.cjs"),p=require("./joinClass-Jk3EszKD.cjs"),q=require("./Ripple-Dy4i91j1.cjs"),x=require("./createComponent-
|
|
2
|
-
//# sourceMappingURL=ButtonIcon-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),m=require("react"),c=require("./index-DYxwT4uW.cjs"),p=require("./joinClass-Jk3EszKD.cjs"),q=require("./Ripple-Dy4i91j1.cjs"),x=require("./createComponent-Dkt68kvT.cjs");function j({children:i,size:t=40,color:n="primary",...e}){const[o,u]=[t,t],l=p.joinClass(`${c.prefix}-button-icon`,n&&`${c.prefix}-button-icon--${n}`,e.className),a=s=>m.cloneElement(s,{size:o/1.5,...s.props,style:{color:"currentColor"}});return r.jsxs("button",{...e,className:l,style:{...e.style,width:o,height:u},children:[a(i),r.jsx(q.Ripple,{})]})}const C=x.createComponent(j);exports.ButtonIcon=C;
|
|
2
|
+
//# sourceMappingURL=ButtonIcon-BMOZPxpN.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon-
|
|
1
|
+
{"version":3,"file":"ButtonIcon-BMOZPxpN.cjs","sources":["../../src/actions/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["import { cloneElement, type ButtonHTMLAttributes, type PropsWithChildren, type ReactElement } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport type { Colors } from '@iziui/core/theme';\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport type { IconProps } from '@/display/Icon';\nimport Ripple from '@/actions/Ripple';\nimport createComponent from '@/core/createComponent';\n\nimport '@iziui/styles/components/ButtonIcon.scss';\n\nexport interface ButtonIconProps extends PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>> {\n color?: Colors;\n size?: number;\n children: ReactElement<IconProps>;\n};\nfunction ButtonIcon({ children, size = 40, color = 'primary', ...props }: ButtonIconProps) {\n const [width, height] = [size, size];\n\n const classess = joinClass(\n `${prefix}-button-icon`,\n color && `${prefix}-button-icon--${color}`,\n props.className\n );\n\n const renderIcon = (icon: ReactElement<IconProps>) => {\n return cloneElement(icon, {\n size: width / 1.5,\n ...icon.props,\n style: { color: 'currentColor' }\n });\n };\n\n return (\n <button\n {...props}\n className={classess}\n style={{ ...props.style, width, height }}\n >\n {renderIcon(children)}\n <Ripple />\n </button>\n );\n}\n\nexport default createComponent(ButtonIcon);"],"names":["ButtonIcon","children","size","color","props","width","height","classess","joinClass","prefix","renderIcon","icon","cloneElement","jsxs","Ripple","createComponent"],"mappings":"4NAkBA,SAASA,EAAW,CAAE,SAAAC,EAAU,KAAAC,EAAO,GAAI,MAAAC,EAAQ,UAAW,GAAGC,GAA0B,CACzF,KAAM,CAACC,EAAOC,CAAM,EAAI,CAACJ,EAAMA,CAAI,EAE7BK,EAAWC,EAAAA,UACf,GAAGC,EAAAA,MAAM,eACTN,GAAS,GAAGM,EAAAA,MAAM,iBAAiBN,CAAK,GACxCC,EAAM,SAAA,EAGFM,EAAcC,GACXC,EAAAA,aAAaD,EAAM,CACxB,KAAMN,EAAQ,IACd,GAAGM,EAAK,MACR,MAAO,CAAE,MAAO,cAAA,CAAe,CAChC,EAGH,OACEE,EAAAA,KAAC,SAAA,CACE,GAAGT,EACJ,UAAWG,EACX,MAAO,CAAE,GAAGH,EAAM,MAAO,MAAAC,EAAO,OAAAC,CAAA,EAE/B,SAAA,CAAAI,EAAWT,CAAQ,QACnBa,EAAAA,OAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAGd,CAEA,MAAAd,EAAee,EAAAA,gBAAgBf,CAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as l,jsx as p}from"react/jsx-runtime";import{cloneElement as u}from"react";import{p as e}from"./index-CZ41y9Hn.js";import{j as f}from"./joinClass-anSpaauN.js";import{R as h}from"./Ripple-Bq9bxg4k.js";import{c as j}from"./createComponent-
|
|
2
|
-
//# sourceMappingURL=ButtonIcon-
|
|
1
|
+
import{jsxs as l,jsx as p}from"react/jsx-runtime";import{cloneElement as u}from"react";import{p as e}from"./index-CZ41y9Hn.js";import{j as f}from"./joinClass-anSpaauN.js";import{R as h}from"./Ripple-Bq9bxg4k.js";import{c as j}from"./createComponent-CovqNaAJ.js";function x({children:c,size:o=40,color:r="primary",...t}){const[n,m]=[o,o],i=f(`${e}-button-icon`,r&&`${e}-button-icon--${r}`,t.className),a=s=>u(s,{size:n/1.5,...s.props,style:{color:"currentColor"}});return l("button",{...t,className:i,style:{...t.style,width:n,height:m},children:[a(c),p(h,{})]})}const I=j(x);export{I as B};
|
|
2
|
+
//# sourceMappingURL=ButtonIcon-CYO1Crb-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon-
|
|
1
|
+
{"version":3,"file":"ButtonIcon-CYO1Crb-.js","sources":["../../src/actions/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["import { cloneElement, type ButtonHTMLAttributes, type PropsWithChildren, type ReactElement } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport type { Colors } from '@iziui/core/theme';\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport type { IconProps } from '@/display/Icon';\nimport Ripple from '@/actions/Ripple';\nimport createComponent from '@/core/createComponent';\n\nimport '@iziui/styles/components/ButtonIcon.scss';\n\nexport interface ButtonIconProps extends PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>> {\n color?: Colors;\n size?: number;\n children: ReactElement<IconProps>;\n};\nfunction ButtonIcon({ children, size = 40, color = 'primary', ...props }: ButtonIconProps) {\n const [width, height] = [size, size];\n\n const classess = joinClass(\n `${prefix}-button-icon`,\n color && `${prefix}-button-icon--${color}`,\n props.className\n );\n\n const renderIcon = (icon: ReactElement<IconProps>) => {\n return cloneElement(icon, {\n size: width / 1.5,\n ...icon.props,\n style: { color: 'currentColor' }\n });\n };\n\n return (\n <button\n {...props}\n className={classess}\n style={{ ...props.style, width, height }}\n >\n {renderIcon(children)}\n <Ripple />\n </button>\n );\n}\n\nexport default createComponent(ButtonIcon);"],"names":["ButtonIcon","children","size","color","props","width","height","classess","joinClass","prefix","renderIcon","icon","cloneElement","jsxs","Ripple","ButtonIcon$1","createComponent"],"mappings":"sQAkBA,SAASA,EAAW,CAAE,SAAAC,EAAU,KAAAC,EAAO,GAAI,MAAAC,EAAQ,UAAW,GAAGC,GAA0B,CACzF,KAAM,CAACC,EAAOC,CAAM,EAAI,CAACJ,EAAMA,CAAI,EAE7BK,EAAWC,EACf,GAAGC,CAAM,eACTN,GAAS,GAAGM,CAAM,iBAAiBN,CAAK,GACxCC,EAAM,SAAA,EAGFM,EAAcC,GACXC,EAAaD,EAAM,CACxB,KAAMN,EAAQ,IACd,GAAGM,EAAK,MACR,MAAO,CAAE,MAAO,cAAA,CAAe,CAChC,EAGH,OACEE,EAAC,SAAA,CACE,GAAGT,EACJ,UAAWG,EACX,MAAO,CAAE,GAAGH,EAAM,MAAO,MAAAC,EAAO,OAAAC,CAAA,EAE/B,SAAA,CAAAI,EAAWT,CAAQ,IACnBa,EAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAGd,CAEA,MAAAC,EAAeC,EAAgBhB,CAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{p as a}from"./index-CZ41y9Hn.js";import{j as c}from"./joinClass-anSpaauN.js";import{R as i}from"./Ripple-Bq9bxg4k.js";import{c as p}from"./createComponent-
|
|
2
|
-
//# sourceMappingURL=Card-
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{p as a}from"./index-CZ41y9Hn.js";import{j as c}from"./joinClass-anSpaauN.js";import{R as i}from"./Ripple-Bq9bxg4k.js";import{c as p}from"./createComponent-CovqNaAJ.js";function n({children:o,onClick:r,...s}){const m=c(`${a}-card`,r&&`${a}-card--clickable`,s.className);return e("div",{...s,className:m,onMouseUp:r,children:[o,r&&t(i,{})]})}const u=p(n);export{u as C};
|
|
2
|
+
//# sourceMappingURL=Card-D_RFnUk2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card-
|
|
1
|
+
{"version":3,"file":"Card-D_RFnUk2.js","sources":["../../src/display/Card/Card.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport Ripple from '../../actions/Ripple';\nimport createComponent from '../../core/createComponent';\n\nimport '@iziui/styles/components/Card.scss';\n\ninterface CardProps extends HTMLAttributes<HTMLDivElement> { onClick?: (e?: any) => void; }\n\nfunction Card({ children, onClick, ...props }: CardProps) {\n const cls = joinClass(`${prefix}-card`, onClick && `${prefix}-card--clickable`, props.className);\n\n return (\n <div {...props} className={cls} onMouseUp={onClick}>\n {children}\n {onClick && <Ripple />}\n </div>\n );\n}\n\nexport default createComponent(Card);"],"names":["Card","children","onClick","props","cls","joinClass","prefix","Ripple","Card$1","createComponent"],"mappings":"iOAaA,SAASA,EAAK,CAAE,SAAAC,EAAU,QAAAC,EAAS,GAAGC,GAAoB,CACxD,MAAMC,EAAMC,EAAU,GAAGC,CAAM,QAASJ,GAAW,GAAGI,CAAM,mBAAoBH,EAAM,SAAS,EAE/F,SACG,MAAA,CAAK,GAAGA,EAAO,UAAWC,EAAK,UAAWF,EACxC,SAAA,CAAAD,EACAC,KAAYK,EAAA,CAAA,CAAO,CAAA,EACtB,CAEJ,CAEA,MAAAC,EAAeC,EAAgBT,CAAI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),n=require("./index-DYxwT4uW.cjs"),t=require("./joinClass-Jk3EszKD.cjs"),a=require("./Ripple-Dy4i91j1.cjs"),o=require("./createComponent-
|
|
2
|
-
//# sourceMappingURL=Card-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),n=require("./index-DYxwT4uW.cjs"),t=require("./joinClass-Jk3EszKD.cjs"),a=require("./Ripple-Dy4i91j1.cjs"),o=require("./createComponent-Dkt68kvT.cjs");function u({children:c,onClick:e,...r}){const i=t.joinClass(`${n.prefix}-card`,e&&`${n.prefix}-card--clickable`,r.className);return s.jsxs("div",{...r,className:i,onMouseUp:e,children:[c,e&&s.jsx(a.Ripple,{})]})}const d=o.createComponent(u);exports.Card=d;
|
|
2
|
+
//# sourceMappingURL=Card-DtjP8NP7.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card-
|
|
1
|
+
{"version":3,"file":"Card-DtjP8NP7.cjs","sources":["../../src/display/Card/Card.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport Ripple from '../../actions/Ripple';\nimport createComponent from '../../core/createComponent';\n\nimport '@iziui/styles/components/Card.scss';\n\ninterface CardProps extends HTMLAttributes<HTMLDivElement> { onClick?: (e?: any) => void; }\n\nfunction Card({ children, onClick, ...props }: CardProps) {\n const cls = joinClass(`${prefix}-card`, onClick && `${prefix}-card--clickable`, props.className);\n\n return (\n <div {...props} className={cls} onMouseUp={onClick}>\n {children}\n {onClick && <Ripple />}\n </div>\n );\n}\n\nexport default createComponent(Card);"],"names":["Card","children","onClick","props","cls","joinClass","prefix","Ripple","createComponent"],"mappings":"yMAaA,SAASA,EAAK,CAAE,SAAAC,EAAU,QAAAC,EAAS,GAAGC,GAAoB,CACxD,MAAMC,EAAMC,EAAAA,UAAU,GAAGC,EAAAA,MAAM,QAASJ,GAAW,GAAGI,EAAAA,MAAM,mBAAoBH,EAAM,SAAS,EAE/F,cACG,MAAA,CAAK,GAAGA,EAAO,UAAWC,EAAK,UAAWF,EACxC,SAAA,CAAAD,EACAC,SAAYK,EAAAA,OAAA,CAAA,CAAO,CAAA,EACtB,CAEJ,CAEA,MAAAP,EAAeQ,EAAAA,gBAAgBR,CAAI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),r=require("./index-DYxwT4uW.cjs"),o=require("./joinClass-Jk3EszKD.cjs"),c=require("./createComponent-
|
|
2
|
-
//# sourceMappingURL=CardContent-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),r=require("./index-DYxwT4uW.cjs"),o=require("./joinClass-Jk3EszKD.cjs"),c=require("./createComponent-Dkt68kvT.cjs");function a({children:n,...e}){const t=o.joinClass(`${r.prefix}-card__content`,e.className);return s.jsx("div",{...e,className:t,children:n})}const i=c.createComponent(a);exports.CardContent=i;
|
|
2
|
+
//# sourceMappingURL=CardContent-BqqU9iwO.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardContent-
|
|
1
|
+
{"version":3,"file":"CardContent-BqqU9iwO.cjs","sources":["../../src/display/Card/CardContent.tsx"],"sourcesContent":["import { HTMLAttributes } 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 CardContentProps = HTMLAttributes<HTMLDivElement>;\nfunction CardContent({ children, ...props }: CardContentProps) {\n\n const cls = joinClass(`${prefix}-card__content`, props.className);\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(CardContent);"],"names":["CardContent","children","props","cls","joinClass","prefix","createComponent"],"mappings":"sKASA,SAASA,EAAY,CAAE,SAAAC,EAAU,GAAGC,GAA2B,CAE7D,MAAMC,EAAMC,EAAAA,UAAU,GAAGC,EAAAA,MAAM,iBAAkBH,EAAM,SAAS,EAEhE,aACG,MAAA,CAAK,GAAGA,EAAO,UAAWC,EACxB,SAAAF,EACH,CAEJ,CAEA,MAAAD,EAAeM,EAAAA,gBAAgBN,CAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import{p as a}from"./index-CZ41y9Hn.js";import{j as s}from"./joinClass-anSpaauN.js";import{c as e}from"./createComponent-
|
|
2
|
-
//# sourceMappingURL=CardContent-
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{p as a}from"./index-CZ41y9Hn.js";import{j as s}from"./joinClass-anSpaauN.js";import{c as e}from"./createComponent-CovqNaAJ.js";function m({children:t,...o}){const r=s(`${a}-card__content`,o.className);return n("div",{...o,className:r,children:t})}const p=e(m);export{p as C};
|
|
2
|
+
//# sourceMappingURL=CardContent-BsSfxSQH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardContent-
|
|
1
|
+
{"version":3,"file":"CardContent-BsSfxSQH.js","sources":["../../src/display/Card/CardContent.tsx"],"sourcesContent":["import { HTMLAttributes } 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 CardContentProps = HTMLAttributes<HTMLDivElement>;\nfunction CardContent({ children, ...props }: CardContentProps) {\n\n const cls = joinClass(`${prefix}-card__content`, props.className);\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(CardContent);"],"names":["CardContent","children","props","cls","joinClass","prefix","CardContent$1","createComponent"],"mappings":"8KASA,SAASA,EAAY,CAAE,SAAAC,EAAU,GAAGC,GAA2B,CAE7D,MAAMC,EAAMC,EAAU,GAAGC,CAAM,iBAAkBH,EAAM,SAAS,EAEhE,SACG,MAAA,CAAK,GAAGA,EAAO,UAAWC,EACxB,SAAAF,EACH,CAEJ,CAEA,MAAAK,EAAeC,EAAgBP,CAAW"}
|
|
@@ -1,2 +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-
|
|
2
|
-
//# sourceMappingURL=DrawerContent-
|
|
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-Deow48Th.js";import{c as m}from"./createComponent-CovqNaAJ.js";import{B as g}from"./ButtonIcon-CYO1Crb-.js";import{I}from"./Icon-imOBrsbL.js";function M(t=!1){const[e,r]=w(!1);return _(()=>{r(t)},[t]),[e,()=>{r(i=>!i)}]}function p({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(p);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(g,{onClick:e,color:"grey","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-CYQSz1G-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerContent-
|
|
1
|
+
{"version":3,"file":"DrawerContent-CYQSz1G-.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=\"grey\"\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_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 @@
|
|
|
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-
|
|
2
|
-
//# sourceMappingURL=DrawerContent-
|
|
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-B_lU0ez7.cjs"),d=require("./createComponent-Dkt68kvT.cjs"),N=require("./ButtonIcon-BMOZPxpN.cjs"),$=require("./Icon-CIrgQex7.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:"grey","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-Dyc1evVF.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerContent-
|
|
1
|
+
{"version":3,"file":"DrawerContent-Dyc1evVF.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=\"grey\"\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":"mSAIA,SAAwBA,EAAUC,EAAO,GAAkB,CACzD,KAAM,CAACC,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MAAA,CAAK,GAAGA,EAAO,UAAWI,EACxB,SAAAc,EACH,CAEJ,CAEA,MAAAO,EAAeT,EAAAA,gBAAgBQ,CAAa"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),s=require("./index-DYxwT4uW.cjs"),r=require("./joinClass-Jk3EszKD.cjs"),u=require("./createComponent-
|
|
2
|
-
//# sourceMappingURL=Icon-
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),s=require("./index-DYxwT4uW.cjs"),r=require("./joinClass-Jk3EszKD.cjs"),u=require("./createComponent-Dkt68kvT.cjs");function a({name:i,color:n,size:t=24,...e}){const c=r.joinClass(`${s.prefix}-icon`,n&&`${s.prefix}-icon--${n}`,"uil",`uil-${i}`,e.className);return o.jsx("i",{...e,className:c,style:{fontSize:t,...e.style}})}const l=u.createComponent(a);exports.Icon=l;
|
|
2
|
+
//# sourceMappingURL=Icon-CIrgQex7.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon-
|
|
1
|
+
{"version":3,"file":"Icon-CIrgQex7.cjs","sources":["../../src/display/Icon/Icon.tsx"],"sourcesContent":["import { HTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils';\nimport type { Colors } from '@iziui/core/theme';\n\nimport createComponent from '../../core/createComponent';\n\nimport '@iziui/styles/components/Icon.scss';\n\nexport interface IconProps extends HTMLAttributes<HTMLElement> {\n name: string;\n size?: number;\n color?: Colors;\n}\n\nfunction Icon({ name, color, size = 24, ...props }: IconProps) {\n const clss = joinClass(\n `${prefix}-icon`,\n color && `${prefix}-icon--${color}`,\n 'uil',\n `uil-${name}`,\n props.className\n );\n\n return (\n <i {...props} className={clss} style={{ fontSize: size, ...props.style }}></i>\n );\n}\n\nexport default createComponent(Icon);"],"names":["Icon","name","color","size","props","clss","joinClass","prefix","jsx","createComponent"],"mappings":"sKAiBA,SAASA,EAAK,CAAE,KAAAC,EAAM,MAAAC,EAAO,KAAAC,EAAO,GAAI,GAAGC,GAAoB,CAC7D,MAAMC,EAAOC,EAAAA,UACX,GAAGC,EAAAA,MAAM,QACTL,GAAS,GAAGK,EAAAA,MAAM,UAAUL,CAAK,GACjC,MACA,OAAOD,CAAI,GACXG,EAAM,SAAA,EAGR,OACEI,EAAAA,IAAC,IAAA,CAAG,GAAGJ,EAAO,UAAWC,EAAM,MAAO,CAAE,SAAUF,EAAM,GAAGC,EAAM,MAAM,CAAG,CAE9E,CAEA,MAAAJ,EAAeS,EAAAA,gBAAgBT,CAAI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{p as t}from"./index-CZ41y9Hn.js";import{j as m}from"./joinClass-anSpaauN.js";import{c as a}from"./createComponent-
|
|
2
|
-
//# sourceMappingURL=Icon-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{p as t}from"./index-CZ41y9Hn.js";import{j as m}from"./joinClass-anSpaauN.js";import{c as a}from"./createComponent-CovqNaAJ.js";function r({name:i,color:s,size:n=24,...o}){const c=m(`${t}-icon`,s&&`${t}-icon--${s}`,"uil",`uil-${i}`,o.className);return e("i",{...o,className:c,style:{fontSize:n,...o.style}})}const u=a(r);export{u as I};
|
|
2
|
+
//# sourceMappingURL=Icon-imOBrsbL.js.map
|