@angular/material 20.0.0-rc.1 → 20.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/_autocomplete-theme.scss +17 -37
- package/autocomplete/_m2-autocomplete.scss +3 -6
- package/autocomplete/_m3-autocomplete.scss +14 -9
- package/badge/_badge-theme.scss +9 -35
- package/badge/_m2-badge.scss +32 -35
- package/badge/_m3-badge.scss +31 -32
- package/bottom-sheet/_bottom-sheet-theme.scss +16 -27
- package/bottom-sheet/_m2-bottom-sheet.scss +11 -11
- package/bottom-sheet/_m3-bottom-sheet.scss +18 -17
- package/button/_button-theme.scss +29 -46
- package/button/_fab-theme.scss +22 -41
- package/button/_icon-button-theme.scss +29 -46
- package/button/_m2-button.scss +135 -133
- package/button/_m2-fab.scss +51 -53
- package/button/_m2-icon-button.scss +14 -17
- package/button/_m3-button.scss +145 -240
- package/button/_m3-fab.scss +69 -166
- package/button/_m3-icon-button.scss +28 -56
- package/button-toggle/_button-toggle-theme.scss +23 -49
- package/button-toggle/_m2-button-toggle.scss +45 -37
- package/button-toggle/_m3-button-toggle.scss +53 -53
- package/card/_card-theme.scss +16 -37
- package/card/_m2-card.scss +24 -25
- package/card/_m3-card.scss +32 -36
- package/checkbox/_checkbox-theme.scss +25 -52
- package/checkbox/_m2-checkbox.scss +32 -35
- package/checkbox/_m3-checkbox.scss +49 -84
- package/chips/_chips-theme.scss +24 -44
- package/chips/_m2-chip.scss +47 -51
- package/chips/_m3-chip.scss +63 -110
- package/core/_core-theme.scss +58 -56
- package/core/_core.scss +15 -18
- package/core/_m2-app.scss +3 -7
- package/core/_m3-app.scss +37 -24
- package/core/option/_m2-optgroup.scss +6 -9
- package/core/option/_m2-option.scss +10 -13
- package/core/option/_m3-optgroup.scss +16 -13
- package/core/option/_m3-option.scss +28 -48
- package/core/option/_optgroup-theme.scss +14 -25
- package/core/option/_option-theme.scss +22 -33
- package/core/ripple/_m2-ripple.scss +1 -4
- package/core/ripple/_m3-ripple.scss +11 -13
- package/core/ripple/_ripple-theme.scss +15 -33
- package/core/ripple/_ripple.scss +5 -5
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +10 -11
- package/core/selection/pseudo-checkbox/_m3-pseudo-checkbox.scss +25 -40
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -27
- package/core/style/_sass-utils.scss +0 -29
- package/core/theming/_color-api-backwards-compatibility.scss +46 -29
- package/core/theming/_definition.scss +6 -0
- package/core/theming/_inspection.scss +0 -25
- package/core/tokens/_m3-system.scss +19 -68
- package/core/tokens/_m3-tokens.scss +0 -128
- package/core/tokens/_m3-utils.scss +11 -83
- package/core/tokens/_token-utils.scss +52 -246
- package/core/tokens/m3/_index.scss +1 -0
- package/core/tokens/m3/_theme.scss +47 -0
- package/datepicker/_datepicker-theme.scss +24 -39
- package/datepicker/_m2-datepicker.scss +55 -50
- package/datepicker/_m3-datepicker.scss +65 -113
- package/datepicker/index.d.ts +1 -0
- package/dialog/_dialog-theme.scss +15 -27
- package/dialog/_m2-dialog.scss +25 -26
- package/dialog/_m3-dialog.scss +35 -35
- package/divider/_divider-theme.scss +14 -25
- package/divider/_m2-divider.scss +2 -5
- package/divider/_m3-divider.scss +13 -13
- package/expansion/_expansion-theme.scss +15 -33
- package/expansion/_m2-expansion.scss +28 -27
- package/expansion/_m3-expansion.scss +41 -36
- package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +23 -23
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -11
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +11 -11
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +19 -23
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +20 -20
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +47 -47
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +11 -11
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +52 -52
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/{common-module-CF0eSYO4.mjs → common-module-BeAwwoi6.mjs} +5 -5
- package/fesm2022/common-module-BeAwwoi6.mjs.map +1 -0
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +24 -24
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
- package/fesm2022/date-range-input-harness-Bp1T4oUe.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +99 -95
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +18 -5
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +2 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +8 -8
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/{error-options-CbAHLQL5.mjs → error-options-C79tZCHG.mjs} +7 -7
- package/fesm2022/error-options-C79tZCHG.mjs.map +1 -0
- package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +28 -28
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/{form-field-sL9_TuE-.mjs → form-field-Cdw3iYrm.mjs} +33 -33
- package/fesm2022/form-field-Cdw3iYrm.mjs.map +1 -0
- package/fesm2022/form-field.mjs +3 -3
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +24 -24
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +8 -8
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/{icon-button-BASP1JI8.mjs → icon-button-D5zzuoJc.mjs} +9 -9
- package/fesm2022/icon-button-D5zzuoJc.mjs.map +1 -0
- package/fesm2022/{icon-registry-DVLYRZv3.mjs → icon-registry-DVrJNtTv.mjs} +4 -4
- package/fesm2022/icon-registry-DVrJNtTv.mjs.map +1 -0
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/{index-BNtCg9r0.mjs → index-CrjYeoWX.mjs} +9 -9
- package/fesm2022/index-CrjYeoWX.mjs.map +1 -0
- package/fesm2022/{index-DxCSjCL3.mjs → index-DTIUI_kX.mjs} +7 -7
- package/fesm2022/index-DTIUI_kX.mjs.map +1 -0
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness-oQzj5EsQ.mjs.map +1 -1
- package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
- package/fesm2022/input.mjs +12 -12
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/{internal-form-field-_OHaksOO.mjs → internal-form-field-B9_shC5z.mjs} +4 -4
- package/fesm2022/internal-form-field-B9_shC5z.mjs.map +1 -0
- package/fesm2022/{line-CtAKiRo6.mjs → line-XysKlyvU.mjs} +9 -9
- package/fesm2022/line-XysKlyvU.mjs.map +1 -0
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +55 -55
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +20 -20
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{module-DToxyW7l.mjs → module-CVpKZX1V.mjs} +7 -7
- package/fesm2022/module-CVpKZX1V.mjs.map +1 -0
- package/fesm2022/{module-ChwDH6BC.mjs → module-CdXqcjot.mjs} +28 -28
- package/fesm2022/module-CdXqcjot.mjs.map +1 -0
- package/fesm2022/{module-m5vWw9-5.mjs → module-CwYXiMoV.mjs} +12 -12
- package/fesm2022/module-CwYXiMoV.mjs.map +1 -0
- package/fesm2022/{module-DqTK2swA.mjs → module-r2U_2G3G.mjs} +17 -17
- package/fesm2022/module-r2U_2G3G.mjs.map +1 -0
- package/fesm2022/{option-hkPAbXDN.mjs → option-D4ZNnnWi.mjs} +11 -11
- package/fesm2022/option-D4ZNnnWi.mjs.map +1 -0
- package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +25 -25
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +8 -8
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +8 -8
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/{pseudo-checkbox-Ddidc23S.mjs → pseudo-checkbox-DQugCpur.mjs} +4 -4
- package/fesm2022/pseudo-checkbox-DQugCpur.mjs.map +1 -0
- package/fesm2022/{pseudo-checkbox-module--am9-RIA.mjs → pseudo-checkbox-module-BXWS_-PP.mjs} +7 -7
- package/fesm2022/pseudo-checkbox-module-BXWS_-PP.mjs.map +1 -0
- package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +19 -16
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/{ripple-DUGA2BAa.mjs → ripple-BtLhcfGO.mjs} +7 -7
- package/fesm2022/ripple-BtLhcfGO.mjs.map +1 -0
- package/fesm2022/{ripple-loader-Xy4bv6Xh.mjs → ripple-loader-DBdhLqHy.mjs} +5 -5
- package/fesm2022/ripple-loader-DBdhLqHy.mjs.map +1 -0
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +12 -12
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +29 -25
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +11 -11
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +21 -21
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +29 -29
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +15 -15
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +38 -38
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/{structural-styles-DA18Hchc.mjs → structural-styles-DWEe15sC.mjs} +4 -4
- package/fesm2022/structural-styles-DWEe15sC.mjs.map +1 -0
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +56 -56
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +67 -63
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +20 -20
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +12 -12
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +2 -2
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +26 -26
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +23 -55
- package/form-field/_m2-form-field.scss +112 -91
- package/form-field/_m3-form-field.scss +116 -131
- package/grid-list/_grid-list-theme.scss +13 -23
- package/grid-list/_m2-grid-list.scss +8 -7
- package/grid-list/_m3-grid-list.scss +14 -15
- package/icon/_icon-theme.scss +20 -30
- package/icon/_m2-icon.scss +1 -4
- package/icon/_m3-icon.scss +13 -27
- package/input/_input-theme.scss +7 -40
- package/list/_list-theme.scss +22 -52
- package/list/_m2-list.scss +56 -55
- package/list/_m3-list.scss +69 -67
- package/menu/_m2-menu.scss +22 -25
- package/menu/_m3-menu.scss +35 -38
- package/menu/_menu-theme.scss +15 -27
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +16 -17
- package/paginator/_m3-paginator.scss +28 -27
- package/paginator/_paginator-theme.scss +14 -40
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/_m2-progress-bar.scss +5 -8
- package/progress-bar/_m3-progress-bar.scss +17 -26
- package/progress-bar/_progress-bar-theme.scss +17 -27
- package/progress-spinner/_m2-progress-spinner.scss +3 -6
- package/progress-spinner/_m3-progress-spinner.scss +15 -22
- package/progress-spinner/_progress-spinner-theme.scss +20 -43
- package/radio/_m2-radio.scss +24 -27
- package/radio/_m3-radio.scss +44 -58
- package/radio/_radio-theme.scss +23 -50
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/index_bundled.js +2 -0
- package/schematics/ng-update/index_bundled.js.map +1 -1
- package/select/_m2-select.scss +15 -18
- package/select/_m3-select.scss +32 -38
- package/select/_select-theme.scss +23 -50
- package/sidenav/_m2-sidenav.scss +9 -12
- package/sidenav/_m3-sidenav.scss +20 -22
- package/sidenav/_sidenav-theme.scss +14 -25
- package/slide-toggle/_m2-slide-toggle.scss +82 -83
- package/slide-toggle/_m3-slide-toggle.scss +102 -143
- package/slide-toggle/_slide-toggle-theme.scss +26 -61
- package/slider/_m2-slider.scss +46 -46
- package/slider/_m3-slider.scss +54 -109
- package/slider/_slider-theme.scss +23 -34
- package/snack-bar/_m2-snack-bar.scss +10 -11
- package/snack-bar/_m3-snack-bar.scss +20 -19
- package/snack-bar/_snack-bar-theme.scss +14 -26
- package/sort/_m2-sort.scss +1 -4
- package/sort/_m3-sort.scss +11 -9
- package/sort/_sort-theme.scss +15 -27
- package/stepper/_m2-stepper.scss +32 -31
- package/stepper/_m3-stepper.scss +44 -79
- package/stepper/_stepper-theme.scss +22 -50
- package/table/_m2-table.scss +25 -26
- package/table/_m3-table.scss +36 -27
- package/table/_table-theme.scss +15 -32
- package/tabs/_m2-tabs.scss +26 -29
- package/tabs/_m3-tabs.scss +40 -51
- package/tabs/_tabs-theme.scss +37 -58
- package/tabs/index.d.ts +5 -3
- package/timepicker/_m2-timepicker.scss +3 -6
- package/timepicker/_m3-timepicker.scss +14 -15
- package/timepicker/_timepicker-theme.scss +20 -45
- package/toolbar/_m2-toolbar.scss +11 -12
- package/toolbar/_m3-toolbar.scss +22 -17
- package/toolbar/_toolbar-theme.scss +13 -37
- package/tooltip/_m2-tooltip.scss +9 -11
- package/tooltip/_m3-tooltip.scss +19 -19
- package/tooltip/_tooltip-theme.scss +17 -35
- package/tree/_m2-tree.scss +6 -9
- package/tree/_m3-tree.scss +19 -16
- package/tree/_tree-theme.scss +14 -36
- package/fesm2022/common-module-CF0eSYO4.mjs.map +0 -1
- package/fesm2022/error-options-CbAHLQL5.mjs.map +0 -1
- package/fesm2022/form-field-sL9_TuE-.mjs.map +0 -1
- package/fesm2022/icon-button-BASP1JI8.mjs.map +0 -1
- package/fesm2022/icon-registry-DVLYRZv3.mjs.map +0 -1
- package/fesm2022/index-BNtCg9r0.mjs.map +0 -1
- package/fesm2022/index-DxCSjCL3.mjs.map +0 -1
- package/fesm2022/internal-form-field-_OHaksOO.mjs.map +0 -1
- package/fesm2022/line-CtAKiRo6.mjs.map +0 -1
- package/fesm2022/module-ChwDH6BC.mjs.map +0 -1
- package/fesm2022/module-DToxyW7l.mjs.map +0 -1
- package/fesm2022/module-DqTK2swA.mjs.map +0 -1
- package/fesm2022/module-m5vWw9-5.mjs.map +0 -1
- package/fesm2022/option-hkPAbXDN.mjs.map +0 -1
- package/fesm2022/pseudo-checkbox-Ddidc23S.mjs.map +0 -1
- package/fesm2022/pseudo-checkbox-module--am9-RIA.mjs.map +0 -1
- package/fesm2022/ripple-DUGA2BAa.mjs.map +0 -1
- package/fesm2022/ripple-loader-Xy4bv6Xh.mjs.map +0 -1
- package/fesm2022/structural-styles-DA18Hchc.mjs.map +0 -1
- package/schematics/tsconfig.json +0 -26
package/table/_m3-table.scss
CHANGED
|
@@ -1,44 +1,53 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:list';
|
|
3
|
-
@use '../core/style/sass-utils';
|
|
4
3
|
@use '../core/tokens/m3-utils';
|
|
5
4
|
@use '../core/theming/theming';
|
|
6
5
|
@use '../core/theming/inspection';
|
|
7
|
-
|
|
8
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
|
-
$prefix: (mat, table);
|
|
6
|
+
@use '../core/tokens/m3';
|
|
10
7
|
|
|
11
8
|
/// Generates custom tokens for the mat-table.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
m3-utils.generate-typography-tokens($systems, header-headline, title-small),
|
|
19
|
-
m3-utils.generate-typography-tokens($systems, row-item-label-text, body-medium),
|
|
20
|
-
m3-utils.generate-typography-tokens(
|
|
21
|
-
$systems, footer-supporting-text, body-medium),
|
|
22
|
-
(
|
|
23
|
-
row-item-outline-width: m3-utils.hardcode(1px, $exclude-hardcoded),
|
|
24
|
-
background-color: map.get($systems, md-sys-color, surface),
|
|
25
|
-
header-headline-color: map.get($systems, md-sys-color, on-surface),
|
|
26
|
-
row-item-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
27
|
-
row-item-outline-color: map.get($systems, md-sys-color, outline),
|
|
9
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
10
|
+
$system: m3-utils.get-system($theme);
|
|
11
|
+
|
|
12
|
+
@return (
|
|
13
|
+
base: (
|
|
14
|
+
table-row-item-outline-width: 1px,
|
|
28
15
|
),
|
|
16
|
+
color: (
|
|
17
|
+
table-background-color: map.get($system, surface),
|
|
18
|
+
table-header-headline-color: map.get($system, on-surface),
|
|
19
|
+
table-row-item-label-text-color: map.get($system, on-surface),
|
|
20
|
+
table-row-item-outline-color: map.get($system, outline),
|
|
21
|
+
),
|
|
22
|
+
typography: (
|
|
23
|
+
table-header-headline-font: map.get($system, title-small-font),
|
|
24
|
+
table-header-headline-line-height: map.get($system, title-small-line-height),
|
|
25
|
+
table-header-headline-size: map.get($system, title-small-size),
|
|
26
|
+
table-header-headline-tracking: map.get($system, title-small-tracking),
|
|
27
|
+
table-header-headline-weight: map.get($system, title-small-weight),
|
|
28
|
+
table-row-item-label-text-font: map.get($system, body-medium-font),
|
|
29
|
+
table-row-item-label-text-line-height: map.get($system, body-medium-line-height),
|
|
30
|
+
table-row-item-label-text-size: map.get($system, body-medium-size),
|
|
31
|
+
table-row-item-label-text-tracking: map.get($system, body-medium-tracking),
|
|
32
|
+
table-row-item-label-text-weight: map.get($system, body-medium-weight),
|
|
33
|
+
table-footer-supporting-text-font: map.get($system, body-medium-font),
|
|
34
|
+
table-footer-supporting-text-line-height: map.get($system, body-medium-line-height),
|
|
35
|
+
table-footer-supporting-text-size: map.get($system, body-medium-size),
|
|
36
|
+
table-footer-supporting-text-tracking: map.get($system, body-medium-tracking),
|
|
37
|
+
table-footer-supporting-text-weight: map.get($system, body-medium-weight),
|
|
38
|
+
),
|
|
39
|
+
density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
|
|
29
40
|
);
|
|
30
|
-
|
|
31
|
-
@return m3-utils.namespace($prefix, $tokens, $token-slots);
|
|
32
41
|
}
|
|
33
42
|
|
|
34
43
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
35
|
-
@function get-density-tokens($
|
|
36
|
-
$scale: theming.clamp-density(
|
|
44
|
+
@function get-density-tokens($scale) {
|
|
45
|
+
$scale: theming.clamp-density($scale, -4);
|
|
37
46
|
$index: ($scale * -1) + 1;
|
|
38
47
|
|
|
39
48
|
@return (
|
|
40
|
-
header-container-height: list.nth((56px, 52px, 48px, 44px, 40px), $index),
|
|
41
|
-
footer-container-height: list.nth((52px, 48px, 44px, 40px, 36px), $index),
|
|
42
|
-
row-item-container-height: list.nth((52px, 48px, 44px, 40px, 36px), $index),
|
|
49
|
+
table-header-container-height: list.nth((56px, 52px, 48px, 44px, 40px), $index),
|
|
50
|
+
table-footer-container-height: list.nth((52px, 48px, 44px, 40px, 36px), $index),
|
|
51
|
+
table-row-item-container-height: list.nth((52px, 48px, 44px, 40px, 36px), $index),
|
|
43
52
|
);
|
|
44
53
|
}
|
package/table/_table-theme.scss
CHANGED
|
@@ -3,51 +3,46 @@
|
|
|
3
3
|
@use './m3-table';
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
5
|
@use '../core/theming/inspection';
|
|
6
|
-
@use '../core/theming/validation';
|
|
7
6
|
@use '../core/typography/typography';
|
|
8
7
|
@use '../core/tokens/token-utils';
|
|
9
8
|
@use '../core/style/sass-utils';
|
|
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-table.get-tokens($theme), base));
|
|
14
13
|
} @else {
|
|
15
14
|
@include sass-utils.current-selector-or-root() {
|
|
16
|
-
@include token-utils.create-token-values-mixed(
|
|
17
|
-
m2-table.$prefix, m2-table.get-unthemable-tokens());
|
|
15
|
+
@include token-utils.create-token-values-mixed(m2-table.get-unthemable-tokens());
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
@mixin color($theme) {
|
|
23
21
|
@if inspection.get-theme-version($theme) == 1 {
|
|
24
|
-
@include
|
|
22
|
+
@include token-utils.create-token-values(map.get(m3-table.get-tokens($theme), color));
|
|
25
23
|
} @else {
|
|
26
24
|
@include sass-utils.current-selector-or-root() {
|
|
27
|
-
@include token-utils.create-token-values-mixed(
|
|
28
|
-
m2-table.$prefix, m2-table.get-color-tokens($theme));
|
|
25
|
+
@include token-utils.create-token-values-mixed(m2-table.get-color-tokens($theme));
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
@mixin typography($theme) {
|
|
34
31
|
@if inspection.get-theme-version($theme) == 1 {
|
|
35
|
-
@include
|
|
32
|
+
@include token-utils.create-token-values(map.get(m3-table.get-tokens($theme), typography));
|
|
36
33
|
} @else {
|
|
37
34
|
@include sass-utils.current-selector-or-root() {
|
|
38
|
-
@include token-utils.create-token-values-mixed(
|
|
39
|
-
m2-table.$prefix, m2-table.get-typography-tokens($theme));
|
|
35
|
+
@include token-utils.create-token-values-mixed(m2-table.get-typography-tokens($theme));
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
@mixin density($theme) {
|
|
45
41
|
@if inspection.get-theme-version($theme) == 1 {
|
|
46
|
-
@include token-utils.create-token-values(m3-table
|
|
42
|
+
@include token-utils.create-token-values(map.get(m3-table.get-tokens($theme), density));
|
|
47
43
|
} @else {
|
|
48
44
|
@include sass-utils.current-selector-or-root() {
|
|
49
|
-
@include token-utils.create-token-values-mixed(
|
|
50
|
-
m2-table.$prefix, m2-table.get-density-tokens($theme));
|
|
45
|
+
@include token-utils.create-token-values-mixed(m2-table.get-density-tokens($theme));
|
|
51
46
|
}
|
|
52
47
|
}
|
|
53
48
|
}
|
|
@@ -56,23 +51,23 @@
|
|
|
56
51
|
@function _define-overrides() {
|
|
57
52
|
@return (
|
|
58
53
|
(
|
|
59
|
-
namespace:
|
|
60
|
-
tokens:
|
|
54
|
+
namespace: table,
|
|
55
|
+
tokens: token-utils.get-overrides(m3-table.get-tokens(), table)
|
|
61
56
|
),
|
|
62
57
|
);
|
|
63
58
|
}
|
|
64
59
|
|
|
65
60
|
@mixin overrides($tokens: ()) {
|
|
66
|
-
|
|
61
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
67
62
|
}
|
|
68
63
|
|
|
69
64
|
@mixin theme($theme) {
|
|
70
65
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-table') {
|
|
71
66
|
@if inspection.get-theme-version($theme) == 1 {
|
|
72
|
-
@include
|
|
73
|
-
@
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
@include base($theme);
|
|
68
|
+
@include color($theme);
|
|
69
|
+
@include density($theme);
|
|
70
|
+
@include typography($theme);
|
|
76
71
|
} @else {
|
|
77
72
|
@include base($theme);
|
|
78
73
|
@if inspection.theme-has($theme, color) {
|
|
@@ -87,15 +82,3 @@
|
|
|
87
82
|
}
|
|
88
83
|
}
|
|
89
84
|
}
|
|
90
|
-
|
|
91
|
-
@mixin _theme-from-tokens($tokens) {
|
|
92
|
-
@include validation.selector-defined(
|
|
93
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
94
|
-
);
|
|
95
|
-
@if ($tokens != ()) {
|
|
96
|
-
@include token-utils.create-token-values(
|
|
97
|
-
m2-table.$prefix,
|
|
98
|
-
map.get($tokens, m2-table.$prefix)
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
}
|
package/tabs/_m2-tabs.scss
CHANGED
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
@use '../core/style/sass-utils';
|
|
5
5
|
@use '../core/tokens/m2-utils';
|
|
6
6
|
|
|
7
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
8
|
-
$prefix: (mat, tab);
|
|
9
|
-
|
|
10
7
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
11
8
|
// but may be in a future version of the theming API.
|
|
12
9
|
//
|
|
@@ -17,14 +14,14 @@ $prefix: (mat, tab);
|
|
|
17
14
|
@return (
|
|
18
15
|
// This is specified both here and in the density tokens, because it determines the size of the
|
|
19
16
|
// tab itself and there are internal tests who don't configure the theme correctly.
|
|
20
|
-
container-height: 48px,
|
|
17
|
+
tab-container-height: 48px,
|
|
21
18
|
// For some period of time, the MDC tabs removed the divider. This has been added back in
|
|
22
19
|
// and will be present in M3.
|
|
23
|
-
divider-color: transparent,
|
|
24
|
-
divider-height: 0,
|
|
25
|
-
active-indicator-height: 2px,
|
|
20
|
+
tab-divider-color: transparent,
|
|
21
|
+
tab-divider-height: 0,
|
|
22
|
+
tab-active-indicator-height: 2px,
|
|
26
23
|
// Currently set to zero, but used by the gmat styles to make the indicator rounded.
|
|
27
|
-
active-indicator-shape: 0,
|
|
24
|
+
tab-active-indicator-shape: 0,
|
|
28
25
|
);
|
|
29
26
|
}
|
|
30
27
|
|
|
@@ -36,25 +33,25 @@ $prefix: (mat, tab);
|
|
|
36
33
|
$ripple-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
37
34
|
|
|
38
35
|
$tokens: (
|
|
39
|
-
disabled-ripple-color: inspection.get-theme-color($theme, foreground, disabled),
|
|
40
|
-
pagination-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
|
|
36
|
+
tab-disabled-ripple-color: inspection.get-theme-color($theme, foreground, disabled),
|
|
37
|
+
tab-pagination-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
|
|
41
38
|
|
|
42
39
|
// Note: MDC has equivalents of these tokens, but they lead to much higher selector specificity.
|
|
43
|
-
inactive-label-text-color: $inactive-label-text-color,
|
|
44
|
-
active-label-text-color: $active-label-text-color,
|
|
40
|
+
tab-inactive-label-text-color: $inactive-label-text-color,
|
|
41
|
+
tab-active-label-text-color: $active-label-text-color,
|
|
45
42
|
|
|
46
43
|
// Tokens needed to implement the gmat styles. Externally they don't change.
|
|
47
|
-
active-ripple-color: $ripple-color,
|
|
48
|
-
inactive-ripple-color: $ripple-color,
|
|
49
|
-
inactive-focus-label-text-color: $inactive-label-text-color,
|
|
50
|
-
inactive-hover-label-text-color: $inactive-label-text-color,
|
|
51
|
-
active-focus-label-text-color: $active-label-text-color,
|
|
52
|
-
active-hover-label-text-color: $active-label-text-color,
|
|
53
|
-
active-focus-indicator-color: $active-label-text-color,
|
|
54
|
-
active-hover-indicator-color: $active-label-text-color,
|
|
55
|
-
active-indicator-color: inspection.get-theme-color($theme, $palette-name, default),
|
|
56
|
-
background-color: inspection.get-theme-color($theme, $palette-name, default),
|
|
57
|
-
foreground-color: inspection.get-theme-color($theme, $palette-name, default-contrast),
|
|
44
|
+
tab-active-ripple-color: $ripple-color,
|
|
45
|
+
tab-inactive-ripple-color: $ripple-color,
|
|
46
|
+
tab-inactive-focus-label-text-color: $inactive-label-text-color,
|
|
47
|
+
tab-inactive-hover-label-text-color: $inactive-label-text-color,
|
|
48
|
+
tab-active-focus-label-text-color: $active-label-text-color,
|
|
49
|
+
tab-active-hover-label-text-color: $active-label-text-color,
|
|
50
|
+
tab-active-focus-indicator-color: $active-label-text-color,
|
|
51
|
+
tab-active-hover-indicator-color: $active-label-text-color,
|
|
52
|
+
tab-active-indicator-color: inspection.get-theme-color($theme, $palette-name, default),
|
|
53
|
+
tab-background-color: inspection.get-theme-color($theme, $palette-name, default),
|
|
54
|
+
tab-foreground-color: inspection.get-theme-color($theme, $palette-name, default-contrast),
|
|
58
55
|
);
|
|
59
56
|
|
|
60
57
|
@each $token in $exclude {
|
|
@@ -68,11 +65,11 @@ $prefix: (mat, tab);
|
|
|
68
65
|
@function get-typography-tokens($theme) {
|
|
69
66
|
@return (
|
|
70
67
|
// Note: MDC has equivalents of these tokens, but they lead to much higher selector specificity.
|
|
71
|
-
label-text-font: inspection.get-theme-typography($theme, button, font-family),
|
|
72
|
-
label-text-size: inspection.get-theme-typography($theme, button, font-size),
|
|
73
|
-
label-text-tracking: inspection.get-theme-typography($theme, button, letter-spacing),
|
|
74
|
-
label-text-line-height: inspection.get-theme-typography($theme, button, line-height),
|
|
75
|
-
label-text-weight: inspection.get-theme-typography($theme, button, font-weight),
|
|
68
|
+
tab-label-text-font: inspection.get-theme-typography($theme, button, font-family),
|
|
69
|
+
tab-label-text-size: inspection.get-theme-typography($theme, button, font-size),
|
|
70
|
+
tab-label-text-tracking: inspection.get-theme-typography($theme, button, letter-spacing),
|
|
71
|
+
tab-label-text-line-height: inspection.get-theme-typography($theme, button, line-height),
|
|
72
|
+
tab-label-text-weight: inspection.get-theme-typography($theme, button, font-weight),
|
|
76
73
|
);
|
|
77
74
|
}
|
|
78
75
|
|
|
@@ -81,7 +78,7 @@ $prefix: (mat, tab);
|
|
|
81
78
|
$scale: theming.clamp-density(inspection.get-theme-density($theme), -4);
|
|
82
79
|
|
|
83
80
|
@return (
|
|
84
|
-
container-height: map.get((
|
|
81
|
+
tab-container-height: map.get((
|
|
85
82
|
0: 48px,
|
|
86
83
|
-1: 44px,
|
|
87
84
|
-2: 40px,
|
package/tabs/_m3-tabs.scss
CHANGED
|
@@ -1,70 +1,59 @@
|
|
|
1
1
|
@use '../core/tokens/m3-utils';
|
|
2
|
-
@use '../core/style/sass-utils';
|
|
3
2
|
@use 'sass:map';
|
|
4
3
|
@use 'sass:list';
|
|
5
4
|
@use '../core/theming/theming';
|
|
6
5
|
@use '../core/theming/inspection';
|
|
7
|
-
|
|
8
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
|
-
$prefix: (mat, tab);
|
|
6
|
+
@use '../core/tokens/m3';
|
|
10
7
|
|
|
11
8
|
/// Generates the tokens for MDC tab
|
|
12
|
-
/// @param {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
m3-utils.generate-typography-tokens($systems, label-text, title-small),
|
|
19
|
-
(
|
|
20
|
-
active-focus-indicator-color: map.get($systems, md-sys-color, primary),
|
|
21
|
-
active-focus-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
22
|
-
active-hover-indicator-color: map.get($systems, md-sys-color, primary),
|
|
23
|
-
active-hover-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
24
|
-
active-indicator-color: map.get($systems, md-sys-color, primary),
|
|
25
|
-
active-indicator-height: m3-utils.hardcode(2px, $exclude-hardcoded),
|
|
26
|
-
active-indicator-shape: m3-utils.hardcode(0, $exclude-hardcoded),
|
|
27
|
-
active-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
28
|
-
active-ripple-color: map.get($systems, md-sys-color, on-surface),
|
|
29
|
-
divider-color: map.get($systems, md-sys-color, surface-variant),
|
|
30
|
-
divider-height: m3-utils.hardcode(1px, $exclude-hardcoded),
|
|
31
|
-
inactive-focus-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
32
|
-
inactive-hover-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
33
|
-
inactive-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
34
|
-
inactive-ripple-color: map.get($systems, md-sys-color, on-surface),
|
|
35
|
-
pagination-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
36
|
-
),
|
|
37
|
-
);
|
|
9
|
+
/// @param {String} $color-variant The color variant to use for the component
|
|
10
|
+
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
11
|
+
$system: m3-utils.get-system($theme);
|
|
12
|
+
@if $color-variant {
|
|
13
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
14
|
+
}
|
|
38
15
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
active-hover-indicator-color: map.get($systems, md-sys-color, secondary),
|
|
45
|
-
active-indicator-color: map.get($systems, md-sys-color, secondary),
|
|
16
|
+
@return (
|
|
17
|
+
base: (
|
|
18
|
+
tab-active-indicator-height: 2px,
|
|
19
|
+
tab-active-indicator-shape: 0,
|
|
20
|
+
tab-divider-height: 1px,
|
|
46
21
|
),
|
|
47
|
-
|
|
48
|
-
active-focus-indicator-color: map.get($
|
|
49
|
-
active-
|
|
50
|
-
active-indicator-color: map.get($
|
|
22
|
+
color: (
|
|
23
|
+
tab-active-focus-indicator-color: map.get($system, primary),
|
|
24
|
+
tab-active-focus-label-text-color: map.get($system, on-surface),
|
|
25
|
+
tab-active-hover-indicator-color: map.get($system, primary),
|
|
26
|
+
tab-active-hover-label-text-color: map.get($system, on-surface),
|
|
27
|
+
tab-active-indicator-color: map.get($system, primary),
|
|
28
|
+
tab-active-label-text-color: map.get($system, on-surface),
|
|
29
|
+
tab-active-ripple-color: map.get($system, on-surface),
|
|
30
|
+
tab-divider-color: map.get($system, surface-variant),
|
|
31
|
+
tab-inactive-focus-label-text-color: map.get($system, on-surface),
|
|
32
|
+
tab-inactive-hover-label-text-color: map.get($system, on-surface),
|
|
33
|
+
tab-inactive-label-text-color: map.get($system, on-surface),
|
|
34
|
+
tab-inactive-ripple-color: map.get($system, on-surface),
|
|
35
|
+
tab-pagination-icon-color: map.get($system, on-surface),
|
|
36
|
+
tab-disabled-ripple-color: map.get($system, on-surface-variant),
|
|
37
|
+
tab-background-color: null,
|
|
38
|
+
tab-foreground-color: null,
|
|
51
39
|
),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
typography: (
|
|
41
|
+
tab-label-text-font: map.get($system, title-small-font),
|
|
42
|
+
tab-label-text-line-height: map.get($system, title-small-line-height),
|
|
43
|
+
tab-label-text-size: map.get($system, title-small-size),
|
|
44
|
+
tab-label-text-tracking: map.get($system, title-small-tracking),
|
|
45
|
+
tab-label-text-weight: map.get($system, title-small-weight),
|
|
46
|
+
),
|
|
47
|
+
density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
|
|
57
48
|
);
|
|
58
|
-
|
|
59
|
-
@return m3-utils.namespace($prefix, ($tokens, $variant-tokens), $token-slots);
|
|
60
49
|
}
|
|
61
50
|
|
|
62
51
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
63
|
-
@function get-density-tokens($
|
|
64
|
-
$scale: theming.clamp-density(
|
|
52
|
+
@function get-density-tokens($scale) {
|
|
53
|
+
$scale: theming.clamp-density($scale, -4);
|
|
65
54
|
$index: ($scale * -1) + 1;
|
|
66
55
|
|
|
67
56
|
@return (
|
|
68
|
-
container-height: list.nth((48px, 44px, 40px, 36px, 32px), $index),
|
|
57
|
+
tab-container-height: list.nth((48px, 44px, 40px, 36px, 32px), $index),
|
|
69
58
|
);
|
|
70
59
|
}
|
package/tabs/_tabs-theme.scss
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
@use './m3-tabs';
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
5
|
@use '../core/theming/inspection';
|
|
6
|
-
@use '../core/theming/validation';
|
|
7
6
|
@use '../core/typography/typography';
|
|
8
7
|
@use '../core/tokens/token-utils';
|
|
9
8
|
@use 'sass:map';
|
|
@@ -13,67 +12,62 @@
|
|
|
13
12
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
14
13
|
@mixin base($theme) {
|
|
15
14
|
@if inspection.get-theme-version($theme) == 1 {
|
|
16
|
-
@include
|
|
15
|
+
@include token-utils.create-token-values(map.get(m3-tabs.get-tokens($theme), base));
|
|
17
16
|
} @else {
|
|
18
17
|
@include sass-utils.current-selector-or-root() {
|
|
19
|
-
@include token-utils.create-token-values-mixed(
|
|
20
|
-
m2-tabs.$prefix, m2-tabs.get-unthemable-tokens());
|
|
18
|
+
@include token-utils.create-token-values-mixed(m2-tabs.get-unthemable-tokens());
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
/// Outputs color theme styles for the mat-tab.
|
|
26
24
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
27
|
-
/// @param {
|
|
28
|
-
|
|
29
|
-
/// tertiary, or error (If not specified, default primary color will be used).
|
|
30
|
-
@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) {
|
|
31
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
32
|
-
@include
|
|
28
|
+
@include token-utils.create-token-values(
|
|
29
|
+
map.get(m3-tabs.get-tokens($theme, $color-variant), color));
|
|
33
30
|
} @else {
|
|
34
31
|
.mat-mdc-tab-group,
|
|
35
32
|
.mat-mdc-tab-nav-bar {
|
|
36
33
|
@include token-utils.create-token-values-mixed(
|
|
37
|
-
m2-tabs
|
|
38
|
-
$exclude: (background-color, foreground-color)));
|
|
34
|
+
m2-tabs.get-color-tokens($theme, primary,
|
|
35
|
+
$exclude: (tab-background-color, tab-foreground-color)));
|
|
39
36
|
|
|
40
37
|
&.mat-accent {
|
|
41
38
|
@include token-utils.create-token-values-mixed(
|
|
42
|
-
m2-tabs
|
|
43
|
-
$exclude: (background-color, foreground-color)));
|
|
39
|
+
m2-tabs.get-color-tokens($theme, accent,
|
|
40
|
+
$exclude: (tab-background-color, tab-foreground-color)));
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
&.mat-warn {
|
|
47
44
|
@include token-utils.create-token-values-mixed(
|
|
48
|
-
m2-tabs
|
|
49
|
-
$exclude: (background-color, foreground-color)));
|
|
45
|
+
m2-tabs.get-color-tokens($theme, warn,
|
|
46
|
+
$exclude: (tab-background-color, tab-foreground-color)));
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
&.mat-background-primary {
|
|
53
50
|
$tokens: m2-tabs.get-color-tokens($theme, primary);
|
|
54
|
-
@include token-utils.create-token-values-mixed(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
));
|
|
51
|
+
@include token-utils.create-token-values-mixed((
|
|
52
|
+
tab-background-color: map.get($tokens, background-color),
|
|
53
|
+
tab-foreground-color: map.get($tokens, foreground-color)
|
|
54
|
+
));
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
&.mat-background-accent {
|
|
62
58
|
$tokens: m2-tabs.get-color-tokens($theme, accent);
|
|
63
|
-
@include token-utils.create-token-values-mixed(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
));
|
|
59
|
+
@include token-utils.create-token-values-mixed((
|
|
60
|
+
tab-background-color: map.get($tokens, background-color),
|
|
61
|
+
tab-foreground-color: map.get($tokens, foreground-color),
|
|
62
|
+
));
|
|
68
63
|
}
|
|
69
64
|
|
|
70
65
|
&.mat-background-warn {
|
|
71
66
|
$tokens: m2-tabs.get-color-tokens($theme, warn);
|
|
72
|
-
@include token-utils.create-token-values-mixed(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
));
|
|
67
|
+
@include token-utils.create-token-values-mixed((
|
|
68
|
+
tab-background-color: map.get($tokens, background-color),
|
|
69
|
+
tab-foreground-color: map.get($tokens, foreground-color),
|
|
70
|
+
));
|
|
77
71
|
}
|
|
78
72
|
}
|
|
79
73
|
}
|
|
@@ -83,11 +77,10 @@
|
|
|
83
77
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
84
78
|
@mixin typography($theme) {
|
|
85
79
|
@if inspection.get-theme-version($theme) == 1 {
|
|
86
|
-
@include
|
|
80
|
+
@include token-utils.create-token-values(map.get(m3-tabs.get-tokens($theme), typography));
|
|
87
81
|
} @else {
|
|
88
82
|
.mat-mdc-tab-header {
|
|
89
|
-
@include token-utils.create-token-values-mixed(
|
|
90
|
-
m2-tabs.$prefix, m2-tabs.get-typography-tokens($theme));
|
|
83
|
+
@include token-utils.create-token-values-mixed(m2-tabs.get-typography-tokens($theme));
|
|
91
84
|
}
|
|
92
85
|
}
|
|
93
86
|
}
|
|
@@ -96,11 +89,10 @@
|
|
|
96
89
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
97
90
|
@mixin density($theme) {
|
|
98
91
|
@if inspection.get-theme-version($theme) == 1 {
|
|
99
|
-
@include token-utils.create-token-values(m3-tabs
|
|
92
|
+
@include token-utils.create-token-values(map.get(m3-tabs.get-tokens($theme), density));
|
|
100
93
|
} @else {
|
|
101
94
|
.mat-mdc-tab-header {
|
|
102
|
-
@include token-utils.create-token-values-mixed(
|
|
103
|
-
m2-tabs.$prefix, m2-tabs.get-density-tokens($theme));
|
|
95
|
+
@include token-utils.create-token-values-mixed(m2-tabs.get-density-tokens($theme));
|
|
104
96
|
}
|
|
105
97
|
}
|
|
106
98
|
}
|
|
@@ -109,8 +101,8 @@
|
|
|
109
101
|
@function _define-overrides() {
|
|
110
102
|
@return (
|
|
111
103
|
(
|
|
112
|
-
namespace:
|
|
113
|
-
tokens:
|
|
104
|
+
namespace: tab,
|
|
105
|
+
tokens: token-utils.get-overrides(m3-tabs.get-tokens(), tab)
|
|
114
106
|
),
|
|
115
107
|
);
|
|
116
108
|
}
|
|
@@ -118,21 +110,19 @@
|
|
|
118
110
|
/// Outputs the CSS variable values for the given tokens.
|
|
119
111
|
/// @param {Map} $tokens The token values to emit.
|
|
120
112
|
@mixin overrides($tokens: ()) {
|
|
121
|
-
|
|
113
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides());
|
|
122
114
|
}
|
|
123
115
|
|
|
124
116
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-tab.
|
|
125
117
|
/// @param {Map} $theme The theme to generate styles for.
|
|
126
|
-
/// @param {
|
|
127
|
-
|
|
128
|
-
/// tertiary, or error (If not specified, default primary color will be used).
|
|
129
|
-
@mixin theme($theme, $options...) {
|
|
118
|
+
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
119
|
+
@mixin theme($theme, $color-variant: null) {
|
|
130
120
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-tabs') {
|
|
131
121
|
@if inspection.get-theme-version($theme) == 1 {
|
|
132
|
-
@include
|
|
133
|
-
@
|
|
134
|
-
|
|
135
|
-
|
|
122
|
+
@include base($theme);
|
|
123
|
+
@include color($theme, $color-variant);
|
|
124
|
+
@include density($theme);
|
|
125
|
+
@include typography($theme);
|
|
136
126
|
} @else {
|
|
137
127
|
@include base($theme);
|
|
138
128
|
@if inspection.theme-has($theme, color) {
|
|
@@ -147,14 +137,3 @@
|
|
|
147
137
|
}
|
|
148
138
|
}
|
|
149
139
|
}
|
|
150
|
-
|
|
151
|
-
@mixin _theme-from-tokens($tokens, $options...) {
|
|
152
|
-
@include validation.selector-defined(
|
|
153
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
154
|
-
);
|
|
155
|
-
$tabs-tokens: token-utils.get-tokens-for($tokens, m2-tabs.$prefix, $options...);
|
|
156
|
-
$tabs-tokens-without-options: token-utils.get-tokens-for($tokens, m2-tabs.$prefix);
|
|
157
|
-
|
|
158
|
-
@include token-utils.create-token-values(m2-tabs.$prefix, $tabs-tokens-without-options);
|
|
159
|
-
@include token-utils.create-token-values(m2-tabs.$prefix, $tabs-tokens);
|
|
160
|
-
}
|
package/tabs/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { InjectionToken, TemplateRef, OnInit, OnChanges, OnDestroy, SimpleChange
|
|
|
3
3
|
import { M as MatCommonModule } from '../common-module.d-C8xzHJDr.js';
|
|
4
4
|
import { CdkPortal, TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
|
5
5
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
6
|
-
import { FocusableOption, FocusOrigin } from '@angular/cdk/a11y';
|
|
6
|
+
import { FocusKeyManager, FocusableOption, FocusOrigin } from '@angular/cdk/a11y';
|
|
7
7
|
import { Direction } from '@angular/cdk/bidi';
|
|
8
8
|
import { T as ThemePalette } from '../palette.d-BSSFKjO6.js';
|
|
9
9
|
import { b as RippleTarget, f as RippleConfig, R as RippleGlobalOptions } from '../ripple.d-BT30YVLB.js';
|
|
@@ -259,7 +259,7 @@ declare abstract class MatPaginatedTabHeader implements AfterContentChecked, Aft
|
|
|
259
259
|
/** Whether the scroll distance has changed and should be applied after the view is checked. */
|
|
260
260
|
private _scrollDistanceChanged;
|
|
261
261
|
/** Used to manage focus between the tabs. */
|
|
262
|
-
|
|
262
|
+
protected _keyManager: FocusKeyManager<MatPaginatedTabHeaderItem> | undefined;
|
|
263
263
|
/** Cached text content of the header. */
|
|
264
264
|
private _currentTextContent;
|
|
265
265
|
/** Stream that will stop the automated scrolling. */
|
|
@@ -729,6 +729,7 @@ declare class MatTabChangeEvent {
|
|
|
729
729
|
* Provides anchored navigation with animated ink bar.
|
|
730
730
|
*/
|
|
731
731
|
declare class MatTabNav extends MatPaginatedTabHeader implements AfterContentInit, AfterViewInit {
|
|
732
|
+
_focusedItem: i0.WritableSignal<MatPaginatedTabHeaderItem | null>;
|
|
732
733
|
/** Whether the ink bar should fit its width to the size of the tab label content. */
|
|
733
734
|
get fitInkBarToContent(): boolean;
|
|
734
735
|
set fitInkBarToContent(value: boolean);
|
|
@@ -779,6 +780,7 @@ declare class MatTabNav extends MatPaginatedTabHeader implements AfterContentIni
|
|
|
779
780
|
/** Notifies the component that the active link has been changed. */
|
|
780
781
|
updateActiveLink(): void;
|
|
781
782
|
_getRole(): string | null;
|
|
783
|
+
_hasFocus(link: MatTabLink): boolean;
|
|
782
784
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatTabNav, never>;
|
|
783
785
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatTabNav, "[mat-tab-nav-bar]", ["matTabNavBar", "matTabNav"], { "fitInkBarToContent": { "alias": "fitInkBarToContent"; "required": false; }; "stretchTabs": { "alias": "mat-stretch-tabs"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabPanel": { "alias": "tabPanel"; "required": false; }; }, {}, ["_items"], ["*"], true, never>;
|
|
784
786
|
static ngAcceptInputType_fitInkBarToContent: unknown;
|
|
@@ -795,6 +797,7 @@ declare class MatTabLink extends InkBarItem implements AfterViewInit, OnDestroy,
|
|
|
795
797
|
private readonly _destroyed;
|
|
796
798
|
/** Whether the tab link is active or not. */
|
|
797
799
|
protected _isActive: boolean;
|
|
800
|
+
protected _tabIndex: i0.Signal<number>;
|
|
798
801
|
/** Whether the link is active. */
|
|
799
802
|
get active(): boolean;
|
|
800
803
|
set active(value: boolean);
|
|
@@ -828,7 +831,6 @@ declare class MatTabLink extends InkBarItem implements AfterViewInit, OnDestroy,
|
|
|
828
831
|
_getAriaSelected(): string | null;
|
|
829
832
|
_getAriaCurrent(): string | null;
|
|
830
833
|
_getRole(): string | null;
|
|
831
|
-
_getTabIndex(): number;
|
|
832
834
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatTabLink, never>;
|
|
833
835
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatTabLink, "[mat-tab-link], [matTabLink]", ["matTabLink"], { "active": { "alias": "active"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
834
836
|
static ngAcceptInputType_active: unknown;
|
|
@@ -3,22 +3,19 @@
|
|
|
3
3
|
@use '../core/style/sass-utils';
|
|
4
4
|
@use '../core/style/elevation';
|
|
5
5
|
|
|
6
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
|
-
$prefix: (mat, timepicker);
|
|
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
|
+
timepicker-container-shape: 4px,
|
|
11
|
+
timepicker-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
|
-
container-background-color: inspection.get-theme-color($theme, background, card)
|
|
18
|
+
timepicker-container-background-color: inspection.get-theme-color($theme, background, card)
|
|
22
19
|
);
|
|
23
20
|
}
|
|
24
21
|
|