@angular/material 19.0.0-next.8 → 19.0.0-rc.0
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 -2
- package/autocomplete/_autocomplete-theme.scss +37 -24
- package/autocomplete/index.d.ts +5 -6
- package/badge/_badge-theme.scss +38 -24
- package/bottom-sheet/_bottom-sheet-theme.scss +32 -20
- package/button/_button-theme.scss +229 -105
- package/button/_fab-theme.scss +95 -44
- package/button/_icon-button-theme.scss +38 -25
- package/button/index.d.ts +3 -3
- package/button-toggle/_button-toggle-theme.scss +62 -37
- package/card/_card-theme.scss +79 -38
- package/card/index.d.ts +2 -3
- package/checkbox/_checkbox-theme.scss +16 -10
- package/chips/_chips-theme.scss +64 -30
- package/core/_core-theme.scss +55 -37
- package/core/_core.scss +3 -6
- package/core/option/_optgroup-theme.scss +29 -18
- package/core/option/_option-theme.scss +34 -21
- package/core/ripple/_ripple-theme.scss +33 -21
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +49 -23
- package/core/theming/_config-validation.scss +4 -4
- package/core/theming/_definition.scss +12 -2
- package/core/tokens/_m3-system.scss +86 -42
- package/core/tokens/_token-utils.scss +91 -34
- package/core/tokens/m2/mat/_badge.scss +12 -3
- package/core/tokens/m2/mdc/_radio.scss +1 -1
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
- package/core/tokens/m3/mat/_badge.scss +6 -3
- package/datepicker/_datepicker-theme.scss +53 -32
- package/datepicker/index.d.ts +33 -34
- package/dialog/_dialog-theme.scss +46 -23
- package/divider/_divider-theme.scss +28 -17
- package/expansion/_expansion-theme.scss +36 -24
- package/fesm2022/autocomplete/testing.mjs +2 -5
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +225 -148
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs +2 -5
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +45 -35
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +80 -58
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +2 -2
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs +4 -7
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +82 -45
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +106 -79
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs +3 -6
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +56 -69
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs +4 -7
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +104 -62
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs +11 -14
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +322 -276
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core/testing.mjs +5 -11
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +242 -187
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs +13 -22
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +827 -582
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +15 -10
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +221 -156
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +10 -12
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs +7 -10
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +86 -80
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs +12 -15
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +179 -132
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs +11 -17
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +75 -56
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +8 -8
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +66 -46
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs +3 -3
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input.mjs +103 -72
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list/testing.mjs +21 -38
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +197 -195
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +3 -6
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +178 -127
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs +10 -13
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +83 -58
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +36 -35
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +28 -14
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs +6 -12
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +123 -87
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select/testing.mjs +6 -9
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +219 -182
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs +6 -6
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +136 -125
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs +3 -6
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +77 -47
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs +2 -2
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +262 -194
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs +4 -7
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +143 -111
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs +3 -6
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +94 -74
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs +4 -4
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +146 -113
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table/testing.mjs +13 -25
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +183 -194
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs +5 -5
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +329 -251
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs +7 -16
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +160 -155
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs +2 -5
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +26 -17
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs +6 -9
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +97 -74
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs +3 -6
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +57 -61
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +114 -61
- package/form-field/index.d.ts +9 -10
- package/grid-list/_grid-list-theme.scss +25 -15
- package/icon/_icon-theme.scss +22 -14
- package/input/_input-theme.scss +18 -11
- package/list/_list-theme.scss +89 -47
- package/list/index.d.ts +20 -21
- package/menu/_menu-theme.scss +33 -21
- package/menu/index.d.ts +8 -9
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +39 -23
- 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/progress-bar/_progress-bar-theme.scss +20 -16
- package/progress-spinner/_progress-spinner-theme.scss +41 -25
- package/progress-spinner/index.d.ts +3 -4
- package/radio/_radio-theme.scss +60 -32
- package/radio/index.d.ts +2 -3
- package/schematics/collection.json +3 -3
- 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 +1 -6
- package/schematics/ng-add/theming/create-custom-theme.mjs +1 -6
- package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +480 -288
- package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
- package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
- package/schematics/ng-update/index_bundled.js +6 -1
- package/schematics/ng-update/index_bundled.js.map +1 -1
- package/select/_select-theme.scss +38 -25
- package/select/index.d.ts +6 -7
- package/sidenav/_sidenav-theme.scss +28 -17
- package/slide-toggle/_slide-toggle-theme.scss +52 -28
- package/slider/_slider-theme.scss +62 -38
- package/snack-bar/_snack-bar-theme.scss +29 -17
- package/sort/_sort-theme.scss +33 -21
- package/stepper/_stepper-theme.scss +40 -27
- package/stepper/index.d.ts +14 -15
- package/table/_table-theme.scss +36 -23
- package/tabs/_tabs-theme.scss +97 -50
- package/tabs/index.d.ts +2 -2
- package/timepicker/_timepicker-theme.scss +37 -24
- package/toolbar/_toolbar-theme.scss +35 -22
- package/tooltip/_tooltip-theme.scss +18 -15
- package/tooltip/index.d.ts +5 -6
- package/tree/_tree-theme.scss +33 -21
- package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
|
@@ -8,27 +8,29 @@
|
|
|
8
8
|
@use '../core/theming/inspection';
|
|
9
9
|
@use '../core/theming/validation';
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
@mixin base($theme) {
|
|
13
12
|
@if inspection.get-theme-version($theme) == 1 {
|
|
14
13
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
15
|
-
}
|
|
16
|
-
@else {
|
|
14
|
+
} @else {
|
|
17
15
|
// Add default values for tokens not related to color, typography, or density.
|
|
18
16
|
@include sass-utils.current-selector-or-root() {
|
|
19
|
-
@include token-utils.create-token-values(
|
|
20
|
-
tokens-mdc-icon-button
|
|
17
|
+
@include token-utils.create-token-values(
|
|
18
|
+
tokens-mdc-icon-button.$prefix,
|
|
19
|
+
tokens-mdc-icon-button.get-unthemable-tokens()
|
|
20
|
+
);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
@mixin _icon-button-variant($theme, $palette) {
|
|
26
|
-
$mdc-tokens: if(
|
|
26
|
+
$mdc-tokens: if(
|
|
27
|
+
$palette,
|
|
27
28
|
tokens-mdc-icon-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
28
29
|
tokens-mdc-icon-button.get-color-tokens($theme)
|
|
29
30
|
);
|
|
30
31
|
|
|
31
|
-
$mat-tokens: if(
|
|
32
|
+
$mat-tokens: if(
|
|
33
|
+
$palette,
|
|
32
34
|
tokens-mat-icon-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
33
35
|
tokens-mat-icon-button.get-color-tokens($theme)
|
|
34
36
|
);
|
|
@@ -44,8 +46,7 @@
|
|
|
44
46
|
@mixin color($theme, $options...) {
|
|
45
47
|
@if inspection.get-theme-version($theme) == 1 {
|
|
46
48
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
47
|
-
}
|
|
48
|
-
@else {
|
|
49
|
+
} @else {
|
|
49
50
|
@include sass-utils.current-selector-or-root() {
|
|
50
51
|
@include _icon-button-variant($theme, null);
|
|
51
52
|
|
|
@@ -69,11 +70,12 @@
|
|
|
69
70
|
@mixin typography($theme) {
|
|
70
71
|
@if inspection.get-theme-version($theme) == 1 {
|
|
71
72
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
72
|
-
}
|
|
73
|
-
@else {
|
|
73
|
+
} @else {
|
|
74
74
|
@include sass-utils.current-selector-or-root() {
|
|
75
|
-
@include token-utils.create-token-values(
|
|
76
|
-
tokens-mat-icon-button
|
|
75
|
+
@include token-utils.create-token-values(
|
|
76
|
+
tokens-mat-icon-button.$prefix,
|
|
77
|
+
tokens-mat-icon-button.get-typography-tokens($theme)
|
|
78
|
+
);
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
81
|
}
|
|
@@ -81,8 +83,7 @@
|
|
|
81
83
|
@mixin density($theme) {
|
|
82
84
|
@if inspection.get-theme-version($theme) == 1 {
|
|
83
85
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
84
|
-
}
|
|
85
|
-
@else {
|
|
86
|
+
} @else {
|
|
86
87
|
$icon-size: 24px;
|
|
87
88
|
$density-scale: inspection.get-theme-density($theme);
|
|
88
89
|
$size-map: (
|
|
@@ -96,8 +97,10 @@
|
|
|
96
97
|
$calculated-size: map.get($size-map, $density-scale);
|
|
97
98
|
|
|
98
99
|
@include sass-utils.current-selector-or-root() {
|
|
99
|
-
@include token-utils.create-token-values(
|
|
100
|
-
tokens-mat-icon-button
|
|
100
|
+
@include token-utils.create-token-values(
|
|
101
|
+
tokens-mat-icon-button.$prefix,
|
|
102
|
+
tokens-mat-icon-button.get-density-tokens($theme)
|
|
103
|
+
);
|
|
101
104
|
}
|
|
102
105
|
|
|
103
106
|
// Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.
|
|
@@ -118,14 +121,24 @@
|
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
(
|
|
125
|
-
|
|
124
|
+
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
125
|
+
@function _define-overrides() {
|
|
126
|
+
@return (
|
|
127
|
+
(
|
|
128
|
+
namespace: tokens-mdc-icon-button.$prefix,
|
|
129
|
+
tokens: tokens-mdc-icon-button.get-token-slots(),
|
|
130
|
+
),
|
|
131
|
+
(
|
|
132
|
+
namespace: tokens-mat-icon-button.$prefix,
|
|
133
|
+
tokens: tokens-mat-icon-button.get-token-slots(),
|
|
134
|
+
),
|
|
126
135
|
);
|
|
127
136
|
}
|
|
128
137
|
|
|
138
|
+
@mixin overrides($tokens: ()) {
|
|
139
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides()...);
|
|
140
|
+
}
|
|
141
|
+
|
|
129
142
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-icon-button.
|
|
130
143
|
/// @param {Map} $theme The theme to generate styles for.
|
|
131
144
|
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
@@ -134,8 +147,7 @@
|
|
|
134
147
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-icon-button') {
|
|
135
148
|
@if inspection.get-theme-version($theme) == 1 {
|
|
136
149
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
137
|
-
}
|
|
138
|
-
@else {
|
|
150
|
+
} @else {
|
|
139
151
|
@include base($theme);
|
|
140
152
|
@if inspection.theme-has($theme, color) {
|
|
141
153
|
@include color($theme);
|
|
@@ -152,7 +164,8 @@
|
|
|
152
164
|
|
|
153
165
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
154
166
|
@include validation.selector-defined(
|
|
155
|
-
|
|
167
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
168
|
+
);
|
|
156
169
|
@if ($tokens != ()) {
|
|
157
170
|
$mdc-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-icon-button.$prefix, $options...);
|
|
158
171
|
$mat-tokens: token-utils.get-tokens-for($tokens, tokens-mat-icon-button.$prefix, $options...);
|
package/button/index.d.ts
CHANGED
|
@@ -69,9 +69,9 @@ declare class MatAnchorBase extends MatButtonBase implements OnInit, OnDestroy {
|
|
|
69
69
|
ngOnInit(): void;
|
|
70
70
|
ngOnDestroy(): void;
|
|
71
71
|
_haltDisabledEvents: (event: Event) => void;
|
|
72
|
-
protected _getAriaDisabled(): boolean;
|
|
72
|
+
protected _getAriaDisabled(): boolean | null;
|
|
73
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatAnchorBase, never>;
|
|
74
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never,
|
|
74
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never, true, never>;
|
|
75
75
|
static ngAcceptInputType_tabIndex: unknown;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -142,7 +142,7 @@ declare class MatButtonBase implements AfterViewInit, OnDestroy {
|
|
|
142
142
|
protected _getDisabledAttribute(): true | null;
|
|
143
143
|
private _updateRippleDisabled;
|
|
144
144
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonBase, never>;
|
|
145
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; }; "disabledInteractive": { "alias": "disabledInteractive"; "required": false; }; }, {}, never, never,
|
|
145
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; }; "disabledInteractive": { "alias": "disabledInteractive"; "required": false; }; }, {}, never, never, true, never>;
|
|
146
146
|
static ngAcceptInputType_disableRipple: unknown;
|
|
147
147
|
static ngAcceptInputType_disabled: unknown;
|
|
148
148
|
static ngAcceptInputType_ariaDisabled: unknown;
|
|
@@ -13,16 +13,15 @@
|
|
|
13
13
|
@mixin base($theme) {
|
|
14
14
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
15
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
16
|
-
}
|
|
17
|
-
@else {
|
|
16
|
+
} @else {
|
|
18
17
|
@include sass-utils.current-selector-or-root() {
|
|
19
18
|
@include token-utils.create-token-values(
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
tokens-mat-legacy-button-toggle.$prefix,
|
|
20
|
+
tokens-mat-legacy-button-toggle.get-unthemable-tokens()
|
|
22
21
|
);
|
|
23
22
|
@include token-utils.create-token-values(
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
tokens-mat-standard-button-toggle.$prefix,
|
|
24
|
+
tokens-mat-standard-button-toggle.get-unthemable-tokens()
|
|
26
25
|
);
|
|
27
26
|
}
|
|
28
27
|
}
|
|
@@ -36,13 +35,16 @@
|
|
|
36
35
|
@mixin color($theme, $options...) {
|
|
37
36
|
@if inspection.get-theme-version($theme) == 1 {
|
|
38
37
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
39
|
-
}
|
|
40
|
-
@else {
|
|
38
|
+
} @else {
|
|
41
39
|
@include sass-utils.current-selector-or-root() {
|
|
42
|
-
@include token-utils.create-token-values(
|
|
43
|
-
tokens-mat-legacy-button-toggle
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
@include token-utils.create-token-values(
|
|
41
|
+
tokens-mat-legacy-button-toggle.$prefix,
|
|
42
|
+
tokens-mat-legacy-button-toggle.get-color-tokens($theme)
|
|
43
|
+
);
|
|
44
|
+
@include token-utils.create-token-values(
|
|
45
|
+
tokens-mat-standard-button-toggle.$prefix,
|
|
46
|
+
tokens-mat-standard-button-toggle.get-color-tokens($theme)
|
|
47
|
+
);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
}
|
|
@@ -52,13 +54,16 @@
|
|
|
52
54
|
@mixin typography($theme) {
|
|
53
55
|
@if inspection.get-theme-version($theme) == 1 {
|
|
54
56
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
55
|
-
}
|
|
56
|
-
@else {
|
|
57
|
+
} @else {
|
|
57
58
|
@include sass-utils.current-selector-or-root() {
|
|
58
|
-
@include token-utils.create-token-values(
|
|
59
|
-
tokens-mat-legacy-button-toggle
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
@include token-utils.create-token-values(
|
|
60
|
+
tokens-mat-legacy-button-toggle.$prefix,
|
|
61
|
+
tokens-mat-legacy-button-toggle.get-typography-tokens($theme)
|
|
62
|
+
);
|
|
63
|
+
@include token-utils.create-token-values(
|
|
64
|
+
tokens-mat-standard-button-toggle.$prefix,
|
|
65
|
+
tokens-mat-standard-button-toggle.get-typography-tokens($theme)
|
|
66
|
+
);
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
}
|
|
@@ -68,29 +73,44 @@
|
|
|
68
73
|
@mixin density($theme) {
|
|
69
74
|
@if inspection.get-theme-version($theme) == 1 {
|
|
70
75
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
71
|
-
}
|
|
72
|
-
@else {
|
|
76
|
+
} @else {
|
|
73
77
|
@include sass-utils.current-selector-or-root() {
|
|
74
|
-
@include token-utils.create-token-values(
|
|
75
|
-
tokens-mat-legacy-button-toggle
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
@include token-utils.create-token-values(
|
|
79
|
+
tokens-mat-legacy-button-toggle.$prefix,
|
|
80
|
+
tokens-mat-legacy-button-toggle.get-density-tokens($theme)
|
|
81
|
+
);
|
|
82
|
+
@include token-utils.create-token-values(
|
|
83
|
+
tokens-mat-standard-button-toggle.$prefix,
|
|
84
|
+
tokens-mat-standard-button-toggle.get-density-tokens($theme)
|
|
85
|
+
);
|
|
78
86
|
}
|
|
79
87
|
}
|
|
80
88
|
}
|
|
81
89
|
|
|
82
|
-
///
|
|
83
|
-
|
|
84
|
-
@mixin overrides($tokens: ()) {
|
|
90
|
+
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
91
|
+
@function _define-overrides() {
|
|
85
92
|
$legacy-tokens: tokens-mat-legacy-button-toggle.get-token-slots();
|
|
86
93
|
$standard-tokens: tokens-mat-standard-button-toggle.get-token-slots();
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
(
|
|
90
|
-
|
|
94
|
+
|
|
95
|
+
@return (
|
|
96
|
+
(
|
|
97
|
+
namespace: tokens-mat-legacy-button-toggle.$prefix,
|
|
98
|
+
tokens: $legacy-tokens,
|
|
99
|
+
prefix: 'legacy-',
|
|
100
|
+
),
|
|
101
|
+
(
|
|
102
|
+
namespace: tokens-mat-standard-button-toggle.$prefix,
|
|
103
|
+
tokens: $standard-tokens,
|
|
104
|
+
),
|
|
91
105
|
);
|
|
92
106
|
}
|
|
93
107
|
|
|
108
|
+
/// Outputs the CSS variable values for the given tokens.
|
|
109
|
+
/// @param {Map} $tokens The token values to emit.
|
|
110
|
+
@mixin overrides($tokens: ()) {
|
|
111
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides()...);
|
|
112
|
+
}
|
|
113
|
+
|
|
94
114
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-button-toggle.
|
|
95
115
|
/// @param {Map} $theme The theme to generate styles for.
|
|
96
116
|
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
@@ -100,8 +120,7 @@
|
|
|
100
120
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-button-toggle') {
|
|
101
121
|
@if inspection.get-theme-version($theme) == 1 {
|
|
102
122
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
103
|
-
}
|
|
104
|
-
@else {
|
|
123
|
+
} @else {
|
|
105
124
|
@include base($theme);
|
|
106
125
|
@if inspection.theme-has($theme, color) {
|
|
107
126
|
@include color($theme);
|
|
@@ -118,9 +137,15 @@
|
|
|
118
137
|
|
|
119
138
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
120
139
|
@include validation.selector-defined(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
141
|
+
);
|
|
142
|
+
$mat-standard-button-toggle-tokens: token-utils.get-tokens-for(
|
|
143
|
+
$tokens,
|
|
144
|
+
tokens-mat-standard-button-toggle.$prefix,
|
|
145
|
+
$options...
|
|
146
|
+
);
|
|
124
147
|
@include token-utils.create-token-values(
|
|
125
|
-
|
|
148
|
+
tokens-mat-standard-button-toggle.$prefix,
|
|
149
|
+
$mat-standard-button-toggle-tokens
|
|
150
|
+
);
|
|
126
151
|
}
|
package/card/_card-theme.scss
CHANGED
|
@@ -12,15 +12,20 @@
|
|
|
12
12
|
@mixin base($theme) {
|
|
13
13
|
@if inspection.get-theme-version($theme) == 1 {
|
|
14
14
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
15
|
-
}
|
|
16
|
-
@else {
|
|
15
|
+
} @else {
|
|
17
16
|
@include sass-utils.current-selector-or-root() {
|
|
18
17
|
@include token-utils.create-token-values(
|
|
19
|
-
|
|
18
|
+
tokens-mdc-elevated-card.$prefix,
|
|
19
|
+
tokens-mdc-elevated-card.get-unthemable-tokens()
|
|
20
|
+
);
|
|
20
21
|
@include token-utils.create-token-values(
|
|
21
|
-
|
|
22
|
+
tokens-mdc-outlined-card.$prefix,
|
|
23
|
+
tokens-mdc-outlined-card.get-unthemable-tokens()
|
|
24
|
+
);
|
|
22
25
|
@include token-utils.create-token-values(
|
|
23
|
-
|
|
26
|
+
tokens-mat-card.$prefix,
|
|
27
|
+
tokens-mat-card.get-unthemable-tokens()
|
|
28
|
+
);
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
31
|
}
|
|
@@ -28,15 +33,20 @@
|
|
|
28
33
|
@mixin color($theme) {
|
|
29
34
|
@if inspection.get-theme-version($theme) == 1 {
|
|
30
35
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
31
|
-
}
|
|
32
|
-
@else {
|
|
36
|
+
} @else {
|
|
33
37
|
@include sass-utils.current-selector-or-root() {
|
|
34
|
-
@include token-utils.create-token-values(
|
|
35
|
-
tokens-mdc-elevated-card
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
@include token-utils.create-token-values(
|
|
39
|
-
tokens-
|
|
38
|
+
@include token-utils.create-token-values(
|
|
39
|
+
tokens-mdc-elevated-card.$prefix,
|
|
40
|
+
tokens-mdc-elevated-card.get-color-tokens($theme)
|
|
41
|
+
);
|
|
42
|
+
@include token-utils.create-token-values(
|
|
43
|
+
tokens-mdc-outlined-card.$prefix,
|
|
44
|
+
tokens-mdc-outlined-card.get-color-tokens($theme)
|
|
45
|
+
);
|
|
46
|
+
@include token-utils.create-token-values(
|
|
47
|
+
tokens-mat-card.$prefix,
|
|
48
|
+
tokens-mat-card.get-color-tokens($theme)
|
|
49
|
+
);
|
|
40
50
|
}
|
|
41
51
|
}
|
|
42
52
|
}
|
|
@@ -44,15 +54,20 @@
|
|
|
44
54
|
@mixin typography($theme) {
|
|
45
55
|
@if inspection.get-theme-version($theme) == 1 {
|
|
46
56
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
47
|
-
}
|
|
48
|
-
@else {
|
|
57
|
+
} @else {
|
|
49
58
|
@include sass-utils.current-selector-or-root() {
|
|
50
59
|
@include token-utils.create-token-values(
|
|
51
|
-
tokens-mdc-elevated-card.$prefix,
|
|
60
|
+
tokens-mdc-elevated-card.$prefix,
|
|
61
|
+
tokens-mdc-elevated-card.get-typography-tokens($theme)
|
|
62
|
+
);
|
|
52
63
|
@include token-utils.create-token-values(
|
|
53
|
-
tokens-mdc-outlined-card.$prefix,
|
|
64
|
+
tokens-mdc-outlined-card.$prefix,
|
|
65
|
+
tokens-mdc-outlined-card.get-typography-tokens($theme)
|
|
66
|
+
);
|
|
54
67
|
@include token-utils.create-token-values(
|
|
55
|
-
tokens-mat-card.$prefix,
|
|
68
|
+
tokens-mat-card.$prefix,
|
|
69
|
+
tokens-mat-card.get-typography-tokens($theme)
|
|
70
|
+
);
|
|
56
71
|
}
|
|
57
72
|
}
|
|
58
73
|
}
|
|
@@ -60,34 +75,53 @@
|
|
|
60
75
|
@mixin density($theme) {
|
|
61
76
|
@if inspection.get-theme-version($theme) == 1 {
|
|
62
77
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
63
|
-
}
|
|
64
|
-
@else {
|
|
78
|
+
} @else {
|
|
65
79
|
@include sass-utils.current-selector-or-root() {
|
|
66
|
-
@include token-utils.create-token-values(
|
|
67
|
-
tokens-mdc-elevated-card
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@include token-utils.create-token-values(
|
|
71
|
-
tokens-
|
|
80
|
+
@include token-utils.create-token-values(
|
|
81
|
+
tokens-mdc-elevated-card.$prefix,
|
|
82
|
+
tokens-mdc-elevated-card.get-density-tokens($theme)
|
|
83
|
+
);
|
|
84
|
+
@include token-utils.create-token-values(
|
|
85
|
+
tokens-mdc-outlined-card.$prefix,
|
|
86
|
+
tokens-mdc-outlined-card.get-density-tokens($theme)
|
|
87
|
+
);
|
|
88
|
+
@include token-utils.create-token-values(
|
|
89
|
+
tokens-mat-card.$prefix,
|
|
90
|
+
tokens-mat-card.get-density-tokens($theme)
|
|
91
|
+
);
|
|
72
92
|
}
|
|
73
93
|
}
|
|
74
94
|
}
|
|
75
95
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
(
|
|
80
|
-
|
|
81
|
-
|
|
96
|
+
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
97
|
+
@function _define-overrides() {
|
|
98
|
+
@return (
|
|
99
|
+
(
|
|
100
|
+
namespace: tokens-mat-card.$prefix,
|
|
101
|
+
tokens: tokens-mat-card.get-token-slots(),
|
|
102
|
+
),
|
|
103
|
+
(
|
|
104
|
+
namespace: tokens-mdc-elevated-card.$prefix,
|
|
105
|
+
tokens: tokens-mdc-elevated-card.get-token-slots(),
|
|
106
|
+
prefix: 'elevated-',
|
|
107
|
+
),
|
|
108
|
+
(
|
|
109
|
+
namespace: tokens-mdc-outlined-card.$prefix,
|
|
110
|
+
tokens: tokens-mdc-outlined-card.get-token-slots(),
|
|
111
|
+
prefix: 'outlined-',
|
|
112
|
+
),
|
|
82
113
|
);
|
|
83
114
|
}
|
|
84
115
|
|
|
116
|
+
@mixin overrides($tokens: ()) {
|
|
117
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides()...);
|
|
118
|
+
}
|
|
119
|
+
|
|
85
120
|
@mixin theme($theme) {
|
|
86
121
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-card') {
|
|
87
122
|
@if inspection.get-theme-version($theme) == 1 {
|
|
88
123
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
89
|
-
}
|
|
90
|
-
@else {
|
|
124
|
+
} @else {
|
|
91
125
|
@include base($theme);
|
|
92
126
|
@if inspection.theme-has($theme, color) {
|
|
93
127
|
@include color($theme);
|
|
@@ -104,13 +138,20 @@
|
|
|
104
138
|
|
|
105
139
|
@mixin _theme-from-tokens($tokens) {
|
|
106
140
|
@include validation.selector-defined(
|
|
107
|
-
|
|
141
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
142
|
+
);
|
|
108
143
|
@if ($tokens != ()) {
|
|
109
144
|
@include token-utils.create-token-values(
|
|
110
|
-
|
|
145
|
+
tokens-mdc-elevated-card.$prefix,
|
|
146
|
+
map.get($tokens, tokens-mdc-elevated-card.$prefix)
|
|
147
|
+
);
|
|
111
148
|
@include token-utils.create-token-values(
|
|
112
|
-
|
|
149
|
+
tokens-mdc-outlined-card.$prefix,
|
|
150
|
+
map.get($tokens, tokens-mdc-outlined-card.$prefix)
|
|
151
|
+
);
|
|
113
152
|
@include token-utils.create-token-values(
|
|
114
|
-
|
|
153
|
+
tokens-mat-card.$prefix,
|
|
154
|
+
map.get($tokens, tokens-mat-card.$prefix)
|
|
155
|
+
);
|
|
115
156
|
}
|
|
116
157
|
}
|
package/card/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import * as i1 from '@angular/material/core';
|
|
3
|
-
import * as i2 from '@angular/common';
|
|
4
3
|
import { InjectionToken } from '@angular/core';
|
|
5
4
|
|
|
6
|
-
declare namespace
|
|
5
|
+
declare namespace i2 {
|
|
7
6
|
export {
|
|
8
7
|
MatCardAppearance,
|
|
9
8
|
MatCardConfig,
|
|
@@ -142,7 +141,7 @@ export declare class MatCardMdImage {
|
|
|
142
141
|
|
|
143
142
|
export declare class MatCardModule {
|
|
144
143
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatCardModule, never>;
|
|
145
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatCardModule, never, [typeof i1.MatCommonModule, typeof i2.
|
|
144
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatCardModule, never, [typeof i1.MatCommonModule, typeof i2.MatCard, typeof i2.MatCardActions, typeof i2.MatCardAvatar, typeof i2.MatCardContent, typeof i2.MatCardFooter, typeof i2.MatCardHeader, typeof i2.MatCardImage, typeof i2.MatCardLgImage, typeof i2.MatCardMdImage, typeof i2.MatCardSmImage, typeof i2.MatCardSubtitle, typeof i2.MatCardTitle, typeof i2.MatCardTitleGroup, typeof i2.MatCardXlImage], [typeof i2.MatCard, typeof i2.MatCardActions, typeof i2.MatCardAvatar, typeof i2.MatCardContent, typeof i2.MatCardFooter, typeof i2.MatCardHeader, typeof i2.MatCardImage, typeof i2.MatCardLgImage, typeof i2.MatCardMdImage, typeof i2.MatCardSmImage, typeof i2.MatCardSubtitle, typeof i2.MatCardTitle, typeof i2.MatCardTitleGroup, typeof i2.MatCardXlImage, typeof i1.MatCommonModule]>;
|
|
146
145
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatCardModule>;
|
|
147
146
|
}
|
|
148
147
|
|
|
@@ -51,13 +51,15 @@
|
|
|
51
51
|
&.mat-primary {
|
|
52
52
|
@include token-utils.create-token-values(
|
|
53
53
|
tokens-mdc-checkbox.$prefix,
|
|
54
|
-
tokens-mdc-checkbox.get-color-tokens($theme, primary)
|
|
54
|
+
tokens-mdc-checkbox.get-color-tokens($theme, primary)
|
|
55
|
+
);
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
&.mat-warn {
|
|
58
59
|
@include token-utils.create-token-values(
|
|
59
60
|
tokens-mdc-checkbox.$prefix,
|
|
60
|
-
tokens-mdc-checkbox.get-color-tokens($theme, warn)
|
|
61
|
+
tokens-mdc-checkbox.get-color-tokens($theme, warn)
|
|
62
|
+
);
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -103,22 +105,26 @@
|
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
|
|
106
|
-
///
|
|
107
|
-
|
|
108
|
-
@
|
|
109
|
-
@include token-utils.batch-create-token-values(
|
|
110
|
-
$tokens,
|
|
108
|
+
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
109
|
+
@function _define-overrides() {
|
|
110
|
+
@return (
|
|
111
111
|
(
|
|
112
|
-
|
|
112
|
+
namespace: tokens-mat-checkbox.$prefix,
|
|
113
113
|
tokens: tokens-mat-checkbox.get-token-slots(),
|
|
114
114
|
),
|
|
115
115
|
(
|
|
116
|
-
|
|
116
|
+
namespace: tokens-mdc-checkbox.$prefix,
|
|
117
117
|
tokens: tokens-mdc-checkbox.get-token-slots(),
|
|
118
|
-
)
|
|
118
|
+
),
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
/// Outputs the CSS variable values for the given tokens.
|
|
123
|
+
/// @param {Map} $tokens The token values to emit.
|
|
124
|
+
@mixin overrides($tokens: ()) {
|
|
125
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides()...);
|
|
126
|
+
}
|
|
127
|
+
|
|
122
128
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-checkbox.
|
|
123
129
|
/// @param {Map} $theme The theme to generate styles for.
|
|
124
130
|
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|