@angular/material 17.0.0-next.0 → 17.0.0-next.2
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 +3 -4
- package/autocomplete/_autocomplete-theme.scss +12 -18
- package/autocomplete/index.d.ts +15 -24
- package/badge/_badge-theme.scss +15 -27
- package/badge/index.d.ts +9 -17
- package/bottom-sheet/_bottom-sheet-theme.scss +13 -22
- package/button/_button-base.scss +3 -3
- package/button/_button-theme-private.scss +3 -2
- package/button/_button-theme.scss +18 -25
- package/button/_fab-theme.scss +31 -49
- package/button/_icon-button-theme.scss +19 -26
- package/button/index.d.ts +22 -31
- package/button-toggle/_button-toggle-theme.scss +17 -28
- package/button-toggle/index.d.ts +15 -18
- package/card/_card-theme.scss +27 -38
- package/checkbox/_checkbox-theme.scss +28 -45
- package/checkbox/index.d.ts +21 -27
- package/chips/_chips-theme.scss +18 -56
- package/core/_core-theme.scss +24 -39
- package/core/color/_all-color.scss +7 -15
- package/core/density/private/_all-density.scss +34 -39
- package/core/focus-indicators/_focus-indicators-theme.scss +6 -8
- package/core/focus-indicators/_private.scss +22 -26
- package/core/index.d.ts +7 -11
- package/core/mdc-helpers/_mdc-helpers.scss +19 -22
- package/core/option/_optgroup-theme.scss +13 -23
- package/core/option/_option-theme.scss +23 -37
- package/core/ripple/_ripple-theme.scss +6 -10
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +17 -24
- package/core/style/_form-common.scss +7 -7
- package/core/style/_private.scss +5 -7
- package/core/style/_sass-utils.scss +7 -0
- package/core/testing/index.d.ts +2 -1
- package/core/theming/_all-theme.scss +41 -41
- package/core/theming/_inspection.scss +133 -59
- package/core/theming/_m2-inspection.scss +268 -0
- package/core/theming/_theming.scss +59 -20
- package/core/tokens/m2/mat/_autocomplete.scss +5 -8
- package/core/tokens/m2/mat/_badge.scss +12 -15
- package/core/tokens/m2/mat/_bottom-sheet.scss +11 -17
- package/core/tokens/m2/mat/_card.scss +15 -21
- package/core/tokens/m2/mat/_datepicker.scss +28 -38
- package/core/tokens/m2/mat/_divider.scss +5 -8
- package/core/tokens/m2/mat/_expansion.scss +24 -28
- package/core/tokens/m2/mat/_form-field.scss +21 -25
- package/core/tokens/m2/mat/_grid-list.scss +8 -8
- package/core/tokens/m2/mat/_icon.scss +3 -3
- package/core/tokens/m2/mat/_legacy-button-toggle.scss +15 -19
- package/core/tokens/m2/mat/_menu.scss +12 -17
- package/core/tokens/m2/mat/_optgroup.scss +12 -17
- package/core/tokens/m2/mat/_option.scss +16 -28
- package/core/tokens/m2/mat/_paginator.scss +16 -18
- package/core/tokens/m2/mat/_radio.scss +7 -10
- package/core/tokens/m2/mat/_select.scss +15 -29
- package/core/tokens/m2/mat/_sidenav.scss +12 -14
- package/core/tokens/m2/mat/_slide-toggle.scss +9 -17
- package/core/tokens/m2/mat/_slider.scss +5 -5
- package/core/tokens/m2/mat/_snack-bar.scss +7 -8
- package/core/tokens/m2/mat/_standard-button-toggle.scss +23 -22
- package/core/tokens/m2/mat/_stepper.scss +30 -33
- package/core/tokens/m2/mat/_tab-header-with-background.scss +6 -8
- package/core/tokens/m2/mat/_tab-header.scss +13 -18
- package/core/tokens/m2/mat/_table.scss +19 -23
- package/core/tokens/m2/mat/_toolbar.scss +12 -16
- package/core/tokens/m2/mdc/_checkbox.scss +21 -20
- package/core/tokens/m2/mdc/_chip.scss +38 -24
- package/core/tokens/m2/mdc/_circular-progress.scss +5 -6
- package/core/tokens/m2/mdc/_dialog.scss +16 -30
- package/core/tokens/m2/mdc/_elevated-card.scss +6 -9
- package/core/tokens/m2/mdc/_extended-fab.scss +8 -17
- package/core/tokens/m2/mdc/_fab.scss +6 -7
- package/core/tokens/m2/mdc/_filled-text-field.scss +16 -22
- package/core/tokens/m2/mdc/_icon-button.scss +3 -3
- package/core/tokens/m2/mdc/_linear-progress.scss +9 -10
- package/core/tokens/m2/mdc/_list.scss +44 -42
- package/core/tokens/m2/mdc/_outlined-card.scss +7 -10
- package/core/tokens/m2/mdc/_outlined-text-field.scss +14 -20
- package/core/tokens/m2/mdc/_plain-tooltip.scss +9 -22
- package/core/tokens/m2/mdc/_radio.scss +11 -11
- package/core/tokens/m2/mdc/_slider.scss +16 -23
- package/core/tokens/m2/mdc/_snack-bar.scss +10 -23
- package/core/tokens/m2/mdc/_switch.scss +16 -19
- package/core/tokens/m2/mdc/_tab-indicator.scss +5 -8
- package/core/tokens/m2/mdc/_tab.scss +5 -4
- package/core/typography/_all-typography.scss +44 -47
- package/core/typography/_definition.scss +258 -0
- package/core/typography/_property-getters.scss +63 -0
- package/core/typography/_typography-utils.scss +9 -69
- package/core/typography/_typography.scss +38 -494
- package/core/typography/_versioning.scss +91 -0
- package/datepicker/_datepicker-theme.scss +20 -34
- package/datepicker/index.d.ts +3 -3
- package/dialog/_dialog-theme.scss +22 -23
- package/dialog/_mdc-dialog-structure-overrides.scss +12 -10
- package/dialog/index.d.ts +2 -0
- package/divider/_divider-theme.scss +12 -18
- package/esm2022/autocomplete/autocomplete-trigger.mjs +5 -17
- package/esm2022/autocomplete/autocomplete.mjs +23 -50
- package/esm2022/badge/badge.mjs +11 -29
- package/esm2022/button/button-base.mjs +32 -27
- package/esm2022/button/button.mjs +6 -6
- package/esm2022/button/fab.mjs +23 -31
- package/esm2022/button/icon-button.mjs +6 -6
- package/esm2022/button/testing/button-harness.mjs +3 -3
- package/esm2022/button-toggle/button-toggle.mjs +25 -33
- package/esm2022/checkbox/checkbox.mjs +32 -39
- package/esm2022/core/option/optgroup.mjs +10 -11
- package/esm2022/core/option/option.mjs +6 -6
- package/esm2022/core/testing/option-harness.mjs +3 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar.mjs +1 -1
- package/esm2022/datepicker/datepicker-base.mjs +2 -2
- package/esm2022/datepicker/datepicker-toggle.mjs +1 -1
- package/esm2022/datepicker/month-view.mjs +2 -2
- package/esm2022/datepicker/multi-year-view.mjs +2 -2
- package/esm2022/datepicker/year-view.mjs +2 -2
- package/esm2022/dialog/dialog-container.mjs +16 -3
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/menu/menu-item.mjs +15 -11
- package/esm2022/menu/menu.mjs +9 -22
- package/esm2022/paginator/paginator.mjs +1 -1
- package/esm2022/select/select.mjs +3 -3
- package/esm2022/slide-toggle/slide-toggle.mjs +33 -37
- package/esm2022/slider/slider-input.mjs +19 -9
- package/esm2022/slider/slider.mjs +2 -2
- package/esm2022/snack-bar/simple-snack-bar.mjs +1 -1
- package/esm2022/tabs/tab-group.mjs +3 -3
- package/expansion/_expansion-theme.scss +16 -24
- package/fesm2022/autocomplete.mjs +25 -63
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -28
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +2 -2
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +25 -32
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +59 -61
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +31 -38
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/core/testing.mjs +2 -2
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +14 -13
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +6 -6
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +15 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/menu.mjs +23 -31
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +1 -1
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/select.mjs +2 -2
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +33 -36
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +20 -10
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/tabs.mjs +2 -2
- package/fesm2022/tabs.mjs.map +1 -1
- package/form-field/_form-field-density.scss +3 -4
- package/form-field/_form-field-focus-overlay.scss +1 -1
- package/form-field/_form-field-sizing.scss +1 -1
- package/form-field/_form-field-theme.scss +24 -34
- package/grid-list/_grid-list-theme.scss +12 -19
- package/icon/_icon-theme.scss +17 -25
- package/input/_input-theme.scss +11 -23
- package/list/_list-theme.scss +27 -42
- package/menu/_menu-theme.scss +13 -22
- package/menu/index.d.ts +12 -18
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +15 -24
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +17 -24
- package/progress-spinner/_progress-spinner-theme.scss +18 -24
- package/radio/_radio-theme.scss +23 -38
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +1 -1
- package/schematics/ng-update/index_bundled.js +25 -25
- package/select/_select-theme.scss +17 -31
- package/sidenav/_sidenav-theme.scss +12 -18
- package/slide-toggle/_slide-toggle-theme.scss +23 -40
- package/slide-toggle/index.d.ts +20 -23
- package/slider/_slider-theme.scss +25 -42
- package/snack-bar/_snack-bar-theme.scss +17 -26
- package/sort/_sort-theme.scss +13 -22
- package/stepper/_stepper-theme.scss +16 -34
- package/table/_table-theme.scss +14 -25
- package/tabs/_tabs-theme.scss +31 -45
- package/toolbar/_toolbar-theme.scss +22 -31
- package/tooltip/_tooltip-theme.scss +15 -23
- package/tree/_tree-theme.scss +20 -29
- package/button-toggle/_button-toggle-variables.scss +0 -16
- package/core/typography/_typography-deprecated.scss +0 -39
- package/paginator/_paginator-variables.scss +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../../theming/
|
|
1
|
+
@use '../../theming/inspection';
|
|
2
2
|
@use '../../../button/button-theme';
|
|
3
3
|
@use '../../../button/icon-button-theme';
|
|
4
4
|
@use '../../../button/fab-theme';
|
|
@@ -30,13 +30,8 @@
|
|
|
30
30
|
@use '../../../table/table-theme';
|
|
31
31
|
|
|
32
32
|
// Includes all of the density styles.
|
|
33
|
-
@mixin all-component-densities($
|
|
34
|
-
|
|
35
|
-
// the density system, extract the density config from the theme object.
|
|
36
|
-
$config: if(theming.private-is-theme-object($config-or-theme),
|
|
37
|
-
theming.get-density-config($config-or-theme), $config-or-theme);
|
|
38
|
-
|
|
39
|
-
@if $config == null {
|
|
33
|
+
@mixin all-component-densities($theme) {
|
|
34
|
+
@if not inspection.theme-has($theme, density) {
|
|
40
35
|
@error 'No density configuration specified.';
|
|
41
36
|
}
|
|
42
37
|
|
|
@@ -45,39 +40,39 @@
|
|
|
45
40
|
// not possible as it would introduce a circular dependency for density because the `mat-core`
|
|
46
41
|
// mixin that is transitively loaded by the `all-theme` file, imports `all-density` which
|
|
47
42
|
// would then load `all-theme` again. This ultimately results a circular dependency.
|
|
48
|
-
@include form-field-theme.density($
|
|
49
|
-
@include card-theme.density($
|
|
50
|
-
@include progress-bar-theme.density($
|
|
51
|
-
@include progress-spinner-theme.density($
|
|
52
|
-
@include tooltip-theme.density($
|
|
53
|
-
@include input-theme.density($
|
|
54
|
-
@include core-theme.density($
|
|
55
|
-
@include select-theme.density($
|
|
56
|
-
@include checkbox-theme.density($
|
|
57
|
-
@include autocomplete-theme.density($
|
|
58
|
-
@include dialog-theme.density($
|
|
59
|
-
@include chips-theme.density($
|
|
60
|
-
@include slide-toggle-theme.density($
|
|
61
|
-
@include radio-theme.density($
|
|
62
|
-
@include slider-theme.density($
|
|
63
|
-
@include menu-theme.density($
|
|
64
|
-
@include list-theme.density($
|
|
65
|
-
@include paginator-theme.density($
|
|
66
|
-
@include tabs-theme.density($
|
|
67
|
-
@include snack-bar-theme.density($
|
|
68
|
-
@include button-theme.density($
|
|
69
|
-
@include icon-button-theme.density($
|
|
70
|
-
@include fab-theme.density($
|
|
71
|
-
@include table-theme.density($
|
|
72
|
-
@include expansion-theme.density($
|
|
73
|
-
@include stepper-theme.density($
|
|
74
|
-
@include toolbar-theme.density($
|
|
75
|
-
@include tree-theme.density($
|
|
76
|
-
@include button-toggle-theme.density($
|
|
43
|
+
@include form-field-theme.density($theme);
|
|
44
|
+
@include card-theme.density($theme);
|
|
45
|
+
@include progress-bar-theme.density($theme);
|
|
46
|
+
@include progress-spinner-theme.density($theme);
|
|
47
|
+
@include tooltip-theme.density($theme);
|
|
48
|
+
@include input-theme.density($theme);
|
|
49
|
+
@include core-theme.density($theme);
|
|
50
|
+
@include select-theme.density($theme);
|
|
51
|
+
@include checkbox-theme.density($theme);
|
|
52
|
+
@include autocomplete-theme.density($theme);
|
|
53
|
+
@include dialog-theme.density($theme);
|
|
54
|
+
@include chips-theme.density($theme);
|
|
55
|
+
@include slide-toggle-theme.density($theme);
|
|
56
|
+
@include radio-theme.density($theme);
|
|
57
|
+
@include slider-theme.density($theme);
|
|
58
|
+
@include menu-theme.density($theme);
|
|
59
|
+
@include list-theme.density($theme);
|
|
60
|
+
@include paginator-theme.density($theme);
|
|
61
|
+
@include tabs-theme.density($theme);
|
|
62
|
+
@include snack-bar-theme.density($theme);
|
|
63
|
+
@include button-theme.density($theme);
|
|
64
|
+
@include icon-button-theme.density($theme);
|
|
65
|
+
@include fab-theme.density($theme);
|
|
66
|
+
@include table-theme.density($theme);
|
|
67
|
+
@include expansion-theme.density($theme);
|
|
68
|
+
@include stepper-theme.density($theme);
|
|
69
|
+
@include toolbar-theme.density($theme);
|
|
70
|
+
@include tree-theme.density($theme);
|
|
71
|
+
@include button-toggle-theme.density($theme);
|
|
77
72
|
}
|
|
78
73
|
|
|
79
74
|
|
|
80
75
|
// @deprecated Use `all-component-densities`.
|
|
81
|
-
@mixin angular-material-density($
|
|
82
|
-
@include all-component-densities($
|
|
76
|
+
@mixin angular-material-density($theme) {
|
|
77
|
+
@include all-component-densities($theme);
|
|
83
78
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
@use './private';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
@
|
|
5
|
-
@include private.strong-focus-indicators-color($
|
|
6
|
-
@include private.mdc-strong-focus-indicators-color($config-or-theme-or-color);
|
|
3
|
+
@mixin color($theme) {
|
|
4
|
+
@include private.strong-focus-indicators-color($theme);
|
|
5
|
+
@include private.mdc-strong-focus-indicators-color($theme);
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
@
|
|
11
|
-
@include private.strong-focus-indicators-theme($theme
|
|
12
|
-
@include private.mdc-strong-focus-indicators-theme($theme-or-color-config-or-color);
|
|
8
|
+
@mixin theme($theme) {
|
|
9
|
+
@include private.strong-focus-indicators-theme($theme);
|
|
10
|
+
@include private.mdc-strong-focus-indicators-theme($theme);
|
|
13
11
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use '@angular/cdk';
|
|
4
4
|
@use '../style/layout-common';
|
|
5
5
|
@use '../theming/theming';
|
|
6
|
+
@use '../theming/inspection';
|
|
6
7
|
|
|
7
8
|
// Private sass variables that will be used as reference throughout component stylesheets.
|
|
8
9
|
$default-border-width: 3px;
|
|
@@ -113,65 +114,60 @@ $default-border-radius: 4px;
|
|
|
113
114
|
@include customize-focus-indicators($config, 'mat-mdc');
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
@mixin strong-focus-indicators-color($
|
|
117
|
-
@if meta.type-of($
|
|
117
|
+
@mixin strong-focus-indicators-color($theme-or-color) {
|
|
118
|
+
@if meta.type-of($theme-or-color) == 'color' {
|
|
118
119
|
@include customize-focus-indicators((
|
|
119
|
-
border-color: $
|
|
120
|
+
border-color: $theme-or-color
|
|
120
121
|
), 'mat');
|
|
121
122
|
}
|
|
122
123
|
@else {
|
|
123
|
-
$
|
|
124
|
-
$border-color: theming.get-color-from-palette(map.get($config, primary));
|
|
124
|
+
$border-color: inspection.get-theme-color($theme-or-color, primary);
|
|
125
125
|
@include customize-focus-indicators((
|
|
126
126
|
border-color: $border-color
|
|
127
127
|
), 'mat');
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
@mixin strong-focus-indicators-theme($theme-or-color
|
|
132
|
-
@if meta.type-of($theme-or-color
|
|
131
|
+
@mixin strong-focus-indicators-theme($theme-or-color) {
|
|
132
|
+
@if meta.type-of($theme-or-color) == 'color' {
|
|
133
133
|
@include customize-focus-indicators((
|
|
134
|
-
border-color: $theme-or-color
|
|
134
|
+
border-color: $theme-or-color
|
|
135
135
|
), 'mat');
|
|
136
136
|
}
|
|
137
137
|
@else {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
@if $color != null {
|
|
142
|
-
@include strong-focus-indicators-color($color);
|
|
138
|
+
@include theming.private-check-duplicate-theme-styles($theme-or-color, 'mat-focus-indicators') {
|
|
139
|
+
@if inspection.theme-has($theme-or-color, color) {
|
|
140
|
+
@include strong-focus-indicators-color($theme-or-color);
|
|
143
141
|
}
|
|
144
142
|
}
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
145
|
|
|
148
|
-
@mixin mdc-strong-focus-indicators-color($
|
|
149
|
-
@if meta.type-of($
|
|
146
|
+
@mixin mdc-strong-focus-indicators-color($theme-or-color) {
|
|
147
|
+
@if meta.type-of($theme-or-color) == 'color' {
|
|
150
148
|
@include customize-focus-indicators((
|
|
151
|
-
border-color: $
|
|
149
|
+
border-color: $theme-or-color
|
|
152
150
|
), 'mat-mdc');
|
|
153
151
|
}
|
|
154
152
|
@else {
|
|
155
|
-
$
|
|
156
|
-
$border-color: theming.get-color-from-palette(map.get($config, primary));
|
|
153
|
+
$border-color: inspection.get-theme-color($theme-or-color, primary);
|
|
157
154
|
@include customize-focus-indicators((
|
|
158
155
|
border-color: $border-color
|
|
159
156
|
), 'mat-mdc');
|
|
160
157
|
}
|
|
161
158
|
}
|
|
162
159
|
|
|
163
|
-
@mixin mdc-strong-focus-indicators-theme($theme-or-color
|
|
164
|
-
@if meta.type-of($theme-or-color
|
|
160
|
+
@mixin mdc-strong-focus-indicators-theme($theme-or-color) {
|
|
161
|
+
@if meta.type-of($theme-or-color) == 'color' {
|
|
165
162
|
@include customize-focus-indicators((
|
|
166
|
-
border-color: $theme-or-color
|
|
163
|
+
border-color: $theme-or-color
|
|
167
164
|
), 'mat-mdc');
|
|
168
165
|
}
|
|
169
166
|
@else {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
@include mdc-strong-focus-indicators-color($color);
|
|
167
|
+
@include theming.private-check-duplicate-theme-styles(
|
|
168
|
+
$theme-or-color, 'mat-mdc-focus-indicators') {
|
|
169
|
+
@if inspection.theme-has($theme-or-color, color) {
|
|
170
|
+
@include mdc-strong-focus-indicators-color($theme-or-color);
|
|
175
171
|
}
|
|
176
172
|
}
|
|
177
173
|
}
|
package/core/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { _AbstractConstructor as _AbstractConstructor_2 } from '@angular/material/core';
|
|
2
1
|
import { AbstractControl } from '@angular/forms';
|
|
3
2
|
import { AfterViewChecked } from '@angular/core';
|
|
4
|
-
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
3
|
import { ChangeDetectorRef } from '@angular/core';
|
|
6
|
-
import { _Constructor as _Constructor_2 } from '@angular/material/core';
|
|
7
4
|
import { ElementRef } from '@angular/core';
|
|
8
5
|
import { EventEmitter } from '@angular/core';
|
|
9
6
|
import { FocusableOption } from '@angular/cdk/a11y';
|
|
@@ -529,23 +526,21 @@ export declare class MatNativeDateModule {
|
|
|
529
526
|
/**
|
|
530
527
|
* Component that is used to group instances of `mat-option`.
|
|
531
528
|
*/
|
|
532
|
-
export declare class MatOptgroup
|
|
529
|
+
export declare class MatOptgroup {
|
|
533
530
|
/** Label for the option group. */
|
|
534
531
|
label: string;
|
|
532
|
+
/** whether the option group is disabled. */
|
|
533
|
+
disabled: boolean;
|
|
535
534
|
/** Unique id for the underlying label. */
|
|
536
535
|
_labelId: string;
|
|
537
536
|
/** Whether the group is in inert a11y mode. */
|
|
538
537
|
_inert: boolean;
|
|
539
538
|
constructor(parent?: MatOptionParentComponent);
|
|
540
539
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatOptgroup, [{ optional: true; }]>;
|
|
541
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatOptgroup, "mat-optgroup", ["matOptgroup"], { "
|
|
540
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatOptgroup, "mat-optgroup", ["matOptgroup"], { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*", "mat-option, ng-container"], false, never>;
|
|
541
|
+
static ngAcceptInputType_disabled: unknown;
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
/** @docs-private */
|
|
545
|
-
declare const _MatOptgroupMixinBase: _Constructor_2<CanDisable> & _AbstractConstructor_2<CanDisable> & {
|
|
546
|
-
new (): {};
|
|
547
|
-
};
|
|
548
|
-
|
|
549
544
|
/**
|
|
550
545
|
* Single option inside of a `<mat-select>` element.
|
|
551
546
|
*/
|
|
@@ -568,7 +563,7 @@ export declare class MatOption<T = any> implements FocusableOption, AfterViewChe
|
|
|
568
563
|
id: string;
|
|
569
564
|
/** Whether the option is disabled. */
|
|
570
565
|
get disabled(): boolean;
|
|
571
|
-
set disabled(value:
|
|
566
|
+
set disabled(value: boolean);
|
|
572
567
|
/** Whether ripples for the option are disabled. */
|
|
573
568
|
get disableRipple(): boolean;
|
|
574
569
|
/** Whether to display checkmark for single-selection. */
|
|
@@ -629,6 +624,7 @@ export declare class MatOption<T = any> implements FocusableOption, AfterViewChe
|
|
|
629
624
|
private _emitSelectionChangeEvent;
|
|
630
625
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatOption<any>, [null, null, { optional: true; }, { optional: true; }]>;
|
|
631
626
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatOption<any>, "mat-option", ["matOption"], { "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, never, ["mat-icon", "*"], false, never>;
|
|
627
|
+
static ngAcceptInputType_disabled: unknown;
|
|
632
628
|
}
|
|
633
629
|
|
|
634
630
|
export declare class MatOptionModule {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// TODO(mmalerba): this file should be split into separate cohesive partials for things like
|
|
2
2
|
// "theming", "typography", "core".
|
|
3
|
-
|
|
4
|
-
@use '../theming/theming';
|
|
3
|
+
@use '../theming/inspection';
|
|
5
4
|
@use '../typography/typography';
|
|
6
|
-
@use '../typography/typography-utils';
|
|
7
5
|
@use '@material/feature-targeting' as mdc-feature-targeting;
|
|
8
6
|
@use '@material/typography' as mdc-typography;
|
|
9
7
|
@use '@material/theme/theme-color' as mdc-theme-color;
|
|
@@ -36,7 +34,7 @@ $mat-typography-mdc-level-mappings: (
|
|
|
36
34
|
);
|
|
37
35
|
|
|
38
36
|
// Converts an Angular Material typography level config to an MDC one.
|
|
39
|
-
@function typography-level-config-to-mdc($
|
|
37
|
+
@function typography-level-config-to-mdc($theme, $mat-level) {
|
|
40
38
|
$mdc-level: map.get($mat-typography-mdc-level-mappings, $mat-level);
|
|
41
39
|
|
|
42
40
|
$result-with-nulls: map.merge(
|
|
@@ -49,11 +47,11 @@ $mat-typography-mdc-level-mappings: (
|
|
|
49
47
|
)),
|
|
50
48
|
if($mat-level,
|
|
51
49
|
(
|
|
52
|
-
font-size:
|
|
53
|
-
line-height:
|
|
54
|
-
font-weight:
|
|
55
|
-
letter-spacing:
|
|
56
|
-
font-family:
|
|
50
|
+
font-size: inspection.get-theme-typography($theme, $mat-level, font-size),
|
|
51
|
+
line-height: inspection.get-theme-typography($theme, $mat-level, line-height),
|
|
52
|
+
font-weight: inspection.get-theme-typography($theme, $mat-level, font-weight),
|
|
53
|
+
letter-spacing: inspection.get-theme-typography($theme, $mat-level, letter-spacing),
|
|
54
|
+
font-family: inspection.get-theme-typography($theme, $mat-level, font-family),
|
|
57
55
|
// Angular Material doesn't use text-transform, so disable it.
|
|
58
56
|
text-transform: none,
|
|
59
57
|
),
|
|
@@ -71,13 +69,13 @@ $mat-typography-mdc-level-mappings: (
|
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
// Converts an Angular Material typography config to an MDC one.
|
|
74
|
-
@function typography-config-to-mdc($
|
|
72
|
+
@function typography-config-to-mdc($theme) {
|
|
75
73
|
$mdc-config: ();
|
|
76
74
|
|
|
77
75
|
@each $mat-level, $mdc-level in $mat-typography-mdc-level-mappings {
|
|
78
76
|
$mdc-config: map.merge(
|
|
79
77
|
$mdc-config,
|
|
80
|
-
($mdc-level: typography-level-config-to-mdc($
|
|
78
|
+
($mdc-level: typography-level-config-to-mdc($theme, $mat-level)));
|
|
81
79
|
}
|
|
82
80
|
|
|
83
81
|
@return $mdc-config;
|
|
@@ -100,12 +98,11 @@ $mat-typography-mdc-level-mappings: (
|
|
|
100
98
|
|
|
101
99
|
// Configures MDC's global variables to reflect the given theme, applies the given styles,
|
|
102
100
|
// then resets the global variables to prevent unintended side effects.
|
|
103
|
-
@mixin using-mdc-theme($
|
|
104
|
-
$primary:
|
|
105
|
-
$accent:
|
|
106
|
-
$warn:
|
|
107
|
-
$
|
|
108
|
-
$is-dark: map.get($config, is-dark);
|
|
101
|
+
@mixin using-mdc-theme($theme) {
|
|
102
|
+
$primary: inspection.get-theme-color($theme, primary);
|
|
103
|
+
$accent: inspection.get-theme-color($theme, accent);
|
|
104
|
+
$warn: inspection.get-theme-color($theme, warn);
|
|
105
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
109
106
|
|
|
110
107
|
// Save the original values.
|
|
111
108
|
$orig-primary: mdc-theme-color.$primary;
|
|
@@ -126,8 +123,8 @@ $mat-typography-mdc-level-mappings: (
|
|
|
126
123
|
mdc-theme-color.$secondary: $accent;
|
|
127
124
|
mdc-theme-color.$on-secondary:
|
|
128
125
|
if(variable-safe-contrast-tone(mdc-theme-color.$secondary, $is-dark) == 'dark', #000, #fff);
|
|
129
|
-
mdc-theme-color.$background:
|
|
130
|
-
mdc-theme-color.$surface:
|
|
126
|
+
mdc-theme-color.$background: inspection.get-theme-color($theme, background, background);
|
|
127
|
+
mdc-theme-color.$surface: inspection.get-theme-color($theme, background, card);
|
|
131
128
|
mdc-theme-color.$on-surface:
|
|
132
129
|
if(variable-safe-contrast-tone(mdc-theme-color.$surface, $is-dark) == 'dark', #000, #fff);
|
|
133
130
|
mdc-theme-color.$error: $warn;
|
|
@@ -193,13 +190,13 @@ $mat-typography-mdc-level-mappings: (
|
|
|
193
190
|
|
|
194
191
|
// Configures MDC's global variables to reflect the given typography config,
|
|
195
192
|
// applies the given styles, then resets the global variables to prevent unintended side effects.
|
|
196
|
-
@mixin using-mdc-typography($
|
|
193
|
+
@mixin using-mdc-typography($theme) {
|
|
197
194
|
// Save the original values.
|
|
198
195
|
$orig-mdc-typography-styles: mdc-typography.$styles;
|
|
199
196
|
|
|
200
197
|
// Set new values based on the given Angular Material typography configuration.
|
|
201
|
-
@if $
|
|
202
|
-
mdc-typography.$styles: typography-config-to-mdc($
|
|
198
|
+
@if inspection.theme-has($theme, typography) {
|
|
199
|
+
mdc-typography.$styles: typography-config-to-mdc($theme);
|
|
203
200
|
}
|
|
204
201
|
|
|
205
202
|
// Apply given rules.
|
|
@@ -3,46 +3,36 @@
|
|
|
3
3
|
@use '../style/sass-utils';
|
|
4
4
|
|
|
5
5
|
@use '../theming/theming';
|
|
6
|
+
@use '../theming/inspection';
|
|
6
7
|
@use '../typography/typography';
|
|
7
8
|
|
|
8
|
-
@mixin color($
|
|
9
|
-
$config: theming.get-color-config($config-or-theme);
|
|
10
|
-
|
|
9
|
+
@mixin color($theme) {
|
|
11
10
|
@include sass-utils.current-selector-or-root() {
|
|
12
11
|
@include token-utils.create-token-values(tokens-mat-optgroup.$prefix,
|
|
13
|
-
tokens-mat-optgroup.get-color-tokens($
|
|
12
|
+
tokens-mat-optgroup.get-color-tokens($theme));
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
@mixin typography($
|
|
18
|
-
$config: typography.private-typography-to-2018-config(
|
|
19
|
-
theming.get-typography-config($config-or-theme));
|
|
20
|
-
|
|
16
|
+
@mixin typography($theme) {
|
|
21
17
|
@include sass-utils.current-selector-or-root() {
|
|
22
18
|
@include token-utils.create-token-values(tokens-mat-optgroup.$prefix,
|
|
23
|
-
tokens-mat-optgroup.get-typography-tokens($
|
|
19
|
+
tokens-mat-optgroup.get-typography-tokens($theme));
|
|
24
20
|
}
|
|
25
21
|
}
|
|
26
22
|
|
|
27
|
-
@mixin density($
|
|
28
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
23
|
+
@mixin density($theme) {
|
|
29
24
|
}
|
|
30
25
|
|
|
31
|
-
@mixin theme($theme
|
|
32
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
26
|
+
@mixin theme($theme) {
|
|
33
27
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-optgroup') {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
$typography: theming.get-typography-config($theme);
|
|
37
|
-
|
|
38
|
-
@if $color != null {
|
|
39
|
-
@include color($color);
|
|
28
|
+
@if inspection.theme-has($theme, color) {
|
|
29
|
+
@include color($theme);
|
|
40
30
|
}
|
|
41
|
-
@if $density
|
|
42
|
-
@include density($
|
|
31
|
+
@if inspection.theme-has($theme, density) {
|
|
32
|
+
@include density($theme);
|
|
43
33
|
}
|
|
44
|
-
@if $typography
|
|
45
|
-
@include typography($
|
|
34
|
+
@if inspection.theme-has($theme, typography) {
|
|
35
|
+
@include typography($theme);
|
|
46
36
|
}
|
|
47
37
|
}
|
|
48
38
|
}
|
|
@@ -1,62 +1,48 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '../tokens/m2/mat/option' as tokens-mat-option;
|
|
3
2
|
@use '../tokens/token-utils';
|
|
4
3
|
@use '../style/sass-utils';
|
|
5
4
|
|
|
6
5
|
@use '../theming/theming';
|
|
6
|
+
@use '../theming/inspection';
|
|
7
7
|
@use '../typography/typography';
|
|
8
|
-
@use '../mdc-helpers/mdc-helpers';
|
|
9
8
|
|
|
10
|
-
@mixin color($
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@include token-utils.create-token-values(tokens-mat-option.$prefix,
|
|
16
|
-
tokens-mat-option.get-color-tokens($config));
|
|
17
|
-
}
|
|
9
|
+
@mixin color($theme) {
|
|
10
|
+
@include sass-utils.current-selector-or-root() {
|
|
11
|
+
@include token-utils.create-token-values(tokens-mat-option.$prefix,
|
|
12
|
+
tokens-mat-option.get-color-tokens($theme));
|
|
13
|
+
}
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
.mat-accent {
|
|
16
|
+
@include token-utils.create-token-values(tokens-mat-option.$prefix,
|
|
17
|
+
tokens-mat-option.get-color-tokens($theme, accent));
|
|
18
|
+
}
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
20
|
+
.mat-warn {
|
|
21
|
+
@include token-utils.create-token-values(tokens-mat-option.$prefix,
|
|
22
|
+
tokens-mat-option.get-color-tokens($theme, warn));
|
|
28
23
|
}
|
|
29
24
|
}
|
|
30
25
|
|
|
31
|
-
@mixin typography($
|
|
32
|
-
$config: typography.private-typography-to-2018-config(
|
|
33
|
-
theming.get-typography-config($config-or-theme));
|
|
34
|
-
|
|
26
|
+
@mixin typography($theme) {
|
|
35
27
|
@include sass-utils.current-selector-or-root() {
|
|
36
28
|
@include token-utils.create-token-values(tokens-mat-option.$prefix,
|
|
37
|
-
tokens-mat-option.get-typography-tokens($
|
|
29
|
+
tokens-mat-option.get-typography-tokens($theme));
|
|
38
30
|
}
|
|
39
31
|
}
|
|
40
32
|
|
|
41
|
-
@mixin density($
|
|
42
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
33
|
+
@mixin density($theme) {
|
|
43
34
|
}
|
|
44
35
|
|
|
45
|
-
@mixin theme($theme
|
|
46
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
36
|
+
@mixin theme($theme) {
|
|
47
37
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-option') {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
$typography: theming.get-typography-config($theme);
|
|
51
|
-
|
|
52
|
-
@if $color != null {
|
|
53
|
-
@include color($color);
|
|
38
|
+
@if inspection.theme-has($theme, color) {
|
|
39
|
+
@include color($theme);
|
|
54
40
|
}
|
|
55
|
-
@if $density
|
|
56
|
-
@include density($
|
|
41
|
+
@if inspection.theme-has($theme, density) {
|
|
42
|
+
@include density($theme);
|
|
57
43
|
}
|
|
58
|
-
@if $typography
|
|
59
|
-
@include typography($
|
|
44
|
+
@if inspection.theme-has($theme, typography) {
|
|
45
|
+
@include typography($theme);
|
|
60
46
|
}
|
|
61
47
|
}
|
|
62
48
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use 'sass:meta';
|
|
3
2
|
@use '../theming/theming';
|
|
3
|
+
@use '../theming/inspection';
|
|
4
4
|
|
|
5
5
|
// Colors for the ripple elements.
|
|
6
|
-
@mixin color($
|
|
7
|
-
$
|
|
8
|
-
$foreground: map.get($config, foreground);
|
|
9
|
-
$foreground-base: map.get($foreground, base);
|
|
6
|
+
@mixin color($theme) {
|
|
7
|
+
$foreground-base: inspection.get-theme-color($theme, foreground, base);
|
|
10
8
|
$color-opacity: 0.1;
|
|
11
9
|
|
|
12
10
|
.mat-ripple-element {
|
|
@@ -22,12 +20,10 @@
|
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
@mixin theme($theme
|
|
26
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
23
|
+
@mixin theme($theme) {
|
|
27
24
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-ripple') {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@include color($color);
|
|
25
|
+
@if inspection.theme-has($theme, color) {
|
|
26
|
+
@include color($theme);
|
|
31
27
|
}
|
|
32
28
|
}
|
|
33
29
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '../../theming/theming';
|
|
2
|
+
@use '../../theming/inspection';
|
|
3
3
|
|
|
4
4
|
@mixin _psuedo-checkbox-styles-with-color($text-color, $background) {
|
|
5
5
|
.mat-pseudo-checkbox-checked,
|
|
@@ -19,15 +19,13 @@
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
@mixin color($
|
|
23
|
-
$
|
|
24
|
-
$
|
|
25
|
-
|
|
26
|
-
$
|
|
27
|
-
$
|
|
28
|
-
$
|
|
29
|
-
$background: theming.get-color-from-palette(map.get($config, background), background);
|
|
30
|
-
$secondary-text: theming.get-color-from-palette(map.get($config, foreground), secondary-text);
|
|
22
|
+
@mixin color($theme) {
|
|
23
|
+
$is-dark-theme: inspection.get-theme-type($theme) == dark;
|
|
24
|
+
$primary: inspection.get-theme-color($theme, primary);
|
|
25
|
+
$accent: inspection.get-theme-color($theme, accent);
|
|
26
|
+
$warn: inspection.get-theme-color($theme, warn);
|
|
27
|
+
$background: inspection.get-theme-color($theme, background, background);
|
|
28
|
+
$secondary-text: inspection.get-theme-color($theme, foreground, secondary-text);
|
|
31
29
|
|
|
32
30
|
// NOTE(traviskaufman): While the spec calls for translucent blacks/whites for disabled colors,
|
|
33
31
|
// this does not work well with elements layered on top of one another. To get around this we
|
|
@@ -74,25 +72,20 @@
|
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
|
|
77
|
-
@mixin typography($
|
|
75
|
+
@mixin typography($theme) {}
|
|
78
76
|
|
|
79
|
-
@mixin _density($
|
|
77
|
+
@mixin _density($theme) {}
|
|
80
78
|
|
|
81
|
-
@mixin theme($theme
|
|
82
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
79
|
+
@mixin theme($theme) {
|
|
83
80
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
$typography: theming.get-typography-config($theme);
|
|
87
|
-
|
|
88
|
-
@if $color != null {
|
|
89
|
-
@include color($color);
|
|
81
|
+
@if inspection.theme-has($theme, color) {
|
|
82
|
+
@include color($theme);
|
|
90
83
|
}
|
|
91
|
-
@if $density
|
|
92
|
-
@include _density($
|
|
84
|
+
@if inspection.theme-has($theme, density) {
|
|
85
|
+
@include _density($theme);
|
|
93
86
|
}
|
|
94
|
-
@if $typography
|
|
95
|
-
@include typography($
|
|
87
|
+
@if inspection.theme-has($theme, typography) {
|
|
88
|
+
@include typography($theme);
|
|
96
89
|
}
|
|
97
90
|
}
|
|
98
91
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '
|
|
1
|
+
@use '../theming/inspection';
|
|
2
|
+
@use './sass-utils';
|
|
3
3
|
|
|
4
4
|
// Renders a gradient for showing the dashed line when the input is disabled.
|
|
5
5
|
// Unlike using a border, a gradient allows us to adjust the spacing of the dotted line
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
// Figures out the color of the placeholder for a form control.
|
|
14
14
|
// Used primarily to prevent the various form controls from
|
|
15
15
|
// becoming out of sync since these colors aren't in a palette.
|
|
16
|
-
@function private-control-placeholder-color($
|
|
17
|
-
$
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
@function private-control-placeholder-color($theme) {
|
|
17
|
+
$is-dark-theme: inspection.get-theme-type($theme) == dark;
|
|
18
|
+
@return sass-utils.safe-color-change(
|
|
19
|
+
inspection.get-theme-color($theme, foreground, secondary-text),
|
|
20
|
+
$alpha: if($is-dark-theme, 0.5, 0.42));
|
|
21
21
|
}
|