daisyui 1.3.1 → 2.0.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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/LICENSE-tailwind_merge.txt +21 -0
  4. data/README.md +58 -0
  5. data/lib/daisy_ui/accordion.rb +32 -28
  6. data/lib/daisy_ui/alert.rb +97 -94
  7. data/lib/daisy_ui/aura.rb +37 -37
  8. data/lib/daisy_ui/avatar.rb +16 -14
  9. data/lib/daisy_ui/badge.rb +159 -156
  10. data/lib/daisy_ui/base.rb +38 -4
  11. data/lib/daisy_ui/button.rb +148 -142
  12. data/lib/daisy_ui/card.rb +57 -54
  13. data/lib/daisy_ui/carousel.rb +36 -32
  14. data/lib/daisy_ui/chat.rb +16 -15
  15. data/lib/daisy_ui/checkbox.rb +95 -93
  16. data/lib/daisy_ui/class_merge/cache.rb +40 -0
  17. data/lib/daisy_ui/class_merge/class_group_utils.rb +139 -0
  18. data/lib/daisy_ui/class_merge/configuration.rb +77 -0
  19. data/lib/daisy_ui/class_merge/daisy_groups.rb +83 -0
  20. data/lib/daisy_ui/class_merge/merger.rb +126 -0
  21. data/lib/daisy_ui/class_merge/parse_class_name.rb +110 -0
  22. data/lib/daisy_ui/class_merge/sort_modifiers.rb +36 -0
  23. data/lib/daisy_ui/class_merge/tailwind_config.rb +2505 -0
  24. data/lib/daisy_ui/class_merge/validators.rb +202 -0
  25. data/lib/daisy_ui/class_merge.rb +47 -0
  26. data/lib/daisy_ui/collapse.rb +32 -28
  27. data/lib/daisy_ui/configurable.rb +31 -3
  28. data/lib/daisy_ui/divider.rb +84 -78
  29. data/lib/daisy_ui/dock.rb +37 -35
  30. data/lib/daisy_ui/dropdown.rb +67 -65
  31. data/lib/daisy_ui/file_input.rb +95 -91
  32. data/lib/daisy_ui/footer.rb +16 -14
  33. data/lib/daisy_ui/indicator.rb +40 -36
  34. data/lib/daisy_ui/input.rb +95 -91
  35. data/lib/daisy_ui/join.rb +16 -14
  36. data/lib/daisy_ui/kbd.rb +37 -35
  37. data/lib/daisy_ui/link.rb +58 -58
  38. data/lib/daisy_ui/loading.rb +85 -81
  39. data/lib/daisy_ui/mask.rb +123 -119
  40. data/lib/daisy_ui/megamenu.rb +53 -50
  41. data/lib/daisy_ui/menu.rb +57 -53
  42. data/lib/daisy_ui/modal.rb +49 -47
  43. data/lib/daisy_ui/otp.rb +95 -93
  44. data/lib/daisy_ui/pagination.rb +16 -14
  45. data/lib/daisy_ui/progress.rb +58 -56
  46. data/lib/daisy_ui/radio.rb +95 -91
  47. data/lib/daisy_ui/range.rb +95 -91
  48. data/lib/daisy_ui/rating.rb +37 -35
  49. data/lib/daisy_ui/select.rb +95 -91
  50. data/lib/daisy_ui/stack.rb +24 -22
  51. data/lib/daisy_ui/stat.rb +16 -14
  52. data/lib/daisy_ui/status.rb +95 -91
  53. data/lib/daisy_ui/steps.rb +16 -14
  54. data/lib/daisy_ui/swap.rb +16 -14
  55. data/lib/daisy_ui/table.rb +41 -39
  56. data/lib/daisy_ui/tabs.rb +80 -77
  57. data/lib/daisy_ui/textarea.rb +95 -91
  58. data/lib/daisy_ui/timeline.rb +16 -14
  59. data/lib/daisy_ui/toast.rb +46 -42
  60. data/lib/daisy_ui/toggle.rb +95 -91
  61. data/lib/daisy_ui/tooltip.rb +111 -105
  62. data/lib/daisy_ui/updated_at.rb +1 -1
  63. data/lib/daisy_ui/version.rb +1 -1
  64. metadata +18 -1
@@ -170,71 +170,73 @@ module DaisyUI
170
170
  end
171
171
 
