@angular/material 18.0.1 → 18.0.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/_index.scss +1 -1
- package/badge/index.d.ts +4 -1
- package/checkbox/_checkbox-common.scss +523 -0
- package/checkbox/_checkbox-theme.scss +23 -8
- package/checkbox/index.d.ts +10 -2
- package/chips/index.d.ts +5 -1
- package/core/m2/_typography.scss +1 -1
- package/core/ripple/_ripple.scss +6 -0
- package/core/style/_vendor-prefixes.scss +5 -0
- package/core/theming/_palettes.scss +2 -0
- package/core/tokens/m2/mdc/_checkbox.scss +3 -4
- package/datepicker/index.d.ts +10 -2
- package/dialog/index.d.ts +0 -1
- package/dialog/testing/index.d.ts +1 -0
- package/esm2022/autocomplete/autocomplete-trigger.mjs +8 -7
- package/esm2022/badge/badge.mjs +5 -2
- package/esm2022/checkbox/checkbox-config.mjs +1 -1
- package/esm2022/checkbox/checkbox.mjs +5 -12
- package/esm2022/chips/chip.mjs +6 -6
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar.mjs +3 -3
- package/esm2022/datepicker/datepicker-base.mjs +14 -17
- package/esm2022/dialog/dialog-container.mjs +1 -6
- package/esm2022/dialog/testing/dialog-opener.mjs +4 -3
- package/esm2022/list/list-option.mjs +3 -3
- package/esm2022/radio/radio.mjs +25 -3
- package/esm2022/slider/slider-interface.mjs +2 -2
- package/esm2022/slider/slider.mjs +6 -6
- package/esm2022/snack-bar/snack-bar-container.mjs +4 -4
- package/esm2022/table/table.mjs +3 -3
- package/fesm2022/autocomplete.mjs +1 -0
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +4 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +2 -2
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +4 -4
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +7 -3
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +3 -2
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +0 -5
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/list.mjs +2 -2
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/radio.mjs +25 -3
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/slider.mjs +6 -6
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +3 -3
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/table.mjs +2 -2
- package/fesm2022/table.mjs.map +1 -1
- package/list/_list-item-hcm-indicator.scss +19 -19
- package/list/_list-theme.scss +6 -4
- package/package.json +2 -2
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/radio/index.d.ts +1 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js +3 -3
- package/schematics/ng-add/theming/create-custom-theme.mjs +3 -3
- package/schematics/ng-generate/m3-theme/index_bundled.js +83 -4
- package/schematics/ng-generate/m3-theme/index_bundled.js.map +3 -3
- package/schematics/ng-update/index_bundled.js +32 -33
- package/schematics/ng-update/index_bundled.js.map +2 -2
- package/slider/index.d.ts +1 -1
- package/snack-bar/_snack-bar-theme.scss +16 -7
package/_index.scss
CHANGED
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
@forward './slider/slider-theme' as slider-* show slider-theme, slider-color, slider-typography,
|
|
128
128
|
slider-density, slider-base, slider-overrides;
|
|
129
129
|
@forward './snack-bar/snack-bar-theme' as snack-bar-* show snack-bar-theme, snack-bar-color,
|
|
130
|
-
snack-bar-typography, snack-bar-density, snack-bar-base, bar-overrides;
|
|
130
|
+
snack-bar-typography, snack-bar-density, snack-bar-base, snack-bar-overrides;
|
|
131
131
|
@forward './sort/sort-theme' as sort-* show sort-theme, sort-color, sort-typography, sort-density,
|
|
132
132
|
sort-base, sort-overrides;
|
|
133
133
|
@forward './stepper/stepper-theme' as stepper-* show stepper-theme, stepper-color,
|
package/badge/index.d.ts
CHANGED
|
@@ -25,7 +25,10 @@ export declare class MatBadge implements OnInit, OnDestroy {
|
|
|
25
25
|
private _ariaDescriber;
|
|
26
26
|
private _renderer;
|
|
27
27
|
private _animationMode?;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* The color of the badge. Can be `primary`, `accent`, or `warn`.
|
|
30
|
+
* Not recommended in M3, for more information see https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants.
|
|
31
|
+
*/
|
|
29
32
|
get color(): ThemePalette;
|
|
30
33
|
set color(value: ThemePalette);
|
|
31
34
|
private _color;
|
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '@angular/cdk';
|
|
3
|
+
@use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox;
|
|
4
|
+
@use '../core/tokens/token-utils';
|
|
5
|
+
|
|
6
|
+
$_path-length: 29.7833385;
|
|
7
|
+
$_transition-duration: 90ms;
|
|
8
|
+
$_icon-size: 18px;
|
|
9
|
+
$_mark-stroke-size: math.div(2, 15) * $_icon-size;
|
|
10
|
+
$_indeterminate-checked-curve: cubic-bezier(0.14, 0, 0, 1);
|
|
11
|
+
$_indeterminate-change-duration: 500ms;
|
|
12
|
+
$_enter-curve: cubic-bezier(0, 0, 0.2, 1);
|
|
13
|
+
$_exit-curve: cubic-bezier(0.4, 0, 0.6, 1);
|
|
14
|
+
$_fallback-size: 40px;
|
|
15
|
+
|
|
16
|
+
// Structural styles for a checkbox. Shared with the selection list.
|
|
17
|
+
@mixin checkbox-structure($include-state-layer-styles) {
|
|
18
|
+
$prefix: tokens-mdc-checkbox.$prefix;
|
|
19
|
+
$slots: tokens-mdc-checkbox.get-token-slots();
|
|
20
|
+
|
|
21
|
+
.mdc-checkbox {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
position: relative;
|
|
24
|
+
flex: 0 0 $_icon-size;
|
|
25
|
+
box-sizing: content-box;
|
|
26
|
+
width: $_icon-size;
|
|
27
|
+
height: $_icon-size;
|
|
28
|
+
line-height: 0;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
vertical-align: bottom;
|
|
32
|
+
|
|
33
|
+
@include token-utils.use-tokens($prefix, $slots) {
|
|
34
|
+
$layer-size: token-utils.get-token-variable(state-layer-size);
|
|
35
|
+
padding: calc((var(#{$layer-size}, #{$_fallback-size}) - #{$_icon-size}) / 2);
|
|
36
|
+
margin: calc((var(#{$layer-size}, #{$_fallback-size}) -
|
|
37
|
+
var(#{$layer-size}, #{$_fallback-size})) / 2);
|
|
38
|
+
|
|
39
|
+
@if ($include-state-layer-styles) {
|
|
40
|
+
@include _state-layer-styles;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// These styles have to be nested in order to override overly-broad
|
|
45
|
+
// user selectors like `input[type='checkbox']`.
|
|
46
|
+
.mdc-checkbox__native-control {
|
|
47
|
+
position: absolute;
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
cursor: inherit;
|
|
52
|
+
|
|
53
|
+
@include token-utils.use-tokens($prefix, $slots) {
|
|
54
|
+
$layer-size: token-utils.get-token-variable(state-layer-size);
|
|
55
|
+
$offset: calc((var(#{$layer-size}, #{$_fallback-size}) -
|
|
56
|
+
var(#{$layer-size}, #{$_fallback-size})) / 2);
|
|
57
|
+
width: var(#{$layer-size}, #{$_fallback-size});
|
|
58
|
+
height: var(#{$layer-size}, #{$_fallback-size});
|
|
59
|
+
top: $offset;
|
|
60
|
+
right: $offset;
|
|
61
|
+
left: $offset;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.mdc-checkbox--disabled {
|
|
67
|
+
cursor: default;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mdc-checkbox__background {
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
position: absolute;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
width: $_icon-size;
|
|
78
|
+
height: $_icon-size;
|
|
79
|
+
border: 2px solid currentColor;
|
|
80
|
+
border-radius: 2px;
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
will-change: background-color, border-color;
|
|
84
|
+
transition: background-color $_transition-duration $_exit-curve,
|
|
85
|
+
border-color $_transition-duration $_exit-curve;
|
|
86
|
+
|
|
87
|
+
@include token-utils.use-tokens($prefix, $slots) {
|
|
88
|
+
$layer-size: token-utils.get-token-variable(state-layer-size);
|
|
89
|
+
$offset: calc((var(#{$layer-size}, $_fallback-size) - #{$_icon-size}) / 2);
|
|
90
|
+
|
|
91
|
+
@include token-utils.create-token-slot(border-color, unselected-icon-color);
|
|
92
|
+
top: $offset;
|
|
93
|
+
left: $offset;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// These can't be under `.mdc-checkbox__background` because
|
|
98
|
+
// the selectors will break when the mixin is nested.
|
|
99
|
+
@include token-utils.use-tokens($prefix, $slots) {
|
|
100
|
+
.mdc-checkbox__native-control:enabled:checked ~ .mdc-checkbox__background,
|
|
101
|
+
.mdc-checkbox__native-control:enabled:indeterminate ~ .mdc-checkbox__background {
|
|
102
|
+
@include token-utils.create-token-slot(border-color, selected-icon-color);
|
|
103
|
+
@include token-utils.create-token-slot(background-color, selected-icon-color);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.mdc-checkbox--disabled .mdc-checkbox__background {
|
|
107
|
+
@include token-utils.create-token-slot(border-color, disabled-unselected-icon-color);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mdc-checkbox__native-control:disabled:checked ~ .mdc-checkbox__background,
|
|
111
|
+
.mdc-checkbox__native-control:disabled:indeterminate ~ .mdc-checkbox__background {
|
|
112
|
+
@include token-utils.create-token-slot(background-color, disabled-selected-icon-color);
|
|
113
|
+
border-color: transparent;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked) ~ .mdc-checkbox__background,
|
|
117
|
+
.mdc-checkbox:hover
|
|
118
|
+
.mdc-checkbox__native-control:not(:indeterminate) ~ .mdc-checkbox__background {
|
|
119
|
+
@include token-utils.create-token-slot(border-color, unselected-hover-icon-color);
|
|
120
|
+
background-color: transparent;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.mdc-checkbox:hover .mdc-checkbox__native-control:checked ~ .mdc-checkbox__background,
|
|
124
|
+
.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background {
|
|
125
|
+
@include token-utils.create-token-slot(border-color, selected-hover-icon-color);
|
|
126
|
+
@include token-utils.create-token-slot(background-color, selected-hover-icon-color);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Note: this must be more specific than the hover styles above.
|
|
130
|
+
// Double :focus is added for increased specificity.
|
|
131
|
+
.mdc-checkbox__native-control:focus:focus:not(:checked) ~ .mdc-checkbox__background,
|
|
132
|
+
.mdc-checkbox__native-control:focus:focus:not(:indeterminate) ~ .mdc-checkbox__background {
|
|
133
|
+
@include token-utils.create-token-slot(border-color, unselected-focus-icon-color);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.mdc-checkbox__native-control:focus:focus:checked ~ .mdc-checkbox__background,
|
|
137
|
+
.mdc-checkbox__native-control:focus:focus:indeterminate ~ .mdc-checkbox__background {
|
|
138
|
+
@include token-utils.create-token-slot(border-color, selected-focus-icon-color);
|
|
139
|
+
@include token-utils.create-token-slot(background-color, selected-focus-icon-color);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.mdc-checkbox__checkmark {
|
|
144
|
+
position: absolute;
|
|
145
|
+
top: 0;
|
|
146
|
+
right: 0;
|
|
147
|
+
bottom: 0;
|
|
148
|
+
left: 0;
|
|
149
|
+
width: 100%;
|
|
150
|
+
opacity: 0;
|
|
151
|
+
transition: opacity $_transition-duration * 2 $_exit-curve;
|
|
152
|
+
|
|
153
|
+
@include token-utils.use-tokens($prefix, $slots) {
|
|
154
|
+
// Always apply the color since the element becomes `opacity: 0`
|
|
155
|
+
// when unchecked. This makes the animation look better.
|
|
156
|
+
@include token-utils.create-token-slot(color, selected-checkmark-color);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@include token-utils.use-tokens($prefix, $slots) {
|
|
161
|
+
.mdc-checkbox--disabled .mdc-checkbox__checkmark {
|
|
162
|
+
@include token-utils.create-token-slot(color, disabled-selected-checkmark-color);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.mdc-checkbox__checkmark-path {
|
|
167
|
+
transition: stroke-dashoffset $_transition-duration * 2 $_exit-curve;
|
|
168
|
+
stroke: currentColor;
|
|
169
|
+
stroke-width: $_mark-stroke-size * 1.3;
|
|
170
|
+
stroke-dashoffset: $_path-length;
|
|
171
|
+
stroke-dasharray: $_path-length;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.mdc-checkbox__mixedmark {
|
|
175
|
+
width: 100%;
|
|
176
|
+
height: 0;
|
|
177
|
+
transform: scaleX(0) rotate(0deg);
|
|
178
|
+
border-width: math.div(math.floor($_mark-stroke-size), 2);
|
|
179
|
+
border-style: solid;
|
|
180
|
+
opacity: 0;
|
|
181
|
+
transition: opacity $_transition-duration $_exit-curve,
|
|
182
|
+
transform $_transition-duration $_exit-curve;
|
|
183
|
+
|
|
184
|
+
@include cdk.high-contrast(active, off) {
|
|
185
|
+
margin: 0 1px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@include token-utils.use-tokens($prefix, $slots) {
|
|
189
|
+
// Always apply the color since the element becomes `opacity: 0`
|
|
190
|
+
// when unchecked. This makes the animation look better.
|
|
191
|
+
@include token-utils.create-token-slot(border-color, selected-checkmark-color);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@include token-utils.use-tokens($prefix, $slots) {
|
|
196
|
+
.mdc-checkbox--disabled .mdc-checkbox__mixedmark {
|
|
197
|
+
@include token-utils.create-token-slot(border-color, disabled-selected-checkmark-color);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.mdc-checkbox--anim-unchecked-checked,
|
|
202
|
+
.mdc-checkbox--anim-unchecked-indeterminate,
|
|
203
|
+
.mdc-checkbox--anim-checked-unchecked,
|
|
204
|
+
.mdc-checkbox--anim-indeterminate-unchecked {
|
|
205
|
+
.mdc-checkbox__background {
|
|
206
|
+
animation-duration: $_transition-duration * 2;
|
|
207
|
+
animation-timing-function: linear;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.mdc-checkbox--anim-unchecked-checked {
|
|
212
|
+
.mdc-checkbox__checkmark-path {
|
|
213
|
+
animation: mdc-checkbox-unchecked-checked-checkmark-path
|
|
214
|
+
$_transition-duration * 2 linear;
|
|
215
|
+
transition: none;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.mdc-checkbox--anim-unchecked-indeterminate {
|
|
220
|
+
.mdc-checkbox__mixedmark {
|
|
221
|
+
animation: mdc-checkbox-unchecked-indeterminate-mixedmark $_transition-duration linear;
|
|
222
|
+
transition: none;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.mdc-checkbox--anim-checked-unchecked {
|
|
227
|
+
.mdc-checkbox__checkmark-path {
|
|
228
|
+
animation: mdc-checkbox-checked-unchecked-checkmark-path $_transition-duration linear;
|
|
229
|
+
transition: none;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.mdc-checkbox--anim-checked-indeterminate {
|
|
234
|
+
.mdc-checkbox__checkmark {
|
|
235
|
+
animation: mdc-checkbox-checked-indeterminate-checkmark $_transition-duration linear;
|
|
236
|
+
transition: none;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.mdc-checkbox__mixedmark {
|
|
240
|
+
animation: mdc-checkbox-checked-indeterminate-mixedmark $_transition-duration linear;
|
|
241
|
+
transition: none;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.mdc-checkbox--anim-indeterminate-checked {
|
|
246
|
+
.mdc-checkbox__checkmark {
|
|
247
|
+
animation: mdc-checkbox-indeterminate-checked-checkmark
|
|
248
|
+
$_indeterminate-change-duration linear;
|
|
249
|
+
transition: none;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.mdc-checkbox__mixedmark {
|
|
253
|
+
animation: mdc-checkbox-indeterminate-checked-mixedmark
|
|
254
|
+
$_indeterminate-change-duration linear;
|
|
255
|
+
transition: none;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.mdc-checkbox--anim-indeterminate-unchecked {
|
|
260
|
+
.mdc-checkbox__mixedmark {
|
|
261
|
+
animation: mdc-checkbox-indeterminate-unchecked-mixedmark
|
|
262
|
+
$_indeterminate-change-duration * 0.6 linear;
|
|
263
|
+
transition: none;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.mdc-checkbox__native-control:checked ~ .mdc-checkbox__background,
|
|
268
|
+
.mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background {
|
|
269
|
+
transition: border-color $_transition-duration $_enter-curve,
|
|
270
|
+
background-color $_transition-duration $_enter-curve;
|
|
271
|
+
|
|
272
|
+
.mdc-checkbox__checkmark-path {
|
|
273
|
+
stroke-dashoffset: 0;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.mdc-checkbox__native-control:checked ~ .mdc-checkbox__background {
|
|
278
|
+
.mdc-checkbox__checkmark {
|
|
279
|
+
transition: opacity $_transition-duration * 2 $_enter-curve,
|
|
280
|
+
transform $_transition-duration * 2 $_enter-curve;
|
|
281
|
+
opacity: 1;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.mdc-checkbox__mixedmark {
|
|
285
|
+
transform: scaleX(1) rotate(-45deg);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
.mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background {
|
|
289
|
+
.mdc-checkbox__checkmark {
|
|
290
|
+
transform: rotate(45deg);
|
|
291
|
+
opacity: 0;
|
|
292
|
+
transition: opacity $_transition-duration $_exit-curve,
|
|
293
|
+
transform $_transition-duration $_exit-curve;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.mdc-checkbox__mixedmark {
|
|
297
|
+
transform: scaleX(1) rotate(0deg);
|
|
298
|
+
opacity: 1;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@keyframes mdc-checkbox-unchecked-checked-checkmark-path {
|
|
303
|
+
0%, 50% {
|
|
304
|
+
stroke-dashoffset: $_path-length;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
50% {
|
|
308
|
+
animation-timing-function: $_enter-curve;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
100% {
|
|
312
|
+
stroke-dashoffset: 0;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark {
|
|
317
|
+
0%, 68.2% {
|
|
318
|
+
transform: scaleX(0);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
68.2% {
|
|
322
|
+
animation-timing-function: cubic-bezier(0, 0, 0, 1);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
100% {
|
|
326
|
+
transform: scaleX(1);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
@keyframes mdc-checkbox-checked-unchecked-checkmark-path {
|
|
331
|
+
from {
|
|
332
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
333
|
+
opacity: 1;
|
|
334
|
+
stroke-dashoffset: 0;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
to {
|
|
338
|
+
opacity: 0;
|
|
339
|
+
stroke-dashoffset: $_path-length * -1;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
@keyframes mdc-checkbox-checked-indeterminate-checkmark {
|
|
344
|
+
from {
|
|
345
|
+
animation-timing-function: $_enter-curve;
|
|
346
|
+
transform: rotate(0deg);
|
|
347
|
+
opacity: 1;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
to {
|
|
351
|
+
transform: rotate(45deg);
|
|
352
|
+
opacity: 0;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
@keyframes mdc-checkbox-indeterminate-checked-checkmark {
|
|
357
|
+
from {
|
|
358
|
+
animation-timing-function: $_indeterminate-checked-curve;
|
|
359
|
+
transform: rotate(45deg);
|
|
360
|
+
opacity: 0;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
to {
|
|
364
|
+
transform: rotate(360deg);
|
|
365
|
+
opacity: 1;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
@keyframes mdc-checkbox-checked-indeterminate-mixedmark {
|
|
370
|
+
from {
|
|
371
|
+
animation-timing-function: $_enter-curve;
|
|
372
|
+
transform: rotate(-45deg);
|
|
373
|
+
opacity: 0;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
to {
|
|
377
|
+
transform: rotate(0deg);
|
|
378
|
+
opacity: 1;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
@keyframes mdc-checkbox-indeterminate-checked-mixedmark {
|
|
383
|
+
from {
|
|
384
|
+
animation-timing-function: $_indeterminate-checked-curve;
|
|
385
|
+
transform: rotate(0deg);
|
|
386
|
+
opacity: 1;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
to {
|
|
390
|
+
transform: rotate(315deg);
|
|
391
|
+
opacity: 0;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark {
|
|
396
|
+
0% {
|
|
397
|
+
animation-timing-function: linear;
|
|
398
|
+
transform: scaleX(1);
|
|
399
|
+
opacity: 1;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
32.8%, 100% {
|
|
403
|
+
transform: scaleX(0);
|
|
404
|
+
opacity: 0;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// Conditionally disables the animations of the checkbox.
|
|
410
|
+
@mixin checkbox-noop-animations() {
|
|
411
|
+
&._mat-animation-noopable .mdc-checkbox {
|
|
412
|
+
*, *::before {
|
|
413
|
+
transition: none !important;
|
|
414
|
+
animation: none !important;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
@mixin _state-layer-styles() {
|
|
420
|
+
// MDC expects `.mdc-checkbox__ripple::before` to be the state layer, but we use
|
|
421
|
+
// `.mdc-checkbox__ripple` instead, so we emit the state layer slots ourselves.
|
|
422
|
+
&:hover {
|
|
423
|
+
.mdc-checkbox__ripple {
|
|
424
|
+
@include token-utils.create-token-slot(opacity, unselected-hover-state-layer-opacity);
|
|
425
|
+
@include token-utils.create-token-slot(
|
|
426
|
+
background-color,
|
|
427
|
+
unselected-hover-state-layer-color
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.mat-mdc-checkbox-ripple .mat-ripple-element {
|
|
432
|
+
@include token-utils.create-token-slot(
|
|
433
|
+
background-color,
|
|
434
|
+
unselected-hover-state-layer-color
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.mdc-checkbox__native-control:focus {
|
|
440
|
+
& ~ .mdc-checkbox__ripple {
|
|
441
|
+
@include token-utils.create-token-slot(opacity, unselected-focus-state-layer-opacity);
|
|
442
|
+
@include token-utils.create-token-slot(
|
|
443
|
+
background-color,
|
|
444
|
+
unselected-focus-state-layer-color
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
& ~ .mat-mdc-checkbox-ripple .mat-ripple-element {
|
|
449
|
+
@include token-utils.create-token-slot(
|
|
450
|
+
background-color,
|
|
451
|
+
unselected-focus-state-layer-color
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
&:active .mdc-checkbox__native-control {
|
|
457
|
+
& ~ .mdc-checkbox__ripple {
|
|
458
|
+
@include token-utils.create-token-slot(opacity, unselected-pressed-state-layer-opacity);
|
|
459
|
+
@include token-utils.create-token-slot(
|
|
460
|
+
background-color,
|
|
461
|
+
unselected-pressed-state-layer-color
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
& ~ .mat-mdc-checkbox-ripple .mat-ripple-element {
|
|
466
|
+
@include token-utils.create-token-slot(
|
|
467
|
+
background-color,
|
|
468
|
+
unselected-pressed-state-layer-color
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
&:hover .mdc-checkbox__native-control:checked {
|
|
474
|
+
& ~ .mdc-checkbox__ripple {
|
|
475
|
+
@include token-utils.create-token-slot(opacity, selected-hover-state-layer-opacity);
|
|
476
|
+
@include token-utils.create-token-slot(
|
|
477
|
+
background-color,
|
|
478
|
+
selected-hover-state-layer-color
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
& ~ .mat-mdc-checkbox-ripple .mat-ripple-element {
|
|
483
|
+
@include token-utils.create-token-slot(
|
|
484
|
+
background-color,
|
|
485
|
+
selected-hover-state-layer-color
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.mdc-checkbox__native-control:focus:checked {
|
|
491
|
+
& ~ .mdc-checkbox__ripple {
|
|
492
|
+
@include token-utils.create-token-slot(opacity, selected-focus-state-layer-opacity);
|
|
493
|
+
@include token-utils.create-token-slot(
|
|
494
|
+
background-color,
|
|
495
|
+
selected-focus-state-layer-color
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
& ~ .mat-mdc-checkbox-ripple .mat-ripple-element {
|
|
500
|
+
@include token-utils.create-token-slot(
|
|
501
|
+
background-color,
|
|
502
|
+
selected-focus-state-layer-color
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
&:active .mdc-checkbox__native-control:checked {
|
|
508
|
+
& ~ .mdc-checkbox__ripple {
|
|
509
|
+
@include token-utils.create-token-slot(opacity, selected-pressed-state-layer-opacity);
|
|
510
|
+
@include token-utils.create-token-slot(
|
|
511
|
+
background-color,
|
|
512
|
+
selected-pressed-state-layer-color
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
& ~ .mat-mdc-checkbox-ripple .mat-ripple-element {
|
|
517
|
+
@include token-utils.create-token-slot(
|
|
518
|
+
background-color,
|
|
519
|
+
selected-pressed-state-layer-color
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use '@material/checkbox/checkbox-theme' as mdc-checkbox-theme;
|
|
2
1
|
@use '../core/style/sass-utils';
|
|
3
2
|
@use '../core/theming/theming';
|
|
4
3
|
@use '../core/theming/inspection';
|
|
@@ -16,7 +15,10 @@
|
|
|
16
15
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
17
16
|
} @else {
|
|
18
17
|
@include sass-utils.current-selector-or-root() {
|
|
19
|
-
@include
|
|
18
|
+
@include token-utils.create-token-values(
|
|
19
|
+
tokens-mdc-checkbox.$prefix,
|
|
20
|
+
tokens-mdc-checkbox.get-unthemable-tokens()
|
|
21
|
+
);
|
|
20
22
|
@include token-utils.create-token-values(
|
|
21
23
|
tokens-mat-checkbox.$prefix,
|
|
22
24
|
tokens-mat-checkbox.get-unthemable-tokens()
|
|
@@ -35,7 +37,10 @@
|
|
|
35
37
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
36
38
|
} @else {
|
|
37
39
|
@include sass-utils.current-selector-or-root() {
|
|
38
|
-
@include
|
|
40
|
+
@include token-utils.create-token-values(
|
|
41
|
+
tokens-mdc-checkbox.$prefix,
|
|
42
|
+
tokens-mdc-checkbox.get-color-tokens($theme)
|
|
43
|
+
);
|
|
39
44
|
@include token-utils.create-token-values(
|
|
40
45
|
tokens-mat-checkbox.$prefix,
|
|
41
46
|
tokens-mat-checkbox.get-color-tokens($theme)
|
|
@@ -44,11 +49,15 @@
|
|
|
44
49
|
|
|
45
50
|
.mat-mdc-checkbox {
|
|
46
51
|
&.mat-primary {
|
|
47
|
-
@include
|
|
52
|
+
@include token-utils.create-token-values(
|
|
53
|
+
tokens-mdc-checkbox.$prefix,
|
|
54
|
+
tokens-mdc-checkbox.get-color-tokens($theme, primary));
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
&.mat-warn {
|
|
51
|
-
@include
|
|
58
|
+
@include token-utils.create-token-values(
|
|
59
|
+
tokens-mdc-checkbox.$prefix,
|
|
60
|
+
tokens-mdc-checkbox.get-color-tokens($theme, warn));
|
|
52
61
|
}
|
|
53
62
|
}
|
|
54
63
|
}
|
|
@@ -61,7 +70,10 @@
|
|
|
61
70
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
62
71
|
} @else {
|
|
63
72
|
@include sass-utils.current-selector-or-root() {
|
|
64
|
-
@include
|
|
73
|
+
@include token-utils.create-token-values(
|
|
74
|
+
tokens-mdc-checkbox.$prefix,
|
|
75
|
+
tokens-mdc-checkbox.get-typography-tokens($theme)
|
|
76
|
+
);
|
|
65
77
|
@include token-utils.create-token-values(
|
|
66
78
|
tokens-mat-checkbox.$prefix,
|
|
67
79
|
tokens-mat-checkbox.get-typography-tokens($theme)
|
|
@@ -79,7 +91,10 @@
|
|
|
79
91
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
80
92
|
} @else {
|
|
81
93
|
@include sass-utils.current-selector-or-root() {
|
|
82
|
-
@include
|
|
94
|
+
@include token-utils.create-token-values(
|
|
95
|
+
tokens-mdc-checkbox.$prefix,
|
|
96
|
+
tokens-mdc-checkbox.get-density-tokens($theme)
|
|
97
|
+
);
|
|
83
98
|
@include token-utils.create-token-values(
|
|
84
99
|
tokens-mat-checkbox.$prefix,
|
|
85
100
|
tokens-mat-checkbox.get-density-tokens($theme)
|
|
@@ -140,6 +155,6 @@
|
|
|
140
155
|
// Don't pass $options here, since the mdc-checkbox doesn't support color options,
|
|
141
156
|
// only the mdc-checkbox does.
|
|
142
157
|
$mat-checkbox-tokens: token-utils.get-tokens-for($tokens, tokens-mat-checkbox.$prefix);
|
|
143
|
-
@include mdc-checkbox
|
|
158
|
+
@include token-utils.create-token-values(tokens-mdc-checkbox.$prefix, $mdc-checkbox-tokens);
|
|
144
159
|
@include token-utils.create-token-values(tokens-mat-checkbox.$prefix, $mat-checkbox-tokens);
|
|
145
160
|
}
|
package/checkbox/index.d.ts
CHANGED
|
@@ -109,7 +109,11 @@ export declare class MatCheckbox implements AfterViewInit, OnChanges, ControlVal
|
|
|
109
109
|
_labelElement: ElementRef<HTMLInputElement>;
|
|
110
110
|
/** Tabindex for the checkbox. */
|
|
111
111
|
tabIndex: number;
|
|
112
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Palette color of the checkbox. This API is supported in M2 themes only, it has no effect in M3
|
|
114
|
+
* themes. For information on applying color variants in M3, see
|
|
115
|
+
* https://material.angular.io/guide/theming#using-component-color-variants
|
|
116
|
+
*/
|
|
113
117
|
color: string | undefined;
|
|
114
118
|
/**
|
|
115
119
|
* Reference to the MatRipple instance of the checkbox.
|
|
@@ -211,7 +215,11 @@ export declare type MatCheckboxClickAction = 'noop' | 'check' | 'check-indetermi
|
|
|
211
215
|
|
|
212
216
|
/** Default `mat-checkbox` options that can be overridden. */
|
|
213
217
|
export declare interface MatCheckboxDefaultOptions {
|
|
214
|
-
/**
|
|
218
|
+
/**
|
|
219
|
+
* Default theme color palette to be used for checkboxes. This API is supported in M2 themes
|
|
220
|
+
* only, it has no effect in M3 themes. For information on applying color variants in M3, see
|
|
221
|
+
* https://material.angular.io/guide/theming#using-component-color-variants
|
|
222
|
+
*/
|
|
215
223
|
color?: ThemePalette;
|
|
216
224
|
/** Default checkbox click action for checkboxes. */
|
|
217
225
|
clickAction?: MatCheckboxClickAction;
|
package/chips/index.d.ts
CHANGED
|
@@ -184,7 +184,11 @@ export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit,
|
|
|
184
184
|
get value(): any;
|
|
185
185
|
set value(value: any);
|
|
186
186
|
protected _value: any;
|
|
187
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* Theme color palette of the chip. This API is supported in M2 themes only, it has no effect in
|
|
189
|
+
* M3 themes. For information on applying color variants in M3, see
|
|
190
|
+
* https://material.angular.io/guide/theming#using-component-color-variants
|
|
191
|
+
*/
|
|
188
192
|
color?: string | null;
|
|
189
193
|
/**
|
|
190
194
|
* Determines whether or not the chip displays the remove styling and emits (removed) events.
|
package/core/m2/_typography.scss
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
/// @param {Map} $input Configuration for the "input" typographic level.
|
|
49
49
|
/// @returns {Map} A typography config for the application.
|
|
50
50
|
///
|
|
51
|
-
/// @deprecated Use `mat.m2-define-typography-config` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
|
|
51
|
+
/// @deprecated Use `mat.m2-define-typography-config` instead. See https://v17.material.angular.io/guide/mdc-migration for information about migrating.
|
|
52
52
|
/// @breaking-change 17.0.0
|
|
53
53
|
@function define-legacy-typography-config(
|
|
54
54
|
$font-family: 'Roboto, "Helvetica Neue", sans-serif',
|
package/core/ripple/_ripple.scss
CHANGED