@angular/material 11.0.3 → 11.1.1
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/LICENSE +1 -1
- package/_theming.scss +392 -351
- 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 +32 -10
- 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 +256 -84
- 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 +15 -3
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +3 -3
- 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 +10 -2
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +1 -1
- 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 +9 -1
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +1 -1
- 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 +18 -6
- 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 +9 -1
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +4 -4
- 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 +19 -5
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +2 -2
- 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 +66 -39
- 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 +12 -3
- 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/style/_vendor-prefixes.scss +3 -3
- 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/core/typography/_typography.scss +39 -9
- package/datepicker/_datepicker-theme.scss +15 -16
- 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/datepicker/year-view.d.ts +1 -1
- package/dialog/_dialog-theme.scss +4 -5
- package/divider/_divider-theme.scss +2 -3
- package/esm2015/autocomplete/autocomplete-trigger.js +11 -3
- 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/calendar-body.js +1 -1
- package/esm2015/datepicker/date-range-input-parts.js +14 -16
- 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 +69 -26
- 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 +4 -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/datepicker/year-view.js +1 -1
- package/esm2015/dialog/dialog-ref.js +2 -2
- package/esm2015/expansion/expansion-panel-header.js +8 -3
- package/esm2015/expansion/expansion-panel.js +1 -1
- package/esm2015/form-field/form-field.js +2 -2
- package/esm2015/form-field/testing/form-field-harness.js +14 -9
- 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 +10 -4
- package/esm2015/menu/menu.js +1 -1
- 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/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/sort/sort-header.js +11 -5
- package/esm2015/stepper/step-header.js +8 -3
- package/esm2015/table/table-data-source.js +34 -21
- package/esm2015/table/table.js +1 -1
- 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/node.js +4 -3
- package/esm2015/tree/padding.js +1 -1
- package/esm2015/tree/testing/tree-harness.js +2 -2
- package/esm2015/tree/toggle.js +1 -1
- package/esm2015/tree/tree.js +1 -1
- package/expansion/_expansion-theme.scss +10 -11
- 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 +20 -6
- 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 +281 -120
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog.js +1 -1
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/expansion.js +7 -2
- 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 +1 -1
- 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.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 +12 -6
- 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/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/sort.js +10 -4
- package/fesm2015/sort.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 +35 -22
- 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/fesm2015/tree.js +3 -2
- package/fesm2015/tree.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/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 -1
- 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/select/_select-theme.scss +5 -6
- 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/sort/index.metadata.json +1 -1
- package/sort/sort-header.d.ts +2 -1
- 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/tree/index.metadata.json +1 -1
- package/tree/node.d.ts +7 -6
- package/tree/padding.d.ts +1 -1
- package/tree/toggle.d.ts +1 -1
- package/tree/tree.d.ts +1 -1
- 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
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
@import 'palette';
|
|
2
2
|
|
|
3
|
+
// Whether duplication warnings should be disabled. Warnings enabled by default.
|
|
4
|
+
$mat-theme-ignore-duplication-warnings: false !default;
|
|
5
|
+
|
|
3
6
|
// Whether density should be generated by default.
|
|
4
7
|
$_mat-theme-generate-default-density: true !default;
|
|
5
8
|
|
|
9
|
+
// Warning that will be printed if duplicated styles are generated by a theme.
|
|
10
|
+
$_mat-theme-duplicate-warning: 'Read more about how style duplication can be avoided in a ' +
|
|
11
|
+
'dedicated guide. https://github.com/angular/components/blob/master/guides/duplicate-theming-styles.md';
|
|
12
|
+
|
|
13
|
+
// These variable are not intended to be overridden externally. They use `!default` to
|
|
14
|
+
// avoid being reset every time this file is imported.
|
|
15
|
+
$_mat-theme-emitted-color: () !default;
|
|
16
|
+
$_mat-theme-emitted-typography: () !default;
|
|
17
|
+
$_mat-theme-emitted-density: () !default;
|
|
18
|
+
|
|
6
19
|
// For a given hue in a palette, return the contrast color from the map of contrast palettes.
|
|
7
20
|
// @param $color-map
|
|
8
21
|
// @param $hue
|
|
@@ -84,31 +97,6 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
84
97
|
@return $theme;
|
|
85
98
|
}
|
|
86
99
|
|
|
87
|
-
// Creates a backwards compatible theme. Previously in Angular Material, theme objects
|
|
88
|
-
// contained the color configuration directly. With the recent refactoring of the theming
|
|
89
|
-
// system to allow for density and typography configurations, this is no longer the case.
|
|
90
|
-
// To ensure that constructed themes which will be passed to custom theme mixins do not break,
|
|
91
|
-
// we copy the color configuration and put its properties at the top-level of the theme object.
|
|
92
|
-
// Here is an example of a pattern that should still work until it's officially marked as a
|
|
93
|
-
// breaking change:
|
|
94
|
-
//
|
|
95
|
-
// @mixin my-custom-component-theme($theme) {
|
|
96
|
-
// .my-comp {
|
|
97
|
-
// background-color: mat-color(map-get($theme, primary));
|
|
98
|
-
// }
|
|
99
|
-
// }
|
|
100
|
-
//
|
|
101
|
-
// Note that the `$theme.primary` key does usually not exist since the color configuration
|
|
102
|
-
// is stored in `$theme.color` which contains a property for `primary`. This method copies
|
|
103
|
-
// the map from `$theme.color` to `$theme` for backwards compatibility.
|
|
104
|
-
@function _mat-create-backwards-compatibility-theme($theme) {
|
|
105
|
-
@if not map-get($theme, color) {
|
|
106
|
-
@return $theme;
|
|
107
|
-
}
|
|
108
|
-
$color: map-get($theme, color);
|
|
109
|
-
@return map-merge($theme, $color);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
100
|
// Creates a light-themed color configuration from the specified
|
|
113
101
|
// primary, accent and warn palettes.
|
|
114
102
|
@function _mat-create-light-color-config($primary, $accent, $warn: null) {
|
|
@@ -153,7 +141,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
153
141
|
// If the legacy pattern is used, we generate a container object only with a light-themed
|
|
154
142
|
// configuration for the `color` theming part.
|
|
155
143
|
@if $accent != null {
|
|
156
|
-
@return
|
|
144
|
+
@return mat-private-create-backwards-compatibility-theme(_mat-validate-theme((
|
|
157
145
|
_is-legacy-theme: true,
|
|
158
146
|
color: _mat-create-light-color-config($primary, $accent, $warn),
|
|
159
147
|
)));
|
|
@@ -169,7 +157,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
169
157
|
$warn: map-get($color-settings, warn);
|
|
170
158
|
$result: map-merge($result, (color: _mat-create-light-color-config($primary, $accent, $warn)));
|
|
171
159
|
}
|
|
172
|
-
@return
|
|
160
|
+
@return mat-private-create-backwards-compatibility-theme(_mat-validate-theme($result));
|
|
173
161
|
}
|
|
174
162
|
|
|
175
163
|
// Creates a container object for a dark theme to be given to individual component theme mixins.
|
|
@@ -190,7 +178,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
190
178
|
// If the legacy pattern is used, we generate a container object only with a dark-themed
|
|
191
179
|
// configuration for the `color` theming part.
|
|
192
180
|
@if $accent != null {
|
|
193
|
-
@return
|
|
181
|
+
@return mat-private-create-backwards-compatibility-theme(_mat-validate-theme((
|
|
194
182
|
_is-legacy-theme: true,
|
|
195
183
|
color: _mat-create-dark-color-config($primary, $accent, $warn),
|
|
196
184
|
)));
|
|
@@ -206,13 +194,13 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
206
194
|
$warn: map-get($color-settings, warn);
|
|
207
195
|
$result: map-merge($result, (color: _mat-create-dark-color-config($primary, $accent, $warn)));
|
|
208
196
|
}
|
|
209
|
-
@return
|
|
197
|
+
@return mat-private-create-backwards-compatibility-theme(_mat-validate-theme($result));
|
|
210
198
|
}
|
|
211
199
|
|
|
212
200
|
/// Gets the color configuration from the given theme or configuration.
|
|
213
201
|
@function mat-get-color-config($theme, $default: null) {
|
|
214
202
|
// If a configuration has been passed, return the config directly.
|
|
215
|
-
@if not
|
|
203
|
+
@if not mat-private-is-theme-object($theme) {
|
|
216
204
|
@return $theme;
|
|
217
205
|
}
|
|
218
206
|
// If the theme has been constructed through the legacy theming API, we use the theme object
|
|
@@ -220,7 +208,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
220
208
|
// backwards compatibility, we copied the color configuration from `$theme.color` to `$theme`.
|
|
221
209
|
// Hence developers could customize the colors at top-level and want to respect these changes
|
|
222
210
|
// TODO: Remove when legacy theming API is removed.
|
|
223
|
-
@if
|
|
211
|
+
@if mat-private-is-legacy-constructed-theme($theme) {
|
|
224
212
|
@return $theme;
|
|
225
213
|
}
|
|
226
214
|
@if map-has-key($theme, color) {
|
|
@@ -232,7 +220,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
232
220
|
/// Gets the density configuration from the given theme or configuration.
|
|
233
221
|
@function mat-get-density-config($theme-or-config, $default: 0) {
|
|
234
222
|
// If a configuration has been passed, return the config directly.
|
|
235
|
-
@if not
|
|
223
|
+
@if not mat-private-is-theme-object($theme-or-config) {
|
|
236
224
|
@return $theme-or-config;
|
|
237
225
|
}
|
|
238
226
|
// In case a theme has been passed, extract the configuration if present,
|
|
@@ -247,7 +235,7 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
247
235
|
/// For backwards compatibility, typography is not included by default.
|
|
248
236
|
@function mat-get-typography-config($theme-or-config, $default: null) {
|
|
249
237
|
// If a configuration has been passed, return the config directly.
|
|
250
|
-
@if not
|
|
238
|
+
@if not mat-private-is-theme-object($theme-or-config) {
|
|
251
239
|
@return $theme-or-config;
|
|
252
240
|
}
|
|
253
241
|
// In case a theme has been passed, extract the configuration if present,
|
|
@@ -258,9 +246,106 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
258
246
|
@return $default;
|
|
259
247
|
}
|
|
260
248
|
|
|
249
|
+
|
|
250
|
+
//
|
|
251
|
+
// Private APIs
|
|
252
|
+
//
|
|
253
|
+
|
|
254
|
+
// Checks if configurations that have been declared in the given theme have been generated
|
|
255
|
+
// before. If so, warnings will be reported. This should notify developers in case duplicate
|
|
256
|
+
// styles are accidentally generated due to wrong usage of the all-theme mixins.
|
|
257
|
+
//
|
|
258
|
+
// Additionally, this mixin controls the default value for the density configuration. By
|
|
259
|
+
// default, density styles are generated at scale zero. If the same density styles would be
|
|
260
|
+
// generated a second time though, the default value will change to avoid duplicate styles.
|
|
261
|
+
//
|
|
262
|
+
// The mixin keeps track of all configurations in a list that is scoped to the specified
|
|
263
|
+
// id. This is necessary because a given theme can be passed to multiple disjoint theme mixins
|
|
264
|
+
// (e.g. `angular-material-theme` and `angular-material-mdc-theme`) without causing any
|
|
265
|
+
// style duplication.
|
|
266
|
+
@mixin mat-private-check-duplicate-theme-styles($theme-or-color-config, $id) {
|
|
267
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
268
|
+
$color-config: mat-get-color-config($theme);
|
|
269
|
+
$density-config: mat-get-density-config($theme);
|
|
270
|
+
$typography-config: mat-get-typography-config($theme);
|
|
271
|
+
// Lists of previous `color`, `density` and `typography` configurations.
|
|
272
|
+
$previous-color: map-get($_mat-theme-emitted-color, $id) or ();
|
|
273
|
+
$previous-typography: map-get($_mat-theme-emitted-typography, $id) or ();
|
|
274
|
+
$previous-density: map-get($_mat-theme-emitted-density, $id) or ();
|
|
275
|
+
// Whether duplicate legacy density styles would be generated.
|
|
276
|
+
$duplicate-legacy-density: false;
|
|
277
|
+
|
|
278
|
+
// Check if the color configuration has been generated before.
|
|
279
|
+
@if $color-config != null {
|
|
280
|
+
@if index($previous-color, $color-config) != null and
|
|
281
|
+
not $mat-theme-ignore-duplication-warnings {
|
|
282
|
+
@warn 'The same color styles are generated multiple times. ' +
|
|
283
|
+
$_mat-theme-duplicate-warning;
|
|
284
|
+
}
|
|
285
|
+
$previous-color: append($previous-color, $color-config);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Check if the typography configuration has been generated before.
|
|
289
|
+
@if $typography-config != null {
|
|
290
|
+
@if index($previous-typography, $typography-config) != null and
|
|
291
|
+
not $mat-theme-ignore-duplication-warnings {
|
|
292
|
+
@warn 'The same typography styles are generated multiple times. ' +
|
|
293
|
+
$_mat-theme-duplicate-warning;
|
|
294
|
+
}
|
|
295
|
+
$previous-typography: append($previous-typography, $typography-config);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// Check if the density configuration has been generated before.
|
|
299
|
+
@if $density-config != null {
|
|
300
|
+
@if index($previous-density, $density-config) != null {
|
|
301
|
+
// Only report a warning if density styles would be duplicated for non-legacy theme
|
|
302
|
+
// definitions. For legacy themes, we have compatibility logic that avoids duplication
|
|
303
|
+
// of default density styles. We don't want to report a warning in those cases.
|
|
304
|
+
@if mat-private-is-legacy-constructed-theme($theme) {
|
|
305
|
+
$duplicate-legacy-density: true;
|
|
306
|
+
}
|
|
307
|
+
@else if not $mat-theme-ignore-duplication-warnings {
|
|
308
|
+
@warn 'The same density styles are generated multiple times. ' +
|
|
309
|
+
$_mat-theme-duplicate-warning;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
$previous-density: append($previous-density, $density-config);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
$_mat-theme-emitted-color: map-merge(
|
|
316
|
+
$_mat-theme-emitted-color, ($id: $previous-color)) !global;
|
|
317
|
+
$_mat-theme-emitted-density: map-merge(
|
|
318
|
+
$_mat-theme-emitted-density, ($id: $previous-density)) !global;
|
|
319
|
+
$_mat-theme-emitted-typography: map-merge(
|
|
320
|
+
$_mat-theme-emitted-typography, ($id: $previous-typography)) !global;
|
|
321
|
+
|
|
322
|
+
// Optionally, consumers of this mixin can wrap contents inside so that nested
|
|
323
|
+
// duplicate style checks do not report another warning. e.g. if developers include
|
|
324
|
+
// the `angular-material-theme` mixin twice, only the top-level duplicate styles check
|
|
325
|
+
// should report a warning. Not all individual components should report a warning too.
|
|
326
|
+
$orig-mat-theme-ignore-duplication-warnings: $mat-theme-ignore-duplication-warnings;
|
|
327
|
+
$mat-theme-ignore-duplication-warnings: true !global;
|
|
328
|
+
|
|
329
|
+
// If duplicate default density styles would be generated for a legacy constructed theme,
|
|
330
|
+
// we adjust the density generation so that no density styles are generated by default.
|
|
331
|
+
// If no default density styles have been generated yet, we ensure that the styles
|
|
332
|
+
// are generated at root. For legacy themes our goal is to generate default density
|
|
333
|
+
// styles **once** and at root. This matches the old behavior where density styles were
|
|
334
|
+
// part of the base component styles (that did not use view encapsulation).
|
|
335
|
+
// TODO: Remove this compatibility logic when the legacy theming API is removed.
|
|
336
|
+
$mat-private-density-generate-at-root: mat-private-is-legacy-constructed-theme($theme) !global;
|
|
337
|
+
$mat-private-density-generate-styles: not $duplicate-legacy-density !global;
|
|
338
|
+
|
|
339
|
+
@content;
|
|
340
|
+
$mat-theme-ignore-duplication-warnings: $orig-mat-theme-ignore-duplication-warnings !global;
|
|
341
|
+
|
|
342
|
+
$mat-private-density-generate-at-root: false !global;
|
|
343
|
+
$mat-private-density-generate-styles: true !global;
|
|
344
|
+
}
|
|
345
|
+
|
|
261
346
|
// Checks whether the given value resolves to a theme object. Theme objects are always
|
|
262
347
|
// of type `map` and can optionally only specify `color`, `density` or `typography`.
|
|
263
|
-
@function
|
|
348
|
+
@function mat-private-is-theme-object($value) {
|
|
264
349
|
@return type-of($value) == 'map' and (
|
|
265
350
|
map-has-key($value, color) or
|
|
266
351
|
map-has-key($value, density) or
|
|
@@ -270,10 +355,35 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
270
355
|
}
|
|
271
356
|
|
|
272
357
|
// Checks whether a given value corresponds to a legacy constructed theme.
|
|
273
|
-
@function
|
|
358
|
+
@function mat-private-is-legacy-constructed-theme($value) {
|
|
274
359
|
@return type-of($value) == 'map' and map-get($value, '_is-legacy-theme');
|
|
275
360
|
}
|
|
276
361
|
|
|
362
|
+
// Creates a backwards compatible theme. Previously in Angular Material, theme objects
|
|
363
|
+
// contained the color configuration directly. With the recent refactoring of the theming
|
|
364
|
+
// system to allow for density and typography configurations, this is no longer the case.
|
|
365
|
+
// To ensure that constructed themes which will be passed to custom theme mixins do not break,
|
|
366
|
+
// we copy the color configuration and put its properties at the top-level of the theme object.
|
|
367
|
+
// Here is an example of a pattern that should still work until it's officially marked as a
|
|
368
|
+
// breaking change:
|
|
369
|
+
//
|
|
370
|
+
// @mixin my-custom-component-theme($theme) {
|
|
371
|
+
// .my-comp {
|
|
372
|
+
// background-color: mat-color(map-get($theme, primary));
|
|
373
|
+
// }
|
|
374
|
+
// }
|
|
375
|
+
//
|
|
376
|
+
// Note that the `$theme.primary` key does usually not exist since the color configuration
|
|
377
|
+
// is stored in `$theme.color` which contains a property for `primary`. This method copies
|
|
378
|
+
// the map from `$theme.color` to `$theme` for backwards compatibility.
|
|
379
|
+
@function mat-private-create-backwards-compatibility-theme($theme) {
|
|
380
|
+
@if not map-get($theme, color) {
|
|
381
|
+
@return $theme;
|
|
382
|
+
}
|
|
383
|
+
$color: map-get($theme, color);
|
|
384
|
+
@return map-merge($theme, $color);
|
|
385
|
+
}
|
|
386
|
+
|
|
277
387
|
// Gets the theme from the given value that is either already a theme, or a color configuration.
|
|
278
388
|
// This handles the legacy case where developers pass a color configuration directly to the
|
|
279
389
|
// theme mixin. Before we introduced the new pattern for constructing a theme, developers passed
|
|
@@ -281,11 +391,11 @@ $_mat-theme-generate-default-density: true !default;
|
|
|
281
391
|
// construct a theme manually and pass it to a theme. We support this for backwards compatibility.
|
|
282
392
|
// TODO(devversion): remove this in the future. Constructing themes manually is rare,
|
|
283
393
|
// and the code can be easily updated to the new API.
|
|
284
|
-
@function
|
|
285
|
-
@if
|
|
394
|
+
@function mat-private-legacy-get-theme($theme-or-color-config) {
|
|
395
|
+
@if mat-private-is-theme-object($theme-or-color-config) {
|
|
286
396
|
@return $theme-or-color-config;
|
|
287
397
|
}
|
|
288
|
-
@return
|
|
398
|
+
@return mat-private-create-backwards-compatibility-theme((
|
|
289
399
|
_is-legacy-theme: true,
|
|
290
400
|
color: $theme-or-color-config
|
|
291
401
|
));
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
// Includes all of the typographic styles.
|
|
41
41
|
@mixin angular-material-typography($config-or-theme: null) {
|
|
42
|
-
$config: if(
|
|
42
|
+
$config: if(mat-private-is-theme-object($config-or-theme),
|
|
43
43
|
mat-get-typography-config($config-or-theme), $config-or-theme);
|
|
44
44
|
|
|
45
45
|
// If no actual color configuration has been specified, create a default one.
|
|
@@ -74,24 +74,54 @@
|
|
|
74
74
|
@return map-get($config, headline-1) != null;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
// Whether a config is for the Material Design 2014 typography system.
|
|
78
|
+
@function mat-private-typography-is-2014-config($config) {
|
|
79
|
+
@return map-get($config, headline) != null;
|
|
80
|
+
}
|
|
81
|
+
|
|
77
82
|
// Given a config for either the 2014 or 2018 Material Design typography system,
|
|
78
83
|
// produces a normalized typography config for the 2014 Material Design typography system.
|
|
79
84
|
// 2014 - https://material.io/archive/guidelines/style/typography.html#typography-styles
|
|
80
85
|
// 2018 - https://material.io/design/typography/the-type-system.html#type-scale
|
|
81
|
-
@function mat-private-typography-
|
|
86
|
+
@function mat-private-typography-to-2014-config($config) {
|
|
82
87
|
@if mat-private-typography-is-2018-config($config) {
|
|
83
88
|
@return mat-typography-config(
|
|
84
|
-
$display-
|
|
85
|
-
$display-
|
|
86
|
-
$display-
|
|
87
|
-
$
|
|
88
|
-
$
|
|
89
|
-
$
|
|
90
|
-
$subheading-
|
|
89
|
+
$display-4: map-get($config, headline-1),
|
|
90
|
+
$display-3: map-get($config, headline-2),
|
|
91
|
+
$display-2: map-get($config, headline-3),
|
|
92
|
+
$display-1: map-get($config, headline-4),
|
|
93
|
+
$headline: map-get($config, headline-5),
|
|
94
|
+
$title: map-get($config, headline-6),
|
|
95
|
+
$subheading-2: map-get($config, subtitle-1),
|
|
96
|
+
$subheading-1: map-get($config, subtitle-2),
|
|
91
97
|
$body-2: map-get($config, body-1),
|
|
92
98
|
$body-1: map-get($config, body-2),
|
|
93
|
-
$caption: map-get($config, caption),
|
|
94
99
|
$button: map-get($config, button),
|
|
100
|
+
$caption: map-get($config, caption),
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
@return $config;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Given a config for either the 2014 or 2018 Material Design typography system,
|
|
107
|
+
// produces a normalized typography config for the 2018 Material Design typography system.
|
|
108
|
+
// 2014 - https://material.io/archive/guidelines/style/typography.html#typography-styles
|
|
109
|
+
// 2018 - https://material.io/design/typography/the-type-system.html#type-scale
|
|
110
|
+
@function mat-private-typography-to-2018-config($config) {
|
|
111
|
+
@if mat-private-typography-is-2014-config($config) {
|
|
112
|
+
@return (
|
|
113
|
+
headline-1: map-get($config, display-4),
|
|
114
|
+
headline-2: map-get($config, display-3),
|
|
115
|
+
headline-3: map-get($config, display-2),
|
|
116
|
+
headline-4: map-get($config, display-1),
|
|
117
|
+
headline-5: map-get($config, headline),
|
|
118
|
+
headline-6: map-get($config, title),
|
|
119
|
+
subtitle-1: map-get($config, subheading-2),
|
|
120
|
+
subtitle-2: map-get($config, subheading-1),
|
|
121
|
+
body-1: map-get($config, body-2),
|
|
122
|
+
body-2: map-get($config, body-1),
|
|
123
|
+
button: map-get($config, button),
|
|
124
|
+
caption: map-get($config, caption),
|
|
95
125
|
);
|
|
96
126
|
}
|
|
97
127
|
@return $config;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
@import '../core/style/
|
|
1
|
+
@import '../core/style/private';
|
|
2
2
|
@import '../core/theming/palette';
|
|
3
3
|
@import '../core/theming/theming';
|
|
4
|
-
@import '../core/theming/check-duplicate-styles';
|
|
5
4
|
@import '../core/typography/typography-utils';
|
|
6
5
|
|
|
7
6
|
|
|
@@ -38,6 +37,16 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
38
37
|
box-shadow: inset 0 0 0 $mat-datepicker-selected-today-box-shadow-width
|
|
39
38
|
mat-color($palette, default-contrast);
|
|
40
39
|
}
|
|
40
|
+
|
|
41
|
+
.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover,
|
|
42
|
+
.cdk-keyboard-focused .mat-calendar-body-active,
|
|
43
|
+
.cdk-program-focused .mat-calendar-body-active {
|
|
44
|
+
& > .mat-calendar-body-cell-content {
|
|
45
|
+
@include _mat-datepicker-unselected-cell {
|
|
46
|
+
background-color: mat-color($palette, 0.3);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
41
50
|
}
|
|
42
51
|
|
|
43
52
|
// Utility mixin to target cells that aren't selected. Used to make selector easier to follow.
|
|
@@ -93,16 +102,6 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
93
102
|
color: $disabled-color;
|
|
94
103
|
}
|
|
95
104
|
|
|
96
|
-
.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover,
|
|
97
|
-
.cdk-keyboard-focused .mat-calendar-body-active,
|
|
98
|
-
.cdk-program-focused .mat-calendar-body-active {
|
|
99
|
-
& > .mat-calendar-body-cell-content {
|
|
100
|
-
@include _mat-datepicker-unselected-cell {
|
|
101
|
-
background-color: mat-color($background, hover);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
105
|
.mat-calendar-body-in-preview {
|
|
107
106
|
$divider-color: mat-color($foreground, divider);
|
|
108
107
|
|
|
@@ -145,7 +144,7 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
145
144
|
@include _mat-datepicker-color(map-get($config, primary));
|
|
146
145
|
|
|
147
146
|
.mat-datepicker-content {
|
|
148
|
-
@include
|
|
147
|
+
@include mat-private-theme-elevation(4, $config);
|
|
149
148
|
background-color: mat-color($background, card);
|
|
150
149
|
color: mat-color($foreground, text);
|
|
151
150
|
|
|
@@ -159,7 +158,7 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
.mat-datepicker-content-touch {
|
|
162
|
-
@include
|
|
161
|
+
@include mat-private-theme-elevation(0, $config);
|
|
163
162
|
}
|
|
164
163
|
|
|
165
164
|
.mat-datepicker-toggle-active {
|
|
@@ -244,8 +243,8 @@ $mat-calendar-weekday-table-font-size: 11px !default;
|
|
|
244
243
|
@mixin _mat-datepicker-density($config-or-theme) {}
|
|
245
244
|
|
|
246
245
|
@mixin mat-datepicker-theme($theme-or-color-config) {
|
|
247
|
-
$theme:
|
|
248
|
-
@include
|
|
246
|
+
$theme: mat-private-legacy-get-theme($theme-or-color-config);
|
|
247
|
+
@include mat-private-check-duplicate-theme-styles($theme, 'mat-datepicker') {
|
|
249
248
|
$color: mat-get-color-config($theme);
|
|
250
249
|
$density: mat-get-density-config($theme);
|
|
251
250
|
$typography: mat-get-typography-config($theme);
|
|
@@ -67,8 +67,9 @@ declare abstract class MatDateRangeInputPartBase<D> extends MatDatepickerInputBa
|
|
|
67
67
|
_getMaxDate(): D | null;
|
|
68
68
|
/** Gets the date filter function from the range input. */
|
|
69
69
|
protected _getDateFilter(): DateFilterFn<D>;
|
|
70
|
-
protected _outsideValueChanged: () => void;
|
|
71
70
|
protected _parentDisabled(): boolean;
|
|
71
|
+
protected _shouldHandleChangeEvent({ source }: DateSelectionModelChange<DateRange<D>>): boolean;
|
|
72
|
+
protected _assignValueProgrammatically(value: D | null): void;
|
|
72
73
|
}
|
|
73
74
|
declare const _MatDateRangeInputBase: CanUpdateErrorStateCtor & typeof MatDateRangeInputPartBase;
|
|
74
75
|
/** Input for entering the start date in a `mat-date-range-input`. */
|
|
@@ -81,7 +82,6 @@ export declare class MatStartDate<D> extends _MatDateRangeInputBase<D> implement
|
|
|
81
82
|
protected _validator: ValidatorFn | null;
|
|
82
83
|
protected _getValueFromModel(modelValue: DateRange<D>): D | null;
|
|
83
84
|
protected _assignValueToModel(value: D | null): void;
|
|
84
|
-
protected _canEmitChangeEvent: (event: DateSelectionModelChange<DateRange<D>>) => boolean;
|
|
85
85
|
protected _formatValue(value: D | null): void;
|
|
86
86
|
/** Gets the value that should be used when mirroring the input's size. */
|
|
87
87
|
getMirrorValue(): string;
|
|
@@ -97,7 +97,6 @@ export declare class MatEndDate<D> extends _MatDateRangeInputBase<D> implements
|
|
|
97
97
|
protected _validator: ValidatorFn | null;
|
|
98
98
|
protected _getValueFromModel(modelValue: DateRange<D>): D | null;
|
|
99
99
|
protected _assignValueToModel(value: D | null): void;
|
|
100
|
-
protected _canEmitChangeEvent: (event: DateSelectionModelChange<DateRange<D>>) => boolean;
|
|
101
100
|
_onKeydown(event: KeyboardEvent): void;
|
|
102
101
|
static ngAcceptInputType_disabled: BooleanInput;
|
|
103
102
|
}
|
|
@@ -12,15 +12,16 @@ import { NgControl, ControlContainer } from '@angular/forms';
|
|
|
12
12
|
import { Subject } from 'rxjs';
|
|
13
13
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
14
14
|
import { MatStartDate, MatEndDate, MatDateRangeInputParent } from './date-range-input-parts';
|
|
15
|
-
import { MatDatepickerControl } from './datepicker-base';
|
|
15
|
+
import { MatDatepickerControl, MatDatepickerPanel } from './datepicker-base';
|
|
16
16
|
import { DateFilterFn } from './datepicker-input-base';
|
|
17
|
-
import {
|
|
17
|
+
import { MatDateRangePickerInput } from './date-range-picker';
|
|
18
18
|
import { DateRange } from './date-selection-model';
|
|
19
19
|
export declare class MatDateRangeInput<D> implements MatFormFieldControl<DateRange<D>>, MatDatepickerControl<D>, MatDateRangeInputParent<D>, MatDateRangePickerInput<D>, AfterContentInit, OnChanges, OnDestroy {
|
|
20
20
|
private _changeDetectorRef;
|
|
21
21
|
private _elementRef;
|
|
22
22
|
private _dateAdapter;
|
|
23
23
|
private _formField?;
|
|
24
|
+
private _closedSubscription;
|
|
24
25
|
/** Current value of the range input. */
|
|
25
26
|
get value(): DateRange<D> | null;
|
|
26
27
|
/** Unique ID for the input. */
|
|
@@ -38,8 +39,8 @@ export declare class MatDateRangeInput<D> implements MatFormFieldControl<DateRan
|
|
|
38
39
|
*/
|
|
39
40
|
get placeholder(): string;
|
|
40
41
|
/** The range picker that this input is associated with. */
|
|
41
|
-
get rangePicker():
|
|
42
|
-
set rangePicker(rangePicker:
|
|
42
|
+
get rangePicker(): MatDatepickerPanel<MatDatepickerControl<D>, DateRange<D>, D>;
|
|
43
|
+
set rangePicker(rangePicker: MatDatepickerPanel<MatDatepickerControl<D>, DateRange<D>, D>);
|
|
43
44
|
private _rangePicker;
|
|
44
45
|
/** Whether the input is required. */
|
|
45
46
|
get required(): boolean;
|
|
@@ -62,6 +62,12 @@ export declare abstract class MatDateSelectionModel<S, D = ExtractDateTypeFromSe
|
|
|
62
62
|
abstract isValid(): boolean;
|
|
63
63
|
/** Checks whether the current selection is complete. */
|
|
64
64
|
abstract isComplete(): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Clones the selection model.
|
|
67
|
+
* @deprecated To be turned into an abstract method.
|
|
68
|
+
* @breaking-change 12.0.0
|
|
69
|
+
*/
|
|
70
|
+
clone(): MatDateSelectionModel<S, D>;
|
|
65
71
|
}
|
|
66
72
|
/** A selection model that contains a single date. */
|
|
67
73
|
export declare class MatSingleDateSelectionModel<D> extends MatDateSelectionModel<D | null, D> {
|
|
@@ -78,6 +84,8 @@ export declare class MatSingleDateSelectionModel<D> extends MatDateSelectionMode
|
|
|
78
84
|
* is true if the current selection is not null.
|
|
79
85
|
*/
|
|
80
86
|
isComplete(): boolean;
|
|
87
|
+
/** Clones the selection model. */
|
|
88
|
+
clone(): MatSingleDateSelectionModel<D>;
|
|
81
89
|
}
|
|
82
90
|
/** A selection model that contains a date range. */
|
|
83
91
|
export declare class MatRangeDateSelectionModel<D> extends MatDateSelectionModel<DateRange<D>, D> {
|
|
@@ -95,6 +103,8 @@ export declare class MatRangeDateSelectionModel<D> extends MatDateSelectionModel
|
|
|
95
103
|
* is true if the current selection has a non-null `start` and `end`.
|
|
96
104
|
*/
|
|
97
105
|
isComplete(): boolean;
|
|
106
|
+
/** Clones the selection model. */
|
|
107
|
+
clone(): MatRangeDateSelectionModel<D>;
|
|
98
108
|
}
|
|
99
109
|
/** @docs-private */
|
|
100
110
|
export declare function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent: MatSingleDateSelectionModel<unknown>, adapter: DateAdapter<unknown>): MatSingleDateSelectionModel<unknown>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { AfterViewInit, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
9
|
+
import { MatDatepickerBase, MatDatepickerControl } from './datepicker-base';
|
|
10
|
+
/** Button that will close the datepicker and assign the current selection to the data model. */
|
|
11
|
+
export declare class MatDatepickerApply {
|
|
12
|
+
private _datepicker;
|
|
13
|
+
constructor(_datepicker: MatDatepickerBase<MatDatepickerControl<unknown>, unknown>);
|
|
14
|
+
_applySelection(): void;
|
|
15
|
+
}
|
|
16
|
+
/** Button that will close the datepicker and discard the current selection. */
|
|
17
|
+
export declare class MatDatepickerCancel {
|
|
18
|
+
_datepicker: MatDatepickerBase<MatDatepickerControl<unknown>, unknown>;
|
|
19
|
+
constructor(_datepicker: MatDatepickerBase<MatDatepickerControl<unknown>, unknown>);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Container that can be used to project a row of action buttons
|
|
23
|
+
* to the bottom of a datepicker or date range picker.
|
|
24
|
+
*/
|
|
25
|
+
export declare class MatDatepickerActions implements AfterViewInit, OnDestroy {
|
|
26
|
+
private _datepicker;
|
|
27
|
+
private _viewContainerRef;
|
|
28
|
+
_template: TemplateRef<unknown>;
|
|
29
|
+
private _portal;
|
|
30
|
+
constructor(_datepicker: MatDatepickerBase<MatDatepickerControl<unknown>, unknown>, _viewContainerRef: ViewContainerRef);
|
|
31
|
+
ngAfterViewInit(): void;
|
|
32
|
+
ngOnDestroy(): void;
|
|
33
|
+
}
|