172
172
  register_modifiers(
173
- # Placement
174
- # "sm:dropdown-start"
175
- # "@sm:dropdown-start"
176
- # "md:dropdown-start"
177
- # "@md:dropdown-start"
178
- # "lg:dropdown-start"
179
- # "@lg:dropdown-start"
180
- # "xl:dropdown-start"
181
- # "@xl:dropdown-start"
182
- start: "dropdown-start",
183
- # "sm:dropdown-center"
184
- # "@sm:dropdown-center"
185
- # "md:dropdown-center"
186
- # "@md:dropdown-center"
187
- # "lg:dropdown-center"
188
- # "@lg:dropdown-center"
189
- # "xl:dropdown-center"
190
- # "@xl:dropdown-center"
191
- center: "dropdown-center",
192
- # "sm:dropdown-end"
193
- # "@sm:dropdown-end"
194
- # "md:dropdown-end"
195
- # "@md:dropdown-end"
196
- # "lg:dropdown-end"
197
- # "@lg:dropdown-end"
198
- # "xl:dropdown-end"
199
- # "@xl:dropdown-end"
200
- end: "dropdown-end",
201
- # "sm:dropdown-top"
202
- # "@sm:dropdown-top"
203
- # "md:dropdown-top"
204
- # "@md:dropdown-top"
205
- # "lg:dropdown-top"
206
- # "@lg:dropdown-top"
207
- # "xl:dropdown-top"
208
- # "@xl:dropdown-top"
209
- top: "dropdown-top",
210
- # "sm:dropdown-bottom"
211
- # "@sm:dropdown-bottom"
212
- # "md:dropdown-bottom"
213
- # "@md:dropdown-bottom"
214
- # "lg:dropdown-bottom"
215
- # "@lg:dropdown-bottom"
216
- # "xl:dropdown-bottom"
217
- # "@xl:dropdown-bottom"
218
- bottom: "dropdown-bottom",
219
- # "sm:dropdown-left"
220
- # "@sm:dropdown-left"
221
- # "md:dropdown-left"
222
- # "@md:dropdown-left"
223
- # "lg:dropdown-left"
224
- # "@lg:dropdown-left"
225
- # "xl:dropdown-left"
226
- # "@xl:dropdown-left"
227
- left: "dropdown-left",
228
- # "sm:dropdown-right"
229
- # "@sm:dropdown-right"
230
- # "md:dropdown-right"
231
- # "@md:dropdown-right"
232
- # "lg:dropdown-right"
233
- # "@lg:dropdown-right"
234
- # "xl:dropdown-right"
235
- # "@xl:dropdown-right"
236
- right: "dropdown-right",
237
- # Behavior
173
+ align: {
174
+ # "sm:dropdown-start"
175
+ # "@sm:dropdown-start"
176
+ # "md:dropdown-start"
177
+ # "@md:dropdown-start"
178
+ # "lg:dropdown-start"
179
+ # "@lg:dropdown-start"
180
+ # "xl:dropdown-start"
181
+ # "@xl:dropdown-start"
182
+ start: "dropdown-start",
183
+ # "sm:dropdown-center"
184
+ # "@sm:dropdown-center"
185
+ # "md:dropdown-center"
186
+ # "@md:dropdown-center"
187
+ # "lg:dropdown-center"
188
+ # "@lg:dropdown-center"
189
+ # "xl:dropdown-center"
190
+ # "@xl:dropdown-center"
191
+ center: "dropdown-center",
192
+ # "sm:dropdown-end"
193
+ # "@sm:dropdown-end"
194
+ # "md:dropdown-end"
195
+ # "@md:dropdown-end"
196
+ # "lg:dropdown-end"
197
+ # "@lg:dropdown-end"
198
+ # "xl:dropdown-end"
199
+ # "@xl:dropdown-end"
200
+ end: "dropdown-end"
201
+ },
202
+ placement: {
203
+ # "sm:dropdown-top"
204
+ # "@sm:dropdown-top"
205
+ # "md:dropdown-top"
206
+ # "@md:dropdown-top"
207
+ # "lg:dropdown-top"
208
+ # "@lg:dropdown-top"
209
+ # "xl:dropdown-top"
210
+ # "@xl:dropdown-top"
211
+ top: "dropdown-top",
212
+ # "sm:dropdown-bottom"
213
+ # "@sm:dropdown-bottom"
214
+ # "md:dropdown-bottom"
215
+ # "@md:dropdown-bottom"
216
+ # "lg:dropdown-bottom"
217
+ # "@lg:dropdown-bottom"
218
+ # "xl:dropdown-bottom"
219
+ # "@xl:dropdown-bottom"
220
+ bottom: "dropdown-bottom",
221
+ # "sm:dropdown-left"
222
+ # "@sm:dropdown-left"
223
+ # "md:dropdown-left"
224
+ # "@md:dropdown-left"
225
+ # "lg:dropdown-left"
226
+ # "@lg:dropdown-left"
227
+ # "xl:dropdown-left"
228
+ # "@xl:dropdown-left"
229
+ left: "dropdown-left",
230
+ # "sm:dropdown-right"
231
+ # "@sm:dropdown-right"
232
+ # "md:dropdown-right"
233
+ # "@md:dropdown-right"
234
+ # "lg:dropdown-right"
235
+ # "@lg:dropdown-right"
236
+ # "xl:dropdown-right"
237
+ # "@xl:dropdown-right"
238
+ right: "dropdown-right"
239
+ },
238
240
  # "sm:dropdown-hover"
239
241
  # "@sm:dropdown-hover"
240
242
  # "md:dropdown-hover"
@@ -21,97 +21,101 @@ module DaisyUI
21
21
  # "lg:file-input-ghost"
22
22
  # "@lg:file-input-ghost"
23
23
  ghost: "file-input-ghost",
24
- # "sm:file-input-xs"
25
- # "@sm:file-input-xs"
26
- # "md:file-input-xs"
27
- # "@md:file-input-xs"
28
- # "lg:file-input-xs"
29
- # "@lg:file-input-xs"
30
- xs: "file-input-xs",
31
- # "sm:file-input-sm"
32
- # "@sm:file-input-sm"
33
- # "md:file-input-sm"
34
- # "@md:file-input-sm"
35
- # "lg:file-input-sm"
36
- # "@lg:file-input-sm"
37
- sm: "file-input-sm",
38
- # "sm:file-input-md"
39
- # "@sm:file-input-md"
40
- # "md:file-input-md"
41
- # "@md:file-input-md"
42
- # "lg:file-input-md"
43
- # "@lg:file-input-md"
44
- md: "file-input-md",
45
- # "sm:file-input-lg"
46
- # "@sm:file-input-lg"
47
- # "md:file-input-lg"
48
- # "@md:file-input-lg"
49
- # "lg:file-input-lg"
50
- # "@lg:file-input-lg"
51
- lg: "file-input-lg",
52
- # "sm:file-input-xl"
53
- # "@sm:file-input-xl"
54
- # "md:file-input-xl"
55
- # "@md:file-input-xl"
56
- # "lg:file-input-xl"
57
- # "@lg:file-input-xl"
58
- xl: "file-input-xl",
59
- # "sm:file-input-neutral"
60
- # "@sm:file-input-neutral"
61
- # "md:file-input-neutral"
62
- # "@md:file-input-neutral"
63
- # "lg:file-input-neutral"
64
- # "@lg:file-input-neutral"
65
- neutral: "file-input-neutral",
66
- # "sm:file-input-primary"
67
- # "@sm:file-input-primary"
68
- # "md:file-input-primary"
69
- # "@md:file-input-primary"
70
- # "lg:file-input-primary"
71
- # "@lg:file-input-primary"
72
- primary: "file-input-primary",
73
- # "sm:file-input-secondary"
74
- # "@sm:file-input-secondary"
75
- # "md:file-input-secondary"
76
- # "@md:file-input-secondary"
77
- # "lg:file-input-secondary"
78
- # "@lg:file-input-secondary"
79
- secondary: "file-input-secondary",
80
- # "sm:file-input-accent"
81
- # "@sm:file-input-accent"
82
- # "md:file-input-accent"
83
- # "@md:file-input-accent"
84
- # "lg:file-input-accent"
85
- # "@lg:file-input-accent"
86
- accent: "file-input-accent",
87
- # "sm:file-input-info"
88
- # "@sm:file-input-info"
89
- # "md:file-input-info"
90
- # "@md:file-input-info"
91
- # "lg:file-input-info"
92
- # "@lg:file-input-info"
93
- info: "file-input-info",
94
- # "sm:file-input-success"
95
- # "@sm:file-input-success"
96
- # "md:file-input-success"
97
- # "@md:file-input-success"
98
- # "lg:file-input-success"
99
- # "@lg:file-input-success"
100
- success: "file-input-success",
101
- # "sm:file-input-warning"
102
- # "@sm:file-input-warning"
103
- # "md:file-input-warning"
104
- # "@md:file-input-warning"
105
- # "lg:file-input-warning"
106
- # "@lg:file-input-warning"
107
- warning: "file-input-warning",
108
- # "sm:file-input-error"
109
- # "@sm:file-input-error"
110
- # "md:file-input-error"
111
- # "@md:file-input-error"
112
- # "lg:file-input-error"
113
- # "@lg:file-input-error"
114
- error: "file-input-error"
24
+ size: {
25
+ # "sm:file-input-xs"
26
+ # "@sm:file-input-xs"
27
+ # "md:file-input-xs"
28
+ # "@md:file-input-xs"
29
+ # "lg:file-input-xs"
30
+ # "@lg:file-input-xs"
31
+ xs: "file-input-xs",
32
+ # "sm:file-input-sm"
33
+ # "@sm:file-input-sm"
34
+ # "md:file-input-sm"
35
+ # "@md:file-input-sm"
36
+ # "lg:file-input-sm"
37
+ # "@lg:file-input-sm"
38
+ sm: "file-input-sm",
39
+ # "sm:file-input-md"
40
+ # "@sm:file-input-md"
41
+ # "md:file-input-md"
42
+ # "@md:file-input-md"
43
+ # "lg:file-input-md"
44
+ # "@lg:file-input-md"
45
+ md: "file-input-md",
46
+ # "sm:file-input-lg"
47
+ # "@sm:file-input-lg"
48
+ # "md:file-input-lg"
49
+ # "@md:file-input-lg"
50
+ # "lg:file-input-lg"
51
+ # "@lg:file-input-lg"
52
+ lg: "file-input-lg",
53
+ # "sm:file-input-xl"
54
+ # "@sm:file-input-xl"
55
+ # "md:file-input-xl"
56
+ # "@md:file-input-xl"
57
+ # "lg:file-input-xl"
58
+ # "@lg:file-input-xl"
59
+ xl: "file-input-xl"
60
+ },
61
+ color: {
62
+ # "sm:file-input-neutral"
63
+ # "@sm:file-input-neutral"
64
+ # "md:file-input-neutral"
65
+ # "@md:file-input-neutral"
66
+ # "lg:file-input-neutral"
67
+ # "@lg:file-input-neutral"
68
+ neutral: "file-input-neutral",
69
+ # "sm:file-input-primary"
70
+ # "@sm:file-input-primary"
71
+ # "md:file-input-primary"
72
+ # "@md:file-input-primary"
73
+ # "lg:file-input-primary"
74
+ # "@lg:file-input-primary"
75
+ primary: "file-input-primary",
76
+ # "sm:file-input-secondary"
77
+ # "@sm:file-input-secondary"
78
+ # "md:file-input-secondary"
79
+ # "@md:file-input-secondary"
80
+ # "lg:file-input-secondary"
81
+ # "@lg:file-input-secondary"
82
+ secondary: "file-input-secondary",
83
+ # "sm:file-input-accent"
84
+ # "@sm:file-input-accent"
85
+ # "md:file-input-accent"
86
+ # "@md:file-input-accent"
87
+ # "lg:file-input-accent"
88
+ # "@lg:file-input-accent"
89
+ accent: "file-input-accent",
90
+ # "sm:file-input-info"
91
+ # "@sm:file-input-info"
92
+ # "md:file-input-info"
93
+ # "@md:file-input-info"
94
+ # "lg:file-input-info"
95
+ # "@lg:file-input-info"
96
+ info: "file-input-info",
97
+ # "sm:file-input-success"
98
+ # "@sm:file-input-success"
99
+ # "md:file-input-success"
100
+ # "@md:file-input-success"
101
+ # "lg:file-input-success"
102
+ # "@lg:file-input-success"
103
+ success: "file-input-success",
104
+ # "sm:file-input-warning"
105
+ # "@sm:file-input-warning"
106
+ # "md:file-input-warning"
107
+ # "@md:file-input-warning"
108
+ # "lg:file-input-warning"
109
+ # "@lg:file-input-warning"
110
+ warning: "file-input-warning",
111
+ # "sm:file-input-error"
112
+ # "@sm:file-input-error"
113
+ # "md:file-input-error"
114
+ # "@md:file-input-error"
115
+ # "lg:file-input-error"
116
+ # "@lg:file-input-error"
117
+ error: "file-input-error"
118
+ }
115
119
  )
