@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
|
@@ -1,153 +1,138 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:list';
|
|
3
|
-
@use '../core/style/sass-utils';
|
|
4
3
|
@use '../core/tokens/m3-utils';
|
|
5
4
|
@use '../core/theming/theming';
|
|
6
5
|
@use '../core/theming/inspection';
|
|
6
|
+
@use '../core/tokens/m3';
|
|
7
7
|
|
|
8
8
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
9
|
$prefix: (mat, form-field);
|
|
10
10
|
|
|
11
11
|
/// Generates custom tokens for the mat-form-field.
|
|
12
|
-
/// @param {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
m3-utils.generate-typography-tokens($systems, container-text, body-large),
|
|
19
|
-
m3-utils.generate-typography-tokens($systems, subscript-text, body-small),
|
|
20
|
-
(
|
|
21
|
-
disabled-input-text-placeholder-color:
|
|
22
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
23
|
-
state-layer-color: map.get($systems, md-sys-color, on-surface),
|
|
24
|
-
error-text-color: map.get($systems, md-sys-color, error),
|
|
25
|
-
select-option-text-color: map.get($systems, md-ref-palette, neutral10),
|
|
26
|
-
select-disabled-option-text-color:
|
|
27
|
-
sass-utils.safe-color-change(map.get($systems, md-ref-palette, neutral10), $alpha: 0.38),
|
|
28
|
-
enabled-select-arrow-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
29
|
-
disabled-select-arrow-color:
|
|
30
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
31
|
-
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
32
|
-
focus-state-layer-opacity: m3-utils.hardcode(0, $exclude-hardcoded),
|
|
33
|
-
focus-select-arrow-color: map.get($systems, md-sys-color, primary),
|
|
34
|
-
leading-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
35
|
-
disabled-leading-icon-color:
|
|
36
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
37
|
-
trailing-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
38
|
-
disabled-trailing-icon-color:
|
|
39
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
40
|
-
error-focus-trailing-icon-color: map.get($systems, md-sys-color, error),
|
|
41
|
-
error-hover-trailing-icon-color: map.get($systems, md-sys-color, on-error-container),
|
|
42
|
-
error-trailing-icon-color: map.get($systems, md-sys-color, error),
|
|
43
|
-
filled-active-indicator-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
44
|
-
filled-active-indicator-height: if($exclude-hardcoded, null, 1px),
|
|
45
|
-
filled-caret-color: map.get($systems, md-sys-color, primary),
|
|
46
|
-
filled-container-color: map.get($systems, md-sys-color, surface-variant),
|
|
47
|
-
filled-container-shape: map.get($systems, md-sys-shape, corner-extra-small),
|
|
48
|
-
filled-disabled-active-indicator-color:
|
|
49
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
50
|
-
filled-disabled-container-color:
|
|
51
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.04),
|
|
52
|
-
filled-disabled-input-text-color:
|
|
53
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
54
|
-
filled-disabled-label-text-color:
|
|
55
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
56
|
-
filled-error-active-indicator-color: map.get($systems, md-sys-color, error),
|
|
57
|
-
filled-error-focus-active-indicator-color: map.get($systems, md-sys-color, error),
|
|
58
|
-
filled-error-focus-label-text-color: map.get($systems, md-sys-color, error),
|
|
59
|
-
filled-error-hover-active-indicator-color:
|
|
60
|
-
map.get($systems, md-sys-color, on-error-container),
|
|
61
|
-
filled-error-hover-label-text-color: map.get($systems, md-sys-color, on-error-container),
|
|
62
|
-
filled-error-label-text-color: map.get($systems, md-sys-color, error),
|
|
63
|
-
filled-focus-active-indicator-color: map.get($systems, md-sys-color, primary),
|
|
64
|
-
filled-focus-active-indicator-height: if($exclude-hardcoded, null, 2px),
|
|
65
|
-
filled-focus-label-text-color: map.get($systems, md-sys-color, primary),
|
|
66
|
-
filled-hover-active-indicator-color: map.get($systems, md-sys-color, on-surface),
|
|
67
|
-
filled-hover-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
68
|
-
filled-input-text-color: map.get($systems, md-sys-color, on-surface),
|
|
69
|
-
filled-input-text-placeholder-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
70
|
-
filled-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
71
|
-
filled-label-text-font: map.get($systems, md-sys-typescale, body-large-font),
|
|
72
|
-
filled-label-text-size: map.get($systems, md-sys-typescale, body-large-size),
|
|
73
|
-
filled-label-text-tracking: map.get($systems, md-sys-typescale, body-large-tracking),
|
|
74
|
-
filled-label-text-weight: map.get($systems, md-sys-typescale, body-large-weight),
|
|
75
|
-
outlined-caret-color: map.get($systems, md-sys-color, primary),
|
|
76
|
-
outlined-container-shape: map.get($systems, md-sys-shape, corner-extra-small),
|
|
77
|
-
outlined-disabled-input-text-color:
|
|
78
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
79
|
-
outlined-disabled-label-text-color:
|
|
80
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
81
|
-
outlined-disabled-outline-color:
|
|
82
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.12),
|
|
83
|
-
outlined-error-focus-label-text-color: map.get($systems, md-sys-color, error),
|
|
84
|
-
outlined-error-focus-outline-color: map.get($systems, md-sys-color, error),
|
|
85
|
-
outlined-error-hover-label-text-color: map.get($systems, md-sys-color, on-error-container),
|
|
86
|
-
outlined-error-hover-outline-color: map.get($systems, md-sys-color, on-error-container),
|
|
87
|
-
outlined-error-label-text-color: map.get($systems, md-sys-color, error),
|
|
88
|
-
outlined-error-outline-color: map.get($systems, md-sys-color, error),
|
|
89
|
-
outlined-focus-label-text-color: map.get($systems, md-sys-color, primary),
|
|
90
|
-
outlined-focus-outline-color: map.get($systems, md-sys-color, primary),
|
|
91
|
-
outlined-focus-outline-width: if($exclude-hardcoded, null, 2px),
|
|
92
|
-
outlined-hover-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
93
|
-
outlined-hover-outline-color: map.get($systems, md-sys-color, on-surface),
|
|
94
|
-
outlined-input-text-color: map.get($systems, md-sys-color, on-surface),
|
|
95
|
-
outlined-input-text-placeholder-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
96
|
-
outlined-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
97
|
-
outlined-label-text-font: map.get($systems, md-sys-typescale, body-large-font),
|
|
98
|
-
outlined-label-text-size: map.get($systems, md-sys-typescale, body-large-size),
|
|
99
|
-
outlined-label-text-tracking: map.get($systems, md-sys-typescale, body-large-tracking),
|
|
100
|
-
outlined-label-text-weight: map.get($systems, md-sys-typescale, body-large-weight),
|
|
101
|
-
outlined-outline-color: map.get($systems, md-sys-color, outline),
|
|
102
|
-
outlined-outline-width: if($exclude-hardcoded, null, 1px),
|
|
103
|
-
)
|
|
104
|
-
);
|
|
12
|
+
/// @param {String} $color-variant The color variant to use for the component
|
|
13
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
14
|
+
$system: m3-utils.get-system($theme);
|
|
15
|
+
@if $color-variant {
|
|
16
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
17
|
+
}
|
|
105
18
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
outlined-caret-color: map.get($systems, md-sys-color, secondary),
|
|
115
|
-
outlined-focus-label-text-color: map.get($systems, md-sys-color, secondary),
|
|
116
|
-
outlined-focus-outline-color: map.get($systems, md-sys-color, secondary),
|
|
19
|
+
@return (
|
|
20
|
+
base: (
|
|
21
|
+
form-field-filled-active-indicator-height: 1px,
|
|
22
|
+
form-field-filled-focus-active-indicator-height: 2px,
|
|
23
|
+
form-field-filled-container-shape: map.get($system, corner-extra-small),
|
|
24
|
+
form-field-outlined-outline-width: 1px,
|
|
25
|
+
form-field-outlined-focus-outline-width: 2px,
|
|
26
|
+
form-field-outlined-container-shape: map.get($system, corner-extra-small),
|
|
117
27
|
),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
28
|
+
color: (
|
|
29
|
+
form-field-disabled-input-text-placeholder-color:
|
|
30
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
31
|
+
form-field-disabled-leading-icon-color:
|
|
32
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
33
|
+
form-field-disabled-select-arrow-color:
|
|
34
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
35
|
+
form-field-disabled-trailing-icon-color:
|
|
36
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
37
|
+
form-field-enabled-select-arrow-color: map.get($system, on-surface-variant),
|
|
38
|
+
form-field-error-focus-trailing-icon-color: map.get($system, error),
|
|
39
|
+
form-field-error-hover-trailing-icon-color: map.get($system, on-error-container),
|
|
40
|
+
form-field-error-text-color: map.get($system, error),
|
|
41
|
+
form-field-error-trailing-icon-color: map.get($system, error),
|
|
42
|
+
form-field-filled-active-indicator-color: map.get($system, on-surface-variant),
|
|
43
|
+
form-field-filled-caret-color: map.get($system, primary),
|
|
44
|
+
form-field-filled-container-color: map.get($system, surface-variant),
|
|
45
|
+
form-field-filled-disabled-active-indicator-color:
|
|
46
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
47
|
+
form-field-filled-disabled-container-color:
|
|
48
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 4%),
|
|
49
|
+
form-field-filled-disabled-input-text-color:
|
|
50
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
51
|
+
form-field-filled-disabled-label-text-color:
|
|
52
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
53
|
+
form-field-filled-error-active-indicator-color: map.get($system, error),
|
|
54
|
+
form-field-filled-error-caret-color: map.get($system, error),
|
|
55
|
+
form-field-filled-error-focus-active-indicator-color: map.get($system, error),
|
|
56
|
+
form-field-filled-error-focus-label-text-color: map.get($system, error),
|
|
57
|
+
form-field-filled-error-hover-active-indicator-color: map.get($system, on-error-container),
|
|
58
|
+
form-field-filled-error-hover-label-text-color: map.get($system, on-error-container),
|
|
59
|
+
form-field-filled-error-label-text-color: map.get($system, error),
|
|
60
|
+
form-field-filled-focus-active-indicator-color: map.get($system, primary),
|
|
61
|
+
form-field-filled-focus-label-text-color: map.get($system, primary),
|
|
62
|
+
form-field-filled-hover-active-indicator-color: map.get($system, on-surface),
|
|
63
|
+
form-field-filled-hover-label-text-color: map.get($system, on-surface-variant),
|
|
64
|
+
form-field-filled-input-text-color: map.get($system, on-surface),
|
|
65
|
+
form-field-filled-input-text-placeholder-color: map.get($system, on-surface-variant),
|
|
66
|
+
form-field-filled-label-text-color: map.get($system, on-surface-variant),
|
|
67
|
+
form-field-focus-select-arrow-color: map.get($system, primary),
|
|
68
|
+
form-field-focus-state-layer-opacity: 0,
|
|
69
|
+
form-field-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
70
|
+
form-field-leading-icon-color: map.get($system, on-surface-variant),
|
|
71
|
+
form-field-outlined-caret-color: map.get($system, primary),
|
|
72
|
+
form-field-outlined-disabled-input-text-color:
|
|
73
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
74
|
+
form-field-outlined-disabled-label-text-color:
|
|
75
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
76
|
+
form-field-outlined-disabled-outline-color:
|
|
77
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
78
|
+
form-field-outlined-error-caret-color: map.get($system, error),
|
|
79
|
+
form-field-outlined-error-focus-label-text-color: map.get($system, error),
|
|
80
|
+
form-field-outlined-error-focus-outline-color: map.get($system, error),
|
|
81
|
+
form-field-outlined-error-hover-label-text-color: map.get($system, on-error-container),
|
|
82
|
+
form-field-outlined-error-hover-outline-color: map.get($system, on-error-container),
|
|
83
|
+
form-field-outlined-error-label-text-color: map.get($system, error),
|
|
84
|
+
form-field-outlined-error-outline-color: map.get($system, error),
|
|
85
|
+
form-field-outlined-focus-label-text-color: map.get($system, primary),
|
|
86
|
+
form-field-outlined-focus-outline-color: map.get($system, primary),
|
|
87
|
+
form-field-outlined-hover-label-text-color: map.get($system, on-surface),
|
|
88
|
+
form-field-outlined-hover-outline-color: map.get($system, on-surface),
|
|
89
|
+
form-field-outlined-input-text-color: map.get($system, on-surface),
|
|
90
|
+
form-field-outlined-input-text-placeholder-color: map.get($system, on-surface-variant),
|
|
91
|
+
form-field-outlined-label-text-color: map.get($system, on-surface-variant),
|
|
92
|
+
form-field-outlined-outline-color: map.get($system, outline),
|
|
93
|
+
form-field-select-disabled-option-text-color:
|
|
94
|
+
m3-utils.color-with-opacity(map.get($system, neutral10), 38%),
|
|
95
|
+
form-field-select-option-text-color: map.get($system, neutral10),
|
|
96
|
+
form-field-state-layer-color: map.get($system, on-surface),
|
|
97
|
+
form-field-trailing-icon-color: map.get($system, on-surface-variant),
|
|
126
98
|
),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
99
|
+
typography: (
|
|
100
|
+
form-field-container-text-font: map.get($system, body-large-font),
|
|
101
|
+
form-field-container-text-line-height: map.get($system, body-large-line-height),
|
|
102
|
+
form-field-container-text-size: map.get($system, body-large-size),
|
|
103
|
+
form-field-container-text-tracking: map.get($system, body-large-tracking),
|
|
104
|
+
form-field-container-text-weight: map.get($system, body-large-weight),
|
|
105
|
+
form-field-subscript-text-font: map.get($system, body-small-font),
|
|
106
|
+
form-field-subscript-text-line-height: map.get($system, body-small-line-height),
|
|
107
|
+
form-field-subscript-text-size: map.get($system, body-small-size),
|
|
108
|
+
form-field-subscript-text-tracking: map.get($system, body-small-tracking),
|
|
109
|
+
form-field-subscript-text-weight: map.get($system, body-small-weight),
|
|
110
|
+
form-field-outlined-label-text-font: map.get($system, body-large-font),
|
|
111
|
+
form-field-outlined-label-text-size: map.get($system, body-large-size),
|
|
112
|
+
form-field-outlined-label-text-tracking: map.get($system, body-large-tracking),
|
|
113
|
+
form-field-outlined-label-text-weight: map.get($system, body-large-weight),
|
|
114
|
+
form-field-filled-label-text-font: map.get($system, body-large-font),
|
|
115
|
+
form-field-filled-label-text-size: map.get($system, body-large-size),
|
|
116
|
+
form-field-filled-label-text-tracking: map.get($system, body-large-tracking),
|
|
117
|
+
form-field-filled-label-text-weight: map.get($system, body-large-weight),
|
|
118
|
+
form-field-outlined-label-text-populated-size: null,
|
|
119
|
+
),
|
|
120
|
+
density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
|
|
136
121
|
);
|
|
137
|
-
|
|
138
|
-
@return m3-utils.namespace($prefix, ($tokens, $variant-tokens), $token-slots);
|
|
139
122
|
}
|
|
140
123
|
|
|
141
124
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
142
|
-
@function get-density-tokens($
|
|
143
|
-
$scale: theming.clamp-density(
|
|
125
|
+
@function get-density-tokens($scale) {
|
|
126
|
+
$scale: theming.clamp-density($scale, -5);
|
|
144
127
|
$index: ($scale * -1) + 1;
|
|
145
128
|
|
|
146
129
|
@return (
|
|
147
|
-
container-height: list.nth((56px, 52px, 48px, 44px, 40px, 36px), $index),
|
|
148
|
-
filled-label-display: list.nth((block, block, none, none, none, none), $index),
|
|
149
|
-
container-vertical-padding: list.nth((16px, 14px, 12px, 10px, 8px, 6px), $index),
|
|
150
|
-
filled-with-label-container-padding-top:
|
|
151
|
-
|
|
130
|
+
form-field-container-height: list.nth((56px, 52px, 48px, 44px, 40px, 36px), $index),
|
|
131
|
+
form-field-filled-label-display: list.nth((block, block, none, none, none, none), $index),
|
|
132
|
+
form-field-container-vertical-padding: list.nth((16px, 14px, 12px, 10px, 8px, 6px), $index),
|
|
133
|
+
form-field-filled-with-label-container-padding-top:
|
|
134
|
+
list.nth((24px, 22px, 12px, 10px, 8px, 6px), $index),
|
|
135
|
+
form-field-filled-with-label-container-padding-bottom:
|
|
136
|
+
list.nth((8px, 6px, 12px, 10px, 8px, 6px), $index),
|
|
152
137
|
);
|
|
153
138
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
3
|
@use '../core/theming/inspection';
|
|
4
|
-
@use '../core/theming/validation';
|
|
5
4
|
@use '../core/typography/typography';
|
|
6
5
|
@use './m2-grid-list';
|
|
6
|
+
@use './m3-grid-list';
|
|
7
7
|
@use '../core/style/sass-utils';
|
|
8
8
|
@use '../core/tokens/token-utils';
|
|
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-grid-list.get-tokens($theme), base));
|
|
13
13
|
} @else {
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -17,25 +17,24 @@
|
|
|
17
17
|
// Include this empty mixin for consistency with the other components.
|
|
18
18
|
@mixin color($theme) {
|
|
19
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
20
|
-
@include
|
|
20
|
+
@include token-utils.create-token-values(map.get(m3-grid-list.get-tokens($theme), color));
|
|
21
21
|
} @else {
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
@mixin typography($theme) {
|
|
26
26
|
@if inspection.get-theme-version($theme) == 1 {
|
|
27
|
-
@include
|
|
27
|
+
@include token-utils.create-token-values(map.get(m3-grid-list.get-tokens($theme), typography));
|
|
28
28
|
} @else {
|
|
29
29
|
@include sass-utils.current-selector-or-root() {
|
|
30
|
-
@include token-utils.create-token-values-mixed(
|
|
31
|
-
m2-grid-list.$prefix, m2-grid-list.get-typography-tokens($theme));
|
|
30
|
+
@include token-utils.create-token-values-mixed(m2-grid-list.get-typography-tokens($theme));
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
@mixin density($theme) {
|
|
37
36
|
@if inspection.get-theme-version($theme) == 1 {
|
|
38
|
-
|
|
37
|
+
@include token-utils.create-token-values(map.get(m3-grid-list.get-tokens($theme), density));
|
|
39
38
|
} @else {
|
|
40
39
|
}
|
|
41
40
|
}
|
|
@@ -44,20 +43,23 @@
|
|
|
44
43
|
@function _define-overrides() {
|
|
45
44
|
@return (
|
|
46
45
|
(
|
|
47
|
-
namespace:
|
|
48
|
-
tokens:
|
|
46
|
+
namespace: grid-list,
|
|
47
|
+
tokens: token-utils.get-overrides(m3-grid-list.get-tokens(), grid-list)
|
|
49
48
|
),
|
|
50
49
|
);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
@mixin overrides($tokens: ()) {
|
|
54
|
-
|
|
53
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
@mixin theme($theme) {
|
|
58
57
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-grid-list') {
|
|
59
58
|
@if inspection.get-theme-version($theme) == 1 {
|
|
60
|
-
@include
|
|
59
|
+
@include base($theme);
|
|
60
|
+
@include color($theme);
|
|
61
|
+
@include density($theme);
|
|
62
|
+
@include typography($theme);
|
|
61
63
|
} @else {
|
|
62
64
|
@include base($theme);
|
|
63
65
|
@if inspection.theme-has($theme, color) {
|
|
@@ -72,15 +74,3 @@
|
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
|
-
|
|
76
|
-
@mixin _theme-from-tokens($tokens) {
|
|
77
|
-
@include validation.selector-defined(
|
|
78
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
79
|
-
);
|
|
80
|
-
@if ($tokens != ()) {
|
|
81
|
-
@include token-utils.create-token-values(
|
|
82
|
-
m2-grid-list.$prefix,
|
|
83
|
-
map.get($tokens, m2-grid-list.$prefix)
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
@use '../core/theming/inspection';
|
|
3
3
|
@use '../core/style/sass-utils';
|
|
4
4
|
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, grid-list);
|
|
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() {
|
|
@@ -22,10 +19,14 @@ $prefix: (mat, grid-list);
|
|
|
22
19
|
// TODO(crisbeto): other components have tokens for all typography dimensions.
|
|
23
20
|
// Here we only set the font size to maintain the same appearance as the pre-tokens
|
|
24
21
|
// theming API. Consider adding more tokens for letter spacing, font weight etc.
|
|
25
|
-
tile-header-primary-text-size:
|
|
26
|
-
|
|
27
|
-
tile-
|
|
28
|
-
|
|
22
|
+
grid-list-tile-header-primary-text-size:
|
|
23
|
+
inspection.get-theme-typography($theme, body-2, font-size),
|
|
24
|
+
grid-list-tile-header-secondary-text-size:
|
|
25
|
+
inspection.get-theme-typography($theme, caption, font-size),
|
|
26
|
+
grid-list-tile-footer-primary-text-size:
|
|
27
|
+
inspection.get-theme-typography($theme, body-2, font-size),
|
|
28
|
+
grid-list-tile-footer-secondary-text-size:
|
|
29
|
+
inspection.get-theme-typography($theme, caption, font-size),
|
|
29
30
|
);
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/tokens/m3-utils';
|
|
3
|
-
|
|
4
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
-
$prefix: (mat, grid-list);
|
|
3
|
+
@use '../core/tokens/m3';
|
|
6
4
|
|
|
7
5
|
/// Generates custom tokens for the mat-grid-list.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/// @param {Map} $token-slots Possible token slots
|
|
11
|
-
/// @return {Map} A set of custom tokens for the mat-grid-list
|
|
12
|
-
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
-
$tokens: (
|
|
14
|
-
tile-header-primary-text-size: map.get($systems, md-sys-typescale, body-large),
|
|
15
|
-
tile-header-secondary-text-size: map.get($systems, md-sys-typescale, body-medium),
|
|
16
|
-
tile-footer-primary-text-size: map.get($systems, md-sys-typescale, body-large),
|
|
17
|
-
tile-footer-secondary-text-size: map.get($systems, md-sys-typescale, body-medium),
|
|
18
|
-
);
|
|
6
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
7
|
+
$system: m3-utils.get-system($theme);
|
|
19
8
|
|
|
20
|
-
@return
|
|
9
|
+
@return (
|
|
10
|
+
base: (),
|
|
11
|
+
color: (),
|
|
12
|
+
typography: (
|
|
13
|
+
grid-list-tile-header-primary-text-size: map.get($system, body-large),
|
|
14
|
+
grid-list-tile-header-secondary-text-size: map.get($system, body-medium),
|
|
15
|
+
grid-list-tile-footer-primary-text-size: map.get($system, body-large),
|
|
16
|
+
grid-list-tile-footer-secondary-text-size: map.get($system, body-medium),
|
|
17
|
+
),
|
|
18
|
+
density: (),
|
|
19
|
+
);
|
|
21
20
|
}
|
package/icon/_icon-theme.scss
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
@use '../core/style/sass-utils';
|
|
2
2
|
@use '../core/theming/inspection';
|
|
3
3
|
@use '../core/theming/theming';
|
|
4
|
-
@use '../core/theming/validation';
|
|
5
4
|
@use '../core/tokens/token-utils';
|
|
6
5
|
@use './m2-icon';
|
|
6
|
+
@use './m3-icon';
|
|
7
|
+
@use 'sass:map';
|
|
7
8
|
|
|
8
9
|
@mixin _palette-colors($theme, $palette-name) {
|
|
9
10
|
$color: inspection.get-theme-color($theme, $palette-name, text);
|
|
10
11
|
$tokens: m2-icon.private-get-icon-color-tokens($color);
|
|
11
|
-
@include token-utils.create-token-values-mixed(
|
|
12
|
+
@include token-utils.create-token-values-mixed($tokens);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
@@ -16,25 +17,21 @@
|
|
|
16
17
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
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-icon.get-tokens($theme), base));
|
|
20
21
|
} @else {
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
/// Outputs color theme styles for the mat-icon.
|
|
25
26
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
26
|
-
/// @param {
|
|
27
|
-
|
|
28
|
-
/// (If not specified, default neutral color will be used).
|
|
29
|
-
@mixin color($theme, $options...) {
|
|
27
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
28
|
+
@mixin color($theme, $color-variant: null) {
|
|
30
29
|
@if inspection.get-theme-version($theme) == 1 {
|
|
31
|
-
@include
|
|
30
|
+
@include token-utils.create-token-values(
|
|
31
|
+
map.get(m3-icon.get-tokens($theme, $color-variant), color));
|
|
32
32
|
} @else {
|
|
33
33
|
@include sass-utils.current-selector-or-root() {
|
|
34
|
-
@include token-utils.create-token-values-mixed(
|
|
35
|
-
m2-icon.$prefix,
|
|
36
|
-
m2-icon.get-color-tokens($theme)
|
|
37
|
-
);
|
|
34
|
+
@include token-utils.create-token-values-mixed(m2-icon.get-color-tokens($theme));
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
.mat-icon {
|
|
@@ -57,7 +54,7 @@
|
|
|
57
54
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
58
55
|
@mixin typography($theme) {
|
|
59
56
|
@if inspection.get-theme-version($theme) == 1 {
|
|
60
|
-
@include
|
|
57
|
+
@include token-utils.create-token-values(map.get(m3-icon.get-tokens($theme), typography));
|
|
61
58
|
} @else {
|
|
62
59
|
}
|
|
63
60
|
}
|
|
@@ -66,7 +63,7 @@
|
|
|
66
63
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
67
64
|
@mixin density($theme) {
|
|
68
65
|
@if inspection.get-theme-version($theme) == 1 {
|
|
69
|
-
|
|
66
|
+
@include token-utils.create-token-values(map.get(m3-icon.get-tokens($theme), density));
|
|
70
67
|
} @else {
|
|
71
68
|
}
|
|
72
69
|
}
|
|
@@ -75,8 +72,8 @@
|
|
|
75
72
|
@function _define-overrides() {
|
|
76
73
|
@return (
|
|
77
74
|
(
|
|
78
|
-
namespace:
|
|
79
|
-
tokens:
|
|
75
|
+
namespace: icon,
|
|
76
|
+
tokens: token-utils.get-overrides(m3-icon.get-tokens(), icon)
|
|
80
77
|
),
|
|
81
78
|
);
|
|
82
79
|
}
|
|
@@ -84,18 +81,19 @@
|
|
|
84
81
|
/// Outputs the CSS variable values for the given tokens.
|
|
85
82
|
/// @param {Map} $tokens The token values to emit.
|
|
86
83
|
@mixin overrides($tokens: ()) {
|
|
87
|
-
|
|
84
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
88
85
|
}
|
|
89
86
|
|
|
90
87
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-icon.
|
|
91
88
|
/// @param {Map} $theme The theme to generate styles for.
|
|
92
|
-
/// @param {
|
|
93
|
-
|
|
94
|
-
/// or error (If not specified, default surface color will be used).
|
|
95
|
-
@mixin theme($theme, $options...) {
|
|
89
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
90
|
+
@mixin theme($theme, $color-variant: null) {
|
|
96
91
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-icon') {
|
|
97
92
|
@if inspection.get-theme-version($theme) == 1 {
|
|
98
|
-
@include
|
|
93
|
+
@include base($theme);
|
|
94
|
+
@include color($theme, $color-variant);
|
|
95
|
+
@include density($theme);
|
|
96
|
+
@include typography($theme);
|
|
99
97
|
} @else {
|
|
100
98
|
@include base($theme);
|
|
101
99
|
@if inspection.theme-has($theme, color) {
|
|
@@ -110,11 +108,3 @@
|
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
|
-
|
|
114
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
115
|
-
@include validation.selector-defined(
|
|
116
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
117
|
-
);
|
|
118
|
-
$mat-icon-tokens: token-utils.get-tokens-for($tokens, m2-icon.$prefix, $options...);
|
|
119
|
-
@include token-utils.create-token-values(m2-icon.$prefix, $mat-icon-tokens);
|
|
120
|
-
}
|
package/icon/_m2-icon.scss
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
@use '../core/tokens/m2-utils';
|
|
2
2
|
@use '../core/style/sass-utils';
|
|
3
3
|
|
|
4
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
-
$prefix: (mat, icon);
|
|
6
|
-
|
|
7
4
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
8
5
|
// but may be in a future version of the theming API.
|
|
9
6
|
@function get-unthemable-tokens() {
|
|
@@ -29,7 +26,7 @@ $prefix: (mat, icon);
|
|
|
29
26
|
// Mixin used to set a specific color on an icon.
|
|
30
27
|
@function private-get-icon-color-tokens($color) {
|
|
31
28
|
@return (
|
|
32
|
-
color: $color,
|
|
29
|
+
icon-color: $color,
|
|
33
30
|
);
|
|
34
31
|
}
|
|
35
32
|
|
package/icon/_m3-icon.scss
CHANGED
|
@@ -1,35 +1,21 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/tokens/m3-utils';
|
|
3
|
-
|
|
4
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
-
$prefix: (mat, icon);
|
|
3
|
+
@use '../core/tokens/m3';
|
|
6
4
|
|
|
7
5
|
/// Generates custom tokens for the mat-icon.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color: m3-utils.hardcode(inherit, $exclude-hardcoded),
|
|
15
|
-
);
|
|
6
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
7
|
+
$system: m3-utils.get-system($theme);
|
|
8
|
+
$color: inherit;
|
|
9
|
+
@if $color-variant {
|
|
10
|
+
$color: map.get($system, $color-variant);
|
|
11
|
+
}
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
color: map.get($systems, md-sys-color, primary),
|
|
22
|
-
),
|
|
23
|
-
secondary: (
|
|
24
|
-
color: map.get($systems, md-sys-color, secondary),
|
|
13
|
+
@return (
|
|
14
|
+
base: (),
|
|
15
|
+
color: (
|
|
16
|
+
icon-color: $color,
|
|
25
17
|
),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
),
|
|
29
|
-
error: (
|
|
30
|
-
color: map.get($systems, md-sys-color, error),
|
|
31
|
-
)
|
|
18
|
+
typography: (),
|
|
19
|
+
density: (),
|
|
32
20
|
);
|
|
33
|
-
|
|
34
|
-
@return m3-utils.namespace($prefix, ($tokens, $variant-tokens), $token-slots);
|
|
35
21
|
}
|