@massimo-cassandro/minimo 1.22.0 → 1.22.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.
|
@@ -1,53 +1,56 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
height: {
|
|
9
|
-
$value: '1.25em',
|
|
10
|
-
$type: 'dimension'
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
thumb: {
|
|
14
|
-
inset: {
|
|
15
|
-
$value: '.125em',
|
|
2
|
+
form: {
|
|
3
|
+
|
|
4
|
+
switch: {
|
|
5
|
+
width: {
|
|
6
|
+
$value: '2.25em',
|
|
16
7
|
$type: 'dimension'
|
|
17
8
|
},
|
|
18
|
-
},
|
|
19
9
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
$
|
|
23
|
-
$type: 'duration'
|
|
10
|
+
height: {
|
|
11
|
+
$value: '1.25em',
|
|
12
|
+
$type: 'dimension'
|
|
24
13
|
},
|
|
25
|
-
},
|
|
26
14
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
thumb: {
|
|
16
|
+
inset: {
|
|
17
|
+
$value: '.125em',
|
|
18
|
+
$type: 'dimension'
|
|
19
|
+
},
|
|
20
|
+
},
|
|
33
21
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
$
|
|
38
|
-
|
|
39
|
-
}
|
|
22
|
+
transition: {
|
|
23
|
+
duration: {
|
|
24
|
+
$value: '.2s',
|
|
25
|
+
$type: 'duration'
|
|
26
|
+
},
|
|
40
27
|
},
|
|
41
|
-
},
|
|
42
28
|
|
|
43
|
-
checked: {
|
|
44
29
|
background: {
|
|
45
30
|
color: {
|
|
46
|
-
$value: '{
|
|
31
|
+
$value: '{neutral.100}',
|
|
47
32
|
$type: 'color'
|
|
48
33
|
}
|
|
49
34
|
},
|
|
50
|
-
}
|
|
51
35
|
|
|
36
|
+
cursor: {
|
|
37
|
+
background: {
|
|
38
|
+
color: {
|
|
39
|
+
$value: '{body.background.color}',
|
|
40
|
+
$type: 'color'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
checked: {
|
|
46
|
+
background: {
|
|
47
|
+
color: {
|
|
48
|
+
$value: '{primary.100}',
|
|
49
|
+
$type: 'color'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
}
|
|
52
55
|
}
|
|
53
56
|
};
|
package/package.json
CHANGED
package/src/css/forms/switch.css
CHANGED
|
@@ -17,7 +17,7 @@ Dove non è supportato (o dove l'attributo è assente) si applica il fallback
|
|
|
17
17
|
|
|
18
18
|
.form-switch {
|
|
19
19
|
|
|
20
|
-
--_switch-thumb-size: calc(var(--switch-height) - var(--switch-thumb-inset) * 2);
|
|
20
|
+
--_switch-thumb-size: calc(var(--form-switch-height) - var(--form-switch-thumb-inset) * 2);
|
|
21
21
|
|
|
22
22
|
/* annulla il layout con float di `.form-check` */
|
|
23
23
|
display: flex;
|
|
@@ -28,29 +28,29 @@ Dove non è supportato (o dove l'attributo è assente) si applica il fallback
|
|
|
28
28
|
.form-check-input {
|
|
29
29
|
float: none;
|
|
30
30
|
flex: none;
|
|
31
|
-
width: var(--switch-width);
|
|
32
|
-
height: var(--switch-height);
|
|
31
|
+
width: var(--form-switch-width);
|
|
32
|
+
height: var(--form-switch-height);
|
|
33
33
|
margin: 0;
|
|
34
34
|
appearance: none;
|
|
35
35
|
cursor: pointer;
|
|
36
|
-
background-color: var(--switch-background-color);
|
|
36
|
+
background-color: var(--form-switch-background-color);
|
|
37
37
|
background-image: radial-gradient(
|
|
38
38
|
circle closest-side,
|
|
39
|
-
var(--switch-cursor-background-color) 98%,
|
|
39
|
+
var(--form-switch-cursor-background-color) 98%,
|
|
40
40
|
transparent
|
|
41
41
|
);
|
|
42
42
|
background-repeat: no-repeat;
|
|
43
|
-
background-position: var(--switch-thumb-inset) center;
|
|
43
|
+
background-position: var(--form-switch-thumb-inset) center;
|
|
44
44
|
background-size: var(--_switch-thumb-size) var(--_switch-thumb-size);
|
|
45
45
|
border: none;
|
|
46
|
-
border-radius: var(--switch-height);
|
|
46
|
+
border-radius: var(--form-switch-height);
|
|
47
47
|
|
|
48
48
|
/* annulla lo `scale` applicato a tutti i checkbox */
|
|
49
49
|
scale: none;
|
|
50
50
|
|
|
51
51
|
&:checked {
|
|
52
|
-
background-color: var(--switch-checked-background-color);
|
|
53
|
-
background-position: calc(100% - var(--switch-thumb-inset)) center;
|
|
52
|
+
background-color: var(--form-switch-checked-background-color);
|
|
53
|
+
background-position: calc(100% - var(--form-switch-thumb-inset)) center;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
&:focus {
|
|
@@ -80,8 +80,8 @@ Dove non è supportato (o dove l'attributo è assente) si applica il fallback
|
|
|
80
80
|
@media (prefers-reduced-motion: no-preference) {
|
|
81
81
|
.form-switch .form-check-input {
|
|
82
82
|
transition:
|
|
83
|
-
background-color var(--switch-transition-duration) linear,
|
|
84
|
-
background-position var(--switch-transition-duration) ease-in-out;
|
|
83
|
+
background-color var(--form-switch-transition-duration) linear,
|
|
84
|
+
background-position var(--form-switch-transition-duration) ease-in-out;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -95,15 +95,15 @@ Dove non è supportato (o dove l'attributo è assente) si applica il fallback
|
|
|
95
95
|
border-radius: 0; /* gestito da ::track */
|
|
96
96
|
|
|
97
97
|
&::track {
|
|
98
|
-
background-color: var(--switch-background-color);
|
|
98
|
+
background-color: var(--form-switch-background-color);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
&::thumb {
|
|
102
|
-
background-color: var(--switch-cursor-background-color);
|
|
102
|
+
background-color: var(--form-switch-cursor-background-color);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
&:checked::track {
|
|
106
|
-
background-color: var(--switch-checked-background-color);
|
|
106
|
+
background-color: var(--form-switch-checked-background-color);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -193,6 +193,13 @@
|
|
|
193
193
|
--form-label-font-weight: var(--font-weight-semibold);
|
|
194
194
|
--form-legend-background-color: transparent;
|
|
195
195
|
--form-legend-color: var(--text-color);
|
|
196
|
+
--form-switch-background-color: var(--neutral-100);
|
|
197
|
+
--form-switch-checked-background-color: var(--primary-100);
|
|
198
|
+
--form-switch-cursor-background-color: var(--body-background-color);
|
|
199
|
+
--form-switch-height: 1.25em;
|
|
200
|
+
--form-switch-thumb-inset: .125em;
|
|
201
|
+
--form-switch-transition-duration: .2s;
|
|
202
|
+
--form-switch-width: 2.25em;
|
|
196
203
|
--form-user-info-color: var(--text-muted);
|
|
197
204
|
--form-user-info-font-size: var(--font-size-xs);
|
|
198
205
|
--form-validation-outline-offset: -3px;
|
|
@@ -380,14 +387,6 @@
|
|
|
380
387
|
--status-warning-color: #fc0;
|
|
381
388
|
--status-warning-fg: #4f2900;
|
|
382
389
|
|
|
383
|
-
--switch-background-color: var(--neutral-100);
|
|
384
|
-
--switch-checked-background-color: var(--primary-100);
|
|
385
|
-
--switch-cursor-background-color: var(--body-background-color);
|
|
386
|
-
--switch-height: 1.25em;
|
|
387
|
-
--switch-thumb-inset: .125em;
|
|
388
|
-
--switch-transition-duration: .2s;
|
|
389
|
-
--switch-width: 2.25em;
|
|
390
|
-
|
|
391
390
|
--table-body-border-width: 1px;
|
|
392
391
|
--table-body-tr-alt-bg-color: #efefef;
|
|
393
392
|
--table-body-tr-hover-bg-color: #cbcbcb;
|