116
120
  end
117
121
  end
@@ -25,20 +25,22 @@ module DaisyUI
25
25
  # "lg:footer-center"
26
26
  # "@lg:footer-center"
27
27
  center: "footer-center",
28
- # "sm:footer-horizontal"
29
- # "@sm:footer-horizontal"
30
- # "md:footer-horizontal"
31
- # "@md:footer-horizontal"
32
- # "lg:footer-horizontal"
33
- # "@lg:footer-horizontal"
34
- horizontal: "footer-horizontal",
35
- # "sm:footer-vertical"
36
- # "@sm:footer-vertical"
37
- # "md:footer-vertical"
38
- # "@md:footer-vertical"
39
- # "lg:footer-vertical"
40
- # "@lg:footer-vertical"
41
- vertical: "footer-vertical"
28
+ direction: {
29
+ # "sm:footer-horizontal"
30
+ # "@sm:footer-horizontal"
31
+ # "md:footer-horizontal"
32
+ # "@md:footer-horizontal"
33
+ # "lg:footer-horizontal"
34
+ # "@lg:footer-horizontal"
35
+ horizontal: "footer-horizontal",
36
+ # "sm:footer-vertical"
37
+ # "@sm:footer-vertical"
38
+ # "md:footer-vertical"
39
+ # "@md:footer-vertical"
40
+ # "lg:footer-vertical"
41
+ # "@lg:footer-vertical"
42
+ vertical: "footer-vertical"
43
+ }
42
44
  )
