@nextui-org/theme 2.2.10 → 2.3.0-beta.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.
- package/dist/{chunk-LSQXJEPE.mjs → chunk-2ODFPLXN.mjs} +22 -22
- package/dist/{chunk-BOVVTMHS.mjs → chunk-2TAKWWRG.mjs} +5 -5
- package/dist/chunk-3XDFZGUJ.mjs +216 -0
- package/dist/{chunk-3XVMTUU7.mjs → chunk-46U6G7UJ.mjs} +2 -2
- package/dist/{chunk-MP2JYSMR.mjs → chunk-5VB7JNVX.mjs} +2 -2
- package/dist/{chunk-JBKBSMXM.mjs → chunk-7IYRK3EV.mjs} +1 -1
- package/dist/{chunk-T2VR4T5R.mjs → chunk-AKXXHKTO.mjs} +1 -1
- package/dist/{chunk-EF6G67MF.mjs → chunk-AN5I7NTT.mjs} +1 -1
- package/dist/{chunk-KPVV2V7V.mjs → chunk-AUN4SP2F.mjs} +1 -1
- package/dist/{chunk-A2DU46QS.mjs → chunk-AXSF7SRE.mjs} +1 -1
- package/dist/{chunk-V4SD44VK.mjs → chunk-BWPOLXFL.mjs} +1 -1
- package/dist/{chunk-AXXUQWWC.mjs → chunk-DBPAK7QN.mjs} +1 -1
- package/dist/{chunk-63NMFZTF.mjs → chunk-EGGHND3C.mjs} +2 -2
- package/dist/chunk-EP7KPCL3.mjs +62 -0
- package/dist/{chunk-GQDFLFNG.mjs → chunk-EQPJSVMB.mjs} +1 -1
- package/dist/{chunk-OUNBTYJ7.mjs → chunk-FB2NWPDB.mjs} +12 -12
- package/dist/{chunk-WJIRIXV4.mjs → chunk-FJGKW3ZE.mjs} +29 -38
- package/dist/{chunk-BYWORP66.mjs → chunk-GIXI35A3.mjs} +8 -1
- package/dist/{chunk-BJ6IKX32.mjs → chunk-GMZHMFEU.mjs} +1 -1
- package/dist/{chunk-BZCSOIUI.mjs → chunk-GQT3YUX3.mjs} +5 -5
- package/dist/{chunk-XL6AWNU3.mjs → chunk-HHK47K4W.mjs} +2 -2
- package/dist/{chunk-MVG7GLBD.mjs → chunk-HIFLYEAM.mjs} +1 -1
- package/dist/{chunk-XEPPBQPJ.mjs → chunk-HNRFZTEX.mjs} +19 -19
- package/dist/{chunk-FE2UYWMQ.mjs → chunk-HZ7J23VD.mjs} +37 -44
- package/dist/{chunk-C3SML4G4.mjs → chunk-IAHJC7C4.mjs} +1 -1
- package/dist/{chunk-2KK3SUMT.mjs → chunk-IZOPFGDE.mjs} +37 -2
- package/dist/{chunk-PWJWH4MD.mjs → chunk-JE6SPRGQ.mjs} +2 -2
- package/dist/{chunk-7YPXCOW5.mjs → chunk-K6KPB2U5.mjs} +1 -1
- package/dist/{chunk-42JWJWWX.mjs → chunk-KTTXIYK2.mjs} +2 -2
- package/dist/{chunk-C43Y2OOL.mjs → chunk-KZ2I3V4D.mjs} +2 -2
- package/dist/{chunk-JFWA3DGK.mjs → chunk-LCMN7HGG.mjs} +19 -13
- package/dist/{chunk-4MIBATA4.mjs → chunk-LVAEW6WR.mjs} +15 -15
- package/dist/{chunk-R27WO3A6.mjs → chunk-LWG2RR7B.mjs} +2 -2
- package/dist/{chunk-P73E5YV7.mjs → chunk-N67DL6BW.mjs} +2 -4
- package/dist/{chunk-UDSOWFZE.mjs → chunk-OAHW4NON.mjs} +1 -1
- package/dist/{chunk-TSTU52NB.mjs → chunk-QFGVVQRM.mjs} +5 -5
- package/dist/{chunk-XAYP4CR3.mjs → chunk-SC2SILVU.mjs} +2 -2
- package/dist/{chunk-I33PMOA3.mjs → chunk-TNFNBUPA.mjs} +48 -47
- package/dist/{chunk-U6G6SZ26.mjs → chunk-TOQXZATI.mjs} +1 -1
- package/dist/{chunk-3QYYLFUC.mjs → chunk-UQZHSMVI.mjs} +1 -1
- package/dist/{chunk-N2KXC5ZE.mjs → chunk-UWE6H66T.mjs} +1 -1
- package/dist/{chunk-KPI62GDB.mjs → chunk-VKSIQ7SR.mjs} +1 -1
- package/dist/{chunk-F4AOWB64.mjs → chunk-VX7HAPUO.mjs} +1 -1
- package/dist/{chunk-DI2L75XK.mjs → chunk-W5UU3F46.mjs} +5 -0
- package/dist/{chunk-QV3ALCMB.mjs → chunk-XQI5RD6S.mjs} +2 -2
- package/dist/{chunk-3LD7T42T.mjs → chunk-XZMJGJQX.mjs} +4 -4
- package/dist/{chunk-VLE2FQQR.mjs → chunk-YLHKOIZS.mjs} +1 -1
- package/dist/{chunk-XXQSA25O.mjs → chunk-YRDDKYYT.mjs} +6 -3
- package/dist/components/accordion.js +8 -1
- package/dist/components/accordion.mjs +5 -5
- package/dist/components/alert.d.ts +344 -0
- package/dist/components/alert.js +355 -0
- package/dist/components/alert.mjs +12 -0
- package/dist/components/autocomplete.js +12 -5
- package/dist/components/autocomplete.mjs +3 -3
- package/dist/components/avatar.js +13 -6
- package/dist/components/avatar.mjs +5 -5
- package/dist/components/badge.js +13 -6
- package/dist/components/badge.mjs +5 -5
- package/dist/components/breadcrumbs.js +9 -2
- package/dist/components/breadcrumbs.mjs +5 -5
- package/dist/components/button.js +17 -7
- package/dist/components/button.mjs +5 -5
- package/dist/components/calendar.js +8 -1
- package/dist/components/calendar.mjs +5 -5
- package/dist/components/card.js +8 -1
- package/dist/components/card.mjs +5 -5
- package/dist/components/checkbox.js +19 -12
- package/dist/components/checkbox.mjs +5 -5
- package/dist/components/chip.js +13 -6
- package/dist/components/chip.mjs +5 -5
- package/dist/components/circular-progress.js +8 -1
- package/dist/components/circular-progress.mjs +3 -3
- package/dist/components/code.js +13 -6
- package/dist/components/code.mjs +5 -5
- package/dist/components/date-input.js +26 -19
- package/dist/components/date-input.mjs +3 -3
- package/dist/components/date-picker.js +12 -5
- package/dist/components/date-picker.mjs +3 -3
- package/dist/components/divider.js +8 -1
- package/dist/components/divider.mjs +3 -3
- package/dist/components/drawer.d.ts +358 -0
- package/dist/components/drawer.js +130 -0
- package/dist/components/drawer.mjs +8 -0
- package/dist/components/drip.js +8 -1
- package/dist/components/drip.mjs +3 -3
- package/dist/components/dropdown.js +8 -1
- package/dist/components/dropdown.mjs +5 -5
- package/dist/components/image.js +8 -1
- package/dist/components/image.mjs +3 -3
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +503 -210
- package/dist/components/index.mjs +68 -60
- package/dist/components/input.d.ts +7 -0
- package/dist/components/input.js +55 -47
- package/dist/components/input.mjs +5 -5
- package/dist/components/kbd.js +8 -1
- package/dist/components/kbd.mjs +3 -3
- package/dist/components/link.js +8 -1
- package/dist/components/link.mjs +5 -5
- package/dist/components/listbox.js +8 -1
- package/dist/components/listbox.mjs +5 -5
- package/dist/components/menu.js +8 -1
- package/dist/components/menu.mjs +5 -5
- package/dist/components/modal.js +9 -4
- package/dist/components/modal.mjs +5 -5
- package/dist/components/navbar.js +8 -1
- package/dist/components/navbar.mjs +5 -5
- package/dist/components/pagination.js +13 -6
- package/dist/components/pagination.mjs +5 -5
- package/dist/components/popover.js +13 -6
- package/dist/components/popover.mjs +5 -5
- package/dist/components/progress.js +44 -2
- package/dist/components/progress.mjs +3 -3
- package/dist/components/radio.js +22 -15
- package/dist/components/radio.mjs +5 -5
- package/dist/components/scroll-shadow.js +8 -1
- package/dist/components/scroll-shadow.mjs +3 -3
- package/dist/components/select.d.ts +21 -0
- package/dist/components/select.js +44 -44
- package/dist/components/select.mjs +5 -5
- package/dist/components/skeleton.js +8 -1
- package/dist/components/skeleton.mjs +3 -3
- package/dist/components/slider.js +8 -1
- package/dist/components/slider.mjs +5 -5
- package/dist/components/snippet.js +13 -6
- package/dist/components/snippet.mjs +5 -5
- package/dist/components/spacer.js +8 -1
- package/dist/components/spacer.mjs +3 -3
- package/dist/components/spinner.js +8 -1
- package/dist/components/spinner.mjs +3 -3
- package/dist/components/table.js +29 -22
- package/dist/components/table.mjs +5 -5
- package/dist/components/tabs.js +13 -6
- package/dist/components/tabs.mjs +5 -5
- package/dist/components/toggle.js +36 -38
- package/dist/components/toggle.mjs +5 -5
- package/dist/components/user.d.ts +26 -27
- package/dist/components/user.js +8 -1
- package/dist/components/user.mjs +5 -5
- package/dist/index.d.ts +2 -1
- package/dist/index.js +528 -224
- package/dist/index.mjs +74 -66
- package/dist/plugin.js +24 -13
- package/dist/plugin.mjs +4 -4
- package/dist/utilities/custom.d.ts +5 -0
- package/dist/utilities/custom.js +5 -0
- package/dist/utilities/custom.mjs +1 -1
- package/dist/utilities/index.d.ts +5 -0
- package/dist/utilities/index.js +5 -0
- package/dist/utilities/index.mjs +3 -3
- package/dist/utils/cn.js +9 -2
- package/dist/utils/cn.mjs +2 -2
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +14 -7
- package/dist/utils/index.mjs +5 -5
- package/dist/utils/tv.js +8 -1
- package/dist/utils/tv.mjs +2 -2
- package/dist/utils/tw-merge-config.d.ts +17 -3
- package/dist/utils/tw-merge-config.js +8 -1
- package/dist/utils/tw-merge-config.mjs +1 -1
- package/dist/utils/variants.js +5 -5
- package/dist/utils/variants.mjs +1 -1
- package/package.json +3 -12
- /package/dist/{chunk-UVXYPGDZ.mjs → chunk-MA4DKK64.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tv
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UWE6H66T.mjs";
|
|
4
4
|
import {
|
|
5
5
|
groupDataFocusVisibleClasses
|
|
6
6
|
} from "./chunk-XHQUSKIE.mjs";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
// src/components/toggle.ts
|
|
9
9
|
var toggle = tv({
|
|
10
10
|
slots: {
|
|
11
|
-
base: "group
|
|
11
|
+
base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer touch-none tap-highlight-transparent select-none",
|
|
12
12
|
wrapper: [
|
|
13
13
|
"px-1",
|
|
14
14
|
"relative",
|
|
@@ -31,76 +31,76 @@ var toggle = tv({
|
|
|
31
31
|
"rounded-full",
|
|
32
32
|
"origin-right"
|
|
33
33
|
],
|
|
34
|
-
startContent: "z-0 absolute
|
|
35
|
-
endContent: "z-0 absolute
|
|
34
|
+
startContent: "z-0 absolute start-1.5 text-current",
|
|
35
|
+
endContent: "z-0 absolute end-1.5 text-default-600",
|
|
36
36
|
thumbIcon: "text-black",
|
|
37
|
-
label: "relative text-foreground select-none"
|
|
37
|
+
label: "relative text-foreground select-none ms-2"
|
|
38
38
|
},
|
|
39
39
|
variants: {
|
|
40
40
|
color: {
|
|
41
41
|
default: {
|
|
42
42
|
wrapper: [
|
|
43
|
-
"group-data-[selected=true]
|
|
44
|
-
"group-data-[selected=true]
|
|
43
|
+
"group-data-[selected=true]:bg-default-400",
|
|
44
|
+
"group-data-[selected=true]:text-default-foreground"
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
primary: {
|
|
48
48
|
wrapper: [
|
|
49
|
-
"group-data-[selected=true]
|
|
50
|
-
"group-data-[selected=true]
|
|
49
|
+
"group-data-[selected=true]:bg-primary",
|
|
50
|
+
"group-data-[selected=true]:text-primary-foreground"
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
53
|
secondary: {
|
|
54
54
|
wrapper: [
|
|
55
|
-
"group-data-[selected=true]
|
|
56
|
-
"group-data-[selected=true]
|
|
55
|
+
"group-data-[selected=true]:bg-secondary",
|
|
56
|
+
"group-data-[selected=true]:text-secondary-foreground"
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
success: {
|
|
60
60
|
wrapper: [
|
|
61
|
-
"group-data-[selected=true]
|
|
62
|
-
"group-data-[selected=true]
|
|
61
|
+
"group-data-[selected=true]:bg-success",
|
|
62
|
+
"group-data-[selected=true]:text-success-foreground"
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
65
|
warning: {
|
|
66
66
|
wrapper: [
|
|
67
|
-
"group-data-[selected=true]
|
|
68
|
-
"group-data-[selected=true]
|
|
67
|
+
"group-data-[selected=true]:bg-warning",
|
|
68
|
+
"group-data-[selected=true]:text-warning-foreground"
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
danger: {
|
|
72
72
|
wrapper: [
|
|
73
|
-
"group-data-[selected=true]
|
|
73
|
+
"group-data-[selected=true]:bg-danger",
|
|
74
74
|
"data-[selected=true]:text-danger-foreground"
|
|
75
75
|
]
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
size: {
|
|
79
79
|
sm: {
|
|
80
|
-
wrapper: "w-10 h-6
|
|
80
|
+
wrapper: "w-10 h-6",
|
|
81
81
|
thumb: [
|
|
82
82
|
"w-4 h-4 text-tiny",
|
|
83
|
-
"group-data-[selected=true]
|
|
83
|
+
"group-data-[selected=true]:ms-4"
|
|
84
84
|
],
|
|
85
85
|
endContent: "text-tiny",
|
|
86
86
|
startContent: "text-tiny",
|
|
87
87
|
label: "text-small"
|
|
88
88
|
},
|
|
89
89
|
md: {
|
|
90
|
-
wrapper: "w-12 h-7
|
|
90
|
+
wrapper: "w-12 h-7",
|
|
91
91
|
thumb: [
|
|
92
92
|
"w-5 h-5 text-small",
|
|
93
|
-
"group-data-[selected=true]
|
|
93
|
+
"group-data-[selected=true]:ms-5"
|
|
94
94
|
],
|
|
95
95
|
endContent: "text-small",
|
|
96
96
|
startContent: "text-small",
|
|
97
97
|
label: "text-medium"
|
|
98
98
|
},
|
|
99
99
|
lg: {
|
|
100
|
-
wrapper: "w-14 h-8
|
|
100
|
+
wrapper: "w-14 h-8",
|
|
101
101
|
thumb: [
|
|
102
102
|
"w-6 h-6 text-medium",
|
|
103
|
-
"group-data-[selected=true]
|
|
103
|
+
"group-data-[selected=true]:ms-6"
|
|
104
104
|
],
|
|
105
105
|
endContent: "text-medium",
|
|
106
106
|
startContent: "text-medium",
|
|
@@ -124,14 +124,14 @@ var toggle = tv({
|
|
|
124
124
|
"opacity-0",
|
|
125
125
|
"scale-50",
|
|
126
126
|
"transition-transform-opacity",
|
|
127
|
-
"group-data-[selected=true]
|
|
128
|
-
"group-data-[selected=true]
|
|
127
|
+
"group-data-[selected=true]:scale-100",
|
|
128
|
+
"group-data-[selected=true]:opacity-100"
|
|
129
129
|
],
|
|
130
130
|
endContent: [
|
|
131
131
|
"opacity-100",
|
|
132
132
|
"transition-transform-opacity",
|
|
133
|
-
"group-data-[selected=true]
|
|
134
|
-
"group-data-[selected=true]
|
|
133
|
+
"group-data-[selected=true]:translate-x-3",
|
|
134
|
+
"group-data-[selected=true]:opacity-0"
|
|
135
135
|
]
|
|
136
136
|
}
|
|
137
137
|
}
|
|
@@ -146,30 +146,21 @@ var toggle = tv({
|
|
|
146
146
|
disableAnimation: false,
|
|
147
147
|
size: "sm",
|
|
148
148
|
class: {
|
|
149
|
-
thumb: [
|
|
150
|
-
"group-data-[pressed=true]/toggle:w-5",
|
|
151
|
-
"group-data-[selected]/toggle:group-data-[pressed]/toggle:ml-3"
|
|
152
|
-
]
|
|
149
|
+
thumb: ["group-data-[pressed=true]:w-5", "group-data-[selected]:group-data-[pressed]:ml-3"]
|
|
153
150
|
}
|
|
154
151
|
},
|
|
155
152
|
{
|
|
156
153
|
disableAnimation: false,
|
|
157
154
|
size: "md",
|
|
158
155
|
class: {
|
|
159
|
-
thumb: [
|
|
160
|
-
"group-data-[pressed=true]/toggle:w-6",
|
|
161
|
-
"group-data-[selected]/toggle:group-data-[pressed]/toggle:ml-4"
|
|
162
|
-
]
|
|
156
|
+
thumb: ["group-data-[pressed=true]:w-6", "group-data-[selected]:group-data-[pressed]:ml-4"]
|
|
163
157
|
}
|
|
164
158
|
},
|
|
165
159
|
{
|
|
166
160
|
disableAnimation: false,
|
|
167
161
|
size: "lg",
|
|
168
162
|
class: {
|
|
169
|
-
thumb: [
|
|
170
|
-
"group-data-[pressed=true]/toggle:w-7",
|
|
171
|
-
"group-data-[selected]/toggle:group-data-[pressed]/toggle:ml-5"
|
|
172
|
-
]
|
|
163
|
+
thumb: ["group-data-[pressed=true]:w-7", "group-data-[selected]:group-data-[pressed]:ml-5"]
|
|
173
164
|
}
|
|
174
165
|
}
|
|
175
166
|
]
|
|
@@ -10,7 +10,14 @@ var twMergeConfig = {
|
|
|
10
10
|
classGroups: {
|
|
11
11
|
shadow: [{ shadow: COMMON_UNITS }],
|
|
12
12
|
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
|
|
13
|
-
"bg-image": [
|
|
13
|
+
"bg-image": [
|
|
14
|
+
"bg-stripe-gradient-default",
|
|
15
|
+
"bg-stripe-gradient-primary",
|
|
16
|
+
"bg-stripe-gradient-secondary",
|
|
17
|
+
"bg-stripe-gradient-success",
|
|
18
|
+
"bg-stripe-gradient-warning",
|
|
19
|
+
"bg-stripe-gradient-danger"
|
|
20
|
+
]
|
|
14
21
|
}
|
|
15
22
|
};
|
|
16
23
|
|
|
@@ -28,11 +28,11 @@ var bordered = {
|
|
|
28
28
|
};
|
|
29
29
|
var flat = {
|
|
30
30
|
default: "bg-default/40 text-default-700",
|
|
31
|
-
primary: "bg-primary/20 text-primary-
|
|
32
|
-
secondary: "bg-secondary/20 text-secondary-
|
|
33
|
-
success: "bg-success/20 text-success-
|
|
34
|
-
warning: "bg-warning/20 text-warning-
|
|
35
|
-
danger: "bg-danger/20 text-danger-
|
|
31
|
+
primary: "bg-primary/20 text-primary-600",
|
|
32
|
+
secondary: "bg-secondary/20 text-secondary-600",
|
|
33
|
+
success: "bg-success/20 text-success-700 dark:text-success",
|
|
34
|
+
warning: "bg-warning/20 text-warning-700 dark:text-warning",
|
|
35
|
+
danger: "bg-danger/20 text-danger-600 dark:text-danger-500",
|
|
36
36
|
foreground: "bg-foreground/10 text-foreground"
|
|
37
37
|
};
|
|
38
38
|
var faded = {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tv
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UWE6H66T.mjs";
|
|
4
4
|
|
|
5
5
|
// src/components/date-input.ts
|
|
6
6
|
var dateInput = tv({
|
|
7
7
|
slots: {
|
|
8
|
-
base: "group
|
|
8
|
+
base: "group flex flex-col",
|
|
9
9
|
label: [
|
|
10
10
|
"block subpixel-antialiased text-small text-default-600",
|
|
11
|
-
"group-data-[required=true]
|
|
12
|
-
"group-data-[invalid=true]
|
|
11
|
+
"group-data-[required=true]:after:content-['*'] group-data-[required=true]:after:text-danger group-data-[required=true]:after:ml-0.5",
|
|
12
|
+
"group-data-[invalid=true]:text-danger"
|
|
13
13
|
],
|
|
14
14
|
inputWrapper: [
|
|
15
15
|
"relative px-3 gap-3 w-full inline-flex flex-row items-center",
|
|
@@ -18,10 +18,10 @@ var dateInput = tv({
|
|
|
18
18
|
input: "flex h-full gap-x-0.5 w-full font-normal",
|
|
19
19
|
innerWrapper: [
|
|
20
20
|
"flex items-center text-default-400 w-full gap-x-2 h-6",
|
|
21
|
-
"group-data-[invalid=true]
|
|
21
|
+
"group-data-[invalid=true]:text-danger"
|
|
22
22
|
],
|
|
23
23
|
segment: [
|
|
24
|
-
"group
|
|
24
|
+
"group first:-ml-0.5 [&:not(:first-child)]:-ml-1 px-0.5 my-auto box-content tabular-nums text-start",
|
|
25
25
|
"inline-block outline-none focus:shadow-sm rounded-md",
|
|
26
26
|
"text-foreground-500 data-[editable=true]:text-foreground",
|
|
27
27
|
"data-[editable=true]:data-[placeholder=true]:text-foreground-500",
|
|
@@ -29,7 +29,7 @@ var dateInput = tv({
|
|
|
29
29
|
"data-[invalid=true]:focus:bg-danger-400/50 dark:data-[invalid=true]:focus:bg-danger-400/20",
|
|
30
30
|
"data-[invalid=true]:data-[editable=true]:focus:text-danger"
|
|
31
31
|
],
|
|
32
|
-
helperWrapper: "hidden group-data-[has-helper=true]
|
|
32
|
+
helperWrapper: "hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",
|
|
33
33
|
description: "text-tiny text-foreground-400",
|
|
34
34
|
errorMessage: "text-tiny text-danger"
|
|
35
35
|
},
|
|
@@ -40,9 +40,9 @@ var dateInput = tv({
|
|
|
40
40
|
"bg-default-100",
|
|
41
41
|
"hover:bg-default-200",
|
|
42
42
|
"focus-within:hover:bg-default-100",
|
|
43
|
-
"group-data-[invalid=true]
|
|
44
|
-
"group-data-[invalid=true]
|
|
45
|
-
"group-data-[invalid=true]
|
|
43
|
+
"group-data-[invalid=true]:bg-danger-50",
|
|
44
|
+
"group-data-[invalid=true]:hover:bg-danger-100",
|
|
45
|
+
"group-data-[invalid=true]:focus-within:hover:bg-danger-50"
|
|
46
46
|
]
|
|
47
47
|
},
|
|
48
48
|
faded: {
|
|
@@ -51,9 +51,9 @@ var dateInput = tv({
|
|
|
51
51
|
"border-medium",
|
|
52
52
|
"border-default-200",
|
|
53
53
|
"hover:border-default-400",
|
|
54
|
-
"group-data-[invalid=true]
|
|
55
|
-
"group-data-[invalid=true]
|
|
56
|
-
"group-data-[invalid=true]
|
|
54
|
+
"group-data-[invalid=true]:bg-danger-50",
|
|
55
|
+
"group-data-[invalid=true]:hover:bg-danger-100",
|
|
56
|
+
"group-data-[invalid=true]:focus-within:hover:bg-danger-50"
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
bordered: {
|
|
@@ -63,9 +63,9 @@ var dateInput = tv({
|
|
|
63
63
|
"hover:border-default-400",
|
|
64
64
|
"focus-within:border-default-foreground",
|
|
65
65
|
"focus-within:hover:border-default-foreground",
|
|
66
|
-
"group-data-[invalid=true]
|
|
67
|
-
"group-data-[invalid=true]
|
|
68
|
-
"group-data-[invalid=true]
|
|
66
|
+
"group-data-[invalid=true]:border-danger",
|
|
67
|
+
"group-data-[invalid=true]:hover:border-danger",
|
|
68
|
+
"group-data-[invalid=true]:focus-within:hover:border-danger"
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
underlined: {
|
|
@@ -90,7 +90,7 @@ var dateInput = tv({
|
|
|
90
90
|
"after:-bottom-[2px]",
|
|
91
91
|
"after:h-[2px]",
|
|
92
92
|
"focus-within:after:w-full",
|
|
93
|
-
"group-data-[invalid=true]
|
|
93
|
+
"group-data-[invalid=true]:after:bg-danger"
|
|
94
94
|
]
|
|
95
95
|
}
|
|
96
96
|
},
|
|
@@ -151,13 +151,13 @@ var dateInput = tv({
|
|
|
151
151
|
outside: {
|
|
152
152
|
base: "flex flex-col data-[has-helper=true]:pb-[calc(theme(fontSize.tiny)_+8px)] gap-y-1.5",
|
|
153
153
|
label: "w-full text-foreground",
|
|
154
|
-
helperWrapper: "absolute top-[calc(100%_+_2px)]
|
|
154
|
+
helperWrapper: "absolute top-[calc(100%_+_2px)] start-0"
|
|
155
155
|
},
|
|
156
156
|
"outside-left": {
|
|
157
157
|
base: "flex-row items-center data-[has-helper=true]:pb-[calc(theme(fontSize.tiny)_+_8px)] gap-x-2 flex-nowrap",
|
|
158
158
|
label: "relative text-foreground",
|
|
159
159
|
inputWrapper: "relative flex-1",
|
|
160
|
-
helperWrapper: "absolute top-[calc(100%_+_2px)]
|
|
160
|
+
helperWrapper: "absolute top-[calc(100%_+_2px)] start-0"
|
|
161
161
|
},
|
|
162
162
|
inside: {
|
|
163
163
|
label: "w-full text-tiny cursor-text",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tv
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UWE6H66T.mjs";
|
|
4
4
|
import {
|
|
5
5
|
dataFocusVisibleClasses
|
|
6
6
|
} from "./chunk-XHQUSKIE.mjs";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
// src/components/select.ts
|
|
9
9
|
var select = tv({
|
|
10
10
|
slots: {
|
|
11
|
-
base: ["group
|
|
11
|
+
base: ["group inline-flex flex-col relative"],
|
|
12
12
|
label: [
|
|
13
13
|
"block",
|
|
14
14
|
"absolute",
|
|
@@ -25,7 +25,7 @@ var select = tv({
|
|
|
25
25
|
innerWrapper: "inline-flex h-full w-[calc(100%_-_theme(spacing.6))] min-h-4 items-center gap-1.5 box-border",
|
|
26
26
|
selectorIcon: "absolute end-3 w-4 h-4",
|
|
27
27
|
spinner: "absolute end-3",
|
|
28
|
-
value: ["text-foreground-500", "font-normal", "w-full", "text-
|
|
28
|
+
value: ["text-foreground-500", "font-normal", "w-full", "text-start"],
|
|
29
29
|
listboxWrapper: "scroll-py-6 max-h-64 w-full",
|
|
30
30
|
listbox: "",
|
|
31
31
|
popoverContent: "w-full p-1 overflow-hidden",
|
|
@@ -39,7 +39,7 @@ var select = tv({
|
|
|
39
39
|
trigger: [
|
|
40
40
|
"bg-default-100",
|
|
41
41
|
"data-[hover=true]:bg-default-200",
|
|
42
|
-
"group-data-[focus=true]
|
|
42
|
+
"group-data-[focus=true]:bg-default-100"
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
45
|
faded: {
|
|
@@ -50,7 +50,7 @@ var select = tv({
|
|
|
50
50
|
"border-default-200",
|
|
51
51
|
"data-[hover=true]:border-default-400"
|
|
52
52
|
],
|
|
53
|
-
value: "group-data-[has-value=true]
|
|
53
|
+
value: "group-data-[has-value=true]:text-default-foreground"
|
|
54
54
|
},
|
|
55
55
|
bordered: {
|
|
56
56
|
trigger: [
|
|
@@ -87,7 +87,7 @@ var select = tv({
|
|
|
87
87
|
"data-[open=true]:after:w-full",
|
|
88
88
|
"data-[focus=true]:after:w-full"
|
|
89
89
|
],
|
|
90
|
-
value: "group-data-[has-value=true]
|
|
90
|
+
value: "group-data-[has-value=true]:text-default-foreground"
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
color: {
|
|
@@ -146,6 +146,9 @@ var select = tv({
|
|
|
146
146
|
fullWidth: {
|
|
147
147
|
true: {
|
|
148
148
|
base: "w-full"
|
|
149
|
+
},
|
|
150
|
+
false: {
|
|
151
|
+
base: "min-w-40"
|
|
149
152
|
}
|
|
150
153
|
},
|
|
151
154
|
isDisabled: {
|
|
@@ -218,7 +221,7 @@ var select = tv({
|
|
|
218
221
|
variant: "flat",
|
|
219
222
|
color: "default",
|
|
220
223
|
class: {
|
|
221
|
-
value: "group-data-[has-value=true]
|
|
224
|
+
value: "group-data-[has-value=true]:text-default-foreground",
|
|
222
225
|
trigger: ["bg-default-100", "data-[hover=true]:bg-default-50"]
|
|
223
226
|
}
|
|
224
227
|
},
|
|
@@ -230,7 +233,7 @@ var select = tv({
|
|
|
230
233
|
"bg-primary-100",
|
|
231
234
|
"text-primary",
|
|
232
235
|
"data-[hover=true]:bg-primary-50",
|
|
233
|
-
"group-data-[focus=true]
|
|
236
|
+
"group-data-[focus=true]:bg-primary-50"
|
|
234
237
|
],
|
|
235
238
|
value: "text-primary",
|
|
236
239
|
label: "text-primary"
|
|
@@ -244,7 +247,7 @@ var select = tv({
|
|
|
244
247
|
"bg-secondary-100",
|
|
245
248
|
"text-secondary",
|
|
246
249
|
"data-[hover=true]:bg-secondary-50",
|
|
247
|
-
"group-data-[focus=true]
|
|
250
|
+
"group-data-[focus=true]:bg-secondary-50"
|
|
248
251
|
],
|
|
249
252
|
value: "text-secondary",
|
|
250
253
|
label: "text-secondary"
|
|
@@ -259,7 +262,7 @@ var select = tv({
|
|
|
259
262
|
"text-success-600",
|
|
260
263
|
"dark:text-success",
|
|
261
264
|
"data-[hover=true]:bg-success-50",
|
|
262
|
-
"group-data-[focus=true]
|
|
265
|
+
"group-data-[focus=true]:bg-success-50"
|
|
263
266
|
],
|
|
264
267
|
value: "text-success-600 dark:text-success",
|
|
265
268
|
label: "text-success-600 dark:text-success"
|
|
@@ -274,7 +277,7 @@ var select = tv({
|
|
|
274
277
|
"text-warning-600",
|
|
275
278
|
"dark:text-warning",
|
|
276
279
|
"data-[hover=true]:bg-warning-50",
|
|
277
|
-
"group-data-[focus=true]
|
|
280
|
+
"group-data-[focus=true]:bg-warning-50"
|
|
278
281
|
],
|
|
279
282
|
value: "text-warning-600 dark:text-warning",
|
|
280
283
|
label: "text-warning-600 dark:text-warning"
|
|
@@ -289,7 +292,7 @@ var select = tv({
|
|
|
289
292
|
"text-danger",
|
|
290
293
|
"dark:text-danger-500",
|
|
291
294
|
"data-[hover=true]:bg-danger-50",
|
|
292
|
-
"group-data-[focus=true]
|
|
295
|
+
"group-data-[focus=true]:bg-danger-50"
|
|
293
296
|
],
|
|
294
297
|
value: "text-danger dark:text-danger-500",
|
|
295
298
|
label: "text-danger dark:text-danger-500"
|
|
@@ -339,7 +342,7 @@ var select = tv({
|
|
|
339
342
|
variant: "underlined",
|
|
340
343
|
color: "default",
|
|
341
344
|
class: {
|
|
342
|
-
value: "group-data-[has-value=true]
|
|
345
|
+
value: "group-data-[has-value=true]:text-foreground"
|
|
343
346
|
}
|
|
344
347
|
},
|
|
345
348
|
{
|
|
@@ -426,14 +429,14 @@ var select = tv({
|
|
|
426
429
|
labelPlacement: "inside",
|
|
427
430
|
color: "default",
|
|
428
431
|
class: {
|
|
429
|
-
label: "group-data-[filled=true]
|
|
432
|
+
label: "group-data-[filled=true]:text-default-600"
|
|
430
433
|
}
|
|
431
434
|
},
|
|
432
435
|
{
|
|
433
436
|
labelPlacement: "outside",
|
|
434
437
|
color: "default",
|
|
435
438
|
class: {
|
|
436
|
-
label: "group-data-[filled=true]
|
|
439
|
+
label: "group-data-[filled=true]:text-foreground"
|
|
437
440
|
}
|
|
438
441
|
},
|
|
439
442
|
{
|
|
@@ -486,7 +489,7 @@ var select = tv({
|
|
|
486
489
|
trigger: [
|
|
487
490
|
"bg-danger-50",
|
|
488
491
|
"data-[hover=true]:bg-danger-100",
|
|
489
|
-
"group-data-[focus=true]
|
|
492
|
+
"group-data-[focus=true]:bg-danger-50"
|
|
490
493
|
]
|
|
491
494
|
}
|
|
492
495
|
},
|
|
@@ -494,7 +497,7 @@ var select = tv({
|
|
|
494
497
|
isInvalid: true,
|
|
495
498
|
variant: "bordered",
|
|
496
499
|
class: {
|
|
497
|
-
trigger: "!border-danger group-data-[focus=true]
|
|
500
|
+
trigger: "!border-danger group-data-[focus=true]:border-danger"
|
|
498
501
|
}
|
|
499
502
|
},
|
|
500
503
|
{
|
|
@@ -531,19 +534,13 @@ var select = tv({
|
|
|
531
534
|
isMultiline: false,
|
|
532
535
|
class: {
|
|
533
536
|
base: "group relative justify-end",
|
|
534
|
-
label: [
|
|
535
|
-
"pb-0",
|
|
536
|
-
"z-20",
|
|
537
|
-
"top-1/2",
|
|
538
|
-
"-translate-y-1/2",
|
|
539
|
-
"group-data-[filled=true]/select:start-0"
|
|
540
|
-
]
|
|
537
|
+
label: ["pb-0", "z-20", "top-1/2", "-translate-y-1/2", "group-data-[filled=true]:start-0"]
|
|
541
538
|
}
|
|
542
539
|
},
|
|
543
540
|
{
|
|
544
541
|
labelPlacement: ["inside"],
|
|
545
542
|
class: {
|
|
546
|
-
label: "group-data-[filled=true]
|
|
543
|
+
label: "group-data-[filled=true]:scale-85"
|
|
547
544
|
}
|
|
548
545
|
},
|
|
549
546
|
{
|
|
@@ -558,10 +555,8 @@ var select = tv({
|
|
|
558
555
|
isMultiline: false,
|
|
559
556
|
size: "sm",
|
|
560
557
|
class: {
|
|
561
|
-
label: [
|
|
562
|
-
|
|
563
|
-
],
|
|
564
|
-
innerWrapper: "group-data-[has-label=true]/select:pt-4"
|
|
558
|
+
label: ["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px)]"],
|
|
559
|
+
innerWrapper: "group-data-[has-label=true]:pt-4"
|
|
565
560
|
}
|
|
566
561
|
},
|
|
567
562
|
{
|
|
@@ -570,9 +565,9 @@ var select = tv({
|
|
|
570
565
|
size: "md",
|
|
571
566
|
class: {
|
|
572
567
|
label: [
|
|
573
|
-
"group-data-[filled=true]
|
|
568
|
+
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px)]"
|
|
574
569
|
],
|
|
575
|
-
innerWrapper: "group-data-[has-label=true]
|
|
570
|
+
innerWrapper: "group-data-[has-label=true]:pt-4"
|
|
576
571
|
}
|
|
577
572
|
},
|
|
578
573
|
{
|
|
@@ -582,9 +577,9 @@ var select = tv({
|
|
|
582
577
|
class: {
|
|
583
578
|
label: [
|
|
584
579
|
"text-medium",
|
|
585
|
-
"group-data-[filled=true]
|
|
580
|
+
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px)]"
|
|
586
581
|
],
|
|
587
|
-
innerWrapper: "group-data-[has-label=true]
|
|
582
|
+
innerWrapper: "group-data-[has-label=true]:pt-5"
|
|
588
583
|
}
|
|
589
584
|
},
|
|
590
585
|
{
|
|
@@ -594,7 +589,7 @@ var select = tv({
|
|
|
594
589
|
size: "sm",
|
|
595
590
|
class: {
|
|
596
591
|
label: [
|
|
597
|
-
"group-data-[filled=true]
|
|
592
|
+
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px_-_theme(borderWidth.medium))]"
|
|
598
593
|
]
|
|
599
594
|
}
|
|
600
595
|
},
|
|
@@ -605,7 +600,7 @@ var select = tv({
|
|
|
605
600
|
size: "md",
|
|
606
601
|
class: {
|
|
607
602
|
label: [
|
|
608
|
-
"group-data-[filled=true]
|
|
603
|
+
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px_-_theme(borderWidth.medium))]"
|
|
609
604
|
]
|
|
610
605
|
}
|
|
611
606
|
},
|
|
@@ -617,7 +612,7 @@ var select = tv({
|
|
|
617
612
|
class: {
|
|
618
613
|
label: [
|
|
619
614
|
"text-medium",
|
|
620
|
-
"group-data-[filled=true]
|
|
615
|
+
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px_-_theme(borderWidth.medium))]"
|
|
621
616
|
]
|
|
622
617
|
}
|
|
623
618
|
},
|
|
@@ -627,9 +622,7 @@ var select = tv({
|
|
|
627
622
|
isMultiline: false,
|
|
628
623
|
size: "sm",
|
|
629
624
|
class: {
|
|
630
|
-
label: [
|
|
631
|
-
"group-data-[filled=true]/select:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_5px)]"
|
|
632
|
-
]
|
|
625
|
+
label: ["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_5px)]"]
|
|
633
626
|
}
|
|
634
627
|
},
|
|
635
628
|
{
|
|
@@ -639,7 +632,7 @@ var select = tv({
|
|
|
639
632
|
size: "md",
|
|
640
633
|
class: {
|
|
641
634
|
label: [
|
|
642
|
-
"group-data-[filled=true]
|
|
635
|
+
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_3.5px)]"
|
|
643
636
|
]
|
|
644
637
|
}
|
|
645
638
|
},
|
|
@@ -651,7 +644,7 @@ var select = tv({
|
|
|
651
644
|
class: {
|
|
652
645
|
label: [
|
|
653
646
|
"text-medium",
|
|
654
|
-
"group-data-[filled=true]
|
|
647
|
+
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_4px)]"
|
|
655
648
|
]
|
|
656
649
|
}
|
|
657
650
|
},
|
|
@@ -663,7 +656,7 @@ var select = tv({
|
|
|
663
656
|
label: [
|
|
664
657
|
"start-2",
|
|
665
658
|
"text-tiny",
|
|
666
|
-
"group-data-[filled=true]
|
|
659
|
+
"group-data-[filled=true]:-translate-y-[calc(100%_+_theme(fontSize.tiny)/2_+_16px)]"
|
|
667
660
|
],
|
|
668
661
|
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_8px)]"
|
|
669
662
|
}
|
|
@@ -676,7 +669,7 @@ var select = tv({
|
|
|
676
669
|
label: [
|
|
677
670
|
"start-3",
|
|
678
671
|
"text-small",
|
|
679
|
-
"group-data-[filled=true]
|
|
672
|
+
"group-data-[filled=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_20px)]"
|
|
680
673
|
],
|
|
681
674
|
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_10px)]"
|
|
682
675
|
}
|
|
@@ -689,7 +682,7 @@ var select = tv({
|
|
|
689
682
|
label: [
|
|
690
683
|
"start-3",
|
|
691
684
|
"text-medium",
|
|
692
|
-
"group-data-[filled=true]
|
|
685
|
+
"group-data-[filled=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_24px)]"
|
|
693
686
|
],
|
|
694
687
|
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_12px)]"
|
|
695
688
|
}
|