Skip to content

Commit 78d58be

Browse files
committed
add missing mat- selectors
1 parent 4b830d3 commit 78d58be

File tree

7 files changed

+38
-13
lines changed

7 files changed

+38
-13
lines changed

src/lib/core/compatibility/compatibility.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@ export const MAT_ELEMENTS_SELECTOR = `
1919
[mat-dialog-title],
2020
[mat-fab],
2121
[mat-icon-button],
22+
[mat-menu-trigger-for],
2223
[mat-mini-fab],
2324
[mat-raised-button],
2425
[mat-tab-label],
2526
[mat-tab-link],
2627
[mat-tab-nav-bar],
28+
[matTooltip],
2729
mat-autocomplete,
30+
mat-button-toggle,
2831
mat-button-toggle-group,
2932
mat-button-toggle,
3033
mat-card,
@@ -56,6 +59,7 @@ export const MAT_ELEMENTS_SELECTOR = `
5659
mat-placeholder,
5760
mat-progress-bar,
5861
mat-progress-circle,
62+
mat-pseudo-checkbox,
5963
mat-radio-button,
6064
mat-radio-group,
6165
mat-select,
@@ -64,9 +68,10 @@ export const MAT_ELEMENTS_SELECTOR = `
6468
mat-slider,
6569
mat-spinner,
6670
mat-tab,
71+
mat-tab-body,
72+
mat-tab-header,
6773
mat-tab-group,
68-
mat-toolbar,
69-
matTooltip`;
74+
mat-toolbar`;
7075

7176
/** Selector that matches all elements that may have style collisions with AngularJS Material. */
7277
export const MD_ELEMENTS_SELECTOR = `
@@ -77,12 +82,15 @@ export const MD_ELEMENTS_SELECTOR = `
7782
[md-dialog-title],
7883
[md-fab],
7984
[md-icon-button],
85+
[md-menu-trigger-for],
8086
[md-mini-fab],
8187
[md-raised-button],
8288
[md-tab-label],
8389
[md-tab-link],
8490
[md-tab-nav-bar],
91+
[mdTooltip],
8592
md-autocomplete,
93+
md-button-toggle,
8694
md-button-toggle-group,
8795
md-button-toggle,
8896
md-card,
@@ -114,6 +122,7 @@ export const MD_ELEMENTS_SELECTOR = `
114122
md-placeholder,
115123
md-progress-bar,
116124
md-progress-circle,
125+
md-pseudo-checkbox,
117126
md-radio-button,
118127
md-radio-group,
119128
md-select,
@@ -122,9 +131,10 @@ export const MD_ELEMENTS_SELECTOR = `
122131
md-slider,
123132
md-spinner,
124133
md-tab,
134+
md-tab-body,
135+
md-tab-header,
125136
md-tab-group,
126-
md-toolbar,
127-
mdTooltip`;
137+
md-toolbar`;
128138

129139
/** Directive that enforces that the `mat-` prefix cannot be used. */
130140
@Directive({selector: MAT_ELEMENTS_SELECTOR})

src/lib/core/selection/pseudo-checkbox/pseudo-checkbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type MdPseudoCheckboxState = 'unchecked' | 'checked' | 'indeterminate';
2222
@Component({
2323
moduleId: module.id,
2424
encapsulation: ViewEncapsulation.None,
25-
selector: 'md-pseudo-checkbox',
25+
selector: 'md-pseudo-checkbox, mat-pseudo-checkbox',
2626
styleUrls: ['pseudo-checkbox.css'],
2727
template: '',
2828
host: {

src/lib/input/input-container.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<div class="md-input-wrapper">
22
<div class="md-input-table">
3-
<div class="md-input-prefix"><ng-content select="[mdPrefix], [md-prefix]"></ng-content></div>
3+
<div class="md-input-prefix">
4+
<ng-content select="[mdPrefix], [matPrefix], [md-prefix], [mat-prefix]"></ng-content>
5+
</div>
46

57
<div class="md-input-infix" [class.md-end]="align == 'end'">
68
<ng-content selector="input, textarea"></ng-content>
@@ -19,7 +21,9 @@
1921
</label>
2022
</div>
2123

22-
<div class="md-input-suffix"><ng-content select="[mdSuffix], [md-suffix]"></ng-content></div>
24+
<div class="md-input-suffix">
25+
<ng-content select="[mdSuffix], [matSuffix], [md-suffix], [mat-suffix]"></ng-content>
26+
</div>
2327
</div>
2428

2529
<div class="md-input-underline"

src/lib/menu/menu-trigger.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ import {MenuPositionX, MenuPositionY} from './menu-positions';
3232
* responsible for toggling the display of the provided menu instance.
3333
*/
3434
@Directive({
35-
selector: '[md-menu-trigger-for], [mat-menu-trigger-for], [mdMenuTriggerFor]',
35+
selector: `[md-menu-trigger-for], [mat-menu-trigger-for],
36+
[mdMenuTriggerFor], [matMenuTriggerFor]`,
3637
host: {
3738
'aria-haspopup': 'true',
3839
'(mousedown)': '_handleMousedown($event)',
@@ -53,8 +54,18 @@ export class MdMenuTrigger implements AfterViewInit, OnDestroy {
5354

5455
/** @deprecated */
5556
@Input('md-menu-trigger-for')
56-
get _deprecatedMenuTriggerFor(): MdMenuPanel { return this.menu; }
57-
set _deprecatedMenuTriggerFor(v: MdMenuPanel) { this.menu = v; }
57+
get _deprecatedMdMenuTriggerFor(): MdMenuPanel { return this.menu; }
58+
set _deprecatedMdMenuTriggerFor(v: MdMenuPanel) { this.menu = v; }
59+
60+
/** @deprecated */
61+
@Input('mat-menu-trigger-for')
62+
get _deprecatedMatMenuTriggerFor(): MdMenuPanel { return this.menu; }
63+
set _deprecatedMatMenuTriggerFor(v: MdMenuPanel) { this.menu = v; }
64+
65+
// Trigger input for compatibility mode
66+
@Input('matMenuTriggerFor')
67+
get _matMenuTriggerFor(): MdMenuPanel { return this.menu; }
68+
set _matMenuTriggerFor(v: MdMenuPanel) { this.menu = v; }
5869

5970
/** References the menu instance that the trigger is associated with. */
6071
@Input('mdMenuTriggerFor') menu: MdMenuPanel;

src/lib/tabs/tab-body.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export type MdTabBodyOriginState = 'left' | 'right';
4646
*/
4747
@Component({
4848
moduleId: module.id,
49-
selector: 'md-tab-body',
49+
selector: 'md-tab-body, mat-tab-body',
5050
templateUrl: 'tab-body.html',
5151
animations: [
5252
trigger('translateTab', [

src/lib/tabs/tab-group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export type MdTabHeaderPosition = 'above' | 'below';
5050
*/
5151
@Component({
5252
moduleId: module.id,
53-
selector: 'md-tab-group',
53+
selector: 'md-tab-group, mat-tab-group',
5454
templateUrl: 'tab-group.html',
5555
styleUrls: ['tab-group.css'],
5656
host: {

src/lib/tabs/tab-header.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const EXAGGERATED_OVERSCROLL = 60;
4040
*/
4141
@Component({
4242
moduleId: module.id,
43-
selector: 'md-tab-header',
43+
selector: 'md-tab-header, mat-tab-header',
4444
templateUrl: 'tab-header.html',
4545
styleUrls: ['tab-header.css'],
4646
encapsulation: ViewEncapsulation.None,

0 commit comments

Comments
 (0)