daisyui 2.0.0-next.2 → 2.0.3
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/README.md +107 -89
- package/dist/full.css +1 -111
- package/dist/styled.css +1 -2059
- package/dist/styled.js +1 -1
- package/dist/styled.rtl.js +1 -1
- package/dist/themes.css +1 -2
- package/dist/unstyled.css +1 -511
- package/dist/unstyled.js +1 -1
- package/dist/unstyled.rtl.js +1 -1
- package/dist/utilities-styled.js +1 -1
- package/dist/utilities-unstyled.js +1 -1
- package/dist/utilities.js +1 -1
- package/package.json +7 -9
- package/src/colors/colorNames.js +34 -0
- package/{colors → src}/colors/index.js +17 -18
- package/{colors → src/colors}/themes.js +274 -273
- package/{colors → src}/colors/windi.js +6 -6
- package/src/index.js +227 -0
- package/colors/colorNames.js +0 -35
- package/colors/colors/colorNames.js +0 -35
- package/colors/colors/themes.js +0 -881
- package/colors/index.js +0 -53
- package/colors/windi.js +0 -12
- package/index.js +0 -159
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
primary: "--p",
|
|
3
|
+
"primary-focus": "--pf",
|
|
4
|
+
"primary-content": "--pc",
|
|
5
|
+
|
|
6
|
+
secondary: "--s",
|
|
7
|
+
"secondary-focus": "--sf",
|
|
8
|
+
"secondary-content": "--sc",
|
|
9
|
+
|
|
10
|
+
accent: "--a",
|
|
11
|
+
"accent-focus": "--af",
|
|
12
|
+
"accent-content": "--ac",
|
|
13
|
+
|
|
14
|
+
neutral: "--n",
|
|
15
|
+
"neutral-focus": "--nf",
|
|
16
|
+
"neutral-content": "--nc",
|
|
17
|
+
|
|
18
|
+
"base-100": "--b1",
|
|
19
|
+
"base-200": "--b2",
|
|
20
|
+
"base-300": "--b3",
|
|
21
|
+
"base-content": "--bc",
|
|
22
|
+
|
|
23
|
+
info: "--in",
|
|
24
|
+
"info-content": "--inc",
|
|
25
|
+
|
|
26
|
+
success: "--su",
|
|
27
|
+
"success-content": "--suc",
|
|
28
|
+
|
|
29
|
+
warning: "--wa",
|
|
30
|
+
"warning-content": "--wac",
|
|
31
|
+
|
|
32
|
+
error: "--er",
|
|
33
|
+
"error-content": "--erc",
|
|
34
|
+
};
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
|
|
2
1
|
function withOpacityValue(variable, fallbackColor) {
|
|
3
2
|
return ({ opacityValue }) => {
|
|
4
|
-
let fallbackColorValue =
|
|
3
|
+
let fallbackColorValue = "";
|
|
5
4
|
if (fallbackColor) {
|
|
6
|
-
fallbackColorValue = `, var(${fallbackColor})
|
|
5
|
+
fallbackColorValue = `, var(${fallbackColor})`;
|
|
7
6
|
}
|
|
8
7
|
if (opacityValue === undefined) {
|
|
9
|
-
return `hsl(var(${variable}${fallbackColorValue}))
|
|
8
|
+
return `hsl(var(${variable}${fallbackColorValue}))`;
|
|
10
9
|
}
|
|
11
|
-
return `hsl(var(${variable}${fallbackColorValue}) / ${opacityValue})
|
|
12
|
-
}
|
|
10
|
+
return `hsl(var(${variable}${fallbackColorValue}) / ${opacityValue})`;
|
|
11
|
+
};
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
let colorObject = {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
transparent: "transparent",
|
|
16
|
+
current: "currentColor",
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
primary: withOpacityValue("--p"),
|
|
20
19
|
"primary-focus": withOpacityValue("--pf", "--p"),
|
|
21
20
|
"primary-content": withOpacityValue("--pc"),
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
secondary: withOpacityValue("--s"),
|
|
24
23
|
"secondary-focus": withOpacityValue("--sf", "--s"),
|
|
25
24
|
"secondary-content": withOpacityValue("--sc"),
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
accent: withOpacityValue("--a"),
|
|
28
27
|
"accent-focus": withOpacityValue("--af", "--a"),
|
|
29
28
|
"accent-content": withOpacityValue("--ac"),
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
neutral: withOpacityValue("--n"),
|
|
32
31
|
"neutral-focus": withOpacityValue("--nf", "--n"),
|
|
33
32
|
"neutral-content": withOpacityValue("--nc"),
|
|
34
33
|
|
|
@@ -37,17 +36,17 @@ let colorObject = {
|
|
|
37
36
|
"base-300": withOpacityValue("--b3", "--b2"),
|
|
38
37
|
"base-content": withOpacityValue("--bc"),
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
info: withOpacityValue("--in"),
|
|
41
40
|
"info-content": withOpacityValue("--inc", "--nc"),
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
success: withOpacityValue("--su"),
|
|
44
43
|
"success-content": withOpacityValue("--suc", "--nc"),
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
warning: withOpacityValue("--wa"),
|
|
47
46
|
"warning-content": withOpacityValue("--wac", "--nc"),
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
error: withOpacityValue("--er"),
|
|
50
49
|
"error-content": withOpacityValue("--erc", "--nc"),
|
|
51
|
-
}
|
|
50
|
+
};
|
|
52
51
|
|
|
53
|
-
module.exports = colorObject
|
|
52
|
+
module.exports = colorObject;
|