@iziui/react 0.0.78-rc → 0.0.79-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/feedback/Modal/index.d.ts +1 -1
- package/dist/.types/feedback/Modal/index.d.ts.map +1 -1
- package/dist/chunks/{Alert-Ck-P_L6d.cjs → Alert-BxZX8Ifk.cjs} +2 -2
- package/dist/chunks/{Alert-Ck-P_L6d.cjs.map → Alert-BxZX8Ifk.cjs.map} +1 -1
- package/dist/chunks/{Alert-BvlkZuc1.js → Alert-Em-sG89m.js} +2 -2
- package/dist/chunks/{Alert-BvlkZuc1.js.map → Alert-Em-sG89m.js.map} +1 -1
- package/dist/chunks/{ButtonIcon-DiLyKna8.js → ButtonIcon-CsX4oYeI.js} +2 -2
- package/dist/chunks/{ButtonIcon-DiLyKna8.js.map → ButtonIcon-CsX4oYeI.js.map} +1 -1
- package/dist/chunks/{ButtonIcon-C1xl86iy.cjs → ButtonIcon-Cz8zJH-E.cjs} +2 -2
- package/dist/chunks/{ButtonIcon-C1xl86iy.cjs.map → ButtonIcon-Cz8zJH-E.cjs.map} +1 -1
- package/dist/chunks/{DrawerContent--4uTic34.js → DrawerContent-B0yuNjrh.js} +2 -2
- package/dist/chunks/{DrawerContent--4uTic34.js.map → DrawerContent-B0yuNjrh.js.map} +1 -1
- package/dist/chunks/{DrawerContent-CpEt_oc0.cjs → DrawerContent-XhAQ7dg_.cjs} +2 -2
- package/dist/chunks/{DrawerContent-CpEt_oc0.cjs.map → DrawerContent-XhAQ7dg_.cjs.map} +1 -1
- package/dist/chunks/{Typography-DrTRghDC.js → Typography-BIZP_DtQ.js} +2 -2
- package/dist/chunks/{Typography-DrTRghDC.js.map → Typography-BIZP_DtQ.js.map} +1 -1
- package/dist/chunks/{Typography-DEKIS7xy.cjs → Typography-CAQXUFSQ.cjs} +2 -2
- package/dist/chunks/{Typography-DEKIS7xy.cjs.map → Typography-CAQXUFSQ.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.js +1 -1
- package/dist/components/ButtonIcon/index.cjs +1 -1
- package/dist/components/ButtonIcon/index.js +1 -1
- package/dist/components/ColorPicker/index.cjs +1 -1
- package/dist/components/ColorPicker/index.js +1 -1
- package/dist/components/Drawer/index.cjs +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Toast/index.cjs +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Typography/index.cjs +1 -1
- package/dist/components/Typography/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/feedback/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEjD,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAE3B,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/feedback/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEjD,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAE3B,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,GAAG,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),p=require("react"),t=require("./index-DYxwT4uW.cjs"),i=require("./joinClass-Jk3EszKD.cjs"),a=require("./Stack-beBM7a60.cjs"),j=require("./Typography-
|
|
2
|
-
//# sourceMappingURL=Alert-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),p=require("react"),t=require("./index-DYxwT4uW.cjs"),i=require("./joinClass-Jk3EszKD.cjs"),a=require("./Stack-beBM7a60.cjs"),j=require("./Typography-CAQXUFSQ.cjs"),d=require("./ButtonIcon-Cz8zJH-E.cjs"),y=require("./createComponent-CTufIEiN.cjs"),q=require("./Icon-COl2Nhp9.cjs");function $({children:n,icon:s,color:r="primary",onClose:c,...o}){const l=i.joinClass(`${t.prefix}-alert`,`${t.prefix}-alert--${r}`,o.className),u=i.joinClass(`${t.prefix}-alert__button`,`${t.prefix}-alert__button--${r}`),x=()=>typeof n=="string"?e.jsx(j.Typography,{variant:"body1",style:{color:"currentcolor"},children:n}):n,m=f=>p.cloneElement(f,{color:`${r}.dark`});return e.jsxs(a.Stack,{fullWidth:!0,gap:0,flexDirection:"row",alignItems:"center",justifyContent:"center",...o,className:l,children:[e.jsxs(a.Stack,{fullWidth:!0,gap:8,flexDirection:"row",alignItems:"center",className:`${t.prefix}-alert__content`,children:[s&&m(s),x()]}),c&&e.jsx("div",{children:e.jsx(d.ButtonIcon,{className:u,onClick:c,color:r,style:{color:"currentColor"},children:e.jsx(q.Icon,{name:"times"})})})]})}const g=y.createComponent($);exports.Alert=g;
|
|
2
|
+
//# sourceMappingURL=Alert-BxZX8Ifk.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert-
|
|
1
|
+
{"version":3,"file":"Alert-BxZX8Ifk.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 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 className = joinClass(\n `${prefix}-alert`,\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","className","joinClass","prefix","classNameAction","renderMessage","jsx","Typography","renderIcon","cloneElement","jsxs","Stack","ButtonIcon","Icon","createComponent"],"mappings":"0UAsBA,SAASA,EAAM,CACb,SAAAC,EACA,KAAAC,EACA,MAAAC,EAAQ,UACR,QAAAC,EACA,GAAGC,CACL,EAAe,CACb,MAAMC,EAAYC,EAAAA,UAChB,GAAGC,EAAAA,MAAM,SACT,GAAGA,EAAAA,MAAM,WAAWL,CAAK,GACzBE,EAAM,SAAA,EAGFI,EAAkBF,EAAAA,UACtB,GAAGC,EAAAA,MAAM,iBACT,GAAGA,EAAAA,MAAM,mBAAmBL,CAAK,EAAA,EAG7BO,EAAgB,IAChB,OAAOT,GAAa,SAEpBU,MAACC,EAAAA,YAAW,QAAQ,QAAQ,MAAO,CAAE,MAAO,gBACzC,SAAAX,EACH,EAIGA,EAGHY,EAAcX,GACXY,EAAAA,aAAwBZ,EAAM,CACnC,MAAO,GAAGC,CAAK,OAAA,CAChB,EAGH,OACEY,EAAAA,KAACC,EAAAA,MAAA,CACC,UAAS,GACT,IAAK,EACL,cAAc,MACd,WAAW,SACX,eAAe,SACd,GAAGX,EACJ,UAAAC,EAEA,SAAA,CAAAS,EAAAA,KAACC,EAAAA,MAAA,CACC,UAAS,GACT,IAAK,EACL,cAAc,MACd,WAAW,SACX,UAAW,GAAGR,EAAAA,MAAM,kBAEnB,SAAA,CAAAN,GAAQW,EAAWX,CAAI,EACvBQ,EAAA,CAAc,CAAA,CAAA,EAGfN,SACG,MAAA,CACC,SAAAO,EAAAA,IAACM,EAAAA,WAAA,CACC,UAAWR,EACX,QAASL,EACT,MAAAD,EACA,MAAO,CAAE,MAAO,cAAA,EAEhB,SAAAQ,EAAAA,IAACO,EAAAA,KAAA,CAAK,KAAK,OAAA,CAAQ,CAAA,CAAA,CACrB,CACF,CAAA,CAAA,CAAA,CAIV,CAEA,MAAAlB,EAAemB,EAAAA,gBAAgBnB,CAAK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as c,jsx as e}from"react/jsx-runtime";import{cloneElement as $}from"react";import{p as r}from"./index-CZ41y9Hn.js";import{j as i}from"./joinClass-anSpaauN.js";import{S as m}from"./Stack-DK5pfu2w.js";import{T as y}from"./Typography-
|
|
2
|
-
//# sourceMappingURL=Alert-
|
|
1
|
+
import{jsxs as c,jsx as e}from"react/jsx-runtime";import{cloneElement as $}from"react";import{p as r}from"./index-CZ41y9Hn.js";import{j as i}from"./joinClass-anSpaauN.js";import{S as m}from"./Stack-DK5pfu2w.js";import{T as y}from"./Typography-BIZP_DtQ.js";import{B as g}from"./ButtonIcon-CsX4oYeI.js";import{c as x}from"./createComponent-WNQRXK89.js";import{I}from"./Icon-CCIgEwA9.js";function _({children:o,icon:n,color:t="primary",onClose:a,...s}){const l=i(`${r}-alert`,`${r}-alert--${t}`,s.className),f=i(`${r}-alert__button`,`${r}-alert__button--${t}`),p=()=>typeof o=="string"?e(y,{variant:"body1",style:{color:"currentcolor"},children:o}):o,u=d=>$(d,{color:`${t}.dark`});return c(m,{fullWidth:!0,gap:0,flexDirection:"row",alignItems:"center",justifyContent:"center",...s,className:l,children:[c(m,{fullWidth:!0,gap:8,flexDirection:"row",alignItems:"center",className:`${r}-alert__content`,children:[n&&u(n),p()]}),a&&e("div",{children:e(g,{className:f,onClick:a,color:t,style:{color:"currentColor"},children:e(I,{name:"times"})})})]})}const B=x(_);export{B as A};
|
|
2
|
+
//# sourceMappingURL=Alert-Em-sG89m.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert-
|
|
1
|
+
{"version":3,"file":"Alert-Em-sG89m.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 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 className = joinClass(\n `${prefix}-alert`,\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","className","joinClass","prefix","classNameAction","renderMessage","jsx","Typography","renderIcon","cloneElement","jsxs","Stack","ButtonIcon","Icon","Alert$1","createComponent"],"mappings":"iYAsBA,SAASA,EAAM,CACb,SAAAC,EACA,KAAAC,EACA,MAAAC,EAAQ,UACR,QAAAC,EACA,GAAGC,CACL,EAAe,CACb,MAAMC,EAAYC,EAChB,GAAGC,CAAM,SACT,GAAGA,CAAM,WAAWL,CAAK,GACzBE,EAAM,SAAA,EAGFI,EAAkBF,EACtB,GAAGC,CAAM,iBACT,GAAGA,CAAM,mBAAmBL,CAAK,EAAA,EAG7BO,EAAgB,IAChB,OAAOT,GAAa,SAEpBU,EAACC,GAAW,QAAQ,QAAQ,MAAO,CAAE,MAAO,gBACzC,SAAAX,EACH,EAIGA,EAGHY,EAAcX,GACXY,EAAwBZ,EAAM,CACnC,MAAO,GAAGC,CAAK,OAAA,CAChB,EAGH,OACEY,EAACC,EAAA,CACC,UAAS,GACT,IAAK,EACL,cAAc,MACd,WAAW,SACX,eAAe,SACd,GAAGX,EACJ,UAAAC,EAEA,SAAA,CAAAS,EAACC,EAAA,CACC,UAAS,GACT,IAAK,EACL,cAAc,MACd,WAAW,SACX,UAAW,GAAGR,CAAM,kBAEnB,SAAA,CAAAN,GAAQW,EAAWX,CAAI,EACvBQ,EAAA,CAAc,CAAA,CAAA,EAGfN,KACG,MAAA,CACC,SAAAO,EAACM,EAAA,CACC,UAAWR,EACX,QAASL,EACT,MAAAD,EACA,MAAO,CAAE,MAAO,cAAA,EAEhB,SAAAQ,EAACO,EAAA,CAAK,KAAK,OAAA,CAAQ,CAAA,CAAA,CACrB,CACF,CAAA,CAAA,CAAA,CAIV,CAEA,MAAAC,EAAeC,EAAgBpB,CAAK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as u,jsx as f}from"react/jsx-runtime";import{cloneElement as h}from"react";import{p as n}from"./index-CZ41y9Hn.js";import{j}from"./joinClass-anSpaauN.js";import{c as x}from"./convertPathToColor-D2SdAqGh.js";import{
|
|
2
|
-
//# sourceMappingURL=ButtonIcon-
|
|
1
|
+
import{jsxs as u,jsx as f}from"react/jsx-runtime";import{cloneElement as h}from"react";import{p as n}from"./index-CZ41y9Hn.js";import{j}from"./joinClass-anSpaauN.js";import{c as x}from"./convertPathToColor-D2SdAqGh.js";import{u as y}from"./useTheme-njpgklWP.js";import{R as C}from"./Ripple-Bq9bxg4k.js";import{c as $}from"./createComponent-WNQRXK89.js";function b({children:m,size:r=40,color:o="primary",...t}){const{theme:{palette:c}}=y(),[e,a]=[r,r],i=j(`${n}-button-icon`,o&&`${n}-button-icon--${o}`,t.className),l=x(o,c),p=s=>h(s,{size:e/1.5,...s.props,style:{color:"currentColor"}});return u("button",{...t,className:i,style:{color:l,...t.style,width:e,height:a},children:[p(m),f(C,{})]})}const w=$(b);export{w as B};
|
|
2
|
+
//# sourceMappingURL=ButtonIcon-CsX4oYeI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon-
|
|
1
|
+
{"version":3,"file":"ButtonIcon-CsX4oYeI.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';\nimport { convertPathToColor } from '@iziui/core/utils/convertPathToColor';\n\nimport type { IconProps } from '@/display/Icon';\nimport { useTheme } from '@/theme';\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 { theme: { palette } } = useTheme();\n\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 c = convertPathToColor(color, palette);\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={{ color: c, ...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","palette","useTheme","width","height","classess","joinClass","prefix","c","convertPathToColor","renderIcon","icon","cloneElement","jsxs","Ripple","ButtonIcon$1","createComponent"],"mappings":"iWAoBA,SAASA,EAAW,CAAE,SAAAC,EAAU,KAAAC,EAAO,GAAI,MAAAC,EAAQ,UAAW,GAAGC,GAA0B,CACzF,KAAM,CAAE,MAAO,CAAE,QAAAC,CAAA,CAAQ,EAAMC,EAAA,EAEzB,CAACC,EAAOC,CAAM,EAAI,CAACN,EAAMA,CAAI,EAE7BO,EAAWC,EACf,GAAGC,CAAM,eACTR,GAAS,GAAGQ,CAAM,iBAAiBR,CAAK,GACxCC,EAAM,SAAA,EAGFQ,EAAIC,EAAmBV,EAAOE,CAAO,EAErCS,EAAcC,GACXC,EAAaD,EAAM,CACxB,KAAMR,EAAQ,IACd,GAAGQ,EAAK,MACR,MAAO,CAAE,MAAO,cAAA,CAAe,CAChC,EAGH,OACEE,EAAC,SAAA,CACE,GAAGb,EACJ,UAAWK,EACX,MAAO,CAAE,MAAOG,EAAG,GAAGR,EAAM,MAAO,MAAAG,EAAO,OAAAC,CAAA,EAEzC,SAAA,CAAAM,EAAWb,CAAQ,IACnBiB,EAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAGd,CAEA,MAAAC,EAAeC,EAAgBpB,CAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),p=require("react"),c=require("./index-DYxwT4uW.cjs"),q=require("./joinClass-Jk3EszKD.cjs"),C=require("./convertPathToColor-BlQMLS4V.cjs"),x=require("./
|
|
2
|
-
//# sourceMappingURL=ButtonIcon-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),p=require("react"),c=require("./index-DYxwT4uW.cjs"),q=require("./joinClass-Jk3EszKD.cjs"),C=require("./convertPathToColor-BlQMLS4V.cjs"),x=require("./useTheme-DoESyi5h.cjs"),j=require("./Ripple-Dy4i91j1.cjs"),d=require("./createComponent-CTufIEiN.cjs");function y({children:i,size:n=40,color:e="primary",...t}){const{theme:{palette:u}}=x.useTheme(),[o,l]=[n,n],a=q.joinClass(`${c.prefix}-button-icon`,e&&`${c.prefix}-button-icon--${e}`,t.className),m=C.convertPathToColor(e,u),h=r=>p.cloneElement(r,{size:o/1.5,...r.props,style:{color:"currentColor"}});return s.jsxs("button",{...t,className:a,style:{color:m,...t.style,width:o,height:l},children:[h(i),s.jsx(j.Ripple,{})]})}const I=d.createComponent(y);exports.ButtonIcon=I;
|
|
2
|
+
//# sourceMappingURL=ButtonIcon-Cz8zJH-E.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon-
|
|
1
|
+
{"version":3,"file":"ButtonIcon-Cz8zJH-E.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';\nimport { convertPathToColor } from '@iziui/core/utils/convertPathToColor';\n\nimport type { IconProps } from '@/display/Icon';\nimport { useTheme } from '@/theme';\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 { theme: { palette } } = useTheme();\n\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 c = convertPathToColor(color, palette);\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={{ color: c, ...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","palette","useTheme","width","height","classess","joinClass","prefix","c","convertPathToColor","renderIcon","icon","cloneElement","jsxs","Ripple","createComponent"],"mappings":"gTAoBA,SAASA,EAAW,CAAE,SAAAC,EAAU,KAAAC,EAAO,GAAI,MAAAC,EAAQ,UAAW,GAAGC,GAA0B,CACzF,KAAM,CAAE,MAAO,CAAE,QAAAC,CAAA,CAAQ,EAAMC,EAAAA,SAAA,EAEzB,CAACC,EAAOC,CAAM,EAAI,CAACN,EAAMA,CAAI,EAE7BO,EAAWC,EAAAA,UACf,GAAGC,EAAAA,MAAM,eACTR,GAAS,GAAGQ,EAAAA,MAAM,iBAAiBR,CAAK,GACxCC,EAAM,SAAA,EAGFQ,EAAIC,EAAAA,mBAAmBV,EAAOE,CAAO,EAErCS,EAAcC,GACXC,EAAAA,aAAaD,EAAM,CACxB,KAAMR,EAAQ,IACd,GAAGQ,EAAK,MACR,MAAO,CAAE,MAAO,cAAA,CAAe,CAChC,EAGH,OACEE,EAAAA,KAAC,SAAA,CACE,GAAGb,EACJ,UAAWK,EACX,MAAO,CAAE,MAAOG,EAAG,GAAGR,EAAM,MAAO,MAAAG,EAAO,OAAAC,CAAA,EAEzC,SAAA,CAAAM,EAAWb,CAAQ,QACnBiB,EAAAA,OAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAGd,CAEA,MAAAlB,EAAemB,EAAAA,gBAAgBnB,CAAU"}
|
|
@@ -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-DK5pfu2w.js";import{c as m}from"./createComponent-WNQRXK89.js";import{B as p}from"./ButtonIcon-
|
|
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-DK5pfu2w.js";import{c as m}from"./createComponent-WNQRXK89.js";import{B as p}from"./ButtonIcon-CsX4oYeI.js";import{I}from"./Icon-CCIgEwA9.js";function M(t=!1){const[e,r]=w(!1);return _(()=>{r(t)},[t]),[e,()=>{r(i=>!i)}]}function g({open:t,header:e,body:r,footer:c,direction:i="right",onClose:D,...u}){const[d,l]=w({visible:!1,animation:"hide"}),h=300,N=o(`${n}-drawer`,u.className),$=o(`${n}-drawer__content`,`${n}-drawer__content--${i}`,`${n}-drawer__content--${i}--${d.animation}`),b=o(`${n}-drawer__overlay`,`${n}-drawer__overlay--${d.animation}`);_(()=>{let a;if(t){a=y();return}return a=C(),()=>{clearTimeout(a)}},[t]);const y=()=>(l(a=>({...a,visible:!0})),setTimeout(()=>{l(a=>({...a,animation:"show"})),document.body.style.overflow="hidden"},100)),C=()=>(l(a=>({...a,animation:"hide"})),setTimeout(()=>{l(a=>({...a,visible:!1})),document.body.style.overflow=""},h));return d.visible&&f("div",{...u,className:N,children:[f(v,{className:$,children:[e,r,c]}),s("div",{"data-testid":"drawer-overlay",className:b,onClick:D})]})}const R=m(g);function j({children:t,...e}){const r=o(`${n}-drawer__footer`,e.className);return s("div",{...e,className:r,children:t})}const U=m(j);function x({children:t,onClose:e,...r}){const c=o(`${n}-drawer__header`,r.className);return f(v,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",...r,className:c,children:[t,e&&s(p,{onClick:e,color:"primary","aria-label":"Fechar","data-testid":"drawer-close-button",children:s(I,{name:"times"})})]})}const q=m(x);function T({children:t,...e}){const r=o(`${n}-drawer__content__container`,e.className);return s("div",{...e,className:r,children:t})}const z=m(T);export{R as D,z as a,U as b,q as c,M as u};
|
|
2
|
+
//# sourceMappingURL=DrawerContent-B0yuNjrh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerContent
|
|
1
|
+
{"version":3,"file":"DrawerContent-B0yuNjrh.js","sources":["../../src/navigation/Drawer/useDrawer.ts","../../src/navigation/Drawer/Drawer.tsx","../../src/navigation/Drawer/DrawerFooter.tsx","../../src/navigation/Drawer/DrawerHeader.tsx","../../src/navigation/Drawer/DrawerContent.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\ntype UseDrawer = [boolean, () => void]\n\nexport default function useDrawer(open = false): UseDrawer {\n const [_open, setOpen] = useState(false);\n\n useEffect(() => { setOpen(open); }, [open]);\n\n const toogleDrawer = () => { setOpen(prev => !prev); };\n\n return [_open, toogleDrawer];\n}","import { useEffect, useState, type HTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils';\n\nimport Stack from '@/layout/Stack';\n\nimport createComponent from '../../core/createComponent';\n\nimport '@iziui/styles/components/Drawer.scss';\n\ntype Direction = 'right' | 'left' | 'bottom';\ntype AnimationClass = 'show' | 'hide';\ntype Config = { animation: AnimationClass; visible: boolean };\n\nexport interface DrawerProps extends HTMLAttributes<HTMLDivElement> {\n open: boolean;\n direction?: Direction;\n body: React.JSX.Element;\n header?: React.JSX.Element;\n footer?: React.JSX.Element;\n onClose: () => void;\n};\n\nfunction Drawer({\n open,\n header,\n body,\n footer,\n direction = 'right',\n onClose,\n ...props\n}: DrawerProps) {\n const [config, setConfig] = useState<Config>({ visible: false, animation: 'hide' });\n\n const ANIMATION_DURATION = 300;\n\n const cls = joinClass(\n `${prefix}-drawer`,\n props.className\n );\n\n const contentCls = joinClass(\n `${prefix}-drawer__content`,\n `${prefix}-drawer__content--${direction}`,\n `${prefix}-drawer__content--${direction}--${config.animation}`,\n );\n\n const overlayCls = joinClass(\n `${prefix}-drawer__overlay`,\n `${prefix}-drawer__overlay--${config.animation}`,\n );\n\n useEffect(() => {\n let timer: NodeJS.Timeout;\n\n if (open) {\n timer = handleOpen();\n return;\n }\n\n timer = handleClose();\n\n return () => {\n clearTimeout(timer);\n };\n }, [open]);\n\n const handleOpen = () => {\n setConfig(prev => ({ ...prev, visible: true }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, animation: 'show' }));\n document.body.style.overflow = 'hidden';\n }, 100);\n };\n\n const handleClose = () => {\n setConfig(prev => ({ ...prev, animation: 'hide' }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, visible: false }));\n document.body.style.overflow = '';\n }, ANIMATION_DURATION);\n };\n\n return (\n config.visible && (\n <div {...props} className={cls}>\n <Stack className={contentCls}>\n {header}\n {body}\n {footer}\n </Stack>\n <div\n data-testid=\"drawer-overlay\"\n className={overlayCls}\n onClick={onClose}\n />\n </div>\n )\n );\n}\n\nexport default createComponent(Drawer);\n","import { HtmlHTMLAttributes, PropsWithChildren } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport createComponent from '../../core/createComponent';\n\ntype DrawerFooterProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>\n\nfunction DrawerFooter({ children, ...props }: DrawerFooterProps) {\n const cls = joinClass(\n `${prefix}-drawer__footer`,\n props.className\n );\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(DrawerFooter);\n","import { HtmlHTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport Stack from '@/layout/Stack';\nimport ButtonIcon from '@/actions/ButtonIcon';\nimport Icon from '@/display/Icon';\n\nimport createComponent from '../../core/createComponent';\n\ninterface DrawerHeaderProps extends HtmlHTMLAttributes<HTMLDivElement> {\n onClose: () => void;\n}\n\nfunction DrawerHeader({ children, onClose, ...props }: DrawerHeaderProps) {\n const cls = joinClass(\n `${prefix}-drawer__header`,\n props.className\n );\n\n return (\n <Stack\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n {...props}\n className={cls}\n >\n {children}\n {\n onClose && (\n <ButtonIcon\n onClick={onClose}\n color=\"primary\"\n aria-label=\"Fechar\"\n data-testid=\"drawer-close-button\"\n >\n <Icon name=\"times\" />\n </ButtonIcon>\n )\n }\n </Stack>\n );\n}\n\nexport default createComponent(DrawerHeader);","import { HtmlHTMLAttributes, PropsWithChildren } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport createComponent from '../../core/createComponent';\n\ntype DrawerContentProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>\n\nfunction DrawerContent({ children, ...props }: DrawerContentProps) {\n const cls = joinClass(\n `${prefix}-drawer__content__container`,\n props.className\n );\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(DrawerContent);"],"names":["useDrawer","open","_open","setOpen","useState","useEffect","prev","Drawer","header","body","footer","direction","onClose","props","config","setConfig","ANIMATION_DURATION","cls","joinClass","prefix","contentCls","overlayCls","timer","handleOpen","handleClose","jsxs","Stack","jsx","Drawer_default","createComponent","DrawerFooter","children","DrawerFooter_default","DrawerHeader","ButtonIcon","Icon","DrawerHeader_default","DrawerContent","DrawerContent_default"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const u=require("react"),s=require("react/jsx-runtime"),a=require("./index-DYxwT4uW.cjs"),o=require("./joinClass-Jk3EszKD.cjs"),m=require("./Stack-beBM7a60.cjs"),d=require("./createComponent-CTufIEiN.cjs"),N=require("./ButtonIcon-
|
|
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-beBM7a60.cjs"),d=require("./createComponent-CTufIEiN.cjs"),N=require("./ButtonIcon-Cz8zJH-E.cjs"),$=require("./Icon-COl2Nhp9.cjs");function y(t=!1){const[e,r]=u.useState(!1);return u.useEffect(()=>{r(t)},[t]),[e,()=>{r(i=>!i)}]}function b({open:t,header:e,body:r,footer:c,direction:i="right",onClose:_,...w}){const[f,l]=u.useState({visible:!1,animation:"hide"}),C=300,x=o.joinClass(`${a.prefix}-drawer`,w.className),D=o.joinClass(`${a.prefix}-drawer__content`,`${a.prefix}-drawer__content--${i}`,`${a.prefix}-drawer__content--${i}--${f.animation}`),j=o.joinClass(`${a.prefix}-drawer__overlay`,`${a.prefix}-drawer__overlay--${f.animation}`);u.useEffect(()=>{let n;if(t){n=v();return}return n=h(),()=>{clearTimeout(n)}},[t]);const v=()=>(l(n=>({...n,visible:!0})),setTimeout(()=>{l(n=>({...n,animation:"show"})),document.body.style.overflow="hidden"},100)),h=()=>(l(n=>({...n,animation:"hide"})),setTimeout(()=>{l(n=>({...n,visible:!1})),document.body.style.overflow=""},C));return f.visible&&s.jsxs("div",{...w,className:x,children:[s.jsxs(m.Stack,{className:D,children:[e,r,c]}),s.jsx("div",{"data-testid":"drawer-overlay",className:j,onClick:_})]})}const p=d.createComponent(b);function q({children:t,...e}){const r=o.joinClass(`${a.prefix}-drawer__footer`,e.className);return s.jsx("div",{...e,className:r,children:t})}const I=d.createComponent(q);function g({children:t,onClose:e,...r}){const c=o.joinClass(`${a.prefix}-drawer__header`,r.className);return s.jsxs(m.Stack,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",...r,className:c,children:[t,e&&s.jsx(N.ButtonIcon,{onClick:e,color:"primary","aria-label":"Fechar","data-testid":"drawer-close-button",children:s.jsx($.Icon,{name:"times"})})]})}const k=d.createComponent(g);function S({children:t,...e}){const r=o.joinClass(`${a.prefix}-drawer__content__container`,e.className);return s.jsx("div",{...e,className:r,children:t})}const T=d.createComponent(S);exports.DrawerContent_default=T;exports.DrawerFooter_default=I;exports.DrawerHeader_default=k;exports.Drawer_default=p;exports.useDrawer=y;
|
|
2
|
+
//# sourceMappingURL=DrawerContent-XhAQ7dg_.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerContent-
|
|
1
|
+
{"version":3,"file":"DrawerContent-XhAQ7dg_.cjs","sources":["../../src/navigation/Drawer/useDrawer.ts","../../src/navigation/Drawer/Drawer.tsx","../../src/navigation/Drawer/DrawerFooter.tsx","../../src/navigation/Drawer/DrawerHeader.tsx","../../src/navigation/Drawer/DrawerContent.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\ntype UseDrawer = [boolean, () => void]\n\nexport default function useDrawer(open = false): UseDrawer {\n const [_open, setOpen] = useState(false);\n\n useEffect(() => { setOpen(open); }, [open]);\n\n const toogleDrawer = () => { setOpen(prev => !prev); };\n\n return [_open, toogleDrawer];\n}","import { useEffect, useState, type HTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils';\n\nimport Stack from '@/layout/Stack';\n\nimport createComponent from '../../core/createComponent';\n\nimport '@iziui/styles/components/Drawer.scss';\n\ntype Direction = 'right' | 'left' | 'bottom';\ntype AnimationClass = 'show' | 'hide';\ntype Config = { animation: AnimationClass; visible: boolean };\n\nexport interface DrawerProps extends HTMLAttributes<HTMLDivElement> {\n open: boolean;\n direction?: Direction;\n body: React.JSX.Element;\n header?: React.JSX.Element;\n footer?: React.JSX.Element;\n onClose: () => void;\n};\n\nfunction Drawer({\n open,\n header,\n body,\n footer,\n direction = 'right',\n onClose,\n ...props\n}: DrawerProps) {\n const [config, setConfig] = useState<Config>({ visible: false, animation: 'hide' });\n\n const ANIMATION_DURATION = 300;\n\n const cls = joinClass(\n `${prefix}-drawer`,\n props.className\n );\n\n const contentCls = joinClass(\n `${prefix}-drawer__content`,\n `${prefix}-drawer__content--${direction}`,\n `${prefix}-drawer__content--${direction}--${config.animation}`,\n );\n\n const overlayCls = joinClass(\n `${prefix}-drawer__overlay`,\n `${prefix}-drawer__overlay--${config.animation}`,\n );\n\n useEffect(() => {\n let timer: NodeJS.Timeout;\n\n if (open) {\n timer = handleOpen();\n return;\n }\n\n timer = handleClose();\n\n return () => {\n clearTimeout(timer);\n };\n }, [open]);\n\n const handleOpen = () => {\n setConfig(prev => ({ ...prev, visible: true }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, animation: 'show' }));\n document.body.style.overflow = 'hidden';\n }, 100);\n };\n\n const handleClose = () => {\n setConfig(prev => ({ ...prev, animation: 'hide' }));\n\n return setTimeout(() => {\n setConfig(prev => ({ ...prev, visible: false }));\n document.body.style.overflow = '';\n }, ANIMATION_DURATION);\n };\n\n return (\n config.visible && (\n <div {...props} className={cls}>\n <Stack className={contentCls}>\n {header}\n {body}\n {footer}\n </Stack>\n <div\n data-testid=\"drawer-overlay\"\n className={overlayCls}\n onClick={onClose}\n />\n </div>\n )\n );\n}\n\nexport default createComponent(Drawer);\n","import { HtmlHTMLAttributes, PropsWithChildren } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport createComponent from '../../core/createComponent';\n\ntype DrawerFooterProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>\n\nfunction DrawerFooter({ children, ...props }: DrawerFooterProps) {\n const cls = joinClass(\n `${prefix}-drawer__footer`,\n props.className\n );\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(DrawerFooter);\n","import { HtmlHTMLAttributes } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport Stack from '@/layout/Stack';\nimport ButtonIcon from '@/actions/ButtonIcon';\nimport Icon from '@/display/Icon';\n\nimport createComponent from '../../core/createComponent';\n\ninterface DrawerHeaderProps extends HtmlHTMLAttributes<HTMLDivElement> {\n onClose: () => void;\n}\n\nfunction DrawerHeader({ children, onClose, ...props }: DrawerHeaderProps) {\n const cls = joinClass(\n `${prefix}-drawer__header`,\n props.className\n );\n\n return (\n <Stack\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n {...props}\n className={cls}\n >\n {children}\n {\n onClose && (\n <ButtonIcon\n onClick={onClose}\n color=\"primary\"\n aria-label=\"Fechar\"\n data-testid=\"drawer-close-button\"\n >\n <Icon name=\"times\" />\n </ButtonIcon>\n )\n }\n </Stack>\n );\n}\n\nexport default createComponent(DrawerHeader);","import { HtmlHTMLAttributes, PropsWithChildren } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport createComponent from '../../core/createComponent';\n\ntype DrawerContentProps = PropsWithChildren<HtmlHTMLAttributes<HTMLDivElement>>\n\nfunction DrawerContent({ children, ...props }: DrawerContentProps) {\n const cls = joinClass(\n `${prefix}-drawer__content__container`,\n props.className\n );\n\n return (\n <div {...props} className={cls}>\n {children}\n </div>\n );\n}\n\nexport default createComponent(DrawerContent);"],"names":["useDrawer","open","_open","setOpen","useState","useEffect","prev","Drawer","header","body","footer","direction","onClose","props","config","setConfig","ANIMATION_DURATION","cls","joinClass","prefix","contentCls","overlayCls","timer","handleOpen","handleClose","jsxs","Stack","jsx","Drawer_default","createComponent","DrawerFooter","children","DrawerFooter_default","DrawerHeader","ButtonIcon","Icon","DrawerHeader_default","DrawerContent","DrawerContent_default"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as c}from"react/jsx-runtime";import{useMemo as i}from"react";import{p as r}from"./index-CZ41y9Hn.js";import{j as l}from"./joinClass-anSpaauN.js";import{c as u}from"./convertPathToColor-D2SdAqGh.js";import{
|
|
2
|
-
//# sourceMappingURL=Typography-
|
|
1
|
+
import{jsx as c}from"react/jsx-runtime";import{useMemo as i}from"react";import{p as r}from"./index-CZ41y9Hn.js";import{j as l}from"./joinClass-anSpaauN.js";import{c as u}from"./convertPathToColor-D2SdAqGh.js";import{u as f}from"./useTheme-njpgklWP.js";import{c as b}from"./createComponent-WNQRXK89.js";const N=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2"],g={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"};function T({children:e,variant:s="body1",color:o,weight:h,textAlign:a,...t}){const{theme:{palette:m}}=f(),p=g[s],n=l(`${r}-typography`,`${r}-typography--${s}`,h&&`${r}-typography--weight-${h}`,t.className),y=i(()=>o?u(o,m):"currentColor",[o]);return c(p,{...t,className:n,style:{color:y,textAlign:a,...t.style},children:e})}const P=b(T);export{P as T,N as v};
|
|
2
|
+
//# sourceMappingURL=Typography-BIZP_DtQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography-
|
|
1
|
+
{"version":3,"file":"Typography-BIZP_DtQ.js","sources":["../../src/display/Typography/Typography.tsx"],"sourcesContent":["import { type PropsWithChildren, type HTMLAttributes, type CSSProperties, useMemo } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport type { MappedColors } from '@iziui/core/theme';\nimport { joinClass } from '@iziui/core/utils/joinClass';\nimport { convertPathToColor } from '@iziui/core/utils/convertPathToColor';\n\nimport { useTheme } from '@/theme';\nimport createComponent from '@/core/createComponent';\n\nimport '@iziui/styles/components/Typography.scss';\n\nexport const variants = [\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'subtitle1',\n 'subtitle2',\n 'body1',\n 'body2',\n] as const;\n\nexport type Variant = typeof variants[number];\n\nconst MAP: { [x: string]: React.ElementType } = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p',\n};\n\nexport interface TypographyProps extends PropsWithChildren<HTMLAttributes<HTMLParagraphElement>> {\n variant?: Variant;\n color?: MappedColors;\n textAlign?: CSSProperties['textAlign'];\n weight?: 'bold' | 'normal' | 'light';\n}\n\nfunction Typography({\n children,\n variant = 'body1',\n color: _color,\n weight,\n textAlign,\n ...props\n}: TypographyProps) {\n const { theme: { palette } } = useTheme();\n\n const CustomTag = MAP[variant];\n\n const cls = joinClass(\n `${prefix}-typography`,\n `${prefix}-typography--${variant}`,\n weight && `${prefix}-typography--weight-${weight}`,\n props.className\n );\n\n const color = useMemo(() => {\n if (!_color) { return 'currentColor'; }\n return convertPathToColor(_color, palette);\n }, [_color]);\n\n return (\n <CustomTag\n {...props}\n className={cls}\n style={{\n color,\n textAlign,\n ...props.style\n }}\n >\n {children}\n </CustomTag>\n );\n}\n\nexport default createComponent(Typography);"],"names":["variants","MAP","Typography","children","variant","_color","weight","textAlign","props","palette","useTheme","CustomTag","cls","joinClass","prefix","color","useMemo","convertPathToColor","jsx","Typography$1","createComponent"],"mappings":"8SAaO,MAAMA,EAAW,CACtB,KACA,KACA,KACA,KACA,KACA,KACA,YACA,YACA,QACA,OACF,EAIMC,EAA0C,CAC9C,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,UAAW,KACX,UAAW,KACX,MAAO,IACP,MAAO,GACT,EASA,SAASC,EAAW,CAClB,SAAAC,EACA,QAAAC,EAAU,QACV,MAAOC,EACP,OAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EAAoB,CAClB,KAAM,CAAE,MAAO,CAAE,QAAAC,CAAA,CAAQ,EAAMC,EAAA,EAEzBC,EAAYV,EAAIG,CAAO,EAEvBQ,EAAMC,EACV,GAAGC,CAAM,cACT,GAAGA,CAAM,gBAAgBV,CAAO,GAChCE,GAAU,GAAGQ,CAAM,uBAAuBR,CAAM,GAChDE,EAAM,SAAA,EAGFO,EAAQC,EAAQ,IACfX,EACEY,EAAmBZ,EAAQI,CAAO,EADnB,eAErB,CAACJ,CAAM,CAAC,EAEX,OACEa,EAACP,EAAA,CACE,GAAGH,EACJ,UAAWI,EACX,MAAO,CACL,MAAAG,EACA,UAAAR,EACA,GAAGC,EAAM,KAAA,EAGV,SAAAL,CAAA,CAAA,CAGP,CAEA,MAAAgB,EAAeC,EAAgBlB,CAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const y=require("react/jsx-runtime"),p=require("react"),o=require("./index-DYxwT4uW.cjs"),l=require("./joinClass-Jk3EszKD.cjs"),m=require("./convertPathToColor-BlQMLS4V.cjs"),b=require("./
|
|
2
|
-
//# sourceMappingURL=Typography-
|
|
1
|
+
"use strict";const y=require("react/jsx-runtime"),p=require("react"),o=require("./index-DYxwT4uW.cjs"),l=require("./joinClass-Jk3EszKD.cjs"),m=require("./convertPathToColor-BlQMLS4V.cjs"),b=require("./useTheme-DoESyi5h.cjs"),C=require("./createComponent-CTufIEiN.cjs"),T=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2"],g={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"};function q({children:h,variant:r="body1",color:e,weight:s,textAlign:n,...t}){const{theme:{palette:c}}=b.useTheme(),i=g[r],u=l.joinClass(`${o.prefix}-typography`,`${o.prefix}-typography--${r}`,s&&`${o.prefix}-typography--weight-${s}`,t.className),a=p.useMemo(()=>e?m.convertPathToColor(e,c):"currentColor",[e]);return y.jsx(i,{...t,className:u,style:{color:a,textAlign:n,...t.style},children:h})}const d=C.createComponent(q);exports.Typography=d;exports.variants=T;
|
|
2
|
+
//# sourceMappingURL=Typography-CAQXUFSQ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography-
|
|
1
|
+
{"version":3,"file":"Typography-CAQXUFSQ.cjs","sources":["../../src/display/Typography/Typography.tsx"],"sourcesContent":["import { type PropsWithChildren, type HTMLAttributes, type CSSProperties, useMemo } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport type { MappedColors } from '@iziui/core/theme';\nimport { joinClass } from '@iziui/core/utils/joinClass';\nimport { convertPathToColor } from '@iziui/core/utils/convertPathToColor';\n\nimport { useTheme } from '@/theme';\nimport createComponent from '@/core/createComponent';\n\nimport '@iziui/styles/components/Typography.scss';\n\nexport const variants = [\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'subtitle1',\n 'subtitle2',\n 'body1',\n 'body2',\n] as const;\n\nexport type Variant = typeof variants[number];\n\nconst MAP: { [x: string]: React.ElementType } = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p',\n};\n\nexport interface TypographyProps extends PropsWithChildren<HTMLAttributes<HTMLParagraphElement>> {\n variant?: Variant;\n color?: MappedColors;\n textAlign?: CSSProperties['textAlign'];\n weight?: 'bold' | 'normal' | 'light';\n}\n\nfunction Typography({\n children,\n variant = 'body1',\n color: _color,\n weight,\n textAlign,\n ...props\n}: TypographyProps) {\n const { theme: { palette } } = useTheme();\n\n const CustomTag = MAP[variant];\n\n const cls = joinClass(\n `${prefix}-typography`,\n `${prefix}-typography--${variant}`,\n weight && `${prefix}-typography--weight-${weight}`,\n props.className\n );\n\n const color = useMemo(() => {\n if (!_color) { return 'currentColor'; }\n return convertPathToColor(_color, palette);\n }, [_color]);\n\n return (\n <CustomTag\n {...props}\n className={cls}\n style={{\n color,\n textAlign,\n ...props.style\n }}\n >\n {children}\n </CustomTag>\n );\n}\n\nexport default createComponent(Typography);"],"names":["variants","MAP","Typography","children","variant","_color","weight","textAlign","props","palette","useTheme","CustomTag","cls","joinClass","prefix","color","useMemo","convertPathToColor","jsx","createComponent"],"mappings":"6QAaaA,EAAW,CACtB,KACA,KACA,KACA,KACA,KACA,KACA,YACA,YACA,QACA,OACF,EAIMC,EAA0C,CAC9C,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,UAAW,KACX,UAAW,KACX,MAAO,IACP,MAAO,GACT,EASA,SAASC,EAAW,CAClB,SAAAC,EACA,QAAAC,EAAU,QACV,MAAOC,EACP,OAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EAAoB,CAClB,KAAM,CAAE,MAAO,CAAE,QAAAC,CAAA,CAAQ,EAAMC,EAAAA,SAAA,EAEzBC,EAAYV,EAAIG,CAAO,EAEvBQ,EAAMC,EAAAA,UACV,GAAGC,EAAAA,MAAM,cACT,GAAGA,EAAAA,MAAM,gBAAgBV,CAAO,GAChCE,GAAU,GAAGQ,EAAAA,MAAM,uBAAuBR,CAAM,GAChDE,EAAM,SAAA,EAGFO,EAAQC,EAAAA,QAAQ,IACfX,EACEY,EAAAA,mBAAmBZ,EAAQI,CAAO,EADnB,eAErB,CAACJ,CAAM,CAAC,EAEX,OACEa,EAAAA,IAACP,EAAA,CACE,GAAGH,EACJ,UAAWI,EACX,MAAO,CACL,MAAAG,EACA,UAAAR,EACA,GAAGC,EAAM,KAAA,EAGV,SAAAL,CAAA,CAAA,CAGP,CAEA,MAAAD,EAAeiB,EAAAA,gBAAgBjB,CAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../chunks/Alert-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../chunks/Alert-BxZX8Ifk.cjs");require("react/jsx-runtime");require("react");require("../../chunks/index-DYxwT4uW.cjs");require("../../chunks/joinClass-Jk3EszKD.cjs");require("../../chunks/Stack-beBM7a60.cjs");require("../../chunks/createComponent-CTufIEiN.cjs");require("../../chunks/useTheme-DoESyi5h.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");require("../../chunks/Typography-CAQXUFSQ.cjs");require("../../chunks/convertPathToColor-BlQMLS4V.cjs");require("../../chunks/ButtonIcon-Cz8zJH-E.cjs");require("../../chunks/Ripple-Dy4i91j1.cjs");require("../../chunks/Icon-COl2Nhp9.cjs");exports.default=e.Alert;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as b}from"../../chunks/Alert-
|
|
1
|
+
import{A as b}from"../../chunks/Alert-Em-sG89m.js";import"react/jsx-runtime";import"react";import"../../chunks/index-CZ41y9Hn.js";import"../../chunks/joinClass-anSpaauN.js";import"../../chunks/Stack-DK5pfu2w.js";import"../../chunks/createComponent-WNQRXK89.js";import"../../chunks/useTheme-njpgklWP.js";import"../../chunks/generateSupportColors-BN5t8dA-.js";import"../../chunks/Typography-BIZP_DtQ.js";import"../../chunks/convertPathToColor-D2SdAqGh.js";import"../../chunks/ButtonIcon-CsX4oYeI.js";import"../../chunks/Ripple-Bq9bxg4k.js";import"../../chunks/Icon-CCIgEwA9.js";export{b as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),t=require("../../chunks/index-DYxwT4uW.cjs"),f=require("../../chunks/joinClass-Jk3EszKD.cjs"),d=require("../../chunks/Ripple-Dy4i91j1.cjs"),g=require("../../chunks/createComponent-CTufIEiN.cjs"),v=require("../../chunks/Icon-COl2Nhp9.cjs"),x=require("../../chunks/Typography-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),t=require("../../chunks/index-DYxwT4uW.cjs"),f=require("../../chunks/joinClass-Jk3EszKD.cjs"),d=require("../../chunks/Ripple-Dy4i91j1.cjs"),g=require("../../chunks/createComponent-CTufIEiN.cjs"),v=require("../../chunks/Icon-COl2Nhp9.cjs"),x=require("../../chunks/Typography-CAQXUFSQ.cjs");require("react");require("../../chunks/useTheme-DoESyi5h.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");require("../../chunks/convertPathToColor-BlQMLS4V.cjs");function s(e){return e.normalize("NFD").trim().toLowerCase().replace(/a-zA-Z0-9_.-+/g,"").replace(/_/g,"").replace(/[^\w\s]/gi,"")}function m(e){const a=e.trim().split(" "),i=a.length===1,r=s(a[0]).charAt(0).toLocaleUpperCase(),c=i?s(a[0]).charAt(1).toLocaleUpperCase():s(a.reverse()[0]).charAt(0).toLocaleUpperCase();return r+c}function y({src:e,alt:a,name:i,size:r=40,variant:c="circular",color:u="primary",icon:l,...n}){const h=f.joinClass(`${t.prefix}-avatar`,`${t.prefix}-avatar--${c}`,`${t.prefix}-avatar--${u}`,e&&`${t.prefix}-avatar--image`,i&&`${t.prefix}-avatar--name`,!e&&!i||l&&`${t.prefix}-avatar--icon`,n.onClick&&`${t.prefix}-avatar--clickable`,n.className),p=()=>e?o.jsx("img",{src:e,alt:a,width:r,height:r,sizes:"100vw",loading:"lazy",style:{width:"100%",height:"auto"}}):i?o.jsx(x.Typography,{style:{fontSize:r/2,color:"currentColor"},children:m(i)}):l||o.jsx(v.Icon,{name:"user",size:r/1.6,style:{color:"currentColor"}});return o.jsxs("div",{...n,style:{width:r,height:r,...n.style},className:h,children:[p(),n.children,n.onClick&&o.jsx(d.Ripple,{})]})}const C=g.createComponent(y);exports.default=C;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as h,jsx as n}from"react/jsx-runtime";import{p as r}from"../../chunks/index-CZ41y9Hn.js";import{j as u}from"../../chunks/joinClass-anSpaauN.js";import{R as g}from"../../chunks/Ripple-Bq9bxg4k.js";import{c as v}from"../../chunks/createComponent-WNQRXK89.js";import{I as d}from"../../chunks/Icon-CCIgEwA9.js";import{T as C}from"../../chunks/Typography-
|
|
1
|
+
import{jsxs as h,jsx as n}from"react/jsx-runtime";import{p as r}from"../../chunks/index-CZ41y9Hn.js";import{j as u}from"../../chunks/joinClass-anSpaauN.js";import{R as g}from"../../chunks/Ripple-Bq9bxg4k.js";import{c as v}from"../../chunks/createComponent-WNQRXK89.js";import{I as d}from"../../chunks/Icon-CCIgEwA9.js";import{T as C}from"../../chunks/Typography-BIZP_DtQ.js";import"react";import"../../chunks/useTheme-njpgklWP.js";import"../../chunks/generateSupportColors-BN5t8dA-.js";import"../../chunks/convertPathToColor-D2SdAqGh.js";function s(t){return t.normalize("NFD").trim().toLowerCase().replace(/a-zA-Z0-9_.-+/g,"").replace(/_/g,"").replace(/[^\w\s]/gi,"")}function y(t){const e=t.trim().split(" "),o=e.length===1,a=s(e[0]).charAt(0).toLocaleUpperCase(),l=o?s(e[0]).charAt(1).toLocaleUpperCase():s(e.reverse()[0]).charAt(0).toLocaleUpperCase();return a+l}function $({src:t,alt:e,name:o,size:a=40,variant:l="circular",color:m="primary",icon:c,...i}){const p=u(`${r}-avatar`,`${r}-avatar--${l}`,`${r}-avatar--${m}`,t&&`${r}-avatar--image`,o&&`${r}-avatar--name`,!t&&!o||c&&`${r}-avatar--icon`,i.onClick&&`${r}-avatar--clickable`,i.className),f=()=>t?n("img",{src:t,alt:e,width:a,height:a,sizes:"100vw",loading:"lazy",style:{width:"100%",height:"auto"}}):o?n(C,{style:{fontSize:a/2,color:"currentColor"},children:y(o)}):c||n(d,{name:"user",size:a/1.6,style:{color:"currentColor"}});return h("div",{...i,style:{width:a,height:a,...i.style},className:p,children:[f(),i.children,i.onClick&&n(g,{})]})}const R=v($);export{R as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../chunks/ButtonIcon-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../chunks/ButtonIcon-Cz8zJH-E.cjs");require("react/jsx-runtime");require("react");require("../../chunks/index-DYxwT4uW.cjs");require("../../chunks/joinClass-Jk3EszKD.cjs");require("../../chunks/convertPathToColor-BlQMLS4V.cjs");require("../../chunks/useTheme-DoESyi5h.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");require("../../chunks/Ripple-Dy4i91j1.cjs");require("../../chunks/createComponent-CTufIEiN.cjs");exports.default=e.ButtonIcon;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as s}from"../../chunks/ButtonIcon-
|
|
1
|
+
import{B as s}from"../../chunks/ButtonIcon-CsX4oYeI.js";import"react/jsx-runtime";import"react";import"../../chunks/index-CZ41y9Hn.js";import"../../chunks/joinClass-anSpaauN.js";import"../../chunks/convertPathToColor-D2SdAqGh.js";import"../../chunks/useTheme-njpgklWP.js";import"../../chunks/generateSupportColors-BN5t8dA-.js";import"../../chunks/Ripple-Bq9bxg4k.js";import"../../chunks/createComponent-WNQRXK89.js";export{s as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),d=require("react"),e=require("../../chunks/index-DYxwT4uW.cjs"),s=require("../../chunks/joinClass-Jk3EszKD.cjs"),x=require("../../chunks/generateSupportColors-CTMoGhDf.cjs"),P=require("../../chunks/uuid-omnJ9TjZ.cjs"),R=require("../../chunks/Box-ut8xLHQT.cjs"),C=require("../../chunks/Icon-COl2Nhp9.cjs"),E=require("../../chunks/Stack-beBM7a60.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),d=require("react"),e=require("../../chunks/index-DYxwT4uW.cjs"),s=require("../../chunks/joinClass-Jk3EszKD.cjs"),x=require("../../chunks/generateSupportColors-CTMoGhDf.cjs"),P=require("../../chunks/uuid-omnJ9TjZ.cjs"),R=require("../../chunks/Box-ut8xLHQT.cjs"),C=require("../../chunks/Icon-COl2Nhp9.cjs"),E=require("../../chunks/Stack-beBM7a60.cjs"),I=require("../../chunks/useTheme-DoESyi5h.cjs"),_=require("../../chunks/useMenu-C0u9aTiR.cjs"),O=require("../../chunks/createComponent-CTufIEiN.cjs");require("../../chunks/useListenerResized-AwpsZLcP.cjs");require("../../chunks/Card-B8XSgLaD.cjs");require("../../chunks/Ripple-Dy4i91j1.cjs");require("../../chunks/CardContent-BivcVoIc.cjs");const k=["#00aae6","#2e72fe","#6f4dff","#9f40f1","#9e2dbf","#db5bdc","#ea479b","#ff83a8","#d80051","#eb3d32","#fa8d2f","#f5cd2b","#93ca00","#62d26f","#38c5ab","#87969f"];function T({label:n,error:i,helperText:t,fitContent:m,value:c=k[0],autoClose:b,onChange:j,onInput:h,...$}){const{theme:{palette:a}}=I.useTheme(),l=d.useRef(null),[q,g,u]=_.useMenu(),p=d.useMemo(()=>P.uuid(),[]),N=s.joinClass(`${e.prefix}-color-picker__label`,i&&`${e.prefix}-color-picker__label--error`),y=s.joinClass(`${e.prefix}-color-picker-container`,i&&`${e.prefix}-color-picker-container--error`),v=s.joinClass(`${e.prefix}-color-picker`,i&&`${e.prefix}-color-picker--error`),M=s.joinClass(`${e.prefix}-color-picker__value`,i&&`${e.prefix}-color-picker__value--error`),S=s.joinClass(`${e.prefix}-color-picker__helper-text`,t&&`${e.prefix}-color-picker__helper-text--visible`,i&&`${e.prefix}-color-picker__helper-text--error`),f=o=>s.joinClass(`${e.prefix}-color-picker__color__icon`,c===o&&`${e.prefix}-color-picker__color__icon--visible`);function w(o){l.current&&(l.current.value=o,l.current.dispatchEvent(new Event("input",{bubbles:!0})))}return r.jsxs("div",{className:y,children:[n&&r.jsxs("label",{className:N,children:[n," ",$.required&&"*"]}),r.jsxs("button",{type:"button",onClick:u,className:v,children:[r.jsx("div",{className:`${e.prefix}-color-picker__preview`,children:r.jsx("div",{style:{backgroundColor:c}})}),r.jsx("div",{className:M,children:c})]}),r.jsx("span",{className:S,children:t}),r.jsx(_.Menu,{direction:"left",autoClose:b,open:q,anchorEl:g,width:m?"fit-content":"",onClose:u,children:r.jsx(R.Box,{sx:{p:1},children:r.jsxs(E.Stack,{gap:8,flexDirection:"row",justifyContent:"center",style:{flexWrap:"wrap"},children:[k.map(o=>r.jsx("button",{type:"button",className:`${e.prefix}-color-picker__color`,onClick:()=>w(o),style:{backgroundColor:o},children:r.jsx(C.Icon,{name:"check",className:f(o),style:{color:x.getContrastColor(c)}})},o)),r.jsxs("label",{htmlFor:`color-picker-${p}`,className:`${e.prefix}-color-picker__color`,style:{backgroundColor:a.grey.main},children:[r.jsx(C.Icon,{name:"plus",className:f(c),style:{color:x.getContrastColor(a.grey.main)}}),r.jsx("input",{ref:l,type:"color",id:`color-picker-${p}`,value:c,onChange:j,onInput:h})]})]})})})]})}const B=O.createComponent(T);exports.default=B;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useRef as P,useMemo as R}from"react";import{p as o}from"../../chunks/index-CZ41y9Hn.js";import{j as l}from"../../chunks/joinClass-anSpaauN.js";import{b as u}from"../../chunks/generateSupportColors-BN5t8dA-.js";import{u as S}from"../../chunks/uuid-dGvr9vBZ.js";import{B}from"../../chunks/Box-DD-rZ2rr.js";import{I as _}from"../../chunks/Icon-CCIgEwA9.js";import{S as I}from"../../chunks/Stack-DK5pfu2w.js";import{u as O
|
|
1
|
+
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useRef as P,useMemo as R}from"react";import{p as o}from"../../chunks/index-CZ41y9Hn.js";import{j as l}from"../../chunks/joinClass-anSpaauN.js";import{b as u}from"../../chunks/generateSupportColors-BN5t8dA-.js";import{u as S}from"../../chunks/uuid-dGvr9vBZ.js";import{B}from"../../chunks/Box-DD-rZ2rr.js";import{I as _}from"../../chunks/Icon-CCIgEwA9.js";import{S as I}from"../../chunks/Stack-DK5pfu2w.js";import{u as O}from"../../chunks/useTheme-njpgklWP.js";import{u as q,M as D}from"../../chunks/useMenu-BNL22pOQ.js";import{c as F}from"../../chunks/createComponent-WNQRXK89.js";import"../../chunks/useListenerResized-Bnqxrt7k.js";import"../../chunks/Card-DOsl4_nu.js";import"../../chunks/Ripple-Bq9bxg4k.js";import"../../chunks/CardContent-C8ypE7yH.js";const k=["#00aae6","#2e72fe","#6f4dff","#9f40f1","#9e2dbf","#db5bdc","#ea479b","#ff83a8","#d80051","#eb3d32","#fa8d2f","#f5cd2b","#93ca00","#62d26f","#38c5ab","#87969f"];function L({label:s,error:t,helperText:a,fitContent:b,value:c=k[0],autoClose:h,onChange:C,onInput:$,...N}){const{theme:{palette:p}}=O(),n=P(null),[y,x,m]=q(),f=R(()=>S(),[]),g=l(`${o}-color-picker__label`,t&&`${o}-color-picker__label--error`),v=l(`${o}-color-picker-container`,t&&`${o}-color-picker-container--error`),j=l(`${o}-color-picker`,t&&`${o}-color-picker--error`),w=l(`${o}-color-picker__value`,t&&`${o}-color-picker__value--error`),M=l(`${o}-color-picker__helper-text`,a&&`${o}-color-picker__helper-text--visible`,t&&`${o}-color-picker__helper-text--error`),d=r=>l(`${o}-color-picker__color__icon`,c===r&&`${o}-color-picker__color__icon--visible`);function E(r){n.current&&(n.current.value=r,n.current.dispatchEvent(new Event("input",{bubbles:!0})))}return i("div",{className:v,children:[s&&i("label",{className:g,children:[s," ",N.required&&"*"]}),i("button",{type:"button",onClick:m,className:j,children:[e("div",{className:`${o}-color-picker__preview`,children:e("div",{style:{backgroundColor:c}})}),e("div",{className:w,children:c})]}),e("span",{className:M,children:a}),e(D,{direction:"left",autoClose:h,open:y,anchorEl:x,width:b?"fit-content":"",onClose:m,children:e(B,{sx:{p:1},children:i(I,{gap:8,flexDirection:"row",justifyContent:"center",style:{flexWrap:"wrap"},children:[k.map(r=>e("button",{type:"button",className:`${o}-color-picker__color`,onClick:()=>E(r),style:{backgroundColor:r},children:e(_,{name:"check",className:d(r),style:{color:u(c)}})},r)),i("label",{htmlFor:`color-picker-${f}`,className:`${o}-color-picker__color`,style:{backgroundColor:p.grey.main},children:[e(_,{name:"plus",className:d(c),style:{color:u(p.grey.main)}}),e("input",{ref:n,type:"color",id:`color-picker-${f}`,value:c,onChange:C,onInput:$})]})]})})})]})}const ro=F(L);export{ro as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/DrawerContent-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/DrawerContent-XhAQ7dg_.cjs");require("react");require("react/jsx-runtime");require("../../chunks/index-DYxwT4uW.cjs");require("../../chunks/joinClass-Jk3EszKD.cjs");require("../../chunks/Stack-beBM7a60.cjs");require("../../chunks/createComponent-CTufIEiN.cjs");require("../../chunks/useTheme-DoESyi5h.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");require("../../chunks/ButtonIcon-Cz8zJH-E.cjs");require("../../chunks/convertPathToColor-BlQMLS4V.cjs");require("../../chunks/Ripple-Dy4i91j1.cjs");require("../../chunks/Icon-COl2Nhp9.cjs");exports.Drawer=e.Drawer_default;exports.DrawerContent=e.DrawerContent_default;exports.DrawerFooter=e.DrawerFooter_default;exports.DrawerHeader=e.DrawerHeader_default;exports.useDrawer=e.useDrawer;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as c,a as d,b as f,c as x,u as C}from"../../chunks/DrawerContent
|
|
1
|
+
import{D as c,a as d,b as f,c as x,u as C}from"../../chunks/DrawerContent-B0yuNjrh.js";import"react";import"react/jsx-runtime";import"../../chunks/index-CZ41y9Hn.js";import"../../chunks/joinClass-anSpaauN.js";import"../../chunks/Stack-DK5pfu2w.js";import"../../chunks/createComponent-WNQRXK89.js";import"../../chunks/useTheme-njpgklWP.js";import"../../chunks/generateSupportColors-BN5t8dA-.js";import"../../chunks/ButtonIcon-CsX4oYeI.js";import"../../chunks/convertPathToColor-D2SdAqGh.js";import"../../chunks/Ripple-Bq9bxg4k.js";import"../../chunks/Icon-CCIgEwA9.js";export{c as Drawer,d as DrawerContent,f as DrawerFooter,x as DrawerHeader,C as useDrawer};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),o=require("../../chunks/index-DYxwT4uW.cjs"),f=require("../../chunks/joinClass-Jk3EszKD.cjs"),x=require("../../chunks/createComponent-CTufIEiN.cjs"),v=require("../../chunks/Card-B8XSgLaD.cjs"),_=require("../../chunks/CardContent-BivcVoIc.cjs"),C=require("../../chunks/Stack-beBM7a60.cjs"),g=require("../../chunks/ButtonIcon-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),o=require("../../chunks/index-DYxwT4uW.cjs"),f=require("../../chunks/joinClass-Jk3EszKD.cjs"),x=require("../../chunks/createComponent-CTufIEiN.cjs"),v=require("../../chunks/Card-B8XSgLaD.cjs"),_=require("../../chunks/CardContent-BivcVoIc.cjs"),C=require("../../chunks/Stack-beBM7a60.cjs"),g=require("../../chunks/ButtonIcon-Cz8zJH-E.cjs"),M=require("../../chunks/Icon-COl2Nhp9.cjs");require("../../chunks/useTheme-DoESyi5h.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");require("../../chunks/Ripple-Dy4i91j1.cjs");require("../../chunks/convertPathToColor-BlQMLS4V.cjs");function N({children:n,title:c,subtitle:l,isOpen:u,onClose:i,...m}){const[d,a]=s.useState({visible:!1,animation:"hide"}),r=s.useRef(null),p=300,j=f.joinClass(`${o.prefix}-modal`,`${o.prefix}-modal--${d.animation}`),y=f.joinClass(`${o.prefix}-modal__content`,m.className),b=f.joinClass(`${o.prefix}-modal__backdrop`,`${o.prefix}-modal__backdrop--${d.animation}`);s.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}),[]),s.useEffect(()=>(u?h():q(),()=>{r.current&&(clearTimeout(r.current),r.current=null)}),[u]);const h=()=>{a(t=>({...t,visible:!0})),r.current=setTimeout(()=>{a(t=>({...t,animation:"show"})),document.body.style.overflow="hidden"},100)},q=()=>{a(t=>({...t,animation:"hide"})),r.current=setTimeout(()=>{a(t=>({...t,visible:!1})),document.body.style.overflow=""},p)};return d.visible&&e.jsx("div",{className:b,onClick:i,children:e.jsx("div",{className:`${o.prefix}-modal__container`,children:e.jsx(v.Card,{className:j,children:e.jsxs(_.CardContent,{onClick:t=>t.stopPropagation(),children:[e.jsxs(C.Stack,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",style:{flexWrap:"nowrap"},children:[e.jsxs("div",{children:[c,l]}),e.jsx(g.ButtonIcon,{color:"primary",onClick:i,children:e.jsx(M.Icon,{name:"times",color:"text.secondary"})})]}),e.jsx("div",{...m,className:y,children:n})]})})})})}const k=x.createComponent(N);function w({children:n}){return e.jsx(C.Stack,{flexDirection:"row",justifyContent:"flex-end",alignItems:"center",children:n})}const I=x.createComponent(w);function $({open:n=!1}={}){const[c,l]=s.useState(n);return[c,()=>l(i=>!i)]}exports.Modal=k;exports.ModalFooter=I;exports.useModal=$;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as d}from"react/jsx-runtime";import{useState as C,useRef as w,useEffect as p}from"react";import{p as t}from"../../chunks/index-CZ41y9Hn.js";import{j as f}from"../../chunks/joinClass-anSpaauN.js";import{c as h}from"../../chunks/createComponent-WNQRXK89.js";import{C as I}from"../../chunks/Card-DOsl4_nu.js";import{C as M}from"../../chunks/CardContent-C8ypE7yH.js";import{S as y}from"../../chunks/Stack-DK5pfu2w.js";import{B as $}from"../../chunks/ButtonIcon-
|
|
1
|
+
import{jsx as e,jsxs as d}from"react/jsx-runtime";import{useState as C,useRef as w,useEffect as p}from"react";import{p as t}from"../../chunks/index-CZ41y9Hn.js";import{j as f}from"../../chunks/joinClass-anSpaauN.js";import{c as h}from"../../chunks/createComponent-WNQRXK89.js";import{C as I}from"../../chunks/Card-DOsl4_nu.js";import{C as M}from"../../chunks/CardContent-C8ypE7yH.js";import{S as y}from"../../chunks/Stack-DK5pfu2w.js";import{B as $}from"../../chunks/ButtonIcon-CsX4oYeI.js";import{I as k}from"../../chunks/Icon-CCIgEwA9.js";import"../../chunks/useTheme-njpgklWP.js";import"../../chunks/generateSupportColors-BN5t8dA-.js";import"../../chunks/Ripple-Bq9bxg4k.js";import"../../chunks/convertPathToColor-D2SdAqGh.js";function j({children:n,title:s,subtitle:l,isOpen:c,onClose:a,...u}){const[m,i]=C({visible:!1,animation:"hide"}),r=w(null),b=300,v=f(`${t}-modal`,`${t}-modal--${m.animation}`),_=f(`${t}-modal__content`,u.className),x=f(`${t}-modal__backdrop`,`${t}-modal__backdrop--${m.animation}`);p(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}),[]),p(()=>(c?N():g(),()=>{r.current&&(clearTimeout(r.current),r.current=null)}),[c]);const N=()=>{i(o=>({...o,visible:!0})),r.current=setTimeout(()=>{i(o=>({...o,animation:"show"})),document.body.style.overflow="hidden"},100)},g=()=>{i(o=>({...o,animation:"hide"})),r.current=setTimeout(()=>{i(o=>({...o,visible:!1})),document.body.style.overflow=""},b)};return m.visible&&e("div",{className:x,onClick:a,children:e("div",{className:`${t}-modal__container`,children:e(I,{className:v,children:d(M,{onClick:o=>o.stopPropagation(),children:[d(y,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",style:{flexWrap:"nowrap"},children:[d("div",{children:[s,l]}),e($,{color:"primary",onClick:a,children:e(k,{name:"times",color:"text.secondary"})})]}),e("div",{...u,className:_,children:n})]})})})})}const H=h(j);function T({children:n}){return e(y,{flexDirection:"row",justifyContent:"flex-end",alignItems:"center",children:n})}const J=h(T);function K({open:n=!1}={}){const[s,l]=C(n);return[s,()=>l(a=>!a)]}export{H as Modal,J as ModalFooter,K as useModal};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),f=require("../../chunks/index-DYxwT4uW.cjs"),h=require("../../chunks/joinClass-Jk3EszKD.cjs"),C=require("../../chunks/createComponent-CTufIEiN.cjs"),p=require("../../chunks/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),f=require("../../chunks/index-DYxwT4uW.cjs"),h=require("../../chunks/joinClass-Jk3EszKD.cjs"),C=require("../../chunks/createComponent-CTufIEiN.cjs"),p=require("../../chunks/useTheme-DoESyi5h.cjs"),b=require("../../chunks/Alert-BxZX8Ifk.cjs"),R=require("../../chunks/uuid-omnJ9TjZ.cjs"),g=require("../../chunks/Zoom-BOnqwiDY.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");require("../../chunks/Stack-beBM7a60.cjs");require("../../chunks/Typography-CAQXUFSQ.cjs");require("../../chunks/convertPathToColor-BlQMLS4V.cjs");require("../../chunks/ButtonIcon-Cz8zJH-E.cjs");require("../../chunks/Ripple-Dy4i91j1.cjs");require("../../chunks/Icon-COl2Nhp9.cjs");function y({id:o,color:i,message:u,icon:c,delay:a,onRemove:l,...e}){const t=n.useRef(null),{theme:{mode:r}}=p.useTheme(),j=h.joinClass(`${f.prefix}-toast`,e.className);n.useEffect(()=>(T(),q),[]);const m=()=>{o&&l(o)},T=()=>{t.current=setTimeout(()=>{m()},a)},q=()=>{t.current&&(clearTimeout(t.current),t.current=null)};return s.jsx(b.Alert,{className:j,icon:c,sx:{backgroundColor:({text:d})=>d.primary,color:d=>d[i][r]},onClose:m,onMouseEnter:q,onMouseLeave:T,children:u})}const x=C.createComponent(y),v=n.createContext({toasts:[],add:()=>{}});function M({children:o}){const[i,u]=n.useState([]),c=n.useMemo(()=>({toasts:i,add:e=>{a(e)}}),[i]),a=e=>{u(t=>[...t,{id:R.uuid(),visible:!0,...e}])},l=e=>{u(t=>t.map(r=>(r.id===e&&(r.visible=!1),r))),setTimeout(()=>{u(t=>t.filter(r=>r.id!==e))},500)};return s.jsxs(v.Provider,{value:c,children:[s.jsx("div",{className:`${f.prefix}-toast-container`,children:i.map(({...e})=>s.jsx("div",{style:{marginBottom:15},children:s.jsx(g.Zoom,{enter:!!e.visible,children:s.jsx(x,{...e,onRemove:l})})},e.id))}),o]})}function P(){const{add:o}=n.useContext(v);return{addToast:o}}exports.Toast=x;exports.ToastProvider=M;exports.useToast=P;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as i,jsxs as x}from"react/jsx-runtime";import{useRef as h,useEffect as C,useState as b,useMemo as j,createContext as R,useContext as M}from"react";import{p as f}from"../../chunks/index-CZ41y9Hn.js";import{j as N}from"../../chunks/joinClass-anSpaauN.js";import{c as $}from"../../chunks/createComponent-WNQRXK89.js";import{
|
|
1
|
+
import{jsx as i,jsxs as x}from"react/jsx-runtime";import{useRef as h,useEffect as C,useState as b,useMemo as j,createContext as R,useContext as M}from"react";import{p as f}from"../../chunks/index-CZ41y9Hn.js";import{j as N}from"../../chunks/joinClass-anSpaauN.js";import{c as $}from"../../chunks/createComponent-WNQRXK89.js";import{u as g}from"../../chunks/useTheme-njpgklWP.js";import{A as y}from"../../chunks/Alert-Em-sG89m.js";import{u as A}from"../../chunks/uuid-dGvr9vBZ.js";import{Z as B}from"../../chunks/Zoom-DqgU4Wfv.js";import"../../chunks/generateSupportColors-BN5t8dA-.js";import"../../chunks/Stack-DK5pfu2w.js";import"../../chunks/Typography-BIZP_DtQ.js";import"../../chunks/convertPathToColor-D2SdAqGh.js";import"../../chunks/ButtonIcon-CsX4oYeI.js";import"../../chunks/Ripple-Bq9bxg4k.js";import"../../chunks/Icon-CCIgEwA9.js";function E({id:r,color:s,message:n,icon:m,delay:a,onRemove:c,...t}){const o=h(null),{theme:{mode:e}}=g(),v=N(`${f}-toast`,t.className);C(()=>(d(),p),[]);const l=()=>{r&&c(r)},d=()=>{o.current=setTimeout(()=>{l()},a)},p=()=>{o.current&&(clearTimeout(o.current),o.current=null)};return i(y,{className:v,icon:m,sx:{backgroundColor:({text:u})=>u.primary,color:u=>u[s][e]},onClose:l,onMouseEnter:p,onMouseLeave:d,children:n})}const P=$(E),T=R({toasts:[],add:()=>{}});function U({children:r}){const[s,n]=b([]),m=j(()=>({toasts:s,add:t=>{a(t)}}),[s]),a=t=>{n(o=>[...o,{id:A(),visible:!0,...t}])},c=t=>{n(o=>o.map(e=>(e.id===t&&(e.visible=!1),e))),setTimeout(()=>{n(o=>o.filter(e=>e.id!==t))},500)};return x(T.Provider,{value:m,children:[i("div",{className:`${f}-toast-container`,children:s.map(({...t})=>i("div",{style:{marginBottom:15},children:i(B,{enter:!!t.visible,children:i(P,{...t,onRemove:c})})},t.id))}),r]})}function V(){const{add:r}=M(T);return{addToast:r}}export{P as Toast,U as ToastProvider,V as useToast};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../chunks/Typography-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../chunks/Typography-CAQXUFSQ.cjs");require("react/jsx-runtime");require("react");require("../../chunks/index-DYxwT4uW.cjs");require("../../chunks/joinClass-Jk3EszKD.cjs");require("../../chunks/convertPathToColor-BlQMLS4V.cjs");require("../../chunks/useTheme-DoESyi5h.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");require("../../chunks/createComponent-CTufIEiN.cjs");exports.default=e.Typography;exports.variants=e.variants;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as v,v as d}from"../../chunks/Typography-
|
|
1
|
+
import{T as v,v as d}from"../../chunks/Typography-BIZP_DtQ.js";import"react/jsx-runtime";import"react";import"../../chunks/index-CZ41y9Hn.js";import"../../chunks/joinClass-anSpaauN.js";import"../../chunks/convertPathToColor-D2SdAqGh.js";import"../../chunks/useTheme-njpgklWP.js";import"../../chunks/generateSupportColors-BN5t8dA-.js";import"../../chunks/createComponent-WNQRXK89.js";export{v as default,d as variants};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./chunks/Bounce-ByNbJjX0.cjs"),e=require("./chunks/useForm-TyKbw7O8.cjs"),a=require("./chunks/Fade-CM-5xRVt.cjs"),s=require("./chunks/Slide-D4aLHjYS.cjs"),u=require("./chunks/TableHeader-BEIISMsz.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");const o=require("./chunks/useTheme-DoESyi5h.cjs"),i=require("./chunks/Bounce-ByNbJjX0.cjs"),e=require("./chunks/useForm-TyKbw7O8.cjs"),a=require("./chunks/Fade-CM-5xRVt.cjs"),s=require("./chunks/Slide-D4aLHjYS.cjs"),u=require("./chunks/TableHeader-BEIISMsz.cjs"),d=require("./chunks/Zoom-BOnqwiDY.cjs"),r=require("./chunks/DrawerContent-XhAQ7dg_.cjs"),l=require("./chunks/useListenerResized-AwpsZLcP.cjs"),t=require("./chunks/useMenu-C0u9aTiR.cjs"),q=require("./chunks/useResize-B-oebgDR.cjs"),c=require("./chunks/Card-B8XSgLaD.cjs"),m=require("./chunks/CardContent-BivcVoIc.cjs"),n=require("./chunks/GridItem-wwo-SHGR.cjs"),C=require("./chunks/MenuButton-AyzSxRY0.cjs"),T=require("./chunks/Typography-CAQXUFSQ.cjs");require("react");require("./chunks/generateSupportColors-CTMoGhDf.cjs");require("./chunks/index-DYxwT4uW.cjs");require("./chunks/joinClass-Jk3EszKD.cjs");require("./chunks/createComponent-CTufIEiN.cjs");require("./chunks/Stack-beBM7a60.cjs");require("./chunks/ButtonIcon-Cz8zJH-E.cjs");require("./chunks/convertPathToColor-BlQMLS4V.cjs");require("./chunks/Ripple-Dy4i91j1.cjs");require("./chunks/Icon-COl2Nhp9.cjs");require("./chunks/uuid-omnJ9TjZ.cjs");exports.ThemeProvider=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"react/jsx-runtime";import{T as C,c as l,u as T}from"./chunks/useTheme-njpgklWP.js";import{B as F}from"./chunks/Bounce-DP0PU3kr.js";import{C as c,F as w,u as M,a as B,b as G}from"./chunks/useForm-3oClzOJC.js";import{F as v}from"./chunks/Fade-spxq-W-Q.js";import{S as H}from"./chunks/Slide-BxEwoZ70.js";import{T as S,a as Z,b as y,c as I}from"./chunks/TableHeader-DRtoebsv.js";import{Z as P}from"./chunks/Zoom-DqgU4Wfv.js";import{D as j,a as k,b as q,c as A,u as E}from"./chunks/DrawerContent-B0yuNjrh.js";import{u as K}from"./chunks/useListenerResized-Bnqxrt7k.js";import{M as O,u as Q}from"./chunks/useMenu-BNL22pOQ.js";import{u as V}from"./chunks/useResize-BjM6tiAF.js";import{C as X}from"./chunks/Card-DOsl4_nu.js";import{C as _}from"./chunks/CardContent-C8ypE7yH.js";import{G as rr,a as er}from"./chunks/GridItem-CaoPZmBu.js";import{M as ar}from"./chunks/MenuButton-DLf22r80.js";import{v as tr}from"./chunks/Typography-BIZP_DtQ.js";import"react";import"./chunks/generateSupportColors-BN5t8dA-.js";import"./chunks/index-CZ41y9Hn.js";import"./chunks/joinClass-anSpaauN.js";import"./chunks/createComponent-WNQRXK89.js";import"./chunks/Stack-DK5pfu2w.js";import"./chunks/ButtonIcon-CsX4oYeI.js";import"./chunks/convertPathToColor-D2SdAqGh.js";import"./chunks/Ripple-Bq9bxg4k.js";import"./chunks/Icon-CCIgEwA9.js";import"./chunks/uuid-dGvr9vBZ.js";export{F as Bounce,X as Card,_ as CardContent,c as Control,j as Drawer,k as DrawerContent,q as DrawerFooter,A as DrawerHeader,v as Fade,w as Form,rr as Grid,er as GridItem,O as Menu,ar as MenuButton,H as Slide,S as Table,Z as TableBody,y as TableCell,I as TableHeader,C as ThemeProvider,P as Zoom,l as createTheme,M as useControl,E as useDrawer,B as useForm,G as useFormGroup,K as useListenerResized,Q as useMenu,V as useResize,T as useTheme,tr as variants};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/theme/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/useTheme-DoESyi5h.cjs");require("react");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");const e=require("../chunks/useTheme-DoESyi5h.cjs");require("react");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{T as a,c as i,u as p}from"../chunks/useTheme-njpgklWP.js";import"react";import"
|
|
1
|
+
import"react/jsx-runtime";import{T as a,c as i,u as p}from"../chunks/useTheme-njpgklWP.js";import"react";import"../chunks/generateSupportColors-BN5t8dA-.js";export{a as ThemeProvider,i as createTheme,p as useTheme};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|