@nextui-org/theme 0.0.0-dev-v2-20230517170742 → 0.0.0-dev-v2-20230518012432
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-XSFH4S4Y.mjs → chunk-7CTZKPXG.mjs} +23 -5
- package/dist/{chunk-Z6VEZVD6.mjs → chunk-7EC2WH7W.mjs} +43 -2
- package/dist/{chunk-7EKGN7JP.mjs → chunk-B2N536X5.mjs} +9 -1
- package/dist/{chunk-XUFLJ7RP.mjs → chunk-CH6AU75S.mjs} +9 -9
- package/dist/{chunk-35A3FHL7.mjs → chunk-HAR22HFA.mjs} +13 -1
- package/dist/{chunk-TFNTYAAW.mjs → chunk-LQHWK6UV.mjs} +3 -3
- package/dist/{chunk-MZAUPTXE.mjs → chunk-M74ZSXB7.mjs} +2 -2
- package/dist/{chunk-JCRQ3XNM.mjs → chunk-NFNV2TXA.mjs} +4 -4
- package/dist/{chunk-OZPCO5UB.mjs → chunk-WLLBJIBU.mjs} +9 -1
- package/dist/{chunk-74YO36XH.mjs → chunk-Y43NAEAT.mjs} +10 -1
- package/dist/colors/common.mjs +3 -3
- package/dist/colors/index.mjs +6 -6
- package/dist/colors/semantic.mjs +5 -5
- package/dist/colors.mjs +6 -6
- package/dist/components/accordion.d.ts +129 -4
- package/dist/components/accordion.js +95 -3
- package/dist/components/accordion.mjs +5 -3
- package/dist/components/avatar.d.ts +21 -1
- package/dist/components/avatar.js +12 -2
- package/dist/components/avatar.mjs +6 -4
- package/dist/components/badge.mjs +1 -1
- package/dist/components/button.d.ts +21 -1
- package/dist/components/button.js +15 -2
- package/dist/components/button.mjs +6 -4
- package/dist/components/card.js +4 -4
- package/dist/components/card.mjs +1 -1
- package/dist/components/checkbox.d.ts +28 -1
- package/dist/components/checkbox.js +11 -2
- package/dist/components/checkbox.mjs +5 -3
- package/dist/components/chip.mjs +1 -1
- package/dist/components/code.mjs +1 -1
- package/dist/components/dropdown.d.ts +159 -1
- package/dist/components/dropdown.js +387 -2
- package/dist/components/dropdown.mjs +9 -3
- package/dist/components/index.d.ts +6 -14
- package/dist/components/index.js +91 -108
- package/dist/components/index.mjs +49 -65
- package/dist/components/pagination.mjs +1 -1
- package/dist/components/popover.mjs +1 -1
- package/dist/components/radio.d.ts +28 -1
- package/dist/components/radio.js +11 -2
- package/dist/components/radio.mjs +5 -3
- package/dist/components/snippet.mjs +1 -1
- package/dist/components/tabs.mjs +1 -1
- package/dist/index.d.ts +6 -14
- package/dist/index.js +95 -112
- package/dist/index.mjs +69 -85
- package/dist/plugin.mjs +9 -9
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-AVGEHFT4.mjs +0 -28
- package/dist/chunk-FCYNUVAR.mjs +0 -9
- package/dist/chunk-HHWXPWYN.mjs +0 -13
- package/dist/chunk-MLH3XSY7.mjs +0 -14
- package/dist/chunk-U77YMEWM.mjs +0 -13
- package/dist/chunk-UNMHV7HH.mjs +0 -19
- package/dist/chunk-VXZZZD4L.mjs +0 -17
- package/dist/chunk-YYBLBQIV.mjs +0 -16
- package/dist/components/accordion-item.d.ts +0 -125
- package/dist/components/accordion-item.js +0 -113
- package/dist/components/accordion-item.mjs +0 -6
- package/dist/components/avatar-group.d.ts +0 -26
- package/dist/components/avatar-group.js +0 -38
- package/dist/components/avatar-group.mjs +0 -6
- package/dist/components/button-group.d.ts +0 -26
- package/dist/components/button-group.js +0 -41
- package/dist/components/button-group.mjs +0 -6
- package/dist/components/checkbox-group.d.ts +0 -32
- package/dist/components/checkbox-group.js +0 -37
- package/dist/components/checkbox-group.mjs +0 -6
- package/dist/components/dropdown-item.d.ts +0 -124
- package/dist/components/dropdown-item.js +0 -384
- package/dist/components/dropdown-item.mjs +0 -6
- package/dist/components/dropdown-menu.d.ts +0 -12
- package/dist/components/dropdown-menu.js +0 -33
- package/dist/components/dropdown-menu.mjs +0 -6
- package/dist/components/dropdown-section.d.ts +0 -38
- package/dist/components/dropdown-section.js +0 -52
- package/dist/components/dropdown-section.mjs +0 -6
- package/dist/components/radio-group.d.ts +0 -32
- package/dist/components/radio-group.js +0 -37
- package/dist/components/radio-group.mjs +0 -6
- package/dist/{chunk-W4HTBNGS.mjs → chunk-CRCBVLUP.mjs} +6 -6
- /package/dist/{chunk-MVXKHHAX.mjs → chunk-PRWEADY4.mjs} +0 -0
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
// src/components/accordion
|
|
1
|
+
// src/components/accordion.ts
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
|
+
var accordion = tv({
|
|
4
|
+
base: "px-2",
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
light: "",
|
|
8
|
+
shadow: "px-4 shadow-lg rounded-xl bg-background dark:bg-content1 border border-neutral-100",
|
|
9
|
+
bordered: "px-4 border border-neutral rounded-lg",
|
|
10
|
+
splitted: "group is-splitted flex flex-col gap-2"
|
|
11
|
+
},
|
|
12
|
+
fullWidth: {
|
|
13
|
+
true: "w-full"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "light",
|
|
18
|
+
fullWidth: true
|
|
19
|
+
}
|
|
20
|
+
});
|
|
3
21
|
var accordionItem = tv({
|
|
4
22
|
slots: {
|
|
5
23
|
base: [
|
|
6
|
-
"py-2",
|
|
7
24
|
"border-neutral",
|
|
8
25
|
"[&:not(:last-of-type)]:border-b",
|
|
9
26
|
"group-[.is-splitted]:px-4",
|
|
27
|
+
"group-[.is-splitted]:bg-background",
|
|
10
28
|
"dark:group-[.is-splitted]:bg-content1",
|
|
11
29
|
"group-[.is-splitted]:shadow-lg",
|
|
12
30
|
"group-[.is-splitted]:rounded-lg",
|
|
@@ -15,7 +33,7 @@ var accordionItem = tv({
|
|
|
15
33
|
],
|
|
16
34
|
heading: "",
|
|
17
35
|
trigger: [
|
|
18
|
-
"py-
|
|
36
|
+
"flex py-4 w-full h-full gap-3 outline-none items-center",
|
|
19
37
|
"data-[focus-visible=true]:outline-none",
|
|
20
38
|
"data-[focus-visible=true]:ring-2",
|
|
21
39
|
"data-[focus-visible=true]:ring-primary",
|
|
@@ -33,8 +51,7 @@ var accordionItem = tv({
|
|
|
33
51
|
variants: {
|
|
34
52
|
isCompact: {
|
|
35
53
|
true: {
|
|
36
|
-
|
|
37
|
-
trigger: "py-1",
|
|
54
|
+
trigger: "py-2",
|
|
38
55
|
title: "text-base",
|
|
39
56
|
subtitle: "text-xs",
|
|
40
57
|
indicator: "text-base",
|
|
@@ -85,5 +102,6 @@ var accordionItem = tv({
|
|
|
85
102
|
});
|
|
86
103
|
|
|
87
104
|
export {
|
|
105
|
+
accordion,
|
|
88
106
|
accordionItem
|
|
89
107
|
};
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
// src/components/dropdown
|
|
1
|
+
// src/components/dropdown.ts
|
|
2
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
|
+
});
|
|
3
16
|
var dropdownItem = tv({
|
|
4
17
|
slots: {
|
|
5
18
|
base: [
|
|
@@ -354,7 +367,35 @@ var dropdownItem = tv({
|
|
|
354
367
|
}
|
|
355
368
|
]
|
|
356
369
|
});
|
|
370
|
+
var dropdownSection = tv({
|
|
371
|
+
slots: {
|
|
372
|
+
section: "relative mb-2",
|
|
373
|
+
heading: "pl-1 text-xs text-neutral-500"
|
|
374
|
+
},
|
|
375
|
+
variants: {
|
|
376
|
+
showDivider: {
|
|
377
|
+
true: {
|
|
378
|
+
heading: [
|
|
379
|
+
"mt-2",
|
|
380
|
+
"before-content-['']",
|
|
381
|
+
"before:absolute",
|
|
382
|
+
"before:-top-1",
|
|
383
|
+
"before:left-0",
|
|
384
|
+
"before:right-0",
|
|
385
|
+
"before:h-px",
|
|
386
|
+
"before:bg-neutral-200"
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
var dropdownMenu = tv({
|
|
393
|
+
base: "w-full flex flex-col p-1"
|
|
394
|
+
});
|
|
357
395
|
|
|
358
396
|
export {
|
|
359
|
-
|
|
397
|
+
dropdown,
|
|
398
|
+
dropdownItem,
|
|
399
|
+
dropdownSection,
|
|
400
|
+
dropdownMenu
|
|
360
401
|
};
|
|
@@ -151,7 +151,15 @@ var checkbox = tv({
|
|
|
151
151
|
disableAnimation: false
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
+
var checkboxGroup = tv({
|
|
155
|
+
slots: {
|
|
156
|
+
base: "relative flex flex-col gap-2",
|
|
157
|
+
label: "relative text-neutral-500",
|
|
158
|
+
wrapper: "flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row "
|
|
159
|
+
}
|
|
160
|
+
});
|
|
154
161
|
|
|
155
162
|
export {
|
|
156
|
-
checkbox
|
|
163
|
+
checkbox,
|
|
164
|
+
checkboxGroup
|
|
157
165
|
};
|
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
utilities
|
|
3
3
|
} from "./chunk-XLATS5QU.mjs";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
baseStyles
|
|
6
|
+
} from "./chunk-INZK6TTL.mjs";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
animations
|
|
9
|
+
} from "./chunk-DMASP6FA.mjs";
|
|
10
|
+
import {
|
|
11
|
+
semanticColors
|
|
12
|
+
} from "./chunk-LQHWK6UV.mjs";
|
|
10
13
|
import {
|
|
11
14
|
removeDefaultKeys
|
|
12
15
|
} from "./chunk-37PIXVP4.mjs";
|
|
13
16
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
baseStyles
|
|
18
|
-
} from "./chunk-INZK6TTL.mjs";
|
|
17
|
+
commonColors
|
|
18
|
+
} from "./chunk-CRCBVLUP.mjs";
|
|
19
19
|
|
|
20
20
|
// src/plugin.ts
|
|
21
21
|
import Color from "color";
|
|
@@ -384,7 +384,19 @@ var button = tv({
|
|
|
384
384
|
}
|
|
385
385
|
]
|
|
386
386
|
});
|
|
387
|
+
var buttonGroup = tv({
|
|
388
|
+
base: "inline-flex items-center justify-center h-auto",
|
|
389
|
+
variants: {
|
|
390
|
+
fullWidth: {
|
|
391
|
+
true: "w-full"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
defaultVariants: {
|
|
395
|
+
fullWidth: false
|
|
396
|
+
}
|
|
397
|
+
});
|
|
387
398
|
|
|
388
399
|
export {
|
|
389
|
-
button
|
|
400
|
+
button,
|
|
401
|
+
buttonGroup
|
|
390
402
|
};
|
|
@@ -7,7 +7,6 @@ var card = tv({
|
|
|
7
7
|
"flex-col",
|
|
8
8
|
"relative",
|
|
9
9
|
"overflow-hidden",
|
|
10
|
-
"w-full",
|
|
11
10
|
"height-auto",
|
|
12
11
|
"outline-none",
|
|
13
12
|
"text-foreground",
|
|
@@ -26,10 +25,10 @@ var card = tv({
|
|
|
26
25
|
"flex",
|
|
27
26
|
"p-3",
|
|
28
27
|
"z-10",
|
|
28
|
+
"w-full",
|
|
29
29
|
"justify-start",
|
|
30
30
|
"items-center",
|
|
31
31
|
"shrink-0",
|
|
32
|
-
"w-full",
|
|
33
32
|
"overflow-inherit",
|
|
34
33
|
"color-inherit",
|
|
35
34
|
"subpixel-antialiased"
|
|
@@ -37,12 +36,13 @@ var card = tv({
|
|
|
37
36
|
body: [
|
|
38
37
|
"relative",
|
|
39
38
|
"flex",
|
|
39
|
+
"flex-1",
|
|
40
|
+
"w-full",
|
|
40
41
|
"p-5",
|
|
41
42
|
"flex-auto",
|
|
42
43
|
"flex-col",
|
|
43
44
|
"place-content-inherit",
|
|
44
45
|
"align-items-inherit",
|
|
45
|
-
"w-full",
|
|
46
46
|
"h-auto",
|
|
47
47
|
"break-words",
|
|
48
48
|
"text-left",
|
|
@@ -51,9 +51,9 @@ var card = tv({
|
|
|
51
51
|
],
|
|
52
52
|
footer: [
|
|
53
53
|
"p-3",
|
|
54
|
-
"w-full",
|
|
55
54
|
"h-auto",
|
|
56
55
|
"flex",
|
|
56
|
+
"w-full",
|
|
57
57
|
"items-center",
|
|
58
58
|
"overflow-hidden",
|
|
59
59
|
"color-inherit",
|
|
@@ -160,7 +160,15 @@ var radio = tv({
|
|
|
160
160
|
disableAnimation: false
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
|
+
var radioGroup = tv({
|
|
164
|
+
slots: {
|
|
165
|
+
base: "relative flex flex-col gap-2",
|
|
166
|
+
label: "relative text-neutral-500",
|
|
167
|
+
wrapper: "flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row "
|
|
168
|
+
}
|
|
169
|
+
});
|
|
163
170
|
|
|
164
171
|
export {
|
|
165
|
-
radio
|
|
172
|
+
radio,
|
|
173
|
+
radioGroup
|
|
166
174
|
};
|
|
@@ -196,7 +196,16 @@ var avatar = tv({
|
|
|
196
196
|
}
|
|
197
197
|
]
|
|
198
198
|
});
|
|
199
|
+
var avatarGroup = tv({
|
|
200
|
+
base: "flex items-center justify-center h-auto w-max-content",
|
|
201
|
+
variants: {
|
|
202
|
+
isGrid: {
|
|
203
|
+
true: "inline-grid grid-cols-4 gap-3"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
});
|
|
199
207
|
|
|
200
208
|
export {
|
|
201
|
-
avatar
|
|
209
|
+
avatar,
|
|
210
|
+
avatarGroup
|
|
202
211
|
};
|
package/dist/colors/common.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
commonColors
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-CRCBVLUP.mjs";
|
|
4
|
+
import "../chunk-DCEG5LGX.mjs";
|
|
5
|
+
import "../chunk-L2OL7R23.mjs";
|
|
4
6
|
import "../chunk-YZYGFPNK.mjs";
|
|
5
7
|
import "../chunk-Y4YW5MKL.mjs";
|
|
6
8
|
import "../chunk-KZJBCC2H.mjs";
|
|
7
9
|
import "../chunk-T3GWIVAM.mjs";
|
|
8
10
|
import "../chunk-OR5PUD24.mjs";
|
|
9
|
-
import "../chunk-DCEG5LGX.mjs";
|
|
10
|
-
import "../chunk-L2OL7R23.mjs";
|
|
11
11
|
export {
|
|
12
12
|
commonColors
|
|
13
13
|
};
|
package/dist/colors/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
colors
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-M74ZSXB7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
semanticColors
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-LQHWK6UV.mjs";
|
|
7
|
+
import "../chunk-37PIXVP4.mjs";
|
|
7
8
|
import "../chunk-M63AFAHO.mjs";
|
|
8
9
|
import {
|
|
9
10
|
commonColors
|
|
10
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-CRCBVLUP.mjs";
|
|
12
|
+
import "../chunk-DCEG5LGX.mjs";
|
|
13
|
+
import "../chunk-L2OL7R23.mjs";
|
|
11
14
|
import "../chunk-YZYGFPNK.mjs";
|
|
12
15
|
import "../chunk-Y4YW5MKL.mjs";
|
|
13
16
|
import "../chunk-KZJBCC2H.mjs";
|
|
14
17
|
import "../chunk-T3GWIVAM.mjs";
|
|
15
18
|
import "../chunk-OR5PUD24.mjs";
|
|
16
|
-
import "../chunk-DCEG5LGX.mjs";
|
|
17
|
-
import "../chunk-L2OL7R23.mjs";
|
|
18
|
-
import "../chunk-37PIXVP4.mjs";
|
|
19
19
|
export {
|
|
20
20
|
colors,
|
|
21
21
|
commonColors,
|
package/dist/colors/semantic.mjs
CHANGED
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
semanticColors,
|
|
3
3
|
semanticColorsDark,
|
|
4
4
|
semanticColorsLight
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-LQHWK6UV.mjs";
|
|
6
|
+
import "../chunk-37PIXVP4.mjs";
|
|
7
|
+
import "../chunk-CRCBVLUP.mjs";
|
|
8
|
+
import "../chunk-DCEG5LGX.mjs";
|
|
9
|
+
import "../chunk-L2OL7R23.mjs";
|
|
7
10
|
import "../chunk-YZYGFPNK.mjs";
|
|
8
11
|
import "../chunk-Y4YW5MKL.mjs";
|
|
9
12
|
import "../chunk-KZJBCC2H.mjs";
|
|
10
13
|
import "../chunk-T3GWIVAM.mjs";
|
|
11
14
|
import "../chunk-OR5PUD24.mjs";
|
|
12
|
-
import "../chunk-DCEG5LGX.mjs";
|
|
13
|
-
import "../chunk-L2OL7R23.mjs";
|
|
14
|
-
import "../chunk-37PIXVP4.mjs";
|
|
15
15
|
export {
|
|
16
16
|
semanticColors,
|
|
17
17
|
semanticColorsDark,
|
package/dist/colors.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import "./chunk-WQEDQHKX.mjs";
|
|
2
2
|
import {
|
|
3
3
|
colors
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-M74ZSXB7.mjs";
|
|
5
5
|
import {
|
|
6
6
|
semanticColors
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LQHWK6UV.mjs";
|
|
8
|
+
import "./chunk-37PIXVP4.mjs";
|
|
8
9
|
import "./chunk-M63AFAHO.mjs";
|
|
9
10
|
import {
|
|
10
11
|
commonColors
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CRCBVLUP.mjs";
|
|
13
|
+
import "./chunk-DCEG5LGX.mjs";
|
|
14
|
+
import "./chunk-L2OL7R23.mjs";
|
|
12
15
|
import "./chunk-YZYGFPNK.mjs";
|
|
13
16
|
import "./chunk-Y4YW5MKL.mjs";
|
|
14
17
|
import "./chunk-KZJBCC2H.mjs";
|
|
15
18
|
import "./chunk-T3GWIVAM.mjs";
|
|
16
19
|
import "./chunk-OR5PUD24.mjs";
|
|
17
|
-
import "./chunk-DCEG5LGX.mjs";
|
|
18
|
-
import "./chunk-L2OL7R23.mjs";
|
|
19
|
-
import "./chunk-37PIXVP4.mjs";
|
|
20
20
|
export {
|
|
21
21
|
colors,
|
|
22
22
|
commonColors,
|
|
@@ -5,26 +5,151 @@ import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
|
|
|
5
5
|
/**
|
|
6
6
|
* Accordion wrapper **Tailwind Variants** component
|
|
7
7
|
*
|
|
8
|
-
* const
|
|
8
|
+
* const styles = accordion({...})
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
|
-
* <div role="group" className={
|
|
12
|
-
* //
|
|
11
|
+
* <div role="group" className={styles())}>
|
|
12
|
+
* // accordion elements
|
|
13
13
|
* </div>
|
|
14
14
|
*/
|
|
15
15
|
declare const accordion: tailwind_variants.TVReturnType<{
|
|
16
16
|
variant: {
|
|
17
|
+
light: string;
|
|
17
18
|
shadow: string;
|
|
18
19
|
bordered: string;
|
|
19
20
|
splitted: string;
|
|
20
21
|
};
|
|
22
|
+
fullWidth: {
|
|
23
|
+
true: string;
|
|
24
|
+
};
|
|
21
25
|
}, unknown, undefined, undefined, "px-2", tailwind_variants_dist_config.TVConfig<{
|
|
22
26
|
variant: {
|
|
27
|
+
light: string;
|
|
23
28
|
shadow: string;
|
|
24
29
|
bordered: string;
|
|
25
30
|
splitted: string;
|
|
26
31
|
};
|
|
32
|
+
fullWidth: {
|
|
33
|
+
true: string;
|
|
34
|
+
};
|
|
35
|
+
}, unknown>>;
|
|
36
|
+
/**
|
|
37
|
+
* AccordionItem wrapper **Tailwind Variants** component
|
|
38
|
+
*
|
|
39
|
+
* const {base, heading, indicator, trigger, startContent, title, subtitle, content } = accordionItem({...})
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* <div className={base())}>
|
|
43
|
+
* <div className={heading())}>
|
|
44
|
+
* <button className={trigger())}>
|
|
45
|
+
* <div className={startContent()}>
|
|
46
|
+
* // content
|
|
47
|
+
* </div>
|
|
48
|
+
* <div className={titleWrapper()}>
|
|
49
|
+
* <h3 className={title())}>Title</h3>
|
|
50
|
+
* <span className={subtitle())}>Subtitle</span>
|
|
51
|
+
* </div>
|
|
52
|
+
* <span className={indicator())}>Indicator</span>
|
|
53
|
+
* </button>
|
|
54
|
+
* </div>
|
|
55
|
+
* <div className={content())}>Content</div>
|
|
56
|
+
* </div>
|
|
57
|
+
*/
|
|
58
|
+
declare const accordionItem: tailwind_variants.TVReturnType<{
|
|
59
|
+
isCompact: {
|
|
60
|
+
true: {
|
|
61
|
+
trigger: string;
|
|
62
|
+
title: string;
|
|
63
|
+
subtitle: string;
|
|
64
|
+
indicator: string;
|
|
65
|
+
content: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
isDisabled: {
|
|
69
|
+
true: {
|
|
70
|
+
base: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
hideDivider: {
|
|
74
|
+
true: {
|
|
75
|
+
base: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
hideIndicator: {
|
|
79
|
+
true: {
|
|
80
|
+
indicator: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
disableAnimation: {
|
|
84
|
+
true: {
|
|
85
|
+
content: string;
|
|
86
|
+
};
|
|
87
|
+
false: {
|
|
88
|
+
indicator: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
disableIndicatorAnimation: {
|
|
92
|
+
true: {
|
|
93
|
+
indicator: string;
|
|
94
|
+
};
|
|
95
|
+
false: {
|
|
96
|
+
indicator: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
}, unknown, {
|
|
100
|
+
base: string[];
|
|
101
|
+
heading: string;
|
|
102
|
+
trigger: string[];
|
|
103
|
+
startContent: string;
|
|
104
|
+
indicator: string;
|
|
105
|
+
titleWrapper: string;
|
|
106
|
+
title: string;
|
|
107
|
+
subtitle: string;
|
|
108
|
+
content: string;
|
|
109
|
+
}, undefined, undefined, tailwind_variants_dist_config.TVConfig<{
|
|
110
|
+
isCompact: {
|
|
111
|
+
true: {
|
|
112
|
+
trigger: string;
|
|
113
|
+
title: string;
|
|
114
|
+
subtitle: string;
|
|
115
|
+
indicator: string;
|
|
116
|
+
content: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
isDisabled: {
|
|
120
|
+
true: {
|
|
121
|
+
base: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
hideDivider: {
|
|
125
|
+
true: {
|
|
126
|
+
base: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
hideIndicator: {
|
|
130
|
+
true: {
|
|
131
|
+
indicator: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
disableAnimation: {
|
|
135
|
+
true: {
|
|
136
|
+
content: string;
|
|
137
|
+
};
|
|
138
|
+
false: {
|
|
139
|
+
indicator: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
disableIndicatorAnimation: {
|
|
143
|
+
true: {
|
|
144
|
+
indicator: string;
|
|
145
|
+
};
|
|
146
|
+
false: {
|
|
147
|
+
indicator: string;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
27
150
|
}, unknown>>;
|
|
28
151
|
type AccordionGroupVariantProps = VariantProps<typeof accordion>;
|
|
152
|
+
type AccordionItemVariantProps = VariantProps<typeof accordionItem>;
|
|
153
|
+
type AccordionItemSlots = keyof ReturnType<typeof accordionItem>;
|
|
29
154
|
|
|
30
|
-
export { AccordionGroupVariantProps, accordion };
|
|
155
|
+
export { AccordionGroupVariantProps, AccordionItemSlots, AccordionItemVariantProps, accordion, accordionItem };
|
|
@@ -20,7 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/components/accordion.ts
|
|
21
21
|
var accordion_exports = {};
|
|
22
22
|
__export(accordion_exports, {
|
|
23
|
-
accordion: () => accordion
|
|
23
|
+
accordion: () => accordion,
|
|
24
|
+
accordionItem: () => accordionItem
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(accordion_exports);
|
|
26
27
|
var import_tailwind_variants = require("tailwind-variants");
|
|
@@ -28,13 +29,104 @@ var accordion = (0, import_tailwind_variants.tv)({
|
|
|
28
29
|
base: "px-2",
|
|
29
30
|
variants: {
|
|
30
31
|
variant: {
|
|
31
|
-
|
|
32
|
+
light: "",
|
|
33
|
+
shadow: "px-4 shadow-lg rounded-xl bg-background dark:bg-content1 border border-neutral-100",
|
|
32
34
|
bordered: "px-4 border border-neutral rounded-lg",
|
|
33
35
|
splitted: "group is-splitted flex flex-col gap-2"
|
|
36
|
+
},
|
|
37
|
+
fullWidth: {
|
|
38
|
+
true: "w-full"
|
|
34
39
|
}
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
variant: "light",
|
|
43
|
+
fullWidth: true
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
var accordionItem = (0, import_tailwind_variants.tv)({
|
|
47
|
+
slots: {
|
|
48
|
+
base: [
|
|
49
|
+
"border-neutral",
|
|
50
|
+
"[&:not(:last-of-type)]:border-b",
|
|
51
|
+
"group-[.is-splitted]:px-4",
|
|
52
|
+
"group-[.is-splitted]:bg-background",
|
|
53
|
+
"dark:group-[.is-splitted]:bg-content1",
|
|
54
|
+
"group-[.is-splitted]:shadow-lg",
|
|
55
|
+
"group-[.is-splitted]:rounded-lg",
|
|
56
|
+
"group-[.is-splitted]:border",
|
|
57
|
+
"group-[.is-splitted]:border-neutral-100"
|
|
58
|
+
],
|
|
59
|
+
heading: "",
|
|
60
|
+
trigger: [
|
|
61
|
+
"flex py-4 w-full h-full gap-3 outline-none items-center",
|
|
62
|
+
"data-[focus-visible=true]:outline-none",
|
|
63
|
+
"data-[focus-visible=true]:ring-2",
|
|
64
|
+
"data-[focus-visible=true]:ring-primary",
|
|
65
|
+
"data-[focus-visible=true]:ring-offset-2",
|
|
66
|
+
"data-[focus-visible=true]:ring-offset-background",
|
|
67
|
+
"data-[focus-visible=true]:dark:ring-offset-background-dark"
|
|
68
|
+
],
|
|
69
|
+
startContent: "flex-shrink-0",
|
|
70
|
+
indicator: "text-neutral-400",
|
|
71
|
+
titleWrapper: "flex-1 flex flex-col text-left",
|
|
72
|
+
title: "text-foreground text-lg",
|
|
73
|
+
subtitle: "text-sm text-neutral-500 font-normal",
|
|
74
|
+
content: "py-2"
|
|
75
|
+
},
|
|
76
|
+
variants: {
|
|
77
|
+
isCompact: {
|
|
78
|
+
true: {
|
|
79
|
+
trigger: "py-2",
|
|
80
|
+
title: "text-base",
|
|
81
|
+
subtitle: "text-xs",
|
|
82
|
+
indicator: "text-base",
|
|
83
|
+
content: "py-1"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
isDisabled: {
|
|
87
|
+
true: {
|
|
88
|
+
base: "opacity-50 pointer-events-none"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
hideDivider: {
|
|
92
|
+
true: {
|
|
93
|
+
base: "!border-b-0"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
hideIndicator: {
|
|
97
|
+
true: {
|
|
98
|
+
indicator: "hidden"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
disableAnimation: {
|
|
102
|
+
true: {
|
|
103
|
+
content: "hidden data-[open=true]:block"
|
|
104
|
+
},
|
|
105
|
+
false: {
|
|
106
|
+
indicator: "transition-transform"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
disableIndicatorAnimation: {
|
|
110
|
+
true: {
|
|
111
|
+
indicator: "transition-none"
|
|
112
|
+
},
|
|
113
|
+
false: {
|
|
114
|
+
indicator: "rotate-0 data-[open=true]:-rotate-90"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
defaultVariants: {
|
|
119
|
+
size: "md",
|
|
120
|
+
radius: "lg",
|
|
121
|
+
isDisabled: false,
|
|
122
|
+
hideDivider: false,
|
|
123
|
+
hideIndicator: false,
|
|
124
|
+
disableAnimation: false,
|
|
125
|
+
disableIndicatorAnimation: false
|
|
35
126
|
}
|
|
36
127
|
});
|
|
37
128
|
// Annotate the CommonJS export names for ESM import in node:
|
|
38
129
|
0 && (module.exports = {
|
|
39
|
-
accordion
|
|
130
|
+
accordion,
|
|
131
|
+
accordionItem
|
|
40
132
|
});
|