@angular/material 17.0.0-rc.0 → 17.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/_index.scss +1 -1
- package/button/_button-base.scss +37 -18
- package/button/_button-theme.scss +86 -142
- package/button/_fab-theme.scss +21 -49
- package/button/_icon-button-theme.scss +25 -43
- package/button/index.d.ts +0 -2
- package/chips/index.d.ts +2 -3
- package/core/index.d.ts +2 -3
- package/core/theming/_theming.scss +0 -14
- package/core/tokens/m2/mat/_fab.scss +87 -0
- package/core/tokens/m2/mat/_filled-button.scss +76 -0
- package/core/tokens/m2/mat/_icon-button.scss +73 -0
- package/core/tokens/m2/mat/_outlined-button.scss +73 -0
- package/core/tokens/m2/mat/_protected-button.scss +76 -0
- package/core/tokens/m2/mat/_sort.scss +60 -0
- package/core/tokens/m2/mat/_text-button.scss +73 -0
- package/core/tokens/m2/mat/_tree.scss +62 -0
- package/core/tokens/m2/mdc/_extended-fab.scss +3 -0
- package/core/tokens/m2/mdc/_fab.scss +17 -3
- package/core/tokens/m2/mdc/_filled-button.scss +24 -18
- package/core/tokens/m2/mdc/_icon-button.scss +16 -6
- package/core/tokens/m2/mdc/_outlined-button.scss +120 -0
- package/core/tokens/m2/mdc/_protected-button.scss +24 -19
- package/dialog/index.d.ts +2 -1
- package/divider/_divider-theme.scss +4 -1
- package/esm2022/autocomplete/autocomplete-origin.mjs +4 -4
- package/esm2022/autocomplete/autocomplete-trigger.mjs +4 -4
- package/esm2022/autocomplete/autocomplete.mjs +4 -4
- package/esm2022/autocomplete/module.mjs +5 -5
- package/esm2022/badge/badge-module.mjs +5 -5
- package/esm2022/badge/badge.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
- package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
- package/esm2022/button/button-base.mjs +19 -24
- package/esm2022/button/button.mjs +9 -9
- package/esm2022/button/fab.mjs +17 -17
- package/esm2022/button/icon-button.mjs +9 -9
- package/esm2022/button/module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle.mjs +8 -8
- package/esm2022/card/card.mjs +43 -43
- package/esm2022/card/module.mjs +5 -5
- package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
- package/esm2022/checkbox/checkbox.mjs +5 -5
- package/esm2022/checkbox/module.mjs +9 -9
- package/esm2022/chips/chip-action.mjs +4 -4
- package/esm2022/chips/chip-edit-input.mjs +4 -4
- package/esm2022/chips/chip-grid.mjs +4 -4
- package/esm2022/chips/chip-icons.mjs +10 -10
- package/esm2022/chips/chip-input.mjs +4 -4
- package/esm2022/chips/chip-listbox.mjs +4 -4
- package/esm2022/chips/chip-option.mjs +7 -8
- package/esm2022/chips/chip-row.mjs +8 -9
- package/esm2022/chips/chip-set.mjs +4 -4
- package/esm2022/chips/chip.mjs +6 -7
- package/esm2022/chips/module.mjs +8 -9
- package/esm2022/core/common-behaviors/common-module.mjs +5 -5
- package/esm2022/core/datetime/index.mjs +9 -9
- package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
- package/esm2022/core/error/error-options.mjs +7 -7
- package/esm2022/core/line/line.mjs +8 -8
- package/esm2022/core/option/index.mjs +6 -7
- package/esm2022/core/option/optgroup.mjs +4 -4
- package/esm2022/core/option/option.mjs +8 -9
- package/esm2022/core/private/ripple-loader.mjs +4 -4
- package/esm2022/core/ripple/index.mjs +5 -5
- package/esm2022/core/ripple/ripple.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +5 -5
- package/esm2022/datepicker/calendar.mjs +13 -14
- package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
- package/esm2022/datepicker/date-range-input.mjs +4 -4
- package/esm2022/datepicker/date-range-picker.mjs +4 -4
- package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
- package/esm2022/datepicker/date-selection-model.mjs +10 -10
- package/esm2022/datepicker/datepicker-actions.mjs +10 -10
- package/esm2022/datepicker/datepicker-base.mjs +7 -7
- package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
- package/esm2022/datepicker/datepicker-input.mjs +4 -4
- package/esm2022/datepicker/datepicker-intl.mjs +4 -4
- package/esm2022/datepicker/datepicker-module.mjs +5 -5
- package/esm2022/datepicker/datepicker-toggle.mjs +9 -10
- package/esm2022/datepicker/datepicker.mjs +4 -4
- package/esm2022/datepicker/month-view.mjs +6 -7
- package/esm2022/datepicker/multi-year-view.mjs +4 -4
- package/esm2022/datepicker/year-view.mjs +4 -4
- package/esm2022/dialog/dialog-container.mjs +4 -4
- package/esm2022/dialog/dialog-content-directives.mjs +13 -13
- package/esm2022/dialog/dialog.mjs +4 -4
- package/esm2022/dialog/module.mjs +5 -5
- package/esm2022/divider/divider-module.mjs +5 -5
- package/esm2022/divider/divider.mjs +5 -5
- package/esm2022/expansion/accordion.mjs +4 -4
- package/esm2022/expansion/expansion-module.mjs +7 -8
- package/esm2022/expansion/expansion-panel-content.mjs +4 -4
- package/esm2022/expansion/expansion-panel-header.mjs +11 -12
- package/esm2022/expansion/expansion-panel.mjs +7 -7
- package/esm2022/form-field/directives/error.mjs +4 -4
- package/esm2022/form-field/directives/floating-label.mjs +4 -4
- package/esm2022/form-field/directives/hint.mjs +4 -4
- package/esm2022/form-field/directives/label.mjs +4 -4
- package/esm2022/form-field/directives/line-ripple.mjs +4 -4
- package/esm2022/form-field/directives/notched-outline.mjs +4 -4
- package/esm2022/form-field/directives/prefix.mjs +4 -4
- package/esm2022/form-field/directives/suffix.mjs +4 -4
- package/esm2022/form-field/form-field-control.mjs +4 -4
- package/esm2022/form-field/form-field.mjs +6 -6
- package/esm2022/form-field/module.mjs +5 -5
- package/esm2022/grid-list/grid-list-module.mjs +5 -5
- package/esm2022/grid-list/grid-list.mjs +4 -4
- package/esm2022/grid-list/grid-tile.mjs +16 -16
- package/esm2022/icon/icon-module.mjs +5 -5
- package/esm2022/icon/icon-registry.mjs +4 -4
- package/esm2022/icon/icon.mjs +4 -4
- package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
- package/esm2022/input/input.mjs +4 -4
- package/esm2022/input/module.mjs +5 -5
- package/esm2022/list/action-list.mjs +4 -4
- package/esm2022/list/list-base.mjs +7 -7
- package/esm2022/list/list-item-sections.mjs +19 -19
- package/esm2022/list/list-module.mjs +5 -5
- package/esm2022/list/list-option.mjs +6 -6
- package/esm2022/list/list.mjs +7 -7
- package/esm2022/list/nav-list.mjs +4 -4
- package/esm2022/list/selection-list.mjs +4 -4
- package/esm2022/list/subheader.mjs +4 -4
- package/esm2022/menu/menu-content.mjs +4 -4
- package/esm2022/menu/menu-item.mjs +6 -7
- package/esm2022/menu/menu-trigger.mjs +4 -4
- package/esm2022/menu/menu.mjs +4 -4
- package/esm2022/menu/module.mjs +5 -5
- package/esm2022/paginator/module.mjs +6 -7
- package/esm2022/paginator/paginator-intl.mjs +4 -4
- package/esm2022/paginator/paginator.mjs +10 -11
- package/esm2022/progress-bar/module.mjs +5 -5
- package/esm2022/progress-bar/progress-bar.mjs +4 -4
- package/esm2022/progress-spinner/module.mjs +5 -5
- package/esm2022/progress-spinner/progress-spinner.mjs +4 -4
- package/esm2022/radio/module.mjs +5 -5
- package/esm2022/radio/radio.mjs +8 -8
- package/esm2022/select/module.mjs +5 -5
- package/esm2022/select/select.mjs +9 -9
- package/esm2022/sidenav/drawer.mjs +12 -13
- package/esm2022/sidenav/sidenav-module.mjs +7 -8
- package/esm2022/sidenav/sidenav.mjs +12 -13
- package/esm2022/slide-toggle/module.mjs +10 -11
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
- package/esm2022/slide-toggle/slide-toggle.mjs +5 -6
- package/esm2022/slider/module.mjs +6 -7
- package/esm2022/slider/slider-input.mjs +7 -7
- package/esm2022/slider/slider-thumb.mjs +6 -7
- package/esm2022/slider/slider.mjs +6 -7
- package/esm2022/snack-bar/module.mjs +5 -5
- package/esm2022/snack-bar/simple-snack-bar.mjs +5 -6
- package/esm2022/snack-bar/snack-bar-container.mjs +5 -5
- package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
- package/esm2022/snack-bar/snack-bar.mjs +4 -4
- package/esm2022/sort/sort-header-intl.mjs +4 -4
- package/esm2022/sort/sort-header.mjs +5 -6
- package/esm2022/sort/sort-module.mjs +6 -7
- package/esm2022/sort/sort.mjs +4 -4
- package/esm2022/stepper/step-content.mjs +4 -4
- package/esm2022/stepper/step-header.mjs +5 -5
- package/esm2022/stepper/step-label.mjs +4 -4
- package/esm2022/stepper/stepper-button.mjs +7 -7
- package/esm2022/stepper/stepper-icon.mjs +4 -4
- package/esm2022/stepper/stepper-intl.mjs +4 -4
- package/esm2022/stepper/stepper-module.mjs +5 -5
- package/esm2022/stepper/stepper.mjs +8 -8
- package/esm2022/table/cell.mjs +22 -22
- package/esm2022/table/module.mjs +5 -5
- package/esm2022/table/row.mjs +22 -22
- package/esm2022/table/table.mjs +7 -7
- package/esm2022/table/text-column.mjs +4 -4
- package/esm2022/tabs/module.mjs +5 -5
- package/esm2022/tabs/paginated-tab-header.mjs +4 -4
- package/esm2022/tabs/tab-body.mjs +7 -7
- package/esm2022/tabs/tab-content.mjs +4 -4
- package/esm2022/tabs/tab-group.mjs +6 -6
- package/esm2022/tabs/tab-header.mjs +4 -4
- package/esm2022/tabs/tab-label-wrapper.mjs +4 -4
- package/esm2022/tabs/tab-label.mjs +4 -4
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -10
- package/esm2022/tabs/tab.mjs +4 -4
- package/esm2022/toolbar/toolbar-module.mjs +5 -5
- package/esm2022/toolbar/toolbar.mjs +7 -7
- package/esm2022/tooltip/module.mjs +5 -5
- package/esm2022/tooltip/tooltip.mjs +7 -7
- package/esm2022/tree/node.mjs +10 -10
- package/esm2022/tree/outlet.mjs +4 -4
- package/esm2022/tree/padding.mjs +4 -4
- package/esm2022/tree/toggle.mjs +4 -4
- package/esm2022/tree/tree-module.mjs +5 -5
- package/esm2022/tree/tree.mjs +5 -5
- package/expansion/index.d.ts +4 -5
- package/fesm2022/autocomplete.mjs +13 -13
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +7 -7
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +11 -11
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +54 -59
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +15 -15
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +53 -54
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +59 -60
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +89 -89
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +22 -22
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +8 -8
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +29 -30
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +36 -36
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list.mjs +51 -51
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +23 -23
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +17 -19
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +11 -11
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +12 -12
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +29 -30
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +16 -18
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +22 -24
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +27 -28
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +15 -17
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +33 -33
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +42 -42
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +10 -10
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +26 -26
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +11 -1
- package/package.json +2 -2
- package/paginator/index.d.ts +4 -5
- 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/schematics/migration.json +1 -1
- package/schematics/ng-add/fonts/material-fonts.js +1 -3
- package/schematics/ng-add/fonts/material-fonts.mjs +1 -3
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/mdc-migration/index_bundled.js +1183 -455
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/schematics/ng-update/index_bundled.js +397 -2
- package/schematics/ng-update/index_bundled.js.map +4 -4
- package/sidenav/index.d.ts +3 -4
- package/slide-toggle/index.d.ts +1 -2
- package/slider/index.d.ts +1 -2
- package/sort/_sort-theme.scss +21 -23
- package/sort/index.d.ts +2 -3
- package/tree/_tree-theme.scss +13 -26
- package/button/_button-theme-private.scss +0 -67
- package/core/density/private/_compatibility.scss +0 -74
- package/tree/_tree-variables.scss +0 -14
package/_index.scss
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
@forward './core/style/elevation' show elevation, overridable-elevation, elevation-transition;
|
|
48
48
|
|
|
49
49
|
// Theme bundles
|
|
50
|
-
@forward './core/theming/all-theme' show all-component-themes;
|
|
50
|
+
@forward './core/theming/all-theme' show all-component-themes, all-component-bases;
|
|
51
51
|
@forward './core/color/all-color' show all-component-colors;
|
|
52
52
|
@forward './core/typography/all-typography' show all-component-typographies;
|
|
53
53
|
|
package/button/_button-base.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/touch-target' as mdc-touch-target;
|
|
3
2
|
|
|
3
|
+
@use '../core/tokens/token-utils';
|
|
4
4
|
@use '../core/style/layout-common';
|
|
5
5
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
6
6
|
|
|
@@ -40,11 +40,6 @@
|
|
|
40
40
|
.mat-mdc-button-persistent-ripple::before {
|
|
41
41
|
content: '';
|
|
42
42
|
opacity: 0;
|
|
43
|
-
background-color: var(--mat-mdc-button-persistent-ripple-color);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.mat-ripple-element {
|
|
47
|
-
background-color: var(--mat-mdc-button-ripple-color);
|
|
48
43
|
}
|
|
49
44
|
|
|
50
45
|
// The content should appear over the state and ripple layers, otherwise they may adversely affect
|
|
@@ -63,6 +58,33 @@
|
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
60
|
|
|
61
|
+
@mixin mat-private-button-ripple($prefix, $slots) {
|
|
62
|
+
@include token-utils.use-tokens($prefix, $slots) {
|
|
63
|
+
.mat-ripple-element {
|
|
64
|
+
@include token-utils.create-token-slot(background-color, ripple-color);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.mat-mdc-button-persistent-ripple::before {
|
|
68
|
+
@include token-utils.create-token-slot(background-color, state-layer-color);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:hover .mat-mdc-button-persistent-ripple::before {
|
|
72
|
+
@include token-utils.create-token-slot(opacity, hover-state-layer-opacity);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.cdk-program-focused,
|
|
76
|
+
&.cdk-keyboard-focused {
|
|
77
|
+
.mat-mdc-button-persistent-ripple::before {
|
|
78
|
+
@include token-utils.create-token-slot(opacity, focus-state-layer-opacity);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:active .mat-mdc-button-persistent-ripple::before {
|
|
83
|
+
@include token-utils.create-token-slot(opacity, pressed-state-layer-opacity);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
66
88
|
// MDC's disabled buttons define a default cursor with pointer-events none. However, they select
|
|
67
89
|
// :disabled for this, which does not affect anchor tags.
|
|
68
90
|
// TODO(andrewseguin): Discuss with the MDC team about a mixin we can call for applying this style,
|
|
@@ -76,6 +98,15 @@
|
|
|
76
98
|
}
|
|
77
99
|
}
|
|
78
100
|
|
|
101
|
+
// Hides the touch target on lower densities.
|
|
102
|
+
@mixin mat-private-button-touch-target-density($scale) {
|
|
103
|
+
@include mdc-helpers.if-touch-targets-unsupported($scale) {
|
|
104
|
+
.mat-mdc-button-touch-target {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
79
110
|
@mixin mat-private-button-touch-target($is-square) {
|
|
80
111
|
// Element used to ensure that the button has a touch target that meets the required minimum.
|
|
81
112
|
// Note that we use this, instead of MDC's built-in `mdc-button--touch` class, because the MDC
|
|
@@ -89,15 +120,3 @@
|
|
|
89
120
|
$query: mdc-helpers.$mdc-base-styles-query);
|
|
90
121
|
}
|
|
91
122
|
}
|
|
92
|
-
|
|
93
|
-
// Changes a button token set to exclude the ripple styles.
|
|
94
|
-
@function mat-private-button-remove-ripple($tokens) {
|
|
95
|
-
@return map.merge($tokens, (
|
|
96
|
-
focus-state-layer-color: null,
|
|
97
|
-
focus-state-layer-opacity: null,
|
|
98
|
-
hover-state-layer-color: null,
|
|
99
|
-
hover-state-layer-opacity: null,
|
|
100
|
-
pressed-state-layer-color: null,
|
|
101
|
-
pressed-state-layer-opacity: null,
|
|
102
|
-
));
|
|
103
|
-
}
|
|
@@ -1,168 +1,136 @@
|
|
|
1
1
|
@use '@material/button/button' as mdc-button;
|
|
2
|
-
@use '@material/button/button-theme' as mdc-button-theme;
|
|
3
2
|
@use '@material/button/button-text-theme' as mdc-button-text-theme;
|
|
4
3
|
@use '@material/button/button-filled-theme' as mdc-button-filled-theme;
|
|
5
4
|
@use '@material/button/button-protected-theme' as mdc-button-protected-theme;
|
|
6
5
|
@use '@material/button/button-outlined-theme' as mdc-button-outlined-theme;
|
|
7
|
-
@use '@material/theme/theme-color' as mdc-theme-color;
|
|
8
6
|
@use '@material/elevation/elevation-theme' as mdc-elevation-theme;
|
|
9
7
|
|
|
10
|
-
@use './button-
|
|
8
|
+
@use './button-base';
|
|
11
9
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
12
10
|
@use '../core/theming/theming';
|
|
13
11
|
@use '../core/theming/inspection';
|
|
12
|
+
@use '../core/tokens/token-utils';
|
|
14
13
|
@use '../core/typography/typography';
|
|
15
14
|
@use '../core/tokens/m2/mdc/filled-button' as tokens-mdc-filled-button;
|
|
15
|
+
@use '../core/tokens/m2/mat/filled-button' as tokens-mat-filled-button;
|
|
16
|
+
@use '../core/tokens/m2/mdc/outlined-button' as tokens-mdc-outlined-button;
|
|
17
|
+
@use '../core/tokens/m2/mat/outlined-button' as tokens-mat-outlined-button;
|
|
16
18
|
@use '../core/tokens/m2/mdc/protected-button' as tokens-mdc-protected-button;
|
|
19
|
+
@use '../core/tokens/m2/mat/protected-button' as tokens-mat-protected-button;
|
|
17
20
|
@use '../core/tokens/m2/mdc/text-button' as tokens-mdc-text-button;
|
|
21
|
+
@use '../core/tokens/m2/mat/text-button' as tokens-mat-text-button;
|
|
18
22
|
|
|
19
|
-
@function _on-color($theme, $palette) {
|
|
20
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
21
|
-
@return if(mdc-helpers.variable-safe-contrast-tone($palette, $is-dark) == 'dark', #000, #fff);
|
|
22
|
-
}
|
|
23
23
|
|
|
24
|
-
@mixin
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
@mixin _text-button-variant($theme, $palette) {
|
|
25
|
+
$mdc-tokens: if($palette,
|
|
26
|
+
tokens-mdc-text-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
27
|
+
tokens-mdc-text-button.get-color-tokens($theme)
|
|
28
|
+
);
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
$mat-tokens: if($palette,
|
|
31
|
+
tokens-mat-text-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
32
|
+
tokens-mat-text-button.get-color-tokens($theme)
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
@include mdc-button-text-theme.theme($mdc-tokens);
|
|
36
|
+
@include token-utils.create-token-values(tokens-mat-text-button.$prefix, $mat-tokens);
|
|
32
37
|
}
|
|
33
38
|
|
|
34
|
-
@mixin
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
$primary: mdc-theme-color.prop-value(primary);
|
|
40
|
-
$secondary: mdc-theme-color.prop-value(secondary);
|
|
41
|
-
$error: mdc-theme-color.prop-value(error);
|
|
42
|
-
|
|
43
|
-
.mat-mdc-outlined-button {
|
|
44
|
-
@include mdc-button-outlined-theme.theme((
|
|
45
|
-
outline-color: rgba(mdc-theme-color.prop-value(on-surface), 0.12)
|
|
46
|
-
));
|
|
47
|
-
|
|
48
|
-
&.mat-unthemed {
|
|
49
|
-
@include _outlined-button-variant($on-surface);
|
|
50
|
-
}
|
|
39
|
+
@mixin _filled-button-variant($theme, $palette) {
|
|
40
|
+
$mdc-tokens: if($palette,
|
|
41
|
+
tokens-mdc-filled-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
42
|
+
tokens-mdc-filled-button.get-color-tokens($theme)
|
|
43
|
+
);
|
|
51
44
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
$mat-tokens: if($palette,
|
|
46
|
+
tokens-mat-filled-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
47
|
+
tokens-mat-filled-button.get-color-tokens($theme)
|
|
48
|
+
);
|
|
55
49
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
@include mdc-button-filled-theme.theme($mdc-tokens);
|
|
51
|
+
@include token-utils.create-token-values(tokens-mat-filled-button.$prefix, $mat-tokens);
|
|
52
|
+
}
|
|
59
53
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
@mixin _protected-button-variant($theme, $palette) {
|
|
55
|
+
$mdc-tokens: if($palette,
|
|
56
|
+
tokens-mdc-protected-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
57
|
+
tokens-mdc-protected-button.get-color-tokens($theme)
|
|
58
|
+
);
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
label-text-color: $disabled-ink-color,
|
|
69
|
-
disabled-label-text-color: $disabled-ink-color,
|
|
70
|
-
outline-color: rgba($on-surface, 0.12),
|
|
71
|
-
disabled-outline-color: rgba($on-surface, 0.12),
|
|
72
|
-
));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
60
|
+
$mat-tokens: if($palette,
|
|
61
|
+
tokens-mat-protected-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
62
|
+
tokens-mat-protected-button.get-color-tokens($theme)
|
|
63
|
+
);
|
|
75
64
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
65
|
+
@include mdc-button-protected-theme.theme($mdc-tokens);
|
|
66
|
+
@include token-utils.create-token-values(tokens-mat-protected-button.$prefix, $mat-tokens);
|
|
67
|
+
}
|
|
80
68
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
69
|
+
@mixin _outlined-button-variant($theme, $palette) {
|
|
70
|
+
$mdc-tokens: if($palette,
|
|
71
|
+
tokens-mdc-outlined-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
72
|
+
tokens-mdc-outlined-button.get-color-tokens($theme)
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
$mat-tokens: if($palette,
|
|
76
|
+
tokens-mat-outlined-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
77
|
+
tokens-mat-outlined-button.get-color-tokens($theme)
|
|
78
|
+
);
|
|
85
79
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
$error: inspection.get-theme-color($theme, warn);
|
|
80
|
+
@include mdc-button-outlined-theme.theme($mdc-tokens);
|
|
81
|
+
@include token-utils.create-token-values(tokens-mat-outlined-button.$prefix, $mat-tokens);
|
|
82
|
+
}
|
|
90
83
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
$on-error: _on-color($theme, $error);
|
|
84
|
+
@mixin base($theme) {
|
|
85
|
+
// TODO(mmalerba): Move button base tokens here
|
|
86
|
+
}
|
|
95
87
|
|
|
88
|
+
@mixin color($theme) {
|
|
96
89
|
.mat-mdc-button {
|
|
97
|
-
@include
|
|
90
|
+
@include _text-button-variant($theme, null);
|
|
98
91
|
|
|
99
92
|
&.mat-primary {
|
|
100
|
-
@include
|
|
101
|
-
tokens-mdc-text-button.private-get-color-palette-color-tokens($theme, primary));
|
|
93
|
+
@include _text-button-variant($theme, primary);
|
|
102
94
|
}
|
|
103
95
|
|
|
104
96
|
&.mat-accent {
|
|
105
|
-
@include
|
|
106
|
-
tokens-mdc-text-button.private-get-color-palette-color-tokens($theme, accent));
|
|
97
|
+
@include _text-button-variant($theme, accent);
|
|
107
98
|
}
|
|
108
99
|
|
|
109
100
|
&.mat-warn {
|
|
110
|
-
@include
|
|
111
|
-
tokens-mdc-text-button.private-get-color-palette-color-tokens($theme, warn));
|
|
101
|
+
@include _text-button-variant($theme, warn);
|
|
112
102
|
}
|
|
113
103
|
}
|
|
114
104
|
|
|
115
105
|
.mat-mdc-unelevated-button {
|
|
116
|
-
|
|
117
|
-
$primary-color-tokens: tokens-mdc-filled-button.get-color-tokens($theme, $primary, $on-primary);
|
|
118
|
-
$accent-color-tokens: tokens-mdc-filled-button.get-color-tokens($theme, $accent, $on-accent);
|
|
119
|
-
$warn-color-tokens: tokens-mdc-filled-button.get-color-tokens($theme, $error, $on-error);
|
|
120
|
-
|
|
121
|
-
&.mat-unthemed {
|
|
122
|
-
@include mdc-button-filled-theme.theme($default-color-tokens);
|
|
123
|
-
}
|
|
106
|
+
@include _filled-button-variant($theme, null);
|
|
124
107
|
|
|
125
108
|
&.mat-primary {
|
|
126
|
-
@include
|
|
109
|
+
@include _filled-button-variant($theme, primary);
|
|
127
110
|
}
|
|
128
111
|
|
|
129
112
|
&.mat-accent {
|
|
130
|
-
@include
|
|
113
|
+
@include _filled-button-variant($theme, accent);
|
|
131
114
|
}
|
|
132
115
|
|
|
133
116
|
&.mat-warn {
|
|
134
|
-
@include
|
|
117
|
+
@include _filled-button-variant($theme, warn);
|
|
135
118
|
}
|
|
136
119
|
}
|
|
137
120
|
|
|
138
121
|
.mat-mdc-raised-button {
|
|
139
|
-
|
|
140
|
-
$theme,
|
|
141
|
-
$surface,
|
|
142
|
-
$on-surface
|
|
143
|
-
);
|
|
144
|
-
$primary-color-tokens: tokens-mdc-protected-button.get-color-tokens(
|
|
145
|
-
$theme,
|
|
146
|
-
$primary,
|
|
147
|
-
$on-primary
|
|
148
|
-
);
|
|
149
|
-
$accent-color-tokens: tokens-mdc-protected-button.get-color-tokens($theme, $accent, $on-accent);
|
|
150
|
-
$warn-color-tokens: tokens-mdc-protected-button.get-color-tokens($theme, $error, $on-error);
|
|
151
|
-
|
|
152
|
-
&.mat-unthemed {
|
|
153
|
-
@include mdc-button-protected-theme.theme($default-color-tokens);
|
|
154
|
-
}
|
|
122
|
+
@include _protected-button-variant($theme, null);
|
|
155
123
|
|
|
156
124
|
&.mat-primary {
|
|
157
|
-
@include
|
|
125
|
+
@include _protected-button-variant($theme, primary);
|
|
158
126
|
}
|
|
159
127
|
|
|
160
128
|
&.mat-accent {
|
|
161
|
-
@include
|
|
129
|
+
@include _protected-button-variant($theme, accent);
|
|
162
130
|
}
|
|
163
131
|
|
|
164
132
|
&.mat-warn {
|
|
165
|
-
@include
|
|
133
|
+
@include _protected-button-variant($theme, warn);
|
|
166
134
|
}
|
|
167
135
|
|
|
168
136
|
// TODO(wagnermaciel): Remove this workaround when b/301126527 is resolved
|
|
@@ -179,41 +147,19 @@
|
|
|
179
147
|
}
|
|
180
148
|
}
|
|
181
149
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
$disabled-container-color: rgba($on-surface, 0.12);
|
|
150
|
+
.mat-mdc-outlined-button {
|
|
151
|
+
@include _outlined-button-variant($theme, null);
|
|
185
152
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
.mat-mdc-button {
|
|
189
|
-
@include button-theme-private.apply-disabled-style() {
|
|
190
|
-
@include mdc-button-text-theme.theme((
|
|
191
|
-
disabled-label-text-color: $disabled-ink-color,
|
|
192
|
-
label-text-color: $disabled-ink-color,
|
|
193
|
-
));
|
|
153
|
+
&.mat-primary {
|
|
154
|
+
@include _outlined-button-variant($theme, primary);
|
|
194
155
|
}
|
|
195
|
-
}
|
|
196
156
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
@include mdc-elevation-theme.elevation(0);
|
|
200
|
-
@include mdc-button-protected-theme.theme((
|
|
201
|
-
disabled-container-color: $disabled-container-color,
|
|
202
|
-
disabled-label-text-color: $disabled-ink-color,
|
|
203
|
-
container-color: $disabled-container-color,
|
|
204
|
-
label-text-color: $disabled-ink-color,
|
|
205
|
-
));
|
|
157
|
+
&.mat-accent {
|
|
158
|
+
@include _outlined-button-variant($theme, accent);
|
|
206
159
|
}
|
|
207
|
-
}
|
|
208
160
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
@include mdc-button-filled-theme.theme((
|
|
212
|
-
disabled-container-color: $disabled-container-color,
|
|
213
|
-
disabled-label-text-color: $disabled-ink-color,
|
|
214
|
-
container-color: $disabled-container-color,
|
|
215
|
-
label-text-color: $disabled-ink-color,
|
|
216
|
-
));
|
|
161
|
+
&.mat-warn {
|
|
162
|
+
@include _outlined-button-variant($theme, warn);
|
|
217
163
|
}
|
|
218
164
|
}
|
|
219
165
|
}
|
|
@@ -230,27 +176,25 @@
|
|
|
230
176
|
.mat-mdc-button {
|
|
231
177
|
$density-tokens: tokens-mdc-text-button.get-density-tokens($theme);
|
|
232
178
|
@include mdc-button-text-theme.theme($density-tokens);
|
|
233
|
-
@include button-
|
|
179
|
+
@include button-base.mat-private-button-touch-target-density($density-scale);
|
|
234
180
|
}
|
|
235
181
|
|
|
236
182
|
.mat-mdc-raised-button {
|
|
237
183
|
$density-tokens: tokens-mdc-protected-button.get-density-tokens($theme);
|
|
238
184
|
@include mdc-button-protected-theme.theme($density-tokens);
|
|
239
|
-
@include button-
|
|
185
|
+
@include button-base.mat-private-button-touch-target-density($density-scale);
|
|
240
186
|
}
|
|
241
187
|
|
|
242
188
|
.mat-mdc-unelevated-button {
|
|
243
189
|
$density-tokens: tokens-mdc-filled-button.get-density-tokens($theme);
|
|
244
190
|
@include mdc-button-filled-theme.theme($density-tokens);
|
|
245
|
-
@include button-
|
|
191
|
+
@include button-base.mat-private-button-touch-target-density($density-scale);
|
|
246
192
|
}
|
|
247
193
|
|
|
248
194
|
.mat-mdc-outlined-button {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
@include button-theme-private.touch-target-density($density-scale);
|
|
253
|
-
}
|
|
195
|
+
$density-tokens: tokens-mdc-outlined-button.get-density-tokens($theme);
|
|
196
|
+
@include mdc-button-outlined-theme.theme($density-tokens);
|
|
197
|
+
@include button-base.mat-private-button-touch-target-density($density-scale);
|
|
254
198
|
}
|
|
255
199
|
}
|
|
256
200
|
|
package/button/_fab-theme.scss
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
@use '@material/fab/fab-theme' as mdc-fab-theme;
|
|
3
3
|
@use '@material/fab/extended-fab-theme' as mdc-extended-fab-theme;
|
|
4
4
|
|
|
5
|
-
@use './button-theme-private';
|
|
6
5
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
7
6
|
@use '../core/style/sass-utils';
|
|
8
7
|
@use '../core/theming/theming';
|
|
9
8
|
@use '../core/theming/inspection';
|
|
10
9
|
@use '../core/tokens/m2/mdc/fab' as tokens-mdc-fab;
|
|
11
10
|
@use '../core/tokens/m2/mdc/extended-fab' as tokens-mdc-extended-fab;
|
|
11
|
+
@use '../core/tokens/m2/mat/fab' as tokens-mat-fab;
|
|
12
|
+
@use '../core/tokens/token-utils';
|
|
12
13
|
@use '../core/typography/typography';
|
|
13
14
|
|
|
14
15
|
@mixin base($theme) {
|
|
@@ -21,67 +22,38 @@
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
@mixin _fab-variant($
|
|
25
|
-
$
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
@mixin _fab-variant($theme, $palette) {
|
|
26
|
+
$mdc-tokens: if($palette,
|
|
27
|
+
tokens-mdc-fab.private-get-color-palette-color-tokens($theme, $palette),
|
|
28
|
+
tokens-mdc-fab.get-color-tokens($theme)
|
|
28
29
|
);
|
|
29
|
-
@include mdc-fab-theme.theme($color-tokens);
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
$mat-tokens: if($palette,
|
|
32
|
+
tokens-mat-fab.private-get-color-palette-color-tokens($theme, $palette),
|
|
33
|
+
tokens-mat-fab.get-color-tokens($theme)
|
|
34
|
+
);
|
|
33
35
|
|
|
34
|
-
@
|
|
35
|
-
@
|
|
36
|
+
@include mdc-fab-theme.theme($mdc-tokens);
|
|
37
|
+
@include token-utils.create-token-values(tokens-mat-fab.$prefix, $mat-tokens);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
@mixin color($theme) {
|
|
39
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
40
|
-
|
|
41
|
-
$surface: inspection.get-theme-color($theme, background, card);
|
|
42
|
-
$primary: inspection.get-theme-color($theme, primary);
|
|
43
|
-
$accent: inspection.get-theme-color($theme, accent);
|
|
44
|
-
$warn: inspection.get-theme-color($theme, warn);
|
|
45
|
-
|
|
46
|
-
$on-surface: white-or-black($surface, $is-dark);
|
|
47
|
-
$on-primary: white-or-black($primary, $is-dark);
|
|
48
|
-
$on-accent: white-or-black($accent, $is-dark);
|
|
49
|
-
$on-warn: white-or-black($warn, $is-dark);
|
|
50
|
-
|
|
51
|
-
$disabled: rgba($on-surface, 0.12);
|
|
52
|
-
$on-disabled: rgba($on-surface, if($is-dark, 0.5, 0.38));
|
|
53
|
-
|
|
54
41
|
@include sass-utils.current-selector-or-root() {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// revisited w/ a more holistic solution.
|
|
42
|
+
@include _fab-variant($theme, null);
|
|
43
|
+
|
|
58
44
|
.mat-mdc-fab,
|
|
59
45
|
.mat-mdc-mini-fab {
|
|
60
|
-
|
|
61
|
-
@include
|
|
46
|
+
&.mat-primary {
|
|
47
|
+
@include _fab-variant($theme, primary);
|
|
62
48
|
}
|
|
63
|
-
}
|
|
64
49
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
@include _fab-variant($on-disabled, $disabled);
|
|
50
|
+
&.mat-accent {
|
|
51
|
+
@include _fab-variant($theme, accent);
|
|
68
52
|
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.mat-unthemed {
|
|
72
|
-
@include _fab-variant($on-surface, $surface);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.mat-primary {
|
|
76
|
-
@include _fab-variant($on-primary, $primary);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.mat-accent {
|
|
80
|
-
@include _fab-variant($on-accent, $accent);
|
|
81
|
-
}
|
|
82
53
|
|
|
83
|
-
|
|
84
|
-
|
|
54
|
+
&.mat-warn {
|
|
55
|
+
@include _fab-variant($theme, warn);
|
|
56
|
+
}
|
|
85
57
|
}
|
|
86
58
|
}
|
|
87
59
|
}
|
|
@@ -1,75 +1,57 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
2
|
@use '@material/density/functions' as mdc-density-functions;
|
|
3
3
|
@use '@material/icon-button/icon-button-theme' as mdc-icon-button-theme;
|
|
4
|
-
@use '@material/theme/theme-color' as mdc-theme-color;
|
|
5
4
|
@use '../core/tokens/m2/mdc/icon-button' as tokens-mdc-icon-button;
|
|
5
|
+
@use '../core/tokens/m2/mat/icon-button' as tokens-mat-icon-button;
|
|
6
6
|
|
|
7
|
-
@use '
|
|
7
|
+
@use '../core/style/sass-utils';
|
|
8
|
+
@use './button-base';
|
|
9
|
+
@use '../core/tokens/token-utils';
|
|
8
10
|
@use '../core/theming/theming';
|
|
9
11
|
@use '../core/theming/inspection';
|
|
10
12
|
|
|
11
|
-
$_icon-size: 24px;
|
|
12
13
|
|
|
13
|
-
@mixin
|
|
14
|
-
|
|
15
|
-
--mat-mdc-button-ripple-color: #{rgba($color, 0.1)};
|
|
14
|
+
@mixin base($theme) {
|
|
15
|
+
// TODO(mmalerba): Move icon button base tokens here
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
@
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
@mixin _icon-button-variant($theme, $palette) {
|
|
19
|
+
$mdc-tokens: if($palette,
|
|
20
|
+
tokens-mdc-icon-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
21
|
+
tokens-mdc-icon-button.get-color-tokens($theme)
|
|
22
|
+
);
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
$mat-tokens: if($palette,
|
|
25
|
+
tokens-mat-icon-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
26
|
+
tokens-mat-icon-button.get-color-tokens($theme)
|
|
27
|
+
);
|
|
25
28
|
|
|
26
|
-
@
|
|
27
|
-
|
|
29
|
+
@include mdc-icon-button-theme.theme($mdc-tokens);
|
|
30
|
+
@include token-utils.create-token-values(tokens-mat-icon-button.$prefix, $mat-tokens);
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
@mixin color($theme) {
|
|
31
|
-
$color-tokens: tokens-mdc-icon-button.get-color-tokens($theme);
|
|
32
|
-
$surface: inspection.get-theme-color($theme, background, card);
|
|
33
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
34
|
-
$on-surface: if(_variable-safe-contrast-tone($surface, $is-dark) == 'dark', #000, #fff);
|
|
35
|
-
|
|
36
34
|
.mat-mdc-icon-button {
|
|
37
|
-
@include button-
|
|
38
|
-
@include mdc-icon-button-theme.theme($color-tokens);
|
|
39
|
-
@include _ripple-color($on-surface);
|
|
35
|
+
@include _icon-button-variant($theme, null);
|
|
40
36
|
|
|
41
37
|
&.mat-primary {
|
|
42
|
-
|
|
43
|
-
@include mdc-icon-button-theme.theme((icon-color: $color));
|
|
44
|
-
@include _ripple-color($color);
|
|
38
|
+
@include _icon-button-variant($theme, primary);
|
|
45
39
|
}
|
|
46
40
|
|
|
47
41
|
&.mat-accent {
|
|
48
|
-
|
|
49
|
-
@include mdc-icon-button-theme.theme((icon-color: $color));
|
|
50
|
-
@include _ripple-color($color);
|
|
42
|
+
@include _icon-button-variant($theme, accent);
|
|
51
43
|
}
|
|
52
44
|
|
|
53
45
|
&.mat-warn {
|
|
54
|
-
|
|
55
|
-
@include mdc-icon-button-theme.theme((icon-color: $color));
|
|
56
|
-
@include _ripple-color($color);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@include button-theme-private.apply-disabled-style() {
|
|
60
|
-
$disabled-color: rgba($on-surface, if($is-dark, 0.5, 0.38));
|
|
61
|
-
@include mdc-icon-button-theme.theme((
|
|
62
|
-
icon-color: $disabled-color,
|
|
63
|
-
disabled-icon-color: $disabled-color,
|
|
64
|
-
));
|
|
46
|
+
@include _icon-button-variant($theme, warn);
|
|
65
47
|
}
|
|
66
48
|
}
|
|
67
49
|
}
|
|
68
50
|
|
|
69
|
-
@mixin typography($theme) {
|
|
70
|
-
}
|
|
51
|
+
@mixin typography($theme) {}
|
|
71
52
|
|
|
72
53
|
@mixin density($theme) {
|
|
54
|
+
$icon-size: 24px;
|
|
73
55
|
$density-scale: inspection.get-theme-density($theme);
|
|
74
56
|
// Manually apply the expected density theming, and include the padding
|
|
75
57
|
// as it was applied before
|
|
@@ -100,9 +82,9 @@ $_icon-size: 24px;
|
|
|
100
82
|
// fails validation because the variable is "undefined" in the sass stack.
|
|
101
83
|
width: var(--mdc-icon-button-state-layer-size);
|
|
102
84
|
height: var(--mdc-icon-button-state-layer-size);
|
|
103
|
-
padding: math.div($calculated-size - $
|
|
85
|
+
padding: math.div($calculated-size - $icon-size, 2);
|
|
104
86
|
|
|
105
|
-
@include button-
|
|
87
|
+
@include button-base.mat-private-button-touch-target-density($density-scale);
|
|
106
88
|
}
|
|
107
89
|
}
|
|
108
90
|
|
package/button/index.d.ts
CHANGED
|
@@ -124,8 +124,6 @@ declare class MatButtonBase implements AfterViewInit, OnDestroy {
|
|
|
124
124
|
ngOnDestroy(): void;
|
|
125
125
|
/** Focuses the button. */
|
|
126
126
|
focus(_origin?: FocusOrigin, options?: FocusOptions): void;
|
|
127
|
-
/** Gets whether the button has one of the given attributes. */
|
|
128
|
-
private _hasHostAttributes;
|
|
129
127
|
private _updateRippleDisabled;
|
|
130
128
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonBase, never>;
|
|
131
129
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
|