@xanui/core 1.2.8 → 1.2.9
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/AppRoot/Renderar.js.map +1 -1
- package/AppRoot/Renderar.mjs.map +1 -1
- package/AppRoot/index.js.map +1 -1
- package/AppRoot/index.mjs.map +1 -1
- package/Tag/cssPropList.js.map +1 -1
- package/Tag/cssPropList.mjs.map +1 -1
- package/Tag/index.js.map +1 -1
- package/Tag/index.mjs.map +1 -1
- package/Tag/useTagProps.js +1 -1
- package/Tag/useTagProps.js.map +1 -1
- package/Tag/useTagProps.mjs +1 -1
- package/Tag/useTagProps.mjs.map +1 -1
- package/Transition/index.js.map +1 -1
- package/Transition/index.mjs.map +1 -1
- package/Transition/variants.js.map +1 -1
- package/Transition/variants.mjs.map +1 -1
- package/breakpoint/BreakpointProvider.js.map +1 -1
- package/breakpoint/BreakpointProvider.mjs.map +1 -1
- package/breakpoint/useBreakpoint.js.map +1 -1
- package/breakpoint/useBreakpoint.mjs.map +1 -1
- package/breakpoint/useBreakpointProps.js.map +1 -1
- package/breakpoint/useBreakpointProps.mjs.map +1 -1
- package/css/aliases.js.map +1 -1
- package/css/aliases.mjs.map +1 -1
- package/css/getProps.js +5 -19
- package/css/getProps.js.map +1 -1
- package/css/getProps.mjs +5 -19
- package/css/getProps.mjs.map +1 -1
- package/css/getValue.js +10 -11
- package/css/getValue.js.map +1 -1
- package/css/getValue.mjs +10 -11
- package/css/getValue.mjs.map +1 -1
- package/css/index.js.map +1 -1
- package/css/index.mjs.map +1 -1
- package/hooks/useAnimation.js.map +1 -1
- package/hooks/useAnimation.mjs.map +1 -1
- package/hooks/useColorTemplate.d.ts +8 -6
- package/hooks/useColorTemplate.js +40 -29
- package/hooks/useColorTemplate.js.map +1 -1
- package/hooks/useColorTemplate.mjs +40 -29
- package/hooks/useColorTemplate.mjs.map +1 -1
- package/hooks/useInterface.js.map +1 -1
- package/hooks/useInterface.mjs.map +1 -1
- package/hooks/usePortal.js.map +1 -1
- package/hooks/usePortal.mjs.map +1 -1
- package/hooks/useScrollbar.js.map +1 -1
- package/hooks/useScrollbar.mjs.map +1 -1
- package/index.d.ts +1 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
- package/readme.md +109 -109
- package/theme/ThemeCssVars.js +1 -1
- package/theme/ThemeCssVars.js.map +1 -1
- package/theme/ThemeCssVars.mjs +1 -1
- package/theme/ThemeCssVars.mjs.map +1 -1
- package/theme/ThemeDefaultOptions.js +84 -8
- package/theme/ThemeDefaultOptions.js.map +1 -1
- package/theme/ThemeDefaultOptions.mjs +84 -8
- package/theme/ThemeDefaultOptions.mjs.map +1 -1
- package/theme/ThemeProvider.js +2 -2
- package/theme/ThemeProvider.js.map +1 -1
- package/theme/ThemeProvider.mjs +2 -2
- package/theme/ThemeProvider.mjs.map +1 -1
- package/theme/core.js.map +1 -1
- package/theme/core.mjs.map +1 -1
- package/theme/createTheme.js +9 -15
- package/theme/createTheme.js.map +1 -1
- package/theme/createTheme.mjs +9 -15
- package/theme/createTheme.mjs.map +1 -1
- package/theme/createThemeSwitcher.js.map +1 -1
- package/theme/createThemeSwitcher.mjs.map +1 -1
- package/theme/index.js.map +1 -1
- package/theme/index.mjs.map +1 -1
- package/theme/types.d.ts +35 -35
- package/theme/createColorScale.d.ts +0 -17
- package/theme/createColorScale.js +0 -55
- package/theme/createColorScale.js.map +0 -1
- package/theme/createColorScale.mjs +0 -55
- package/theme/createColorScale.mjs.map +0 -1
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
'use strict';Object.defineProperty(exports,'__esModule',{value:true});const useColorTemplate = (color, type) => {
|
|
2
|
-
const
|
|
2
|
+
const is_def = color === "default";
|
|
3
|
+
if (is_def) {
|
|
4
|
+
color = "divider";
|
|
5
|
+
}
|
|
3
6
|
if (type === "outline") {
|
|
4
7
|
return {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
primary: {
|
|
9
|
+
bgcolor: `transparent`,
|
|
10
|
+
color: is_def ? `text.primary` : `${color}.primary`,
|
|
11
|
+
border: 1,
|
|
12
|
+
borderColor: is_def ? `divider` : `${color}.primary`,
|
|
13
|
+
},
|
|
14
|
+
secondary: {
|
|
15
|
+
bgcolor: `transparent`,
|
|
16
|
+
color: is_def ? `text.primary` : `${color}.secondary`,
|
|
12
17
|
border: 1,
|
|
13
|
-
borderColor: `${color}.
|
|
18
|
+
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
14
19
|
}
|
|
15
20
|
};
|
|
16
21
|
}
|
|
17
22
|
else if (type === "fill") {
|
|
18
23
|
return {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
primary: {
|
|
25
|
+
bgcolor: color,
|
|
26
|
+
color: is_def ? `text.primary` : `${color}.text`,
|
|
27
|
+
border: 1,
|
|
28
|
+
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
29
|
+
},
|
|
30
|
+
secondary: {
|
|
31
|
+
bgcolor: `${color}.secondary`,
|
|
32
|
+
color: is_def ? `text.primary` : `${color}.text`,
|
|
26
33
|
border: 0,
|
|
27
34
|
borderColor: `transparent`,
|
|
28
35
|
}
|
|
@@ -30,13 +37,15 @@
|
|
|
30
37
|
}
|
|
31
38
|
else if (type === "text") {
|
|
32
39
|
return {
|
|
33
|
-
|
|
34
|
-
color: if_common(`${color}.text`, color),
|
|
35
|
-
border: 0,
|
|
36
|
-
borderColor: `transparent`,
|
|
37
|
-
hover: {
|
|
40
|
+
primary: {
|
|
38
41
|
bgcolor: "transparent",
|
|
39
|
-
color:
|
|
42
|
+
color: is_def ? `text.primary` : `${color}.primary`,
|
|
43
|
+
border: 0,
|
|
44
|
+
borderColor: `transparent`,
|
|
45
|
+
},
|
|
46
|
+
secondary: {
|
|
47
|
+
bgcolor: "transparent",
|
|
48
|
+
color: is_def ? `text.primary` : `${color}.secondary`,
|
|
40
49
|
border: 0,
|
|
41
50
|
borderColor: `transparent`,
|
|
42
51
|
}
|
|
@@ -44,13 +53,15 @@
|
|
|
44
53
|
}
|
|
45
54
|
else if (type === "soft") {
|
|
46
55
|
return {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
primary: {
|
|
57
|
+
bgcolor: `${color}.soft.primary`,
|
|
58
|
+
color: is_def ? `text.primary` : color,
|
|
59
|
+
border: 0,
|
|
60
|
+
borderColor: `transparent`,
|
|
61
|
+
},
|
|
62
|
+
secondary: {
|
|
63
|
+
bgcolor: `${color}.soft.secondary`,
|
|
64
|
+
color: is_def ? `text.primary` : `${color}.secondary`,
|
|
54
65
|
border: 0,
|
|
55
66
|
borderColor: `transparent`,
|
|
56
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorTemplate.js","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["export type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"soft\"\
|
|
1
|
+
{"version":3,"file":"useColorTemplate.js","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["export type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"soft\"\nexport type UseColorTemplateColor = \"default\" | \"brand\" | \"accent\" | \"success\" | \"info\" | \"warning\" | \"danger\"\n\nconst useColorTemplate = (color: UseColorTemplateColor, type: UseColorTemplateType) => {\n const is_def = color === \"default\";\n if (is_def) {\n color = \"divider\" as any\n }\n\n if (type === \"outline\") {\n return {\n primary: {\n bgcolor: `transparent`,\n color: is_def ? `text.primary` : `${color}.primary`,\n border: 1,\n borderColor: is_def ? `divider` : `${color}.primary`,\n },\n secondary: {\n bgcolor: `transparent`,\n color: is_def ? `text.primary` : `${color}.secondary`,\n border: 1,\n borderColor: is_def ? `divider.secondary` : `${color}.secondary`,\n }\n }\n } else if (type === \"fill\") {\n return {\n primary: {\n bgcolor: color,\n color: is_def ? `text.primary` : `${color}.text`,\n border: 1,\n borderColor: is_def ? `divider.secondary` : `${color}.secondary`,\n },\n secondary: {\n bgcolor: `${color}.secondary`,\n color: is_def ? `text.primary` : `${color}.text`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n } else if (type === \"text\") {\n return {\n primary: {\n bgcolor: \"transparent\",\n color: is_def ? `text.primary` : `${color}.primary`,\n border: 0,\n borderColor: `transparent`,\n },\n secondary: {\n bgcolor: \"transparent\",\n color: is_def ? `text.primary` : `${color}.secondary`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n } else if (type === \"soft\") {\n return {\n primary: {\n bgcolor: `${color}.soft.primary`,\n color: is_def ? `text.primary` : color,\n border: 0,\n borderColor: `transparent`,\n },\n secondary: {\n bgcolor: `${color}.soft.secondary`,\n color: is_def ? `text.primary` : `${color}.secondary`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n }\n\n throw new Error(`useColorTemplate: Unknown type ${type}`);\n}\n\nexport default useColorTemplate"],"names":[],"mappings":"sEAGA,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,IAA0B,KAAI;AAClF,IAAA,MAAM,MAAM,GAAG,KAAK,KAAK,SAAS;IAClC,IAAI,MAAM,EAAE;QACR,KAAK,GAAG,SAAgB;IAC5B;AAEA,IAAA,IAAI,IAAI,KAAK,SAAS,EAAE;QACpB,OAAO;AACH,YAAA,OAAO,EAAE;AACL,gBAAA,OAAO,EAAE,CAAA,WAAA,CAAa;gBACtB,KAAK,EAAE,MAAM,GAAG,CAAA,YAAA,CAAc,GAAG,CAAA,EAAG,KAAK,CAAA,QAAA,CAAU;AACnD,gBAAA,MAAM,EAAE,CAAC;gBACT,WAAW,EAAE,MAAM,GAAG,CAAA,OAAA,CAAS,GAAG,CAAA,EAAG,KAAK,CAAA,QAAA,CAAU;AACvD,aAAA;AACD,YAAA,SAAS,EAAE;AACP,gB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AAA,YAAA,CAAc,GAAG,CAAA,EAAG,KAAK,CAAA,UAAA,CAAY;AACrD,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,WAAW,EAAE,CAAA,WAAA,CAAa;AAC7B;SACJ;IACL;AAAO,SAAA,IAAI,IAAI,KAAK,MAAM,EAAE;QACxB,OAAO;AACH,YAAA,OAAO,EAAE;gBACL,OAAO,EAAE,CAAA,EAAG,KAAK,CAAA,aAAA,CAAe;gBAChC,KAAK,EAAE,MAAM,GAAG,CAAA,YAAA,CAAc,GAAG,KAAK;AACtC,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,WAAW,EAAE,CAAA,WAAA,CAAa;AAC7B,aAAA;AACD,YAAA,SAAS,EAAE;gBACP,OAAO,EAAE,CAAA,EAAG,KAAK,CAAA,eAAA,CAAiB;gBAClC,KAAK,EAAE,MAAM,GAAG,CAAA,YAAA,CAAc,GAAG,CAAA,EAAG,KAAK,CAAA,UAAA,CAAY;AACrD,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,WAAW,EAAE,CAAA,WAAA,CAAa;AAC7B;SACJ;IACL;AAEA,IAAA,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,CAAA,CAAE,CAAC;AAC7D"}
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
const useColorTemplate = (color, type) => {
|
|
2
|
-
const
|
|
2
|
+
const is_def = color === "default";
|
|
3
|
+
if (is_def) {
|
|
4
|
+
color = "divider";
|
|
5
|
+
}
|
|
3
6
|
if (type === "outline") {
|
|
4
7
|
return {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
primary: {
|
|
9
|
+
bgcolor: `transparent`,
|
|
10
|
+
color: is_def ? `text.primary` : `${color}.primary`,
|
|
11
|
+
border: 1,
|
|
12
|
+
borderColor: is_def ? `divider` : `${color}.primary`,
|
|
13
|
+
},
|
|
14
|
+
secondary: {
|
|
15
|
+
bgcolor: `transparent`,
|
|
16
|
+
color: is_def ? `text.primary` : `${color}.secondary`,
|
|
12
17
|
border: 1,
|
|
13
|
-
borderColor: `${color}.
|
|
18
|
+
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
14
19
|
}
|
|
15
20
|
};
|
|
16
21
|
}
|
|
17
22
|
else if (type === "fill") {
|
|
18
23
|
return {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
primary: {
|
|
25
|
+
bgcolor: color,
|
|
26
|
+
color: is_def ? `text.primary` : `${color}.text`,
|
|
27
|
+
border: 1,
|
|
28
|
+
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
29
|
+
},
|
|
30
|
+
secondary: {
|
|
31
|
+
bgcolor: `${color}.secondary`,
|
|
32
|
+
color: is_def ? `text.primary` : `${color}.text`,
|
|
26
33
|
border: 0,
|
|
27
34
|
borderColor: `transparent`,
|
|
28
35
|
}
|
|
@@ -30,13 +37,15 @@ const useColorTemplate = (color, type) => {
|
|
|
30
37
|
}
|
|
31
38
|
else if (type === "text") {
|
|
32
39
|
return {
|
|
33
|
-
|
|
34
|
-
color: if_common(`${color}.text`, color),
|
|
35
|
-
border: 0,
|
|
36
|
-
borderColor: `transparent`,
|
|
37
|
-
hover: {
|
|
40
|
+
primary: {
|
|
38
41
|
bgcolor: "transparent",
|
|
39
|
-
color:
|
|
42
|
+
color: is_def ? `text.primary` : `${color}.primary`,
|
|
43
|
+
border: 0,
|
|
44
|
+
borderColor: `transparent`,
|
|
45
|
+
},
|
|
46
|
+
secondary: {
|
|
47
|
+
bgcolor: "transparent",
|
|
48
|
+
color: is_def ? `text.primary` : `${color}.secondary`,
|
|
40
49
|
border: 0,
|
|
41
50
|
borderColor: `transparent`,
|
|
42
51
|
}
|
|
@@ -44,13 +53,15 @@ const useColorTemplate = (color, type) => {
|
|
|
44
53
|
}
|
|
45
54
|
else if (type === "soft") {
|
|
46
55
|
return {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
primary: {
|
|
57
|
+
bgcolor: `${color}.soft.primary`,
|
|
58
|
+
color: is_def ? `text.primary` : color,
|
|
59
|
+
border: 0,
|
|
60
|
+
borderColor: `transparent`,
|
|
61
|
+
},
|
|
62
|
+
secondary: {
|
|
63
|
+
bgcolor: `${color}.soft.secondary`,
|
|
64
|
+
color: is_def ? `text.primary` : `${color}.secondary`,
|
|
54
65
|
border: 0,
|
|
55
66
|
borderColor: `transparent`,
|
|
56
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorTemplate.mjs","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["export type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"soft\"\
|
|
1
|
+
{"version":3,"file":"useColorTemplate.mjs","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["export type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"soft\"\nexport type UseColorTemplateColor = \"default\" | \"brand\" | \"accent\" | \"success\" | \"info\" | \"warning\" | \"danger\"\n\nconst useColorTemplate = (color: UseColorTemplateColor, type: UseColorTemplateType) => {\n const is_def = color === \"default\";\n if (is_def) {\n color = \"divider\" as any\n }\n\n if (type === \"outline\") {\n return {\n primary: {\n bgcolor: `transparent`,\n color: is_def ? `text.primary` : `${color}.primary`,\n border: 1,\n borderColor: is_def ? `divider` : `${color}.primary`,\n },\n secondary: {\n bgcolor: `transparent`,\n color: is_def ? `text.primary` : `${color}.secondary`,\n border: 1,\n borderColor: is_def ? `divider.secondary` : `${color}.secondary`,\n }\n }\n } else if (type === \"fill\") {\n return {\n primary: {\n bgcolor: color,\n color: is_def ? `text.primary` : `${color}.text`,\n border: 1,\n borderColor: is_def ? `divider.secondary` : `${color}.secondary`,\n },\n secondary: {\n bgcolor: `${color}.secondary`,\n color: is_def ? `text.primary` : `${color}.text`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n } else if (type === \"text\") {\n return {\n primary: {\n bgcolor: \"transparent\",\n color: is_def ? `text.primary` : `${color}.primary`,\n border: 0,\n borderColor: `transparent`,\n },\n secondary: {\n bgcolor: \"transparent\",\n color: is_def ? `text.primary` : `${color}.secondary`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n } else if (type === \"soft\") {\n return {\n primary: {\n bgcolor: `${color}.soft.primary`,\n color: is_def ? `text.primary` : color,\n border: 0,\n borderColor: `transparent`,\n },\n secondary: {\n bgcolor: `${color}.soft.secondary`,\n color: is_def ? `text.primary` : `${color}.secondary`,\n border: 0,\n borderColor: `transparent`,\n }\n }\n }\n\n throw new Error(`useColorTemplate: Unknown type ${type}`);\n}\n\nexport default useColorTemplate"],"names":[],"mappings":"AAGA,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,IAA0B,KAAI;AAClF,IAAA,MAAM,MAAM,GAAG,KAAK,KAAK,SAAS;IAClC,IAAI,MAAM,EAAE;QACR,KAAK,GAAG,SAAgB;IAC5B;AAEA,IAAA,IAAI,IAAI,KAAK,SAAS,EAAE;QACpB,OAAO;AACH,YAAA,OAAO,EAAE;AACL,gBAAA,OAAO,EAAE,CAAA,WAAA,CAAa;gBACtB,KAAK,EAAE,MAAM,GAAG,CAAA,YAAA,CAAc,GAAG,CAAA,EAAG,KAAK,CAAA,QAAA,CAAU;AACnD,gBAAA,MAAM,EAAE,CAAC;gBACT,WAAW,EAAE,MAAM,GAAG,CAAA,OAAA,CAAS,GAAG,CAAA,EAAG,KAAK,CAAA,QAAA,CAAU;AACvD,aAAA;AACD,YAAA,SAAS,EAAE;AACP,gBAAA,OAAO,EAAE,CAAA,WAAA,CAAa;gBACtB,KAAK,EAAE,MAAM,GAAG,CAAA,YAAA,CAAc,GAAG,CAAA,EAAG,KAAK,CAAA,UAAA,CAAY;AACrD,gBAAA,MAAM,EAAE,CAAC;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AAA,IAAI,IAAI,KAAK,MAAM,EAAE;QACxB,OAAO;AACH,YAAA,OAAO,EAAE;gBACL,OAAO,EAAE,CAAA,EAAG,KAAK,CAAA,aAAA,CAAe;gBAChC,KAAK,EAAE,MAAM,GAAG,CAAA,YAAA,CAAc,GAAG,KAAK;AACtC,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,WAAW,EAAE,CAAA,WAAA,CAAa;AAC7B,aAAA;AACD,YAAA,SAAS,EAAE;gBACP,OAAO,EAAE,CAAA,EAAG,KAAK,CAAA,eAAA,CAAiB;gBAClC,KAAK,EAAE,MAAM,GAAG,CAAA,YAAA,CAAc,GAAG,CAAA,EAAG,KAAK,CAAA,UAAA,CAAY;AACrD,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,WAAW,EAAE,CAAA,WAAA,CAAa;AAC7B;SACJ;IACL;AAEA,IAAA,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,CAAA,CAAE,CAAC;AAC7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInterface.js","sources":["../../src/hooks/useInterface.ts"],"sourcesContent":["import { useTheme } from \"../theme\"\
|
|
1
|
+
{"version":3,"file":"useInterface.js","sources":["../../src/hooks/useInterface.ts"],"sourcesContent":["import { useTheme } from \"../theme\"\n\nconst useInterface = <P extends object>(name: string, userPorps: P, defaultProps: P) => {\n const theme = useTheme()\n const _interface = theme.interfaces[name]\n\n if (_interface) {\n defaultProps = _interface<P>({ ...defaultProps, ...userPorps }, theme)\n }\n return [{ ...defaultProps, ...userPorps }, theme]\n}\n\nexport default useInterface"],"names":["useTheme"],"mappings":"6NAEA,MAAM,YAAY,GAAG,CAAmB,IAAY,EAAE,SAAY,EAAE,YAAe,KAAI;AACnF,IAAA,MAAM,KAAK,GAAGA,aAAQ,EAAE;IACxB,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;IAEzC,IAAI,UAAU,EAAE;QACZ,YAAY,GAAG,UAAU,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAS,YAAY,GAAK,SAAS,CAAA,EAAI,KAAK,CAAC;IAC1E;AACA,IAAA,OAAO,iCAAM,YAAY,CAAA,EAAK,SAAS,CAAA,EAAI,KAAK,CAAC;AACrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInterface.mjs","sources":["../../src/hooks/useInterface.ts"],"sourcesContent":["import { useTheme } from \"../theme\"\
|
|
1
|
+
{"version":3,"file":"useInterface.mjs","sources":["../../src/hooks/useInterface.ts"],"sourcesContent":["import { useTheme } from \"../theme\"\n\nconst useInterface = <P extends object>(name: string, userPorps: P, defaultProps: P) => {\n const theme = useTheme()\n const _interface = theme.interfaces[name]\n\n if (_interface) {\n defaultProps = _interface<P>({ ...defaultProps, ...userPorps }, theme)\n }\n return [{ ...defaultProps, ...userPorps }, theme]\n}\n\nexport default useInterface"],"names":[],"mappings":"iJAEA,MAAM,YAAY,GAAG,CAAmB,IAAY,EAAE,SAAY,EAAE,YAAe,KAAI;AACnF,IAAA,MAAM,KAAK,GAAG,QAAQ,EAAE;IACxB,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;IAEzC,IAAI,UAAU,EAAE;QACZ,YAAY,GAAG,UAAU,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAS,YAAY,GAAK,SAAS,CAAA,EAAI,KAAK,CAAC;IAC1E;AACA,IAAA,OAAO,iCAAM,YAAY,CAAA,EAAK,SAAS,CAAA,EAAI,KAAK,CAAC;AACrD"}
|
package/hooks/usePortal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePortal.js","sources":["../../src/hooks/usePortal.tsx"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\
|
|
1
|
+
{"version":3,"file":"usePortal.js","sources":["../../src/hooks/usePortal.tsx"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { ThemeProvider, useTheme } from \"../theme\";\nimport { appRootElement } from \"../AppRoot\";\n\nexport type UsePortalOptions = {\n container?: HTMLElement;\n autoMount?: boolean;\n}\n\nexport function usePortal(children: React.ReactNode, options?: UsePortalOptions) {\n options = options || {};\n if (options.autoMount === undefined) {\n options.autoMount = true;\n }\n const [mounted, setMounted] = React.useState(options.autoMount);\n const theme = useTheme();\n const { el, root } = useMemo(() => {\n const el = document.createElement(\"div\");\n const root = createRoot(el);\n return { el, root };\n }, [options.autoMount]);\n\n const container = () => {\n const rootEle = appRootElement();\n const container = options?.container || rootEle\n if (!container) throw new Error(`Container not found for portal. Please ensure that AppRoot is present in the application tree.`);\n return container;\n }\n\n const mount = () => {\n const cont = container();\n if (!cont.contains(el)) {\n cont.appendChild(el);\n }\n root.render(<ThemeProvider theme={theme.name}>{children}</ThemeProvider>)\n }\n\n const unmount = () => {\n root.render(null)\n el.remove();\n }\n\n\n useEffect(() => {\n if (mounted) {\n mount()\n } else {\n unmount()\n }\n }, [mounted]);\n\n useEffect(() => {\n if (mounted) {\n mount()\n }\n }, [children]);\n\n useEffect(() => {\n return () => {\n unmount()\n };\n }, []);\n\n return {\n isMount: () => mounted,\n mount: () => setMounted(true),\n unmount: () => setMounted(false)\n }\n}\n\n\nexport default usePortal;"],"names":["useTheme","useMemo","createRoot","appRootElement","_jsx","ThemeProvider","useEffect"],"mappings":"0XAUM,SAAU,SAAS,CAAC,QAAyB,EAAE,OAA0B,EAAA;AAC5E,IAAA,OAAO,GAAG,OAAO,IAAI,EAAE;AACvB,IAAA,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE;AAClC,QAAA,OAAO,CAAC,SAAS,GAAG,IAAI;IAC3B;AACA,IAAA,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC;AAC/D,IAAA,M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AAO,EAAE;QACZ;AACH,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAEbA,eAAS,CAAC,MAAK;QACZ,IAAI,OAAO,EAAE;AACV,YAAA,KAAK,EAAE;QACV;AACH,IAAA,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAEdA,eAAS,CAAC,MAAK;AACZ,QAAA,OAAO,MAAK;AACT,YAAA,OAAO,EAAE;AACZ,QAAA,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC;IAEN,OAAO;AACJ,QAAA,OAAO,EAAE,MAAM,OAAO;AACtB,QAAA,KAAK,EAAE,MAAM,UAAU,CAAC,IAAI,CAAC;AAC7B,QAAA,OAAO,EAAE,MAAM,UAAU,CAAC,KAAK;KACjC;AACJ"}
|
package/hooks/usePortal.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePortal.mjs","sources":["../../src/hooks/usePortal.tsx"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\
|
|
1
|
+
{"version":3,"file":"usePortal.mjs","sources":["../../src/hooks/usePortal.tsx"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { ThemeProvider, useTheme } from \"../theme\";\nimport { appRootElement } from \"../AppRoot\";\n\nexport type UsePortalOptions = {\n container?: HTMLElement;\n autoMount?: boolean;\n}\n\nexport function usePortal(children: React.ReactNode, options?: UsePortalOptions) {\n options = options || {};\n if (options.autoMount === undefined) {\n options.autoMount = true;\n }\n const [mounted, setMounted] = React.useState(options.autoMount);\n const theme = useTheme();\n const { el, root } = useMemo(() => {\n const el = document.createElement(\"div\");\n const root = createRoot(el);\n return { el, root };\n }, [options.autoMount]);\n\n const container = () => {\n const rootEle = appRootElement();\n const container = options?.container || rootEle\n if (!container) throw new Error(`Container not found for portal. Please ensure that AppRoot is present in the application tree.`);\n return container;\n }\n\n const mount = () => {\n const cont = container();\n if (!cont.contains(el)) {\n cont.appendChild(el);\n }\n root.render(<ThemeProvider theme={theme.name}>{children}</ThemeProvider>)\n }\n\n const unmount = () => {\n root.render(null)\n el.remove();\n }\n\n\n useEffect(() => {\n if (mounted) {\n mount()\n } else {\n unmount()\n }\n }, [mounted]);\n\n useEffect(() => {\n if (mounted) {\n mount()\n }\n }, [children]);\n\n useEffect(() => {\n return () => {\n unmount()\n };\n }, []);\n\n return {\n isMount: () => mounted,\n mount: () => setMounted(true),\n unmount: () => setMounted(false)\n }\n}\n\n\nexport default usePortal;"],"names":["React","_jsx"],"mappings":"yVAUM,SAAU,SAAS,CAAC,QAAyB,EAAE,OAA0B,EAAA;AAC5E,IAAA,OAAO,GAAG,OAAO,IAAI,EAAE;AACvB,IAAA,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE;AAClC,QAAA,OAAO,CAAC,SAAS,GAAG,IAAI;IAC3B;AACA,IAAA,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAGA,cAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC;AAC/D,IAAA,MAAM,KAAK,GAAG,QAAQ,EAAE;IACxB,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAAK;QAC/B,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AACxC,QAAA,MAAM,IAAI,GAAG,UAAU,CAAC,EAAE,CAAC;AAC3B,QAAA,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE;AACtB,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEvB,MAAM,SAAS,GAAG,MAAK;AACpB,QAAA,MAAM,OAAO,GAAG,cAAc,EAAE;AAChC,QAAA,MAAM,SAAS,GAAG,CAAA,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,MAAA,GAAA,MAAA,GAAP,OAAO,CAAE,SAAS,KAAI,OAAO;AAC/C,QAAA,IAAI,CAAC,SAAS;AAAE,YAAA,MAAM,IAAI,KA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
+
{"version":3,"file":"useScrollbar.js","sources":["../../src/hooks/useScrollbar.ts"],"sourcesContent":["import { css } from '../css'\n\nexport type UseScrollbarOption = {\n root_cls?: string;\n thumbSize?: number\n thumbColor?: string\n trackColor?: string;\n}\n\ntype ClassName = string\n\nconst useScrollbar = ({ root_cls, thumbSize, thumbColor, trackColor }: UseScrollbarOption): ClassName => {\n\n thumbSize = thumbSize || 8\n thumbColor = thumbColor || \"var(--color-common-subtext)\"\n trackColor = trackColor || \"var(--color-common-lighter)\"\n\n const cls = (cls: string) => root_cls ? `${root_cls} ${cls}` : cls\n\n return css({\n \"@global\": {\n\n [cls('*::-webkit-scrollbar')]: {\n width: thumbSize,\n height: thumbSize,\n cursor: \"pointer\",\n },\n [cls(\"*::-webkit-scrollbar-thumb\")]: {\n backgroundColor: thumbColor,\n borderRadius: \"6px\",\n },\n [cls(\"*::-webkit-scrollbar-thumb:hover\")]: {\n backgroundColor: thumbColor,\n },\n [cls(\"*::-webkit-scrollbar-track\")]: {\n backgroundColor: trackColor,\n borderRadius: \"6px\",\n },\n // [cls('*')]: {\n // scrollbarWidth: \"thin\",\n // scrollbarColor: `${thumbColor} ${trackColor}`,\n // },\n }\n }, {\n injectStyle: typeof window !== 'undefined'\n }) as any\n}\n\nexport default useScrollbar\n"],"names":["css"],"mappings":"2GAWA,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAsB,KAAe;AAErG,IAAA,SAAS,GAAG,SAAS,IAAI,CAAC;AAC1B,IAAA,UAAU,GAAG,UAAU,IAAI,6BAA6B;AACxD,IAAA,UAAU,GAAG,UAAU,IAAI,6BAA6B;IAExD,MAAM,GAAG,GAAG,CAAC,GAAW,KAAK,QAAQ,GAAG,CAAA,EAAG,QAAQ,IAAI,GAAG,CAAA,CAAE,GAAG,GAAG;AAElE,IAAA,OAAOA,SAAG,CAAC;AACR,QAAA,SAAS,EAAE;AAER,YAAA,CAAC,GAAG,CAAC,sBAAsB,CAAC,GAAG;AAC5B,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,MAAM,EAAE,SAAS;AACjB,gBAAA,MAAM,EAAE,SAAS;AACnB,aAAA;AACD,YAAA,CAAC,GAAG,CAAC,4BAA4B,CAAC,GAAG;AAClC,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,YAAY,EAAE,KAAK;AACrB,aAAA;AACD,YAAA,CAAC,GAAG,CAAC,kCAAkC,CAAC,GAAG;AACxC,gBAAA,eAAe,EAAE,UAAU;AAC7B,aAAA;AACD,YAAA,CAAC,GAAG,CAAC,4BAA4B,CAAC,GAAG;AAClC,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,YAAY,EAAE,KAAK;AACrB,aAAA;;;;;AAKH;KACH,EAAE;AACA,QAAA,WAAW,EAAE,OAAO,MAAM,KAAK;AACjC,KAAA,CAAQ;AACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollbar.mjs","sources":["../../src/hooks/useScrollbar.ts"],"sourcesContent":["import { css } from '../css'\
|
|
1
|
+
{"version":3,"file":"useScrollbar.mjs","sources":["../../src/hooks/useScrollbar.ts"],"sourcesContent":["import { css } from '../css'\n\nexport type UseScrollbarOption = {\n root_cls?: string;\n thumbSize?: number\n thumbColor?: string\n trackColor?: string;\n}\n\ntype ClassName = string\n\nconst useScrollbar = ({ root_cls, thumbSize, thumbColor, trackColor }: UseScrollbarOption): ClassName => {\n\n thumbSize = thumbSize || 8\n thumbColor = thumbColor || \"var(--color-common-subtext)\"\n trackColor = trackColor || \"var(--color-common-lighter)\"\n\n const cls = (cls: string) => root_cls ? `${root_cls} ${cls}` : cls\n\n return css({\n \"@global\": {\n\n [cls('*::-webkit-scrollbar')]: {\n width: thumbSize,\n height: thumbSize,\n cursor: \"pointer\",\n },\n [cls(\"*::-webkit-scrollbar-thumb\")]: {\n backgroundColor: thumbColor,\n borderRadius: \"6px\",\n },\n [cls(\"*::-webkit-scrollbar-thumb:hover\")]: {\n backgroundColor: thumbColor,\n },\n [cls(\"*::-webkit-scrollbar-track\")]: {\n backgroundColor: trackColor,\n borderRadius: \"6px\",\n },\n // [cls('*')]: {\n // scrollbarWidth: \"thin\",\n // scrollbarColor: `${thumbColor} ${trackColor}`,\n // },\n }\n }, {\n injectStyle: typeof window !== 'undefined'\n }) as any\n}\n\nexport default useScrollbar\n"],"names":[],"mappings":"mCAWA,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAsB,KAAe;AAErG,IAAA,SAAS,GAAG,SAAS,IAAI,CAAC;AAC1B,IAAA,UAAU,GAAG,UAAU,IAAI,6BAA6B;AACxD,IAAA,UAAU,GAAG,UAAU,IAAI,6BAA6B;IAExD,MAAM,GAAG,GAAG,CAAC,GAAW,KAAK,QAAQ,GAAG,CAAA,EAAG,QAAQ,IAAI,GAAG,CAAA,CAAE,GAAG,GAAG;AAElE,IAAA,OAAO,GAAG,CAAC;AACR,QAAA,SAAS,EAAE;AAER,YAAA,CAAC,GAAG,CAAC,sBAAsB,CAAC,GAAG;AAC5B,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,MAAM,EAAE,SAAS;AACjB,gBAAA,MAAM,EAAE,SAAS;AACnB,aAAA;AACD,YAAA,CAAC,GAAG,CAAC,4BAA4B,CAAC,GAAG;AAClC,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,YAAY,EAAE,KAAK;AACrB,aAAA;AACD,YAAA,CAAC,GAAG,CAAC,kCAAkC,CAAC,GAAG;AACxC,gBAAA,eAAe,EAAE,UAAU;AAC7B,aAAA;AACD,YAAA,CAAC,GAAG,CAAC,4BAA4B,CAAC,GAAG;AAClC,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,YAAY,EAAE,KAAK;AACrB,aAAA;;;;;AAKH;KACH,EAAE;AACA,QAAA,WAAW,EAAE,OAAO,MAAM,KAAK;AACjC,KAAA,CAAQ;AACZ"}
|
package/index.d.ts
CHANGED
|
@@ -14,11 +14,10 @@ export { adjustColor, adjustTextContrast, alpha, breakpoints, css } from './css/
|
|
|
14
14
|
export { themeRootClass } from './theme/index.js';
|
|
15
15
|
export { Aliases, BreakpointKeys, CSSBreakpointType, CSSOptionProps, CSSProps, CSSValueType, FN, GlobalCSS } from './css/types.js';
|
|
16
16
|
export { CSSPropAsAttr, TagCSSProperties, TagComponentType, TagProps, TagPropsRoot } from './Tag/types.js';
|
|
17
|
-
export { ColorsRefTypes, ObjectType,
|
|
17
|
+
export { ColorsRefTypes, ObjectType, ThemeColorOption, ThemeOptionInput, ThemeOptions, ThemeOptionsColor, ThemeTypographyInputType, ThemeTypographyItem, ThemeTypographyItemInput, ThemeTypographyType, TypographyRefTypes } from './theme/types.js';
|
|
18
18
|
export { default as getValue } from './css/getValue.js';
|
|
19
19
|
export { default as getProps } from './css/getProps.js';
|
|
20
20
|
export { default as ThemeProvider, ThemeProviderProps } from './theme/ThemeProvider.js';
|
|
21
21
|
export { ThemeSwitcherOption, default as createThemeSwitcher } from './theme/createThemeSwitcher.js';
|
|
22
|
-
export { default as createColorScale } from './theme/createColorScale.js';
|
|
23
22
|
export { createTheme } from './theme/createTheme.js';
|
|
24
23
|
export { getTheme, useTheme } from './theme/core.js';
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var index$1=require('./Tag/index.js'),useTagProps=require('./Tag/useTagProps.js'),useAnimation=require('./hooks/useAnimation.js'),useColorTemplate=require('./hooks/useColorTemplate.js'),useBreakpoint=require('./breakpoint/useBreakpoint.js'),useBreakpointProps=require('./breakpoint/useBreakpointProps.js'),useInterface=require('./hooks/useInterface.js'),index$2=require('./Transition/index.js'),useScrollbar=require('./hooks/useScrollbar.js'),index=require('./AppRoot/index.js'),usePortal=require('./hooks/usePortal.js'),Renderar=require('./AppRoot/Renderar.js'),index$3=require('./css/index.js'),index$4=require('./theme/index.js'),getValue=require('./css/getValue.js'),getProps=require('./css/getProps.js'),ThemeProvider=require('./theme/ThemeProvider.js'),createThemeSwitcher=require('./theme/createThemeSwitcher.js'),
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var index$1=require('./Tag/index.js'),useTagProps=require('./Tag/useTagProps.js'),useAnimation=require('./hooks/useAnimation.js'),useColorTemplate=require('./hooks/useColorTemplate.js'),useBreakpoint=require('./breakpoint/useBreakpoint.js'),useBreakpointProps=require('./breakpoint/useBreakpointProps.js'),useInterface=require('./hooks/useInterface.js'),index$2=require('./Transition/index.js'),useScrollbar=require('./hooks/useScrollbar.js'),index=require('./AppRoot/index.js'),usePortal=require('./hooks/usePortal.js'),Renderar=require('./AppRoot/Renderar.js'),index$3=require('./css/index.js'),index$4=require('./theme/index.js'),getValue=require('./css/getValue.js'),getProps=require('./css/getProps.js'),ThemeProvider=require('./theme/ThemeProvider.js'),createThemeSwitcher=require('./theme/createThemeSwitcher.js'),createTheme=require('./theme/createTheme.js'),core=require('./theme/core.js');exports.Tag=index$1.default;exports.useTagProps=useTagProps.default;exports.animationEases=useAnimation.animationEases;exports.useAnimation=useAnimation.default;exports.useColorTemplate=useColorTemplate.default;exports.useBreakpoint=useBreakpoint.default;exports.useBreakpointProps=useBreakpointProps.default;exports.useInterface=useInterface.default;exports.Transition=index$2.default;exports.useScrollbar=useScrollbar.default;exports.AppRoot=index.default;exports.appRootElement=index.appRootElement;exports.usePortal=usePortal.usePortal;exports.Renderar=Renderar.Renderar;exports.adjustColor=index$3.adjustColor;exports.adjustTextContrast=index$3.adjustTextContrast;exports.alpha=index$3.alpha;exports.breakpoints=index$3.breakpoints;exports.css=index$3.css;exports.themeRootClass=index$4.themeRootClass;exports.getValue=getValue.default;exports.getProps=getProps.default;exports.ThemeProvider=ThemeProvider.default;exports.createThemeSwitcher=createThemeSwitcher.default;exports.createTheme=createTheme.createTheme;exports.getTheme=core.getTheme;exports.useTheme=core.useTheme;//# sourceMappingURL=index.js.map
|
package/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as Tag}from'./Tag/index.mjs';export{default as useTagProps}from'./Tag/useTagProps.mjs';export{animationEases,default as useAnimation}from'./hooks/useAnimation.mjs';export{default as useColorTemplate}from'./hooks/useColorTemplate.mjs';export{default as useBreakpoint}from'./breakpoint/useBreakpoint.mjs';export{default as useBreakpointProps}from'./breakpoint/useBreakpointProps.mjs';export{default as useInterface}from'./hooks/useInterface.mjs';export{default as Transition}from'./Transition/index.mjs';export{default as useScrollbar}from'./hooks/useScrollbar.mjs';export{default as AppRoot,appRootElement}from'./AppRoot/index.mjs';export{usePortal}from'./hooks/usePortal.mjs';export{Renderar}from'./AppRoot/Renderar.mjs';export{adjustColor,adjustTextContrast,alpha,breakpoints,css}from'./css/index.mjs';export{themeRootClass}from'./theme/index.mjs';export{default as getValue}from'./css/getValue.mjs';export{default as getProps}from'./css/getProps.mjs';export{default as ThemeProvider}from'./theme/ThemeProvider.mjs';export{default as createThemeSwitcher}from'./theme/createThemeSwitcher.mjs';export{
|
|
1
|
+
export{default as Tag}from'./Tag/index.mjs';export{default as useTagProps}from'./Tag/useTagProps.mjs';export{animationEases,default as useAnimation}from'./hooks/useAnimation.mjs';export{default as useColorTemplate}from'./hooks/useColorTemplate.mjs';export{default as useBreakpoint}from'./breakpoint/useBreakpoint.mjs';export{default as useBreakpointProps}from'./breakpoint/useBreakpointProps.mjs';export{default as useInterface}from'./hooks/useInterface.mjs';export{default as Transition}from'./Transition/index.mjs';export{default as useScrollbar}from'./hooks/useScrollbar.mjs';export{default as AppRoot,appRootElement}from'./AppRoot/index.mjs';export{usePortal}from'./hooks/usePortal.mjs';export{Renderar}from'./AppRoot/Renderar.mjs';export{adjustColor,adjustTextContrast,alpha,breakpoints,css}from'./css/index.mjs';export{themeRootClass}from'./theme/index.mjs';export{default as getValue}from'./css/getValue.mjs';export{default as getProps}from'./css/getProps.mjs';export{default as ThemeProvider}from'./theme/ThemeProvider.mjs';export{default as createThemeSwitcher}from'./theme/createThemeSwitcher.mjs';export{createTheme}from'./theme/createTheme.mjs';export{getTheme,useTheme}from'./theme/core.mjs';//# sourceMappingURL=index.mjs.map
|