Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 0b13ef1

Browse files
authored
fix: Sync upstream constants import (#1903)
1 parent bf2867b commit 0b13ef1

File tree

8 files changed

+11
-14
lines changed

8 files changed

+11
-14
lines changed

packages/chips/chip.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import {
3434
MdcIconRegistry
3535
} from '@angular-mdc/web/icon';
3636

37-
import { cssClasses } from '@material/chips/chip/constants';
3837
import {
38+
chipCssClasses,
3939
MDCChipAdapter,
4040
MDCChipFoundation
4141
} from '@material/chips/chip';
@@ -153,7 +153,7 @@ export class MdcChip extends MDCComponent<MDCChipFoundation> implements AfterVie
153153
this._foundation.setSelected(newValue);
154154

155155
if (this.filter && this.leadingIcon) {
156-
this.leadingIcon.elementRef.nativeElement.classList.remove(cssClasses.HIDDEN_LEADING_ICON);
156+
this.leadingIcon.elementRef.nativeElement.classList.remove(chipCssClasses.HIDDEN_LEADING_ICON);
157157
}
158158
}
159159
private _selected: boolean = false;

packages/dialog/dialog.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { MdcDialogRef } from './dialog-ref';
2727
import { MdcDialogConfig } from './dialog-config';
2828

2929
import { strings } from '@material/dialog/constants';
30-
import { ponyfill } from '@material/dom';
30+
import { matches, closest } from '@material/dom/ponyfill';
3131
import { MDCDialogFoundation, MDCDialogAdapter, util } from '@material/dialog';
3232

3333
const LAYOUT_EVENTS = ['resize', 'orientationchange'];
@@ -89,14 +89,14 @@ export class MdcDialogComponent extends MDCComponent<MDCDialogFoundation> implem
8989
document.body!.classList.remove(className);
9090
}
9191
},
92-
eventTargetMatches: (target: EventTarget, selector: string) => ponyfill.matches(target as Element, selector),
92+
eventTargetMatches: (target: EventTarget, selector: string) => matches(target as Element, selector),
9393
trapFocus: () => this._focusTrapInstance!.activate(),
9494
releaseFocus: () => this._focusTrapInstance!.deactivate(),
9595
isContentScrollable: () =>
9696
!!this._content && this._scrollable && util.isScrollable(this._content.elementRef.nativeElement),
9797
areButtonsStacked: () => util.areTopsMisaligned(this._buttons as any),
9898
getActionFromEvent: (event: Event) => {
99-
const element = ponyfill.closest(event.target as Element, `[${strings.ACTION_ATTRIBUTE}]`);
99+
const element = closest(event.target as Element, `[${strings.ACTION_ATTRIBUTE}]`);
100100
return element && element.getAttribute(strings.ACTION_ATTRIBUTE);
101101
},
102102
clickDefaultButton: () => {

packages/drawer/drawer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import { MdcList } from '@angular-mdc/web/list';
2222

2323
import createFocusTrap, { FocusTrap } from 'focus-trap';
2424

25-
import { cssClasses } from '@material/drawer/constants';
2625
import {
26+
cssClasses,
2727
MDCDrawerAdapter,
2828
MDCDismissibleDrawerFoundation,
2929
MDCModalDrawerFoundation

packages/floating-label/floating-label.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import { fromEvent, Subject } from 'rxjs';
1010
import { filter, takeUntil } from 'rxjs/operators';
1111

1212
import { MDCComponent } from '@angular-mdc/web/base';
13-
import { cssClasses } from '@material/floating-label/constants';
14-
import { MDCFloatingLabelFoundation, MDCFloatingLabelAdapter } from '@material/floating-label';
13+
import { MDCFloatingLabelFoundation, MDCFloatingLabelAdapter, cssClasses } from '@material/floating-label';
1514

1615
@Directive({
1716
selector: 'label[mdcFloatingLabel], mdc-floating-label',

packages/list/list.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ import { toBoolean, Platform } from '@angular-mdc/web/common';
2222
import { MdcListItem, MdcListSelectionChange, MDC_LIST_PARENT_COMPONENT } from './list-item';
2323

2424
import { matches } from '@material/dom/ponyfill';
25-
import { cssClasses, strings } from '@material/list/constants';
26-
import { MDCListFoundation, MDCListAdapter } from '@material/list';
25+
import { cssClasses, strings, MDCListFoundation, MDCListAdapter } from '@material/list';
2726

2827
/** Change event that is being fired whenever the selected state of an option changes. */
2928
export class MdcListItemChange {

packages/menu/menu.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import { toBoolean } from '@angular-mdc/web/common';
1818
import { MdcList, MdcListItem, MdcListItemAction } from '@angular-mdc/web/list';
1919
import { MdcMenuSurfaceBase } from '@angular-mdc/web/menu-surface';
2020

21-
import { cssClasses } from '@material/menu/constants';
22-
import { MDCMenuFoundation } from '@material/menu';
21+
import { cssClasses, MDCMenuFoundation } from '@material/menu';
2322

2423
export class MdcMenuSelectedEvent {
2524
constructor(

packages/top-app-bar/top-app-bar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import {
2626
MdcTopAppBarNavigationIcon,
2727
} from './top-app-bar.directives';
2828

29-
import { cssClasses } from '@material/top-app-bar/constants';
3029
import {
30+
cssClasses,
3131
MDCTopAppBarAdapter,
3232
MDCTopAppBarBaseFoundation,
3333
MDCTopAppBarFoundation,

tools/package-tools/rollup-globals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const rollupGlobals = {
3636
'@material/chips/chip-set': 'mdc.chip.chipset',
3737
'@material/dialog': 'mdc.dialog',
3838
'@material/dialog/constants': 'mdc.dialog.constants',
39-
'@material/dom': 'mdc.dom',
39+
'@material/dom/ponyfill': 'mdc.dom.ponyfill',
4040
'@material/drawer': 'mdc.drawer',
4141
'@material/floating-label': 'mdc.floatingLabel',
4242
'@material/form-field': 'mdc.formField',

0 commit comments

Comments
 (0)