@angular/material 20.0.0-rc.0 → 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 +26 -39
- package/badge/_m2-badge.scss +32 -35
- package/badge/_m3-badge.scss +41 -70
- 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/color/_all-color.scss +1 -1
- 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/_all-theme.scss +41 -0
- package/core/theming/_color-api-backwards-compatibility.scss +49 -35
- package/core/theming/_definition.scss +78 -72
- package/core/theming/_inspection.scss +23 -46
- package/core/tokens/_m3-system.scss +106 -112
- package/core/tokens/_m3-tokens.scss +30 -354
- package/core/tokens/_m3-utils.scss +36 -73
- package/core/tokens/_token-utils.scss +53 -226
- package/core/tokens/m3/_index.scss +7 -8
- package/core/tokens/m3/_md-sys-color.scss +125 -137
- package/core/tokens/m3/_md-sys-elevation.scss +7 -7
- package/core/tokens/m3/_md-sys-motion.scss +27 -38
- package/core/tokens/m3/_md-sys-shape.scss +13 -16
- package/core/tokens/m3/_md-sys-state.scss +5 -5
- package/core/tokens/m3/_md-sys-typescale.scss +107 -306
- 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 +20 -24
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +21 -21
- 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-DZl8g1kc.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-BWOa3B4G.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-B3aq6ikj.mjs → form-field-Cdw3iYrm.mjs} +70 -62
- 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-DH8TBWWr.mjs → icon-button-D5zzuoJc.mjs} +10 -10
- package/fesm2022/icon-button-D5zzuoJc.mjs.map +1 -0
- package/fesm2022/{icon-registry-Bk5cM8Z5.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-CrjYeoWX.mjs +22 -0
- package/fesm2022/index-CrjYeoWX.mjs.map +1 -0
- package/fesm2022/index-DTIUI_kX.mjs +20 -0
- 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-DVvKYBKJ.mjs → internal-form-field-B9_shC5z.mjs} +4 -4
- package/fesm2022/internal-form-field-B9_shC5z.mjs.map +1 -0
- package/fesm2022/{line-Dwrcg_t9.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-hX_hFZhs.mjs → module-CVpKZX1V.mjs} +7 -7
- package/fesm2022/module-CVpKZX1V.mjs.map +1 -0
- package/fesm2022/{module-B-ci3hbc.mjs → module-CdXqcjot.mjs} +28 -28
- package/fesm2022/module-CdXqcjot.mjs.map +1 -0
- package/fesm2022/{module-X29xYsIk.mjs → module-CwYXiMoV.mjs} +12 -12
- package/fesm2022/module-CwYXiMoV.mjs.map +1 -0
- package/fesm2022/{module-D9IKGg_w.mjs → module-r2U_2G3G.mjs} +17 -17
- package/fesm2022/module-r2U_2G3G.mjs.map +1 -0
- package/fesm2022/{option-MOeehkAg.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-BFGIaGxz.mjs → pseudo-checkbox-DQugCpur.mjs} +4 -4
- package/fesm2022/pseudo-checkbox-DQugCpur.mjs.map +1 -0
- package/fesm2022/pseudo-checkbox-module-BXWS_-PP.mjs +20 -0
- 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-CuyVtN3V.mjs → ripple-BtLhcfGO.mjs} +7 -7
- package/fesm2022/ripple-BtLhcfGO.mjs.map +1 -0
- package/fesm2022/{ripple-loader-pOctSZby.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-CasigI3l.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/form-field/index.d.ts +2 -2
- package/{form-field.d-CIxjiZIX.d.ts → form-field.d-C6p5uYjG.d.ts} +4 -2
- 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/input/index.d.ts +4 -4
- 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-CDrqNC7Q.d.ts → module.d-D1Ym5Wf2.d.ts} +1 -1
- package/{module.d-DZ8DPHcV.d.ts → module.d-DMabQ4_c.d.ts} +2 -2
- 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/paginator/index.d.ts +5 -5
- package/{paginator.d-Ci_wE-RV.d.ts → paginator.d-DuJ-oYgT.d.ts} +1 -1
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.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-generate/theme-color/index_bundled.js +2 -2
- package/schematics/ng-generate/theme-color/index_bundled.js.map +1 -1
- package/schematics/ng-update/index_bundled.js +56 -2
- 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/table/_m2-table.scss +25 -26
- package/table/_m3-table.scss +36 -27
- package/table/_table-theme.scss +15 -32
- package/table/index.d.ts +2 -2
- 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/core/tokens/m3/_md-ref-palette.scss +0 -100
- package/core/tokens/m3/_md-ref-typeface.scss +0 -14
- package/fesm2022/common-module-DZl8g1kc.mjs.map +0 -1
- package/fesm2022/error-options-BWOa3B4G.mjs.map +0 -1
- package/fesm2022/form-field-B3aq6ikj.mjs.map +0 -1
- package/fesm2022/icon-button-DH8TBWWr.mjs.map +0 -1
- package/fesm2022/icon-registry-Bk5cM8Z5.mjs.map +0 -1
- package/fesm2022/index-BHJ4tVIe.mjs +0 -22
- package/fesm2022/index-BHJ4tVIe.mjs.map +0 -1
- package/fesm2022/index-D2rZ0V78.mjs +0 -20
- package/fesm2022/index-D2rZ0V78.mjs.map +0 -1
- package/fesm2022/internal-form-field-DVvKYBKJ.mjs.map +0 -1
- package/fesm2022/line-Dwrcg_t9.mjs.map +0 -1
- package/fesm2022/module-B-ci3hbc.mjs.map +0 -1
- package/fesm2022/module-D9IKGg_w.mjs.map +0 -1
- package/fesm2022/module-X29xYsIk.mjs.map +0 -1
- package/fesm2022/module-hX_hFZhs.mjs.map +0 -1
- package/fesm2022/option-MOeehkAg.mjs.map +0 -1
- package/fesm2022/pseudo-checkbox-BFGIaGxz.mjs.map +0 -1
- package/fesm2022/pseudo-checkbox-module-Dxth-mPi.mjs +0 -20
- package/fesm2022/pseudo-checkbox-module-Dxth-mPi.mjs.map +0 -1
- package/fesm2022/ripple-CuyVtN3V.mjs.map +0 -1
- package/fesm2022/ripple-loader-pOctSZby.mjs.map +0 -1
- package/fesm2022/structural-styles-CasigI3l.mjs.map +0 -1
- package/schematics/tsconfig.json +0 -26
|
@@ -24,92 +24,109 @@
|
|
|
24
24
|
$_overrides-only: true;
|
|
25
25
|
|
|
26
26
|
@mixin _color-variant-styles($theme, $color-variant) {
|
|
27
|
-
$primary
|
|
28
|
-
|
|
29
|
-
// Some components use the secondary color rather than primary color for `.mat-primary`.
|
|
30
|
-
// Those components should use the $secondary-color-variant.
|
|
31
|
-
$secondary-options: (
|
|
32
|
-
color-variant: if($color-variant == primary, secondary, $color-variant),
|
|
33
|
-
emit-overrides-only: $_overrides-only
|
|
34
|
-
);
|
|
27
|
+
$secondary-when-primary: if($color-variant == primary, secondary, $color-variant);
|
|
35
28
|
|
|
36
29
|
& {
|
|
37
|
-
@
|
|
30
|
+
@if ($color-variant != primary) {
|
|
31
|
+
@include option-theme.color($theme, $secondary-when-primary);
|
|
32
|
+
}
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
& {
|
|
41
|
-
@
|
|
36
|
+
@if ($color-variant != primary) {
|
|
37
|
+
@include progress-spinner-theme.color($theme, $color-variant);
|
|
38
|
+
}
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
& {
|
|
45
|
-
@
|
|
42
|
+
@if ($color-variant != primary) {
|
|
43
|
+
@include pseudo-checkbox-theme.color($theme, $color-variant);
|
|
44
|
+
}
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
& {
|
|
49
|
-
@include stepper-theme.color($theme, $
|
|
48
|
+
@include stepper-theme.color($theme, $color-variant);
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
&.mat-icon {
|
|
53
|
-
@include icon-theme.color($theme, $
|
|
52
|
+
@include icon-theme.color($theme, $color-variant);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
&.mat-mdc-checkbox {
|
|
57
|
-
@
|
|
56
|
+
@if ($color-variant != primary) {
|
|
57
|
+
@include checkbox-theme.color($theme, $color-variant);
|
|
58
|
+
}
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
&.mat-mdc-slider {
|
|
61
|
-
@
|
|
62
|
+
@if ($color-variant != primary) {
|
|
63
|
+
@include slider-theme.color($theme, $color-variant);
|
|
64
|
+
}
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
&.mat-mdc-tab-group,
|
|
65
68
|
&.mat-mdc-tab-nav-bar {
|
|
66
|
-
|
|
69
|
+
@include tabs-theme.color($theme, $color-variant);
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
&.mat-mdc-slide-toggle {
|
|
70
|
-
@include slide-toggle-theme.color($theme, $
|
|
73
|
+
@include slide-toggle-theme.color($theme, $color-variant);
|
|
71
74
|
}
|
|
72
75
|
|
|
73
76
|
&.mat-mdc-form-field {
|
|
74
|
-
@
|
|
77
|
+
@if ($color-variant != primary) {
|
|
78
|
+
@include select-theme.color($theme, $color-variant);
|
|
79
|
+
}
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
&.mat-mdc-radio-button {
|
|
78
|
-
@
|
|
83
|
+
@if ($color-variant != primary) {
|
|
84
|
+
@include radio-theme.color($theme, $color-variant);
|
|
85
|
+
}
|
|
79
86
|
}
|
|
80
87
|
|
|
81
88
|
&.mat-mdc-progress-bar {
|
|
82
|
-
@
|
|
89
|
+
@if ($color-variant != primary) {
|
|
90
|
+
@include progress-bar-theme.color($theme, $color-variant);
|
|
91
|
+
}
|
|
83
92
|
}
|
|
84
93
|
|
|
85
94
|
&.mat-mdc-form-field {
|
|
86
|
-
@
|
|
95
|
+
@if ($color-variant != primary) {
|
|
96
|
+
@include form-field-theme.color($theme, $color-variant);
|
|
97
|
+
}
|
|
87
98
|
}
|
|
88
99
|
|
|
89
100
|
&.mat-datepicker-content {
|
|
90
|
-
@include datepicker-theme.color($theme, $
|
|
101
|
+
@include datepicker-theme.color($theme, $color-variant);
|
|
91
102
|
}
|
|
92
103
|
|
|
93
104
|
&.mat-mdc-button-base {
|
|
94
|
-
@
|
|
95
|
-
|
|
105
|
+
@if ($color-variant != primary) {
|
|
106
|
+
@include button-theme.color($theme, $color-variant);
|
|
107
|
+
}
|
|
108
|
+
@include icon-button-theme.color($theme, $color-variant);
|
|
96
109
|
}
|
|
97
110
|
|
|
98
111
|
&.mat-mdc-standard-chip {
|
|
99
|
-
@
|
|
112
|
+
@if ($color-variant != primary) {
|
|
113
|
+
@include chips-theme.color($theme, $secondary-when-primary);
|
|
114
|
+
}
|
|
100
115
|
}
|
|
101
116
|
|
|
102
117
|
.mdc-list-item__start,
|
|
103
118
|
.mdc-list-item__end {
|
|
104
|
-
@
|
|
105
|
-
|
|
119
|
+
@if ($color-variant != primary) {
|
|
120
|
+
@include checkbox-theme.color($theme, $color-variant);
|
|
121
|
+
@include radio-theme.color($theme, $color-variant);
|
|
122
|
+
}
|
|
106
123
|
}
|
|
107
124
|
|
|
108
125
|
// M3 dropped support for warn/error color FABs.
|
|
109
|
-
@if $color-variant != error {
|
|
126
|
+
@if $color-variant != error and $color-variant != primary {
|
|
110
127
|
&.mat-mdc-fab,
|
|
111
128
|
&.mat-mdc-mini-fab {
|
|
112
|
-
@include fab-theme.color($theme, $
|
|
129
|
+
@include fab-theme.color($theme, $color-variant);
|
|
113
130
|
}
|
|
114
131
|
}
|
|
115
132
|
}
|
|
@@ -119,23 +136,20 @@ $_overrides-only: true;
|
|
|
119
136
|
@include _color-variant-styles($theme, primary);
|
|
120
137
|
}
|
|
121
138
|
.mat-badge {
|
|
122
|
-
@include badge-theme.color($theme, $color-variant: primary
|
|
123
|
-
$emit-overrides-only: $_overrides-only);
|
|
139
|
+
@include badge-theme.color($theme, $color-variant: primary);
|
|
124
140
|
}
|
|
125
141
|
|
|
126
142
|
.mat-accent {
|
|
127
143
|
@include _color-variant-styles($theme, tertiary);
|
|
128
144
|
}
|
|
129
145
|
.mat-badge-accent {
|
|
130
|
-
@include badge-theme.color($theme, $color-variant: tertiary
|
|
131
|
-
$emit-overrides-only: $_overrides-only);
|
|
146
|
+
@include badge-theme.color($theme, $color-variant: tertiary);
|
|
132
147
|
}
|
|
133
148
|
|
|
134
149
|
.mat-warn {
|
|
135
150
|
@include _color-variant-styles($theme, error);
|
|
136
151
|
}
|
|
137
152
|
.mat-badge-warn {
|
|
138
|
-
@include badge-theme.color($theme, $color-variant: error
|
|
139
|
-
$emit-overrides-only: $_overrides-only);
|
|
153
|
+
@include badge-theme.color($theme, $color-variant: error);
|
|
140
154
|
}
|
|
141
155
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@use './palettes';
|
|
6
6
|
@use '../tokens/m3-tokens';
|
|
7
7
|
@use './config-validation';
|
|
8
|
+
@use '../tokens/m3';
|
|
8
9
|
|
|
9
10
|
// Prefix used for component token fallback variables, e.g.
|
|
10
11
|
// `color: var(--mat-text-button-label-text-color, var(--mat-sys-primary));`
|
|
@@ -18,6 +19,7 @@ $system-level-prefix: mat-sys;
|
|
|
18
19
|
|
|
19
20
|
/// Map key used to store internals of theme config.
|
|
20
21
|
$internals: _mat-theming-internals-do-not-access;
|
|
22
|
+
|
|
21
23
|
/// The theme version of generated themes.
|
|
22
24
|
$theme-version: 1;
|
|
23
25
|
|
|
@@ -30,97 +32,101 @@ $theme-version: 1;
|
|
|
30
32
|
@error $err;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
$color-config: map.get($config, color) or ();
|
|
36
|
+
$typography-config: map.get($config, typography) or ();
|
|
37
|
+
$density-config: map.get($config, density) or ();
|
|
38
|
+
|
|
39
|
+
// colors
|
|
40
|
+
$type: map.get($color-config, theme-type) or light;
|
|
41
|
+
$primary: map.get($color-config, primary) or palettes.$violet-palette;
|
|
42
|
+
$tertiary: map.get($color-config, tertiary) or $primary;
|
|
43
|
+
$color-system-variables-prefix:
|
|
44
|
+
map.get($color-config, system-variables-prefix) or $system-level-prefix;
|
|
45
|
+
sass-utils.$use-system-color-variables: map.get($color-config, use-system-variables) or false;
|
|
46
|
+
|
|
47
|
+
$palettes: (
|
|
48
|
+
primary: map.remove($primary, neutral, neutral-variant, secondary),
|
|
49
|
+
secondary: map.get($primary, secondary),
|
|
50
|
+
tertiary: map.remove($tertiary, neutral, neutral-variant, secondary, error),
|
|
51
|
+
neutral: map.get($primary, neutral),
|
|
52
|
+
neutral-variant: map.get($primary, neutral-variant),
|
|
53
|
+
error: map.get($primary, error),
|
|
38
54
|
);
|
|
39
|
-
}
|
|
40
55
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
$
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
// typography
|
|
57
|
+
$default-plain: (Roboto, sans-serif);
|
|
58
|
+
$default-brand: $default-plain;
|
|
59
|
+
$plain: map.get($typography-config, plain-family) or $default-plain;
|
|
60
|
+
$brand: map.get($typography-config, brand-family) or $default-brand;
|
|
61
|
+
$bold: map.get($typography-config, bold-weight) or 700;
|
|
62
|
+
$medium: map.get($typography-config, medium-weight) or 500;
|
|
63
|
+
$regular: map.get($typography-config, regular-weight) or 400;
|
|
64
|
+
$typography-system-variables-prefix: map.get($typography-config, system-variables-prefix) or
|
|
65
|
+
$system-level-prefix;
|
|
66
|
+
sass-utils.$use-system-typography-variables:
|
|
67
|
+
map.get($typography-config, use-system-variables) or false;
|
|
68
|
+
$typography: (
|
|
69
|
+
plain: $plain,
|
|
70
|
+
brand: $brand,
|
|
71
|
+
bold: $bold,
|
|
72
|
+
medium: $medium,
|
|
73
|
+
regular: $regular,
|
|
74
|
+
);
|
|
49
75
|
|
|
50
|
-
|
|
51
|
-
$
|
|
52
|
-
$tertiary: map.get($config, tertiary) or $primary;
|
|
53
|
-
$system-variables-prefix: map.get($config, system-variables-prefix) or $system-level-prefix;
|
|
54
|
-
sass-utils.$use-system-color-variables: map.get($config, use-system-variables) or false;
|
|
76
|
+
// density
|
|
77
|
+
$density-scale: map.get($density-config, scale) or 0;
|
|
55
78
|
|
|
56
79
|
@return (
|
|
57
80
|
$internals: (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
81
|
+
base-tokens: m3-tokens.generate-base-tokens(),
|
|
82
|
+
color-system-variables-prefix: $color-system-variables-prefix,
|
|
83
|
+
color-tokens:
|
|
84
|
+
m3-tokens.generate-color-tokens($type, $palettes, $color-system-variables-prefix),
|
|
85
|
+
density-scale: $density-scale,
|
|
86
|
+
font-definition: $typography,
|
|
87
|
+
md-sys-color: m3-tokens.get-sys-color($type, $palettes, $color-system-variables-prefix),
|
|
88
|
+
md-sys-elevation: m3.md-sys-elevation-values(),
|
|
89
|
+
md-sys-motion: m3.md-sys-motion-values(),
|
|
90
|
+
md-sys-shape: m3.md-sys-shape-values(),
|
|
91
|
+
md-sys-state: m3.md-sys-state-values(),
|
|
92
|
+
md-ref-palette: (
|
|
93
|
+
// Form field native select option text color
|
|
94
|
+
neutral10: map.get($palettes, neutral, 10),
|
|
95
|
+
// Sidenav scrim (container background shadow when opened),
|
|
96
|
+
neutral-variant20: map.get($palettes, neutral-variant, 20),
|
|
67
97
|
),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
98
|
+
md-sys-typescale:
|
|
99
|
+
m3-tokens.get-sys-typeface($typography, $typography-system-variables-prefix),
|
|
100
|
+
palettes: $palettes,
|
|
101
|
+
theme-type: $type,
|
|
102
|
+
theme-version: $theme-version,
|
|
103
|
+
typography-system-variables-prefix: $typography-system-variables-prefix,
|
|
104
|
+
typography-tokens:
|
|
105
|
+
m3-tokens.generate-typography-tokens($typography, $typography-system-variables-prefix),
|
|
71
106
|
)
|
|
72
107
|
);
|
|
73
108
|
}
|
|
74
109
|
|
|
110
|
+
/// Defines an Angular Material theme object with color settings.
|
|
111
|
+
/// @param {Map} $config The color configuration
|
|
112
|
+
/// @return {Map} A theme object
|
|
113
|
+
/// @deprecated Use define-theme with a map using the "color" key
|
|
114
|
+
@function define-colors($config: ()) {
|
|
115
|
+
@return define-theme((color: $config));
|
|
116
|
+
}
|
|
117
|
+
|
|
75
118
|
/// Defines an Angular Material theme object with typography settings.
|
|
76
119
|
/// @param {Map} $config The typography configuration
|
|
77
120
|
/// @return {Map} A theme object
|
|
121
|
+
/// @deprecated Use define-theme with a map using the "typography" key
|
|
78
122
|
@function define-typography($config: ()) {
|
|
79
|
-
|
|
80
|
-
@if $err {
|
|
81
|
-
@error $err;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
$plain: map.get($config, plain-family) or (Roboto, sans-serif);
|
|
85
|
-
$brand: map.get($config, brand-family) or $plain;
|
|
86
|
-
$bold: map.get($config, bold-weight) or 700;
|
|
87
|
-
$medium: map.get($config, medium-weight) or 500;
|
|
88
|
-
$regular: map.get($config, regular-weight) or 400;
|
|
89
|
-
$system-variables-prefix: map.get($config, system-variables-prefix) or $system-level-prefix;
|
|
90
|
-
sass-utils.$use-system-typography-variables: map.get($config, use-system-variables) or false;
|
|
91
|
-
|
|
92
|
-
@return (
|
|
93
|
-
$internals: (
|
|
94
|
-
theme-version: $theme-version,
|
|
95
|
-
font-definition: (
|
|
96
|
-
plain: $plain,
|
|
97
|
-
brand: $brand,
|
|
98
|
-
bold: $bold,
|
|
99
|
-
medium: $medium,
|
|
100
|
-
regular: $regular,
|
|
101
|
-
),
|
|
102
|
-
typography-system-variables-prefix: $system-variables-prefix,
|
|
103
|
-
typography-tokens: m3-tokens.generate-typography-tokens(
|
|
104
|
-
$brand, $plain, $bold, $medium, $regular, $system-variables-prefix)
|
|
105
|
-
)
|
|
106
|
-
);
|
|
123
|
+
@return define-theme((typography: $config));
|
|
107
124
|
}
|
|
108
125
|
|
|
109
126
|
/// Defines an Angular Material theme object with density settings.
|
|
110
127
|
/// @param {Map} $config The density configuration
|
|
111
128
|
/// @return {Map} A theme object
|
|
129
|
+
/// @deprecated Use define-theme with a map using the "density" key
|
|
112
130
|
@function define-density($config: ()) {
|
|
113
|
-
|
|
114
|
-
@if $err {
|
|
115
|
-
@error $err;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
$density-scale: map.get($config, scale) or 0;
|
|
119
|
-
|
|
120
|
-
@return (
|
|
121
|
-
$internals: (
|
|
122
|
-
theme-version: $theme-version,
|
|
123
|
-
density-scale: $density-scale,
|
|
124
|
-
)
|
|
125
|
-
);
|
|
131
|
+
@return define-theme((density: $config));
|
|
126
132
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@use '../style/validation';
|
|
4
4
|
@use './m2-inspection';
|
|
5
5
|
|
|
6
|
-
$
|
|
6
|
+
$internals: _mat-theming-internals-do-not-access;
|
|
7
7
|
|
|
8
8
|
$_m3-typescales: (
|
|
9
9
|
display-large,
|
|
@@ -30,7 +30,7 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
30
30
|
/// @return {Boolean|Null} true if the theme has errors, else null.
|
|
31
31
|
@function _validate-theme-object($theme) {
|
|
32
32
|
$err: validation.validate-type($theme, 'map') or
|
|
33
|
-
map.get($theme, $
|
|
33
|
+
map.get($theme, $internals, theme-version) == null;
|
|
34
34
|
@return if($err, true, null);
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -40,7 +40,7 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
40
40
|
/// @return {Number} The version number of the theme (0 if unknown).
|
|
41
41
|
@function get-theme-version($theme) {
|
|
42
42
|
$err: _validate-theme-object($theme);
|
|
43
|
-
@return if($err, 0, map.get($theme, $
|
|
43
|
+
@return if($err, 0, map.get($theme, $internals, theme-version) or 0);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/// Gets the type of theme represented by a theme object (light or dark).
|
|
@@ -55,13 +55,15 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
55
55
|
@if not theme-has($theme, color) {
|
|
56
56
|
@error 'Color information is not available on this theme.';
|
|
57
57
|
}
|
|
58
|
-
@return map.get($theme, $
|
|
58
|
+
@return map.get($theme, $internals, theme-type) or light;
|
|
59
59
|
}
|
|
60
60
|
@else {
|
|
61
61
|
@error #{'Unrecognized theme version:'} $version;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
|
|
66
|
+
|
|
65
67
|
/// Gets a color from a theme object. This function take a different amount of arguments depending
|
|
66
68
|
/// on if it's working with an M2 or M3 theme:
|
|
67
69
|
/// - With an M3 theme it accepts either 2 or 3 arguments. If 2 arguments are passed, the second
|
|
@@ -119,7 +121,7 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
119
121
|
@if not theme-has($theme, color) {
|
|
120
122
|
@error 'Color information is not available on this theme.';
|
|
121
123
|
}
|
|
122
|
-
$color-roles: map.get($theme, $
|
|
124
|
+
$color-roles: map.get($theme, $internals, color-tokens, (mat, theme));
|
|
123
125
|
$result: map.get($color-roles, $color-role-name);
|
|
124
126
|
@if not $result {
|
|
125
127
|
@error #{'Valid color roles are: #{map.keys($color-roles)}. Got:'} $color-role-name;
|
|
@@ -141,7 +143,7 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
141
143
|
@if not theme-has($theme, color) {
|
|
142
144
|
@error 'Color information is not available on this theme.';
|
|
143
145
|
}
|
|
144
|
-
$palettes: map.get($theme, $
|
|
146
|
+
$palettes: map.get($theme, $internals, palettes);
|
|
145
147
|
$palette: map.get($palettes, $palette-name);
|
|
146
148
|
@if not $palette {
|
|
147
149
|
$supported-palettes: map.keys($palettes);
|
|
@@ -185,7 +187,7 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
185
187
|
font-weight: '-weight'
|
|
186
188
|
), $property);
|
|
187
189
|
$token-name: '#{$typescale}#{$property-key}';
|
|
188
|
-
@return map.get($theme, $
|
|
190
|
+
@return map.get($theme, $internals, typography-tokens, (mat, typography), $token-name);
|
|
189
191
|
}
|
|
190
192
|
@else {
|
|
191
193
|
@error #{'Unrecognized theme version:'} $version;
|
|
@@ -204,7 +206,7 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
204
206
|
@if not theme-has($theme, density) {
|
|
205
207
|
@error 'Density information is not available on this theme.';
|
|
206
208
|
}
|
|
207
|
-
@return map.get($theme, $
|
|
209
|
+
@return map.get($theme, $internals, density-scale);
|
|
208
210
|
}
|
|
209
211
|
@else {
|
|
210
212
|
@error #{'Unrecognized theme version:'} $version;
|
|
@@ -222,18 +224,18 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
222
224
|
}
|
|
223
225
|
@else if $version == 1 {
|
|
224
226
|
@if $system == base {
|
|
225
|
-
@return map.get($theme, $
|
|
227
|
+
@return map.get($theme, $internals, base-tokens) != null;
|
|
226
228
|
}
|
|
227
229
|
@if $system == color {
|
|
228
|
-
@return map.get($theme, $
|
|
229
|
-
map.get($theme, $
|
|
230
|
-
map.get($theme, $
|
|
230
|
+
@return map.get($theme, $internals, color-tokens) != null and
|
|
231
|
+
map.get($theme, $internals, theme-type) != null and
|
|
232
|
+
map.get($theme, $internals, palettes) != null;
|
|
231
233
|
}
|
|
232
234
|
@if $system == typography {
|
|
233
|
-
@return map.get($theme, $
|
|
235
|
+
@return map.get($theme, $internals, typography-tokens) != null;
|
|
234
236
|
}
|
|
235
237
|
@if $system == density {
|
|
236
|
-
@return map.get($theme, $
|
|
238
|
+
@return map.get($theme, $internals, density-scale) != null;
|
|
237
239
|
}
|
|
238
240
|
@error 'Valid systems are: base, color, typography, density. Got:' $system;
|
|
239
241
|
}
|
|
@@ -259,50 +261,25 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
259
261
|
@else if $version == 1 {
|
|
260
262
|
@each $system in $systems {
|
|
261
263
|
@if $system == base {
|
|
262
|
-
$theme: map.deep-remove($theme, $
|
|
264
|
+
$theme: map.deep-remove($theme, $internals, base-tokens);
|
|
263
265
|
}
|
|
264
266
|
@else if $system == color {
|
|
265
|
-
$theme: map.deep-remove($theme, $
|
|
266
|
-
$theme: map.deep-remove($theme, $
|
|
267
|
-
$theme: map.deep-remove($theme, $
|
|
267
|
+
$theme: map.deep-remove($theme, $internals, color-tokens);
|
|
268
|
+
$theme: map.deep-remove($theme, $internals, theme-type);
|
|
269
|
+
$theme: map.deep-remove($theme, $internals, palettes);
|
|
268
270
|
}
|
|
269
271
|
@else if $system == typography {
|
|
270
|
-
$theme: map.deep-remove($theme, $
|
|
272
|
+
$theme: map.deep-remove($theme, $internals, typography-tokens);
|
|
271
273
|
}
|
|
272
274
|
@else if $system == density {
|
|
273
|
-
$theme: map.deep-remove($theme, $
|
|
274
|
-
$theme: map.deep-remove($theme, $
|
|
275
|
+
$theme: map.deep-remove($theme, $internals, density-scale);
|
|
276
|
+
$theme: map.deep-remove($theme, $internals, density-tokens);
|
|
275
277
|
}
|
|
276
278
|
}
|
|
277
279
|
@return $theme;
|
|
278
280
|
}
|
|
279
281
|
}
|
|
280
282
|
|
|
281
|
-
/// Gets the set of tokens from the given theme, limited to those affected by the requested theming
|
|
282
|
-
/// systems.
|
|
283
|
-
/// @param {Map} $theme The theme to get tokens from.
|
|
284
|
-
/// @param {String...} $systems The theming systems to get tokens for. Valid values are: color,
|
|
285
|
-
/// typography, density, base. If no systems are passed, all tokens will be returned.
|
|
286
|
-
/// @return {Map} The requested tokens for the theme.
|
|
287
|
-
@function get-theme-tokens($theme, $systems...) {
|
|
288
|
-
$systems: if(list.length($systems) == 0, (color, typography, density, base), $systems);
|
|
289
|
-
$err: _validate-theme-object($theme);
|
|
290
|
-
@if $err {
|
|
291
|
-
@error #{'Expected $theme to be an Angular Material theme object. Got:'} $theme;
|
|
292
|
-
}
|
|
293
|
-
$err: validation.validate-allowed-values($systems, color, typography, density, base);
|
|
294
|
-
@if $err {
|
|
295
|
-
@error #{'Expected $systems to contain valid system names (color, typography, density, or'}
|
|
296
|
-
#{'base). Got invalid system names:'} $err;
|
|
297
|
-
}
|
|
298
|
-
$result: ();
|
|
299
|
-
@each $system in $systems {
|
|
300
|
-
$result: map.deep-merge($result, map.get($theme, $_internals, '#{$system}-tokens') or ());
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
@return $result;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
283
|
/// Gets a version of the theme with a modified typography config that preserves old behavior in
|
|
307
284
|
/// some components that previously used `private-typography-to-2014-config`.
|
|
308
285
|
/// Do not introduce new usages of this, it should be cleaned up and removed.
|