@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
|
@@ -3,22 +3,19 @@
|
|
|
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, timepicker);
|
|
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
|
-
container-elevation-shadow: elevation.get-box-shadow(8),
|
|
10
|
+
timepicker-container-shape: 4px,
|
|
11
|
+
timepicker-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
15
12
|
);
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
19
16
|
@function get-color-tokens($theme) {
|
|
20
17
|
@return (
|
|
21
|
-
container-background-color: inspection.get-theme-color($theme, background, card)
|
|
18
|
+
timepicker-container-background-color: inspection.get-theme-color($theme, background, card)
|
|
22
19
|
);
|
|
23
20
|
}
|
|
24
21
|
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/style/elevation';
|
|
3
3
|
@use '../core/tokens/m3-utils';
|
|
4
|
-
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, timepicker);
|
|
4
|
+
@use '../core/tokens/m3';
|
|
7
5
|
|
|
8
6
|
/// Generates custom tokens for the mat-timepicker.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/// @param {Map} $token-slots Possible token slots
|
|
12
|
-
/// @return {Map} A set of custom tokens for the mat-timepicker
|
|
13
|
-
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
-
$tokens: (
|
|
15
|
-
container-background-color: map.get($systems, md-sys-color, surface-container),
|
|
16
|
-
container-shape: map.get($systems, md-sys-shape, corner-extra-small),
|
|
17
|
-
container-elevation-shadow:
|
|
18
|
-
m3-utils.hardcode(elevation.get-box-shadow(2), $exclude-hardcoded),
|
|
19
|
-
);
|
|
7
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
8
|
+
$system: m3-utils.get-system($theme);
|
|
20
9
|
|
|
21
|
-
@return
|
|
10
|
+
@return (
|
|
11
|
+
base: (
|
|
12
|
+
timepicker-container-shape: map.get($system, corner-extra-small),
|
|
13
|
+
),
|
|
14
|
+
color: (
|
|
15
|
+
timepicker-container-background-color: map.get($system, surface-container),
|
|
16
|
+
timepicker-container-elevation-shadow: elevation.get-box-shadow(2),
|
|
17
|
+
),
|
|
18
|
+
typography: (),
|
|
19
|
+
density: (),
|
|
20
|
+
);
|
|
22
21
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
3
|
@use '../core/theming/inspection';
|
|
4
|
-
@use '../core/theming/validation';
|
|
5
4
|
@use '../core/typography/typography';
|
|
6
5
|
@use '../core/style/sass-utils';
|
|
7
6
|
@use './m2-timepicker';
|
|
7
|
+
@use './m3-timepicker';
|
|
8
8
|
@use '../core/tokens/token-utils';
|
|
9
9
|
|
|
10
10
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
@@ -12,31 +12,23 @@
|
|
|
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-timepicker.get-tokens($theme), base));
|
|
16
16
|
} @else {
|
|
17
17
|
@include sass-utils.current-selector-or-root() {
|
|
18
|
-
@include token-utils.create-token-values-mixed(
|
|
19
|
-
m2-timepicker.$prefix,
|
|
20
|
-
m2-timepicker.get-unthemable-tokens()
|
|
21
|
-
);
|
|
18
|
+
@include token-utils.create-token-values-mixed(m2-timepicker.get-unthemable-tokens());
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
/// Outputs color theme styles for the mat-timepicker.
|
|
27
24
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
28
|
-
|
|
29
|
-
/// $color-variant: The color variant to use for the main selection: primary, secondary, tertiary,
|
|
30
|
-
/// or error (If not specified, default primary color will be used).
|
|
31
|
-
@mixin color($theme, $options...) {
|
|
25
|
+
@mixin color($theme) {
|
|
32
26
|
@if inspection.get-theme-version($theme) == 1 {
|
|
33
|
-
@include
|
|
27
|
+
@include token-utils.create-token-values(
|
|
28
|
+
map.get(m3-timepicker.get-tokens($theme), color));
|
|
34
29
|
} @else {
|
|
35
30
|
@include sass-utils.current-selector-or-root() {
|
|
36
|
-
@include token-utils.create-token-values-mixed(
|
|
37
|
-
m2-timepicker.$prefix,
|
|
38
|
-
m2-timepicker.get-color-tokens($theme)
|
|
39
|
-
);
|
|
31
|
+
@include token-utils.create-token-values-mixed(m2-timepicker.get-color-tokens($theme));
|
|
40
32
|
}
|
|
41
33
|
}
|
|
42
34
|
}
|
|
@@ -45,13 +37,10 @@
|
|
|
45
37
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
46
38
|
@mixin typography($theme) {
|
|
47
39
|
@if inspection.get-theme-version($theme) == 1 {
|
|
48
|
-
@include
|
|
40
|
+
@include token-utils.create-token-values(map.get(m3-timepicker.get-tokens($theme), typography));
|
|
49
41
|
} @else {
|
|
50
42
|
@include sass-utils.current-selector-or-root() {
|
|
51
|
-
@include token-utils.create-token-values-mixed(
|
|
52
|
-
m2-timepicker.$prefix,
|
|
53
|
-
m2-timepicker.get-typography-tokens($theme)
|
|
54
|
-
);
|
|
43
|
+
@include token-utils.create-token-values-mixed(m2-timepicker.get-typography-tokens($theme));
|
|
55
44
|
}
|
|
56
45
|
}
|
|
57
46
|
}
|
|
@@ -60,13 +49,10 @@
|
|
|
60
49
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
61
50
|
@mixin density($theme) {
|
|
62
51
|
@if inspection.get-theme-version($theme) == 1 {
|
|
63
|
-
|
|
52
|
+
@include token-utils.create-token-values(map.get(m3-timepicker.get-tokens($theme), density));
|
|
64
53
|
} @else {
|
|
65
54
|
@include sass-utils.current-selector-or-root() {
|
|
66
|
-
@include token-utils.create-token-values-mixed(
|
|
67
|
-
m2-timepicker.$prefix,
|
|
68
|
-
m2-timepicker.get-density-tokens($theme)
|
|
69
|
-
);
|
|
55
|
+
@include token-utils.create-token-values-mixed(m2-timepicker.get-density-tokens($theme));
|
|
70
56
|
}
|
|
71
57
|
}
|
|
72
58
|
}
|
|
@@ -75,8 +61,8 @@
|
|
|
75
61
|
@function _define-overrides() {
|
|
76
62
|
@return (
|
|
77
63
|
(
|
|
78
|
-
namespace:
|
|
79
|
-
tokens:
|
|
64
|
+
namespace: timepicker,
|
|
65
|
+
tokens: token-utils.get-overrides(m3-timepicker.get-tokens(), timepicker)
|
|
80
66
|
),
|
|
81
67
|
);
|
|
82
68
|
}
|
|
@@ -84,18 +70,19 @@
|
|
|
84
70
|
/// Outputs the CSS variable values for the given tokens.
|
|
85
71
|
/// @param {Map} $tokens The token values to emit.
|
|
86
72
|
@mixin overrides($tokens: ()) {
|
|
87
|
-
|
|
73
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
88
74
|
}
|
|
89
75
|
|
|
90
76
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-timepicker.
|
|
91
77
|
/// @param {Map} $theme The theme to generate styles for.
|
|
92
|
-
/// @param {
|
|
93
|
-
|
|
94
|
-
/// or error (If not specified, default primary color will be used).
|
|
95
|
-
@mixin theme($theme) {
|
|
78
|
+
/// @param {String} $color-variant The color variant to use for the component
|
|
79
|
+
@mixin theme($theme, $color-variant: null) {
|
|
96
80
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-timepicker') {
|
|
97
81
|
@if inspection.get-theme-version($theme) == 1 {
|
|
98
|
-
@include
|
|
82
|
+
@include base($theme);
|
|
83
|
+
@include color($theme);
|
|
84
|
+
@include density($theme);
|
|
85
|
+
@include typography($theme);
|
|
99
86
|
} @else {
|
|
100
87
|
@include base($theme);
|
|
101
88
|
@if inspection.theme-has($theme, color) {
|
|
@@ -110,15 +97,3 @@
|
|
|
110
97
|
}
|
|
111
98
|
}
|
|
112
99
|
}
|
|
113
|
-
|
|
114
|
-
@mixin _theme-from-tokens($tokens) {
|
|
115
|
-
@include validation.selector-defined(
|
|
116
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
117
|
-
);
|
|
118
|
-
@if ($tokens != ()) {
|
|
119
|
-
@include token-utils.create-token-values(
|
|
120
|
-
m2-timepicker.$prefix,
|
|
121
|
-
map.get($tokens, m2-timepicker.$prefix)
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
}
|
package/toolbar/_m2-toolbar.scss
CHANGED
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
@use '../core/theming/inspection';
|
|
5
5
|
@use '../core/style/sass-utils';
|
|
6
6
|
|
|
7
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
8
|
-
$prefix: (mat, toolbar);
|
|
9
|
-
|
|
10
7
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
11
8
|
// but may be in a future version of the theming API.
|
|
12
9
|
@function get-unthemable-tokens() {
|
|
@@ -24,11 +21,13 @@ $prefix: (mat, toolbar);
|
|
|
24
21
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
25
22
|
@function get-typography-tokens($theme) {
|
|
26
23
|
@return (
|
|
27
|
-
title-text-font: inspection.get-theme-typography($theme, headline-6, font-family),
|
|
28
|
-
title-text-line-height:
|
|
29
|
-
|
|
30
|
-
title-text-
|
|
31
|
-
title-text-
|
|
24
|
+
toolbar-title-text-font: inspection.get-theme-typography($theme, headline-6, font-family),
|
|
25
|
+
toolbar-title-text-line-height:
|
|
26
|
+
inspection.get-theme-typography($theme, headline-6, line-height),
|
|
27
|
+
toolbar-title-text-size: inspection.get-theme-typography($theme, headline-6, font-size),
|
|
28
|
+
toolbar-title-text-tracking:
|
|
29
|
+
inspection.get-theme-typography($theme, headline-6, letter-spacing),
|
|
30
|
+
toolbar-title-text-weight: inspection.get-theme-typography($theme, headline-6, font-weight),
|
|
32
31
|
);
|
|
33
32
|
}
|
|
34
33
|
|
|
@@ -50,16 +49,16 @@ $prefix: (mat, toolbar);
|
|
|
50
49
|
);
|
|
51
50
|
|
|
52
51
|
@return (
|
|
53
|
-
standard-height: map.get($standard-scale, $density-scale),
|
|
54
|
-
mobile-height: map.get($mobile-scale, $density-scale),
|
|
52
|
+
toolbar-standard-height: map.get($standard-scale, $density-scale),
|
|
53
|
+
toolbar-mobile-height: map.get($mobile-scale, $density-scale),
|
|
55
54
|
);
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
// Generates the tokens used to theme the toolbar based on a palette.
|
|
59
58
|
@function private-get-color-palette-color-tokens($background-color, $text-color) {
|
|
60
59
|
@return (
|
|
61
|
-
container-background-color: $background-color,
|
|
62
|
-
container-text-color: $text-color,
|
|
60
|
+
toolbar-container-background-color: $background-color,
|
|
61
|
+
toolbar-container-text-color: $text-color,
|
|
63
62
|
);
|
|
64
63
|
}
|
|
65
64
|
|
package/toolbar/_m3-toolbar.scss
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
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, toolbar);
|
|
6
|
+
@use '../core/tokens/m3';
|
|
10
7
|
|
|
11
8
|
/// Generates custom tokens for the mat-toolbar.
|
|
12
9
|
/// @param {Map} $systems The MDC system tokens
|
|
13
10
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
14
11
|
/// @param {Map} $token-slots Possible token slots
|
|
15
12
|
/// @return {Map} A set of custom tokens for the mat-toolbar
|
|
16
|
-
@function get-tokens($
|
|
17
|
-
$
|
|
18
|
-
m3-utils.generate-typography-tokens($systems, title-text, title-large),
|
|
19
|
-
(
|
|
20
|
-
container-background-color: map.get($systems, md-sys-color, surface),
|
|
21
|
-
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
22
|
-
)
|
|
23
|
-
);
|
|
13
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
14
|
+
$system: m3-utils.get-system($theme);
|
|
24
15
|
|
|
25
|
-
@return
|
|
16
|
+
@return (
|
|
17
|
+
base: (),
|
|
18
|
+
color: (
|
|
19
|
+
toolbar-container-background-color: map.get($system, surface),
|
|
20
|
+
toolbar-container-text-color: map.get($system, on-surface),
|
|
21
|
+
),
|
|
22
|
+
typography: (
|
|
23
|
+
toolbar-title-text-font: map.get($system, title-large-font),
|
|
24
|
+
toolbar-title-text-line-height: map.get($system, title-large-line-height),
|
|
25
|
+
toolbar-title-text-size: map.get($system, title-large-size),
|
|
26
|
+
toolbar-title-text-tracking: map.get($system, title-large-tracking),
|
|
27
|
+
toolbar-title-text-weight: map.get($system, title-large-weight),
|
|
28
|
+
),
|
|
29
|
+
density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
|
|
30
|
+
);
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
29
|
-
@function get-density-tokens($
|
|
30
|
-
$scale: theming.clamp-density(
|
|
34
|
+
@function get-density-tokens($scale) {
|
|
35
|
+
$scale: theming.clamp-density($scale, -3);
|
|
31
36
|
$index: ($scale * -1) + 1;
|
|
32
37
|
|
|
33
38
|
@return (
|
|
34
|
-
standard-height: list.nth((64px, 60px, 56px, 52px), $index),
|
|
35
|
-
mobile-height: list.nth((56px, 52px, 48px, 44px), $index),
|
|
39
|
+
toolbar-standard-height: list.nth((64px, 60px, 56px, 52px), $index),
|
|
40
|
+
toolbar-mobile-height: list.nth((56px, 52px, 48px, 44px), $index),
|
|
36
41
|
);
|
|
37
42
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@use '../core/style/sass-utils';
|
|
3
3
|
@use '../core/theming/inspection';
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
|
-
@use '../core/theming/validation';
|
|
6
5
|
@use '../core/tokens/token-utils';
|
|
7
6
|
@use '../core/typography/typography';
|
|
8
7
|
@use './m2-toolbar';
|
|
@@ -10,7 +9,6 @@
|
|
|
10
9
|
|
|
11
10
|
@mixin _palette-styles($theme, $palette-name) {
|
|
12
11
|
@include token-utils.create-token-values-mixed(
|
|
13
|
-
m2-toolbar.$prefix,
|
|
14
12
|
m2-toolbar.private-get-color-palette-color-tokens(
|
|
15
13
|
$background-color: inspection.get-theme-color($theme, $palette-name),
|
|
16
14
|
$text-color: inspection.get-theme-color($theme, $palette-name, default-contrast)
|
|
@@ -23,13 +21,10 @@
|
|
|
23
21
|
|
|
24
22
|
@mixin color($theme) {
|
|
25
23
|
@if inspection.get-theme-version($theme) == 1 {
|
|
26
|
-
@include
|
|
24
|
+
@include token-utils.create-token-values(map.get(m3-toolbar.get-tokens($theme), color));
|
|
27
25
|
} @else {
|
|
28
26
|
@include sass-utils.current-selector-or-root() {
|
|
29
|
-
@include token-utils.create-token-values-mixed(
|
|
30
|
-
m2-toolbar.$prefix,
|
|
31
|
-
m2-toolbar.get-color-tokens($theme)
|
|
32
|
-
);
|
|
27
|
+
@include token-utils.create-token-values-mixed(m2-toolbar.get-color-tokens($theme));
|
|
33
28
|
}
|
|
34
29
|
|
|
35
30
|
.mat-toolbar {
|
|
@@ -50,30 +45,23 @@
|
|
|
50
45
|
|
|
51
46
|
@mixin typography($theme) {
|
|
52
47
|
@if inspection.get-theme-version($theme) == 1 {
|
|
53
|
-
@include
|
|
48
|
+
@include token-utils.create-token-values(map.get(m3-toolbar.get-tokens($theme), typography));
|
|
54
49
|
} @else {
|
|
55
50
|
// TODO(mmalerba): Stop calling this and resolve resulting screen diffs.
|
|
56
51
|
$theme: inspection.private-get-typography-back-compat-theme($theme);
|
|
57
52
|
|
|
58
53
|
@include sass-utils.current-selector-or-root() {
|
|
59
|
-
@include token-utils.create-token-values-mixed(
|
|
60
|
-
m2-toolbar.$prefix,
|
|
61
|
-
m2-toolbar.get-typography-tokens($theme)
|
|
62
|
-
);
|
|
54
|
+
@include token-utils.create-token-values-mixed(m2-toolbar.get-typography-tokens($theme));
|
|
63
55
|
}
|
|
64
56
|
}
|
|
65
57
|
}
|
|
66
58
|
|
|
67
59
|
@mixin density($theme) {
|
|
68
60
|
@if inspection.get-theme-version($theme) == 1 {
|
|
69
|
-
@include token-utils.create-token-values(
|
|
70
|
-
m3-toolbar.$prefix, m3-toolbar.get-density-tokens($theme));
|
|
61
|
+
@include token-utils.create-token-values(map.get(m3-toolbar.get-tokens($theme), density));
|
|
71
62
|
} @else {
|
|
72
63
|
@include sass-utils.current-selector-or-root() {
|
|
73
|
-
@include token-utils.create-token-values-mixed(
|
|
74
|
-
m2-toolbar.$prefix,
|
|
75
|
-
m2-toolbar.get-density-tokens($theme)
|
|
76
|
-
);
|
|
64
|
+
@include token-utils.create-token-values-mixed(m2-toolbar.get-density-tokens($theme));
|
|
77
65
|
}
|
|
78
66
|
}
|
|
79
67
|
}
|
|
@@ -82,8 +70,8 @@
|
|
|
82
70
|
@function _define-overrides() {
|
|
83
71
|
@return (
|
|
84
72
|
(
|
|
85
|
-
namespace:
|
|
86
|
-
tokens:
|
|
73
|
+
namespace: toolbar,
|
|
74
|
+
tokens: token-utils.get-overrides(m3-toolbar.get-tokens(), toolbar)
|
|
87
75
|
),
|
|
88
76
|
);
|
|
89
77
|
}
|
|
@@ -91,16 +79,16 @@
|
|
|
91
79
|
/// Outputs the CSS variable values for the given tokens.
|
|
92
80
|
/// @param {Map} $tokens The token values to emit.
|
|
93
81
|
@mixin overrides($tokens: ()) {
|
|
94
|
-
|
|
82
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
95
83
|
}
|
|
96
84
|
|
|
97
85
|
@mixin theme($theme) {
|
|
98
86
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-toolbar') {
|
|
99
87
|
@if inspection.get-theme-version($theme) == 1 {
|
|
100
|
-
@include
|
|
101
|
-
@
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
@include base($theme);
|
|
89
|
+
@include color($theme);
|
|
90
|
+
@include density($theme);
|
|
91
|
+
@include typography($theme);
|
|
104
92
|
} @else {
|
|
105
93
|
@include base($theme);
|
|
106
94
|
@if inspection.theme-has($theme, color) {
|
|
@@ -115,15 +103,3 @@
|
|
|
115
103
|
}
|
|
116
104
|
}
|
|
117
105
|
}
|
|
118
|
-
|
|
119
|
-
@mixin _theme-from-tokens($tokens) {
|
|
120
|
-
@include validation.selector-defined(
|
|
121
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
122
|
-
);
|
|
123
|
-
@if ($tokens != ()) {
|
|
124
|
-
@include token-utils.create-token-values(
|
|
125
|
-
m2-toolbar.$prefix,
|
|
126
|
-
map.get($tokens, m2-toolbar.$prefix)
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
}
|
package/tooltip/_m2-tooltip.scss
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
@use '../core/style/sass-utils';
|
|
3
3
|
@use '../core/tokens/m2-utils';
|
|
4
4
|
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, tooltip);
|
|
7
|
-
|
|
8
5
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
9
6
|
// but may be in a future version of the theming API.
|
|
10
7
|
//
|
|
@@ -13,8 +10,8 @@ $prefix: (mat, tooltip);
|
|
|
13
10
|
// our CSS.
|
|
14
11
|
@function get-unthemable-tokens() {
|
|
15
12
|
@return (
|
|
16
|
-
container-shape: 4px,
|
|
17
|
-
supporting-text-line-height: 16px,
|
|
13
|
+
tooltip-container-shape: 4px,
|
|
14
|
+
tooltip-supporting-text-line-height: 16px,
|
|
18
15
|
);
|
|
19
16
|
}
|
|
20
17
|
|
|
@@ -22,18 +19,19 @@ $prefix: (mat, tooltip);
|
|
|
22
19
|
@function get-color-tokens($theme) {
|
|
23
20
|
|
|
24
21
|
@return (
|
|
25
|
-
container-color: inspection.get-theme-color($theme, background, tooltip),
|
|
26
|
-
supporting-text-color: #fff,
|
|
22
|
+
tooltip-container-color: inspection.get-theme-color($theme, background, tooltip),
|
|
23
|
+
tooltip-supporting-text-color: #fff,
|
|
27
24
|
);
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
31
28
|
@function get-typography-tokens($theme) {
|
|
32
29
|
@return (
|
|
33
|
-
supporting-text-font: inspection.get-theme-typography($theme, caption, font-family),
|
|
34
|
-
supporting-text-size: inspection.get-theme-typography($theme, caption, font-size),
|
|
35
|
-
supporting-text-weight: inspection.get-theme-typography($theme, caption, font-weight),
|
|
36
|
-
supporting-text-tracking:
|
|
30
|
+
tooltip-supporting-text-font: inspection.get-theme-typography($theme, caption, font-family),
|
|
31
|
+
tooltip-supporting-text-size: inspection.get-theme-typography($theme, caption, font-size),
|
|
32
|
+
tooltip-supporting-text-weight: inspection.get-theme-typography($theme, caption, font-weight),
|
|
33
|
+
tooltip-supporting-text-tracking:
|
|
34
|
+
inspection.get-theme-typography($theme, caption, letter-spacing),
|
|
37
35
|
);
|
|
38
36
|
}
|
|
39
37
|
|
package/tooltip/_m3-tooltip.scss
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
@use '../core/tokens/m3-utils';
|
|
2
2
|
@use 'sass:map';
|
|
3
|
-
|
|
4
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
-
$prefix: (mat, tooltip);
|
|
3
|
+
@use '../core/tokens/m3';
|
|
6
4
|
|
|
7
5
|
/// Generates the tokens for MDC plain-tooltip
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/// @param {Map} $token-slots Possible token slots
|
|
11
|
-
/// @return {Map} A set of tokens for the MDC plain-tooltip
|
|
12
|
-
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
-
$tokens: (
|
|
14
|
-
container-color: map.get($systems, md-sys-color, inverse-surface),
|
|
15
|
-
container-shape: map.get($systems, md-sys-shape, corner-extra-small),
|
|
16
|
-
supporting-text-color: map.get($systems, md-sys-color, inverse-on-surface),
|
|
17
|
-
supporting-text-font: map.get($systems, md-sys-typescale, body-small-font),
|
|
18
|
-
supporting-text-line-height: map.get($systems, md-sys-typescale, body-small-line-height),
|
|
19
|
-
supporting-text-size: map.get($systems, md-sys-typescale, body-small-size),
|
|
20
|
-
supporting-text-tracking: map.get($systems, md-sys-typescale, body-small-tracking),
|
|
21
|
-
supporting-text-weight: map.get($systems, md-sys-typescale, body-small-weight)
|
|
22
|
-
);
|
|
6
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
7
|
+
$system: m3-utils.get-system($theme);
|
|
23
8
|
|
|
24
|
-
@return
|
|
9
|
+
@return (
|
|
10
|
+
base: (),
|
|
11
|
+
color: (
|
|
12
|
+
tooltip-container-color: map.get($system, inverse-surface),
|
|
13
|
+
tooltip-container-shape: map.get($system, corner-extra-small),
|
|
14
|
+
tooltip-supporting-text-color: map.get($system, inverse-on-surface),
|
|
15
|
+
),
|
|
16
|
+
typography: (
|
|
17
|
+
tooltip-supporting-text-font: map.get($system, body-small-font),
|
|
18
|
+
tooltip-supporting-text-line-height: map.get($system, body-small-line-height),
|
|
19
|
+
tooltip-supporting-text-size: map.get($system, body-small-size),
|
|
20
|
+
tooltip-supporting-text-tracking: map.get($system, body-small-tracking),
|
|
21
|
+
tooltip-supporting-text-weight: map.get($system, body-small-weight)
|
|
22
|
+
),
|
|
23
|
+
density: (),
|
|
24
|
+
);
|
|
25
25
|
}
|
|
@@ -1,60 +1,49 @@
|
|
|
1
1
|
@use '../core/style/sass-utils';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
3
|
@use '../core/theming/inspection';
|
|
4
|
-
@use '../core/theming/validation';
|
|
5
4
|
@use '../core/tokens/token-utils';
|
|
6
5
|
@use '../core/typography/typography';
|
|
7
6
|
@use './m2-tooltip';
|
|
7
|
+
@use './m3-tooltip';
|
|
8
|
+
@use 'sass:map';
|
|
8
9
|
|
|
9
10
|
@mixin base($theme) {
|
|
10
11
|
@if inspection.get-theme-version($theme) == 1 {
|
|
11
|
-
@include
|
|
12
|
+
@include token-utils.create-token-values(map.get(m3-tooltip.get-tokens($theme), base));
|
|
12
13
|
} @else {
|
|
13
14
|
// Add default values for tokens not related to color, typography, or density.
|
|
14
15
|
@include sass-utils.current-selector-or-root() {
|
|
15
|
-
@include token-utils.create-token-values-mixed(
|
|
16
|
-
m2-tooltip.$prefix,
|
|
17
|
-
m2-tooltip.get-unthemable-tokens()
|
|
18
|
-
);
|
|
16
|
+
@include token-utils.create-token-values-mixed(m2-tooltip.get-unthemable-tokens());
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
@mixin color($theme) {
|
|
24
22
|
@if inspection.get-theme-version($theme) == 1 {
|
|
25
|
-
@include
|
|
23
|
+
@include token-utils.create-token-values(map.get(m3-tooltip.get-tokens($theme), color));
|
|
26
24
|
} @else {
|
|
27
25
|
@include sass-utils.current-selector-or-root() {
|
|
28
|
-
@include token-utils.create-token-values-mixed(
|
|
29
|
-
m2-tooltip.$prefix,
|
|
30
|
-
m2-tooltip.get-color-tokens($theme)
|
|
31
|
-
);
|
|
26
|
+
@include token-utils.create-token-values-mixed(m2-tooltip.get-color-tokens($theme));
|
|
32
27
|
}
|
|
33
28
|
}
|
|
34
29
|
}
|
|
35
30
|
|
|
36
31
|
@mixin typography($theme) {
|
|
37
32
|
@if inspection.get-theme-version($theme) == 1 {
|
|
38
|
-
@include
|
|
33
|
+
@include token-utils.create-token-values(map.get(m3-tooltip.get-tokens($theme), typography));
|
|
39
34
|
} @else {
|
|
40
35
|
@include sass-utils.current-selector-or-root() {
|
|
41
|
-
@include token-utils.create-token-values-mixed(
|
|
42
|
-
m2-tooltip.$prefix,
|
|
43
|
-
m2-tooltip.get-typography-tokens($theme)
|
|
44
|
-
);
|
|
36
|
+
@include token-utils.create-token-values-mixed(m2-tooltip.get-typography-tokens($theme));
|
|
45
37
|
}
|
|
46
38
|
}
|
|
47
39
|
}
|
|
48
40
|
|
|
49
41
|
@mixin density($theme) {
|
|
50
42
|
@if inspection.get-theme-version($theme) == 1 {
|
|
51
|
-
|
|
43
|
+
@include token-utils.create-token-values(map.get(m3-tooltip.get-tokens($theme), density));
|
|
52
44
|
} @else {
|
|
53
45
|
@include sass-utils.current-selector-or-root() {
|
|
54
|
-
@include token-utils.create-token-values-mixed(
|
|
55
|
-
m2-tooltip.$prefix,
|
|
56
|
-
m2-tooltip.get-density-tokens($theme)
|
|
57
|
-
);
|
|
46
|
+
@include token-utils.create-token-values-mixed(m2-tooltip.get-density-tokens($theme));
|
|
58
47
|
}
|
|
59
48
|
}
|
|
60
49
|
}
|
|
@@ -63,20 +52,23 @@
|
|
|
63
52
|
@function _define-overrides() {
|
|
64
53
|
@return (
|
|
65
54
|
(
|
|
66
|
-
namespace:
|
|
67
|
-
tokens:
|
|
55
|
+
namespace: tooltip,
|
|
56
|
+
tokens: token-utils.get-overrides(m3-tooltip.get-tokens(), tooltip)
|
|
68
57
|
),
|
|
69
58
|
);
|
|
70
59
|
}
|
|
71
60
|
|
|
72
61
|
@mixin overrides($tokens: ()) {
|
|
73
|
-
|
|
62
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
74
63
|
}
|
|
75
64
|
|
|
76
65
|
@mixin theme($theme) {
|
|
77
66
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-tooltip') {
|
|
78
67
|
@if inspection.get-theme-version($theme) == 1 {
|
|
79
|
-
@include
|
|
68
|
+
@include base($theme);
|
|
69
|
+
@include color($theme);
|
|
70
|
+
@include density($theme);
|
|
71
|
+
@include typography($theme);
|
|
80
72
|
} @else {
|
|
81
73
|
@include base($theme);
|
|
82
74
|
@if inspection.theme-has($theme, color) {
|
|
@@ -91,13 +83,3 @@
|
|
|
91
83
|
}
|
|
92
84
|
}
|
|
93
85
|
}
|
|
94
|
-
|
|
95
|
-
@mixin _theme-from-tokens($tokens) {
|
|
96
|
-
@include validation.selector-defined(
|
|
97
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
98
|
-
);
|
|
99
|
-
@if $tokens != () {
|
|
100
|
-
$tokens: token-utils.get-tokens-for($tokens, m2-tooltip.$prefix);
|
|
101
|
-
@include token-utils.create-token-values(m2-tooltip.$prefix, $tokens);
|
|
102
|
-
}
|
|
103
|
-
}
|
package/tree/_m2-tree.scss
CHANGED
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
@use '../core/theming/inspection';
|
|
5
5
|
@use '../core/style/sass-utils';
|
|
6
6
|
|
|
7
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
8
|
-
$prefix: (mat, tree);
|
|
9
|
-
|
|
10
7
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
11
8
|
// but may be in a future version of the theming API.
|
|
12
9
|
@function get-unthemable-tokens() {
|
|
@@ -18,17 +15,17 @@ $prefix: (mat, tree);
|
|
|
18
15
|
$foreground-base: inspection.get-theme-color($theme, foreground, base);
|
|
19
16
|
|
|
20
17
|
@return (
|
|
21
|
-
container-background-color: inspection.get-theme-color($theme, background, card),
|
|
22
|
-
node-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
18
|
+
tree-container-background-color: inspection.get-theme-color($theme, background, card),
|
|
19
|
+
tree-node-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
23
20
|
);
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
27
24
|
@function get-typography-tokens($theme) {
|
|
28
25
|
@return (
|
|
29
|
-
node-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
30
|
-
node-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
31
|
-
node-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
|
|
26
|
+
tree-node-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
27
|
+
tree-node-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
28
|
+
tree-node-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
|
|
32
29
|
|
|
33
30
|
// TODO(crisbeto): provide tokens for line height and letter spacing to match other components.
|
|
34
31
|
);
|
|
@@ -46,7 +43,7 @@ $prefix: (mat, tree);
|
|
|
46
43
|
);
|
|
47
44
|
|
|
48
45
|
@return (
|
|
49
|
-
node-min-height: map.get($min-height-scale, $density-scale)
|
|
46
|
+
tree-node-min-height: map.get($min-height-scale, $density-scale)
|
|
50
47
|
);
|
|
51
48
|
}
|
|
52
49
|
|