/
sliderClasses.ts
90 lines (85 loc) · 2.74 KB
/
sliderClasses.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import { generateUtilityClass, generateUtilityClasses } from '../className';
export interface SliderClasses {
/** Class name applied to the root element. */
root: string;
/** Class name applied to the root element if `marks` is provided with at least one label. */
marked: string;
/** Class name applied to the root element if `orientation="vertical"`. */
vertical: string;
/** State class applied to the root and thumb element if `disabled={true}`. */
disabled: string;
/** State class applied to the root if a thumb is being dragged. */
dragging: string;
/** Class name applied to the rail element. */
rail: string;
/** Class name applied to the track element. */
track: string;
/** Class name applied to the root element if `track={false}`. */
trackFalse: string;
/** Class name applied to the root element if `track="inverted"`. */
trackInverted: string;
/** Class name applied to the thumb element. */
thumb: string;
/** Class name applied to the thumb label element. */
valueLabel: string;
/** Class name applied to the thumb label element if it's open. */
valueLabelOpen: string;
/** Class name applied to the mark element. */
mark: string;
/** Class name applied to the mark element when it is active. */
markActive: string;
/** Class name applied to the mark label element. */
markLabel: string;
/** Styles applied to the root element if `color="primary"`. */
colorPrimary: string;
/** Styles applied to the root element if `color="neutral"`. */
colorNeutral: string;
/** Styles applied to the root element if `color="danger"`. */
colorDanger: string;
/** Styles applied to the root element if `color="info"`. */
colorInfo: string;
/** Styles applied to the root element if `color="success"`. */
colorSuccess: string;
/** Styles applied to the root element if `color="warning"`. */
colorWarning: string;
/** Styles applied to the root element if `size="sm"`. */
sizeSm: string;
/** Styles applied to the root element if `size="md"`. */
sizeMd: string;
/** Styles applied to the root element if `size="lg"`. */
sizeLg: string;
}
export type SliderClassKey = keyof SliderClasses;
export function getSliderUtilityClass(slot: string): string {
return generateUtilityClass('JoySlider', slot);
}
const sliderClasses: SliderClasses = generateUtilityClasses('JoySlider', [
'root',
'disabled',
'dragging',
'marked',
'vertical',
'trackInverted',
'trackFalse',
'rail',
'track',
'mark',
'markActive',
'markLabel',
'thumb',
'thumbStart',
'thumbEnd',
'valueLabel',
'valueLabelOpen',
'colorPrimary',
'colorNeutral',
'colorDanger',
'colorInfo',
'colorSuccess',
'colorWarning',
'disabled',
'sizeSm',
'sizeMd',
'sizeLg',
]);
export default sliderClasses;