@angular/material 17.2.0-rc.0 → 17.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +3 -20
- package/autocomplete/_autocomplete-theme.scss +3 -0
- package/badge/_badge-theme.scss +3 -0
- package/bottom-sheet/_bottom-sheet-theme.scss +3 -0
- package/button/_button-theme.scss +4 -1
- package/button/_fab-theme.scss +3 -0
- package/button/_icon-button-theme.scss +3 -0
- package/button-toggle/_button-toggle-theme.scss +3 -0
- package/card/_card-theme.scss +3 -0
- package/checkbox/_checkbox-theme.scss +3 -0
- package/chips/_chips-theme.scss +3 -0
- package/core/_core-theme.scss +3 -0
- package/core/option/_optgroup-theme.scss +3 -0
- package/core/option/_option-theme.scss +3 -0
- package/core/ripple/_ripple-theme.scss +3 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +3 -0
- package/core/style/_menu-common.scss +5 -18
- package/core/theming/_inspection.scss +1 -0
- package/core/theming/_validation.scss +5 -0
- package/core/tokens/m2/_index.scss +2 -0
- package/core/tokens/m2/mat/_datepicker.scss +10 -1
- package/core/tokens/m2/mat/_legacy-button-toggle.scss +5 -5
- package/core/tokens/m2/mat/_list.scss +44 -0
- package/core/tokens/m2/mat/_menu.scss +9 -0
- package/core/tokens/m2/mat/_paginator.scss +22 -2
- package/core/tokens/m2/mat/_select.scss +11 -1
- package/core/tokens/m2/mat/_standard-button-toggle.scss +5 -5
- package/core/tokens/m2/mat/_switch.scss +8 -0
- package/core/tokens/m2/mdc/_switch.scss +1 -1
- package/core/typography/_all-typography.scss +6 -1
- package/datepicker/_datepicker-theme.scss +9 -1
- package/dialog/_dialog-theme.scss +3 -0
- package/divider/_divider-theme.scss +3 -0
- package/esm2022/autocomplete/autocomplete-origin.mjs +3 -3
- package/esm2022/autocomplete/autocomplete-trigger.mjs +3 -3
- package/esm2022/autocomplete/autocomplete.mjs +3 -3
- package/esm2022/autocomplete/module.mjs +4 -4
- package/esm2022/badge/badge-module.mjs +4 -4
- package/esm2022/badge/badge.mjs +6 -6
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +3 -3
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet.mjs +3 -3
- package/esm2022/button/button-base.mjs +6 -6
- package/esm2022/button/button.mjs +6 -6
- package/esm2022/button/fab.mjs +12 -12
- package/esm2022/button/icon-button.mjs +6 -6
- package/esm2022/button/module.mjs +4 -4
- package/esm2022/button-toggle/button-toggle-module.mjs +4 -4
- package/esm2022/button-toggle/button-toggle.mjs +8 -8
- package/esm2022/card/card.mjs +42 -42
- package/esm2022/card/module.mjs +4 -4
- package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
- package/esm2022/checkbox/checkbox.mjs +3 -3
- package/esm2022/checkbox/module.mjs +8 -8
- package/esm2022/chips/chip-action.mjs +3 -3
- package/esm2022/chips/chip-edit-input.mjs +3 -3
- package/esm2022/chips/chip-grid.mjs +3 -3
- package/esm2022/chips/chip-icons.mjs +9 -9
- package/esm2022/chips/chip-input.mjs +3 -3
- package/esm2022/chips/chip-listbox.mjs +3 -3
- package/esm2022/chips/chip-option.mjs +3 -3
- package/esm2022/chips/chip-row.mjs +3 -3
- package/esm2022/chips/chip-set.mjs +3 -3
- package/esm2022/chips/chip.mjs +3 -3
- package/esm2022/chips/module.mjs +4 -4
- package/esm2022/core/common-behaviors/common-module.mjs +4 -4
- package/esm2022/core/datetime/index.mjs +8 -8
- package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
- package/esm2022/core/error/error-options.mjs +6 -6
- package/esm2022/core/internal-form-field/internal-form-field.mjs +3 -3
- package/esm2022/core/line/line.mjs +7 -7
- package/esm2022/core/option/index.mjs +4 -4
- package/esm2022/core/option/optgroup.mjs +3 -3
- package/esm2022/core/option/option.mjs +3 -3
- package/esm2022/core/private/ripple-loader.mjs +3 -3
- package/esm2022/core/ripple/index.mjs +4 -4
- package/esm2022/core/ripple/ripple.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +5 -5
- package/esm2022/datepicker/calendar.mjs +8 -8
- package/esm2022/datepicker/date-range-input-parts.mjs +9 -9
- package/esm2022/datepicker/date-range-input.mjs +3 -3
- package/esm2022/datepicker/date-range-picker.mjs +3 -3
- package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
- package/esm2022/datepicker/date-selection-model.mjs +9 -9
- package/esm2022/datepicker/datepicker-actions.mjs +9 -9
- package/esm2022/datepicker/datepicker-base.mjs +8 -8
- package/esm2022/datepicker/datepicker-input-base.mjs +3 -3
- package/esm2022/datepicker/datepicker-input.mjs +3 -3
- package/esm2022/datepicker/datepicker-intl.mjs +3 -3
- package/esm2022/datepicker/datepicker-module.mjs +4 -4
- package/esm2022/datepicker/datepicker-toggle.mjs +6 -6
- package/esm2022/datepicker/datepicker.mjs +3 -3
- package/esm2022/datepicker/month-view.mjs +3 -3
- package/esm2022/datepicker/multi-year-view.mjs +3 -3
- package/esm2022/datepicker/year-view.mjs +3 -3
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/dialog/dialog-content-directives.mjs +15 -15
- package/esm2022/dialog/dialog.mjs +3 -3
- package/esm2022/dialog/module.mjs +4 -4
- package/esm2022/divider/divider-module.mjs +4 -4
- package/esm2022/divider/divider.mjs +3 -3
- package/esm2022/expansion/accordion.mjs +3 -3
- package/esm2022/expansion/expansion-module.mjs +4 -4
- package/esm2022/expansion/expansion-panel-content.mjs +3 -3
- package/esm2022/expansion/expansion-panel-header.mjs +9 -9
- package/esm2022/expansion/expansion-panel.mjs +6 -6
- package/esm2022/form-field/directives/error.mjs +3 -3
- package/esm2022/form-field/directives/floating-label.mjs +3 -3
- package/esm2022/form-field/directives/hint.mjs +3 -3
- package/esm2022/form-field/directives/label.mjs +3 -3
- package/esm2022/form-field/directives/line-ripple.mjs +3 -3
- package/esm2022/form-field/directives/notched-outline.mjs +3 -3
- package/esm2022/form-field/directives/prefix.mjs +3 -3
- package/esm2022/form-field/directives/suffix.mjs +3 -3
- package/esm2022/form-field/form-field-control.mjs +3 -3
- package/esm2022/form-field/form-field.mjs +6 -6
- package/esm2022/form-field/module.mjs +4 -4
- package/esm2022/grid-list/grid-list-module.mjs +4 -4
- package/esm2022/grid-list/grid-list.mjs +3 -3
- package/esm2022/grid-list/grid-tile.mjs +15 -15
- package/esm2022/icon/icon-module.mjs +4 -4
- package/esm2022/icon/icon-registry.mjs +3 -3
- package/esm2022/icon/icon.mjs +3 -3
- package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
- package/esm2022/input/input.mjs +3 -3
- package/esm2022/input/module.mjs +4 -4
- package/esm2022/list/action-list.mjs +4 -4
- package/esm2022/list/list-base.mjs +6 -6
- package/esm2022/list/list-item-sections.mjs +18 -18
- package/esm2022/list/list-module.mjs +4 -4
- package/esm2022/list/list-option.mjs +3 -3
- package/esm2022/list/list.mjs +7 -7
- package/esm2022/list/nav-list.mjs +4 -4
- package/esm2022/list/selection-list.mjs +7 -7
- package/esm2022/list/subheader.mjs +3 -3
- package/esm2022/menu/menu-content.mjs +3 -3
- package/esm2022/menu/menu-item.mjs +3 -3
- package/esm2022/menu/menu-trigger.mjs +3 -3
- package/esm2022/menu/menu.mjs +5 -5
- package/esm2022/menu/module.mjs +4 -4
- package/esm2022/paginator/module.mjs +4 -4
- package/esm2022/paginator/paginator-intl.mjs +3 -3
- package/esm2022/paginator/paginator.mjs +5 -5
- package/esm2022/progress-bar/module.mjs +4 -4
- package/esm2022/progress-bar/progress-bar.mjs +4 -4
- package/esm2022/progress-spinner/module.mjs +4 -4
- package/esm2022/progress-spinner/progress-spinner.mjs +3 -3
- package/esm2022/radio/module.mjs +4 -4
- package/esm2022/radio/radio.mjs +6 -6
- package/esm2022/select/module.mjs +4 -4
- package/esm2022/select/select.mjs +9 -9
- package/esm2022/sidenav/drawer.mjs +9 -9
- package/esm2022/sidenav/sidenav-module.mjs +4 -4
- package/esm2022/sidenav/sidenav.mjs +9 -9
- package/esm2022/slide-toggle/module.mjs +8 -8
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +3 -3
- package/esm2022/slide-toggle/slide-toggle.mjs +6 -6
- package/esm2022/slider/module.mjs +4 -4
- package/esm2022/slider/slider-input.mjs +6 -6
- package/esm2022/slider/slider-thumb.mjs +3 -3
- package/esm2022/slider/slider.mjs +3 -3
- package/esm2022/snack-bar/module.mjs +4 -4
- package/esm2022/snack-bar/simple-snack-bar.mjs +3 -3
- package/esm2022/snack-bar/snack-bar-container.mjs +3 -3
- package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
- package/esm2022/snack-bar/snack-bar.mjs +3 -3
- package/esm2022/sort/sort-header-intl.mjs +3 -3
- package/esm2022/sort/sort-header.mjs +3 -3
- package/esm2022/sort/sort-module.mjs +4 -4
- package/esm2022/sort/sort.mjs +3 -3
- package/esm2022/stepper/step-content.mjs +3 -3
- package/esm2022/stepper/step-header.mjs +3 -3
- package/esm2022/stepper/step-label.mjs +3 -3
- package/esm2022/stepper/stepper-button.mjs +6 -6
- package/esm2022/stepper/stepper-icon.mjs +3 -3
- package/esm2022/stepper/stepper-intl.mjs +3 -3
- package/esm2022/stepper/stepper-module.mjs +4 -4
- package/esm2022/stepper/stepper.mjs +6 -6
- package/esm2022/table/cell.mjs +21 -21
- package/esm2022/table/module.mjs +4 -4
- package/esm2022/table/row.mjs +21 -21
- package/esm2022/table/table.mjs +6 -6
- package/esm2022/table/text-column.mjs +3 -3
- package/esm2022/tabs/module.mjs +4 -4
- package/esm2022/tabs/paginated-tab-header.mjs +3 -3
- package/esm2022/tabs/tab-body.mjs +6 -6
- package/esm2022/tabs/tab-content.mjs +3 -3
- package/esm2022/tabs/tab-group.mjs +3 -3
- package/esm2022/tabs/tab-header.mjs +3 -3
- package/esm2022/tabs/tab-label-wrapper.mjs +3 -3
- package/esm2022/tabs/tab-label.mjs +3 -3
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +15 -10
- package/esm2022/tabs/tab.mjs +3 -3
- package/esm2022/toolbar/toolbar-module.mjs +4 -4
- package/esm2022/toolbar/toolbar.mjs +6 -6
- package/esm2022/tooltip/module.mjs +4 -4
- package/esm2022/tooltip/tooltip.mjs +6 -6
- package/esm2022/tree/node.mjs +9 -9
- package/esm2022/tree/outlet.mjs +3 -3
- package/esm2022/tree/padding.mjs +3 -3
- package/esm2022/tree/toggle.mjs +3 -3
- package/esm2022/tree/tree-module.mjs +4 -4
- package/esm2022/tree/tree.mjs +3 -3
- package/expansion/_expansion-theme.scss +3 -0
- package/fesm2022/autocomplete.mjs +13 -13
- package/fesm2022/badge.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/button-toggle.mjs +11 -11
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +34 -34
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/checkbox.mjs +14 -14
- package/fesm2022/chips.mjs +40 -40
- package/fesm2022/core.mjs +59 -59
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +85 -85
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +25 -25
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/expansion.mjs +25 -25
- package/fesm2022/form-field.mjs +36 -36
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/list.mjs +55 -55
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +17 -17
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +11 -11
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +8 -8
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/select.mjs +12 -12
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/slide-toggle.mjs +16 -16
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/tabs.mjs +45 -40
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/tooltip.mjs +10 -10
- package/fesm2022/tree.mjs +25 -25
- package/form-field/_form-field-theme.scss +3 -0
- package/grid-list/_grid-list-theme.scss +3 -0
- package/icon/_icon-theme.scss +3 -0
- package/input/_input-theme.scss +5 -1
- package/list/_list-theme.scss +17 -3
- package/menu/_menu-theme.scss +3 -0
- package/package.json +7 -7
- package/paginator/_paginator-theme.scss +3 -7
- 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 +3 -0
- package/progress-spinner/_progress-spinner-theme.scss +3 -0
- package/radio/_radio-theme.scss +3 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/schematics/ng-generate/mdc-migration/index_bundled.js +981 -568
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/select/_select-theme.scss +3 -19
- package/sidenav/_sidenav-theme.scss +3 -0
- package/slide-toggle/_slide-toggle-theme.scss +3 -0
- package/slider/_slider-theme.scss +3 -0
- package/snack-bar/_snack-bar-theme.scss +3 -0
- package/sort/_sort-theme.scss +3 -0
- package/stepper/_stepper-theme.scss +3 -0
- package/table/_table-theme.scss +3 -0
- package/tabs/_tabs-theme.scss +3 -0
- package/toolbar/_toolbar-theme.scss +3 -0
- package/tooltip/_tooltip-theme.scss +3 -0
- package/tree/_tree-theme.scss +3 -0
package/_index.scss
CHANGED
|
@@ -20,22 +20,11 @@
|
|
|
20
20
|
@forward './core/density/private/all-density' show all-component-densities;
|
|
21
21
|
@forward './core/theming/theming' show private-check-duplicate-theme-styles,
|
|
22
22
|
private-legacy-get-theme, private-is-theme-object;
|
|
23
|
-
@forward './core/style/
|
|
24
|
-
@forward './core/style/
|
|
25
|
-
@forward './core/style/vendor-prefixes' as private-* show private-user-select,
|
|
26
|
-
private-position-sticky, private-color-adjust, private-clip-path;
|
|
27
|
-
@forward './core/theming/palette' as private-* show $private-dark-primary-text,
|
|
28
|
-
$private-dark-disabled-text;
|
|
23
|
+
@forward './core/style/private' show private-theme-elevation;
|
|
24
|
+
@forward './core/style/vendor-prefixes' as private-* show private-user-select;
|
|
29
25
|
@forward './core/style/variables' as private-* show $private-swift-ease-in-duration,
|
|
30
26
|
$private-swift-ease-in-timing-function, $private-swift-ease-out-timing-function,
|
|
31
27
|
$private-ease-in-out-curve-function, $private-swift-ease-out-duration, $private-xsmall;
|
|
32
|
-
@forward './core/typography/typography' show private-typography-to-2014-config,
|
|
33
|
-
private-typography-to-2018-config;
|
|
34
|
-
@forward './table/table-flex-styles' show private-table-flex-styles;
|
|
35
|
-
@forward './core/style/menu-common' as private-menu-common-*;
|
|
36
|
-
@forward './core/style/button-common' as private-button-common-*;
|
|
37
|
-
// The form field density mixin needs to be exposed, because the paginator depends on it.
|
|
38
|
-
@forward './form-field/form-field-theme' as private-form-field-* show private-form-field-density;
|
|
39
28
|
@forward './core/style/sass-utils' as private-*;
|
|
40
29
|
@forward './core/style/validation' as private-*;
|
|
41
30
|
|
|
@@ -143,12 +132,6 @@
|
|
|
143
132
|
@forward './tree/tree-theme' as tree-* show tree-theme, tree-color, tree-typography, tree-density,
|
|
144
133
|
tree-base;
|
|
145
134
|
|
|
146
|
-
//
|
|
147
|
-
@forward './core/mdc-helpers/mdc-helpers' as private-* show
|
|
148
|
-
private-disable-mdc-fallback-declarations, private-typography-config-level-from-mdc,
|
|
149
|
-
$private-mdc-base-styles-query, $private-mdc-base-styles-without-animation-query,
|
|
150
|
-
$private-mdc-theme-styles-query, $private-mdc-typography-styles-query;
|
|
151
|
-
|
|
152
|
-
// New theming APIs:
|
|
135
|
+
// New theming APIs
|
|
153
136
|
@forward './core/theming/inspection' show get-theme-version, get-theme-type, get-theme-color,
|
|
154
137
|
get-theme-typography, get-theme-density, theme-has, theme-remove;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
3
|
@use '../core/theming/inspection';
|
|
4
|
+
@use '../core/theming/validation';
|
|
4
5
|
@use '../core/typography/typography';
|
|
5
6
|
@use '../core/style/sass-utils';
|
|
6
7
|
@use '../core/tokens/token-utils';
|
|
@@ -75,6 +76,8 @@
|
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
@mixin _theme-from-tokens($tokens) {
|
|
79
|
+
@include validation.selector-defined(
|
|
80
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
78
81
|
@if ($tokens != ()) {
|
|
79
82
|
@include token-utils.create-token-values(
|
|
80
83
|
tokens-mat-autocomplete.$prefix, map.get($tokens, tokens-mat-autocomplete.$prefix));
|
package/badge/_badge-theme.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
3
|
@use '../core/theming/inspection';
|
|
4
|
+
@use '../core/theming/validation';
|
|
4
5
|
@use '../core/typography/typography';
|
|
5
6
|
@use '../core/tokens/m2/mat/badge' as tokens-mat-badge;
|
|
6
7
|
@use '../core/tokens/token-utils';
|
|
@@ -97,6 +98,8 @@
|
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
101
|
+
@include validation.selector-defined(
|
|
102
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
100
103
|
$mat-badge-tokens: token-utils.get-tokens-for($tokens, tokens-mat-badge.$prefix, $options...);
|
|
101
104
|
@include token-utils.create-token-values(tokens-mat-badge.$prefix, $mat-badge-tokens);
|
|
102
105
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use '../core/typography/typography';
|
|
3
3
|
@use '../core/theming/theming';
|
|
4
4
|
@use '../core/theming/inspection';
|
|
5
|
+
@use '../core/theming/validation';
|
|
5
6
|
@use '../core/style/sass-utils';
|
|
6
7
|
@use '../core/tokens/token-utils';
|
|
7
8
|
@use '../core/tokens/m2/mat/bottom-sheet' as tokens-mat-bottom-sheet;
|
|
@@ -70,6 +71,8 @@
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
@mixin _theme-from-tokens($tokens) {
|
|
74
|
+
@include validation.selector-defined(
|
|
75
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
73
76
|
@if ($tokens != ()) {
|
|
74
77
|
@include token-utils.create-token-values(
|
|
75
78
|
tokens-mat-bottom-sheet.$prefix, map.get($tokens, tokens-mat-bottom-sheet.$prefix));
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
@use '../core/theming/theming';
|
|
7
7
|
@use '../core/theming/inspection';
|
|
8
|
+
@use '../core/theming/validation';
|
|
8
9
|
@use '../core/tokens/token-utils';
|
|
9
10
|
@use '../core/typography/typography';
|
|
10
11
|
@use '../core/tokens/m2/mdc/filled-button' as tokens-mdc-filled-button;
|
|
@@ -78,6 +79,8 @@
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
82
|
+
@include validation.selector-defined(
|
|
83
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
81
84
|
$mdc-text-button-tokens:
|
|
82
85
|
token-utils.get-tokens-for($tokens, tokens-mdc-text-button.$prefix, $options...);
|
|
83
86
|
$mdc-protected-button-tokens:
|
|
@@ -112,7 +115,7 @@
|
|
|
112
115
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
113
116
|
@mixin base($theme) {
|
|
114
117
|
@if inspection.get-theme-version($theme) == 1 {
|
|
115
|
-
@include
|
|
118
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
116
119
|
}
|
|
117
120
|
@else {
|
|
118
121
|
@include sass-utils.current-selector-or-root() {
|
package/button/_fab-theme.scss
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@use '../core/style/sass-utils';
|
|
5
5
|
@use '../core/theming/theming';
|
|
6
6
|
@use '../core/theming/inspection';
|
|
7
|
+
@use '../core/theming/validation';
|
|
7
8
|
@use '../core/tokens/m2/mdc/fab' as tokens-mdc-fab;
|
|
8
9
|
@use '../core/tokens/m2/mdc/fab-small' as tokens-mdc-fab-small;
|
|
9
10
|
@use '../core/tokens/m2/mdc/extended-fab' as tokens-mdc-extended-fab;
|
|
@@ -166,6 +167,8 @@
|
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
170
|
+
@include validation.selector-defined(
|
|
171
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
169
172
|
$mdc-extended-fab-tokens: token-utils.get-tokens-for(
|
|
170
173
|
$tokens, tokens-mdc-extended-fab.$prefix, $options...);
|
|
171
174
|
$mdc-fab-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-fab.$prefix, $options...);
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
@use '../core/tokens/token-utils';
|
|
9
9
|
@use '../core/theming/theming';
|
|
10
10
|
@use '../core/theming/inspection';
|
|
11
|
+
@use '../core/theming/validation';
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
@mixin base($theme) {
|
|
@@ -141,6 +142,8 @@
|
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
@mixin _theme-from-tokens($tokens) {
|
|
145
|
+
@include validation.selector-defined(
|
|
146
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
144
147
|
@if ($tokens != ()) {
|
|
145
148
|
@include mdc-icon-button-theme.theme(map.get($tokens, tokens-mdc-icon-button.$prefix));
|
|
146
149
|
@include token-utils.create-token-values(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use '../core/theming/theming';
|
|
2
2
|
@use '../core/theming/inspection';
|
|
3
|
+
@use '../core/theming/validation';
|
|
3
4
|
@use '../core/typography/typography';
|
|
4
5
|
@use '../core/tokens/m2/mat/legacy-button-toggle' as tokens-mat-legacy-button-toggle;
|
|
5
6
|
@use '../core/tokens/m2/mat/standard-button-toggle' as tokens-mat-standard-button-toggle;
|
|
@@ -104,6 +105,8 @@
|
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
108
|
+
@include validation.selector-defined(
|
|
109
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
107
110
|
$mat-standard-button-toggle-tokens:
|
|
108
111
|
token-utils.get-tokens-for($tokens, tokens-mat-standard-button-toggle.$prefix, $options...);
|
|
109
112
|
@include token-utils.create-token-values(
|
package/card/_card-theme.scss
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use '../core/style/sass-utils';
|
|
3
3
|
@use '../core/theming/theming';
|
|
4
4
|
@use '../core/theming/inspection';
|
|
5
|
+
@use '../core/theming/validation';
|
|
5
6
|
@use '../core/typography/typography';
|
|
6
7
|
@use '../core/tokens/token-utils';
|
|
7
8
|
@use '../core/tokens/m2/mat/card' as tokens-mat-card;
|
|
@@ -108,6 +109,8 @@
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
@mixin _theme-from-tokens($tokens) {
|
|
112
|
+
@include validation.selector-defined(
|
|
113
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
111
114
|
@if ($tokens != ()) {
|
|
112
115
|
$elevated-card-tokens: map.get($tokens, tokens-mdc-elevated-card.$prefix);
|
|
113
116
|
// Work around a bug in MDC where the elevation is not resolved to an actual shadow value.
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use '../core/style/sass-utils';
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
5
|
@use '../core/theming/inspection';
|
|
6
|
+
@use '../core/theming/validation';
|
|
6
7
|
@use '../core/tokens/token-utils';
|
|
7
8
|
@use '../core/typography/typography';
|
|
8
9
|
@use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox;
|
|
@@ -117,6 +118,8 @@
|
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
121
|
+
@include validation.selector-defined(
|
|
122
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
120
123
|
$mdc-checkbox-tokens: token-utils.get-tokens-for(
|
|
121
124
|
$tokens, tokens-mdc-checkbox.$prefix, $options...);
|
|
122
125
|
// Don't pass $options here, since the mdc-form-field doesn't support color options,
|
package/chips/_chips-theme.scss
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@use '../core/tokens/token-utils';
|
|
6
6
|
@use '../core/theming/theming';
|
|
7
7
|
@use '../core/theming/inspection';
|
|
8
|
+
@use '../core/theming/validation';
|
|
8
9
|
@use '../core/typography/typography';
|
|
9
10
|
|
|
10
11
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
@@ -126,6 +127,8 @@
|
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
130
|
+
@include validation.selector-defined(
|
|
131
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
129
132
|
$mdc-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-chip.$prefix, $options...);
|
|
130
133
|
$mat-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mat-chip.$prefix, $options...);
|
|
131
134
|
@include mdc-chip-theme.theme($mdc-chip-tokens);
|
package/core/_core-theme.scss
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use './theming/theming';
|
|
2
2
|
@use './theming/inspection';
|
|
3
|
+
@use './theming/validation';
|
|
3
4
|
@use './style/private';
|
|
4
5
|
@use './ripple/ripple-theme';
|
|
5
6
|
@use './option/option-theme';
|
|
@@ -112,6 +113,8 @@
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
116
|
+
@include validation.selector-defined(
|
|
117
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
115
118
|
$mat-app-tokens: token-utils.get-tokens-for($tokens, tokens-mat-app.$prefix, $options...);
|
|
116
119
|
$mat-ripple-tokens: token-utils.get-tokens-for($tokens, tokens-mat-ripple.$prefix, $options...);
|
|
117
120
|
$mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use '../tokens/token-utils';
|
|
4
4
|
@use '../style/sass-utils';
|
|
5
5
|
@use '../theming/theming';
|
|
6
|
+
@use '../theming/validation';
|
|
6
7
|
@use '../theming/inspection';
|
|
7
8
|
@use '../typography/typography';
|
|
8
9
|
|
|
@@ -65,6 +66,8 @@
|
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
@mixin _theme-from-tokens($tokens) {
|
|
69
|
+
@include validation.selector-defined(
|
|
70
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
68
71
|
@if ($tokens != ()) {
|
|
69
72
|
@include token-utils.create-token-values(
|
|
70
73
|
tokens-mat-optgroup.$prefix, map.get($tokens, tokens-mat-optgroup.$prefix));
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use '../style/sass-utils';
|
|
4
4
|
@use '../theming/theming';
|
|
5
5
|
@use '../theming/inspection';
|
|
6
|
+
@use '../theming/validation';
|
|
6
7
|
@use '../typography/typography';
|
|
7
8
|
|
|
8
9
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
@@ -91,6 +92,8 @@
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
95
|
+
@include validation.selector-defined(
|
|
96
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
94
97
|
$mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);
|
|
95
98
|
@include token-utils.create-token-values(tokens-mat-option.$prefix, $mat-option-tokens);
|
|
96
99
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@use '../style/sass-utils';
|
|
5
5
|
@use '../theming/theming';
|
|
6
6
|
@use '../theming/inspection';
|
|
7
|
+
@use '../theming/validation';
|
|
7
8
|
|
|
8
9
|
@mixin base($theme) {
|
|
9
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
@@ -69,6 +70,8 @@
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
@mixin _theme-from-tokens($tokens) {
|
|
73
|
+
@include validation.selector-defined(
|
|
74
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
72
75
|
@if ($tokens != ()) {
|
|
73
76
|
@include token-utils.create-token-values(
|
|
74
77
|
tokens-mat-ripple.$prefix, map.get($tokens, tokens-mat-ripple.$prefix));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use '../../theming/theming';
|
|
2
2
|
@use '../../theming/inspection';
|
|
3
|
+
@use '../../theming/validation';
|
|
3
4
|
@use '../../style/sass-utils';
|
|
4
5
|
@use '../../tokens/token-utils';
|
|
5
6
|
@use '../../tokens/m2/mat/full-pseudo-checkbox' as tokens-mat-full-pseudo-checkbox;
|
|
@@ -15,6 +16,8 @@
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
19
|
+
@include validation.selector-defined(
|
|
20
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
18
21
|
$mat-full-pseudo-checkbox-tokens:
|
|
19
22
|
token-utils.get-tokens-for($tokens, tokens-mat-full-pseudo-checkbox.$prefix, $options...);
|
|
20
23
|
$mat-minimal-pseudo-checkbox-tokens:
|
|
@@ -59,29 +59,16 @@ $icon-margin: 16px !default;
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
@mixin item-submenu-
|
|
63
|
-
|
|
64
|
-
padding-right: $side-padding * 2;
|
|
65
|
-
|
|
66
|
-
[dir='rtl'] & {
|
|
67
|
-
padding-right: $side-padding;
|
|
68
|
-
padding-left: $side-padding * 2;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
@mixin item-submenu-icon($side-padding) {
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 50%;
|
|
75
|
-
right: $side-padding;
|
|
76
|
-
transform: translateY(-50%);
|
|
77
|
-
width: 5px;
|
|
62
|
+
@mixin item-submenu-icon($item-spacing, $icon-size) {
|
|
63
|
+
width: $icon-size;
|
|
78
64
|
height: 10px;
|
|
79
65
|
fill: currentColor;
|
|
66
|
+
padding-left: $item-spacing;
|
|
80
67
|
|
|
81
68
|
[dir='rtl'] & {
|
|
82
69
|
right: auto;
|
|
83
|
-
|
|
84
|
-
|
|
70
|
+
padding-right: $item-spacing;
|
|
71
|
+
padding-left: 0;
|
|
85
72
|
}
|
|
86
73
|
|
|
87
74
|
// Fix for Chromium-based browsers blending in the `currentColor` with the background.
|
|
@@ -260,6 +260,7 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
260
260
|
}
|
|
261
261
|
@else if $system == density {
|
|
262
262
|
$theme: map.deep-remove($theme, $_internals, density-scale);
|
|
263
|
+
$theme: map.deep-remove($theme, $_internals, density-tokens);
|
|
263
264
|
}
|
|
264
265
|
}
|
|
265
266
|
@return $theme;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
@use './mat/grid-list' as tokens-mat-grid-list;
|
|
22
22
|
@use './mat/icon' as tokens-mat-icon;
|
|
23
23
|
@use './mat/icon-button' as tokens-mat-icon-button;
|
|
24
|
+
@use './mat/list' as tokens-mat-list;
|
|
24
25
|
@use './mat/menu' as tokens-mat-menu;
|
|
25
26
|
@use './mat/option' as tokens-mat-option;
|
|
26
27
|
@use './mat/optgroup' as tokens-mat-optgroup;
|
|
@@ -139,6 +140,7 @@
|
|
|
139
140
|
_get-tokens-for-module($theme, tokens-mat-paginator),
|
|
140
141
|
_get-tokens-for-module($theme, tokens-mat-checkbox),
|
|
141
142
|
_get-tokens-for-module($theme, tokens-mat-full-pseudo-checkbox),
|
|
143
|
+
_get-tokens-for-module($theme, tokens-mat-list),
|
|
142
144
|
_get-tokens-for-module($theme, tokens-mat-minimal-pseudo-checkbox),
|
|
143
145
|
_get-tokens-for-module($theme, tokens-mat-protected-button),
|
|
144
146
|
_get-tokens-for-module($theme, tokens-mat-radio),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
1
2
|
@use 'sass:color';
|
|
2
3
|
@use 'sass:meta';
|
|
3
4
|
@use 'sass:math';
|
|
@@ -30,7 +31,12 @@ $private-default-overlap-color: #a8dab5;
|
|
|
30
31
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
31
32
|
// but may be in a future version of the theming API.
|
|
32
33
|
@function get-unthemable-tokens() {
|
|
33
|
-
@return (
|
|
34
|
+
@return (
|
|
35
|
+
calendar-container-shape: 4px,
|
|
36
|
+
calendar-container-touch-shape: 4px,
|
|
37
|
+
calendar-container-elevation-shadow: mdc-elevation.elevation-box-shadow(4),
|
|
38
|
+
calendar-container-touch-elevation-shadow: mdc-elevation.elevation-box-shadow(24),
|
|
39
|
+
);
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
@@ -43,6 +49,8 @@ $private-default-overlap-color: #a8dab5;
|
|
|
43
49
|
$hint-text-color: inspection.get-theme-color($theme, foreground, hint-text);
|
|
44
50
|
$preview-outline-color: $divider-color;
|
|
45
51
|
$today-disabled-outline-color: null;
|
|
52
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
53
|
+
$on-surface: if($is-dark, #fff, #000);
|
|
46
54
|
|
|
47
55
|
$primary-color: inspection.get-theme-color($theme, primary);
|
|
48
56
|
$range-tokens: get-range-color-tokens(private-get-range-background-color($primary-color));
|
|
@@ -67,6 +75,7 @@ $private-default-overlap-color: #a8dab5;
|
|
|
67
75
|
@return sass-utils.merge-all($calendar-tokens, $toggle-tokens, $range-tokens, (
|
|
68
76
|
toggle-icon-color: $inactive-icon-color,
|
|
69
77
|
calendar-body-label-text-color: $secondary-text-color,
|
|
78
|
+
calendar-period-button-text-color: $on-surface,
|
|
70
79
|
calendar-period-button-icon-color: $inactive-icon-color,
|
|
71
80
|
calendar-navigation-button-icon-color: $inactive-icon-color,
|
|
72
81
|
calendar-header-divider-color: $divider-color,
|
|
@@ -34,11 +34,11 @@ $prefix: (mat, legacy-button-toggle);
|
|
|
34
34
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
35
35
|
@function get-typography-tokens($theme) {
|
|
36
36
|
@return (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
text-
|
|
37
|
+
label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
38
|
+
label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
39
|
+
label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
40
|
+
label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
41
|
+
label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, list);
|
|
6
|
+
|
|
7
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
8
|
+
// but may be in a future version of the theming API.
|
|
9
|
+
@function get-unthemable-tokens() {
|
|
10
|
+
@return (
|
|
11
|
+
// active indicator themable with M3
|
|
12
|
+
active-indicator-color: transparent,
|
|
13
|
+
active-indicator-shape: 0,
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
18
|
+
@function get-color-tokens($theme) {
|
|
19
|
+
@return ();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
23
|
+
@function get-typography-tokens($theme) {
|
|
24
|
+
@return ();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
28
|
+
@function get-density-tokens($theme) {
|
|
29
|
+
@return (
|
|
30
|
+
list-item-leading-icon-start-space: 16px,
|
|
31
|
+
list-item-leading-icon-end-space: 32px,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
36
|
+
// This is used to create token slots.
|
|
37
|
+
@function get-token-slots() {
|
|
38
|
+
@return sass-utils.deep-merge-all(
|
|
39
|
+
get-unthemable-tokens(),
|
|
40
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
41
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
42
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -10,6 +10,14 @@ $prefix: (mat, menu);
|
|
|
10
10
|
@function get-unthemable-tokens() {
|
|
11
11
|
@return (
|
|
12
12
|
container-shape: 4px,
|
|
13
|
+
divider-bottom-spacing: 0,
|
|
14
|
+
divider-top-spacing: 0,
|
|
15
|
+
item-spacing: 16px,
|
|
16
|
+
item-icon-size: 24px,
|
|
17
|
+
item-leading-spacing: 16px,
|
|
18
|
+
item-trailing-spacing: 16px,
|
|
19
|
+
item-with-icon-leading-spacing: 16px,
|
|
20
|
+
item-with-icon-trailing-spacing: 16px,
|
|
13
21
|
);
|
|
14
22
|
}
|
|
15
23
|
|
|
@@ -26,6 +34,7 @@ $prefix: (mat, menu);
|
|
|
26
34
|
item-hover-state-layer-color: $active-state-layer-color,
|
|
27
35
|
item-focus-state-layer-color: $active-state-layer-color,
|
|
28
36
|
container-color: inspection.get-theme-color($theme, background, card),
|
|
37
|
+
divider-color: inspection.get-theme-color($theme, foreground, divider),
|
|
29
38
|
);
|
|
30
39
|
}
|
|
31
40
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
1
2
|
@use 'sass:map';
|
|
3
|
+
@use '@material/textfield' as mdc-textfield;
|
|
4
|
+
@use '@material/density' as mdc-density;
|
|
2
5
|
@use '../../token-utils';
|
|
3
6
|
@use '../../../theming/theming';
|
|
4
7
|
@use '../../../theming/inspection';
|
|
@@ -39,16 +42,33 @@ $prefix: (mat, paginator);
|
|
|
39
42
|
|
|
40
43
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
41
44
|
@function get-density-tokens($theme) {
|
|
42
|
-
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -
|
|
45
|
+
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -5);
|
|
43
46
|
$size-scale: (
|
|
44
47
|
0: 56px,
|
|
45
48
|
-1: 52px,
|
|
46
49
|
-2: 48px,
|
|
47
50
|
-3: 40px,
|
|
51
|
+
-4: 40px,
|
|
52
|
+
-5: 40px,
|
|
48
53
|
);
|
|
54
|
+
$form-field-density-scale: if($density-scale > -4, -4, $density-scale);
|
|
55
|
+
$form-field-height: mdc-density.prop-value(
|
|
56
|
+
$density-config: mdc-textfield.$density-config,
|
|
57
|
+
$density-scale: $form-field-density-scale,
|
|
58
|
+
$property-name: height,
|
|
59
|
+
);
|
|
60
|
+
// We computed the desired height of the form-field using the density configuration. The
|
|
61
|
+
// spec only describes vertical spacing/alignment in non-dense mode. This means that we
|
|
62
|
+
// cannot update the spacing to explicit numbers based on the density scale. Instead, we
|
|
63
|
+
// determine the height reduction and equally subtract it from the default `top` and `bottom`
|
|
64
|
+
// padding that is provided by the Material Design specification.
|
|
65
|
+
$form-field-vertical-deduction: math.div(mdc-textfield.$height - $form-field-height, 2);
|
|
66
|
+
$form-field-vertical-padding: 16px - $form-field-vertical-deduction;
|
|
49
67
|
|
|
50
68
|
@return (
|
|
51
|
-
container-size: map.get($size-scale, $density-scale)
|
|
69
|
+
container-size: map.get($size-scale, $density-scale),
|
|
70
|
+
form-field-container-height: $form-field-height,
|
|
71
|
+
form-field-container-vertical-padding: $form-field-vertical-padding,
|
|
52
72
|
);
|
|
53
73
|
}
|
|
54
74
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../../token-utils';
|
|
2
3
|
@use '../../../theming/inspection';
|
|
4
|
+
@use '../../../theming/theming';
|
|
3
5
|
@use '../../../style/sass-utils';
|
|
4
6
|
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
5
7
|
|
|
@@ -46,7 +48,15 @@ $prefix: (mat, select);
|
|
|
46
48
|
|
|
47
49
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
48
50
|
@function get-density-tokens($theme) {
|
|
49
|
-
|
|
51
|
+
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -2);
|
|
52
|
+
|
|
53
|
+
@return (
|
|
54
|
+
arrow-transform: map.get((
|
|
55
|
+
0: translateY(-8px),
|
|
56
|
+
-1: translateY(-8px),
|
|
57
|
+
-2: none,
|
|
58
|
+
), $density-scale),
|
|
59
|
+
);
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
@@ -52,11 +52,11 @@ $prefix: (mat, standard-button-toggle);
|
|
|
52
52
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
53
53
|
@function get-typography-tokens($theme) {
|
|
54
54
|
@return (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
text-
|
|
55
|
+
label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
56
|
+
label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
57
|
+
label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
58
|
+
label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
59
|
+
label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -8,6 +8,9 @@ $prefix: (mat, switch);
|
|
|
8
8
|
// but may be in a future version of the theming API.
|
|
9
9
|
@function get-unthemable-tokens() {
|
|
10
10
|
@return (
|
|
11
|
+
disabled-selected-handle-opacity: 0.38,
|
|
12
|
+
disabled-unselected-handle-opacity: 0.38,
|
|
13
|
+
|
|
11
14
|
unselected-handle-size: 20px,
|
|
12
15
|
selected-handle-size: 20px,
|
|
13
16
|
pressed-handle-size: 20px,
|
|
@@ -31,6 +34,11 @@ $prefix: (mat, switch);
|
|
|
31
34
|
hidden-track-opacity: 1,
|
|
32
35
|
visible-track-transition: transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1),
|
|
33
36
|
hidden-track-transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1),
|
|
37
|
+
|
|
38
|
+
track-outline-width: 1px,
|
|
39
|
+
track-outline-color: transparent,
|
|
40
|
+
disabled-unselected-track-outline-width: 1px,
|
|
41
|
+
disabled-unselected-track-outline-color: transparent,
|
|
34
42
|
);
|
|
35
43
|
}
|
|
36
44
|
|
|
@@ -18,7 +18,7 @@ $prefix: (mdc, switch);
|
|
|
18
18
|
@function get-unthemable-tokens() {
|
|
19
19
|
@return (
|
|
20
20
|
// Opacity of handle when disabled.
|
|
21
|
-
disabled-handle-opacity:
|
|
21
|
+
disabled-handle-opacity: null,
|
|
22
22
|
// Opacity of icon when disabled and selected.
|
|
23
23
|
disabled-selected-icon-opacity: 0.38,
|
|
24
24
|
// Opacity of track when disabled.
|
|
@@ -51,7 +51,12 @@
|
|
|
51
51
|
// mixin that is transitively loaded by the `all-theme` file, imports `all-typography` which
|
|
52
52
|
// would then load `all-theme` again. This ultimately results a circular dependency.
|
|
53
53
|
@include badge-theme.typography($theme);
|
|
54
|
-
|
|
54
|
+
// Historically the typography hierarchy styles were included as part of this. We maintain this
|
|
55
|
+
// behavior for M2, but from M3 forward this is not included and should be explicitly @included
|
|
56
|
+
// by the user if desired.
|
|
57
|
+
@if (inspection.get-theme-version($theme) < 1) {
|
|
58
|
+
@include typography.typography-hierarchy($theme);
|
|
59
|
+
}
|
|
55
60
|
@include bottom-sheet-theme.typography($theme);
|
|
56
61
|
@include button-toggle-theme.typography($theme);
|
|
57
62
|
@include divider-theme.typography($theme);
|