@nextui-org/theme 0.0.0-dev-v2-20230407185204 → 0.0.0-dev-v2-20230409022144
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.
- package/dist/chunk-AVGEHFT4.mjs +28 -0
- package/dist/chunk-FCYNUVAR.mjs +9 -0
- package/dist/chunk-HFRML5X4.mjs +363 -0
- package/dist/chunk-UNMHV7HH.mjs +19 -0
- package/dist/components/dropdown-item.d.ts +134 -0
- package/dist/components/dropdown-item.js +395 -0
- package/dist/components/dropdown-item.mjs +10 -0
- package/dist/components/dropdown-menu.d.ts +12 -0
- package/dist/components/dropdown-menu.js +33 -0
- package/dist/components/dropdown-menu.mjs +6 -0
- package/dist/components/dropdown-section.d.ts +38 -0
- package/dist/components/dropdown-section.js +52 -0
- package/dist/components/dropdown-section.mjs +6 -0
- package/dist/components/dropdown.d.ts +20 -0
- package/dist/components/dropdown.js +43 -0
- package/dist/components/dropdown.mjs +6 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +411 -0
- package/dist/components/index.mjs +33 -17
- package/dist/index.d.ts +4 -0
- package/dist/index.js +415 -4
- package/dist/index.mjs +33 -17
- package/package.json +1 -1
- /package/dist/{chunk-O2BO77DA.mjs → chunk-EERASTP4.mjs} +0 -0
|
@@ -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,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
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -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 };
|