@xanui/core 1.2.4 → 1.2.6
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/index.js +1 -1
- package/AppRoot/index.js.map +1 -1
- package/AppRoot/index.mjs +1 -1
- package/AppRoot/index.mjs.map +1 -1
- package/Tag/useTagProps.d.ts +1 -1
- package/Tag/useTagProps.js +8 -8
- package/Tag/useTagProps.js.map +1 -1
- package/Tag/useTagProps.mjs +8 -8
- package/Tag/useTagProps.mjs.map +1 -1
- package/css/getProps.js +19 -34
- package/css/getProps.js.map +1 -1
- package/css/getProps.mjs +19 -34
- package/css/getProps.mjs.map +1 -1
- package/css/getValue.js +6 -8
- package/css/getValue.js.map +1 -1
- package/css/getValue.mjs +6 -8
- package/css/getValue.mjs.map +1 -1
- package/css/types.d.ts +0 -1
- package/hooks/useColorTemplate.d.ts +9 -20
- package/hooks/useColorTemplate.js +40 -27
- package/hooks/useColorTemplate.js.map +1 -1
- package/hooks/useColorTemplate.mjs +40 -27
- package/hooks/useColorTemplate.mjs.map +1 -1
- package/hooks/useScrollbar.js +6 -6
- package/hooks/useScrollbar.js.map +1 -1
- package/hooks/useScrollbar.mjs +6 -6
- package/hooks/useScrollbar.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
- 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 +27 -73
- package/theme/ThemeDefaultOptions.js.map +1 -1
- package/theme/ThemeDefaultOptions.mjs +27 -73
- package/theme/ThemeDefaultOptions.mjs.map +1 -1
- package/theme/ThemeProvider.js +1 -1
- package/theme/ThemeProvider.js.map +1 -1
- package/theme/ThemeProvider.mjs +1 -1
- package/theme/ThemeProvider.mjs.map +1 -1
- package/theme/types.d.ts +7 -10
|
@@ -1,37 +1,26 @@
|
|
|
1
1
|
import { ThemeColor } from '../theme/types.js';
|
|
2
2
|
|
|
3
3
|
type UseColorTemplateType = "fill" | "outline" | "text" | "alpha";
|
|
4
|
+
type UseColorTemplateColor = "common" | "brand" | "accent" | "success" | "info" | "warning" | "danger";
|
|
4
5
|
declare const useColorTemplate: (name: keyof ThemeColor, type: UseColorTemplateType) => {
|
|
5
6
|
bgcolor: string;
|
|
6
7
|
color: string;
|
|
7
|
-
border:
|
|
8
|
-
borderColor: string;
|
|
8
|
+
border: string;
|
|
9
9
|
hover: {
|
|
10
10
|
color: string;
|
|
11
|
-
borderColor:
|
|
11
|
+
borderColor: any;
|
|
12
|
+
bgcolor?: undefined;
|
|
12
13
|
};
|
|
13
14
|
} | {
|
|
14
15
|
bgcolor: string;
|
|
15
|
-
color:
|
|
16
|
-
|
|
17
|
-
bgcolor: string;
|
|
18
|
-
color: string;
|
|
19
|
-
};
|
|
20
|
-
} | {
|
|
21
|
-
bgcolor: string;
|
|
22
|
-
color: string;
|
|
16
|
+
color: any;
|
|
17
|
+
border: string;
|
|
23
18
|
hover: {
|
|
24
19
|
bgcolor: string;
|
|
25
|
-
color:
|
|
26
|
-
|
|
27
|
-
} | {
|
|
28
|
-
bgcolor: string;
|
|
29
|
-
color: string;
|
|
30
|
-
hover: {
|
|
31
|
-
bgcolor: string;
|
|
32
|
-
color: string;
|
|
20
|
+
color: any;
|
|
21
|
+
borderColor?: undefined;
|
|
33
22
|
};
|
|
34
23
|
};
|
|
35
24
|
|
|
36
25
|
export { useColorTemplate as default };
|
|
37
|
-
export type { UseColorTemplateType };
|
|
26
|
+
export type { UseColorTemplateColor, UseColorTemplateType };
|
|
@@ -1,41 +1,54 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var index=require('../css/index.js'),core=require('../theme/core.js');require('../theme/ThemeDefaultOptions.js'),require('../theme/ThemeProvider.js'),require('react-state-bucket');const useColorTemplate = (name, type) => {
|
|
2
2
|
const theme = core.useTheme();
|
|
3
3
|
let color = theme.colors[name];
|
|
4
|
-
let
|
|
5
|
-
|
|
4
|
+
let divider = theme.colors.divider.primary;
|
|
5
|
+
if (name === "common") {
|
|
6
|
+
color = Object.assign(Object.assign({}, color), { text: theme.colors.text.primary });
|
|
7
|
+
}
|
|
8
|
+
const if_common = (a, b) => name === "common" ? a : b;
|
|
9
|
+
if (type === "outline") {
|
|
10
|
+
return {
|
|
6
11
|
bgcolor: "transparent",
|
|
7
|
-
color: color.text.primary,
|
|
8
|
-
border:
|
|
9
|
-
borderColor: color.divider,
|
|
12
|
+
color: if_common(color.text, color.primary),
|
|
13
|
+
border: `1px solid ${divider}`,
|
|
10
14
|
hover: {
|
|
11
|
-
color: color.text.
|
|
15
|
+
color: if_common(color.text, color.secondary),
|
|
12
16
|
borderColor: color.divider,
|
|
13
17
|
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
else if (type === "fill") {
|
|
21
|
+
return {
|
|
22
|
+
bgcolor: if_common(color.secondary, color.primary),
|
|
23
|
+
color: color.text,
|
|
24
|
+
border: `1px solid transparent`,
|
|
18
25
|
hover: {
|
|
19
|
-
bgcolor: color.secondary,
|
|
20
|
-
color: color.text
|
|
26
|
+
bgcolor: if_common(color.secondary, color.secondary),
|
|
27
|
+
color: color.text,
|
|
21
28
|
}
|
|
22
|
-
}
|
|
23
|
-
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
else if (type === "text") {
|
|
32
|
+
return {
|
|
24
33
|
bgcolor: "transparent",
|
|
25
|
-
color: color.primary,
|
|
34
|
+
color: if_common(color.text, color.primary),
|
|
35
|
+
border: `1px solid transparent`,
|
|
26
36
|
hover: {
|
|
27
|
-
bgcolor: color.alpha,
|
|
28
|
-
color: color.primary,
|
|
37
|
+
bgcolor: if_common(color.secondary, index.alpha(color.primary, 0.09)),
|
|
38
|
+
color: if_common(color.text, color.primary),
|
|
29
39
|
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
else if (type === "alpha") {
|
|
43
|
+
return {
|
|
44
|
+
bgcolor: if_common(color.secondary, index.alpha(color.primary, 0.09)),
|
|
45
|
+
color: if_common(color.text, color.primary),
|
|
46
|
+
border: `1px solid transparent`,
|
|
34
47
|
hover: {
|
|
35
|
-
bgcolor: color.alpha,
|
|
36
|
-
color: color.primary,
|
|
48
|
+
bgcolor: if_common(color.secondary, index.alpha(color.primary, 0.15)),
|
|
49
|
+
color: if_common(color.text, color.primary),
|
|
37
50
|
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
throw new Error(`useColorTemplate: Unknown type ${type}`);
|
|
41
54
|
};exports.default=useColorTemplate;//# sourceMappingURL=useColorTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorTemplate.js","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["import { useTheme } from \"../theme\"\r\nimport { ThemeColor } from \"../theme/types\"\r\n\r\nexport type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"alpha\"\r\n\r\nconst useColorTemplate = (name: keyof ThemeColor, type: UseColorTemplateType) => {\r\n const theme = useTheme()\r\n let color = theme.colors[name]\r\n\r\n
|
|
1
|
+
{"version":3,"file":"useColorTemplate.js","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["import { alpha } from \"../css\"\r\nimport { useTheme } from \"../theme\"\r\nimport { ThemeColor } from \"../theme/types\"\r\n\r\nexport type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"alpha\"\r\nexport type UseColorTemplateColor = \"common\" | \"brand\" | \"accent\" | \"success\" | \"info\" | \"warning\" | \"danger\"\r\n\r\nconst useColorTemplate = (name: keyof ThemeColor, type: UseColorTemplateType) => {\r\n const theme = useTheme()\r\n let color: any = theme.colors[name]\r\n let divider = theme.colors.divider.primary\r\n\r\n if (name === \"common\") {\r\n color = {\r\n ...color,\r\n text: theme.colors.text.primary,\r\n }\r\n }\r\n\r\n const if_common = (a: string, b: string) => name === \"common\" ? a : b\r\n\r\n if (type === \"outline\") {\r\n return {\r\n bgcolor: \"transparent\",\r\n color: if_common(color.text, color.primary),\r\n border: `1px solid ${divider}`,\r\n hover: {\r\n color: if_common(color.text, color.secondary),\r\n borderColor: color.divider,\r\n }\r\n }\r\n } else if (type === \"fill\") {\r\n return {\r\n bgcolor: if_common(color.secondary, color.primary),\r\n color: color.text,\r\n border: `1px solid transparent`,\r\n hover: {\r\n bgcolor: if_common(color.secondary, color.secondary),\r\n color: color.text,\r\n }\r\n }\r\n } else if (type === \"text\") {\r\n return {\r\n bgcolor: \"transparent\",\r\n color: if_common(color.text, color.primary),\r\n border: `1px solid transparent`,\r\n hover: {\r\n bgcolor: if_common(color.secondary, alpha(color.primary, 0.09)),\r\n color: if_common(color.text, color.primary),\r\n }\r\n }\r\n } else if (type === \"alpha\") {\r\n return {\r\n bgcolor: if_common(color.secondary, alpha(color.primary, 0.09)),\r\n color: if_common(color.text, color.primary),\r\n border: `1px solid transparent`,\r\n hover: {\r\n bgcolor: if_common(color.secondary, alpha(color.primary, 0.15)),\r\n color: if_common(color.text, color.primary),\r\n }\r\n }\r\n }\r\n\r\n throw new Error(`useColorTemplate: Unknown type ${type}`);\r\n}\r\n\r\nexport default useColorTemplate"],"names":["useTheme","alpha"],"mappings":"0PAOA,MAAM,gBAAgB,GAAG,CAAC,IAAsB,EAAE,IAA0B,KAAI;AAC5E,IAAA,MAAM,KAAK,GAAGA,aAAQ,EAAE;IACxB,IAAI,KAAK,GAAQ,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IACnC,IAAI,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO;AAE1C,IAAA,IAAI,IAAI,KAAK,Q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;AAC/B,YAAA,KAAK,EAAE;AACH,gBAAA,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,SAAS,EAAEC,WAAK,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC/D,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;AAC9C;SACJ;IACL;AAAO,SAAA,IAAI,IAAI,KAAK,OAAO,EAAE;QACzB,OAAO;AACH,YAAA,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,SAAS,EAAEA,WAAK,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC/D,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;AAC3C,YAAA,MAAM,EAAE,CAAA,qBAAA,CAAuB;AAC/B,YAAA,KAAK,EAAE;AACH,gBAAA,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,SAAS,EAAEA,WAAK,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC/D,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;AAC9C;SACJ;IACL;AAEA,IAAA,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,CAAA,CAAE,CAAC;AAC7D"}
|
|
@@ -1,41 +1,54 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {alpha}from'../css/index.mjs';import {useTheme}from'../theme/core.mjs';import'../theme/ThemeDefaultOptions.mjs';import'../theme/ThemeProvider.mjs';import'react-state-bucket';const useColorTemplate = (name, type) => {
|
|
2
2
|
const theme = useTheme();
|
|
3
3
|
let color = theme.colors[name];
|
|
4
|
-
let
|
|
5
|
-
|
|
4
|
+
let divider = theme.colors.divider.primary;
|
|
5
|
+
if (name === "common") {
|
|
6
|
+
color = Object.assign(Object.assign({}, color), { text: theme.colors.text.primary });
|
|
7
|
+
}
|
|
8
|
+
const if_common = (a, b) => name === "common" ? a : b;
|
|
9
|
+
if (type === "outline") {
|
|
10
|
+
return {
|
|
6
11
|
bgcolor: "transparent",
|
|
7
|
-
color: color.text.primary,
|
|
8
|
-
border:
|
|
9
|
-
borderColor: color.divider,
|
|
12
|
+
color: if_common(color.text, color.primary),
|
|
13
|
+
border: `1px solid ${divider}`,
|
|
10
14
|
hover: {
|
|
11
|
-
color: color.text.
|
|
15
|
+
color: if_common(color.text, color.secondary),
|
|
12
16
|
borderColor: color.divider,
|
|
13
17
|
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
else if (type === "fill") {
|
|
21
|
+
return {
|
|
22
|
+
bgcolor: if_common(color.secondary, color.primary),
|
|
23
|
+
color: color.text,
|
|
24
|
+
border: `1px solid transparent`,
|
|
18
25
|
hover: {
|
|
19
|
-
bgcolor: color.secondary,
|
|
20
|
-
color: color.text
|
|
26
|
+
bgcolor: if_common(color.secondary, color.secondary),
|
|
27
|
+
color: color.text,
|
|
21
28
|
}
|
|
22
|
-
}
|
|
23
|
-
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
else if (type === "text") {
|
|
32
|
+
return {
|
|
24
33
|
bgcolor: "transparent",
|
|
25
|
-
color: color.primary,
|
|
34
|
+
color: if_common(color.text, color.primary),
|
|
35
|
+
border: `1px solid transparent`,
|
|
26
36
|
hover: {
|
|
27
|
-
bgcolor: color.alpha,
|
|
28
|
-
color: color.primary,
|
|
37
|
+
bgcolor: if_common(color.secondary, alpha(color.primary, 0.09)),
|
|
38
|
+
color: if_common(color.text, color.primary),
|
|
29
39
|
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
else if (type === "alpha") {
|
|
43
|
+
return {
|
|
44
|
+
bgcolor: if_common(color.secondary, alpha(color.primary, 0.09)),
|
|
45
|
+
color: if_common(color.text, color.primary),
|
|
46
|
+
border: `1px solid transparent`,
|
|
34
47
|
hover: {
|
|
35
|
-
bgcolor: color.alpha,
|
|
36
|
-
color: color.primary,
|
|
48
|
+
bgcolor: if_common(color.secondary, alpha(color.primary, 0.15)),
|
|
49
|
+
color: if_common(color.text, color.primary),
|
|
37
50
|
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
throw new Error(`useColorTemplate: Unknown type ${type}`);
|
|
41
54
|
};export{useColorTemplate as default};//# sourceMappingURL=useColorTemplate.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorTemplate.mjs","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["import { useTheme } from \"../theme\"\r\nimport { ThemeColor } from \"../theme/types\"\r\n\r\nexport type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"alpha\"\r\n\r\nconst useColorTemplate = (name: keyof ThemeColor, type: UseColorTemplateType) => {\r\n const theme = useTheme()\r\n let color = theme.colors[name]\r\n\r\n
|
|
1
|
+
{"version":3,"file":"useColorTemplate.mjs","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["import { alpha } from \"../css\"\r\nimport { useTheme } from \"../theme\"\r\nimport { ThemeColor } from \"../theme/types\"\r\n\r\nexport type UseColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"alpha\"\r\nexport type UseColorTemplateColor = \"common\" | \"brand\" | \"accent\" | \"success\" | \"info\" | \"warning\" | \"danger\"\r\n\r\nconst useColorTemplate = (name: keyof ThemeColor, type: UseColorTemplateType) => {\r\n const theme = useTheme()\r\n let color: any = theme.colors[name]\r\n let divider = theme.colors.divider.primary\r\n\r\n if (name === \"common\") {\r\n color = {\r\n ...color,\r\n text: theme.colors.text.primary,\r\n }\r\n }\r\n\r\n const if_common = (a: string, b: string) => name === \"common\" ? a : b\r\n\r\n if (type === \"outline\") {\r\n return {\r\n bgcolor: \"transparent\",\r\n color: if_common(color.text, color.primary),\r\n border: `1px solid ${divider}`,\r\n hover: {\r\n color: if_common(color.text, color.secondary),\r\n borderColor: color.divider,\r\n }\r\n }\r\n } else if (type === \"fill\") {\r\n return {\r\n bgcolor: if_common(color.secondary, color.primary),\r\n color: color.text,\r\n border: `1px solid transparent`,\r\n hover: {\r\n bgcolor: if_common(color.secondary, color.secondary),\r\n color: color.text,\r\n }\r\n }\r\n } else if (type === \"text\") {\r\n return {\r\n bgcolor: \"transparent\",\r\n color: if_common(color.text, color.primary),\r\n border: `1px solid transparent`,\r\n hover: {\r\n bgcolor: if_common(color.secondary, alpha(color.primary, 0.09)),\r\n color: if_common(color.text, color.primary),\r\n }\r\n }\r\n } else if (type === \"alpha\") {\r\n return {\r\n bgcolor: if_common(color.secondary, alpha(color.primary, 0.09)),\r\n color: if_common(color.text, color.primary),\r\n border: `1px solid transparent`,\r\n hover: {\r\n bgcolor: if_common(color.secondary, alpha(color.primary, 0.15)),\r\n color: if_common(color.text, color.primary),\r\n }\r\n }\r\n }\r\n\r\n throw new Error(`useColorTemplate: Unknown type ${type}`);\r\n}\r\n\r\nexport default useColorTemplate"],"names":[],"mappings":"qLAOA,MAAM,gBAAgB,GAAG,CAAC,IAAsB,EAAE,IAA0B,KAAI;AAC5E,IAAA,MAAM,KAAK,GAAG,QAAQ,EAAE;IACxB,IAAI,KAAK,GAAQ,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IACnC,IAAI,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO;AAE1C,IAAA,IAAI,IAAI,KAAK,QAAQ,EAAE;AACnB,QAAA,KAAK,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACE,KAAK,CAAA,EAAA,EACR,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,GAClC;IACL;IAEA,MAAM,SAAS,GAAG,CAAC,CAAS,EAAE,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9C;SACJ;IACL;AAAO,SAAA,IAAI,IAAI,KAAK,OAAO,EAAE;QACzB,OAAO;AACH,YAAA,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC/D,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;AAC3C,YAAA,MAAM,EAAE,CAAA,qBAAA,CAAuB;AAC/B,YAAA,KAAK,EAAE;AACH,gBAAA,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC/D,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;AAC9C;SACJ;IACL;AAEA,IAAA,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,CAAA,CAAE,CAAC;AAC7D"}
|
package/hooks/useScrollbar.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
console.error(`useScrollbar: The theme '${themeName}' is not defined. Please make sure to use a valid theme name.`);
|
|
5
5
|
theme = core.getTheme("light");
|
|
6
6
|
}
|
|
7
|
-
thumbSize = thumbSize ||
|
|
8
|
-
thumbColor = thumbColor || theme.colors.
|
|
9
|
-
trackColor = trackColor || theme.colors.
|
|
7
|
+
thumbSize = thumbSize || 12;
|
|
8
|
+
thumbColor = thumbColor || theme.colors.divider.secondary;
|
|
9
|
+
trackColor = trackColor || theme.colors.divider.primary;
|
|
10
10
|
root_cls = root_cls || "";
|
|
11
11
|
let clss = {
|
|
12
12
|
"*": root_cls ? `${root_cls} *` : `*`,
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
},
|
|
28
28
|
[clss["scrollbarThumb"]]: {
|
|
29
29
|
backgroundColor: thumbColor,
|
|
30
|
-
borderRadius: "
|
|
31
|
-
border:
|
|
30
|
+
borderRadius: "6px",
|
|
31
|
+
border: `2px solid ${theme.colors.common.primary}`,
|
|
32
32
|
},
|
|
33
33
|
[clss["scrollbarThumbHover"]]: {
|
|
34
34
|
backgroundColor: thumbColor,
|
|
35
35
|
},
|
|
36
36
|
[clss['scrollbarTrack']]: {
|
|
37
37
|
backgroundColor: trackColor,
|
|
38
|
-
borderRadius: "
|
|
38
|
+
borderRadius: "6px",
|
|
39
39
|
},
|
|
40
40
|
}
|
|
41
41
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollbar.js","sources":["../../src/hooks/useScrollbar.ts"],"sourcesContent":["import { getTheme } from '../theme'\r\nimport { css } from '../css'\r\nimport { ThemeOptions } from '../theme/types';\r\n\r\nexport type UseScrollbarOption = {\r\n themeName: string\r\n root_cls?: string;\r\n thumbSize?: number\r\n thumbColor?: string\r\n trackColor?: string\r\n}\r\n\r\ntype ClassName = string\r\n\r\nconst useScrollbar = ({ themeName, root_cls, thumbSize, thumbColor, trackColor }: UseScrollbarOption): ClassName => {\r\n let theme = getTheme(themeName)\r\n if (!theme) {\r\n console.error(`useScrollbar: The theme '${themeName}' is not defined. Please make sure to use a valid theme name.`)\r\n theme = getTheme(\"light\") as ThemeOptions\r\n }\r\n\r\n thumbSize = thumbSize ||
|
|
1
|
+
{"version":3,"file":"useScrollbar.js","sources":["../../src/hooks/useScrollbar.ts"],"sourcesContent":["import { getTheme } from '../theme'\r\nimport { css } from '../css'\r\nimport { ThemeOptions } from '../theme/types';\r\n\r\nexport type UseScrollbarOption = {\r\n themeName: string\r\n root_cls?: string;\r\n thumbSize?: number\r\n thumbColor?: string\r\n trackColor?: string\r\n}\r\n\r\ntype ClassName = string\r\n\r\nconst useScrollbar = ({ themeName, root_cls, thumbSize, thumbColor, trackColor }: UseScrollbarOption): ClassName => {\r\n let theme = getTheme(themeName)\r\n if (!theme) {\r\n console.error(`useScrollbar: The theme '${themeName}' is not defined. Please make sure to use a valid theme name.`)\r\n theme = getTheme(\"light\") as ThemeOptions\r\n }\r\n\r\n thumbSize = thumbSize || 12\r\n thumbColor = thumbColor || theme.colors.divider.secondary\r\n trackColor = trackColor || theme.colors.divider.primary\r\n root_cls = root_cls || \"\"\r\n\r\n let clss = {\r\n \"*\": root_cls ? `${root_cls} *` : `*`,\r\n \"scrollbar\": root_cls ? `${root_cls}::-webkit-scrollbar, ${root_cls} ::-webkit-scrollbar` : `::-webkit-scrollbar`,\r\n \"scrollbarThumb\": root_cls ? `${root_cls}::-webkit-scrollbar-thumb, ${root_cls} ::-webkit-scrollbar-thumb` : `::-webkit-scrollbar-thumb`,\r\n \"scrollbarThumbHover\": root_cls ? `${root_cls}::-webkit-scrollbar-thumb:hover, ${root_cls} ::-webkit-scrollbar-thumb:hover` : `::-webkit-scrollbar-thumb:hover`,\r\n \"scrollbarTrack\": root_cls ? `${root_cls}::-webkit-scrollbar-track, ${root_cls} ::-webkit-scrollbar-track` : `::-webkit-scrollbar-track`,\r\n }\r\n\r\n return css({\r\n \"@global\": {\r\n [clss['*']]: {\r\n scrollbarWidth: \"thin\",\r\n scrollbarColor: `${thumbColor} ${trackColor}`,\r\n },\r\n [clss[\"scrollbar\"]]: {\r\n width: thumbSize,\r\n height: thumbSize,\r\n },\r\n [clss[\"scrollbarThumb\"]]: {\r\n backgroundColor: thumbColor,\r\n borderRadius: \"6px\",\r\n border: `2px solid ${theme.colors.common.primary}`,\r\n },\r\n [clss[\"scrollbarThumbHover\"]]: {\r\n backgroundColor: thumbColor,\r\n },\r\n [clss['scrollbarTrack']]: {\r\n backgroundColor: trackColor,\r\n borderRadius: \"6px\",\r\n },\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined'\r\n }) as any\r\n}\r\n\r\nexport default useScrollbar\r\n"],"names":["getTheme","css"],"mappings":"0PAcA,MAAM,YAAY,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAsB,KAAe;AAChH,IAAA,IAA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AACtB,gBAAA,cAAc,EAAE,CAAA,EAAG,UAAU,CAAA,CAAA,EAAI,UAAU,CAAA,CAAE;AAC/C,aAAA;AACD,YAAA,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG;AAClB,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,MAAM,EAAE,SAAS;AACnB,aAAA;AACD,YAAA,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG;AACvB,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,YAAY,EAAE,KAAK;gBACnB,MAAM,EAAE,aAAa,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAA,CAAE;AACpD,aAAA;AACD,YAAA,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG;AAC5B,gBAAA,eAAe,EAAE,UAAU;AAC7B,aAAA;AACD,YAAA,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG;AACvB,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,YAAY,EAAE,KAAK;AACrB,aAAA;AACH;KACH,EAAE;AACA,QAAA,WAAW,EAAE,OAAO,MAAM,KAAK;AACjC,KAAA,CAAQ;AACZ"}
|
package/hooks/useScrollbar.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import {getTheme}from'../theme/core.mjs';import {css}from'../css/index.mjs';impo
|
|
|
4
4
|
console.error(`useScrollbar: The theme '${themeName}' is not defined. Please make sure to use a valid theme name.`);
|
|
5
5
|
theme = getTheme("light");
|
|
6
6
|
}
|
|
7
|
-
thumbSize = thumbSize ||
|
|
8
|
-
thumbColor = thumbColor || theme.colors.
|
|
9
|
-
trackColor = trackColor || theme.colors.
|
|
7
|
+
thumbSize = thumbSize || 12;
|
|
8
|
+
thumbColor = thumbColor || theme.colors.divider.secondary;
|
|
9
|
+
trackColor = trackColor || theme.colors.divider.primary;
|
|
10
10
|
root_cls = root_cls || "";
|
|
11
11
|
let clss = {
|
|
12
12
|
"*": root_cls ? `${root_cls} *` : `*`,
|
|
@@ -27,15 +27,15 @@ import {getTheme}from'../theme/core.mjs';import {css}from'../css/index.mjs';impo
|
|
|
27
27
|
},
|
|
28
28
|
[clss["scrollbarThumb"]]: {
|
|
29
29
|
backgroundColor: thumbColor,
|
|
30
|
-
borderRadius: "
|
|
31
|
-
border:
|
|
30
|
+
borderRadius: "6px",
|
|
31
|
+
border: `2px solid ${theme.colors.common.primary}`,
|
|
32
32
|
},
|
|
33
33
|
[clss["scrollbarThumbHover"]]: {
|
|
34
34
|
backgroundColor: thumbColor,
|
|
35
35
|
},
|
|
36
36
|
[clss['scrollbarTrack']]: {
|
|
37
37
|
backgroundColor: trackColor,
|
|
38
|
-
borderRadius: "
|
|
38
|
+
borderRadius: "6px",
|
|
39
39
|
},
|
|
40
40
|
}
|
|
41
41
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollbar.mjs","sources":["../../src/hooks/useScrollbar.ts"],"sourcesContent":["import { getTheme } from '../theme'\r\nimport { css } from '../css'\r\nimport { ThemeOptions } from '../theme/types';\r\n\r\nexport type UseScrollbarOption = {\r\n themeName: string\r\n root_cls?: string;\r\n thumbSize?: number\r\n thumbColor?: string\r\n trackColor?: string\r\n}\r\n\r\ntype ClassName = string\r\n\r\nconst useScrollbar = ({ themeName, root_cls, thumbSize, thumbColor, trackColor }: UseScrollbarOption): ClassName => {\r\n let theme = getTheme(themeName)\r\n if (!theme) {\r\n console.error(`useScrollbar: The theme '${themeName}' is not defined. Please make sure to use a valid theme name.`)\r\n theme = getTheme(\"light\") as ThemeOptions\r\n }\r\n\r\n thumbSize = thumbSize ||
|
|
1
|
+
{"version":3,"file":"useScrollbar.mjs","sources":["../../src/hooks/useScrollbar.ts"],"sourcesContent":["import { getTheme } from '../theme'\r\nimport { css } from '../css'\r\nimport { ThemeOptions } from '../theme/types';\r\n\r\nexport type UseScrollbarOption = {\r\n themeName: string\r\n root_cls?: string;\r\n thumbSize?: number\r\n thumbColor?: string\r\n trackColor?: string\r\n}\r\n\r\ntype ClassName = string\r\n\r\nconst useScrollbar = ({ themeName, root_cls, thumbSize, thumbColor, trackColor }: UseScrollbarOption): ClassName => {\r\n let theme = getTheme(themeName)\r\n if (!theme) {\r\n console.error(`useScrollbar: The theme '${themeName}' is not defined. Please make sure to use a valid theme name.`)\r\n theme = getTheme(\"light\") as ThemeOptions\r\n }\r\n\r\n thumbSize = thumbSize || 12\r\n thumbColor = thumbColor || theme.colors.divider.secondary\r\n trackColor = trackColor || theme.colors.divider.primary\r\n root_cls = root_cls || \"\"\r\n\r\n let clss = {\r\n \"*\": root_cls ? `${root_cls} *` : `*`,\r\n \"scrollbar\": root_cls ? `${root_cls}::-webkit-scrollbar, ${root_cls} ::-webkit-scrollbar` : `::-webkit-scrollbar`,\r\n \"scrollbarThumb\": root_cls ? `${root_cls}::-webkit-scrollbar-thumb, ${root_cls} ::-webkit-scrollbar-thumb` : `::-webkit-scrollbar-thumb`,\r\n \"scrollbarThumbHover\": root_cls ? `${root_cls}::-webkit-scrollbar-thumb:hover, ${root_cls} ::-webkit-scrollbar-thumb:hover` : `::-webkit-scrollbar-thumb:hover`,\r\n \"scrollbarTrack\": root_cls ? `${root_cls}::-webkit-scrollbar-track, ${root_cls} ::-webkit-scrollbar-track` : `::-webkit-scrollbar-track`,\r\n }\r\n\r\n return css({\r\n \"@global\": {\r\n [clss['*']]: {\r\n scrollbarWidth: \"thin\",\r\n scrollbarColor: `${thumbColor} ${trackColor}`,\r\n },\r\n [clss[\"scrollbar\"]]: {\r\n width: thumbSize,\r\n height: thumbSize,\r\n },\r\n [clss[\"scrollbarThumb\"]]: {\r\n backgroundColor: thumbColor,\r\n borderRadius: \"6px\",\r\n border: `2px solid ${theme.colors.common.primary}`,\r\n },\r\n [clss[\"scrollbarThumbHover\"]]: {\r\n backgroundColor: thumbColor,\r\n },\r\n [clss['scrollbarTrack']]: {\r\n backgroundColor: trackColor,\r\n borderRadius: \"6px\",\r\n },\r\n }\r\n }, {\r\n injectStyle: typeof window !==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AAA,0BAAA,CAA4B,GAAG,CAAA,yBAAA,CAA2B;KAC1I;AAED,IAAA,OAAO,GAAG,CAAC;AACR,QAAA,SAAS,EAAE;AACR,YAAA,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;AACV,gBAAA,cAAc,EAAE,MAAM;AACtB,gBAAA,cAAc,EAAE,CAAA,EAAG,UAAU,CAAA,CAAA,EAAI,UAAU,CAAA,CAAE;AAC/C,aAAA;AACD,YAAA,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG;AAClB,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,MAAM,EAAE,SAAS;AACnB,aAAA;AACD,YAAA,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG;AACvB,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,YAAY,EAAE,KAAK;gBACnB,MAAM,EAAE,aAAa,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAA,CAAE;AACpD,aAAA;AACD,YAAA,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG;AAC5B,gBAAA,eAAe,EAAE,UAAU;AAC7B,aAAA;AACD,YAAA,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG;AACvB,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,YAAY,EAAE,KAAK;AACrB,aAAA;AACH;KACH,EAAE;AACA,QAAA,WAAW,EAAE,OAAO,MAAM,KAAK;AACjC,KAAA,CAAQ;AACZ"}
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as Tag } from './Tag/index.js';
|
|
2
2
|
export { default as useTagProps } from './Tag/useTagProps.js';
|
|
3
3
|
export { UseAnimationProps, animationEases, default as useAnimation } from './hooks/useAnimation.js';
|
|
4
|
-
export { UseColorTemplateType, default as useColorTemplate } from './hooks/useColorTemplate.js';
|
|
4
|
+
export { UseColorTemplateColor, UseColorTemplateType, default as useColorTemplate } from './hooks/useColorTemplate.js';
|
|
5
5
|
export { default as useBreakpoint } from './breakpoint/useBreakpoint.js';
|
|
6
6
|
export { default as useBreakpointProps, useBreakpointPropsType } from './breakpoint/useBreakpointProps.js';
|
|
7
7
|
export { default as useInterface } from './hooks/useInterface.js';
|
package/package.json
CHANGED
package/theme/ThemeCssVars.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';Object.defineProperty(exports,'__esModule',{value:true});const ThemeCssVars = (theme) => {
|
|
2
2
|
const shadows = {};
|
|
3
3
|
theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s);
|
|
4
|
-
return Object.assign({ "--bp-xs": theme.breakpoints.xs, "--bp-sm": theme.breakpoints.sm, "--bp-md": theme.breakpoints.md, "--bp-lg": theme.breakpoints.lg, "--bp-xl": theme.breakpoints.xl, "--font-h1": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`, "--font-h2": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`, "--font-h3": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`, "--font-h4": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`, "--font-h5": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`, "--font-h6": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`, "--font-big": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-text": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-button": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`, "--font-small": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`, "--fontsize-h1": `${theme.typography.h1.fontSize}px`, "--fontsize-h2": `${theme.typography.h2.fontSize}px`, "--fontsize-h3": `${theme.typography.h3.fontSize}px`, "--fontsize-h4": `${theme.typography.h4.fontSize}px`, "--fontsize-h5": `${theme.typography.h5.fontSize}px`, "--fontsize-h6": `${theme.typography.h6.fontSize}px`, "--fontsize-big": `${theme.typography.big.fontSize}px`, "--fontsize-text": `${theme.typography.text.fontSize}px`, "--fontsize-button": `${theme.typography.button.fontSize}px`, "--fontsize-small": `${theme.typography.small.fontSize}px`, "--fontweight-h1": theme.typography.h1.fontWeight, "--fontweight-h2": theme.typography.h2.fontWeight, "--fontweight-h3": theme.typography.h3.fontWeight, "--fontweight-h4": theme.typography.h4.fontWeight, "--fontweight-h5": theme.typography.h5.fontWeight, "--fontweight-h6": theme.typography.h6.fontWeight, "--fontweight-big": theme.typography.big.fontWeight, "--fontweight-text": theme.typography.text.fontWeight, "--fontweight-button": theme.typography.button.fontWeight, "--fontweight-small": theme.typography.small.fontWeight, "--lineheight-h1": theme.typography.h1.lineHeight, "--lineheight-h2": theme.typography.h2.lineHeight, "--lineheight-h3": theme.typography.h3.lineHeight, "--lineheight-h4": theme.typography.h4.lineHeight, "--lineheight-h5": theme.typography.h5.lineHeight, "--lineheight-h6": theme.typography.h6.lineHeight, "--lineheight-big": theme.typography.big.lineHeight, "--lineheight-text": theme.typography.text.lineHeight, "--lineheight-button": theme.typography.button.lineHeight, "--lineheight-small": theme.typography.small.lineHeight
|
|
4
|
+
return Object.assign({ "--bp-xs": theme.breakpoints.xs, "--bp-sm": theme.breakpoints.sm, "--bp-md": theme.breakpoints.md, "--bp-lg": theme.breakpoints.lg, "--bp-xl": theme.breakpoints.xl, "--font-h1": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`, "--font-h2": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`, "--font-h3": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`, "--font-h4": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`, "--font-h5": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`, "--font-h6": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`, "--font-big": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-text": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-button": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`, "--font-small": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`, "--fontsize-h1": `${theme.typography.h1.fontSize}px`, "--fontsize-h2": `${theme.typography.h2.fontSize}px`, "--fontsize-h3": `${theme.typography.h3.fontSize}px`, "--fontsize-h4": `${theme.typography.h4.fontSize}px`, "--fontsize-h5": `${theme.typography.h5.fontSize}px`, "--fontsize-h6": `${theme.typography.h6.fontSize}px`, "--fontsize-big": `${theme.typography.big.fontSize}px`, "--fontsize-text": `${theme.typography.text.fontSize}px`, "--fontsize-button": `${theme.typography.button.fontSize}px`, "--fontsize-small": `${theme.typography.small.fontSize}px`, "--fontweight-h1": theme.typography.h1.fontWeight + "", "--fontweight-h2": theme.typography.h2.fontWeight + "", "--fontweight-h3": theme.typography.h3.fontWeight + "", "--fontweight-h4": theme.typography.h4.fontWeight + "", "--fontweight-h5": theme.typography.h5.fontWeight + "", "--fontweight-h6": theme.typography.h6.fontWeight + "", "--fontweight-big": theme.typography.big.fontWeight + "", "--fontweight-text": theme.typography.text.fontWeight + "", "--fontweight-button": theme.typography.button.fontWeight + "", "--fontweight-small": theme.typography.small.fontWeight + "", "--lineheight-h1": theme.typography.h1.lineHeight + "", "--lineheight-h2": theme.typography.h2.lineHeight + "", "--lineheight-h3": theme.typography.h3.lineHeight + "", "--lineheight-h4": theme.typography.h4.lineHeight + "", "--lineheight-h5": theme.typography.h5.lineHeight + "", "--lineheight-h6": theme.typography.h6.lineHeight + "", "--lineheight-big": theme.typography.big.lineHeight + "", "--lineheight-text": theme.typography.text.lineHeight + "", "--lineheight-button": theme.typography.button.lineHeight + "", "--lineheight-small": theme.typography.small.lineHeight + "", "--color-common-primary": theme.colors.common.primary, "--color-common-secondary": theme.colors.common.secondary, "--color-text-primary": theme.colors.text.primary, "--color-text-secondary": theme.colors.text.secondary, "--color-divider-primary": theme.colors.divider.primary, "--color-divider-secondary": theme.colors.divider.secondary, "--color-brand-primary": theme.colors.brand.primary, "--color-brand-secondary": theme.colors.brand.secondary, "--color-brand-text": theme.colors.brand.text, "--color-accent-primary": theme.colors.accent.primary, "--color-accent-secondary": theme.colors.accent.secondary, "--color-accent-text": theme.colors.accent.text, "--color-info-primary": theme.colors.info.primary, "--color-info-secondary": theme.colors.info.secondary, "--color-info-text": theme.colors.info.text, "--color-success-primary": theme.colors.success.primary, "--color-success-secondary": theme.colors.success.secondary, "--color-success-text": theme.colors.success.text, "--color-warning-primary": theme.colors.warning.primary, "--color-warning-secondary": theme.colors.warning.secondary, "--color-warning-text": theme.colors.warning.text, "--color-danger-primary": theme.colors.danger.primary, "--color-danger-secondary": theme.colors.danger.secondary, "--color-danger-text": theme.colors.danger.text }, shadows);
|
|
5
5
|
};exports.default=ThemeCssVars;//# sourceMappingURL=ThemeCssVars.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeCssVars.js","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { ThemeOptions } from \"./types\";\r\n\r\nconst ThemeCssVars = (theme: ThemeOptions) => {\r\n\r\n const shadows: any = {}\r\n theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s)\r\n\r\n return {\r\n \"--bp-xs\": theme.breakpoints.xs,\r\n \"--bp-sm\": theme.breakpoints.sm,\r\n \"--bp-md\": theme.breakpoints.md,\r\n \"--bp-lg\": theme.breakpoints.lg,\r\n \"--bp-xl\": theme.breakpoints.xl,\r\n\r\n \"--font-h1\": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`,\r\n \"--font-h2\": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`,\r\n \"--font-h3\": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`,\r\n \"--font-h4\": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`,\r\n \"--font-h5\": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`,\r\n \"--font-h6\": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`,\r\n \"--font-big\": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\r\n \"--font-text\": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\r\n \"--font-button\": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`,\r\n \"--font-small\": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`,\r\n\r\n \"--fontsize-h1\": `${theme.typography.h1.fontSize}px`,\r\n \"--fontsize-h2\": `${theme.typography.h2.fontSize}px`,\r\n \"--fontsize-h3\": `${theme.typography.h3.fontSize}px`,\r\n \"--fontsize-h4\": `${theme.typography.h4.fontSize}px`,\r\n \"--fontsize-h5\": `${theme.typography.h5.fontSize}px`,\r\n \"--fontsize-h6\": `${theme.typography.h6.fontSize}px`,\r\n \"--fontsize-big\": `${theme.typography.big.fontSize}px`,\r\n \"--fontsize-text\": `${theme.typography.text.fontSize}px`,\r\n \"--fontsize-button\": `${theme.typography.button.fontSize}px`,\r\n \"--fontsize-small\": `${theme.typography.small.fontSize}px`,\r\n\r\n \"--fontweight-h1\": theme.typography.h1.fontWeight,\r\n \"--fontweight-h2\": theme.typography.h2.fontWeight,\r\n \"--fontweight-h3\": theme.typography.h3.fontWeight,\r\n \"--fontweight-h4\": theme.typography.h4.fontWeight,\r\n \"--fontweight-h5\": theme.typography.h5.fontWeight,\r\n \"--fontweight-h6\": theme.typography.h6.fontWeight,\r\n \"--fontweight-big\": theme.typography.big.fontWeight,\r\n \"--fontweight-text\": theme.typography.text.fontWeight,\r\n \"--fontweight-button\": theme.typography.button.fontWeight,\r\n \"--fontweight-small\": theme.typography.small.fontWeight,\r\n\r\n \"--lineheight-h1\": theme.typography.h1.lineHeight,\r\n \"--lineheight-h2\": theme.typography.h2.lineHeight,\r\n \"--lineheight-h3\": theme.typography.h3.lineHeight,\r\n \"--lineheight-h4\": theme.typography.h4.lineHeight,\r\n \"--lineheight-h5\": theme.typography.h5.lineHeight,\r\n \"--lineheight-h6\": theme.typography.h6.lineHeight,\r\n \"--lineheight-big\": theme.typography.big.lineHeight,\r\n \"--lineheight-text\": theme.typography.text.lineHeight,\r\n \"--lineheight-button\": theme.typography.button.lineHeight,\r\n \"--lineheight-small\": theme.typography.small.lineHeight,\r\n\r\n \"--color-common\": theme.colors.common.primary,\r\n \"--color-common-primary\": theme.colors.common.primary,\r\n \"--color-common-secondary\": theme.colors.common.secondary,\r\n \"--color-common-alpha\": theme.colors.common.alpha,\r\n \"--color-common-divider\": theme.colors.common.divider,\r\n \"--color-common-text-primary\": theme.colors.common.text.primary,\r\n \"--color-common-text-secondary\": theme.colors.common.text.secondary,\r\n\r\n \"--color-surface\": theme.colors.surface.primary,\r\n \"--color-surface-primary\": theme.colors.surface.primary,\r\n \"--color-surface-secondary\": theme.colors.surface.secondary,\r\n \"--color-surface-alpha\": theme.colors.surface.alpha,\r\n \"--color-surface-divider\": theme.colors.surface.divider,\r\n \"--color-surface-text-primary\": theme.colors.surface.text.primary,\r\n \"--color-surface-text-secondary\": theme.colors.surface.text.secondary,\r\n\r\n \"--color-brand\": theme.colors.brand.primary,\r\n \"--color-brand-primary\": theme.colors.brand.primary,\r\n \"--color-brand-secondary\": theme.colors.brand.secondary,\r\n \"--color-brand-alpha\": theme.colors.brand.alpha,\r\n \"--color-brand-divider\": theme.colors.brand.divider,\r\n \"--color-brand-text-primary\": theme.colors.brand.text.primary,\r\n \"--color-brand-text-secondary\": theme.colors.brand.text.secondary,\r\n\r\n \"--color-accent\": theme.colors.accent.primary,\r\n \"--color-accent-primary\": theme.colors.accent.primary,\r\n \"--color-accent-secondary\": theme.colors.accent.secondary,\r\n \"--color-accent-alpha\": theme.colors.accent.alpha,\r\n \"--color-accent-divider\": theme.colors.accent.divider,\r\n \"--color-accent-text-primary\": theme.colors.accent.text.primary,\r\n \"--color-accent-text-secondary\": theme.colors.accent.text.secondary,\r\n\r\n \"--color-info\": theme.colors.info.primary,\r\n \"--color-info-primary\": theme.colors.info.primary,\r\n \"--color-info-secondary\": theme.colors.info.secondary,\r\n \"--color-info-alpha\": theme.colors.info.alpha,\r\n \"--color-info-divider\": theme.colors.info.divider,\r\n \"--color-info-text-primary\": theme.colors.info.text.primary,\r\n \"--color-info-text-secondary\": theme.colors.info.text.secondary,\r\n\r\n \"--color-success\": theme.colors.success.primary,\r\n \"--color-success-primary\": theme.colors.success.primary,\r\n \"--color-success-secondary\": theme.colors.success.secondary,\r\n \"--color-success-alpha\": theme.colors.success.alpha,\r\n \"--color-success-divider\": theme.colors.success.divider,\r\n \"--color-success-text-primary\": theme.colors.success.text.primary,\r\n \"--color-success-text-secondary\": theme.colors.success.text.secondary,\r\n\r\n \"--color-warning\": theme.colors.warning.primary,\r\n \"--color-warning-primary\": theme.colors.warning.primary,\r\n \"--color-warning-secondary\": theme.colors.warning.secondary,\r\n \"--color-warning-alpha\": theme.colors.warning.alpha,\r\n \"--color-warning-divider\": theme.colors.warning.divider,\r\n \"--color-warning-text-primary\": theme.colors.warning.text.primary,\r\n \"--color-warning-text-secondary\": theme.colors.warning.text.secondary,\r\n\r\n \"--color-danger\": theme.colors.danger.primary,\r\n \"--color-danger-primary\": theme.colors.danger.primary,\r\n \"--color-danger-secondary\": theme.colors.danger.secondary,\r\n \"--color-danger-alpha\": theme.colors.danger.alpha,\r\n \"--color-danger-divider\": theme.colors.danger.divider,\r\n \"--color-danger-text-primary\": theme.colors.danger.text.primary,\r\n \"--color-danger-text-secondary\": theme.colors.danger.text.secondary,\r\n ...shadows,\r\n }\r\n}\r\n\r\n\r\nexport default ThemeCssVars"],"names":[],"mappings":"sEAEA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;IAEzC,MAAM,OAAO,GAAQ,EAAE;IACvB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAA,SAAA,EAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE5D,IAAA,OAAA,MAAA,CAAA,MAAA,CAAA,EACI,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAC/B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,EAE/B,WAAW,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,CAAA,EAAI,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAA,QAAA,CAAU,EAC5H,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,UAAU,CAAC,EAA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K,EACjD,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EACrD,6BAA6B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAC/D,+BAA+B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAA,EAChE,OAAO,CAAA;AAElB"}
|
|
1
|
+
{"version":3,"file":"ThemeCssVars.js","sources":["../../src/theme/ThemeCssVars.ts"],"sourcesContent":["import { ThemeOptions } from \"./types\";\r\n\r\nconst ThemeCssVars = (theme: ThemeOptions) => {\r\n\r\n const shadows: any = {}\r\n theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s)\r\n\r\n return {\r\n \"--bp-xs\": theme.breakpoints.xs,\r\n \"--bp-sm\": theme.breakpoints.sm,\r\n \"--bp-md\": theme.breakpoints.md,\r\n \"--bp-lg\": theme.breakpoints.lg,\r\n \"--bp-xl\": theme.breakpoints.xl,\r\n\r\n \"--font-h1\": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`,\r\n \"--font-h2\": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`,\r\n \"--font-h3\": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`,\r\n \"--font-h4\": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`,\r\n \"--font-h5\": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`,\r\n \"--font-h6\": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`,\r\n \"--font-big\": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\r\n \"--font-text\": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`,\r\n \"--font-button\": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`,\r\n \"--font-small\": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`,\r\n\r\n \"--fontsize-h1\": `${theme.typography.h1.fontSize}px`,\r\n \"--fontsize-h2\": `${theme.typography.h2.fontSize}px`,\r\n \"--fontsize-h3\": `${theme.typography.h3.fontSize}px`,\r\n \"--fontsize-h4\": `${theme.typography.h4.fontSize}px`,\r\n \"--fontsize-h5\": `${theme.typography.h5.fontSize}px`,\r\n \"--fontsize-h6\": `${theme.typography.h6.fontSize}px`,\r\n \"--fontsize-big\": `${theme.typography.big.fontSize}px`,\r\n \"--fontsize-text\": `${theme.typography.text.fontSize}px`,\r\n \"--fontsize-button\": `${theme.typography.button.fontSize}px`,\r\n \"--fontsize-small\": `${theme.typography.small.fontSize}px`,\r\n\r\n \"--fontweight-h1\": theme.typography.h1.fontWeight + \"\",\r\n \"--fontweight-h2\": theme.typography.h2.fontWeight + \"\",\r\n \"--fontweight-h3\": theme.typography.h3.fontWeight + \"\",\r\n \"--fontweight-h4\": theme.typography.h4.fontWeight + \"\",\r\n \"--fontweight-h5\": theme.typography.h5.fontWeight + \"\",\r\n \"--fontweight-h6\": theme.typography.h6.fontWeight + \"\",\r\n \"--fontweight-big\": theme.typography.big.fontWeight + \"\",\r\n \"--fontweight-text\": theme.typography.text.fontWeight + \"\",\r\n \"--fontweight-button\": theme.typography.button.fontWeight + \"\",\r\n \"--fontweight-small\": theme.typography.small.fontWeight + \"\",\r\n\r\n \"--lineheight-h1\": theme.typography.h1.lineHeight + \"\",\r\n \"--lineheight-h2\": theme.typography.h2.lineHeight + \"\",\r\n \"--lineheight-h3\": theme.typography.h3.lineHeight + \"\",\r\n \"--lineheight-h4\": theme.typography.h4.lineHeight + \"\",\r\n \"--lineheight-h5\": theme.typography.h5.lineHeight + \"\",\r\n \"--lineheight-h6\": theme.typography.h6.lineHeight + \"\",\r\n \"--lineheight-big\": theme.typography.big.lineHeight + \"\",\r\n \"--lineheight-text\": theme.typography.text.lineHeight + \"\",\r\n \"--lineheight-button\": theme.typography.button.lineHeight + \"\",\r\n \"--lineheight-small\": theme.typography.small.lineHeight + \"\",\r\n\r\n \"--color-common-primary\": theme.colors.common.primary,\r\n \"--color-common-secondary\": theme.colors.common.secondary,\r\n\r\n \"--color-text-primary\": theme.colors.text.primary,\r\n \"--color-text-secondary\": theme.colors.text.secondary,\r\n\r\n \"--color-divider-primary\": theme.colors.divider.primary,\r\n \"--color-divider-secondary\": theme.colors.divider.secondary,\r\n\r\n \"--color-brand-primary\": theme.colors.brand.primary,\r\n \"--color-brand-secondary\": theme.colors.brand.secondary,\r\n \"--color-brand-text\": theme.colors.brand.text,\r\n\r\n \"--color-accent-primary\": theme.colors.accent.primary,\r\n \"--color-accent-secondary\": theme.colors.accent.secondary,\r\n \"--color-accent-text\": theme.colors.accent.text,\r\n\r\n \"--color-info-primary\": theme.colors.info.primary,\r\n \"--color-info-secondary\": theme.colors.info.secondary,\r\n \"--color-info-text\": theme.colors.info.text,\r\n\r\n \"--color-success-primary\": theme.colors.success.primary,\r\n \"--color-success-secondary\": theme.colors.success.secondary,\r\n \"--color-success-text\": theme.colors.success.text,\r\n\r\n \"--color-warning-primary\": theme.colors.warning.primary,\r\n \"--color-warning-secondary\": theme.colors.warning.secondary,\r\n \"--color-warning-text\": theme.colors.warning.text,\r\n\r\n \"--color-danger-primary\": theme.colors.danger.primary,\r\n \"--color-danger-secondary\": theme.colors.danger.secondary,\r\n \"--color-danger-text\": theme.colors.danger.text,\r\n ...shadows,\r\n }\r\n}\r\n\r\n\r\nexport default ThemeCssVars"],"names":[],"mappings":"sEAEA,MAAM,YAAY,GAAG,CAAC,KAAmB,KAAI;IAEzC,MAAM,OAAO,GAAQ,EAAE;IACvB,KAAK,CAAC,MAAM,CAAC,OAAO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AAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAEjD,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EACrD,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EACzD,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAA,EAC5C,OAAO,CAAA;AAElB"}
|
package/theme/ThemeCssVars.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const ThemeCssVars = (theme) => {
|
|
2
2
|
const shadows = {};
|
|
3
3
|
theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s);
|
|
4
|
-
return Object.assign({ "--bp-xs": theme.breakpoints.xs, "--bp-sm": theme.breakpoints.sm, "--bp-md": theme.breakpoints.md, "--bp-lg": theme.breakpoints.lg, "--bp-xl": theme.breakpoints.xl, "--font-h1": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`, "--font-h2": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`, "--font-h3": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`, "--font-h4": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`, "--font-h5": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`, "--font-h6": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`, "--font-big": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-text": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-button": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`, "--font-small": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`, "--fontsize-h1": `${theme.typography.h1.fontSize}px`, "--fontsize-h2": `${theme.typography.h2.fontSize}px`, "--fontsize-h3": `${theme.typography.h3.fontSize}px`, "--fontsize-h4": `${theme.typography.h4.fontSize}px`, "--fontsize-h5": `${theme.typography.h5.fontSize}px`, "--fontsize-h6": `${theme.typography.h6.fontSize}px`, "--fontsize-big": `${theme.typography.big.fontSize}px`, "--fontsize-text": `${theme.typography.text.fontSize}px`, "--fontsize-button": `${theme.typography.button.fontSize}px`, "--fontsize-small": `${theme.typography.small.fontSize}px`, "--fontweight-h1": theme.typography.h1.fontWeight, "--fontweight-h2": theme.typography.h2.fontWeight, "--fontweight-h3": theme.typography.h3.fontWeight, "--fontweight-h4": theme.typography.h4.fontWeight, "--fontweight-h5": theme.typography.h5.fontWeight, "--fontweight-h6": theme.typography.h6.fontWeight, "--fontweight-big": theme.typography.big.fontWeight, "--fontweight-text": theme.typography.text.fontWeight, "--fontweight-button": theme.typography.button.fontWeight, "--fontweight-small": theme.typography.small.fontWeight, "--lineheight-h1": theme.typography.h1.lineHeight, "--lineheight-h2": theme.typography.h2.lineHeight, "--lineheight-h3": theme.typography.h3.lineHeight, "--lineheight-h4": theme.typography.h4.lineHeight, "--lineheight-h5": theme.typography.h5.lineHeight, "--lineheight-h6": theme.typography.h6.lineHeight, "--lineheight-big": theme.typography.big.lineHeight, "--lineheight-text": theme.typography.text.lineHeight, "--lineheight-button": theme.typography.button.lineHeight, "--lineheight-small": theme.typography.small.lineHeight
|
|
4
|
+
return Object.assign({ "--bp-xs": theme.breakpoints.xs, "--bp-sm": theme.breakpoints.sm, "--bp-md": theme.breakpoints.md, "--bp-lg": theme.breakpoints.lg, "--bp-xl": theme.breakpoints.xl, "--font-h1": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} inherit`, "--font-h2": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} inherit`, "--font-h3": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} inherit`, "--font-h4": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} inherit`, "--font-h5": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} inherit`, "--font-h6": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} inherit`, "--font-big": `${theme.typography.big.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-text": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} inherit`, "--font-button": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} inherit`, "--font-small": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} inherit`, "--fontsize-h1": `${theme.typography.h1.fontSize}px`, "--fontsize-h2": `${theme.typography.h2.fontSize}px`, "--fontsize-h3": `${theme.typography.h3.fontSize}px`, "--fontsize-h4": `${theme.typography.h4.fontSize}px`, "--fontsize-h5": `${theme.typography.h5.fontSize}px`, "--fontsize-h6": `${theme.typography.h6.fontSize}px`, "--fontsize-big": `${theme.typography.big.fontSize}px`, "--fontsize-text": `${theme.typography.text.fontSize}px`, "--fontsize-button": `${theme.typography.button.fontSize}px`, "--fontsize-small": `${theme.typography.small.fontSize}px`, "--fontweight-h1": theme.typography.h1.fontWeight + "", "--fontweight-h2": theme.typography.h2.fontWeight + "", "--fontweight-h3": theme.typography.h3.fontWeight + "", "--fontweight-h4": theme.typography.h4.fontWeight + "", "--fontweight-h5": theme.typography.h5.fontWeight + "", "--fontweight-h6": theme.typography.h6.fontWeight + "", "--fontweight-big": theme.typography.big.fontWeight + "", "--fontweight-text": theme.typography.text.fontWeight + "", "--fontweight-button": theme.typography.button.fontWeight + "", "--fontweight-small": theme.typography.small.fontWeight + "", "--lineheight-h1": theme.typography.h1.lineHeight + "", "--lineheight-h2": theme.typography.h2.lineHeight + "", "--lineheight-h3": theme.typography.h3.lineHeight + "", "--lineheight-h4": theme.typography.h4.lineHeight + "", "--lineheight-h5": theme.typography.h5.lineHeight + "", "--lineheight-h6": theme.typography.h6.lineHeight + "", "--lineheight-big": theme.typography.big.lineHeight + "", "--lineheight-text": theme.typography.text.lineHeight + "", "--lineheight-button": theme.typography.button.lineHeight + "", "--lineheight-small": theme.typography.small.lineHeight + "", "--color-common-primary": theme.colors.common.primary, "--color-common-secondary": theme.colors.common.secondary, "--color-text-primary": theme.colors.text.primary, "--color-text-secondary": theme.colors.text.secondary, "--color-divider-primary": theme.colors.divider.primary, "--color-divider-secondary": theme.colors.divider.secondary, "--color-brand-primary": theme.colors.brand.primary, "--color-brand-secondary": theme.colors.brand.secondary, "--color-brand-text": theme.colors.brand.text, "--color-accent-primary": theme.colors.accent.primary, "--color-accent-secondary": theme.colors.accent.secondary, "--color-accent-text": theme.colors.accent.text, "--color-info-primary": theme.colors.info.primary, "--color-info-secondary": theme.colors.info.secondary, "--color-info-text": theme.colors.info.text, "--color-success-primary": theme.colors.success.primary, "--color-success-secondary": theme.colors.success.secondary, "--color-success-text": theme.colors.success.text, "--color-warning-primary": theme.colors.warning.primary, "--color-warning-secondary": theme.colors.warning.secondary, "--color-warning-text": theme.colors.warning.text, "--color-danger-primary": theme.colors.danger.primary, "--color-danger-secondary": theme.colors.danger.secondary, "--color-danger-text": theme.colors.danger.text }, shadows);
|
|
5
5
|
};export{ThemeCssVars as default};//# sourceMappingURL=ThemeCssVars.mjs.map
|