@resolve-components/theme 1.0.0 → 1.2.1
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/accordion/rc-accordion.scss +141 -0
- package/alert/rc-alert.scss +158 -0
- package/autocomplete/rc-autocomplete.scss +64 -0
- package/badge/rc-badge.scss +57 -0
- package/button/rc-button.scss +198 -0
- package/card/rc-card.scss +31 -0
- package/checkbox/rc-checkbox.scss +163 -0
- package/chip/rc-chip.scss +172 -0
- package/datepicker/rc-datepicker.scss +322 -0
- package/dialog/rc-dialog.scss +114 -0
- package/fesm2022/resolve-components-theme.mjs +44 -30
- package/fesm2022/resolve-components-theme.mjs.map +1 -1
- package/file-upload/rc-file-upload.scss +143 -0
- package/icon/rc-icon.scss +47 -0
- package/infinite-scroll/rc-infinite-scroll.scss +54 -0
- package/input/rc-input.scss +156 -0
- package/menu/rc-menu.scss +84 -0
- package/navbar/rc-navbar.scss +112 -0
- package/package.json +16 -9
- package/paginator/rc-paginator.scss +86 -0
- package/progress-bar/rc-progress-bar.scss +88 -0
- package/radio/rc-radio.scss +124 -0
- package/schematics/ng-add/index.js +149 -69
- package/schematics/ng-add/schema.json +15 -1
- package/select/rc-select.scss +197 -0
- package/sidenav/rc-sidenav.scss +154 -0
- package/slider/rc-slider.scss +311 -0
- package/spinner/rc-spinner.scss +106 -0
- package/{src/lib/styles → styles}/theming/_mapping.scss +2 -1
- package/table/rc-table.scss +147 -0
- package/tabs/rc-tabs.scss +155 -0
- package/toast/rc-toast.scss +228 -0
- package/toggle/rc-toggle.scss +138 -0
- package/tooltip/rc-tooltip.scss +34 -0
- package/tree/rc-tree.scss +114 -0
- package/types/resolve-components-theme.d.ts +32 -31
- package/virtual-scroll/rc-virtual-scroll.scss +38 -0
- /package/{src/lib/styles → styles}/_all.scss +0 -0
- /package/{src/lib/styles → styles}/_globals.scss +0 -0
- /package/{src/lib/styles → styles}/_themes.scss +0 -0
- /package/{src/lib/styles → styles}/_theming.scss +0 -0
- /package/{src/lib/styles → styles}/themes/_dark.scss +0 -0
- /package/{src/lib/styles → styles}/themes/_default.scss +0 -0
- /package/{src/lib/styles → styles}/theming/_animation.scss +0 -0
- /package/{src/lib/styles → styles}/theming/_functions.scss +0 -0
- /package/{src/lib/styles → styles}/theming/_get-value.scss +0 -0
- /package/{src/lib/styles → styles}/theming/_install.scss +0 -0
- /package/{src/lib/styles → styles}/theming/_register.scss +0 -0
- /package/{src/lib/styles → styles}/theming/_theming-variables.scss +0 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// rc-select Resolve Components Select (Single & Multi, CDK Overlay, Themed)
|
|
3
|
+
// =============================================================================
|
|
4
|
+
|
|
5
|
+
@use '../styles/theming/get-value' as *;
|
|
6
|
+
@use '../styles/theming/install' as *;
|
|
7
|
+
@use '../styles/theming/animation' as *;
|
|
8
|
+
|
|
9
|
+
@include rc-install-component() {
|
|
10
|
+
// ── Trigger (host element) ─────────────────────────────────────────────────
|
|
11
|
+
rc-select {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
gap: 0.5rem;
|
|
16
|
+
width: 100%;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
position: relative;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
user-select: none;
|
|
21
|
+
|
|
22
|
+
font-family: rc-theme('select-font-family');
|
|
23
|
+
font-weight: rc-theme('select-font-weight');
|
|
24
|
+
font-size: rc-theme('select-md-font-size');
|
|
25
|
+
color: rc-theme('select-text-color');
|
|
26
|
+
background: rc-theme('select-background-color');
|
|
27
|
+
border: 1.5px solid rc-theme('select-border-color');
|
|
28
|
+
border-radius: rc-theme('select-border-radius');
|
|
29
|
+
padding: rc-theme('select-md-padding');
|
|
30
|
+
height: rc-theme('select-md-height');
|
|
31
|
+
outline: none;
|
|
32
|
+
@include rc-component-animation(border-color box-shadow background);
|
|
33
|
+
|
|
34
|
+
&:hover:not(.rc-select-disabled) {
|
|
35
|
+
border-color: rc-theme('select-hover-border-color');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.rc-select-focused:not(.rc-select-disabled),
|
|
39
|
+
&:focus:not(.rc-select-disabled) {
|
|
40
|
+
border-color: rc-theme('select-focus-border-color');
|
|
41
|
+
box-shadow: rc-theme('select-focus-shadow');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.rc-select-disabled {
|
|
45
|
+
background: rc-theme('select-disabled-background-color');
|
|
46
|
+
border-color: rc-theme('select-disabled-border-color');
|
|
47
|
+
color: rc-theme('select-disabled-text-color');
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
opacity: 0.7;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ── Status variants ──────────────────────────────────────────────────────
|
|
53
|
+
&.rc-select-success {
|
|
54
|
+
border-color: rc-theme('select-success-border-color');
|
|
55
|
+
|
|
56
|
+
&.rc-select-focused,
|
|
57
|
+
&:focus {
|
|
58
|
+
box-shadow: rc-theme('select-success-focus-shadow');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.rc-select-warning {
|
|
63
|
+
border-color: rc-theme('select-warning-border-color');
|
|
64
|
+
|
|
65
|
+
&.rc-select-focused,
|
|
66
|
+
&:focus {
|
|
67
|
+
box-shadow: rc-theme('select-warning-focus-shadow');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.rc-select-danger {
|
|
72
|
+
border-color: rc-theme('select-danger-border-color');
|
|
73
|
+
|
|
74
|
+
&.rc-select-focused,
|
|
75
|
+
&:focus {
|
|
76
|
+
box-shadow: rc-theme('select-danger-focus-shadow');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ── Sizes ────────────────────────────────────────────────────────────────
|
|
81
|
+
&.rc-select-sm {
|
|
82
|
+
font-size: rc-theme('select-sm-font-size');
|
|
83
|
+
padding: rc-theme('select-sm-padding');
|
|
84
|
+
height: rc-theme('select-sm-height');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.rc-select-md {
|
|
88
|
+
font-size: rc-theme('select-md-font-size');
|
|
89
|
+
padding: rc-theme('select-md-padding');
|
|
90
|
+
height: rc-theme('select-md-height');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.rc-select-lg {
|
|
94
|
+
font-size: rc-theme('select-lg-font-size');
|
|
95
|
+
padding: rc-theme('select-lg-padding');
|
|
96
|
+
height: rc-theme('select-lg-height');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ── Trigger value text ─────────────────────────────────────────────────────
|
|
101
|
+
.rc-select-value {
|
|
102
|
+
flex: 1 1 0;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
text-overflow: ellipsis;
|
|
106
|
+
min-width: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.rc-select-placeholder {
|
|
110
|
+
color: rc-theme('select-placeholder-color');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// ── Arrow indicator ────────────────────────────────────────────────────────
|
|
114
|
+
.rc-select-arrow {
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
display: inline-flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
color: rc-theme('select-arrow-color');
|
|
119
|
+
@include rc-component-animation(transform);
|
|
120
|
+
|
|
121
|
+
&.rc-select-arrow-open {
|
|
122
|
+
transform: rotate(180deg);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// ── Dropdown panel (rendered inside CDK overlay) ───────────────────────────
|
|
127
|
+
.rc-select-panel {
|
|
128
|
+
background: rc-theme('select-panel-background');
|
|
129
|
+
border: 1px solid rc-theme('select-panel-border-color');
|
|
130
|
+
border-radius: rc-theme('select-panel-border-radius');
|
|
131
|
+
box-shadow: rc-theme('select-panel-shadow');
|
|
132
|
+
overflow-y: auto;
|
|
133
|
+
max-height: rc-theme('select-panel-max-height');
|
|
134
|
+
padding: rc-theme('select-panel-padding');
|
|
135
|
+
width: 100%;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// ── Option row ─────────────────────────────────────────────────────────────
|
|
139
|
+
.rc-select-option {
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
gap: 0.5rem;
|
|
143
|
+
padding: rc-theme('select-option-padding');
|
|
144
|
+
font-size: rc-theme('select-option-font-size');
|
|
145
|
+
color: rc-theme('select-option-text-color');
|
|
146
|
+
border-radius: rc-theme('select-option-border-radius');
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
@include rc-component-animation(background);
|
|
149
|
+
|
|
150
|
+
&:hover:not(.rc-select-option-disabled) {
|
|
151
|
+
background: rc-theme('select-option-hover-background');
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&.rc-select-option-active:not(.rc-select-option-disabled) {
|
|
155
|
+
background: rc-theme('select-option-hover-background');
|
|
156
|
+
outline: 2px solid rc-theme('select-focus-border-color');
|
|
157
|
+
outline-offset: -2px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&.rc-select-option-selected {
|
|
161
|
+
background: rc-theme('select-option-selected-background');
|
|
162
|
+
color: rc-theme('select-option-selected-text-color');
|
|
163
|
+
font-weight: rc-theme('select-option-selected-font-weight');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&.rc-select-option-selected:hover:not(.rc-select-option-disabled) {
|
|
167
|
+
background: rc-theme('select-option-selected-hover-background');
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&.rc-select-option-disabled {
|
|
171
|
+
color: rc-theme('select-disabled-text-color');
|
|
172
|
+
cursor: not-allowed;
|
|
173
|
+
opacity: 0.5;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.rc-select-option-label {
|
|
178
|
+
flex: 1 1 0;
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
white-space: nowrap;
|
|
181
|
+
text-overflow: ellipsis;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// ── Multi-select checkbox (rc-checkbox) ────────────────────────────────────
|
|
185
|
+
.rc-select-option rc-checkbox {
|
|
186
|
+
pointer-events: none;
|
|
187
|
+
flex-shrink: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// ── Empty state ────────────────────────────────────────────────────────────
|
|
191
|
+
.rc-select-no-options {
|
|
192
|
+
padding: rc-theme('select-option-padding');
|
|
193
|
+
font-size: rc-theme('select-option-font-size');
|
|
194
|
+
color: rc-theme('select-placeholder-color');
|
|
195
|
+
text-align: center;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// rc-sidenav Resolve Components Sidenav (Themed)
|
|
3
|
+
// =============================================================================
|
|
4
|
+
|
|
5
|
+
@use '../styles/theming/get-value' as *;
|
|
6
|
+
@use '../styles/theming/install' as *;
|
|
7
|
+
@use '../styles/theming/animation' as *;
|
|
8
|
+
|
|
9
|
+
@include rc-install-component() {
|
|
10
|
+
// ── Container ──────────────────────────────────────────────────────────────
|
|
11
|
+
.rc-sidenav-container {
|
|
12
|
+
position: relative;
|
|
13
|
+
// Always flex — over/push sidenavs are position:absolute so they're out of
|
|
14
|
+
// flow; side sidenavs become flex items alongside the content.
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// ── Backdrop ───────────────────────────────────────────────────────────────
|
|
24
|
+
.rc-sidenav-backdrop {
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: 0;
|
|
27
|
+
z-index: rc-theme('sidenav-backdrop-z-index');
|
|
28
|
+
background: rc-theme('sidenav-backdrop-color');
|
|
29
|
+
|
|
30
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
31
|
+
animation: rc-sidenav-backdrop-in rc-theme('sidenav-transition-duration')
|
|
32
|
+
rc-theme('sidenav-transition-timing') both;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
pointer-events: auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@keyframes rc-sidenav-backdrop-in {
|
|
39
|
+
from {
|
|
40
|
+
opacity: 0;
|
|
41
|
+
}
|
|
42
|
+
to {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ── Sidenav panel (shared) ─────────────────────────────────────────────────
|
|
48
|
+
.rc-sidenav {
|
|
49
|
+
background: rc-theme('sidenav-background');
|
|
50
|
+
color: rc-theme('sidenav-text-color');
|
|
51
|
+
box-shadow: rc-theme('sidenav-shadow');
|
|
52
|
+
overflow-y: auto;
|
|
53
|
+
overflow-x: hidden;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
will-change: transform;
|
|
56
|
+
// Only transitions in side mode (width) and over/push (transform)
|
|
57
|
+
@include rc-component-animation(
|
|
58
|
+
transform width,
|
|
59
|
+
$duration: rc-theme('sidenav-transition-duration'),
|
|
60
|
+
$timing: rc-theme('sidenav-transition-timing')
|
|
61
|
+
);
|
|
62
|
+
z-index: rc-theme('sidenav-z-index');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// ── Over mode ──────────────────────────────────────────────────────────────
|
|
66
|
+
.rc-sidenav.rc-sidenav-mode-over,
|
|
67
|
+
.rc-sidenav.rc-sidenav-mode-push {
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
z-index: rc-theme('sidenav-z-index');
|
|
72
|
+
width: var(--rc-sidenav-width, rc-theme('sidenav-width'));
|
|
73
|
+
// Ensure no flex-item sizing
|
|
74
|
+
flex: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Start position (left in LTR)
|
|
78
|
+
.rc-sidenav.rc-sidenav-mode-over.rc-sidenav-start,
|
|
79
|
+
.rc-sidenav.rc-sidenav-mode-push.rc-sidenav-start {
|
|
80
|
+
left: 0;
|
|
81
|
+
transform: translateX(-100%);
|
|
82
|
+
border-right: 1px solid rc-theme('sidenav-border-color');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// End position (right in LTR)
|
|
86
|
+
.rc-sidenav.rc-sidenav-mode-over.rc-sidenav-end,
|
|
87
|
+
.rc-sidenav.rc-sidenav-mode-push.rc-sidenav-end {
|
|
88
|
+
right: 0;
|
|
89
|
+
transform: translateX(100%);
|
|
90
|
+
border-left: 1px solid rc-theme('sidenav-border-color');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Open state — slide panel into view
|
|
94
|
+
.rc-sidenav.rc-sidenav-mode-over.rc-sidenav-open,
|
|
95
|
+
.rc-sidenav.rc-sidenav-mode-push.rc-sidenav-open {
|
|
96
|
+
transform: translateX(0);
|
|
97
|
+
box-shadow: rc-theme('sidenav-shadow');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ── Side mode ──────────────────────────────────────────────────────────────
|
|
101
|
+
.rc-sidenav.rc-sidenav-mode-side {
|
|
102
|
+
position: relative;
|
|
103
|
+
flex: 0 0 auto;
|
|
104
|
+
width: var(--rc-sidenav-width, rc-theme('sidenav-width'));
|
|
105
|
+
overflow: hidden; // needed for width-collapse animation
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Side + start → first column
|
|
109
|
+
.rc-sidenav.rc-sidenav-mode-side.rc-sidenav-start {
|
|
110
|
+
order: 0;
|
|
111
|
+
border-right: 1px solid rc-theme('sidenav-border-color');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Side + end → last column
|
|
115
|
+
.rc-sidenav.rc-sidenav-mode-side.rc-sidenav-end {
|
|
116
|
+
order: 2;
|
|
117
|
+
border-left: 1px solid rc-theme('sidenav-border-color');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Closed side sidenav: collapse width to zero
|
|
121
|
+
.rc-sidenav.rc-sidenav-mode-side:not(.rc-sidenav-open) {
|
|
122
|
+
width: 0;
|
|
123
|
+
border-color: transparent;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// ── Main content slot ──────────────────────────────────────────────────────
|
|
127
|
+
.rc-sidenav-content {
|
|
128
|
+
flex: 1 1 auto;
|
|
129
|
+
min-width: 0;
|
|
130
|
+
overflow: auto;
|
|
131
|
+
order: 1;
|
|
132
|
+
// Push mode offset is handled below via a CSS custom property
|
|
133
|
+
@include rc-component-animation(
|
|
134
|
+
margin-left margin-right,
|
|
135
|
+
$duration: rc-theme('sidenav-transition-duration'),
|
|
136
|
+
$timing: rc-theme('sidenav-transition-timing')
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// ── Push mode — offset the content ────────────────────────────────────────
|
|
141
|
+
.rc-sidenav-container-push-open.rc-sidenav-container-push-start
|
|
142
|
+
.rc-sidenav-content,
|
|
143
|
+
.rc-sidenav-container-push-open.rc-sidenav-container-push-start
|
|
144
|
+
> *:not(rc-sidenav):not(.rc-sidenav-backdrop) {
|
|
145
|
+
margin-left: var(--rc-sidenav-push-width, rc-theme('sidenav-width'));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.rc-sidenav-container-push-open.rc-sidenav-container-push-end
|
|
149
|
+
.rc-sidenav-content,
|
|
150
|
+
.rc-sidenav-container-push-open.rc-sidenav-container-push-end
|
|
151
|
+
> *:not(rc-sidenav):not(.rc-sidenav-backdrop) {
|
|
152
|
+
margin-right: var(--rc-sidenav-push-width, rc-theme('sidenav-width'));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// rc-slider Resolve Components Slider (Themed)
|
|
3
|
+
// =============================================================================
|
|
4
|
+
|
|
5
|
+
@use '../styles/theming/get-value' as *;
|
|
6
|
+
@use '../styles/theming/install' as *;
|
|
7
|
+
@use '../styles/theming/animation' as *;
|
|
8
|
+
|
|
9
|
+
@include rc-install-component() {
|
|
10
|
+
// ── Host ───────────────────────────────────────────────────────────────────
|
|
11
|
+
.rc-slider {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: rc-theme('slider-label-gap');
|
|
15
|
+
font-family: rc-theme('slider-font-family');
|
|
16
|
+
width: 100%;
|
|
17
|
+
|
|
18
|
+
&.rc-slider-disabled {
|
|
19
|
+
opacity: rc-theme('slider-disabled-opacity');
|
|
20
|
+
cursor: not-allowed;
|
|
21
|
+
|
|
22
|
+
.rc-slider-input {
|
|
23
|
+
cursor: not-allowed;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ── Value / min-max row ────────────────────────────────────────────────────
|
|
30
|
+
.rc-slider-value-row {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
font-size: rc-theme('slider-value-font-size');
|
|
35
|
+
color: rc-theme('slider-value-color');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.rc-slider-current-value {
|
|
39
|
+
font-weight: rc-theme('slider-value-font-weight');
|
|
40
|
+
color: rc-theme('slider-value-active-color');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.rc-slider-min-label,
|
|
44
|
+
.rc-slider-max-label {
|
|
45
|
+
color: rc-theme('slider-hint-color');
|
|
46
|
+
font-size: rc-theme('slider-hint-font-size');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// ── Track wrapper (relative container for track + input) ──────────────────
|
|
50
|
+
.rc-slider-track-wrapper {
|
|
51
|
+
position: relative;
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
padding: 0.5rem 0; // vertical hit area
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ── Visual track ──────────────────────────────────────────────────────────
|
|
58
|
+
.rc-slider-track {
|
|
59
|
+
position: absolute;
|
|
60
|
+
left: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
height: rc-theme('slider-md-track-height');
|
|
63
|
+
background: rc-theme('slider-track-background');
|
|
64
|
+
border-radius: rc-theme('slider-track-border-radius');
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
|
|
68
|
+
.rc-slider-sm & {
|
|
69
|
+
height: rc-theme('slider-sm-track-height');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.rc-slider-lg & {
|
|
73
|
+
height: rc-theme('slider-lg-track-height');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ── Fill ──────────────────────────────────────────────────────────────────
|
|
78
|
+
.rc-slider-fill {
|
|
79
|
+
height: 100%;
|
|
80
|
+
background: rc-theme('slider-fill-color');
|
|
81
|
+
border-radius: inherit;
|
|
82
|
+
transition: width 0ms; // instant update while dragging
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ── Tick marks ────────────────────────────────────────────────────────────
|
|
86
|
+
.rc-slider-ticks {
|
|
87
|
+
position: absolute;
|
|
88
|
+
left: 0;
|
|
89
|
+
right: 0;
|
|
90
|
+
top: 50%;
|
|
91
|
+
transform: translateY(-50%);
|
|
92
|
+
pointer-events: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.rc-slider-tick {
|
|
96
|
+
position: absolute;
|
|
97
|
+
width: rc-theme('slider-tick-size');
|
|
98
|
+
height: rc-theme('slider-tick-size');
|
|
99
|
+
border-radius: 50%;
|
|
100
|
+
background: rc-theme('slider-tick-color');
|
|
101
|
+
transform: translateX(-50%);
|
|
102
|
+
|
|
103
|
+
&.rc-slider-tick-active {
|
|
104
|
+
background: rc-theme('slider-tick-active-color');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// ── Native range input ─────────────────────────────────────────────────────
|
|
109
|
+
// Sits on top of the visual track; transparent background so visual track
|
|
110
|
+
// shows through. Only the thumb styled here.
|
|
111
|
+
.rc-slider-input {
|
|
112
|
+
-webkit-appearance: none;
|
|
113
|
+
appearance: none;
|
|
114
|
+
position: relative;
|
|
115
|
+
z-index: 1;
|
|
116
|
+
width: 100%;
|
|
117
|
+
height: rc-theme('slider-md-thumb-size');
|
|
118
|
+
background: transparent;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
margin: 0;
|
|
121
|
+
|
|
122
|
+
.rc-slider-sm & {
|
|
123
|
+
height: rc-theme('slider-sm-thumb-size');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.rc-slider-lg & {
|
|
127
|
+
height: rc-theme('slider-lg-thumb-size');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// ── WebKit thumb ────────────────────────────────────────────────────────
|
|
131
|
+
&::-webkit-slider-runnable-track {
|
|
132
|
+
background: transparent;
|
|
133
|
+
height: rc-theme('slider-md-track-height');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&::-webkit-slider-thumb {
|
|
137
|
+
-webkit-appearance: none;
|
|
138
|
+
appearance: none;
|
|
139
|
+
width: rc-theme('slider-md-thumb-size');
|
|
140
|
+
height: rc-theme('slider-md-thumb-size');
|
|
141
|
+
border-radius: 50%;
|
|
142
|
+
background: rc-theme('slider-thumb-background');
|
|
143
|
+
border: rc-theme('slider-thumb-border-width') solid
|
|
144
|
+
rc-theme('slider-thumb-border-color');
|
|
145
|
+
box-shadow: rc-theme('slider-thumb-shadow');
|
|
146
|
+
@include rc-component-animation(
|
|
147
|
+
transform,
|
|
148
|
+
$duration: rc-theme('slider-transition-duration'),
|
|
149
|
+
$timing: rc-theme('slider-transition-timing')
|
|
150
|
+
);
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
margin-top: calc(
|
|
153
|
+
(
|
|
154
|
+
#{rc-theme('slider-md-track-height')} -
|
|
155
|
+
#{rc-theme('slider-md-thumb-size')}
|
|
156
|
+
) /
|
|
157
|
+
2
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// ── Firefox thumb ───────────────────────────────────────────────────────
|
|
162
|
+
&::-moz-range-track {
|
|
163
|
+
background: transparent;
|
|
164
|
+
height: rc-theme('slider-md-track-height');
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&::-moz-range-thumb {
|
|
168
|
+
width: rc-theme('slider-md-thumb-size');
|
|
169
|
+
height: rc-theme('slider-md-thumb-size');
|
|
170
|
+
border-radius: 50%;
|
|
171
|
+
background: rc-theme('slider-thumb-background');
|
|
172
|
+
border: rc-theme('slider-thumb-border-width') solid
|
|
173
|
+
rc-theme('slider-thumb-border-color');
|
|
174
|
+
box-shadow: rc-theme('slider-thumb-shadow');
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// ── Small size ──────────────────────────────────────────────────────────
|
|
179
|
+
.rc-slider-sm &::-webkit-slider-thumb {
|
|
180
|
+
width: rc-theme('slider-sm-thumb-size');
|
|
181
|
+
height: rc-theme('slider-sm-thumb-size');
|
|
182
|
+
margin-top: calc(
|
|
183
|
+
(
|
|
184
|
+
#{rc-theme('slider-sm-track-height')} -
|
|
185
|
+
#{rc-theme('slider-sm-thumb-size')}
|
|
186
|
+
) /
|
|
187
|
+
2
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.rc-slider-sm &::-moz-range-thumb {
|
|
192
|
+
width: rc-theme('slider-sm-thumb-size');
|
|
193
|
+
height: rc-theme('slider-sm-thumb-size');
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// ── Large size ──────────────────────────────────────────────────────────
|
|
197
|
+
.rc-slider-lg &::-webkit-slider-thumb {
|
|
198
|
+
width: rc-theme('slider-lg-thumb-size');
|
|
199
|
+
height: rc-theme('slider-lg-thumb-size');
|
|
200
|
+
margin-top: calc(
|
|
201
|
+
(
|
|
202
|
+
#{rc-theme('slider-lg-track-height')} -
|
|
203
|
+
#{rc-theme('slider-lg-thumb-size')}
|
|
204
|
+
) /
|
|
205
|
+
2
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.rc-slider-lg &::-moz-range-thumb {
|
|
210
|
+
width: rc-theme('slider-lg-thumb-size');
|
|
211
|
+
height: rc-theme('slider-lg-thumb-size');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// ── Hover (both browsers) ────────────────────────────────────────────────
|
|
215
|
+
&:not(:disabled):hover::-webkit-slider-thumb {
|
|
216
|
+
transform: scale(rc-theme('slider-thumb-hover-scale'));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&:not(:disabled):hover::-moz-range-thumb {
|
|
220
|
+
transform: scale(rc-theme('slider-thumb-hover-scale'));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// ── Focus ring ───────────────────────────────────────────────────────────
|
|
224
|
+
&:focus-visible {
|
|
225
|
+
outline: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&:focus-visible::-webkit-slider-thumb {
|
|
229
|
+
outline: 2px solid rc-theme('slider-focus-outline-color');
|
|
230
|
+
outline-offset: 2px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
&:focus-visible::-moz-range-thumb {
|
|
234
|
+
outline: 2px solid rc-theme('slider-focus-outline-color');
|
|
235
|
+
outline-offset: 2px;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// ── Status variants ───────────────────────────────────────────────────────
|
|
240
|
+
.rc-slider-success {
|
|
241
|
+
.rc-slider-fill {
|
|
242
|
+
background: rc-theme('slider-success-fill-color');
|
|
243
|
+
}
|
|
244
|
+
.rc-slider-tick-active {
|
|
245
|
+
background: rc-theme('slider-success-fill-color');
|
|
246
|
+
}
|
|
247
|
+
.rc-slider-input::-webkit-slider-thumb {
|
|
248
|
+
background: rc-theme('slider-success-thumb-background');
|
|
249
|
+
}
|
|
250
|
+
.rc-slider-input::-moz-range-thumb {
|
|
251
|
+
background: rc-theme('slider-success-thumb-background');
|
|
252
|
+
}
|
|
253
|
+
.rc-slider-current-value {
|
|
254
|
+
color: rc-theme('slider-success-fill-color');
|
|
255
|
+
}
|
|
256
|
+
.rc-slider-input:focus-visible::-webkit-slider-thumb {
|
|
257
|
+
outline-color: rc-theme('slider-success-focus-outline-color');
|
|
258
|
+
}
|
|
259
|
+
.rc-slider-input:focus-visible::-moz-range-thumb {
|
|
260
|
+
outline-color: rc-theme('slider-success-focus-outline-color');
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.rc-slider-warning {
|
|
265
|
+
.rc-slider-fill {
|
|
266
|
+
background: rc-theme('slider-warning-fill-color');
|
|
267
|
+
}
|
|
268
|
+
.rc-slider-tick-active {
|
|
269
|
+
background: rc-theme('slider-warning-fill-color');
|
|
270
|
+
}
|
|
271
|
+
.rc-slider-input::-webkit-slider-thumb {
|
|
272
|
+
background: rc-theme('slider-warning-thumb-background');
|
|
273
|
+
}
|
|
274
|
+
.rc-slider-input::-moz-range-thumb {
|
|
275
|
+
background: rc-theme('slider-warning-thumb-background');
|
|
276
|
+
}
|
|
277
|
+
.rc-slider-current-value {
|
|
278
|
+
color: rc-theme('slider-warning-fill-color');
|
|
279
|
+
}
|
|
280
|
+
.rc-slider-input:focus-visible::-webkit-slider-thumb {
|
|
281
|
+
outline-color: rc-theme('slider-warning-focus-outline-color');
|
|
282
|
+
}
|
|
283
|
+
.rc-slider-input:focus-visible::-moz-range-thumb {
|
|
284
|
+
outline-color: rc-theme('slider-warning-focus-outline-color');
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.rc-slider-danger {
|
|
289
|
+
.rc-slider-fill {
|
|
290
|
+
background: rc-theme('slider-danger-fill-color');
|
|
291
|
+
}
|
|
292
|
+
.rc-slider-tick-active {
|
|
293
|
+
background: rc-theme('slider-danger-fill-color');
|
|
294
|
+
}
|
|
295
|
+
.rc-slider-input::-webkit-slider-thumb {
|
|
296
|
+
background: rc-theme('slider-danger-thumb-background');
|
|
297
|
+
}
|
|
298
|
+
.rc-slider-input::-moz-range-thumb {
|
|
299
|
+
background: rc-theme('slider-danger-thumb-background');
|
|
300
|
+
}
|
|
301
|
+
.rc-slider-current-value {
|
|
302
|
+
color: rc-theme('slider-danger-fill-color');
|
|
303
|
+
}
|
|
304
|
+
.rc-slider-input:focus-visible::-webkit-slider-thumb {
|
|
305
|
+
outline-color: rc-theme('slider-danger-focus-outline-color');
|
|
306
|
+
}
|
|
307
|
+
.rc-slider-input:focus-visible::-moz-range-thumb {
|
|
308
|
+
outline-color: rc-theme('slider-danger-focus-outline-color');
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|