@nextui-org/theme 0.0.0-dev-v2-20230326012034

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 (181) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/colors.d.ts +1 -0
  4. package/colors.js +1 -0
  5. package/dist/animations/index.d.ts +57 -0
  6. package/dist/animations/index.js +84 -0
  7. package/dist/animations/index.mjs +6 -0
  8. package/dist/chunk-37PIXVP4.mjs +33 -0
  9. package/dist/chunk-45FXWIO6.mjs +70 -0
  10. package/dist/chunk-5OE5CWK6.mjs +84 -0
  11. package/dist/chunk-5SJ7B53O.mjs +0 -0
  12. package/dist/chunk-5Z3NCB7W.mjs +391 -0
  13. package/dist/chunk-7BYRB2YS.mjs +386 -0
  14. package/dist/chunk-7MQD7UA2.mjs +16 -0
  15. package/dist/chunk-B5S7HT6N.mjs +44 -0
  16. package/dist/chunk-CMYR6AOY.mjs +0 -0
  17. package/dist/chunk-CO6ANWRA.mjs +125 -0
  18. package/dist/chunk-CRCBVLUP.mjs +38 -0
  19. package/dist/chunk-D4TJV7NY.mjs +206 -0
  20. package/dist/chunk-DCEG5LGX.mjs +17 -0
  21. package/dist/chunk-FS36US4S.mjs +25 -0
  22. package/dist/chunk-HHWXPWYN.mjs +13 -0
  23. package/dist/chunk-IJCHUO4J.mjs +38 -0
  24. package/dist/chunk-K7LK7NCE.mjs +0 -0
  25. package/dist/chunk-KZJBCC2H.mjs +17 -0
  26. package/dist/chunk-L2OL7R23.mjs +17 -0
  27. package/dist/chunk-LGGZKBOO.mjs +77 -0
  28. package/dist/chunk-M63AFAHO.mjs +0 -0
  29. package/dist/chunk-MLH3XSY7.mjs +14 -0
  30. package/dist/chunk-NJQP2VWT.mjs +160 -0
  31. package/dist/chunk-OIVGIOVG.mjs +9 -0
  32. package/dist/chunk-OR5PUD24.mjs +17 -0
  33. package/dist/chunk-OSARGUKT.mjs +326 -0
  34. package/dist/chunk-QIC7EALL.mjs +277 -0
  35. package/dist/chunk-QMP2FDFR.mjs +240 -0
  36. package/dist/chunk-QPN3H4E3.mjs +60 -0
  37. package/dist/chunk-RD42SVXB.mjs +90 -0
  38. package/dist/chunk-T3GWIVAM.mjs +17 -0
  39. package/dist/chunk-TV7EJNXI.mjs +457 -0
  40. package/dist/chunk-U77YMEWM.mjs +13 -0
  41. package/dist/chunk-VB4T62HR.mjs +159 -0
  42. package/dist/chunk-VKFQ7EZN.mjs +17 -0
  43. package/dist/chunk-WQEDQHKX.mjs +0 -0
  44. package/dist/chunk-Y37XC5QN.mjs +169 -0
  45. package/dist/chunk-Y4YW5MKL.mjs +17 -0
  46. package/dist/chunk-Y52EXP4A.mjs +142 -0
  47. package/dist/chunk-YYBLBQIV.mjs +16 -0
  48. package/dist/chunk-YZYGFPNK.mjs +17 -0
  49. package/dist/chunk-Z5OKZPNV.mjs +190 -0
  50. package/dist/colors/blue.d.ts +14 -0
  51. package/dist/colors/blue.js +41 -0
  52. package/dist/colors/blue.mjs +6 -0
  53. package/dist/colors/common.d.ts +91 -0
  54. package/dist/colors/common.js +140 -0
  55. package/dist/colors/common.mjs +13 -0
  56. package/dist/colors/cyan.d.ts +14 -0
  57. package/dist/colors/cyan.js +41 -0
  58. package/dist/colors/cyan.mjs +6 -0
  59. package/dist/colors/green.d.ts +14 -0
  60. package/dist/colors/green.js +41 -0
  61. package/dist/colors/green.mjs +6 -0
  62. package/dist/colors/index.d.ts +97 -0
  63. package/dist/colors/index.js +306 -0
  64. package/dist/colors/index.mjs +23 -0
  65. package/dist/colors/pink.d.ts +14 -0
  66. package/dist/colors/pink.js +41 -0
  67. package/dist/colors/pink.mjs +6 -0
  68. package/dist/colors/purple.d.ts +14 -0
  69. package/dist/colors/purple.js +41 -0
  70. package/dist/colors/purple.mjs +6 -0
  71. package/dist/colors/red.d.ts +14 -0
  72. package/dist/colors/red.js +41 -0
  73. package/dist/colors/red.mjs +6 -0
  74. package/dist/colors/semantic.d.ts +10 -0
  75. package/dist/colors/semantic.js +298 -0
  76. package/dist/colors/semantic.mjs +19 -0
  77. package/dist/colors/types.d.ts +37 -0
  78. package/dist/colors/types.js +18 -0
  79. package/dist/colors/types.mjs +1 -0
  80. package/dist/colors/yellow.d.ts +14 -0
  81. package/dist/colors/yellow.js +41 -0
  82. package/dist/colors/yellow.mjs +6 -0
  83. package/dist/colors.d.ts +4 -0
  84. package/dist/colors.js +306 -0
  85. package/dist/colors.mjs +24 -0
  86. package/dist/components/accordion-item.d.ts +135 -0
  87. package/dist/components/accordion-item.js +122 -0
  88. package/dist/components/accordion-item.mjs +10 -0
  89. package/dist/components/accordion.d.ts +30 -0
  90. package/dist/components/accordion.js +40 -0
  91. package/dist/components/accordion.mjs +6 -0
  92. package/dist/components/avatar-group.d.ts +26 -0
  93. package/dist/components/avatar-group.js +38 -0
  94. package/dist/components/avatar-group.mjs +6 -0
  95. package/dist/components/avatar.d.ts +211 -0
  96. package/dist/components/avatar.js +315 -0
  97. package/dist/components/avatar.mjs +10 -0
  98. package/dist/components/badge.d.ts +235 -0
  99. package/dist/components/badge.js +487 -0
  100. package/dist/components/badge.mjs +10 -0
  101. package/dist/components/button-group.d.ts +26 -0
  102. package/dist/components/button-group.js +41 -0
  103. package/dist/components/button-group.mjs +6 -0
  104. package/dist/components/button.d.ts +122 -0
  105. package/dist/components/button.js +429 -0
  106. package/dist/components/button.mjs +10 -0
  107. package/dist/components/card.d.ts +239 -0
  108. package/dist/components/card.js +222 -0
  109. package/dist/components/card.mjs +10 -0
  110. package/dist/components/checkbox-group.d.ts +32 -0
  111. package/dist/components/checkbox-group.js +37 -0
  112. package/dist/components/checkbox-group.mjs +6 -0
  113. package/dist/components/checkbox.d.ts +226 -0
  114. package/dist/components/checkbox.js +192 -0
  115. package/dist/components/checkbox.mjs +10 -0
  116. package/dist/components/chip.d.ts +274 -0
  117. package/dist/components/chip.js +560 -0
  118. package/dist/components/chip.mjs +10 -0
  119. package/dist/components/code.d.ts +68 -0
  120. package/dist/components/code.js +140 -0
  121. package/dist/components/code.mjs +10 -0
  122. package/dist/components/drip.d.ts +14 -0
  123. package/dist/components/drip.js +33 -0
  124. package/dist/components/drip.mjs +6 -0
  125. package/dist/components/index.d.ts +24 -0
  126. package/dist/components/index.js +3442 -0
  127. package/dist/components/index.mjs +95 -0
  128. package/dist/components/link.d.ts +74 -0
  129. package/dist/components/link.js +117 -0
  130. package/dist/components/link.mjs +10 -0
  131. package/dist/components/pagination.d.ts +201 -0
  132. package/dist/components/pagination.js +489 -0
  133. package/dist/components/pagination.mjs +10 -0
  134. package/dist/components/radio-group.d.ts +32 -0
  135. package/dist/components/radio-group.js +37 -0
  136. package/dist/components/radio-group.mjs +6 -0
  137. package/dist/components/radio.d.ts +271 -0
  138. package/dist/components/radio.js +201 -0
  139. package/dist/components/radio.mjs +10 -0
  140. package/dist/components/snippet.d.ts +184 -0
  141. package/dist/components/snippet.js +343 -0
  142. package/dist/components/snippet.mjs +10 -0
  143. package/dist/components/spinner.d.ts +192 -0
  144. package/dist/components/spinner.js +149 -0
  145. package/dist/components/spinner.mjs +6 -0
  146. package/dist/components/toggle.d.ts +197 -0
  147. package/dist/components/toggle.js +191 -0
  148. package/dist/components/toggle.mjs +10 -0
  149. package/dist/components/tooltip.d.ts +176 -0
  150. package/dist/components/tooltip.js +373 -0
  151. package/dist/components/tooltip.mjs +10 -0
  152. package/dist/components/user.d.ts +40 -0
  153. package/dist/components/user.js +57 -0
  154. package/dist/components/user.mjs +10 -0
  155. package/dist/index.d.ts +35 -0
  156. package/dist/index.js +3747 -0
  157. package/dist/index.mjs +138 -0
  158. package/dist/plugin.d.ts +38 -0
  159. package/dist/plugin.js +564 -0
  160. package/dist/plugin.mjs +151 -0
  161. package/dist/utilities/index.d.ts +72 -0
  162. package/dist/utilities/index.js +94 -0
  163. package/dist/utilities/index.mjs +6 -0
  164. package/dist/utils/index.d.ts +4 -0
  165. package/dist/utils/index.js +144 -0
  166. package/dist/utils/index.mjs +20 -0
  167. package/dist/utils/object.d.ts +4 -0
  168. package/dist/utils/object.js +58 -0
  169. package/dist/utils/object.mjs +8 -0
  170. package/dist/utils/styles.d.ts +20 -0
  171. package/dist/utils/styles.js +66 -0
  172. package/dist/utils/styles.mjs +14 -0
  173. package/dist/utils/types.d.ts +10 -0
  174. package/dist/utils/types.js +18 -0
  175. package/dist/utils/types.mjs +1 -0
  176. package/dist/utils/variants.d.ts +67 -0
  177. package/dist/utils/variants.js +101 -0
  178. package/dist/utils/variants.mjs +6 -0
  179. package/package.json +85 -0
  180. package/plugin.d.ts +1 -0
  181. package/plugin.js +1 -0
