@angular/material 17.2.0-next.1 → 17.2.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/_index.scss +3 -20
- package/autocomplete/_autocomplete-theme.scss +21 -3
- package/badge/_badge-theme.scss +3 -0
- package/bottom-sheet/_bottom-sheet-theme.scss +3 -0
- package/button/_button-theme.scss +4 -1
- package/button/_fab-theme.scss +3 -0
- package/button/_icon-button-theme.scss +3 -0
- package/button-toggle/_button-toggle-theme.scss +3 -0
- package/card/_card-theme.scss +3 -0
- package/checkbox/_checkbox-theme.scss +3 -0
- package/chips/_chips-theme.scss +10 -1
- package/core/_core-theme.scss +3 -0
- package/core/option/_optgroup-theme.scss +3 -0
- package/core/option/_option-theme.scss +3 -0
- package/core/ripple/_ripple-theme.scss +3 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +3 -0
- package/core/style/_menu-common.scss +5 -18
- package/core/theming/_inspection.scss +2 -1
- package/core/theming/_m2-inspection.scss +2 -1
- package/core/theming/_validation.scss +5 -0
- package/core/tokens/m2/_index.scss +9 -2
- package/core/tokens/m2/mat/_autocomplete.scss +5 -1
- package/core/tokens/m2/mat/_chip.scss +26 -2
- package/core/tokens/m2/mat/_datepicker.scss +10 -1
- package/core/tokens/m2/mat/_legacy-button-toggle.scss +5 -5
- package/core/tokens/m2/mat/_list.scss +44 -0
- package/core/tokens/m2/mat/_menu.scss +9 -0
- package/core/tokens/m2/mat/_paginator.scss +22 -2
- package/core/tokens/m2/mat/_select.scss +15 -2
- package/core/tokens/m2/mat/_sidenav.scss +3 -0
- package/core/tokens/m2/mat/_standard-button-toggle.scss +5 -5
- package/core/tokens/m2/mat/_switch.scss +69 -0
- package/core/tokens/m2/mdc/_chip.scss +26 -26
- package/core/tokens/m2/mdc/_switch.scss +1 -1
- package/core/typography/_all-typography.scss +6 -1
- package/core/typography/_typography.scss +126 -1
- package/datepicker/_datepicker-theme.scss +9 -1
- package/dialog/_dialog-theme.scss +3 -0
- package/divider/_divider-theme.scss +3 -0
- package/esm2022/autocomplete/autocomplete-origin.mjs +3 -3
- package/esm2022/autocomplete/autocomplete-trigger.mjs +3 -3
- package/esm2022/autocomplete/autocomplete.mjs +5 -5
- package/esm2022/autocomplete/module.mjs +4 -4
- package/esm2022/badge/badge-module.mjs +4 -4
- package/esm2022/badge/badge.mjs +6 -6
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +3 -3
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet.mjs +3 -3
- package/esm2022/button/button-base.mjs +6 -6
- package/esm2022/button/button.mjs +6 -6
- package/esm2022/button/fab.mjs +12 -12
- package/esm2022/button/icon-button.mjs +6 -6
- package/esm2022/button/module.mjs +4 -4
- package/esm2022/button-toggle/button-toggle-module.mjs +4 -4
- package/esm2022/button-toggle/button-toggle.mjs +8 -8
- package/esm2022/card/card.mjs +42 -42
- package/esm2022/card/module.mjs +4 -4
- package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
- package/esm2022/checkbox/checkbox.mjs +3 -3
- package/esm2022/checkbox/module.mjs +8 -8
- package/esm2022/chips/chip-action.mjs +3 -3
- package/esm2022/chips/chip-edit-input.mjs +3 -3
- package/esm2022/chips/chip-grid.mjs +3 -3
- package/esm2022/chips/chip-icons.mjs +9 -9
- package/esm2022/chips/chip-input.mjs +3 -3
- package/esm2022/chips/chip-listbox.mjs +3 -3
- package/esm2022/chips/chip-option.mjs +6 -6
- package/esm2022/chips/chip-row.mjs +6 -6
- package/esm2022/chips/chip-set.mjs +3 -3
- package/esm2022/chips/chip.mjs +5 -5
- package/esm2022/chips/module.mjs +4 -4
- package/esm2022/core/common-behaviors/common-module.mjs +4 -4
- package/esm2022/core/datetime/index.mjs +8 -8
- package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
- package/esm2022/core/error/error-options.mjs +6 -6
- package/esm2022/core/internal-form-field/internal-form-field.mjs +3 -3
- package/esm2022/core/line/line.mjs +7 -7
- package/esm2022/core/option/index.mjs +4 -4
- package/esm2022/core/option/optgroup.mjs +3 -3
- package/esm2022/core/option/option.mjs +5 -5
- package/esm2022/core/private/ripple-loader.mjs +3 -3
- package/esm2022/core/ripple/index.mjs +4 -4
- package/esm2022/core/ripple/ripple.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +5 -5
- package/esm2022/datepicker/calendar.mjs +8 -8
- package/esm2022/datepicker/date-range-input-parts.mjs +9 -9
- package/esm2022/datepicker/date-range-input.mjs +3 -3
- package/esm2022/datepicker/date-range-picker.mjs +3 -3
- package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
- package/esm2022/datepicker/date-selection-model.mjs +9 -9
- package/esm2022/datepicker/datepicker-actions.mjs +9 -9
- package/esm2022/datepicker/datepicker-base.mjs +8 -8
- package/esm2022/datepicker/datepicker-input-base.mjs +3 -3
- package/esm2022/datepicker/datepicker-input.mjs +3 -3
- package/esm2022/datepicker/datepicker-intl.mjs +3 -3
- package/esm2022/datepicker/datepicker-module.mjs +4 -4
- package/esm2022/datepicker/datepicker-toggle.mjs +6 -6
- package/esm2022/datepicker/datepicker.mjs +3 -3
- package/esm2022/datepicker/month-view.mjs +3 -3
- package/esm2022/datepicker/multi-year-view.mjs +3 -3
- package/esm2022/datepicker/year-view.mjs +3 -3
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/dialog/dialog-content-directives.mjs +15 -15
- package/esm2022/dialog/dialog.mjs +3 -3
- package/esm2022/dialog/module.mjs +4 -4
- package/esm2022/divider/divider-module.mjs +4 -4
- package/esm2022/divider/divider.mjs +3 -3
- package/esm2022/expansion/accordion.mjs +3 -3
- package/esm2022/expansion/expansion-module.mjs +4 -4
- package/esm2022/expansion/expansion-panel-content.mjs +3 -3
- package/esm2022/expansion/expansion-panel-header.mjs +9 -9
- package/esm2022/expansion/expansion-panel.mjs +6 -6
- package/esm2022/form-field/directives/error.mjs +3 -3
- package/esm2022/form-field/directives/floating-label.mjs +3 -3
- package/esm2022/form-field/directives/hint.mjs +3 -3
- package/esm2022/form-field/directives/label.mjs +3 -3
- package/esm2022/form-field/directives/line-ripple.mjs +3 -3
- package/esm2022/form-field/directives/notched-outline.mjs +3 -3
- package/esm2022/form-field/directives/prefix.mjs +3 -3
- package/esm2022/form-field/directives/suffix.mjs +3 -3
- package/esm2022/form-field/form-field-control.mjs +3 -3
- package/esm2022/form-field/form-field.mjs +6 -6
- package/esm2022/form-field/module.mjs +4 -4
- package/esm2022/grid-list/grid-list-module.mjs +4 -4
- package/esm2022/grid-list/grid-list.mjs +3 -3
- package/esm2022/grid-list/grid-tile.mjs +15 -15
- package/esm2022/icon/icon-module.mjs +4 -4
- package/esm2022/icon/icon-registry.mjs +3 -3
- package/esm2022/icon/icon.mjs +3 -3
- package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
- package/esm2022/input/input.mjs +3 -3
- package/esm2022/input/module.mjs +4 -4
- package/esm2022/list/action-list.mjs +4 -4
- package/esm2022/list/list-base.mjs +6 -6
- package/esm2022/list/list-item-sections.mjs +18 -18
- package/esm2022/list/list-module.mjs +4 -4
- package/esm2022/list/list-option.mjs +3 -3
- package/esm2022/list/list.mjs +7 -7
- package/esm2022/list/nav-list.mjs +4 -4
- package/esm2022/list/selection-list.mjs +7 -7
- package/esm2022/list/subheader.mjs +3 -3
- package/esm2022/menu/menu-content.mjs +3 -3
- package/esm2022/menu/menu-item.mjs +3 -3
- package/esm2022/menu/menu-trigger.mjs +3 -3
- package/esm2022/menu/menu.mjs +5 -5
- package/esm2022/menu/module.mjs +4 -4
- package/esm2022/paginator/module.mjs +4 -4
- package/esm2022/paginator/paginator-intl.mjs +3 -3
- package/esm2022/paginator/paginator.mjs +5 -5
- package/esm2022/progress-bar/module.mjs +4 -4
- package/esm2022/progress-bar/progress-bar.mjs +4 -4
- package/esm2022/progress-spinner/module.mjs +4 -4
- package/esm2022/progress-spinner/progress-spinner.mjs +3 -3
- package/esm2022/radio/module.mjs +4 -4
- package/esm2022/radio/radio.mjs +6 -6
- package/esm2022/select/module.mjs +4 -4
- package/esm2022/select/select.mjs +9 -9
- package/esm2022/sidenav/drawer.mjs +12 -12
- package/esm2022/sidenav/sidenav-module.mjs +4 -4
- package/esm2022/sidenav/sidenav.mjs +12 -12
- package/esm2022/slide-toggle/module.mjs +8 -8
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +3 -3
- package/esm2022/slide-toggle/slide-toggle.mjs +6 -6
- package/esm2022/slider/module.mjs +4 -4
- package/esm2022/slider/slider-input.mjs +6 -6
- package/esm2022/slider/slider-thumb.mjs +3 -3
- package/esm2022/slider/slider.mjs +3 -3
- package/esm2022/snack-bar/module.mjs +4 -4
- package/esm2022/snack-bar/simple-snack-bar.mjs +3 -3
- package/esm2022/snack-bar/snack-bar-container.mjs +3 -3
- package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
- package/esm2022/snack-bar/snack-bar.mjs +3 -3
- package/esm2022/sort/sort-header-intl.mjs +3 -3
- package/esm2022/sort/sort-header.mjs +3 -3
- package/esm2022/sort/sort-module.mjs +4 -4
- package/esm2022/sort/sort.mjs +3 -3
- package/esm2022/stepper/step-content.mjs +3 -3
- package/esm2022/stepper/step-header.mjs +3 -3
- package/esm2022/stepper/step-label.mjs +3 -3
- package/esm2022/stepper/stepper-button.mjs +6 -6
- package/esm2022/stepper/stepper-icon.mjs +3 -3
- package/esm2022/stepper/stepper-intl.mjs +3 -3
- package/esm2022/stepper/stepper-module.mjs +4 -4
- package/esm2022/stepper/stepper.mjs +6 -6
- package/esm2022/table/cell.mjs +21 -21
- package/esm2022/table/module.mjs +4 -4
- package/esm2022/table/row.mjs +21 -21
- package/esm2022/table/table.mjs +6 -6
- package/esm2022/table/text-column.mjs +3 -3
- package/esm2022/tabs/module.mjs +4 -4
- package/esm2022/tabs/paginated-tab-header.mjs +3 -3
- package/esm2022/tabs/tab-body.mjs +6 -6
- package/esm2022/tabs/tab-content.mjs +3 -3
- package/esm2022/tabs/tab-group.mjs +3 -3
- package/esm2022/tabs/tab-header.mjs +3 -3
- package/esm2022/tabs/tab-label-wrapper.mjs +3 -3
- package/esm2022/tabs/tab-label.mjs +3 -3
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +15 -10
- package/esm2022/tabs/tab.mjs +3 -3
- package/esm2022/toolbar/toolbar-module.mjs +4 -4
- package/esm2022/toolbar/toolbar.mjs +6 -6
- package/esm2022/tooltip/module.mjs +4 -4
- package/esm2022/tooltip/tooltip.mjs +6 -6
- package/esm2022/tree/node.mjs +9 -9
- package/esm2022/tree/outlet.mjs +3 -3
- package/esm2022/tree/padding.mjs +3 -3
- package/esm2022/tree/toggle.mjs +3 -3
- package/esm2022/tree/tree-module.mjs +4 -4
- package/esm2022/tree/tree.mjs +3 -3
- package/expansion/_expansion-theme.scss +3 -0
- package/fesm2022/autocomplete.mjs +14 -14
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/button-toggle.mjs +11 -11
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +34 -34
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/checkbox.mjs +14 -14
- package/fesm2022/chips.mjs +45 -45
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +60 -60
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +85 -85
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +25 -25
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/expansion.mjs +25 -25
- package/fesm2022/form-field.mjs +36 -36
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/list.mjs +55 -55
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +17 -17
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +11 -11
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +8 -8
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/select.mjs +12 -12
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +26 -26
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +16 -16
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/tabs.mjs +45 -40
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/tooltip.mjs +10 -10
- package/fesm2022/tree.mjs +25 -25
- package/form-field/_form-field-theme.scss +3 -0
- package/grid-list/_grid-list-theme.scss +3 -0
- package/icon/_icon-theme.scss +3 -0
- package/input/_input-theme.scss +5 -1
- package/list/_list-theme.scss +17 -3
- package/menu/_menu-theme.scss +3 -0
- package/package.json +7 -7
- package/paginator/_paginator-theme.scss +3 -7
- 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/_progress-bar-theme.scss +3 -0
- package/progress-spinner/_progress-spinner-theme.scss +3 -0
- package/radio/_radio-theme.scss +3 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/schematics/ng-generate/mdc-migration/index_bundled.js +981 -568
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/select/_select-theme.scss +9 -20
- package/sidenav/_sidenav-theme.scss +3 -0
- package/slide-toggle/_slide-toggle-theme.scss +23 -7
- package/slider/_slider-theme.scss +3 -0
- package/snack-bar/_snack-bar-theme.scss +3 -0
- package/sort/_sort-theme.scss +3 -0
- package/stepper/_stepper-theme.scss +3 -0
- package/table/_table-theme.scss +3 -0
- package/tabs/_tabs-theme.scss +3 -0
- package/toolbar/_toolbar-theme.scss +3 -0
- package/tooltip/_tooltip-theme.scss +3 -0
- package/tree/_tree-theme.scss +3 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, list);
|
|
6
|
+
|
|
7
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
8
|
+
// but may be in a future version of the theming API.
|
|
9
|
+
@function get-unthemable-tokens() {
|
|
10
|
+
@return (
|
|
11
|
+
// active indicator themable with M3
|
|
12
|
+
active-indicator-color: transparent,
|
|
13
|
+
active-indicator-shape: 0,
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
18
|
+
@function get-color-tokens($theme) {
|
|
19
|
+
@return ();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
23
|
+
@function get-typography-tokens($theme) {
|
|
24
|
+
@return ();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
28
|
+
@function get-density-tokens($theme) {
|
|
29
|
+
@return (
|
|
30
|
+
list-item-leading-icon-start-space: 16px,
|
|
31
|
+
list-item-leading-icon-end-space: 32px,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
36
|
+
// This is used to create token slots.
|
|
37
|
+
@function get-token-slots() {
|
|
38
|
+
@return sass-utils.deep-merge-all(
|
|
39
|
+
get-unthemable-tokens(),
|
|
40
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
41
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
42
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -10,6 +10,14 @@ $prefix: (mat, menu);
|
|
|
10
10
|
@function get-unthemable-tokens() {
|
|
11
11
|
@return (
|
|
12
12
|
container-shape: 4px,
|
|
13
|
+
divider-bottom-spacing: 0,
|
|
14
|
+
divider-top-spacing: 0,
|
|
15
|
+
item-spacing: 16px,
|
|
16
|
+
item-icon-size: 24px,
|
|
17
|
+
item-leading-spacing: 16px,
|
|
18
|
+
item-trailing-spacing: 16px,
|
|
19
|
+
item-with-icon-leading-spacing: 16px,
|
|
20
|
+
item-with-icon-trailing-spacing: 16px,
|
|
13
21
|
);
|
|
14
22
|
}
|
|
15
23
|
|
|
@@ -26,6 +34,7 @@ $prefix: (mat, menu);
|
|
|
26
34
|
item-hover-state-layer-color: $active-state-layer-color,
|
|
27
35
|
item-focus-state-layer-color: $active-state-layer-color,
|
|
28
36
|
container-color: inspection.get-theme-color($theme, background, card),
|
|
37
|
+
divider-color: inspection.get-theme-color($theme, foreground, divider),
|
|
29
38
|
);
|
|
30
39
|
}
|
|
31
40
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
1
2
|
@use 'sass:map';
|
|
3
|
+
@use '@material/textfield' as mdc-textfield;
|
|
4
|
+
@use '@material/density' as mdc-density;
|
|
2
5
|
@use '../../token-utils';
|
|
3
6
|
@use '../../../theming/theming';
|
|
4
7
|
@use '../../../theming/inspection';
|
|
@@ -39,16 +42,33 @@ $prefix: (mat, paginator);
|
|
|
39
42
|
|
|
40
43
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
41
44
|
@function get-density-tokens($theme) {
|
|
42
|
-
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -
|
|
45
|
+
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -5);
|
|
43
46
|
$size-scale: (
|
|
44
47
|
0: 56px,
|
|
45
48
|
-1: 52px,
|
|
46
49
|
-2: 48px,
|
|
47
50
|
-3: 40px,
|
|
51
|
+
-4: 40px,
|
|
52
|
+
-5: 40px,
|
|
48
53
|
);
|
|
54
|
+
$form-field-density-scale: if($density-scale > -4, -4, $density-scale);
|
|
55
|
+
$form-field-height: mdc-density.prop-value(
|
|
56
|
+
$density-config: mdc-textfield.$density-config,
|
|
57
|
+
$density-scale: $form-field-density-scale,
|
|
58
|
+
$property-name: height,
|
|
59
|
+
);
|
|
60
|
+
// We computed the desired height of the form-field using the density configuration. The
|
|
61
|
+
// spec only describes vertical spacing/alignment in non-dense mode. This means that we
|
|
62
|
+
// cannot update the spacing to explicit numbers based on the density scale. Instead, we
|
|
63
|
+
// determine the height reduction and equally subtract it from the default `top` and `bottom`
|
|
64
|
+
// padding that is provided by the Material Design specification.
|
|
65
|
+
$form-field-vertical-deduction: math.div(mdc-textfield.$height - $form-field-height, 2);
|
|
66
|
+
$form-field-vertical-padding: 16px - $form-field-vertical-deduction;
|
|
49
67
|
|
|
50
68
|
@return (
|
|
51
|
-
container-size: map.get($size-scale, $density-scale)
|
|
69
|
+
container-size: map.get($size-scale, $density-scale),
|
|
70
|
+
form-field-container-height: $form-field-height,
|
|
71
|
+
form-field-container-vertical-padding: $form-field-vertical-padding,
|
|
52
72
|
);
|
|
53
73
|
}
|
|
54
74
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../../token-utils';
|
|
2
3
|
@use '../../../theming/inspection';
|
|
4
|
+
@use '../../../theming/theming';
|
|
3
5
|
@use '../../../style/sass-utils';
|
|
6
|
+
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
4
7
|
|
|
5
8
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
9
|
$prefix: (mat, select);
|
|
@@ -8,7 +11,9 @@ $prefix: (mat, select);
|
|
|
8
11
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
9
12
|
// but may be in a future version of the theming API.
|
|
10
13
|
@function get-unthemable-tokens() {
|
|
11
|
-
@return (
|
|
14
|
+
@return (
|
|
15
|
+
container-elevation-shadow: mdc-elevation.elevation-box-shadow(8),
|
|
16
|
+
);
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
@@ -43,7 +48,15 @@ $prefix: (mat, select);
|
|
|
43
48
|
|
|
44
49
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
45
50
|
@function get-density-tokens($theme) {
|
|
46
|
-
|
|
51
|
+
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -2);
|
|
52
|
+
|
|
53
|
+
@return (
|
|
54
|
+
arrow-transform: map.get((
|
|
55
|
+
0: translateY(-8px),
|
|
56
|
+
-1: translateY(-8px),
|
|
57
|
+
-2: none,
|
|
58
|
+
), $density-scale),
|
|
59
|
+
);
|
|
47
60
|
}
|
|
48
61
|
|
|
49
62
|
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
1
2
|
@use 'sass:color';
|
|
2
3
|
@use 'sass:meta';
|
|
3
4
|
@use '../../token-utils';
|
|
@@ -14,6 +15,8 @@ $prefix: (mat, sidenav);
|
|
|
14
15
|
// Currently zero, but it appears to be relevant for M3.
|
|
15
16
|
// See: https://m3.material.io/components/navigation-drawer/overview
|
|
16
17
|
container-shape: 0,
|
|
18
|
+
container-elevation-shadow: mdc-elevation.elevation-box-shadow(16),
|
|
19
|
+
container-width: auto,
|
|
17
20
|
);
|
|
18
21
|
}
|
|
19
22
|
|
|
@@ -52,11 +52,11 @@ $prefix: (mat, standard-button-toggle);
|
|
|
52
52
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
53
53
|
@function get-typography-tokens($theme) {
|
|
54
54
|
@return (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
text-
|
|
55
|
+
label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
56
|
+
label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
57
|
+
label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
58
|
+
label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
59
|
+
label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, switch);
|
|
6
|
+
|
|
7
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
8
|
+
// but may be in a future version of the theming API.
|
|
9
|
+
@function get-unthemable-tokens() {
|
|
10
|
+
@return (
|
|
11
|
+
disabled-selected-handle-opacity: 0.38,
|
|
12
|
+
disabled-unselected-handle-opacity: 0.38,
|
|
13
|
+
|
|
14
|
+
unselected-handle-size: 20px,
|
|
15
|
+
selected-handle-size: 20px,
|
|
16
|
+
pressed-handle-size: 20px,
|
|
17
|
+
with-icon-handle-size: 20px,
|
|
18
|
+
|
|
19
|
+
selected-handle-horizontal-margin: 0,
|
|
20
|
+
selected-with-icon-handle-horizontal-margin: 0,
|
|
21
|
+
selected-pressed-handle-horizontal-margin: 0,
|
|
22
|
+
unselected-handle-horizontal-margin: 0,
|
|
23
|
+
unselected-with-icon-handle-horizontal-margin: 0,
|
|
24
|
+
unselected-pressed-handle-horizontal-margin: 0,
|
|
25
|
+
|
|
26
|
+
// The hidden and visible track represent whichever track is visible or
|
|
27
|
+
// hidden in the ui. This could be the .mdc-switch__track :before or
|
|
28
|
+
// :after depending on whether the switch is selected or unselected.
|
|
29
|
+
//
|
|
30
|
+
// The m2 slide-toggle uses transforms to hide & show the tracks while
|
|
31
|
+
// the m3 slide-toggle uses opacity.
|
|
32
|
+
|
|
33
|
+
visible-track-opacity: 1,
|
|
34
|
+
hidden-track-opacity: 1,
|
|
35
|
+
visible-track-transition: transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1),
|
|
36
|
+
hidden-track-transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1),
|
|
37
|
+
|
|
38
|
+
track-outline-width: 1px,
|
|
39
|
+
track-outline-color: transparent,
|
|
40
|
+
disabled-unselected-track-outline-width: 1px,
|
|
41
|
+
disabled-unselected-track-outline-color: transparent,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
46
|
+
@function get-color-tokens($theme) {
|
|
47
|
+
@return ();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
51
|
+
@function get-typography-tokens($theme) {
|
|
52
|
+
@return ();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
56
|
+
@function get-density-tokens($theme) {
|
|
57
|
+
@return ();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
61
|
+
// This is used to create token slots.
|
|
62
|
+
@function get-token-slots() {
|
|
63
|
+
@return sass-utils.deep-merge-all(
|
|
64
|
+
get-unthemable-tokens(),
|
|
65
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
66
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
67
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -47,6 +47,18 @@ $prefix: (mdc, chip);
|
|
|
47
47
|
disabled-outline-color: transparent,
|
|
48
48
|
// The chip's border color when focused.
|
|
49
49
|
focus-outline-color: transparent,
|
|
50
|
+
// The opacity of the chip's state overlay when hovered.
|
|
51
|
+
hover-state-layer-opacity: 0.04,
|
|
52
|
+
// The opacity of the chip's avatar when disabled.
|
|
53
|
+
with-avatar-disabled-avatar-opacity: 1,
|
|
54
|
+
// The chip's border width when selected.
|
|
55
|
+
flat-selected-outline-width: 0,
|
|
56
|
+
// The opacity of the chip's state overlay when selected and hovered.
|
|
57
|
+
selected-hover-state-layer-opacity: 0.04,
|
|
58
|
+
// The opacity of the chip's trailing icon when it is disabled.
|
|
59
|
+
with-trailing-icon-disabled-trailing-icon-opacity: 1,
|
|
60
|
+
// The opacity of the chip's leading icon when it is disabled.
|
|
61
|
+
with-icon-disabled-icon-opacity: 1,
|
|
50
62
|
// Not used by MDC.
|
|
51
63
|
disabled-label-text-opacity: null,
|
|
52
64
|
// Not used by MDC.
|
|
@@ -60,20 +72,12 @@ $prefix: (mdc, chip);
|
|
|
60
72
|
// Our chips do not have a border.
|
|
61
73
|
flat-outline-width: null,
|
|
62
74
|
// Our chips do not have a border.
|
|
63
|
-
flat-selected-outline-width: null,
|
|
64
|
-
// Our chips do not have a border.
|
|
65
75
|
flat-unselected-outline-width: null,
|
|
66
76
|
// Not used by MDC.
|
|
67
|
-
with-avatar-disabled-avatar-opacity: null,
|
|
68
|
-
// Not used by MDC.
|
|
69
|
-
with-icon-disabled-icon-opacity: null,
|
|
70
|
-
// Not used by MDC.
|
|
71
77
|
with-leading-icon-disabled-leading-icon-opacity: null,
|
|
72
78
|
// Not used by MDC.
|
|
73
79
|
with-leading-icon-leading-icon-size: null,
|
|
74
80
|
// Not used by MDC.
|
|
75
|
-
with-trailing-icon-disabled-trailing-icon-opacity: null,
|
|
76
|
-
// Not used by MDC.
|
|
77
81
|
with-trailing-icon-trailing-icon-size: null,
|
|
78
82
|
// Elevated chips not implemented.
|
|
79
83
|
container-elevation: null,
|
|
@@ -94,8 +98,6 @@ $prefix: (mdc, chip);
|
|
|
94
98
|
// Elevated chips not implemented.
|
|
95
99
|
elevated-pressed-container-elevation: null,
|
|
96
100
|
// Elevated chips not implemented.
|
|
97
|
-
elevated-selected-container-color: null,
|
|
98
|
-
// Elevated chips not implemented.
|
|
99
101
|
elevated-selected-container-elevation: null,
|
|
100
102
|
// Elevated chips not implemented.
|
|
101
103
|
elevated-unselected-container-color: null,
|
|
@@ -103,8 +105,6 @@ $prefix: (mdc, chip);
|
|
|
103
105
|
flat-container-elevation: null,
|
|
104
106
|
// Our chips do not have a border.
|
|
105
107
|
flat-disabled-outline-color: null,
|
|
106
|
-
// Not providing this uses
|
|
107
|
-
flat-disabled-selected-container-color: null,
|
|
108
108
|
// Not used by MDC.
|
|
109
109
|
flat-disabled-selected-container-opacity: null,
|
|
110
110
|
// Unused.
|
|
@@ -142,10 +142,6 @@ $prefix: (mdc, chip);
|
|
|
142
142
|
// Unused.
|
|
143
143
|
hover-label-text-color: null,
|
|
144
144
|
// Unused.
|
|
145
|
-
hover-state-layer-color: null,
|
|
146
|
-
// Unused.
|
|
147
|
-
hover-state-layer-opacity: null,
|
|
148
|
-
// Unused.
|
|
149
145
|
pressed-label-text-color: null,
|
|
150
146
|
// Unused.
|
|
151
147
|
pressed-state-layer-color: null,
|
|
@@ -154,18 +150,8 @@ $prefix: (mdc, chip);
|
|
|
154
150
|
// Unused.
|
|
155
151
|
selected-focus-label-text-color: null,
|
|
156
152
|
// Unused.
|
|
157
|
-
selected-focus-state-layer-color: null,
|
|
158
|
-
// Unused.
|
|
159
|
-
selected-focus-state-layer-opacity: null,
|
|
160
|
-
// Unused.
|
|
161
153
|
selected-hover-label-text-color: null,
|
|
162
154
|
// Unused.
|
|
163
|
-
selected-hover-state-layer-color: null,
|
|
164
|
-
// Unused.
|
|
165
|
-
selected-hover-state-layer-opacity: null,
|
|
166
|
-
// Unused.
|
|
167
|
-
selected-label-text-color: null,
|
|
168
|
-
// Unused.
|
|
169
155
|
selected-pressed-label-text-color: null,
|
|
170
156
|
// Unused.
|
|
171
157
|
selected-pressed-state-layer-color: null,
|
|
@@ -265,14 +251,28 @@ $prefix: (mdc, chip);
|
|
|
265
251
|
disabled-label-text-color: $foreground,
|
|
266
252
|
// The background-color of the chip.
|
|
267
253
|
elevated-container-color: $background,
|
|
254
|
+
// The background-color of the chip when selected.
|
|
255
|
+
elevated-selected-container-color: $background,
|
|
268
256
|
// The background-color of a disabled chip.
|
|
269
257
|
elevated-disabled-container-color: $background,
|
|
258
|
+
// The background color of the chip when disabled and selected.
|
|
259
|
+
flat-disabled-selected-container-color: $background,
|
|
270
260
|
// The color of the focus state layer.
|
|
271
261
|
focus-state-layer-color: $state-layer-color,
|
|
262
|
+
// The color of the hover state layer.
|
|
263
|
+
hover-state-layer-color: $state-layer-color,
|
|
264
|
+
// The color of the chip's state overlay when selected and hovered.
|
|
265
|
+
selected-hover-state-layer-color: $state-layer-color,
|
|
272
266
|
// The opacity of the focus state layer.
|
|
273
267
|
focus-state-layer-opacity: $state-layer-opacity,
|
|
268
|
+
// The color of the chip's state overlay when selected and focused.
|
|
269
|
+
selected-focus-state-layer-color: $state-layer-color,
|
|
270
|
+
// The opacity of the chip's state overlay when selected and focused.
|
|
271
|
+
selected-focus-state-layer-opacity: $state-layer-opacity,
|
|
274
272
|
// The chip text color.
|
|
275
273
|
label-text-color: $foreground,
|
|
274
|
+
// The chip text color when selected.
|
|
275
|
+
selected-label-text-color: $foreground,
|
|
276
276
|
// The icon color of a chip.
|
|
277
277
|
with-icon-icon-color: $foreground,
|
|
278
278
|
// The color of the icon of a disabled chip.
|
|
@@ -18,7 +18,7 @@ $prefix: (mdc, switch);
|
|
|
18
18
|
@function get-unthemable-tokens() {
|
|
19
19
|
@return (
|
|
20
20
|
// Opacity of handle when disabled.
|
|
21
|
-
disabled-handle-opacity:
|
|
21
|
+
disabled-handle-opacity: null,
|
|
22
22
|
// Opacity of icon when disabled and selected.
|
|
23
23
|
disabled-selected-icon-opacity: 0.38,
|
|
24
24
|
// Opacity of track when disabled.
|
|
@@ -51,7 +51,12 @@
|
|
|
51
51
|
// mixin that is transitively loaded by the `all-theme` file, imports `all-typography` which
|
|
52
52
|
// would then load `all-theme` again. This ultimately results a circular dependency.
|
|
53
53
|
@include badge-theme.typography($theme);
|
|
54
|
-
|
|
54
|
+
// Historically the typography hierarchy styles were included as part of this. We maintain this
|
|
55
|
+
// behavior for M2, but from M3 forward this is not included and should be explicitly @included
|
|
56
|
+
// by the user if desired.
|
|
57
|
+
@if (inspection.get-theme-version($theme) < 1) {
|
|
58
|
+
@include typography.typography-hierarchy($theme);
|
|
59
|
+
}
|
|
55
60
|
@include bottom-sheet-theme.typography($theme);
|
|
56
61
|
@include button-toggle-theme.typography($theme);
|
|
57
62
|
@include divider-theme.typography($theme);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:string';
|
|
1
4
|
@use 'typography-utils';
|
|
2
5
|
@use '../theming/inspection';
|
|
3
6
|
@use './versioning';
|
|
@@ -8,11 +11,133 @@
|
|
|
8
11
|
@forward './definition';
|
|
9
12
|
@forward './versioning';
|
|
10
13
|
|
|
14
|
+
@mixin typography-hierarchy($theme, $selector: '.mat-typography', $back-compat: false) {
|
|
15
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
16
|
+
@include _m3-typography-hierarchy($theme, $selector, $back-compat);
|
|
17
|
+
}
|
|
18
|
+
@else {
|
|
19
|
+
@include _m2-typography-hierarchy($theme, $selector);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@function _get-selector($selectors, $prefix) {
|
|
24
|
+
$result: ();
|
|
25
|
+
@each $selector in $selectors {
|
|
26
|
+
// Don't add "naked" tag selectors, and don't nest prefix selector.
|
|
27
|
+
@if string.index($selector, '.') == 1 {
|
|
28
|
+
$result: list.append($result, $selector, $separator: comma);
|
|
29
|
+
}
|
|
30
|
+
// Don't nest the prefix selector in itself.
|
|
31
|
+
@if $selector != $prefix {
|
|
32
|
+
$result: list.append($result, '#{$prefix} #{$selector}', $separator: comma);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
@return $result;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@mixin _m3-typography-level($theme, $selector-prefix, $level, $selectors, $margin: null) {
|
|
39
|
+
#{_get-selector($selectors, $selector-prefix)} {
|
|
40
|
+
// TODO(mmalerba): When we expose system tokens as CSS vars, we should change this to emit token
|
|
41
|
+
// slots.
|
|
42
|
+
font: inspection.get-theme-typography($theme, $level, font);
|
|
43
|
+
letter-spacing: inspection.get-theme-typography($theme, $level, letter-spacing);
|
|
44
|
+
@if $margin != null {
|
|
45
|
+
margin: 0 0 $margin;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin _m3-typography-hierarchy($theme, $selector-prefix, $add-m2-selectors) {
|
|
51
|
+
$levels: (
|
|
52
|
+
display-large: (
|
|
53
|
+
selectors: ('.mat-display-large', 'h1'),
|
|
54
|
+
m2-selectors: ('.mat-h1', '.mat-headline-1'),
|
|
55
|
+
margin: 0.5em
|
|
56
|
+
),
|
|
57
|
+
display-medium: (
|
|
58
|
+
selectors: ('.mat-display-medium', 'h2'),
|
|
59
|
+
m2-selectors: ('.mat-h2', '.mat-headline-2'),
|
|
60
|
+
margin: 0.5em
|
|
61
|
+
),
|
|
62
|
+
display-small: (
|
|
63
|
+
selectors: ('.mat-display-small', 'h3'),
|
|
64
|
+
m2-selectors: ('.mat-h3', '.mat-headline-3'),
|
|
65
|
+
margin: 0.5em
|
|
66
|
+
),
|
|
67
|
+
headline-large: (
|
|
68
|
+
selectors: ('.mat-headline-large', 'h4'),
|
|
69
|
+
m2-selectors: ('.mat-h4', '.mat-headline-4'),
|
|
70
|
+
margin: 0.5em
|
|
71
|
+
),
|
|
72
|
+
headline-medium: (
|
|
73
|
+
selectors: ('.mat-headline-medium', 'h5'),
|
|
74
|
+
m2-selectors: ('.mat-h5', '.mat-headline-5'),
|
|
75
|
+
margin: 0.5em
|
|
76
|
+
),
|
|
77
|
+
headline-small: (
|
|
78
|
+
selectors: ('.mat-headline-small', 'h6'),
|
|
79
|
+
m2-selectors: ('.mat-h6', '.mat-headline-6'),
|
|
80
|
+
margin: 0.5em
|
|
81
|
+
),
|
|
82
|
+
title-large: (
|
|
83
|
+
selectors: ('.mat-title-large'),
|
|
84
|
+
m2-selectors: ('.mat-subtitle-1'),
|
|
85
|
+
),
|
|
86
|
+
title-medium: (
|
|
87
|
+
selectors: ('.mat-title-medium'),
|
|
88
|
+
m2-selectors: ('.mat-subtitle-2'),
|
|
89
|
+
),
|
|
90
|
+
title-small: (
|
|
91
|
+
selectors: ('.mat-title-small')
|
|
92
|
+
),
|
|
93
|
+
body-large: (
|
|
94
|
+
selectors: ('.mat-body-large', $selector-prefix),
|
|
95
|
+
m2-selectors: ('.mat-body', '.mat-body-strong', '.mat-body-2'),
|
|
96
|
+
),
|
|
97
|
+
body-medium: (
|
|
98
|
+
selectors: ('.mat-body-medium')
|
|
99
|
+
),
|
|
100
|
+
body-small: (
|
|
101
|
+
selectors: ('.mat-body-small')
|
|
102
|
+
),
|
|
103
|
+
label-large: (
|
|
104
|
+
selectors: ('.mat-label-large')
|
|
105
|
+
),
|
|
106
|
+
label-medium: (
|
|
107
|
+
selectors: ('.mat-label-medium')
|
|
108
|
+
),
|
|
109
|
+
label-small: (
|
|
110
|
+
selectors: ('.mat-label-small'),
|
|
111
|
+
m2-selectors: ('.mat-small', '.mat-caption')
|
|
112
|
+
),
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
@each $level, $options in $levels {
|
|
116
|
+
@if $add-m2-selectors {
|
|
117
|
+
$options: map.set($options, selectors,
|
|
118
|
+
list.join(map.get($options, selectors), map.get($options, m2-selectors) or ()));
|
|
119
|
+
}
|
|
120
|
+
$options: map.remove($options, m2-selectors);
|
|
121
|
+
|
|
122
|
+
// Apply styles for the level.
|
|
123
|
+
@include _m3-typography-level($theme, $selector-prefix, $level, $options...);
|
|
124
|
+
|
|
125
|
+
// Also style <p> inside body-large.
|
|
126
|
+
@if $level == body-large {
|
|
127
|
+
#{_get-selector(map.get($options, selectors), $selector-prefix)} {
|
|
128
|
+
p {
|
|
129
|
+
margin: 0 0 0.75em;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
11
136
|
/// Emits baseline typographic styles based on a given config.
|
|
12
137
|
/// @param {Map} $config-or-theme A typography config for an entire theme.
|
|
13
138
|
/// @param {String} $selector Ancestor selector under which native elements, such as h1, will
|
|
14
139
|
/// be styled.
|
|
15
|
-
@mixin typography-hierarchy($theme, $selector
|
|
140
|
+
@mixin _m2-typography-hierarchy($theme, $selector) {
|
|
16
141
|
// Note that it seems redundant to prefix the class rules with the `$selector`, however it's
|
|
17
142
|
// necessary if we want to allow people to overwrite the tag selectors. This is due to
|
|
18
143
|
// selectors like `#{$selector} h1` being more specific than ones like `.mat-title`.
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use '../core/tokens/m2/mat/datepicker' as tokens-mat-datepicker;
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
5
|
@use '../core/theming/inspection';
|
|
6
|
+
@use '../core/theming/validation';
|
|
6
7
|
@use '../core/tokens/token-utils';
|
|
7
8
|
@use '../core/style/sass-utils';
|
|
8
9
|
@use '../core/typography/typography';
|
|
@@ -34,7 +35,12 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
34
35
|
@if inspection.get-theme-version($theme) == 1 {
|
|
35
36
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
36
37
|
}
|
|
37
|
-
@else {
|
|
38
|
+
@else {
|
|
39
|
+
@include sass-utils.current-selector-or-root() {
|
|
40
|
+
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix,
|
|
41
|
+
tokens-mat-datepicker.get-unthemable-tokens());
|
|
42
|
+
}
|
|
43
|
+
}
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
/// Outputs color theme styles for the mat-datepicker.
|
|
@@ -154,6 +160,8 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
163
|
+
@include validation.selector-defined(
|
|
164
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
157
165
|
$mat-datepicker-tokens:
|
|
158
166
|
token-utils.get-tokens-for($tokens, tokens-mat-datepicker.$prefix, $options...);
|
|
159
167
|
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $mat-datepicker-tokens);
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
@use '../core/tokens/token-utils';
|
|
7
7
|
@use '../core/theming/theming';
|
|
8
8
|
@use '../core/theming/inspection';
|
|
9
|
+
@use '../core/theming/validation';
|
|
9
10
|
@use '../core/typography/typography';
|
|
10
11
|
|
|
11
12
|
@mixin base($theme) {
|
|
@@ -76,6 +77,8 @@
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
@mixin _theme-from-tokens($tokens) {
|
|
80
|
+
@include validation.selector-defined(
|
|
81
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
79
82
|
@if ($tokens != ()) {
|
|
80
83
|
@include mdc-dialog-theme.theme(map.get($tokens, tokens-mdc-dialog.$prefix));
|
|
81
84
|
@include token-utils.create-token-values(
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use '../core/style/sass-utils';
|
|
3
3
|
@use '../core/theming/theming';
|
|
4
4
|
@use '../core/theming/inspection';
|
|
5
|
+
@use '../core/theming/validation';
|
|
5
6
|
@use '../core/tokens/token-utils';
|
|
6
7
|
@use '../core/tokens/m2/mat/divider' as tokens-mat-divider;
|
|
7
8
|
|
|
@@ -64,6 +65,8 @@
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
@mixin _theme-from-tokens($tokens) {
|
|
68
|
+
@include validation.selector-defined(
|
|
69
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
67
70
|
@if ($tokens != ()) {
|
|
68
71
|
@include token-utils.create-token-values(
|
|
69
72
|
tokens-mat-divider.$prefix, map.get($tokens, tokens-mat-divider.$prefix));
|
|
@@ -17,10 +17,10 @@ export class MatAutocompleteOrigin {
|
|
|
17
17
|
elementRef) {
|
|
18
18
|
this.elementRef = elementRef;
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
21
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: MatAutocompleteOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
21
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: MatAutocompleteOrigin, isStandalone: true, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], ngImport: i0 }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
|
|
24
24
|
type: Directive,
|
|
25
25
|
args: [{
|
|
26
26
|
selector: '[matAutocompleteOrigin]',
|
|
@@ -779,10 +779,10 @@ export class MatAutocompleteTrigger {
|
|
|
779
779
|
this._trackedModal = null;
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
783
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.
|
|
782
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: MatAutocompleteTrigger, deps: [{ token: i0.ElementRef }, { token: i1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: MAT_AUTOCOMPLETE_SCROLL_STRATEGY }, { token: i2.Directionality, optional: true }, { token: MAT_FORM_FIELD, host: true, optional: true }, { token: DOCUMENT, optional: true }, { token: i3.ViewportRuler }, { token: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
783
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.0", type: MatAutocompleteTrigger, isStandalone: true, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: { autocomplete: ["matAutocomplete", "autocomplete"], position: ["matAutocompletePosition", "position"], connectedTo: ["matAutocompleteConnectedTo", "connectedTo"], autocompleteAttribute: ["autocomplete", "autocompleteAttribute"], autocompleteDisabled: ["matAutocompleteDisabled", "autocompleteDisabled", booleanAttribute] }, host: { listeners: { "focusin": "_handleFocus()", "blur": "_onTouched()", "input": "_handleInput($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick()" }, properties: { "attr.autocomplete": "autocompleteAttribute", "attr.role": "autocompleteDisabled ? null : \"combobox\"", "attr.aria-autocomplete": "autocompleteDisabled ? null : \"list\"", "attr.aria-activedescendant": "(panelOpen && activeOption) ? activeOption.id : null", "attr.aria-expanded": "autocompleteDisabled ? null : panelOpen.toString()", "attr.aria-controls": "(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id", "attr.aria-haspopup": "autocompleteDisabled ? null : \"listbox\"" }, classAttribute: "mat-mdc-autocomplete-trigger" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["matAutocompleteTrigger"], usesOnChanges: true, ngImport: i0 }); }
|
|
784
784
|
}
|
|
785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{
|
|
786
786
|
type: Directive,
|
|
787
787
|
args: [{
|
|
788
788
|
selector: `input[matAutocomplete], textarea[matAutocomplete]`,
|