@xanui/core 1.2.38 → 1.2.39
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.
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
type UseColorTemplateType = "fill" | "outline" | "text" | "soft";
|
|
2
2
|
type UseColorTemplateColor = "default" | "brand" | "accent" | "success" | "info" | "warning" | "danger";
|
|
3
3
|
declare const useColorTemplate: (color: UseColorTemplateColor, type: UseColorTemplateType) => {
|
|
4
|
+
primary: {
|
|
5
|
+
bgcolor: string;
|
|
6
|
+
color: string;
|
|
7
|
+
border: string;
|
|
8
|
+
borderColor: string;
|
|
9
|
+
};
|
|
10
|
+
secondary: {
|
|
11
|
+
bgcolor: string;
|
|
12
|
+
color: string;
|
|
13
|
+
border: string;
|
|
14
|
+
borderColor: string;
|
|
15
|
+
};
|
|
16
|
+
} | {
|
|
4
17
|
primary: {
|
|
5
18
|
bgcolor: string;
|
|
6
19
|
color: string;
|
|
@@ -11,13 +11,13 @@ const useColorTemplate = (color, type) => {
|
|
|
11
11
|
primary: {
|
|
12
12
|
bgcolor: `transparent`,
|
|
13
13
|
color: is_def ? `text.primary` : `${color}.primary`,
|
|
14
|
-
border:
|
|
14
|
+
border: "1px solid",
|
|
15
15
|
borderColor: is_def ? `divider` : `${color}.primary`,
|
|
16
16
|
},
|
|
17
17
|
secondary: {
|
|
18
18
|
bgcolor: `transparent`,
|
|
19
19
|
color: is_def ? `text.primary` : `${color}.secondary`,
|
|
20
|
-
border:
|
|
20
|
+
border: "1px solid",
|
|
21
21
|
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
22
22
|
}
|
|
23
23
|
};
|
|
@@ -27,13 +27,13 @@ const useColorTemplate = (color, type) => {
|
|
|
27
27
|
primary: {
|
|
28
28
|
bgcolor: color,
|
|
29
29
|
color: is_def ? `text.primary` : `${color}.text`,
|
|
30
|
-
border:
|
|
30
|
+
border: "1px solid",
|
|
31
31
|
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
32
32
|
},
|
|
33
33
|
secondary: {
|
|
34
34
|
bgcolor: `${color}.secondary`,
|
|
35
35
|
color: is_def ? `text.primary` : `${color}.text`,
|
|
36
|
-
border:
|
|
36
|
+
border: "1px solid",
|
|
37
37
|
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
38
38
|
}
|
|
39
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorTemplate.js","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["\"use client\";\nexport 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
|
+
{"version":3,"file":"useColorTemplate.js","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["\"use client\";\nexport 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: \"1px solid\",\n borderColor: is_def ? `divider` : `${color}.primary`,\n },\n secondary: {\n bgcolor: `transparent`,\n color: is_def ? `text.primary` : `${color}.secondary`,\n border: \"1px solid\",\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: \"1px solid\",\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: \"1px solid\",\n borderColor: is_def ? `divider.secondary` : `${color}.secondary`,\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":";;;AAIA;AACI;;;;AAKA;;AAEQ;AACI;;AAEA;;AAEH;AACD;AACI;;AAEA;;AAEH;;;AAEF;;AAEC;AACI;;AAEA;;AAEH;AACD;;;AAGI;;AAEH;;;AAEF;;AAEC;AACI;;AAEA;AACA;AACH;AACD;AACI;;AAEA;AACA;AACH;;;AAEF;;AAEC;;;AAGI;AACA;AACH;AACD;;;AAGI;AACA;AACH;;;AAIT;AACJ;;"}
|
|
@@ -9,13 +9,13 @@ const useColorTemplate = (color, type) => {
|
|
|
9
9
|
primary: {
|
|
10
10
|
bgcolor: `transparent`,
|
|
11
11
|
color: is_def ? `text.primary` : `${color}.primary`,
|
|
12
|
-
border:
|
|
12
|
+
border: "1px solid",
|
|
13
13
|
borderColor: is_def ? `divider` : `${color}.primary`,
|
|
14
14
|
},
|
|
15
15
|
secondary: {
|
|
16
16
|
bgcolor: `transparent`,
|
|
17
17
|
color: is_def ? `text.primary` : `${color}.secondary`,
|
|
18
|
-
border:
|
|
18
|
+
border: "1px solid",
|
|
19
19
|
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
20
20
|
}
|
|
21
21
|
};
|
|
@@ -25,13 +25,13 @@ const useColorTemplate = (color, type) => {
|
|
|
25
25
|
primary: {
|
|
26
26
|
bgcolor: color,
|
|
27
27
|
color: is_def ? `text.primary` : `${color}.text`,
|
|
28
|
-
border:
|
|
28
|
+
border: "1px solid",
|
|
29
29
|
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
30
30
|
},
|
|
31
31
|
secondary: {
|
|
32
32
|
bgcolor: `${color}.secondary`,
|
|
33
33
|
color: is_def ? `text.primary` : `${color}.text`,
|
|
34
|
-
border:
|
|
34
|
+
border: "1px solid",
|
|
35
35
|
borderColor: is_def ? `divider.secondary` : `${color}.secondary`,
|
|
36
36
|
}
|
|
37
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorTemplate.mjs","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["\"use client\";\nexport 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
|
+
{"version":3,"file":"useColorTemplate.mjs","sources":["../../src/hooks/useColorTemplate.ts"],"sourcesContent":["\"use client\";\nexport 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: \"1px solid\",\n borderColor: is_def ? `divider` : `${color}.primary`,\n },\n secondary: {\n bgcolor: `transparent`,\n color: is_def ? `text.primary` : `${color}.secondary`,\n border: \"1px solid\",\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: \"1px solid\",\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: \"1px solid\",\n borderColor: is_def ? `divider.secondary` : `${color}.secondary`,\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":";AAIA;AACI;;;;AAKA;;AAEQ;AACI;;AAEA;;AAEH;AACD;AACI;;AAEA;;AAEH;;;AAEF;;AAEC;AACI;;AAEA;;AAEH;AACD;;;AAGI;;AAEH;;;AAEF;;AAEC;AACI;;AAEA;AACA;AACH;AACD;AACI;;AAEA;AACA;AACH;;;AAEF;;AAEC;;;AAGI;AACA;AACH;AACD;;;AAGI;AACA;AACH;;;AAIT;AACJ;;"}
|