@nextui-org/theme 2.0.4 → 2.1.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 (36) hide show
  1. package/dist/chunk-4JBYJQSP.mjs +36 -0
  2. package/dist/chunk-AYWH7THQ.mjs +606 -0
  3. package/dist/{chunk-U3S42JDF.mjs → chunk-FTF3KQBD.mjs} +2 -0
  4. package/dist/{chunk-Z6QW3RI5.mjs → chunk-PBGVMEDL.mjs} +70 -142
  5. package/dist/{chunk-PW52XQD7.mjs → chunk-RYOZQSNI.mjs} +4 -1
  6. package/dist/chunk-YJLQTC7L.mjs +0 -0
  7. package/dist/chunk-YKWIBFFV.mjs +460 -0
  8. package/dist/components/index.d.ts +3 -0
  9. package/dist/components/index.js +1161 -142
  10. package/dist/components/index.mjs +40 -20
  11. package/dist/components/input.d.ts +28 -60
  12. package/dist/components/input.js +70 -142
  13. package/dist/components/input.mjs +1 -1
  14. package/dist/components/listbox.d.ts +3 -0
  15. package/dist/components/listbox.js +582 -0
  16. package/dist/components/listbox.mjs +17 -0
  17. package/dist/components/menu.d.ts +284 -0
  18. package/dist/components/menu.js +582 -0
  19. package/dist/components/menu.mjs +16 -0
  20. package/dist/components/popover.js +2 -0
  21. package/dist/components/popover.mjs +1 -1
  22. package/dist/components/scroll-shadow.d.ts +55 -0
  23. package/dist/components/scroll-shadow.js +150 -0
  24. package/dist/components/scroll-shadow.mjs +8 -0
  25. package/dist/components/select.d.ts +553 -0
  26. package/dist/components/select.js +726 -0
  27. package/dist/components/select.mjs +12 -0
  28. package/dist/index.d.ts +3 -0
  29. package/dist/index.js +1308 -286
  30. package/dist/index.mjs +43 -23
  31. package/dist/plugin.js +3 -0
  32. package/dist/plugin.mjs +3 -3
  33. package/dist/utilities/index.mjs +2 -2
  34. package/package.json +8 -8
  35. package/dist/{chunk-PRWEADY4.mjs → chunk-RH7YHIQY.mjs} +0 -0
  36. package/dist/{chunk-DYIIRM5B.mjs → chunk-Y32IWEMZ.mjs} +3 -3
