daisyui 4.7.3 → 4.9.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "daisyui",
3
- "version": "4.7.3",
3
+ "version": "4.9.0",
4
4
  "description": "daisyUI - Tailwind CSS Components",
5
5
  "author": "Pouya Saadeghi",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@ module.exports = {
38
38
 
39
39
  colorObjToString: function (input) {
40
40
  const { l, c, h } = input
41
- return `${cutNumber(l)} ${cutNumber(c)} ${cutNumber(h)}`
41
+ return `${parseFloat((cutNumber(l) * 100).toFixed(6))}% ${cutNumber(c)} ${cutNumber(h)}`
42
42
  },
43
43
 
44
44
  generateForegroundColorFrom: function (input, percentage = 0.8) {
@@ -86,7 +86,7 @@ module.exports = {
86
86
 
87
87
  // auto generate base colors
88
88
  if (!Object.hasOwn(input, "base-100")) {
89
- resultObj["--b1"] = "100 0 0"
89
+ resultObj["--b1"] = "100% 0 0"
90
90
  }
91
91
  if (!Object.hasOwn(input, "base-200")) {
92
92
  resultObj["--b2"] = this.generateDarkenColorFrom(input["base-100"], 0.07)
@@ -102,16 +102,16 @@ module.exports = {
102
102
  // auto generate state colors
103
103
 
104
104
  if (!Object.hasOwn(input, "info")) {
105
- resultObj["--in"] = "0.7206 0.191 231.6"
105
+ resultObj["--in"] = "72.06% 0.191 231.6"
106
106
  }
107
107
  if (!Object.hasOwn(input, "success")) {
108
108
  resultObj["--su"] = "64.8% 0.150 160"
109
109
  }
110
110
  if (!Object.hasOwn(input, "warning")) {
111
- resultObj["--wa"] = "0.8471 0.199 83.87"
111
+ resultObj["--wa"] = "84.71% 0.199 83.87"
112
112
  }
113
113
  if (!Object.hasOwn(input, "error")) {
114
- resultObj["--er"] = "0.7176 0.221 22.18"
114
+ resultObj["--er"] = "71.76% 0.221 22.18"
115
115
  }
116
116
 
117
117
  // auto generate content colors
@@ -134,28 +134,28 @@ module.exports = {
134
134
  if (Object.hasOwn(input, "info")) {
135
135
  resultObj["--inc"] = this.generateForegroundColorFrom(input["info"], 0.8)
136
136
  } else {
137
- resultObj["--inc"] = "0 0 0"
137
+ resultObj["--inc"] = "0% 0 0"
138
138
  }
139
139
  }
140
140
  if (!Object.hasOwn(input, "success-content")) {
141
141
  if (Object.hasOwn(input, "success")) {
142
142
  resultObj["--suc"] = this.generateForegroundColorFrom(input["success"], 0.8)
143
143
  } else {
144
- resultObj["--suc"] = "0 0 0"
144
+ resultObj["--suc"] = "0% 0 0"
145
145
  }
146
146
  }
147
147
  if (!Object.hasOwn(input, "warning-content")) {
148
148
  if (Object.hasOwn(input, "warning")) {
149
149
  resultObj["--wac"] = this.generateForegroundColorFrom(input["warning"], 0.8)
150
150
  } else {
151
- resultObj["--wac"] = "0 0 0"
151
+ resultObj["--wac"] = "0% 0 0"
152
152
  }
153
153
  }
154
154
  if (!Object.hasOwn(input, "error-content")) {
155
155
  if (Object.hasOwn(input, "error")) {
156
156
  resultObj["--erc"] = this.generateForegroundColorFrom(input["error"], 0.8)
157
157
  } else {
158
- resultObj["--erc"] = "0 0 0"
158
+ resultObj["--erc"] = "0% 0 0"
159
159
  }
160
160
  }
161
161