@angular/material 20.0.0-rc.1 → 20.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/_autocomplete-theme.scss +17 -37
- package/autocomplete/_m2-autocomplete.scss +3 -6
- package/autocomplete/_m3-autocomplete.scss +14 -9
- package/badge/_badge-theme.scss +9 -35
- package/badge/_m2-badge.scss +32 -35
- package/badge/_m3-badge.scss +31 -32
- package/bottom-sheet/_bottom-sheet-theme.scss +16 -27
- package/bottom-sheet/_m2-bottom-sheet.scss +11 -11
- package/bottom-sheet/_m3-bottom-sheet.scss +18 -17
- package/button/_button-theme.scss +29 -46
- package/button/_fab-theme.scss +22 -41
- package/button/_icon-button-theme.scss +29 -46
- package/button/_m2-button.scss +135 -133
- package/button/_m2-fab.scss +51 -53
- package/button/_m2-icon-button.scss +14 -17
- package/button/_m3-button.scss +145 -240
- package/button/_m3-fab.scss +69 -166
- package/button/_m3-icon-button.scss +28 -56
- package/button-toggle/_button-toggle-theme.scss +23 -49
- package/button-toggle/_m2-button-toggle.scss +45 -37
- package/button-toggle/_m3-button-toggle.scss +53 -53
- package/card/_card-theme.scss +16 -37
- package/card/_m2-card.scss +24 -25
- package/card/_m3-card.scss +32 -36
- package/checkbox/_checkbox-theme.scss +25 -52
- package/checkbox/_m2-checkbox.scss +32 -35
- package/checkbox/_m3-checkbox.scss +49 -84
- package/chips/_chips-theme.scss +24 -44
- package/chips/_m2-chip.scss +47 -51
- package/chips/_m3-chip.scss +63 -110
- package/core/_core-theme.scss +58 -56
- package/core/_core.scss +15 -18
- package/core/_m2-app.scss +3 -7
- package/core/_m3-app.scss +37 -24
- package/core/option/_m2-optgroup.scss +6 -9
- package/core/option/_m2-option.scss +10 -13
- package/core/option/_m3-optgroup.scss +16 -13
- package/core/option/_m3-option.scss +28 -48
- package/core/option/_optgroup-theme.scss +14 -25
- package/core/option/_option-theme.scss +22 -33
- package/core/ripple/_m2-ripple.scss +1 -4
- package/core/ripple/_m3-ripple.scss +11 -13
- package/core/ripple/_ripple-theme.scss +15 -33
- package/core/ripple/_ripple.scss +5 -5
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +10 -11
- package/core/selection/pseudo-checkbox/_m3-pseudo-checkbox.scss +25 -40
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -27
- package/core/style/_sass-utils.scss +0 -29
- package/core/theming/_color-api-backwards-compatibility.scss +46 -29
- package/core/theming/_definition.scss +6 -0
- package/core/theming/_inspection.scss +0 -25
- package/core/tokens/_m3-system.scss +19 -68
- package/core/tokens/_m3-tokens.scss +0 -128
- package/core/tokens/_m3-utils.scss +11 -83
- package/core/tokens/_token-utils.scss +52 -246
- package/core/tokens/m3/_index.scss +1 -0
- package/core/tokens/m3/_theme.scss +47 -0
- package/datepicker/_datepicker-theme.scss +24 -39
- package/datepicker/_m2-datepicker.scss +55 -50
- package/datepicker/_m3-datepicker.scss +65 -113
- package/datepicker/index.d.ts +1 -0
- package/dialog/_dialog-theme.scss +15 -27
- package/dialog/_m2-dialog.scss +25 -26
- package/dialog/_m3-dialog.scss +35 -35
- package/divider/_divider-theme.scss +14 -25
- package/divider/_m2-divider.scss +2 -5
- package/divider/_m3-divider.scss +13 -13
- package/expansion/_expansion-theme.scss +15 -33
- package/expansion/_m2-expansion.scss +28 -27
- package/expansion/_m3-expansion.scss +41 -36
- package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +23 -23
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -11
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +11 -11
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +19 -23
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +20 -20
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +47 -47
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +11 -11
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +52 -52
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/{common-module-CF0eSYO4.mjs → common-module-BeAwwoi6.mjs} +5 -5
- package/fesm2022/common-module-BeAwwoi6.mjs.map +1 -0
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +24 -24
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
- package/fesm2022/date-range-input-harness-Bp1T4oUe.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +99 -95
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +18 -5
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +2 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +8 -8
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/{error-options-CbAHLQL5.mjs → error-options-C79tZCHG.mjs} +7 -7
- package/fesm2022/error-options-C79tZCHG.mjs.map +1 -0
- package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +28 -28
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/{form-field-sL9_TuE-.mjs → form-field-Cdw3iYrm.mjs} +33 -33
- package/fesm2022/form-field-Cdw3iYrm.mjs.map +1 -0
- package/fesm2022/form-field.mjs +3 -3
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +24 -24
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +8 -8
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/{icon-button-BASP1JI8.mjs → icon-button-D5zzuoJc.mjs} +9 -9
- package/fesm2022/icon-button-D5zzuoJc.mjs.map +1 -0
- package/fesm2022/{icon-registry-DVLYRZv3.mjs → icon-registry-DVrJNtTv.mjs} +4 -4
- package/fesm2022/icon-registry-DVrJNtTv.mjs.map +1 -0
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/{index-BNtCg9r0.mjs → index-CrjYeoWX.mjs} +9 -9
- package/fesm2022/index-CrjYeoWX.mjs.map +1 -0
- package/fesm2022/{index-DxCSjCL3.mjs → index-DTIUI_kX.mjs} +7 -7
- package/fesm2022/index-DTIUI_kX.mjs.map +1 -0
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness-oQzj5EsQ.mjs.map +1 -1
- package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
- package/fesm2022/input.mjs +12 -12
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/{internal-form-field-_OHaksOO.mjs → internal-form-field-B9_shC5z.mjs} +4 -4
- package/fesm2022/internal-form-field-B9_shC5z.mjs.map +1 -0
- package/fesm2022/{line-CtAKiRo6.mjs → line-XysKlyvU.mjs} +9 -9
- package/fesm2022/line-XysKlyvU.mjs.map +1 -0
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +55 -55
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +20 -20
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{module-DToxyW7l.mjs → module-CVpKZX1V.mjs} +7 -7
- package/fesm2022/module-CVpKZX1V.mjs.map +1 -0
- package/fesm2022/{module-ChwDH6BC.mjs → module-CdXqcjot.mjs} +28 -28
- package/fesm2022/module-CdXqcjot.mjs.map +1 -0
- package/fesm2022/{module-m5vWw9-5.mjs → module-CwYXiMoV.mjs} +12 -12
- package/fesm2022/module-CwYXiMoV.mjs.map +1 -0
- package/fesm2022/{module-DqTK2swA.mjs → module-r2U_2G3G.mjs} +17 -17
- package/fesm2022/module-r2U_2G3G.mjs.map +1 -0
- package/fesm2022/{option-hkPAbXDN.mjs → option-D4ZNnnWi.mjs} +11 -11
- package/fesm2022/option-D4ZNnnWi.mjs.map +1 -0
- package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +25 -25
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +8 -8
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +8 -8
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/{pseudo-checkbox-Ddidc23S.mjs → pseudo-checkbox-DQugCpur.mjs} +4 -4
- package/fesm2022/pseudo-checkbox-DQugCpur.mjs.map +1 -0
- package/fesm2022/{pseudo-checkbox-module--am9-RIA.mjs → pseudo-checkbox-module-BXWS_-PP.mjs} +7 -7
- package/fesm2022/pseudo-checkbox-module-BXWS_-PP.mjs.map +1 -0
- package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +19 -16
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/{ripple-DUGA2BAa.mjs → ripple-BtLhcfGO.mjs} +7 -7
- package/fesm2022/ripple-BtLhcfGO.mjs.map +1 -0
- package/fesm2022/{ripple-loader-Xy4bv6Xh.mjs → ripple-loader-DBdhLqHy.mjs} +5 -5
- package/fesm2022/ripple-loader-DBdhLqHy.mjs.map +1 -0
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +12 -12
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +29 -25
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +11 -11
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +21 -21
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +29 -29
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +15 -15
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +38 -38
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/{structural-styles-DA18Hchc.mjs → structural-styles-DWEe15sC.mjs} +4 -4
- package/fesm2022/structural-styles-DWEe15sC.mjs.map +1 -0
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +56 -56
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +67 -63
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +20 -20
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +12 -12
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +2 -2
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +26 -26
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +23 -55
- package/form-field/_m2-form-field.scss +112 -91
- package/form-field/_m3-form-field.scss +116 -131
- package/grid-list/_grid-list-theme.scss +13 -23
- package/grid-list/_m2-grid-list.scss +8 -7
- package/grid-list/_m3-grid-list.scss +14 -15
- package/icon/_icon-theme.scss +20 -30
- package/icon/_m2-icon.scss +1 -4
- package/icon/_m3-icon.scss +13 -27
- package/input/_input-theme.scss +7 -40
- package/list/_list-theme.scss +22 -52
- package/list/_m2-list.scss +56 -55
- package/list/_m3-list.scss +69 -67
- package/menu/_m2-menu.scss +22 -25
- package/menu/_m3-menu.scss +35 -38
- package/menu/_menu-theme.scss +15 -27
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +16 -17
- package/paginator/_m3-paginator.scss +28 -27
- package/paginator/_paginator-theme.scss +14 -40
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/_m2-progress-bar.scss +5 -8
- package/progress-bar/_m3-progress-bar.scss +17 -26
- package/progress-bar/_progress-bar-theme.scss +17 -27
- package/progress-spinner/_m2-progress-spinner.scss +3 -6
- package/progress-spinner/_m3-progress-spinner.scss +15 -22
- package/progress-spinner/_progress-spinner-theme.scss +20 -43
- package/radio/_m2-radio.scss +24 -27
- package/radio/_m3-radio.scss +44 -58
- package/radio/_radio-theme.scss +23 -50
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/index_bundled.js +2 -0
- package/schematics/ng-update/index_bundled.js.map +1 -1
- package/select/_m2-select.scss +15 -18
- package/select/_m3-select.scss +32 -38
- package/select/_select-theme.scss +23 -50
- package/sidenav/_m2-sidenav.scss +9 -12
- package/sidenav/_m3-sidenav.scss +20 -22
- package/sidenav/_sidenav-theme.scss +14 -25
- package/slide-toggle/_m2-slide-toggle.scss +82 -83
- package/slide-toggle/_m3-slide-toggle.scss +102 -143
- package/slide-toggle/_slide-toggle-theme.scss +26 -61
- package/slider/_m2-slider.scss +46 -46
- package/slider/_m3-slider.scss +54 -109
- package/slider/_slider-theme.scss +23 -34
- package/snack-bar/_m2-snack-bar.scss +10 -11
- package/snack-bar/_m3-snack-bar.scss +20 -19
- package/snack-bar/_snack-bar-theme.scss +14 -26
- package/sort/_m2-sort.scss +1 -4
- package/sort/_m3-sort.scss +11 -9
- package/sort/_sort-theme.scss +15 -27
- package/stepper/_m2-stepper.scss +32 -31
- package/stepper/_m3-stepper.scss +44 -79
- package/stepper/_stepper-theme.scss +22 -50
- package/table/_m2-table.scss +25 -26
- package/table/_m3-table.scss +36 -27
- package/table/_table-theme.scss +15 -32
- package/tabs/_m2-tabs.scss +26 -29
- package/tabs/_m3-tabs.scss +40 -51
- package/tabs/_tabs-theme.scss +37 -58
- package/tabs/index.d.ts +5 -3
- package/timepicker/_m2-timepicker.scss +3 -6
- package/timepicker/_m3-timepicker.scss +14 -15
- package/timepicker/_timepicker-theme.scss +20 -45
- package/toolbar/_m2-toolbar.scss +11 -12
- package/toolbar/_m3-toolbar.scss +22 -17
- package/toolbar/_toolbar-theme.scss +13 -37
- package/tooltip/_m2-tooltip.scss +9 -11
- package/tooltip/_m3-tooltip.scss +19 -19
- package/tooltip/_tooltip-theme.scss +17 -35
- package/tree/_m2-tree.scss +6 -9
- package/tree/_m3-tree.scss +19 -16
- package/tree/_tree-theme.scss +14 -36
- package/fesm2022/common-module-CF0eSYO4.mjs.map +0 -1
- package/fesm2022/error-options-CbAHLQL5.mjs.map +0 -1
- package/fesm2022/form-field-sL9_TuE-.mjs.map +0 -1
- package/fesm2022/icon-button-BASP1JI8.mjs.map +0 -1
- package/fesm2022/icon-registry-DVLYRZv3.mjs.map +0 -1
- package/fesm2022/index-BNtCg9r0.mjs.map +0 -1
- package/fesm2022/index-DxCSjCL3.mjs.map +0 -1
- package/fesm2022/internal-form-field-_OHaksOO.mjs.map +0 -1
- package/fesm2022/line-CtAKiRo6.mjs.map +0 -1
- package/fesm2022/module-ChwDH6BC.mjs.map +0 -1
- package/fesm2022/module-DToxyW7l.mjs.map +0 -1
- package/fesm2022/module-DqTK2swA.mjs.map +0 -1
- package/fesm2022/module-m5vWw9-5.mjs.map +0 -1
- package/fesm2022/option-hkPAbXDN.mjs.map +0 -1
- package/fesm2022/pseudo-checkbox-Ddidc23S.mjs.map +0 -1
- package/fesm2022/pseudo-checkbox-module--am9-RIA.mjs.map +0 -1
- package/fesm2022/ripple-DUGA2BAa.mjs.map +0 -1
- package/fesm2022/ripple-loader-Xy4bv6Xh.mjs.map +0 -1
- package/fesm2022/structural-styles-DA18Hchc.mjs.map +0 -1
- package/schematics/tsconfig.json +0 -26
|
@@ -1,43 +1,40 @@
|
|
|
1
1
|
@use './m2-option';
|
|
2
|
+
@use './m3-option';
|
|
2
3
|
@use '../tokens/token-utils';
|
|
3
4
|
@use '../style/sass-utils';
|
|
4
5
|
@use '../theming/theming';
|
|
5
6
|
@use '../theming/inspection';
|
|
6
|
-
@use '../theming/validation';
|
|
7
7
|
@use '../typography/typography';
|
|
8
|
+
@use 'sass:map';
|
|
8
9
|
|
|
9
10
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
10
11
|
/// for the mat-option.
|
|
11
12
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
12
13
|
@mixin base($theme) {
|
|
13
14
|
@if inspection.get-theme-version($theme) == 1 {
|
|
14
|
-
@include
|
|
15
|
+
@include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), base));
|
|
15
16
|
} @else {
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/// Outputs color theme styles for the mat-option.
|
|
20
21
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
21
|
-
/// @param {
|
|
22
|
-
|
|
23
|
-
/// tertiary, or error (If not specified, default secondary color will be used).
|
|
24
|
-
@mixin color($theme, $options...) {
|
|
22
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
23
|
+
@mixin color($theme, $color-variant: null) {
|
|
25
24
|
@if inspection.get-theme-version($theme) == 1 {
|
|
26
|
-
@include
|
|
25
|
+
@include token-utils.create-token-values(
|
|
26
|
+
map.get(m3-option.get-tokens($theme, $color-variant), color));
|
|
27
27
|
} @else {
|
|
28
28
|
@include sass-utils.current-selector-or-root() {
|
|
29
|
-
@include token-utils.create-token-values-mixed(
|
|
30
|
-
m2-option.$prefix, m2-option.get-color-tokens($theme));
|
|
29
|
+
@include token-utils.create-token-values-mixed(m2-option.get-color-tokens($theme));
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
.mat-accent {
|
|
34
|
-
@include token-utils.create-token-values-mixed(
|
|
35
|
-
m2-option.$prefix, m2-option.get-color-tokens($theme, accent));
|
|
33
|
+
@include token-utils.create-token-values-mixed(m2-option.get-color-tokens($theme, accent));
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
.mat-warn {
|
|
39
|
-
@include token-utils.create-token-values-mixed(
|
|
40
|
-
m2-option.$prefix, m2-option.get-color-tokens($theme, warn));
|
|
37
|
+
@include token-utils.create-token-values-mixed(m2-option.get-color-tokens($theme, warn));
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
}
|
|
@@ -46,11 +43,10 @@
|
|
|
46
43
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
47
44
|
@mixin typography($theme) {
|
|
48
45
|
@if inspection.get-theme-version($theme) == 1 {
|
|
49
|
-
@include
|
|
46
|
+
@include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), typography));
|
|
50
47
|
} @else {
|
|
51
48
|
@include sass-utils.current-selector-or-root() {
|
|
52
|
-
@include token-utils.create-token-values-mixed(
|
|
53
|
-
m2-option.$prefix, m2-option.get-typography-tokens($theme));
|
|
49
|
+
@include token-utils.create-token-values-mixed(m2-option.get-typography-tokens($theme));
|
|
54
50
|
}
|
|
55
51
|
}
|
|
56
52
|
}
|
|
@@ -59,7 +55,7 @@
|
|
|
59
55
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
60
56
|
@mixin density($theme) {
|
|
61
57
|
@if inspection.get-theme-version($theme) == 1 {
|
|
62
|
-
|
|
58
|
+
@include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), density));
|
|
63
59
|
} @else {
|
|
64
60
|
}
|
|
65
61
|
}
|
|
@@ -68,8 +64,8 @@
|
|
|
68
64
|
@function _define-overrides() {
|
|
69
65
|
@return (
|
|
70
66
|
(
|
|
71
|
-
namespace:
|
|
72
|
-
tokens:
|
|
67
|
+
namespace: option,
|
|
68
|
+
tokens: token-utils.get-overrides(m3-option.get-tokens(), option)
|
|
73
69
|
),
|
|
74
70
|
);
|
|
75
71
|
}
|
|
@@ -77,18 +73,19 @@
|
|
|
77
73
|
/// Outputs the CSS variable values for the given tokens.
|
|
78
74
|
/// @param {Map} $tokens The token values to emit.
|
|
79
75
|
@mixin overrides($tokens: ()) {
|
|
80
|
-
|
|
76
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
81
77
|
}
|
|
82
78
|
|
|
83
79
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-option.
|
|
84
80
|
/// @param {Map} $theme The theme to generate styles for.
|
|
85
|
-
/// @param {
|
|
86
|
-
|
|
87
|
-
/// tertiary, or error (If not specified, default secondary color will be used).
|
|
88
|
-
@mixin theme($theme, $options...) {
|
|
81
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
82
|
+
@mixin theme($theme, $color-variant: null) {
|
|
89
83
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-option') {
|
|
90
84
|
@if inspection.get-theme-version($theme) == 1 {
|
|
91
|
-
@include
|
|
85
|
+
@include base($theme);
|
|
86
|
+
@include color($theme, $color-variant);
|
|
87
|
+
@include density($theme);
|
|
88
|
+
@include typography($theme);
|
|
92
89
|
} @else {
|
|
93
90
|
@include base($theme);
|
|
94
91
|
@if inspection.theme-has($theme, color) {
|
|
@@ -103,11 +100,3 @@
|
|
|
103
100
|
}
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
|
-
|
|
107
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
108
|
-
@include validation.selector-defined(
|
|
109
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
110
|
-
);
|
|
111
|
-
$mat-option-tokens: token-utils.get-tokens-for($tokens, m2-option.$prefix, $options...);
|
|
112
|
-
@include token-utils.create-token-values(m2-option.$prefix, $mat-option-tokens);
|
|
113
|
-
}
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
@use '../theming/inspection';
|
|
4
4
|
@use '../style/sass-utils';
|
|
5
5
|
|
|
6
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
|
-
$prefix: (mat, ripple);
|
|
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() {
|
|
@@ -23,7 +20,7 @@ $prefix: (mat, ripple);
|
|
|
23
20
|
$color: if(meta.type-of($base) == color, $base, if($is-dark, #fff, #000));
|
|
24
21
|
|
|
25
22
|
@return (
|
|
26
|
-
color: rgba($color, 0.1),
|
|
23
|
+
ripple-color: rgba($color, 0.1),
|
|
27
24
|
);
|
|
28
25
|
}
|
|
29
26
|
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../style/sass-utils';
|
|
3
2
|
@use '../tokens/m3-utils';
|
|
4
|
-
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, ripple);
|
|
3
|
+
@use '../tokens/m3';
|
|
7
4
|
|
|
8
5
|
/// Generates custom tokens for the mat-ripple.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/// @param {Map} $token-slots Possible token slots
|
|
12
|
-
/// @return {Map} A set of custom tokens for the mat-ripple
|
|
13
|
-
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
-
$tokens: (
|
|
15
|
-
color: sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.1),
|
|
16
|
-
);
|
|
6
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
7
|
+
$system: m3-utils.get-system($theme);
|
|
17
8
|
|
|
18
|
-
@return
|
|
9
|
+
@return (
|
|
10
|
+
base: (),
|
|
11
|
+
color: (
|
|
12
|
+
ripple-color: m3-utils.color-with-opacity(map.get($system, on-surface), 10%),
|
|
13
|
+
),
|
|
14
|
+
typography: (),
|
|
15
|
+
density: (),
|
|
16
|
+
);
|
|
19
17
|
}
|
|
@@ -1,53 +1,44 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use './m2-ripple';
|
|
3
|
+
@use './m3-ripple';
|
|
3
4
|
@use '../tokens/token-utils';
|
|
4
5
|
@use '../style/sass-utils';
|
|
5
6
|
@use '../theming/theming';
|
|
6
7
|
@use '../theming/inspection';
|
|
7
|
-
@use '../theming/validation';
|
|
8
8
|
|
|
9
9
|
@mixin base($theme) {
|
|
10
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
11
|
-
@include
|
|
11
|
+
@include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), base));
|
|
12
12
|
} @else {
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@mixin color($theme) {
|
|
17
17
|
@if inspection.get-theme-version($theme) == 1 {
|
|
18
|
-
@include
|
|
18
|
+
@include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), color));
|
|
19
19
|
} @else {
|
|
20
20
|
@include sass-utils.current-selector-or-root() {
|
|
21
|
-
@include token-utils.create-token-values-mixed(
|
|
22
|
-
m2-ripple.$prefix,
|
|
23
|
-
m2-ripple.get-color-tokens($theme)
|
|
24
|
-
);
|
|
21
|
+
@include token-utils.create-token-values-mixed(m2-ripple.get-color-tokens($theme));
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
25
|
|
|
29
26
|
@mixin typography($theme) {
|
|
30
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
31
|
-
@include
|
|
28
|
+
@include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), typography));
|
|
32
29
|
} @else {
|
|
33
30
|
@include sass-utils.current-selector-or-root() {
|
|
34
|
-
@include token-utils.create-token-values-mixed(
|
|
35
|
-
m2-ripple.$prefix,
|
|
36
|
-
m2-ripple.get-typography-tokens($theme)
|
|
37
|
-
);
|
|
31
|
+
@include token-utils.create-token-values-mixed(m2-ripple.get-typography-tokens($theme));
|
|
38
32
|
}
|
|
39
33
|
}
|
|
40
34
|
}
|
|
41
35
|
|
|
42
36
|
@mixin density($theme) {
|
|
43
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
44
|
-
|
|
38
|
+
@include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), density));
|
|
45
39
|
} @else {
|
|
46
40
|
@include sass-utils.current-selector-or-root() {
|
|
47
|
-
@include token-utils.create-token-values-mixed(
|
|
48
|
-
m2-ripple.$prefix,
|
|
49
|
-
m2-ripple.get-density-tokens($theme)
|
|
50
|
-
);
|
|
41
|
+
@include token-utils.create-token-values-mixed(m2-ripple.get-density-tokens($theme));
|
|
51
42
|
}
|
|
52
43
|
}
|
|
53
44
|
}
|
|
@@ -56,20 +47,23 @@
|
|
|
56
47
|
@function _define-overrides() {
|
|
57
48
|
@return (
|
|
58
49
|
(
|
|
59
|
-
namespace:
|
|
60
|
-
tokens:
|
|
50
|
+
namespace: ripple,
|
|
51
|
+
tokens: token-utils.get-overrides(m3-ripple.get-tokens(), ripple)
|
|
61
52
|
),
|
|
62
53
|
);
|
|
63
54
|
}
|
|
64
55
|
|
|
65
56
|
@mixin overrides($tokens: ()) {
|
|
66
|
-
|
|
57
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
67
58
|
}
|
|
68
59
|
|
|
69
60
|
@mixin theme($theme) {
|
|
70
61
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-ripple') {
|
|
71
62
|
@if inspection.get-theme-version($theme) == 1 {
|
|
72
|
-
@include
|
|
63
|
+
@include base($theme);
|
|
64
|
+
@include color($theme);
|
|
65
|
+
@include density($theme);
|
|
66
|
+
@include typography($theme);
|
|
73
67
|
} @else {
|
|
74
68
|
@include base($theme);
|
|
75
69
|
@if inspection.theme-has($theme, color) {
|
|
@@ -84,15 +78,3 @@
|
|
|
84
78
|
}
|
|
85
79
|
}
|
|
86
80
|
}
|
|
87
|
-
|
|
88
|
-
@mixin _theme-from-tokens($tokens) {
|
|
89
|
-
@include validation.selector-defined(
|
|
90
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
91
|
-
);
|
|
92
|
-
@if ($tokens != ()) {
|
|
93
|
-
@include token-utils.create-token-values(
|
|
94
|
-
m2-ripple.$prefix,
|
|
95
|
-
map.get($tokens, m2-ripple.$prefix)
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
}
|
package/core/ripple/_ripple.scss
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
@use '@angular/cdk';
|
|
2
|
-
@use './
|
|
2
|
+
@use './m3-ripple';
|
|
3
3
|
@use '../tokens/token-utils';
|
|
4
4
|
|
|
5
|
+
$fallbacks: m3-ripple.get-tokens();
|
|
6
|
+
|
|
5
7
|
@mixin ripple() {
|
|
6
8
|
// The host element of an mat-ripple directive should always have a position of "absolute" or
|
|
7
9
|
// "relative" so that the ripples inside are correctly positioned relatively to the container.
|
|
@@ -37,10 +39,8 @@
|
|
|
37
39
|
// the ripples aren't clipped when inside the shadow DOM (see #24028).
|
|
38
40
|
transform: scale3d(0, 0, 0);
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
background-color: token-utils.slot(color, $fallback: rgba(#000, 0.1));
|
|
43
|
-
}
|
|
42
|
+
// We have to emit a fallback value here, because some internal builds depend on it.
|
|
43
|
+
background-color: token-utils.slot(ripple-color, $fallbacks, $fallback: rgba(#000, 0.1));
|
|
44
44
|
|
|
45
45
|
// In high contrast mode the ripple is opaque, causing it to obstruct the content.
|
|
46
46
|
@include cdk.high-contrast {
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
@use '../../theming/inspection';
|
|
3
3
|
@use '../../style/sass-utils';
|
|
4
4
|
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, pseudo-checkbox);
|
|
7
|
-
|
|
8
5
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
9
6
|
// but may be in a future version of the theming API.
|
|
10
7
|
@function get-unthemable-tokens() {
|
|
@@ -18,14 +15,16 @@ $prefix: (mat, pseudo-checkbox);
|
|
|
18
15
|
$checkmark-color: inspection.get-theme-color($theme, background, background);
|
|
19
16
|
|
|
20
17
|
@return (
|
|
21
|
-
full-selected-icon-color: inspection.get-theme-color($theme, $palette-name),
|
|
22
|
-
full-selected-checkmark-color: $checkmark-color,
|
|
23
|
-
full-unselected-icon-color:
|
|
24
|
-
|
|
25
|
-
full-disabled-
|
|
26
|
-
full-disabled-
|
|
27
|
-
|
|
28
|
-
minimal-
|
|
18
|
+
pseudo-checkbox-full-selected-icon-color: inspection.get-theme-color($theme, $palette-name),
|
|
19
|
+
pseudo-checkbox-full-selected-checkmark-color: $checkmark-color,
|
|
20
|
+
pseudo-checkbox-full-unselected-icon-color:
|
|
21
|
+
inspection.get-theme-color($theme, foreground, secondary-text),
|
|
22
|
+
pseudo-checkbox-full-disabled-selected-checkmark-color: $checkmark-color,
|
|
23
|
+
pseudo-checkbox-full-disabled-unselected-icon-color: $disabled-color,
|
|
24
|
+
pseudo-checkbox-full-disabled-selected-icon-color: $disabled-color,
|
|
25
|
+
pseudo-checkbox-minimal-selected-checkmark-color:
|
|
26
|
+
inspection.get-theme-color($theme, $palette-name),
|
|
27
|
+
pseudo-checkbox-minimal-disabled-selected-checkmark-color: if($is-dark, #686868, #b0b0b0),
|
|
29
28
|
);
|
|
30
29
|
}
|
|
31
30
|
|
|
@@ -1,49 +1,34 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../../style/sass-utils';
|
|
3
2
|
@use '../../tokens/m3-utils';
|
|
4
|
-
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, pseudo-checkbox);
|
|
3
|
+
@use '../../tokens/m3';
|
|
7
4
|
|
|
8
5
|
/// Generates custom tokens for the full variant of mat-pseudo-checkbox.
|
|
9
|
-
/// @param {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
full-disabled-selected-checkmark-color: map.get($systems, md-sys-color, surface),
|
|
16
|
-
full-disabled-selected-icon-color: sass-utils.safe-color-change(
|
|
17
|
-
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
18
|
-
full-disabled-unselected-icon-color: sass-utils.safe-color-change(
|
|
19
|
-
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
20
|
-
full-selected-checkmark-color: map.get($systems, md-sys-color, on-primary),
|
|
21
|
-
full-selected-icon-color: map.get($systems, md-sys-color, primary),
|
|
22
|
-
full-unselected-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
23
|
-
minimal-disabled-selected-checkmark-color: sass-utils.safe-color-change(
|
|
24
|
-
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
25
|
-
minimal-selected-checkmark-color: map.get($systems, md-sys-color, primary),
|
|
26
|
-
);
|
|
6
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
7
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
8
|
+
$system: m3-utils.get-system($theme);
|
|
9
|
+
@if $color-variant {
|
|
10
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
11
|
+
}
|
|
27
12
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
full-selected-
|
|
33
|
-
|
|
34
|
-
|
|
13
|
+
@return (
|
|
14
|
+
base: (),
|
|
15
|
+
color: (
|
|
16
|
+
pseudo-checkbox-full-disabled-selected-checkmark-color: map.get($system, surface),
|
|
17
|
+
pseudo-checkbox-full-disabled-selected-icon-color:
|
|
18
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
19
|
+
pseudo-checkbox-full-disabled-unselected-icon-color:
|
|
20
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
21
|
+
pseudo-checkbox-full-selected-checkmark-color: map.get($system, on-primary),
|
|
22
|
+
pseudo-checkbox-full-selected-icon-color: map.get($system, primary),
|
|
23
|
+
pseudo-checkbox-full-unselected-icon-color: map.get($system, on-surface-variant),
|
|
24
|
+
pseudo-checkbox-minimal-disabled-selected-checkmark-color:
|
|
25
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
26
|
+
pseudo-checkbox-minimal-selected-checkmark-color: map.get($system, primary),
|
|
35
27
|
),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
full-selected-icon-color: map.get($systems, md-sys-color, tertiary),
|
|
39
|
-
minimal-selected-checkmark-color: map.get($systems, md-sys-color, tertiary),
|
|
40
|
-
),
|
|
41
|
-
error: (
|
|
42
|
-
full-selected-checkmark-color: map.get($systems, md-sys-color, on-error),
|
|
43
|
-
full-selected-icon-color: map.get($systems, md-sys-color, error),
|
|
44
|
-
minimal-selected-checkmark-color: map.get($systems, md-sys-color, error),
|
|
45
|
-
)
|
|
28
|
+
typography: (),
|
|
29
|
+
density: (),
|
|
46
30
|
);
|
|
47
31
|
|
|
48
|
-
|
|
32
|
+
$tokens: (
|
|
33
|
+
);
|
|
49
34
|
}
|
|
@@ -1,29 +1,18 @@
|
|
|
1
1
|
@use '../../theming/theming';
|
|
2
2
|
@use '../../theming/inspection';
|
|
3
|
-
@use '../../theming/validation';
|
|
4
3
|
@use '../../style/sass-utils';
|
|
5
4
|
@use '../../tokens/token-utils';
|
|
6
5
|
@use './m2-pseudo-checkbox';
|
|
6
|
+
@use './m3-pseudo-checkbox';
|
|
7
|
+
@use 'sass:map';
|
|
7
8
|
|
|
8
9
|
@mixin _palette-styles($theme, $palette-name) {
|
|
9
10
|
@include sass-utils.current-selector-or-root() {
|
|
10
11
|
@include token-utils.create-token-values-mixed(
|
|
11
|
-
|
|
12
|
-
m2-pseudo-checkbox.get-color-tokens($theme, $palette-name)
|
|
13
|
-
);
|
|
12
|
+
m2-pseudo-checkbox.get-color-tokens($theme, $palette-name));
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
18
|
-
@include validation.selector-defined(
|
|
19
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
20
|
-
);
|
|
21
|
-
$mat-pseudo-checkbox-tokens: token-utils.get-tokens-for(
|
|
22
|
-
$tokens, m2-pseudo-checkbox.$prefix, $options...);
|
|
23
|
-
@include token-utils.create-token-values-mixed(
|
|
24
|
-
m2-pseudo-checkbox.$prefix, $mat-pseudo-checkbox-tokens);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
16
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
28
17
|
/// for the mat-pseudo-checkbox.
|
|
29
18
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
@@ -34,8 +23,8 @@
|
|
|
34
23
|
@function _define-overrides() {
|
|
35
24
|
@return (
|
|
36
25
|
(
|
|
37
|
-
namespace:
|
|
38
|
-
tokens:
|
|
26
|
+
namespace: pseudo-checkbox,
|
|
27
|
+
tokens: token-utils.get-overrides(m3-pseudo-checkbox.get-tokens(), pseudo-checkbox)
|
|
39
28
|
),
|
|
40
29
|
);
|
|
41
30
|
}
|
|
@@ -43,17 +32,16 @@
|
|
|
43
32
|
/// Outputs the CSS variable values for the given tokens.
|
|
44
33
|
/// @param {Map} $tokens The token values to emit.
|
|
45
34
|
@mixin overrides($tokens: ()) {
|
|
46
|
-
|
|
35
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
47
36
|
}
|
|
48
37
|
|
|
49
38
|
/// Outputs color theme styles for the mat-pseudo-checkbox.
|
|
50
39
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
51
|
-
/// @param {
|
|
52
|
-
|
|
53
|
-
/// tertiary, or error (If not specified, default primary color will be used).
|
|
54
|
-
@mixin color($theme, $options...) {
|
|
40
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
41
|
+
@mixin color($theme, $color-variant: null) {
|
|
55
42
|
@if inspection.get-theme-version($theme) == 1 {
|
|
56
|
-
@include
|
|
43
|
+
@include token-utils.create-token-values(
|
|
44
|
+
map.get(m3-pseudo-checkbox.get-tokens($theme, $color-variant), color));
|
|
57
45
|
} @else {
|
|
58
46
|
// Default to the accent color. Note that the pseudo checkboxes are meant to inherit the
|
|
59
47
|
// theme from their parent, rather than implementing their own theming, which is why we
|
|
@@ -88,13 +76,14 @@
|
|
|
88
76
|
|
|
89
77
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-pseudo-checkbox.
|
|
90
78
|
/// @param {Map} $theme The theme to generate styles for.
|
|
91
|
-
/// @param {
|
|
92
|
-
|
|
93
|
-
/// tertiary, or error (If not specified, default primary color will be used).
|
|
94
|
-
@mixin theme($theme, $options...) {
|
|
79
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
80
|
+
@mixin theme($theme, $color-variant: null) {
|
|
95
81
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {
|
|
96
82
|
@if inspection.get-theme-version($theme) == 1 {
|
|
97
|
-
@include
|
|
83
|
+
@include base($theme);
|
|
84
|
+
@include color($theme, $color-variant);
|
|
85
|
+
@include density($theme);
|
|
86
|
+
@include typography($theme);
|
|
98
87
|
} @else {
|
|
99
88
|
@include base($theme);
|
|
100
89
|
@if inspection.theme-has($theme, color) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
2
|
@use 'sass:string';
|
|
3
|
-
@use 'sass:list';
|
|
4
3
|
@use 'sass:map';
|
|
5
4
|
@use 'sass:meta';
|
|
6
5
|
|
|
@@ -52,16 +51,6 @@ $use-system-typography-variables: false;
|
|
|
52
51
|
@return $result;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
/// Coerces the given value to a list, by converting any non-list value into a single-item list.
|
|
56
|
-
/// This should be used when dealing with user-passed lists of args to avoid confusing errors,
|
|
57
|
-
/// since Sass treats `($x)` as equivalent to `$x`.
|
|
58
|
-
/// @param {Any} $value The value to coerce to a list.
|
|
59
|
-
/// @return {List} The original $value if it was a list, otherwise a single-item list containing
|
|
60
|
-
/// $value.
|
|
61
|
-
@function coerce-to-list($value) {
|
|
62
|
-
@return if(meta.type-of($value) != 'list', ($value,), $value);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
54
|
/// A version of the Sass `color.change` function that is safe ot use with CSS variables.
|
|
66
55
|
@function safe-color-change($color, $args...) {
|
|
67
56
|
$args: meta.keywords($args);
|
|
@@ -90,24 +79,6 @@ $use-system-typography-variables: false;
|
|
|
90
79
|
@return $color;
|
|
91
80
|
}
|
|
92
81
|
|
|
93
|
-
/// Gets the given arguments as a map of keywords and validates that only supported arguments were
|
|
94
|
-
/// passed.
|
|
95
|
-
/// @param {ArgList} $args The arguments to convert to a keywords map.
|
|
96
|
-
/// @param {List} $supported-args The supported argument names.
|
|
97
|
-
/// @return {Map} The $args as a map of argument name to argument value.
|
|
98
|
-
@function validate-keyword-args($args, $supported-args) {
|
|
99
|
-
@if list.length($args) > 0 {
|
|
100
|
-
@error #{'Expected keyword args, but got positional args: '}#{$args};
|
|
101
|
-
}
|
|
102
|
-
$kwargs: meta.keywords($args);
|
|
103
|
-
@each $arg, $v in $kwargs {
|
|
104
|
-
@if list.index($supported-args, $arg) == null {
|
|
105
|
-
@error #{'Unsupported argument '}#{$arg}#{'. Valid arguments are: '}#{$supported-args};
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
@return $kwargs;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
82
|
// Returns whether the $value is a CSS variable name based on whether it's a string prefixed
|
|
112
83
|
// by "--".
|
|
113
84
|
@function is-css-var-name($value) {
|