daisyui 1.25.4 → 2.0.0-next.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/README.md CHANGED
@@ -79,7 +79,7 @@ Loading CSS files from CDN is not recommended for production. It's better to ins
79
79
 
80
80
 
81
81
  ```html
82
- <link href="https://cdn.jsdelivr.net/npm/daisyui@1.25.3/dist/full.css" rel="stylesheet" type="text/css" />
82
+ <link href="https://cdn.jsdelivr.net/npm/daisyui@1.25.0/dist/full.css" rel="stylesheet" type="text/css" />
83
83
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2/dist/tailwind.min.css" rel="stylesheet" type="text/css" />
84
84
  ```
85
85
 
@@ -21,7 +21,15 @@ module.exports = {
21
21
  "base-content" : "--bc",
22
22
 
23
23
  "info" : "--in",
24
+ "info-content" : "--inc",
25
+
24
26
  "success" : "--su",
27
+ "success-content" : "--suc",
28
+
25
29
  "warning" : "--wa",
30
+ "warning-content" : "--wac",
31
+
26
32
  "error" : "--er",
33
+ "error-content" : "--erc",
34
+
27
35
  }
package/colors/index.js CHANGED
@@ -1,20 +1,53 @@
1
- const colorValues = require('./colorNames')
1
+
2
+ function withOpacityValue(variable, fallbackColor) {
3
+ return ({ opacityValue }) => {
4
+ let fallbackColorValue = ''
5
+ if (fallbackColor) {
6
+ fallbackColorValue = `, var(${fallbackColor})`
7
+ }
8
+ if (opacityValue === undefined) {
9
+ return `hsl(var(${variable}${fallbackColorValue}))`
10
+ }
11
+ return `hsl(var(${variable}${fallbackColorValue}) / ${opacityValue})`
12
+ }
13
+ }
2
14
 
3
15
  let colorObject = {
4
16
  "transparent": "transparent",
5
17
  "current": "currentColor",
6
- }
7
18
 
8
- for (const [key, item] of Object.entries(colorValues)) {
9
- colorObject[key] = ({ opacityVariable, opacityValue }) => {
10
- if (opacityValue !== undefined) {
11
- return `hsla(var(`+ item +`) / ${opacityValue})`
12
- }
13
- if (opacityVariable !== undefined) {
14
- return `hsla(var(`+ item +`) / var(${opacityVariable}, 1))`
15
- }
16
- return `hsl(var(`+ item +`))`
17
- }
19
+ "primary": withOpacityValue("--p"),
20
+ "primary-focus": withOpacityValue("--pf", "--p"),
21
+ "primary-content": withOpacityValue("--pc"),
22
+
23
+ "secondary": withOpacityValue("--s"),
24
+ "secondary-focus": withOpacityValue("--sf", "--s"),
25
+ "secondary-content": withOpacityValue("--sc"),
26
+
27
+ "accent": withOpacityValue("--a"),
28
+ "accent-focus": withOpacityValue("--af", "--a"),
29
+ "accent-content": withOpacityValue("--ac"),
30
+
31
+ "neutral": withOpacityValue("--n"),
32
+ "neutral-focus": withOpacityValue("--nf", "--n"),
33
+ "neutral-content": withOpacityValue("--nc"),
34
+
35
+ "base-100": withOpacityValue("--b1"),
36
+ "base-200": withOpacityValue("--b2", "--b1"),
37
+ "base-300": withOpacityValue("--b3", "--b1"),
38
+ "base-content": withOpacityValue("--bc"),
39
+
40
+ "info": withOpacityValue("--in"),
41
+ "info-content": withOpacityValue("--inc", "--nc"),
42
+
43
+ "success": withOpacityValue("--su"),
44
+ "success-content": withOpacityValue("--suc", "--nc"),
45
+
46
+ "warning": withOpacityValue("--wa"),
47
+ "warning-content": withOpacityValue("--wac", "--nc"),
48
+
49
+ "error": withOpacityValue("--er"),
50
+ "error-content": withOpacityValue("--erc", "--nc"),
18
51
  }
19
52
 
20
53
  module.exports = colorObject
