@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
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use './definition';
|
|
3
|
+
|
|
4
|
+
// Whether a config is for the Material Design 2018 typography system.
|
|
5
|
+
@function private-typography-is-2018-config($config) {
|
|
6
|
+
@return map.get($config, headline-1) != null;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Whether a config is for the Material Design 2014 typography system.
|
|
10
|
+
@function private-typography-is-2014-config($config) {
|
|
11
|
+
@return map.get($config, headline) != null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Given a config for either the 2014 or 2018 Material Design typography system,
|
|
15
|
+
// produces a normalized typography config for the 2014 Material Design typography system.
|
|
16
|
+
// 2014 - https://material.io/archive/guidelines/style/typography.html#typography-styles
|
|
17
|
+
// 2018 - https://material.io/design/typography/the-type-system.html#type-scale
|
|
18
|
+
//
|
|
19
|
+
// Components using this function should be migrated to normalize to the 2018 style config instead.
|
|
20
|
+
// New components should not use this function.
|
|
21
|
+
@function private-typography-to-2014-config($config) {
|
|
22
|
+
@if $config == null {
|
|
23
|
+
@return null;
|
|
24
|
+
}
|
|
25
|
+
@if not private-typography-is-2014-config($config) {
|
|
26
|
+
$args: (
|
|
27
|
+
display-4: map.get($config, headline-1),
|
|
28
|
+
display-3: map.get($config, headline-2),
|
|
29
|
+
display-2: map.get($config, headline-3),
|
|
30
|
+
display-1: map.get($config, headline-4),
|
|
31
|
+
headline: map.get($config, headline-5),
|
|
32
|
+
title: map.get($config, headline-6),
|
|
33
|
+
subheading-2: map.get($config, subtitle-1),
|
|
34
|
+
subheading-1: map.get($config, subtitle-2),
|
|
35
|
+
body-2: map.get($config, body-1),
|
|
36
|
+
body-1: map.get($config, body-2),
|
|
37
|
+
button: map.get($config, button),
|
|
38
|
+
caption: map.get($config, caption),
|
|
39
|
+
font-family: map.get($config, font-family),
|
|
40
|
+
);
|
|
41
|
+
$non-null-args: ();
|
|
42
|
+
@each $key, $value in $args {
|
|
43
|
+
@if $value != null {
|
|
44
|
+
$non-null-args: map.merge($non-null-args, ($key: $value));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
@return definition.define-legacy-typography-config($non-null-args...);
|
|
48
|
+
}
|
|
49
|
+
@return $config;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Given a config for either the 2014 or 2018 Material Design typography system,
|
|
53
|
+
// produces a normalized typography config for the 2018 Material Design typography system.
|
|
54
|
+
// 2014 - https://material.io/archive/guidelines/style/typography.html#typography-styles
|
|
55
|
+
// 2018 - https://material.io/design/typography/the-type-system.html#type-scale
|
|
56
|
+
//
|
|
57
|
+
// The $force option is used to allow components to specify that they want to re-map the keys, even
|
|
58
|
+
// if the 2018 keys are already present. This allows those components to preserve the (incorrect)
|
|
59
|
+
// behavior they had previously, when they called `private-typography-to-2014-config`. Eventually we
|
|
60
|
+
// should clean this up, remove the $force option, and reconcile any screen diffs.
|
|
61
|
+
@function private-typography-to-2018-config($config, $force: false) {
|
|
62
|
+
@if $config == null {
|
|
63
|
+
@return null;
|
|
64
|
+
}
|
|
65
|
+
@if $force or not private-typography-is-2018-config($config) {
|
|
66
|
+
@return (
|
|
67
|
+
headline-1: map.get($config, display-4),
|
|
68
|
+
headline-2: map.get($config, display-3),
|
|
69
|
+
headline-3: map.get($config, display-2),
|
|
70
|
+
headline-4: map.get($config, display-1),
|
|
71
|
+
headline-5: map.get($config, headline),
|
|
72
|
+
headline-6: map.get($config, title),
|
|
73
|
+
subtitle-1: map.get($config, subheading-2),
|
|
74
|
+
font-famiy: map.get($config, font-family),
|
|
75
|
+
|
|
76
|
+
// These mappings are odd, but body-2 in the 2014 system actually looks closer to subtitle-2
|
|
77
|
+
// in the 2018 system, and subeading-1 in the 2014 system looks more like body-1 in the 2018
|
|
78
|
+
// system.
|
|
79
|
+
subtitle-2: map.get($config, body-2),
|
|
80
|
+
body-1: map.get($config, subheading-1),
|
|
81
|
+
|
|
82
|
+
body-2: map.get($config, body-1),
|
|
83
|
+
button: map.get($config, button),
|
|
84
|
+
caption: map.get($config, caption),
|
|
85
|
+
overline: if(map.get($config, overline), map.get($config, overline),
|
|
86
|
+
definition.define-typography-level(12px, 32px, 500)
|
|
87
|
+
)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
@return $config;
|
|
91
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use '../core/tokens/m2/mat/datepicker' as tokens-mat-datepicker;
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
|
+
@use '../core/theming/inspection';
|
|
5
6
|
@use '../core/tokens/token-utils';
|
|
6
7
|
@use '../core/style/sass-utils';
|
|
7
8
|
@use '../core/typography/typography';
|
|
@@ -15,60 +16,52 @@ $today-fade-amount: 0.2;
|
|
|
15
16
|
$calendar-body-font-size: 13px !default;
|
|
16
17
|
$calendar-weekday-table-font-size: 11px !default;
|
|
17
18
|
|
|
18
|
-
@mixin _calendar-color($
|
|
19
|
-
$palette-color:
|
|
19
|
+
@mixin _calendar-color($theme, $palette-name) {
|
|
20
|
+
$palette-color: inspection.get-theme-color($theme, $palette-name);
|
|
20
21
|
$range-color: tokens-mat-datepicker.private-get-range-background-color($palette-color);
|
|
21
22
|
$range-tokens: tokens-mat-datepicker.get-range-color-tokens($range-color);
|
|
22
23
|
$calendar-tokens:
|
|
23
|
-
tokens-mat-datepicker.private-get-calendar-color-palette-color-tokens($
|
|
24
|
+
tokens-mat-datepicker.private-get-calendar-color-palette-color-tokens($theme, $palette-name);
|
|
24
25
|
|
|
25
26
|
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix,
|
|
26
27
|
map.merge($calendar-tokens, $range-tokens));
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
@mixin color($
|
|
30
|
-
$config: theming.get-color-config($config-or-theme);
|
|
31
|
-
$foreground: map.get($config, foreground);
|
|
32
|
-
$background: map.get($config, background);
|
|
33
|
-
$disabled-color: theming.get-color-from-palette($foreground, disabled-text);
|
|
34
|
-
|
|
30
|
+
@mixin color($theme) {
|
|
35
31
|
@include sass-utils.current-selector-or-root() {
|
|
36
32
|
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix,
|
|
37
|
-
tokens-mat-datepicker.get-color-tokens($
|
|
33
|
+
tokens-mat-datepicker.get-color-tokens($theme));
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
.mat-datepicker-content {
|
|
41
37
|
&.mat-accent {
|
|
42
|
-
@include _calendar-color($
|
|
38
|
+
@include _calendar-color($theme, accent);
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
&.mat-warn {
|
|
46
|
-
@include _calendar-color($
|
|
42
|
+
@include _calendar-color($theme, warn);
|
|
47
43
|
}
|
|
48
44
|
}
|
|
49
45
|
|
|
50
46
|
.mat-datepicker-toggle-active {
|
|
51
47
|
&.mat-accent {
|
|
52
48
|
$accent-tokens:
|
|
53
|
-
tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens($
|
|
49
|
+
tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens($theme, accent);
|
|
54
50
|
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $accent-tokens);
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
&.mat-warn {
|
|
58
54
|
$warn-tokens:
|
|
59
|
-
tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens($
|
|
55
|
+
tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens($theme, warn);
|
|
60
56
|
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $warn-tokens);
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
60
|
|
|
65
|
-
@mixin typography($
|
|
66
|
-
$config: typography.private-typography-to-2014-config(
|
|
67
|
-
theming.get-typography-config($config-or-theme));
|
|
68
|
-
|
|
61
|
+
@mixin typography($theme) {
|
|
69
62
|
@include sass-utils.current-selector-or-root() {
|
|
70
63
|
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix,
|
|
71
|
-
tokens-mat-datepicker.get-typography-tokens($
|
|
64
|
+
tokens-mat-datepicker.get-typography-tokens($theme));
|
|
72
65
|
}
|
|
73
66
|
}
|
|
74
67
|
|
|
@@ -90,9 +83,7 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
90
83
|
}
|
|
91
84
|
}
|
|
92
85
|
|
|
93
|
-
@mixin density($
|
|
94
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
95
|
-
|
|
86
|
+
@mixin density($theme) {
|
|
96
87
|
// TODO(crisbeto): move this into the structural styles
|
|
97
88
|
// once the icon button density is switched to tokens.
|
|
98
89
|
|
|
@@ -103,21 +94,16 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
103
94
|
}
|
|
104
95
|
}
|
|
105
96
|
|
|
106
|
-
@mixin theme($theme
|
|
107
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
97
|
+
@mixin theme($theme) {
|
|
108
98
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-datepicker') {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
$typography: theming.get-typography-config($theme);
|
|
112
|
-
|
|
113
|
-
@if $color != null {
|
|
114
|
-
@include color($color);
|
|
99
|
+
@if inspection.theme-has($theme, color) {
|
|
100
|
+
@include color($theme);
|
|
115
101
|
}
|
|
116
|
-
@if $density
|
|
117
|
-
@include density($
|
|
102
|
+
@if inspection.theme-has($theme, density) {
|
|
103
|
+
@include density($theme);
|
|
118
104
|
}
|
|
119
|
-
@if $typography
|
|
120
|
-
@include typography($
|
|
105
|
+
@if inspection.theme-has($theme, typography) {
|
|
106
|
+
@include typography($theme);
|
|
121
107
|
}
|
|
122
108
|
}
|
|
123
109
|
}
|
package/datepicker/index.d.ts
CHANGED
|
@@ -1594,7 +1594,7 @@ export declare class MatMonthView<D> implements AfterContentInit, OnChanges, OnD
|
|
|
1594
1594
|
/** Handles when a new date is selected. */
|
|
1595
1595
|
_dateSelected(event: MatCalendarUserEvent<number>): void;
|
|
1596
1596
|
/**
|
|
1597
|
-
* Takes the index of a calendar body cell wrapped in
|
|
1597
|
+
* Takes the index of a calendar body cell wrapped in an event as argument. For the date that
|
|
1598
1598
|
* corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
|
|
1599
1599
|
* that date.
|
|
1600
1600
|
*
|
|
@@ -1706,7 +1706,7 @@ export declare class MatMultiYearView<D> implements AfterContentInit, OnDestroy
|
|
|
1706
1706
|
/** Handles when a new year is selected. */
|
|
1707
1707
|
_yearSelected(event: MatCalendarUserEvent<number>): void;
|
|
1708
1708
|
/**
|
|
1709
|
-
* Takes the index of a calendar body cell wrapped in
|
|
1709
|
+
* Takes the index of a calendar body cell wrapped in an event as argument. For the date that
|
|
1710
1710
|
* corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
|
|
1711
1711
|
* that date.
|
|
1712
1712
|
*
|
|
@@ -1863,7 +1863,7 @@ export declare class MatYearView<D> implements AfterContentInit, OnDestroy {
|
|
|
1863
1863
|
/** Handles when a new month is selected. */
|
|
1864
1864
|
_monthSelected(event: MatCalendarUserEvent<number>): void;
|
|
1865
1865
|
/**
|
|
1866
|
-
* Takes the index of a calendar body cell wrapped in
|
|
1866
|
+
* Takes the index of a calendar body cell wrapped in an event as argument. For the date that
|
|
1867
1867
|
* corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
|
|
1868
1868
|
* that date.
|
|
1869
1869
|
*
|
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
@use '@material/dialog/dialog-theme' as mdc-dialog-theme;
|
|
2
|
+
@use '../core/style/sass-utils';
|
|
2
3
|
@use '../core/tokens/m2/mdc/dialog' as tokens-mdc-dialog;
|
|
3
4
|
@use '../core/theming/theming';
|
|
5
|
+
@use '../core/theming/inspection';
|
|
4
6
|
@use '../core/typography/typography';
|
|
5
7
|
|
|
6
|
-
@mixin color($config-or-theme) {
|
|
7
|
-
$config: theming.get-color-config($config-or-theme);
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
@mixin base($theme) {
|
|
10
|
+
// Add default values for tokens not related to color, typography, or density.
|
|
11
|
+
@include sass-utils.current-selector-or-root() {
|
|
12
|
+
@include mdc-dialog-theme.theme(tokens-mdc-dialog.get-unthemable-tokens());
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
@mixin
|
|
15
|
-
$config: typography.private-typography-to-2018-config(
|
|
16
|
-
theming.get-typography-config($config-or-theme));
|
|
17
|
-
|
|
16
|
+
@mixin color($theme) {
|
|
18
17
|
.mat-mdc-dialog-container {
|
|
19
|
-
@include mdc-dialog-theme.theme(tokens-mdc-dialog.get-
|
|
18
|
+
@include mdc-dialog-theme.theme(tokens-mdc-dialog.get-color-tokens($theme));
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
@mixin
|
|
24
|
-
|
|
22
|
+
@mixin typography($theme) {
|
|
23
|
+
.mat-mdc-dialog-container {
|
|
24
|
+
@include mdc-dialog-theme.theme(tokens-mdc-dialog.get-typography-tokens($theme));
|
|
25
|
+
}
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
@mixin
|
|
28
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
29
|
-
@include theming.private-check-duplicate-theme-styles($theme, 'mat-dialog') {
|
|
30
|
-
$color: theming.get-color-config($theme);
|
|
31
|
-
$density: theming.get-density-config($theme);
|
|
32
|
-
$typography: theming.get-typography-config($theme);
|
|
28
|
+
@mixin density($theme) {}
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
@mixin theme($theme) {
|
|
31
|
+
@include theming.private-check-duplicate-theme-styles($theme, 'mat-dialog') {
|
|
32
|
+
@include base($theme);
|
|
33
|
+
@if inspection.theme-has($theme, color) {
|
|
34
|
+
@include color($theme);
|
|
36
35
|
}
|
|
37
|
-
@if $density
|
|
38
|
-
@include density($
|
|
36
|
+
@if inspection.theme-has($theme, density) {
|
|
37
|
+
@include density($theme);
|
|
39
38
|
}
|
|
40
|
-
@if $typography
|
|
41
|
-
@include typography($
|
|
39
|
+
@if inspection.theme-has($theme, typography) {
|
|
40
|
+
@include typography($theme);
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
}
|
|
@@ -38,19 +38,21 @@
|
|
|
38
38
|
max-width: inherit;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
// MDC by default sets the `surface` to `display: flex`. MDC does this in order to
|
|
42
|
-
// be able to make the content scrollable while locking the title and actions. This
|
|
43
|
-
// does not work in our dialog anyway because due to the content projection, arbitrary
|
|
44
|
-
// components can be immediate children of the surface and make this a noop. If only
|
|
45
|
-
// templates or DOM elements are projected, the flex display could cause unexpected
|
|
46
|
-
// alignment issues as explained in our coding standards (see `CODING_STANDARDS.md`).
|
|
47
|
-
// Additionally, the surface by default should expand based on the parent overlay
|
|
48
|
-
// boundaries (so that boundaries for the overlay config are respected). The surface
|
|
49
|
-
// by default would only expand based on its content.
|
|
50
41
|
.mdc-dialog__surface {
|
|
51
|
-
display: block;
|
|
52
42
|
width: 100%;
|
|
53
43
|
height: 100%;
|
|
54
44
|
}
|
|
55
45
|
}
|
|
46
|
+
|
|
47
|
+
// When a component is passed into the dialog, the host element interrupts
|
|
48
|
+
// the `display:flex` from affecting the dialog title, content, and
|
|
49
|
+
// actions. To fix this, we make the component host `display: contents` by
|
|
50
|
+
// marking its host with the `mat-mdc-dialog-component-host` class.
|
|
51
|
+
//
|
|
52
|
+
// Note that this problem does not exist when a template ref is used since
|
|
53
|
+
// the title, contents, and actions are then nested directly under the
|
|
54
|
+
// dialog surface.
|
|
55
|
+
.mat-mdc-dialog-component-host {
|
|
56
|
+
display: contents;
|
|
57
|
+
}
|
|
56
58
|
}
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnimationTriggerMetadata } from '@angular/animations';
|
|
2
2
|
import { CdkDialogContainer } from '@angular/cdk/dialog';
|
|
3
3
|
import { ComponentFactoryResolver } from '@angular/core';
|
|
4
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
4
5
|
import { ComponentRef } from '@angular/core';
|
|
5
6
|
import { ComponentType } from '@angular/cdk/overlay';
|
|
6
7
|
import { DialogRef } from '@angular/cdk/dialog';
|
|
@@ -365,6 +366,7 @@ export declare class MatDialogContainer extends CdkDialogContainer<MatDialogConf
|
|
|
365
366
|
*/
|
|
366
367
|
protected _openAnimationDone(totalTime: number): void;
|
|
367
368
|
ngOnDestroy(): void;
|
|
369
|
+
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
368
370
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogContainer, [null, null, { optional: true; }, null, null, null, null, { optional: true; }, null]>;
|
|
369
371
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatDialogContainer, "mat-dialog-container", never, {}, {}, never, never, false, never>;
|
|
370
372
|
}
|
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|
@use '../core/style/sass-utils';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
|
+
@use '../core/theming/inspection';
|
|
3
4
|
@use '../core/tokens/token-utils';
|
|
4
5
|
@use '../core/tokens/m2/mat/divider' as tokens-mat-divider;
|
|
5
6
|
|
|
6
|
-
@mixin color($
|
|
7
|
-
$config: theming.get-color-config($config-or-theme);
|
|
8
|
-
|
|
7
|
+
@mixin color($theme) {
|
|
9
8
|
@include sass-utils.current-selector-or-root() {
|
|
10
9
|
@include token-utils.create-token-values(tokens-mat-divider.$prefix,
|
|
11
|
-
tokens-mat-divider.get-color-tokens($
|
|
10
|
+
tokens-mat-divider.get-color-tokens($theme));
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
@mixin typography($
|
|
14
|
+
@mixin typography($theme) {}
|
|
16
15
|
|
|
17
|
-
@mixin density($
|
|
16
|
+
@mixin density($theme) {}
|
|
18
17
|
|
|
19
|
-
@mixin theme($theme
|
|
20
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
18
|
+
@mixin theme($theme) {
|
|
21
19
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-divider') {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
$typography: theming.get-typography-config($theme);
|
|
25
|
-
|
|
26
|
-
@if $color != null {
|
|
27
|
-
@include color($color);
|
|
20
|
+
@if inspection.theme-has($theme, color) {
|
|
21
|
+
@include color($theme);
|
|
28
22
|
}
|
|
29
|
-
@if $density
|
|
30
|
-
@include density($
|
|
23
|
+
@if inspection.theme-has($theme, density) {
|
|
24
|
+
@include density($theme);
|
|
31
25
|
}
|
|
32
|
-
@if $typography
|
|
33
|
-
@include typography($
|
|
26
|
+
@if inspection.theme-has($theme, typography) {
|
|
27
|
+
@include typography($theme);
|
|
34
28
|
}
|
|
35
29
|
}
|
|
36
30
|
}
|