@angular/material 11.0.4 → 11.1.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/_theming.scss +354 -337
- package/autocomplete/_autocomplete-theme.scss +4 -5
- package/autocomplete/autocomplete.d.ts +7 -1
- package/autocomplete/index.metadata.json +1 -1
- package/autocomplete/testing/autocomplete-harness.d.ts +29 -15
- package/badge/_badge-theme.scss +2 -3
- package/bottom-sheet/_bottom-sheet-theme.scss +4 -5
- package/bundles/material-autocomplete-testing.umd.js +54 -36
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -2
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +31 -9
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +3 -3
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge-testing.umd.js +9 -1
- package/bundles/material-badge-testing.umd.js.map +1 -1
- package/bundles/material-badge-testing.umd.min.js +1 -1
- package/bundles/material-badge-testing.umd.min.js.map +1 -1
- package/bundles/material-badge.umd.js +9 -1
- package/bundles/material-badge.umd.js.map +1 -1
- package/bundles/material-badge.umd.min.js +3 -3
- package/bundles/material-badge.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.js +9 -1
- package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +9 -1
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +1 -1
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-testing.umd.js +9 -1
- package/bundles/material-button-testing.umd.js.map +1 -1
- package/bundles/material-button-testing.umd.min.js +1 -1
- package/bundles/material-button-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.js +9 -1
- package/bundles/material-button-toggle-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +9 -1
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +1 -1
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +17 -5
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +1 -1
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card-testing.umd.js +9 -1
- package/bundles/material-card-testing.umd.js.map +1 -1
- package/bundles/material-card-testing.umd.min.js +1 -1
- package/bundles/material-card-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.js +73 -64
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +2 -2
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +15 -3
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js +2 -2
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips-testing.umd.js +189 -29
- package/bundles/material-chips-testing.umd.js.map +1 -1
- package/bundles/material-chips-testing.umd.min.js +2 -2
- package/bundles/material-chips-testing.umd.min.js.map +1 -1
- package/bundles/material-chips.umd.js +9 -1
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +4 -4
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core-testing.umd.js +14 -3
- package/bundles/material-core-testing.umd.js.map +1 -1
- package/bundles/material-core-testing.umd.min.js +1 -1
- package/bundles/material-core-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +55 -14
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +16 -8
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker-testing.umd.js +24 -12
- package/bundles/material-datepicker-testing.umd.js.map +1 -1
- package/bundles/material-datepicker-testing.umd.min.js +1 -1
- package/bundles/material-datepicker-testing.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +250 -80
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +20 -12
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog-testing.umd.js +9 -1
- package/bundles/material-dialog-testing.umd.js.map +1 -1
- package/bundles/material-dialog-testing.umd.min.js +1 -1
- package/bundles/material-dialog-testing.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +10 -2
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +8 -8
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider-testing.umd.js +9 -1
- package/bundles/material-divider-testing.umd.js.map +1 -1
- package/bundles/material-divider-testing.umd.min.js +2 -2
- package/bundles/material-divider-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion-testing.umd.js +9 -1
- package/bundles/material-expansion-testing.umd.js.map +1 -1
- package/bundles/material-expansion-testing.umd.min.js +1 -1
- package/bundles/material-expansion-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion.umd.js +16 -4
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +6 -6
- package/bundles/material-expansion.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.js +9 -1
- package/bundles/material-form-field-testing-control.umd.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.min.js +1 -1
- package/bundles/material-form-field-testing-control.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +41 -30
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.min.js +3 -3
- package/bundles/material-form-field-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +11 -3
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +2 -2
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.js +15 -5
- package/bundles/material-grid-list-testing.umd.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.min.js +2 -2
- package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +156 -146
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +12 -19
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-icon-testing.umd.js +12 -2
- package/bundles/material-icon-testing.umd.js.map +1 -1
- package/bundles/material-icon-testing.umd.min.js +2 -2
- package/bundles/material-icon-testing.umd.min.js.map +1 -1
- package/bundles/material-icon.umd.js +46 -2
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +3 -3
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-input-testing.umd.js +19 -8
- package/bundles/material-input-testing.umd.js.map +1 -1
- package/bundles/material-input-testing.umd.min.js +1 -1
- package/bundles/material-input-testing.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +9 -1
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +1 -1
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list-testing.umd.js +62 -57
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.min.js +1 -1
- package/bundles/material-list-testing.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +9 -1
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +1 -1
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +94 -67
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -2
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +24 -28
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +3 -3
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.js +50 -34
- package/bundles/material-paginator-testing.umd.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +2 -2
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +9 -1
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +1 -1
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.js +9 -1
- package/bundles/material-progress-bar-testing.umd.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +9 -1
- package/bundles/material-progress-bar.umd.js.map +1 -1
- package/bundles/material-progress-bar.umd.min.js +1 -1
- package/bundles/material-progress-bar.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.js +9 -1
- package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +9 -1
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js +2 -2
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +88 -63
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +2 -2
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +18 -5
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +1 -1
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +73 -51
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -2
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +14 -3
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +5 -5
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.js +175 -28
- package/bundles/material-sidenav-testing.umd.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.min.js +2 -2
- package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +9 -1
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +1 -1
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +9 -1
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +16 -3
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.min.js +3 -3
- package/bundles/material-slide-toggle.umd.min.js.map +1 -1
- package/bundles/material-slider-testing.umd.js +15 -4
- package/bundles/material-slider-testing.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.min.js +2 -2
- package/bundles/material-slider-testing.umd.min.js.map +1 -1
- package/bundles/material-slider.umd.js +9 -1
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-slider.umd.min.js +1 -1
- package/bundles/material-slider.umd.min.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.js +29 -12
- package/bundles/material-snack-bar-testing.umd.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js +2 -2
- package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +20 -2
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +1 -1
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort-testing.umd.js +9 -1
- package/bundles/material-sort-testing.umd.js.map +1 -1
- package/bundles/material-sort-testing.umd.min.js +1 -1
- package/bundles/material-sort-testing.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +9 -1
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +3 -3
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper-testing.umd.js +9 -1
- package/bundles/material-stepper-testing.umd.js.map +1 -1
- package/bundles/material-stepper-testing.umd.min.js +2 -2
- package/bundles/material-stepper-testing.umd.min.js.map +1 -1
- package/bundles/material-stepper.umd.js +16 -3
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-stepper.umd.min.js +3 -3
- package/bundles/material-stepper.umd.min.js.map +1 -1
- package/bundles/material-table-testing.umd.js +26 -17
- package/bundles/material-table-testing.umd.js.map +1 -1
- package/bundles/material-table-testing.umd.min.js +2 -2
- package/bundles/material-table-testing.umd.min.js.map +1 -1
- package/bundles/material-table.umd.js +65 -38
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js +3 -3
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs-testing.umd.js +11 -3
- package/bundles/material-tabs-testing.umd.js.map +1 -1
- package/bundles/material-tabs-testing.umd.min.js +1 -1
- package/bundles/material-tabs-testing.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +10 -2
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +5 -5
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.js +11 -2
- package/bundles/material-toolbar-testing.umd.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.min.js +2 -2
- package/bundles/material-toolbar-testing.umd.min.js.map +1 -1
- package/bundles/material-toolbar.umd.js +9 -1
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.min.js +2 -2
- package/bundles/material-toolbar.umd.min.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.js +9 -1
- package/bundles/material-tooltip-testing.umd.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.min.js +1 -1
- package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +35 -7
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +3 -3
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree-testing.umd.js +10 -2
- package/bundles/material-tree-testing.umd.js.map +1 -1
- package/bundles/material-tree-testing.umd.min.js +1 -1
- package/bundles/material-tree-testing.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +9 -1
- package/bundles/material-tree.umd.js.map +1 -1
- package/bundles/material-tree.umd.min.js +3 -3
- package/bundles/material-tree.umd.min.js.map +1 -1
- package/button/_button-base.scss +2 -2
- package/button/_button-theme.scss +10 -11
- package/button/index.metadata.json +1 -1
- package/button-toggle/_button-toggle-theme.scss +9 -10
- package/card/_card-theme.scss +5 -6
- package/checkbox/_checkbox-theme.scss +2 -3
- package/checkbox/testing/checkbox-harness.d.ts +21 -16
- package/chips/_chips-theme.scss +4 -5
- package/chips/testing/chip-harness-filters.d.ts +11 -3
- package/chips/testing/chip-harness.d.ts +5 -5
- package/chips/testing/chip-list-harness.d.ts +15 -12
- package/chips/testing/chip-listbox-harness.d.ts +34 -0
- package/chips/testing/chip-option-harness.d.ts +29 -0
- package/chips/testing/public-api.d.ts +3 -1
- package/core/_core.scss +6 -6
- package/core/color/_all-color.scss +2 -1
- package/core/datetime/date-formats.d.ts +1 -0
- package/core/density/private/_all-density.scss +34 -0
- package/core/density/{_index.scss → private/_compatibility.scss} +11 -8
- package/core/focus-indicators/_focus-indicators.scss +3 -4
- package/core/index.metadata.json +1 -1
- package/core/option/_optgroup-theme.scss +2 -3
- package/core/option/_option-theme.scss +2 -3
- package/core/option/index.d.ts +1 -0
- package/core/option/optgroup.d.ts +4 -0
- package/core/option/option-parent.d.ts +22 -0
- package/core/option/option.d.ts +2 -14
- package/core/ripple/_ripple.scss +2 -3
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +2 -3
- package/core/style/_elevation.scss +2 -18
- package/core/style/_form-common.scss +2 -2
- package/core/style/_private.scss +40 -0
- package/core/testing/option-harness.d.ts +2 -0
- package/core/theming/_all-theme.scss +3 -2
- package/core/theming/_theming.scss +148 -38
- package/core/typography/_all-typography.scss +1 -1
- package/datepicker/_datepicker-theme.scss +5 -6
- package/datepicker/date-range-input-parts.d.ts +2 -3
- package/datepicker/date-range-input.d.ts +5 -4
- package/datepicker/date-selection-model.d.ts +10 -0
- package/datepicker/datepicker-actions.d.ts +33 -0
- package/datepicker/datepicker-base.d.ts +52 -9
- package/datepicker/datepicker-input-base.d.ts +5 -10
- package/datepicker/datepicker-input.d.ts +9 -8
- package/datepicker/datepicker-toggle.d.ts +4 -2
- package/datepicker/index.metadata.json +1 -1
- package/datepicker/public-api.d.ts +1 -0
- package/dialog/_dialog-theme.scss +4 -5
- package/divider/_divider-theme.scss +2 -3
- package/esm2015/autocomplete/autocomplete-trigger.js +10 -2
- package/esm2015/autocomplete/autocomplete.js +11 -4
- package/esm2015/autocomplete/testing/autocomplete-harness.js +27 -19
- package/esm2015/button/button.js +10 -5
- package/esm2015/checkbox/checkbox.js +8 -3
- package/esm2015/checkbox/testing/checkbox-harness.js +31 -36
- package/esm2015/chips/testing/chip-harness-filters.js +1 -1
- package/esm2015/chips/testing/chip-harness.js +6 -6
- package/esm2015/chips/testing/chip-list-harness.js +19 -16
- package/esm2015/chips/testing/chip-listbox-harness.js +49 -0
- package/esm2015/chips/testing/chip-option-harness.js +54 -0
- package/esm2015/chips/testing/public-api.js +4 -2
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/datetime/date-formats.js +1 -1
- package/esm2015/core/option/index.js +2 -1
- package/esm2015/core/option/optgroup.js +32 -7
- package/esm2015/core/option/option-parent.js +13 -0
- package/esm2015/core/option/option.js +5 -8
- package/esm2015/core/testing/option-harness.js +7 -2
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/date-range-input-parts.js +10 -14
- package/esm2015/datepicker/date-range-input.js +11 -4
- package/esm2015/datepicker/date-range-picker.js +3 -2
- package/esm2015/datepicker/date-selection-model.js +24 -1
- package/esm2015/datepicker/datepicker-actions.js +89 -0
- package/esm2015/datepicker/datepicker-base.js +66 -25
- package/esm2015/datepicker/datepicker-input-base.js +15 -27
- package/esm2015/datepicker/datepicker-input.js +11 -5
- package/esm2015/datepicker/datepicker-module.js +8 -1
- package/esm2015/datepicker/datepicker-toggle.js +7 -10
- package/esm2015/datepicker/datepicker.js +5 -2
- package/esm2015/datepicker/month-view.js +6 -3
- package/esm2015/datepicker/public-api.js +2 -1
- package/esm2015/datepicker/testing/date-range-input-harness.js +4 -4
- package/esm2015/datepicker/testing/datepicker-input-harness.js +3 -3
- package/esm2015/datepicker/testing/datepicker-trigger-harness-base.js +3 -3
- package/esm2015/dialog/dialog-ref.js +2 -2
- package/esm2015/expansion/expansion-panel-header.js +9 -4
- package/esm2015/expansion/expansion-panel.js +1 -1
- package/esm2015/form-field/form-field-animations.js +2 -2
- package/esm2015/form-field/form-field.js +2 -2
- package/esm2015/form-field/testing/form-field-harness.js +14 -9
- package/esm2015/grid-list/public-api.js +3 -2
- package/esm2015/grid-list/testing/grid-list-harness.js +6 -5
- package/esm2015/icon/icon-registry.js +39 -3
- package/esm2015/icon/testing/fake-icon-registry.js +4 -2
- package/esm2015/input/testing/input-harness.js +3 -3
- package/esm2015/input/testing/native-select-harness.js +7 -5
- package/esm2015/list/selection-list.js +1 -1
- package/esm2015/list/testing/list-harness-base.js +5 -4
- package/esm2015/list/testing/list-item-harness-base.js +5 -4
- package/esm2015/list/testing/selection-list-harness.js +8 -5
- package/esm2015/menu/menu-item.js +3 -3
- package/esm2015/menu/menu-trigger.js +15 -25
- package/esm2015/menu/menu.js +2 -2
- package/esm2015/menu/testing/menu-harness.js +44 -32
- package/esm2015/paginator/testing/paginator-harness.js +27 -25
- package/esm2015/radio/radio.js +10 -5
- package/esm2015/radio/testing/radio-harness.js +40 -29
- package/esm2015/select/select.js +6 -3
- package/esm2015/select/testing/select-harness.js +36 -28
- package/esm2015/sidenav/testing/drawer-container-harness.js +41 -0
- package/esm2015/sidenav/testing/drawer-content-harness.js +23 -0
- package/esm2015/sidenav/testing/drawer-harness-filters.js +1 -1
- package/esm2015/sidenav/testing/drawer-harness.js +19 -13
- package/esm2015/sidenav/testing/public-api.js +6 -2
- package/esm2015/sidenav/testing/sidenav-container-harness.js +41 -0
- package/esm2015/sidenav/testing/sidenav-content-harness.js +23 -0
- package/esm2015/sidenav/testing/sidenav-harness.js +4 -4
- package/esm2015/slide-toggle/slide-toggle.js +8 -3
- package/esm2015/slider/testing/slider-harness.js +5 -5
- package/esm2015/snack-bar/snack-bar-container.js +12 -2
- package/esm2015/snack-bar/testing/snack-bar-harness.js +19 -12
- package/esm2015/stepper/step-header.js +8 -3
- package/esm2015/table/table-data-source.js +34 -21
- package/esm2015/table/testing/cell-harness.js +3 -3
- package/esm2015/table/testing/row-harness.js +5 -5
- package/esm2015/table/testing/table-harness.js +8 -8
- package/esm2015/tabs/tab-body.js +3 -3
- package/esm2015/tabs/testing/tab-group-harness.js +3 -3
- package/esm2015/tabs/testing/tab-nav-bar-harness.js +3 -3
- package/esm2015/toolbar/testing/toolbar-harness.js +3 -3
- package/esm2015/tooltip/tooltip.js +28 -7
- package/esm2015/tree/testing/tree-harness.js +2 -2
- package/expansion/_expansion-mixins.scss +11 -0
- package/expansion/_expansion-theme.scss +13 -19
- package/expansion/index.metadata.json +1 -1
- package/fesm2015/autocomplete/testing.js +26 -18
- package/fesm2015/autocomplete/testing.js.map +1 -1
- package/fesm2015/autocomplete.js +19 -5
- package/fesm2015/autocomplete.js.map +1 -1
- package/fesm2015/button.js +9 -4
- package/fesm2015/button.js.map +1 -1
- package/fesm2015/checkbox/testing.js +30 -35
- package/fesm2015/checkbox/testing.js.map +1 -1
- package/fesm2015/checkbox.js +7 -2
- package/fesm2015/checkbox.js.map +1 -1
- package/fesm2015/chips/testing.js +120 -21
- package/fesm2015/chips/testing.js.map +1 -1
- package/fesm2015/core/testing.js +6 -1
- package/fesm2015/core/testing.js.map +1 -1
- package/fesm2015/core.js +45 -13
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker/testing.js +5 -5
- package/fesm2015/datepicker/testing.js.map +1 -1
- package/fesm2015/datepicker.js +275 -116
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog.js +1 -1
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/expansion.js +8 -3
- package/fesm2015/expansion.js.map +1 -1
- package/fesm2015/form-field/testing.js +13 -8
- package/fesm2015/form-field/testing.js.map +1 -1
- package/fesm2015/form-field.js +2 -2
- package/fesm2015/form-field.js.map +1 -1
- package/fesm2015/grid-list/testing.js +5 -4
- package/fesm2015/grid-list/testing.js.map +1 -1
- package/fesm2015/grid-list.js +128 -126
- package/fesm2015/grid-list.js.map +1 -1
- package/fesm2015/icon/testing.js +3 -1
- package/fesm2015/icon/testing.js.map +1 -1
- package/fesm2015/icon.js +38 -2
- package/fesm2015/icon.js.map +1 -1
- package/fesm2015/input/testing.js +7 -5
- package/fesm2015/input/testing.js.map +1 -1
- package/fesm2015/list/testing.js +13 -8
- package/fesm2015/list/testing.js.map +1 -1
- package/fesm2015/list.js.map +1 -1
- package/fesm2015/menu/testing.js +45 -33
- package/fesm2015/menu/testing.js.map +1 -1
- package/fesm2015/menu.js +17 -27
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/paginator/testing.js +26 -24
- package/fesm2015/paginator/testing.js.map +1 -1
- package/fesm2015/paginator.js.map +1 -1
- package/fesm2015/progress-spinner.js.map +1 -1
- package/fesm2015/radio/testing.js +39 -28
- package/fesm2015/radio/testing.js.map +1 -1
- package/fesm2015/radio.js +9 -4
- package/fesm2015/radio.js.map +1 -1
- package/fesm2015/select/testing.js +36 -28
- package/fesm2015/select/testing.js.map +1 -1
- package/fesm2015/select.js +5 -2
- package/fesm2015/select.js.map +1 -1
- package/fesm2015/sidenav/testing.js +139 -15
- package/fesm2015/sidenav/testing.js.map +1 -1
- package/fesm2015/sidenav.js.map +1 -1
- package/fesm2015/slide-toggle.js +7 -2
- package/fesm2015/slide-toggle.js.map +1 -1
- package/fesm2015/slider/testing.js +4 -4
- package/fesm2015/slider/testing.js.map +1 -1
- package/fesm2015/snack-bar/testing.js +18 -11
- package/fesm2015/snack-bar/testing.js.map +1 -1
- package/fesm2015/snack-bar.js +11 -1
- package/fesm2015/snack-bar.js.map +1 -1
- package/fesm2015/stepper.js +7 -2
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/table/testing.js +11 -11
- package/fesm2015/table/testing.js.map +1 -1
- package/fesm2015/table.js +34 -21
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tabs/testing.js +3 -3
- package/fesm2015/tabs/testing.js.map +1 -1
- package/fesm2015/tabs.js +2 -2
- package/fesm2015/tabs.js.map +1 -1
- package/fesm2015/toolbar/testing.js +2 -2
- package/fesm2015/toolbar/testing.js.map +1 -1
- package/fesm2015/tooltip.js +27 -7
- package/fesm2015/tooltip.js.map +1 -1
- package/fesm2015/tree/testing.js +1 -1
- package/fesm2015/tree/testing.js.map +1 -1
- package/form-field/_form-field-fill-theme.scss +4 -5
- package/form-field/_form-field-legacy-theme.scss +5 -6
- package/form-field/_form-field-outline-theme.scss +4 -5
- package/form-field/_form-field-standard-theme.scss +5 -6
- package/form-field/_form-field-theme.scss +8 -9
- package/form-field/index.metadata.json +1 -1
- package/grid-list/_grid-list-theme.scss +2 -3
- package/grid-list/index.metadata.json +1 -1
- package/grid-list/public-api.d.ts +2 -1
- package/icon/_icon-theme.scss +2 -3
- package/icon/icon-registry.d.ts +23 -0
- package/icon/index.metadata.json +1 -1
- package/icon/testing/fake-icon-registry.d.ts +1 -0
- package/icon/testing/index.metadata.json +1 -1
- package/input/_input-theme.scss +3 -4
- package/list/_list-theme.scss +2 -3
- package/list/index.metadata.json +1 -1
- package/list/selection-list.d.ts +6 -1
- package/list/testing/list-harness-base.d.ts +1 -1
- package/list/testing/list-item-harness-base.d.ts +2 -2
- package/list/testing/selection-list-harness.d.ts +2 -1
- package/menu/_menu-theme.scss +4 -5
- package/menu/index.metadata.json +1 -1
- package/menu/menu-trigger.d.ts +1 -3
- package/menu/menu.d.ts +4 -2
- package/menu/testing/menu-harness.d.ts +39 -26
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +7 -8
- package/paginator/testing/paginator-harness.d.ts +32 -19
- 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 +2 -3
- package/progress-spinner/_progress-spinner-theme.scss +2 -3
- package/radio/_radio-theme.scss +2 -3
- package/radio/index.metadata.json +1 -1
- package/radio/radio.d.ts +2 -2
- package/radio/testing/radio-harness.d.ts +39 -24
- package/schematics/ng-add/fonts/material-fonts.js +7 -5
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/setup-project.js +4 -3
- package/select/_select-theme.scss +5 -6
- package/select/index.metadata.json +1 -1
- package/select/testing/select-harness.d.ts +28 -16
- package/sidenav/_sidenav-theme.scss +4 -5
- package/sidenav/testing/drawer-container-harness.d.ts +30 -0
- package/sidenav/testing/drawer-content-harness.d.ts +21 -0
- package/sidenav/testing/drawer-harness-filters.d.ts +6 -0
- package/sidenav/testing/drawer-harness.d.ts +13 -7
- package/sidenav/testing/public-api.d.ts +5 -1
- package/sidenav/testing/sidenav-container-harness.d.ts +30 -0
- package/sidenav/testing/sidenav-content-harness.d.ts +21 -0
- package/sidenav/testing/sidenav-harness.d.ts +3 -3
- package/slide-toggle/_slide-toggle-theme.scss +4 -5
- package/slide-toggle/slide-toggle.d.ts +2 -2
- package/slider/_slider-theme.scss +2 -3
- package/snack-bar/_snack-bar-theme.scss +4 -5
- package/snack-bar/index.metadata.json +1 -1
- package/snack-bar/snack-bar-container.d.ts +5 -0
- package/snack-bar/testing/snack-bar-harness.d.ts +7 -4
- package/sort/_sort-theme.scss +2 -3
- package/stepper/_stepper-theme.scss +7 -8
- package/stepper/step-header.d.ts +2 -2
- package/table/_table-theme.scss +2 -3
- package/table/index.metadata.json +1 -1
- package/table/table-data-source.d.ts +31 -20
- package/table/testing/cell-harness.d.ts +2 -2
- package/tabs/_tabs-common.scss +2 -2
- package/tabs/_tabs-theme.scss +14 -9
- package/tabs/index.metadata.json +1 -1
- package/tabs/tab-body.d.ts +3 -3
- package/toolbar/_toolbar-theme.scss +8 -9
- package/tooltip/_tooltip-theme.scss +2 -3
- package/tooltip/index.metadata.json +1 -1
- package/tooltip/tooltip.d.ts +10 -1
- package/tree/_tree-theme.scss +7 -8
- package/core/density/_all-density.scss +0 -19
- package/core/style/_noop-animation.scss +0 -22
- package/core/theming/_check-duplicate-styles.scss +0 -106
package/_theming.scss
CHANGED
|
@@ -493,7 +493,7 @@ $mat-elevation-color: black !default;
|
|
|
493
493
|
$mat-elevation-opacity: 1 !default;
|
|
494
494
|
|
|
495
495
|
// Prefix for elevation-related selectors.
|
|
496
|
-
$
|
|
496
|
+
$mat-elevation-prefix: 'mat-elevation-z';
|
|
497
497
|
|
|
498
498
|
// Applies the correct css rules to an element to give it the elevation specified by $zValue.
|
|
499
499
|
// The $zValue must be between 0 and 24.
|
|
@@ -510,33 +510,17 @@ $_mat-elevation-prefix: 'mat-elevation-z';
|
|
|
510
510
|
#{map-get(_get-ambient-map($color, $opacity), $zValue)};
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
@mixin _mat-theme-elevation($zValue, $config, $opacity: $mat-elevation-opacity) {
|
|
514
|
-
$foreground: map-get($config, foreground);
|
|
515
|
-
$elevation-color: map-get($foreground, elevation);
|
|
516
|
-
$elevation-color-or-default: if($elevation-color == null, $mat-elevation-color, $elevation-color);
|
|
517
|
-
|
|
518
|
-
@include mat-elevation($zValue, $elevation-color-or-default, $opacity);
|
|
519
|
-
}
|
|
520
|
-
|
|
521
513
|
// Applies the elevation to an element in a manner that allows
|
|
522
514
|
// consumers to override it via the Material elevation classes.
|
|
523
515
|
@mixin mat-overridable-elevation(
|
|
524
516
|
$zValue,
|
|
525
517
|
$color: $mat-elevation-color,
|
|
526
518
|
$opacity: $mat-elevation-opacity) {
|
|
527
|
-
&:not([class*='#{$
|
|
519
|
+
&:not([class*='#{$mat-elevation-prefix}']) {
|
|
528
520
|
@include mat-elevation($zValue, $color, $opacity);
|
|
529
521
|
}
|
|
530
522
|
}
|
|
531
523
|
|
|
532
|
-
@mixin _mat-theme-overridable-elevation($zValue, $config, $opacity: $mat-elevation-opacity) {
|
|
533
|
-
$foreground: map-get($config, foreground);
|
|
534
|
-
$elevation-color: map-get($foreground, elevation);
|
|
535
|
-
$elevation-color-or-default: if($elevation-color == null, $mat-elevation-color, $elevation-color);
|
|
536
|
-
|
|
537
|
-
@include mat-overridable-elevation($zValue, $elevation-color-or-default, $opacity);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
524
|
// Returns a string that can be used as the value for a transition property for elevation.
|
|
541
525
|
// Calling this function directly is useful in situations where a component needs to transition
|
|
542
526
|
// more than one property.
|
|
@@ -562,6 +546,46 @@ $_mat-elevation-prefix: 'mat-elevation-z';
|
|
|
562
546
|
transition: mat-elevation-transition-property-value($duration, $easing);
|
|
563
547
|
}
|
|
564
548
|
|
|
549
|
+
|
|
550
|
+
@mixin mat-private-theme-elevation($zValue, $config, $opacity: $mat-elevation-opacity) {
|
|
551
|
+
$foreground: map-get($config, foreground);
|
|
552
|
+
$elevation-color: map-get($foreground, elevation);
|
|
553
|
+
$elevation-color-or-default: if($elevation-color == null, $mat-elevation-color, $elevation-color);
|
|
554
|
+
|
|
555
|
+
@include mat-elevation($zValue, $elevation-color-or-default, $opacity);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
@mixin mat-private-theme-overridable-elevation($zValue, $config, $opacity: $mat-elevation-opacity) {
|
|
559
|
+
$foreground: map-get($config, foreground);
|
|
560
|
+
$elevation-color: map-get($foreground, elevation);
|
|
561
|
+
$elevation-color-or-default: if($elevation-color == null, $mat-elevation-color, $elevation-color);
|
|
562
|
+
|
|
563
|
+
@include mat-overridable-elevation($zValue, $elevation-color-or-default, $opacity);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
// If the mat-animation-noop class is present on the components root element,
|
|
567
|
+
// prevent non css animations from running.
|
|
568
|
+
// NOTE: Currently this mixin should only be used with components that do not
|
|
569
|
+
// have any projected content.
|
|
570
|
+
@mixin mat-private-animation-noop() {
|
|
571
|
+
// @at-root is used to steps outside of the hierarchy of the scss rules. This is
|
|
572
|
+
// done to allow a class to be added to be added to base of the scss nesting
|
|
573
|
+
// context.
|
|
574
|
+
// For example:
|
|
575
|
+
// .my-root {
|
|
576
|
+
// .my-subclass {
|
|
577
|
+
// @include mat-private-animation-noop();
|
|
578
|
+
// }
|
|
579
|
+
// }
|
|
580
|
+
// results in:
|
|
581
|
+
// ._mat-animation-noopable.my-root .my-subclass { ... }
|
|
582
|
+
@at-root ._mat-animation-noopable#{&} {
|
|
583
|
+
transition: none;
|
|
584
|
+
animation: none;
|
|
585
|
+
@content;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
565
589
|
// Color palettes from the Material Design spec.
|
|
566
590
|
// See https://material.io/design/color/
|
|
567
591
|
//
|
|
@@ -1311,9 +1335,22 @@ $mat-dark-theme-foreground: (
|
|
|
1311
1335
|
);
|
|
1312
1336
|
|
|
1313
1337
|
|
|
1338
|
+
// Whether duplication warnings should be disabled. Warnings enabled by default.
|
|
1339
|
+
$mat-theme-ignore-duplication-warnings: false !default;
|
|
1340
|
+
|
|
1314
1341
|
// Whether density should be generated by default.
|
|
1315
1342
|
$_mat-theme-generate-default-density: true !default;
|
|
1316
1343
|
|
|
1344
|
+
// Warning that will be printed if duplicated styles are generated by a theme.
|
|
1345
|
+
$_mat-theme-duplicate-warning: 'Read more about how style duplication can be avoided in a ' +
|
|
1346
|
+
'dedicated guide. https://github.com/angular/components/blob/master/guides/duplicate-theming-styles.md';
|
|
1347
|
+
|
|
1348
|
+
// These variable are not intended to be overridden externally. They use `!default` to
|
|
1349
|
+
// avoid being reset every time this file is imported.
|
|
1350
|
+
$_mat-theme-emitted-color: () !default;
|
|
1351
|
+
$_mat-theme-emitted-typography: () !default;
|
|
1352
|
+
$_mat-theme-emitted-density: () !default;
|
|
1353
|
+
|
|
1317
1354
|
// For a given hue in a palette, return the contrast color from the map of contrast palettes.
|
|
1318
1355
|
// @param $color-map
|
|
1319
1356
|
// @param $hue
|
|
@@ -1395,31 +1432,6 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
1395
1432
|
@return $theme;
|
|
1396
1433
|
}
|
|
1397
1434
|
|
|
1398
|
-
// Creates a backwards compatible theme. Previously in Angular Material, theme objects
|
|
1399
|
-
// contained the color configuration directly. With the recent refactoring of the theming
|
|
1400
|
-
// system to allow for density and typography configurations, this is no longer the case.
|
|
1401
|
-
// To ensure that constructed themes which will be passed to custom theme mixins do not break,
|
|
1402
|
-
// we copy the color configuration and put its properties at the top-level of the theme object.
|
|
1403
|
-
// Here is an example of a pattern that should still work until it's officially marked as a
|
|
1404
|
-
// breaking change:
|
|
1405
|
-
//
|
|
1406
|
-
// @mixin my-custom-component-theme($theme) {
|
|
1407
|
-
// .my-comp {
|
|
1408
|
-
// background-color: mat-color(map-get($theme, primary));
|
|
1409
|
-
// }
|
|
1410
|
-
// }
|
|
1411
|
-
//
|
|
1412
|
-
// Note that the `$theme.primary` key does usually not exist since the color configuration
|
|
1413
|
-
// is stored in `$theme.color` which contains a property for `primary`. This method copies
|
|
1414
|
-
// the map from `$theme.color` to `$theme` for backwards compatibility.
|
|
1415
|
-
@function _mat-create-backwards-compatibility-theme($theme) {
|
|
1416
|
-
@if not map-get($theme, color) {
|
|
1417
|
-
@return $theme;
|
|
1418
|
-
}
|
|
1419
|
-
$color: map-get($theme, color);
|
|
1420
|
-
@return map-merge($theme, $color);
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
1435
|
// Creates a light-themed color configuration from the specified
|
|
1424
1436
|
// primary, accent and warn palettes.
|
|
1425
1437
|
@function _mat-create-light-color-config($primary, $accent, $warn: null) {
|
|
@@ -1464,7 +1476,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
1464
1476
|
// If the legacy pattern is used, we generate a container object only with a light-themed
|
|
1465
1477
|
// configuration for the `color` theming part.
|
|
1466
1478
|
@if $accent != null {
|
|
1467
|
-
@return
|
|
1479
|
+
@return mat-private-create-backwards-compatibility-theme(_mat-validate-theme((
|
|
1468
1480
|
_is-legacy-theme: true,
|
|
1469
1481
|
color: _mat-create-light-color-config($primary, $accent, $warn),
|
|
1470
1482
|
)));
|
|
@@ -1480,7 +1492,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
1480
1492
|
$warn: map-get($color-settings, warn);
|
|
1481
1493
|
$result: map-merge($result, (color: _mat-create-light-color-config($primary, $accent, $warn)));
|
|
1482
1494
|
}
|
|
1483
|
-
@return
|
|
1495
|
+
@return mat-private-create-backwards-compatibility-theme(_mat-validate-theme($result));
|
|
1484
1496
|
}
|
|
1485
1497
|
|
|
1486
1498
|
// Creates a container object for a dark theme to be given to individual component theme mixins.
|
|
@@ -1501,7 +1513,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
1501
1513
|
// If the legacy pattern is used, we generate a container object only with a dark-themed
|
|
1502
1514
|
// configuration for the `color` theming part.
|
|
1503
1515
|
@if $accent != null {
|
|
1504
|
-
@return
|
|
1516
|
+
@return mat-private-create-backwards-compatibility-theme(_mat-validate-theme((
|
|
1505
1517
|
_is-legacy-theme: true,
|
|
1506
1518
|
color: _mat-create-dark-color-config($primary, $accent, $warn),
|
|
1507
1519
|
)));
|
|
@@ -1517,13 +1529,13 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
1517
1529
|
$warn: map-get($color-settings, warn);
|
|
1518
1530
|
$result: map-merge($result, (color: _mat-create-dark-color-config($primary, $accent, $warn)));
|
|
1519
1531
|
}
|
|
1520
|
-
@return
|
|
1532
|
+
@return mat-private-create-backwards-compatibility-theme(_mat-validate-theme($result));
|
|
1521
1533
|
}
|
|
1522
1534
|
|
|
1523
1535
|
/// Gets the color configuration from the given theme or configuration.
|
|
1524
1536
|
@function mat-get-color-config($theme, $default: null) {
|
|
1525
1537
|
// If a configuration has been passed, return the config directly.
|
|
1526
|
-
@if not
|
|
1538
|
+
@if not mat-private-is-theme-object($theme) {
|
|
1527
1539
|
@return $theme;
|
|
1528
1540
|
}
|
|
1529
1541
|
// If the theme has been constructed through the legacy theming API, we use the theme object
|
|
@@ -1531,7 +1543,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
1531
1543
|
// backwards compatibility, we copied the color configuration from `$theme.color` to `$theme`.
|
|
1532
1544
|
// Hence developers could customize the colors at top-level and want to respect these changes
|
|
1533
1545
|
// TODO: Remove when legacy theming API is removed.
|
|
1534
|
-
@if
|
|
1546
|
+
@if mat-private-is-legacy-constructed-theme($theme) {
|
|
1535
1547
|
@return $theme;
|
|
1536
1548
|
}
|
|
1537
1549
|
@if map-has-key($theme, color) {
|
|
@@ -1543,7 +1555,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
1543
1555
|
/// Gets the density configuration from the given theme or configuration.
|
|
1544
1556
|
@function mat-get-density-config($theme-or-config, $default: 0) {
|
|
1545
1557
|
// If a configuration has been passed, return the config directly.
|
|
1546
|
-
@if not
|
|
1558
|
+
@if not mat-private-is-theme-object($theme-or-config) {
|
|
1547
1559
|
@return $theme-or-config;
|
|
1548
1560
|
}
|
|
1549
1561
|
// In case a theme has been passed, extract the configuration if present,
|
|
@@ -1558,7 +1570,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
1558
1570
|
/// For backwards compatibility, typography is not included by default.
|
|
1559
1571
|
@function mat-get-typography-config($theme-or-config, $default: null) {
|
|
1560
1572
|
// If a configuration has been passed, return the config directly.
|
|
1561
|
-
@if not
|
|
1573
|
+
@if not mat-private-is-theme-object($theme-or-config) {
|
|
1562
1574
|
@return $theme-or-config;
|
|
1563
1575
|
}
|
|
1564
1576
|
// In case a theme has been passed, extract the configuration if present,
|
|
@@ -1569,53 +1581,10 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
1569
1581
|
@return $default;
|
|
1570
1582
|
}
|
|
1571
1583
|
|
|
1572
|
-
// Checks whether the given value resolves to a theme object. Theme objects are always
|
|
1573
|
-
// of type `map` and can optionally only specify `color`, `density` or `typography`.
|
|
1574
|
-
@function _mat-is-theme-object($value) {
|
|
1575
|
-
@return type-of($value) == 'map' and (
|
|
1576
|
-
map-has-key($value, color) or
|
|
1577
|
-
map-has-key($value, density) or
|
|
1578
|
-
map-has-key($value, typography) or
|
|
1579
|
-
length($value) == 0
|
|
1580
|
-
);
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
// Checks whether a given value corresponds to a legacy constructed theme.
|
|
1584
|
-
@function _mat-is-legacy-constructed-theme($value) {
|
|
1585
|
-
@return type-of($value) == 'map' and map-get($value, '_is-legacy-theme');
|
|
1586
|
-
}
|
|
1587
1584
|
|
|
1588
|
-
//
|
|
1589
|
-
//
|
|
1590
|
-
//
|
|
1591
|
-
// the color configuration directly to the theme mixins. This can be still the case if developers
|
|
1592
|
-
// construct a theme manually and pass it to a theme. We support this for backwards compatibility.
|
|
1593
|
-
// TODO(devversion): remove this in the future. Constructing themes manually is rare,
|
|
1594
|
-
// and the code can be easily updated to the new API.
|
|
1595
|
-
@function _mat-legacy-get-theme($theme-or-color-config) {
|
|
1596
|
-
@if _mat-is-theme-object($theme-or-color-config) {
|
|
1597
|
-
@return $theme-or-color-config;
|
|
1598
|
-
}
|
|
1599
|
-
@return _mat-create-backwards-compatibility-theme((
|
|
1600
|
-
_is-legacy-theme: true,
|
|
1601
|
-
color: $theme-or-color-config
|
|
1602
|
-
));
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
// Whether duplication warnings should be disabled. Warnings enabled by default.
|
|
1608
|
-
$mat-theme-ignore-duplication-warnings: false !default;
|
|
1609
|
-
|
|
1610
|
-
// Warning that will be printed if duplicated styles are generated by a theme.
|
|
1611
|
-
$_mat-theme-duplicate-warning: 'Read more about how style duplication can be avoided in a ' +
|
|
1612
|
-
'dedicated guide. https://github.com/angular/components/blob/master/guides/duplicate-theming-styles.md';
|
|
1613
|
-
|
|
1614
|
-
// These variable are not intended to be overridden externally. They use `!default` to
|
|
1615
|
-
// avoid being reset every time this file is imported.
|
|
1616
|
-
$_mat-theme-emitted-color: () !default;
|
|
1617
|
-
$_mat-theme-emitted-typography: () !default;
|
|
1618
|
-
$_mat-theme-emitted-density: () !default;
|
|
1585
|
+
//
|
|
1586
|
+
// Private APIs
|
|
1587
|
+
//
|
|
1619
1588
|
|
|
1620
1589
|
// Checks if configurations that have been declared in the given theme have been generated
|
|
1621
1590
|
// before. If so, warnings will be reported. This should notify developers in case duplicate
|
|
@@ -1629,8 +1598,8 @@ $_mat-theme-emitted-density: () !default;
|
|
|
1629
1598
|
// id. This is necessary because a given theme can be passed to multiple disjoint theme mixins
|
|
1630
1599
|
// (e.g. `angular-material-theme` and `angular-material-mdc-theme`) without causing any
|
|
1631
1600
|
// style duplication.
|
|
1632
|
-
@mixin
|
|
1633
|
-
$theme:
|
|
1601
|
+
@mixin mat-private-check-duplicate-theme-styles($theme-or-color-config, $id) {
|
|
1602
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
1634
1603
|
$color-config: mat-get-color-config($theme);
|
|
1635
1604
|
$density-config: mat-get-density-config($theme);
|
|
1636
1605
|
$typography-config: mat-get-typography-config($theme);
|
|
@@ -1667,7 +1636,7 @@ $_mat-theme-emitted-density: () !default;
|
|
|
1667
1636
|
// Only report a warning if density styles would be duplicated for non-legacy theme
|
|
1668
1637
|
// definitions. For legacy themes, we have compatibility logic that avoids duplication
|
|
1669
1638
|
// of default density styles. We don't want to report a warning in those cases.
|
|
1670
|
-
@if
|
|
1639
|
+
@if mat-private-is-legacy-constructed-theme($theme) {
|
|
1671
1640
|
$duplicate-legacy-density: true;
|
|
1672
1641
|
}
|
|
1673
1642
|
@else if not $mat-theme-ignore-duplication-warnings {
|
|
@@ -1699,14 +1668,72 @@ $_mat-theme-emitted-density: () !default;
|
|
|
1699
1668
|
// styles **once** and at root. This matches the old behavior where density styles were
|
|
1700
1669
|
// part of the base component styles (that did not use view encapsulation).
|
|
1701
1670
|
// TODO: Remove this compatibility logic when the legacy theming API is removed.
|
|
1702
|
-
$
|
|
1703
|
-
$
|
|
1671
|
+
$mat-private-density-generate-at-root: mat-private-is-legacy-constructed-theme($theme) !global;
|
|
1672
|
+
$mat-private-density-generate-styles: not $duplicate-legacy-density !global;
|
|
1704
1673
|
|
|
1705
1674
|
@content;
|
|
1706
1675
|
$mat-theme-ignore-duplication-warnings: $orig-mat-theme-ignore-duplication-warnings !global;
|
|
1707
1676
|
|
|
1708
|
-
$
|
|
1709
|
-
$
|
|
1677
|
+
$mat-private-density-generate-at-root: false !global;
|
|
1678
|
+
$mat-private-density-generate-styles: true !global;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
// Checks whether the given value resolves to a theme object. Theme objects are always
|
|
1682
|
+
// of type `map` and can optionally only specify `color`, `density` or `typography`.
|
|
1683
|
+
@function mat-private-is-theme-object($value) {
|
|
1684
|
+
@return type-of($value) == 'map' and (
|
|
1685
|
+
map-has-key($value, color) or
|
|
1686
|
+
map-has-key($value, density) or
|
|
1687
|
+
map-has-key($value, typography) or
|
|
1688
|
+
length($value) == 0
|
|
1689
|
+
);
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
// Checks whether a given value corresponds to a legacy constructed theme.
|
|
1693
|
+
@function mat-private-is-legacy-constructed-theme($value) {
|
|
1694
|
+
@return type-of($value) == 'map' and map-get($value, '_is-legacy-theme');
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
// Creates a backwards compatible theme. Previously in Angular Material, theme objects
|
|
1698
|
+
// contained the color configuration directly. With the recent refactoring of the theming
|
|
1699
|
+
// system to allow for density and typography configurations, this is no longer the case.
|
|
1700
|
+
// To ensure that constructed themes which will be passed to custom theme mixins do not break,
|
|
1701
|
+
// we copy the color configuration and put its properties at the top-level of the theme object.
|
|
1702
|
+
// Here is an example of a pattern that should still work until it's officially marked as a
|
|
1703
|
+
// breaking change:
|
|
1704
|
+
//
|
|
1705
|
+
// @mixin my-custom-component-theme($theme) {
|
|
1706
|
+
// .my-comp {
|
|
1707
|
+
// background-color: mat-color(map-get($theme, primary));
|
|
1708
|
+
// }
|
|
1709
|
+
// }
|
|
1710
|
+
//
|
|
1711
|
+
// Note that the `$theme.primary` key does usually not exist since the color configuration
|
|
1712
|
+
// is stored in `$theme.color` which contains a property for `primary`. This method copies
|
|
1713
|
+
// the map from `$theme.color` to `$theme` for backwards compatibility.
|
|
1714
|
+
@function mat-private-create-backwards-compatibility-theme($theme) {
|
|
1715
|
+
@if not map-get($theme, color) {
|
|
1716
|
+
@return $theme;
|
|
1717
|
+
}
|
|
1718
|
+
$color: map-get($theme, color);
|
|
1719
|
+
@return map-merge($theme, $color);
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
// Gets the theme from the given value that is either already a theme, or a color configuration.
|
|
1723
|
+
// This handles the legacy case where developers pass a color configuration directly to the
|
|
1724
|
+
// theme mixin. Before we introduced the new pattern for constructing a theme, developers passed
|
|
1725
|
+
// the color configuration directly to the theme mixins. This can be still the case if developers
|
|
1726
|
+
// construct a theme manually and pass it to a theme. We support this for backwards compatibility.
|
|
1727
|
+
// TODO(devversion): remove this in the future. Constructing themes manually is rare,
|
|
1728
|
+
// and the code can be easily updated to the new API.
|
|
1729
|
+
@function mat-private-legacy-get-theme($theme-or-color-config) {
|
|
1730
|
+
@if mat-private-is-theme-object($theme-or-color-config) {
|
|
1731
|
+
@return $theme-or-color-config;
|
|
1732
|
+
}
|
|
1733
|
+
@return mat-private-create-backwards-compatibility-theme((
|
|
1734
|
+
_is-legacy-theme: true,
|
|
1735
|
+
color: $theme-or-color-config
|
|
1736
|
+
));
|
|
1710
1737
|
}
|
|
1711
1738
|
|
|
1712
1739
|
|
|
@@ -1773,8 +1800,8 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
1773
1800
|
}
|
|
1774
1801
|
|
|
1775
1802
|
@mixin mat-ripple-theme($theme-or-color-config) {
|
|
1776
|
-
$theme:
|
|
1777
|
-
@include
|
|
1803
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
1804
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-ripple') {
|
|
1778
1805
|
$color: mat-get-color-config($theme);
|
|
1779
1806
|
@if $color != null {
|
|
1780
1807
|
@include mat-ripple-color($color);
|
|
@@ -1783,7 +1810,6 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
1783
1810
|
}
|
|
1784
1811
|
|
|
1785
1812
|
|
|
1786
|
-
|
|
1787
1813
|
// This mixin ensures an element spans to fill the nearest ancestor with defined positioning.
|
|
1788
1814
|
@mixin mat-fill {
|
|
1789
1815
|
top: 0;
|
|
@@ -1903,8 +1929,8 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
1903
1929
|
@include _mat-strong-focus-indicators-border-color($theme-or-color);
|
|
1904
1930
|
}
|
|
1905
1931
|
@else {
|
|
1906
|
-
$theme:
|
|
1907
|
-
@include
|
|
1932
|
+
$theme: mat-private-legacy-get-theme($theme-or-color);
|
|
1933
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-strong-focus-indicators') {
|
|
1908
1934
|
$color: mat-get-color-config($theme);
|
|
1909
1935
|
@if $color != null {
|
|
1910
1936
|
@include mat-strong-focus-indicators-color($color);
|
|
@@ -1916,7 +1942,7 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
1916
1942
|
// Mixin that ensures focus indicator host elements are positioned so that the focus indicator
|
|
1917
1943
|
// pseudo element within is positioned relative to the host. Private mixin included within
|
|
1918
1944
|
// `mat-core`.
|
|
1919
|
-
@mixin
|
|
1945
|
+
@mixin mat-private-strong-focus-indicators-positioning() {
|
|
1920
1946
|
.mat-focus-indicator {
|
|
1921
1947
|
position: relative;
|
|
1922
1948
|
}
|
|
@@ -1924,7 +1950,6 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
1924
1950
|
|
|
1925
1951
|
|
|
1926
1952
|
|
|
1927
|
-
|
|
1928
1953
|
// Utility for fetching a nested value from a typography config.
|
|
1929
1954
|
@function _mat-get-type-value($config, $level, $name) {
|
|
1930
1955
|
@return map-get(map-get($config, $level), $name);
|
|
@@ -2058,8 +2083,8 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
2058
2083
|
@mixin _mat-option-density($config-or-theme) {}
|
|
2059
2084
|
|
|
2060
2085
|
@mixin mat-option-theme($theme-or-color-config) {
|
|
2061
|
-
$theme:
|
|
2062
|
-
@include
|
|
2086
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
2087
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-option') {
|
|
2063
2088
|
$color: mat-get-color-config($theme);
|
|
2064
2089
|
$density: mat-get-density-config($theme);
|
|
2065
2090
|
$typography: mat-get-typography-config($theme);
|
|
@@ -2080,7 +2105,6 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
2080
2105
|
|
|
2081
2106
|
|
|
2082
2107
|
|
|
2083
|
-
|
|
2084
2108
|
@mixin mat-optgroup-color($config-or-theme) {
|
|
2085
2109
|
$config: mat-get-color-config($config-or-theme);
|
|
2086
2110
|
$foreground: map-get($config, foreground);
|
|
@@ -2104,8 +2128,8 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
2104
2128
|
@mixin _mat-optgroup-density($config-or-theme) {}
|
|
2105
2129
|
|
|
2106
2130
|
@mixin mat-optgroup-theme($theme-or-color-config) {
|
|
2107
|
-
$theme:
|
|
2108
|
-
@include
|
|
2131
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
2132
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-optgroup') {
|
|
2109
2133
|
$color: mat-get-color-config($theme);
|
|
2110
2134
|
$density: mat-get-density-config($theme);
|
|
2111
2135
|
$typography: mat-get-typography-config($theme);
|
|
@@ -2124,7 +2148,6 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
2124
2148
|
|
|
2125
2149
|
|
|
2126
2150
|
|
|
2127
|
-
|
|
2128
2151
|
@mixin mat-pseudo-checkbox-color($config-or-theme) {
|
|
2129
2152
|
$config: mat-get-color-config($config-or-theme);
|
|
2130
2153
|
$is-dark-theme: map-get($config, is-dark);
|
|
@@ -2188,8 +2211,8 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
2188
2211
|
@mixin _mat-pseudo-checkbox-density($config-or-theme) {}
|
|
2189
2212
|
|
|
2190
2213
|
@mixin mat-pseudo-checkbox-theme($theme-or-color-config) {
|
|
2191
|
-
$theme:
|
|
2192
|
-
@include
|
|
2214
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
2215
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {
|
|
2193
2216
|
$color: mat-get-color-config($theme);
|
|
2194
2217
|
$density: mat-get-density-config($theme);
|
|
2195
2218
|
$typography: mat-get-typography-config($theme);
|
|
@@ -2425,14 +2448,13 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
2425
2448
|
|
|
2426
2449
|
|
|
2427
2450
|
|
|
2428
|
-
|
|
2429
2451
|
@mixin mat-autocomplete-color($config-or-theme) {
|
|
2430
2452
|
$config: mat-get-color-config($config-or-theme);
|
|
2431
2453
|
$foreground: map-get($config, foreground);
|
|
2432
2454
|
$background: map-get($config, background);
|
|
2433
2455
|
|
|
2434
2456
|
.mat-autocomplete-panel {
|
|
2435
|
-
@include
|
|
2457
|
+
@include mat-private-theme-overridable-elevation(4, $config);
|
|
2436
2458
|
background: mat-color($background, card);
|
|
2437
2459
|
color: mat-color($foreground, text);
|
|
2438
2460
|
|
|
@@ -2456,8 +2478,8 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
2456
2478
|
@mixin _mat-autocomplete-density($config-or-theme) {}
|
|
2457
2479
|
|
|
2458
2480
|
@mixin mat-autocomplete-theme($theme-or-color-config) {
|
|
2459
|
-
$theme:
|
|
2460
|
-
@include
|
|
2481
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
2482
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-autocomplete') {
|
|
2461
2483
|
$color: mat-get-color-config($theme);
|
|
2462
2484
|
$density: mat-get-density-config($theme);
|
|
2463
2485
|
$typography: mat-get-typography-config($theme);
|
|
@@ -2482,7 +2504,6 @@ $mat-ripple-color-opacity: 0.1;
|
|
|
2482
2504
|
|
|
2483
2505
|
|
|
2484
2506
|
|
|
2485
|
-
|
|
2486
2507
|
$mat-badge-font-size: 12px;
|
|
2487
2508
|
$mat-badge-font-weight: 600;
|
|
2488
2509
|
$mat-badge-default-size: 22px !default;
|
|
@@ -2685,8 +2706,8 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
|
|
|
2685
2706
|
@mixin _mat-badge-density($config-or-theme) {}
|
|
2686
2707
|
|
|
2687
2708
|
@mixin mat-badge-theme($theme-or-color-config) {
|
|
2688
|
-
$theme:
|
|
2689
|
-
@include
|
|
2709
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
2710
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-badge') {
|
|
2690
2711
|
$color: mat-get-color-config($theme);
|
|
2691
2712
|
$density: mat-get-density-config($theme);
|
|
2692
2713
|
$typography: mat-get-typography-config($theme);
|
|
@@ -2708,14 +2729,13 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
|
|
|
2708
2729
|
|
|
2709
2730
|
|
|
2710
2731
|
|
|
2711
|
-
|
|
2712
2732
|
@mixin mat-bottom-sheet-color($config-or-theme) {
|
|
2713
2733
|
$config: mat-get-color-config($config-or-theme);
|
|
2714
2734
|
$background: map-get($config, background);
|
|
2715
2735
|
$foreground: map-get($config, foreground);
|
|
2716
2736
|
|
|
2717
2737
|
.mat-bottom-sheet-container {
|
|
2718
|
-
@include
|
|
2738
|
+
@include mat-private-theme-elevation(16, $config);
|
|
2719
2739
|
background: mat-color($background, dialog);
|
|
2720
2740
|
color: mat-color($foreground, text);
|
|
2721
2741
|
}
|
|
@@ -2731,8 +2751,8 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
|
|
|
2731
2751
|
@mixin _mat-bottom-sheet-density($config-or-theme) {}
|
|
2732
2752
|
|
|
2733
2753
|
@mixin mat-bottom-sheet-theme($theme-or-color-config) {
|
|
2734
|
-
$theme:
|
|
2735
|
-
@include
|
|
2754
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
2755
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-bottom-sheet') {
|
|
2736
2756
|
$color: mat-get-color-config($theme);
|
|
2737
2757
|
$density: mat-get-density-config($theme);
|
|
2738
2758
|
$typography: mat-get-typography-config($theme);
|
|
@@ -2753,7 +2773,6 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
|
|
|
2753
2773
|
|
|
2754
2774
|
|
|
2755
2775
|
|
|
2756
|
-
|
|
2757
2776
|
$_mat-button-ripple-opacity: 0.1;
|
|
2758
2777
|
|
|
2759
2778
|
// Applies a focus style to an mat-button element for each of the supported palettes.
|
|
@@ -2884,30 +2903,30 @@ $_mat-button-ripple-opacity: 0.1;
|
|
|
2884
2903
|
}
|
|
2885
2904
|
|
|
2886
2905
|
.mat-stroked-button, .mat-flat-button {
|
|
2887
|
-
@include
|
|
2906
|
+
@include mat-private-theme-overridable-elevation(0, $config);
|
|
2888
2907
|
}
|
|
2889
2908
|
|
|
2890
2909
|
.mat-raised-button {
|
|
2891
|
-
@include
|
|
2910
|
+
@include mat-private-theme-overridable-elevation(2, $config);
|
|
2892
2911
|
|
|
2893
2912
|
&:not(.mat-button-disabled):active {
|
|
2894
|
-
@include
|
|
2913
|
+
@include mat-private-theme-overridable-elevation(8, $config);
|
|
2895
2914
|
}
|
|
2896
2915
|
|
|
2897
2916
|
&.mat-button-disabled {
|
|
2898
|
-
@include
|
|
2917
|
+
@include mat-private-theme-overridable-elevation(0, $config);
|
|
2899
2918
|
}
|
|
2900
2919
|
}
|
|
2901
2920
|
|
|
2902
2921
|
.mat-fab, .mat-mini-fab {
|
|
2903
|
-
@include
|
|
2922
|
+
@include mat-private-theme-overridable-elevation(6, $config);
|
|
2904
2923
|
|
|
2905
2924
|
&:not(.mat-button-disabled):active {
|
|
2906
|
-
@include
|
|
2925
|
+
@include mat-private-theme-overridable-elevation(12, $config);
|
|
2907
2926
|
}
|
|
2908
2927
|
|
|
2909
2928
|
&.mat-button-disabled {
|
|
2910
|
-
@include
|
|
2929
|
+
@include mat-private-theme-overridable-elevation(0, $config);
|
|
2911
2930
|
}
|
|
2912
2931
|
}
|
|
2913
2932
|
}
|
|
@@ -2927,8 +2946,8 @@ $_mat-button-ripple-opacity: 0.1;
|
|
|
2927
2946
|
@mixin _mat-button-density($config-or-theme) {}
|
|
2928
2947
|
|
|
2929
2948
|
@mixin mat-button-theme($theme-or-color-config) {
|
|
2930
|
-
$theme:
|
|
2931
|
-
@include
|
|
2949
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
2950
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-button') {
|
|
2932
2951
|
$color: mat-get-color-config($theme);
|
|
2933
2952
|
$density: mat-get-density-config($theme);
|
|
2934
2953
|
$typography: mat-get-typography-config($theme);
|
|
@@ -2950,6 +2969,8 @@ $_mat-button-ripple-opacity: 0.1;
|
|
|
2950
2969
|
|
|
2951
2970
|
|
|
2952
2971
|
|
|
2972
|
+
// Note that this file is called `private`, because the APIs in it aren't public yet.
|
|
2973
|
+
// Once they're made available, the code should be moved out into an `index.scss`.
|
|
2953
2974
|
|
|
2954
2975
|
// Taken from mat-density with small modifications to not rely on the new Sass module
|
|
2955
2976
|
// system, and to support arbitrary properties in a density configuration.
|
|
@@ -2963,15 +2984,15 @@ $_mat-density-default-scale: 0 !default;
|
|
|
2963
2984
|
|
|
2964
2985
|
// Whether density should be generated at root. This will be temporarily set to `true`
|
|
2965
2986
|
// whenever density styles for legacy themes are generated.
|
|
2966
|
-
$
|
|
2987
|
+
$mat-private-density-generate-at-root: false;
|
|
2967
2988
|
// Whether density styles should be generated. This will be temporarily set to `false` if
|
|
2968
2989
|
// duplicate density styles for a legacy theme would be generated. For legacy themes,
|
|
2969
2990
|
// we always generate the default density **only once** at root.
|
|
2970
|
-
$
|
|
2991
|
+
$mat-private-density-generate-styles: true;
|
|
2971
2992
|
|
|
2972
2993
|
// Mixin that can be used to wrap density styles of given components. The mixin will
|
|
2973
|
-
// move the density styles to root if the `$
|
|
2974
|
-
// is set. If `$
|
|
2994
|
+
// move the density styles to root if the `$mat-private-density-generate-at-root` global variable
|
|
2995
|
+
// is set. If `$mat-private-density-generate-styles` is set to `false`, generation of density
|
|
2975
2996
|
// styles wrapped in this mixin is skipped. This mixin exists to improve backwards compatibility
|
|
2976
2997
|
// of the new theming API where density styles are included as part of themes. Previously,
|
|
2977
2998
|
// density styles of components were part of their base styles. With the new API, they are
|
|
@@ -2981,18 +3002,18 @@ $_mat-density-generate-styles: true;
|
|
|
2981
3002
|
// density styles. This is breaking as it increases specificity of density styles. This mixin
|
|
2982
3003
|
// provides an API to control generation of density styles so that we can ensure they are only
|
|
2983
3004
|
// created *once* and at root.
|
|
2984
|
-
@mixin
|
|
2985
|
-
@if $
|
|
3005
|
+
@mixin mat-private-density-legacy-compatibility() {
|
|
3006
|
+
@if $mat-private-density-generate-styles and $mat-private-density-generate-at-root {
|
|
2986
3007
|
@at-root {
|
|
2987
3008
|
@content;
|
|
2988
3009
|
}
|
|
2989
3010
|
}
|
|
2990
|
-
@else if $
|
|
3011
|
+
@else if $mat-private-density-generate-styles {
|
|
2991
3012
|
@content;
|
|
2992
3013
|
}
|
|
2993
3014
|
}
|
|
2994
3015
|
|
|
2995
|
-
@function
|
|
3016
|
+
@function mat-private-density-prop-value($density-config, $density-scale, $property-name) {
|
|
2996
3017
|
@if (type-of($density-scale) == 'string' and
|
|
2997
3018
|
index($list: $_mat-density-supported-scales, $value: $density-scale) == null) {
|
|
2998
3019
|
@error 'mat-density: Supported density scales #{$_mat-density-supported-scales}, ' +
|
|
@@ -3044,7 +3065,7 @@ $mat-button-toggle-standard-density-config: (
|
|
|
3044
3065
|
|
|
3045
3066
|
.mat-button-toggle-standalone,
|
|
3046
3067
|
.mat-button-toggle-group {
|
|
3047
|
-
@include
|
|
3068
|
+
@include mat-private-theme-elevation(2, $config);
|
|
3048
3069
|
}
|
|
3049
3070
|
|
|
3050
3071
|
.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,
|
|
@@ -3121,12 +3142,12 @@ $mat-button-toggle-standard-density-config: (
|
|
|
3121
3142
|
}
|
|
3122
3143
|
}
|
|
3123
3144
|
|
|
3124
|
-
@mixin
|
|
3145
|
+
@mixin mat-button-toggle-density($config-or-theme) {
|
|
3125
3146
|
$density-scale: mat-get-density-config($config-or-theme);
|
|
3126
|
-
$standard-height:
|
|
3147
|
+
$standard-height: mat-private-density-prop-value(
|
|
3127
3148
|
$mat-button-toggle-standard-density-config, $density-scale, height);
|
|
3128
3149
|
|
|
3129
|
-
@include
|
|
3150
|
+
@include mat-private-density-legacy-compatibility() {
|
|
3130
3151
|
.mat-button-toggle-appearance-standard .mat-button-toggle-label-content {
|
|
3131
3152
|
line-height: $standard-height;
|
|
3132
3153
|
}
|
|
@@ -3134,8 +3155,8 @@ $mat-button-toggle-standard-density-config: (
|
|
|
3134
3155
|
}
|
|
3135
3156
|
|
|
3136
3157
|
@mixin mat-button-toggle-theme($theme-or-color-config) {
|
|
3137
|
-
$theme:
|
|
3138
|
-
@include
|
|
3158
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
3159
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-button-toggle') {
|
|
3139
3160
|
$color: mat-get-color-config($theme);
|
|
3140
3161
|
$density: mat-get-density-config($theme);
|
|
3141
3162
|
$typography: mat-get-typography-config($theme);
|
|
@@ -3144,7 +3165,7 @@ $mat-button-toggle-standard-density-config: (
|
|
|
3144
3165
|
@include mat-button-toggle-color($color);
|
|
3145
3166
|
}
|
|
3146
3167
|
@if $density != null {
|
|
3147
|
-
@include
|
|
3168
|
+
@include mat-button-toggle-density($density);
|
|
3148
3169
|
}
|
|
3149
3170
|
@if $typography != null {
|
|
3150
3171
|
@include mat-button-toggle-typography($typography);
|
|
@@ -3158,20 +3179,19 @@ $mat-button-toggle-standard-density-config: (
|
|
|
3158
3179
|
|
|
3159
3180
|
|
|
3160
3181
|
|
|
3161
|
-
|
|
3162
3182
|
@mixin mat-card-color($config-or-theme) {
|
|
3163
3183
|
$config: mat-get-color-config($config-or-theme);
|
|
3164
3184
|
$background: map-get($config, background);
|
|
3165
3185
|
$foreground: map-get($config, foreground);
|
|
3166
3186
|
|
|
3167
3187
|
.mat-card {
|
|
3168
|
-
@include
|
|
3188
|
+
@include mat-private-theme-overridable-elevation(1, $config);
|
|
3169
3189
|
background: mat-color($background, card);
|
|
3170
3190
|
color: mat-color($foreground, text);
|
|
3171
3191
|
|
|
3172
3192
|
// Needs extra specificity to be able to override the elevation selectors.
|
|
3173
3193
|
&.mat-card-flat {
|
|
3174
|
-
@include
|
|
3194
|
+
@include mat-private-theme-overridable-elevation(0, $config);
|
|
3175
3195
|
}
|
|
3176
3196
|
}
|
|
3177
3197
|
|
|
@@ -3206,8 +3226,8 @@ $mat-button-toggle-standard-density-config: (
|
|
|
3206
3226
|
@mixin _mat-card-density($config-or-theme) {}
|
|
3207
3227
|
|
|
3208
3228
|
@mixin mat-card-theme($theme-or-color-config) {
|
|
3209
|
-
$theme:
|
|
3210
|
-
@include
|
|
3229
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
3230
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-card') {
|
|
3211
3231
|
$color: mat-get-color-config($theme);
|
|
3212
3232
|
$density: mat-get-density-config($theme);
|
|
3213
3233
|
$typography: mat-get-typography-config($theme);
|
|
@@ -3228,7 +3248,6 @@ $mat-button-toggle-standard-density-config: (
|
|
|
3228
3248
|
|
|
3229
3249
|
|
|
3230
3250
|
|
|
3231
|
-
|
|
3232
3251
|
@mixin mat-checkbox-color($config-or-theme) {
|
|
3233
3252
|
$config: mat-get-color-config($config-or-theme);
|
|
3234
3253
|
$is-dark-theme: map-get($config, is-dark);
|
|
@@ -3337,8 +3356,8 @@ $mat-button-toggle-standard-density-config: (
|
|
|
3337
3356
|
@mixin _mat-checkbox-density($config-or-theme) {}
|
|
3338
3357
|
|
|
3339
3358
|
@mixin mat-checkbox-theme($theme-or-color-config) {
|
|
3340
|
-
$theme:
|
|
3341
|
-
@include
|
|
3359
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
3360
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-checkbox') {
|
|
3342
3361
|
$color: mat-get-color-config($theme);
|
|
3343
3362
|
$density: mat-get-density-config($theme);
|
|
3344
3363
|
$typography: mat-get-typography-config($theme);
|
|
@@ -3360,7 +3379,6 @@ $mat-button-toggle-standard-density-config: (
|
|
|
3360
3379
|
|
|
3361
3380
|
|
|
3362
3381
|
|
|
3363
|
-
|
|
3364
3382
|
$mat-chip-remove-font-size: 18px;
|
|
3365
3383
|
|
|
3366
3384
|
@mixin _mat-chip-element-color($foreground, $background) {
|
|
@@ -3412,7 +3430,7 @@ $mat-chip-remove-font-size: 18px;
|
|
|
3412
3430
|
|
|
3413
3431
|
&:not(.mat-chip-disabled) {
|
|
3414
3432
|
&:active {
|
|
3415
|
-
@include
|
|
3433
|
+
@include mat-private-theme-elevation(3, $config);
|
|
3416
3434
|
}
|
|
3417
3435
|
|
|
3418
3436
|
.mat-chip-remove:hover {
|
|
@@ -3460,8 +3478,8 @@ $mat-chip-remove-font-size: 18px;
|
|
|
3460
3478
|
@mixin _mat-chips-density($config-or-theme) {}
|
|
3461
3479
|
|
|
3462
3480
|
@mixin mat-chips-theme($theme-or-color-config) {
|
|
3463
|
-
$theme:
|
|
3464
|
-
@include
|
|
3481
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
3482
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-chips') {
|
|
3465
3483
|
$color: mat-get-color-config($theme);
|
|
3466
3484
|
$density: mat-get-density-config($theme);
|
|
3467
3485
|
$typography: mat-get-typography-config($theme);
|
|
@@ -3483,7 +3501,6 @@ $mat-chip-remove-font-size: 18px;
|
|
|
3483
3501
|
|
|
3484
3502
|
|
|
3485
3503
|
|
|
3486
|
-
|
|
3487
3504
|
@mixin mat-divider-color($config-or-theme) {
|
|
3488
3505
|
$config: mat-get-color-config($config-or-theme);
|
|
3489
3506
|
$foreground: map-get($config, foreground);
|
|
@@ -3502,8 +3519,8 @@ $mat-chip-remove-font-size: 18px;
|
|
|
3502
3519
|
@mixin _mat-divider-density($config-or-theme) {}
|
|
3503
3520
|
|
|
3504
3521
|
@mixin mat-divider-theme($theme-or-color-config) {
|
|
3505
|
-
$theme:
|
|
3506
|
-
@include
|
|
3522
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
3523
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-divider') {
|
|
3507
3524
|
$color: mat-get-color-config($theme);
|
|
3508
3525
|
$density: mat-get-density-config($theme);
|
|
3509
3526
|
$typography: mat-get-typography-config($theme);
|
|
@@ -3524,7 +3541,6 @@ $mat-chip-remove-font-size: 18px;
|
|
|
3524
3541
|
|
|
3525
3542
|
|
|
3526
3543
|
|
|
3527
|
-
|
|
3528
3544
|
@mixin mat-table-color($config-or-theme) {
|
|
3529
3545
|
$config: mat-get-color-config($config-or-theme);
|
|
3530
3546
|
$background: map-get($config, background);
|
|
@@ -3574,8 +3590,8 @@ $mat-chip-remove-font-size: 18px;
|
|
|
3574
3590
|
@mixin _mat-table-density($config-or-theme) {}
|
|
3575
3591
|
|
|
3576
3592
|
@mixin mat-table-theme($theme-or-color-config) {
|
|
3577
|
-
$theme:
|
|
3578
|
-
@include
|
|
3593
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
3594
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-table') {
|
|
3579
3595
|
$color: mat-get-color-config($theme);
|
|
3580
3596
|
$density: mat-get-density-config($theme);
|
|
3581
3597
|
$typography: mat-get-typography-config($theme);
|
|
@@ -3598,7 +3614,6 @@ $mat-chip-remove-font-size: 18px;
|
|
|
3598
3614
|
|
|
3599
3615
|
|
|
3600
3616
|
|
|
3601
|
-
|
|
3602
3617
|
$mat-datepicker-selected-today-box-shadow-width: 1px;
|
|
3603
3618
|
$mat-datepicker-selected-fade-amount: 0.6;
|
|
3604
3619
|
$mat-datepicker-range-fade-amount: 0.2;
|
|
@@ -3739,7 +3754,7 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
3739
3754
|
@include _mat-datepicker-color(map-get($config, primary));
|
|
3740
3755
|
|
|
3741
3756
|
.mat-datepicker-content {
|
|
3742
|
-
@include
|
|
3757
|
+
@include mat-private-theme-elevation(4, $config);
|
|
3743
3758
|
background-color: mat-color($background, card);
|
|
3744
3759
|
color: mat-color($foreground, text);
|
|
3745
3760
|
|
|
@@ -3753,7 +3768,7 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
3753
3768
|
}
|
|
3754
3769
|
|
|
3755
3770
|
.mat-datepicker-content-touch {
|
|
3756
|
-
@include
|
|
3771
|
+
@include mat-private-theme-elevation(0, $config);
|
|
3757
3772
|
}
|
|
3758
3773
|
|
|
3759
3774
|
.mat-datepicker-toggle-active {
|
|
@@ -3838,8 +3853,8 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
3838
3853
|
@mixin _mat-datepicker-density($config-or-theme) {}
|
|
3839
3854
|
|
|
3840
3855
|
@mixin mat-datepicker-theme($theme-or-color-config) {
|
|
3841
|
-
$theme:
|
|
3842
|
-
@include
|
|
3856
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
3857
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-datepicker') {
|
|
3843
3858
|
$color: mat-get-color-config($theme);
|
|
3844
3859
|
$density: mat-get-density-config($theme);
|
|
3845
3860
|
$typography: mat-get-typography-config($theme);
|
|
@@ -3862,14 +3877,13 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
3862
3877
|
|
|
3863
3878
|
|
|
3864
3879
|
|
|
3865
|
-
|
|
3866
3880
|
@mixin mat-dialog-color($config-or-theme) {
|
|
3867
3881
|
$config: mat-get-color-config($config-or-theme);
|
|
3868
3882
|
$background: map-get($config, background);
|
|
3869
3883
|
$foreground: map-get($config, foreground);
|
|
3870
3884
|
|
|
3871
3885
|
.mat-dialog-container {
|
|
3872
|
-
@include
|
|
3886
|
+
@include mat-private-theme-elevation(24, $config);
|
|
3873
3887
|
background: mat-color($background, dialog);
|
|
3874
3888
|
color: mat-color($foreground, text);
|
|
3875
3889
|
}
|
|
@@ -3885,8 +3899,8 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
3885
3899
|
@mixin _mat-dialog-density($config-or-theme) {}
|
|
3886
3900
|
|
|
3887
3901
|
@mixin mat-dialog-theme($theme-or-color-config) {
|
|
3888
|
-
$theme:
|
|
3889
|
-
@include
|
|
3902
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
3903
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-dialog') {
|
|
3890
3904
|
$color: mat-get-color-config($theme);
|
|
3891
3905
|
$density: mat-get-density-config($theme);
|
|
3892
3906
|
$typography: mat-get-typography-config($theme);
|
|
@@ -3908,7 +3922,6 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
3908
3922
|
|
|
3909
3923
|
|
|
3910
3924
|
|
|
3911
|
-
|
|
3912
3925
|
// Default minimum and maximum height for collapsed panel headers.
|
|
3913
3926
|
$mat-expansion-panel-header-collapsed-height: 48px !default;
|
|
3914
3927
|
$mat-expansion-panel-header-collapsed-minimum-height: 36px !default;
|
|
@@ -3940,6 +3953,18 @@ $mat-expansion-panel-header-density-config: (
|
|
|
3940
3953
|
// and body expansion. These are animated using Angular animations.
|
|
3941
3954
|
$mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
3942
3955
|
|
|
3956
|
+
@mixin mat-private-expansion-focus {
|
|
3957
|
+
.mat-expansion-panel {
|
|
3958
|
+
& .mat-expansion-panel-header.cdk-keyboard-focused,
|
|
3959
|
+
& .mat-expansion-panel-header.cdk-program-focused,
|
|
3960
|
+
&:not(.mat-expanded) .mat-expansion-panel-header:hover {
|
|
3961
|
+
&:not([aria-disabled='true']) {
|
|
3962
|
+
@content;
|
|
3963
|
+
}
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
|
|
3943
3968
|
|
|
3944
3969
|
@mixin mat-expansion-panel-color($config-or-theme) {
|
|
3945
3970
|
$config: mat-get-color-config($config-or-theme);
|
|
@@ -3947,7 +3972,7 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
3947
3972
|
$foreground: map-get($config, foreground);
|
|
3948
3973
|
|
|
3949
3974
|
.mat-expansion-panel {
|
|
3950
|
-
@include
|
|
3975
|
+
@include mat-private-theme-overridable-elevation(2, $config);
|
|
3951
3976
|
background: mat-color($background, card);
|
|
3952
3977
|
color: mat-color($foreground, text);
|
|
3953
3978
|
}
|
|
@@ -3956,14 +3981,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
3956
3981
|
border-top-color: mat-color($foreground, divider);
|
|
3957
3982
|
}
|
|
3958
3983
|
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
& .mat-expansion-panel-header.cdk-program-focused,
|
|
3962
|
-
&:not(.mat-expanded) .mat-expansion-panel-header:hover {
|
|
3963
|
-
&:not([aria-disabled='true']) {
|
|
3964
|
-
background: mat-color($background, hover);
|
|
3965
|
-
}
|
|
3966
|
-
}
|
|
3984
|
+
@include mat-private-expansion-focus {
|
|
3985
|
+
background: mat-color($background, hover);
|
|
3967
3986
|
}
|
|
3968
3987
|
|
|
3969
3988
|
// Disable the hover on touch devices since it can appear like it is stuck. We can't use
|
|
@@ -4009,14 +4028,14 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4009
4028
|
}
|
|
4010
4029
|
}
|
|
4011
4030
|
|
|
4012
|
-
@mixin
|
|
4031
|
+
@mixin mat-expansion-panel-density($config-or-theme) {
|
|
4013
4032
|
$density-scale: mat-get-density-config($config-or-theme);
|
|
4014
|
-
$expanded-height:
|
|
4033
|
+
$expanded-height: mat-private-density-prop-value(
|
|
4015
4034
|
$mat-expansion-panel-header-density-config, $density-scale, expanded-height);
|
|
4016
|
-
$collapsed-height:
|
|
4035
|
+
$collapsed-height: mat-private-density-prop-value(
|
|
4017
4036
|
$mat-expansion-panel-header-density-config, $density-scale, collapsed-height);
|
|
4018
4037
|
|
|
4019
|
-
@include
|
|
4038
|
+
@include mat-private-density-legacy-compatibility() {
|
|
4020
4039
|
.mat-expansion-panel-header {
|
|
4021
4040
|
height: $collapsed-height;
|
|
4022
4041
|
|
|
@@ -4028,8 +4047,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4028
4047
|
}
|
|
4029
4048
|
|
|
4030
4049
|
@mixin mat-expansion-panel-theme($theme-or-color-config) {
|
|
4031
|
-
$theme:
|
|
4032
|
-
@include
|
|
4050
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4051
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-expansion-panel') {
|
|
4033
4052
|
$color: mat-get-color-config($theme);
|
|
4034
4053
|
$density: mat-get-density-config($theme);
|
|
4035
4054
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4038,7 +4057,7 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4038
4057
|
@include mat-expansion-panel-color($color);
|
|
4039
4058
|
}
|
|
4040
4059
|
@if $density != null {
|
|
4041
|
-
@include
|
|
4060
|
+
@include mat-expansion-panel-density($density);
|
|
4042
4061
|
}
|
|
4043
4062
|
@if $typography != null {
|
|
4044
4063
|
@include mat-expansion-panel-typography($typography);
|
|
@@ -4049,7 +4068,6 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4049
4068
|
|
|
4050
4069
|
|
|
4051
4070
|
|
|
4052
|
-
|
|
4053
4071
|
// This mixin will ensure that lines that overflow the container will hide the overflow and
|
|
4054
4072
|
// truncate neatly with an ellipsis.
|
|
4055
4073
|
@mixin mat-truncate-line() {
|
|
@@ -4117,8 +4135,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4117
4135
|
@mixin _mat-grid-list-density($config-or-theme) {}
|
|
4118
4136
|
|
|
4119
4137
|
@mixin mat-grid-list-theme($theme-or-color-config) {
|
|
4120
|
-
$theme:
|
|
4121
|
-
@include
|
|
4138
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4139
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-grid-list') {
|
|
4122
4140
|
$color: mat-get-color-config($theme);
|
|
4123
4141
|
$density: mat-get-density-config($theme);
|
|
4124
4142
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4137,7 +4155,6 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4137
4155
|
|
|
4138
4156
|
|
|
4139
4157
|
|
|
4140
|
-
|
|
4141
4158
|
@mixin mat-icon-color($config-or-theme) {
|
|
4142
4159
|
$config: mat-get-color-config($config-or-theme);
|
|
4143
4160
|
$primary: map-get($config, primary);
|
|
@@ -4166,8 +4183,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4166
4183
|
@mixin _mat-icon-density($config-or-theme) {}
|
|
4167
4184
|
|
|
4168
4185
|
@mixin mat-icon-theme($theme-or-color-config) {
|
|
4169
|
-
$theme:
|
|
4170
|
-
@include
|
|
4186
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4187
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-icon') {
|
|
4171
4188
|
$color: mat-get-color-config($theme);
|
|
4172
4189
|
$density: mat-get-density-config($theme);
|
|
4173
4190
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4189,11 +4206,10 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4189
4206
|
|
|
4190
4207
|
|
|
4191
4208
|
|
|
4192
|
-
|
|
4193
4209
|
// Renders a gradient for showing the dashed line when the input is disabled.
|
|
4194
4210
|
// Unlike using a border, a gradient allows us to adjust the spacing of the dotted line
|
|
4195
4211
|
// to match the Material Design spec.
|
|
4196
|
-
@mixin mat-control-disabled-underline($color) {
|
|
4212
|
+
@mixin mat-private-control-disabled-underline($color) {
|
|
4197
4213
|
background-image: linear-gradient(to right, $color 0%, $color 33%, transparent 0%);
|
|
4198
4214
|
background-size: 4px 100%;
|
|
4199
4215
|
background-repeat: repeat-x;
|
|
@@ -4202,7 +4218,7 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4202
4218
|
// Figures out the color of the placeholder for a form control.
|
|
4203
4219
|
// Used primarily to prevent the various form controls from
|
|
4204
4220
|
// becoming out of sync since these colors aren't in a palette.
|
|
4205
|
-
@function
|
|
4221
|
+
@function mat-private-control-placeholder-color($config) {
|
|
4206
4222
|
$foreground: map-get($config, foreground);
|
|
4207
4223
|
$is-dark-theme: map-get($config, is-dark);
|
|
4208
4224
|
@return mat-color($foreground, secondary-text, if($is-dark-theme, 0.5, 0.42));
|
|
@@ -4278,7 +4294,7 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4278
4294
|
caret-color: mat-color($primary, text);
|
|
4279
4295
|
|
|
4280
4296
|
@include input-placeholder {
|
|
4281
|
-
color:
|
|
4297
|
+
color: mat-private-control-placeholder-color($config);
|
|
4282
4298
|
}
|
|
4283
4299
|
|
|
4284
4300
|
// On dark themes we set the native `select` color to some shade of white,
|
|
@@ -4330,8 +4346,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4330
4346
|
@mixin _mat-input-density($config-or-theme) {}
|
|
4331
4347
|
|
|
4332
4348
|
@mixin mat-input-theme($theme-or-color-config) {
|
|
4333
|
-
$theme:
|
|
4334
|
-
@include
|
|
4349
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4350
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-input') {
|
|
4335
4351
|
$color: mat-get-color-config($theme);
|
|
4336
4352
|
$density: mat-get-density-config($theme);
|
|
4337
4353
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4354,7 +4370,6 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4354
4370
|
|
|
4355
4371
|
|
|
4356
4372
|
|
|
4357
|
-
|
|
4358
4373
|
@mixin mat-list-color($config-or-theme) {
|
|
4359
4374
|
$config: mat-get-color-config($config-or-theme);
|
|
4360
4375
|
$background: map-get($config, background);
|
|
@@ -4447,8 +4462,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4447
4462
|
@mixin _mat-list-density($config-or-theme) {}
|
|
4448
4463
|
|
|
4449
4464
|
@mixin mat-list-theme($theme-or-color-config) {
|
|
4450
|
-
$theme:
|
|
4451
|
-
@include
|
|
4465
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4466
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-list') {
|
|
4452
4467
|
$color: mat-get-color-config($theme);
|
|
4453
4468
|
$density: mat-get-density-config($theme);
|
|
4454
4469
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4471,14 +4486,13 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4471
4486
|
|
|
4472
4487
|
|
|
4473
4488
|
|
|
4474
|
-
|
|
4475
4489
|
@mixin mat-menu-color($config-or-theme) {
|
|
4476
4490
|
$config: mat-get-color-config($config-or-theme);
|
|
4477
4491
|
$background: map-get($config, background);
|
|
4478
4492
|
$foreground: map-get($config, foreground);
|
|
4479
4493
|
|
|
4480
4494
|
.mat-menu-panel {
|
|
4481
|
-
@include
|
|
4495
|
+
@include mat-private-theme-overridable-elevation(4, $config);
|
|
4482
4496
|
background: mat-color($background, 'card');
|
|
4483
4497
|
}
|
|
4484
4498
|
|
|
@@ -4524,8 +4538,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4524
4538
|
@mixin _mat-menu-density($config-or-theme) {}
|
|
4525
4539
|
|
|
4526
4540
|
@mixin mat-menu-theme($theme-or-color-config) {
|
|
4527
|
-
$theme:
|
|
4528
|
-
@include
|
|
4541
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4542
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-menu') {
|
|
4529
4543
|
$color: mat-get-color-config($theme);
|
|
4530
4544
|
$density: mat-get-density-config($theme);
|
|
4531
4545
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4547,7 +4561,6 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
4547
4561
|
|
|
4548
4562
|
|
|
4549
4563
|
|
|
4550
|
-
|
|
4551
4564
|
$mat-paginator-height: 56px !default;
|
|
4552
4565
|
// Minimum height for paginator's in the highest density is determined based on how
|
|
4553
4566
|
// much the paginator can shrink until the content exceeds (i.e. navigation buttons).
|
|
@@ -4609,11 +4622,11 @@ $mat-paginator-density-config: (
|
|
|
4609
4622
|
}
|
|
4610
4623
|
}
|
|
4611
4624
|
|
|
4612
|
-
@mixin
|
|
4625
|
+
@mixin mat-paginator-density($config-or-theme) {
|
|
4613
4626
|
$density-scale: mat-get-density-config($config-or-theme);
|
|
4614
|
-
$height:
|
|
4627
|
+
$height: mat-private-density-prop-value($mat-paginator-density-config, $density-scale, height);
|
|
4615
4628
|
|
|
4616
|
-
@include
|
|
4629
|
+
@include mat-private-density-legacy-compatibility() {
|
|
4617
4630
|
.mat-paginator-container {
|
|
4618
4631
|
min-height: $height;
|
|
4619
4632
|
}
|
|
@@ -4621,8 +4634,8 @@ $mat-paginator-density-config: (
|
|
|
4621
4634
|
}
|
|
4622
4635
|
|
|
4623
4636
|
@mixin mat-paginator-theme($theme-or-color-config) {
|
|
4624
|
-
$theme:
|
|
4625
|
-
@include
|
|
4637
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4638
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-paginator') {
|
|
4626
4639
|
$color: mat-get-color-config($theme);
|
|
4627
4640
|
$density: mat-get-density-config($theme);
|
|
4628
4641
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4631,7 +4644,7 @@ $mat-paginator-density-config: (
|
|
|
4631
4644
|
@include mat-paginator-color($color);
|
|
4632
4645
|
}
|
|
4633
4646
|
@if $density != null {
|
|
4634
|
-
@include
|
|
4647
|
+
@include mat-paginator-density($density);
|
|
4635
4648
|
}
|
|
4636
4649
|
@if $typography != null {
|
|
4637
4650
|
@include mat-paginator-typography($typography);
|
|
@@ -4642,7 +4655,6 @@ $mat-paginator-density-config: (
|
|
|
4642
4655
|
|
|
4643
4656
|
|
|
4644
4657
|
|
|
4645
|
-
|
|
4646
4658
|
@mixin mat-progress-bar-color($config-or-theme) {
|
|
4647
4659
|
$config: mat-get-color-config($config-or-theme);
|
|
4648
4660
|
$primary: map-get($config, primary);
|
|
@@ -4695,8 +4707,8 @@ $mat-paginator-density-config: (
|
|
|
4695
4707
|
@mixin _mat-progress-bar-density($config-or-theme) {}
|
|
4696
4708
|
|
|
4697
4709
|
@mixin mat-progress-bar-theme($theme-or-color-config) {
|
|
4698
|
-
$theme:
|
|
4699
|
-
@include
|
|
4710
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4711
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-progress-bar') {
|
|
4700
4712
|
$color: mat-get-color-config($theme);
|
|
4701
4713
|
$density: mat-get-density-config($theme);
|
|
4702
4714
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4717,7 +4729,6 @@ $mat-paginator-density-config: (
|
|
|
4717
4729
|
|
|
4718
4730
|
|
|
4719
4731
|
|
|
4720
|
-
|
|
4721
4732
|
@mixin mat-progress-spinner-color($config-or-theme) {
|
|
4722
4733
|
$config: mat-get-color-config($config-or-theme);
|
|
4723
4734
|
$primary: map-get($config, primary);
|
|
@@ -4744,8 +4755,8 @@ $mat-paginator-density-config: (
|
|
|
4744
4755
|
@mixin _mat-progress-spinner-density($config-or-theme) {}
|
|
4745
4756
|
|
|
4746
4757
|
@mixin mat-progress-spinner-theme($theme-or-color-config) {
|
|
4747
|
-
$theme:
|
|
4748
|
-
@include
|
|
4758
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4759
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-progress-spinner') {
|
|
4749
4760
|
$color: mat-get-color-config($theme);
|
|
4750
4761
|
$density: mat-get-density-config($theme);
|
|
4751
4762
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4766,7 +4777,6 @@ $mat-paginator-density-config: (
|
|
|
4766
4777
|
|
|
4767
4778
|
|
|
4768
4779
|
|
|
4769
|
-
|
|
4770
4780
|
@mixin _mat-radio-color($palette) {
|
|
4771
4781
|
&.mat-radio-checked .mat-radio-outer-circle {
|
|
4772
4782
|
border-color: mat-color($palette);
|
|
@@ -4842,8 +4852,8 @@ $mat-paginator-density-config: (
|
|
|
4842
4852
|
@mixin _mat-radio-density($config-or-theme) {}
|
|
4843
4853
|
|
|
4844
4854
|
@mixin mat-radio-theme($theme-or-color-config) {
|
|
4845
|
-
$theme:
|
|
4846
|
-
@include
|
|
4855
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4856
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-radio') {
|
|
4847
4857
|
$color: mat-get-color-config($theme);
|
|
4848
4858
|
$density: mat-get-density-config($theme);
|
|
4849
4859
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4867,7 +4877,6 @@ $mat-paginator-density-config: (
|
|
|
4867
4877
|
|
|
4868
4878
|
|
|
4869
4879
|
|
|
4870
|
-
|
|
4871
4880
|
@mixin mat-select-color($config-or-theme) {
|
|
4872
4881
|
$config: mat-get-color-config($config-or-theme);
|
|
4873
4882
|
$foreground: map-get($config, foreground);
|
|
@@ -4881,7 +4890,7 @@ $mat-paginator-density-config: (
|
|
|
4881
4890
|
}
|
|
4882
4891
|
|
|
4883
4892
|
.mat-select-placeholder {
|
|
4884
|
-
color:
|
|
4893
|
+
color: mat-private-control-placeholder-color($config);
|
|
4885
4894
|
}
|
|
4886
4895
|
|
|
4887
4896
|
.mat-select-disabled .mat-select-value {
|
|
@@ -4894,7 +4903,7 @@ $mat-paginator-density-config: (
|
|
|
4894
4903
|
|
|
4895
4904
|
.mat-select-panel {
|
|
4896
4905
|
background: mat-color($background, card);
|
|
4897
|
-
@include
|
|
4906
|
+
@include mat-private-theme-overridable-elevation(4, $config);
|
|
4898
4907
|
|
|
4899
4908
|
.mat-option.mat-selected:not(.mat-option-multiple) {
|
|
4900
4909
|
background: mat-color($background, hover, 0.12);
|
|
@@ -4943,8 +4952,8 @@ $mat-paginator-density-config: (
|
|
|
4943
4952
|
@mixin _mat-select-density($config-or-theme) {}
|
|
4944
4953
|
|
|
4945
4954
|
@mixin mat-select-theme($theme-or-color-config) {
|
|
4946
|
-
$theme:
|
|
4947
|
-
@include
|
|
4955
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
4956
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-select') {
|
|
4948
4957
|
$color: mat-get-color-config($theme);
|
|
4949
4958
|
$density: mat-get-density-config($theme);
|
|
4950
4959
|
$typography: mat-get-typography-config($theme);
|
|
@@ -4965,7 +4974,6 @@ $mat-paginator-density-config: (
|
|
|
4965
4974
|
|
|
4966
4975
|
|
|
4967
4976
|
|
|
4968
|
-
|
|
4969
4977
|
@mixin mat-sidenav-color($config-or-theme) {
|
|
4970
4978
|
$config: mat-get-color-config($config-or-theme);
|
|
4971
4979
|
$primary: map-get($config, primary);
|
|
@@ -4995,7 +5003,7 @@ $mat-paginator-density-config: (
|
|
|
4995
5003
|
&:not(.mat-drawer-side) {
|
|
4996
5004
|
// The elevation of z-16 is noted in the design specifications.
|
|
4997
5005
|
// See https://material.io/design/components/navigation-drawer.html
|
|
4998
|
-
@include
|
|
5006
|
+
@include mat-private-theme-elevation(16, $config);
|
|
4999
5007
|
}
|
|
5000
5008
|
}
|
|
5001
5009
|
|
|
@@ -5042,8 +5050,8 @@ $mat-paginator-density-config: (
|
|
|
5042
5050
|
@mixin _mat-sidenav-density($config-or-theme) {}
|
|
5043
5051
|
|
|
5044
5052
|
@mixin mat-sidenav-theme($theme-or-color-config) {
|
|
5045
|
-
$theme:
|
|
5046
|
-
@include
|
|
5053
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
5054
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-sidenav') {
|
|
5047
5055
|
$color: mat-get-color-config($theme);
|
|
5048
5056
|
$density: mat-get-density-config($theme);
|
|
5049
5057
|
$typography: mat-get-typography-config($theme);
|
|
@@ -5065,7 +5073,6 @@ $mat-paginator-density-config: (
|
|
|
5065
5073
|
|
|
5066
5074
|
|
|
5067
5075
|
|
|
5068
|
-
|
|
5069
5076
|
@mixin _mat-slide-toggle-checked($palette, $thumb-checked-hue) {
|
|
5070
5077
|
&.mat-checked {
|
|
5071
5078
|
.mat-slide-toggle-thumb {
|
|
@@ -5126,7 +5133,7 @@ $mat-paginator-density-config: (
|
|
|
5126
5133
|
}
|
|
5127
5134
|
|
|
5128
5135
|
.mat-slide-toggle-thumb {
|
|
5129
|
-
@include
|
|
5136
|
+
@include mat-private-theme-elevation(1, $config);
|
|
5130
5137
|
background-color: mat-color($mat-grey, $thumb-unchecked-hue);
|
|
5131
5138
|
}
|
|
5132
5139
|
|
|
@@ -5145,8 +5152,8 @@ $mat-paginator-density-config: (
|
|
|
5145
5152
|
@mixin _mat-slide-toggle-density($config-or-theme) {}
|
|
5146
5153
|
|
|
5147
5154
|
@mixin mat-slide-toggle-theme($theme-or-color-config) {
|
|
5148
|
-
$theme:
|
|
5149
|
-
@include
|
|
5155
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
5156
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-slide-toggle') {
|
|
5150
5157
|
$color: mat-get-color-config($theme);
|
|
5151
5158
|
$density: mat-get-density-config($theme);
|
|
5152
5159
|
$typography: mat-get-typography-config($theme);
|
|
@@ -5168,7 +5175,6 @@ $mat-paginator-density-config: (
|
|
|
5168
5175
|
|
|
5169
5176
|
|
|
5170
5177
|
|
|
5171
|
-
|
|
5172
5178
|
@mixin _mat-slider-inner-content-theme($palette) {
|
|
5173
5179
|
.mat-slider-track-fill,
|
|
5174
5180
|
.mat-slider-thumb,
|
|
@@ -5344,8 +5350,8 @@ $mat-paginator-density-config: (
|
|
|
5344
5350
|
@mixin _mat-slider-density($config-or-theme) {}
|
|
5345
5351
|
|
|
5346
5352
|
@mixin mat-slider-theme($theme-or-color-config) {
|
|
5347
|
-
$theme:
|
|
5348
|
-
@include
|
|
5353
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
5354
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-slider') {
|
|
5349
5355
|
$color: mat-get-color-config($theme);
|
|
5350
5356
|
$density: mat-get-density-config($theme);
|
|
5351
5357
|
$typography: mat-get-typography-config($theme);
|
|
@@ -5366,7 +5372,6 @@ $mat-paginator-density-config: (
|
|
|
5366
5372
|
|
|
5367
5373
|
|
|
5368
5374
|
|
|
5369
|
-
|
|
5370
5375
|
$mat-stepper-header-height: 72px !default;
|
|
5371
5376
|
// Minimum height for highest density stepper's is determined based on how much
|
|
5372
5377
|
// stepper headers can shrink until the step icon or step label exceed. We can't use
|
|
@@ -5527,12 +5532,12 @@ $mat-step-header-icon-size: 16px;
|
|
|
5527
5532
|
}
|
|
5528
5533
|
}
|
|
5529
5534
|
|
|
5530
|
-
@mixin
|
|
5535
|
+
@mixin mat-stepper-density($config-or-theme) {
|
|
5531
5536
|
$density-scale: mat-get-density-config($config-or-theme);
|
|
5532
|
-
$height:
|
|
5537
|
+
$height: mat-private-density-prop-value($mat-stepper-density-config, $density-scale, height);
|
|
5533
5538
|
$vertical-padding: ($height - $mat-stepper-label-header-height) / 2;
|
|
5534
5539
|
|
|
5535
|
-
@include
|
|
5540
|
+
@include mat-private-density-legacy-compatibility() {
|
|
5536
5541
|
.mat-horizontal-stepper-header {
|
|
5537
5542
|
height: $height;
|
|
5538
5543
|
}
|
|
@@ -5564,8 +5569,8 @@ $mat-step-header-icon-size: 16px;
|
|
|
5564
5569
|
}
|
|
5565
5570
|
|
|
5566
5571
|
@mixin mat-stepper-theme($theme-or-color-config) {
|
|
5567
|
-
$theme:
|
|
5568
|
-
@include
|
|
5572
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
5573
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-stepper') {
|
|
5569
5574
|
$color: mat-get-color-config($theme);
|
|
5570
5575
|
$density: mat-get-density-config($theme);
|
|
5571
5576
|
$typography: mat-get-typography-config($theme);
|
|
@@ -5574,7 +5579,7 @@ $mat-step-header-icon-size: 16px;
|
|
|
5574
5579
|
@include mat-stepper-color($color);
|
|
5575
5580
|
}
|
|
5576
5581
|
@if $density != null {
|
|
5577
|
-
@include
|
|
5582
|
+
@include mat-stepper-density($density);
|
|
5578
5583
|
}
|
|
5579
5584
|
@if $typography != null {
|
|
5580
5585
|
@include mat-stepper-typography($typography);
|
|
@@ -5584,7 +5589,6 @@ $mat-step-header-icon-size: 16px;
|
|
|
5584
5589
|
|
|
5585
5590
|
|
|
5586
5591
|
|
|
5587
|
-
|
|
5588
5592
|
@mixin mat-sort-color($config-or-theme) {
|
|
5589
5593
|
$config: mat-get-color-config($config-or-theme);
|
|
5590
5594
|
$background: map-get($config, background);
|
|
@@ -5615,8 +5619,8 @@ $mat-step-header-icon-size: 16px;
|
|
|
5615
5619
|
@mixin _mat-sort-density($config-or-theme) {}
|
|
5616
5620
|
|
|
5617
5621
|
@mixin mat-sort-theme($theme-or-color-config) {
|
|
5618
|
-
$theme:
|
|
5619
|
-
@include
|
|
5622
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
5623
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-sort') {
|
|
5620
5624
|
$color: mat-get-color-config($theme);
|
|
5621
5625
|
$density: mat-get-density-config($theme);
|
|
5622
5626
|
$typography: mat-get-typography-config($theme);
|
|
@@ -5637,7 +5641,6 @@ $mat-step-header-icon-size: 16px;
|
|
|
5637
5641
|
|
|
5638
5642
|
|
|
5639
5643
|
|
|
5640
|
-
|
|
5641
5644
|
@mixin mat-tabs-color($config-or-theme) {
|
|
5642
5645
|
$config: mat-get-color-config($config-or-theme);
|
|
5643
5646
|
$primary: map-get($config, primary);
|
|
@@ -5698,7 +5701,9 @@ $mat-step-header-icon-size: 16px;
|
|
|
5698
5701
|
|
|
5699
5702
|
// Override ink bar when background color is the same
|
|
5700
5703
|
&.mat-background-#{$name} {
|
|
5701
|
-
|
|
5704
|
+
> .mat-tab-header, > .mat-tab-link-container {
|
|
5705
|
+
@include _mat-ink-bar($color, default-contrast);
|
|
5706
|
+
}
|
|
5702
5707
|
}
|
|
5703
5708
|
}
|
|
5704
5709
|
}
|
|
@@ -5732,13 +5737,16 @@ $mat-step-header-icon-size: 16px;
|
|
|
5732
5737
|
}
|
|
5733
5738
|
|
|
5734
5739
|
@mixin _mat-tabs-background($background-color) {
|
|
5740
|
+
// Note that these selectors target direct descendants so
|
|
5741
|
+
// that the styles don't apply to any nested tab groups.
|
|
5742
|
+
|
|
5735
5743
|
// Set background color for the tab group
|
|
5736
|
-
.mat-tab-header, .mat-tab-
|
|
5744
|
+
> .mat-tab-header, > .mat-tab-link-container, > .mat-tab-header-pagination {
|
|
5737
5745
|
background-color: mat-color($background-color);
|
|
5738
5746
|
}
|
|
5739
5747
|
|
|
5740
5748
|
// Set labels to contrast against background
|
|
5741
|
-
.mat-tab-label, .mat-tab-link {
|
|
5749
|
+
> .mat-tab-header .mat-tab-label, > .mat-tab-link-container .mat-tab-link {
|
|
5742
5750
|
color: mat-color($background-color, default-contrast);
|
|
5743
5751
|
|
|
5744
5752
|
&.mat-tab-disabled {
|
|
@@ -5747,17 +5755,18 @@ $mat-step-header-icon-size: 16px;
|
|
|
5747
5755
|
}
|
|
5748
5756
|
|
|
5749
5757
|
// Set pagination chevrons to contrast background
|
|
5750
|
-
.mat-tab-header-pagination-chevron {
|
|
5758
|
+
> .mat-tab-header-pagination .mat-tab-header-pagination-chevron {
|
|
5751
5759
|
border-color: mat-color($background-color, default-contrast);
|
|
5752
5760
|
}
|
|
5753
5761
|
|
|
5754
|
-
.mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron {
|
|
5762
|
+
> .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron {
|
|
5755
5763
|
border-color: mat-color($background-color, default-contrast, 0.4);
|
|
5756
5764
|
}
|
|
5757
5765
|
|
|
5758
5766
|
// Set ripples color to be the contrast color of the new background. Otherwise the ripple
|
|
5759
5767
|
// color will be based on the app background color.
|
|
5760
|
-
.mat-ripple-element
|
|
5768
|
+
> .mat-tab-header .mat-ripple-element,
|
|
5769
|
+
> .mat-tab-link-container .mat-ripple-element {
|
|
5761
5770
|
background-color: mat-color($background-color, default-contrast, 0.12);
|
|
5762
5771
|
}
|
|
5763
5772
|
}
|
|
@@ -5780,8 +5789,8 @@ $mat-step-header-icon-size: 16px;
|
|
|
5780
5789
|
@mixin _mat-tabs-density($config-or-theme) {}
|
|
5781
5790
|
|
|
5782
5791
|
@mixin mat-tabs-theme($theme-or-color-config) {
|
|
5783
|
-
$theme:
|
|
5784
|
-
@include
|
|
5792
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
5793
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-tabs') {
|
|
5785
5794
|
$color: mat-get-color-config($theme);
|
|
5786
5795
|
$density: mat-get-density-config($theme);
|
|
5787
5796
|
$typography: mat-get-typography-config($theme);
|
|
@@ -5803,7 +5812,6 @@ $mat-step-header-icon-size: 16px;
|
|
|
5803
5812
|
|
|
5804
5813
|
|
|
5805
5814
|
|
|
5806
|
-
|
|
5807
5815
|
// Minimum height for toolbar's in the highest density is difficult to determine because
|
|
5808
5816
|
// developers can project arbitrary content. We use a minimum value that ensures that most
|
|
5809
5817
|
// common content (e.g. icon buttons) does not exceed the row boundaries in highest density.
|
|
@@ -5910,14 +5918,14 @@ $mat-toolbar-mobile-density-config: (
|
|
|
5910
5918
|
}
|
|
5911
5919
|
}
|
|
5912
5920
|
|
|
5913
|
-
@mixin
|
|
5921
|
+
@mixin mat-toolbar-density($config-or-theme) {
|
|
5914
5922
|
$density-scale: mat-get-density-config($config-or-theme);
|
|
5915
|
-
$height-desktop:
|
|
5923
|
+
$height-desktop: mat-private-density-prop-value(
|
|
5916
5924
|
$mat-toolbar-desktop-density-config, $density-scale, height);
|
|
5917
|
-
$height-mobile:
|
|
5925
|
+
$height-mobile: mat-private-density-prop-value(
|
|
5918
5926
|
$mat-toolbar-mobile-density-config, $density-scale, height);
|
|
5919
5927
|
|
|
5920
|
-
@include
|
|
5928
|
+
@include mat-private-density-legacy-compatibility() {
|
|
5921
5929
|
// Set the default height for the toolbar.
|
|
5922
5930
|
@include _mat-toolbar-height($height-desktop);
|
|
5923
5931
|
|
|
@@ -5931,8 +5939,8 @@ $mat-toolbar-mobile-density-config: (
|
|
|
5931
5939
|
}
|
|
5932
5940
|
|
|
5933
5941
|
@mixin mat-toolbar-theme($theme-or-color-config) {
|
|
5934
|
-
$theme:
|
|
5935
|
-
@include
|
|
5942
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
5943
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-toolbar') {
|
|
5936
5944
|
$color: mat-get-color-config($theme);
|
|
5937
5945
|
$density: mat-get-density-config($theme);
|
|
5938
5946
|
$typography: mat-get-typography-config($theme);
|
|
@@ -5941,7 +5949,7 @@ $mat-toolbar-mobile-density-config: (
|
|
|
5941
5949
|
@include mat-toolbar-color($color);
|
|
5942
5950
|
}
|
|
5943
5951
|
@if $density != null {
|
|
5944
|
-
@include
|
|
5952
|
+
@include mat-toolbar-density($density);
|
|
5945
5953
|
}
|
|
5946
5954
|
@if $typography != null {
|
|
5947
5955
|
@include mat-toolbar-typography($typography);
|
|
@@ -5953,7 +5961,6 @@ $mat-toolbar-mobile-density-config: (
|
|
|
5953
5961
|
|
|
5954
5962
|
|
|
5955
5963
|
|
|
5956
|
-
|
|
5957
5964
|
$mat-tooltip-target-height: 22px;
|
|
5958
5965
|
$mat-tooltip-font-size: 10px;
|
|
5959
5966
|
$mat-tooltip-vertical-padding: ($mat-tooltip-target-height - $mat-tooltip-font-size) / 2;
|
|
@@ -5991,8 +5998,8 @@ $mat-tooltip-handset-vertical-padding:
|
|
|
5991
5998
|
@mixin _mat-tooltip-density($config-or-theme) {}
|
|
5992
5999
|
|
|
5993
6000
|
@mixin mat-tooltip-theme($theme-or-color-config) {
|
|
5994
|
-
$theme:
|
|
5995
|
-
@include
|
|
6001
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
6002
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-tooltip') {
|
|
5996
6003
|
$color: mat-get-color-config($theme);
|
|
5997
6004
|
$density: mat-get-density-config($theme);
|
|
5998
6005
|
$typography: mat-get-typography-config($theme);
|
|
@@ -6015,7 +6022,6 @@ $mat-tooltip-handset-vertical-padding:
|
|
|
6015
6022
|
|
|
6016
6023
|
|
|
6017
6024
|
|
|
6018
|
-
|
|
6019
6025
|
@mixin mat-snack-bar-color($config-or-theme) {
|
|
6020
6026
|
$config: mat-get-color-config($config-or-theme);
|
|
6021
6027
|
$is-dark-theme: map-get($config, is-dark);
|
|
@@ -6027,7 +6033,7 @@ $mat-tooltip-handset-vertical-padding:
|
|
|
6027
6033
|
color: if($is-dark-theme, $dark-primary-text, $light-secondary-text);
|
|
6028
6034
|
background: if($is-dark-theme, map-get($mat-grey, 50), #323232);
|
|
6029
6035
|
|
|
6030
|
-
@include
|
|
6036
|
+
@include mat-private-theme-elevation(6, $config);
|
|
6031
6037
|
}
|
|
6032
6038
|
|
|
6033
6039
|
.mat-simple-snackbar-action {
|
|
@@ -6057,8 +6063,8 @@ $mat-tooltip-handset-vertical-padding:
|
|
|
6057
6063
|
@mixin _mat-snack-bar-density($config-or-theme) {}
|
|
6058
6064
|
|
|
6059
6065
|
@mixin mat-snack-bar-theme($theme-or-color-config) {
|
|
6060
|
-
$theme:
|
|
6061
|
-
@include
|
|
6066
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
6067
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-snack-bar') {
|
|
6062
6068
|
$color: mat-get-color-config($theme);
|
|
6063
6069
|
$density: mat-get-density-config($theme);
|
|
6064
6070
|
$typography: mat-get-typography-config($theme);
|
|
@@ -6088,8 +6094,6 @@ $mat-tooltip-handset-vertical-padding:
|
|
|
6088
6094
|
|
|
6089
6095
|
|
|
6090
6096
|
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
6097
|
// Theme styles that only apply to the fill appearance of the form-field.
|
|
6094
6098
|
|
|
6095
6099
|
@mixin mat-form-field-fill-color($config-or-theme) {
|
|
@@ -6187,11 +6191,11 @@ $mat-form-field-fill-dedupe: 0;
|
|
|
6187
6191
|
}
|
|
6188
6192
|
}
|
|
6189
6193
|
|
|
6190
|
-
@mixin
|
|
6194
|
+
@mixin mat-private-form-field-fill-density($config-or-theme) {}
|
|
6191
6195
|
|
|
6192
6196
|
@mixin mat-form-field-fill-theme($theme-or-color-config) {
|
|
6193
|
-
$theme:
|
|
6194
|
-
@include
|
|
6197
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
6198
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field-fill') {
|
|
6195
6199
|
$color: mat-get-color-config($theme);
|
|
6196
6200
|
$density: mat-get-density-config($theme);
|
|
6197
6201
|
$typography: mat-get-typography-config($theme);
|
|
@@ -6200,7 +6204,7 @@ $mat-form-field-fill-dedupe: 0;
|
|
|
6200
6204
|
@include mat-form-field-fill-color($color);
|
|
6201
6205
|
}
|
|
6202
6206
|
@if $density != null {
|
|
6203
|
-
@include
|
|
6207
|
+
@include mat-private-form-field-fill-density($density);
|
|
6204
6208
|
}
|
|
6205
6209
|
@if $typography != null {
|
|
6206
6210
|
@include mat-form-field-fill-typography($typography);
|
|
@@ -6214,7 +6218,6 @@ $mat-form-field-fill-dedupe: 0;
|
|
|
6214
6218
|
|
|
6215
6219
|
|
|
6216
6220
|
|
|
6217
|
-
|
|
6218
6221
|
// Theme styles that only apply to the legacy appearance of the form-field.
|
|
6219
6222
|
|
|
6220
6223
|
@mixin mat-form-field-legacy-color($config-or-theme) {
|
|
@@ -6239,7 +6242,7 @@ $mat-form-field-fill-dedupe: 0;
|
|
|
6239
6242
|
}
|
|
6240
6243
|
|
|
6241
6244
|
&.mat-form-field-disabled .mat-form-field-underline {
|
|
6242
|
-
@include mat-control-disabled-underline($underline-color);
|
|
6245
|
+
@include mat-private-control-disabled-underline($underline-color);
|
|
6243
6246
|
}
|
|
6244
6247
|
}
|
|
6245
6248
|
}
|
|
@@ -6385,11 +6388,11 @@ $mat-form-field-legacy-dedupe: 0;
|
|
|
6385
6388
|
}
|
|
6386
6389
|
}
|
|
6387
6390
|
|
|
6388
|
-
@mixin
|
|
6391
|
+
@mixin mat-private-form-field-legacy-density($config-or-theme) {}
|
|
6389
6392
|
|
|
6390
6393
|
@mixin mat-form-field-legacy-theme($theme-or-color-config) {
|
|
6391
|
-
$theme:
|
|
6392
|
-
@include
|
|
6394
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
6395
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field-legacy') {
|
|
6393
6396
|
$color: mat-get-color-config($theme);
|
|
6394
6397
|
$density: mat-get-density-config($theme);
|
|
6395
6398
|
$typography: mat-get-typography-config($theme);
|
|
@@ -6398,7 +6401,7 @@ $mat-form-field-legacy-dedupe: 0;
|
|
|
6398
6401
|
@include mat-form-field-legacy-color($color);
|
|
6399
6402
|
}
|
|
6400
6403
|
@if $density != null {
|
|
6401
|
-
@include
|
|
6404
|
+
@include mat-private-form-field-legacy-density($density);
|
|
6402
6405
|
}
|
|
6403
6406
|
@if $typography != null {
|
|
6404
6407
|
@include mat-form-field-legacy-typography($typography);
|
|
@@ -6412,7 +6415,6 @@ $mat-form-field-legacy-dedupe: 0;
|
|
|
6412
6415
|
|
|
6413
6416
|
|
|
6414
6417
|
|
|
6415
|
-
|
|
6416
6418
|
// Theme styles that only apply to the outline appearance of the form-field.
|
|
6417
6419
|
|
|
6418
6420
|
@mixin mat-form-field-outline-color($config-or-theme) {
|
|
@@ -6540,11 +6542,11 @@ $mat-form-field-outline-dedupe: 0;
|
|
|
6540
6542
|
}
|
|
6541
6543
|
}
|
|
6542
6544
|
|
|
6543
|
-
@mixin
|
|
6545
|
+
@mixin mat-private-form-field-outline-density($config-or-theme) {}
|
|
6544
6546
|
|
|
6545
6547
|
@mixin mat-form-field-outline-theme($theme-or-color-config) {
|
|
6546
|
-
$theme:
|
|
6547
|
-
@include
|
|
6548
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
6549
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field-outline') {
|
|
6548
6550
|
$color: mat-get-color-config($theme);
|
|
6549
6551
|
$density: mat-get-density-config($theme);
|
|
6550
6552
|
$typography: mat-get-typography-config($theme);
|
|
@@ -6553,7 +6555,7 @@ $mat-form-field-outline-dedupe: 0;
|
|
|
6553
6555
|
@include mat-form-field-outline-color($color);
|
|
6554
6556
|
}
|
|
6555
6557
|
@if $density != null {
|
|
6556
|
-
@include
|
|
6558
|
+
@include mat-private-form-field-outline-density($density);
|
|
6557
6559
|
}
|
|
6558
6560
|
@if $typography != null {
|
|
6559
6561
|
@include mat-form-field-outline-typography($typography);
|
|
@@ -6568,7 +6570,6 @@ $mat-form-field-outline-dedupe: 0;
|
|
|
6568
6570
|
|
|
6569
6571
|
|
|
6570
6572
|
|
|
6571
|
-
|
|
6572
6573
|
// Theme styles that only apply to the standard appearance of the form-field.
|
|
6573
6574
|
|
|
6574
6575
|
@mixin mat-form-field-standard-color($config-or-theme) {
|
|
@@ -6584,18 +6585,18 @@ $mat-form-field-outline-dedupe: 0;
|
|
|
6584
6585
|
}
|
|
6585
6586
|
|
|
6586
6587
|
&.mat-form-field-disabled .mat-form-field-underline {
|
|
6587
|
-
@include mat-control-disabled-underline($underline-color);
|
|
6588
|
+
@include mat-private-control-disabled-underline($underline-color);
|
|
6588
6589
|
}
|
|
6589
6590
|
}
|
|
6590
6591
|
}
|
|
6591
6592
|
|
|
6592
6593
|
@mixin mat-form-field-standard-typography($config-or-theme) {}
|
|
6593
6594
|
|
|
6594
|
-
@mixin
|
|
6595
|
+
@mixin mat-private-form-field-standard-density($config-or-theme) {}
|
|
6595
6596
|
|
|
6596
6597
|
@mixin mat-form-field-standard-theme($theme-or-color-config) {
|
|
6597
|
-
$theme:
|
|
6598
|
-
@include
|
|
6598
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
6599
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field-standard') {
|
|
6599
6600
|
$color: mat-get-color-config($theme);
|
|
6600
6601
|
$density: mat-get-density-config($theme);
|
|
6601
6602
|
$typography: mat-get-typography-config($theme);
|
|
@@ -6604,7 +6605,7 @@ $mat-form-field-outline-dedupe: 0;
|
|
|
6604
6605
|
@include mat-form-field-standard-color($color);
|
|
6605
6606
|
}
|
|
6606
6607
|
@if $density != null {
|
|
6607
|
-
@include
|
|
6608
|
+
@include mat-private-form-field-standard-density($density);
|
|
6608
6609
|
}
|
|
6609
6610
|
@if $typography != null {
|
|
6610
6611
|
@include mat-form-field-standard-typography($typography);
|
|
@@ -6842,17 +6843,17 @@ $mat-form-field-dedupe: 0;
|
|
|
6842
6843
|
@include mat-form-field-outline-typography($config);
|
|
6843
6844
|
}
|
|
6844
6845
|
|
|
6845
|
-
@mixin
|
|
6846
|
+
@mixin mat-form-field-density($config-or-theme) {
|
|
6846
6847
|
$density-scale: mat-get-density-config($config-or-theme);
|
|
6847
|
-
@include
|
|
6848
|
-
@include
|
|
6849
|
-
@include
|
|
6850
|
-
@include
|
|
6848
|
+
@include mat-private-form-field-legacy-density($density-scale);
|
|
6849
|
+
@include mat-private-form-field-standard-density($density-scale);
|
|
6850
|
+
@include mat-private-form-field-fill-density($density-scale);
|
|
6851
|
+
@include mat-private-form-field-outline-density($density-scale);
|
|
6851
6852
|
}
|
|
6852
6853
|
|
|
6853
6854
|
@mixin mat-form-field-theme($theme-or-color-config) {
|
|
6854
|
-
$theme:
|
|
6855
|
-
@include
|
|
6855
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
6856
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field') {
|
|
6856
6857
|
$color: mat-get-color-config($theme);
|
|
6857
6858
|
$density: mat-get-density-config($theme);
|
|
6858
6859
|
$typography: mat-get-typography-config($theme);
|
|
@@ -6861,7 +6862,7 @@ $mat-form-field-dedupe: 0;
|
|
|
6861
6862
|
@include mat-form-field-color($color);
|
|
6862
6863
|
}
|
|
6863
6864
|
@if $density != null {
|
|
6864
|
-
@include
|
|
6865
|
+
@include mat-form-field-density($density);
|
|
6865
6866
|
}
|
|
6866
6867
|
@if $typography != null {
|
|
6867
6868
|
@include mat-form-field-typography($typography);
|
|
@@ -6873,7 +6874,6 @@ $mat-form-field-dedupe: 0;
|
|
|
6873
6874
|
|
|
6874
6875
|
|
|
6875
6876
|
|
|
6876
|
-
|
|
6877
6877
|
$mat-tree-node-height: 48px !default;
|
|
6878
6878
|
// Minimum height for tree nodes in highest density is difficult to determine as
|
|
6879
6879
|
// developers can display arbitrary content. We use a minimum height which ensures
|
|
@@ -6918,11 +6918,11 @@ $mat-tree-density-config: (
|
|
|
6918
6918
|
}
|
|
6919
6919
|
}
|
|
6920
6920
|
|
|
6921
|
-
@mixin
|
|
6921
|
+
@mixin mat-tree-density($config-or-theme) {
|
|
6922
6922
|
$density-scale: mat-get-density-config($config-or-theme);
|
|
6923
|
-
$height:
|
|
6923
|
+
$height: mat-private-density-prop-value($mat-tree-density-config, $density-scale, height);
|
|
6924
6924
|
|
|
6925
|
-
@include
|
|
6925
|
+
@include mat-private-density-legacy-compatibility() {
|
|
6926
6926
|
.mat-tree-node {
|
|
6927
6927
|
min-height: $height;
|
|
6928
6928
|
}
|
|
@@ -6930,8 +6930,8 @@ $mat-tree-density-config: (
|
|
|
6930
6930
|
}
|
|
6931
6931
|
|
|
6932
6932
|
@mixin mat-tree-theme($theme-or-color-config) {
|
|
6933
|
-
$theme:
|
|
6934
|
-
@include
|
|
6933
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
6934
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-tree') {
|
|
6935
6935
|
$color: mat-get-color-config($theme);
|
|
6936
6936
|
$density: mat-get-density-config($theme);
|
|
6937
6937
|
$typography: mat-get-typography-config($theme);
|
|
@@ -6940,7 +6940,7 @@ $mat-tree-density-config: (
|
|
|
6940
6940
|
@include mat-tree-color($color);
|
|
6941
6941
|
}
|
|
6942
6942
|
@if $density != null {
|
|
6943
|
-
@include
|
|
6943
|
+
@include mat-tree-density($density);
|
|
6944
6944
|
}
|
|
6945
6945
|
@if $typography != null {
|
|
6946
6946
|
@include mat-tree-typography($typography);
|
|
@@ -6953,7 +6953,7 @@ $mat-tree-density-config: (
|
|
|
6953
6953
|
|
|
6954
6954
|
// Includes all of the typographic styles.
|
|
6955
6955
|
@mixin angular-material-typography($config-or-theme: null) {
|
|
6956
|
-
$config: if(
|
|
6956
|
+
$config: if(mat-private-is-theme-object($config-or-theme),
|
|
6957
6957
|
mat-get-typography-config($config-or-theme), $config-or-theme);
|
|
6958
6958
|
|
|
6959
6959
|
// If no actual color configuration has been specified, create a default one.
|
|
@@ -7015,7 +7015,7 @@ $mat-tree-density-config: (
|
|
|
7015
7015
|
@include cdk-overlay();
|
|
7016
7016
|
@include cdk-text-field();
|
|
7017
7017
|
|
|
7018
|
-
@include
|
|
7018
|
+
@include mat-private-strong-focus-indicators-positioning();
|
|
7019
7019
|
@include _mat-mdc-core();
|
|
7020
7020
|
}
|
|
7021
7021
|
|
|
@@ -7036,8 +7036,8 @@ $mat-tree-density-config: (
|
|
|
7036
7036
|
// `mat-elevation-z$zValue` where `$zValue` corresponds to the z-space to which the element is
|
|
7037
7037
|
// elevated.
|
|
7038
7038
|
@for $zValue from 0 through 24 {
|
|
7039
|
-
.#{$
|
|
7040
|
-
@include
|
|
7039
|
+
.#{$mat-elevation-prefix}#{$zValue} {
|
|
7040
|
+
@include mat-private-theme-elevation($zValue, $config);
|
|
7041
7041
|
}
|
|
7042
7042
|
}
|
|
7043
7043
|
|
|
@@ -7051,11 +7051,11 @@ $mat-tree-density-config: (
|
|
|
7051
7051
|
|
|
7052
7052
|
// Mixin that renders all of the core styles that depend on the theme.
|
|
7053
7053
|
@mixin mat-core-theme($theme-or-color-config) {
|
|
7054
|
-
$theme:
|
|
7054
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
7055
7055
|
// Wrap the sub-theme includes in the duplicate theme styles mixin. This ensures that
|
|
7056
7056
|
// there won't be multiple warnings. e.g. if `mat-core-theme` reports a warning, then
|
|
7057
7057
|
// the imported themes (such as `mat-ripple-theme`) should not report again.
|
|
7058
|
-
@include
|
|
7058
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-core') {
|
|
7059
7059
|
@include mat-ripple-theme($theme);
|
|
7060
7060
|
@include mat-option-theme($theme);
|
|
7061
7061
|
@include mat-optgroup-theme($theme);
|
|
@@ -7120,7 +7120,8 @@ $mat-tree-density-config: (
|
|
|
7120
7120
|
|
|
7121
7121
|
// Create a theme.
|
|
7122
7122
|
@mixin angular-material-theme($theme-or-color-config) {
|
|
7123
|
-
|
|
7123
|
+
$dedupe-key: 'angular-material-theme';
|
|
7124
|
+
@include mat-private-check-duplicate-theme-styles($theme-or-color-config, $dedupe-key) {
|
|
7124
7125
|
@include mat-core-theme($theme-or-color-config);
|
|
7125
7126
|
@include mat-autocomplete-theme($theme-or-color-config);
|
|
7126
7127
|
@include mat-badge-theme($theme-or-color-config);
|
|
@@ -7160,11 +7161,12 @@ $mat-tree-density-config: (
|
|
|
7160
7161
|
}
|
|
7161
7162
|
|
|
7162
7163
|
|
|
7164
|
+
|
|
7163
7165
|
// Includes all of the color styles.
|
|
7164
7166
|
@mixin angular-material-color($config-or-theme) {
|
|
7165
7167
|
// In case a theme object has been passed instead of a configuration for
|
|
7166
7168
|
// the color system, extract the color config from the theme object.
|
|
7167
|
-
$config: if(
|
|
7169
|
+
$config: if(mat-private-is-theme-object($config-or-theme),
|
|
7168
7170
|
mat-get-color-config($config-or-theme), $config-or-theme);
|
|
7169
7171
|
|
|
7170
7172
|
@if $config == null {
|
|
@@ -7180,22 +7182,37 @@ $mat-tree-density-config: (
|
|
|
7180
7182
|
|
|
7181
7183
|
|
|
7182
7184
|
|
|
7185
|
+
|
|
7186
|
+
|
|
7187
|
+
|
|
7188
|
+
|
|
7189
|
+
|
|
7190
|
+
|
|
7191
|
+
|
|
7183
7192
|
// Includes all of the density styles.
|
|
7184
|
-
@mixin
|
|
7193
|
+
@mixin angular-material-density($config-or-theme) {
|
|
7185
7194
|
// In case a theme object has been passed instead of a configuration for
|
|
7186
7195
|
// the density system, extract the density config from the theme object.
|
|
7187
|
-
$config: if(
|
|
7196
|
+
$config: if(mat-private-is-theme-object($config-or-theme),
|
|
7188
7197
|
mat-get-density-config($config-or-theme), $config-or-theme);
|
|
7189
7198
|
|
|
7190
7199
|
@if $config == null {
|
|
7191
7200
|
@error 'No density configuration specified.';
|
|
7192
7201
|
}
|
|
7193
7202
|
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7203
|
+
// TODO: COMP-309: Do not use individual mixins. Instead, use the all-theme mixin and only
|
|
7204
|
+
// specify a `density` config while setting `color` and `typography` to `null`. This is currently
|
|
7205
|
+
// not possible as it would introduce a circular dependency for density because the `mat-core`
|
|
7206
|
+
// mixin that is transitively loaded by the `all-theme` file, imports `all-density` which
|
|
7207
|
+
// would then load `all-theme` again. This ultimately results a circular dependency.
|
|
7208
|
+
|
|
7209
|
+
@include mat-expansion-panel-density($config);
|
|
7210
|
+
@include mat-stepper-density($config);
|
|
7211
|
+
@include mat-toolbar-density($config);
|
|
7212
|
+
@include mat-tree-density($config);
|
|
7213
|
+
@include mat-paginator-density($config);
|
|
7214
|
+
@include mat-form-field-density($config);
|
|
7215
|
+
@include mat-button-toggle-density($config);
|
|
7199
7216
|
}
|
|
7200
7217
|
|
|
7201
7218
|
|