package/colors/themes.js CHANGED
@@ -17,9 +17,13 @@ module.exports = {
17
17
  "base-300": "#18277c",
18
18
  "base-content": "#ffffff",
19
19
  "info": "#2094f3",
20
+ "info-content": "#ffffff",
20
21
  "success": "#009485",
22
+ "success-content": "#ffffff",
21
23
  "warning": "#ff9900",
24
+ "warning-content": "#ffffff",
22
25
  "error": "#ff5724",
26
+ "error-content": "#ffffff",
23
27
  "--border-color": "var(--b3)",
24
28
  "--rounded-box": "1rem",
25
29
  "--rounded-btn": "0.5rem",
@@ -51,9 +55,13 @@ module.exports = {
51
55
  "neutral-focus": "#4d4d4d",
52
56
  "neutral-content": "#ffffff",
53
57
  "info": "#0000ff",
58
+ "info-content": "#000000",
54
59
  "success": "#008000",
60
+ "success-content": "#000000",
55
61
  "warning": "#ffff00",
62
+ "warning-content": "#000000",
56
63
  "error": "#ff0000",
64
+ "error-content": "#000000",
57
65
  "--border-color": "var(--b3)",
58
66
  "--rounded-box": "0",
59
67
  "--rounded-btn": "0",
@@ -85,9 +93,13 @@ module.exports = {
85
93
  "base-300": "#e3e3e3",
86
94
  "base-content": "#000000",
87
95
  "info": "#2094f3",
96
+ "info-content": "#ffffff",
88
97
  "success": "#009485",
98
+ "success-content": "#ffffff",
89
99
  "warning": "#ff9900",
100
+ "warning-content": "#ffffff",
90
101
  "error": "#ff5724",
102
+ "error-content": "#ffffff",
91
103
  "--border-color": "var(--b3)",
92
104
  "--rounded-box": "1rem",
93
105
  "--rounded-btn": "0.5rem",
@@ -119,9 +131,13 @@ module.exports = {
119
131
  'base-300': '#ebebeb',
120
132
  'base-content': '#000000',
121
133
  'info': '#4AA8C0',
134
+ 'info-content': '#ffffff',
122
135
  'success': '#823290',
136
+ 'success-content': '#ffffff',
123
137
  'warning': '#EE8133',
138
+ 'warning-content': '#ffffff',
124
139
  'error': '#E93F33',
140
+ 'error-content': '#ffffff',
125
141
  "--border-color": "var(--b3)",
126
142
  "--rounded-box": "1rem",
127
143
  "--rounded-btn": "0.5rem",
@@ -153,9 +169,13 @@ module.exports = {
153
169
  "base-300": "#edf2f7",
154
170
  "base-content": "#181a2a",
155
171
  "info": "#2094f3",
172
+ "info-content": "#edf2f7",
156
173
  "success": "#009485",
174
+ "success-content": "#edf2f7",
157
175
  "warning": "#ff9900",
176
+ "warning-content": "#edf2f7",
158
177
  "error": "#ff5724",
178
+ "error-content": "#edf2f7",
159
179
  "--border-color": "var(--b3)",
160
180
  "--rounded-box": "1rem",
161
181
  "--rounded-btn": "0.5rem",
@@ -187,9 +207,13 @@ module.exports = {
187
207
  "base-300": "#e7e2df",
188
208
  "base-content": "#291334",
189
209
  "info": "#2094f3",
210
+ "info-content": "#ffffff",
190
211
  "success": "#009485",
212
+ "success-content": "#ffffff",
191
213
  "warning": "#ff9900",
214
+ "warning-content": "#ffffff",
192
215
  "error": "#ff5724",
216
+ "error-content": "#ffffff",
193
217
  "--border-color": "var(--b3)",
194
218
  "--rounded-box": "1rem",
195
219
  "--rounded-btn": "1.9rem",
@@ -222,9 +246,13 @@ module.exports = {
222
246
  "base-300": "#b8ab00",
223
247
  "base-content": "#000000",
224
248
  "info": "#2094f3",
249
+ "info-content": "#000000",
225
250
  "success": "#009485",
251
+ "success-content": "#000000",
226
252
  "warning": "#ff9900",
253
+ "warning-content": "#000000",
227
254
  "error": "#ff5724",
255
+ "error-content": "#000000",
228
256
  "--border-color": "var(--b3)",
229
257
  "--rounded-box": "0",
230
258
  "--rounded-btn": "0",
@@ -256,9 +284,13 @@ module.exports = {
256
284
  "base-300": "#16181d",
257
285
  "base-content": "#ebecf0",
258
286
  "info": "#66c6ff",
287
+ "info-content": "#ffffff",
259
288
  "success": "#87d039",
289
+ "success-content": "#ffffff",
260
290
  "warning": "#e2d562",
291
+ "warning-content": "#ffffff",
261
292
  "error": "#ff6f6f",
293
+ "error-content": "#ffffff",
262
294
  "--border-color": "var(--b3)",
263
295
  "--rounded-box": "1rem",
264
296
  "--rounded-btn": "0.5rem",
@@ -290,9 +322,13 @@ module.exports = {
290
322
  "base-300": "#1d1e25",
291
323
  "base-content": "#d5ccff",
292
324
  "info": "#2094f3",
325
+ "info-content": "#d5ccff",
293
326
  "success": "#009485",
327
+ "success-content": "#d5ccff",
294
328
  "warning": "#ff9900",
329
+ "warning-content": "#d5ccff",
295
330
  "error": "#ff5724",
331
+ "error-content": "#d5ccff",
296
332
  "--border-color": "var(--b3)",
297
333
  "--rounded-box": "1rem",
298
334
  "--rounded-btn": "0.5rem",
@@ -324,9 +360,13 @@ module.exports = {
324
360
  "base-300": "#f2f2f2",
325
361
  "base-content": "#333c4d",
326
362
  "info": "#2094f3",
363
+ "info-content": "#f9fafb",
327
364
  "success": "#009485",
365
+ "success-content": "#f9fafb",
328
366
  "warning": "#ff9900",
367
+ "warning-content": "#f9fafb",
329
368
  "error": "#ff5724",
369
+ "error-content": "#f9fafb",
330
370
  "--border-color": "var(--b3)",
331
371
  "--rounded-box": "1rem",
332
372
  "--rounded-btn": "0.5rem",
@@ -358,9 +398,13 @@ module.exports = {
358
398
  "base-300": "#d1d5db",
359
399
  "base-content": "#1f2937",
360
400
  "info": "#2094f3",
401
+ "info-content": "#ffffff",
361
402
  "success": "#009485",
403
+ "success-content": "#ffffff",
362
404
  "warning": "#ff9900",
405
+ "warning-content": "#ffffff",
363
406
  "error": "#ff5724",
407
+ "error-content": "#ffffff",
364
408
  "--border-color": "var(--b3)",
365
409
  "--rounded-box": "1rem",
366
410
  "--rounded-btn": "0.5rem",
@@ -391,11 +435,15 @@ module.exports = {
391
435
  "base-200": "#110e0e",
392
436
  "base-300": "#060404",
393
437
  "base-content": "#ffffff",
394
- "--rounded-btn": "1.9rem",
395
438
  "info": "#66c6ff",
439
+ "info-content": "#ffffff",
396
440
  "success": "#87d039",
441
+ "success-content": "#ffffff",
397
442
  "warning": "#e2d562",
443
+ "warning-content": "#ffffff",
398
444
  "error": "#ff6f6f",
445
+ "error-content": "#ffffff",
446
+ "--rounded-btn": "1.9rem",
399
447
  "--border-color": "var(--b3)",
400
448
  "--rounded-box": "1rem",
401
449
  "--rounded-btn": "0.5rem",
@@ -427,9 +475,13 @@ module.exports = {
427
475
  "base-300": "#b9b1b1",
428
476
  "base-content": "#100f0f",
429
477
  "info": "#2094f3",
478
+ "info-content": "#e9e7e7",
430
479
  "success": "#009485",
480
+ "success-content": "#e9e7e7",
431
481
  "warning": "#ff9900",
482
+ "warning-content": "#e9e7e7",
432
483
  "error": "#ff5724",
484
+ "error-content": "#e9e7e7",
433
485
  "--border-color": "var(--b3)",
434
486
  "--rounded-box": "1rem",
435
487
  "--rounded-btn": "0.5rem",
@@ -461,9 +513,13 @@ module.exports = {
461
513
  "base-300": "#131616",
462
514
  "base-content": "#ffffff",
463
515
  "info": "#66c6ff",
516
+ "info-content": "#ffffff",
464
517
  "success": "#87d039",
518
+ "success-content": "#ffffff",
465
519
  "warning": "#e2d562",
520
+ "warning-content": "#ffffff",
466
521
  "error": "#ff6f6f",
522
+ "error-content": "#ffffff",
467
523
  "--border-color": "var(--b3)",
468
524
  "--rounded-box": "1rem",
469
525
  "--rounded-btn": "0.5rem",
@@ -495,9 +551,13 @@ module.exports = {
495
551
  "base-300": "#d1d5db",
496
552
  "base-content": "#1f2937",
497
553
  "info": "#2094f3",
554
+ "info-content": "#ffffff",
498
555
  "success": "#009485",
556
+ "success-content": "#ffffff",
499
557
  "warning": "#ff9900",
558
+ "warning-content": "#ffffff",
500
559
  "error": "#ff5724",
560
+ "error-content": "#ffffff",
501
561
  "--border-color": "var(--b3)",
502
562
  "--rounded-box": "1rem",
503
563
  "--rounded-btn": "0.5rem",
@@ -529,9 +589,13 @@ module.exports = {
529
589
  "base-300": "#ffffff",
530
590
  "base-content": "#7d7d7d",
531
591
  "info": "#2094f3",
592
+ "info-content": "#4d4d4d",
532
593
  "success": "#009485",
594
+ "success-content": "#4d4d4d",
533
595
  "warning": "#ff9900",
596
+ "warning-content": "#4d4d4d",
534
597
  "error": "#ff5724",
598
+ "error-content": "#4d4d4d",
535
599
  "--border-color": "#e6e6e6",
536
600
  "--rounded-box": "0",
537
601
  "--rounded-btn": "0",
@@ -593,9 +657,13 @@ module.exports = {
593
657
  "base-300": "#2e2d2f",
594
658
  "base-content": "#dca54c",
595
659
  "info": "#66c6ff",
660
+ "info-content": "#171618",
596
661
  "success": "#87d039",
662
+ "success-content": "#171618",
597
663
  "warning": "#e2d562",
664
+ "warning-content": "#171618",
598
665
  "error": "#ff6f6f",
666
+ "error-content": "#171618",
599
667
  "--border-color": "var(--b3)",
600
668
  "--rounded-box": "1rem",
601
669
  "--rounded-btn": "0.5rem",
@@ -627,9 +695,13 @@ module.exports = {
627
695
  "base-300": "#d1d5db",
628
696
  "base-content": "#898d90",
629
697
  "info": "#2094f3",
698
+ "info-content": "#ffffff",
630
699
  "success": "#009485",
700
+ "success-content": "#ffffff",
631
701
  "warning": "#ff9900",
702
+ "warning-content": "#ffffff",
632
703
  "error": "#ff5724",
704
+ "error-content": "#ffffff",
633
705
  "--rounded-box": "1rem",
634
706
  "--rounded-btn": "1.9rem",
635
707
  "--rounded-badge": "1.9rem",
@@ -665,9 +737,13 @@ module.exports = {
665
737
  "base-300": "#c6b386",
666
738
  "base-content": "#282425",
667
739
  "info": "#2094f3",
740
+ "info-content": "#e4d8b4",
668
741
  "success": "#009485",
742
+ "success-content": "#e4d8b4",
669
743
  "warning": "#ff9900",
744
+ "warning-content": "#e4d8b4",
670
745
  "error": "#ff5724",
746
+ "error-content": "#e4d8b4",
671
747
  "--border-color": "var(--b3)",
672
748
  "--rounded-box": "0.4rem",
673
749
  "--rounded-btn": "0.4rem",
@@ -699,9 +775,13 @@ module.exports = {
699
775
  "base-300": "#140a2e",
700
776
  "base-content": "#f9f7fd",
701
777
  "info": "#53c0f3",
778
+ "info-content": "#f9f7fd",
702
779
  "success": "#71ead2",
780
+ "success-content": "#f9f7fd",
703
781
  "warning": "#f3cc30",
782
+ "warning-content": "#f9f7fd",
704
783
  "error": "#e24056",
784
+ "error-content": "#f9f7fd",
705
785
  "--border-color": "var(--b3)",
706
786
  "--rounded-box": "1rem",
707
787
  "--rounded-btn": "0.5rem",
@@ -733,9 +813,13 @@ module.exports = {
733
813
  "base-300": "#e58fce",
734
814
  "base-content": "#632c3b",
735
815
  "info": "#2094f3",
816
+ "info-content": "#f0d6e8",
736
817
  "success": "#009485",
818
+ "success-content": "#f0d6e8",
737
819
  "warning": "#ff9900",
820
+ "warning-content": "#f0d6e8",
738
821
  "error": "#ff5724",
822
+ "error-content": "#f0d6e8",
739
823
  "--border-color": "var(--b3)",
740
824
  "--rounded-box": "1rem",
741
825
  "--rounded-btn": "1.9rem",
@@ -760,17 +844,21 @@ module.exports = {
760
844
  "accent": "#b8b8b8",
761
845
  "accent-focus": "#b8b8b8",
762
846
  "accent-content": "#000000",
847
+ "neutral": "#ebebeb",
848
+ "neutral-focus": "#ebebeb",
849
+ "neutral-content": "#000000",
763
850
  "base-100": "#ffffff",
764
851
  "base-200": "#eeeeee",
765
852
  "base-300": "#dddddd",
766
853
  "base-content": "#000000",
767
- "neutral": "#ebebeb",
768
- "neutral-focus": "#ebebeb",
769
- "neutral-content": "#000000",
770
854
  "info": "#0000ff",
855
+ "info-content": "#000000",
771
856
  "success": "#008000",
857
+ "success-content": "#000000",
772
858
  "warning": "#a6a659",
859
+ "warning-content": "#000000",
773
860
  "error": "#ff0000",
861
+ "error-content": "#000000",
774
862
  "--border-color": "#000000",
775
863
  "--rounded-box": "0.2rem",
776
864
  "--rounded-btn": "0.2rem",