sv5ui 1.2.0 → 1.4.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/README.md +16 -11
- package/dist/CheckboxGroup/CheckboxGroup.svelte +215 -0
- package/dist/CheckboxGroup/CheckboxGroup.svelte.d.ts +5 -0
- package/dist/CheckboxGroup/checkbox-group.types.d.ts +130 -0
- package/dist/CheckboxGroup/checkbox-group.types.js +1 -0
- package/dist/CheckboxGroup/checkbox-group.variants.d.ts +553 -0
- package/dist/CheckboxGroup/checkbox-group.variants.js +231 -0
- package/dist/CheckboxGroup/index.d.ts +2 -0
- package/dist/CheckboxGroup/index.js +1 -0
- package/dist/Collapsible/Collapsible.svelte +69 -0
- package/dist/Collapsible/Collapsible.svelte.d.ts +6 -0
- package/dist/Collapsible/CollapsibleTestWrapper.svelte +17 -0
- package/dist/Collapsible/CollapsibleTestWrapper.svelte.d.ts +4 -0
- package/dist/Collapsible/collapsible.types.d.ts +75 -0
- package/dist/Collapsible/collapsible.types.js +1 -0
- package/dist/Collapsible/collapsible.variants.d.ts +53 -0
- package/dist/Collapsible/collapsible.variants.js +21 -0
- package/dist/Collapsible/index.d.ts +2 -0
- package/dist/Collapsible/index.js +1 -0
- package/dist/Command/Command.svelte +183 -0
- package/dist/Command/Command.svelte.d.ts +6 -0
- package/dist/Command/CommandTestWrapper.svelte +13 -0
- package/dist/Command/CommandTestWrapper.svelte.d.ts +4 -0
- package/dist/Command/command.types.d.ts +98 -0
- package/dist/Command/command.types.js +1 -0
- package/dist/Command/command.variants.d.ts +226 -0
- package/dist/Command/command.variants.js +86 -0
- package/dist/Command/index.d.ts +2 -0
- package/dist/Command/index.js +1 -0
- package/dist/FileUpload/FileUpload.svelte +561 -0
- package/dist/FileUpload/FileUpload.svelte.d.ts +8 -0
- package/dist/FileUpload/file-upload.types.d.ts +164 -0
- package/dist/FileUpload/file-upload.types.js +1 -0
- package/dist/FileUpload/file-upload.variants.d.ts +397 -0
- package/dist/FileUpload/file-upload.variants.js +224 -0
- package/dist/FileUpload/index.d.ts +2 -0
- package/dist/FileUpload/index.js +1 -0
- package/dist/PinInput/PinInput.svelte +150 -0
- package/dist/PinInput/PinInput.svelte.d.ts +6 -0
- package/dist/PinInput/index.d.ts +2 -0
- package/dist/PinInput/index.js +1 -0
- package/dist/PinInput/pin-input.types.d.ts +99 -0
- package/dist/PinInput/pin-input.types.js +1 -0
- package/dist/PinInput/pin-input.variants.d.ts +303 -0
- package/dist/PinInput/pin-input.variants.js +196 -0
- package/dist/Select/select.variants.js +1 -1
- package/dist/SelectMenu/select-menu.variants.js +1 -1
- package/dist/Slider/Slider.svelte +135 -0
- package/dist/Slider/Slider.svelte.d.ts +6 -0
- package/dist/Slider/index.d.ts +2 -0
- package/dist/Slider/index.js +1 -0
- package/dist/Slider/slider.types.d.ts +55 -0
- package/dist/Slider/slider.types.js +1 -0
- package/dist/Slider/slider.variants.d.ts +383 -0
- package/dist/Slider/slider.variants.js +102 -0
- package/dist/Toast/Toaster.svelte +618 -0
- package/dist/Toast/Toaster.svelte.d.ts +5 -0
- package/dist/Toast/index.d.ts +4 -0
- package/dist/Toast/index.js +2 -0
- package/dist/Toast/toast.d.ts +38 -0
- package/dist/Toast/toast.js +73 -0
- package/dist/Toast/toast.types.d.ts +19 -0
- package/dist/Toast/toast.types.js +1 -0
- package/dist/Toast/toast.variants.d.ts +7 -0
- package/dist/Toast/toast.variants.js +5 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.js +6 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/theme.css +36 -0
- package/package.json +2 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Slider as SliderPrimitive } from 'bits-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import type { ClassNameValue } from 'tailwind-merge';
|
|
4
|
+
import type { SliderVariantProps, SliderSlots } from './slider.variants.js';
|
|
5
|
+
export type SliderProps = Pick<SliderPrimitive.RootProps, 'dir' | 'orientation' | 'disabled' | 'min' | 'max' | 'step' | 'autoSort' | 'thumbPositioning' | 'trackPadding'> & Omit<HTMLAttributes<HTMLElement>, 'class' | 'children' | 'dir'> & {
|
|
6
|
+
/**
|
|
7
|
+
* Bindable reference to the root DOM element.
|
|
8
|
+
*/
|
|
9
|
+
ref?: HTMLElement | null;
|
|
10
|
+
/**
|
|
11
|
+
* The HTML id attribute forwarded to the slider root element.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The current value. Use `number` for a single thumb, `number[]` for a range slider.
|
|
16
|
+
* Supports two-way binding with `bind:value`.
|
|
17
|
+
* @default 0
|
|
18
|
+
*/
|
|
19
|
+
value?: number | number[];
|
|
20
|
+
/**
|
|
21
|
+
* Callback fired continuously while the user drags a thumb.
|
|
22
|
+
*/
|
|
23
|
+
onValueChange?: (value: number | number[]) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Callback fired once when the user releases the thumb.
|
|
26
|
+
*/
|
|
27
|
+
onValueCommit?: (value: number | number[]) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Color scheme of the slider.
|
|
30
|
+
* @default 'primary'
|
|
31
|
+
*/
|
|
32
|
+
color?: NonNullable<SliderVariantProps['color']>;
|
|
33
|
+
/**
|
|
34
|
+
* Size of the slider track and thumbs.
|
|
35
|
+
* @default 'md'
|
|
36
|
+
*/
|
|
37
|
+
size?: NonNullable<SliderVariantProps['size']>;
|
|
38
|
+
/**
|
|
39
|
+
* Show a floating value label above each thumb.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
tooltip?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The name attribute for hidden inputs used in form submission.
|
|
45
|
+
*/
|
|
46
|
+
name?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Additional CSS classes for the root element.
|
|
49
|
+
*/
|
|
50
|
+
class?: ClassNameValue;
|
|
51
|
+
/**
|
|
52
|
+
* Override styles for specific slider slots.
|
|
53
|
+
*/
|
|
54
|
+
ui?: Partial<Record<SliderSlots, ClassNameValue>>;
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
export declare const sliderVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
color: {
|
|
4
|
+
primary: {
|
|
5
|
+
range: string;
|
|
6
|
+
thumb: string;
|
|
7
|
+
};
|
|
8
|
+
secondary: {
|
|
9
|
+
range: string;
|
|
10
|
+
thumb: string;
|
|
11
|
+
};
|
|
12
|
+
tertiary: {
|
|
13
|
+
range: string;
|
|
14
|
+
thumb: string;
|
|
15
|
+
};
|
|
16
|
+
success: {
|
|
17
|
+
range: string;
|
|
18
|
+
thumb: string;
|
|
19
|
+
};
|
|
20
|
+
warning: {
|
|
21
|
+
range: string;
|
|
22
|
+
thumb: string;
|
|
23
|
+
};
|
|
24
|
+
error: {
|
|
25
|
+
range: string;
|
|
26
|
+
thumb: string;
|
|
27
|
+
};
|
|
28
|
+
info: {
|
|
29
|
+
range: string;
|
|
30
|
+
thumb: string;
|
|
31
|
+
};
|
|
32
|
+
surface: {
|
|
33
|
+
range: string;
|
|
34
|
+
thumb: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
size: {
|
|
38
|
+
xs: {
|
|
39
|
+
thumb: string;
|
|
40
|
+
};
|
|
41
|
+
sm: {
|
|
42
|
+
thumb: string;
|
|
43
|
+
};
|
|
44
|
+
md: {
|
|
45
|
+
thumb: string;
|
|
46
|
+
};
|
|
47
|
+
lg: {
|
|
48
|
+
thumb: string;
|
|
49
|
+
};
|
|
50
|
+
xl: {
|
|
51
|
+
thumb: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
orientation: {
|
|
55
|
+
horizontal: {
|
|
56
|
+
base: string;
|
|
57
|
+
range: string;
|
|
58
|
+
};
|
|
59
|
+
vertical: {
|
|
60
|
+
root: string;
|
|
61
|
+
base: string;
|
|
62
|
+
range: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
disabled: {
|
|
66
|
+
true: {
|
|
67
|
+
base: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}, {
|
|
71
|
+
root: string;
|
|
72
|
+
base: string;
|
|
73
|
+
track: string;
|
|
74
|
+
range: string;
|
|
75
|
+
thumb: string[];
|
|
76
|
+
tooltip: string[];
|
|
77
|
+
}, undefined, {
|
|
78
|
+
color: {
|
|
79
|
+
primary: {
|
|
80
|
+
range: string;
|
|
81
|
+
thumb: string;
|
|
82
|
+
};
|
|
83
|
+
secondary: {
|
|
84
|
+
range: string;
|
|
85
|
+
thumb: string;
|
|
86
|
+
};
|
|
87
|
+
tertiary: {
|
|
88
|
+
range: string;
|
|
89
|
+
thumb: string;
|
|
90
|
+
};
|
|
91
|
+
success: {
|
|
92
|
+
range: string;
|
|
93
|
+
thumb: string;
|
|
94
|
+
};
|
|
95
|
+
warning: {
|
|
96
|
+
range: string;
|
|
97
|
+
thumb: string;
|
|
98
|
+
};
|
|
99
|
+
error: {
|
|
100
|
+
range: string;
|
|
101
|
+
thumb: string;
|
|
102
|
+
};
|
|
103
|
+
info: {
|
|
104
|
+
range: string;
|
|
105
|
+
thumb: string;
|
|
106
|
+
};
|
|
107
|
+
surface: {
|
|
108
|
+
range: string;
|
|
109
|
+
thumb: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
size: {
|
|
113
|
+
xs: {
|
|
114
|
+
thumb: string;
|
|
115
|
+
};
|
|
116
|
+
sm: {
|
|
117
|
+
thumb: string;
|
|
118
|
+
};
|
|
119
|
+
md: {
|
|
120
|
+
thumb: string;
|
|
121
|
+
};
|
|
122
|
+
lg: {
|
|
123
|
+
thumb: string;
|
|
124
|
+
};
|
|
125
|
+
xl: {
|
|
126
|
+
thumb: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
orientation: {
|
|
130
|
+
horizontal: {
|
|
131
|
+
base: string;
|
|
132
|
+
range: string;
|
|
133
|
+
};
|
|
134
|
+
vertical: {
|
|
135
|
+
root: string;
|
|
136
|
+
base: string;
|
|
137
|
+
range: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
disabled: {
|
|
141
|
+
true: {
|
|
142
|
+
base: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
}, {
|
|
146
|
+
root: string;
|
|
147
|
+
base: string;
|
|
148
|
+
track: string;
|
|
149
|
+
range: string;
|
|
150
|
+
thumb: string[];
|
|
151
|
+
tooltip: string[];
|
|
152
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
153
|
+
color: {
|
|
154
|
+
primary: {
|
|
155
|
+
range: string;
|
|
156
|
+
thumb: string;
|
|
157
|
+
};
|
|
158
|
+
secondary: {
|
|
159
|
+
range: string;
|
|
160
|
+
thumb: string;
|
|
161
|
+
};
|
|
162
|
+
tertiary: {
|
|
163
|
+
range: string;
|
|
164
|
+
thumb: string;
|
|
165
|
+
};
|
|
166
|
+
success: {
|
|
167
|
+
range: string;
|
|
168
|
+
thumb: string;
|
|
169
|
+
};
|
|
170
|
+
warning: {
|
|
171
|
+
range: string;
|
|
172
|
+
thumb: string;
|
|
173
|
+
};
|
|
174
|
+
error: {
|
|
175
|
+
range: string;
|
|
176
|
+
thumb: string;
|
|
177
|
+
};
|
|
178
|
+
info: {
|
|
179
|
+
range: string;
|
|
180
|
+
thumb: string;
|
|
181
|
+
};
|
|
182
|
+
surface: {
|
|
183
|
+
range: string;
|
|
184
|
+
thumb: string;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
size: {
|
|
188
|
+
xs: {
|
|
189
|
+
thumb: string;
|
|
190
|
+
};
|
|
191
|
+
sm: {
|
|
192
|
+
thumb: string;
|
|
193
|
+
};
|
|
194
|
+
md: {
|
|
195
|
+
thumb: string;
|
|
196
|
+
};
|
|
197
|
+
lg: {
|
|
198
|
+
thumb: string;
|
|
199
|
+
};
|
|
200
|
+
xl: {
|
|
201
|
+
thumb: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
orientation: {
|
|
205
|
+
horizontal: {
|
|
206
|
+
base: string;
|
|
207
|
+
range: string;
|
|
208
|
+
};
|
|
209
|
+
vertical: {
|
|
210
|
+
root: string;
|
|
211
|
+
base: string;
|
|
212
|
+
range: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
disabled: {
|
|
216
|
+
true: {
|
|
217
|
+
base: string;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
}, {
|
|
221
|
+
root: string;
|
|
222
|
+
base: string;
|
|
223
|
+
track: string;
|
|
224
|
+
range: string;
|
|
225
|
+
thumb: string[];
|
|
226
|
+
tooltip: string[];
|
|
227
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
228
|
+
export type SliderVariantProps = VariantProps<typeof sliderVariants>;
|
|
229
|
+
export type SliderSlots = keyof ReturnType<typeof sliderVariants>;
|
|
230
|
+
export declare const sliderDefaults: {
|
|
231
|
+
defaultVariants: import("tailwind-variants").TVDefaultVariants<{
|
|
232
|
+
color: {
|
|
233
|
+
primary: {
|
|
234
|
+
range: string;
|
|
235
|
+
thumb: string;
|
|
236
|
+
};
|
|
237
|
+
secondary: {
|
|
238
|
+
range: string;
|
|
239
|
+
thumb: string;
|
|
240
|
+
};
|
|
241
|
+
tertiary: {
|
|
242
|
+
range: string;
|
|
243
|
+
thumb: string;
|
|
244
|
+
};
|
|
245
|
+
success: {
|
|
246
|
+
range: string;
|
|
247
|
+
thumb: string;
|
|
248
|
+
};
|
|
249
|
+
warning: {
|
|
250
|
+
range: string;
|
|
251
|
+
thumb: string;
|
|
252
|
+
};
|
|
253
|
+
error: {
|
|
254
|
+
range: string;
|
|
255
|
+
thumb: string;
|
|
256
|
+
};
|
|
257
|
+
info: {
|
|
258
|
+
range: string;
|
|
259
|
+
thumb: string;
|
|
260
|
+
};
|
|
261
|
+
surface: {
|
|
262
|
+
range: string;
|
|
263
|
+
thumb: string;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
size: {
|
|
267
|
+
xs: {
|
|
268
|
+
thumb: string;
|
|
269
|
+
};
|
|
270
|
+
sm: {
|
|
271
|
+
thumb: string;
|
|
272
|
+
};
|
|
273
|
+
md: {
|
|
274
|
+
thumb: string;
|
|
275
|
+
};
|
|
276
|
+
lg: {
|
|
277
|
+
thumb: string;
|
|
278
|
+
};
|
|
279
|
+
xl: {
|
|
280
|
+
thumb: string;
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
orientation: {
|
|
284
|
+
horizontal: {
|
|
285
|
+
base: string;
|
|
286
|
+
range: string;
|
|
287
|
+
};
|
|
288
|
+
vertical: {
|
|
289
|
+
root: string;
|
|
290
|
+
base: string;
|
|
291
|
+
range: string;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
disabled: {
|
|
295
|
+
true: {
|
|
296
|
+
base: string;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
}, {
|
|
300
|
+
root: string;
|
|
301
|
+
base: string;
|
|
302
|
+
track: string;
|
|
303
|
+
range: string;
|
|
304
|
+
thumb: string[];
|
|
305
|
+
tooltip: string[];
|
|
306
|
+
}, {
|
|
307
|
+
color: {
|
|
308
|
+
primary: {
|
|
309
|
+
range: string;
|
|
310
|
+
thumb: string;
|
|
311
|
+
};
|
|
312
|
+
secondary: {
|
|
313
|
+
range: string;
|
|
314
|
+
thumb: string;
|
|
315
|
+
};
|
|
316
|
+
tertiary: {
|
|
317
|
+
range: string;
|
|
318
|
+
thumb: string;
|
|
319
|
+
};
|
|
320
|
+
success: {
|
|
321
|
+
range: string;
|
|
322
|
+
thumb: string;
|
|
323
|
+
};
|
|
324
|
+
warning: {
|
|
325
|
+
range: string;
|
|
326
|
+
thumb: string;
|
|
327
|
+
};
|
|
328
|
+
error: {
|
|
329
|
+
range: string;
|
|
330
|
+
thumb: string;
|
|
331
|
+
};
|
|
332
|
+
info: {
|
|
333
|
+
range: string;
|
|
334
|
+
thumb: string;
|
|
335
|
+
};
|
|
336
|
+
surface: {
|
|
337
|
+
range: string;
|
|
338
|
+
thumb: string;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
size: {
|
|
342
|
+
xs: {
|
|
343
|
+
thumb: string;
|
|
344
|
+
};
|
|
345
|
+
sm: {
|
|
346
|
+
thumb: string;
|
|
347
|
+
};
|
|
348
|
+
md: {
|
|
349
|
+
thumb: string;
|
|
350
|
+
};
|
|
351
|
+
lg: {
|
|
352
|
+
thumb: string;
|
|
353
|
+
};
|
|
354
|
+
xl: {
|
|
355
|
+
thumb: string;
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
orientation: {
|
|
359
|
+
horizontal: {
|
|
360
|
+
base: string;
|
|
361
|
+
range: string;
|
|
362
|
+
};
|
|
363
|
+
vertical: {
|
|
364
|
+
root: string;
|
|
365
|
+
base: string;
|
|
366
|
+
range: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
disabled: {
|
|
370
|
+
true: {
|
|
371
|
+
base: string;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
}, {
|
|
375
|
+
root: string;
|
|
376
|
+
base: string;
|
|
377
|
+
track: string;
|
|
378
|
+
range: string;
|
|
379
|
+
thumb: string[];
|
|
380
|
+
tooltip: string[];
|
|
381
|
+
}>;
|
|
382
|
+
slots: Partial<Record<SliderSlots, string>>;
|
|
383
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
export const sliderVariants = tv({
|
|
3
|
+
slots: {
|
|
4
|
+
root: '',
|
|
5
|
+
base: 'relative flex touch-none select-none items-center',
|
|
6
|
+
track: 'relative grow overflow-hidden rounded-full bg-surface-container-highest',
|
|
7
|
+
range: 'absolute rounded-full',
|
|
8
|
+
thumb: [
|
|
9
|
+
'block rounded-full bg-surface shadow-sm ring-2',
|
|
10
|
+
'focus-visible:outline-none focus-visible:ring-4',
|
|
11
|
+
'transition-[box-shadow] duration-150',
|
|
12
|
+
'data-[disabled]:pointer-events-none'
|
|
13
|
+
],
|
|
14
|
+
tooltip: [
|
|
15
|
+
'rounded px-1.5 py-0.5 text-xs font-medium',
|
|
16
|
+
'bg-on-surface text-surface shadow-sm',
|
|
17
|
+
'pointer-events-none select-none whitespace-nowrap',
|
|
18
|
+
'mb-2.5 me-2.5'
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
variants: {
|
|
22
|
+
color: {
|
|
23
|
+
primary: {
|
|
24
|
+
range: 'bg-primary',
|
|
25
|
+
thumb: 'ring-primary focus-visible:ring-primary/40'
|
|
26
|
+
},
|
|
27
|
+
secondary: {
|
|
28
|
+
range: 'bg-secondary',
|
|
29
|
+
thumb: 'ring-secondary focus-visible:ring-secondary/40'
|
|
30
|
+
},
|
|
31
|
+
tertiary: {
|
|
32
|
+
range: 'bg-tertiary',
|
|
33
|
+
thumb: 'ring-tertiary focus-visible:ring-tertiary/40'
|
|
34
|
+
},
|
|
35
|
+
success: {
|
|
36
|
+
range: 'bg-success',
|
|
37
|
+
thumb: 'ring-success focus-visible:ring-success/40'
|
|
38
|
+
},
|
|
39
|
+
warning: {
|
|
40
|
+
range: 'bg-warning',
|
|
41
|
+
thumb: 'ring-warning focus-visible:ring-warning/40'
|
|
42
|
+
},
|
|
43
|
+
error: {
|
|
44
|
+
range: 'bg-error',
|
|
45
|
+
thumb: 'ring-error focus-visible:ring-error/40'
|
|
46
|
+
},
|
|
47
|
+
info: {
|
|
48
|
+
range: 'bg-info',
|
|
49
|
+
thumb: 'ring-info focus-visible:ring-info/40'
|
|
50
|
+
},
|
|
51
|
+
surface: {
|
|
52
|
+
range: 'bg-on-surface',
|
|
53
|
+
thumb: 'ring-on-surface focus-visible:ring-on-surface/40'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
size: {
|
|
57
|
+
xs: { thumb: 'size-3' },
|
|
58
|
+
sm: { thumb: 'size-3.5' },
|
|
59
|
+
md: { thumb: 'size-4' },
|
|
60
|
+
lg: { thumb: 'size-4.5' },
|
|
61
|
+
xl: { thumb: 'size-5' }
|
|
62
|
+
},
|
|
63
|
+
orientation: {
|
|
64
|
+
horizontal: {
|
|
65
|
+
base: 'w-full flex-row',
|
|
66
|
+
range: 'h-full left-0'
|
|
67
|
+
},
|
|
68
|
+
vertical: {
|
|
69
|
+
root: 'h-full',
|
|
70
|
+
base: 'h-full flex-col',
|
|
71
|
+
range: 'w-full bottom-0'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
disabled: {
|
|
75
|
+
true: {
|
|
76
|
+
base: 'opacity-50 cursor-not-allowed'
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
compoundVariants: [
|
|
81
|
+
// Track thickness: size × orientation
|
|
82
|
+
{ size: 'xs', orientation: 'horizontal', class: { track: 'h-1' } },
|
|
83
|
+
{ size: 'sm', orientation: 'horizontal', class: { track: 'h-1.5' } },
|
|
84
|
+
{ size: 'md', orientation: 'horizontal', class: { track: 'h-2' } },
|
|
85
|
+
{ size: 'lg', orientation: 'horizontal', class: { track: 'h-2.5' } },
|
|
86
|
+
{ size: 'xl', orientation: 'horizontal', class: { track: 'h-3' } },
|
|
87
|
+
{ size: 'xs', orientation: 'vertical', class: { track: 'w-1' } },
|
|
88
|
+
{ size: 'sm', orientation: 'vertical', class: { track: 'w-1.5' } },
|
|
89
|
+
{ size: 'md', orientation: 'vertical', class: { track: 'w-2' } },
|
|
90
|
+
{ size: 'lg', orientation: 'vertical', class: { track: 'w-2.5' } },
|
|
91
|
+
{ size: 'xl', orientation: 'vertical', class: { track: 'w-3' } }
|
|
92
|
+
],
|
|
93
|
+
defaultVariants: {
|
|
94
|
+
color: 'primary',
|
|
95
|
+
size: 'md',
|
|
96
|
+
orientation: 'horizontal'
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
export const sliderDefaults = {
|
|
100
|
+
defaultVariants: sliderVariants.defaultVariants,
|
|
101
|
+
slots: {}
|
|
102
|
+
};
|