@allxsmith/bestax-bulma 5.35.1 → 5.36.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/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/components/EmptyState.js +2 -2
- package/dist/esm/components/EmptyState.js.map +1 -1
- package/dist/esm/components/Timeline.js +150 -0
- package/dist/esm/components/Timeline.js.map +1 -0
- package/dist/esm/form/Autocomplete.js +2 -2
- package/dist/esm/form/Autocomplete.js.map +1 -1
- package/dist/esm/form/Taginput.js +64 -55
- package/dist/esm/form/Taginput.js.map +1 -1
- package/dist/esm/form/useAutoLabelId.js +3 -3
- package/dist/esm/form/useAutoLabelId.js.map +1 -1
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +896 -747
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +1 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/Timeline.d.ts +130 -0
- package/dist/types/form/Taginput.d.ts +12 -5
- package/dist/types/index.d.ts +1 -0
- package/dist/types-cjs/components/Timeline.d.ts +130 -0
- package/dist/types-cjs/form/Taginput.d.ts +12 -5
- package/dist/types-cjs/index.d.ts +1 -0
- package/dist/versions/bestax-no-dark-mode.css +1 -1
- package/dist/versions/bestax-no-dark-mode.css.map +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
- package/dist/versions/bestax-no-helpers.css +1 -1
- package/dist/versions/bestax-no-helpers.css.map +1 -1
- package/dist/versions/bestax-prefixed.css +1 -1
- package/dist/versions/bestax-prefixed.css.map +1 -1
- package/package.json +1 -1
- package/src/scss/components/_index.scss +2 -0
- package/src/scss/components/_loading.scss +26 -0
- package/src/scss/components/_menu.scss +37 -0
- package/src/scss/components/_timeline.scss +371 -0
- package/src/scss/form/_checkbox.scss +14 -14
- package/src/scss/form/_radio.scss +12 -12
- package/src/scss/form/_switch.scss +21 -21
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
// Bestax Extras - Timeline Styles
|
|
2
|
+
// A list of events with a marker each on a line down the side. Bulma v1 has
|
|
3
|
+
// no timeline, so this is all that draws one. The class names are the ones
|
|
4
|
+
// the old `bulma-timeline` extension used, where they mean the same thing.
|
|
5
|
+
//
|
|
6
|
+
// Every line, dot, ring and halo is a border or an outline, because forced
|
|
7
|
+
// colors keeps those and replaces background colors with the page's own.
|
|
8
|
+
// Logical properties throughout, so a right-to-left page needs no rules of its
|
|
9
|
+
// own. Everything is in em, so `textSize` on the list scales the text, the
|
|
10
|
+
// markers, the rail and the gaps together.
|
|
11
|
+
//
|
|
12
|
+
// The markers and the line sit on the middle of each item's first line,
|
|
13
|
+
// which is half the title's 1.5 line height: 0.75em.
|
|
14
|
+
|
|
15
|
+
@use "bulma/sass/utilities/initial-variables" as iv;
|
|
16
|
+
@use "bulma/sass/utilities/css-variables" as cv;
|
|
17
|
+
@use "bulma/sass/utilities/mixins" as mx;
|
|
18
|
+
|
|
19
|
+
$timeline-gap: 1.5em !default;
|
|
20
|
+
$timeline-content-gap: 0.25em !default;
|
|
21
|
+
$timeline-rail-size: 2em !default;
|
|
22
|
+
$timeline-rail-size-icon: 3em !default;
|
|
23
|
+
// Floored in px, so a small timeline keeps a line a screen can draw.
|
|
24
|
+
$timeline-line-width: max(2px, 0.125em) !default;
|
|
25
|
+
$timeline-line-color: cv.getVar("border") !default;
|
|
26
|
+
$timeline-dot-size: 0.75em !default;
|
|
27
|
+
$timeline-marker-size: 2em !default;
|
|
28
|
+
// Bulma's loader is 1em across.
|
|
29
|
+
$timeline-pending-size: 1em !default;
|
|
30
|
+
$timeline-neutral-color: cv.getVar("border-hover") !default;
|
|
31
|
+
$timeline-active-color: cv.getVar("link") !default;
|
|
32
|
+
// The fill behind a ring, the loader and an icon, so the line doesn't show
|
|
33
|
+
// through them: the page's own color.
|
|
34
|
+
$timeline-marker-background: cv.getVar("scheme-main") !default;
|
|
35
|
+
// An icon marker's circle in a record, and the icon in it.
|
|
36
|
+
$timeline-marker-icon-background: cv.getVar("background") !default;
|
|
37
|
+
$timeline-marker-icon-color: cv.getVar("text-weak") !default;
|
|
38
|
+
$timeline-halo-offset: 0.1875em !default;
|
|
39
|
+
$timeline-pending-duration: 1s !default;
|
|
40
|
+
$timeline-title-color: cv.getVar("text-strong") !default;
|
|
41
|
+
$timeline-title-weight: cv.getVar("weight-semibold") !default;
|
|
42
|
+
$timeline-time-color: cv.getVar("text-weak") !default;
|
|
43
|
+
$timeline-time-size: 0.875em !default;
|
|
44
|
+
|
|
45
|
+
.#{iv.$class-prefix}timeline {
|
|
46
|
+
@include cv.register-vars(
|
|
47
|
+
(
|
|
48
|
+
"timeline-gap": #{$timeline-gap},
|
|
49
|
+
"timeline-content-gap": #{$timeline-content-gap},
|
|
50
|
+
"timeline-rail-size": #{$timeline-rail-size},
|
|
51
|
+
"timeline-rail-size-icon": #{$timeline-rail-size-icon},
|
|
52
|
+
// Where the middle of the rail is, measured from the start of each
|
|
53
|
+
// item. The layouts set it, so it's not one to theme.
|
|
54
|
+
"timeline-rail-center": calc(#{cv.getVar("timeline-rail-size")} / 2),
|
|
55
|
+
"timeline-line-width": #{$timeline-line-width},
|
|
56
|
+
"timeline-line-color": #{$timeline-line-color},
|
|
57
|
+
"timeline-dot-size": #{$timeline-dot-size},
|
|
58
|
+
"timeline-marker-size": #{$timeline-marker-size},
|
|
59
|
+
"timeline-pending-size": #{$timeline-pending-size},
|
|
60
|
+
"timeline-neutral-color": #{$timeline-neutral-color},
|
|
61
|
+
// The color a marker is drawn in. The states and the color classes set it.
|
|
62
|
+
"timeline-marker-color": #{cv.getVar("timeline-neutral-color")},
|
|
63
|
+
"timeline-active-color": #{$timeline-active-color},
|
|
64
|
+
"timeline-marker-background": #{$timeline-marker-background},
|
|
65
|
+
"timeline-marker-icon-background": #{$timeline-marker-icon-background},
|
|
66
|
+
"timeline-marker-icon-color": #{$timeline-marker-icon-color},
|
|
67
|
+
"timeline-halo-offset": #{$timeline-halo-offset},
|
|
68
|
+
"timeline-pending-duration": #{$timeline-pending-duration},
|
|
69
|
+
"timeline-title-color": #{$timeline-title-color},
|
|
70
|
+
"timeline-title-weight": #{$timeline-title-weight},
|
|
71
|
+
"timeline-time-color": #{$timeline-time-color},
|
|
72
|
+
"timeline-time-size": #{$timeline-time-size},
|
|
73
|
+
)
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ---- Structure: `start`, the rail at the start of the line -----------------
|
|
78
|
+
|
|
79
|
+
.#{iv.$class-prefix}timeline {
|
|
80
|
+
list-style: none;
|
|
81
|
+
margin: 0;
|
|
82
|
+
padding: 0;
|
|
83
|
+
|
|
84
|
+
&:not(:last-child) {
|
|
85
|
+
margin-bottom: cv.getVar("block-spacing");
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// One icon marker widens the rail for every item, so the text lines up.
|
|
89
|
+
&:has(> .#{iv.$class-prefix}timeline-item > .#{iv.$class-prefix}timeline-marker.#{iv.$class-prefix}is-icon) {
|
|
90
|
+
@include cv.register-vars(
|
|
91
|
+
(
|
|
92
|
+
"timeline-rail-size": #{cv.getVar("timeline-rail-size-icon")},
|
|
93
|
+
)
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.#{iv.$class-prefix}timeline-item {
|
|
99
|
+
padding-inline-start: cv.getVar("timeline-rail-size");
|
|
100
|
+
position: relative;
|
|
101
|
+
|
|
102
|
+
&:not(:last-child) {
|
|
103
|
+
padding-bottom: cv.getVar("timeline-gap");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// The line, from the middle of this marker to the middle of the next one,
|
|
107
|
+
// behind both. The last item has none.
|
|
108
|
+
&:not(:last-child)::before {
|
|
109
|
+
border-inline-start: cv.getVar("timeline-line-width") solid cv.getVar("timeline-line-color");
|
|
110
|
+
bottom: -0.75em;
|
|
111
|
+
content: "";
|
|
112
|
+
inset-inline-start: calc(#{cv.getVar("timeline-rail-center")} - #{cv.getVar("timeline-line-width")} / 2);
|
|
113
|
+
position: absolute;
|
|
114
|
+
top: 0.75em;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// A dot is a box with a border half its width, so it stays a solid dot in
|
|
119
|
+
// forced colors.
|
|
120
|
+
.#{iv.$class-prefix}timeline-marker {
|
|
121
|
+
align-items: center;
|
|
122
|
+
border: calc(#{cv.getVar("timeline-dot-size")} / 2) solid cv.getVar("timeline-marker-color");
|
|
123
|
+
border-radius: cv.getVar("radius-rounded");
|
|
124
|
+
display: flex;
|
|
125
|
+
height: cv.getVar("timeline-dot-size");
|
|
126
|
+
inset-inline-start: calc(#{cv.getVar("timeline-rail-center")} - #{cv.getVar("timeline-dot-size")} / 2);
|
|
127
|
+
justify-content: center;
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: calc(0.75em - #{cv.getVar("timeline-dot-size")} / 2);
|
|
130
|
+
width: cv.getVar("timeline-dot-size");
|
|
131
|
+
z-index: 1;
|
|
132
|
+
|
|
133
|
+
// An icon in a circle, its fill over the line.
|
|
134
|
+
&.#{iv.$class-prefix}is-icon {
|
|
135
|
+
background-color: cv.getVar("timeline-marker-icon-background");
|
|
136
|
+
border-width: cv.getVar("timeline-line-width");
|
|
137
|
+
color: cv.getVar("timeline-marker-icon-color");
|
|
138
|
+
height: cv.getVar("timeline-marker-size");
|
|
139
|
+
inset-inline-start: calc(#{cv.getVar("timeline-rail-center")} - #{cv.getVar("timeline-marker-size")} / 2);
|
|
140
|
+
top: calc(0.75em - #{cv.getVar("timeline-marker-size")} / 2);
|
|
141
|
+
width: cv.getVar("timeline-marker-size");
|
|
142
|
+
|
|
143
|
+
// An Icon's box is 1.5rem whatever the glyph is, so it's sized to the
|
|
144
|
+
// glyph here, and a bare SVG or image is drawn at it too.
|
|
145
|
+
> .#{iv.$class-prefix}icon,
|
|
146
|
+
> svg,
|
|
147
|
+
> img {
|
|
148
|
+
height: 1em;
|
|
149
|
+
width: 1em;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.#{iv.$class-prefix}timeline-content {
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-direction: column;
|
|
157
|
+
gap: cv.getVar("timeline-content-gap");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.#{iv.$class-prefix}timeline-title {
|
|
161
|
+
color: cv.getVar("timeline-title-color");
|
|
162
|
+
font-size: 1em;
|
|
163
|
+
font-weight: cv.getVar("timeline-title-weight");
|
|
164
|
+
line-height: 1.5;
|
|
165
|
+
margin: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.#{iv.$class-prefix}timeline-time {
|
|
169
|
+
color: cv.getVar("timeline-time-color");
|
|
170
|
+
display: block;
|
|
171
|
+
font-size: cv.getVar("timeline-time-size");
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// A Notification sets its own text color, and the scheme's text colors don't
|
|
175
|
+
// read on a colored one, so the title and the time take the Notification's,
|
|
176
|
+
// the way Bulma's own titles do there.
|
|
177
|
+
.#{iv.$class-prefix}notification .#{iv.$class-prefix}timeline-title,
|
|
178
|
+
.#{iv.$class-prefix}notification .#{iv.$class-prefix}timeline-time {
|
|
179
|
+
color: currentColor;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ---- `end`: the rail at the end of the line ---------------------------------
|
|
183
|
+
|
|
184
|
+
.#{iv.$class-prefix}timeline.#{iv.$class-prefix}is-end {
|
|
185
|
+
@include cv.register-vars(
|
|
186
|
+
(
|
|
187
|
+
"timeline-rail-center": calc(100% - #{cv.getVar("timeline-rail-size")} / 2),
|
|
188
|
+
)
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
text-align: end;
|
|
192
|
+
|
|
193
|
+
> .#{iv.$class-prefix}timeline-item {
|
|
194
|
+
padding-inline-end: cv.getVar("timeline-rail-size");
|
|
195
|
+
padding-inline-start: 0;
|
|
196
|
+
|
|
197
|
+
> .#{iv.$class-prefix}timeline-content {
|
|
198
|
+
align-items: flex-end;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// ---- `alternate`: the rail down the middle, the items taking turns ---------
|
|
204
|
+
// From Bulma's tablet breakpoint up. Below it, it's `start`, so a phone gets
|
|
205
|
+
// one column. No item moves up or down: they only move sideways, so the
|
|
206
|
+
// reading order is the order on screen.
|
|
207
|
+
|
|
208
|
+
@include mx.tablet {
|
|
209
|
+
.#{iv.$class-prefix}timeline.#{iv.$class-prefix}is-alternate {
|
|
210
|
+
@include cv.register-vars(
|
|
211
|
+
(
|
|
212
|
+
"timeline-rail-center": 50%,
|
|
213
|
+
)
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
// The first item, and every other one after it, goes on the end side,
|
|
217
|
+
// with its time across the rail on the start side.
|
|
218
|
+
> .#{iv.$class-prefix}timeline-item {
|
|
219
|
+
padding-inline-start: calc(50% + #{cv.getVar("timeline-rail-size")} / 2);
|
|
220
|
+
|
|
221
|
+
// Level with the title: a line box the title's 1.5em tall, in the
|
|
222
|
+
// time's own smaller em.
|
|
223
|
+
> .#{iv.$class-prefix}timeline-content > .#{iv.$class-prefix}timeline-time {
|
|
224
|
+
inset-inline-end: calc(50% + #{cv.getVar("timeline-rail-size")} / 2);
|
|
225
|
+
line-height: calc(1.5em / 0.875);
|
|
226
|
+
max-width: calc(50% - #{cv.getVar("timeline-rail-size")} / 2);
|
|
227
|
+
position: absolute;
|
|
228
|
+
text-align: end;
|
|
229
|
+
top: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&:nth-child(even) {
|
|
233
|
+
padding-inline-end: calc(50% + #{cv.getVar("timeline-rail-size")} / 2);
|
|
234
|
+
padding-inline-start: 0;
|
|
235
|
+
text-align: end;
|
|
236
|
+
|
|
237
|
+
> .#{iv.$class-prefix}timeline-content {
|
|
238
|
+
align-items: flex-end;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
> .#{iv.$class-prefix}timeline-content > .#{iv.$class-prefix}timeline-time {
|
|
242
|
+
inset-inline-end: auto;
|
|
243
|
+
inset-inline-start: calc(50% + #{cv.getVar("timeline-rail-size")} / 2);
|
|
244
|
+
text-align: start;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// ---- Progress: completed, current, upcoming, pending -----------------------
|
|
252
|
+
|
|
253
|
+
.#{iv.$class-prefix}timeline-item {
|
|
254
|
+
&.#{iv.$class-prefix}is-completed,
|
|
255
|
+
&.#{iv.$class-prefix}is-active,
|
|
256
|
+
&.#{iv.$class-prefix}is-pending {
|
|
257
|
+
@include cv.register-vars(
|
|
258
|
+
(
|
|
259
|
+
"timeline-marker-color": #{cv.getVar("timeline-active-color")},
|
|
260
|
+
)
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&.#{iv.$class-prefix}is-upcoming {
|
|
265
|
+
@include cv.register-vars(
|
|
266
|
+
(
|
|
267
|
+
"timeline-marker-color": #{cv.getVar("timeline-neutral-color")},
|
|
268
|
+
)
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// The line is filled up to the current item.
|
|
273
|
+
&.#{iv.$class-prefix}is-completed::before {
|
|
274
|
+
border-inline-start-color: cv.getVar("timeline-active-color");
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// The line into the pending item is dashed: a shape, not just a color.
|
|
278
|
+
&:has(+ .#{iv.$class-prefix}timeline-item.#{iv.$class-prefix}is-pending)::before {
|
|
279
|
+
border-inline-start-style: dashed;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Upcoming: an empty ring, not a dot.
|
|
284
|
+
.#{iv.$class-prefix}timeline-item.#{iv.$class-prefix}is-upcoming > .#{iv.$class-prefix}timeline-marker {
|
|
285
|
+
background-color: cv.getVar("timeline-marker-background");
|
|
286
|
+
border-width: cv.getVar("timeline-line-width");
|
|
287
|
+
|
|
288
|
+
&.#{iv.$class-prefix}is-icon {
|
|
289
|
+
color: cv.getVar("text-weak");
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// A reached icon marker is tinted with the progress color, the way the dots
|
|
294
|
+
// are filled with it.
|
|
295
|
+
.#{iv.$class-prefix}timeline-item.#{iv.$class-prefix}is-completed > .#{iv.$class-prefix}timeline-marker.#{iv.$class-prefix}is-icon,
|
|
296
|
+
.#{iv.$class-prefix}timeline-item.#{iv.$class-prefix}is-active > .#{iv.$class-prefix}timeline-marker.#{iv.$class-prefix}is-icon {
|
|
297
|
+
background-color: color-mix(in srgb, #{cv.getVar("timeline-active-color")} 15%, #{cv.getVar("timeline-marker-background")});
|
|
298
|
+
color: cv.getVar("timeline-active-color");
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Current: the dot with a halo around it, drawn as an outline.
|
|
302
|
+
.#{iv.$class-prefix}timeline-item.#{iv.$class-prefix}is-active > .#{iv.$class-prefix}timeline-marker {
|
|
303
|
+
outline: cv.getVar("timeline-line-width") solid cv.getVar("timeline-marker-color");
|
|
304
|
+
outline-offset: cv.getVar("timeline-halo-offset");
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Pending: Bulma's loader, a ring with two sides open, turning. The open
|
|
308
|
+
// shape is the cue, so it still reads when it stands still. It opens its top
|
|
309
|
+
// and its inline end, the right in a left-to-right page as on Bulma's loader,
|
|
310
|
+
// and the left in a right-to-left one. It turns on its own keyframes, as the
|
|
311
|
+
// other extras do, since Bulma's `spinAround` lives in its base, which
|
|
312
|
+
// `extras.css` and a modular build may leave out.
|
|
313
|
+
.#{iv.$class-prefix}timeline-item.#{iv.$class-prefix}is-pending > .#{iv.$class-prefix}timeline-marker {
|
|
314
|
+
animation: #{iv.$class-prefix}timeline-spin cv.getVar("timeline-pending-duration") infinite linear;
|
|
315
|
+
background-color: cv.getVar("timeline-marker-background");
|
|
316
|
+
border-inline-end-color: transparent;
|
|
317
|
+
border-top-color: transparent;
|
|
318
|
+
border-width: cv.getVar("timeline-line-width");
|
|
319
|
+
height: cv.getVar("timeline-pending-size");
|
|
320
|
+
inset-inline-start: calc(#{cv.getVar("timeline-rail-center")} - #{cv.getVar("timeline-pending-size")} / 2);
|
|
321
|
+
top: calc(0.75em - #{cv.getVar("timeline-pending-size")} / 2);
|
|
322
|
+
width: cv.getVar("timeline-pending-size");
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
@keyframes #{iv.$class-prefix}timeline-spin {
|
|
326
|
+
to {
|
|
327
|
+
transform: rotate(360deg);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@media (prefers-reduced-motion: reduce) {
|
|
332
|
+
.#{iv.$class-prefix}timeline-item.#{iv.$class-prefix}is-pending > .#{iv.$class-prefix}timeline-marker {
|
|
333
|
+
animation: none;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Forced colors paints a `transparent` border in the text color, which would
|
|
338
|
+
// close the ring into an upcoming one. The page's own color keeps the two
|
|
339
|
+
// sides open.
|
|
340
|
+
@media (forced-colors: active) {
|
|
341
|
+
.#{iv.$class-prefix}timeline-item.#{iv.$class-prefix}is-pending > .#{iv.$class-prefix}timeline-marker {
|
|
342
|
+
border-inline-end-color: Canvas;
|
|
343
|
+
border-top-color: Canvas;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// ---- Colors, after the states, so an item's own color wins -----------------
|
|
348
|
+
|
|
349
|
+
@each $name in "primary", "link", "info", "success", "warning", "danger" {
|
|
350
|
+
.#{iv.$class-prefix}timeline.#{iv.$class-prefix}is-#{$name},
|
|
351
|
+
.#{iv.$class-prefix}timeline-item.#{iv.$class-prefix}is-#{$name} {
|
|
352
|
+
@include cv.register-vars(
|
|
353
|
+
(
|
|
354
|
+
"timeline-marker-color": #{cv.getVar($name)},
|
|
355
|
+
"timeline-active-color": #{cv.getVar($name)},
|
|
356
|
+
"timeline-marker-icon-background":
|
|
357
|
+
hsl(
|
|
358
|
+
#{cv.getVar($name, "", "-h")},
|
|
359
|
+
#{cv.getVar($name, "", "-s")},
|
|
360
|
+
#{cv.getVar("soft-l")}
|
|
361
|
+
),
|
|
362
|
+
"timeline-marker-icon-color":
|
|
363
|
+
hsl(
|
|
364
|
+
#{cv.getVar($name, "", "-h")},
|
|
365
|
+
#{cv.getVar($name, "", "-s")},
|
|
366
|
+
#{cv.getVar("soft-invert-l")}
|
|
367
|
+
),
|
|
368
|
+
)
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
@@ -58,7 +58,7 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
|
|
|
58
58
|
height: 0;
|
|
59
59
|
|
|
60
60
|
// Checked state
|
|
61
|
-
&:checked +
|
|
61
|
+
&:checked + .#{iv.$class-prefix}check {
|
|
62
62
|
background-color: cv.getVar("checkbox-active-color");
|
|
63
63
|
border-color: cv.getVar("checkbox-active-color");
|
|
64
64
|
|
|
@@ -70,7 +70,7 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// Indeterminate state
|
|
73
|
-
&:indeterminate +
|
|
73
|
+
&:indeterminate + .#{iv.$class-prefix}check {
|
|
74
74
|
background-color: cv.getVar("checkbox-indeterminate-color");
|
|
75
75
|
border-color: cv.getVar("checkbox-indeterminate-color");
|
|
76
76
|
|
|
@@ -92,25 +92,25 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Focus-visible state (keyboard only)
|
|
95
|
-
&:focus-visible +
|
|
95
|
+
&:focus-visible + .#{iv.$class-prefix}check {
|
|
96
96
|
outline: 2px solid cv.getVar("checkbox-active-color");
|
|
97
97
|
outline-offset: 2px;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
// Disabled state
|
|
101
|
-
&:disabled +
|
|
101
|
+
&:disabled + .#{iv.$class-prefix}check {
|
|
102
102
|
opacity: 0.5;
|
|
103
103
|
cursor: not-allowed;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
&:disabled ~
|
|
106
|
+
&:disabled ~ .#{iv.$class-prefix}control-label {
|
|
107
107
|
opacity: 0.5;
|
|
108
108
|
cursor: not-allowed;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
// Custom check indicator
|
|
113
|
-
|
|
113
|
+
.#{iv.$class-prefix}check {
|
|
114
114
|
display: inline-flex;
|
|
115
115
|
align-items: center;
|
|
116
116
|
justify-content: center;
|
|
@@ -146,7 +146,7 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
// Label text
|
|
149
|
-
|
|
149
|
+
.#{iv.$class-prefix}control-label {
|
|
150
150
|
margin-left: cv.getVar("checkbox-label-gap");
|
|
151
151
|
line-height: 1.5;
|
|
152
152
|
}
|
|
@@ -180,11 +180,11 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
|
|
|
180
180
|
// High Contrast Mode support
|
|
181
181
|
@media (forced-colors: active) {
|
|
182
182
|
.#{iv.$class-prefix}styled-checkbox {
|
|
183
|
-
|
|
183
|
+
.#{iv.$class-prefix}check {
|
|
184
184
|
border-color: ButtonText;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
input[type="checkbox"]:checked +
|
|
187
|
+
input[type="checkbox"]:checked + .#{iv.$class-prefix}check {
|
|
188
188
|
background-color: Highlight;
|
|
189
189
|
border-color: Highlight;
|
|
190
190
|
|
|
@@ -204,7 +204,7 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
|
|
|
204
204
|
// Forced colors repaints the mixed fill and its dash in the same color,
|
|
205
205
|
// which leaves an empty box. Draw the dash in system colors that keep it
|
|
206
206
|
// visible, checked or not.
|
|
207
|
-
input[type="checkbox"]:indeterminate +
|
|
207
|
+
input[type="checkbox"]:indeterminate + .#{iv.$class-prefix}check {
|
|
208
208
|
background-color: Canvas;
|
|
209
209
|
|
|
210
210
|
&::before {
|
|
@@ -212,11 +212,11 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
input[type="checkbox"]:focus-visible +
|
|
215
|
+
input[type="checkbox"]:focus-visible + .#{iv.$class-prefix}check {
|
|
216
216
|
outline-color: Highlight;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
input[type="checkbox"]:disabled +
|
|
219
|
+
input[type="checkbox"]:disabled + .#{iv.$class-prefix}check {
|
|
220
220
|
border-color: GrayText;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
@@ -225,8 +225,8 @@ $-check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
|
|
|
225
225
|
// Reduced motion
|
|
226
226
|
@media (prefers-reduced-motion: reduce) {
|
|
227
227
|
.#{iv.$class-prefix}styled-checkbox {
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
.#{iv.$class-prefix}check,
|
|
229
|
+
.#{iv.$class-prefix}check::after {
|
|
230
230
|
transition: none;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -50,7 +50,7 @@ $radio-transition-duration: cv.getVar("duration") !default;
|
|
|
50
50
|
height: 0;
|
|
51
51
|
|
|
52
52
|
// Checked state
|
|
53
|
-
&:checked +
|
|
53
|
+
&:checked + .#{iv.$class-prefix}check {
|
|
54
54
|
border-color: cv.getVar("radio-active-color");
|
|
55
55
|
|
|
56
56
|
// Inner dot
|
|
@@ -61,25 +61,25 @@ $radio-transition-duration: cv.getVar("duration") !default;
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
// Focus-visible state (keyboard only)
|
|
64
|
-
&:focus-visible +
|
|
64
|
+
&:focus-visible + .#{iv.$class-prefix}check {
|
|
65
65
|
outline: 2px solid cv.getVar("radio-active-color");
|
|
66
66
|
outline-offset: 2px;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// Disabled state
|
|
70
|
-
&:disabled +
|
|
70
|
+
&:disabled + .#{iv.$class-prefix}check {
|
|
71
71
|
opacity: 0.5;
|
|
72
72
|
cursor: not-allowed;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
&:disabled ~
|
|
75
|
+
&:disabled ~ .#{iv.$class-prefix}control-label {
|
|
76
76
|
opacity: 0.5;
|
|
77
77
|
cursor: not-allowed;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
// Custom radio indicator
|
|
82
|
-
|
|
82
|
+
.#{iv.$class-prefix}check {
|
|
83
83
|
display: inline-flex;
|
|
84
84
|
align-items: center;
|
|
85
85
|
justify-content: center;
|
|
@@ -115,7 +115,7 @@ $radio-transition-duration: cv.getVar("duration") !default;
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
// Label text
|
|
118
|
-
|
|
118
|
+
.#{iv.$class-prefix}control-label {
|
|
119
119
|
margin-left: cv.getVar("radio-label-gap");
|
|
120
120
|
line-height: 1.5;
|
|
121
121
|
}
|
|
@@ -148,11 +148,11 @@ $radio-transition-duration: cv.getVar("duration") !default;
|
|
|
148
148
|
// High Contrast Mode support
|
|
149
149
|
@media (forced-colors: active) {
|
|
150
150
|
.#{iv.$class-prefix}styled-radio {
|
|
151
|
-
|
|
151
|
+
.#{iv.$class-prefix}check {
|
|
152
152
|
border-color: ButtonText;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
input[type="radio"]:checked +
|
|
155
|
+
input[type="radio"]:checked + .#{iv.$class-prefix}check {
|
|
156
156
|
border-color: Highlight;
|
|
157
157
|
|
|
158
158
|
&::before {
|
|
@@ -160,11 +160,11 @@ $radio-transition-duration: cv.getVar("duration") !default;
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
input[type="radio"]:focus-visible +
|
|
163
|
+
input[type="radio"]:focus-visible + .#{iv.$class-prefix}check {
|
|
164
164
|
outline-color: Highlight;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
input[type="radio"]:disabled +
|
|
167
|
+
input[type="radio"]:disabled + .#{iv.$class-prefix}check {
|
|
168
168
|
border-color: GrayText;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -173,8 +173,8 @@ $radio-transition-duration: cv.getVar("duration") !default;
|
|
|
173
173
|
// Reduced motion
|
|
174
174
|
@media (prefers-reduced-motion: reduce) {
|
|
175
175
|
.#{iv.$class-prefix}styled-radio {
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
.#{iv.$class-prefix}check,
|
|
177
|
+
.#{iv.$class-prefix}check::before {
|
|
178
178
|
transition: none;
|
|
179
179
|
}
|
|
180
180
|
}
|