@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,60 +1,49 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
3
|
@use '../core/theming/inspection';
|
|
4
|
-
@use '../core/theming/validation';
|
|
5
4
|
@use '../core/typography/typography';
|
|
6
5
|
@use '../core/style/sass-utils';
|
|
7
6
|
@use '../core/tokens/token-utils';
|
|
8
7
|
@use 'm2-autocomplete';
|
|
8
|
+
@use 'm3-autocomplete';
|
|
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-autocomplete.get-tokens($theme), base));
|
|
13
13
|
} @else {
|
|
14
14
|
@include sass-utils.current-selector-or-root() {
|
|
15
|
-
@include token-utils.create-token-values-mixed(
|
|
16
|
-
m2-autocomplete.$prefix,
|
|
17
|
-
m2-autocomplete.get-unthemable-tokens()
|
|
18
|
-
);
|
|
15
|
+
@include token-utils.create-token-values-mixed(m2-autocomplete.get-unthemable-tokens());
|
|
19
16
|
}
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
@mixin color($theme) {
|
|
24
21
|
@if inspection.get-theme-version($theme) == 1 {
|
|
25
|
-
@include
|
|
22
|
+
@include token-utils.create-token-values(map.get(m3-autocomplete.get-tokens($theme), color));
|
|
26
23
|
} @else {
|
|
27
24
|
@include sass-utils.current-selector-or-root() {
|
|
28
|
-
@include token-utils.create-token-values-mixed(
|
|
29
|
-
m2-autocomplete.$prefix,
|
|
30
|
-
m2-autocomplete.get-color-tokens($theme)
|
|
31
|
-
);
|
|
25
|
+
@include token-utils.create-token-values-mixed(m2-autocomplete.get-color-tokens($theme));
|
|
32
26
|
}
|
|
33
27
|
}
|
|
34
28
|
}
|
|
35
29
|
|
|
36
30
|
@mixin typography($theme) {
|
|
37
31
|
@if inspection.get-theme-version($theme) == 1 {
|
|
38
|
-
@include
|
|
32
|
+
@include token-utils.create-token-values(
|
|
33
|
+
map.get(m3-autocomplete.get-tokens($theme), typography));
|
|
39
34
|
} @else {
|
|
40
35
|
@include sass-utils.current-selector-or-root() {
|
|
41
|
-
@include token-utils.create-token-values-mixed(
|
|
42
|
-
m2-autocomplete.$prefix,
|
|
43
|
-
m2-autocomplete.get-typography-tokens($theme)
|
|
44
|
-
);
|
|
36
|
+
@include token-utils.create-token-values-mixed(m2-autocomplete.get-typography-tokens($theme));
|
|
45
37
|
}
|
|
46
38
|
}
|
|
47
39
|
}
|
|
48
40
|
|
|
49
41
|
@mixin density($theme) {
|
|
50
42
|
@if inspection.get-theme-version($theme) == 1 {
|
|
51
|
-
|
|
43
|
+
@include token-utils.create-token-values(map.get(m3-autocomplete.get-tokens($theme), density));
|
|
52
44
|
} @else {
|
|
53
45
|
@include sass-utils.current-selector-or-root() {
|
|
54
|
-
@include token-utils.create-token-values-mixed(
|
|
55
|
-
m2-autocomplete.$prefix,
|
|
56
|
-
m2-autocomplete.get-density-tokens($theme)
|
|
57
|
-
);
|
|
46
|
+
@include token-utils.create-token-values-mixed(m2-autocomplete.get-density-tokens($theme));
|
|
58
47
|
}
|
|
59
48
|
}
|
|
60
49
|
}
|
|
@@ -63,20 +52,23 @@
|
|
|
63
52
|
@function _define-overrides() {
|
|
64
53
|
@return (
|
|
65
54
|
(
|
|
66
|
-
namespace:
|
|
67
|
-
tokens:
|
|
55
|
+
namespace: autocomplete,
|
|
56
|
+
tokens: token-utils.get-overrides(m3-autocomplete.get-tokens(), autocomplete),
|
|
68
57
|
),
|
|
69
58
|
);
|
|
70
59
|
}
|
|
71
60
|
|
|
72
61
|
@mixin overrides($tokens: ()) {
|
|
73
|
-
|
|
62
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
74
63
|
}
|
|
75
64
|
|
|
76
65
|
@mixin theme($theme) {
|
|
77
66
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-autocomplete') {
|
|
78
67
|
@if inspection.get-theme-version($theme) == 1 {
|
|
79
|
-
@include
|
|
68
|
+
@include base($theme);
|
|
69
|
+
@include color($theme);
|
|
70
|
+
@include density($theme);
|
|
71
|
+
@include typography($theme);
|
|
80
72
|
} @else {
|
|
81
73
|
@include base($theme);
|
|
82
74
|
@if inspection.theme-has($theme, color) {
|
|
@@ -91,15 +83,3 @@
|
|
|
91
83
|
}
|
|
92
84
|
}
|
|
93
85
|
}
|
|
94
|
-
|
|
95
|
-
@mixin _theme-from-tokens($tokens) {
|
|
96
|
-
@include validation.selector-defined(
|
|
97
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
98
|
-
);
|
|
99
|
-
@if ($tokens != ()) {
|
|
100
|
-
@include token-utils.create-token-values(
|
|
101
|
-
m2-autocomplete.$prefix,
|
|
102
|
-
map.get($tokens, m2-autocomplete.$prefix)
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
@@ -3,22 +3,19 @@
|
|
|
3
3
|
@use '../core/style/elevation';
|
|
4
4
|
@use '../core/style/sass-utils';
|
|
5
5
|
|
|
6
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
|
-
$prefix: (mat, autocomplete);
|
|
8
|
-
|
|
9
6
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
10
7
|
// but may be in a future version of the theming API.
|
|
11
8
|
@function get-unthemable-tokens() {
|
|
12
9
|
@return (
|
|
13
|
-
container-shape: 4px,
|
|
14
|
-
container-elevation-shadow: elevation.get-box-shadow(8),
|
|
10
|
+
autocomplete-container-shape: 4px,
|
|
11
|
+
autocomplete-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
15
12
|
);
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
19
16
|
@function get-color-tokens($theme) {
|
|
20
17
|
@return (
|
|
21
|
-
background-color: inspection.get-theme-color($theme, background, card)
|
|
18
|
+
autocomplete-background-color: inspection.get-theme-color($theme, background, card)
|
|
22
19
|
);
|
|
23
20
|
}
|
|
24
21
|
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/style/elevation';
|
|
3
3
|
@use '../core/tokens/m3-utils';
|
|
4
|
-
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, autocomplete);
|
|
4
|
+
@use '../core/tokens/m3';
|
|
7
5
|
|
|
8
6
|
/// Generates custom tokens for the mat-autocomplete.
|
|
9
7
|
/// @param {Map} $systems The MDC system tokens
|
|
10
8
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
9
|
/// @param {Map} $token-slots Possible token slots
|
|
12
10
|
/// @return {Map} A set of custom tokens for the mat-autocomplete
|
|
13
|
-
@function get-tokens($
|
|
11
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
12
|
+
$system: m3-utils.get-system($theme);
|
|
14
13
|
$tokens: (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
base: (
|
|
15
|
+
autocomplete-container-shape: map.get($system, corner-extra-small),
|
|
16
|
+
autocomplete-container-elevation-shadow: elevation.get-box-shadow(2),
|
|
17
|
+
),
|
|
18
|
+
color: (
|
|
19
|
+
autocomplete-background-color: map.get($system, surface-container),
|
|
20
|
+
),
|
|
21
|
+
typography: (),
|
|
22
|
+
density: (),
|
|
19
23
|
);
|
|
20
|
-
|
|
24
|
+
|
|
25
|
+
@return $tokens;
|
|
21
26
|
}
|
package/autocomplete/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, AfterContentInit, OnDestroy, TemplateRef, ElementRef, QueryList, EventEmitter, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/cdk/overlay';
|
|
4
4
|
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
5
|
-
import { M as MatOptionModule } from '../index.d-
|
|
5
|
+
import { M as MatOptionModule } from '../index.d-DAhBYbjm.js';
|
|
6
6
|
import { M as MatCommonModule } from '../common-module.d-C8xzHJDr.js';
|
|
7
7
|
import { T as ThemePalette } from '../palette.d-BSSFKjO6.js';
|
|
8
|
-
import { M as MatOption, a as MatOptgroup, b as MatOptionSelectionChange } from '../option.d-
|
|
8
|
+
import { M as MatOption, a as MatOptgroup, b as MatOptionSelectionChange } from '../option.d-BcvS44bt.js';
|
|
9
9
|
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
10
10
|
import { ControlValueAccessor } from '@angular/forms';
|
|
11
11
|
import { Observable } from 'rxjs';
|
package/badge/_badge-theme.scss
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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-badge';
|
|
@@ -14,14 +13,10 @@
|
|
|
14
13
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
15
14
|
@mixin base($theme) {
|
|
16
15
|
@if inspection.get-theme-version($theme) == 1 {
|
|
17
|
-
@include token-utils.create-token-values(
|
|
18
|
-
m3-badge.$prefix,
|
|
19
|
-
map.get(m3-badge.get-tokens($theme), base));
|
|
16
|
+
@include token-utils.create-token-values(map.get(m3-badge.get-tokens($theme), base));
|
|
20
17
|
} @else {
|
|
21
18
|
@include sass-utils.current-selector-or-root() {
|
|
22
|
-
@include token-utils.create-token-values-mixed(
|
|
23
|
-
m2-badge.$prefix,
|
|
24
|
-
m2-badge.get-unthemable-tokens()
|
|
19
|
+
@include token-utils.create-token-values-mixed(m2-badge.get-unthemable-tokens()
|
|
25
20
|
);
|
|
26
21
|
}
|
|
27
22
|
}
|
|
@@ -35,26 +30,20 @@
|
|
|
35
30
|
@mixin color($theme, $color-variant: null) {
|
|
36
31
|
@if inspection.get-theme-version($theme) == 1 {
|
|
37
32
|
@include token-utils.create-token-values(
|
|
38
|
-
m3-badge.$prefix,
|
|
39
33
|
map.get(m3-badge.get-tokens($theme, $color-variant), color));
|
|
40
34
|
} @else {
|
|
41
35
|
@include sass-utils.current-selector-or-root() {
|
|
42
|
-
@include token-utils.create-token-values-mixed(
|
|
43
|
-
m2-badge.$prefix,
|
|
44
|
-
m2-badge.get-color-tokens($theme)
|
|
45
|
-
);
|
|
36
|
+
@include token-utils.create-token-values-mixed(m2-badge.get-color-tokens($theme));
|
|
46
37
|
}
|
|
47
38
|
|
|
48
39
|
.mat-badge-accent {
|
|
49
40
|
@include token-utils.create-token-values-mixed(
|
|
50
|
-
m2-badge.$prefix,
|
|
51
41
|
m2-badge.private-get-color-palette-color-tokens($theme, accent)
|
|
52
42
|
);
|
|
53
43
|
}
|
|
54
44
|
|
|
55
45
|
.mat-badge-warn {
|
|
56
46
|
@include token-utils.create-token-values-mixed(
|
|
57
|
-
m2-badge.$prefix,
|
|
58
47
|
m2-badge.private-get-color-palette-color-tokens($theme, warn)
|
|
59
48
|
);
|
|
60
49
|
}
|
|
@@ -65,13 +54,10 @@
|
|
|
65
54
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
66
55
|
@mixin typography($theme) {
|
|
67
56
|
@if inspection.get-theme-version($theme) == 1 {
|
|
68
|
-
@include token-utils.create-token-values(
|
|
69
|
-
m3-badge.$prefix,
|
|
70
|
-
map.get(m3-badge.get-tokens($theme), typography));
|
|
57
|
+
@include token-utils.create-token-values(map.get(m3-badge.get-tokens($theme), typography));
|
|
71
58
|
} @else {
|
|
72
59
|
@include sass-utils.current-selector-or-root() {
|
|
73
60
|
@include token-utils.create-token-values-mixed(
|
|
74
|
-
m2-badge.$prefix,
|
|
75
61
|
m2-badge.get-typography-tokens($theme)
|
|
76
62
|
);
|
|
77
63
|
}
|
|
@@ -82,9 +68,7 @@
|
|
|
82
68
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
83
69
|
@mixin density($theme) {
|
|
84
70
|
@if inspection.get-theme-version($theme) == 1 {
|
|
85
|
-
@include token-utils.create-token-values(
|
|
86
|
-
m3-badge.$prefix,
|
|
87
|
-
map.get(m3-badge.get-tokens($theme), density));
|
|
71
|
+
@include token-utils.create-token-values(map.get(m3-badge.get-tokens($theme), density));
|
|
88
72
|
} @else {
|
|
89
73
|
}
|
|
90
74
|
}
|
|
@@ -93,8 +77,8 @@
|
|
|
93
77
|
@function _define-overrides() {
|
|
94
78
|
@return (
|
|
95
79
|
(
|
|
96
|
-
namespace:
|
|
97
|
-
tokens:
|
|
80
|
+
namespace: badge,
|
|
81
|
+
tokens: token-utils.get-overrides(m3-badge.get-tokens(), badge),
|
|
98
82
|
),
|
|
99
83
|
);
|
|
100
84
|
}
|
|
@@ -102,14 +86,12 @@
|
|
|
102
86
|
/// Outputs the CSS variable values for the given tokens.
|
|
103
87
|
/// @param {Map} $tokens The token values to emit.
|
|
104
88
|
@mixin overrides($tokens: ()) {
|
|
105
|
-
|
|
89
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
106
90
|
}
|
|
107
91
|
|
|
108
92
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-badge.
|
|
109
93
|
/// @param {Map} $theme The theme to generate styles for.
|
|
110
|
-
/// @param {
|
|
111
|
-
/// $color-variant: The color variant to use for the badge: primary, secondary, tertiary,
|
|
112
|
-
/// or error (If not specified, default error color will be used).
|
|
94
|
+
/// @param {String} $color-variant The color variant to use for the component
|
|
113
95
|
@mixin theme($theme, $color-variant: null) {
|
|
114
96
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-badge') {
|
|
115
97
|
@if inspection.get-theme-version($theme) == 1 {
|
|
@@ -131,11 +113,3 @@
|
|
|
131
113
|
}
|
|
132
114
|
}
|
|
133
115
|
}
|
|
134
|
-
|
|
135
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
136
|
-
@include validation.selector-defined(
|
|
137
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
138
|
-
);
|
|
139
|
-
$mat-badge-tokens: token-utils.get-tokens-for($tokens, m2-badge.$prefix, $options...);
|
|
140
|
-
@include token-utils.create-token-values(m2-badge.$prefix, $mat-badge-tokens);
|
|
141
|
-
}
|
package/badge/_m2-badge.scss
CHANGED
|
@@ -10,9 +10,6 @@ $_default-size: 22px;
|
|
|
10
10
|
$_small-size: $_default-size - 6px;
|
|
11
11
|
$_large-size: $_default-size + 6px;
|
|
12
12
|
|
|
13
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
14
|
-
$prefix: (mat, badge);
|
|
15
|
-
|
|
16
13
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
17
14
|
// but may be in a future version of the theming API.
|
|
18
15
|
@function get-unthemable-tokens() {
|
|
@@ -21,26 +18,26 @@ $prefix: (mat, badge);
|
|
|
21
18
|
$large-size: $_large-size;
|
|
22
19
|
|
|
23
20
|
@return (
|
|
24
|
-
container-shape: 50%,
|
|
25
|
-
container-size: unset,
|
|
26
|
-
small-size-container-size: unset,
|
|
27
|
-
large-size-container-size: unset,
|
|
28
|
-
|
|
29
|
-
legacy-container-size: $default-size,
|
|
30
|
-
legacy-small-size-container-size: $small-size,
|
|
31
|
-
legacy-large-size-container-size: $large-size,
|
|
32
|
-
|
|
33
|
-
container-offset: math.div($default-size, -2) 0,
|
|
34
|
-
small-size-container-offset: math.div($small-size, -2) 0,
|
|
35
|
-
large-size-container-offset: math.div($large-size, -2) 0,
|
|
36
|
-
|
|
37
|
-
container-overlap-offset: math.div($default-size, -2),
|
|
38
|
-
small-size-container-overlap-offset: math.div($small-size, -2),
|
|
39
|
-
large-size-container-overlap-offset: math.div($large-size, -2),
|
|
40
|
-
|
|
41
|
-
container-padding: 0,
|
|
42
|
-
small-size-container-padding: 0,
|
|
43
|
-
large-size-container-padding: 0,
|
|
21
|
+
badge-container-shape: 50%,
|
|
22
|
+
badge-container-size: unset,
|
|
23
|
+
badge-small-size-container-size: unset,
|
|
24
|
+
badge-large-size-container-size: unset,
|
|
25
|
+
|
|
26
|
+
badge-legacy-container-size: $default-size,
|
|
27
|
+
badge-legacy-small-size-container-size: $small-size,
|
|
28
|
+
badge-legacy-large-size-container-size: $large-size,
|
|
29
|
+
|
|
30
|
+
badge-container-offset: math.div($default-size, -2) 0,
|
|
31
|
+
badge-small-size-container-offset: math.div($small-size, -2) 0,
|
|
32
|
+
badge-large-size-container-offset: math.div($large-size, -2) 0,
|
|
33
|
+
|
|
34
|
+
badge-container-overlap-offset: math.div($default-size, -2),
|
|
35
|
+
badge-small-size-container-overlap-offset: math.div($small-size, -2),
|
|
36
|
+
badge-large-size-container-overlap-offset: math.div($large-size, -2),
|
|
37
|
+
|
|
38
|
+
badge-container-padding: 0,
|
|
39
|
+
badge-small-size-container-padding: 0,
|
|
40
|
+
badge-large-size-container-padding: 0,
|
|
44
41
|
);
|
|
45
42
|
}
|
|
46
43
|
|
|
@@ -62,16 +59,16 @@ $prefix: (mat, badge);
|
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
@return map.merge($primary-color-tokens, (
|
|
65
|
-
disabled-state-background-color: $disabled-background,
|
|
66
|
-
disabled-state-text-color: inspection.get-theme-color($theme, foreground, disabled-text),
|
|
62
|
+
badge-disabled-state-background-color: $disabled-background,
|
|
63
|
+
badge-disabled-state-text-color: inspection.get-theme-color($theme, foreground, disabled-text),
|
|
67
64
|
));
|
|
68
65
|
}
|
|
69
66
|
|
|
70
67
|
// Generates the tokens used to theme the badge based on a palette.
|
|
71
68
|
@function private-get-color-palette-color-tokens($theme, $palette-name: primary) {
|
|
72
69
|
@return (
|
|
73
|
-
background-color: inspection.get-theme-color($theme, $palette-name),
|
|
74
|
-
text-color: inspection.get-theme-color($theme, $palette-name, default-contrast),
|
|
70
|
+
badge-background-color: inspection.get-theme-color($theme, $palette-name),
|
|
71
|
+
badge-text-color: inspection.get-theme-color($theme, $palette-name, default-contrast),
|
|
75
72
|
);
|
|
76
73
|
}
|
|
77
74
|
|
|
@@ -80,16 +77,16 @@ $prefix: (mat, badge);
|
|
|
80
77
|
$base-size: 12px;
|
|
81
78
|
|
|
82
79
|
@return (
|
|
83
|
-
text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
84
|
-
line-height: $_default-size,
|
|
85
|
-
text-size: $base-size,
|
|
86
|
-
text-weight: 600,
|
|
80
|
+
badge-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
81
|
+
badge-line-height: $_default-size,
|
|
82
|
+
badge-text-size: $base-size,
|
|
83
|
+
badge-text-weight: 600,
|
|
87
84
|
|
|
88
|
-
small-size-text-size: $base-size * 0.75,
|
|
89
|
-
small-size-line-height: $_small-size,
|
|
85
|
+
badge-small-size-text-size: $base-size * 0.75,
|
|
86
|
+
badge-small-size-line-height: $_small-size,
|
|
90
87
|
|
|
91
|
-
large-size-text-size: $base-size * 2,
|
|
92
|
-
large-size-line-height: $_large-size,
|
|
88
|
+
badge-large-size-text-size: $base-size * 2,
|
|
89
|
+
badge-large-size-line-height: $_large-size,
|
|
93
90
|
);
|
|
94
91
|
}
|
|
95
92
|
|
package/badge/_m3-badge.scss
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/tokens/m3-utils';
|
|
3
|
-
|
|
4
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
-
$prefix: (mat, badge);
|
|
3
|
+
@use '../core/tokens/m3';
|
|
6
4
|
|
|
7
5
|
/// Generates custom tokens for the mat-badge.
|
|
8
|
-
@function get-tokens($theme, $color-variant: null) {
|
|
6
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
9
7
|
$system: m3-utils.get-system($theme);
|
|
10
8
|
@if $color-variant {
|
|
11
9
|
$system: m3-utils.replace-colors-with-variant($system, error, $color-variant);
|
|
@@ -13,38 +11,39 @@ $prefix: (mat, badge);
|
|
|
13
11
|
|
|
14
12
|
$tokens: (
|
|
15
13
|
base: (
|
|
16
|
-
container-
|
|
17
|
-
container-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
container-
|
|
22
|
-
|
|
23
|
-
container-
|
|
24
|
-
|
|
25
|
-
container-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
badge-container-offset: -12px 0,
|
|
15
|
+
badge-container-overlap-offset: -12px,
|
|
16
|
+
badge-container-padding: 0 4px,
|
|
17
|
+
badge-container-shape: map.get($system, corner-full),
|
|
18
|
+
badge-container-size: 16px,
|
|
19
|
+
badge-large-size-container-offset: -12px 0,
|
|
20
|
+
badge-large-size-container-overlap-offset: -12px,
|
|
21
|
+
badge-large-size-container-padding: 0 4px,
|
|
22
|
+
badge-large-size-container-size: 16px,
|
|
23
|
+
badge-legacy-container-size: unset,
|
|
24
|
+
badge-legacy-large-size-container-size: unset,
|
|
25
|
+
badge-legacy-small-size-container-size: unset,
|
|
26
|
+
badge-small-size-container-offset: -6px 0,
|
|
27
|
+
badge-small-size-container-overlap-offset: -6px,
|
|
28
|
+
badge-small-size-container-padding: 0,
|
|
29
|
+
badge-small-size-container-size: 6px,
|
|
32
30
|
),
|
|
33
31
|
color: (
|
|
34
|
-
background-color: map.get($system, error),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
disabled-state-text-color: map.get($system, on-error),
|
|
32
|
+
badge-background-color: map.get($system, error),
|
|
33
|
+
badge-disabled-state-background-color:
|
|
34
|
+
m3-utils.color-with-opacity(map.get($system, error), 38%),
|
|
35
|
+
badge-disabled-state-text-color: map.get($system, on-error),
|
|
36
|
+
badge-text-color: map.get($system, on-error),
|
|
38
37
|
),
|
|
39
38
|
typography: (
|
|
40
|
-
|
|
41
|
-
text-size: map.get($system, label-small-size),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
small-size-text-size: 0,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
badge-large-size-line-height: 16px,
|
|
40
|
+
badge-large-size-text-size: map.get($system, label-small-size),
|
|
41
|
+
badge-line-height: 16px,
|
|
42
|
+
badge-small-size-line-height: 6px,
|
|
43
|
+
badge-small-size-text-size: 0,
|
|
44
|
+
badge-text-font: map.get($system, label-small-font),
|
|
45
|
+
badge-text-size: map.get($system, label-small-size),
|
|
46
|
+
badge-text-weight: map.get($system, label-small-weight),
|
|
48
47
|
),
|
|
49
48
|
density: (),
|
|
50
49
|
);
|
|
@@ -2,31 +2,28 @@
|
|
|
2
2
|
@use '../core/typography/typography';
|
|
3
3
|
@use '../core/theming/theming';
|
|
4
4
|
@use '../core/theming/inspection';
|
|
5
|
-
@use '../core/theming/validation';
|
|
6
5
|
@use '../core/style/sass-utils';
|
|
7
6
|
@use '../core/tokens/token-utils';
|
|
8
7
|
@use './m2-bottom-sheet';
|
|
8
|
+
@use './m3-bottom-sheet';
|
|
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-bottom-sheet.get-tokens($theme), base));
|
|
13
13
|
} @else {
|
|
14
14
|
@include sass-utils.current-selector-or-root() {
|
|
15
|
-
@include token-utils.create-token-values-mixed(
|
|
16
|
-
m2-bottom-sheet.$prefix,
|
|
17
|
-
m2-bottom-sheet.get-unthemable-tokens()
|
|
18
|
-
);
|
|
15
|
+
@include token-utils.create-token-values-mixed(m2-bottom-sheet.get-unthemable-tokens());
|
|
19
16
|
}
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
@mixin color($theme) {
|
|
24
21
|
@if inspection.get-theme-version($theme) == 1 {
|
|
25
|
-
@include
|
|
22
|
+
@include token-utils.create-token-values(
|
|
23
|
+
map.get(m3-bottom-sheet.get-tokens($theme), color));
|
|
26
24
|
} @else {
|
|
27
25
|
@include sass-utils.current-selector-or-root() {
|
|
28
26
|
@include token-utils.create-token-values-mixed(
|
|
29
|
-
m2-bottom-sheet.$prefix,
|
|
30
27
|
m2-bottom-sheet.get-color-tokens($theme)
|
|
31
28
|
);
|
|
32
29
|
}
|
|
@@ -35,11 +32,11 @@
|
|
|
35
32
|
|
|
36
33
|
@mixin typography($theme) {
|
|
37
34
|
@if inspection.get-theme-version($theme) == 1 {
|
|
38
|
-
@include
|
|
35
|
+
@include token-utils.create-token-values(
|
|
36
|
+
map.get(m3-bottom-sheet.get-tokens($theme), typography));
|
|
39
37
|
} @else {
|
|
40
38
|
@include sass-utils.current-selector-or-root() {
|
|
41
39
|
@include token-utils.create-token-values-mixed(
|
|
42
|
-
m2-bottom-sheet.$prefix,
|
|
43
40
|
m2-bottom-sheet.get-typography-tokens($theme)
|
|
44
41
|
);
|
|
45
42
|
}
|
|
@@ -48,7 +45,8 @@
|
|
|
48
45
|
|
|
49
46
|
@mixin density($theme) {
|
|
50
47
|
@if inspection.get-theme-version($theme) == 1 {
|
|
51
|
-
|
|
48
|
+
@include token-utils.create-token-values(
|
|
49
|
+
map.get(m3-bottom-sheet.get-tokens($theme), density));
|
|
52
50
|
} @else {
|
|
53
51
|
}
|
|
54
52
|
}
|
|
@@ -57,20 +55,23 @@
|
|
|
57
55
|
@function _define-overrides() {
|
|
58
56
|
@return (
|
|
59
57
|
(
|
|
60
|
-
namespace:
|
|
61
|
-
tokens:
|
|
58
|
+
namespace: bottom-sheet,
|
|
59
|
+
tokens: token-utils.get-overrides(m3-bottom-sheet.get-tokens(), bottom-sheet)
|
|
62
60
|
),
|
|
63
61
|
);
|
|
64
62
|
}
|
|
65
63
|
|
|
66
64
|
@mixin overrides($tokens: ()) {
|
|
67
|
-
|
|
65
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
@mixin theme($theme) {
|
|
71
69
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-bottom-sheet') {
|
|
72
70
|
@if inspection.get-theme-version($theme) == 1 {
|
|
73
|
-
@include
|
|
71
|
+
@include base($theme);
|
|
72
|
+
@include color($theme);
|
|
73
|
+
@include density($theme);
|
|
74
|
+
@include typography($theme);
|
|
74
75
|
} @else {
|
|
75
76
|
@include base($theme);
|
|
76
77
|
@if inspection.theme-has($theme, color) {
|
|
@@ -85,15 +86,3 @@
|
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
|
-
|
|
89
|
-
@mixin _theme-from-tokens($tokens) {
|
|
90
|
-
@include validation.selector-defined(
|
|
91
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
92
|
-
);
|
|
93
|
-
@if ($tokens != ()) {
|
|
94
|
-
@include token-utils.create-token-values(
|
|
95
|
-
m2-bottom-sheet.$prefix,
|
|
96
|
-
map.get($tokens, m2-bottom-sheet.$prefix)
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
@@ -2,34 +2,34 @@
|
|
|
2
2
|
@use '../core/theming/inspection';
|
|
3
3
|
@use '../core/style/sass-utils';
|
|
4
4
|
|
|
5
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
-
$prefix: (mat, bottom-sheet);
|
|
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() {
|
|
11
8
|
@return (
|
|
12
9
|
// TODO: will be necessary for M3.
|
|
13
|
-
container-shape: 4px,
|
|
10
|
+
bottom-sheet-container-shape: 4px,
|
|
14
11
|
);
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
18
15
|
@function get-color-tokens($theme) {
|
|
19
16
|
@return (
|
|
20
|
-
container-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
21
|
-
container-background-color: inspection.get-theme-color($theme, background, dialog),
|
|
17
|
+
bottom-sheet-container-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
18
|
+
bottom-sheet-container-background-color: inspection.get-theme-color($theme, background, dialog),
|
|
22
19
|
);
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
26
23
|
@function get-typography-tokens($theme) {
|
|
27
24
|
@return (
|
|
28
|
-
container-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
29
|
-
container-text-line-height:
|
|
30
|
-
|
|
31
|
-
container-text-
|
|
32
|
-
container-text-
|
|
25
|
+
bottom-sheet-container-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
26
|
+
bottom-sheet-container-text-line-height:
|
|
27
|
+
inspection.get-theme-typography($theme, body-2, line-height),
|
|
28
|
+
bottom-sheet-container-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
29
|
+
bottom-sheet-container-text-tracking:
|
|
30
|
+
inspection.get-theme-typography($theme, body-2, letter-spacing),
|
|
31
|
+
bottom-sheet-container-text-weight:
|
|
32
|
+
inspection.get-theme-typography($theme, body-2, font-weight),
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
|