@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
|
@@ -2,54 +2,45 @@
|
|
|
2
2
|
@use './m3-form-field';
|
|
3
3
|
@use '../core/theming/theming';
|
|
4
4
|
@use '../core/theming/inspection';
|
|
5
|
-
@use '../core/theming/validation';
|
|
6
5
|
@use '../core/typography/typography';
|
|
7
6
|
@use '../core/style/sass-utils';
|
|
8
7
|
@use '../core/tokens/token-utils';
|
|
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-form-field.
|
|
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-form-field.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-form-field.$prefix,
|
|
20
|
-
m2-form-field.get-unthemable-tokens()
|
|
21
|
-
);
|
|
18
|
+
@include token-utils.create-token-values-mixed(m2-form-field.get-unthemable-tokens());
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
/// Outputs color theme styles for the mat-form-field.
|
|
27
24
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
28
|
-
/// @param {
|
|
29
|
-
|
|
30
|
-
/// or error (If not specified, default primary color will be used).
|
|
31
|
-
@mixin color($theme, $options...) {
|
|
25
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
26
|
+
@mixin color($theme, $color-variant: null) {
|
|
32
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
33
|
-
@include
|
|
28
|
+
@include token-utils.create-token-values(
|
|
29
|
+
map.get(m3-form-field.get-tokens($theme, $color-variant), color));
|
|
34
30
|
} @else {
|
|
35
31
|
@include sass-utils.current-selector-or-root() {
|
|
36
|
-
@include token-utils.create-token-values-mixed(
|
|
37
|
-
m2-form-field.$prefix,
|
|
38
|
-
m2-form-field.get-color-tokens($theme)
|
|
39
|
-
);
|
|
32
|
+
@include token-utils.create-token-values-mixed(m2-form-field.get-color-tokens($theme));
|
|
40
33
|
}
|
|
41
34
|
|
|
42
35
|
.mat-mdc-form-field.mat-accent {
|
|
43
36
|
@include token-utils.create-token-values-mixed(
|
|
44
|
-
|
|
45
|
-
m2-form-field.private-get-color-palette-color-tokens($theme, accent)
|
|
37
|
+
m2-form-field.private-get-color-palette-color-tokens($theme, accent)
|
|
46
38
|
);
|
|
47
39
|
}
|
|
48
40
|
|
|
49
41
|
.mat-mdc-form-field.mat-warn {
|
|
50
42
|
@include token-utils.create-token-values-mixed(
|
|
51
|
-
|
|
52
|
-
m2-form-field.private-get-color-palette-color-tokens($theme, warn)
|
|
43
|
+
m2-form-field.private-get-color-palette-color-tokens($theme, warn)
|
|
53
44
|
);
|
|
54
45
|
}
|
|
55
46
|
}
|
|
@@ -59,13 +50,10 @@
|
|
|
59
50
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
60
51
|
@mixin typography($theme) {
|
|
61
52
|
@if inspection.get-theme-version($theme) == 1 {
|
|
62
|
-
@include
|
|
53
|
+
@include token-utils.create-token-values(map.get(m3-form-field.get-tokens($theme), typography));
|
|
63
54
|
} @else {
|
|
64
55
|
@include sass-utils.current-selector-or-root() {
|
|
65
|
-
@include token-utils.create-token-values-mixed(
|
|
66
|
-
m2-form-field.$prefix,
|
|
67
|
-
m2-form-field.get-typography-tokens($theme)
|
|
68
|
-
);
|
|
56
|
+
@include token-utils.create-token-values-mixed(m2-form-field.get-typography-tokens($theme));
|
|
69
57
|
}
|
|
70
58
|
}
|
|
71
59
|
}
|
|
@@ -74,26 +62,20 @@
|
|
|
74
62
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
75
63
|
@mixin density($theme) {
|
|
76
64
|
@if inspection.get-theme-version($theme) == 1 {
|
|
77
|
-
@include token-utils.create-token-values(
|
|
78
|
-
m3-form-field.$prefix, m3-form-field.get-density-tokens($theme));
|
|
65
|
+
@include token-utils.create-token-values(map.get(m3-form-field.get-tokens($theme), density));
|
|
79
66
|
} @else {
|
|
80
67
|
@include sass-utils.current-selector-or-root() {
|
|
81
|
-
@include token-utils.create-token-values-mixed(
|
|
82
|
-
m2-form-field.$prefix,
|
|
83
|
-
m2-form-field.get-density-tokens($theme)
|
|
84
|
-
);
|
|
68
|
+
@include token-utils.create-token-values-mixed(m2-form-field.get-density-tokens($theme));
|
|
85
69
|
}
|
|
86
70
|
}
|
|
87
71
|
}
|
|
88
72
|
|
|
89
73
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
90
74
|
@function _define-overrides() {
|
|
91
|
-
$form-field-tokens: m2-form-field.get-token-slots();
|
|
92
|
-
|
|
93
75
|
@return (
|
|
94
76
|
(
|
|
95
|
-
namespace:
|
|
96
|
-
tokens:
|
|
77
|
+
namespace: form-field,
|
|
78
|
+
tokens: token-utils.get-overrides(m3-form-field.get-tokens(), form-field),
|
|
97
79
|
),
|
|
98
80
|
);
|
|
99
81
|
}
|
|
@@ -101,21 +83,19 @@
|
|
|
101
83
|
/// Outputs the CSS variable values for the given tokens.
|
|
102
84
|
/// @param {Map} $tokens The token values to emit.
|
|
103
85
|
@mixin overrides($tokens: ()) {
|
|
104
|
-
|
|
86
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
105
87
|
}
|
|
106
88
|
|
|
107
89
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-form-field.
|
|
108
90
|
/// @param {Map} $theme The theme to generate styles for.
|
|
109
|
-
/// @param {
|
|
110
|
-
|
|
111
|
-
/// or error (If not specified, default primary color will be used).
|
|
112
|
-
@mixin theme($theme, $options...) {
|
|
91
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
92
|
+
@mixin theme($theme, $color-variant: null) {
|
|
113
93
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-form-field') {
|
|
114
94
|
@if inspection.get-theme-version($theme) == 1 {
|
|
115
|
-
@include
|
|
116
|
-
@
|
|
117
|
-
|
|
118
|
-
|
|
95
|
+
@include base($theme);
|
|
96
|
+
@include color($theme, $color-variant);
|
|
97
|
+
@include density($theme);
|
|
98
|
+
@include typography($theme);
|
|
119
99
|
} @else {
|
|
120
100
|
@include base($theme);
|
|
121
101
|
@if inspection.theme-has($theme, color) {
|
|
@@ -130,15 +110,3 @@
|
|
|
130
110
|
}
|
|
131
111
|
}
|
|
132
112
|
}
|
|
133
|
-
|
|
134
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
135
|
-
@include validation.selector-defined(
|
|
136
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
137
|
-
);
|
|
138
|
-
$mat-form-field-tokens: token-utils.get-tokens-for(
|
|
139
|
-
$tokens,
|
|
140
|
-
m2-form-field.$prefix,
|
|
141
|
-
$options...
|
|
142
|
-
);
|
|
143
|
-
@include token-utils.create-token-values(m2-form-field.$prefix, $mat-form-field-tokens);
|
|
144
|
-
}
|
|
@@ -8,19 +8,16 @@
|
|
|
8
8
|
@use 'sass:math';
|
|
9
9
|
@use 'sass:meta';
|
|
10
10
|
|
|
11
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
12
|
-
$prefix: (mat, form-field);
|
|
13
|
-
|
|
14
11
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
15
12
|
// but may be in a future version of the theming API.
|
|
16
13
|
@function get-unthemable-tokens() {
|
|
17
14
|
@return (
|
|
18
|
-
filled-active-indicator-height: 1px,
|
|
19
|
-
filled-focus-active-indicator-height: 2px,
|
|
20
|
-
filled-container-shape: 4px,
|
|
21
|
-
outlined-outline-width: 1px,
|
|
22
|
-
outlined-focus-outline-width: 2px,
|
|
23
|
-
outlined-container-shape: 4px,
|
|
15
|
+
form-field-filled-active-indicator-height: 1px,
|
|
16
|
+
form-field-filled-focus-active-indicator-height: 2px,
|
|
17
|
+
form-field-filled-container-shape: 4px,
|
|
18
|
+
form-field-outlined-outline-width: 1px,
|
|
19
|
+
form-field-outlined-focus-outline-width: 2px,
|
|
20
|
+
form-field-outlined-container-shape: 4px,
|
|
24
21
|
);
|
|
25
22
|
}
|
|
26
23
|
|
|
@@ -44,20 +41,21 @@ $prefix: (mat, form-field);
|
|
|
44
41
|
|
|
45
42
|
@return map.merge($color-tokens, (
|
|
46
43
|
// MDC has a token for the enabled placeholder, but not for the disabled one.
|
|
47
|
-
disabled-input-text-placeholder-color:
|
|
44
|
+
form-field-disabled-input-text-placeholder-color:
|
|
48
45
|
inspection.get-theme-color($theme, foreground, icon, 0.38),
|
|
49
|
-
state-layer-color: inspection.get-theme-color($theme, foreground, base, 0.87),
|
|
50
|
-
error-text-color: inspection.get-theme-color($theme, warn),
|
|
46
|
+
form-field-state-layer-color: inspection.get-theme-color($theme, foreground, base, 0.87),
|
|
47
|
+
form-field-error-text-color: inspection.get-theme-color($theme, warn),
|
|
51
48
|
|
|
52
49
|
// On dark themes we set the native `select` color to some shade of white,
|
|
53
50
|
// however the color propagates to all of the `option` elements, which are
|
|
54
51
|
// always on a white background inside the dropdown, causing them to blend in.
|
|
55
52
|
// Since we can't change background of the dropdown, we need to explicitly
|
|
56
53
|
// reset the color of the options to something dark.
|
|
57
|
-
select-option-text-color: if($is-dark, m2-palette.$dark-primary-text, inherit),
|
|
54
|
+
form-field-select-option-text-color: if($is-dark, m2-palette.$dark-primary-text, inherit),
|
|
58
55
|
// Note the spelling of the `GrayText` here which is a system color. See:
|
|
59
56
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/system-color
|
|
60
|
-
select-disabled-option-text-color:
|
|
57
|
+
form-field-select-disabled-option-text-color:
|
|
58
|
+
if($is-dark, m2-palette.$dark-disabled-text, GrayText),
|
|
61
59
|
|
|
62
60
|
// These tokens are necessary for M3. MDC has them built in already, but:
|
|
63
61
|
// 1. They are too specific, breaking a lot of internal clients.
|
|
@@ -65,58 +63,69 @@ $prefix: (mat, form-field);
|
|
|
65
63
|
// Note: MDC has tokens for all the various states of the icons. Some of them are ommitted,
|
|
66
64
|
// because they resolve to the same value (e.g. focus and base states for the leading icon
|
|
67
65
|
// are the same).
|
|
68
|
-
leading-icon-color: unset,
|
|
69
|
-
disabled-leading-icon-color: unset,
|
|
70
|
-
trailing-icon-color: unset,
|
|
71
|
-
disabled-trailing-icon-color: unset,
|
|
72
|
-
error-focus-trailing-icon-color: unset,
|
|
73
|
-
error-hover-trailing-icon-color: unset,
|
|
74
|
-
error-trailing-icon-color: unset,
|
|
75
|
-
enabled-select-arrow-color:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
filled-
|
|
82
|
-
filled-
|
|
83
|
-
filled-
|
|
66
|
+
form-field-leading-icon-color: unset,
|
|
67
|
+
form-field-disabled-leading-icon-color: unset,
|
|
68
|
+
form-field-trailing-icon-color: unset,
|
|
69
|
+
form-field-disabled-trailing-icon-color: unset,
|
|
70
|
+
form-field-error-focus-trailing-icon-color: unset,
|
|
71
|
+
form-field-error-hover-trailing-icon-color: unset,
|
|
72
|
+
form-field-error-trailing-icon-color: unset,
|
|
73
|
+
form-field-enabled-select-arrow-color:
|
|
74
|
+
inspection.get-theme-color($theme, foreground, icon, 0.54),
|
|
75
|
+
form-field-disabled-select-arrow-color:
|
|
76
|
+
inspection.get-theme-color($theme, foreground, icon, 0.38),
|
|
77
|
+
form-field-hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
78
|
+
form-field-focus-state-layer-opacity: if($is-dark, 0.24, 0.08),
|
|
79
|
+
form-field-filled-container-color: _variable-safe-mix($on-surface, $surface, 4%),
|
|
80
|
+
form-field-filled-disabled-container-color: _variable-safe-mix($on-surface, $surface, 2%),
|
|
81
|
+
form-field-filled-label-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
82
|
+
form-field-filled-hover-label-text-color:
|
|
83
|
+
sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
84
|
+
form-field-filled-disabled-label-text-color:
|
|
84
85
|
sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38),
|
|
85
|
-
filled-input-text-color:
|
|
86
|
-
|
|
86
|
+
form-field-filled-input-text-color:
|
|
87
|
+
sass-utils.safe-color-change($text-color-base, $alpha: 0.87),
|
|
88
|
+
form-field-filled-disabled-input-text-color:
|
|
87
89
|
sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38),
|
|
88
|
-
filled-input-text-placeholder-color:
|
|
90
|
+
form-field-filled-input-text-placeholder-color:
|
|
89
91
|
sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
90
|
-
filled-error-hover-label-text-color: $warn-color,
|
|
91
|
-
filled-error-focus-label-text-color: $warn-color,
|
|
92
|
-
filled-error-label-text-color: $warn-color,
|
|
93
|
-
filled-error-caret-color: $warn-color,
|
|
94
|
-
filled-active-indicator-color:
|
|
95
|
-
|
|
92
|
+
form-field-filled-error-hover-label-text-color: $warn-color,
|
|
93
|
+
form-field-filled-error-focus-label-text-color: $warn-color,
|
|
94
|
+
form-field-filled-error-label-text-color: $warn-color,
|
|
95
|
+
form-field-filled-error-caret-color: $warn-color,
|
|
96
|
+
form-field-filled-active-indicator-color:
|
|
97
|
+
sass-utils.safe-color-change($divider-base, $alpha: 0.42),
|
|
98
|
+
form-field-filled-disabled-active-indicator-color:
|
|
96
99
|
sass-utils.safe-color-change($divider-base, $alpha: 0.06),
|
|
97
|
-
filled-hover-active-indicator-color:
|
|
98
|
-
|
|
99
|
-
filled-error-
|
|
100
|
-
filled-error-
|
|
101
|
-
|
|
102
|
-
outlined-
|
|
103
|
-
|
|
100
|
+
form-field-filled-hover-active-indicator-color:
|
|
101
|
+
sass-utils.safe-color-change($divider-base, $alpha: 0.87),
|
|
102
|
+
form-field-filled-error-active-indicator-color: $warn-color,
|
|
103
|
+
form-field-filled-error-focus-active-indicator-color: $warn-color,
|
|
104
|
+
form-field-filled-error-hover-active-indicator-color: $warn-color,
|
|
105
|
+
form-field-outlined-label-text-color:
|
|
106
|
+
sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
107
|
+
form-field-outlined-hover-label-text-color:
|
|
108
|
+
sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
109
|
+
form-field-outlined-disabled-label-text-color:
|
|
104
110
|
sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38),
|
|
105
|
-
outlined-input-text-color:
|
|
106
|
-
|
|
111
|
+
form-field-outlined-input-text-color:
|
|
112
|
+
sass-utils.safe-color-change($text-color-base, $alpha: 0.87),
|
|
113
|
+
form-field-outlined-disabled-input-text-color:
|
|
107
114
|
sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38),
|
|
108
|
-
outlined-input-text-placeholder-color:
|
|
115
|
+
form-field-outlined-input-text-placeholder-color:
|
|
109
116
|
sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
110
|
-
outlined-error-caret-color: $warn-color,
|
|
111
|
-
outlined-error-focus-label-text-color: $warn-color,
|
|
112
|
-
outlined-error-label-text-color: $warn-color,
|
|
113
|
-
outlined-error-hover-label-text-color: $warn-color,
|
|
114
|
-
outlined-outline-color: sass-utils.safe-color-change($divider-base, $alpha: 0.38),
|
|
115
|
-
outlined-disabled-outline-color:
|
|
116
|
-
|
|
117
|
-
outlined-
|
|
118
|
-
|
|
119
|
-
outlined-error-outline-color: $warn-color,
|
|
117
|
+
form-field-outlined-error-caret-color: $warn-color,
|
|
118
|
+
form-field-outlined-error-focus-label-text-color: $warn-color,
|
|
119
|
+
form-field-outlined-error-label-text-color: $warn-color,
|
|
120
|
+
form-field-outlined-error-hover-label-text-color: $warn-color,
|
|
121
|
+
form-field-outlined-outline-color: sass-utils.safe-color-change($divider-base, $alpha: 0.38),
|
|
122
|
+
form-field-outlined-disabled-outline-color:
|
|
123
|
+
sass-utils.safe-color-change($divider-base, $alpha: 0.06),
|
|
124
|
+
form-field-outlined-hover-outline-color:
|
|
125
|
+
sass-utils.safe-color-change($divider-base, $alpha: 0.87),
|
|
126
|
+
form-field-outlined-error-focus-outline-color: $warn-color,
|
|
127
|
+
form-field-outlined-error-hover-outline-color: $warn-color,
|
|
128
|
+
form-field-outlined-error-outline-color: $warn-color,
|
|
120
129
|
));
|
|
121
130
|
}
|
|
122
131
|
|
|
@@ -132,13 +141,15 @@ $prefix: (mat, form-field);
|
|
|
132
141
|
$palette-color: inspection.get-theme-color($theme, $palette-name);
|
|
133
142
|
|
|
134
143
|
@return (
|
|
135
|
-
focus-select-arrow-color: sass-utils.safe-color-change($palette-color, $alpha: 0.87),
|
|
136
|
-
filled-caret-color: $palette-color,
|
|
137
|
-
filled-focus-active-indicator-color: $palette-color,
|
|
138
|
-
filled-focus-label-text-color:
|
|
139
|
-
|
|
140
|
-
outlined-
|
|
141
|
-
outlined-focus-
|
|
144
|
+
form-field-focus-select-arrow-color: sass-utils.safe-color-change($palette-color, $alpha: 0.87),
|
|
145
|
+
form-field-filled-caret-color: $palette-color,
|
|
146
|
+
form-field-filled-focus-active-indicator-color: $palette-color,
|
|
147
|
+
form-field-filled-focus-label-text-color:
|
|
148
|
+
sass-utils.safe-color-change($palette-color, $alpha: 0.87),
|
|
149
|
+
form-field-outlined-caret-color: $palette-color,
|
|
150
|
+
form-field-outlined-focus-outline-color: $palette-color,
|
|
151
|
+
form-field-outlined-focus-label-text-color:
|
|
152
|
+
sass-utils.safe-color-change($palette-color, $alpha: 0.87),
|
|
142
153
|
);
|
|
143
154
|
}
|
|
144
155
|
|
|
@@ -148,11 +159,13 @@ $prefix: (mat, form-field);
|
|
|
148
159
|
// MDC uses `subtitle1` for the input value, placeholder and floating label. The spec
|
|
149
160
|
// shows `body1` for text fields though, so we manually override the typography.
|
|
150
161
|
// Note: Form controls inherit the typography from the parent form field.
|
|
151
|
-
container-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
152
|
-
container-text-line-height:
|
|
153
|
-
|
|
154
|
-
container-text-
|
|
155
|
-
container-text-
|
|
162
|
+
form-field-container-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
163
|
+
form-field-container-text-line-height:
|
|
164
|
+
inspection.get-theme-typography($theme, body-1, line-height),
|
|
165
|
+
form-field-container-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
166
|
+
form-field-container-text-tracking:
|
|
167
|
+
inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
168
|
+
form-field-container-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
|
|
156
169
|
|
|
157
170
|
// In the container styles, we updated the floating label to use the `body-1` typography level.
|
|
158
171
|
// The MDC notched outline overrides this accidentally (only when the label floats) to a
|
|
@@ -162,21 +175,29 @@ $prefix: (mat, form-field);
|
|
|
162
175
|
// https://github.com/material-components/material-components-web/blob/master/packages/mdc-notched-outline/_mixins.scss#L272-L292.
|
|
163
176
|
// This is why we can't use their `label-text-populated-size` token and we have to declare
|
|
164
177
|
// our own version of it.
|
|
165
|
-
outlined-label-text-populated-size:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
subscript-text-
|
|
169
|
-
subscript-text-
|
|
170
|
-
|
|
171
|
-
subscript-text-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
filled-label-text-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
form-field-outlined-label-text-populated-size:
|
|
179
|
+
inspection.get-theme-typography($theme, body-1, font-size),
|
|
180
|
+
|
|
181
|
+
form-field-subscript-text-font: inspection.get-theme-typography($theme, caption, font-family),
|
|
182
|
+
form-field-subscript-text-line-height:
|
|
183
|
+
inspection.get-theme-typography($theme, caption, line-height),
|
|
184
|
+
form-field-subscript-text-size: inspection.get-theme-typography($theme, caption, font-size),
|
|
185
|
+
form-field-subscript-text-tracking:
|
|
186
|
+
inspection.get-theme-typography($theme, caption, letter-spacing),
|
|
187
|
+
form-field-subscript-text-weight: inspection.get-theme-typography($theme, caption, font-weight),
|
|
188
|
+
form-field-filled-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
189
|
+
form-field-filled-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
190
|
+
form-field-filled-label-text-tracking:
|
|
191
|
+
inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
192
|
+
form-field-filled-label-text-weight:
|
|
193
|
+
inspection.get-theme-typography($theme, body-1, font-weight),
|
|
194
|
+
form-field-outlined-label-text-font:
|
|
195
|
+
inspection.get-theme-typography($theme, body-1, font-family),
|
|
196
|
+
form-field-outlined-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
197
|
+
form-field-outlined-label-text-tracking:
|
|
198
|
+
inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
199
|
+
form-field-outlined-label-text-weight:
|
|
200
|
+
inspection.get-theme-typography($theme, body-1, font-weight),
|
|
180
201
|
);
|
|
181
202
|
}
|
|
182
203
|
|
|
@@ -224,12 +245,12 @@ $prefix: (mat, form-field);
|
|
|
224
245
|
$vertical-padding: 16px - $vertical-deduction;
|
|
225
246
|
|
|
226
247
|
@return (
|
|
227
|
-
container-height: $height,
|
|
228
|
-
filled-label-display: if($hide-label, none, block),
|
|
229
|
-
container-vertical-padding: $vertical-padding,
|
|
230
|
-
filled-with-label-container-padding-top:
|
|
248
|
+
form-field-container-height: $height,
|
|
249
|
+
form-field-filled-label-display: if($hide-label, none, block),
|
|
250
|
+
form-field-container-vertical-padding: $vertical-padding,
|
|
251
|
+
form-field-filled-with-label-container-padding-top:
|
|
231
252
|
if($hide-label, $vertical-padding, $filled-with-label-padding-top),
|
|
232
|
-
filled-with-label-container-padding-bottom:
|
|
253
|
+
form-field-filled-with-label-container-padding-bottom:
|
|
233
254
|
if($hide-label, $vertical-padding, $filled-with-label-padding-bottom),
|
|
234
255
|
);
|
|
235
256
|
}
|