@angular/material 17.0.0-rc.0 → 17.0.0-rc.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 +1 -1
- package/button/_button-base.scss +37 -18
- package/button/_button-theme.scss +86 -142
- package/button/_fab-theme.scss +21 -49
- package/button/_icon-button-theme.scss +25 -43
- package/button/index.d.ts +0 -2
- package/chips/index.d.ts +2 -3
- package/core/index.d.ts +2 -3
- package/core/theming/_theming.scss +0 -14
- package/core/tokens/m2/mat/_fab.scss +87 -0
- package/core/tokens/m2/mat/_filled-button.scss +76 -0
- package/core/tokens/m2/mat/_icon-button.scss +73 -0
- package/core/tokens/m2/mat/_outlined-button.scss +73 -0
- package/core/tokens/m2/mat/_protected-button.scss +76 -0
- package/core/tokens/m2/mat/_sort.scss +60 -0
- package/core/tokens/m2/mat/_text-button.scss +73 -0
- package/core/tokens/m2/mat/_tree.scss +62 -0
- package/core/tokens/m2/mdc/_extended-fab.scss +3 -0
- package/core/tokens/m2/mdc/_fab.scss +17 -3
- package/core/tokens/m2/mdc/_filled-button.scss +24 -18
- package/core/tokens/m2/mdc/_icon-button.scss +16 -6
- package/core/tokens/m2/mdc/_outlined-button.scss +120 -0
- package/core/tokens/m2/mdc/_protected-button.scss +24 -19
- package/dialog/index.d.ts +2 -1
- package/divider/_divider-theme.scss +4 -1
- package/esm2022/autocomplete/autocomplete-origin.mjs +4 -4
- package/esm2022/autocomplete/autocomplete-trigger.mjs +4 -4
- package/esm2022/autocomplete/autocomplete.mjs +4 -4
- package/esm2022/autocomplete/module.mjs +5 -5
- package/esm2022/badge/badge-module.mjs +5 -5
- package/esm2022/badge/badge.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
- package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
- package/esm2022/button/button-base.mjs +19 -24
- package/esm2022/button/button.mjs +9 -9
- package/esm2022/button/fab.mjs +17 -17
- package/esm2022/button/icon-button.mjs +9 -9
- package/esm2022/button/module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle.mjs +8 -8
- package/esm2022/card/card.mjs +43 -43
- package/esm2022/card/module.mjs +5 -5
- package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
- package/esm2022/checkbox/checkbox.mjs +5 -5
- package/esm2022/checkbox/module.mjs +9 -9
- package/esm2022/chips/chip-action.mjs +4 -4
- package/esm2022/chips/chip-edit-input.mjs +4 -4
- package/esm2022/chips/chip-grid.mjs +4 -4
- package/esm2022/chips/chip-icons.mjs +10 -10
- package/esm2022/chips/chip-input.mjs +4 -4
- package/esm2022/chips/chip-listbox.mjs +4 -4
- package/esm2022/chips/chip-option.mjs +7 -8
- package/esm2022/chips/chip-row.mjs +8 -9
- package/esm2022/chips/chip-set.mjs +4 -4
- package/esm2022/chips/chip.mjs +6 -7
- package/esm2022/chips/module.mjs +8 -9
- package/esm2022/core/common-behaviors/common-module.mjs +5 -5
- package/esm2022/core/datetime/index.mjs +9 -9
- package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
- package/esm2022/core/error/error-options.mjs +7 -7
- package/esm2022/core/line/line.mjs +8 -8
- package/esm2022/core/option/index.mjs +6 -7
- package/esm2022/core/option/optgroup.mjs +4 -4
- package/esm2022/core/option/option.mjs +8 -9
- package/esm2022/core/private/ripple-loader.mjs +4 -4
- package/esm2022/core/ripple/index.mjs +5 -5
- package/esm2022/core/ripple/ripple.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +5 -5
- package/esm2022/datepicker/calendar.mjs +13 -14
- package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
- package/esm2022/datepicker/date-range-input.mjs +4 -4
- package/esm2022/datepicker/date-range-picker.mjs +4 -4
- package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
- package/esm2022/datepicker/date-selection-model.mjs +10 -10
- package/esm2022/datepicker/datepicker-actions.mjs +10 -10
- package/esm2022/datepicker/datepicker-base.mjs +7 -7
- package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
- package/esm2022/datepicker/datepicker-input.mjs +4 -4
- package/esm2022/datepicker/datepicker-intl.mjs +4 -4
- package/esm2022/datepicker/datepicker-module.mjs +5 -5
- package/esm2022/datepicker/datepicker-toggle.mjs +9 -10
- package/esm2022/datepicker/datepicker.mjs +4 -4
- package/esm2022/datepicker/month-view.mjs +6 -7
- package/esm2022/datepicker/multi-year-view.mjs +4 -4
- package/esm2022/datepicker/year-view.mjs +4 -4
- package/esm2022/dialog/dialog-container.mjs +4 -4
- package/esm2022/dialog/dialog-content-directives.mjs +13 -13
- package/esm2022/dialog/dialog.mjs +4 -4
- package/esm2022/dialog/module.mjs +5 -5
- package/esm2022/divider/divider-module.mjs +5 -5
- package/esm2022/divider/divider.mjs +5 -5
- package/esm2022/expansion/accordion.mjs +4 -4
- package/esm2022/expansion/expansion-module.mjs +7 -8
- package/esm2022/expansion/expansion-panel-content.mjs +4 -4
- package/esm2022/expansion/expansion-panel-header.mjs +11 -12
- package/esm2022/expansion/expansion-panel.mjs +7 -7
- package/esm2022/form-field/directives/error.mjs +4 -4
- package/esm2022/form-field/directives/floating-label.mjs +4 -4
- package/esm2022/form-field/directives/hint.mjs +4 -4
- package/esm2022/form-field/directives/label.mjs +4 -4
- package/esm2022/form-field/directives/line-ripple.mjs +4 -4
- package/esm2022/form-field/directives/notched-outline.mjs +4 -4
- package/esm2022/form-field/directives/prefix.mjs +4 -4
- package/esm2022/form-field/directives/suffix.mjs +4 -4
- package/esm2022/form-field/form-field-control.mjs +4 -4
- package/esm2022/form-field/form-field.mjs +6 -6
- package/esm2022/form-field/module.mjs +5 -5
- package/esm2022/grid-list/grid-list-module.mjs +5 -5
- package/esm2022/grid-list/grid-list.mjs +4 -4
- package/esm2022/grid-list/grid-tile.mjs +16 -16
- package/esm2022/icon/icon-module.mjs +5 -5
- package/esm2022/icon/icon-registry.mjs +4 -4
- package/esm2022/icon/icon.mjs +4 -4
- package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
- package/esm2022/input/input.mjs +4 -4
- package/esm2022/input/module.mjs +5 -5
- package/esm2022/list/action-list.mjs +4 -4
- package/esm2022/list/list-base.mjs +7 -7
- package/esm2022/list/list-item-sections.mjs +19 -19
- package/esm2022/list/list-module.mjs +5 -5
- package/esm2022/list/list-option.mjs +6 -6
- package/esm2022/list/list.mjs +7 -7
- package/esm2022/list/nav-list.mjs +4 -4
- package/esm2022/list/selection-list.mjs +4 -4
- package/esm2022/list/subheader.mjs +4 -4
- package/esm2022/menu/menu-content.mjs +4 -4
- package/esm2022/menu/menu-item.mjs +6 -7
- package/esm2022/menu/menu-trigger.mjs +4 -4
- package/esm2022/menu/menu.mjs +4 -4
- package/esm2022/menu/module.mjs +5 -5
- package/esm2022/paginator/module.mjs +6 -7
- package/esm2022/paginator/paginator-intl.mjs +4 -4
- package/esm2022/paginator/paginator.mjs +10 -11
- package/esm2022/progress-bar/module.mjs +5 -5
- package/esm2022/progress-bar/progress-bar.mjs +4 -4
- package/esm2022/progress-spinner/module.mjs +5 -5
- package/esm2022/progress-spinner/progress-spinner.mjs +4 -4
- package/esm2022/radio/module.mjs +5 -5
- package/esm2022/radio/radio.mjs +8 -8
- package/esm2022/select/module.mjs +5 -5
- package/esm2022/select/select.mjs +9 -9
- package/esm2022/sidenav/drawer.mjs +12 -13
- package/esm2022/sidenav/sidenav-module.mjs +7 -8
- package/esm2022/sidenav/sidenav.mjs +12 -13
- package/esm2022/slide-toggle/module.mjs +10 -11
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
- package/esm2022/slide-toggle/slide-toggle.mjs +5 -6
- package/esm2022/slider/module.mjs +6 -7
- package/esm2022/slider/slider-input.mjs +7 -7
- package/esm2022/slider/slider-thumb.mjs +6 -7
- package/esm2022/slider/slider.mjs +6 -7
- package/esm2022/snack-bar/module.mjs +5 -5
- package/esm2022/snack-bar/simple-snack-bar.mjs +5 -6
- package/esm2022/snack-bar/snack-bar-container.mjs +5 -5
- package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
- package/esm2022/snack-bar/snack-bar.mjs +4 -4
- package/esm2022/sort/sort-header-intl.mjs +4 -4
- package/esm2022/sort/sort-header.mjs +5 -6
- package/esm2022/sort/sort-module.mjs +6 -7
- package/esm2022/sort/sort.mjs +4 -4
- package/esm2022/stepper/step-content.mjs +4 -4
- package/esm2022/stepper/step-header.mjs +5 -5
- package/esm2022/stepper/step-label.mjs +4 -4
- package/esm2022/stepper/stepper-button.mjs +7 -7
- package/esm2022/stepper/stepper-icon.mjs +4 -4
- package/esm2022/stepper/stepper-intl.mjs +4 -4
- package/esm2022/stepper/stepper-module.mjs +5 -5
- package/esm2022/stepper/stepper.mjs +8 -8
- package/esm2022/table/cell.mjs +22 -22
- package/esm2022/table/module.mjs +5 -5
- package/esm2022/table/row.mjs +22 -22
- package/esm2022/table/table.mjs +7 -7
- package/esm2022/table/text-column.mjs +4 -4
- package/esm2022/tabs/module.mjs +5 -5
- package/esm2022/tabs/paginated-tab-header.mjs +4 -4
- package/esm2022/tabs/tab-body.mjs +7 -7
- package/esm2022/tabs/tab-content.mjs +4 -4
- package/esm2022/tabs/tab-group.mjs +6 -6
- package/esm2022/tabs/tab-header.mjs +4 -4
- package/esm2022/tabs/tab-label-wrapper.mjs +4 -4
- package/esm2022/tabs/tab-label.mjs +4 -4
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -10
- package/esm2022/tabs/tab.mjs +4 -4
- package/esm2022/toolbar/toolbar-module.mjs +5 -5
- package/esm2022/toolbar/toolbar.mjs +7 -7
- package/esm2022/tooltip/module.mjs +5 -5
- package/esm2022/tooltip/tooltip.mjs +7 -7
- package/esm2022/tree/node.mjs +10 -10
- package/esm2022/tree/outlet.mjs +4 -4
- package/esm2022/tree/padding.mjs +4 -4
- package/esm2022/tree/toggle.mjs +4 -4
- package/esm2022/tree/tree-module.mjs +5 -5
- package/esm2022/tree/tree.mjs +5 -5
- package/expansion/index.d.ts +4 -5
- package/fesm2022/autocomplete.mjs +13 -13
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +7 -7
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +11 -11
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +54 -59
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +15 -15
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +53 -54
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +59 -60
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +89 -89
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +22 -22
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +8 -8
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +29 -30
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +36 -36
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list.mjs +51 -51
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +23 -23
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +17 -19
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +11 -11
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +12 -12
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +29 -30
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +16 -18
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +22 -24
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +27 -28
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +15 -17
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +33 -33
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +42 -42
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +10 -10
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +26 -26
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +11 -1
- package/package.json +2 -2
- package/paginator/index.d.ts +4 -5
- 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/schematics/migration.json +1 -1
- package/schematics/ng-add/fonts/material-fonts.js +1 -3
- package/schematics/ng-add/fonts/material-fonts.mjs +1 -3
- 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 +1183 -455
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/schematics/ng-update/index_bundled.js +397 -2
- package/schematics/ng-update/index_bundled.js.map +4 -4
- package/sidenav/index.d.ts +3 -4
- package/slide-toggle/index.d.ts +1 -2
- package/slider/index.d.ts +1 -2
- package/sort/_sort-theme.scss +21 -23
- package/sort/index.d.ts +2 -3
- package/tree/_tree-theme.scss +13 -26
- package/button/_button-theme-private.scss +0 -67
- package/core/density/private/_compatibility.scss +0 -74
- package/tree/_tree-variables.scss +0 -14
|
@@ -8,6 +8,9 @@ $prefix: (mdc, extended-fab);
|
|
|
8
8
|
|
|
9
9
|
@function get-unthemable-tokens() {
|
|
10
10
|
@return (
|
|
11
|
+
// =============================================================================================
|
|
12
|
+
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
13
|
+
// =============================================================================================
|
|
11
14
|
container-color: null,
|
|
12
15
|
container-elevation: null,
|
|
13
16
|
container-height: null,
|
|
@@ -22,6 +22,13 @@ $ripple-target: '.mdc-fab__ripple';
|
|
|
22
22
|
container-shape: 50%,
|
|
23
23
|
icon-size: 24px,
|
|
24
24
|
|
|
25
|
+
// We don't use this token, because it doesn't set the color of any text inside the FAB.
|
|
26
|
+
// We create a custom token for it instead.
|
|
27
|
+
icon-color: null,
|
|
28
|
+
|
|
29
|
+
// =============================================================================================
|
|
30
|
+
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
31
|
+
// =============================================================================================
|
|
25
32
|
container-elevation: null,
|
|
26
33
|
container-height: null,
|
|
27
34
|
container-shadow-color: null,
|
|
@@ -56,10 +63,17 @@ $ripple-target: '.mdc-fab__ripple';
|
|
|
56
63
|
|
|
57
64
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
58
65
|
@function get-color-tokens($theme) {
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
@return (
|
|
67
|
+
// Background color of the FAB.
|
|
68
|
+
container-color: inspection.get-theme-color($theme, background, card),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
61
71
|
|
|
62
|
-
|
|
72
|
+
// Generates the mapping for the properties that change based on the FAB palette color.
|
|
73
|
+
@function private-get-color-palette-color-tokens($theme, $palette-name) {
|
|
74
|
+
@return (
|
|
75
|
+
container-color: inspection.get-theme-color($theme, $palette-name, default),
|
|
76
|
+
);
|
|
63
77
|
}
|
|
64
78
|
|
|
65
79
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../token-utils';
|
|
3
|
-
@use '../../../mdc-helpers/mdc-helpers';
|
|
4
3
|
@use '../../../style/sass-utils';
|
|
5
4
|
@use '../../../theming/inspection';
|
|
6
5
|
@use '../../../theming/theming';
|
|
6
|
+
@use '../../../mdc-helpers/mdc-helpers';
|
|
7
7
|
|
|
8
8
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
9
|
$prefix: (mdc, filled-button);
|
|
@@ -24,6 +24,9 @@ $prefix: (mdc, filled-button);
|
|
|
24
24
|
keep-touch-target: false,
|
|
25
25
|
pressed-container-elevation: 0,
|
|
26
26
|
|
|
27
|
+
// =============================================================================================
|
|
28
|
+
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
29
|
+
// =============================================================================================
|
|
27
30
|
focus-ring-color: null,
|
|
28
31
|
focus-ring-offset: null,
|
|
29
32
|
focus-state-layer-opacity: null,
|
|
@@ -43,33 +46,36 @@ $prefix: (mdc, filled-button);
|
|
|
43
46
|
with-icon-hover-icon-color: null,
|
|
44
47
|
with-icon-icon-color: null,
|
|
45
48
|
with-icon-icon-size: null,
|
|
46
|
-
with-icon-pressed-icon-color: null
|
|
49
|
+
with-icon-pressed-icon-color: null,
|
|
50
|
+
focus-state-layer-color: null,
|
|
51
|
+
hover-state-layer-color: null,
|
|
52
|
+
pressed-state-layer-color: null,
|
|
47
53
|
);
|
|
48
54
|
}
|
|
49
55
|
|
|
50
|
-
@function _on-color($theme, $palette) {
|
|
51
|
-
@if ($palette) {
|
|
52
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
53
|
-
@return if(mdc-helpers.variable-safe-contrast-tone($palette, $is-dark) == 'dark', #000, #fff);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
56
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
58
|
-
@function get-color-tokens($theme
|
|
57
|
+
@function get-color-tokens($theme) {
|
|
59
58
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
60
|
-
$primary: inspection.get-theme-color($theme, primary);
|
|
61
59
|
$surface: inspection.get-theme-color($theme, background, card);
|
|
62
|
-
$on-
|
|
63
|
-
$on-surface: _on-color($theme, $surface);
|
|
60
|
+
$on-surface: if($is-dark, #fff, #000);
|
|
64
61
|
|
|
65
62
|
@return (
|
|
66
|
-
container-color:
|
|
63
|
+
container-color: $surface,
|
|
64
|
+
label-text-color: $on-surface,
|
|
67
65
|
disabled-container-color: rgba($on-surface, 0.12),
|
|
68
66
|
disabled-label-text-color: rgba($on-surface, if($is-dark, 0.5, 0.38)),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Generates the mapping for the properties that change based on the button palette color.
|
|
71
|
+
@function private-get-color-palette-color-tokens($theme, $palette-name) {
|
|
72
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
73
|
+
$container-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
74
|
+
$contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
|
|
75
|
+
|
|
76
|
+
@return (
|
|
77
|
+
container-color: $container-color,
|
|
78
|
+
label-text-color: if($contrast-tone == 'dark', #000, #fff),
|
|
73
79
|
);
|
|
74
80
|
}
|
|
75
81
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../../../style/sass-utils';
|
|
2
|
+
@use '../../../theming/inspection';
|
|
2
3
|
@use '../../token-utils';
|
|
3
4
|
|
|
4
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -20,12 +21,7 @@ $prefix: (mdc, icon-button);
|
|
|
20
21
|
state-layer-size: 48px,
|
|
21
22
|
// MDC's icon size applied to svg and img elements inside the component
|
|
22
23
|
icon-size: 24px,
|
|
23
|
-
|
|
24
|
-
// wouldn't work on <a> tags.
|
|
25
|
-
disabled-icon-color: black,
|
|
26
|
-
// Angular version applies an opacity 1 with a color change, and this only applies with
|
|
27
|
-
// :disabled anyways.
|
|
28
|
-
disabled-icon-opacity: 0.38,
|
|
24
|
+
|
|
29
25
|
// =============================================================================================
|
|
30
26
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
31
27
|
// =============================================================================================
|
|
@@ -41,13 +37,27 @@ $prefix: (mdc, icon-button);
|
|
|
41
37
|
pressed-state-layer-opacity: null,
|
|
42
38
|
focus-ring-color: null,
|
|
43
39
|
focus-ring-offset: null,
|
|
40
|
+
|
|
41
|
+
// We use a color with an opacity to show the disabled state,
|
|
42
|
+
// instead of applying it to the entire button.
|
|
43
|
+
disabled-icon-opacity: null,
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
48
48
|
@function get-color-tokens($theme) {
|
|
49
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
50
|
+
|
|
49
51
|
@return (
|
|
50
52
|
icon-color: inherit,
|
|
53
|
+
disabled-icon-color: if($is-dark, rgba(#fff, 0.5), rgba(#000, 0.38)),
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Generates the mapping for the properties that change based on the button palette color.
|
|
58
|
+
@function private-get-color-palette-color-tokens($theme, $palette-name) {
|
|
59
|
+
@return (
|
|
60
|
+
icon-color: inspection.get-theme-color($theme, $palette-name)
|
|
51
61
|
);
|
|
52
62
|
}
|
|
53
63
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-utils';
|
|
3
|
+
@use '../../../style/sass-utils';
|
|
4
|
+
@use '../../../theming/inspection';
|
|
5
|
+
@use '../../../theming/theming';
|
|
6
|
+
@use '../../../mdc-helpers/mdc-helpers';
|
|
7
|
+
|
|
8
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
|
+
$prefix: (mdc, outlined-button);
|
|
10
|
+
|
|
11
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
12
|
+
// but may be in a future version of the theming API.
|
|
13
|
+
//
|
|
14
|
+
// Tokens that are available in MDC, but not used in Angular Material should be mapped to `null`.
|
|
15
|
+
// `null` indicates that we are intentionally choosing not to emit a slot or value for the token in
|
|
16
|
+
// our CSS.
|
|
17
|
+
@function get-unthemable-tokens() {
|
|
18
|
+
@return (
|
|
19
|
+
keep-touch-target: false,
|
|
20
|
+
|
|
21
|
+
outline-width: 1px,
|
|
22
|
+
container-shape: 4px,
|
|
23
|
+
|
|
24
|
+
// =============================================================================================
|
|
25
|
+
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
26
|
+
// =============================================================================================
|
|
27
|
+
hover-state-layer-opacity: null,
|
|
28
|
+
focus-state-layer-opacity: null,
|
|
29
|
+
pressed-state-layer-opacity: null,
|
|
30
|
+
|
|
31
|
+
focus-state-layer-color: null,
|
|
32
|
+
hover-state-layer-color: null,
|
|
33
|
+
pressed-state-layer-color: null,
|
|
34
|
+
|
|
35
|
+
hover-label-text-color: null,
|
|
36
|
+
focus-label-text-color: null,
|
|
37
|
+
pressed-label-text-color: null,
|
|
38
|
+
|
|
39
|
+
hover-outline-color: null,
|
|
40
|
+
focus-outline-color: null,
|
|
41
|
+
pressed-outline-color: null,
|
|
42
|
+
|
|
43
|
+
focus-ring-color: null,
|
|
44
|
+
focus-ring-offset: null,
|
|
45
|
+
|
|
46
|
+
with-icon-icon-size: null,
|
|
47
|
+
with-icon-icon-color: null,
|
|
48
|
+
with-icon-hover-icon-color: null,
|
|
49
|
+
with-icon-focus-icon-color: null,
|
|
50
|
+
with-icon-pressed-icon-color: null,
|
|
51
|
+
with-icon-disabled-icon-color: null,
|
|
52
|
+
|
|
53
|
+
label-text-size: null,
|
|
54
|
+
label-text-font: null,
|
|
55
|
+
label-text-weight: null,
|
|
56
|
+
label-text-tracking: null,
|
|
57
|
+
label-text-transform: null
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
62
|
+
@function get-color-tokens($theme) {
|
|
63
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
64
|
+
$surface: inspection.get-theme-color($theme, background, card);
|
|
65
|
+
$contrast-tone: mdc-helpers.variable-safe-contrast-tone($surface, $is-dark);
|
|
66
|
+
$on-surface: if($contrast-tone == 'dark', #000, #fff);
|
|
67
|
+
|
|
68
|
+
@return (
|
|
69
|
+
disabled-outline-color: rgba($on-surface, 0.12),
|
|
70
|
+
disabled-label-text-color: rgba($on-surface, if($is-dark, 0.5, 0.38)),
|
|
71
|
+
label-text-color: if($is-dark, #fff, #000),
|
|
72
|
+
outline-color: rgba($on-surface, 0.12)
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Generates the mapping for the properties that change based on the button palette color.
|
|
77
|
+
@function private-get-color-palette-color-tokens($theme, $palette-name) {
|
|
78
|
+
@return (
|
|
79
|
+
label-text-color: inspection.get-theme-color($theme, $palette-name, default),
|
|
80
|
+
|
|
81
|
+
// TODO: we shouldn't have to set this since it's the same as the non-palette version, however
|
|
82
|
+
// there are a bunch of tests internally that depend on it. We should remove this and clean
|
|
83
|
+
// up the screenshots separately.
|
|
84
|
+
outline-color: map.get(get-color-tokens($theme), outline-color),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
89
|
+
@function get-typography-tokens($theme) {
|
|
90
|
+
@return ();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
94
|
+
@function get-density-tokens($theme) {
|
|
95
|
+
$scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
|
|
96
|
+
|
|
97
|
+
@return (
|
|
98
|
+
container-height:
|
|
99
|
+
map.get(
|
|
100
|
+
(
|
|
101
|
+
0: 36px,
|
|
102
|
+
-1: 32px,
|
|
103
|
+
-2: 28px,
|
|
104
|
+
-3: 24px,
|
|
105
|
+
),
|
|
106
|
+
$scale
|
|
107
|
+
)
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
112
|
+
// This is used to create token slots.
|
|
113
|
+
@function get-token-slots() {
|
|
114
|
+
@return sass-utils.deep-merge-all(
|
|
115
|
+
get-unthemable-tokens(),
|
|
116
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
117
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
118
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
119
|
+
);
|
|
120
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../token-utils';
|
|
3
|
-
@use '../../../mdc-helpers/mdc-helpers';
|
|
4
3
|
@use '../../../style/sass-utils';
|
|
5
4
|
@use '../../../theming/inspection';
|
|
6
5
|
@use '../../../theming/theming';
|
|
6
|
+
@use '../../../mdc-helpers/mdc-helpers';
|
|
7
7
|
|
|
8
8
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
9
|
$prefix: (mdc, protected-button);
|
|
@@ -19,6 +19,9 @@ $prefix: (mdc, protected-button);
|
|
|
19
19
|
container-shape: 4px,
|
|
20
20
|
keep-touch-target: false,
|
|
21
21
|
|
|
22
|
+
// =============================================================================================
|
|
23
|
+
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
24
|
+
// =============================================================================================
|
|
22
25
|
focus-ring-color: null,
|
|
23
26
|
focus-ring-offset: null,
|
|
24
27
|
focus-state-layer-opacity: null,
|
|
@@ -43,36 +46,38 @@ $prefix: (mdc, protected-button);
|
|
|
43
46
|
with-icon-focus-icon-color: null,
|
|
44
47
|
with-icon-hover-icon-color: null,
|
|
45
48
|
with-icon-icon-color: null,
|
|
46
|
-
with-icon-pressed-icon-color: null
|
|
49
|
+
with-icon-pressed-icon-color: null,
|
|
50
|
+
focus-state-layer-color: null,
|
|
51
|
+
hover-state-layer-color: null,
|
|
52
|
+
pressed-state-layer-color: null,
|
|
47
53
|
);
|
|
48
54
|
}
|
|
49
55
|
|
|
50
|
-
@function _on-color($theme, $palette) {
|
|
51
|
-
@if ($palette) {
|
|
52
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
53
|
-
@return if(mdc-helpers.variable-safe-contrast-tone($palette, $is-dark) == 'dark', #000, #fff);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
56
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
58
|
-
@function get-color-tokens($theme
|
|
57
|
+
@function get-color-tokens($theme) {
|
|
59
58
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
60
|
-
$
|
|
61
|
-
$surface: inspection.get-theme-color($theme, background, card);
|
|
62
|
-
$on-primary: _on-color($theme, $primary);
|
|
63
|
-
$on-surface: _on-color($theme, $surface);
|
|
59
|
+
$on-surface: if($is-dark, #fff, #000);
|
|
64
60
|
|
|
65
61
|
@return (
|
|
66
|
-
container-color:
|
|
67
|
-
|
|
68
|
-
hover-state-layer-color: $on-primary,
|
|
69
|
-
pressed-state-layer-color: $on-primary,
|
|
70
|
-
label-text-color: if($on-color, $on-color, inherit),
|
|
62
|
+
container-color: inspection.get-theme-color($theme, background, card),
|
|
63
|
+
label-text-color: $on-surface,
|
|
71
64
|
disabled-container-color: rgba($on-surface, 0.12),
|
|
72
65
|
disabled-label-text-color: rgba($on-surface, if($is-dark, 0.5, 0.38))
|
|
73
66
|
);
|
|
74
67
|
}
|
|
75
68
|
|
|
69
|
+
// Generates the mapping for the properties that change based on the button palette color.
|
|
70
|
+
@function private-get-color-palette-color-tokens($theme, $palette-name) {
|
|
71
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
72
|
+
$container-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
73
|
+
$contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
|
|
74
|
+
|
|
75
|
+
@return (
|
|
76
|
+
container-color: $container-color,
|
|
77
|
+
label-text-color: if($contrast-tone == 'dark', #000, #fff),
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
76
81
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
77
82
|
@function get-typography-tokens($theme) {
|
|
78
83
|
@return ();
|
package/dialog/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ComponentFactoryResolver } from '@angular/core';
|
|
|
4
4
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
5
|
import { ComponentRef } from '@angular/core';
|
|
6
6
|
import { ComponentType } from '@angular/cdk/overlay';
|
|
7
|
+
import { Dialog } from '@angular/cdk/dialog';
|
|
7
8
|
import { DialogRef } from '@angular/cdk/dialog';
|
|
8
9
|
import { Direction } from '@angular/cdk/bidi';
|
|
9
10
|
import { ElementRef } from '@angular/core';
|
|
@@ -134,7 +135,7 @@ export declare class MatDialog implements OnDestroy {
|
|
|
134
135
|
private readonly _openDialogsAtThisLevel;
|
|
135
136
|
private readonly _afterAllClosedAtThisLevel;
|
|
136
137
|
private readonly _afterOpenedAtThisLevel;
|
|
137
|
-
|
|
138
|
+
protected _dialog: Dialog;
|
|
138
139
|
protected dialogConfigClass: typeof MatDialogConfig;
|
|
139
140
|
private readonly _dialogRefConstructor;
|
|
140
141
|
private readonly _dialogContainerType;
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
@use '../core/tokens/m2/mat/divider' as tokens-mat-divider;
|
|
6
6
|
|
|
7
7
|
@mixin base($theme) {
|
|
8
|
-
|
|
8
|
+
@include sass-utils.current-selector-or-root() {
|
|
9
|
+
@include token-utils.create-token-values(
|
|
10
|
+
tokens-mat-divider.$prefix, tokens-mat-divider.get-unthemable-tokens());
|
|
11
|
+
}
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
@mixin color($theme) {
|
|
@@ -17,14 +17,14 @@ export class MatAutocompleteOrigin {
|
|
|
17
17
|
elementRef) {
|
|
18
18
|
this.elementRef = elementRef;
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
|
21
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.0-
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
21
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.0-rc.0", type: MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], ngImport: i0 }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
|
|
24
24
|
type: Directive,
|
|
25
25
|
args: [{
|
|
26
26
|
selector: '[matAutocompleteOrigin]',
|
|
27
27
|
exportAs: 'matAutocompleteOrigin',
|
|
28
28
|
}]
|
|
29
29
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b2NvbXBsZXRlLW9yaWdpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9hdXRvY29tcGxldGUvYXV0b2NvbXBsZXRlLW9yaWdpbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQUMsU0FBUyxFQUFFLFVBQVUsRUFBQyxNQUFNLGVBQWUsQ0FBQzs7QUFFcEQ7OztHQUdHO0FBS0gsTUFBTSxPQUFPLHFCQUFxQjtJQUNoQztJQUNFLGtFQUFrRTtJQUMzRCxVQUFtQztRQUFuQyxlQUFVLEdBQVYsVUFBVSxDQUF5QjtJQUN6QyxDQUFDO21IQUpPLHFCQUFxQjt1R0FBckIscUJBQXFCOztnR0FBckIscUJBQXFCO2tCQUpqQyxTQUFTO21CQUFDO29CQUNULFFBQVEsRUFBRSx5QkFBeUI7b0JBQ25DLFFBQVEsRUFBRSx1QkFBdUI7aUJBQ2xDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbmltcG9ydCB7RGlyZWN0aXZlLCBFbGVtZW50UmVmfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuLyoqXG4gKiBEaXJlY3RpdmUgYXBwbGllZCB0byBhbiBlbGVtZW50IHRvIG1ha2UgaXQgdXNhYmxlXG4gKiBhcyBhIGNvbm5lY3Rpb24gcG9pbnQgZm9yIGFuIGF1dG9jb21wbGV0ZSBwYW5lbC5cbiAqL1xuQERpcmVjdGl2ZSh7XG4gIHNlbGVjdG9yOiAnW21hdEF1dG9jb21wbGV0ZU9yaWdpbl0nLFxuICBleHBvcnRBczogJ21hdEF1dG9jb21wbGV0ZU9yaWdpbicsXG59KVxuZXhwb3J0IGNsYXNzIE1hdEF1dG9jb21wbGV0ZU9yaWdpbiB7XG4gIGNvbnN0cnVjdG9yKFxuICAgIC8qKiBSZWZlcmVuY2UgdG8gdGhlIGVsZW1lbnQgb24gd2hpY2ggdGhlIGRpcmVjdGl2ZSBpcyBhcHBsaWVkLiAqL1xuICAgIHB1YmxpYyBlbGVtZW50UmVmOiBFbGVtZW50UmVmPEhUTUxFbGVtZW50PixcbiAgKSB7fVxufVxuIl19
|