@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
|
@@ -1,103 +1,68 @@
|
|
|
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';
|
|
7
|
-
|
|
8
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
|
-
$prefix: (mat, checkbox);
|
|
6
|
+
@use '../core/tokens/m3';
|
|
10
7
|
|
|
11
8
|
/// Generates custom tokens for mat-checkbox.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
$tokens: (
|
|
18
|
-
disabled-label-color:
|
|
19
|
-
sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
20
|
-
disabled-selected-checkmark-color: map.get($systems, md-sys-color, surface),
|
|
21
|
-
disabled-selected-icon-color: sass-utils.safe-color-change(
|
|
22
|
-
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
23
|
-
disabled-unselected-icon-color: sass-utils.safe-color-change(
|
|
24
|
-
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
25
|
-
label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
26
|
-
label-text-font: map.get($systems, md-sys-typescale, body-medium-font),
|
|
27
|
-
label-text-line-height: map.get($systems, md-sys-typescale, body-medium-line-height),
|
|
28
|
-
label-text-size: map.get($systems, md-sys-typescale, body-medium-size),
|
|
29
|
-
label-text-tracking: map.get($systems, md-sys-typescale, body-medium-tracking),
|
|
30
|
-
label-text-weight: map.get($systems, md-sys-typescale, body-medium-weight),
|
|
31
|
-
selected-checkmark-color: map.get($systems, md-sys-color, on-primary),
|
|
32
|
-
selected-focus-icon-color: map.get($systems, md-sys-color, primary),
|
|
33
|
-
selected-focus-state-layer-color: map.get($systems, md-sys-color, primary),
|
|
34
|
-
selected-focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
35
|
-
selected-hover-icon-color: map.get($systems, md-sys-color, primary),
|
|
36
|
-
selected-hover-state-layer-color: map.get($systems, md-sys-color, primary),
|
|
37
|
-
selected-hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
38
|
-
selected-icon-color: map.get($systems, md-sys-color, primary),
|
|
39
|
-
selected-pressed-icon-color: map.get($systems, md-sys-color, primary),
|
|
40
|
-
selected-pressed-state-layer-color: map.get($systems, md-sys-color, on-surface),
|
|
41
|
-
selected-pressed-state-layer-opacity:
|
|
42
|
-
map.get($systems, md-sys-state, pressed-state-layer-opacity),
|
|
43
|
-
unselected-focus-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
44
|
-
unselected-focus-state-layer-color: map.get($systems, md-sys-color, on-surface),
|
|
45
|
-
unselected-focus-state-layer-opacity:
|
|
46
|
-
map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
47
|
-
unselected-hover-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
48
|
-
unselected-hover-state-layer-color: map.get($systems, md-sys-color, on-surface),
|
|
49
|
-
unselected-hover-state-layer-opacity:
|
|
50
|
-
map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
51
|
-
unselected-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
52
|
-
unselected-pressed-state-layer-color: map.get($systems, md-sys-color, primary),
|
|
53
|
-
unselected-pressed-state-layer-opacity:
|
|
54
|
-
map.get($systems, md-sys-state, pressed-state-layer-opacity),
|
|
55
|
-
);
|
|
9
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
10
|
+
$system: m3-utils.get-system($theme);
|
|
11
|
+
@if $color-variant {
|
|
12
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
13
|
+
}
|
|
56
14
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
selected-
|
|
61
|
-
selected-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
unselected-pressed-state-layer-color: map.get($systems, md-sys-color, secondary),
|
|
67
|
-
selected-checkmark-color: map.get($systems, md-sys-color, on-secondary),
|
|
15
|
+
@return (
|
|
16
|
+
base: (
|
|
17
|
+
checkbox-selected-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
18
|
+
checkbox-selected-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
19
|
+
checkbox-selected-pressed-state-layer-opacity: map.get($system, pressed-state-layer-opacity),
|
|
20
|
+
checkbox-unselected-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
21
|
+
checkbox-unselected-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
22
|
+
checkbox-unselected-pressed-state-layer-opacity:
|
|
23
|
+
map.get($system, pressed-state-layer-opacity),
|
|
68
24
|
),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
selected-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
selected-checkmark-color: map.get($
|
|
25
|
+
color: (
|
|
26
|
+
checkbox-disabled-label-color: m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
27
|
+
checkbox-disabled-selected-checkmark-color: map.get($system, surface),
|
|
28
|
+
checkbox-disabled-selected-icon-color:
|
|
29
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
30
|
+
checkbox-disabled-unselected-icon-color:
|
|
31
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
32
|
+
checkbox-label-text-color: map.get($system, on-surface),
|
|
33
|
+
checkbox-selected-checkmark-color: map.get($system, on-primary),
|
|
34
|
+
checkbox-selected-focus-icon-color: map.get($system, primary),
|
|
35
|
+
checkbox-selected-focus-state-layer-color: map.get($system, primary),
|
|
36
|
+
checkbox-selected-hover-icon-color: map.get($system, primary),
|
|
37
|
+
checkbox-selected-hover-state-layer-color: map.get($system, primary),
|
|
38
|
+
checkbox-selected-icon-color: map.get($system, primary),
|
|
39
|
+
checkbox-selected-pressed-icon-color: map.get($system, primary),
|
|
40
|
+
checkbox-selected-pressed-state-layer-color: map.get($system, on-surface),
|
|
41
|
+
checkbox-unselected-focus-icon-color: map.get($system, on-surface),
|
|
42
|
+
checkbox-unselected-focus-state-layer-color: map.get($system, on-surface),
|
|
43
|
+
checkbox-unselected-hover-icon-color: map.get($system, on-surface),
|
|
44
|
+
checkbox-unselected-hover-state-layer-color: map.get($system, on-surface),
|
|
45
|
+
checkbox-unselected-icon-color: map.get($system, on-surface-variant),
|
|
46
|
+
checkbox-unselected-pressed-state-layer-color: map.get($system, primary),
|
|
78
47
|
),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
selected-checkmark-color: map.get($systems, md-sys-color, on-error),
|
|
88
|
-
)
|
|
48
|
+
typography: (
|
|
49
|
+
checkbox-label-text-font: map.get($system, body-medium-font),
|
|
50
|
+
checkbox-label-text-line-height: map.get($system, body-medium-line-height),
|
|
51
|
+
checkbox-label-text-size: map.get($system, body-medium-size),
|
|
52
|
+
checkbox-label-text-tracking: map.get($system, body-medium-tracking),
|
|
53
|
+
checkbox-label-text-weight: map.get($system, body-medium-weight),
|
|
54
|
+
),
|
|
55
|
+
density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
|
|
89
56
|
);
|
|
90
|
-
|
|
91
|
-
@return m3-utils.namespace($prefix, ($tokens, $variant-tokens), $token-slots);
|
|
92
57
|
}
|
|
93
58
|
|
|
94
59
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
95
|
-
@function get-density-tokens($
|
|
96
|
-
$scale: theming.clamp-density(
|
|
60
|
+
@function get-density-tokens($scale) {
|
|
61
|
+
$scale: theming.clamp-density($scale, -3);
|
|
97
62
|
$index: ($scale * -1) + 1;
|
|
98
63
|
|
|
99
64
|
@return (
|
|
100
|
-
touch-target-display: list.nth((block, block, none, none), $index),
|
|
101
|
-
state-layer-size: list.nth((40px, 36px, 32px, 28px), $index)
|
|
65
|
+
checkbox-touch-target-display: list.nth((block, block, none, none), $index),
|
|
66
|
+
checkbox-state-layer-size: list.nth((40px, 36px, 32px, 28px), $index)
|
|
102
67
|
);
|
|
103
68
|
}
|
package/chips/_chips-theme.scss
CHANGED
|
@@ -4,51 +4,45 @@
|
|
|
4
4
|
@use '../core/tokens/token-utils';
|
|
5
5
|
@use '../core/theming/theming';
|
|
6
6
|
@use '../core/theming/inspection';
|
|
7
|
-
@use '../core/theming/validation';
|
|
8
7
|
@use '../core/typography/typography';
|
|
8
|
+
@use 'sass:map';
|
|
9
9
|
|
|
10
10
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
11
11
|
/// for the mat-chips.
|
|
12
12
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
13
|
@mixin base($theme) {
|
|
14
14
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
-
@include
|
|
15
|
+
@include token-utils.create-token-values(map.get(m3-chip.get-tokens($theme), base));
|
|
16
16
|
} @else {
|
|
17
17
|
.mat-mdc-standard-chip {
|
|
18
|
-
@include token-utils.create-token-values-mixed(
|
|
19
|
-
m2-chip.$prefix, m2-chip.get-unthemable-tokens());
|
|
18
|
+
@include token-utils.create-token-values-mixed(m2-chip.get-unthemable-tokens());
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
/// Outputs color theme styles for the mat-chips.
|
|
25
24
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
26
|
-
/// @param {
|
|
27
|
-
|
|
28
|
-
/// or error (If not specified, default secondary color will be used).
|
|
29
|
-
@mixin color($theme, $options...) {
|
|
25
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
26
|
+
@mixin color($theme, $color-variant: null) {
|
|
30
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
31
|
-
@include
|
|
28
|
+
@include token-utils.create-token-values(
|
|
29
|
+
map.get(m3-chip.get-tokens($theme, $color-variant), color));
|
|
32
30
|
} @else {
|
|
33
31
|
.mat-mdc-standard-chip {
|
|
34
|
-
@include token-utils.create-token-values-mixed(
|
|
35
|
-
m2-chip.$prefix, m2-chip.get-color-tokens($theme));
|
|
32
|
+
@include token-utils.create-token-values-mixed(m2-chip.get-color-tokens($theme));
|
|
36
33
|
|
|
37
34
|
&.mat-mdc-chip-selected,
|
|
38
35
|
&.mat-mdc-chip-highlighted {
|
|
39
36
|
&.mat-primary {
|
|
40
|
-
@include token-utils.create-token-values-mixed(
|
|
41
|
-
m2-chip.$prefix, m2-chip.get-color-tokens($theme, primary));
|
|
37
|
+
@include token-utils.create-token-values-mixed(m2-chip.get-color-tokens($theme, primary));
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
&.mat-accent {
|
|
45
|
-
@include token-utils.create-token-values-mixed(
|
|
46
|
-
m2-chip.$prefix, m2-chip.get-color-tokens($theme, accent));
|
|
41
|
+
@include token-utils.create-token-values-mixed(m2-chip.get-color-tokens($theme, accent));
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
&.mat-warn {
|
|
50
|
-
@include token-utils.create-token-values-mixed(
|
|
51
|
-
m2-chip.$prefix, m2-chip.get-color-tokens($theme, warn));
|
|
45
|
+
@include token-utils.create-token-values-mixed(m2-chip.get-color-tokens($theme, warn));
|
|
52
46
|
}
|
|
53
47
|
}
|
|
54
48
|
}
|
|
@@ -59,12 +53,10 @@
|
|
|
59
53
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
60
54
|
@mixin typography($theme) {
|
|
61
55
|
@if inspection.get-theme-version($theme) == 1 {
|
|
62
|
-
@include
|
|
56
|
+
@include token-utils.create-token-values(map.get(m3-chip.get-tokens($theme), typography));
|
|
63
57
|
} @else {
|
|
64
58
|
.mat-mdc-standard-chip {
|
|
65
|
-
@include token-utils.create-token-values-mixed(
|
|
66
|
-
m2-chip.$prefix, m2-chip.get-typography-tokens($theme)
|
|
67
|
-
);
|
|
59
|
+
@include token-utils.create-token-values-mixed(m2-chip.get-typography-tokens($theme));
|
|
68
60
|
}
|
|
69
61
|
}
|
|
70
62
|
}
|
|
@@ -73,12 +65,10 @@
|
|
|
73
65
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
74
66
|
@mixin density($theme) {
|
|
75
67
|
@if inspection.get-theme-version($theme) == 1 {
|
|
76
|
-
@include token-utils.create-token-values(m3-chip
|
|
68
|
+
@include token-utils.create-token-values(map.get(m3-chip.get-tokens($theme), density));
|
|
77
69
|
} @else {
|
|
78
70
|
.mat-mdc-chip.mat-mdc-standard-chip {
|
|
79
|
-
@include token-utils.create-token-values-mixed(
|
|
80
|
-
m2-chip.$prefix, m2-chip.get-density-tokens($theme)
|
|
81
|
-
);
|
|
71
|
+
@include token-utils.create-token-values-mixed(m2-chip.get-density-tokens($theme));
|
|
82
72
|
}
|
|
83
73
|
}
|
|
84
74
|
}
|
|
@@ -87,8 +77,8 @@
|
|
|
87
77
|
@function _define-overrides() {
|
|
88
78
|
@return (
|
|
89
79
|
(
|
|
90
|
-
namespace:
|
|
91
|
-
tokens:
|
|
80
|
+
namespace: chip,
|
|
81
|
+
tokens: token-utils.get-overrides(m3-chip.get-tokens(), chip)
|
|
92
82
|
),
|
|
93
83
|
);
|
|
94
84
|
}
|
|
@@ -96,21 +86,19 @@
|
|
|
96
86
|
/// Outputs the CSS variable values for the given tokens.
|
|
97
87
|
/// @param {Map} $tokens The token values to emit.
|
|
98
88
|
@mixin overrides($tokens: ()) {
|
|
99
|
-
|
|
89
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
100
90
|
}
|
|
101
91
|
|
|
102
92
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-chips.
|
|
103
93
|
/// @param {Map} $theme The theme to generate styles for.
|
|
104
|
-
/// @param {
|
|
105
|
-
|
|
106
|
-
/// or error (If not specified, default secondary color will be used).
|
|
107
|
-
@mixin theme($theme, $options...) {
|
|
94
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
95
|
+
@mixin theme($theme, $color-variant: null) {
|
|
108
96
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-chips') {
|
|
109
97
|
@if inspection.get-theme-version($theme) == 1 {
|
|
110
|
-
@include
|
|
111
|
-
@
|
|
112
|
-
|
|
113
|
-
|
|
98
|
+
@include base($theme);
|
|
99
|
+
@include color($theme, $color-variant);
|
|
100
|
+
@include density($theme);
|
|
101
|
+
@include typography($theme);
|
|
114
102
|
} @else {
|
|
115
103
|
@include base($theme);
|
|
116
104
|
@if inspection.theme-has($theme, color) {
|
|
@@ -125,11 +113,3 @@
|
|
|
125
113
|
}
|
|
126
114
|
}
|
|
127
115
|
}
|
|
128
|
-
|
|
129
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
130
|
-
@include validation.selector-defined(
|
|
131
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
132
|
-
);
|
|
133
|
-
$mat-chip-tokens: token-utils.get-tokens-for($tokens, m2-chip.$prefix, $options...);
|
|
134
|
-
@include token-utils.create-token-values(m2-chip.$prefix, $mat-chip-tokens);
|
|
135
|
-
}
|
package/chips/_m2-chip.scss
CHANGED
|
@@ -7,34 +7,31 @@
|
|
|
7
7
|
@use '../core/m2/palette' as m2-palette;
|
|
8
8
|
@use '../core/theming/theming';
|
|
9
9
|
|
|
10
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
11
|
-
$prefix: (mat, chip);
|
|
12
|
-
|
|
13
10
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
14
11
|
// but may be in a future version of the theming API.
|
|
15
12
|
@function get-unthemable-tokens() {
|
|
16
13
|
@return (
|
|
17
|
-
container-shape-radius: 16px,
|
|
18
|
-
disabled-container-opacity: 0.4,
|
|
19
|
-
disabled-outline-color: transparent,
|
|
20
|
-
flat-selected-outline-width: 0,
|
|
21
|
-
focus-outline-color: transparent,
|
|
22
|
-
hover-state-layer-opacity: 0.04,
|
|
23
|
-
outline-color: transparent,
|
|
24
|
-
outline-width: 0,
|
|
25
|
-
selected-hover-state-layer-opacity: 0.04,
|
|
26
|
-
selected-trailing-action-state-layer-color: transparent,
|
|
27
|
-
trailing-action-focus-opacity: 1,
|
|
28
|
-
trailing-action-focus-state-layer-opacity: 0,
|
|
29
|
-
trailing-action-hover-state-layer-opacity: 0,
|
|
30
|
-
trailing-action-opacity: 0.54,
|
|
31
|
-
trailing-action-state-layer-color: transparent,
|
|
32
|
-
with-avatar-avatar-shape-radius: 14px,
|
|
33
|
-
with-avatar-avatar-size: 28px,
|
|
34
|
-
with-avatar-disabled-avatar-opacity: 1,
|
|
35
|
-
with-icon-disabled-icon-opacity: 1,
|
|
36
|
-
with-icon-icon-size: 18px,
|
|
37
|
-
with-trailing-icon-disabled-trailing-icon-opacity: 1,
|
|
14
|
+
chip-container-shape-radius: 16px,
|
|
15
|
+
chip-disabled-container-opacity: 0.4,
|
|
16
|
+
chip-disabled-outline-color: transparent,
|
|
17
|
+
chip-flat-selected-outline-width: 0,
|
|
18
|
+
chip-focus-outline-color: transparent,
|
|
19
|
+
chip-hover-state-layer-opacity: 0.04,
|
|
20
|
+
chip-outline-color: transparent,
|
|
21
|
+
chip-outline-width: 0,
|
|
22
|
+
chip-selected-hover-state-layer-opacity: 0.04,
|
|
23
|
+
chip-selected-trailing-action-state-layer-color: transparent,
|
|
24
|
+
chip-trailing-action-focus-opacity: 1,
|
|
25
|
+
chip-trailing-action-focus-state-layer-opacity: 0,
|
|
26
|
+
chip-trailing-action-hover-state-layer-opacity: 0,
|
|
27
|
+
chip-trailing-action-opacity: 0.54,
|
|
28
|
+
chip-trailing-action-state-layer-color: transparent,
|
|
29
|
+
chip-with-avatar-avatar-shape-radius: 14px,
|
|
30
|
+
chip-with-avatar-avatar-size: 28px,
|
|
31
|
+
chip-with-avatar-disabled-avatar-opacity: 1,
|
|
32
|
+
chip-with-icon-disabled-icon-opacity: 1,
|
|
33
|
+
chip-with-icon-icon-size: 18px,
|
|
34
|
+
chip-with-trailing-icon-disabled-trailing-icon-opacity: 1,
|
|
38
35
|
);
|
|
39
36
|
}
|
|
40
37
|
|
|
@@ -64,37 +61,37 @@ $prefix: (mat, chip);
|
|
|
64
61
|
$foreground: inspection.get-theme-color($theme, $palette-name, default-contrast);
|
|
65
62
|
}
|
|
66
63
|
@return (
|
|
67
|
-
disabled-label-text-color: $foreground,
|
|
68
|
-
elevated-container-color: $background,
|
|
69
|
-
elevated-disabled-container-color: $background,
|
|
70
|
-
elevated-selected-container-color: $background,
|
|
71
|
-
flat-disabled-selected-container-color: $background,
|
|
72
|
-
focus-state-layer-color: $state-layer-color,
|
|
73
|
-
focus-state-layer-opacity: $state-layer-opacity,
|
|
74
|
-
hover-state-layer-color: $state-layer-color,
|
|
75
|
-
label-text-color: $foreground,
|
|
76
|
-
selected-disabled-trailing-icon-color: $foreground,
|
|
77
|
-
selected-focus-state-layer-color: $state-layer-color,
|
|
78
|
-
selected-focus-state-layer-opacity: $state-layer-opacity,
|
|
79
|
-
selected-hover-state-layer-color: $state-layer-color,
|
|
80
|
-
selected-label-text-color: $foreground,
|
|
81
|
-
selected-trailing-icon-color: $foreground,
|
|
82
|
-
with-icon-disabled-icon-color: $foreground,
|
|
83
|
-
with-icon-icon-color: $foreground,
|
|
84
|
-
with-icon-selected-icon-color: $foreground,
|
|
85
|
-
with-trailing-icon-disabled-trailing-icon-color: $foreground,
|
|
86
|
-
with-trailing-icon-trailing-icon-color: $foreground,
|
|
64
|
+
chip-disabled-label-text-color: $foreground,
|
|
65
|
+
chip-elevated-container-color: $background,
|
|
66
|
+
chip-elevated-disabled-container-color: $background,
|
|
67
|
+
chip-elevated-selected-container-color: $background,
|
|
68
|
+
chip-flat-disabled-selected-container-color: $background,
|
|
69
|
+
chip-focus-state-layer-color: $state-layer-color,
|
|
70
|
+
chip-focus-state-layer-opacity: $state-layer-opacity,
|
|
71
|
+
chip-hover-state-layer-color: $state-layer-color,
|
|
72
|
+
chip-label-text-color: $foreground,
|
|
73
|
+
chip-selected-disabled-trailing-icon-color: $foreground,
|
|
74
|
+
chip-selected-focus-state-layer-color: $state-layer-color,
|
|
75
|
+
chip-selected-focus-state-layer-opacity: $state-layer-opacity,
|
|
76
|
+
chip-selected-hover-state-layer-color: $state-layer-color,
|
|
77
|
+
chip-selected-label-text-color: $foreground,
|
|
78
|
+
chip-selected-trailing-icon-color: $foreground,
|
|
79
|
+
chip-with-icon-disabled-icon-color: $foreground,
|
|
80
|
+
chip-with-icon-icon-color: $foreground,
|
|
81
|
+
chip-with-icon-selected-icon-color: $foreground,
|
|
82
|
+
chip-with-trailing-icon-disabled-trailing-icon-color: $foreground,
|
|
83
|
+
chip-with-trailing-icon-trailing-icon-color: $foreground,
|
|
87
84
|
);
|
|
88
85
|
}
|
|
89
86
|
|
|
90
87
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
91
88
|
@function get-typography-tokens($theme) {
|
|
92
89
|
@return (
|
|
93
|
-
label-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
94
|
-
label-text-line-height: inspection.get-theme-typography($theme, body-2, line-height),
|
|
95
|
-
label-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
96
|
-
label-text-tracking: inspection.get-theme-typography($theme, body-2, letter-spacing),
|
|
97
|
-
label-text-weight: inspection.get-theme-typography($theme, body-2, font-weight)
|
|
90
|
+
chip-label-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
91
|
+
chip-label-text-line-height: inspection.get-theme-typography($theme, body-2, line-height),
|
|
92
|
+
chip-label-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
93
|
+
chip-label-text-tracking: inspection.get-theme-typography($theme, body-2, letter-spacing),
|
|
94
|
+
chip-label-text-weight: inspection.get-theme-typography($theme, body-2, font-weight)
|
|
98
95
|
);
|
|
99
96
|
}
|
|
100
97
|
|
|
@@ -103,8 +100,7 @@ $prefix: (mat, chip);
|
|
|
103
100
|
$scale: theming.clamp-density(inspection.get-theme-density($theme), -2);
|
|
104
101
|
@return (
|
|
105
102
|
// The height of the chip.
|
|
106
|
-
container-height:
|
|
107
|
-
map.get(
|
|
103
|
+
chip-container-height: map.get(
|
|
108
104
|
(
|
|
109
105
|
0: 32px,
|
|
110
106
|
-1: 28px,
|
package/chips/_m3-chip.scss
CHANGED
|
@@ -1,129 +1,82 @@
|
|
|
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';
|
|
7
|
-
|
|
8
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
|
-
$prefix: (mat, chip);
|
|
6
|
+
@use '../core/tokens/m3';
|
|
10
7
|
|
|
11
8
|
/// Generates custom tokens for the mat-chip.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// MDC has a chip component, but they seem to have made up the tokens rather than using ones
|
|
18
|
-
// generated from the token database, therefore we need a custom token function for it.
|
|
19
|
-
$tokens: sass-utils.merge-all(
|
|
20
|
-
m3-utils.generate-typography-tokens($systems, label-text, label-large),
|
|
21
|
-
(
|
|
22
|
-
disabled-container-opacity: m3-utils.hardcode(1, $exclude-hardcoded),
|
|
23
|
-
selected-trailing-icon-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
24
|
-
selected-disabled-trailing-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
25
|
-
trailing-action-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
26
|
-
selected-trailing-action-state-layer-color:
|
|
27
|
-
map.get($systems, md-sys-color, on-secondary-container),
|
|
28
|
-
trailing-action-hover-state-layer-opacity:
|
|
29
|
-
map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
30
|
-
trailing-action-focus-state-layer-opacity:
|
|
31
|
-
map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
32
|
-
trailing-action-opacity: m3-utils.hardcode(1, $exclude-hardcoded),
|
|
33
|
-
trailing-action-focus-opacity: m3-utils.hardcode(1, $exclude-hardcoded),
|
|
34
|
-
container-shape-radius: m3-utils.hardcode(8px, $exclude-hardcoded),
|
|
35
|
-
with-avatar-avatar-size: m3-utils.hardcode(24px, $exclude-hardcoded),
|
|
36
|
-
with-avatar-avatar-shape-radius: m3-utils.hardcode(24px, $exclude-hardcoded),
|
|
37
|
-
label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
38
|
-
disabled-label-text-color: sass-utils.safe-color-change(
|
|
39
|
-
map.get($systems, md-sys-color, on-surface),
|
|
40
|
-
$alpha: 0.38,
|
|
41
|
-
),
|
|
42
|
-
with-icon-icon-size: m3-utils.hardcode(18px, $exclude-hardcoded),
|
|
43
|
-
with-icon-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
44
|
-
with-icon-disabled-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
45
|
-
with-icon-selected-icon-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
46
|
-
with-trailing-icon-trailing-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
47
|
-
with-trailing-icon-disabled-trailing-icon-color:
|
|
48
|
-
map.get($systems, md-sys-color, on-surface),
|
|
49
|
-
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
50
|
-
focus-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
51
|
-
outline-width: m3-utils.hardcode(1px, $exclude-hardcoded),
|
|
52
|
-
outline-color: map.get($systems, md-sys-color, outline),
|
|
53
|
-
disabled-outline-color: sass-utils.safe-color-change(
|
|
54
|
-
map.get($systems, md-sys-color, on-surface),
|
|
55
|
-
$alpha: 0.12,
|
|
56
|
-
),
|
|
57
|
-
focus-outline-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
58
|
-
hover-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
59
|
-
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
60
|
-
with-avatar-disabled-avatar-opacity: m3-utils.hardcode(0.38, $exclude-hardcoded),
|
|
61
|
-
elevated-selected-container-color: map.get($systems, md-sys-color, secondary-container),
|
|
62
|
-
// In the M3 tokens this is a `surface` color, but in the MDC implementation its
|
|
63
|
-
// never being emitted. We emit `transparent` so consumers override the color.
|
|
64
|
-
elevated-container-color: m3-utils.hardcode(transparent, $exclude-hardcoded),
|
|
65
|
-
flat-selected-outline-width: m3-utils.hardcode(0, $exclude-hardcoded),
|
|
66
|
-
selected-label-text-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
67
|
-
flat-disabled-selected-container-color: sass-utils.safe-color-change(
|
|
68
|
-
map.get($systems, md-sys-color, on-surface),
|
|
69
|
-
$alpha: 0.12,
|
|
70
|
-
),
|
|
71
|
-
selected-hover-state-layer-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
72
|
-
selected-hover-state-layer-opacity:
|
|
73
|
-
map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
74
|
-
selected-focus-state-layer-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
75
|
-
selected-focus-state-layer-opacity:
|
|
76
|
-
map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
77
|
-
with-icon-disabled-icon-opacity: m3-utils.hardcode(0.38, $exclude-hardcoded),
|
|
78
|
-
with-trailing-icon-disabled-trailing-icon-opacity:
|
|
79
|
-
m3-utils.hardcode(0.38, $exclude-hardcoded),
|
|
80
|
-
),
|
|
81
|
-
);
|
|
9
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
10
|
+
$system: m3-utils.get-system($theme);
|
|
11
|
+
@if $color-variant {
|
|
12
|
+
$system: m3-utils.replace-colors-with-variant($system, secondary, $color-variant);
|
|
13
|
+
}
|
|
82
14
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
15
|
+
@return (
|
|
16
|
+
base: (
|
|
17
|
+
chip-container-shape-radius: 8px,
|
|
18
|
+
chip-disabled-container-opacity: 1,
|
|
19
|
+
chip-elevated-container-color: transparent, // surface in M3, but not emitted in MDC
|
|
20
|
+
chip-flat-selected-outline-width: 0,
|
|
21
|
+
chip-outline-width: 1px,
|
|
22
|
+
chip-trailing-action-focus-opacity: 1,
|
|
23
|
+
chip-trailing-action-opacity: 1,
|
|
24
|
+
chip-with-avatar-avatar-shape-radius: 24px,
|
|
25
|
+
chip-with-avatar-avatar-size: 24px,
|
|
26
|
+
chip-with-avatar-disabled-avatar-opacity: 0.38,
|
|
27
|
+
chip-with-icon-disabled-icon-opacity: 0.38,
|
|
28
|
+
chip-with-icon-icon-size: 18px,
|
|
29
|
+
chip-with-trailing-icon-disabled-trailing-icon-opacity: 0.38,
|
|
94
30
|
),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
map.get($
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
31
|
+
color: (
|
|
32
|
+
chip-disabled-label-text-color:
|
|
33
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
34
|
+
chip-disabled-outline-color: m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
35
|
+
chip-elevated-selected-container-color: map.get($system, secondary-container),
|
|
36
|
+
chip-flat-disabled-selected-container-color:
|
|
37
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
38
|
+
chip-focus-outline-color: map.get($system, on-surface-variant),
|
|
39
|
+
chip-focus-state-layer-color: map.get($system, on-surface-variant),
|
|
40
|
+
chip-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
41
|
+
chip-hover-state-layer-color: map.get($system, on-surface-variant),
|
|
42
|
+
chip-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
43
|
+
chip-label-text-color: map.get($system, on-surface-variant),
|
|
44
|
+
chip-outline-color: map.get($system, outline),
|
|
45
|
+
chip-selected-disabled-trailing-icon-color: map.get($system, on-surface),
|
|
46
|
+
chip-selected-focus-state-layer-color: map.get($system, on-secondary-container),
|
|
47
|
+
chip-selected-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
48
|
+
chip-selected-hover-state-layer-color: map.get($system, on-secondary-container),
|
|
49
|
+
chip-selected-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
50
|
+
chip-selected-label-text-color: map.get($system, on-secondary-container),
|
|
51
|
+
chip-selected-trailing-action-state-layer-color: map.get($system, on-secondary-container),
|
|
52
|
+
chip-selected-trailing-icon-color: map.get($system, on-secondary-container),
|
|
53
|
+
chip-trailing-action-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
54
|
+
chip-trailing-action-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
55
|
+
chip-trailing-action-state-layer-color: map.get($system, on-surface-variant),
|
|
56
|
+
chip-with-icon-disabled-icon-color: map.get($system, on-surface),
|
|
57
|
+
chip-with-icon-icon-color: map.get($system, on-surface-variant),
|
|
58
|
+
chip-with-icon-selected-icon-color: map.get($system, on-secondary-container),
|
|
59
|
+
chip-with-trailing-icon-disabled-trailing-icon-color:map.get($system, on-surface),
|
|
60
|
+
chip-with-trailing-icon-trailing-icon-color: map.get($system, on-surface-variant),
|
|
61
|
+
chip-elevated-disabled-container-color: null,
|
|
105
62
|
),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
map.get($
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
selected-focus-state-layer-color: map.get($systems, md-sys-color, on-error-container),
|
|
115
|
-
)
|
|
63
|
+
typography: (
|
|
64
|
+
chip-label-text-font: map.get($system, label-large-font),
|
|
65
|
+
chip-label-text-line-height: map.get($system, label-large-line-height),
|
|
66
|
+
chip-label-text-size: map.get($system, label-large-size),
|
|
67
|
+
chip-label-text-tracking: map.get($system, label-large-tracking),
|
|
68
|
+
chip-label-text-weight: map.get($system, label-large-weight),
|
|
69
|
+
),
|
|
70
|
+
density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
|
|
116
71
|
);
|
|
117
|
-
|
|
118
|
-
@return m3-utils.namespace($prefix, ($tokens, $variant-tokens), $token-slots);
|
|
119
72
|
}
|
|
120
73
|
|
|
121
74
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
122
|
-
@function get-density-tokens($
|
|
123
|
-
$scale: theming.clamp-density(
|
|
75
|
+
@function get-density-tokens($scale) {
|
|
76
|
+
$scale: theming.clamp-density($scale, -2);
|
|
124
77
|
$index: ($scale * -1) + 1;
|
|
125
78
|
|
|
126
79
|
@return (
|
|
127
|
-
container-height: list.nth((32px, 28px, 24px), $index),
|
|
80
|
+
chip-container-height: list.nth((32px, 28px, 24px), $index),
|
|
128
81
|
);
|
|
129
82
|
}
|