@angular/material 20.0.0-rc.1 → 20.0.0
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/autocomplete/index.d.ts +2 -2
- 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/index.d.ts +2 -2
- 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 +9 -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 +22 -22
- 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-cKSwHniA.mjs} +5 -5
- package/fesm2022/common-module-cKSwHniA.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 +154 -133
- 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-DCNQlTOA.mjs} +7 -7
- package/fesm2022/error-options-DCNQlTOA.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-C9DZXojn.mjs} +33 -33
- package/fesm2022/form-field-C9DZXojn.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-B2tPB5AH.mjs} +9 -9
- package/fesm2022/icon-button-B2tPB5AH.mjs.map +1 -0
- package/fesm2022/{icon-registry-DVLYRZv3.mjs → icon-registry-CwOTJ7YM.mjs} +4 -4
- package/fesm2022/icon-registry-CwOTJ7YM.mjs.map +1 -0
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/index-BFRo2fUq.mjs +20 -0
- package/fesm2022/index-BFRo2fUq.mjs.map +1 -0
- package/fesm2022/index-DwiL-HGk.mjs +22 -0
- package/fesm2022/index-DwiL-HGk.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-D5iFxU6d.mjs} +4 -4
- package/fesm2022/internal-form-field-D5iFxU6d.mjs.map +1 -0
- package/fesm2022/{line-CtAKiRo6.mjs → line-Bz5f9Cyx.mjs} +9 -9
- package/fesm2022/line-Bz5f9Cyx.mjs.map +1 -0
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +66 -66
- 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-DqTK2swA.mjs → module-BDiw_nWS.mjs} +25 -19
- package/fesm2022/module-BDiw_nWS.mjs.map +1 -0
- package/fesm2022/{module-m5vWw9-5.mjs → module-CWxMD37a.mjs} +12 -12
- package/fesm2022/module-CWxMD37a.mjs.map +1 -0
- package/fesm2022/{module-ChwDH6BC.mjs → module-Ce6F7TNm.mjs} +28 -28
- package/fesm2022/module-Ce6F7TNm.mjs.map +1 -0
- package/fesm2022/{module-DToxyW7l.mjs → module-DzZHEh7B.mjs} +7 -7
- package/fesm2022/module-DzZHEh7B.mjs.map +1 -0
- package/fesm2022/{option-hkPAbXDN.mjs → option-BzhYL_xC.mjs} +15 -15
- package/fesm2022/option-BzhYL_xC.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-DDmgx3P4.mjs} +4 -4
- package/fesm2022/pseudo-checkbox-DDmgx3P4.mjs.map +1 -0
- package/fesm2022/pseudo-checkbox-module-4F8Up4PL.mjs +20 -0
- package/fesm2022/pseudo-checkbox-module-4F8Up4PL.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-BYgV4oZC.mjs} +7 -7
- package/fesm2022/ripple-BYgV4oZC.mjs.map +1 -0
- package/fesm2022/{ripple-loader-Xy4bv6Xh.mjs → ripple-loader-BnMiRtmT.mjs} +5 -5
- package/fesm2022/ripple-loader-BnMiRtmT.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 +35 -31
- 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 +39 -50
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/{structural-styles-DA18Hchc.mjs → structural-styles-CObeNzjn.mjs} +4 -4
- package/fesm2022/structural-styles-CObeNzjn.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 +81 -65
- 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/{index.d-CikM2bbf.d.ts → index.d-DAhBYbjm.d.ts} +1 -1
- 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/{module.d-DMabQ4_c.d.ts → module.d-bebo7gS5.d.ts} +5 -3
- package/package.json +6 -6
- 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 +3 -3
- 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 +2 -2
- 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/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/stepper/index.d.ts +0 -3
- 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 +11 -5
- package/timepicker/_m2-timepicker.scss +3 -6
- package/timepicker/_m3-timepicker.scss +14 -15
- package/timepicker/_timepicker-theme.scss +20 -45
- package/timepicker/index.d.ts +1 -1
- 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 +0 -22
- package/fesm2022/index-BNtCg9r0.mjs.map +0 -1
- package/fesm2022/index-DxCSjCL3.mjs +0 -20
- 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 +0 -20
- 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/{option.d-BVGX3edu.d.ts → option.d-BcvS44bt.d.ts} +1 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../core/style/sass-utils';
|
|
3
2
|
@use '../core/tokens/m3-utils';
|
|
4
|
-
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, bottom-sheet);
|
|
3
|
+
@use '../core/tokens/m3';
|
|
7
4
|
|
|
8
5
|
/// Generates custom tokens for the mat-bottom-sheet.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
container-
|
|
18
|
-
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
19
|
-
container-background-color: map.get($systems, md-sys-color, surface-container-low),
|
|
6
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
7
|
+
$system: m3-utils.get-system($theme);
|
|
8
|
+
@return (
|
|
9
|
+
base: (
|
|
10
|
+
bottom-sheet-container-shape: 28px,
|
|
11
|
+
),
|
|
12
|
+
color: (
|
|
13
|
+
bottom-sheet-container-text-color: map.get($system, on-surface),
|
|
14
|
+
bottom-sheet-container-background-color: map.get($system, surface-container-low),
|
|
20
15
|
),
|
|
16
|
+
typography: (
|
|
17
|
+
bottom-sheet-container-text-font: map.get($system, body-large-font),
|
|
18
|
+
bottom-sheet-container-text-line-height: map.get($system, body-large-line-height),
|
|
19
|
+
bottom-sheet-container-text-size: map.get($system, body-large-size),
|
|
20
|
+
bottom-sheet-container-text-tracking: map.get($system, body-large-tracking),
|
|
21
|
+
bottom-sheet-container-text-weight: map.get($system, body-large-weight),
|
|
22
|
+
),
|
|
23
|
+
density: (),
|
|
21
24
|
);
|
|
22
|
-
|
|
23
|
-
@return m3-utils.namespace($prefix, $tokens, $token-slots);
|
|
24
25
|
}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
@use '../core/style/sass-utils';
|
|
2
2
|
@use '../core/theming/inspection';
|
|
3
3
|
@use '../core/theming/theming';
|
|
4
|
-
@use '../core/theming/validation';
|
|
5
4
|
@use '../core/tokens/token-utils';
|
|
6
5
|
@use '../core/typography/typography';
|
|
7
6
|
@use './m2-button';
|
|
8
7
|
@use './m3-button';
|
|
8
|
+
@use 'sass:map';
|
|
9
9
|
|
|
10
|
-
@mixin
|
|
10
|
+
@mixin _m2-button-variant($theme, $palette) {
|
|
11
11
|
$mat-tokens: if(
|
|
12
12
|
$palette,
|
|
13
13
|
m2-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
14
14
|
m2-button.get-color-tokens($theme)
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
@include token-utils.create-token-values-mixed(
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
21
|
-
@include validation.selector-defined(
|
|
22
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
23
|
-
);
|
|
24
|
-
$mat-text-button-tokens: token-utils.get-tokens-for(
|
|
25
|
-
$tokens, m2-button.$prefix, $options...);
|
|
26
|
-
@include token-utils.create-token-values(m2-button.$prefix, $mat-text-button-tokens);
|
|
17
|
+
@include token-utils.create-token-values-mixed($mat-tokens);
|
|
27
18
|
}
|
|
28
19
|
|
|
29
20
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
@@ -31,26 +22,26 @@
|
|
|
31
22
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
32
23
|
@mixin base($theme) {
|
|
33
24
|
@if inspection.get-theme-version($theme) == 1 {
|
|
34
|
-
@include
|
|
25
|
+
@include token-utils.create-token-values(map.get(m3-button.get-tokens($theme), base));
|
|
35
26
|
} @else {
|
|
36
27
|
@include sass-utils.current-selector-or-root() {
|
|
37
|
-
@include token-utils.create-token-values-mixed(
|
|
38
|
-
m2-button.$prefix, m2-button.get-unthemable-tokens());
|
|
28
|
+
@include token-utils.create-token-values-mixed(m2-button.get-unthemable-tokens());
|
|
39
29
|
}
|
|
40
30
|
}
|
|
41
31
|
}
|
|
42
32
|
|
|
43
33
|
/// Outputs color theme styles for the mat-button.
|
|
44
34
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
45
|
-
/// @param {
|
|
46
|
-
///
|
|
47
|
-
///
|
|
48
|
-
@mixin color($theme, $
|
|
35
|
+
/// @param {String} $color-variant The color variant to use for
|
|
36
|
+
/// the badge: primary, secondary, tertiary, or error (If not specified,
|
|
37
|
+
/// default primary color will be used).
|
|
38
|
+
@mixin color($theme, $color-variant: null) {
|
|
49
39
|
@if inspection.get-theme-version($theme) == 1 {
|
|
50
|
-
@include
|
|
40
|
+
@include token-utils.create-token-values(
|
|
41
|
+
map.get(m3-button.get-tokens($theme, $color-variant), color));
|
|
51
42
|
} @else {
|
|
52
43
|
@include sass-utils.current-selector-or-root() {
|
|
53
|
-
@include
|
|
44
|
+
@include _m2-button-variant($theme, null);
|
|
54
45
|
}
|
|
55
46
|
|
|
56
47
|
.mat-mdc-button,
|
|
@@ -59,15 +50,15 @@
|
|
|
59
50
|
.mat-mdc-outlined-button,
|
|
60
51
|
.mat-tonal-button {
|
|
61
52
|
&.mat-primary {
|
|
62
|
-
@include
|
|
53
|
+
@include _m2-button-variant($theme, primary);
|
|
63
54
|
}
|
|
64
55
|
|
|
65
56
|
&.mat-accent {
|
|
66
|
-
@include
|
|
57
|
+
@include _m2-button-variant($theme, accent);
|
|
67
58
|
}
|
|
68
59
|
|
|
69
60
|
&.mat-warn {
|
|
70
|
-
@include
|
|
61
|
+
@include _m2-button-variant($theme, warn);
|
|
71
62
|
}
|
|
72
63
|
}
|
|
73
64
|
}
|
|
@@ -77,13 +68,10 @@
|
|
|
77
68
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
78
69
|
@mixin typography($theme) {
|
|
79
70
|
@if inspection.get-theme-version($theme) == 1 {
|
|
80
|
-
@include
|
|
71
|
+
@include token-utils.create-token-values(map.get(m3-button.get-tokens($theme), typography));
|
|
81
72
|
} @else {
|
|
82
73
|
@include sass-utils.current-selector-or-root() {
|
|
83
|
-
@include token-utils.create-token-values-mixed(
|
|
84
|
-
m2-button.$prefix,
|
|
85
|
-
m2-button.get-typography-tokens($theme)
|
|
86
|
-
);
|
|
74
|
+
@include token-utils.create-token-values-mixed(m2-button.get-typography-tokens($theme));
|
|
87
75
|
}
|
|
88
76
|
}
|
|
89
77
|
}
|
|
@@ -92,14 +80,10 @@
|
|
|
92
80
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
93
81
|
@mixin density($theme) {
|
|
94
82
|
@if inspection.get-theme-version($theme) == 1 {
|
|
95
|
-
@include token-utils.create-token-values(
|
|
96
|
-
m3-button.$prefix, m3-button.get-density-tokens($theme));
|
|
83
|
+
@include token-utils.create-token-values(map.get(m3-button.get-tokens($theme), density));
|
|
97
84
|
} @else {
|
|
98
85
|
@include sass-utils.current-selector-or-root() {
|
|
99
|
-
@include token-utils.create-token-values-mixed(
|
|
100
|
-
m2-button.$prefix,
|
|
101
|
-
m2-button.get-density-tokens($theme)
|
|
102
|
-
);
|
|
86
|
+
@include token-utils.create-token-values-mixed(m2-button.get-density-tokens($theme));
|
|
103
87
|
}
|
|
104
88
|
}
|
|
105
89
|
}
|
|
@@ -108,8 +92,8 @@
|
|
|
108
92
|
@function _define-overrides() {
|
|
109
93
|
@return (
|
|
110
94
|
(
|
|
111
|
-
namespace:
|
|
112
|
-
tokens:
|
|
95
|
+
namespace: button,
|
|
96
|
+
tokens: token-utils.get-overrides(m3-button.get-tokens(), button),
|
|
113
97
|
),
|
|
114
98
|
);
|
|
115
99
|
}
|
|
@@ -117,21 +101,20 @@
|
|
|
117
101
|
/// Outputs the CSS variable values for the given tokens.
|
|
118
102
|
/// @param {Map} $tokens The token values to emit.
|
|
119
103
|
@mixin overrides($tokens: ()) {
|
|
120
|
-
|
|
104
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
121
105
|
}
|
|
122
106
|
|
|
123
107
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-button.
|
|
124
108
|
/// @param {Map} $theme The theme to generate styles for.
|
|
125
|
-
/// @param {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
@mixin theme($theme, $options...) {
|
|
109
|
+
/// @param {String} $color-variant: The color variant to use for the button: primary, secondary,
|
|
110
|
+
// tertiary, or error (If not specified, default primary color will be used).
|
|
111
|
+
@mixin theme($theme, $color-variant: null) {
|
|
129
112
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-button') {
|
|
130
113
|
@if inspection.get-theme-version($theme) == 1 {
|
|
131
|
-
@include
|
|
132
|
-
@
|
|
133
|
-
|
|
134
|
-
|
|
114
|
+
@include base($theme);
|
|
115
|
+
@include color($theme, $color-variant);
|
|
116
|
+
@include density($theme);
|
|
117
|
+
@include typography($theme);
|
|
135
118
|
} @else {
|
|
136
119
|
@include base($theme);
|
|
137
120
|
@if inspection.theme-has($theme, color) {
|
package/button/_fab-theme.scss
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
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 './m2-fab';
|
|
6
5
|
@use './m3-fab';
|
|
7
6
|
@use '../core/tokens/token-utils';
|
|
8
7
|
@use '../core/typography/typography';
|
|
8
|
+
@use 'sass:map';
|
|
9
9
|
|
|
10
10
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
11
11
|
/// for the mat-fab.
|
|
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-fab.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-fab.$prefix,
|
|
20
|
-
m2-fab.get-unthemable-tokens()
|
|
21
|
-
);
|
|
18
|
+
@include token-utils.create-token-values-mixed(m2-fab.get-unthemable-tokens());
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
}
|
|
@@ -30,17 +27,17 @@
|
|
|
30
27
|
m2-fab.get-color-tokens($theme)
|
|
31
28
|
);
|
|
32
29
|
|
|
33
|
-
@include token-utils.create-token-values-mixed(
|
|
30
|
+
@include token-utils.create-token-values-mixed($mat-tokens);
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
/// Outputs color theme styles for the mat-fab.
|
|
37
34
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
38
|
-
/// @param {ArgList}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@mixin color($theme, $options...) {
|
|
35
|
+
/// @param {ArgList} $color-variant: The color variant to use for the fab: primary, secondary,
|
|
36
|
+
// or tertiary. (If not specified, default primary color will be used).
|
|
37
|
+
@mixin color($theme, $color-variant: null) {
|
|
42
38
|
@if inspection.get-theme-version($theme) == 1 {
|
|
43
|
-
@include
|
|
39
|
+
@include token-utils.create-token-values(
|
|
40
|
+
map.get(m3-fab.get-tokens($theme, $color-variant), color));
|
|
44
41
|
} @else {
|
|
45
42
|
@include sass-utils.current-selector-or-root() {
|
|
46
43
|
@include _fab-variant($theme, null);
|
|
@@ -66,13 +63,10 @@
|
|
|
66
63
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
67
64
|
@mixin typography($theme) {
|
|
68
65
|
@if inspection.get-theme-version($theme) == 1 {
|
|
69
|
-
@include
|
|
66
|
+
@include token-utils.create-token-values(map.get(m3-fab.get-tokens($theme), typography));
|
|
70
67
|
} @else {
|
|
71
68
|
@include sass-utils.current-selector-or-root() {
|
|
72
|
-
@include token-utils.create-token-values-mixed(
|
|
73
|
-
m2-fab.$prefix,
|
|
74
|
-
m2-fab.get-typography-tokens($theme)
|
|
75
|
-
);
|
|
69
|
+
@include token-utils.create-token-values-mixed(m2-fab.get-typography-tokens($theme));
|
|
76
70
|
}
|
|
77
71
|
}
|
|
78
72
|
}
|
|
@@ -81,13 +75,10 @@
|
|
|
81
75
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
82
76
|
@mixin density($theme) {
|
|
83
77
|
@if inspection.get-theme-version($theme) == 1 {
|
|
84
|
-
@include token-utils.create-token-values(m3-fab
|
|
78
|
+
@include token-utils.create-token-values(map.get(m3-fab.get-tokens($theme), density));
|
|
85
79
|
} @else {
|
|
86
80
|
@include sass-utils.current-selector-or-root() {
|
|
87
|
-
@include token-utils.create-token-values-mixed(
|
|
88
|
-
m2-fab.$prefix,
|
|
89
|
-
m2-fab.get-density-tokens($theme)
|
|
90
|
-
);
|
|
81
|
+
@include token-utils.create-token-values-mixed(m2-fab.get-density-tokens($theme));
|
|
91
82
|
}
|
|
92
83
|
}
|
|
93
84
|
}
|
|
@@ -96,8 +87,8 @@
|
|
|
96
87
|
@function _define-overrides() {
|
|
97
88
|
@return (
|
|
98
89
|
(
|
|
99
|
-
namespace:
|
|
100
|
-
tokens:
|
|
90
|
+
namespace: fab,
|
|
91
|
+
tokens: token-utils.get-overrides(m3-fab.get-tokens(), fab)
|
|
101
92
|
),
|
|
102
93
|
);
|
|
103
94
|
}
|
|
@@ -105,21 +96,19 @@
|
|
|
105
96
|
/// Outputs the CSS variable values for the given tokens.
|
|
106
97
|
/// @param {Map} $tokens The token values to emit.
|
|
107
98
|
@mixin overrides($tokens: ()) {
|
|
108
|
-
|
|
99
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
109
100
|
}
|
|
110
101
|
|
|
111
102
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-checkbox.
|
|
112
103
|
/// @param {Map} $theme The theme to generate styles for.
|
|
113
|
-
/// @param {
|
|
114
|
-
|
|
115
|
-
/// (If not specified, default primary color will be used).
|
|
116
|
-
@mixin theme($theme, $options...) {
|
|
104
|
+
/// @param {String} $color-variant: The color variant to use for the fab
|
|
105
|
+
@mixin theme($theme, $color-variant: null) {
|
|
117
106
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-fab') {
|
|
118
107
|
@if inspection.get-theme-version($theme) == 1 {
|
|
119
|
-
@include
|
|
120
|
-
@
|
|
121
|
-
|
|
122
|
-
|
|
108
|
+
@include base($theme);
|
|
109
|
+
@include color($theme, $color-variant);
|
|
110
|
+
@include density($theme);
|
|
111
|
+
@include typography($theme);
|
|
123
112
|
} @else {
|
|
124
113
|
@include base($theme);
|
|
125
114
|
@if inspection.theme-has($theme, color) {
|
|
@@ -134,11 +123,3 @@
|
|
|
134
123
|
}
|
|
135
124
|
}
|
|
136
125
|
}
|
|
137
|
-
|
|
138
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
139
|
-
@include validation.selector-defined(
|
|
140
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
141
|
-
);
|
|
142
|
-
$mat-fab-tokens: token-utils.get-tokens-for($tokens, m2-fab.$prefix, $options...);
|
|
143
|
-
@include token-utils.create-token-values(m2-fab.$prefix, $mat-fab-tokens);
|
|
144
|
-
}
|
|
@@ -6,54 +6,51 @@
|
|
|
6
6
|
@use '../core/tokens/token-utils';
|
|
7
7
|
@use '../core/theming/theming';
|
|
8
8
|
@use '../core/theming/inspection';
|
|
9
|
-
@use '../core/theming/validation';
|
|
10
9
|
|
|
11
10
|
@mixin base($theme) {
|
|
12
11
|
@if inspection.get-theme-version($theme) == 1 {
|
|
13
|
-
@include
|
|
12
|
+
@include token-utils.create-token-values(map.get(m3-icon-button.get-tokens($theme), base));
|
|
14
13
|
} @else {
|
|
15
14
|
// Add default values for tokens not related to color, typography, or density.
|
|
16
15
|
@include sass-utils.current-selector-or-root() {
|
|
17
|
-
@include token-utils.create-token-values-mixed(
|
|
18
|
-
m2-icon-button.$prefix,
|
|
19
|
-
m2-icon-button.get-unthemable-tokens()
|
|
20
|
-
);
|
|
16
|
+
@include token-utils.create-token-values-mixed(m2-icon-button.get-unthemable-tokens());
|
|
21
17
|
}
|
|
22
18
|
}
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
@mixin
|
|
21
|
+
@mixin _m2-icon-button-variant($theme, $palette) {
|
|
26
22
|
$mat-tokens: if(
|
|
27
23
|
$palette,
|
|
28
24
|
m2-icon-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
29
25
|
m2-icon-button.get-color-tokens($theme)
|
|
30
26
|
);
|
|
31
27
|
|
|
32
|
-
@include token-utils.create-token-values-mixed(
|
|
28
|
+
@include token-utils.create-token-values-mixed($mat-tokens);
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
/// Outputs color theme styles for the mat-icon-button.
|
|
36
32
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
37
|
-
/// @param {
|
|
38
|
-
|
|
39
|
-
@mixin color($theme, $
|
|
33
|
+
/// @param {String} $color-variant: The color variant to use for the
|
|
34
|
+
// button: primary, secondary, tertiary, or error.
|
|
35
|
+
@mixin color($theme, $color-variant: null) {
|
|
40
36
|
@if inspection.get-theme-version($theme) == 1 {
|
|
41
|
-
@include
|
|
37
|
+
@include token-utils.create-token-values(
|
|
38
|
+
map.get(m3-icon-button.get-tokens($theme, $color-variant), color));
|
|
42
39
|
} @else {
|
|
43
40
|
@include sass-utils.current-selector-or-root() {
|
|
44
|
-
@include
|
|
41
|
+
@include _m2-icon-button-variant($theme, null);
|
|
45
42
|
|
|
46
43
|
.mat-mdc-icon-button {
|
|
47
44
|
&.mat-primary {
|
|
48
|
-
@include
|
|
45
|
+
@include _m2-icon-button-variant($theme, primary);
|
|
49
46
|
}
|
|
50
47
|
|
|
51
48
|
&.mat-accent {
|
|
52
|
-
@include
|
|
49
|
+
@include _m2-icon-button-variant($theme, accent);
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
&.mat-warn {
|
|
56
|
-
@include
|
|
53
|
+
@include _m2-icon-button-variant($theme, warn);
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
}
|
|
@@ -62,12 +59,11 @@
|
|
|
62
59
|
|
|
63
60
|
@mixin typography($theme) {
|
|
64
61
|
@if inspection.get-theme-version($theme) == 1 {
|
|
65
|
-
@include
|
|
62
|
+
@include token-utils.create-token-values(
|
|
63
|
+
map.get(m3-icon-button.get-tokens($theme), typography));
|
|
66
64
|
} @else {
|
|
67
65
|
@include sass-utils.current-selector-or-root() {
|
|
68
|
-
@include token-utils.create-token-values-mixed(
|
|
69
|
-
m2-icon-button.$prefix,
|
|
70
|
-
m2-icon-button.get-typography-tokens($theme)
|
|
66
|
+
@include token-utils.create-token-values-mixed(m2-icon-button.get-typography-tokens($theme)
|
|
71
67
|
);
|
|
72
68
|
}
|
|
73
69
|
}
|
|
@@ -75,8 +71,7 @@
|
|
|
75
71
|
|
|
76
72
|
@mixin density($theme) {
|
|
77
73
|
@if inspection.get-theme-version($theme) == 1 {
|
|
78
|
-
@include token-utils.create-token-values(
|
|
79
|
-
m3-icon-button.$prefix, m3-icon-button.get-density-tokens($theme));
|
|
74
|
+
@include token-utils.create-token-values(map.get(m3-icon-button.get-tokens($theme), density));
|
|
80
75
|
} @else {
|
|
81
76
|
$icon-size: 24px;
|
|
82
77
|
$density-scale: inspection.get-theme-density($theme);
|
|
@@ -92,9 +87,8 @@
|
|
|
92
87
|
|
|
93
88
|
@include sass-utils.current-selector-or-root() {
|
|
94
89
|
@include token-utils.create-token-values-mixed(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
$theme, $exclude: (state-layer-size))
|
|
90
|
+
m2-icon-button.get-density-tokens(
|
|
91
|
+
$theme, $exclude: (icon-button-state-layer-size))
|
|
98
92
|
);
|
|
99
93
|
}
|
|
100
94
|
|
|
@@ -121,27 +115,27 @@
|
|
|
121
115
|
@function _define-overrides() {
|
|
122
116
|
@return (
|
|
123
117
|
(
|
|
124
|
-
namespace:
|
|
125
|
-
tokens:
|
|
118
|
+
namespace: icon-button,
|
|
119
|
+
tokens: token-utils.get-overrides(m3-icon-button.get-tokens(), icon-button)
|
|
126
120
|
),
|
|
127
121
|
);
|
|
128
122
|
}
|
|
129
123
|
|
|
130
124
|
@mixin overrides($tokens: ()) {
|
|
131
|
-
|
|
125
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
132
126
|
}
|
|
133
127
|
|
|
134
128
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-icon-button.
|
|
135
129
|
/// @param {Map} $theme The theme to generate styles for.
|
|
136
|
-
/// @param {
|
|
137
|
-
|
|
138
|
-
@mixin theme($theme, $
|
|
130
|
+
/// @param {String} $color-variant: The color variant to use for the button: primary,
|
|
131
|
+
// secondary, tertiary, or error.
|
|
132
|
+
@mixin theme($theme, $color-variant: null) {
|
|
139
133
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-icon-button') {
|
|
140
134
|
@if inspection.get-theme-version($theme) == 1 {
|
|
141
|
-
@include
|
|
142
|
-
@
|
|
143
|
-
|
|
144
|
-
|
|
135
|
+
@include base($theme);
|
|
136
|
+
@include color($theme, $color-variant);
|
|
137
|
+
@include density($theme);
|
|
138
|
+
@include typography($theme);
|
|
145
139
|
} @else {
|
|
146
140
|
@include base($theme);
|
|
147
141
|
@if inspection.theme-has($theme, color) {
|
|
@@ -156,14 +150,3 @@
|
|
|
156
150
|
}
|
|
157
151
|
}
|
|
158
152
|
}
|
|
159
|
-
|
|
160
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
161
|
-
@include validation.selector-defined(
|
|
162
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
163
|
-
);
|
|
164
|
-
@if ($tokens != ()) {
|
|
165
|
-
$mat-tokens: token-utils.get-tokens-for($tokens, m2-icon-button.$prefix, $options...);
|
|
166
|
-
|
|
167
|
-
@include token-utils.create-token-values(m2-icon-button.$prefix, $mat-tokens);
|
|
168
|
-
}
|
|
169
|
-
}
|