@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
package/sort/_m3-sort.scss
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/tokens/m3-utils';
|
|
3
|
+
@use '../core/tokens/m3';
|
|
3
4
|
|
|
4
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
6
|
$prefix: (mat, sort);
|
|
6
7
|
|
|
7
8
|
/// Generates custom tokens for the mat-sort.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/// @param {Map} $token-slots Possible token slots
|
|
11
|
-
/// @return {Map} A set of custom tokens for the mat-sort
|
|
12
|
-
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
-
$tokens: (
|
|
14
|
-
arrow-color: map.get($systems, md-sys-color, on-surface),
|
|
15
|
-
);
|
|
9
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
10
|
+
$system: m3-utils.get-system($theme);
|
|
16
11
|
|
|
17
|
-
@return
|
|
12
|
+
@return (
|
|
13
|
+
base: (),
|
|
14
|
+
color: (
|
|
15
|
+
sort-arrow-color: map.get($system, on-surface),
|
|
16
|
+
),
|
|
17
|
+
typography: (),
|
|
18
|
+
density: (),
|
|
19
|
+
);
|
|
18
20
|
}
|
package/sort/_sort-theme.scss
CHANGED
|
@@ -1,48 +1,45 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use './m2-sort';
|
|
3
|
+
@use './m3-sort';
|
|
3
4
|
@use '../core/style/sass-utils';
|
|
4
5
|
@use '../core/typography/typography';
|
|
5
6
|
@use '../core/theming/theming';
|
|
6
7
|
@use '../core/theming/inspection';
|
|
7
|
-
@use '../core/theming/validation';
|
|
8
8
|
@use '../core/tokens/token-utils';
|
|
9
9
|
|
|
10
10
|
@mixin base($theme) {
|
|
11
11
|
@if inspection.get-theme-version($theme) == 1 {
|
|
12
|
-
@include
|
|
12
|
+
@include token-utils.create-token-values(map.get(m3-sort.get-tokens($theme), base));
|
|
13
13
|
} @else {
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
@mixin color($theme) {
|
|
18
18
|
@if inspection.get-theme-version($theme) == 1 {
|
|
19
|
-
@include
|
|
19
|
+
@include token-utils.create-token-values(map.get(m3-sort.get-tokens($theme), color));
|
|
20
20
|
} @else {
|
|
21
21
|
@include sass-utils.current-selector-or-root() {
|
|
22
|
-
@include token-utils.create-token-values-mixed(
|
|
23
|
-
m2-sort.$prefix, m2-sort.get-color-tokens($theme));
|
|
22
|
+
@include token-utils.create-token-values-mixed(m2-sort.get-color-tokens($theme));
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
@mixin typography($theme) {
|
|
29
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
30
|
-
@include
|
|
29
|
+
@include token-utils.create-token-values(map.get(m3-sort.get-tokens($theme), typography));
|
|
31
30
|
} @else {
|
|
32
31
|
@include sass-utils.current-selector-or-root() {
|
|
33
|
-
@include token-utils.create-token-values-mixed(
|
|
34
|
-
m2-sort.$prefix, m2-sort.get-typography-tokens($theme));
|
|
32
|
+
@include token-utils.create-token-values-mixed(m2-sort.get-typography-tokens($theme));
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
@mixin density($theme) {
|
|
40
38
|
@if inspection.get-theme-version($theme) == 1 {
|
|
41
|
-
|
|
39
|
+
@include token-utils.create-token-values(map.get(m3-sort.get-tokens($theme), density));
|
|
42
40
|
} @else {
|
|
43
41
|
@include sass-utils.current-selector-or-root() {
|
|
44
|
-
@include token-utils.create-token-values-mixed(
|
|
45
|
-
m2-sort.$prefix, m2-sort.get-density-tokens($theme));
|
|
42
|
+
@include token-utils.create-token-values-mixed(m2-sort.get-density-tokens($theme));
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
45
|
}
|
|
@@ -51,20 +48,23 @@
|
|
|
51
48
|
@function _define-overrides() {
|
|
52
49
|
@return (
|
|
53
50
|
(
|
|
54
|
-
namespace:
|
|
55
|
-
tokens:
|
|
51
|
+
namespace: sort,
|
|
52
|
+
tokens: token-utils.get-overrides(m3-sort.get-tokens(), sort)
|
|
56
53
|
),
|
|
57
54
|
);
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
@mixin overrides($tokens: ()) {
|
|
61
|
-
|
|
58
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
@mixin theme($theme) {
|
|
65
62
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-sort') {
|
|
66
63
|
@if inspection.get-theme-version($theme) == 1 {
|
|
67
|
-
@include
|
|
64
|
+
@include base($theme);
|
|
65
|
+
@include color($theme);
|
|
66
|
+
@include density($theme);
|
|
67
|
+
@include typography($theme);
|
|
68
68
|
} @else {
|
|
69
69
|
@include base($theme);
|
|
70
70
|
@if inspection.theme-has($theme, color) {
|
|
@@ -79,15 +79,3 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
@mixin _theme-from-tokens($tokens) {
|
|
84
|
-
@include validation.selector-defined(
|
|
85
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
86
|
-
);
|
|
87
|
-
@if ($tokens != ()) {
|
|
88
|
-
@include token-utils.create-token-values(
|
|
89
|
-
m2-sort.$prefix,
|
|
90
|
-
map.get($tokens, m2-sort.$prefix)
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
}
|
package/stepper/_m2-stepper.scss
CHANGED
|
@@ -4,47 +4,48 @@
|
|
|
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, stepper);
|
|
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() {
|
|
13
10
|
@return (
|
|
14
|
-
header-focus-state-layer-shape: 0,
|
|
15
|
-
header-hover-state-layer-shape: 0,
|
|
11
|
+
stepper-header-focus-state-layer-shape: 0,
|
|
12
|
+
stepper-header-hover-state-layer-shape: 0,
|
|
16
13
|
);
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
20
17
|
@function get-color-tokens($theme) {
|
|
21
18
|
@return map.merge(private-get-color-palette-color-tokens($theme, primary), (
|
|
22
|
-
container-color: inspection.get-theme-color($theme, background, card),
|
|
23
|
-
line-color: inspection.get-theme-color($theme, foreground, divider),
|
|
24
|
-
header-hover-state-layer-color: inspection.get-theme-color($theme, background, hover),
|
|
25
|
-
header-focus-state-layer-color: inspection.get-theme-color($theme, background, hover),
|
|
26
|
-
header-label-text-color: inspection.get-theme-color($theme, foreground, secondary-text),
|
|
27
|
-
header-optional-label-text-color: inspection.get-theme-color(
|
|
19
|
+
stepper-container-color: inspection.get-theme-color($theme, background, card),
|
|
20
|
+
stepper-line-color: inspection.get-theme-color($theme, foreground, divider),
|
|
21
|
+
stepper-header-hover-state-layer-color: inspection.get-theme-color($theme, background, hover),
|
|
22
|
+
stepper-header-focus-state-layer-color: inspection.get-theme-color($theme, background, hover),
|
|
23
|
+
stepper-header-label-text-color: inspection.get-theme-color($theme, foreground, secondary-text),
|
|
24
|
+
stepper-header-optional-label-text-color: inspection.get-theme-color(
|
|
28
25
|
$theme, foreground, secondary-text),
|
|
29
|
-
header-selected-state-label-text-color:
|
|
30
|
-
|
|
31
|
-
header-
|
|
32
|
-
header-
|
|
33
|
-
|
|
26
|
+
stepper-header-selected-state-label-text-color:
|
|
27
|
+
inspection.get-theme-color($theme, foreground, text),
|
|
28
|
+
stepper-header-error-state-label-text-color: inspection.get-theme-color($theme, warn, text),
|
|
29
|
+
stepper-header-icon-background-color:
|
|
30
|
+
inspection.get-theme-color($theme, foreground, secondary-text),
|
|
31
|
+
stepper-header-error-state-icon-foreground-color:
|
|
32
|
+
inspection.get-theme-color($theme, warn, text),
|
|
33
|
+
stepper-header-error-state-icon-background-color: transparent,
|
|
34
34
|
));
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
38
38
|
@function get-typography-tokens($theme) {
|
|
39
39
|
@return (
|
|
40
|
-
container-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
41
|
-
header-label-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
42
|
-
header-label-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
43
|
-
header-label-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
|
|
44
|
-
header-error-state-label-text-size:
|
|
45
|
-
|
|
40
|
+
stepper-container-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
41
|
+
stepper-header-label-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
42
|
+
stepper-header-label-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
43
|
+
stepper-header-label-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
|
|
44
|
+
stepper-header-error-state-label-text-size:
|
|
45
|
+
inspection.get-theme-typography($theme, body-1, font-size),
|
|
46
|
+
stepper-header-selected-state-label-text-size: inspection.get-theme-typography(
|
|
46
47
|
$theme, body-1, font-size),
|
|
47
|
-
header-selected-state-label-text-weight: inspection.get-theme-typography(
|
|
48
|
+
stepper-header-selected-state-label-text-weight: inspection.get-theme-typography(
|
|
48
49
|
$theme, body-1, font-weight),
|
|
49
50
|
);
|
|
50
51
|
}
|
|
@@ -61,7 +62,7 @@ $prefix: (mat, stepper);
|
|
|
61
62
|
);
|
|
62
63
|
|
|
63
64
|
@return (
|
|
64
|
-
header-height: map.get($height-config, $scale),
|
|
65
|
+
stepper-header-height: map.get($height-config, $scale),
|
|
65
66
|
);
|
|
66
67
|
}
|
|
67
68
|
|
|
@@ -71,13 +72,13 @@ $prefix: (mat, stepper);
|
|
|
71
72
|
$active-state-background: inspection.get-theme-color($theme, $palette-name);
|
|
72
73
|
|
|
73
74
|
@return (
|
|
74
|
-
header-icon-foreground-color: $active-state-foreground,
|
|
75
|
-
header-selected-state-icon-background-color: $active-state-background,
|
|
76
|
-
header-selected-state-icon-foreground-color: $active-state-foreground,
|
|
77
|
-
header-done-state-icon-background-color: $active-state-background,
|
|
78
|
-
header-done-state-icon-foreground-color: $active-state-foreground,
|
|
79
|
-
header-edit-state-icon-background-color: $active-state-background,
|
|
80
|
-
header-edit-state-icon-foreground-color: $active-state-foreground,
|
|
75
|
+
stepper-header-icon-foreground-color: $active-state-foreground,
|
|
76
|
+
stepper-header-selected-state-icon-background-color: $active-state-background,
|
|
77
|
+
stepper-header-selected-state-icon-foreground-color: $active-state-foreground,
|
|
78
|
+
stepper-header-done-state-icon-background-color: $active-state-background,
|
|
79
|
+
stepper-header-done-state-icon-foreground-color: $active-state-foreground,
|
|
80
|
+
stepper-header-edit-state-icon-background-color: $active-state-background,
|
|
81
|
+
stepper-header-edit-state-icon-foreground-color: $active-state-foreground,
|
|
81
82
|
);
|
|
82
83
|
}
|
|
83
84
|
|
package/stepper/_m3-stepper.scss
CHANGED
|
@@ -1,102 +1,67 @@
|
|
|
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';
|
|
6
|
+
@use '../core/tokens/m3';
|
|
7
7
|
|
|
8
8
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
9
|
$prefix: (mat, stepper);
|
|
10
10
|
|
|
11
11
|
/// Generates custom tokens for the mat-stepper.
|
|
12
|
-
/// @param {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
container-color: map.get($systems, md-sys-color, surface),
|
|
19
|
-
line-color: map.get($systems, md-sys-color, outline),
|
|
20
|
-
header-hover-state-layer-color: sass-utils.safe-color-change(
|
|
21
|
-
map.get($systems, md-sys-color, inverse-surface),
|
|
22
|
-
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
23
|
-
),
|
|
24
|
-
header-focus-state-layer-color: sass-utils.safe-color-change(
|
|
25
|
-
map.get($systems, md-sys-color, inverse-surface),
|
|
26
|
-
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
27
|
-
),
|
|
28
|
-
header-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
29
|
-
header-optional-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
30
|
-
header-selected-state-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
31
|
-
header-icon-background-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
32
|
-
header-icon-foreground-color: map.get($systems, md-sys-color, surface),
|
|
33
|
-
header-edit-state-icon-background-color: map.get($systems, md-sys-color, primary),
|
|
34
|
-
header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
|
|
35
|
-
header-done-state-icon-background-color: map.get($systems, md-sys-color, primary),
|
|
36
|
-
header-done-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
|
|
37
|
-
header-error-state-label-text-color: map.get($systems, md-sys-color, error),
|
|
38
|
-
header-error-state-icon-foreground-color: map.get($systems, md-sys-color, error),
|
|
39
|
-
header-error-state-icon-background-color:
|
|
40
|
-
m3-utils.hardcode(transparent, $exclude-hardcoded),
|
|
41
|
-
container-text-font: map.get($systems, md-sys-typescale, body-medium-font),
|
|
42
|
-
header-label-text-font: map.get($systems, md-sys-typescale, title-small-font),
|
|
43
|
-
header-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
44
|
-
header-label-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
|
45
|
-
header-error-state-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
46
|
-
header-focus-state-layer-shape: map.get($systems, md-sys-shape, corner-medium),
|
|
47
|
-
header-hover-state-layer-shape: map.get($systems, md-sys-shape, corner-medium),
|
|
48
|
-
header-selected-state-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
49
|
-
header-selected-state-label-text-weight: map.get(
|
|
50
|
-
$systems, md-sys-typescale, title-small-weight),
|
|
51
|
-
header-selected-state-icon-background-color: map.get($systems, md-sys-color, primary),
|
|
52
|
-
header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
|
|
53
|
-
);
|
|
12
|
+
/// @param {String} $color-variant The color variant to use for the component
|
|
13
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
14
|
+
$system: m3-utils.get-system($theme);
|
|
15
|
+
@if $color-variant {
|
|
16
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
17
|
+
}
|
|
54
18
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
header-
|
|
59
|
-
header-
|
|
60
|
-
header-done-state-icon-background-color: map.get($systems, md-sys-color, primary),
|
|
61
|
-
header-done-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
|
|
62
|
-
header-selected-state-icon-background-color: map.get($systems, md-sys-color, primary),
|
|
63
|
-
header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
|
|
19
|
+
@return (
|
|
20
|
+
base: (
|
|
21
|
+
stepper-header-error-state-icon-background-color: transparent,
|
|
22
|
+
stepper-header-focus-state-layer-shape: map.get($system, corner-medium),
|
|
23
|
+
stepper-header-hover-state-layer-shape: map.get($system, corner-medium),
|
|
64
24
|
),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
header-
|
|
68
|
-
header-done-state-icon-
|
|
69
|
-
header-
|
|
70
|
-
header-
|
|
71
|
-
header-
|
|
25
|
+
color: (
|
|
26
|
+
stepper-container-color: map.get($system, surface),
|
|
27
|
+
stepper-header-done-state-icon-background-color: map.get($system, primary),
|
|
28
|
+
stepper-header-done-state-icon-foreground-color: map.get($system, on-primary),
|
|
29
|
+
stepper-header-edit-state-icon-background-color: map.get($system, primary),
|
|
30
|
+
stepper-header-edit-state-icon-foreground-color: map.get($system, on-primary),
|
|
31
|
+
stepper-header-error-state-icon-foreground-color: map.get($system, error),
|
|
32
|
+
stepper-header-error-state-label-text-color: map.get($system, error),
|
|
33
|
+
stepper-header-focus-state-layer-color: m3-utils.color-with-opacity(
|
|
34
|
+
map.get($system, inverse-surface), map.get($system, focus-state-layer-opacity)),
|
|
35
|
+
stepper-header-hover-state-layer-color: m3-utils.color-with-opacity(
|
|
36
|
+
map.get($system, inverse-surface), map.get($system, hover-state-layer-opacity)),
|
|
37
|
+
stepper-header-icon-background-color: map.get($system, on-surface-variant),
|
|
38
|
+
stepper-header-icon-foreground-color: map.get($system, surface),
|
|
39
|
+
stepper-header-label-text-color: map.get($system, on-surface-variant),
|
|
40
|
+
stepper-header-optional-label-text-color: map.get($system, on-surface-variant),
|
|
41
|
+
stepper-header-selected-state-icon-background-color: map.get($system, primary),
|
|
42
|
+
stepper-header-selected-state-icon-foreground-color: map.get($system, on-primary),
|
|
43
|
+
stepper-header-selected-state-label-text-color: map.get($system, on-surface-variant),
|
|
44
|
+
stepper-line-color: map.get($system, outline),
|
|
72
45
|
),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
header-
|
|
76
|
-
header-
|
|
77
|
-
header-
|
|
78
|
-
header-
|
|
79
|
-
header-selected-state-
|
|
46
|
+
typography: (
|
|
47
|
+
stepper-container-text-font: map.get($system, body-medium-font),
|
|
48
|
+
stepper-header-label-text-font: map.get($system, title-small-font),
|
|
49
|
+
stepper-header-label-text-size: map.get($system, title-small-size),
|
|
50
|
+
stepper-header-label-text-weight: map.get($system, title-small-weight),
|
|
51
|
+
stepper-header-error-state-label-text-size: map.get($system, title-small-size),
|
|
52
|
+
stepper-header-selected-state-label-text-size: map.get($system, title-small-size),
|
|
53
|
+
stepper-header-selected-state-label-text-weight: map.get($system, title-small-weight),
|
|
80
54
|
),
|
|
81
|
-
|
|
82
|
-
header-edit-state-icon-background-color: map.get($systems, md-sys-color, error),
|
|
83
|
-
header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-error),
|
|
84
|
-
header-done-state-icon-background-color: map.get($systems, md-sys-color, error),
|
|
85
|
-
header-done-state-icon-foreground-color: map.get($systems, md-sys-color, on-error),
|
|
86
|
-
header-selected-state-icon-background-color: map.get($systems, md-sys-color, error),
|
|
87
|
-
header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-error),
|
|
88
|
-
)
|
|
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, -4);
|
|
97
62
|
$index: ($scale * -1) + 1;
|
|
98
63
|
|
|
99
64
|
@return (
|
|
100
|
-
header-height: list.nth((72px, 68px, 64px, 60px, 42px), $index),
|
|
65
|
+
stepper-header-height: list.nth((72px, 68px, 64px, 60px, 42px), $index),
|
|
101
66
|
);
|
|
102
67
|
}
|
|
@@ -1,49 +1,41 @@
|
|
|
1
1
|
@use '../core/theming/theming';
|
|
2
2
|
@use '../core/theming/inspection';
|
|
3
|
-
@use '../core/theming/validation';
|
|
4
3
|
@use '../core/typography/typography';
|
|
5
4
|
@use '../core/style/sass-utils';
|
|
6
5
|
@use '../core/tokens/token-utils';
|
|
7
6
|
@use './m2-stepper';
|
|
8
7
|
@use './m3-stepper';
|
|
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 mat-stepper.
|
|
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-stepper.get-tokens($theme), base));
|
|
16
16
|
} @else {
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/// Outputs color theme styles for mat-stepper.
|
|
21
21
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
22
|
-
/// @param {
|
|
23
|
-
|
|
24
|
-
/// tertiary, or error (If not specified, primary color values will be used).
|
|
25
|
-
@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) {
|
|
26
24
|
@if inspection.get-theme-version($theme) == 1 {
|
|
27
|
-
@include
|
|
25
|
+
@include token-utils.create-token-values(
|
|
26
|
+
map.get(m3-stepper.get-tokens($theme, $color-variant), color));
|
|
28
27
|
} @else {
|
|
29
28
|
@include sass-utils.current-selector-or-root() {
|
|
30
|
-
@include token-utils.create-token-values-mixed(
|
|
31
|
-
m2-stepper.$prefix,
|
|
32
|
-
m2-stepper.get-color-tokens($theme)
|
|
33
|
-
);
|
|
29
|
+
@include token-utils.create-token-values-mixed(m2-stepper.get-color-tokens($theme));
|
|
34
30
|
|
|
35
31
|
.mat-step-header.mat-accent {
|
|
36
32
|
@include token-utils.create-token-values-mixed(
|
|
37
|
-
m2-stepper
|
|
38
|
-
m2-stepper.private-get-color-palette-color-tokens($theme, accent)
|
|
39
|
-
);
|
|
33
|
+
m2-stepper.private-get-color-palette-color-tokens($theme, accent));
|
|
40
34
|
}
|
|
41
35
|
|
|
42
36
|
.mat-step-header.mat-warn {
|
|
43
37
|
@include token-utils.create-token-values-mixed(
|
|
44
|
-
m2-stepper
|
|
45
|
-
m2-stepper.private-get-color-palette-color-tokens($theme, warn)
|
|
46
|
-
);
|
|
38
|
+
m2-stepper.private-get-color-palette-color-tokens($theme, warn));
|
|
47
39
|
}
|
|
48
40
|
}
|
|
49
41
|
}
|
|
@@ -53,13 +45,10 @@
|
|
|
53
45
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
54
46
|
@mixin typography($theme) {
|
|
55
47
|
@if inspection.get-theme-version($theme) == 1 {
|
|
56
|
-
@include
|
|
48
|
+
@include token-utils.create-token-values(map.get(m3-stepper.get-tokens($theme), typography));
|
|
57
49
|
} @else {
|
|
58
50
|
@include sass-utils.current-selector-or-root() {
|
|
59
|
-
@include token-utils.create-token-values-mixed(
|
|
60
|
-
m2-stepper.$prefix,
|
|
61
|
-
m2-stepper.get-typography-tokens($theme)
|
|
62
|
-
);
|
|
51
|
+
@include token-utils.create-token-values-mixed(m2-stepper.get-typography-tokens($theme));
|
|
63
52
|
}
|
|
64
53
|
}
|
|
65
54
|
}
|
|
@@ -68,14 +57,10 @@
|
|
|
68
57
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
69
58
|
@mixin density($theme) {
|
|
70
59
|
@if inspection.get-theme-version($theme) == 1 {
|
|
71
|
-
@include token-utils.create-token-values(
|
|
72
|
-
m3-stepper.$prefix, m3-stepper.get-density-tokens($theme));
|
|
60
|
+
@include token-utils.create-token-values(map.get(m3-stepper.get-tokens($theme), density));
|
|
73
61
|
} @else {
|
|
74
62
|
@include sass-utils.current-selector-or-root() {
|
|
75
|
-
@include token-utils.create-token-values-mixed(
|
|
76
|
-
m2-stepper.$prefix,
|
|
77
|
-
m2-stepper.get-density-tokens($theme)
|
|
78
|
-
);
|
|
63
|
+
@include token-utils.create-token-values-mixed(m2-stepper.get-density-tokens($theme));
|
|
79
64
|
}
|
|
80
65
|
}
|
|
81
66
|
}
|
|
@@ -84,8 +69,8 @@
|
|
|
84
69
|
@function _define-overrides() {
|
|
85
70
|
@return (
|
|
86
71
|
(
|
|
87
|
-
namespace:
|
|
88
|
-
tokens:
|
|
72
|
+
namespace: stepper,
|
|
73
|
+
tokens: token-utils.get-overrides(m3-stepper.get-tokens(), stepper)
|
|
89
74
|
),
|
|
90
75
|
);
|
|
91
76
|
}
|
|
@@ -93,18 +78,19 @@
|
|
|
93
78
|
/// Outputs the CSS variable values for the given tokens.
|
|
94
79
|
/// @param {Map} $tokens The token values to emit.
|
|
95
80
|
@mixin overrides($tokens: ()) {
|
|
96
|
-
|
|
81
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
97
82
|
}
|
|
98
83
|
|
|
99
84
|
/// Outputs all (base, color, typography, and density) theme styles for mat-stepper.
|
|
100
85
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
101
|
-
/// @param {
|
|
102
|
-
|
|
103
|
-
/// tertiary, or error (If not specified, primary color values will be used).
|
|
104
|
-
@mixin theme($theme, $options...) {
|
|
86
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
87
|
+
@mixin theme($theme, $color-variant: null) {
|
|
105
88
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-stepper') {
|
|
106
89
|
@if inspection.get-theme-version($theme) == 1 {
|
|
107
|
-
@include
|
|
90
|
+
@include base($theme);
|
|
91
|
+
@include color($theme, $color-variant);
|
|
92
|
+
@include density($theme);
|
|
93
|
+
@include typography($theme);
|
|
108
94
|
@if inspection.theme-has($theme, density) {
|
|
109
95
|
@include density($theme);
|
|
110
96
|
}
|
|
@@ -122,17 +108,3 @@
|
|
|
122
108
|
}
|
|
123
109
|
}
|
|
124
110
|
}
|
|
125
|
-
|
|
126
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
127
|
-
@include validation.selector-defined(
|
|
128
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
129
|
-
);
|
|
130
|
-
@if ($tokens != ()) {
|
|
131
|
-
$mat-stepper-tokens: token-utils.get-tokens-for(
|
|
132
|
-
$tokens,
|
|
133
|
-
m2-stepper.$prefix,
|
|
134
|
-
$options...
|
|
135
|
-
);
|
|
136
|
-
@include token-utils.create-token-values(m2-stepper.$prefix, $mat-stepper-tokens);
|
|
137
|
-
}
|
|
138
|
-
}
|
package/table/_m2-table.scss
CHANGED
|
@@ -4,25 +4,22 @@
|
|
|
4
4
|
@use '../core/tokens/m2-utils';
|
|
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, table);
|
|
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() {
|
|
13
10
|
@return (
|
|
14
|
-
row-item-outline-width: 1px,
|
|
11
|
+
table-row-item-outline-width: 1px,
|
|
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
|
-
background-color: inspection.get-theme-color($theme, background, 'card'),
|
|
18
|
+
table-background-color: inspection.get-theme-color($theme, background, 'card'),
|
|
22
19
|
|
|
23
|
-
header-headline-color: inspection.get-theme-color($theme, foreground, text),
|
|
24
|
-
row-item-label-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
25
|
-
row-item-outline-color: inspection.get-theme-color($theme, foreground, divider),
|
|
20
|
+
table-header-headline-color: inspection.get-theme-color($theme, foreground, text),
|
|
21
|
+
table-row-item-label-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
22
|
+
table-row-item-outline-color: inspection.get-theme-color($theme, foreground, divider),
|
|
26
23
|
);
|
|
27
24
|
}
|
|
28
25
|
|
|
@@ -35,24 +32,26 @@ $prefix: (mat, table);
|
|
|
35
32
|
$cell-letter-spacing: inspection.get-theme-typography($theme, body-2, letter-spacing);
|
|
36
33
|
|
|
37
34
|
@return (
|
|
38
|
-
header-headline-font: inspection.get-theme-typography($theme, subtitle-2, font-family),
|
|
39
|
-
header-headline-line-height:
|
|
40
|
-
|
|
41
|
-
header-headline-
|
|
42
|
-
header-headline-
|
|
35
|
+
table-header-headline-font: inspection.get-theme-typography($theme, subtitle-2, font-family),
|
|
36
|
+
table-header-headline-line-height:
|
|
37
|
+
inspection.get-theme-typography($theme, subtitle-2, line-height),
|
|
38
|
+
table-header-headline-size: inspection.get-theme-typography($theme, subtitle-2, font-size),
|
|
39
|
+
table-header-headline-weight: inspection.get-theme-typography($theme, subtitle-2, font-weight),
|
|
40
|
+
table-header-headline-tracking:
|
|
41
|
+
inspection.get-theme-typography($theme, subtitle-2, letter-spacing),
|
|
43
42
|
|
|
44
43
|
// Plain cells and footer cells have the same typography.
|
|
45
|
-
row-item-label-text-font: $cell-font-family,
|
|
46
|
-
row-item-label-text-line-height: $cell-line-height,
|
|
47
|
-
row-item-label-text-size: $cell-font-size,
|
|
48
|
-
row-item-label-text-weight: $cell-font-weight,
|
|
49
|
-
row-item-label-text-tracking: $cell-letter-spacing,
|
|
44
|
+
table-row-item-label-text-font: $cell-font-family,
|
|
45
|
+
table-row-item-label-text-line-height: $cell-line-height,
|
|
46
|
+
table-row-item-label-text-size: $cell-font-size,
|
|
47
|
+
table-row-item-label-text-weight: $cell-font-weight,
|
|
48
|
+
table-row-item-label-text-tracking: $cell-letter-spacing,
|
|
50
49
|
|
|
51
|
-
footer-supporting-text-font: $cell-font-family,
|
|
52
|
-
footer-supporting-text-line-height: $cell-line-height,
|
|
53
|
-
footer-supporting-text-size: $cell-font-size,
|
|
54
|
-
footer-supporting-text-weight: $cell-font-weight,
|
|
55
|
-
footer-supporting-text-tracking: $cell-letter-spacing,
|
|
50
|
+
table-footer-supporting-text-font: $cell-font-family,
|
|
51
|
+
table-footer-supporting-text-line-height: $cell-line-height,
|
|
52
|
+
table-footer-supporting-text-size: $cell-font-size,
|
|
53
|
+
table-footer-supporting-text-weight: $cell-font-weight,
|
|
54
|
+
table-footer-supporting-text-tracking: $cell-letter-spacing,
|
|
56
55
|
);
|
|
57
56
|
}
|
|
58
57
|
|
|
@@ -75,9 +74,9 @@ $prefix: (mat, table);
|
|
|
75
74
|
);
|
|
76
75
|
|
|
77
76
|
@return (
|
|
78
|
-
header-container-height: map.get($header-scale, $scale),
|
|
79
|
-
footer-container-height: map.get($cell-scale, $scale),
|
|
80
|
-
row-item-container-height: map.get($cell-scale, $scale),
|
|
77
|
+
table-header-container-height: map.get($header-scale, $scale),
|
|
78
|
+
table-footer-container-height: map.get($cell-scale, $scale),
|
|
79
|
+
table-row-item-container-height: map.get($cell-scale, $scale),
|
|
81
80
|
);
|
|
82
81
|
}
|
|
83
82
|
|