@@ -0,0 +1,457 @@
1
+ import {
2
+ colorVariants
3
+ } from "./chunk-LGGZKBOO.mjs";
4
+ import {
5
+ ringClasses
6
+ } from "./chunk-IJCHUO4J.mjs";
7
+
8
+ // src/components/chip.ts
9
+ import { tv } from "tailwind-variants";
10
+ var chip = tv({
11
+ slots: {
12
+ base: ["relative", "max-w-fit", "inline-flex", "items-center", "justify-between", "box-border"],
13
+ content: "flex-1 text-inherit select-none font-regular",
14
+ dot: ["w-2", "h-2", "ml-1", "rounded-full"],
15
+ avatar: "flex-shrink-0",
16
+ closeButton: [
17
+ "z-10",
18
+ "appearance-none",
19
+ "outline-none",
20
+ "select-none",
21
+ "transition-opacity",
22
+ "opacity-70",
23
+ "hover:opacity-100",
24
+ "cursor-pointer"
25
+ ]
26
+ },
27
+ variants: {
28
+ variant: {
29
+ solid: {},
30
+ bordered: {
31
+ base: "border-1.5 !bg-transparent"
32
+ },
33
+ light: {
34
+ base: "!bg-transparent"
35
+ },
36
+ flat: {},
37
+ faded: {
38
+ base: "border-1.5"
39
+ },
40
+ shadow: {},
41
+ dot: {
42
+ base: "border-1.5 border-neutral text-foreground !bg-transparent"
43
+ }
44
+ },
45
+ color: {
46
+ neutral: {
47
+ dot: "bg-neutral-400"
48
+ },
49
+ primary: {
50
+ dot: "bg-primary"
51
+ },
52
+ secondary: {
53
+ dot: "bg-secondary"
54
+ },
55
+ success: {
56
+ dot: "bg-success"
57
+ },
58
+ warning: {
59
+ dot: "bg-warning"
60
+ },
61
+ danger: {
62
+ dot: "bg-danger"
63
+ }
64
+ },
65
+ size: {
66
+ xs: {
67
+ base: "px-0.5 h-5 text-xs",
68
+ content: "px-1",
69
+ closeButton: "text-sm",
70
+ avatar: "w-3.5 h-3.5"
71
+ },
72
+ sm: {
73
+ base: "px-1 h-6 text-sm",
74
+ content: "px-1",
75
+ closeButton: "text-base",
76
+ avatar: "w-4 h-4"
77
+ },
78
+ md: {
79
+ base: "px-1 h-7 text-base",
80
+ content: "px-2",
81
+ closeButton: "text-lg",
82
+ avatar: "w-5 h-5"
83
+ },
84
+ lg: {
85
+ base: "px-2 h-8 text-lg",
86
+ content: "px-2",
87
+ closeButton: "text-xl",
88
+ avatar: "w-6 h-6"
89
+ },
90
+ xl: {
91
+ base: "px-2 h-9 text-xl",
92
+ content: "px-2",
93
+ closeButton: "text-2xl",
94
+ avatar: "w-7 h-7"
95
+ }
96
+ },
97
+ radius: {
98
+ none: { base: "rounded-none" },
99
+ base: { base: "rounded" },
100
+ sm: { base: "rounded-sm" },
101
+ md: { base: "rounded-md" },
102
+ lg: { base: "rounded-lg" },
103
+ xl: { base: "rounded-xl" },
104
+ "2xl": { base: "rounded-2xl" },
105
+ "3xl": { base: "rounded-3xl" },
106
+ full: { base: "rounded-full" }
107
+ },
108
+ hasLeftContent: {
109
+ true: {}
110
+ },
111
+ hasRightContent: {
112
+ true: {}
113
+ },
114
+ isOneChar: {
115
+ true: {
116
+ base: "px-0 justify-center",
117
+ content: "px-0 flex-none"
118
+ }
119
+ },
120
+ isDisabled: {
121
+ true: { base: "opacity-50 pointer-events-none" }
122
+ },
123
+ isCloseButtonFocusVisible: {
124
+ true: {
125
+ closeButton: [...ringClasses, "ring-1", "rounded-full"]
126
+ }
127
+ }
128
+ },
129
+ defaultVariants: {
130
+ variant: "solid",
131
+ color: "neutral",
132
+ size: "md",
133
+ radius: "full",
134
+ isDisabled: false
135
+ },
136
+ compoundVariants: [
137
+ {
138
+ variant: "solid",
139
+ color: "neutral",
140
+ class: {
141
+ base: colorVariants.solid.neutral
142
+ }
143
+ },
144
+ {
145
+ variant: "solid",
146
+ color: "primary",
147
+ class: {
148
+ base: colorVariants.solid.primary
149
+ }
150
+ },
151
+ {
152
+ variant: "solid",
153
+ color: "secondary",
154
+ class: {
155
+ base: colorVariants.solid.secondary
156
+ }
157
+ },
158
+ {
159
+ variant: "solid",
160
+ color: "success",
161
+ class: {
162
+ base: colorVariants.solid.success
163
+ }
164
+ },
165
+ {
166
+ variant: "solid",
167
+ color: "warning",
168
+ class: {
169
+ base: colorVariants.solid.warning
170
+ }
171
+ },
172
+ {
173
+ variant: "solid",
174
+ color: "danger",
175
+ class: {
176
+ base: colorVariants.solid.danger
177
+ }
178
+ },
179
+ {
180
+ variant: "shadow",
181
+ color: "neutral",
182
+ class: {
183
+ base: colorVariants.shadow.neutral
184
+ }
185
+ },
186
+ {
187
+ variant: "shadow",
188
+ color: "primary",
189
+ class: {
190
+ base: colorVariants.shadow.primary
191
+ }
192
+ },
193
+ {
194
+ variant: "shadow",
195
+ color: "secondary",
196
+ class: {
197
+ base: colorVariants.shadow.secondary
198
+ }
199
+ },
200
+ {
201
+ variant: "shadow",
202
+ color: "success",
203
+ class: {
204
+ base: colorVariants.shadow.success
205
+ }
206
+ },
207
+ {
208
+ variant: "shadow",
209
+ color: "warning",
210
+ class: {
211
+ base: colorVariants.shadow.warning
212
+ }
213
+ },
214
+ {
215
+ variant: "shadow",
216
+ color: "danger",
217
+ class: {
218
+ base: colorVariants.shadow.danger
219
+ }
220
+ },
221
+ {
222
+ variant: "bordered",
223
+ color: "neutral",
224
+ class: {
225
+ base: colorVariants.bordered.neutral
226
+ }
227
+ },
228
+ {
229
+ variant: "bordered",
230
+ color: "primary",
231
+ class: {
232
+ base: colorVariants.bordered.primary
233
+ }
234
+ },
235
+ {
236
+ variant: "bordered",
237
+ color: "secondary",
238
+ class: {
239
+ base: colorVariants.bordered.secondary
240
+ }
241
+ },
242
+ {
243
+ variant: "bordered",
244
+ color: "success",
245
+ class: {
246
+ base: colorVariants.bordered.success
247
+ }
248
+ },
249
+ {
250
+ variant: "bordered",
251
+ color: "warning",
252
+ class: {
253
+ base: colorVariants.bordered.warning
254
+ }
255
+ },
256
+ {
257
+ variant: "bordered",
258
+ color: "danger",
259
+ class: {
260
+ base: colorVariants.bordered.danger
261
+ }
262
+ },
263
+ {
264
+ variant: "flat",
265
+ color: "neutral",
266
+ class: {
267
+ base: colorVariants.flat.neutral
268
+ }
269
+ },
270
+ {
271
+ variant: "flat",
272
+ color: "primary",
273
+ class: {
274
+ base: colorVariants.flat.primary
275
+ }
276
+ },
277
+ {
278
+ variant: "flat",
279
+ color: "secondary",
280
+ class: {
281
+ base: colorVariants.flat.secondary
282
+ }
283
+ },
284
+ {
285
+ variant: "flat",
286
+ color: "success",
287
+ class: {
288
+ base: colorVariants.flat.success
289
+ }
290
+ },
291
+ {
292
+ variant: "flat",
293
+ color: "warning",
294
+ class: {
295
+ base: colorVariants.flat.warning
296
+ }
297
+ },
298
+ {
299
+ variant: "flat",
300
+ color: "danger",
301
+ class: {
302
+ base: colorVariants.flat.danger
303
+ }
304
+ },
305
+ {
306
+ variant: "faded",
307
+ color: "neutral",
308
+ class: {
309
+ base: colorVariants.faded.neutral
310
+ }
311
+ },
312
+ {
313
+ variant: "faded",
314
+ color: "primary",
315
+ class: {
316
+ base: colorVariants.faded.primary
317
+ }
318
+ },
319
+ {
320
+ variant: "faded",
321
+ color: "secondary",
322
+ class: {
323
+ base: colorVariants.faded.secondary
324
+ }
325
+ },
326
+ {
327
+ variant: "faded",
328
+ color: "success",
329
+ class: {
330
+ base: colorVariants.faded.success
331
+ }
332
+ },
333
+ {
334
+ variant: "faded",
335
+ color: "warning",
336
+ class: {
337
+ base: colorVariants.faded.warning
338
+ }
339
+ },
340
+ {
341
+ variant: "faded",
342
+ color: "danger",
343
+ class: {
344
+ base: colorVariants.faded.danger
345
+ }
346
+ },
347
+ {
348
+ variant: "light",
349
+ color: "neutral",
350
+ class: {
351
+ base: colorVariants.light.neutral
352
+ }
353
+ },
354
+ {
355
+ variant: "light",
356
+ color: "primary",
357
+ class: {
358
+ base: colorVariants.light.primary
359
+ }
360
+ },
361
+ {
362
+ variant: "light",
363
+ color: "secondary",
364
+ class: {
365
+ base: colorVariants.light.secondary
366
+ }
367
+ },
368
+ {
369
+ variant: "light",
370
+ color: "success",
371
+ class: {
372
+ base: colorVariants.light.success
373
+ }
374
+ },
375
+ {
376
+ variant: "light",
377
+ color: "warning",
378
+ class: {
379
+ base: colorVariants.light.warning
380
+ }
381
+ },
382
+ {
383
+ variant: "light",
384
+ color: "danger",
385
+ class: {
386
+ base: colorVariants.light.danger
387
+ }
388
+ },
389
+ {
390
+ isOneChar: true,
391
+ size: "xs",
392
+ class: {
393
+ base: "w-4 h-4"
394
+ }
395
+ },
396
+ {
397
+ isOneChar: true,
398
+ size: "sm",
399
+ class: {
400
+ base: "w-5 h-5"
401
+ }
402
+ },
403
+ {
404
+ isOneChar: true,
405
+ size: "md",
406
+ class: {
407
+ base: "w-6 h-6"
408
+ }
409
+ },
410
+ {
411
+ isOneChar: true,
412
+ size: "lg",
413
+ class: {
414
+ base: "w-7 h-7"
415
+ }
416
+ },
417
+ {
418
+ isOneChar: true,
419
+ size: "xl",
420
+ class: {
421
+ base: "w-8 h-8"
422
+ }
423
+ },
424
+ {
425
+ hasLeftContent: true,
426
+ size: ["xs", "sm"],
427
+ class: {
428
+ content: "pl-0.5"
429
+ }
430
+ },
431
+ {
432
+ hasLeftContent: true,
433
+ size: ["md", "lg", "xl"],
434
+ class: {
435
+ content: "pl-1"
436
+ }
437
+ },
438
+ {
439
+ hasRightContent: true,
440
+ size: ["xs", "sm"],
441
+ class: {
442
+ content: "pr-0.5"
443
+ }
444
+ },
445
+ {
446
+ hasRightContent: true,
447
+ size: ["md", "lg", "xl"],
448
+ class: {
449
+ content: "pr-1"
450
+ }
451
+ }
452
+ ]
453
+ });
454
+
455
+ export {
456
+ chip
457
+ };
@@ -0,0 +1,13 @@
1
+ // src/components/checkbox-group.ts
2
+ import { tv } from "tailwind-variants";
3
+ var checkboxGroup = tv({
4
+ slots: {
5
+ base: "relative flex flex-col gap-2",
6
+ label: "relative text-neutral-500",
7
+ wrapper: "flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row "
8
+ }
9
+ });
10
+
11
+ export {
12
+ checkboxGroup
13
+ };
@@ -0,0 +1,159 @@
1
+ import {
2
+ ringClasses
3
+ } from "./chunk-IJCHUO4J.mjs";
4
+
5
+ // src/components/toggle.ts
6
+ import { tv } from "tailwind-variants";
7
+ var toggle = tv({
8
+ slots: {
9
+ base: "relative max-w-fit inline-flex items-center justify-start cursor-pointer",
10
+ wrapper: [
11
+ "group",
12
+ "px-1",
13
+ "relative",
14
+ "inline-flex",
15
+ "items-center",
16
+ "justify-start",
17
+ "flex-shrink-0",
18
+ "overflow-hidden",
19
+ "bg-neutral-200",
20
+ "rounded-full"
21
+ ],
22
+ thumb: [
23
+ "z-10",
24
+ "flex",
25
+ "items-center",
26
+ "justify-center",
27
+ "bg-white",
28
+ "shadow-sm",
29
+ "rounded-full",
30
+ "data-[checked=true]:translate-x-full"
31
+ ],
32
+ leftIcon: "z-0 absolute left-1.5 text-current",
33
+ rightIcon: "z-0 absolute right-1.5 text-neutral-600",
34
+ thumbIcon: "text-black",
35
+ label: "relative text-foreground select-none"
36
+ },
37
+ variants: {
38
+ color: {
39
+ neutral: {
40
+ wrapper: [
41
+ "data-[checked=true]:bg-neutral-400",
42
+ "data-[checked=true]:text-neutral-contrastText"
43
+ ]
44
+ },
45
+ primary: {
46
+ wrapper: [
47
+ "data-[checked=true]:bg-primary",
48
+ "data-[checked=true]:text-primary-contrastText"
49
+ ]
50
+ },
51
+ secondary: {
52
+ wrapper: [
53
+ "data-[checked=true]:bg-secondary",
54
+ "data-[checked=true]:text-secondary-contrastText"
55
+ ]
56
+ },
57
+ success: {
58
+ wrapper: [
59
+ "data-[checked=true]:bg-success",
60
+ "data-[checked=true]:text-success-contrastText"
61
+ ]
62
+ },
63
+ warning: {
64
+ wrapper: [
65
+ "data-[checked=true]:bg-warning",
66
+ "data-[checked=true]:text-warning-contrastText"
67
+ ]
68
+ },
69
+ danger: {
70
+ wrapper: ["data-[checked=true]:bg-danger", "data-[checked=true]:text-danger-contrastText"]
71
+ }
72
+ },
73
+ size: {
74
+ xs: {
75
+ wrapper: "px-0.5 w-7 h-4 mr-1",
76
+ thumb: "w-3 h-3 text-[0.5rem]",
77
+ leftIcon: "text-[0.5rem] left-1",
78
+ rightIcon: "text-[0.5rem] right-1",
79
+ right: "text-[0.5rem]",
80
+ label: "text-xs"
81
+ },
82
+ sm: {
83
+ wrapper: "w-8 h-5 mr-1",
84
+ thumb: "w-3 h-3 text-[0.6rem]",
85
+ leftIcon: "text-[0.6rem] left-1",
86
+ rightIcon: "text-[0.6rem] right-1",
87
+ label: "text-sm"
88
+ },
89
+ md: {
90
+ wrapper: "w-10 h-6 mr-2",
91
+ thumb: "w-4 h-4 text-xs",
92
+ rightIcon: "text-xs",
93
+ leftIcon: "text-xs",
94
+ label: "text-base"
95
+ },
96
+ lg: {
97
+ wrapper: "w-12 h-7 mr-2",
98
+ thumb: "w-5 h-5 text-sm",
99
+ rightIcon: "text-sm",
100
+ leftIcon: "text-sm",
101
+ label: "text-lg"
102
+ },
103
+ xl: {
104
+ wrapper: "w-14 h-8 mr-2",
105
+ thumb: "w-6 h-6 text-base",
106
+ rightIcon: "text-base",
107
+ leftIcon: "text-base",
108
+ label: "text-xl"
109
+ }
110
+ },
111
+ isFocusVisible: {
112
+ true: {
113
+ wrapper: [...ringClasses]
114
+ }
115
+ },
116
+ isDisabled: {
117
+ true: {
118
+ base: "opacity-50 pointer-events-none"
119
+ }
120
+ },
121
+ disableAnimation: {
122
+ true: {
123
+ wrapper: "transition-none",
124
+ thumb: "transition-none"
125
+ },
126
+ false: {
127
+ wrapper: "transition-background",
128
+ thumb: [
129
+ "transition",
130
+ "group-active:translate-x-1",
131
+ "data-[checked=true]:group-active:translate-x-[90%]"
132
+ ],
133
+ leftIcon: [
134
+ "opacity-0",
135
+ "scale-50",
136
+ "transition-transform-opacity",
137
+ "data-[checked=true]:scale-100",
138
+ "data-[checked=true]:opacity-100"
139
+ ],
140
+ rightIcon: [
141
+ "opacity-100",
142
+ "transition-transform-opacity",
143
+ "data-[checked=true]:translate-x-3",
144
+ "data-[checked=true]:opacity-0"
145
+ ]
146
+ }
147
+ }
148
+ },
149
+ defaultVariants: {
150
+ color: "primary",
151
+ size: "md",
152
+ isDisabled: false,
153
+ disableAnimation: false
154
+ }
155
+ });
156
+
157
+ export {
158
+ toggle
159
+ };
@@ -0,0 +1,17 @@
1
+ // src/components/button-group.ts
2
+ import { tv } from "tailwind-variants";
3
+ var buttonGroup = tv({
4
+ base: "inline-flex items-center justify-center h-auto w-max-content",
5
+ variants: {
6
+ fullWidth: {
7
+ true: "w-full"
8
+ }
9
+ },
10
+ defaultVariants: {
11
+ fullWidth: false
12
+ }
13
+ });
14
+
15
+ export {
16
+ buttonGroup
17
+ };
File without changes