@nextui-org/theme 0.0.0-dev-v2-20230415023901 → 0.0.0-dev-v2-20230415210725

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 (67) hide show
  1. package/dist/chunk-2QIDY5NZ.mjs +22 -0
  2. package/dist/{chunk-TEP7IDHT.mjs → chunk-7GYSEREC.mjs} +12 -16
  3. package/dist/{chunk-K6HUFGJV.mjs → chunk-ANRX4UF2.mjs} +10 -17
  4. package/dist/{chunk-PC5X557I.mjs → chunk-DBYBIR6S.mjs} +38 -30
  5. package/dist/{chunk-TSETU4MR.mjs → chunk-FZQRP6V7.mjs} +19 -14
  6. package/dist/{chunk-D3I4FO36.mjs → chunk-KWYOTFZ4.mjs} +45 -48
  7. package/dist/{chunk-4IAUQPNO.mjs → chunk-MZ2ZBGLR.mjs} +7 -9
  8. package/dist/{chunk-WYZNUYAJ.mjs → chunk-SN6PW6NR.mjs} +16 -19
  9. package/dist/{chunk-FTD4Z4HA.mjs → chunk-TDD767J7.mjs} +9 -13
  10. package/dist/chunk-UXBWU2G4.mjs +178 -0
  11. package/dist/{chunk-W3CNTVG5.mjs → chunk-XQ3KK6F3.mjs} +14 -17
  12. package/dist/{chunk-IB25MFRG.mjs → chunk-XSFH4S4Y.mjs} +9 -10
  13. package/dist/{chunk-BLQLHY22.mjs → chunk-Y63UYKP7.mjs} +8 -8
  14. package/dist/{chunk-53YQ75PY.mjs → chunk-YMIOHWCD.mjs} +9 -12
  15. package/dist/components/accordion-item.d.ts +1 -11
  16. package/dist/components/accordion-item.js +9 -18
  17. package/dist/components/accordion-item.mjs +1 -5
  18. package/dist/components/avatar.d.ts +3 -13
  19. package/dist/components/avatar.js +12 -23
  20. package/dist/components/avatar.mjs +1 -1
  21. package/dist/components/button.d.ts +7 -7
  22. package/dist/components/button.js +8 -15
  23. package/dist/components/button.mjs +1 -1
  24. package/dist/components/card.d.ts +0 -10
  25. package/dist/components/card.js +9 -21
  26. package/dist/components/card.mjs +1 -5
  27. package/dist/components/checkbox.d.ts +0 -10
  28. package/dist/components/checkbox.js +14 -25
  29. package/dist/components/checkbox.mjs +1 -5
  30. package/dist/components/dropdown-item.d.ts +1 -11
  31. package/dist/components/dropdown-item.js +45 -56
  32. package/dist/components/dropdown-item.mjs +1 -5
  33. package/dist/components/index.d.ts +1 -1
  34. package/dist/components/index.js +274 -222
  35. package/dist/components/index.mjs +36 -36
  36. package/dist/components/input.d.ts +0 -16
  37. package/dist/components/input.js +38 -38
  38. package/dist/components/input.mjs +1 -5
  39. package/dist/components/modal.d.ts +0 -10
  40. package/dist/components/modal.js +9 -20
  41. package/dist/components/modal.mjs +1 -5
  42. package/dist/components/pagination.d.ts +1 -11
  43. package/dist/components/pagination.js +19 -21
  44. package/dist/components/pagination.mjs +1 -1
  45. package/dist/components/popover.d.ts +0 -10
  46. package/dist/components/popover.js +7 -16
  47. package/dist/components/popover.mjs +1 -1
  48. package/dist/components/radio.d.ts +6 -11
  49. package/dist/components/radio.js +16 -27
  50. package/dist/components/radio.mjs +1 -5
  51. package/dist/components/snippet.d.ts +1 -11
  52. package/dist/components/snippet.js +10 -24
  53. package/dist/components/snippet.mjs +1 -1
  54. package/dist/components/toggle.d.ts +22 -27
  55. package/dist/components/toggle.js +69 -54
  56. package/dist/components/toggle.mjs +1 -5
  57. package/dist/components/user.d.ts +15 -19
  58. package/dist/components/user.js +9 -20
  59. package/dist/components/user.mjs +1 -5
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.js +274 -222
  62. package/dist/index.mjs +40 -40
  63. package/dist/plugin.mjs +2 -2
  64. package/package.json +1 -1
  65. package/dist/chunk-6KZCW2WL.mjs +0 -25
  66. package/dist/chunk-JQ2VRKTU.mjs +0 -155
  67. package/dist/{chunk-WS27WNYH.mjs → chunk-XSFNJVJG.mjs} +3 -3