@@ -0,0 +1,460 @@
1
+ import {
2
+ tv
3
+ } from "./chunk-6AEINX52.mjs";
4
+ import {
5
+ dataFocusVisibleClasses
6
+ } from "./chunk-T7JNS25F.mjs";
7
+
8
+ // src/components/menu.ts
9
+ var menu = tv({
10
+ base: "w-full flex flex-col gap-0.5 p-1 outline-none"
11
+ });
12
+ var menuItem = tv({
13
+ slots: {
14
+ base: [
15
+ "flex",
16
+ "group",
17
+ "gap-2",
18
+ "items-center",
19
+ "justify-between",
20
+ "relative",
21
+ "px-2",
22
+ "py-1.5",
23
+ "w-full",
24
+ "h-full",
25
+ "box-border",
26
+ "rounded-small",
27
+ "subpixel-antialiased",
28
+ "outline-none",
29
+ "cursor-pointer",
30
+ "tap-highlight-transparent",
31
+ ...dataFocusVisibleClasses,
32
+ "data-[focus-visible=true]:dark:ring-offset-background-content1"
33
+ ],
34
+ wrapper: "w-full flex flex-col items-start justify-center",
35
+ title: "flex-1 text-small font-normal truncate",
36
+ description: ["w-full", "text-tiny", "text-foreground-500", "group-hover:text-current"],
37
+ selectedIcon: ["text-inherit", "w-3", "h-3", "flex-shrink-0"],
38
+ shortcut: [
39
+ "px-1",
40
+ "py-0.5",
41
+ "rounded",
42
+ "font-sans",
43
+ "text-foreground-500",
44
+ "text-tiny",
45
+ "border-small",
46
+ "border-default-300",
47
+ "group-hover:border-current"
48
+ ]
49
+ },
50
+ variants: {
51
+ variant: {
52
+ solid: {
53
+ base: ""
54
+ },
55
+ bordered: {
56
+ base: "border-medium border-transparent bg-transparent"
57
+ },
58
+ light: {
59
+ base: "bg-transparent"
60
+ },
61
+ faded: {
62
+ base: [
63
+ "border-small border-transparent hover:border-default data-[hover=true]:bg-default-100",
64
+ "data-[selectable=true]:focus:border-default data-[selectable=true]:focus:bg-default-100"
65
+ ]
66
+ },
67
+ flat: {
68
+ base: ""
69
+ },
70
+ shadow: {
71
+ base: "data-[hover=true]:shadow-lg"
72
+ }
73
+ },
74
+ color: {
75
+ default: {},
76
+ primary: {},
77
+ secondary: {},
78
+ success: {},
79
+ warning: {},
80
+ danger: {}
81
+ },
82
+ showDivider: {
83
+ true: {
84
+ base: [
85
+ "mb-1.5",
86
+ "after:content-['']",
87
+ "after:absolute",
88
+ "after:-bottom-1",
89
+ "after:left-0",
90
+ "after:right-0",
91
+ "after:h-divider",
92
+ "after:bg-divider"
93
+ ]
94
+ },
95
+ false: {}
96
+ },
97
+ isDisabled: {
98
+ true: {
99
+ base: "opacity-disabled pointer-events-none"
100
+ }
101
+ },
102
+ disableAnimation: {
103
+ true: {},
104
+ false: {}
105
+ }
106
+ },
107
+ defaultVariants: {
108
+ variant: "solid",
109
+ color: "default",
110
+ disableAnimation: false,
111
+ showDivider: false
112
+ },
113
+ compoundVariants: [
114
+ {
115
+ variant: "solid",
116
+ color: "default",
117
+ class: {
118
+ base: [
119
+ "data-[hover=true]:bg-default",
120
+ "data-[hover=true]:text-default-foreground",
121
+ "data-[selectable=true]:focus:bg-default",
122
+ "data-[selectable=true]:focus:text-default-foreground"
123
+ ]
124
+ }
125
+ },
126
+ {
127
+ variant: "solid",
128
+ color: "primary",
129
+ class: {
130
+ base: [
131
+ "data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground",
132
+ "data-[selectable=true]:focus:bg-primary data-[selectable=true]:focus:text-primary-foreground"
133
+ ]
134
+ }
135
+ },
136
+ {
137
+ variant: "solid",
138
+ color: "secondary",
139
+ class: {
140
+ base: [
141
+ "data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground",
142
+ "data-[selectable=true]:focus:bg-secondary data-[selectable=true]:focus:text-secondary-foreground"
143
+ ]
144
+ }
145
+ },
146
+ {
147
+ variant: "solid",
148
+ color: "success",
149
+ class: {
150
+ base: [
151
+ "data-[hover=true]:bg-success data-[hover=true]:text-success-foreground",
152
+ "data-[selectable=true]:focus:bg-success data-[selectable=true]:focus:text-success-foreground"
153
+ ]
154
+ }
155
+ },
156
+ {
157
+ variant: "solid",
158
+ color: "warning",
159
+ class: {
160
+ base: [
161
+ "data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground",
162
+ "data-[selectable=true]:focus:bg-warning data-[selectable=true]:focus:text-warning-foreground"
163
+ ]
164
+ }
165
+ },
166
+ {
167
+ variant: "solid",
168
+ color: "danger",
169
+ class: {
170
+ base: [
171
+ "data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground",
172
+ "data-[selectable=true]:focus:bg-danger data-[selectable=true]:focus:text-danger-foreground"
173
+ ]
174
+ }
175
+ },
176
+ {
177
+ variant: "shadow",
178
+ color: "default",
179
+ class: {
180
+ base: [
181
+ "data-[hover=true]:shadow-default/50 data-[hover=true]:bg-default data-[hover=true]:text-default-foreground",
182
+ "data-[selectable=true]:focus:shadow-default/50 data-[selectable=true]:focus:bg-default data-[selectable=true]:focus:text-default-foreground"
183
+ ]
184
+ }
185
+ },
186
+ {
187
+ variant: "shadow",
188
+ color: "primary",
189
+ class: {
190
+ base: [
191
+ "data-[hover=true]:shadow-primary/30 data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground",
192
+ "data-[selectable=true]:focus:shadow-primary/30 data-[selectable=true]:focus:bg-primary data-[selectable=true]:focus:text-primary-foreground"
193
+ ]
194
+ }
195
+ },
196
+ {
197
+ variant: "shadow",
198
+ color: "secondary",
199
+ class: {
200
+ base: [
201
+ "data-[hover=true]:shadow-secondary/30 data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground",
202
+ "data-[selectable=true]:focus:shadow-secondary/30 data-[selectable=true]:focus:bg-secondary data-[selectable=true]:focus:text-secondary-foreground"
203
+ ]
204
+ }
205
+ },
206
+ {
207
+ variant: "shadow",
208
+ color: "success",
209
+ class: {
210
+ base: [
211
+ "data-[hover=true]:shadow-success/30 data-[hover=true]:bg-success data-[hover=true]:text-success-foreground",
212
+ "data-[selectable=true]:focus:shadow-success/30 data-[selectable=true]:focus:bg-success data-[selectable=true]:focus:text-success-foreground"
213
+ ]
214
+ }
215
+ },
216
+ {
217
+ variant: "shadow",
218
+ color: "warning",
219
+ class: {
220
+ base: [
221
+ "data-[hover=true]:shadow-warning/30 data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground",
222
+ "data-[selectable=true]:focus:shadow-warning/30 data-[selectable=true]:focus:bg-warning data-[selectable=true]:focus:text-warning-foreground"
223
+ ]
224
+ }
225
+ },
226
+ {
227
+ variant: "shadow",
228
+ color: "danger",
229
+ class: {
230
+ base: [
231
+ "data-[hover=true]:shadow-danger/30 data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground",
232
+ "data-[selectable=true]:focus:shadow-danger/30 data-[selectable=true]:focus:bg-danger data-[selectable=true]:focus:text-danger-foreground"
233
+ ]
234
+ }
235
+ },
236
+ {
237
+ variant: "bordered",
238
+ color: "default",
239
+ class: {
240
+ base: ["data-[hover=true]:border-default", "data-[selectable=true]:focus:border-default"]
241
+ }
242
+ },
243
+ {
244
+ variant: "bordered",
245
+ color: "primary",
246
+ class: {
247
+ base: [
248
+ "data-[hover=true]:border-primary data-[hover=true]:text-primary",
249
+ "data-[selectable=true]:focus:border-primary data-[selectable=true]:focus:text-primary"
250
+ ]
251
+ }
252
+ },
253
+ {
254
+ variant: "bordered",
255
+ color: "secondary",
256
+ class: {
257
+ base: [
258
+ "data-[hover=true]:border-secondary data-[hover=true]:text-secondary",
259
+ "data-[selectable=true]:focus:border-secondary data-[selectable=true]:focus:text-secondary"
260
+ ]
261
+ }
262
+ },
263
+ {
264
+ variant: "bordered",
265
+ color: "success",
266
+ class: {
267
+ base: [
268
+ "data-[hover=true]:border-success data-[hover=true]:text-success",
269
+ "data-[selectable=true]:focus:border-success data-[selectable=true]:focus:text-success"
270
+ ]
271
+ }
272
+ },
273
+ {
274
+ variant: "bordered",
275
+ color: "warning",
276
+ class: {
277
+ base: [
278
+ "data-[hover=true]:border-warning data-[hover=true]:text-warning",
279
+ "data-[selectable=true]:focus:border-warning data-[selectable=true]:focus:text-warning"
280
+ ]
281
+ }
282
+ },
283
+ {
284
+ variant: "bordered",
285
+ color: "danger",
286
+ class: {
287
+ base: [
288
+ "data-[hover=true]:border-danger data-[hover=true]:text-danger",
289
+ "data-[selectable=true]:focus:border-danger data-[selectable=true]:focus:text-danger"
290
+ ]
291
+ }
292
+ },
293
+ {
294
+ variant: "flat",
295
+ color: "default",
296
+ class: {
297
+ base: [
298
+ "data-[hover=true]:bg-default/40",
299
+ "data-[hover=true]:text-default-foreground",
300
+ "data-[selectable=true]:focus:bg-default/40",
301
+ "data-[selectable=true]:focus:text-default-foreground"
302
+ ]
303
+ }
304
+ },
305
+ {
306
+ variant: "flat",
307
+ color: "primary",
308
+ class: {
309
+ base: [
310
+ "data-[hover=true]:bg-primary/20 data-[hover=true]:text-primary",
311
+ "data-[selectable=true]:focus:bg-primary/20 data-[selectable=true]:focus:text-primary"
312
+ ]
313
+ }
314
+ },
315
+ {
316
+ variant: "flat",
317
+ color: "secondary",
318
+ class: {
319
+ base: [
320
+ "data-[hover=true]:bg-secondary/20 data-[hover=true]:text-secondary",
321
+ "data-[selectable=true]:focus:bg-secondary/20 data-[selectable=true]:focus:text-secondary"
322
+ ]
323
+ }
324
+ },
325
+ {
326
+ variant: "flat",
327
+ color: "success",
328
+ class: {
329
+ base: [
330
+ "data-[hover=true]:bg-success/20 data-[hover=true]:text-success",
331
+ "data-[selectable=true]:focus:bg-success/20 data-[selectable=true]:focus:text-success"
332
+ ]
333
+ }
334
+ },
335
+ {
336
+ variant: "flat",
337
+ color: "warning",
338
+ class: {
339
+ base: [
340
+ "data-[hover=true]:bg-warning/20 data-[hover=true]:text-warning",
341
+ "data-[selectable=true]:focus:bg-warning/20 data-[selectable=true]:focus:text-warning"
342
+ ]
343
+ }
344
+ },
345
+ {
346
+ variant: "flat",
347
+ color: "danger",
348
+ class: {
349
+ base: [
350
+ "data-[hover=true]:bg-danger/20 data-[hover=true]:text-danger",
351
+ "data-[selectable=true]:focus:bg-danger/20 data-[selectable=true]:focus:text-danger"
352
+ ]
353
+ }
354
+ },
355
+ {
356
+ variant: "faded",
357
+ color: "default",
358
+ class: {
359
+ base: [
360
+ "data-[hover=true]:text-default-foreground",
361
+ "data-[selectable=true]:focus:text-default-foreground"
362
+ ]
363
+ }
364
+ },
365
+ {
366
+ variant: "faded",
367
+ color: "primary",
368
+ class: {
369
+ base: ["data-[hover=true]:text-primary", "data-[selectable=true]:focus:text-primary"]
370
+ }
371
+ },
372
+ {
373
+ variant: "faded",
374
+ color: "secondary",
375
+ class: {
376
+ base: ["data-[hover=true]:text-secondary", "data-[selectable=true]:focus:text-secondary"]
377
+ }
378
+ },
379
+ {
380
+ variant: "faded",
381
+ color: "success",
382
+ class: {
383
+ base: ["data-[hover=true]:text-success", "data-[selectable=true]:focus:text-success"]
384
+ }
385
+ },
386
+ {
387
+ variant: "faded",
388
+ color: "warning",
389
+ class: {
390
+ base: ["data-[hover=true]:text-warning", "data-[selectable=true]:focus:text-warning"]
391
+ }
392
+ },
393
+ {
394
+ variant: "faded",
395
+ color: "danger",
396
+ class: {
397
+ base: ["data-[hover=true]:text-danger", "data-[selectable=true]:focus:text-danger"]
398
+ }
399
+ },
400
+ {
401
+ variant: "light",
402
+ color: "default",
403
+ class: {
404
+ base: [
405
+ "data-[hover=true]:text-default-500",
406
+ "data-[selectable=true]:focus:text-default-500"
407
+ ]
408
+ }
409
+ },
410
+ {
411
+ variant: "light",
412
+ color: "primary",
413
+ class: {
414
+ base: ["data-[hover=true]:text-primary", "data-[selectable=true]:focus:text-primary"]
415
+ }
416
+ },
417
+ {
418
+ variant: "light",
419
+ color: "secondary",
420
+ class: {
421
+ base: ["data-[hover=true]:text-secondary", "data-[selectable=true]:focus:text-secondary"]
422
+ }
423
+ },
424
+ {
425
+ variant: "light",
426
+ color: "success",
427
+ class: {
428
+ base: ["data-[hover=true]:text-success", "data-[selectable=true]:focus:text-success"]
429
+ }
430
+ },
431
+ {
432
+ variant: "light",
433
+ color: "warning",
434
+ class: {
435
+ base: ["data-[hover=true]:text-warning", "data-[selectable=true]:focus:text-warning"]
436
+ }
437
+ },
438
+ {
439
+ variant: "light",
440
+ color: "danger",
441
+ class: {
442
+ base: ["data-[hover=true]:text-danger", "data-[selectable=true]:focus:text-danger"]
443
+ }
444
+ }
445
+ ]
446
+ });
447
+ var menuSection = tv({
448
+ slots: {
449
+ base: "relative mb-2",
450
+ heading: "pl-1 text-tiny text-foreground-500",
451
+ group: "data-[has-title=true]:pt-1",
452
+ divider: "mt-2"
453
+ }
454
+ });
455
+
456
+ export {
457
+ menu,
458
+ menuItem,
459
+ menuSection
460
+ };
@@ -28,5 +28,8 @@ export { DividerVariantProps, divider } from './divider.js';
28
28
  export { KbdSlots, KbdVariantProps, kbd } from './kbd.js';
29
29
  export { TabsReturnType, TabsSlots, TabsVariantProps, tabs } from './tabs.js';
30
30
  export { SkeletonSlots, SkeletonVariantProps, skeleton } from './skeleton.js';
31
+ export { SelectSlots, SelectVariantProps, select } from './select.js';
32
+ export { MenuItemSlots as ListboxItemSlots, MenuItemVariantProps as ListboxItemVariantProps, MenuSectionSlots as ListboxSectionSlots, MenuSectionVariantProps as ListboxSectionVariantProps, MenuVariantProps as ListboxVariantProps, MenuItemSlots, MenuItemVariantProps, MenuSectionSlots, MenuSectionVariantProps, MenuVariantProps, menu as listbox, menuItem as listboxItem, menuSection as listboxSection, menu, menuItem, menuSection } from './menu.js';
33
+ export { ScrollShadowVariantProps, scrollShadow } from './scroll-shadow.js';
31
34
  import 'tailwind-variants';
32
35
  import 'tailwind-variants/dist/config';