@nextui-org/theme 2.1.8 → 2.1.10
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-77O7KLUI.mjs → chunk-362LGETO.mjs} +1 -1
- package/dist/{chunk-23KK2ZAZ.mjs → chunk-5GLH2ERS.mjs} +2 -2
- package/dist/{chunk-RYOZQSNI.mjs → chunk-6XG3Y4GM.mjs} +12 -7
- package/dist/chunk-76A2UI6G.mjs +243 -0
- package/dist/chunk-AQDGQGUV.mjs +391 -0
- package/dist/{chunk-NAY2XKLY.mjs → chunk-B6QMTIF2.mjs} +1 -1
- package/dist/{chunk-LGRQRHJJ.mjs → chunk-BR6V72YY.mjs} +6 -3
- package/dist/{chunk-PJV3MWBL.mjs → chunk-C3KZKKPN.mjs} +182 -49
- package/dist/{chunk-2T5RQ7SK.mjs → chunk-CLW3JMFF.mjs} +36 -6
- package/dist/{chunk-NW5W5ANO.mjs → chunk-DGMET46Q.mjs} +4 -3
- package/dist/{chunk-WBNF66V7.mjs → chunk-F36W5Y6O.mjs} +1 -1
- package/dist/{chunk-GNLIYZAQ.mjs → chunk-FUMNSN2H.mjs} +1 -1
- package/dist/{chunk-KPK2JQIF.mjs → chunk-G3PB7L4N.mjs} +10 -0
- package/dist/{chunk-4DKVPW5Z.mjs → chunk-HBLCAYSX.mjs} +2 -2
- package/dist/{chunk-XPLXQDB3.mjs → chunk-HYA3WURA.mjs} +1 -1
- package/dist/{chunk-UHF2F2WJ.mjs → chunk-I5E37FAL.mjs} +4 -4
- package/dist/{chunk-RPMLQF4Y.mjs → chunk-J6EGGODL.mjs} +5 -5
- package/dist/{chunk-XY766PDD.mjs → chunk-J7FVLFSZ.mjs} +1 -1
- package/dist/{chunk-GKYVNUGL.mjs → chunk-JMOQB2OS.mjs} +3 -3
- package/dist/{chunk-EUS2SEYI.mjs → chunk-JX6O4KJS.mjs} +2 -2
- package/dist/{chunk-YSXRNNDV.mjs → chunk-N7N2LONM.mjs} +1 -1
- package/dist/{chunk-RHIZZ5XX.mjs → chunk-ODGTGSNM.mjs} +2 -2
- package/dist/{chunk-EC4F6RJF.mjs → chunk-PFGLTKGJ.mjs} +1 -1
- package/dist/{chunk-FZZINZOQ.mjs → chunk-QF56VSRK.mjs} +23 -6
- package/dist/{chunk-YKWIBFFV.mjs → chunk-QWYWYOG6.mjs} +18 -4
- package/dist/{chunk-Y32IWEMZ.mjs → chunk-S7W5DQP2.mjs} +3 -3
- package/dist/{chunk-F76574GG.mjs → chunk-SCQJ4BM3.mjs} +105 -39
- package/dist/{chunk-TIMHSW45.mjs → chunk-TUUOVVH3.mjs} +2 -2
- package/dist/{chunk-B55QBA5E.mjs → chunk-VD4MGTVP.mjs} +1 -1
- package/dist/{chunk-4JBYJQSP.mjs → chunk-VGHVBXXT.mjs} +1 -1
- package/dist/{chunk-WM43BKYH.mjs → chunk-VOTIIGIW.mjs} +3 -3
- package/dist/{chunk-O24TFHPZ.mjs → chunk-VPYXYIZ5.mjs} +2 -2
- package/dist/{chunk-ADNJ6GPZ.mjs → chunk-VU5TSYMO.mjs} +2 -2
- package/dist/{chunk-7MCHEQXT.mjs → chunk-VZI6SR6H.mjs} +4 -1
- package/dist/chunk-WBUVHAJX.mjs +37 -0
- package/dist/chunk-WHT6K6RC.mjs +58 -0
- package/dist/chunk-WNVF6X3M.mjs +171 -0
- package/dist/{chunk-Y33ZY7KH.mjs → chunk-WYVG7NY6.mjs} +34 -5
- package/dist/{chunk-LQGOKGQV.mjs → chunk-XHQNEGB6.mjs} +1 -1
- package/dist/{chunk-T7JNS25F.mjs → chunk-XHQUSKIE.mjs} +10 -1
- package/dist/{chunk-MOHT4OBR.mjs → chunk-XNF3KCH7.mjs} +2 -2
- package/dist/{chunk-XJU7LDVX.mjs → chunk-Y5WLFHBC.mjs} +74 -9
- package/dist/{chunk-XCWQAA5D.mjs → chunk-YRDQW7V4.mjs} +5 -5
- package/dist/components/accordion.js +27 -34
- package/dist/components/accordion.mjs +3 -3
- package/dist/components/autocomplete.d.ts +180 -0
- package/dist/components/autocomplete.js +165 -0
- package/dist/components/autocomplete.mjs +8 -0
- package/dist/components/avatar.js +28 -35
- package/dist/components/avatar.mjs +3 -3
- package/dist/components/badge.d.ts +7 -7
- package/dist/components/badge.js +29 -36
- package/dist/components/badge.mjs +3 -3
- package/dist/components/breadcrumbs.d.ts +816 -0
- package/dist/components/breadcrumbs.js +357 -0
- package/dist/components/breadcrumbs.mjs +14 -0
- package/dist/components/button.d.ts +7 -7
- package/dist/components/button.js +104 -39
- package/dist/components/button.mjs +3 -3
- package/dist/components/card.js +26 -33
- package/dist/components/card.mjs +3 -3
- package/dist/components/checkbox.d.ts +163 -36
- package/dist/components/checkbox.js +59 -36
- package/dist/components/checkbox.mjs +3 -3
- package/dist/components/chip.js +26 -33
- package/dist/components/chip.mjs +3 -3
- package/dist/components/circular-progress.js +25 -32
- package/dist/components/circular-progress.mjs +2 -2
- package/dist/components/code.js +25 -32
- package/dist/components/code.mjs +3 -3
- package/dist/components/divider.js +25 -32
- package/dist/components/divider.mjs +2 -2
- package/dist/components/drip.d.ts +29 -3
- package/dist/components/drip.js +25 -32
- package/dist/components/drip.mjs +2 -2
- package/dist/components/dropdown.d.ts +103 -35
- package/dist/components/dropdown.js +25 -32
- package/dist/components/dropdown.mjs +3 -3
- package/dist/components/image.js +25 -32
- package/dist/components/image.mjs +2 -2
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.js +1271 -231
- package/dist/components/index.mjs +62 -48
- package/dist/components/input.d.ts +34 -41
- package/dist/components/input.js +205 -79
- package/dist/components/input.mjs +3 -3
- package/dist/components/kbd.js +25 -32
- package/dist/components/kbd.mjs +2 -2
- package/dist/components/link.js +25 -32
- package/dist/components/link.mjs +3 -3
- package/dist/components/listbox.d.ts +1 -1
- package/dist/components/listbox.js +41 -34
- package/dist/components/listbox.mjs +3 -3
- package/dist/components/menu.d.ts +119 -40
- package/dist/components/menu.js +41 -34
- package/dist/components/menu.mjs +3 -3
- package/dist/components/modal.js +25 -32
- package/dist/components/modal.mjs +3 -3
- package/dist/components/navbar.js +29 -33
- package/dist/components/navbar.mjs +3 -3
- package/dist/components/pagination.js +46 -36
- package/dist/components/pagination.mjs +3 -3
- package/dist/components/popover.d.ts +136 -132
- package/dist/components/popover.js +98 -94
- package/dist/components/popover.mjs +3 -3
- package/dist/components/progress.js +25 -32
- package/dist/components/progress.mjs +2 -2
- package/dist/components/radio.d.ts +135 -36
- package/dist/components/radio.js +57 -35
- package/dist/components/radio.mjs +3 -3
- package/dist/components/scroll-shadow.js +25 -32
- package/dist/components/scroll-shadow.mjs +2 -2
- package/dist/components/select.d.ts +30 -51
- package/dist/components/select.js +128 -69
- package/dist/components/select.mjs +3 -3
- package/dist/components/skeleton.js +26 -33
- package/dist/components/skeleton.mjs +2 -2
- package/dist/components/slider.d.ts +1024 -0
- package/dist/components/slider.js +504 -0
- package/dist/components/slider.mjs +12 -0
- package/dist/components/snippet.js +25 -32
- package/dist/components/snippet.mjs +3 -3
- package/dist/components/spacer.js +25 -32
- package/dist/components/spacer.mjs +2 -2
- package/dist/components/spinner.js +25 -32
- package/dist/components/spinner.mjs +2 -2
- package/dist/components/table.js +25 -32
- package/dist/components/table.mjs +3 -3
- package/dist/components/tabs.js +25 -32
- package/dist/components/tabs.mjs +3 -3
- package/dist/components/toggle.js +25 -32
- package/dist/components/toggle.mjs +3 -3
- package/dist/components/user.d.ts +45 -29
- package/dist/components/user.js +25 -32
- package/dist/components/user.mjs +3 -3
- package/dist/default-layout.js +4 -1
- package/dist/default-layout.mjs +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +1381 -320
- package/dist/index.mjs +69 -53
- package/dist/plugin.js +24 -5
- package/dist/plugin.mjs +6 -6
- package/dist/types.d.ts +8 -0
- package/dist/utilities/index.d.ts +10 -0
- package/dist/utilities/index.js +10 -0
- package/dist/utilities/index.mjs +2 -2
- package/dist/utilities/transition.d.ts +10 -0
- package/dist/utilities/transition.js +10 -0
- package/dist/utilities/transition.mjs +1 -1
- package/dist/utils/classes.d.ts +13 -1
- package/dist/utils/classes.js +10 -0
- package/dist/utils/classes.mjs +3 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +10 -0
- package/dist/utils/index.mjs +3 -1
- package/dist/utils/theme.js +4 -3
- package/dist/utils/theme.mjs +1 -1
- package/dist/utils/tv.d.ts +2 -2
- package/dist/utils/tv.js +25 -32
- package/dist/utils/tv.mjs +1 -1
- package/package.json +9 -9
- package/dist/chunk-6AEINX52.mjs +0 -44
- package/dist/chunk-SN5GEHHN.mjs +0 -160
- /package/dist/{chunk-RH7YHIQY.mjs → chunk-T6HAGWX5.mjs} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
utilities
|
|
3
|
+
} from "./chunk-S7W5DQP2.mjs";
|
|
1
4
|
import {
|
|
2
5
|
createSpacingUnits,
|
|
3
6
|
generateSpacingScale,
|
|
4
7
|
isBaseTheme
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
utilities
|
|
8
|
-
} from "./chunk-Y32IWEMZ.mjs";
|
|
8
|
+
} from "./chunk-DGMET46Q.mjs";
|
|
9
9
|
import {
|
|
10
10
|
baseStyles
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XHQUSKIE.mjs";
|
|
12
12
|
import {
|
|
13
13
|
semanticColors
|
|
14
14
|
} from "./chunk-G4RCK475.mjs";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
darkLayout,
|
|
20
20
|
defaultLayout,
|
|
21
21
|
lightLayout
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VZI6SR6H.mjs";
|
|
23
23
|
import {
|
|
24
24
|
animations
|
|
25
25
|
} from "./chunk-DMASP6FA.mjs";
|
|
@@ -100,6 +100,9 @@ var resolveConfig = (themes = {}, defaultTheme, prefix) => {
|
|
|
100
100
|
});
|
|
101
101
|
} else {
|
|
102
102
|
const layoutVariable = `--${prefix}-${key}`;
|
|
103
|
+
if (layoutVariable.includes("opacity") && typeof value === "number") {
|
|
104
|
+
value = value.toString().replace(/^0\./, ".");
|
|
105
|
+
}
|
|
103
106
|
resolved.utilities[cssSelector][layoutVariable] = value;
|
|
104
107
|
}
|
|
105
108
|
});
|
|
@@ -146,7 +149,8 @@ var corePlugin = (themes = {}, defaultTheme, prefix, addCommonColors) => {
|
|
|
146
149
|
...resolved.colors
|
|
147
150
|
},
|
|
148
151
|
scale: {
|
|
149
|
-
"80": "0.8"
|
|
152
|
+
"80": "0.8",
|
|
153
|
+
"85": "0.85"
|
|
150
154
|
},
|
|
151
155
|
height: {
|
|
152
156
|
divider: `var(--${prefix}-divider-weight)`
|
|
@@ -176,6 +180,7 @@ var corePlugin = (themes = {}, defaultTheme, prefix, addCommonColors) => {
|
|
|
176
180
|
large: `var(--${prefix}-radius-large)`
|
|
177
181
|
},
|
|
178
182
|
opacity: {
|
|
183
|
+
hover: `var(--${prefix}-hover-opacity)`,
|
|
179
184
|
disabled: `var(--${prefix}-disabled-opacity)`
|
|
180
185
|
},
|
|
181
186
|
borderWidth: {
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import {
|
|
2
|
+
tv
|
|
3
|
+
} from "./chunk-WBUVHAJX.mjs";
|
|
4
|
+
import {
|
|
5
|
+
dataFocusVisibleClasses
|
|
6
|
+
} from "./chunk-XHQUSKIE.mjs";
|
|
7
|
+
|
|
8
|
+
// src/components/breadcrumbs.ts
|
|
9
|
+
var breadcrumbItem = tv({
|
|
10
|
+
slots: {
|
|
11
|
+
base: "flex items-center",
|
|
12
|
+
item: [
|
|
13
|
+
"flex gap-1 items-center",
|
|
14
|
+
"cursor-pointer",
|
|
15
|
+
"whitespace-nowrap",
|
|
16
|
+
"line-clamp-1",
|
|
17
|
+
"outline-none",
|
|
18
|
+
"tap-highlight-transparent",
|
|
19
|
+
...dataFocusVisibleClasses
|
|
20
|
+
],
|
|
21
|
+
separator: "text-default-400 px-1"
|
|
22
|
+
},
|
|
23
|
+
variants: {
|
|
24
|
+
color: {
|
|
25
|
+
foreground: {
|
|
26
|
+
item: "text-foreground/50",
|
|
27
|
+
separator: "text-foreground/50"
|
|
28
|
+
},
|
|
29
|
+
primary: {
|
|
30
|
+
item: "text-primary/80",
|
|
31
|
+
separator: "text-primary/80"
|
|
32
|
+
},
|
|
33
|
+
secondary: {
|
|
34
|
+
item: "text-secondary/80",
|
|
35
|
+
separator: "text-secondary/80"
|
|
36
|
+
},
|
|
37
|
+
success: {
|
|
38
|
+
item: "text-success/80",
|
|
39
|
+
separator: "text-success/80"
|
|
40
|
+
},
|
|
41
|
+
warning: {
|
|
42
|
+
item: "text-warning/80",
|
|
43
|
+
separator: "text-warning/80"
|
|
44
|
+
},
|
|
45
|
+
danger: {
|
|
46
|
+
item: "text-danger/80",
|
|
47
|
+
separator: "text-danger/80"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
size: {
|
|
51
|
+
sm: {
|
|
52
|
+
item: "text-tiny"
|
|
53
|
+
},
|
|
54
|
+
md: {
|
|
55
|
+
item: "text-small"
|
|
56
|
+
},
|
|
57
|
+
lg: {
|
|
58
|
+
item: "text-medium"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
underline: {
|
|
62
|
+
none: {
|
|
63
|
+
item: "no-underline"
|
|
64
|
+
},
|
|
65
|
+
hover: {
|
|
66
|
+
item: "hover:underline"
|
|
67
|
+
},
|
|
68
|
+
always: {
|
|
69
|
+
item: "underline"
|
|
70
|
+
},
|
|
71
|
+
active: {
|
|
72
|
+
item: "active:underline"
|
|
73
|
+
},
|
|
74
|
+
focus: {
|
|
75
|
+
item: "focus:underline"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
isCurrent: {
|
|
79
|
+
true: {
|
|
80
|
+
item: "cursor-default"
|
|
81
|
+
},
|
|
82
|
+
false: {
|
|
83
|
+
item: ["hover:opacity-80", "active:opacity-disabled"]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
isDisabled: {
|
|
87
|
+
true: {
|
|
88
|
+
item: "opacity-disabled pointer-events-none",
|
|
89
|
+
separator: "opacity-disabled"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
disableAnimation: {
|
|
93
|
+
false: {
|
|
94
|
+
item: "transition-opacity"
|
|
95
|
+
},
|
|
96
|
+
true: {
|
|
97
|
+
item: "transition-none"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
defaultVariants: {
|
|
102
|
+
size: "md",
|
|
103
|
+
color: "foreground",
|
|
104
|
+
underline: "hover",
|
|
105
|
+
isDisabled: false,
|
|
106
|
+
disableAnimation: false
|
|
107
|
+
},
|
|
108
|
+
compoundVariants: [
|
|
109
|
+
{
|
|
110
|
+
isCurrent: true,
|
|
111
|
+
color: "foreground",
|
|
112
|
+
class: {
|
|
113
|
+
item: "text-foreground"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
isCurrent: true,
|
|
118
|
+
color: "primary",
|
|
119
|
+
class: {
|
|
120
|
+
item: "text-primary"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
isCurrent: true,
|
|
125
|
+
color: "secondary",
|
|
126
|
+
class: {
|
|
127
|
+
item: "text-secondary"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
isCurrent: true,
|
|
132
|
+
color: "success",
|
|
133
|
+
class: {
|
|
134
|
+
item: "text-success"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
isCurrent: true,
|
|
139
|
+
color: "warning",
|
|
140
|
+
class: {
|
|
141
|
+
item: "text-warning"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
isCurrent: true,
|
|
146
|
+
color: "danger",
|
|
147
|
+
class: {
|
|
148
|
+
item: "text-danger"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
isCurrent: false,
|
|
153
|
+
underline: "none",
|
|
154
|
+
class: {
|
|
155
|
+
item: "no-underline"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
underline: ["hover", "always", "active", "focus"],
|
|
160
|
+
class: "underline-offset-4"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
});
|
|
164
|
+
var breadcrumbs = tv({
|
|
165
|
+
slots: {
|
|
166
|
+
base: "",
|
|
167
|
+
list: "flex flex-wrap list-none",
|
|
168
|
+
ellipsis: "text-medium",
|
|
169
|
+
separator: "text-default-400 px-1"
|
|
170
|
+
},
|
|
171
|
+
variants: {
|
|
172
|
+
size: {
|
|
173
|
+
sm: {},
|
|
174
|
+
md: {},
|
|
175
|
+
lg: {}
|
|
176
|
+
},
|
|
177
|
+
radius: {
|
|
178
|
+
none: {
|
|
179
|
+
list: "rounded-none"
|
|
180
|
+
},
|
|
181
|
+
sm: {
|
|
182
|
+
list: "rounded-small"
|
|
183
|
+
},
|
|
184
|
+
md: {
|
|
185
|
+
list: "rounded-medium"
|
|
186
|
+
},
|
|
187
|
+
lg: {
|
|
188
|
+
list: "rounded-large"
|
|
189
|
+
},
|
|
190
|
+
full: {
|
|
191
|
+
list: "rounded-full"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
variant: {
|
|
195
|
+
solid: {
|
|
196
|
+
list: "bg-default-100"
|
|
197
|
+
},
|
|
198
|
+
bordered: {
|
|
199
|
+
list: "border-medium border-default-200 shadow-sm"
|
|
200
|
+
},
|
|
201
|
+
light: {}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
defaultVariants: {
|
|
205
|
+
size: "md",
|
|
206
|
+
radius: "sm",
|
|
207
|
+
variant: "light"
|
|
208
|
+
},
|
|
209
|
+
compoundVariants: [
|
|
210
|
+
{
|
|
211
|
+
variant: ["solid", "bordered"],
|
|
212
|
+
class: {
|
|
213
|
+
list: "max-w-fit"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
variant: ["solid", "bordered"],
|
|
218
|
+
size: "sm",
|
|
219
|
+
class: {
|
|
220
|
+
list: "px-2 py-1"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
variant: ["solid", "bordered"],
|
|
225
|
+
size: "md",
|
|
226
|
+
class: {
|
|
227
|
+
list: "px-2.5 py-1.5"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
variant: ["solid", "bordered"],
|
|
232
|
+
size: "lg",
|
|
233
|
+
class: {
|
|
234
|
+
list: "px-3 py-2"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
export {
|
|
241
|
+
breadcrumbItem,
|
|
242
|
+
breadcrumbs
|
|
243
|
+
};
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import {
|
|
2
|
+
tv
|
|
3
|
+
} from "./chunk-WBUVHAJX.mjs";
|
|
4
|
+
import {
|
|
5
|
+
dataFocusVisibleClasses
|
|
6
|
+
} from "./chunk-XHQUSKIE.mjs";
|
|
7
|
+
|
|
8
|
+
// src/components/slider.ts
|
|
9
|
+
var slider = tv({
|
|
10
|
+
slots: {
|
|
11
|
+
base: "flex flex-col w-full gap-1",
|
|
12
|
+
labelWrapper: "w-full flex justify-between items-center",
|
|
13
|
+
label: "",
|
|
14
|
+
value: "",
|
|
15
|
+
step: [
|
|
16
|
+
"h-1.5",
|
|
17
|
+
"w-1.5",
|
|
18
|
+
"absolute",
|
|
19
|
+
"rounded-full",
|
|
20
|
+
"bg-default-300/50",
|
|
21
|
+
"data-[in-range=true]:bg-background/50"
|
|
22
|
+
],
|
|
23
|
+
mark: [
|
|
24
|
+
"absolute",
|
|
25
|
+
"text-small",
|
|
26
|
+
"cursor-default",
|
|
27
|
+
"opacity-50",
|
|
28
|
+
"data-[in-range=true]:opacity-100"
|
|
29
|
+
],
|
|
30
|
+
trackWrapper: "relative flex gap-2",
|
|
31
|
+
track: ["flex", "w-full", "relative", "rounded-full", "bg-default-300/50"],
|
|
32
|
+
filler: "h-full absolute",
|
|
33
|
+
thumb: [
|
|
34
|
+
"flex",
|
|
35
|
+
"justify-center",
|
|
36
|
+
"items-center",
|
|
37
|
+
"before:absolute",
|
|
38
|
+
"before:w-11",
|
|
39
|
+
"before:h-11",
|
|
40
|
+
"before:rounded-full",
|
|
41
|
+
"after:shadow-small",
|
|
42
|
+
"after:shadow-small",
|
|
43
|
+
"after:bg-background",
|
|
44
|
+
"data-[focused=true]:z-10",
|
|
45
|
+
dataFocusVisibleClasses
|
|
46
|
+
],
|
|
47
|
+
startContent: [],
|
|
48
|
+
endContent: []
|
|
49
|
+
},
|
|
50
|
+
variants: {
|
|
51
|
+
size: {
|
|
52
|
+
sm: {
|
|
53
|
+
label: "text-small",
|
|
54
|
+
value: "text-small",
|
|
55
|
+
thumb: "w-5 h-5 after:w-4 after:h-4",
|
|
56
|
+
step: "data-[in-range=false]:bg-default-200"
|
|
57
|
+
},
|
|
58
|
+
md: {
|
|
59
|
+
thumb: "w-6 h-6 after:w-5 after:h-5",
|
|
60
|
+
label: "text-small",
|
|
61
|
+
value: "text-small"
|
|
62
|
+
},
|
|
63
|
+
lg: {
|
|
64
|
+
thumb: "h-7 w-7 after:w-5 after:h-5",
|
|
65
|
+
step: "w-2 h-2",
|
|
66
|
+
label: "text-medium",
|
|
67
|
+
value: "text-medium",
|
|
68
|
+
mark: "mt-2"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
radius: {
|
|
72
|
+
none: {
|
|
73
|
+
thumb: "rounded-none after:rounded-none"
|
|
74
|
+
},
|
|
75
|
+
sm: {
|
|
76
|
+
thumb: "rounded-[calc(theme(borderRadius.small)/2)] after:rounded-[calc(theme(borderRadius.small)/3)]"
|
|
77
|
+
},
|
|
78
|
+
md: {
|
|
79
|
+
thumb: "rounded-[calc(theme(borderRadius.medium)/2)] after:rounded-[calc(theme(borderRadius.medium)/3)]"
|
|
80
|
+
},
|
|
81
|
+
lg: {
|
|
82
|
+
thumb: "rounded-[calc(theme(borderRadius.large)/1.5)] after:rounded-[calc(theme(borderRadius.large)/2)]"
|
|
83
|
+
},
|
|
84
|
+
full: {
|
|
85
|
+
thumb: "rounded-full after:rounded-full"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
color: {
|
|
89
|
+
foreground: {
|
|
90
|
+
filler: "bg-foreground",
|
|
91
|
+
thumb: "bg-foreground"
|
|
92
|
+
},
|
|
93
|
+
primary: {
|
|
94
|
+
filler: "bg-primary",
|
|
95
|
+
thumb: "bg-primary"
|
|
96
|
+
},
|
|
97
|
+
secondary: {
|
|
98
|
+
filler: "bg-secondary",
|
|
99
|
+
thumb: "bg-secondary"
|
|
100
|
+
},
|
|
101
|
+
success: {
|
|
102
|
+
filler: "bg-success",
|
|
103
|
+
thumb: "bg-success"
|
|
104
|
+
},
|
|
105
|
+
warning: {
|
|
106
|
+
filler: "bg-warning",
|
|
107
|
+
thumb: "bg-warning"
|
|
108
|
+
},
|
|
109
|
+
danger: {
|
|
110
|
+
filler: "bg-danger",
|
|
111
|
+
thumb: "bg-danger"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
isVertical: {
|
|
115
|
+
true: {
|
|
116
|
+
base: "w-auto h-full flex-col-reverse items-center",
|
|
117
|
+
trackWrapper: "flex-col h-full justify-center items-center",
|
|
118
|
+
filler: "w-full h-auto",
|
|
119
|
+
thumb: "left-1/2",
|
|
120
|
+
track: "h-full border-y-transparent",
|
|
121
|
+
labelWrapper: "flex-col justify-center items-center",
|
|
122
|
+
step: ["left-1/2", "-translate-x-1/2", "translate-y-1/2"],
|
|
123
|
+
mark: ["left-1/2", "ml-1", "translate-x-1/2", "-translate-y-1/2"]
|
|
124
|
+
},
|
|
125
|
+
false: {
|
|
126
|
+
thumb: "top-1/2",
|
|
127
|
+
trackWrapper: "items-center",
|
|
128
|
+
track: "border-x-transparent",
|
|
129
|
+
step: ["top-1/2", "-translate-x-1/2", "-translate-y-1/2"],
|
|
130
|
+
mark: ["top-1/2", "mt-1", "-translate-x-1/2", "translate-y-1/2"]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
isDisabled: {
|
|
134
|
+
false: {
|
|
135
|
+
thumb: ["cursor-grab", "data-[dragging=true]:cursor-grabbing"]
|
|
136
|
+
},
|
|
137
|
+
true: {
|
|
138
|
+
base: "opacity-disabled",
|
|
139
|
+
thumb: "cursor-default"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
hasMarks: {
|
|
143
|
+
true: {
|
|
144
|
+
base: "mb-5"
|
|
145
|
+
},
|
|
146
|
+
false: {}
|
|
147
|
+
},
|
|
148
|
+
showOutline: {
|
|
149
|
+
true: {
|
|
150
|
+
thumb: "ring-2 ring-background"
|
|
151
|
+
},
|
|
152
|
+
false: {
|
|
153
|
+
thumb: "ring-transparent border-0"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
hideValue: {
|
|
157
|
+
true: {
|
|
158
|
+
value: "sr-only"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
hideThumb: {
|
|
162
|
+
true: {
|
|
163
|
+
thumb: "sr-only",
|
|
164
|
+
track: "overflow-hidden cursor-pointer"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
hasSingleThumb: {
|
|
168
|
+
true: {},
|
|
169
|
+
false: {}
|
|
170
|
+
},
|
|
171
|
+
disableAnimation: {
|
|
172
|
+
true: {
|
|
173
|
+
thumb: "data-[dragging=true]:after:scale-100"
|
|
174
|
+
},
|
|
175
|
+
false: {
|
|
176
|
+
thumb: "after:transition-all motion-reduce:after:transition-none",
|
|
177
|
+
mark: "transition-opacity motion-reduce:transition-none"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
disableThumbScale: {
|
|
181
|
+
true: {},
|
|
182
|
+
false: {
|
|
183
|
+
thumb: "data-[dragging=true]:after:scale-80"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
compoundVariants: [
|
|
188
|
+
{
|
|
189
|
+
size: ["sm", "md"],
|
|
190
|
+
showOutline: false,
|
|
191
|
+
class: {
|
|
192
|
+
thumb: "shadow-small"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
size: "sm",
|
|
197
|
+
color: "foreground",
|
|
198
|
+
class: {
|
|
199
|
+
step: "data-[in-range=true]:bg-foreground"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
size: "sm",
|
|
204
|
+
color: "primary",
|
|
205
|
+
class: {
|
|
206
|
+
step: "data-[in-range=true]:bg-primary"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
size: "sm",
|
|
211
|
+
color: "secondary",
|
|
212
|
+
class: {
|
|
213
|
+
step: "data-[in-range=true]:bg-secondary"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
size: "sm",
|
|
218
|
+
color: "success",
|
|
219
|
+
class: {
|
|
220
|
+
step: "data-[in-range=true]:bg-success"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
size: "sm",
|
|
225
|
+
color: "warning",
|
|
226
|
+
class: {
|
|
227
|
+
step: "data-[in-range=true]:bg-warning"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
size: "sm",
|
|
232
|
+
color: "danger",
|
|
233
|
+
class: {
|
|
234
|
+
step: "data-[in-range=true]:bg-danger"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
size: "sm",
|
|
239
|
+
isVertical: false,
|
|
240
|
+
class: {
|
|
241
|
+
track: "h-1 my-[calc((theme(spacing.5)-theme(spacing.1))/2)] data-[thumb-hidden=false]:border-x-[calc(theme(spacing.5)/2)]"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
size: "md",
|
|
246
|
+
isVertical: false,
|
|
247
|
+
class: {
|
|
248
|
+
track: "h-3 my-[calc((theme(spacing.6)-theme(spacing.3))/2)] data-[thumb-hidden=false]:border-x-[calc(theme(spacing.6)/2)]"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
size: "lg",
|
|
253
|
+
isVertical: false,
|
|
254
|
+
class: {
|
|
255
|
+
track: "h-7 my-[calc((theme(spacing.7)-theme(spacing.5))/2)] data-[thumb-hidden=false]:border-x-[calc(theme(spacing.7)/2)]"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
size: "sm",
|
|
260
|
+
isVertical: true,
|
|
261
|
+
class: {
|
|
262
|
+
track: "w-1 mx-[calc((theme(spacing.5)-theme(spacing.1))/2)] data-[thumb-hidden=false]:border-y-[calc(theme(spacing.5)/2)]"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
size: "md",
|
|
267
|
+
isVertical: true,
|
|
268
|
+
class: {
|
|
269
|
+
track: "w-3 mx-[calc((theme(spacing.6)-theme(spacing.3))/2)] data-[thumb-hidden=false]:border-y-[calc(theme(spacing.6)/2)]"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
size: "lg",
|
|
274
|
+
isVertical: true,
|
|
275
|
+
class: {
|
|
276
|
+
track: "w-7 mx-[calc((theme(spacing.7)-theme(spacing.5))/2)] data-[thumb-hidden=false]:border-y-[calc(theme(spacing.7)/2)]"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
color: "foreground",
|
|
281
|
+
isVertical: false,
|
|
282
|
+
hasSingleThumb: true,
|
|
283
|
+
class: {
|
|
284
|
+
track: "border-s-foreground"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
color: "primary",
|
|
289
|
+
isVertical: false,
|
|
290
|
+
hasSingleThumb: true,
|
|
291
|
+
class: {
|
|
292
|
+
track: "border-s-primary"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
color: "secondary",
|
|
297
|
+
isVertical: false,
|
|
298
|
+
hasSingleThumb: true,
|
|
299
|
+
class: {
|
|
300
|
+
track: "border-s-secondary"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
color: "success",
|
|
305
|
+
isVertical: false,
|
|
306
|
+
hasSingleThumb: true,
|
|
307
|
+
class: {
|
|
308
|
+
track: "border-s-success"
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
color: "warning",
|
|
313
|
+
isVertical: false,
|
|
314
|
+
hasSingleThumb: true,
|
|
315
|
+
class: {
|
|
316
|
+
track: "border-s-warning"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
color: "danger",
|
|
321
|
+
isVertical: false,
|
|
322
|
+
hasSingleThumb: true,
|
|
323
|
+
class: {
|
|
324
|
+
track: "border-s-danger"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
color: "foreground",
|
|
329
|
+
isVertical: true,
|
|
330
|
+
hasSingleThumb: true,
|
|
331
|
+
class: {
|
|
332
|
+
track: "border-b-foreground"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
color: "primary",
|
|
337
|
+
isVertical: true,
|
|
338
|
+
hasSingleThumb: true,
|
|
339
|
+
class: {
|
|
340
|
+
track: "border-b-primary"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
color: "secondary",
|
|
345
|
+
isVertical: true,
|
|
346
|
+
hasSingleThumb: true,
|
|
347
|
+
class: {
|
|
348
|
+
track: "border-b-secondary"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
color: "success",
|
|
353
|
+
isVertical: true,
|
|
354
|
+
hasSingleThumb: true,
|
|
355
|
+
class: {
|
|
356
|
+
track: "border-b-success"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
color: "warning",
|
|
361
|
+
isVertical: true,
|
|
362
|
+
hasSingleThumb: true,
|
|
363
|
+
class: {
|
|
364
|
+
track: "border-b-warning"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
color: "danger",
|
|
369
|
+
isVertical: true,
|
|
370
|
+
hasSingleThumb: true,
|
|
371
|
+
class: {
|
|
372
|
+
track: "border-b-danger"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
defaultVariants: {
|
|
377
|
+
size: "md",
|
|
378
|
+
color: "primary",
|
|
379
|
+
radius: "full",
|
|
380
|
+
hideValue: false,
|
|
381
|
+
hideThumb: false,
|
|
382
|
+
isDisabled: false,
|
|
383
|
+
disableThumbScale: false,
|
|
384
|
+
disableAnimation: false,
|
|
385
|
+
showOutline: false
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
export {
|
|
390
|
+
slider
|
|
391
|
+
};
|