@igo2/sdg-core 1.0.0-next.85 → 1.0.0-next.87
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/package.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@use './icon';
|
|
6
6
|
@use './input';
|
|
7
7
|
@use './sidenav';
|
|
8
|
+
@use './radio-button';
|
|
8
9
|
|
|
9
10
|
@mixin overrides() {
|
|
10
11
|
@include button.overrides();
|
|
@@ -14,4 +15,5 @@
|
|
|
14
15
|
@include icon.overrides();
|
|
15
16
|
@include input.overrides();
|
|
16
17
|
@include sidenav.overrides();
|
|
18
|
+
@include radio-button.overrides();
|
|
17
19
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
|
|
3
|
+
@mixin overrides() {
|
|
4
|
+
.mat-mdc-radio-group {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-flow: column;
|
|
7
|
+
row-gap: 16px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.mat-mdc-radio-button {
|
|
11
|
+
$disabled-color: var(--sdg-color-grey-light);
|
|
12
|
+
$unselected-color: var(--sdg-color-blue-dark);
|
|
13
|
+
$selected-color: var(--sdg-color-blue-normal);
|
|
14
|
+
|
|
15
|
+
$radio-button-size: 24px;
|
|
16
|
+
$size-with-padding: calc($radio-button-size + 4px);
|
|
17
|
+
|
|
18
|
+
@include mat.radio-overrides(
|
|
19
|
+
(
|
|
20
|
+
label-text-size: var(--sdg-font-size-md),
|
|
21
|
+
label-text-line-height: var(--sdg-font-size-md),
|
|
22
|
+
// same as font size to avoid extra space above and below
|
|
23
|
+
label-text-color: $unselected-color,
|
|
24
|
+
|
|
25
|
+
ripple-color: transparent,
|
|
26
|
+
checked-ripple-color: transparent,
|
|
27
|
+
|
|
28
|
+
disabled-label-color: $disabled-color,
|
|
29
|
+
disabled-unselected-icon-color: $disabled-color,
|
|
30
|
+
disabled-unselected-icon-opacity: 1,
|
|
31
|
+
disabled-selected-icon-color: $disabled-color,
|
|
32
|
+
disabled-selected-icon-opacity: 1,
|
|
33
|
+
|
|
34
|
+
unselected-icon-color: $unselected-color,
|
|
35
|
+
unselected-hover-icon-color: $unselected-color,
|
|
36
|
+
unselected-focus-icon-color: $selected-color,
|
|
37
|
+
unselected-pressed-icon-color: $selected-color,
|
|
38
|
+
|
|
39
|
+
selected-icon-color: $selected-color,
|
|
40
|
+
selected-hover-icon-color: $selected-color,
|
|
41
|
+
selected-focus-icon-color: $selected-color,
|
|
42
|
+
selected-pressed-icon-color: $selected-color,
|
|
43
|
+
|
|
44
|
+
state-layer-size: $size-with-padding
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
.mdc-radio {
|
|
49
|
+
height: $radio-button-size;
|
|
50
|
+
width: $radio-button-size;
|
|
51
|
+
padding: calc(
|
|
52
|
+
(var(--mdc-radio-state-layer-size, 40px) - $radio-button-size) / 2
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
.mdc-radio__native-control:checked
|
|
56
|
+
+ .mdc-radio__background
|
|
57
|
+
> .mdc-radio__inner-circle {
|
|
58
|
+
transform: scale(0.6);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.mdc-radio__background {
|
|
62
|
+
height: $radio-button-size;
|
|
63
|
+
width: $radio-button-size;
|
|
64
|
+
|
|
65
|
+
.mdc-radio__inner-circle {
|
|
66
|
+
border-width: calc($radio-button-size / 2);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mat-mdc-radio-touch-target {
|
|
72
|
+
height: $size-with-padding;
|
|
73
|
+
width: $size-with-padding;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.mdc-form-field {
|
|
77
|
+
column-gap: 8px;
|
|
78
|
+
|
|
79
|
+
.mdc-label {
|
|
80
|
+
padding: 0;
|
|
81
|
+
transform: translateY(
|
|
82
|
+
1px
|
|
83
|
+
); // visually center the label with the radio button
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&[compact] {
|
|
88
|
+
$radio-button-size: 16px;
|
|
89
|
+
$size-with-padding: calc($radio-button-size + 4px);
|
|
90
|
+
|
|
91
|
+
@include mat.radio-overrides(
|
|
92
|
+
(
|
|
93
|
+
state-layer-size: $size-with-padding
|
|
94
|
+
)
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
.mdc-radio {
|
|
98
|
+
height: $radio-button-size;
|
|
99
|
+
width: $radio-button-size;
|
|
100
|
+
padding: calc(
|
|
101
|
+
(var(--mdc-radio-state-layer-size, 40px) - $radio-button-size) / 2
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
.mdc-radio__background {
|
|
105
|
+
height: $radio-button-size;
|
|
106
|
+
width: $radio-button-size;
|
|
107
|
+
|
|
108
|
+
.mdc-radio__inner-circle {
|
|
109
|
+
border-width: calc($radio-button-size / 2);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.mdc-radio__outer-circle {
|
|
113
|
+
border-width: 1px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.mat-mdc-radio-touch-target {
|
|
119
|
+
height: $size-with-padding;
|
|
120
|
+
width: $size-with-padding;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|