@iziui/react 0.0.88-rc → 0.0.89-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/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.js +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
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/useTheme-DsrjDJKC.cjs"),i=require("./chunks/Bounce-ByNbJjX0.cjs"),e=require("./chunks/useForm-BNLOy0E6.cjs"),a=require("./chunks/Fade-CM-5xRVt.cjs"),s=require("./chunks/Slide-D4aLHjYS.cjs"),u=require("./chunks/TableHeader-SKzj2zHB.cjs"),d=require("./chunks/Zoom-BOnqwiDY.cjs"),r=require("./chunks/DrawerContent-Dyc1evVF.cjs"),l=require("./chunks/useListenerResized-AwpsZLcP.cjs"),t=require("./chunks/useMenu-DewYBiar.cjs"),q=require("./chunks/useResize-Dnf6Ktrn.cjs"),c=require("./chunks/Card-DtjP8NP7.cjs"),m=require("./chunks/CardContent-BqqU9iwO.cjs"),n=require("./chunks/GridItem-wwo-SHGR.cjs"),C=require("./chunks/MenuButton-D0cPZU6x.cjs"),T=require("./chunks/Typography-DW57lh3e.cjs");require("react");require("react/jsx-runtime");require("./chunks/generateSupportColors-CTMoGhDf.cjs");require("./chunks/index-DYxwT4uW.cjs");require("./chunks/joinClass-Jk3EszKD.cjs");require("./chunks/createComponent-Dkt68kvT.cjs");require("./chunks/Stack-B_lU0ez7.cjs");require("./chunks/ButtonIcon-BMOZPxpN.cjs");require("./chunks/Ripple-Dy4i91j1.cjs");require("./chunks/Icon-CIrgQex7.cjs");require("./chunks/convertPathToColor-D8eBpd_D.cjs");exports.ThemeProvider=o.ThemeProvider;exports.createTheme=o.createTheme;exports.useTheme=o.useTheme;exports.Bounce=i.Bounce;exports.Control=e.Control;exports.Form=e.Form;exports.useControl=e.useControl;exports.useForm=e.useForm;exports.useFormGroup=e.useFormGroup;exports.Fade=a.Fade;exports.Slide=s.Slide;exports.Table=u.Table_default;exports.TableBody=u.TableBody;exports.TableCell=u.TableCell_default;exports.TableHeader=u.TableHeader;exports.Zoom=d.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=l.useListenerResized;exports.Menu=t.Menu;exports.useMenu=t.useMenu;exports.useResize=q.useResize;exports.Card=c.Card;exports.CardContent=m.CardContent;exports.Grid=n.Grid;exports.GridItem=n.GridItem;exports.MenuButton=C.MenuButton_default;exports.variants=T.variants;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{T as d,c as C,u as l}from"./chunks/useTheme-BYuNiCiH.js";import{B as b}from"./chunks/Bounce-DP0PU3kr.js";import{C as D,F as c,u as w,a as M,b as B}from"./chunks/useForm-iwGfb88g.js";import{F as h}from"./chunks/Fade-spxq-W-Q.js";import{S as z}from"./chunks/Slide-BxEwoZ70.js";import{T as R,a as S,b as Z,c as y}from"./chunks/TableHeader-DnifrYxO.js";import{Z as L}from"./chunks/Zoom-DqgU4Wfv.js";import{D as g,a as j,b as k,c as q,u as A}from"./chunks/DrawerContent-CYQSz1G-.js";import{u as J}from"./chunks/useListenerResized-Bnqxrt7k.js";import{M as N,u as O}from"./chunks/useMenu-DuX7EGHi.js";import{u as U}from"./chunks/useResize-BUftB918.js";import{C as W}from"./chunks/Card-D_RFnUk2.js";import{C as Y}from"./chunks/CardContent-BsSfxSQH.js";import{G as $,a as rr}from"./chunks/GridItem-CaoPZmBu.js";import{M as or}from"./chunks/MenuButton-CvQxSdho.js";import{v as sr}from"./chunks/Typography-BrJZyxiT.js";import"react";import"react/jsx-runtime";import"./chunks/generateSupportColors-BN5t8dA-.js";import"./chunks/index-CZ41y9Hn.js";import"./chunks/joinClass-anSpaauN.js";import"./chunks/createComponent-CovqNaAJ.js";import"./chunks/Stack-Deow48Th.js";import"./chunks/ButtonIcon-CYO1Crb-.js";import"./chunks/Ripple-Bq9bxg4k.js";import"./chunks/Icon-imOBrsbL.js";import"./chunks/convertPathToColor-DtOjH4ZP.js";export{b as Bounce,W as Card,Y as CardContent,D as Control,g as Drawer,j as DrawerContent,k as DrawerFooter,q as DrawerHeader,h as Fade,c as Form,$ as Grid,rr as GridItem,N as Menu,or as MenuButton,z as Slide,R as Table,S as TableBody,Z as TableCell,y as TableHeader,d as ThemeProvider,L as Zoom,C as createTheme,w as useControl,A as useDrawer,M as useForm,B as useFormGroup,J as useListenerResized,O as useMenu,U as useResize,l as useTheme,sr as variants};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/style.css
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
/* assets/index-D0bj3w-V.css */
|
|
12
12
|
.iziui-chip{border-radius:calc(var(--radius) * 4);white-space:nowrap;padding:0 12px;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;justify-content:center;align-items:center;position:relative}.iziui-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.iziui-chip--small{font-size:.75rem;height:24px}.iziui-chip--medium{font-size:.8125rem;height:32px}.iziui-chip--large{font-size:1rem;height:38px}.iziui-chip--primary--outlined{border:1px solid var(--primary)}.iziui-chip--primary--contained{background-color:var(--primary-opacity)}.iziui-chip--secondary--outlined{border:1px solid var(--secondary)}.iziui-chip--secondary--contained{background-color:var(--secondary-opacity)}.iziui-chip--info--outlined{border:1px solid var(--info)}.iziui-chip--info--contained{background-color:var(--info-opacity)}.iziui-chip--error--outlined{border:1px solid var(--error)}.iziui-chip--error--contained{background-color:var(--error-opacity)}.iziui-chip--warning--outlined{border:1px solid var(--warning)}.iziui-chip--warning--contained{background-color:var(--warning-opacity)}.iziui-chip--success--outlined{border:1px solid var(--success)}.iziui-chip--success--contained{background-color:var(--success-opacity)}.iziui-chip--grey--outlined{border:1px solid var(--grey)}.iziui-chip--grey--contained{background-color:var(--grey-opacity)}.iziui-chip--light.iziui-chip--primary{color:var(--primary-dark)}.iziui-chip--light.iziui-chip--secondary{color:var(--secondary-dark)}.iziui-chip--light.iziui-chip--info{color:var(--info-dark)}.iziui-chip--light.iziui-chip--error{color:var(--error-dark)}.iziui-chip--light.iziui-chip--warning{color:var(--warning-dark)}.iziui-chip--light.iziui-chip--success{color:var(--success-dark)}.iziui-chip--light.iziui-chip--grey{color:var(--grey-dark)}.iziui-chip--dark.iziui-chip--primary{color:var(--primary-light)}.iziui-chip--dark.iziui-chip--secondary{color:var(--secondary-light)}.iziui-chip--dark.iziui-chip--info{color:var(--info-light)}.iziui-chip--dark.iziui-chip--error{color:var(--error-light)}.iziui-chip--dark.iziui-chip--warning{color:var(--warning-light)}.iziui-chip--dark.iziui-chip--success{color:var(--success-light)}.iziui-chip--dark.iziui-chip--grey{color:var(--grey-light)}.iziui-chip--clickable{cursor:pointer}.iziui-chip--deletable{padding:0 0 0 12px}.iziui-chip--default{border:1px solid var(--divider);color:var(--text-primary)}.iziui-chip--default--outlined{color:var(--text-primary)}.iziui-chip--default--contained{background-color:var(--divider);color:var(--text-primary)}.iziui-chip__icon{color:currentColor!important}.iziui-chip__icon--margin{margin-right:5px}.iziui-chip__delete-icon{cursor:pointer;position:relative;background:transparent;border:none;border-radius:50%;font-size:16px;color:currentColor!important}
|
|
13
13
|
/*$vite$:1*/
|
|
14
|
+
/* assets/index-Bs0qH-ot.css */
|
|
15
|
+
.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--grey{color:var(--grey-contrast);background-color:var(--grey)}.iziui-avatar__icon{color:currentColor!important}
|
|
16
|
+
/*$vite$:1*/
|
|
14
17
|
/* assets/index-tbLNWUoG.css */
|
|
15
18
|
.iziui-skeleton{position:relative;overflow:hidden;background-color:var(--divider)}.iziui-skeleton--rounded{border-radius:var(--radius)}.iziui-skeleton--circular{border-radius:50%}.iziui-skeleton:after{position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,#fff0 0,#fff3 20%,#ffffff80 60%,#fff0);animation:2s linear .5s infinite normal none running shimmer;content:""}@keyframes shimmer{0%{transform:translate(-100%)}50%{transform:translate(100%)}to{transform:translate(100%)}}
|
|
16
19
|
/*$vite$:1*/
|
|
@@ -55,9 +58,6 @@
|
|
|
55
58
|
/* assets/Ripple-D71SUpze.css */
|
|
56
59
|
.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}}
|
|
57
60
|
/*$vite$:1*/
|
|
58
|
-
/* assets/index-Bs0qH-ot.css */
|
|
59
|
-
.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--grey{color:var(--grey-contrast);background-color:var(--grey)}.iziui-avatar__icon{color:currentColor!important}
|
|
60
|
-
/*$vite$:1*/
|
|
61
61
|
/* assets/index-C3yxI1Ai.css */
|
|
62
62
|
.iziui-color-picker{padding:0;min-width:160px;width:100%;cursor:pointer;overflow:hidden;position:relative;border-radius:var(--radius);border:1px solid var(--divider);background-color:var(--background-default);display:flex;align-items:center;justify-content:flex-start}.iziui-color-picker:focus-within{outline:2px solid var(--primary)}.iziui-color-picker--error{border-color:var(--error)}.iziui-color-picker-container{width:fit-content}.iziui-color-picker__preview{width:72px;height:48px;background-color:var(--background-default);border:none;display:flex;align-items:center;justify-content:center;border-right:1px solid var(--divider)}.iziui-color-picker__preview div{width:20px;height:20px;border-radius:var(--radius);transition:all .3s cubic-bezier(.4,0,.2,1)}.iziui-color-picker__label{font-size:12px;color:var(--text-secondary);display:block;margin-bottom:5px}.iziui-color-picker__label--error{color:var(--error)}.iziui-color-picker__value{width:100%;height:100%;padding-left:16px;color:var(--text-secondary);text-transform:uppercase;display:flex;align-items:center;justify-content:flex-start}.iziui-color-picker__value--error{color:var(--error)}.iziui-color-picker__helper-text{opacity:0;margin-top:5px;transition:all .3s cubic-bezier(.4,0,.2,1);font-size:12px}.iziui-color-picker__helper-text--visible{opacity:1}.iziui-color-picker__helper-text--error{color:var(--error)}.iziui-color-picker__color{width:30px;height:30px;position:relative;border-radius:var(--radius);transition:all .3s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer}.iziui-color-picker__color:hover{box-shadow:0 0 0 2px var(--primary)}.iziui-color-picker__color__icon{transform:scale(0);transition:all .3s cubic-bezier(.4,0,.2,1)}.iziui-color-picker__color__icon--visible{transform:scale(1)}.iziui-color-picker__color input{position:absolute;visibility:hidden}.iziui-color-picker input{height:48px;width:100%;border:none;outline:none;font:inherit;padding-left:16px}
|
|
63
63
|
/*$vite$:1*/
|
package/dist/theme/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/useTheme-DsrjDJKC.cjs");require("react");require("react/jsx-runtime");require("../chunks/generateSupportColors-CTMoGhDf.cjs");exports.ThemeProvider=e.ThemeProvider;exports.createTheme=e.createTheme;exports.useTheme=e.useTheme;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/theme/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{T as a,c as i,u as p}from"../chunks/useTheme-BYuNiCiH.js";import"react";import"react/jsx-runtime";import"../chunks/generateSupportColors-BN5t8dA-.js";export{a as ThemeProvider,i as createTheme,p as useTheme};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const P=require("react/jsx-runtime"),b=require("./index-DYxwT4uW.cjs"),M=require("./useTheme-DhX2tM8O.cjs");function S({sx:t,theme:n},...e){return e.reduce((s,a)=>(s={...s,...a(n,t)},s),{})}const y=(t,{color:n})=>{const{palette:e}=t;return n?{color:n(e)}:{}},B=(t,{background:n})=>{const{palette:e}=t;return n?{background:n(e)}:{}},j=(t,{borderColor:n})=>{const{palette:e}=t;return n?{borderColor:n(e)}:{}},w=(t,{backgroundColor:n})=>{const{palette:e}=t;return n?{backgroundColor:n(e)}:{}},C=(t,{borderRadius:n})=>{const{shape:e}=t;return n?{borderRadius:`${e.radius*n}px`}:{}},R=(t,{m:n,mb:e,ml:s,mr:a,mt:c,mx:u,my:l})=>{const{spacing:h}=t,r=i=>i||i===0?`${String(i*h)}px`:"",o=r(n),f=r(c),m=r(e),d=r(l),g=r(u),p=r(s),x=r(a);return{margin:o,marginTop:f||d||o,marginBottom:m||d||o,marginLeft:p||g||o,marginRight:x||g||o}},T=(t,{p:n,pb:e,pl:s,pr:a,pt:c,px:u,py:l})=>{const{spacing:h}=t,r=i=>i||i===0?`${String(i*h)}px`:"",o=r(n),f=r(c),m=r(e),d=r(l),g=r(u),p=r(s),x=r(a);return{padding:o,paddingTop:f||d||o,paddingBottom:m||d||o,paddingLeft:p||g||o,paddingRight:x||g||o}},_=(t,{boxShadow:n})=>n?{boxShadow:{sm:b.boxShadowSmall,md:b.boxShadowRegular,lg:b.boxShadowLarge}[n]}:{},z=Object.freeze(Object.defineProperty({__proto__:null,defineBackground:B,defineBackgroundColor:w,defineBorderColor:j,defineBorderRadius:C,defineBoxShadow:_,defineColor:y,defineMargin:R,definePadding:T},Symbol.toStringTag,{value:"Module"}));function O(t){return Object.values(t).map(n=>n)}function q(t){return t.displayName=t.name,({sx:e,fullWidth:s,...a})=>{const{theme:c}=M.useTheme(),u=e&&S({theme:c,sx:e},...O(z));return P.jsx(t,{...a,style:{boxSizing:"border-box",...a.style,...u,...s?{width:"100%"}:{}}})}}exports.createComponent=q;
|
|
2
|
-
//# sourceMappingURL=createComponent-BBXW0GJ6.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent-BBXW0GJ6.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":"yHAWA,SAAwBA,EAAc,CAAE,GAAAC,EAAI,MAAAC,CAAA,KAAkBC,EAA+B,CAC3F,OAAOA,EAAQ,OAAmB,CAACC,EAAKC,KACtCD,EAAM,CAAE,GAAGA,EAAK,GAAGC,EAAOH,EAAOD,CAAE,CAAA,EAE5BG,GACN,CAAA,CAAE,CACP,CCfA,MAAAE,EAA4B,CAACJ,EAAO,CAAE,MAAAK,KAAY,CAChD,KAAM,CAAE,QAAAC,GAAYN,EAEpB,OAAKK,EAEE,CACL,MAAOA,EAAMC,CAAO,CAAA,EAHD,CAAA,CAKvB,ECRAC,EAA4B,CAACP,EAAO,CAAE,WAAAQ,KAAiB,CACrD,KAAM,CAAE,QAAAF,GAAYN,EAEpB,OAAKQ,EAEE,CACL,WAAYA,EAAWF,CAAO,CAAA,EAHN,CAAA,CAK5B,ECRAG,EAA4B,CAACT,EAAO,CAAE,YAAAU,KAAkB,CACtD,KAAM,CAAE,QAAAJ,GAAYN,EAEpB,OAAKU,EAEE,CACL,YAAaA,EAAYJ,CAAO,CAAA,EAHP,CAAA,CAK7B,ECRAK,EAA4B,CAACX,EAAO,CAAE,gBAAAY,KAAsB,CAC1D,KAAM,CAAE,QAAAN,GAAYN,EAEpB,OAAKY,EAEE,CACL,gBAAiBA,EAAgBN,CAAO,CAAA,EAHX,CAAA,C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jC,MAAO,CACL,QAASM,EACT,WAAYC,GAASE,GAASH,EAC9B,cAAeE,GAASC,GAASH,EACjC,YAAaK,GAASD,GAASJ,EAC/B,aAAcM,GAASF,GAASJ,CAAA,CAEpC,ECpBAO,EAA4B,CAACC,EAAG,CAAE,UAAAC,KAE3BA,EAQE,CACL,UAP4C,CAC5C,GAAIC,EAAAA,eACJ,GAAIC,EAAAA,iBACJ,GAAIC,EAAAA,cAAA,EAIaH,CAAS,CAAA,EATH,CAAA,kPCA3B,SAASI,EAAQC,EAAmC,CAClD,OAAO,OAAO,OAAOA,CAAM,EAAE,IAAKC,GAAOA,CAAE,CAC7C,CAEA,SAAwBC,EAAmBC,EAAoC,CAC7E,OAAAA,EAAiB,YAAcA,EAAiB,KAEX,CAAC,CAAE,GAAA9D,EAAI,UAAA+D,EAAW,GAAGC,KAAY,CACpE,KAAM,CAAE,MAAA/D,CAAA,EAAUgE,WAAA,EAEZC,EAAUlE,GAAMD,EAAc,CAAE,MAAAE,EAAO,GAAAD,CAAA,EAC3C,GAAG0D,EAAQxD,CAAO,CAAA,EAGpB,OACEiE,EAAAA,IAACL,EAAA,CACE,GAAIE,EACL,MAAO,CACL,UAAW,aACX,GAAGA,EAAM,MACT,GAAGE,EACH,GAAIH,EAAY,CAAE,MAAO,QAAW,CAAA,CAAC,CACvC,CAAA,CAGN,CAGF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as x}from"react/jsx-runtime";import{b as P,c as M,d as S}from"./index-CZ41y9Hn.js";import{u as y}from"./useTheme-g5gOUmLf.js";function B({sx:t,theme:n},...e){return e.reduce((s,a)=>(s={...s,...a(n,t)},s),{})}const w=(t,{color:n})=>{const{palette:e}=t;return n?{color:n(e)}:{}},_=(t,{background:n})=>{const{palette:e}=t;return n?{background:n(e)}:{}},j=(t,{borderColor:n})=>{const{palette:e}=t;return n?{borderColor:n(e)}:{}},z=(t,{backgroundColor:n})=>{const{palette:e}=t;return n?{backgroundColor:n(e)}:{}},C=(t,{borderRadius:n})=>{const{shape:e}=t;return n?{borderRadius:`${e.radius*n}px`}:{}},O=(t,{m:n,mb:e,ml:s,mr:a,mt:c,mx:u,my:l})=>{const{spacing:f}=t,o=i=>i||i===0?`${String(i*f)}px`:"",r=o(n),h=o(c),m=o(e),d=o(l),g=o(u),p=o(s),b=o(a);return{margin:r,marginTop:h||d||r,marginBottom:m||d||r,marginLeft:p||g||r,marginRight:b||g||r}},R=(t,{p:n,pb:e,pl:s,pr:a,pt:c,px:u,py:l})=>{const{spacing:f}=t,o=i=>i||i===0?`${String(i*f)}px`:"",r=o(n),h=o(c),m=o(e),d=o(l),g=o(u),p=o(s),b=o(a);return{padding:r,paddingTop:h||d||r,paddingBottom:m||d||r,paddingLeft:p||g||r,paddingRight:b||g||r}},T=(t,{boxShadow:n})=>n?{boxShadow:{sm:S,md:M,lg:P}[n]}:{},L=Object.freeze(Object.defineProperty({__proto__:null,defineBackground:_,defineBackgroundColor:z,defineBorderColor:j,defineBorderRadius:C,defineBoxShadow:T,defineColor:w,defineMargin:O,definePadding:R},Symbol.toStringTag,{value:"Module"}));function $(t){return Object.values(t).map(n=>n)}function N(t){return t.displayName=t.name,({sx:e,fullWidth:s,...a})=>{const{theme:c}=y(),u=e&&B({theme:c,sx:e},...$(L));return x(t,{...a,style:{boxSizing:"border-box",...a.style,...u,...s?{width:"100%"}:{}}})}}export{N as c};
|
|
2
|
-
//# sourceMappingURL=createComponent-DZqrA_Tp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent-DZqrA_Tp.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":"yIAWA,SAAwBA,EAAc,CAAE,GAAAC,EAAI,MAAAC,CAAA,KAAkBC,EAA+B,CAC3F,OAAOA,EAAQ,OAAmB,CAACC,EAAKC,KACtCD,EAAM,CAAE,GAAGA,EAAK,GAAGC,EAAOH,EAAOD,CAAE,CAAA,EAE5BG,GACN,CAAA,CAAE,CACP,CCfA,MAAAE,EAA4B,CAACJ,EAAO,CAAE,MAAAK,KAAY,CAChD,KAAM,CAAE,QAAAC,GAAYN,EAEpB,OAAKK,EAEE,CACL,MAAOA,EAAMC,CAAO,CAAA,EAHD,CAAA,CAKvB,ECRAC,EAA4B,CAACP,EAAO,CAAE,WAAAQ,KAAiB,CACrD,KAAM,CAAE,QAAAF,GAAYN,EAEpB,OAAKQ,EAEE,CACL,WAAYA,EAAWF,CAAO,CAAA,EAHN,CAAA,CAK5B,ECRAG,EAA4B,CAACT,EAAO,CAAE,YAAAU,KAAkB,CACtD,KAAM,CAAE,QAAAJ,GAAYN,EA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,GAGpDoB,EAAOF,EAAiBP,CAAC,EAEzBU,EAAQH,EAAiBH,CAAE,EAC3BO,EAAQJ,EAAiBN,CAAE,EAE3BW,EAAQL,EAAiBD,CAAE,EAC3BO,EAAQN,EAAiBF,CAAE,EAE3BS,EAAQP,EAAiBL,CAAE,EAC3Ba,EAAQR,EAAiBJ,CAAE,EAEjC,MAAO,CACL,QAASM,EACT,WAAYC,GAASE,GAASH,EAC9B,cAAeE,GAASC,GAASH,EACjC,YAAaK,GAASD,GAASJ,EAC/B,aAAcM,GAASF,GAASJ,CAAA,CAEpC,ECpBAO,EAA4B,CAACC,EAAG,CAAE,UAAAC,KAE3BA,EAQE,CACL,UAP4C,CAC5C,GAAIC,EACJ,GAAIC,EACJ,GAAIC,CAAA,EAIaH,CAAS,CAAA,EATH,CAAA,kPCA3B,SAASI,EAAQC,EAAmC,CAClD,OAAO,OAAO,OAAOA,CAAM,EAAE,IAAKC,GAAOA,CAAE,CAC7C,CAEA,SAAwBC,EAAmBC,EAAoC,CAC7E,OAAAA,EAAiB,YAAcA,EAAiB,KAEX,CAAC,CAAE,GAAA9D,EAAI,UAAA+D,EAAW,GAAGC,KAAY,CACpE,KAAM,CAAE,MAAA/D,CAAA,EAAUgE,EAAA,EAEZC,EAAUlE,GAAMD,EAAc,CAAE,MAAAE,EAAO,GAAAD,CAAA,EAC3C,GAAG0D,EAAQxD,CAAO,CAAA,EAGpB,OACEiE,EAACL,EAAA,CACE,GAAIE,EACL,MAAO,CACL,UAAW,aACX,GAAGA,EAAM,MACT,GAAGE,EACH,GAAIH,EAAY,CAAE,MAAO,QAAW,CAAA,CAAC,CACvC,CAAA,CAGN,CAGF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),n=require("react"),l=require("./index-DYxwT4uW.cjs"),z=require("./joinClass-Jk3EszKD.cjs"),D=require("./uuid-omnJ9TjZ.cjs"),E=require("./useListenerResized-AwpsZLcP.cjs"),L=require("./Card-DqoL_8z0.cjs"),S=require("./CardContent-BOuRiZyj.cjs"),B=require("./createComponent-BBXW0GJ6.cjs");class P{delay(t,s=500){if(!s){t();return}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t()},s)}}const W=new P,F=n.forwardRef(function({open:t,width:s,children:f,anchorEl:o,direction:d="left",maxHeight:i,autoClose:_,onClose:$,...m},j){const[g,M]=n.useState(),[h,a]=n.useState({state:"invisible",animation:"close",width:"auto"}),N=16,y=150,k=n.Children.toArray(f),T=n.useMemo(()=>D.uuid(),[]),v=z.joinClass(`${l.prefix}-menu`,`${l.prefix}-menu--${h?.animation}`,m.className);E.useListenerResized(()=>b(),[o]),n.useEffect(()=>{b()},[o]),n.useEffect(()=>{t?w():C()},[t]);const b=()=>{o&&setTimeout(()=>{let e={};const{offsetWidth:r,offsetHeight:p,offsetLeft:q,offsetTop:I}=o;a(O=>({...O,width:r}));const x=I+p+N/2,R=document.getElementById(T);d==="center"&&(e={top:x,right:r}),d==="left"&&(e={top:x,left:q}),d==="right"&&(e={top:x,left:q-(R.offsetWidth-r)}),M(e)},0)},w=()=>{a(e=>({...e,state:"visible"})),setTimeout(()=>{a(e=>({...e,animation:"open"}))},10)},C=()=>{a(e=>({...e,animation:"close"})),setTimeout(()=>{a(e=>({...e,state:"invisible"})),$()},y)},A=()=>k.map((e,r)=>n.cloneElement(e,{tabIndex:r+1,key:`button-${r}`,onClick:p=>{W.delay(()=>{_&&C(),e.props.onClick&&e.props.onClick(p)},0)}}));return c.jsxs(c.Fragment,{children:[c.jsx("div",{id:T,ref:j,...m,style:{width:s||h.width,top:g?.top,left:g?.left,display:h?.state==="visible"?"block":"none",transition:`all ${y}ms ease-in`,zIndex:50,...m.style},className:v,children:t&&c.jsx(L.Card,{className:`${l.prefix}-menu__card`,children:c.jsx(S.CardContent,{className:`${l.prefix}-menu__card__content`,sx:{py:1},style:{display:"flex",flexDirection:"column",maxHeight:i},children:A()})})}),t&&c.jsx("div",{className:`${l.prefix}-menu__overlay`,onClick:C})]})}),G=B.createComponent(F);function H(){const[u,t]=n.useState(null),s=!!u,f=i=>{t(i?i.currentTarget:null)},o=()=>{t(null)};return[s,u,i=>{if(s){o();return}f(i)}]}exports.Menu=G;exports.useMenu=H;
|
|
2
|
-
//# sourceMappingURL=useMenu-Bw3Im-FW.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as B,Fragment as E,jsx as m}from"react/jsx-runtime";import{forwardRef as L,useState as g,Children as P,useMemo as W,useEffect as x,cloneElement as F}from"react";import{p as r}from"./index-CZ41y9Hn.js";import{j as G}from"./joinClass-anSpaauN.js";import{u as H}from"./uuid-dGvr9vBZ.js";import{u as S}from"./useListenerResized-Bnqxrt7k.js";import{C as U}from"./Card-wBDtOPXO.js";import{C as q}from"./CardContent-D0o8c1Yf.js";import{c as J}from"./createComponent-DZqrA_Tp.js";class K{delay(t,n=500){if(!n){t();return}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t()},n)}}const Q=new K,V=L(function({open:t,width:n,children:f,anchorEl:o,direction:c="left",maxHeight:s,autoClose:N,onClose:M,...u},k){const[y,v]=g(),[d,a]=g({state:"invisible",animation:"close",width:"auto"}),w=16,T=150,A=P.toArray(f),b=W(()=>H(),[]),I=G(`${r}-menu`,`${r}-menu--${d?.animation}`,u.className);S(()=>_(),[o]),x(()=>{_()},[o]),x(()=>{t?j():h()},[t]);const _=()=>{o&&setTimeout(()=>{let e={};const{offsetWidth:i,offsetHeight:p,offsetLeft:$,offsetTop:D}=o;a(z=>({...z,width:i}));const C=D+p+w/2,R=document.getElementById(b);c==="center"&&(e={top:C,right:i}),c==="left"&&(e={top:C,left:$}),c==="right"&&(e={top:C,left:$-(R.offsetWidth-i)}),v(e)},0)},j=()=>{a(e=>({...e,state:"visible"})),setTimeout(()=>{a(e=>({...e,animation:"open"}))},10)},h=()=>{a(e=>({...e,animation:"close"})),setTimeout(()=>{a(e=>({...e,state:"invisible"})),M()},T)},O=()=>A.map((e,i)=>F(e,{tabIndex:i+1,key:`button-${i}`,onClick:p=>{Q.delay(()=>{N&&h(),e.props.onClick&&e.props.onClick(p)},0)}}));return B(E,{children:[m("div",{id:b,ref:k,...u,style:{width:n||d.width,top:y?.top,left:y?.left,display:d?.state==="visible"?"block":"none",transition:`all ${T}ms ease-in`,zIndex:50,...u.style},className:I,children:t&&m(U,{className:`${r}-menu__card`,children:m(q,{className:`${r}-menu__card__content`,sx:{py:1},style:{display:"flex",flexDirection:"column",maxHeight:s},children:O()})})}),t&&m("div",{className:`${r}-menu__overlay`,onClick:h})]})}),ae=J(V);function re(){const[l,t]=g(null),n=!!l,f=s=>{t(s?s.currentTarget:null)},o=()=>{t(null)};return[n,l,s=>{if(n){o();return}f(s)}]}export{ae as M,re as u};
|
|
2
|
-
//# sourceMappingURL=useMenu-DU5PYJUH.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const v=require("react"),t=require("./index-DYxwT4uW.cjs"),i={MAX_XS:`(max-width: ${Number(t.xs)}px)`,MIN_SM:`(min-width: ${Number(t.xs)+1}px)`,MAX_SM:`(max-width: ${Number(t.sm)}px)`,MIN_MD:`(min-width: ${Number(t.sm)+1}px)`,MAX_MD:`(max-width: ${Number(t.md)}px)`,MIN_LG:`(min-width: ${Number(t.md)+1}px)`,MAX_LG:`(max-width: ${Number(t.lg)}px)`,MIN_XL:`(min-width: ${Number(t.xl)}px)`},r={xs:i.MAX_XS,sm:`${i.MIN_SM} and ${i.MAX_SM}`,md:`${i.MIN_MD} and ${i.MAX_MD}`,lg:`${i.MIN_LG} and ${i.MAX_LG}`,xl:i.MIN_XL},N=()=>({xs:window.matchMedia(r.xs),sm:window.matchMedia(r.sm),md:window.matchMedia(r.md),lg:window.matchMedia(r.lg),xl:window.matchMedia(r.xl)});function f({onXs:s,onSm:m,onMd:n,onLg:a,onXl:c},g=[]){const L={xs:s,sm:m,md:n,lg:a,xl:c},d=(e,M)=>{e.matches&&M()},x=e=>{s&&d(e,s)},h=e=>{m&&d(e,m)},u=e=>{n&&d(e,n)},w=e=>{a&&d(e,a)},_=e=>{c&&d(e,c)},$=e=>{const M=Object.keys(e).find(E=>e[E].matches);L[M]?.()};v.useEffect(()=>{const e=N();$(e)},[]),v.useEffect(()=>{const e=N();return s&&e.xs.addEventListener("change",x),m&&e.sm.addEventListener("change",h),n&&e.md.addEventListener("change",u),a&&e.lg.addEventListener("change",w),c&&e.xl.addEventListener("change",_),()=>{s&&e.xs.removeEventListener("change",x),m&&e.sm.removeEventListener("change",h),n&&e.md.removeEventListener("change",u),a&&e.lg.removeEventListener("change",w),c&&e.xl.removeEventListener("change",_)}},g)}exports.useResize=f;
|
|
2
|
-
//# sourceMappingURL=useResize-B-oebgDR.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useResize-B-oebgDR.cjs","sources":["../../src/hooks/useResize/useResize.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { xs, sm, md, lg, xl } from '@iziui/tokens/web/js';\n\nexport const DeviceBreakpoints = {\n MAX_XS: `(max-width: ${Number(xs)}px)`,\n MIN_SM: `(min-width: ${Number(xs) + 1}px)`,\n MAX_SM: `(max-width: ${Number(sm)}px)`,\n MIN_MD: `(min-width: ${Number(sm) + 1}px)`,\n MAX_MD: `(max-width: ${Number(md)}px)`,\n MIN_LG: `(min-width: ${Number(md) + 1}px)`,\n MAX_LG: `(max-width: ${Number(lg)}px)`,\n MIN_XL: `(min-width: ${Number(xl)}px)`,\n};\n\ntype Medias = {\n xs: MediaQueryList;\n sm: MediaQueryList;\n md: MediaQueryList;\n lg: MediaQueryList;\n xl: MediaQueryList;\n}\n\nexport interface Callback {\n onXs?: () => void;\n onSm?: () => void;\n onMd?: () => void;\n onLg?: () => void;\n onXl?: () => void;\n}\n\nconst MEDIAS: { [x in keyof Medias]: string; } = {\n xs: DeviceBreakpoints.MAX_XS,\n sm: `${DeviceBreakpoints.MIN_SM} and ${DeviceBreakpoints.MAX_SM}`,\n md: `${DeviceBreakpoints.MIN_MD} and ${DeviceBreakpoints.MAX_MD}`,\n lg: `${DeviceBreakpoints.MIN_LG} and ${DeviceBreakpoints.MAX_LG}`,\n xl: DeviceBreakpoints.MIN_XL\n};\n\nconst getMedias = (): Medias => {\n return {\n xs: window.matchMedia(MEDIAS.xs),\n sm: window.matchMedia(MEDIAS.sm),\n md: window.matchMedia(MEDIAS.md),\n lg: window.matchMedia(MEDIAS.lg),\n xl: window.matchMedia(MEDIAS.xl)\n };\n};\n\nexport default function useResize({\n onXs, onSm, onMd, onLg, onXl\n}: Callback, deps: any[] = []) {\n const MAP_CALLBACKS = {\n xs: onXs,\n sm: onSm,\n md: onMd,\n lg: onLg,\n xl: onXl\n };\n\n const checker = (event: MediaQueryListEvent, fn: () => void) => { if (event.matches) { fn(); } };\n\n const makeXs = (event: MediaQueryListEvent) => {\n if (onXs) { checker(event, onXs); }\n };\n\n const makeSm = (event: MediaQueryListEvent) => {\n if (onSm) { checker(event, onSm); }\n };\n\n const makeMd = (event: MediaQueryListEvent) => {\n if (onMd) { checker(event, onMd); }\n };\n\n const makeLg = (event: MediaQueryListEvent) => {\n if (onLg) { checker(event, onLg); }\n };\n\n const makeXl = (event: MediaQueryListEvent) => {\n if (onXl) { checker(event, onXl); }\n };\n\n const initialize = (medias: Medias) => {\n const key = Object.keys(medias).find((key) => medias[key].matches) as keyof typeof MAP_CALLBACKS;\n MAP_CALLBACKS[key]?.();\n };\n\n useEffect(() => {\n const medias = getMedias();\n initialize(medias);\n }, []);\n\n useEffect(() => {\n const medias = getMedias();\n\n /* eslint-disable @typescript-eslint/no-unused-expressions */\n onXs && medias.xs.addEventListener('change', makeXs);\n onSm && medias.sm.addEventListener('change', makeSm);\n onMd && medias.md.addEventListener('change', makeMd);\n onLg && medias.lg.addEventListener('change', makeLg);\n onXl && medias.xl.addEventListener('change', makeXl);\n\n return () => {\n onXs && medias.xs.removeEventListener('change', makeXs);\n onSm && medias.sm.removeEventListener('change', makeSm);\n onMd && medias.md.removeEventListener('change', makeMd);\n onLg && medias.lg.removeEventListener('change', makeLg);\n onXl && medias.xl.removeEventListener('change', makeXl);\n };\n /* eslint-enable @typescript-eslint/no-unused-expressions */\n }, deps);\n};"],"names":["DeviceBreakpoints","xs","sm","md","lg","xl","MEDIAS","getMedias","useResize","onXs","onSm","onMd","onLg","onXl","deps","MAP_CALLBACKS","checker","event","fn","makeXs","makeSm","makeMd","makeLg","makeXl","initialize","medias","key","useEffect"],"mappings":"wEAIaA,EAAoB,CAC/B,OAAQ,eAAe,OAAOC,EAAAA,EAAE,CAAC,MACjC,OAAQ,eAAe,OAAOA,EAAAA,EAAE,EAAI,CAAC,MACrC,OAAQ,eAAe,OAAOC,EAAAA,EAAE,CAAC,MACjC,OAAQ,eAAe,OAAOA,EAAAA,EAAE,EAAI,CAAC,MACrC,OAAQ,eAAe,OAAOC,EAAAA,EAAE,CAAC,MACjC,OAAQ,eAAe,OAAOA,EAAAA,EAAE,EAAI,CAAC,MACrC,OAAQ,eAAe,OAAOC,EAAAA,EAAE,CAAC,MACjC,OAAQ,eAAe,OAAOC,EAAAA,EAAE,CAAC,KACnC,EAkBMC,EAA2C,CAC/C,GAAIN,EAAkB,OACtB,GAAI,GAAGA,EAAkB,MAAM,QAAQA,EAAkB,MAAM,GAC/D,GAAI,GAAGA,EAAkB,MAAM,QAAQA,EAAkB,MAAM,GAC/D,GAAI,GAAGA,EAAkB,MAAM,QAAQA,EAAkB,MAAM,GAC/D,GAAIA,EAAkB,MACxB,EAEMO,EAAY,KACT,CACL,GAAI,OAAO,WAAWD,EAAO,EAAE,EAC/B,GAAI,OAAO,WAAWA,EAAO,EAAE,EAC/B,GAAI,OAAO,WAAWA,EAAO,EAAE,EAC/B,GAAI,OAAO,WAAWA,EAAO,EAAE,EAC/B,GAAI,OAAO,WAAWA,EAAO,EAAE,CAAA,GAInC,SAAwBE,EAAU,CAChC,KAAAC,EAAM,KAAAC,EAAM,KAAAC,EAAM,KAAAC,EAAM,KAAAC,CAC1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B,SAAUH,CAAM,EACtDT,GAAQY,EAAO,GAAG,oBAAoB,SAAUF,CAAM,CACxD,CAEF,EAAGT,CAAI,CACT"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useEffect as v}from"react";import{x as A,l as E,m as N,s as g,a as L}from"./index-CZ41y9Hn.js";const t={MAX_XS:`(max-width: ${Number(L)}px)`,MIN_SM:`(min-width: ${Number(L)+1}px)`,MAX_SM:`(max-width: ${Number(g)}px)`,MIN_MD:`(min-width: ${Number(g)+1}px)`,MAX_MD:`(max-width: ${Number(N)}px)`,MIN_LG:`(min-width: ${Number(N)+1}px)`,MAX_LG:`(max-width: ${Number(E)}px)`,MIN_XL:`(min-width: ${Number(A)}px)`},c={xs:t.MAX_XS,sm:`${t.MIN_SM} and ${t.MAX_SM}`,md:`${t.MIN_MD} and ${t.MAX_MD}`,lg:`${t.MIN_LG} and ${t.MAX_LG}`,xl:t.MIN_XL},u=()=>({xs:window.matchMedia(c.xs),sm:window.matchMedia(c.sm),md:window.matchMedia(c.md),lg:window.matchMedia(c.lg),xl:window.matchMedia(c.xl)});function k({onXs:i,onSm:s,onMd:a,onLg:m,onXl:n},$=[]){const l={xs:i,sm:s,md:a,lg:m,xl:n},d=(e,r)=>{e.matches&&r()},M=e=>{i&&d(e,i)},x=e=>{s&&d(e,s)},h=e=>{a&&d(e,a)},w=e=>{m&&d(e,m)},_=e=>{n&&d(e,n)},f=e=>{const r=Object.keys(e).find(p=>e[p].matches);l[r]?.()};v(()=>{const e=u();f(e)},[]),v(()=>{const e=u();return i&&e.xs.addEventListener("change",M),s&&e.sm.addEventListener("change",x),a&&e.md.addEventListener("change",h),m&&e.lg.addEventListener("change",w),n&&e.xl.addEventListener("change",_),()=>{i&&e.xs.removeEventListener("change",M),s&&e.sm.removeEventListener("change",x),a&&e.md.removeEventListener("change",h),m&&e.lg.removeEventListener("change",w),n&&e.xl.removeEventListener("change",_)}},$)}export{k as u};
|
|
2
|
-
//# sourceMappingURL=useResize-BjM6tiAF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useResize-BjM6tiAF.js","sources":["../../src/hooks/useResize/useResize.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { xs, sm, md, lg, xl } from '@iziui/tokens/web/js';\n\nexport const DeviceBreakpoints = {\n MAX_XS: `(max-width: ${Number(xs)}px)`,\n MIN_SM: `(min-width: ${Number(xs) + 1}px)`,\n MAX_SM: `(max-width: ${Number(sm)}px)`,\n MIN_MD: `(min-width: ${Number(sm) + 1}px)`,\n MAX_MD: `(max-width: ${Number(md)}px)`,\n MIN_LG: `(min-width: ${Number(md) + 1}px)`,\n MAX_LG: `(max-width: ${Number(lg)}px)`,\n MIN_XL: `(min-width: ${Number(xl)}px)`,\n};\n\ntype Medias = {\n xs: MediaQueryList;\n sm: MediaQueryList;\n md: MediaQueryList;\n lg: MediaQueryList;\n xl: MediaQueryList;\n}\n\nexport interface Callback {\n onXs?: () => void;\n onSm?: () => void;\n onMd?: () => void;\n onLg?: () => void;\n onXl?: () => void;\n}\n\nconst MEDIAS: { [x in keyof Medias]: string; } = {\n xs: DeviceBreakpoints.MAX_XS,\n sm: `${DeviceBreakpoints.MIN_SM} and ${DeviceBreakpoints.MAX_SM}`,\n md: `${DeviceBreakpoints.MIN_MD} and ${DeviceBreakpoints.MAX_MD}`,\n lg: `${DeviceBreakpoints.MIN_LG} and ${DeviceBreakpoints.MAX_LG}`,\n xl: DeviceBreakpoints.MIN_XL\n};\n\nconst getMedias = (): Medias => {\n return {\n xs: window.matchMedia(MEDIAS.xs),\n sm: window.matchMedia(MEDIAS.sm),\n md: window.matchMedia(MEDIAS.md),\n lg: window.matchMedia(MEDIAS.lg),\n xl: window.matchMedia(MEDIAS.xl)\n };\n};\n\nexport default function useResize({\n onXs, onSm, onMd, onLg, onXl\n}: Callback, deps: any[] = []) {\n const MAP_CALLBACKS = {\n xs: onXs,\n sm: onSm,\n md: onMd,\n lg: onLg,\n xl: onXl\n };\n\n const checker = (event: MediaQueryListEvent, fn: () => void) => { if (event.matches) { fn(); } };\n\n const makeXs = (event: MediaQueryListEvent) => {\n if (onXs) { checker(event, onXs); }\n };\n\n const makeSm = (event: MediaQueryListEvent) => {\n if (onSm) { checker(event, onSm); }\n };\n\n const makeMd = (event: MediaQueryListEvent) => {\n if (onMd) { checker(event, onMd); }\n };\n\n const makeLg = (event: MediaQueryListEvent) => {\n if (onLg) { checker(event, onLg); }\n };\n\n const makeXl = (event: MediaQueryListEvent) => {\n if (onXl) { checker(event, onXl); }\n };\n\n const initialize = (medias: Medias) => {\n const key = Object.keys(medias).find((key) => medias[key].matches) as keyof typeof MAP_CALLBACKS;\n MAP_CALLBACKS[key]?.();\n };\n\n useEffect(() => {\n const medias = getMedias();\n initialize(medias);\n }, []);\n\n useEffect(() => {\n const medias = getMedias();\n\n /* eslint-disable @typescript-eslint/no-unused-expressions */\n onXs && medias.xs.addEventListener('change', makeXs);\n onSm && medias.sm.addEventListener('change', makeSm);\n onMd && medias.md.addEventListener('change', makeMd);\n onLg && medias.lg.addEventListener('change', makeLg);\n onXl && medias.xl.addEventListener('change', makeXl);\n\n return () => {\n onXs && medias.xs.removeEventListener('change', makeXs);\n onSm && medias.sm.removeEventListener('change', makeSm);\n onMd && medias.md.removeEventListener('change', makeMd);\n onLg && medias.lg.removeEventListener('change', makeLg);\n onXl && medias.xl.removeEventListener('change', makeXl);\n };\n /* eslint-enable @typescript-eslint/no-unused-expressions */\n }, deps);\n};"],"names":["DeviceBreakpoints","xs","sm","md","lg","xl","MEDIAS","getMedias","useResize","onXs","onSm","onMd","onLg","onXl","deps","MAP_CALLBACKS","checker","event","fn","makeXs","makeSm","makeMd","makeLg","makeXl","initialize","medias","key","useEffect"],"mappings":"sGAIO,MAAMA,EAAoB,CAC/B,OAAQ,eAAe,OAAOC,CAAE,CAAC,MACjC,OAAQ,eAAe,OAAOA,CAAE,EAAI,CAAC,MACrC,OAAQ,eAAe,OAAOC,CAAE,CAAC,MACj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,CAAI,CACjC,EAEMW,EAAcC,GAAmB,CACrC,MAAMC,EAAM,OAAO,KAAKD,CAAM,EAAE,KAAMC,GAAQD,EAAOC,CAAG,EAAE,OAAO,EACjEX,EAAcW,CAAG,IAAA,CACnB,EAEAC,EAAU,IAAM,CACd,MAAMF,EAASlB,EAAA,EACfiB,EAAWC,CAAM,CACnB,EAAG,CAAA,CAAE,EAELE,EAAU,IAAM,CACd,MAAMF,EAASlB,EAAA,EAGf,OAAAE,GAAQgB,EAAO,GAAG,iBAAiB,SAAUN,CAAM,EACnDT,GAAQe,EAAO,GAAG,iBAAiB,SAAUL,CAAM,EACnDT,GAAQc,EAAO,GAAG,iBAAiB,SAAUJ,CAAM,EACnDT,GAAQa,EAAO,GAAG,iBAAiB,SAAUH,CAAM,EACnDT,GAAQY,EAAO,GAAG,iBAAiB,SAAUF,CAAM,EAE5C,IAAM,CACXd,GAAQgB,EAAO,GAAG,oBAAoB,SAAUN,CAAM,EACtDT,GAAQe,EAAO,GAAG,oBAAoB,SAAUL,CAAM,EACtDT,GAAQc,EAAO,GAAG,oBAAoB,SAAUJ,CAAM,EACtDT,GAAQa,EAAO,GAAG,oBAAoB,SAAUH,CAAM,EACtDT,GAAQY,EAAO,GAAG,oBAAoB,SAAUF,CAAM,CACxD,CAEF,EAAGT,CAAI,CACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uuid-dGvr9vBZ.js","sources":["../../../../toolkit/src/uuid/uuid.ts"],"sourcesContent":["export function uuid() {\n let dt = new Date().getTime();\n\n const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n const r = (dt + Math.random() * 16) % 16 | 0;\n dt = Math.floor(dt / 16);\n return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);\n });\n\n return uuid;\n}"],"names":["uuid","dt","c","r"],"mappings":"AAAO,SAASA,GAAO,CACrB,IAAIC,EAAK,IAAI,KAAA,EAAO,QAAA,EAQpB,MANa,uCAAuC,QAAQ,QAAS,SAAUC,EAAG,CAChF,MAAMC,GAAKF,EAAK,KAAK,SAAW,IAAM,GAAK,EAC3C,OAAAA,EAAK,KAAK,MAAMA,EAAK,EAAE,GACfC,GAAK,IAAMC,EAAKA,EAAI,EAAM,GAAM,SAAS,EAAE,CACrD,CAAC,CAGH"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";function n(){let x=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(u){const t=(x+Math.random()*16)%16|0;return x=Math.floor(x/16),(u=="x"?t:t&3|8).toString(16)})}exports.uuid=n;
|
|
2
|
-
//# sourceMappingURL=uuid-omnJ9TjZ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uuid-omnJ9TjZ.cjs","sources":["../../../../toolkit/src/uuid/uuid.ts"],"sourcesContent":["export function uuid() {\n let dt = new Date().getTime();\n\n const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n const r = (dt + Math.random() * 16) % 16 | 0;\n dt = Math.floor(dt / 16);\n return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);\n });\n\n return uuid;\n}"],"names":["uuid","dt","c","r"],"mappings":"aAAO,SAASA,GAAO,CACrB,IAAIC,EAAK,IAAI,KAAA,EAAO,QAAA,EAQpB,MANa,uCAAuC,QAAQ,QAAS,SAAUC,EAAG,CAChF,MAAMC,GAAKF,EAAK,KAAK,SAAW,IAAM,GAAK,EAC3C,OAAAA,EAAK,KAAK,MAAMA,EAAK,EAAE,GACfC,GAAK,IAAMC,EAAKA,EAAI,EAAM,GAAM,SAAS,EAAE,CACrD,CAAC,CAGH"}
|