@igo2/sdg-core 1.0.0-next.100
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/README.md +1 -0
- package/analytics/analytics.interface.d.ts +8 -0
- package/analytics/analytics.provider.d.ts +3 -0
- package/analytics/google-analytics/google-analytics.interface.d.ts +10 -0
- package/analytics/google-analytics/google-analytics.provider.d.ts +3 -0
- package/analytics/google-analytics/google-analytics.service.d.ts +12 -0
- package/analytics/google-analytics/index.d.ts +3 -0
- package/analytics/index.d.ts +3 -0
- package/fesm2022/igo2-sdg-core.mjs +189 -0
- package/fesm2022/igo2-sdg-core.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/layout/breakpoint/breakpoint.service.d.ts +12 -0
- package/layout/breakpoint/index.d.ts +1 -0
- package/layout/index.d.ts +1 -0
- package/package.json +37 -0
- package/public-api.d.ts +3 -0
- package/router/index.d.ts +4 -0
- package/router/route.interface.d.ts +9 -0
- package/router/route.utils.d.ts +2 -0
- package/router/router.d.ts +5 -0
- package/router/title-resolver/index.d.ts +2 -0
- package/router/title-resolver/title-resolver.d.ts +5 -0
- package/router/title-resolver/title-resolver.pipe.d.ts +11 -0
- package/src/_index.scss +4 -0
- package/src/layout/_breakpoints.scss +116 -0
- package/src/layout/_index.scss +1 -0
- package/src/layout/bootstrap-layout.scss +1067 -0
- package/src/style/_elevation.scss +54 -0
- package/src/style/_index.scss +4 -0
- package/src/style/_sass-utils.scss +24 -0
- package/src/style/_typography-utils.scss +23 -0
- package/src/style/_typography.scss +139 -0
- package/src/style/overrides/_index.scss +2 -0
- package/src/style/overrides/igo2-lib/_index.scss +9 -0
- package/src/style/overrides/igo2-lib/_list.scss +22 -0
- package/src/style/overrides/igo2-lib/_panel.scss +7 -0
- package/src/style/overrides/igo2-lib/_search-bar.scss +70 -0
- package/src/style/overrides/material/_button.scss +118 -0
- package/src/style/overrides/material/_checkbox.scss +120 -0
- package/src/style/overrides/material/_chip.scss +122 -0
- package/src/style/overrides/material/_dialog.scss +37 -0
- package/src/style/overrides/material/_divider.scss +11 -0
- package/src/style/overrides/material/_form-field.scss +20 -0
- package/src/style/overrides/material/_icon.scss +34 -0
- package/src/style/overrides/material/_index.scss +25 -0
- package/src/style/overrides/material/_input.scss +5 -0
- package/src/style/overrides/material/_radio-button.scss +124 -0
- package/src/style/overrides/material/_sidenav.scss +9 -0
- package/src/style/overrides/material/_tab.scss +95 -0
- package/src/theme/_index.scss +1 -0
- package/src/theme/material/_index.scss +1 -0
- package/src/theme/material/_theme.scss +241 -0
- package/src/tokens/_index.scss +7 -0
- package/src/tokens/_sys-colors.scss +99 -0
- package/src/tokens/_sys-elevation.scss +17 -0
- package/src/tokens/_sys-layout.scss +28 -0
- package/src/tokens/_sys-palettes.scss +72 -0
- package/src/tokens/_sys-typography.scss +109 -0
- package/src/tokens/_system.scss +56 -0
- package/src/tokens/_token-utils.scss +79 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:math';
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
@use 'sass:string';
|
|
5
|
+
@use './sass-utils';
|
|
6
|
+
@use '../tokens/sys-palettes';
|
|
7
|
+
|
|
8
|
+
$shadow-elevations: (
|
|
9
|
+
0: '0px 0px 0px 0px',
|
|
10
|
+
1: '0px 1px 4px 0px ',
|
|
11
|
+
2: '0px 2px 8px 0px',
|
|
12
|
+
3: '0px 4px 16px 0px',
|
|
13
|
+
4: '0px 6px 24px 0px'
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// The default color "dark-blue" or "#223654" for elevation shadows.
|
|
17
|
+
$color: map.get(sys-palettes.$palettes, 'blue', 700) !default;
|
|
18
|
+
|
|
19
|
+
// Applies the correct css rules to an element to give it the elevation specified by $zValue.
|
|
20
|
+
// The $zValue must be between 0 and 4.
|
|
21
|
+
@mixin elevation($zValue, $color: $color, $opacity: null) {
|
|
22
|
+
box-shadow: get-box-shadow($zValue, $color, $opacity);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@function get-box-shadow($zValue, $shadow-color: $color, $opacity: null) {
|
|
26
|
+
@if $zValue == null {
|
|
27
|
+
@return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@if (sass-utils.is-css-var-name($zValue)) {
|
|
31
|
+
@return $zValue;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@if meta.type-of($zValue) != number or not math.is-unitless($zValue) {
|
|
35
|
+
@error '$zValue must be a unitless number, but received `#{$zValue}`';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@if $zValue < 0 or $zValue > 4 {
|
|
39
|
+
@error '$zValue must be between 0 and 4, but received `#{$zValue}`';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
$z-value: map.get($shadow-elevations, $zValue);
|
|
43
|
+
$color: _compute-color-opacity($shadow-color, 0.24);
|
|
44
|
+
|
|
45
|
+
@return string.unquote('#{$z-value} #{$color}');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@function _compute-color-opacity($color, $opacity) {
|
|
49
|
+
@if meta.type-of($color) == color and $opacity != null {
|
|
50
|
+
@return rgba($color, $opacity);
|
|
51
|
+
} @else {
|
|
52
|
+
@return $color;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use 'sass:meta';
|
|
2
|
+
|
|
3
|
+
/// Include content under the current selector (&) or the document root if there is no current
|
|
4
|
+
/// selector.
|
|
5
|
+
/// @param {String} $root [html] The default root selector to use when there is no current selector.
|
|
6
|
+
/// @output The given content under the current selector, or root selector if there is no current
|
|
7
|
+
/// selector.
|
|
8
|
+
/// @content Content to output under the current selector, or root selector if there is no current
|
|
9
|
+
/// selector.
|
|
10
|
+
@mixin current-selector-or-root($root: html) {
|
|
11
|
+
@if & {
|
|
12
|
+
@content;
|
|
13
|
+
} @else {
|
|
14
|
+
#{$root} {
|
|
15
|
+
@content;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Returns whether the $value is a CSS variable name based on whether it's a string prefixed
|
|
21
|
+
// by "--".
|
|
22
|
+
@function is-css-var-name($value) {
|
|
23
|
+
@return meta.type-of($value) == string and string.index($value, '--') == 1;
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
3
|
+
$percent-root-font-size: 100 !default;
|
|
4
|
+
$rem-ratio: math.div(1, 0.16 * $percent-root-font-size);
|
|
5
|
+
|
|
6
|
+
@function rem($px-size) {
|
|
7
|
+
@return $px-size * $rem-ratio * 1rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@function rem-ratio($px-size) {
|
|
11
|
+
@return math.div($px-size, 16 * $percent-root-font-size * 0.01) * 1rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin title-border {
|
|
15
|
+
&:after {
|
|
16
|
+
content: '';
|
|
17
|
+
display: block;
|
|
18
|
+
margin: 0;
|
|
19
|
+
width: 48px;
|
|
20
|
+
padding-top: 4px;
|
|
21
|
+
border-bottom: 4px solid var(--sdg-color-pink-normal);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
@use '../layout/breakpoints';
|
|
2
|
+
@use './typography-utils' as *;
|
|
3
|
+
@use '../tokens/token-utils';
|
|
4
|
+
|
|
5
|
+
@mixin typo-set-base-styles {
|
|
6
|
+
:root {
|
|
7
|
+
font-size: var(--sdg-font-size-root-percent);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body {
|
|
11
|
+
color: var(--sdg-color-text);
|
|
12
|
+
font-family: var(--sdg-font-family-text);
|
|
13
|
+
font-size: var(--sdg-font-size-md);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
a {
|
|
17
|
+
word-break: break-word;
|
|
18
|
+
overflow-wrap: break-word;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
color: var(--sdg-color-blue-piv);
|
|
21
|
+
text-decoration: underline;
|
|
22
|
+
background-color: transparent;
|
|
23
|
+
width: fit-content;
|
|
24
|
+
max-inline-size: var(--sdg-max-content-width);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
a:hover {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
button {
|
|
32
|
+
font-family: var(--sdg-font-family-text);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
p,
|
|
36
|
+
ul,
|
|
37
|
+
ol,
|
|
38
|
+
u,
|
|
39
|
+
.text {
|
|
40
|
+
color: var(--sdg-color-text);
|
|
41
|
+
font-size: var(--sdg-font-size-md);
|
|
42
|
+
line-height: 24px;
|
|
43
|
+
max-inline-size: var(--sdg-max-content-width);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
ul,
|
|
47
|
+
ol {
|
|
48
|
+
margin-top: 0;
|
|
49
|
+
margin-bottom: 24px;
|
|
50
|
+
padding-left: 16px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
p {
|
|
54
|
+
margin-bottom: 24px !important;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
li {
|
|
58
|
+
margin-top: 16px;
|
|
59
|
+
margin-bottom: 16px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
strong {
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
h1,
|
|
67
|
+
h2,
|
|
68
|
+
h3,
|
|
69
|
+
h4,
|
|
70
|
+
h5,
|
|
71
|
+
h6,
|
|
72
|
+
.h1,
|
|
73
|
+
.h2,
|
|
74
|
+
.h3,
|
|
75
|
+
.h4,
|
|
76
|
+
.h5,
|
|
77
|
+
.h6 {
|
|
78
|
+
font-family: var(--sdg-font-family-title) !important;
|
|
79
|
+
font-weight: bold !important;
|
|
80
|
+
color: var(--sdg-color-text);
|
|
81
|
+
max-inline-size: var(--sdg-max-content-width);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
h1 {
|
|
85
|
+
@include header-font('h1');
|
|
86
|
+
@include title-border;
|
|
87
|
+
|
|
88
|
+
@include breakpoints.media(mobile) {
|
|
89
|
+
font-size: var(--sdg-mobile-font-size-h1);
|
|
90
|
+
line-height: var(--sdg-mobile-line-height-h1);
|
|
91
|
+
margin-top: var(--sdg-spacer-lg) !important;
|
|
92
|
+
margin-bottom: var(--sdg-spacer-sm) !important;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
h2 {
|
|
97
|
+
@include header-font('h2');
|
|
98
|
+
|
|
99
|
+
@include breakpoints.media(mobile) {
|
|
100
|
+
font-size: var(--sdg-mobile-font-size-h2);
|
|
101
|
+
line-height: var(--sdg-mobile-line-height-h2);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
h3 {
|
|
106
|
+
@include header-font('h3');
|
|
107
|
+
|
|
108
|
+
@include breakpoints.media(mobile) {
|
|
109
|
+
font-size: var(--sdg-mobile-font-size-h3);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
h4 {
|
|
114
|
+
@include header-font('h4');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
h5 {
|
|
118
|
+
@include header-font('h5');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
h6 {
|
|
122
|
+
@include header-font('h6');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.accroche {
|
|
126
|
+
font-size: var(--sdg-font-size-lg);
|
|
127
|
+
line-height: var(--sdg-line-height-lg);
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
max-width: var(--sdg-max-content-width);
|
|
130
|
+
padding-bottom: 24px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@mixin header-font($header) {
|
|
135
|
+
font-size: var(--sdg-font-size-#{$header});
|
|
136
|
+
line-height: var(--sdg-line-height-#{$header});
|
|
137
|
+
margin-top: var(--sdg-title-margin-#{$header}-mt) !important;
|
|
138
|
+
margin-bottom: var(--sdg-title-margin-#{$header}-mb) !important;
|
|
139
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@mixin overrides() {
|
|
2
|
+
igo-search-results-item {
|
|
3
|
+
.mdc-list-item__primary-text {
|
|
4
|
+
white-space: normal;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
text-overflow: ellipsis;
|
|
7
|
+
max-height: unset !important;
|
|
8
|
+
line-height: 18px !important;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
igo-list
|
|
13
|
+
[igolistitem][color='accent'].igo-list-item-selected
|
|
14
|
+
> mat-list-item {
|
|
15
|
+
background-color: var(--sdg-color-blue-pale);
|
|
16
|
+
|
|
17
|
+
h4,
|
|
18
|
+
small {
|
|
19
|
+
color: var(--sdg-color-blue-piv) !important;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '@angular/material' as mat;
|
|
3
|
+
|
|
4
|
+
@mixin overrides() {
|
|
5
|
+
igo-search-bar {
|
|
6
|
+
background-color: var(--sdg-color-background);
|
|
7
|
+
|
|
8
|
+
// Workaroung, OPEN SANS font add a mysterious 1px for the height
|
|
9
|
+
.mat-mdc-form-field-infix {
|
|
10
|
+
max-height: 40px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
button[mat-icon-button] {
|
|
14
|
+
border-radius: 0;
|
|
15
|
+
background-color: var(--sdg-color-blue-piv);
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
background-color: var(--sdg-color-blue-normal);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
mat-icon {
|
|
23
|
+
color: var(--sdg-color-white);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@include mat.form-field-overrides(
|
|
27
|
+
(
|
|
28
|
+
container-height: 40px,
|
|
29
|
+
container-vertical-padding: 8px
|
|
30
|
+
)
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
.mdc-icon-button.mat-mdc-button-base {
|
|
34
|
+
@include mat.icon-button-overrides(
|
|
35
|
+
(
|
|
36
|
+
state-layer-size: 40px
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
// reset the default padding of Material. Igo is overriding it
|
|
40
|
+
padding: calc(
|
|
41
|
+
calc(
|
|
42
|
+
var(--mdc-icon-button-state-layer-size, 40px) - var(
|
|
43
|
+
--mdc-icon-button-icon-size,
|
|
44
|
+
24px
|
|
45
|
+
)
|
|
46
|
+
) /
|
|
47
|
+
2
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
igo-search-results {
|
|
53
|
+
igo-collapsible {
|
|
54
|
+
.mdc-list-item__primary-text {
|
|
55
|
+
color: var(--sdg-color-text);
|
|
56
|
+
font-weight: bold;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
igo-search-results-item {
|
|
61
|
+
.mdc-list-item__primary-text {
|
|
62
|
+
font-weight: normal;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.mdc-list-item--with-leading-icon .mdc-list-item__start {
|
|
67
|
+
color: var(--sdg-color-text);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
|
|
3
|
+
@mixin overrides() {
|
|
4
|
+
.mdc-button {
|
|
5
|
+
$height: 56px;
|
|
6
|
+
$font-size: var(--sdg-font-size-md);
|
|
7
|
+
$border-radius: 0;
|
|
8
|
+
$horizontal-padding: 16px;
|
|
9
|
+
|
|
10
|
+
min-width: calc($height * 2) !important;
|
|
11
|
+
max-width: 360px;
|
|
12
|
+
line-height: var(--sdg-line-height-md) !important;
|
|
13
|
+
|
|
14
|
+
@include mat.button-overrides(
|
|
15
|
+
(
|
|
16
|
+
filled-container-height: $height,
|
|
17
|
+
filled-label-text-size: $font-size,
|
|
18
|
+
filled-label-text-weight: bold,
|
|
19
|
+
filled-container-shape: $border-radius,
|
|
20
|
+
filled-horizontal-padding: $horizontal-padding,
|
|
21
|
+
outlined-container-height: $height,
|
|
22
|
+
outlined-label-text-size: $font-size,
|
|
23
|
+
outlined-label-text-weight: bold,
|
|
24
|
+
outlined-container-shape: $border-radius,
|
|
25
|
+
outlined-horizontal-padding: $horizontal-padding,
|
|
26
|
+
protected-container-height: $height,
|
|
27
|
+
protected-label-text-size: $font-size,
|
|
28
|
+
protected-label-text-weight: bold,
|
|
29
|
+
protected-container-shape: $border-radius,
|
|
30
|
+
protected-horizontal-padding: $horizontal-padding,
|
|
31
|
+
text-container-height: $height,
|
|
32
|
+
text-label-text-size: $font-size,
|
|
33
|
+
text-label-text-weight: bold,
|
|
34
|
+
text-container-shape: $border-radius,
|
|
35
|
+
text-horizontal-padding: $horizontal-padding
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
&[compact] {
|
|
40
|
+
$height: 40px;
|
|
41
|
+
@include mat.button-overrides(
|
|
42
|
+
(
|
|
43
|
+
filled-container-height: $height,
|
|
44
|
+
outlined-container-height: $height,
|
|
45
|
+
protected-container-height: $height,
|
|
46
|
+
text-container-height: $height
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
min-width: calc($height * 2) !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.mat-mdc-outlined-button {
|
|
55
|
+
border-color: currentColor !important;
|
|
56
|
+
border-width: 2px !important;
|
|
57
|
+
|
|
58
|
+
&[compact] {
|
|
59
|
+
border-width: 1px !important;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.mdc-fab {
|
|
64
|
+
$background: var(--sdg-color-blue-piv);
|
|
65
|
+
$foreground: var(--sdg-color-white);
|
|
66
|
+
$border-radius: 0;
|
|
67
|
+
|
|
68
|
+
@include mat.fab-overrides(
|
|
69
|
+
(
|
|
70
|
+
container-color: $background,
|
|
71
|
+
container-shape: $border-radius,
|
|
72
|
+
foreground-color: $foreground,
|
|
73
|
+
small-container-color: $background,
|
|
74
|
+
small-container-shape: $border-radius,
|
|
75
|
+
small-foreground-color: $foreground
|
|
76
|
+
)
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@include color-variants-backwards-compatibility();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Material custom color variants backwards compatibility
|
|
84
|
+
@mixin color-variants-backwards-compatibility() {
|
|
85
|
+
.mdc-button {
|
|
86
|
+
&.mat-warn {
|
|
87
|
+
@include mat.button-overrides(
|
|
88
|
+
(
|
|
89
|
+
filled-container-color: var(--sdg-color-red-normal)
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
&.mat-primary {
|
|
94
|
+
@include mat.button-overrides(
|
|
95
|
+
(
|
|
96
|
+
filled-container-color: var(--sdg-color-blue-piv)
|
|
97
|
+
)
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mdc-icon-button {
|
|
103
|
+
&.mat-warn {
|
|
104
|
+
@include mat.icon-button-overrides(
|
|
105
|
+
(
|
|
106
|
+
icon-color: var(--sdg-color-red-normal)
|
|
107
|
+
)
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
&.mat-primary {
|
|
111
|
+
@include mat.icon-button-overrides(
|
|
112
|
+
(
|
|
113
|
+
icon-color: var(--sdg-color-blue-piv)
|
|
114
|
+
)
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
|
|
3
|
+
@mixin overrides() {
|
|
4
|
+
.mat-mdc-checkbox {
|
|
5
|
+
$disabled-color: var(--sdg-color-grey-light);
|
|
6
|
+
$unselected-color: var(--sdg-color-blue-dark);
|
|
7
|
+
$selected-color: var(--sdg-color-blue-normal);
|
|
8
|
+
|
|
9
|
+
$base-size: 8px;
|
|
10
|
+
$checkbox-size: calc($base-size * 3);
|
|
11
|
+
$size-with-padding: var(--mdc-checkbox-state-layer-size);
|
|
12
|
+
|
|
13
|
+
@include mat.checkbox-overrides(
|
|
14
|
+
(
|
|
15
|
+
label-text-size: var(--sdg-font-size-md),
|
|
16
|
+
label-text-line-height: var(--sdg-font-size-md),
|
|
17
|
+
// same as font size to avoid extra space above and below
|
|
18
|
+
label-text-color: $unselected-color,
|
|
19
|
+
|
|
20
|
+
disabled-label-color: $disabled-color,
|
|
21
|
+
disabled-unselected-icon-color: $disabled-color,
|
|
22
|
+
disabled-selected-checkmark-color: var(--sdg-color-grey-pale),
|
|
23
|
+
disabled-selected-icon-color: $disabled-color,
|
|
24
|
+
|
|
25
|
+
unselected-icon-color: $unselected-color,
|
|
26
|
+
unselected-hover-icon-color: $unselected-color,
|
|
27
|
+
unselected-focus-icon-color: $selected-color,
|
|
28
|
+
|
|
29
|
+
unselected-hover-state-layer-opacity: 0,
|
|
30
|
+
unselected-focus-state-layer-opacity: 0,
|
|
31
|
+
unselected-pressed-state-layer-opacity: 0,
|
|
32
|
+
|
|
33
|
+
unselected-hover-state-layer-color: transparent,
|
|
34
|
+
unselected-focus-state-layer-color: transparent,
|
|
35
|
+
unselected-pressed-state-layer-color: transparent,
|
|
36
|
+
|
|
37
|
+
selected-icon-color: $selected-color,
|
|
38
|
+
selected-hover-icon-color: $selected-color,
|
|
39
|
+
selected-focus-icon-color: $selected-color,
|
|
40
|
+
selected-pressed-icon-color: $selected-color,
|
|
41
|
+
|
|
42
|
+
selected-hover-state-layer-opacity: 0,
|
|
43
|
+
selected-focus-state-layer-opacity: 0,
|
|
44
|
+
selected-pressed-state-layer-opacity: 0,
|
|
45
|
+
|
|
46
|
+
selected-hover-state-layer-color: transparent,
|
|
47
|
+
selected-focus-state-layer-color: transparent,
|
|
48
|
+
selected-pressed-state-layer-color: transparent
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
.mdc-checkbox__native-control {
|
|
53
|
+
top: calc($base-size / 2);
|
|
54
|
+
left: calc($base-size / 2);
|
|
55
|
+
right: calc($base-size / 2);
|
|
56
|
+
|
|
57
|
+
&:focus:checked ~ .mdc-checkbox__background {
|
|
58
|
+
border-color: $unselected-color;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.mdc-checkbox {
|
|
63
|
+
height: $checkbox-size;
|
|
64
|
+
width: $checkbox-size;
|
|
65
|
+
flex-basis: $checkbox-size;
|
|
66
|
+
|
|
67
|
+
.mdc-checkbox__background {
|
|
68
|
+
height: $checkbox-size;
|
|
69
|
+
width: $checkbox-size;
|
|
70
|
+
border-radius: 0px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.mat-mdc-checkbox-touch-target {
|
|
75
|
+
height: $size-with-padding;
|
|
76
|
+
width: $size-with-padding;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.mdc-label {
|
|
80
|
+
padding-left: 0;
|
|
81
|
+
transform: translateY(
|
|
82
|
+
1px
|
|
83
|
+
); // visually center the label with the radio button
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&[compact] {
|
|
87
|
+
$checkbox-size: calc($base-size * 2);
|
|
88
|
+
$size-with-padding: calc($checkbox-size + ($base-size * 2));
|
|
89
|
+
|
|
90
|
+
@include mat.checkbox-overrides(
|
|
91
|
+
(
|
|
92
|
+
state-layer-size: $size-with-padding
|
|
93
|
+
)
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
.mdc-checkbox__native-control {
|
|
97
|
+
top: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
right: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mdc-checkbox {
|
|
103
|
+
height: $checkbox-size;
|
|
104
|
+
width: $checkbox-size;
|
|
105
|
+
flex-basis: $checkbox-size;
|
|
106
|
+
|
|
107
|
+
.mdc-checkbox__background {
|
|
108
|
+
height: $checkbox-size;
|
|
109
|
+
width: $checkbox-size;
|
|
110
|
+
border-width: 1px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.mat-mdc-checkbox-touch-target {
|
|
115
|
+
height: $size-with-padding;
|
|
116
|
+
width: $size-with-padding;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|