@angular/material 20.0.0-rc.1 → 20.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/autocomplete/_autocomplete-theme.scss +17 -37
- package/autocomplete/_m2-autocomplete.scss +3 -6
- package/autocomplete/_m3-autocomplete.scss +14 -9
- package/badge/_badge-theme.scss +9 -35
- package/badge/_m2-badge.scss +32 -35
- package/badge/_m3-badge.scss +31 -32
- package/bottom-sheet/_bottom-sheet-theme.scss +16 -27
- package/bottom-sheet/_m2-bottom-sheet.scss +11 -11
- package/bottom-sheet/_m3-bottom-sheet.scss +18 -17
- package/button/_button-theme.scss +29 -46
- package/button/_fab-theme.scss +22 -41
- package/button/_icon-button-theme.scss +29 -46
- package/button/_m2-button.scss +135 -133
- package/button/_m2-fab.scss +51 -53
- package/button/_m2-icon-button.scss +14 -17
- package/button/_m3-button.scss +145 -240
- package/button/_m3-fab.scss +69 -166
- package/button/_m3-icon-button.scss +28 -56
- package/button-toggle/_button-toggle-theme.scss +23 -49
- package/button-toggle/_m2-button-toggle.scss +45 -37
- package/button-toggle/_m3-button-toggle.scss +53 -53
- package/card/_card-theme.scss +16 -37
- package/card/_m2-card.scss +24 -25
- package/card/_m3-card.scss +32 -36
- package/checkbox/_checkbox-theme.scss +25 -52
- package/checkbox/_m2-checkbox.scss +32 -35
- package/checkbox/_m3-checkbox.scss +49 -84
- package/chips/_chips-theme.scss +24 -44
- package/chips/_m2-chip.scss +47 -51
- package/chips/_m3-chip.scss +63 -110
- package/core/_core-theme.scss +58 -56
- package/core/_core.scss +15 -18
- package/core/_m2-app.scss +3 -7
- package/core/_m3-app.scss +37 -24
- package/core/option/_m2-optgroup.scss +6 -9
- package/core/option/_m2-option.scss +10 -13
- package/core/option/_m3-optgroup.scss +16 -13
- package/core/option/_m3-option.scss +28 -48
- package/core/option/_optgroup-theme.scss +14 -25
- package/core/option/_option-theme.scss +22 -33
- package/core/ripple/_m2-ripple.scss +1 -4
- package/core/ripple/_m3-ripple.scss +11 -13
- package/core/ripple/_ripple-theme.scss +15 -33
- package/core/ripple/_ripple.scss +5 -5
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +10 -11
- package/core/selection/pseudo-checkbox/_m3-pseudo-checkbox.scss +25 -40
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -27
- package/core/style/_sass-utils.scss +0 -29
- package/core/theming/_color-api-backwards-compatibility.scss +46 -29
- package/core/theming/_definition.scss +6 -0
- package/core/theming/_inspection.scss +0 -25
- package/core/tokens/_m3-system.scss +19 -68
- package/core/tokens/_m3-tokens.scss +0 -128
- package/core/tokens/_m3-utils.scss +11 -83
- package/core/tokens/_token-utils.scss +52 -246
- package/core/tokens/m3/_index.scss +1 -0
- package/core/tokens/m3/_theme.scss +47 -0
- package/datepicker/_datepicker-theme.scss +24 -39
- package/datepicker/_m2-datepicker.scss +55 -50
- package/datepicker/_m3-datepicker.scss +65 -113
- package/datepicker/index.d.ts +1 -0
- package/dialog/_dialog-theme.scss +15 -27
- package/dialog/_m2-dialog.scss +25 -26
- package/dialog/_m3-dialog.scss +35 -35
- package/divider/_divider-theme.scss +14 -25
- package/divider/_m2-divider.scss +2 -5
- package/divider/_m3-divider.scss +13 -13
- package/expansion/_expansion-theme.scss +15 -33
- package/expansion/_m2-expansion.scss +28 -27
- package/expansion/_m3-expansion.scss +41 -36
- package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +23 -23
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -11
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +11 -11
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +19 -23
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +20 -20
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +47 -47
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +11 -11
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +52 -52
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/{common-module-CF0eSYO4.mjs → common-module-BeAwwoi6.mjs} +5 -5
- package/fesm2022/common-module-BeAwwoi6.mjs.map +1 -0
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +24 -24
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
- package/fesm2022/date-range-input-harness-Bp1T4oUe.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +99 -95
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +18 -5
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +2 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +8 -8
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/{error-options-CbAHLQL5.mjs → error-options-C79tZCHG.mjs} +7 -7
- package/fesm2022/error-options-C79tZCHG.mjs.map +1 -0
- package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +28 -28
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/{form-field-sL9_TuE-.mjs → form-field-Cdw3iYrm.mjs} +33 -33
- package/fesm2022/form-field-Cdw3iYrm.mjs.map +1 -0
- package/fesm2022/form-field.mjs +3 -3
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +24 -24
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +8 -8
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/{icon-button-BASP1JI8.mjs → icon-button-D5zzuoJc.mjs} +9 -9
- package/fesm2022/icon-button-D5zzuoJc.mjs.map +1 -0
- package/fesm2022/{icon-registry-DVLYRZv3.mjs → icon-registry-DVrJNtTv.mjs} +4 -4
- package/fesm2022/icon-registry-DVrJNtTv.mjs.map +1 -0
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/{index-BNtCg9r0.mjs → index-CrjYeoWX.mjs} +9 -9
- package/fesm2022/index-CrjYeoWX.mjs.map +1 -0
- package/fesm2022/{index-DxCSjCL3.mjs → index-DTIUI_kX.mjs} +7 -7
- package/fesm2022/index-DTIUI_kX.mjs.map +1 -0
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness-oQzj5EsQ.mjs.map +1 -1
- package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
- package/fesm2022/input.mjs +12 -12
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/{internal-form-field-_OHaksOO.mjs → internal-form-field-B9_shC5z.mjs} +4 -4
- package/fesm2022/internal-form-field-B9_shC5z.mjs.map +1 -0
- package/fesm2022/{line-CtAKiRo6.mjs → line-XysKlyvU.mjs} +9 -9
- package/fesm2022/line-XysKlyvU.mjs.map +1 -0
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +55 -55
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +20 -20
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{module-DToxyW7l.mjs → module-CVpKZX1V.mjs} +7 -7
- package/fesm2022/module-CVpKZX1V.mjs.map +1 -0
- package/fesm2022/{module-ChwDH6BC.mjs → module-CdXqcjot.mjs} +28 -28
- package/fesm2022/module-CdXqcjot.mjs.map +1 -0
- package/fesm2022/{module-m5vWw9-5.mjs → module-CwYXiMoV.mjs} +12 -12
- package/fesm2022/module-CwYXiMoV.mjs.map +1 -0
- package/fesm2022/{module-DqTK2swA.mjs → module-r2U_2G3G.mjs} +17 -17
- package/fesm2022/module-r2U_2G3G.mjs.map +1 -0
- package/fesm2022/{option-hkPAbXDN.mjs → option-D4ZNnnWi.mjs} +11 -11
- package/fesm2022/option-D4ZNnnWi.mjs.map +1 -0
- package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +25 -25
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +8 -8
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +8 -8
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/{pseudo-checkbox-Ddidc23S.mjs → pseudo-checkbox-DQugCpur.mjs} +4 -4
- package/fesm2022/pseudo-checkbox-DQugCpur.mjs.map +1 -0
- package/fesm2022/{pseudo-checkbox-module--am9-RIA.mjs → pseudo-checkbox-module-BXWS_-PP.mjs} +7 -7
- package/fesm2022/pseudo-checkbox-module-BXWS_-PP.mjs.map +1 -0
- package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +19 -16
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/{ripple-DUGA2BAa.mjs → ripple-BtLhcfGO.mjs} +7 -7
- package/fesm2022/ripple-BtLhcfGO.mjs.map +1 -0
- package/fesm2022/{ripple-loader-Xy4bv6Xh.mjs → ripple-loader-DBdhLqHy.mjs} +5 -5
- package/fesm2022/ripple-loader-DBdhLqHy.mjs.map +1 -0
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +12 -12
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +29 -25
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +11 -11
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +21 -21
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +29 -29
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +15 -15
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +38 -38
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/{structural-styles-DA18Hchc.mjs → structural-styles-DWEe15sC.mjs} +4 -4
- package/fesm2022/structural-styles-DWEe15sC.mjs.map +1 -0
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +56 -56
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +67 -63
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +20 -20
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +12 -12
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +2 -2
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +26 -26
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +23 -55
- package/form-field/_m2-form-field.scss +112 -91
- package/form-field/_m3-form-field.scss +116 -131
- package/grid-list/_grid-list-theme.scss +13 -23
- package/grid-list/_m2-grid-list.scss +8 -7
- package/grid-list/_m3-grid-list.scss +14 -15
- package/icon/_icon-theme.scss +20 -30
- package/icon/_m2-icon.scss +1 -4
- package/icon/_m3-icon.scss +13 -27
- package/input/_input-theme.scss +7 -40
- package/list/_list-theme.scss +22 -52
- package/list/_m2-list.scss +56 -55
- package/list/_m3-list.scss +69 -67
- package/menu/_m2-menu.scss +22 -25
- package/menu/_m3-menu.scss +35 -38
- package/menu/_menu-theme.scss +15 -27
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +16 -17
- package/paginator/_m3-paginator.scss +28 -27
- package/paginator/_paginator-theme.scss +14 -40
- 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/_m2-progress-bar.scss +5 -8
- package/progress-bar/_m3-progress-bar.scss +17 -26
- package/progress-bar/_progress-bar-theme.scss +17 -27
- package/progress-spinner/_m2-progress-spinner.scss +3 -6
- package/progress-spinner/_m3-progress-spinner.scss +15 -22
- package/progress-spinner/_progress-spinner-theme.scss +20 -43
- package/radio/_m2-radio.scss +24 -27
- package/radio/_m3-radio.scss +44 -58
- package/radio/_radio-theme.scss +23 -50
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/index_bundled.js +2 -0
- package/schematics/ng-update/index_bundled.js.map +1 -1
- package/select/_m2-select.scss +15 -18
- package/select/_m3-select.scss +32 -38
- package/select/_select-theme.scss +23 -50
- package/sidenav/_m2-sidenav.scss +9 -12
- package/sidenav/_m3-sidenav.scss +20 -22
- package/sidenav/_sidenav-theme.scss +14 -25
- package/slide-toggle/_m2-slide-toggle.scss +82 -83
- package/slide-toggle/_m3-slide-toggle.scss +102 -143
- package/slide-toggle/_slide-toggle-theme.scss +26 -61
- package/slider/_m2-slider.scss +46 -46
- package/slider/_m3-slider.scss +54 -109
- package/slider/_slider-theme.scss +23 -34
- package/snack-bar/_m2-snack-bar.scss +10 -11
- package/snack-bar/_m3-snack-bar.scss +20 -19
- package/snack-bar/_snack-bar-theme.scss +14 -26
- package/sort/_m2-sort.scss +1 -4
- package/sort/_m3-sort.scss +11 -9
- package/sort/_sort-theme.scss +15 -27
- package/stepper/_m2-stepper.scss +32 -31
- package/stepper/_m3-stepper.scss +44 -79
- package/stepper/_stepper-theme.scss +22 -50
- package/table/_m2-table.scss +25 -26
- package/table/_m3-table.scss +36 -27
- package/table/_table-theme.scss +15 -32
- package/tabs/_m2-tabs.scss +26 -29
- package/tabs/_m3-tabs.scss +40 -51
- package/tabs/_tabs-theme.scss +37 -58
- package/tabs/index.d.ts +5 -3
- package/timepicker/_m2-timepicker.scss +3 -6
- package/timepicker/_m3-timepicker.scss +14 -15
- package/timepicker/_timepicker-theme.scss +20 -45
- package/toolbar/_m2-toolbar.scss +11 -12
- package/toolbar/_m3-toolbar.scss +22 -17
- package/toolbar/_toolbar-theme.scss +13 -37
- package/tooltip/_m2-tooltip.scss +9 -11
- package/tooltip/_m3-tooltip.scss +19 -19
- package/tooltip/_tooltip-theme.scss +17 -35
- package/tree/_m2-tree.scss +6 -9
- package/tree/_m3-tree.scss +19 -16
- package/tree/_tree-theme.scss +14 -36
- package/fesm2022/common-module-CF0eSYO4.mjs.map +0 -1
- package/fesm2022/error-options-CbAHLQL5.mjs.map +0 -1
- package/fesm2022/form-field-sL9_TuE-.mjs.map +0 -1
- package/fesm2022/icon-button-BASP1JI8.mjs.map +0 -1
- package/fesm2022/icon-registry-DVLYRZv3.mjs.map +0 -1
- package/fesm2022/index-BNtCg9r0.mjs.map +0 -1
- package/fesm2022/index-DxCSjCL3.mjs.map +0 -1
- package/fesm2022/internal-form-field-_OHaksOO.mjs.map +0 -1
- package/fesm2022/line-CtAKiRo6.mjs.map +0 -1
- package/fesm2022/module-ChwDH6BC.mjs.map +0 -1
- package/fesm2022/module-DToxyW7l.mjs.map +0 -1
- package/fesm2022/module-DqTK2swA.mjs.map +0 -1
- package/fesm2022/module-m5vWw9-5.mjs.map +0 -1
- package/fesm2022/option-hkPAbXDN.mjs.map +0 -1
- package/fesm2022/pseudo-checkbox-Ddidc23S.mjs.map +0 -1
- package/fesm2022/pseudo-checkbox-module--am9-RIA.mjs.map +0 -1
- package/fesm2022/ripple-DUGA2BAa.mjs.map +0 -1
- package/fesm2022/ripple-loader-Xy4bv6Xh.mjs.map +0 -1
- package/fesm2022/structural-styles-DA18Hchc.mjs.map +0 -1
- package/schematics/tsconfig.json +0 -26
package/core/_core-theme.scss
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@use './theming/theming';
|
|
2
2
|
@use './theming/inspection';
|
|
3
|
-
@use './theming/validation';
|
|
4
3
|
@use './ripple/ripple-theme';
|
|
5
4
|
@use './option/option-theme';
|
|
6
5
|
@use './option/optgroup-theme';
|
|
@@ -9,44 +8,57 @@
|
|
|
9
8
|
@use './typography/typography';
|
|
10
9
|
@use './tokens/token-utils';
|
|
11
10
|
@use './m2-app';
|
|
12
|
-
@use '
|
|
13
|
-
@use '
|
|
14
|
-
@use 'option/
|
|
15
|
-
@use '
|
|
11
|
+
@use './m3-app';
|
|
12
|
+
@use 'ripple/m3-ripple';
|
|
13
|
+
@use 'option/m3-option';
|
|
14
|
+
@use 'option/m3-optgroup';
|
|
15
|
+
@use 'selection/pseudo-checkbox/m3-pseudo-checkbox';
|
|
16
|
+
@use 'sass:map';
|
|
16
17
|
|
|
17
18
|
@mixin base($theme) {
|
|
18
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
19
|
-
@include
|
|
20
|
+
@include token-utils.create-token-values(map.get(m3-app.get-tokens($theme), base));
|
|
21
|
+
@include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), base));
|
|
22
|
+
@include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), base));
|
|
23
|
+
@include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), base));
|
|
24
|
+
@include token-utils.create-token-values(map.get(m3-pseudo-checkbox.get-tokens($theme), base));
|
|
20
25
|
} @else {
|
|
21
26
|
@include ripple-theme.base($theme);
|
|
22
27
|
@include option-theme.base($theme);
|
|
23
28
|
@include optgroup-theme.base($theme);
|
|
24
29
|
@include pseudo-checkbox-theme.base($theme);
|
|
25
30
|
@include sass-utils.current-selector-or-root() {
|
|
26
|
-
@include token-utils.create-token-values-mixed(
|
|
27
|
-
m2-app.$prefix, m2-app.get-unthemable-tokens());
|
|
31
|
+
@include token-utils.create-token-values-mixed(m2-app.get-unthemable-tokens());
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
@mixin color($theme) {
|
|
33
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
34
|
-
@include
|
|
38
|
+
@include token-utils.create-token-values(map.get(m3-app.get-tokens($theme), color));
|
|
39
|
+
@include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), color));
|
|
40
|
+
@include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), color));
|
|
41
|
+
@include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), color));
|
|
42
|
+
@include token-utils.create-token-values(map.get(m3-pseudo-checkbox.get-tokens($theme), color));
|
|
35
43
|
} @else {
|
|
36
44
|
@include ripple-theme.color($theme);
|
|
37
45
|
@include option-theme.color($theme);
|
|
38
46
|
@include optgroup-theme.color($theme);
|
|
39
47
|
@include pseudo-checkbox-theme.color($theme);
|
|
40
48
|
@include sass-utils.current-selector-or-root() {
|
|
41
|
-
@include token-utils.create-token-values-mixed(
|
|
42
|
-
m2-app.$prefix, m2-app.get-color-tokens($theme));
|
|
49
|
+
@include token-utils.create-token-values-mixed(m2-app.get-color-tokens($theme));
|
|
43
50
|
}
|
|
44
51
|
}
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
@mixin typography($theme) {
|
|
48
55
|
@if inspection.get-theme-version($theme) == 1 {
|
|
49
|
-
@include
|
|
56
|
+
@include token-utils.create-token-values(map.get(m3-app.get-tokens($theme), typography));
|
|
57
|
+
@include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), typography));
|
|
58
|
+
@include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), typography));
|
|
59
|
+
@include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), typography));
|
|
60
|
+
@include token-utils.create-token-values(
|
|
61
|
+
map.get(m3-pseudo-checkbox.get-tokens($theme), typography));
|
|
50
62
|
} @else {
|
|
51
63
|
@include option-theme.typography($theme);
|
|
52
64
|
@include optgroup-theme.typography($theme);
|
|
@@ -57,7 +69,12 @@
|
|
|
57
69
|
|
|
58
70
|
@mixin density($theme) {
|
|
59
71
|
@if inspection.get-theme-version($theme) == 1 {
|
|
60
|
-
|
|
72
|
+
@include token-utils.create-token-values(map.get(m3-app.get-tokens($theme), density));
|
|
73
|
+
@include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), density));
|
|
74
|
+
@include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), density));
|
|
75
|
+
@include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), density));
|
|
76
|
+
@include token-utils.create-token-values(
|
|
77
|
+
map.get(m3-pseudo-checkbox.get-tokens($theme), density));
|
|
61
78
|
} @else {
|
|
62
79
|
@include option-theme.density($theme);
|
|
63
80
|
@include optgroup-theme.density($theme);
|
|
@@ -67,37 +84,50 @@
|
|
|
67
84
|
}
|
|
68
85
|
|
|
69
86
|
@function _define-overrides() {
|
|
70
|
-
$app-tokens: m2-app.get-token-slots();
|
|
71
|
-
$ripple-tokens: m2-ripple.get-token-slots();
|
|
72
|
-
$option-tokens: m2-option.get-token-slots();
|
|
73
|
-
$optgroup-tokens: m2-optgroup.get-token-slots();
|
|
74
|
-
$pseudo-checkbox-tokens: m2-pseudo-checkbox.get-token-slots();
|
|
75
|
-
|
|
76
87
|
@return (
|
|
77
|
-
(namespace: m2-app.$prefix, tokens: $app-tokens, prefix: 'app-'),
|
|
78
|
-
(namespace: m2-ripple.$prefix, tokens: $ripple-tokens, prefix: 'ripple-'),
|
|
79
|
-
(namespace: m2-option.$prefix, tokens: $option-tokens, prefix: 'option-'),
|
|
80
|
-
(namespace: m2-optgroup.$prefix, tokens: $optgroup-tokens, prefix: 'optgroup-'),
|
|
81
88
|
(
|
|
82
|
-
namespace:
|
|
83
|
-
tokens:
|
|
89
|
+
namespace: app,
|
|
90
|
+
tokens: token-utils.get-overrides(m3-app.get-tokens(), app),
|
|
91
|
+
prefix: 'app-'
|
|
92
|
+
),
|
|
93
|
+
(
|
|
94
|
+
namespace: ripple,
|
|
95
|
+
tokens: token-utils.get-overrides(m3-ripple.get-tokens(), ripple),
|
|
96
|
+
prefix: 'ripple-'
|
|
97
|
+
),
|
|
98
|
+
(
|
|
99
|
+
namespace: option,
|
|
100
|
+
tokens: token-utils.get-overrides(m3-option.get-tokens(), option),
|
|
101
|
+
prefix: 'option-'
|
|
102
|
+
),
|
|
103
|
+
(
|
|
104
|
+
namespace: optgroup,
|
|
105
|
+
tokens: token-utils.get-overrides(m3-optgroup.get-tokens(), optgroup),
|
|
106
|
+
prefix: 'optgroup-'
|
|
107
|
+
),
|
|
108
|
+
(
|
|
109
|
+
namespace: pseudo-checkbox,
|
|
110
|
+
tokens: token-utils.get-overrides(m3-pseudo-checkbox.get-tokens(), pseudo-checkbox),
|
|
84
111
|
prefix: 'pseudo-checkbox-'
|
|
85
112
|
),
|
|
86
113
|
);
|
|
87
114
|
}
|
|
88
115
|
|
|
89
116
|
@mixin overrides($tokens: ()) {
|
|
90
|
-
@include token-utils.batch-create-token-values($tokens, _define-overrides()
|
|
117
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
91
118
|
}
|
|
92
119
|
|
|
93
120
|
// Mixin that renders all of the core styles that depend on the theme.
|
|
94
|
-
@mixin theme($theme
|
|
121
|
+
@mixin theme($theme) {
|
|
95
122
|
// Wrap the sub-theme includes in the duplicate theme styles mixin. This ensures that
|
|
96
123
|
// there won't be multiple warnings. e.g. if `mat-core-theme` reports a warning, then
|
|
97
124
|
// the imported themes (such as `mat-ripple-theme`) should not report again.
|
|
98
125
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-core') {
|
|
99
126
|
@if inspection.get-theme-version($theme) == 1 {
|
|
100
|
-
@include
|
|
127
|
+
@include base($theme);
|
|
128
|
+
@include color($theme);
|
|
129
|
+
@include density($theme);
|
|
130
|
+
@include typography($theme);
|
|
101
131
|
} @else {
|
|
102
132
|
@include base($theme);
|
|
103
133
|
@if inspection.theme-has($theme, color) {
|
|
@@ -112,31 +142,3 @@
|
|
|
112
142
|
}
|
|
113
143
|
}
|
|
114
144
|
}
|
|
115
|
-
|
|
116
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
117
|
-
@include validation.selector-defined(
|
|
118
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
119
|
-
);
|
|
120
|
-
$mat-app-tokens: token-utils.get-tokens-for($tokens, m2-app.$prefix, $options...);
|
|
121
|
-
$mat-ripple-tokens: token-utils.get-tokens-for($tokens, m2-ripple.$prefix, $options...);
|
|
122
|
-
$mat-option-tokens: token-utils.get-tokens-for($tokens, m2-option.$prefix, $options...);
|
|
123
|
-
$mat-optgroup-tokens: token-utils.get-tokens-for(
|
|
124
|
-
$tokens,
|
|
125
|
-
m2-optgroup.$prefix,
|
|
126
|
-
$options...
|
|
127
|
-
);
|
|
128
|
-
$mat-pseudo-checkbox-tokens: token-utils.get-tokens-for(
|
|
129
|
-
$tokens,
|
|
130
|
-
m2-pseudo-checkbox.$prefix,
|
|
131
|
-
$options...
|
|
132
|
-
);
|
|
133
|
-
|
|
134
|
-
@include token-utils.create-token-values(m2-app.$prefix, $mat-app-tokens);
|
|
135
|
-
@include token-utils.create-token-values(m2-ripple.$prefix, $mat-ripple-tokens);
|
|
136
|
-
@include token-utils.create-token-values(m2-option.$prefix, $mat-option-tokens);
|
|
137
|
-
@include token-utils.create-token-values(m2-optgroup.$prefix, $mat-optgroup-tokens);
|
|
138
|
-
@include token-utils.create-token-values(
|
|
139
|
-
m2-pseudo-checkbox.$prefix,
|
|
140
|
-
$mat-pseudo-checkbox-tokens
|
|
141
|
-
);
|
|
142
|
-
}
|
package/core/_core.scss
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
@use './
|
|
1
|
+
@use './m3-app';
|
|
2
2
|
@use './tokens/token-utils';
|
|
3
3
|
@use './style/elevation';
|
|
4
4
|
|
|
5
|
+
$fallbacks: m3-app.get-tokens();
|
|
6
|
+
|
|
5
7
|
/// @deprecated This mixin is a no-op and is going to be removed in v21.
|
|
6
8
|
@mixin core() {}
|
|
7
9
|
|
|
@@ -20,11 +22,9 @@
|
|
|
20
22
|
// user's content isn't inside of a `mat-sidenav-container`.
|
|
21
23
|
@at-root {
|
|
22
24
|
// Note: we need to emit fallback values here to avoid errors in internal builds.
|
|
23
|
-
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
color: token-utils.slot(text-color, inherit);
|
|
27
|
-
}
|
|
25
|
+
.mat-app-background {
|
|
26
|
+
background-color: token-utils.slot(app-background-color, $fallbacks, transparent);
|
|
27
|
+
color: token-utils.slot(app-text-color, $fallbacks, inherit);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -35,18 +35,15 @@
|
|
|
35
35
|
// Material Design specification.
|
|
36
36
|
@mixin elevation-classes() {
|
|
37
37
|
@at-root {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
box-shadow: token-utils.slot('elevation-shadow-level-#{$z-value}',
|
|
48
|
-
none);
|
|
49
|
-
}
|
|
38
|
+
// Provides external CSS classes for each elevation value. Each CSS class is formatted as
|
|
39
|
+
// `mat-elevation-z$z-value` where `$z-value` corresponds to the z-space to which the element
|
|
40
|
+
// is elevated.
|
|
41
|
+
@for $z-value from 0 through 24 {
|
|
42
|
+
$selector: elevation.$prefix + $z-value;
|
|
43
|
+
// We need the `mat-mdc-elevation-specific`, because some MDC mixins
|
|
44
|
+
// come with elevation baked in and we don't have a way of removing it.
|
|
45
|
+
.#{$selector}, .mat-mdc-elevation-specific.#{$selector} {
|
|
46
|
+
box-shadow: token-utils.slot('app-elevation-shadow-level-#{$z-value}', $fallbacks, none);
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
}
|
package/core/_m2-app.scss
CHANGED
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
@use './style/sass-utils';
|
|
5
5
|
@use './style/elevation';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
|
-
$prefix: (mat, app);
|
|
10
|
-
|
|
11
7
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
12
8
|
// but may be in a future version of the theming API.
|
|
13
9
|
@function get-unthemable-tokens() {
|
|
@@ -17,15 +13,15 @@ $prefix: (mat, app);
|
|
|
17
13
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
18
14
|
@function get-color-tokens($theme) {
|
|
19
15
|
$tokens: (
|
|
20
|
-
background-color: inspection.get-theme-color($theme, background, background),
|
|
21
|
-
text-color: inspection.get-theme-color($theme, foreground, text),
|
|
16
|
+
app-background-color: inspection.get-theme-color($theme, background, background),
|
|
17
|
+
app-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
22
18
|
);
|
|
23
19
|
|
|
24
20
|
@for $zValue from 0 through 24 {
|
|
25
21
|
$elevation-color: inspection.get-theme-color($theme, foreground, elevation);
|
|
26
22
|
$shadow: elevation.get-box-shadow($zValue,
|
|
27
23
|
if($elevation-color == null, elevation.$color, $elevation-color));
|
|
28
|
-
$tokens: map.set($tokens, 'elevation-shadow-level-#{$zValue}', $shadow);
|
|
24
|
+
$tokens: map.set($tokens, 'app-elevation-shadow-level-#{$zValue}', $shadow);
|
|
29
25
|
}
|
|
30
26
|
|
|
31
27
|
@return $tokens;
|
package/core/_m3-app.scss
CHANGED
|
@@ -1,31 +1,44 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use 'sass:meta';
|
|
3
2
|
@use './style/elevation';
|
|
4
3
|
@use './tokens/m3-utils';
|
|
5
|
-
|
|
6
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
|
-
$prefix: (mat, app);
|
|
4
|
+
@use '../core/tokens/m3';
|
|
8
5
|
|
|
9
6
|
/// Generates custom tokens for the app.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/// @param {Map} $token-slots Possible token slots
|
|
13
|
-
/// @return {Map} A set of custom tokens for the app
|
|
14
|
-
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
15
|
-
$tokens: (
|
|
16
|
-
background-color: map.get($systems, md-sys-color, background),
|
|
17
|
-
text-color: map.get($systems, md-sys-color, on-background),
|
|
18
|
-
);
|
|
7
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
8
|
+
$system: m3-utils.get-system($theme);
|
|
19
9
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
10
|
+
@return (
|
|
11
|
+
base: (),
|
|
12
|
+
color: (
|
|
13
|
+
app-background-color: map.get($system, background),
|
|
14
|
+
app-text-color: map.get($system, on-background),
|
|
15
|
+
app-elevation-shadow-level-0: elevation.get-box-shadow(0, map.get($system, shadow)),
|
|
16
|
+
app-elevation-shadow-level-1: elevation.get-box-shadow(1, map.get($system, shadow)),
|
|
17
|
+
app-elevation-shadow-level-2: elevation.get-box-shadow(2, map.get($system, shadow)),
|
|
18
|
+
app-elevation-shadow-level-3: elevation.get-box-shadow(3, map.get($system, shadow)),
|
|
19
|
+
app-elevation-shadow-level-4: elevation.get-box-shadow(4, map.get($system, shadow)),
|
|
20
|
+
app-elevation-shadow-level-5: elevation.get-box-shadow(5, map.get($system, shadow)),
|
|
21
|
+
app-elevation-shadow-level-6: elevation.get-box-shadow(6, map.get($system, shadow)),
|
|
22
|
+
app-elevation-shadow-level-7: elevation.get-box-shadow(7, map.get($system, shadow)),
|
|
23
|
+
app-elevation-shadow-level-8: elevation.get-box-shadow(8, map.get($system, shadow)),
|
|
24
|
+
app-elevation-shadow-level-9: elevation.get-box-shadow(9, map.get($system, shadow)),
|
|
25
|
+
app-elevation-shadow-level-10: elevation.get-box-shadow(10, map.get($system, shadow)),
|
|
26
|
+
app-elevation-shadow-level-11: elevation.get-box-shadow(11, map.get($system, shadow)),
|
|
27
|
+
app-elevation-shadow-level-12: elevation.get-box-shadow(12, map.get($system, shadow)),
|
|
28
|
+
app-elevation-shadow-level-13: elevation.get-box-shadow(13, map.get($system, shadow)),
|
|
29
|
+
app-elevation-shadow-level-14: elevation.get-box-shadow(14, map.get($system, shadow)),
|
|
30
|
+
app-elevation-shadow-level-15: elevation.get-box-shadow(15, map.get($system, shadow)),
|
|
31
|
+
app-elevation-shadow-level-16: elevation.get-box-shadow(16, map.get($system, shadow)),
|
|
32
|
+
app-elevation-shadow-level-17: elevation.get-box-shadow(17, map.get($system, shadow)),
|
|
33
|
+
app-elevation-shadow-level-18: elevation.get-box-shadow(18, map.get($system, shadow)),
|
|
34
|
+
app-elevation-shadow-level-19: elevation.get-box-shadow(19, map.get($system, shadow)),
|
|
35
|
+
app-elevation-shadow-level-20: elevation.get-box-shadow(20, map.get($system, shadow)),
|
|
36
|
+
app-elevation-shadow-level-21: elevation.get-box-shadow(21, map.get($system, shadow)),
|
|
37
|
+
app-elevation-shadow-level-22: elevation.get-box-shadow(22, map.get($system, shadow)),
|
|
38
|
+
app-elevation-shadow-level-23: elevation.get-box-shadow(23, map.get($system, shadow)),
|
|
39
|
+
app-elevation-shadow-level-24: elevation.get-box-shadow(24, map.get($system, shadow)),
|
|
40
|
+
),
|
|
41
|
+
typography: (),
|
|
42
|
+
density: (),
|
|
43
|
+
);
|
|
31
44
|
}
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
@use '../theming/inspection';
|
|
3
3
|
@use '../tokens/m2-utils';
|
|
4
4
|
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, optgroup);
|
|
7
|
-
|
|
8
5
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
9
6
|
// but may be in a future version of the theming API.
|
|
10
7
|
@function get-unthemable-tokens() {
|
|
@@ -14,18 +11,18 @@ $prefix: (mat, optgroup);
|
|
|
14
11
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
15
12
|
@function get-color-tokens($theme) {
|
|
16
13
|
@return (
|
|
17
|
-
label-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
14
|
+
optgroup-label-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
18
15
|
);
|
|
19
16
|
}
|
|
20
17
|
|
|
21
18
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
22
19
|
@function get-typography-tokens($theme) {
|
|
23
20
|
@return (
|
|
24
|
-
label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
25
|
-
label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
26
|
-
label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
27
|
-
label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
28
|
-
label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight)
|
|
21
|
+
optgroup-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
22
|
+
optgroup-label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
23
|
+
optgroup-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
24
|
+
optgroup-label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
25
|
+
optgroup-label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight)
|
|
29
26
|
);
|
|
30
27
|
}
|
|
31
28
|
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
@use '../theming/inspection';
|
|
3
3
|
@use '../style/sass-utils';
|
|
4
4
|
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, option);
|
|
7
|
-
|
|
8
5
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
9
6
|
// but may be in a future version of the theming API.
|
|
10
7
|
@function get-unthemable-tokens() {
|
|
@@ -18,22 +15,22 @@ $prefix: (mat, option);
|
|
|
18
15
|
if($is-dark, 0.08, 0.04));
|
|
19
16
|
|
|
20
17
|
@return (
|
|
21
|
-
selected-state-label-text-color: inspection.get-theme-color($theme, $palette-name),
|
|
22
|
-
label-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
23
|
-
hover-state-layer-color: $active-state-layer-color,
|
|
24
|
-
focus-state-layer-color: $active-state-layer-color,
|
|
25
|
-
selected-state-layer-color: $active-state-layer-color,
|
|
18
|
+
option-selected-state-label-text-color: inspection.get-theme-color($theme, $palette-name),
|
|
19
|
+
option-label-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
20
|
+
option-hover-state-layer-color: $active-state-layer-color,
|
|
21
|
+
option-focus-state-layer-color: $active-state-layer-color,
|
|
22
|
+
option-selected-state-layer-color: $active-state-layer-color,
|
|
26
23
|
);
|
|
27
24
|
}
|
|
28
25
|
|
|
29
26
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
30
27
|
@function get-typography-tokens($theme) {
|
|
31
28
|
@return (
|
|
32
|
-
label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
33
|
-
label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
34
|
-
label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
35
|
-
label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
36
|
-
label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight)
|
|
29
|
+
option-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
30
|
+
option-label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
31
|
+
option-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
32
|
+
option-label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
33
|
+
option-label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight)
|
|
37
34
|
);
|
|
38
35
|
}
|
|
39
36
|
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../style/sass-utils';
|
|
3
2
|
@use '../tokens/m3-utils';
|
|
3
|
+
@use '../tokens/m3';
|
|
4
4
|
|
|
5
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
6
|
$prefix: (mat, optgroup);
|
|
7
7
|
|
|
8
8
|
/// Generates custom tokens for the mat-optgroup.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
(
|
|
17
|
-
label-text-
|
|
18
|
-
|
|
9
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
10
|
+
$system: m3-utils.get-system($theme);
|
|
11
|
+
@return (
|
|
12
|
+
base: (),
|
|
13
|
+
color: (
|
|
14
|
+
optgroup-label-text-color: map.get($system, on-surface-variant),
|
|
15
|
+
),
|
|
16
|
+
typography: (
|
|
17
|
+
optgroup-label-text-font: map.get($system, title-small-font),
|
|
18
|
+
optgroup-label-text-line-height: map.get($system, title-small-line-height),
|
|
19
|
+
optgroup-label-text-size: map.get($system, title-small-size),
|
|
20
|
+
optgroup-label-text-tracking: map.get($system, title-small-tracking),
|
|
21
|
+
optgroup-label-text-weight: map.get($system, title-small-weight),
|
|
22
|
+
),
|
|
23
|
+
density: (),
|
|
19
24
|
);
|
|
20
|
-
|
|
21
|
-
@return m3-utils.namespace($prefix, $tokens, $token-slots);
|
|
22
25
|
}
|
|
@@ -1,57 +1,37 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../style/sass-utils';
|
|
3
2
|
@use '../tokens/m3-utils';
|
|
4
|
-
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, option);
|
|
3
|
+
@use '../tokens/m3';
|
|
7
4
|
|
|
8
5
|
/// Generates custom tokens for the mat-option.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$tokens: (
|
|
15
|
-
selected-state-label-text-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
16
|
-
label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
17
|
-
hover-state-layer-color: sass-utils.safe-color-change(
|
|
18
|
-
map.get($systems, md-sys-color, on-surface),
|
|
19
|
-
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
20
|
-
),
|
|
21
|
-
focus-state-layer-color: sass-utils.safe-color-change(
|
|
22
|
-
map.get($systems, md-sys-color, on-surface),
|
|
23
|
-
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
24
|
-
),
|
|
25
|
-
selected-state-layer-color: map.get($systems, md-sys-color, secondary-container),
|
|
6
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
7
|
+
$system: m3-utils.get-system($theme);
|
|
8
|
+
@if $color-variant {
|
|
9
|
+
$system: m3-utils.replace-colors-with-variant($system, secondary, $color-variant);
|
|
10
|
+
}
|
|
26
11
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
selected-state-label-text-color: map.get($systems, md-sys-color, on-primary-container),
|
|
43
|
-
selected-state-layer-color: map.get($systems, md-sys-color, primary-container),
|
|
12
|
+
// According to the spec the options have to be `label-large` in all typography
|
|
13
|
+
// dimensions, however this is inconsistent with the designs and with MDC's
|
|
14
|
+
// own implementation. This appears to be a bug in the spec, because MDC overrides
|
|
15
|
+
// the font size and weight to be `body-large` (see b/261838263). We make the same
|
|
16
|
+
// override here so the label looks correct.
|
|
17
|
+
@return (
|
|
18
|
+
base: (),
|
|
19
|
+
color: (
|
|
20
|
+
option-focus-state-layer-color: m3-utils.color-with-opacity(
|
|
21
|
+
map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
|
|
22
|
+
option-hover-state-layer-color: m3-utils.color-with-opacity(
|
|
23
|
+
map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
|
|
24
|
+
option-label-text-color: map.get($system, on-surface),
|
|
25
|
+
option-selected-state-label-text-color: map.get($system, on-secondary-container),
|
|
26
|
+
option-selected-state-layer-color: map.get($system, secondary-container),
|
|
44
27
|
),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
28
|
+
typography: (
|
|
29
|
+
option-label-text-size: map.get($system, body-large-size),
|
|
30
|
+
option-label-text-weight: map.get($system, body-large-weight),
|
|
31
|
+
option-label-text-font: map.get($system, label-large-font),
|
|
32
|
+
option-label-text-line-height: map.get($system, label-large-line-height),
|
|
33
|
+
option-label-text-tracking: map.get($system, label-large-tracking),
|
|
49
34
|
),
|
|
50
|
-
|
|
51
|
-
selected-state-label-text-color: map.get($systems, md-sys-color, on-error-container),
|
|
52
|
-
selected-state-layer-color: map.get($systems, md-sys-color, error-container),
|
|
53
|
-
)
|
|
35
|
+
density: (),
|
|
54
36
|
);
|
|
55
|
-
|
|
56
|
-
@return m3-utils.namespace($prefix, ($tokens, $variant-tokens), $token-slots);
|
|
57
37
|
}
|
|
@@ -1,44 +1,42 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use './m2-optgroup';
|
|
3
|
+
@use './m3-optgroup';
|
|
3
4
|
@use '../tokens/token-utils';
|
|
4
5
|
@use '../style/sass-utils';
|
|
5
6
|
@use '../theming/theming';
|
|
6
|
-
@use '../theming/validation';
|
|
7
7
|
@use '../theming/inspection';
|
|
8
8
|
@use '../typography/typography';
|
|
9
9
|
|
|
10
10
|
@mixin base($theme) {
|
|
11
11
|
@if inspection.get-theme-version($theme) == 1 {
|
|
12
|
-
@include
|
|
12
|
+
@include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), base));
|
|
13
13
|
} @else {
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
@mixin color($theme) {
|
|
18
18
|
@if inspection.get-theme-version($theme) == 1 {
|
|
19
|
-
@include
|
|
19
|
+
@include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), color));
|
|
20
20
|
} @else {
|
|
21
21
|
@include sass-utils.current-selector-or-root() {
|
|
22
|
-
@include token-utils.create-token-values-mixed(
|
|
23
|
-
m2-optgroup.$prefix, m2-optgroup.get-color-tokens($theme));
|
|
22
|
+
@include token-utils.create-token-values-mixed(m2-optgroup.get-color-tokens($theme));
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
@mixin typography($theme) {
|
|
29
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
30
|
-
@include
|
|
29
|
+
@include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), typography));
|
|
31
30
|
} @else {
|
|
32
31
|
@include sass-utils.current-selector-or-root() {
|
|
33
|
-
@include token-utils.create-token-values-mixed(
|
|
34
|
-
m2-optgroup.$prefix, m2-optgroup.get-typography-tokens($theme));
|
|
32
|
+
@include token-utils.create-token-values-mixed(m2-optgroup.get-typography-tokens($theme));
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
@mixin density($theme) {
|
|
40
38
|
@if inspection.get-theme-version($theme) == 1 {
|
|
41
|
-
|
|
39
|
+
@include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), base));
|
|
42
40
|
} @else {
|
|
43
41
|
}
|
|
44
42
|
}
|
|
@@ -47,20 +45,23 @@
|
|
|
47
45
|
@function _define-overrides() {
|
|
48
46
|
@return (
|
|
49
47
|
(
|
|
50
|
-
namespace:
|
|
51
|
-
tokens:
|
|
48
|
+
namespace: optgroup,
|
|
49
|
+
tokens: token-utils.get-overrides(m3-optgroup.get-tokens(), optgroup)
|
|
52
50
|
),
|
|
53
51
|
);
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
@mixin overrides($tokens: ()) {
|
|
57
|
-
|
|
55
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
@mixin theme($theme) {
|
|
61
59
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-optgroup') {
|
|
62
60
|
@if inspection.get-theme-version($theme) == 1 {
|
|
63
|
-
@include
|
|
61
|
+
@include base($theme);
|
|
62
|
+
@include color($theme);
|
|
63
|
+
@include density($theme);
|
|
64
|
+
@include typography($theme);
|
|
64
65
|
} @else {
|
|
65
66
|
@include base($theme);
|
|
66
67
|
@if inspection.theme-has($theme, color) {
|
|
@@ -75,15 +76,3 @@
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
-
@mixin _theme-from-tokens($tokens) {
|
|
80
|
-
@include validation.selector-defined(
|
|
81
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
82
|
-
);
|
|
83
|
-
@if ($tokens != ()) {
|
|
84
|
-
@include token-utils.create-token-values(
|
|
85
|
-
m2-optgroup.$prefix,
|
|
86
|
-
map.get($tokens, m2-optgroup.$prefix)
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
}
|