daisyui 4.0.0-alpha.3 → 4.0.0-alpha.4

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,39 +1,18 @@
1
- let colorObject = {
2
- "transparent": "transparent",
3
- "current": "currentColor",
4
-
5
- "primary": "oklch(var(--p) / <alpha-value>)",
6
- "primary-focus": "oklch(var(--pf) / <alpha-value>)",
7
- "primary-content": "oklch(var(--pc) / <alpha-value>)",
8
-
9
- "secondary": "oklch(var(--s) / <alpha-value>)",
10
- "secondary-focus": "oklch(var(--sf) / <alpha-value>)",
11
- "secondary-content": "oklch(var(--sc) / <alpha-value>)",
12
-
13
- "accent": "oklch(var(--a) / <alpha-value>)",
14
- "accent-focus": "oklch(var(--af) / <alpha-value>)",
15
- "accent-content": "oklch(var(--ac) / <alpha-value>)",
16
-
17
- "neutral": "oklch(var(--n) / <alpha-value>)",
18
- "neutral-focus": "oklch(var(--nf) / <alpha-value>)",
19
- "neutral-content": "oklch(var(--nc) / <alpha-value>)",
20
-
21
- "base-100": "oklch(var(--b1) / <alpha-value>)",
22
- "base-200": "oklch(var(--b2) / <alpha-value>)",
23
- "base-300": "oklch(var(--b3) / <alpha-value>)",
24
- "base-content": "oklch(var(--bc) / <alpha-value>)",
25
-
26
- "info": "oklch(var(--in) / <alpha-value>)",
27
- "info-content": "oklch(var(--inc) / <alpha-value>)",
28
-
29
- "success": "oklch(var(--su) / <alpha-value>)",
30
- "success-content": "oklch(var(--suc) / <alpha-value>)",
31
-
32
- "warning": "oklch(var(--wa) / <alpha-value>)",
33
- "warning-content": "oklch(var(--wac) / <alpha-value>)",
34
-
35
- "error": "oklch(var(--er) / <alpha-value>)",
36
- "error-content": "oklch(var(--erc) / <alpha-value>)",
1
+ const colorNames = require("./colorNames")
2
+
3
+ const colorObject = (colorSpace) => {
4
+ // console.log(colorSpace)
5
+ const result = {
6
+ transparent: "transparent",
7
+ current: "currentColor",
8
+ }
9
+ for (const colorName in colorNames) {
10
+ if (colorNames.hasOwnProperty(colorName)) {
11
+ const cssVariable = colorNames[colorName]
12
+ result[colorName] = `${`oklch`}(var(${cssVariable}) / <alpha-value>)`
13
+ }
14
+ }
15
+ return result
37
16
  }
38
17
 
39
18
  module.exports = colorObject