Skip to content

Commit 14e0268

Browse files
committed
add missing mat- selectors
1 parent a56a682 commit 14e0268

File tree

8 files changed

+39
-14
lines changed

8 files changed

+39
-14
lines changed

src/lib/button-toggle/button-toggle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export class MdButtonToggleGroupMultiple {
280280
/** Single button inside of a toggle group. */
281281
@Component({
282282
moduleId: module.id,
283-
selector: 'md-button-toggle',
283+
selector: 'md-button-toggle, mat-button-toggle',
284284
templateUrl: 'button-toggle.html',
285285
styleUrls: ['button-toggle.css'],
286286
encapsulation: ViewEncapsulation.None,

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-card,
3033
mat-card-actions,
@@ -55,6 +58,7 @@ export const MAT_ELEMENTS_SELECTOR = `
5558
mat-placeholder,
5659
mat-progress-bar,
5760
mat-progress-circle,
61+
mat-pseudo-checkbox,
5862
mat-radio-button,
5963
mat-radio-group,
6064
mat-select,
@@ -63,9 +67,10 @@ export const MAT_ELEMENTS_SELECTOR = `
6367
mat-slider,
6468
mat-spinner,
6569
mat-tab,
70+
mat-tab-body,
71+
mat-tab-header,
6672
mat-tab-group,
67-
mat-toolbar,
68-
matTooltip`;
73+
mat-toolbar`;
6974

7075
/** Selector that matches all elements that may have style collisions with AngularJS Material. */
7176
export const MD_ELEMENTS_SELECTOR = `
@@ -76,12 +81,15 @@ export const MD_ELEMENTS_SELECTOR = `
7681
[md-dialog-title],
7782
[md-fab],
7883
[md-icon-button],
84+
[md-menu-trigger-for],
7985
[md-mini-fab],
8086
[md-raised-button],
8187
[md-tab-label],
8288
[md-tab-link],
8389
[md-tab-nav-bar],
90+
[mdTooltip],
8491
md-autocomplete,
92+
md-button-toggle,
8593
md-button-toggle-group,
8694
md-card,
8795
md-card-actions,
@@ -112,6 +120,7 @@ export const MD_ELEMENTS_SELECTOR = `
112120
md-placeholder,
113121
md-progress-bar,
114122
md-progress-circle,
123+
md-pseudo-checkbox,
115124
md-radio-button,
116125
md-radio-group,
117126
md-select,
@@ -120,9 +129,10 @@ export const MD_ELEMENTS_SELECTOR = `
120129
md-slider,
121130
md-spinner,
122131
md-tab,
132+
md-tab-body,
133+
md-tab-header,
123134
md-tab-group,
124-
md-toolbar,
125-
mdTooltip`;
135+
md-toolbar`;
126136

127137
/** Directive that enforces that the `mat-` prefix cannot be used. */
128138
@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)