@angular/material 20.0.0-rc.1 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/_autocomplete-theme.scss +17 -37
- package/autocomplete/_m2-autocomplete.scss +3 -6
- package/autocomplete/_m3-autocomplete.scss +14 -9
- package/autocomplete/index.d.ts +2 -2
- 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/index.d.ts +2 -2
- 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 +9 -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 +22 -22
- 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-cKSwHniA.mjs} +5 -5
- package/fesm2022/common-module-cKSwHniA.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 +154 -133
- 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-DCNQlTOA.mjs} +7 -7
- package/fesm2022/error-options-DCNQlTOA.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-C9DZXojn.mjs} +33 -33
- package/fesm2022/form-field-C9DZXojn.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-B2tPB5AH.mjs} +9 -9
- package/fesm2022/icon-button-B2tPB5AH.mjs.map +1 -0
- package/fesm2022/{icon-registry-DVLYRZv3.mjs → icon-registry-CwOTJ7YM.mjs} +4 -4
- package/fesm2022/icon-registry-CwOTJ7YM.mjs.map +1 -0
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/index-BFRo2fUq.mjs +20 -0
- package/fesm2022/index-BFRo2fUq.mjs.map +1 -0
- package/fesm2022/index-DwiL-HGk.mjs +22 -0
- package/fesm2022/index-DwiL-HGk.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-D5iFxU6d.mjs} +4 -4
- package/fesm2022/internal-form-field-D5iFxU6d.mjs.map +1 -0
- package/fesm2022/{line-CtAKiRo6.mjs → line-Bz5f9Cyx.mjs} +9 -9
- package/fesm2022/line-Bz5f9Cyx.mjs.map +1 -0
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +66 -66
- 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-DqTK2swA.mjs → module-BDiw_nWS.mjs} +25 -19
- package/fesm2022/module-BDiw_nWS.mjs.map +1 -0
- package/fesm2022/{module-m5vWw9-5.mjs → module-CWxMD37a.mjs} +12 -12
- package/fesm2022/module-CWxMD37a.mjs.map +1 -0
- package/fesm2022/{module-ChwDH6BC.mjs → module-Ce6F7TNm.mjs} +28 -28
- package/fesm2022/module-Ce6F7TNm.mjs.map +1 -0
- package/fesm2022/{module-DToxyW7l.mjs → module-DzZHEh7B.mjs} +7 -7
- package/fesm2022/module-DzZHEh7B.mjs.map +1 -0
- package/fesm2022/{option-hkPAbXDN.mjs → option-BzhYL_xC.mjs} +15 -15
- package/fesm2022/option-BzhYL_xC.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-DDmgx3P4.mjs} +4 -4
- package/fesm2022/pseudo-checkbox-DDmgx3P4.mjs.map +1 -0
- package/fesm2022/pseudo-checkbox-module-4F8Up4PL.mjs +20 -0
- package/fesm2022/pseudo-checkbox-module-4F8Up4PL.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-BYgV4oZC.mjs} +7 -7
- package/fesm2022/ripple-BYgV4oZC.mjs.map +1 -0
- package/fesm2022/{ripple-loader-Xy4bv6Xh.mjs → ripple-loader-BnMiRtmT.mjs} +5 -5
- package/fesm2022/ripple-loader-BnMiRtmT.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 +35 -31
- 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 +39 -50
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/{structural-styles-DA18Hchc.mjs → structural-styles-CObeNzjn.mjs} +4 -4
- package/fesm2022/structural-styles-CObeNzjn.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 +81 -65
- 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/{index.d-CikM2bbf.d.ts → index.d-DAhBYbjm.d.ts} +1 -1
- 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/{module.d-DMabQ4_c.d.ts → module.d-bebo7gS5.d.ts} +5 -3
- package/package.json +6 -6
- package/paginator/_m2-paginator.scss +16 -17
- package/paginator/_m3-paginator.scss +28 -27
- package/paginator/_paginator-theme.scss +14 -40
- package/paginator/index.d.ts +3 -3
- 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 +2 -2
- 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/select/index.d.ts +3 -3
- 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/stepper/index.d.ts +0 -3
- 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 +11 -5
- package/timepicker/_m2-timepicker.scss +3 -6
- package/timepicker/_m3-timepicker.scss +14 -15
- package/timepicker/_timepicker-theme.scss +20 -45
- package/timepicker/index.d.ts +1 -1
- 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 +0 -22
- package/fesm2022/index-BNtCg9r0.mjs.map +0 -1
- package/fesm2022/index-DxCSjCL3.mjs +0 -20
- 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 +0 -20
- 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/{option.d-BVGX3edu.d.ts → option.d-BcvS44bt.d.ts} +1 -1
package/input/_input-theme.scss
CHANGED
|
@@ -1,35 +1,21 @@
|
|
|
1
1
|
@use '../core/theming/theming';
|
|
2
|
-
@use '../core/theming/inspection';
|
|
3
|
-
@use '../core/theming/validation';
|
|
4
2
|
@use '../core/typography/typography';
|
|
5
3
|
@use '../core/tokens/token-utils';
|
|
6
4
|
|
|
7
5
|
@mixin base($theme) {
|
|
8
|
-
|
|
9
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
10
|
-
} @else {
|
|
11
|
-
}
|
|
6
|
+
// No-op
|
|
12
7
|
}
|
|
13
8
|
|
|
14
9
|
@mixin color($theme) {
|
|
15
|
-
|
|
16
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
17
|
-
} @else {
|
|
18
|
-
}
|
|
10
|
+
// No-op
|
|
19
11
|
}
|
|
20
12
|
|
|
21
13
|
@mixin typography($theme) {
|
|
22
|
-
|
|
23
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
24
|
-
} @else {
|
|
25
|
-
}
|
|
14
|
+
// No-op
|
|
26
15
|
}
|
|
27
16
|
|
|
28
17
|
@mixin density($theme) {
|
|
29
|
-
|
|
30
|
-
// There are no M3 density tokens for this component
|
|
31
|
-
} @else {
|
|
32
|
-
}
|
|
18
|
+
// No-op
|
|
33
19
|
}
|
|
34
20
|
|
|
35
21
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -37,36 +23,17 @@
|
|
|
37
23
|
@return (
|
|
38
24
|
(
|
|
39
25
|
namespace: '',
|
|
40
|
-
tokens: (),
|
|
26
|
+
tokens: token-utils.get-overrides((base: (), color: (), typography: (), density: ()), input),
|
|
41
27
|
),
|
|
42
28
|
);
|
|
43
29
|
}
|
|
44
30
|
|
|
45
31
|
@mixin overrides($tokens: ()) {
|
|
46
|
-
@include token-utils.batch-create-token-values($tokens, _define-overrides()
|
|
32
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
47
33
|
}
|
|
48
34
|
|
|
49
35
|
@mixin theme($theme) {
|
|
50
36
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-input') {
|
|
51
|
-
|
|
52
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
53
|
-
} @else {
|
|
54
|
-
@include base($theme);
|
|
55
|
-
@if inspection.theme-has($theme, color) {
|
|
56
|
-
@include color($theme);
|
|
57
|
-
}
|
|
58
|
-
@if inspection.theme-has($theme, density) {
|
|
59
|
-
@include density($theme);
|
|
60
|
-
}
|
|
61
|
-
@if inspection.theme-has($theme, typography) {
|
|
62
|
-
@include typography($theme);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
37
|
+
// No-op
|
|
65
38
|
}
|
|
66
39
|
}
|
|
67
|
-
|
|
68
|
-
@mixin _theme-from-tokens($tokens) {
|
|
69
|
-
@include validation.selector-defined(
|
|
70
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
71
|
-
);
|
|
72
|
-
}
|
package/list/_list-theme.scss
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
@use '../core/style/sass-utils';
|
|
5
5
|
@use '../core/theming/inspection';
|
|
6
6
|
@use '../core/theming/theming';
|
|
7
|
-
@use '../core/theming/validation';
|
|
8
7
|
@use '../core/tokens/token-utils';
|
|
9
8
|
@use '../core/typography/typography';
|
|
10
9
|
@use '../radio/m2-radio';
|
|
@@ -14,67 +13,49 @@
|
|
|
14
13
|
@mixin base($theme) {
|
|
15
14
|
// Add default values for tokens not related to color, typography, or density.
|
|
16
15
|
@if inspection.get-theme-version($theme) == 1 {
|
|
17
|
-
@include
|
|
16
|
+
@include token-utils.create-token-values(map.get(m3-list.get-tokens($theme), base));
|
|
18
17
|
} @else {
|
|
19
18
|
@include sass-utils.current-selector-or-root() {
|
|
20
|
-
@include token-utils.create-token-values-mixed(
|
|
21
|
-
m2-list.$prefix, m2-list.get-unthemable-tokens());
|
|
19
|
+
@include token-utils.create-token-values-mixed(m2-list.get-unthemable-tokens());
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
@mixin color($theme) {
|
|
27
25
|
@if inspection.get-theme-version($theme) == 1 {
|
|
28
|
-
@include
|
|
26
|
+
@include token-utils.create-token-values(map.get(m3-list.get-tokens($theme), color));
|
|
29
27
|
} @else {
|
|
30
28
|
@include sass-utils.current-selector-or-root() {
|
|
31
|
-
@include token-utils.create-token-values-mixed(
|
|
32
|
-
m2-list.$prefix, m2-list.get-color-tokens($theme));
|
|
29
|
+
@include token-utils.create-token-values-mixed(m2-list.get-color-tokens($theme));
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
.mdc-list-item__start,
|
|
36
33
|
.mdc-list-item__end {
|
|
37
|
-
@include token-utils.create-token-values-mixed(
|
|
38
|
-
m2-radio.$prefix, m2-radio.get-color-tokens($theme, primary));
|
|
34
|
+
@include token-utils.create-token-values-mixed(m2-radio.get-color-tokens($theme, primary));
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
.mat-accent {
|
|
42
38
|
.mdc-list-item__start,
|
|
43
39
|
.mdc-list-item__end {
|
|
44
|
-
@include token-utils.create-token-values-mixed(
|
|
45
|
-
m2-radio.$prefix,
|
|
46
|
-
m2-radio.get-color-tokens($theme, accent)
|
|
47
|
-
);
|
|
40
|
+
@include token-utils.create-token-values-mixed(m2-radio.get-color-tokens($theme, accent));
|
|
48
41
|
}
|
|
49
42
|
}
|
|
50
43
|
|
|
51
44
|
.mat-warn {
|
|
52
45
|
.mdc-list-item__start,
|
|
53
46
|
.mdc-list-item__end {
|
|
54
|
-
@include token-utils.create-token-values-mixed(
|
|
55
|
-
m2-radio.$prefix,
|
|
56
|
-
m2-radio.get-color-tokens($theme, warn)
|
|
57
|
-
);
|
|
47
|
+
@include token-utils.create-token-values-mixed(m2-radio.get-color-tokens($theme, warn));
|
|
58
48
|
}
|
|
59
49
|
}
|
|
60
50
|
|
|
61
51
|
.mat-mdc-list-option {
|
|
62
|
-
@include token-utils.create-token-values-mixed(
|
|
63
|
-
m2-checkbox.$prefix,
|
|
64
|
-
m2-checkbox.get-color-tokens($theme, primary)
|
|
65
|
-
);
|
|
52
|
+
@include token-utils.create-token-values-mixed(m2-checkbox.get-color-tokens($theme, primary));
|
|
66
53
|
}
|
|
67
54
|
.mat-mdc-list-option.mat-accent {
|
|
68
|
-
@include token-utils.create-token-values-mixed(
|
|
69
|
-
m2-checkbox.$prefix,
|
|
70
|
-
m2-checkbox.get-color-tokens($theme, accent)
|
|
71
|
-
);
|
|
55
|
+
@include token-utils.create-token-values-mixed(m2-checkbox.get-color-tokens($theme, accent));
|
|
72
56
|
}
|
|
73
57
|
.mat-mdc-list-option.mat-warn {
|
|
74
|
-
@include token-utils.create-token-values-mixed(
|
|
75
|
-
m2-checkbox.$prefix,
|
|
76
|
-
m2-checkbox.get-color-tokens($theme, warn)
|
|
77
|
-
);
|
|
58
|
+
@include token-utils.create-token-values-mixed(m2-checkbox.get-color-tokens($theme, warn));
|
|
78
59
|
}
|
|
79
60
|
|
|
80
61
|
// There is no token for activated color on nav list.
|
|
@@ -104,20 +85,18 @@
|
|
|
104
85
|
|
|
105
86
|
@mixin density($theme) {
|
|
106
87
|
@if inspection.get-theme-version($theme) == 1 {
|
|
107
|
-
@include token-utils.create-token-values(m3-list
|
|
88
|
+
@include token-utils.create-token-values(map.get(m3-list.get-tokens($theme), density));
|
|
108
89
|
} @else {
|
|
109
90
|
$density-scale: inspection.get-theme-density($theme);
|
|
110
91
|
|
|
111
92
|
@include sass-utils.current-selector-or-root() {
|
|
112
93
|
// TODO: See if this can be removed
|
|
113
|
-
@include token-utils.create-token-values-mixed(
|
|
114
|
-
m2-list.$prefix, m2-list.get-density-tokens($theme));
|
|
94
|
+
@include token-utils.create-token-values-mixed(m2-list.get-density-tokens($theme));
|
|
115
95
|
}
|
|
116
96
|
|
|
117
97
|
.mdc-list-item__start,
|
|
118
98
|
.mdc-list-item__end {
|
|
119
|
-
@include token-utils.create-token-values-mixed(
|
|
120
|
-
m2-radio.$prefix, m2-radio.get-density-tokens($theme));
|
|
99
|
+
@include token-utils.create-token-values-mixed(m2-radio.get-density-tokens($theme));
|
|
121
100
|
}
|
|
122
101
|
|
|
123
102
|
// TODO(mmalerba): This is added to maintain the same style MDC used prior to the token-based
|
|
@@ -161,11 +140,10 @@
|
|
|
161
140
|
|
|
162
141
|
@mixin typography($theme) {
|
|
163
142
|
@if inspection.get-theme-version($theme) == 1 {
|
|
164
|
-
@include
|
|
143
|
+
@include token-utils.create-token-values(map.get(m3-list.get-tokens($theme), typography));
|
|
165
144
|
} @else {
|
|
166
145
|
@include sass-utils.current-selector-or-root() {
|
|
167
|
-
@include token-utils.create-token-values-mixed(
|
|
168
|
-
m2-list.$prefix, m2-list.get-typography-tokens($theme));
|
|
146
|
+
@include token-utils.create-token-values-mixed(m2-list.get-typography-tokens($theme));
|
|
169
147
|
}
|
|
170
148
|
|
|
171
149
|
// MDC does not have tokens for the subheader.
|
|
@@ -181,23 +159,23 @@
|
|
|
181
159
|
@function _define-overrides() {
|
|
182
160
|
@return (
|
|
183
161
|
(
|
|
184
|
-
namespace:
|
|
185
|
-
tokens:
|
|
162
|
+
namespace: list,
|
|
163
|
+
tokens: token-utils.get-overrides(m3-list.get-tokens(), list)
|
|
186
164
|
),
|
|
187
165
|
);
|
|
188
166
|
}
|
|
189
167
|
|
|
190
168
|
@mixin overrides($tokens: ()) {
|
|
191
|
-
|
|
169
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
192
170
|
}
|
|
193
171
|
|
|
194
172
|
@mixin theme($theme) {
|
|
195
173
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-list') {
|
|
196
174
|
@if inspection.get-theme-version($theme) == 1 {
|
|
197
|
-
@include
|
|
198
|
-
@
|
|
199
|
-
|
|
200
|
-
|
|
175
|
+
@include base($theme);
|
|
176
|
+
@include color($theme);
|
|
177
|
+
@include density($theme);
|
|
178
|
+
@include typography($theme);
|
|
201
179
|
} @else {
|
|
202
180
|
@include base($theme);
|
|
203
181
|
@if inspection.theme-has($theme, color) {
|
|
@@ -212,11 +190,3 @@
|
|
|
212
190
|
}
|
|
213
191
|
}
|
|
214
192
|
}
|
|
215
|
-
|
|
216
|
-
@mixin _theme-from-tokens($tokens) {
|
|
217
|
-
@include validation.selector-defined(
|
|
218
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
219
|
-
);
|
|
220
|
-
$mat-list-tokens: token-utils.get-tokens-for($tokens, m2-list.$prefix);
|
|
221
|
-
@include token-utils.create-token-values(m2-list.$prefix, $mat-list-tokens);
|
|
222
|
-
}
|
package/list/_m2-list.scss
CHANGED
|
@@ -3,28 +3,25 @@
|
|
|
3
3
|
@use '../core/theming/inspection';
|
|
4
4
|
@use 'sass:map';
|
|
5
5
|
|
|
6
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
|
-
$prefix: (mat, list);
|
|
8
|
-
|
|
9
6
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
10
7
|
// but may be in a future version of the theming API.
|
|
11
8
|
@function get-unthemable-tokens() {
|
|
12
9
|
@return (
|
|
13
|
-
active-indicator-color: transparent,
|
|
14
|
-
active-indicator-shape: 4px,
|
|
15
|
-
list-item-container-shape: 0,
|
|
16
|
-
list-item-leading-avatar-shape: 50%,
|
|
17
|
-
list-item-container-color: transparent,
|
|
18
|
-
list-item-selected-container-color: transparent,
|
|
19
|
-
list-item-leading-avatar-color: transparent,
|
|
20
|
-
list-item-leading-icon-size: 24px,
|
|
21
|
-
list-item-leading-avatar-size: 40px,
|
|
22
|
-
list-item-trailing-icon-size: 24px,
|
|
23
|
-
list-item-disabled-state-layer-color: transparent,
|
|
24
|
-
list-item-disabled-state-layer-opacity: 0,
|
|
25
|
-
list-item-disabled-label-text-opacity: 0.38,
|
|
26
|
-
list-item-disabled-leading-icon-opacity: 0.38,
|
|
27
|
-
list-item-disabled-trailing-icon-opacity: 0.38,
|
|
10
|
+
list-active-indicator-color: transparent,
|
|
11
|
+
list-active-indicator-shape: 4px,
|
|
12
|
+
list-list-item-container-shape: 0,
|
|
13
|
+
list-list-item-leading-avatar-shape: 50%,
|
|
14
|
+
list-list-item-container-color: transparent,
|
|
15
|
+
list-list-item-selected-container-color: transparent,
|
|
16
|
+
list-list-item-leading-avatar-color: transparent,
|
|
17
|
+
list-list-item-leading-icon-size: 24px,
|
|
18
|
+
list-list-item-leading-avatar-size: 40px,
|
|
19
|
+
list-list-item-trailing-icon-size: 24px,
|
|
20
|
+
list-list-item-disabled-state-layer-color: transparent,
|
|
21
|
+
list-list-item-disabled-state-layer-opacity: 0,
|
|
22
|
+
list-list-item-disabled-label-text-opacity: 0.38,
|
|
23
|
+
list-list-item-disabled-leading-icon-opacity: 0.38,
|
|
24
|
+
list-list-item-disabled-trailing-icon-opacity: 0.38,
|
|
28
25
|
);
|
|
29
26
|
}
|
|
30
27
|
|
|
@@ -39,50 +36,54 @@ $prefix: (mat, list);
|
|
|
39
36
|
$foreground-base, $alpha: if($is-dark, 0.5, 0.38));
|
|
40
37
|
|
|
41
38
|
@return (
|
|
42
|
-
list-item-label-text-color: $foreground-text,
|
|
43
|
-
list-item-supporting-text-color: $foreground-secondary-text,
|
|
44
|
-
list-item-leading-icon-color: $text-icon-on-background,
|
|
45
|
-
list-item-trailing-supporting-text-color: $foreground-hint-text,
|
|
46
|
-
list-item-trailing-icon-color: $text-icon-on-background,
|
|
47
|
-
list-item-selected-trailing-icon-color: $text-icon-on-background,
|
|
48
|
-
list-item-disabled-label-text-color: $foreground-base,
|
|
49
|
-
list-item-disabled-leading-icon-color: $foreground-base,
|
|
50
|
-
list-item-disabled-trailing-icon-color: $foreground-base,
|
|
51
|
-
list-item-hover-label-text-color: $foreground-text,
|
|
52
|
-
list-item-hover-leading-icon-color: $text-icon-on-background,
|
|
53
|
-
list-item-hover-state-layer-color: $foreground-base,
|
|
54
|
-
list-item-hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
55
|
-
list-item-hover-trailing-icon-color: $text-icon-on-background,
|
|
56
|
-
list-item-focus-label-text-color: $foreground-text,
|
|
57
|
-
list-item-focus-state-layer-color: $foreground-base,
|
|
58
|
-
list-item-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
39
|
+
list-list-item-label-text-color: $foreground-text,
|
|
40
|
+
list-list-item-supporting-text-color: $foreground-secondary-text,
|
|
41
|
+
list-list-item-leading-icon-color: $text-icon-on-background,
|
|
42
|
+
list-list-item-trailing-supporting-text-color: $foreground-hint-text,
|
|
43
|
+
list-list-item-trailing-icon-color: $text-icon-on-background,
|
|
44
|
+
list-list-item-selected-trailing-icon-color: $text-icon-on-background,
|
|
45
|
+
list-list-item-disabled-label-text-color: $foreground-base,
|
|
46
|
+
list-list-item-disabled-leading-icon-color: $foreground-base,
|
|
47
|
+
list-list-item-disabled-trailing-icon-color: $foreground-base,
|
|
48
|
+
list-list-item-hover-label-text-color: $foreground-text,
|
|
49
|
+
list-list-item-hover-leading-icon-color: $text-icon-on-background,
|
|
50
|
+
list-list-item-hover-state-layer-color: $foreground-base,
|
|
51
|
+
list-list-item-hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
52
|
+
list-list-item-hover-trailing-icon-color: $text-icon-on-background,
|
|
53
|
+
list-list-item-focus-label-text-color: $foreground-text,
|
|
54
|
+
list-list-item-focus-state-layer-color: $foreground-base,
|
|
55
|
+
list-list-item-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
59
56
|
);
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
63
60
|
@function get-typography-tokens($theme) {
|
|
64
61
|
@return (
|
|
65
|
-
list-item-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
66
|
-
list-item-label-text-line-height:
|
|
67
|
-
|
|
68
|
-
list-item-label-text-
|
|
69
|
-
list-item-label-text-
|
|
70
|
-
|
|
71
|
-
list-item-
|
|
62
|
+
list-list-item-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
63
|
+
list-list-item-label-text-line-height:
|
|
64
|
+
inspection.get-theme-typography($theme, body-1, line-height),
|
|
65
|
+
list-list-item-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
66
|
+
list-list-item-label-text-tracking:
|
|
67
|
+
inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
68
|
+
list-list-item-label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
|
|
69
|
+
list-list-item-supporting-text-font:
|
|
70
|
+
inspection.get-theme-typography($theme, body-2, font-family),
|
|
71
|
+
list-list-item-supporting-text-line-height:inspection.get-theme-typography(
|
|
72
72
|
$theme, body-2, line-height),
|
|
73
|
-
list-item-supporting-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
74
|
-
list-item-supporting-text-tracking: inspection.get-theme-typography(
|
|
73
|
+
list-list-item-supporting-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
74
|
+
list-list-item-supporting-text-tracking: inspection.get-theme-typography(
|
|
75
75
|
$theme, body-2, letter-spacing),
|
|
76
|
-
list-item-supporting-text-weight:
|
|
77
|
-
|
|
76
|
+
list-list-item-supporting-text-weight:
|
|
77
|
+
inspection.get-theme-typography($theme, body-2, font-weight),
|
|
78
|
+
list-list-item-trailing-supporting-text-font: inspection.get-theme-typography(
|
|
78
79
|
$theme, caption, font-family),
|
|
79
|
-
list-item-trailing-supporting-text-line-height: inspection.get-theme-typography(
|
|
80
|
+
list-list-item-trailing-supporting-text-line-height: inspection.get-theme-typography(
|
|
80
81
|
$theme, caption, line-height),
|
|
81
|
-
list-item-trailing-supporting-text-size: inspection.get-theme-typography(
|
|
82
|
+
list-list-item-trailing-supporting-text-size: inspection.get-theme-typography(
|
|
82
83
|
$theme, caption, font-size),
|
|
83
|
-
list-item-trailing-supporting-text-tracking: inspection.get-theme-typography(
|
|
84
|
+
list-list-item-trailing-supporting-text-tracking: inspection.get-theme-typography(
|
|
84
85
|
$theme, caption, letter-spacing),
|
|
85
|
-
list-item-trailing-supporting-text-weight: inspection.get-theme-typography(
|
|
86
|
+
list-list-item-trailing-supporting-text-weight: inspection.get-theme-typography(
|
|
86
87
|
$theme, caption, font-weight),
|
|
87
88
|
);
|
|
88
89
|
}
|
|
@@ -92,9 +93,9 @@ $prefix: (mat, list);
|
|
|
92
93
|
$scale: inspection.get-theme-density($theme);
|
|
93
94
|
|
|
94
95
|
@return (
|
|
95
|
-
list-item-leading-icon-start-space: 16px,
|
|
96
|
-
list-item-leading-icon-end-space: 32px,
|
|
97
|
-
list-item-one-line-container-height: map.get((
|
|
96
|
+
list-list-item-leading-icon-start-space: 16px,
|
|
97
|
+
list-list-item-leading-icon-end-space: 32px,
|
|
98
|
+
list-list-item-one-line-container-height: map.get((
|
|
98
99
|
0: 48px,
|
|
99
100
|
-1: 44px,
|
|
100
101
|
-2: 40px,
|
|
@@ -102,7 +103,7 @@ $prefix: (mat, list);
|
|
|
102
103
|
-4: 32px,
|
|
103
104
|
-5: 24px,
|
|
104
105
|
), $scale),
|
|
105
|
-
list-item-two-line-container-height: map.get((
|
|
106
|
+
list-list-item-two-line-container-height: map.get((
|
|
106
107
|
0: 64px,
|
|
107
108
|
-1: 60px,
|
|
108
109
|
-2: 56px,
|
|
@@ -110,7 +111,7 @@ $prefix: (mat, list);
|
|
|
110
111
|
-4: 48px,
|
|
111
112
|
-5: 48px,
|
|
112
113
|
), $scale),
|
|
113
|
-
list-item-three-line-container-height: map.get((
|
|
114
|
+
list-list-item-three-line-container-height: map.get((
|
|
114
115
|
0: 88px,
|
|
115
116
|
-1: 84px,
|
|
116
117
|
-2: 80px,
|
package/list/_m3-list.scss
CHANGED
|
@@ -3,16 +3,12 @@
|
|
|
3
3
|
@use '../core/tokens/m3-utils';
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
5
|
@use '../core/theming/inspection';
|
|
6
|
-
|
|
7
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
8
|
-
$prefix: (mat, list);
|
|
6
|
+
@use '../core/tokens/m3';
|
|
9
7
|
|
|
10
8
|
/// Generates custom tokens for the mat-list.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/// @return {Map} A set of custom tokens for the mat-list
|
|
15
|
-
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
9
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
10
|
+
$system: m3-utils.get-system($theme);
|
|
11
|
+
|
|
16
12
|
// list-item-container-color
|
|
17
13
|
// This does not match the spec, which defines this to be `md.sys.color.surface`.
|
|
18
14
|
// However, this interferes with the use case of placing a list on other components. For example,
|
|
@@ -22,71 +18,77 @@ $prefix: (mat, list);
|
|
|
22
18
|
// list-item-leading-icon-size
|
|
23
19
|
// Match spec, which has list-item-leading-icon-size of 24px.
|
|
24
20
|
// Current version of tokens (0_161) has 18px.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
21
|
+
@return (
|
|
22
|
+
base: (),
|
|
23
|
+
color: (
|
|
24
|
+
list-active-indicator-color: map.get($system, secondary-container),
|
|
25
|
+
list-active-indicator-shape: map.get($system, corner-full),
|
|
26
|
+
list-list-item-container-color: transparent,
|
|
27
|
+
list-list-item-container-shape: map.get($system, corner-none),
|
|
28
|
+
list-list-item-disabled-label-text-color: map.get($system, on-surface),
|
|
29
|
+
list-list-item-disabled-label-text-opacity: 0.3,
|
|
30
|
+
list-list-item-disabled-leading-icon-color: map.get($system, on-surface),
|
|
31
|
+
list-list-item-disabled-leading-icon-opacity: 0.38,
|
|
32
|
+
list-list-item-disabled-state-layer-color: map.get($system, on-surface),
|
|
33
|
+
list-list-item-disabled-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
34
|
+
list-list-item-disabled-trailing-icon-color: map.get($system, on-surface),
|
|
35
|
+
list-list-item-disabled-trailing-icon-opacity: 0.38,
|
|
36
|
+
list-list-item-focus-label-text-color: map.get($system, on-surface),
|
|
37
|
+
list-list-item-focus-state-layer-color: map.get($system, on-surface),
|
|
38
|
+
list-list-item-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
39
|
+
list-list-item-hover-label-text-color: map.get($system, on-surface),
|
|
40
|
+
list-list-item-hover-state-layer-color: map.get($system, on-surface),
|
|
41
|
+
list-list-item-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
42
|
+
list-list-item-label-text-color: map.get($system, on-surface),
|
|
43
|
+
list-list-item-leading-avatar-color: map.get($system, primary-container),
|
|
44
|
+
list-list-item-leading-avatar-shape: map.get($system, corner-full),
|
|
45
|
+
list-list-item-leading-avatar-size: 40px,
|
|
46
|
+
list-list-item-leading-icon-color: map.get($system, on-surface-variant),
|
|
47
|
+
list-list-item-leading-icon-size: 24px,
|
|
48
|
+
list-list-item-selected-trailing-icon-color: map.get($system, primary),
|
|
49
|
+
list-list-item-supporting-text-color: map.get($system, on-surface-variant),
|
|
50
|
+
list-list-item-trailing-icon-color: map.get($system, on-surface-variant),
|
|
51
|
+
list-list-item-trailing-icon-size: 24px,
|
|
52
|
+
list-list-item-trailing-supporting-text-color: map.get($system, on-surface-variant),
|
|
53
|
+
list-list-item-selected-container-color: null,
|
|
54
|
+
list-list-item-hover-leading-icon-color: null,
|
|
55
|
+
list-list-item-hover-trailing-icon-color: null,
|
|
56
|
+
),
|
|
57
|
+
typography: (
|
|
58
|
+
list-list-item-label-text-font: map.get($system, body-large-font),
|
|
59
|
+
list-list-item-label-text-line-height: map.get($system, body-large-line-height),
|
|
60
|
+
list-list-item-label-text-size: map.get($system, body-large-size),
|
|
61
|
+
list-list-item-label-text-tracking: map.get($system, body-large-tracking),
|
|
62
|
+
list-list-item-label-text-weight: map.get($system, body-large-weight),
|
|
63
|
+
list-list-item-supporting-text-font: map.get($system, body-medium-font),
|
|
64
|
+
list-list-item-supporting-text-line-height: map.get($system, body-medium-line-height),
|
|
65
|
+
list-list-item-supporting-text-size: map.get($system, body-medium-size),
|
|
66
|
+
list-list-item-supporting-text-tracking: map.get($system, body-medium-tracking),
|
|
67
|
+
list-list-item-supporting-text-weight: map.get($system, body-medium-weight),
|
|
68
|
+
list-list-item-trailing-supporting-text-font: map.get($system, label-small-font),
|
|
69
|
+
list-list-item-trailing-supporting-text-line-height:
|
|
70
|
+
map.get($system, label-small-line-height),
|
|
71
|
+
list-list-item-trailing-supporting-text-size: map.get($system, label-small-size),
|
|
72
|
+
list-list-item-trailing-supporting-text-tracking: map.get($system, label-small-tracking),
|
|
73
|
+
list-list-item-trailing-supporting-text-weight: map.get($system, label-small-weight),
|
|
74
|
+
),
|
|
75
|
+
density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
|
|
75
76
|
);
|
|
76
|
-
|
|
77
|
-
@return m3-utils.namespace($prefix, $tokens, $token-slots);
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
81
|
-
@function get-density-tokens($
|
|
82
|
-
$scale: theming.clamp-density(
|
|
80
|
+
@function get-density-tokens($scale) {
|
|
81
|
+
$scale: theming.clamp-density($scale, -5);
|
|
83
82
|
$index: ($scale * -1) + 1;
|
|
84
83
|
|
|
85
84
|
@return (
|
|
86
|
-
list-item-leading-icon-start-space: list.nth((16px, 12px, 8px, 4px, 4px, 4px), $index),
|
|
87
|
-
list-item-leading-icon-end-space: list.nth((16px, 12px, 8px, 4px, 4px, 4px), $index),
|
|
88
|
-
list-item-one-line-container-height:
|
|
89
|
-
|
|
90
|
-
list-item-
|
|
85
|
+
list-list-item-leading-icon-start-space: list.nth((16px, 12px, 8px, 4px, 4px, 4px), $index),
|
|
86
|
+
list-list-item-leading-icon-end-space: list.nth((16px, 12px, 8px, 4px, 4px, 4px), $index),
|
|
87
|
+
list-list-item-one-line-container-height:
|
|
88
|
+
list.nth((48px, 44px, 40px, 36px, 32px, 24px), $index),
|
|
89
|
+
list-list-item-two-line-container-height:
|
|
90
|
+
list.nth((64px, 60px, 56px, 52px, 48px, 48px), $index),
|
|
91
|
+
list-list-item-three-line-container-height:
|
|
92
|
+
list.nth((88px, 84px, 80px, 76px, 72px, 56px), $index),
|
|
91
93
|
);
|
|
92
94
|
}
|
package/menu/_m2-menu.scss
CHANGED
|
@@ -3,26 +3,23 @@
|
|
|
3
3
|
@use '../core/style/sass-utils';
|
|
4
4
|
@use '../core/style/elevation';
|
|
5
5
|
|
|
6
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
|
-
$prefix: (mat, menu);
|
|
8
|
-
|
|
9
6
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
10
7
|
// but may be in a future version of the theming API.
|
|
11
8
|
@function get-unthemable-tokens() {
|
|
12
9
|
@return (
|
|
13
|
-
container-shape: 4px,
|
|
14
|
-
divider-bottom-spacing: 0,
|
|
15
|
-
divider-top-spacing: 0,
|
|
16
|
-
item-spacing: 16px,
|
|
17
|
-
item-icon-size: 24px,
|
|
18
|
-
item-leading-spacing: 16px,
|
|
19
|
-
item-trailing-spacing: 16px,
|
|
20
|
-
item-with-icon-leading-spacing: 16px,
|
|
21
|
-
item-with-icon-trailing-spacing: 16px,
|
|
22
|
-
container-elevation-shadow: elevation.get-box-shadow(8),
|
|
10
|
+
menu-container-shape: 4px,
|
|
11
|
+
menu-divider-bottom-spacing: 0,
|
|
12
|
+
menu-divider-top-spacing: 0,
|
|
13
|
+
menu-item-spacing: 16px,
|
|
14
|
+
menu-item-icon-size: 24px,
|
|
15
|
+
menu-item-leading-spacing: 16px,
|
|
16
|
+
menu-item-trailing-spacing: 16px,
|
|
17
|
+
menu-item-with-icon-leading-spacing: 16px,
|
|
18
|
+
menu-item-with-icon-trailing-spacing: 16px,
|
|
19
|
+
menu-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
23
20
|
|
|
24
21
|
// Unused
|
|
25
|
-
base-elevation-level: null,
|
|
22
|
+
menu-base-elevation-level: null,
|
|
26
23
|
);
|
|
27
24
|
}
|
|
28
25
|
|
|
@@ -34,23 +31,23 @@ $prefix: (mat, menu);
|
|
|
34
31
|
$text-color: inspection.get-theme-color($theme, foreground, text);
|
|
35
32
|
|
|
36
33
|
@return (
|
|
37
|
-
item-label-text-color: $text-color,
|
|
38
|
-
item-icon-color: $text-color,
|
|
39
|
-
item-hover-state-layer-color: $active-state-layer-color,
|
|
40
|
-
item-focus-state-layer-color: $active-state-layer-color,
|
|
41
|
-
container-color: inspection.get-theme-color($theme, background, card),
|
|
42
|
-
divider-color: inspection.get-theme-color($theme, foreground, divider),
|
|
34
|
+
menu-item-label-text-color: $text-color,
|
|
35
|
+
menu-item-icon-color: $text-color,
|
|
36
|
+
menu-item-hover-state-layer-color: $active-state-layer-color,
|
|
37
|
+
menu-item-focus-state-layer-color: $active-state-layer-color,
|
|
38
|
+
menu-container-color: inspection.get-theme-color($theme, background, card),
|
|
39
|
+
menu-divider-color: inspection.get-theme-color($theme, foreground, divider),
|
|
43
40
|
);
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
47
44
|
@function get-typography-tokens($theme) {
|
|
48
45
|
@return (
|
|
49
|
-
item-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
50
|
-
item-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
51
|
-
item-label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
52
|
-
item-label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
53
|
-
item-label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
|
|
46
|
+
menu-item-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
47
|
+
menu-item-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
48
|
+
menu-item-label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
49
|
+
menu-item-label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
50
|
+
menu-item-label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
|
|
54
51
|
);
|
|
55
52
|
}
|
|
56
53
|
|