@angular/material 17.1.0 → 17.2.0-next.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 +4 -4
- package/badge/_badge-theme.scss +30 -180
- package/badge/index.d.ts +11 -1
- package/button/_button-base.scss +50 -10
- package/button/_button-theme.scss +92 -51
- package/button/_fab-theme.scss +82 -15
- package/button/_icon-button-theme.scss +11 -4
- package/button-toggle/_button-toggle-theme.scss +26 -11
- package/checkbox/_checkbox-theme.scss +41 -23
- package/chips/_chips-theme.scss +25 -9
- package/core/_core-theme.scss +85 -38
- package/core/index.d.ts +7 -4
- package/core/mdc-helpers/_mdc-helpers.scss +0 -8
- package/core/option/_option-theme.scss +24 -10
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +64 -24
- package/core/tokens/_token-utils.scss +22 -0
- package/core/tokens/m2/_index.scss +16 -0
- package/core/tokens/m2/mat/_badge.scss +27 -1
- package/core/tokens/m2/mat/_checkbox.scss +45 -0
- package/core/tokens/m2/mat/_dialog.scss +49 -0
- package/core/tokens/m2/mat/_fab-small.scss +95 -0
- package/core/tokens/m2/mat/_fab.scss +6 -1
- package/core/tokens/m2/mat/_filled-button.scss +17 -2
- package/core/tokens/m2/mat/_form-field.scss +15 -0
- package/core/tokens/m2/mat/_icon-button.scss +6 -1
- package/core/tokens/m2/mat/_outlined-button.scss +17 -2
- package/core/tokens/m2/mat/_protected-button.scss +17 -2
- package/core/tokens/m2/mat/_radio.scss +6 -1
- package/core/tokens/m2/mat/_stepper.scss +6 -1
- package/core/tokens/m2/mat/_text-button.scss +20 -2
- package/core/tokens/m2/mdc/_extended-fab.scss +3 -2
- package/core/tokens/m2/mdc/_fab-small.scss +90 -0
- package/core/tokens/m2/mdc/_fab.scss +0 -11
- package/core/tokens/m2/mdc/_filled-text-field.scss +8 -8
- package/core/tokens/m2/mdc/_icon-button.scss +15 -7
- package/core/tokens/m2/mdc/_outlined-text-field.scss +6 -6
- package/core/tokens/m2/mdc/_switch.scss +12 -3
- package/datepicker/_datepicker-theme.scss +25 -9
- package/dialog/_dialog-theme.scss +10 -0
- package/dialog/index.d.ts +28 -9
- 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 +9 -7
- package/esm2022/badge/badge.mjs +32 -6
- package/esm2022/badge/public-api.mjs +2 -2
- 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 +7 -7
- package/esm2022/button/button.mjs +10 -11
- package/esm2022/button/fab.mjs +18 -19
- package/esm2022/button/icon-button.mjs +10 -11
- package/esm2022/button/module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle.mjs +7 -7
- 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 +7 -8
- 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 +4 -4
- package/esm2022/chips/chip-row.mjs +5 -6
- package/esm2022/chips/chip-set.mjs +4 -4
- package/esm2022/chips/chip.mjs +5 -6
- package/esm2022/chips/module.mjs +5 -5
- package/esm2022/core/common-behaviors/common-module.mjs +5 -5
- package/esm2022/core/common-behaviors/error-state.mjs +2 -4
- 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/internal-form-field/internal-form-field.mjs +4 -4
- package/esm2022/core/line/line.mjs +8 -8
- package/esm2022/core/option/index.mjs +5 -5
- package/esm2022/core/option/optgroup.mjs +4 -4
- package/esm2022/core/option/option.mjs +4 -4
- package/esm2022/core/private/ripple-loader.mjs +4 -4
- package/esm2022/core/ripple/index.mjs +5 -5
- package/esm2022/core/ripple/ripple.mjs +5 -6
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +5 -6
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +4 -4
- package/esm2022/datepicker/calendar.mjs +7 -7
- 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 +7 -7
- package/esm2022/datepicker/datepicker.mjs +4 -4
- package/esm2022/datepicker/month-view.mjs +4 -4
- package/esm2022/datepicker/multi-year-view.mjs +4 -4
- package/esm2022/datepicker/year-view.mjs +4 -4
- package/esm2022/dialog/dialog-config.mjs +1 -3
- package/esm2022/dialog/dialog-container.mjs +17 -7
- package/esm2022/dialog/dialog-content-directives.mjs +49 -31
- package/esm2022/dialog/dialog-ref.mjs +3 -1
- package/esm2022/dialog/dialog.mjs +4 -4
- package/esm2022/dialog/module.mjs +5 -5
- package/esm2022/dialog/public-api.mjs +2 -2
- package/esm2022/divider/divider-module.mjs +5 -5
- package/esm2022/divider/divider.mjs +4 -4
- package/esm2022/expansion/accordion.mjs +4 -4
- package/esm2022/expansion/expansion-module.mjs +5 -5
- package/esm2022/expansion/expansion-panel-content.mjs +4 -4
- package/esm2022/expansion/expansion-panel-header.mjs +11 -12
- package/esm2022/expansion/expansion-panel.mjs +8 -9
- 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 +7 -8
- 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 +8 -9
- package/esm2022/list/list-item-sections.mjs +19 -19
- package/esm2022/list/list-module.mjs +5 -5
- package/esm2022/list/list-option.mjs +4 -4
- package/esm2022/list/list.mjs +8 -9
- 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 +4 -4
- 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 +5 -5
- package/esm2022/paginator/paginator-intl.mjs +4 -4
- package/esm2022/paginator/paginator.mjs +4 -4
- package/esm2022/progress-bar/module.mjs +5 -5
- package/esm2022/progress-bar/progress-bar.mjs +5 -6
- package/esm2022/progress-spinner/module.mjs +5 -5
- package/esm2022/progress-spinner/progress-spinner.mjs +5 -6
- package/esm2022/radio/module.mjs +5 -5
- package/esm2022/radio/radio.mjs +9 -10
- package/esm2022/select/module.mjs +5 -5
- package/esm2022/select/select.mjs +7 -7
- package/esm2022/sidenav/drawer.mjs +11 -12
- package/esm2022/sidenav/sidenav-module.mjs +5 -5
- package/esm2022/sidenav/sidenav.mjs +10 -10
- package/esm2022/slide-toggle/module.mjs +9 -9
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
- package/esm2022/slide-toggle/slide-toggle.mjs +7 -8
- package/esm2022/slider/module.mjs +5 -5
- package/esm2022/slider/slider-input.mjs +7 -7
- package/esm2022/slider/slider-thumb.mjs +4 -4
- package/esm2022/slider/slider.mjs +5 -6
- package/esm2022/snack-bar/module.mjs +5 -5
- package/esm2022/snack-bar/simple-snack-bar.mjs +4 -4
- package/esm2022/snack-bar/snack-bar-container.mjs +4 -4
- 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 +4 -4
- package/esm2022/sort/sort-module.mjs +5 -5
- 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 +7 -7
- 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 +5 -6
- package/esm2022/tabs/tab-body.mjs +7 -7
- package/esm2022/tabs/tab-content.mjs +4 -4
- package/esm2022/tabs/tab-group.mjs +5 -6
- package/esm2022/tabs/tab-header.mjs +5 -6
- 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 +11 -12
- 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 +8 -9
- 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 +4 -4
- package/fesm2022/autocomplete.mjs +13 -13
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +38 -10
- 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 +10 -10
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +43 -44
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +17 -18
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +41 -42
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +62 -65
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +82 -82
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +74 -46
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +26 -27
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +37 -38
- 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 -52
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +16 -16
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +10 -10
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +8 -9
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +8 -9
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +12 -13
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +10 -10
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +23 -24
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +17 -18
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +17 -18
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +32 -32
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +41 -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 +11 -12
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +31 -14
- package/icon/_icon-theme.scss +2 -2
- package/package.json +7 -7
- package/paginator/_paginator-theme.scss +10 -16
- 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 +27 -9
- package/progress-spinner/_progress-spinner-theme.scss +38 -17
- package/radio/_radio-theme.scss +34 -18
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/schematics/ng-add/setup-project.js +7 -75
- package/schematics/ng-add/setup-project.mjs +7 -75
- package/schematics/ng-generate/mdc-migration/index_bundled.js +122 -115
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/select/_select-theme.scss +24 -10
- package/slide-toggle/_slide-toggle-theme.scss +36 -16
- package/slider/_slider-theme.scss +28 -11
- package/stepper/_stepper-theme.scss +28 -7
- package/tabs/_tabs-theme.scss +32 -14
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/density' as mdc-density;
|
|
3
2
|
@use '@material/textfield' as mdc-textfield;
|
|
4
3
|
@use '../core/tokens/m2/mat/select' as tokens-mat-select;
|
|
@@ -9,6 +8,9 @@
|
|
|
9
8
|
@use '../core/theming/inspection';
|
|
10
9
|
@use '../core/typography/typography';
|
|
11
10
|
|
|
11
|
+
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
12
|
+
/// for the mat-select.
|
|
13
|
+
/// @param {Map} $theme The theme to generate base styles for.
|
|
12
14
|
@mixin base($theme) {
|
|
13
15
|
@if inspection.get-theme-version($theme) == 1 {
|
|
14
16
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
@@ -16,9 +18,14 @@
|
|
|
16
18
|
@else {}
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
/// Outputs color theme styles for the mat-select.
|
|
22
|
+
/// @param {Map} $theme The theme to generate color styles for.
|
|
23
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
24
|
+
/// $color-variant: The color variant to use for the select arrow: primary, secondary, tertiary,
|
|
25
|
+
/// or error (If not specified, default primary color will be used).
|
|
26
|
+
@mixin color($theme, $options...) {
|
|
20
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
21
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
28
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
22
29
|
}
|
|
23
30
|
@else {
|
|
24
31
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -38,6 +45,8 @@
|
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
47
|
|
|
48
|
+
/// Outputs typography theme styles for the mat-select.
|
|
49
|
+
/// @param {Map} $theme The theme to generate typography styles for.
|
|
41
50
|
@mixin typography($theme) {
|
|
42
51
|
@if inspection.get-theme-version($theme) == 1 {
|
|
43
52
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
@@ -50,6 +59,8 @@
|
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
61
|
|
|
62
|
+
/// Outputs typography theme styles for the mat-select.
|
|
63
|
+
/// @param {Map} $theme The theme to generate density styles for.
|
|
53
64
|
@mixin density($theme) {
|
|
54
65
|
@if inspection.get-theme-version($theme) == 1 {
|
|
55
66
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
@@ -79,10 +90,15 @@
|
|
|
79
90
|
}
|
|
80
91
|
}
|
|
81
92
|
|
|
82
|
-
|
|
93
|
+
/// Outputs all (base, color, typography, and density) theme styles for the mat-icon.
|
|
94
|
+
/// @param {Map} $theme The theme to generate styles for.
|
|
95
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
96
|
+
/// $color-variant: The color variant to use for the select arrow: primary, secondary, tertiary,
|
|
97
|
+
/// or error (If not specified, default primary color will be used).
|
|
98
|
+
@mixin theme($theme, $options...) {
|
|
83
99
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-select') {
|
|
84
100
|
@if inspection.get-theme-version($theme) == 1 {
|
|
85
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
101
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
86
102
|
}
|
|
87
103
|
@else {
|
|
88
104
|
@include base($theme);
|
|
@@ -99,9 +115,7 @@
|
|
|
99
115
|
}
|
|
100
116
|
}
|
|
101
117
|
|
|
102
|
-
@mixin _theme-from-tokens($tokens) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
tokens-mat-select.$prefix, map.get($tokens, tokens-mat-select.$prefix));
|
|
106
|
-
}
|
|
118
|
+
@mixin _theme-from-tokens($tokens, $options...) {
|
|
119
|
+
$mat-select-tokens: token-utils.get-tokens-for($tokens, tokens-mat-select.$prefix, $options...);
|
|
120
|
+
@include token-utils.create-token-values(tokens-mat-select.$prefix, $mat-select-tokens);
|
|
107
121
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/switch/switch-theme' as mdc-switch-theme;
|
|
3
2
|
@use '@material/form-field/form-field-theme' as mdc-form-field-theme;
|
|
4
3
|
@use '../core/theming/theming';
|
|
5
4
|
@use '../core/theming/inspection';
|
|
5
|
+
@use '../core/tokens/token-utils';
|
|
6
6
|
@use '../core/typography/typography';
|
|
7
7
|
@use '../core/tokens/m2/mdc/form-field' as tokens-mdc-form-field;
|
|
8
8
|
@use '../core/tokens/m2/mdc/switch' as tokens-mdc-switch;
|
|
9
9
|
|
|
10
|
+
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
11
|
+
/// for the mat-slide-toggle.
|
|
12
|
+
/// @param {Map} $theme The theme to generate base styles for.
|
|
10
13
|
@mixin base($theme) {
|
|
11
14
|
@if inspection.get-theme-version($theme) == 1 {
|
|
12
15
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
@@ -18,9 +21,14 @@
|
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
/// Outputs color theme styles for the mat-slide-toggle.
|
|
25
|
+
/// @param {Map} $theme The theme to generate color styles for.
|
|
26
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
27
|
+
/// $color-variant: The color variant to use for the slide-toggle: primary, secondary, tertiary,
|
|
28
|
+
/// or error (If not specified, default primary color will be used).
|
|
29
|
+
@mixin color($theme, $options...) {
|
|
22
30
|
@if inspection.get-theme-version($theme) == 1 {
|
|
23
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
31
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
24
32
|
}
|
|
25
33
|
@else {
|
|
26
34
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
@@ -31,10 +39,12 @@
|
|
|
31
39
|
@include mdc-switch-theme.theme($mdc-switch-color-tokens);
|
|
32
40
|
@include mdc-form-field-theme.theme(tokens-mdc-form-field.get-color-tokens($theme));
|
|
33
41
|
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
// TODO(wagnermaciel): Use our token system to define this css variable.
|
|
43
|
+
--mdc-switch-disabled-label-text-color: #{inspection.get-theme-color(
|
|
44
|
+
$theme,
|
|
45
|
+
foreground,
|
|
46
|
+
disabled-text
|
|
47
|
+
)};
|
|
38
48
|
|
|
39
49
|
// Change the color palette related tokens to accent or warn if applicable
|
|
40
50
|
&.mat-accent {
|
|
@@ -50,6 +60,8 @@
|
|
|
50
60
|
}
|
|
51
61
|
}
|
|
52
62
|
|
|
63
|
+
/// Outputs typography theme styles for the mat-slide-toggle.
|
|
64
|
+
/// @param {Map} $theme The theme to generate typography styles for.
|
|
53
65
|
@mixin typography($theme) {
|
|
54
66
|
@if inspection.get-theme-version($theme) == 1 {
|
|
55
67
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
@@ -65,23 +77,28 @@
|
|
|
65
77
|
}
|
|
66
78
|
}
|
|
67
79
|
|
|
80
|
+
/// Outputs density theme styles for the mat-slide-toggle.
|
|
81
|
+
/// @param {Map} $theme The theme to generate density styles for.
|
|
68
82
|
@mixin density($theme) {
|
|
69
83
|
@if inspection.get-theme-version($theme) == 1 {
|
|
70
84
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
71
85
|
}
|
|
72
86
|
@else {
|
|
73
|
-
$density-scale: inspection.get-theme-density($theme);
|
|
74
|
-
|
|
75
87
|
.mat-mdc-slide-toggle {
|
|
76
|
-
@include mdc-switch-theme.theme(mdc-switch-
|
|
88
|
+
@include mdc-switch-theme.theme(tokens-mdc-switch.get-density-tokens($theme));
|
|
77
89
|
}
|
|
78
90
|
}
|
|
79
91
|
}
|
|
80
92
|
|
|
81
|
-
|
|
93
|
+
/// Outputs all (base, color, typography, and density) theme styles for the mat-icon.
|
|
94
|
+
/// @param {Map} $theme The theme to generate styles for.
|
|
95
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
96
|
+
/// $color-variant: The color variant to use for the slide-toggle: primary, secondary, tertiary,
|
|
97
|
+
/// or error (If not specified, default primary color will be used).
|
|
98
|
+
@mixin theme($theme, $options...) {
|
|
82
99
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-slide-toggle') {
|
|
83
100
|
@if inspection.get-theme-version($theme) == 1 {
|
|
84
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
101
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
85
102
|
}
|
|
86
103
|
@else {
|
|
87
104
|
@include base($theme);
|
|
@@ -98,8 +115,11 @@
|
|
|
98
115
|
}
|
|
99
116
|
}
|
|
100
117
|
|
|
101
|
-
@mixin _theme-from-tokens($tokens) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
118
|
+
@mixin _theme-from-tokens($tokens, $options...) {
|
|
119
|
+
$mdc-switch-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-switch.$prefix, $options...);
|
|
120
|
+
// Don't pass $options here, since the mdc-form-field doesn't support color options,
|
|
121
|
+
// only the mdc-switch does.
|
|
122
|
+
$mdc-form-field-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-form-field.$prefix);
|
|
123
|
+
@include mdc-switch-theme.theme($mdc-switch-tokens);
|
|
124
|
+
@include mdc-form-field-theme.theme($mdc-form-field-tokens);
|
|
105
125
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/slider/slider-theme' as mdc-slider-theme;
|
|
3
2
|
@use '../core/theming/theming';
|
|
4
3
|
@use '../core/theming/inspection';
|
|
@@ -8,6 +7,9 @@
|
|
|
8
7
|
@use '../core/tokens/m2/mat/slider' as tokens-mat-slider;
|
|
9
8
|
@use '../core/tokens/m2/mdc/slider' as tokens-mdc-slider;
|
|
10
9
|
|
|
10
|
+
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
11
|
+
/// for the mat-slider.
|
|
12
|
+
/// @param {Map} $theme The theme to generate base styles for.
|
|
11
13
|
@mixin base($theme) {
|
|
12
14
|
@if inspection.get-theme-version($theme) == 1 {
|
|
13
15
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
@@ -22,9 +24,14 @@
|
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
/// Outputs color theme styles for the mat-slider.
|
|
28
|
+
/// @param {Map} $theme The theme to generate color styles for.
|
|
29
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
30
|
+
/// $color-variant: The color variant to use for the slider: primary, secondary, tertiary,
|
|
31
|
+
/// or error (If not specified, default primary color will be used).
|
|
32
|
+
@mixin color($theme, $options...) {
|
|
26
33
|
@if inspection.get-theme-version($theme) == 1 {
|
|
27
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
34
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
28
35
|
}
|
|
29
36
|
@else {
|
|
30
37
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
@@ -66,6 +73,9 @@
|
|
|
66
73
|
}
|
|
67
74
|
}
|
|
68
75
|
|
|
76
|
+
|
|
77
|
+
/// Outputs typography theme styles for the mat-slider.
|
|
78
|
+
/// @param {Map} $theme The theme to generate typography styles for.
|
|
69
79
|
@mixin typography($theme) {
|
|
70
80
|
@if inspection.get-theme-version($theme) == 1 {
|
|
71
81
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
@@ -78,6 +88,9 @@
|
|
|
78
88
|
}
|
|
79
89
|
}
|
|
80
90
|
|
|
91
|
+
|
|
92
|
+
/// Outputs density theme styles for the mat-slider.
|
|
93
|
+
/// @param {Map} $theme The theme to generate density styles for.
|
|
81
94
|
@mixin density($theme) {
|
|
82
95
|
@if inspection.get-theme-version($theme) == 1 {
|
|
83
96
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
@@ -90,10 +103,15 @@
|
|
|
90
103
|
}
|
|
91
104
|
}
|
|
92
105
|
|
|
93
|
-
|
|
106
|
+
/// Outputs all (base, color, typography, and density) theme styles for the mat-option.
|
|
107
|
+
/// @param {Map} $theme The theme to generate styles for.
|
|
108
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
109
|
+
/// $color-variant: The color variant to use for the slider: primary, secondary, tertiary,
|
|
110
|
+
/// or error (If not specified, default primary color will be used).
|
|
111
|
+
@mixin theme($theme, $options...) {
|
|
94
112
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-slider') {
|
|
95
113
|
@if inspection.get-theme-version($theme) == 1 {
|
|
96
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
114
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
97
115
|
}
|
|
98
116
|
@else {
|
|
99
117
|
@include base($theme);
|
|
@@ -110,10 +128,9 @@
|
|
|
110
128
|
}
|
|
111
129
|
}
|
|
112
130
|
|
|
113
|
-
@mixin _theme-from-tokens($tokens) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
131
|
+
@mixin _theme-from-tokens($tokens, $options...) {
|
|
132
|
+
$mdc-slider-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-slider.$prefix, $options...);
|
|
133
|
+
$mat-slider-tokens: token-utils.get-tokens-for($tokens, tokens-mat-slider.$prefix, $options...);
|
|
134
|
+
@include mdc-slider-theme.theme($mdc-slider-tokens);
|
|
135
|
+
@include token-utils.create-token-values(tokens-mat-slider.$prefix, $mat-slider-tokens);
|
|
119
136
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '../core/theming/theming';
|
|
3
2
|
@use '../core/theming/inspection';
|
|
4
3
|
@use '../core/typography/typography';
|
|
@@ -6,6 +5,9 @@
|
|
|
6
5
|
@use '../core/tokens/token-utils';
|
|
7
6
|
@use '../core/tokens/m2/mat/stepper' as tokens-mat-stepper;
|
|
8
7
|
|
|
8
|
+
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
9
|
+
/// for mat-stepper.
|
|
10
|
+
/// @param {Map} $theme The theme to generate base styles for.
|
|
9
11
|
@mixin base($theme) {
|
|
10
12
|
@if inspection.get-theme-version($theme) == 1 {
|
|
11
13
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
@@ -13,9 +15,14 @@
|
|
|
13
15
|
@else {}
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
/// Outputs color theme styles for mat-stepper.
|
|
19
|
+
/// @param {Map} $theme The theme to generate color styles for.
|
|
20
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
21
|
+
/// $color-variant: The color variant to use for the stepper: primary, secondary,
|
|
22
|
+
/// tertiary, or error (If not specified, primary color values will be used).
|
|
23
|
+
@mixin color($theme, $options...) {
|
|
17
24
|
@if inspection.get-theme-version($theme) == 1 {
|
|
18
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
25
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
19
26
|
}
|
|
20
27
|
@else {
|
|
21
28
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -35,6 +42,8 @@
|
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
44
|
|
|
45
|
+
/// Outputs typography theme styles for mat-stepper.
|
|
46
|
+
/// @param {Map} $theme The theme to generate typography styles for.
|
|
38
47
|
@mixin typography($theme) {
|
|
39
48
|
@if inspection.get-theme-version($theme) == 1 {
|
|
40
49
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
@@ -47,6 +56,8 @@
|
|
|
47
56
|
}
|
|
48
57
|
}
|
|
49
58
|
|
|
59
|
+
/// Outputs density theme styles for mat-stepper.
|
|
60
|
+
/// @param {Map} $theme The theme to generate density styles for.
|
|
50
61
|
@mixin density($theme) {
|
|
51
62
|
@if inspection.get-theme-version($theme) == 1 {
|
|
52
63
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
@@ -59,10 +70,15 @@
|
|
|
59
70
|
}
|
|
60
71
|
}
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
/// Outputs all (base, color, typography, and density) theme styles for mat-stepper.
|
|
74
|
+
/// @param {Map} $theme The theme to generate color styles for.
|
|
75
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
76
|
+
/// $color-variant: The color variant to use for the stepper: primary, secondary,
|
|
77
|
+
/// tertiary, or error (If not specified, primary color values will be used).
|
|
78
|
+
@mixin theme($theme, $options...) {
|
|
63
79
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-stepper') {
|
|
64
80
|
@if inspection.get-theme-version($theme) == 1 {
|
|
65
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
81
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
66
82
|
}
|
|
67
83
|
@else {
|
|
68
84
|
@include base($theme);
|
|
@@ -79,9 +95,14 @@
|
|
|
79
95
|
}
|
|
80
96
|
}
|
|
81
97
|
|
|
82
|
-
@mixin _theme-from-tokens($tokens) {
|
|
98
|
+
@mixin _theme-from-tokens($tokens, $options...) {
|
|
83
99
|
@if ($tokens != ()) {
|
|
100
|
+
$mat-stepper-tokens: token-utils.get-tokens-for(
|
|
101
|
+
$tokens,
|
|
102
|
+
tokens-mat-stepper.$prefix,
|
|
103
|
+
$options...
|
|
104
|
+
);
|
|
84
105
|
@include token-utils.create-token-values(
|
|
85
|
-
tokens-mat-stepper.$prefix,
|
|
106
|
+
tokens-mat-stepper.$prefix, $mat-stepper-tokens);
|
|
86
107
|
}
|
|
87
108
|
}
|
package/tabs/_tabs-theme.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/tab-indicator/tab-indicator-theme' as mdc-tab-indicator-theme;
|
|
3
2
|
@use '@material/tab/tab-theme' as mdc-tab-theme;
|
|
4
3
|
@use '../core/style/sass-utils';
|
|
@@ -11,6 +10,9 @@
|
|
|
11
10
|
@use '../core/typography/typography';
|
|
12
11
|
@use '../core/tokens/token-utils';
|
|
13
12
|
|
|
13
|
+
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
14
|
+
/// for the mat-tab.
|
|
15
|
+
/// @param {Map} $theme The theme to generate base styles for.
|
|
14
16
|
@mixin base($theme) {
|
|
15
17
|
@if inspection.get-theme-version($theme) == 1 {
|
|
16
18
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
@@ -29,9 +31,14 @@
|
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
/// Outputs color theme styles for the mat-tab.
|
|
35
|
+
/// @param {Map} $theme The theme to generate color styles for.
|
|
36
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
37
|
+
/// $color-variant: The color variant to use for the tab indicator: primary, secondary,
|
|
38
|
+
/// tertiary, or error (If not specified, default primary color will be used).
|
|
39
|
+
@mixin color($theme, $options...) {
|
|
33
40
|
@if inspection.get-theme-version($theme) == 1 {
|
|
34
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
41
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
35
42
|
}
|
|
36
43
|
@else {
|
|
37
44
|
.mat-mdc-tab-group, .mat-mdc-tab-nav-bar {
|
|
@@ -74,6 +81,8 @@
|
|
|
74
81
|
tokens-mat-tab-header.get-color-tokens($theme, $palette-name));
|
|
75
82
|
}
|
|
76
83
|
|
|
84
|
+
/// Outputs typography theme styles for the mat-tab.
|
|
85
|
+
/// @param {Map} $theme The theme to generate typography styles for.
|
|
77
86
|
@mixin typography($theme) {
|
|
78
87
|
@if inspection.get-theme-version($theme) == 1 {
|
|
79
88
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
@@ -92,6 +101,8 @@
|
|
|
92
101
|
}
|
|
93
102
|
}
|
|
94
103
|
|
|
104
|
+
/// Outputs density theme styles for the mat-tab.
|
|
105
|
+
/// @param {Map} $theme The theme to generate density styles for.
|
|
95
106
|
@mixin density($theme) {
|
|
96
107
|
@if inspection.get-theme-version($theme) == 1 {
|
|
97
108
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
@@ -110,10 +121,15 @@
|
|
|
110
121
|
}
|
|
111
122
|
}
|
|
112
123
|
|
|
113
|
-
|
|
124
|
+
/// Outputs all (base, color, typography, and density) theme styles for the mat-tab.
|
|
125
|
+
/// @param {Map} $theme The theme to generate styles for.
|
|
126
|
+
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
127
|
+
/// $color-variant: The color variant to use for the tab indicator: primary, secondary,
|
|
128
|
+
/// tertiary, or error (If not specified, default primary color will be used).
|
|
129
|
+
@mixin theme($theme, $options...) {
|
|
114
130
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-tabs') {
|
|
115
131
|
@if inspection.get-theme-version($theme) == 1 {
|
|
116
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
132
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
117
133
|
}
|
|
118
134
|
@else {
|
|
119
135
|
@include base($theme);
|
|
@@ -130,13 +146,15 @@
|
|
|
130
146
|
}
|
|
131
147
|
}
|
|
132
148
|
|
|
133
|
-
@mixin _theme-from-tokens($tokens) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
149
|
+
@mixin _theme-from-tokens($tokens, $options...) {
|
|
150
|
+
$mdc-tab-indicator-tokens: token-utils.get-tokens-for(
|
|
151
|
+
$tokens, tokens-mdc-tab-indicator.$prefix, $options...);
|
|
152
|
+
$mat-tab-header-tokens: token-utils.get-tokens-for(
|
|
153
|
+
$tokens, tokens-mat-tab-header.$prefix, $options...);
|
|
154
|
+
// Don't pass $options here, because the mdc-tab doesn't have color variants,
|
|
155
|
+
// only the mdc-tab-indicator and mat-tab-header do.
|
|
156
|
+
$mdc-tab-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-tab.$prefix);
|
|
157
|
+
@include mdc-tab-theme.secondary-navigation-tab-theme($mdc-tab-tokens);
|
|
158
|
+
@include mdc-tab-indicator-theme.theme($mdc-tab-indicator-tokens);
|
|
159
|
+
@include token-utils.create-token-values(tokens-mat-tab-header.$prefix, $mat-tab-header-tokens);
|
|
142
160
|
}
|