@bodynarf/react.components 1.14.1 → 1.14.3
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/changelog.md +4 -1
- package/components/primitives/radioGroup/component/style.css +63 -143
- package/components/primitives/radioGroup/component/style.scss +33 -2
- package/components/primitives/slider/component/index.d.ts.map +1 -1
- package/components/primitives/slider/component/index.js +33 -6
- package/components/primitives/slider/component/style.css +190 -163
- package/components/primitives/slider/component/style.scss +93 -5
- package/components/primitives/slider/types.d.ts +5 -0
- package/components/primitives/slider/types.d.ts.map +1 -1
- package/components/primitives/switch/component/index.js +2 -2
- package/components/primitives/switch/component/style.css +63 -106
- package/components/primitives/switch/component/style.scss +39 -10
- package/components/progress/component/style.css +41 -41
- package/components/progress/component/style.scss +20 -15
- package/components/stepper/component/style.css +83 -175
- package/components/stepper/component/style.scss +27 -3
- package/components/timeline/component/index.js +1 -1
- package/components/timeline/component/style.css +90 -141
- package/components/timeline/component/style.scss +56 -5
- package/package.json +5 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/components/anchor/component/index.d.ts +0 -8
- package/components/anchor/component/index.d.ts.map +0 -1
- package/components/anchor/component/index.js +0 -23
- package/components/anchor/component/style.css +0 -12
- package/components/anchor/component/style.scss +0 -15
- package/components/anchor/components/anchorWithIcon/index.d.ts +0 -11
- package/components/anchor/components/anchorWithIcon/index.d.ts.map +0 -1
- package/components/anchor/components/anchorWithIcon/index.js +0 -24
- package/components/anchor/components/simpleAnchor/index.d.ts +0 -5
- package/components/anchor/components/simpleAnchor/index.d.ts.map +0 -1
- package/components/anchor/components/simpleAnchor/index.js +0 -11
- package/components/anchor/index.d.ts +0 -3
- package/components/anchor/index.d.ts.map +0 -1
- package/components/anchor/index.js +0 -2
- package/components/anchor/types.d.ts +0 -20
- package/components/anchor/types.d.ts.map +0 -1
- package/components/anchor/types.js +0 -1
- package/components/tooltip/component/index.d.ts +0 -6
- package/components/tooltip/component/index.d.ts.map +0 -1
- package/components/tooltip/component/index.js +0 -80
- package/components/tooltip/index.d.ts +0 -3
- package/components/tooltip/index.d.ts.map +0 -1
- package/components/tooltip/index.js +0 -2
- package/components/tooltip/types.d.ts +0 -31
- package/components/tooltip/types.d.ts.map +0 -1
- package/components/tooltip/types.js +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { emptyFn, generateGuid, getClassName, isNotNullish, isNullish } from "@bodynarf/utils";
|
|
4
|
-
import { ElementSize } from "../../../../types";
|
|
4
|
+
import { ElementColor, ElementSize } from "../../../../types";
|
|
5
5
|
import { getElementColorClassName, getSizeClassName, mapDataAttributes } from "../../../../utils";
|
|
6
6
|
import ComponentWithLabel from "../../internal/componentWithLabel";
|
|
7
7
|
import "./style.scss";
|
|
8
8
|
/** Switch/Toggle input component */
|
|
9
|
-
const Switch = ({ onValueChange = emptyFn, defaultValue, label, name = generateGuid(), size = ElementSize.Normal, style, disabled = false, rounded = false, outlined = false, thin = false, rtl = false, isFormLabel = false, className, data, title }) => {
|
|
9
|
+
const Switch = ({ onValueChange = emptyFn, defaultValue, label, name = generateGuid(), size = ElementSize.Normal, style = ElementColor.Primary, disabled = false, rounded = false, outlined = false, thin = false, rtl = false, isFormLabel = false, className, data, title }) => {
|
|
10
10
|
const onChecked = useCallback((event) => onValueChange(event.target.checked), [onValueChange]);
|
|
11
11
|
const elClassName = getClassName([
|
|
12
12
|
"switch",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
opacity: 0;
|
|
7
7
|
}
|
|
8
8
|
.switch[type=checkbox].bbr-switch:focus + label::before {
|
|
9
|
-
outline: 1px dotted
|
|
9
|
+
outline: 1px dotted var(--bulma-grey-light, #b5b5b5);
|
|
10
10
|
}
|
|
11
11
|
.switch[type=checkbox].bbr-switch[disabled] {
|
|
12
12
|
cursor: not-allowed;
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
.switch[type=checkbox].bbr-switch[disabled] + label:hover {
|
|
24
24
|
cursor: not-allowed;
|
|
25
25
|
}
|
|
26
|
-
.switch[type=checkbox].bbr-switch:checked + label::before {
|
|
27
|
-
background: hsl(171, 100%, 41%);
|
|
28
|
-
}
|
|
29
26
|
.switch[type=checkbox].bbr-switch + label {
|
|
30
27
|
position: relative;
|
|
31
28
|
display: initial;
|
|
@@ -43,8 +40,8 @@
|
|
|
43
40
|
width: 3rem;
|
|
44
41
|
height: 1.5rem;
|
|
45
42
|
border: 0.1rem solid transparent;
|
|
46
|
-
border-radius: 4px;
|
|
47
|
-
background:
|
|
43
|
+
border-radius: var(--bulma-radius, 4px);
|
|
44
|
+
background: var(--bulma-grey-light, #b5b5b5);
|
|
48
45
|
content: "";
|
|
49
46
|
}
|
|
50
47
|
.switch[type=checkbox].bbr-switch + label::after {
|
|
@@ -55,8 +52,8 @@
|
|
|
55
52
|
width: 1rem;
|
|
56
53
|
height: 1rem;
|
|
57
54
|
transform: translate3d(0, 0, 0);
|
|
58
|
-
border-radius: 4px;
|
|
59
|
-
background:
|
|
55
|
+
border-radius: var(--bulma-radius, 4px);
|
|
56
|
+
background: var(--bulma-white, #fff);
|
|
60
57
|
transition: all 0.25s ease-out;
|
|
61
58
|
content: "";
|
|
62
59
|
}
|
|
@@ -76,6 +73,9 @@
|
|
|
76
73
|
left: auto;
|
|
77
74
|
right: 1.625rem;
|
|
78
75
|
}
|
|
76
|
+
.switch[type=checkbox].bbr-switch:checked + label::before {
|
|
77
|
+
background: var(--bulma-primary, #00d1b2);
|
|
78
|
+
}
|
|
79
79
|
.switch[type=checkbox].bbr-switch:checked + label::after {
|
|
80
80
|
left: 1.625rem;
|
|
81
81
|
}
|
|
@@ -85,17 +85,17 @@
|
|
|
85
85
|
}
|
|
86
86
|
.switch[type=checkbox].bbr-switch.is-outlined + label::before {
|
|
87
87
|
background-color: transparent;
|
|
88
|
-
border-color:
|
|
88
|
+
border-color: var(--bulma-grey-light, #b5b5b5);
|
|
89
89
|
}
|
|
90
90
|
.switch[type=checkbox].bbr-switch.is-outlined + label::after {
|
|
91
|
-
background:
|
|
91
|
+
background: var(--bulma-grey-light, #b5b5b5);
|
|
92
92
|
}
|
|
93
93
|
.switch[type=checkbox].bbr-switch.is-outlined:checked + label::before {
|
|
94
94
|
background-color: transparent;
|
|
95
|
-
border-color:
|
|
95
|
+
border-color: var(--bulma-primary, #00d1b2);
|
|
96
96
|
}
|
|
97
97
|
.switch[type=checkbox].bbr-switch.is-outlined:checked + label::after {
|
|
98
|
-
background:
|
|
98
|
+
background: var(--bulma-primary, #00d1b2);
|
|
99
99
|
}
|
|
100
100
|
.switch[type=checkbox].bbr-switch.is-thin + label::before {
|
|
101
101
|
top: 0.375rem;
|
|
@@ -124,8 +124,8 @@
|
|
|
124
124
|
width: 2.25rem;
|
|
125
125
|
height: 1.125rem;
|
|
126
126
|
border: 0.1rem solid transparent;
|
|
127
|
-
border-radius: 4px;
|
|
128
|
-
background:
|
|
127
|
+
border-radius: var(--bulma-radius, 4px);
|
|
128
|
+
background: var(--bulma-grey-light, #b5b5b5);
|
|
129
129
|
content: "";
|
|
130
130
|
}
|
|
131
131
|
.switch[type=checkbox].bbr-switch.is-small + label::after {
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
width: 0.625rem;
|
|
137
137
|
height: 0.625rem;
|
|
138
138
|
transform: translate3d(0, 0, 0);
|
|
139
|
-
border-radius: 4px;
|
|
140
|
-
background:
|
|
139
|
+
border-radius: var(--bulma-radius, 4px);
|
|
140
|
+
background: var(--bulma-white, #fff);
|
|
141
141
|
transition: all 0.25s ease-out;
|
|
142
142
|
content: "";
|
|
143
143
|
}
|
|
@@ -157,6 +157,9 @@
|
|
|
157
157
|
left: auto;
|
|
158
158
|
right: 1.25rem;
|
|
159
159
|
}
|
|
160
|
+
.switch[type=checkbox].bbr-switch.is-small:checked + label::before {
|
|
161
|
+
background: var(--bulma-primary, #00d1b2);
|
|
162
|
+
}
|
|
160
163
|
.switch[type=checkbox].bbr-switch.is-small:checked + label::after {
|
|
161
164
|
left: 1.25rem;
|
|
162
165
|
}
|
|
@@ -166,17 +169,17 @@
|
|
|
166
169
|
}
|
|
167
170
|
.switch[type=checkbox].bbr-switch.is-small.is-outlined + label::before {
|
|
168
171
|
background-color: transparent;
|
|
169
|
-
border-color:
|
|
172
|
+
border-color: var(--bulma-grey-light, #b5b5b5);
|
|
170
173
|
}
|
|
171
174
|
.switch[type=checkbox].bbr-switch.is-small.is-outlined + label::after {
|
|
172
|
-
background:
|
|
175
|
+
background: var(--bulma-grey-light, #b5b5b5);
|
|
173
176
|
}
|
|
174
177
|
.switch[type=checkbox].bbr-switch.is-small.is-outlined:checked + label::before {
|
|
175
178
|
background-color: transparent;
|
|
176
|
-
border-color:
|
|
179
|
+
border-color: var(--bulma-primary, #00d1b2);
|
|
177
180
|
}
|
|
178
181
|
.switch[type=checkbox].bbr-switch.is-small.is-outlined:checked + label::after {
|
|
179
|
-
background:
|
|
182
|
+
background: var(--bulma-primary, #00d1b2);
|
|
180
183
|
}
|
|
181
184
|
.switch[type=checkbox].bbr-switch.is-small.is-thin + label::before {
|
|
182
185
|
top: 0.28125rem;
|
|
@@ -205,8 +208,8 @@
|
|
|
205
208
|
width: 3.75rem;
|
|
206
209
|
height: 1.875rem;
|
|
207
210
|
border: 0.1rem solid transparent;
|
|
208
|
-
border-radius: 4px;
|
|
209
|
-
background:
|
|
211
|
+
border-radius: var(--bulma-radius, 4px);
|
|
212
|
+
background: var(--bulma-grey-light, #b5b5b5);
|
|
210
213
|
content: "";
|
|
211
214
|
}
|
|
212
215
|
.switch[type=checkbox].bbr-switch.is-medium + label::after {
|
|
@@ -217,8 +220,8 @@
|
|
|
217
220
|
width: 1.375rem;
|
|
218
221
|
height: 1.375rem;
|
|
219
222
|
transform: translate3d(0, 0, 0);
|
|
220
|
-
border-radius: 4px;
|
|
221
|
-
background:
|
|
223
|
+
border-radius: var(--bulma-radius, 4px);
|
|
224
|
+
background: var(--bulma-white, #fff);
|
|
222
225
|
transition: all 0.25s ease-out;
|
|
223
226
|
content: "";
|
|
224
227
|
}
|
|
@@ -238,6 +241,9 @@
|
|
|
238
241
|
left: auto;
|
|
239
242
|
right: 2rem;
|
|
240
243
|
}
|
|
244
|
+
.switch[type=checkbox].bbr-switch.is-medium:checked + label::before {
|
|
245
|
+
background: var(--bulma-primary, #00d1b2);
|
|
246
|
+
}
|
|
241
247
|
.switch[type=checkbox].bbr-switch.is-medium:checked + label::after {
|
|
242
248
|
left: 2rem;
|
|
243
249
|
}
|
|
@@ -247,17 +253,17 @@
|
|
|
247
253
|
}
|
|
248
254
|
.switch[type=checkbox].bbr-switch.is-medium.is-outlined + label::before {
|
|
249
255
|
background-color: transparent;
|
|
250
|
-
border-color:
|
|
256
|
+
border-color: var(--bulma-grey-light, #b5b5b5);
|
|
251
257
|
}
|
|
252
258
|
.switch[type=checkbox].bbr-switch.is-medium.is-outlined + label::after {
|
|
253
|
-
background:
|
|
259
|
+
background: var(--bulma-grey-light, #b5b5b5);
|
|
254
260
|
}
|
|
255
261
|
.switch[type=checkbox].bbr-switch.is-medium.is-outlined:checked + label::before {
|
|
256
262
|
background-color: transparent;
|
|
257
|
-
border-color:
|
|
263
|
+
border-color: var(--bulma-primary, #00d1b2);
|
|
258
264
|
}
|
|
259
265
|
.switch[type=checkbox].bbr-switch.is-medium.is-outlined:checked + label::after {
|
|
260
|
-
background:
|
|
266
|
+
background: var(--bulma-primary, #00d1b2);
|
|
261
267
|
}
|
|
262
268
|
.switch[type=checkbox].bbr-switch.is-medium.is-thin + label::before {
|
|
263
269
|
top: 0.46875rem;
|
|
@@ -286,8 +292,8 @@
|
|
|
286
292
|
width: 4.5rem;
|
|
287
293
|
height: 2.25rem;
|
|
288
294
|
border: 0.1rem solid transparent;
|
|
289
|
-
border-radius: 4px;
|
|
290
|
-
background:
|
|
295
|
+
border-radius: var(--bulma-radius, 4px);
|
|
296
|
+
background: var(--bulma-grey-light, #b5b5b5);
|
|
291
297
|
content: "";
|
|
292
298
|
}
|
|
293
299
|
.switch[type=checkbox].bbr-switch.is-large + label::after {
|
|
@@ -298,8 +304,8 @@
|
|
|
298
304
|
width: 1.75rem;
|
|
299
305
|
height: 1.75rem;
|
|
300
306
|
transform: translate3d(0, 0, 0);
|
|
301
|
-
border-radius: 4px;
|
|
302
|
-
background:
|
|
307
|
+
border-radius: var(--bulma-radius, 4px);
|
|
308
|
+
background: var(--bulma-white, #fff);
|
|
303
309
|
transition: all 0.25s ease-out;
|
|
304
310
|
content: "";
|
|
305
311
|
}
|
|
@@ -319,6 +325,9 @@
|
|
|
319
325
|
left: auto;
|
|
320
326
|
right: 2.375rem;
|
|
321
327
|
}
|
|
328
|
+
.switch[type=checkbox].bbr-switch.is-large:checked + label::before {
|
|
329
|
+
background: var(--bulma-primary, #00d1b2);
|
|
330
|
+
}
|
|
322
331
|
.switch[type=checkbox].bbr-switch.is-large:checked + label::after {
|
|
323
332
|
left: 2.375rem;
|
|
324
333
|
}
|
|
@@ -328,17 +337,17 @@
|
|
|
328
337
|
}
|
|
329
338
|
.switch[type=checkbox].bbr-switch.is-large.is-outlined + label::before {
|
|
330
339
|
background-color: transparent;
|
|
331
|
-
border-color:
|
|
340
|
+
border-color: var(--bulma-grey-light, #b5b5b5);
|
|
332
341
|
}
|
|
333
342
|
.switch[type=checkbox].bbr-switch.is-large.is-outlined + label::after {
|
|
334
|
-
background:
|
|
343
|
+
background: var(--bulma-grey-light, #b5b5b5);
|
|
335
344
|
}
|
|
336
345
|
.switch[type=checkbox].bbr-switch.is-large.is-outlined:checked + label::before {
|
|
337
346
|
background-color: transparent;
|
|
338
|
-
border-color:
|
|
347
|
+
border-color: var(--bulma-primary, #00d1b2);
|
|
339
348
|
}
|
|
340
349
|
.switch[type=checkbox].bbr-switch.is-large.is-outlined:checked + label::after {
|
|
341
|
-
background:
|
|
350
|
+
background: var(--bulma-primary, #00d1b2);
|
|
342
351
|
}
|
|
343
352
|
.switch[type=checkbox].bbr-switch.is-large.is-thin + label::before {
|
|
344
353
|
top: 0.5625rem;
|
|
@@ -350,132 +359,80 @@
|
|
|
350
359
|
.switch[type=checkbox].bbr-switch.is-large.is-rounded + label::after {
|
|
351
360
|
border-radius: 50%;
|
|
352
361
|
}
|
|
353
|
-
.switch[type=checkbox].bbr-switch.is-white:checked + label::before {
|
|
354
|
-
background: hsl(0, 0%, 100%);
|
|
355
|
-
}
|
|
356
|
-
.switch[type=checkbox].bbr-switch.is-white.is-outlined:checked + label::before {
|
|
357
|
-
background-color: transparent;
|
|
358
|
-
border-color: hsl(0, 0%, 100%) !important;
|
|
359
|
-
}
|
|
360
|
-
.switch[type=checkbox].bbr-switch.is-white.is-outlined:checked + label::after {
|
|
361
|
-
background: hsl(0, 0%, 100%);
|
|
362
|
-
}
|
|
363
|
-
.switch[type=checkbox].bbr-switch.is-white.is-thin.is-outlined:checked + label::after {
|
|
364
|
-
box-shadow: none;
|
|
365
|
-
}
|
|
366
|
-
.switch[type=checkbox].bbr-switch.is-black:checked + label::before {
|
|
367
|
-
background: hsl(0, 0%, 4%);
|
|
368
|
-
}
|
|
369
|
-
.switch[type=checkbox].bbr-switch.is-black.is-outlined:checked + label::before {
|
|
370
|
-
background-color: transparent;
|
|
371
|
-
border-color: hsl(0, 0%, 4%) !important;
|
|
372
|
-
}
|
|
373
|
-
.switch[type=checkbox].bbr-switch.is-black.is-outlined:checked + label::after {
|
|
374
|
-
background: hsl(0, 0%, 4%);
|
|
375
|
-
}
|
|
376
|
-
.switch[type=checkbox].bbr-switch.is-black.is-thin.is-outlined:checked + label::after {
|
|
377
|
-
box-shadow: none;
|
|
378
|
-
}
|
|
379
|
-
.switch[type=checkbox].bbr-switch.is-light:checked + label::before {
|
|
380
|
-
background: hsl(0, 0%, 96%);
|
|
381
|
-
}
|
|
382
|
-
.switch[type=checkbox].bbr-switch.is-light.is-outlined:checked + label::before {
|
|
383
|
-
background-color: transparent;
|
|
384
|
-
border-color: hsl(0, 0%, 96%) !important;
|
|
385
|
-
}
|
|
386
|
-
.switch[type=checkbox].bbr-switch.is-light.is-outlined:checked + label::after {
|
|
387
|
-
background: hsl(0, 0%, 96%);
|
|
388
|
-
}
|
|
389
|
-
.switch[type=checkbox].bbr-switch.is-light.is-thin.is-outlined:checked + label::after {
|
|
390
|
-
box-shadow: none;
|
|
391
|
-
}
|
|
392
|
-
.switch[type=checkbox].bbr-switch.is-dark:checked + label::before {
|
|
393
|
-
background: hsl(0, 0%, 21%);
|
|
394
|
-
}
|
|
395
|
-
.switch[type=checkbox].bbr-switch.is-dark.is-outlined:checked + label::before {
|
|
396
|
-
background-color: transparent;
|
|
397
|
-
border-color: hsl(0, 0%, 21%) !important;
|
|
398
|
-
}
|
|
399
|
-
.switch[type=checkbox].bbr-switch.is-dark.is-outlined:checked + label::after {
|
|
400
|
-
background: hsl(0, 0%, 21%);
|
|
401
|
-
}
|
|
402
|
-
.switch[type=checkbox].bbr-switch.is-dark.is-thin.is-outlined:checked + label::after {
|
|
403
|
-
box-shadow: none;
|
|
404
|
-
}
|
|
405
362
|
.switch[type=checkbox].bbr-switch.is-primary:checked + label::before {
|
|
406
|
-
background:
|
|
363
|
+
background: var(--bulma-primary, #00d1b2);
|
|
407
364
|
}
|
|
408
365
|
.switch[type=checkbox].bbr-switch.is-primary.is-outlined:checked + label::before {
|
|
409
366
|
background-color: transparent;
|
|
410
|
-
border-color:
|
|
367
|
+
border-color: var(--bulma-primary, #00d1b2) !important;
|
|
411
368
|
}
|
|
412
369
|
.switch[type=checkbox].bbr-switch.is-primary.is-outlined:checked + label::after {
|
|
413
|
-
background:
|
|
370
|
+
background: var(--bulma-primary, #00d1b2);
|
|
414
371
|
}
|
|
415
372
|
.switch[type=checkbox].bbr-switch.is-primary.is-thin.is-outlined:checked + label::after {
|
|
416
373
|
box-shadow: none;
|
|
417
374
|
}
|
|
418
375
|
.switch[type=checkbox].bbr-switch.is-link:checked + label::before {
|
|
419
|
-
background:
|
|
376
|
+
background: var(--bulma-link, #485fc7);
|
|
420
377
|
}
|
|
421
378
|
.switch[type=checkbox].bbr-switch.is-link.is-outlined:checked + label::before {
|
|
422
379
|
background-color: transparent;
|
|
423
|
-
border-color:
|
|
380
|
+
border-color: var(--bulma-link, #485fc7) !important;
|
|
424
381
|
}
|
|
425
382
|
.switch[type=checkbox].bbr-switch.is-link.is-outlined:checked + label::after {
|
|
426
|
-
background:
|
|
383
|
+
background: var(--bulma-link, #485fc7);
|
|
427
384
|
}
|
|
428
385
|
.switch[type=checkbox].bbr-switch.is-link.is-thin.is-outlined:checked + label::after {
|
|
429
386
|
box-shadow: none;
|
|
430
387
|
}
|
|
431
388
|
.switch[type=checkbox].bbr-switch.is-info:checked + label::before {
|
|
432
|
-
background:
|
|
389
|
+
background: var(--bulma-info, #3e8ed0);
|
|
433
390
|
}
|
|
434
391
|
.switch[type=checkbox].bbr-switch.is-info.is-outlined:checked + label::before {
|
|
435
392
|
background-color: transparent;
|
|
436
|
-
border-color:
|
|
393
|
+
border-color: var(--bulma-info, #3e8ed0) !important;
|
|
437
394
|
}
|
|
438
395
|
.switch[type=checkbox].bbr-switch.is-info.is-outlined:checked + label::after {
|
|
439
|
-
background:
|
|
396
|
+
background: var(--bulma-info, #3e8ed0);
|
|
440
397
|
}
|
|
441
398
|
.switch[type=checkbox].bbr-switch.is-info.is-thin.is-outlined:checked + label::after {
|
|
442
399
|
box-shadow: none;
|
|
443
400
|
}
|
|
444
401
|
.switch[type=checkbox].bbr-switch.is-success:checked + label::before {
|
|
445
|
-
background:
|
|
402
|
+
background: var(--bulma-success, #48c78e);
|
|
446
403
|
}
|
|
447
404
|
.switch[type=checkbox].bbr-switch.is-success.is-outlined:checked + label::before {
|
|
448
405
|
background-color: transparent;
|
|
449
|
-
border-color:
|
|
406
|
+
border-color: var(--bulma-success, #48c78e) !important;
|
|
450
407
|
}
|
|
451
408
|
.switch[type=checkbox].bbr-switch.is-success.is-outlined:checked + label::after {
|
|
452
|
-
background:
|
|
409
|
+
background: var(--bulma-success, #48c78e);
|
|
453
410
|
}
|
|
454
411
|
.switch[type=checkbox].bbr-switch.is-success.is-thin.is-outlined:checked + label::after {
|
|
455
412
|
box-shadow: none;
|
|
456
413
|
}
|
|
457
414
|
.switch[type=checkbox].bbr-switch.is-warning:checked + label::before {
|
|
458
|
-
background:
|
|
415
|
+
background: var(--bulma-warning, #ffe08a);
|
|
459
416
|
}
|
|
460
417
|
.switch[type=checkbox].bbr-switch.is-warning.is-outlined:checked + label::before {
|
|
461
418
|
background-color: transparent;
|
|
462
|
-
border-color:
|
|
419
|
+
border-color: var(--bulma-warning, #ffe08a) !important;
|
|
463
420
|
}
|
|
464
421
|
.switch[type=checkbox].bbr-switch.is-warning.is-outlined:checked + label::after {
|
|
465
|
-
background:
|
|
422
|
+
background: var(--bulma-warning, #ffe08a);
|
|
466
423
|
}
|
|
467
424
|
.switch[type=checkbox].bbr-switch.is-warning.is-thin.is-outlined:checked + label::after {
|
|
468
425
|
box-shadow: none;
|
|
469
426
|
}
|
|
470
427
|
.switch[type=checkbox].bbr-switch.is-danger:checked + label::before {
|
|
471
|
-
background:
|
|
428
|
+
background: var(--bulma-danger, #f14668);
|
|
472
429
|
}
|
|
473
430
|
.switch[type=checkbox].bbr-switch.is-danger.is-outlined:checked + label::before {
|
|
474
431
|
background-color: transparent;
|
|
475
|
-
border-color:
|
|
432
|
+
border-color: var(--bulma-danger, #f14668) !important;
|
|
476
433
|
}
|
|
477
434
|
.switch[type=checkbox].bbr-switch.is-danger.is-outlined:checked + label::after {
|
|
478
|
-
background:
|
|
435
|
+
background: var(--bulma-danger, #f14668);
|
|
479
436
|
}
|
|
480
437
|
.switch[type=checkbox].bbr-switch.is-danger.is-thin.is-outlined:checked + label::after {
|
|
481
438
|
box-shadow: none;
|
|
@@ -1,4 +1,33 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "sass:list";
|
|
2
|
+
|
|
3
|
+
// Bulma variables - compatible with v0.9.x and v1.x
|
|
4
|
+
// Uses CSS variables with fallbacks matching Bulma 0.9.4 defaults
|
|
5
|
+
// v1.x: CSS variables (--bulma-*) will be used if defined
|
|
6
|
+
// v0.9.x: Fallback values will be used (no CSS variables in 0.9.x)
|
|
7
|
+
|
|
8
|
+
// Colors
|
|
9
|
+
$primary: var(--bulma-primary, #00d1b2);
|
|
10
|
+
$white: var(--bulma-white, #fff);
|
|
11
|
+
$grey-lighter: var(--bulma-grey-lighter, #dbdbdb);
|
|
12
|
+
$grey-light: var(--bulma-grey-light, #b5b5b5);
|
|
13
|
+
$grey: var(--bulma-grey, #7a7a7a);
|
|
14
|
+
$radius: var(--bulma-radius, 4px);
|
|
15
|
+
|
|
16
|
+
// Sizes - Sass variables for calculations
|
|
17
|
+
$size-small: 0.75rem;
|
|
18
|
+
$size-normal: 1rem;
|
|
19
|
+
$size-medium: 1.25rem;
|
|
20
|
+
$size-large: 1.5rem;
|
|
21
|
+
|
|
22
|
+
// Color map for variations
|
|
23
|
+
$colors: (
|
|
24
|
+
"primary": ($primary, $white),
|
|
25
|
+
"link": (var(--bulma-link, #485fc7), $white),
|
|
26
|
+
"info": (var(--bulma-info, #3e8ed0), $white),
|
|
27
|
+
"success": (var(--bulma-success, #48c78e), $white),
|
|
28
|
+
"warning": (var(--bulma-warning, #ffe08a), rgba(0, 0, 0, 0.7)),
|
|
29
|
+
"danger": (var(--bulma-danger, #f14668), $white)
|
|
30
|
+
);
|
|
2
31
|
|
|
3
32
|
$switch-background: $grey-light !default;
|
|
4
33
|
$switch-border: 0.1rem solid transparent !default;
|
|
@@ -15,7 +44,7 @@ $switch-focus: 1px dotted $grey-light !default;
|
|
|
15
44
|
$switch-width: $switch-height * 2;
|
|
16
45
|
$paddle-height: $switch-height - ($switch-paddle-offset * 2);
|
|
17
46
|
$paddle-width: $switch-height - ($switch-paddle-offset * 2);
|
|
18
|
-
$paddle-active-
|
|
47
|
+
$paddle-active-offset: $switch-width - $paddle-width - ($switch-paddle-offset * 1.5);
|
|
19
48
|
|
|
20
49
|
+ label {
|
|
21
50
|
position: relative;
|
|
@@ -70,12 +99,16 @@ $switch-focus: 1px dotted $grey-light !default;
|
|
|
70
99
|
|
|
71
100
|
&::after {
|
|
72
101
|
left: auto;
|
|
73
|
-
right: $paddle-active-
|
|
102
|
+
right: $paddle-active-offset;
|
|
74
103
|
}
|
|
75
104
|
}
|
|
76
105
|
|
|
106
|
+
&:checked + label::before {
|
|
107
|
+
background: $switch-background-active;
|
|
108
|
+
}
|
|
109
|
+
|
|
77
110
|
&:checked + label::after {
|
|
78
|
-
left: $paddle-active-
|
|
111
|
+
left: $paddle-active-offset;
|
|
79
112
|
}
|
|
80
113
|
|
|
81
114
|
&.is-rtl:checked + label::after {
|
|
@@ -160,10 +193,6 @@ $switch-focus: 1px dotted $grey-light !default;
|
|
|
160
193
|
}
|
|
161
194
|
}
|
|
162
195
|
|
|
163
|
-
&:checked + label::before {
|
|
164
|
-
background: $switch-background-active;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
196
|
// Size variations
|
|
168
197
|
@include switch-size($size-normal);
|
|
169
198
|
|
|
@@ -181,8 +210,8 @@ $switch-focus: 1px dotted $grey-light !default;
|
|
|
181
210
|
|
|
182
211
|
// Color variations
|
|
183
212
|
@each $name, $pair in $colors {
|
|
184
|
-
$color: nth($pair, 1);
|
|
185
|
-
$color-invert: nth($pair, 2);
|
|
213
|
+
$color: list.nth($pair, 1);
|
|
214
|
+
$color-invert: list.nth($pair, 2);
|
|
186
215
|
|
|
187
216
|
&.is-#{$name} {
|
|
188
217
|
&:checked + label::before {
|
|
@@ -3,58 +3,58 @@
|
|
|
3
3
|
appearance: none;
|
|
4
4
|
height: 1rem;
|
|
5
5
|
border: none;
|
|
6
|
-
border-radius: 4px;
|
|
7
|
-
background-color: #f5f5f5;
|
|
6
|
+
border-radius: var(--bulma-radius, 4px);
|
|
7
|
+
background-color: var(--bulma-background, #f5f5f5);
|
|
8
8
|
overflow: hidden;
|
|
9
9
|
}
|
|
10
10
|
.bbr-progress.bbr-progress--animated {
|
|
11
11
|
position: relative;
|
|
12
|
-
background-color: #f5f5f5;
|
|
12
|
+
background-color: var(--bulma-background, #f5f5f5);
|
|
13
13
|
}
|
|
14
14
|
.bbr-progress.bbr-progress--animated .bbr-progress-fill {
|
|
15
15
|
height: 100%;
|
|
16
|
-
background-color: #
|
|
17
|
-
border-radius: 4px;
|
|
18
|
-
transition: width 0.25s;
|
|
16
|
+
background-color: var(--bulma-primary, #00d1b2);
|
|
17
|
+
border-radius: var(--bulma-radius, 4px);
|
|
18
|
+
transition: width var(--bulma-speed, 0.25s);
|
|
19
19
|
animation: bbr-progress-animated 1s linear infinite;
|
|
20
20
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
|
|
21
21
|
background-size: 1rem 1rem;
|
|
22
22
|
}
|
|
23
23
|
.bbr-progress.bbr-progress--animated.is-primary .bbr-progress-fill {
|
|
24
|
-
background-color: #
|
|
24
|
+
background-color: var(--bulma-primary, #00d1b2);
|
|
25
25
|
}
|
|
26
26
|
.bbr-progress.bbr-progress--animated.is-link .bbr-progress-fill {
|
|
27
|
-
background-color: #485fc7;
|
|
27
|
+
background-color: var(--bulma-link, #485fc7);
|
|
28
28
|
}
|
|
29
29
|
.bbr-progress.bbr-progress--animated.is-info .bbr-progress-fill {
|
|
30
|
-
background-color: #3e8ed0;
|
|
30
|
+
background-color: var(--bulma-info, #3e8ed0);
|
|
31
31
|
}
|
|
32
32
|
.bbr-progress.bbr-progress--animated.is-success .bbr-progress-fill {
|
|
33
|
-
background-color: #48c78e;
|
|
33
|
+
background-color: var(--bulma-success, #48c78e);
|
|
34
34
|
}
|
|
35
35
|
.bbr-progress.bbr-progress--animated.is-warning .bbr-progress-fill {
|
|
36
|
-
background-color: #ffe08a;
|
|
36
|
+
background-color: var(--bulma-warning, #ffe08a);
|
|
37
37
|
}
|
|
38
38
|
.bbr-progress.bbr-progress--animated.is-danger .bbr-progress-fill {
|
|
39
|
-
background-color: #f14668;
|
|
39
|
+
background-color: var(--bulma-danger, #f14668);
|
|
40
40
|
}
|
|
41
41
|
.bbr-progress::-webkit-progress-bar {
|
|
42
|
-
background-color: #f5f5f5;
|
|
43
|
-
border-radius: 4px;
|
|
42
|
+
background-color: var(--bulma-background, #f5f5f5);
|
|
43
|
+
border-radius: var(--bulma-radius, 4px);
|
|
44
44
|
}
|
|
45
45
|
.bbr-progress::-webkit-progress-value {
|
|
46
|
-
background-color: #
|
|
47
|
-
border-radius: 4px;
|
|
48
|
-
transition: width 0.25s;
|
|
46
|
+
background-color: var(--bulma-primary, #00d1b2);
|
|
47
|
+
border-radius: var(--bulma-radius, 4px);
|
|
48
|
+
transition: width var(--bulma-speed, 0.25s);
|
|
49
49
|
}
|
|
50
50
|
.bbr-progress::-moz-progress-bar {
|
|
51
|
-
background-color: #
|
|
52
|
-
border-radius: 4px;
|
|
51
|
+
background-color: var(--bulma-primary, #00d1b2);
|
|
52
|
+
border-radius: var(--bulma-radius, 4px);
|
|
53
53
|
}
|
|
54
54
|
.bbr-progress-value {
|
|
55
55
|
margin-top: 0.25rem;
|
|
56
56
|
font-size: 0.75rem;
|
|
57
|
-
color: #4a4a4a;
|
|
57
|
+
color: var(--bulma-text, #4a4a4a);
|
|
58
58
|
text-align: center;
|
|
59
59
|
}
|
|
60
60
|
.bbr-progress.is-small {
|
|
@@ -70,40 +70,40 @@
|
|
|
70
70
|
height: 1.5rem;
|
|
71
71
|
}
|
|
72
72
|
.bbr-progress.is-primary::-webkit-progress-value {
|
|
73
|
-
background-color: #
|
|
73
|
+
background-color: var(--bulma-primary, #00d1b2);
|
|
74
74
|
}
|
|
75
75
|
.bbr-progress.is-primary::-moz-progress-bar {
|
|
76
|
-
background-color: #
|
|
76
|
+
background-color: var(--bulma-primary, #00d1b2);
|
|
77
77
|
}
|
|
78
78
|
.bbr-progress.is-link::-webkit-progress-value {
|
|
79
|
-
background-color: #485fc7;
|
|
79
|
+
background-color: var(--bulma-link, #485fc7);
|
|
80
80
|
}
|
|
81
81
|
.bbr-progress.is-link::-moz-progress-bar {
|
|
82
|
-
background-color: #485fc7;
|
|
82
|
+
background-color: var(--bulma-link, #485fc7);
|
|
83
83
|
}
|
|
84
84
|
.bbr-progress.is-info::-webkit-progress-value {
|
|
85
|
-
background-color: #3e8ed0;
|
|
85
|
+
background-color: var(--bulma-info, #3e8ed0);
|
|
86
86
|
}
|
|
87
87
|
.bbr-progress.is-info::-moz-progress-bar {
|
|
88
|
-
background-color: #3e8ed0;
|
|
88
|
+
background-color: var(--bulma-info, #3e8ed0);
|
|
89
89
|
}
|
|
90
90
|
.bbr-progress.is-success::-webkit-progress-value {
|
|
91
|
-
background-color: #48c78e;
|
|
91
|
+
background-color: var(--bulma-success, #48c78e);
|
|
92
92
|
}
|
|
93
93
|
.bbr-progress.is-success::-moz-progress-bar {
|
|
94
|
-
background-color: #48c78e;
|
|
94
|
+
background-color: var(--bulma-success, #48c78e);
|
|
95
95
|
}
|
|
96
96
|
.bbr-progress.is-warning::-webkit-progress-value {
|
|
97
|
-
background-color: #ffe08a;
|
|
97
|
+
background-color: var(--bulma-warning, #ffe08a);
|
|
98
98
|
}
|
|
99
99
|
.bbr-progress.is-warning::-moz-progress-bar {
|
|
100
|
-
background-color: #ffe08a;
|
|
100
|
+
background-color: var(--bulma-warning, #ffe08a);
|
|
101
101
|
}
|
|
102
102
|
.bbr-progress.is-danger::-webkit-progress-value {
|
|
103
|
-
background-color: #f14668;
|
|
103
|
+
background-color: var(--bulma-danger, #f14668);
|
|
104
104
|
}
|
|
105
105
|
.bbr-progress.is-danger::-moz-progress-bar {
|
|
106
|
-
background-color: #f14668;
|
|
106
|
+
background-color: var(--bulma-danger, #f14668);
|
|
107
107
|
}
|
|
108
108
|
.bbr-progress--animated::-webkit-progress-value {
|
|
109
109
|
animation: bbr-progress-animated 2s linear infinite;
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
.bbr-progress--indeterminate {
|
|
119
119
|
position: relative;
|
|
120
|
-
background-color: #f5f5f5;
|
|
120
|
+
background-color: var(--bulma-background, #f5f5f5);
|
|
121
121
|
}
|
|
122
122
|
.bbr-progress--indeterminate::after {
|
|
123
123
|
content: "";
|
|
@@ -126,27 +126,27 @@
|
|
|
126
126
|
left: 0;
|
|
127
127
|
bottom: 0;
|
|
128
128
|
width: 50%;
|
|
129
|
-
background-color: #
|
|
130
|
-
border-radius: 4px;
|
|
129
|
+
background-color: var(--bulma-primary, #00d1b2);
|
|
130
|
+
border-radius: var(--bulma-radius, 4px);
|
|
131
131
|
animation: bbr-progress-indeterminate 1.5s ease-in-out infinite;
|
|
132
132
|
}
|
|
133
133
|
.bbr-progress--indeterminate.is-primary::after {
|
|
134
|
-
background-color: #
|
|
134
|
+
background-color: var(--bulma-primary, #00d1b2);
|
|
135
135
|
}
|
|
136
136
|
.bbr-progress--indeterminate.is-link::after {
|
|
137
|
-
background-color: #485fc7;
|
|
137
|
+
background-color: var(--bulma-link, #485fc7);
|
|
138
138
|
}
|
|
139
139
|
.bbr-progress--indeterminate.is-info::after {
|
|
140
|
-
background-color: #3e8ed0;
|
|
140
|
+
background-color: var(--bulma-info, #3e8ed0);
|
|
141
141
|
}
|
|
142
142
|
.bbr-progress--indeterminate.is-success::after {
|
|
143
|
-
background-color: #48c78e;
|
|
143
|
+
background-color: var(--bulma-success, #48c78e);
|
|
144
144
|
}
|
|
145
145
|
.bbr-progress--indeterminate.is-warning::after {
|
|
146
|
-
background-color: #ffe08a;
|
|
146
|
+
background-color: var(--bulma-warning, #ffe08a);
|
|
147
147
|
}
|
|
148
148
|
.bbr-progress--indeterminate.is-danger::after {
|
|
149
|
-
background-color: #f14668;
|
|
149
|
+
background-color: var(--bulma-danger, #f14668);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
@keyframes bbr-progress-animated {
|