43
45
  end
44
46
  end
@@ -29,48 +29,52 @@ module DaisyUI
29
29
  end
30
30
 
31
31
  register_modifiers(
32
- # "sm:indicator-start"
33
- # "@sm:indicator-start"
34
- # "md:indicator-start"
35
- # "@md:indicator-start"
36
- # "lg:indicator-start"
37
- # "@lg:indicator-start"
38
- start: "indicator-start",
39
- # "sm:indicator-center"
40
- # "@sm:indicator-center"
41
- # "md:indicator-center"
42
- # "@md:indicator-center"
43
- # "lg:indicator-center"
44
- # "@lg:indicator-center"
45
- center: "indicator-center",
32
+ horizontal: {
33
+ # "sm:indicator-start"
34
+ # "@sm:indicator-start"
35
+ # "md:indicator-start"
36
+ # "@md:indicator-start"
37
+ # "lg:indicator-start"
38
+ # "@lg:indicator-start"
39
+ start: "indicator-start",
40
+ # "sm:indicator-center"
41
+ # "@sm:indicator-center"
42
+ # "md:indicator-center"
43
+ # "@md:indicator-center"
44
+ # "lg:indicator-center"
45
+ # "@lg:indicator-center"
46
+ center: "indicator-center",
46
47
  # "sm:indicator-end"
47
48
  # "@sm:indicator-end"
48
49
  # "md:indicator-end"
49
50
  # "@md:indicator-end"
50
51
  # "lg:indicator-end"
51
52
  # "@lg:indicator-end"
52
- end: "indicator-end",
53
- # "sm:indicator-top"
54
- # "@sm:indicator-top"
55
- # "md:indicator-top"
56
- # "@md:indicator-top"
57
- # "lg:indicator-top"
58
- # "@lg:indicator-top"
59
- top: "indicator-top",
60
- # "sm:indicator-middle"
61
- # "@sm:indicator-middle"
62
- # "md:indicator-middle"
63
- # "@md:indicator-middle"
64
- # "lg:indicator-middle"
65
- # "@lg:indicator-middle"
66
- middle: "indicator-middle",
67
- # "sm:indicator-bottom"
68
- # "@sm:indicator-bottom"
69
- # "md:indicator-bottom"
70
- # "@md:indicator-bottom"
71
- # "lg:indicator-bottom"
72
- # "@lg:indicator-bottom"
73
- bottom: "indicator-bottom"
53
+ end: "indicator-end"
54
+ },
55
+ vertical: {
56
+ # "sm:indicator-top"
57
+ # "@sm:indicator-top"
58
+ # "md:indicator-top"
59
+ # "@md:indicator-top"
60
+ # "lg:indicator-top"
61
+ # "@lg:indicator-top"
62
+ top: "indicator-top",
63
+ # "sm:indicator-middle"
64
+ # "@sm:indicator-middle"
65
+ # "md:indicator-middle"
66
+ # "@md:indicator-middle"
67
+ # "lg:indicator-middle"
68
+ # "@lg:indicator-middle"
69
+ middle: "indicator-middle",
70
+ # "sm:indicator-bottom"
71
+ # "@sm:indicator-bottom"
72
+ # "md:indicator-bottom"
73
+ # "@md:indicator-bottom"
74
+ # "lg:indicator-bottom"
75
+ # "@lg:indicator-bottom"
76
+ bottom: "indicator-bottom"
77
+ }
74
78
  )
75
79
  end
76
80
  end