@@ -1,7 +1,3 @@
1
- import {
2
- ringClasses
3
- } from "./chunk-INZK6TTL.mjs";
4
-
5
1
  // src/components/dropdown-item.ts
6
2
  import { tv } from "tailwind-variants";
7
3
  var dropdownItem = tv({
@@ -20,7 +16,13 @@ var dropdownItem = tv({
20
16
  "box-border",
21
17
  "rounded-lg",
22
18
  "outline-none",
23
- "cursor-pointer"
19
+ "cursor-pointer",
20
+ "data-[focus-visible=true]:outline-none",
21
+ "data-[focus-visible=true]:ring-2",
22
+ "data-[focus-visible=true]:ring-primary",
23
+ "data-[focus-visible=true]:ring-offset-2",
24
+ "data-[focus-visible=true]:ring-offset-background",
25
+ "data-[focus-visible=true]:dark:ring-offset-background-content1"
24
26
  ],
25
27
  wrapper: "w-full flex flex-col items-start justify-center",
26
28
  title: "flex-1",
@@ -51,13 +53,13 @@ var dropdownItem = tv({
51
53
  base: "bg-transparent"
52
54
  },
53
55
  faded: {
54
- base: "border border-transparent hover:border-neutral hover:bg-neutral-100"
56
+ base: "border border-transparent hover:border-neutral data-[hover=true]:bg-neutral-100"
55
57
  },
56
58
  flat: {
57
59
  base: ""
58
60
  },
59
61
  shadow: {
60
- base: "hover:shadow-lg"
62
+ base: "data-[hover=true]:shadow-lg"
61
63
  }
62
64
  },
63
65
  color: {
@@ -87,11 +89,6 @@ var dropdownItem = tv({
87
89
  base: "opacity-50 pointer-events-none"
88
90
  }
89
91
  },
90
- isFocusVisible: {
91
- true: {
92
- base: [...ringClasses]
93
- }
94
- },
95
92
  disableAnimation: {
96
93
  true: {},
97
94
  false: {}
@@ -107,252 +104,252 @@ var dropdownItem = tv({
107
104
  variant: "solid",
108
105
  color: "neutral",
109
106
  class: {
110
- base: "hover:bg-neutral hover:text-neutral-contrastText"
107
+ base: "data-[hover=true]:bg-neutral data-[hover=true]:text-neutral-contrastText"
111
108
  }
112
109
  },
113
110
  {
114
111
  variant: "solid",
115
112
  color: "primary",
116
113
  class: {
117
- base: "hover:bg-primary hover:text-primary-contrastText"
114
+ base: "data-[hover=true]:bg-primary data-[hover=true]:text-primary-contrastText"
118
115
  }
119
116
  },
120
117
  {
121
118
  variant: "solid",
122
119
  color: "secondary",
123
120
  class: {
124
- base: "hover:bg-secondary hover:text-secondary-contrastText"
121
+ base: "data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-contrastText"
125
122
  }
126
123
  },
127
124
  {
128
125
  variant: "solid",
129
126
  color: "success",
130
127
  class: {
131
- base: "hover:bg-success hover:text-success-contrastText"
128
+ base: "data-[hover=true]:bg-success data-[hover=true]:text-success-contrastText"
132
129
  }
133
130
  },
134
131
  {
135
132
  variant: "solid",
136
133
  color: "warning",
137
134
  class: {
138
- base: "hover:bg-warning hover:text-warning-contrastText"
135
+ base: "data-[hover=true]:bg-warning data-[hover=true]:text-warning-contrastText"
139
136
  }
140
137
  },
141
138
  {
142
139
  variant: "solid",
143
140
  color: "danger",
144
141
  class: {
145
- base: "hover:bg-danger hover:text-danger-contrastText"
142
+ base: "data-[hover=true]:bg-danger data-[hover=true]:text-danger-contrastText"
146
143
  }
147
144
  },
148
145
  {
149
146
  variant: "shadow",
150
147
  color: "neutral",
151
148
  class: {
152
- base: "hover:shadow-neutral/50 hover:bg-neutral hover:text-neutral-contrastText"
149
+ base: "data-[hover=true]:shadow-neutral/50 data-[hover=true]:bg-neutral data-[hover=true]:text-neutral-contrastText"
153
150
  }
154
151
  },
155
152
  {
156
153
  variant: "shadow",
157
154
  color: "primary",
158
155
  class: {
159
- base: "hover:shadow-primary/30 hover:bg-primary hover:text-primary-contrastText"
156
+ base: "data-[hover=true]:shadow-primary/30 data-[hover=true]:bg-primary data-[hover=true]:text-primary-contrastText"
160
157
  }
161
158
  },
162
159
  {
163
160
  variant: "shadow",
164
161
  color: "secondary",
165
162
  class: {
166
- base: "hover:shadow-secondary/30 hover:bg-secondary hover:text-secondary-contrastText"
163
+ base: "data-[hover=true]:shadow-secondary/30 data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-contrastText"
167
164
  }
168
165
  },
169
166
  {
170
167
  variant: "shadow",
171
168
  color: "success",
172
169
  class: {
173
- base: "hover:shadow-success/30 hover:bg-success hover:text-success-contrastText"
170
+ base: "data-[hover=true]:shadow-success/30 data-[hover=true]:bg-success data-[hover=true]:text-success-contrastText"
174
171
  }
175
172
  },
176
173
  {
177
174
  variant: "shadow",
178
175
  color: "warning",
179
176
  class: {
180
- base: "hover:shadow-warning/30 hover:bg-warning hover:text-warning-contrastText"
177
+ base: "data-[hover=true]:shadow-warning/30 data-[hover=true]:bg-warning data-[hover=true]:text-warning-contrastText"
181
178
  }
182
179
  },
183
180
  {
184
181
  variant: "shadow",
185
182
  color: "danger",
186
183
  class: {
187
- base: "hover:shadow-danger/30 hover:bg-danger hover:text-danger-contrastText"
184
+ base: "data-[hover=true]:shadow-danger/30 data-[hover=true]:bg-danger data-[hover=true]:text-danger-contrastText"
188
185
  }
189
186
  },
190
187
  {
191
188
  variant: "bordered",
192
189
  color: "neutral",
193
190
  class: {
194
- base: "hover:border-neutral"
191
+ base: "data-[hover=true]:border-neutral"
195
192
  }
196
193
  },
197
194
  {
198
195
  variant: "bordered",
199
196
  color: "primary",
200
197
  class: {
201
- base: "hover:border-primary hover:text-primary"
198
+ base: "data-[hover=true]:border-primary data-[hover=true]:text-primary"
202
199
  }
203
200
  },
204
201
  {
205
202
  variant: "bordered",
206
203
  color: "secondary",
207
204
  class: {
208
- base: "hover:border-secondary hover:text-secondary"
205
+ base: "data-[hover=true]:border-secondary data-[hover=true]:text-secondary"
209
206
  }
210
207
  },
211
208
  {
212
209
  variant: "bordered",
213
210
  color: "success",
214
211
  class: {
215
- base: "hover:border-success hover:text-success"
212
+ base: "data-[hover=true]:border-success data-[hover=true]:text-success"
216
213
  }
217
214
  },
218
215
  {
219
216
  variant: "bordered",
220
217
  color: "warning",
221
218
  class: {
222
- base: "hover:border-warning hover:text-warning"
219
+ base: "data-[hover=true]:border-warning data-[hover=true]:text-warning"
223
220
  }
224
221
  },
225
222
  {
226
223
  variant: "bordered",
227
224
  color: "danger",
228
225
  class: {
229
- base: "hover:border-danger hover:text-danger"
226
+ base: "data-[hover=true]:border-danger data-[hover=true]:text-danger"
230
227
  }
231
228
  },
232
229
  {
233
230
  variant: "flat",
234
231
  color: "neutral",
235
232
  class: {
236
- base: "hover:bg-neutral-100 hover:text-neutral-contrastText"
233
+ base: "data-[hover=true]:bg-neutral-100 data-[hover=true]:text-neutral-contrastText"
237
234
  }
238
235
  },
239
236
  {
240
237
  variant: "flat",
241
238
  color: "primary",
242
239
  class: {
243
- base: "hover:bg-primary-50 hover:text-primary"
240
+ base: "data-[hover=true]:bg-primary-50 data-[hover=true]:text-primary"
244
241
  }
245
242
  },
246
243
  {
247
244
  variant: "flat",
248
245
  color: "secondary",
249
246
  class: {
250
- base: "hover:bg-secondary-100 hover:text-secondary"
247
+ base: "data-[hover=true]:bg-secondary-100 data-[hover=true]:text-secondary"
251
248
  }
252
249
  },
253
250
  {
254
251
  variant: "flat",
255
252
  color: "success",
256
253
  class: {
257
- base: "hover:bg-success-50 hover:text-success"
254
+ base: "data-[hover=true]:bg-success-50 data-[hover=true]:text-success"
258
255
  }
259
256
  },
260
257
  {
261
258
  variant: "flat",
262
259
  color: "warning",
263
260
  class: {
264
- base: "hover:bg-warning-50 hover:text-warning"
261
+ base: "data-[hover=true]:bg-warning-50 data-[hover=true]:text-warning"
265
262
  }
266
263
  },
267
264
  {
268
265
  variant: "flat",
269
266
  color: "danger",
270
267
  class: {
271
- base: "hover:bg-danger-50 hover:text-danger"
268
+ base: "data-[hover=true]:bg-danger-50 data-[hover=true]:text-danger"
272
269
  }
273
270
  },
274
271
  {
275
272
  variant: "faded",
276
273
  color: "neutral",
277
274
  class: {
278
- base: "hover:text-neutral-contrastText"
275
+ base: "data-[hover=true]:text-neutral-contrastText"
279
276
  }
280
277
  },
281
278
  {
282
279
  variant: "faded",
283
280
  color: "primary",
284
281
  class: {
285
- base: "hover:text-primary"
282
+ base: "data-[hover=true]:text-primary"
286
283
  }
287
284
  },
288
285
  {
289
286
  variant: "faded",
290
287
  color: "secondary",
291
288
  class: {
292
- base: "hover:text-secondary"
289
+ base: "data-[hover=true]:text-secondary"
293
290
  }
294
291
  },
295
292
  {
296
293
  variant: "faded",
297
294
  color: "success",
298
295
  class: {
299
- base: "hover:text-success"
296
+ base: "data-[hover=true]:text-success"
300
297
  }
301
298
  },
302
299
  {
303
300
  variant: "faded",
304
301
  color: "warning",
305
302
  class: {
306
- base: "hover:text-warning"
303
+ base: "data-[hover=true]:text-warning"
307
304
  }
308
305
  },
309
306
  {
310
307
  variant: "faded",
311
308
  color: "danger",
312
309
  class: {
313
- base: "hover:text-danger"
310
+ base: "data-[hover=true]:text-danger"
314
311
  }
315
312
  },
316
313
  {
317
314
  variant: "light",
318
315
  color: "neutral",
319
316
  class: {
320
- base: "hover:text-neutral-500"
317
+ base: "data-[hover=true]:text-neutral-500"
321
318
  }
322
319
  },
323
320
  {
324
321
  variant: "light",
325
322
  color: "primary",
326
323
  class: {
327
- base: "hover:text-primary"
324
+ base: "data-[hover=true]:text-primary"
328
325
  }
329
326
  },
330
327
  {
331
328
  variant: "light",
332
329
  color: "secondary",
333
330
  class: {
334
- base: "hover:text-secondary"
331
+ base: "data-[hover=true]:text-secondary"
335
332
  }
336
333
  },
337
334
  {
338
335
  variant: "light",
339
336
  color: "success",
340
337
  class: {
341
- base: "hover:text-success"
338
+ base: "data-[hover=true]:text-success"
342
339
  }
343
340
  },
344
341
  {
345
342
  variant: "light",
346
343
  color: "warning",
347
344
  class: {
348
- base: "hover:text-warning"
345
+ base: "data-[hover=true]:text-warning"
349
346
  }
350
347
  },
351
348
  {
352
349
  variant: "light",
353
350
  color: "danger",
354
351
  class: {
355
- base: "hover:text-danger"
352
+ base: "data-[hover=true]:text-danger"
356
353
  }
357
354
  }
358
355
  ]
@@ -1,9 +1,6 @@
1
1
  import {
2
2
  colorVariants
3
3
  } from "./chunk-LGGZKBOO.mjs";
4
- import {
5
- ringClasses
6
- } from "./chunk-INZK6TTL.mjs";
7
4
 
8
5
  // src/components/popover.ts
9
6
  import { tv } from "tailwind-variants";
@@ -20,7 +17,13 @@ var popover = tv({
20
17
  "px-4",
21
18
  "py-1",
22
19
  "text-base",
23
- "!outline-none"
20
+ "!outline-none",
21
+ "data-[focus-visible=true]:outline-none",
22
+ "data-[focus-visible=true]:ring-2",
23
+ "data-[focus-visible=true]:ring-primary",
24
+ "data-[focus-visible=true]:ring-offset-2",
25
+ "data-[focus-visible=true]:ring-offset-background",
26
+ "data-[focus-visible=true]:dark:ring-offset-background-dark"
24
27
  ],
25
28
  trigger: ["z-10"],
26
29
  backdrop: ["hidden"],
@@ -97,11 +100,6 @@ var popover = tv({
97
100
  backdrop: "backdrop-blur-sm backdrop-saturate-150 bg-black/20"
98
101
  }
99
102
  },
100
- isFocusVisible: {
101
- true: {
102
- base: [...ringClasses]
103
- }
104
- },
105
103
  triggerScaleOnOpen: {
106
104
  true: {
107
105
  trigger: ["aria-expanded:scale-95", "aria-expanded:opacity-70", "subpixel-antialiased"]
@@ -1,12 +1,8 @@
1
- import {
2
- ringClasses
3
- } from "./chunk-INZK6TTL.mjs";
4
-
5
1
  // src/components/radio.ts
6
2
  import { tv } from "tailwind-variants";
7
3
  var radio = tv({
8
4
  slots: {
9
- base: "relative max-w-fit inline-flex items-center justify-start cursor-pointer",
5
+ base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer",
10
6
  wrapper: [
11
7
  "relative",
12
8
  "inline-flex",
@@ -18,7 +14,13 @@ var radio = tv({
18
14
  "border-2",
19
15
  "box-border",
20
16
  "border-neutral",
21
- "data-[hover-unchecked=true]:bg-neutral-100"
17
+ "group-data-[hover-unchecked=true]:bg-neutral-100",
18
+ "group-data-[focus-visible=true]:outline-none",
19
+ "group-data-[focus-visible=true]:ring-2",
20
+ "group-data-[focus-visible=true]:!ring-primary",
21
+ "group-data-[focus-visible=true]:ring-offset-2",
22
+ "group-data-[focus-visible=true]:ring-offset-background",
23
+ "group-data-[focus-visible=true]:dark:ring-offset-background-dark"
22
24
  ],
23
25
  labelWrapper: "flex flex-col ml-1",
24
26
  control: [
@@ -28,8 +30,8 @@ var radio = tv({
28
30
  "opacity-0",
29
31
  "scale-0",
30
32
  "origin-center",
31
- "data-[checked=true]:opacity-100",
32
- "data-[checked=true]:scale-100"
33
+ "group-data-[checked=true]:opacity-100",
34
+ "group-data-[checked=true]:scale-100"
33
35
  ],
34
36
  label: "relative text-foreground select-none",
35
37
  description: "relative text-neutral-400"
@@ -38,27 +40,27 @@ var radio = tv({
38
40
  color: {
39
41
  neutral: {
40
42
  control: "bg-neutral-500 text-neutral-contrastText",
41
- wrapper: "data-[checked=true]:border-neutral-500"
43
+ wrapper: "group-data-[checked=true]:border-neutral-500"
42
44
  },
43
45
  primary: {
44
46
  control: "bg-primary text-primary-contrastText",
45
- wrapper: "data-[checked=true]:border-primary"
47
+ wrapper: "group-data-[checked=true]:border-primary"
46
48
  },
47
49
  secondary: {
48
50
  control: "bg-secondary text-secondary-contrastText",
49
- wrapper: "data-[checked=true]:border-secondary"
51
+ wrapper: "group-data-[checked=true]:border-secondary"
50
52
  },
51
53
  success: {
52
54
  control: "bg-success text-success-contrastText",
53
- wrapper: "data-[checked=true]:border-success"
55
+ wrapper: "group-data-[checked=true]:border-success"
54
56
  },
55
57
  warning: {
56
58
  control: "bg-warning text-warning-contrastText",
57
- wrapper: "data-[checked=true]:border-warning"
59
+ wrapper: "group-data-[checked=true]:border-warning"
58
60
  },
59
61
  danger: {
60
62
  control: "bg-danger text-danger-contrastText",
61
- wrapper: "data-[checked=true]:border-danger"
63
+ wrapper: "group-data-[checked=true]:border-danger"
62
64
  }
63
65
  },
64
66
  size: {
@@ -141,11 +143,6 @@ var radio = tv({
141
143
  description: "text-danger-300"
142
144
  }
143
145
  },
144
- isFocusVisible: {
145
- true: {
146
- wrapper: [...ringClasses]
147
- }
148
- },
149
146
  disableAnimation: {
150
147
  true: {},
151
148
  false: {
@@ -1,7 +1,3 @@
1
- import {
2
- ringClasses
3
- } from "./chunk-INZK6TTL.mjs";
4
-
5
1
  // src/components/card.ts
6
2
  import { tv } from "tailwind-variants";
7
3
  var card = tv({
@@ -17,7 +13,13 @@ var card = tv({
17
13
  "text-foreground",
18
14
  "box-border",
19
15
  "dark:bg-content1",
20
- "border border-neutral-100"
16
+ "border border-neutral-100",
17
+ "data-[focus-visible=true]:outline-none",
18
+ "data-[focus-visible=true]:ring-2",
19
+ "data-[focus-visible=true]:ring-primary",
20
+ "data-[focus-visible=true]:ring-offset-2",
21
+ "data-[focus-visible=true]:ring-offset-background",
22
+ "data-[focus-visible=true]:dark:ring-offset-background-dark"
21
23
  ],
22
24
  header: [
23
25
  "flex",
@@ -135,17 +137,12 @@ var card = tv({
135
137
  },
136
138
  isHoverable: {
137
139
  true: {
138
- base: "hover:bg-content2 dark:hover:bg-content2"
140
+ base: "data-[hover=true]:bg-content2 dark:data-[hover=true]:bg-content2"
139
141
  }
140
142
  },
141
143
  isPressable: {
142
144
  true: { base: "cursor-pointer" }
143
145
  },
144
- isFocusVisible: {
145
- true: {
146
- base: [...ringClasses]
147
- }
148
- },
149
146
  isFooterBlurred: {
150
147
  true: {
151
148
  footer: "backdrop-blur-xl backdrop-saturate-200"
@@ -165,7 +162,7 @@ var card = tv({
165
162
  {
166
163
  isPressable: true,
167
164
  disableAnimation: false,
168
- class: "active:scale-95"
165
+ class: "data-[pressed=true]:scale-95"
169
166
  }
170
167
  ],
171
168
  defaultVariants: {
@@ -174,7 +171,6 @@ var card = tv({
174
171
  fullWidth: false,
175
172
  isHoverable: false,
176
173
  isPressable: false,
177
- isFocusVisible: false,
178
174
  isDisabled: false,
179
175
  disableAnimation: false,
180
176
  isFooterBlurred: false
@@ -0,0 +1,178 @@
1
+ // src/components/toggle.ts
2
+ import { tv } from "tailwind-variants";
3
+ var toggle = tv({
4
+ slots: {
5
+ base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer touch-none",
6
+ wrapper: [
7
+ "px-1",
8
+ "relative",
9
+ "inline-flex",
10
+ "items-center",
11
+ "justify-start",
12
+ "flex-shrink-0",
13
+ "overflow-hidden",
14
+ "bg-neutral-200",
15
+ "rounded-full",
16
+ "group-data-[focus-visible]:outline-none",
17
+ "group-data-[focus-visible]:ring-2",
18
+ "group-data-[focus-visible]:!ring-primary",
19
+ "group-data-[focus-visible]:ring-offset-2",
20
+ "group-data-[focus-visible]:ring-offset-background",
21
+ "group-data-[focus-visible]:dark:ring-offset-background-dark"
22
+ ],
23
+ thumb: [
24
+ "z-10",
25
+ "flex",
26
+ "items-center",
27
+ "justify-center",
28
+ "bg-white",
29
+ "shadow-sm",
30
+ "rounded-full",
31
+ "origin-right"
32
+ ],
33
+ startIcon: "z-0 absolute left-1.5 text-current",
34
+ endIcon: "z-0 absolute right-1.5 text-neutral-600",
35
+ thumbIcon: "text-black",
36
+ label: "relative text-foreground select-none"
37
+ },
38
+ variants: {
39
+ color: {
40
+ neutral: {
41
+ wrapper: [
42
+ "group-data-[checked=true]:bg-neutral-400",
43
+ "group-data-[checked=true]:text-neutral-contrastText"
44
+ ]
45
+ },
46
+ primary: {
47
+ wrapper: [
48
+ "group-data-[checked=true]:bg-primary",
49
+ "group-data-[checked=true]:text-primary-contrastText"
50
+ ]
51
+ },
52
+ secondary: {
53
+ wrapper: [
54
+ "group-data-[checked=true]:bg-secondary",
55
+ "group-data-[checked=true]:text-secondary-contrastText"
56
+ ]
57
+ },
58
+ success: {
59
+ wrapper: [
60
+ "group-data-[checked=true]:bg-success",
61
+ "group-data-[checked=true]:text-success-contrastText"
62
+ ]
63
+ },
64
+ warning: {
65
+ wrapper: [
66
+ "group-data-[checked=true]:bg-warning",
67
+ "group-data-[checked=true]:text-warning-contrastText"
68
+ ]
69
+ },
70
+ danger: {
71
+ wrapper: [
72
+ "group-data-[checked=true]:bg-danger",
73
+ "data-[checked=true]:text-danger-contrastText"
74
+ ]
75
+ }
76
+ },
77
+ size: {
78
+ xs: {
79
+ wrapper: "w-8 h-5 mr-1",
80
+ thumb: [
81
+ "w-3 h-3 text-[0.6rem]",
82
+ "group-data-[checked=true]:ml-3",
83
+ "group-data-[pressed=true]:w-4",
84
+ "group-data-[checked]:group-data-[pressed]:ml-2"
85
+ ],
86
+ startIcon: "text-[0.6rem] left-1",
87
+ endIcon: "text-[0.6rem] right-1",
88
+ label: "text-sm"
89
+ },
90
+ sm: {
91
+ wrapper: "w-10 h-6 mr-2",
92
+ thumb: [
93
+ "w-4 h-4 text-xs",
94
+ "group-data-[checked=true]:ml-4",
95
+ "group-data-[pressed=true]:w-5",
96
+ "group-data-[checked]:group-data-[pressed]:ml-4"
97
+ ],
98
+ endIcon: "text-xs",
99
+ startIcon: "text-xs",
100
+ label: "text-base"
101
+ },
102
+ md: {
103
+ wrapper: "w-12 h-7 mr-2",
104
+ thumb: [
105
+ "w-5 h-5 text-sm",
106
+ "group-data-[checked=true]:ml-5",
107
+ "group-data-[pressed=true]:w-6",
108
+ "group-data-[checked]:group-data-[pressed]:ml-4"
109
+ ],
110
+ endIcon: "text-sm",
111
+ startIcon: "text-sm",
112
+ label: "text-lg"
113
+ },
114
+ lg: {
115
+ wrapper: "w-14 h-8 mr-2",
116
+ thumb: [
117
+ "w-6 h-6 text-base",
118
+ "group-data-[checked=true]:ml-6",
119
+ "group-data-[pressed=true]:w-7",
120
+ "group-data-[checked]:group-data-[pressed]:ml-5"
121
+ ],
122
+ endIcon: "text-base",
123
+ startIcon: "text-base",
124
+ label: "text-xl"
125
+ },
126
+ xl: {
127
+ wrapper: "w-16 h-9 mr-2",
128
+ thumb: [
129
+ "w-7 h-7 text-lg",
130
+ "group-data-[checked=true]:ml-7",
131
+ "group-data-[pressed=true]:w-8",
132
+ "group-data-[checked]:group-data-[pressed]:ml-6"
133
+ ],
134
+ endIcon: "text-base",
135
+ startIcon: "text-base",
136
+ label: "text-xl"
137
+ }
138
+ },
139
+ isDisabled: {
140
+ true: {
141
+ base: "opacity-50 pointer-events-none"
142
+ }
143
+ },
144
+ disableAnimation: {
145
+ true: {
146
+ wrapper: "transition-none",
147
+ thumb: "transition-none"
148
+ },
149
+ false: {
150
+ wrapper: "transition-background !duration-500",
151
+ thumb: "transition-all !ease-soft-spring !duration-500",
152
+ startIcon: [
153
+ "opacity-0",
154
+ "scale-50",
155
+ "transition-transform-opacity",
156
+ "group-data-[checked=true]:scale-100",
157
+ "group-data-[checked=true]:opacity-100"
158
+ ],
159
+ endIcon: [
160
+ "opacity-100",
161
+ "transition-transform-opacity",
162
+ "group-data-[checked=true]:translate-x-3",
163
+ "group-data-[checked=true]:opacity-0"
164
+ ]
165
+ }
166
+ }
167
+ },
168
+ defaultVariants: {
169
+ color: "primary",
170
+ size: "md",
171
+ isDisabled: false,
172
+ disableAnimation: false
173
+ }
174
+ });
175
+
176
+ export {
177
+ toggle
178
+ };