@nextui-org/theme 0.0.0-dev-v2-20230407185204 → 0.0.0-dev-v2-20230409142211

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.
@@ -29,8 +29,8 @@ var toggle = tv({
29
29
  "rounded-full",
30
30
  "data-[checked=true]:translate-x-full"
31
31
  ],
32
- leftIcon: "z-0 absolute left-1.5 text-current",
33
- rightIcon: "z-0 absolute right-1.5 text-neutral-600",
32
+ startIcon: "z-0 absolute left-1.5 text-current",
33
+ endIcon: "z-0 absolute right-1.5 text-neutral-600",
34
34
  thumbIcon: "text-black",
35
35
  label: "relative text-foreground select-none"
36
36
  },
@@ -74,37 +74,37 @@ var toggle = tv({
74
74
  xs: {
75
75
  wrapper: "px-0.5 w-7 h-4 mr-1",
76
76
  thumb: "w-3 h-3 text-[0.5rem]",
77
- leftIcon: "text-[0.5rem] left-1",
78
- rightIcon: "text-[0.5rem] right-1",
77
+ startIcon: "text-[0.5rem] left-1",
78
+ endIcon: "text-[0.5rem] right-1",
79
79
  right: "text-[0.5rem]",
80
80
  label: "text-xs"
81
81
  },
82
82
  sm: {
83
83
  wrapper: "w-8 h-5 mr-1",
84
84
  thumb: "w-3 h-3 text-[0.6rem]",
85
- leftIcon: "text-[0.6rem] left-1",
86
- rightIcon: "text-[0.6rem] right-1",
85
+ startIcon: "text-[0.6rem] left-1",
86
+ endIcon: "text-[0.6rem] right-1",
87
87
  label: "text-sm"
88
88
  },
89
89
  md: {
90
90
  wrapper: "w-10 h-6 mr-2",
91
91
  thumb: "w-4 h-4 text-xs",
92
- rightIcon: "text-xs",
93
- leftIcon: "text-xs",
92
+ endIcon: "text-xs",
93
+ startIcon: "text-xs",
94
94
  label: "text-base"
95
95
  },
96
96
  lg: {
97
97
  wrapper: "w-12 h-7 mr-2",
98
98
  thumb: "w-5 h-5 text-sm",
99
- rightIcon: "text-sm",
100
- leftIcon: "text-sm",
99
+ endIcon: "text-sm",
100
+ startIcon: "text-sm",
101
101
  label: "text-lg"
102
102
  },
103
103
  xl: {
104
104
  wrapper: "w-14 h-8 mr-2",
105
105
  thumb: "w-6 h-6 text-base",
106
- rightIcon: "text-base",
107
- leftIcon: "text-base",
106
+ endIcon: "text-base",
107
+ startIcon: "text-base",
108
108
  label: "text-xl"
109
109
  }
110
110
  },
@@ -124,16 +124,16 @@ var toggle = tv({
124
124
  thumb: "transition-none"
125
125
  },
126
126
  false: {
127
- wrapper: "transition-background !duration-500",
127
+ wrapper: "transition-background",
128
128
  thumb: "transition-transform !ease-soft-spring !duration-500",
129
- leftIcon: [
129
+ startIcon: [
130
130
  "opacity-0",
131
131
  "scale-50",
132
132
  "transition-transform-opacity",
133
133
  "data-[checked=true]:scale-100",
134
134
  "data-[checked=true]:opacity-100"
135
135
  ],
136
- rightIcon: [
136
+ endIcon: [
137
137
  "opacity-100",
138
138
  "transition-transform-opacity",
139
139
  "data-[checked=true]:translate-x-3",
@@ -0,0 +1,28 @@
1
+ // src/components/dropdown-section.ts
2
+ import { tv } from "tailwind-variants";
3
+ var dropdownSection = tv({
4
+ slots: {
5
+ section: "relative mb-2",
6
+ heading: "pl-1 text-xs text-neutral-500"
7
+ },
8
+ variants: {
9
+ showDivider: {
10
+ true: {
11
+ heading: [
12
+ "mt-2",
13
+ "before-content-['']",
14
+ "before:absolute",
15
+ "before:-top-1",
16
+ "before:left-0",
17
+ "before:right-0",
18
+ "before:h-px",
19
+ "before:bg-neutral-200"
20
+ ]
21
+ }
22
+ }
23
+ }
24
+ });
25
+
26
+ export {
27
+ dropdownSection
28
+ };
@@ -0,0 +1,9 @@
1
+ // src/components/dropdown-menu.ts
2
+ import { tv } from "tailwind-variants";
3
+ var dropdownMenu = tv({
4
+ base: "w-full flex flex-col p-1"
5
+ });
6
+
7
+ export {
8
+ dropdownMenu
9
+ };
@@ -0,0 +1,363 @@
1
+ import {
2
+ ringClasses
3
+ } from "./chunk-IJCHUO4J.mjs";
4
+
5
+ // src/components/dropdown-item.ts
6
+ import { tv } from "tailwind-variants";
7
+ var dropdownItem = tv({
8
+ slots: {
9
+ base: [
10
+ "flex",
11
+ "group",
12
+ "gap-2",
13
+ "items-center",
14
+ "justify-between",
15
+ "relative",
16
+ "px-2",
17
+ "py-1",
18
+ "w-full",
19
+ "h-full",
20
+ "box-border",
21
+ "rounded-lg",
22
+ "outline-none",
23
+ "cursor-pointer"
24
+ ],
25
+ wrapper: "w-full flex flex-col items-start justify-center",
26
+ title: "flex-1",
27
+ description: ["text-xs", "text-neutral-500", "truncate", "group-hover:text-current"],
28
+ selectedIcon: ["text-inherit", "w-3", "h-3", "flex-shrink-0"],
29
+ shortcut: [
30
+ "px-1",
31
+ "py-0.5",
32
+ "rounded",
33
+ "font-sans",
34
+ "opacity-60",
35
+ "text-inherit",
36
+ "text-xs",
37
+ "border",
38
+ "border-neutral-200",
39
+ "group-hover:border-current"
40
+ ]
41
+ },
42
+ variants: {
43
+ variant: {
44
+ solid: {
45
+ base: ""
46
+ },
47
+ bordered: {
48
+ base: "border-2 border-transparent bg-transparent"
49
+ },
50
+ light: {
51
+ base: "bg-transparent"
52
+ },
53
+ faded: {
54
+ base: "border border-transparent hover:border-neutral hover:bg-neutral-100"
55
+ },
56
+ flat: {
57
+ base: ""
58
+ },
59
+ shadow: {
60
+ base: "hover:shadow-lg"
61
+ }
62
+ },
63
+ color: {
64
+ neutral: {},
65
+ primary: {},
66
+ secondary: {},
67
+ success: {},
68
+ warning: {},
69
+ danger: {}
70
+ },
71
+ showDivider: {
72
+ true: {
73
+ base: [
74
+ "mt-2",
75
+ "before-content-['']",
76
+ "before:absolute",
77
+ "before:-top-1",
78
+ "before:left-0",
79
+ "before:right-0",
80
+ "before:h-px",
81
+ "before:bg-neutral-200"
82
+ ]
83
+ }
84
+ },
85
+ isDisabled: {
86
+ true: {
87
+ base: "opacity-50 pointer-events-none"
88
+ }
89
+ },
90
+ isFocusVisible: {
91
+ true: {
92
+ base: [...ringClasses]
93
+ }
94
+ },
95
+ disableAnimation: {
96
+ true: {},
97
+ false: {}
98
+ }
99
+ },
100
+ defaultVariants: {
101
+ variant: "solid",
102
+ color: "neutral",
103
+ disableAnimation: false
104
+ },
105
+ compoundVariants: [
106
+ {
107
+ variant: "solid",
108
+ color: "neutral",
109
+ class: {
110
+ base: "hover:bg-neutral hover:text-neutral-contrastText"
111
+ }
112
+ },
113
+ {
114
+ variant: "solid",
115
+ color: "primary",
116
+ class: {
117
+ base: "hover:bg-primary hover:text-primary-contrastText"
118
+ }
119
+ },
120
+ {
121
+ variant: "solid",
122
+ color: "secondary",
123
+ class: {
124
+ base: "hover:bg-secondary hover:text-secondary-contrastText"
125
+ }
126
+ },
127
+ {
128
+ variant: "solid",
129
+ color: "success",
130
+ class: {
131
+ base: "hover:bg-success hover:text-success-contrastText"
132
+ }
133
+ },
134
+ {
135
+ variant: "solid",
136
+ color: "warning",
137
+ class: {
138
+ base: "hover:bg-warning hover:text-warning-contrastText"
139
+ }
140
+ },
141
+ {
142
+ variant: "solid",
143
+ color: "danger",
144
+ class: {
145
+ base: "hover:bg-danger hover:text-danger-contrastText"
146
+ }
147
+ },
148
+ {
149
+ variant: "shadow",
150
+ color: "neutral",
151
+ class: {
152
+ base: "hover:shadow-neutral/50 hover:bg-neutral hover:text-neutral-contrastText"
153
+ }
154
+ },
155
+ {
156
+ variant: "shadow",
157
+ color: "primary",
158
+ class: {
159
+ base: "hover:shadow-primary/30 hover:bg-primary hover:text-primary-contrastText"
160
+ }
161
+ },
162
+ {
163
+ variant: "shadow",
164
+ color: "secondary",
165
+ class: {
166
+ base: "hover:shadow-secondary/30 hover:bg-secondary hover:text-secondary-contrastText"
167
+ }
168
+ },
169
+ {
170
+ variant: "shadow",
171
+ color: "success",
172
+ class: {
173
+ base: "hover:shadow-success/30 hover:bg-success hover:text-success-contrastText"
174
+ }
175
+ },
176
+ {
177
+ variant: "shadow",
178
+ color: "warning",
179
+ class: {
180
+ base: "hover:shadow-warning/30 hover:bg-warning hover:text-warning-contrastText"
181
+ }
182
+ },
183
+ {
184
+ variant: "shadow",
185
+ color: "danger",
186
+ class: {
187
+ base: "hover:shadow-danger/30 hover:bg-danger hover:text-danger-contrastText"
188
+ }
189
+ },
190
+ {
191
+ variant: "bordered",
192
+ color: "neutral",
193
+ class: {
194
+ base: "hover:border-neutral"
195
+ }
196
+ },
197
+ {
198
+ variant: "bordered",
199
+ color: "primary",
200
+ class: {
201
+ base: "hover:border-primary hover:text-primary"
202
+ }
203
+ },
204
+ {
205
+ variant: "bordered",
206
+ color: "secondary",
207
+ class: {
208
+ base: "hover:border-secondary hover:text-secondary"
209
+ }
210
+ },
211
+ {
212
+ variant: "bordered",
213
+ color: "success",
214
+ class: {
215
+ base: "hover:border-success hover:text-success"
216
+ }
217
+ },
218
+ {
219
+ variant: "bordered",
220
+ color: "warning",
221
+ class: {
222
+ base: "hover:border-warning hover:text-warning"
223
+ }
224
+ },
225
+ {
226
+ variant: "bordered",
227
+ color: "danger",
228
+ class: {
229
+ base: "hover:border-danger hover:text-danger"
230
+ }
231
+ },
232
+ {
233
+ variant: "flat",
234
+ color: "neutral",
235
+ class: {
236
+ base: "hover:bg-neutral-100 hover:text-neutral-contrastText"
237
+ }
238
+ },
239
+ {
240
+ variant: "flat",
241
+ color: "primary",
242
+ class: {
243
+ base: "hover:bg-primary-50 hover:text-primary"
244
+ }
245
+ },
246
+ {
247
+ variant: "flat",
248
+ color: "secondary",
249
+ class: {
250
+ base: "hover:bg-secondary-100 hover:text-secondary"
251
+ }
252
+ },
253
+ {
254
+ variant: "flat",
255
+ color: "success",
256
+ class: {
257
+ base: "hover:bg-success-50 hover:text-success"
258
+ }
259
+ },
260
+ {
261
+ variant: "flat",
262
+ color: "warning",
263
+ class: {
264
+ base: "hover:bg-warning-50 hover:text-warning"
265
+ }
266
+ },
267
+ {
268
+ variant: "flat",
269
+ color: "danger",
270
+ class: {
271
+ base: "hover:bg-danger-50 hover:text-danger"
272
+ }
273
+ },
274
+ {
275
+ variant: "faded",
276
+ color: "neutral",
277
+ class: {
278
+ base: "hover:text-neutral-contrastText"
279
+ }
280
+ },
281
+ {
282
+ variant: "faded",
283
+ color: "primary",
284
+ class: {
285
+ base: "hover:text-primary"
286
+ }
287
+ },
288
+ {
289
+ variant: "faded",
290
+ color: "secondary",
291
+ class: {
292
+ base: "hover:text-secondary"
293
+ }
294
+ },
295
+ {
296
+ variant: "faded",
297
+ color: "success",
298
+ class: {
299
+ base: "hover:text-success"
300
+ }
301
+ },
302
+ {
303
+ variant: "faded",
304
+ color: "warning",
305
+ class: {
306
+ base: "hover:text-warning"
307
+ }
308
+ },
309
+ {
310
+ variant: "faded",
311
+ color: "danger",
312
+ class: {
313
+ base: "hover:text-danger"
314
+ }
315
+ },
316
+ {
317
+ variant: "light",
318
+ color: "neutral",
319
+ class: {
320
+ base: "hover:text-neutral-500"
321
+ }
322
+ },
323
+ {
324
+ variant: "light",
325
+ color: "primary",
326
+ class: {
327
+ base: "hover:text-primary"
328
+ }
329
+ },
330
+ {
331
+ variant: "light",
332
+ color: "secondary",
333
+ class: {
334
+ base: "hover:text-secondary"
335
+ }
336
+ },
337
+ {
338
+ variant: "light",
339
+ color: "success",
340
+ class: {
341
+ base: "hover:text-success"
342
+ }
343
+ },
344
+ {
345
+ variant: "light",
346
+ color: "warning",
347
+ class: {
348
+ base: "hover:text-warning"
349
+ }
350
+ },
351
+ {
352
+ variant: "light",
353
+ color: "danger",
354
+ class: {
355
+ base: "hover:text-danger"
356
+ }
357
+ }
358
+ ]
359
+ });
360
+
361
+ export {
362
+ dropdownItem
363
+ };
@@ -19,7 +19,7 @@ var accordionItem = tv({
19
19
  ],
20
20
  heading: "",
21
21
  trigger: "py-2 flex w-full gap-3 outline-none items-center",
22
- leftIndicator: "flex-shrink-0",
22
+ startContent: "flex-shrink-0",
23
23
  indicator: "text-neutral-400",
24
24
  titleWrapper: "flex-1 flex flex-col text-left",
25
25
  title: "text-foreground text-lg",
@@ -0,0 +1,19 @@
1
+ // src/components/dropdown.ts
2
+ import { tv } from "tailwind-variants";
3
+ var dropdown = tv({
4
+ base: [
5
+ "w-full",
6
+ "p-1",
7
+ "min-w-[200px]",
8
+ "shadow",
9
+ "shadow-lg",
10
+ "bg-white",
11
+ "dark:bg-content1",
12
+ "border",
13
+ "border-neutral-100"
14
+ ]
15
+ });
16
+
17
+ export {
18
+ dropdown
19
+ };
@@ -5,13 +5,13 @@ import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
5
5
  /**
6
6
  * AccordionItem wrapper **Tailwind Variants** component
7
7
  *
8
- * const {base, heading, indicator, trigger, leftIndicator, title, subtitle, content } = accordionItem({...})
8
+ * const {base, heading, indicator, trigger, startContent, title, subtitle, content } = accordionItem({...})
9
9
  *
10
10
  * @example
11
11
  * <div className={base())}>
12
12
  * <div className={heading())}>
13
13
  * <button className={trigger())}>
14
- * <div className={leftIndicator()}>
14
+ * <div className={startContent()}>
15
15
  * // content
16
16
  * </div>
17
17
  * <div className={titleWrapper()}>
@@ -75,7 +75,7 @@ declare const accordionItem: tailwind_variants.TVReturnType<{
75
75
  base: string[];
76
76
  heading: string;
77
77
  trigger: string;
78
- leftIndicator: string;
78
+ startContent: string;
79
79
  indicator: string;
80
80
  titleWrapper: string;
81
81
  title: string;
@@ -51,7 +51,7 @@ var accordionItem = (0, import_tailwind_variants.tv)({
51
51
  ],
52
52
  heading: "",
53
53
  trigger: "py-2 flex w-full gap-3 outline-none items-center",
54
- leftIndicator: "flex-shrink-0",
54
+ startContent: "flex-shrink-0",
55
55
  indicator: "text-neutral-400",
56
56
  titleWrapper: "flex-1 flex flex-col text-left",
57
57
  title: "text-foreground text-lg",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  accordionItem
3
- } from "../chunk-RD42SVXB.mjs";
3
+ } from "../chunk-OMBBJ6LI.mjs";
4
4
  import "../chunk-CMYR6AOY.mjs";
5
5
  import "../chunk-K7LK7NCE.mjs";
6
6
  import "../chunk-LGGZKBOO.mjs";
@@ -0,0 +1,134 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
4
+
5
+ /**
6
+ * DropdownItem wrapper **Tailwind Variants** component
7
+ *
8
+ * const {base, heading, indicator, trigger, leftIndicator, title, subtitle, content } = dropdownItem({...})
9
+ *
10
+ * @example
11
+ * <div className={base())}>
12
+ * <div className={heading())}>
13
+ * <button className={trigger())}>
14
+ * <div className={leftIndicator()}>
15
+ * // content
16
+ * </div>
17
+ * <div className={titleWrapper()}>
18
+ * <h3 className={title())}>Title</h3>
19
+ * <span className={subtitle())}>Subtitle</span>
20
+ * </div>
21
+ * <span className={indicator())}>Indicator</span>
22
+ * </button>
23
+ * </div>
24
+ * <div className={content())}>Content</div>
25
+ * </div>
26
+ */
27
+ declare const dropdownItem: tailwind_variants.TVReturnType<{
28
+ variant: {
29
+ solid: {
30
+ base: string;
31
+ };
32
+ bordered: {
33
+ base: string;
34
+ };
35
+ light: {
36
+ base: string;
37
+ };
38
+ faded: {
39
+ base: string;
40
+ };
41
+ flat: {
42
+ base: string;
43
+ };
44
+ shadow: {
45
+ base: string;
46
+ };
47
+ };
48
+ color: {
49
+ neutral: {};
50
+ primary: {};
51
+ secondary: {};
52
+ success: {};
53
+ warning: {};
54
+ danger: {};
55
+ };
56
+ showDivider: {
57
+ true: {
58
+ base: string[];
59
+ };
60
+ };
61
+ isDisabled: {
62
+ true: {
63
+ base: string;
64
+ };
65
+ };
66
+ isFocusVisible: {
67
+ true: {
68
+ base: string[];
69
+ };
70
+ };
71
+ disableAnimation: {
72
+ true: {};
73
+ false: {};
74
+ };
75
+ }, unknown, {
76
+ base: string[];
77
+ wrapper: string;
78
+ title: string;
79
+ description: string[];
80
+ selectedIcon: string[];
81
+ shortcut: string[];
82
+ }, undefined, undefined, tailwind_variants_dist_config.TVConfig<{
83
+ variant: {
84
+ solid: {
85
+ base: string;
86
+ };
87
+ bordered: {
88
+ base: string;
89
+ };
90
+ light: {
91
+ base: string;
92
+ };
93
+ faded: {
94
+ base: string;
95
+ };
96
+ flat: {
97
+ base: string;
98
+ };
99
+ shadow: {
100
+ base: string;
101
+ };
102
+ };
103
+ color: {
104
+ neutral: {};
105
+ primary: {};
106
+ secondary: {};
107
+ success: {};
108
+ warning: {};
109
+ danger: {};
110
+ };
111
+ showDivider: {
112
+ true: {
113
+ base: string[];
114
+ };
115
+ };
116
+ isDisabled: {
117
+ true: {
118
+ base: string;
119
+ };
120
+ };
121
+ isFocusVisible: {
122
+ true: {
123
+ base: string[];
124
+ };
125
+ };
126
+ disableAnimation: {
127
+ true: {};
128
+ false: {};
129
+ };
130
+ }, unknown>>;
131
+ type DropdownItemVariantProps = VariantProps<typeof dropdownItem>;
132
+ type DropdownItemSlots = keyof ReturnType<typeof dropdownItem>;
133
+
134
+ export { DropdownItemSlots, DropdownItemVariantProps, dropdownItem };