diff --git a/src/lib/core/a11y/_a11y.scss b/src/cdk/a11y/_a11y.scss similarity index 100% rename from src/lib/core/a11y/_a11y.scss rename to src/cdk/a11y/_a11y.scss diff --git a/src/cdk/a11y/focus-trap.spec.ts b/src/cdk/a11y/focus-trap.spec.ts index 28d07e46842c..4ccae5688498 100644 --- a/src/cdk/a11y/focus-trap.spec.ts +++ b/src/cdk/a11y/focus-trap.spec.ts @@ -1,8 +1,8 @@ -import {ComponentFixture, TestBed, async} from '@angular/core/testing'; +import {Platform} from '@angular/cdk/platform'; import {Component, ViewChild} from '@angular/core'; -import {FocusTrapFactory, FocusTrapDirective, FocusTrap} from './focus-trap'; +import {async, ComponentFixture, TestBed} from '@angular/core/testing'; +import {FocusTrap, FocusTrapDirective, FocusTrapFactory} from './focus-trap'; import {InteractivityChecker} from './interactivity-checker'; -import {Platform} from '../platform/platform'; describe('FocusTrap', () => { diff --git a/src/cdk/a11y/interactivity-checker.spec.ts b/src/cdk/a11y/interactivity-checker.spec.ts index 3f28acb8b905..23473eb5ded6 100644 --- a/src/cdk/a11y/interactivity-checker.spec.ts +++ b/src/cdk/a11y/interactivity-checker.spec.ts @@ -1,5 +1,6 @@ +import {Platform} from '@angular/cdk/platform'; import {InteractivityChecker} from './interactivity-checker'; -import {Platform} from '../platform/platform'; + describe('InteractivityChecker', () => { let testContainerElement: HTMLElement; diff --git a/src/cdk/a11y/list-key-manager.spec.ts b/src/cdk/a11y/list-key-manager.spec.ts index 499b5a628266..012fa45d8e9b 100644 --- a/src/cdk/a11y/list-key-manager.spec.ts +++ b/src/cdk/a11y/list-key-manager.spec.ts @@ -1,11 +1,11 @@ +import {DOWN_ARROW, TAB, UP_ARROW} from '@angular/cdk/keycodes'; +import {first} from '@angular/cdk/rxjs'; import {QueryList} from '@angular/core'; import {fakeAsync, tick} from '@angular/core/testing'; +import {createKeyboardEvent} from '../testing/event-objects'; +import {ActiveDescendantKeyManager} from './activedescendant-key-manager'; import {FocusKeyManager} from './focus-key-manager'; -import {DOWN_ARROW, UP_ARROW, TAB} from '../keycodes/keycodes'; import {ListKeyManager} from './list-key-manager'; -import {ActiveDescendantKeyManager} from './activedescendant-key-manager'; -import {createKeyboardEvent} from '../testing/event-objects'; -import {first} from '../rxjs/index'; class FakeFocusable { diff --git a/src/lib/core/portal/portal-injector.ts b/src/cdk/portal/portal-injector.ts similarity index 100% rename from src/lib/core/portal/portal-injector.ts rename to src/cdk/portal/portal-injector.ts diff --git a/src/cdk/portal/public_api.ts b/src/cdk/portal/public_api.ts index 3006ee0af57d..253d39a60f41 100644 --- a/src/cdk/portal/public_api.ts +++ b/src/cdk/portal/public_api.ts @@ -9,3 +9,4 @@ export * from './portal'; export * from './dom-portal-host'; export * from './portal-directives'; +export * from './portal-injector'; diff --git a/src/demo-app/snack-bar/snack-bar-demo.ts b/src/demo-app/snack-bar/snack-bar-demo.ts index 6f905ce052ba..3f975a25e91a 100644 --- a/src/demo-app/snack-bar/snack-bar-demo.ts +++ b/src/demo-app/snack-bar/snack-bar-demo.ts @@ -1,12 +1,13 @@ +import {Dir} from '@angular/cdk/bidi'; import {Component, ViewEncapsulation} from '@angular/core'; import { MdSnackBar, MdSnackBarConfig, MdSnackBarHorizontalPosition, MdSnackBarVerticalPosition, - Dir, } from '@angular/material'; + @Component({ moduleId: module.id, selector: 'snack-bar-demo', @@ -24,7 +25,8 @@ export class SnackBarDemo { horizontalPosition: MdSnackBarHorizontalPosition = 'center'; verticalPosition: MdSnackBarVerticalPosition = 'bottom'; - constructor(public snackBar: MdSnackBar, private dir: Dir) { } + constructor(public snackBar: MdSnackBar, private dir: Dir) { + } open() { let config = new MdSnackBarConfig(); diff --git a/src/lib/button-toggle/button-toggle.scss b/src/lib/button-toggle/button-toggle.scss index d77f94181edc..ea408e5505bb 100644 --- a/src/lib/button-toggle/button-toggle.scss +++ b/src/lib/button-toggle/button-toggle.scss @@ -1,4 +1,3 @@ -@import '../core/a11y/a11y'; @import '../core/style/elevation'; @import '../core/style/vendor-prefixes'; @import '../core/style/layout-common'; diff --git a/src/lib/button/button.scss b/src/lib/button/button.scss index 89bf063c6bf7..277c0be3f9a7 100644 --- a/src/lib/button/button.scss +++ b/src/lib/button/button.scss @@ -1,7 +1,7 @@ // TODO(jelbourn): Measure perf benefits for translate3d and will-change. // TODO(jelbourn): Figure out if anchor hover underline actually happens in any browser. @import 'button-base'; -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; @import '../core/style/layout-common'; .mat-button, .mat-icon-button { diff --git a/src/lib/card/card.scss b/src/lib/card/card.scss index b1745820a26e..584fef8af43c 100644 --- a/src/lib/card/card.scss +++ b/src/lib/card/card.scss @@ -1,6 +1,6 @@ @import '../core/style/variables'; @import '../core/style/elevation'; -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; $mat-card-default-padding: 24px !default; diff --git a/src/lib/chips/chip-input.ts b/src/lib/chips/chip-input.ts index ed7ac8470e99..dc760e17d527 100644 --- a/src/lib/chips/chip-input.ts +++ b/src/lib/chips/chip-input.ts @@ -6,11 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import {Directive, Output, EventEmitter, ElementRef, Input} from '@angular/core'; import {coerceBooleanProperty} from '@angular/cdk/coercion'; -import {ENTER} from '@angular/material/core'; +import {ENTER} from '@angular/cdk/keycodes'; +import {Directive, ElementRef, EventEmitter, Input, Output} from '@angular/core'; import {MdChipList} from './chip-list'; + export interface MdChipInputEvent { input: HTMLInputElement; value: string; diff --git a/src/lib/chips/chip-list.ts b/src/lib/chips/chip-list.ts index bf8b784ec167..583f78fc5bcb 100644 --- a/src/lib/chips/chip-list.ts +++ b/src/lib/chips/chip-list.ts @@ -6,26 +6,26 @@ * found in the LICENSE file at https://angular.io/license */ +import {FocusKeyManager} from '@angular/cdk/a11y'; +import {Directionality} from '@angular/cdk/bidi'; +import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BACKSPACE, DELETE, LEFT_ARROW, RIGHT_ARROW, UP_ARROW} from '@angular/cdk/keycodes'; import { AfterContentInit, ChangeDetectionStrategy, Component, ContentChildren, + ElementRef, Input, - QueryList, - ViewEncapsulation, OnDestroy, Optional, - ElementRef, + QueryList, Renderer2, + ViewEncapsulation, } from '@angular/core'; - -import {MdChip} from './chip'; -import {FocusKeyManager} from '@angular/cdk/a11y'; -import {BACKSPACE, DELETE, LEFT_ARROW, RIGHT_ARROW, UP_ARROW} from '@angular/material/core'; -import {Directionality} from '@angular/cdk/bidi'; import {Subscription} from 'rxjs/Subscription'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {MdChip} from './chip'; + /** * A material design chips component (named ChipList for it's similarity to the List component). diff --git a/src/lib/chips/chip.ts b/src/lib/chips/chip.ts index 642a41ea7e19..e916c86a183f 100644 --- a/src/lib/chips/chip.ts +++ b/src/lib/chips/chip.ts @@ -8,6 +8,7 @@ import {FocusableOption} from '@angular/cdk/a11y'; import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {BACKSPACE, DELETE, SPACE} from '@angular/cdk/keycodes'; import { ContentChild, Directive, @@ -19,17 +20,10 @@ import { Output, Renderer2, } from '@angular/core'; -import { - BACKSPACE, - CanColor, - CanDisable, - DELETE, - mixinColor, - mixinDisabled, - SPACE, -} from '@angular/material/core'; +import {CanColor, CanDisable, mixinColor, mixinDisabled} from '@angular/material/core'; import {Subject} from 'rxjs/Subject'; + export interface MdChipEvent { chip: MdChip; } @@ -37,8 +31,10 @@ export interface MdChipEvent { // Boilerplate for applying mixins to MdChip. /** @docs-private */ export class MdChipBase { - constructor(public _renderer: Renderer2, public _elementRef: ElementRef) {} + constructor(public _renderer: Renderer2, public _elementRef: ElementRef) { + } } + export const _MdChipMixinBase = mixinColor(mixinDisabled(MdChipBase), 'primary'); @@ -48,9 +44,10 @@ export const _MdChipMixinBase = mixinColor(mixinDisabled(MdChipBase), 'primary') */ @Directive({ selector: `md-basic-chip, [md-basic-chip], mat-basic-chip, [mat-basic-chip]`, - host: {'class': 'mat-basic-chip'} + host: {'class': 'mat-basic-chip'}, }) -export class MdBasicChip { } +export class MdBasicChip { +} /** * Material design styled Chip component. Used inside the MdChipList component. @@ -72,44 +69,53 @@ export class MdBasicChip { } '(keydown)': '_handleKeydown($event)', '(focus)': '_hasFocus = true', '(blur)': '_hasFocus = false', - } + }, }) export class MdChip extends _MdChipMixinBase implements FocusableOption, OnDestroy, CanColor, - CanDisable { + CanDisable { @ContentChild(forwardRef(() => MdChipRemove)) _chipRemove: MdChipRemove; /** Whether the chip is selected. */ - @Input() get selected(): boolean { return this._selected; } + @Input() + get selected(): boolean { + return this._selected; + } + set selected(value: boolean) { this._selected = coerceBooleanProperty(value); (this.selected ? this.select : this.deselect).emit({chip: this}); } + protected _selected: boolean = false; /** * Whether or not the chips are selectable. When a chip is not selectable, * changes to it's selected state are always ignored. */ - @Input() get selectable(): boolean { + @Input() + get selectable(): boolean { return this._selectable; } set selectable(value: boolean) { this._selectable = coerceBooleanProperty(value); } + protected _selectable: boolean = true; /** * Determines whether or not the chip displays the remove styling and emits (remove) events. */ - @Input() get removable(): boolean { + @Input() + get removable(): boolean { return this._removable; } set removable(value: boolean) { this._removable = coerceBooleanProperty(value); } + protected _removable: boolean = true; /** Whether the chip has focus. */ @@ -224,11 +230,12 @@ export class MdChip extends _MdChipMixinBase implements FocusableOption, OnDestr selector: '[mdChipRemove], [matChipRemove]', host: { 'class': 'mat-chip-remove', - '(click)': '_handleClick($event)' - } + '(click)': '_handleClick($event)', + }, }) export class MdChipRemove { - constructor(protected _parentChip: MdChip) {} + constructor(protected _parentChip: MdChip) { + } /** Calls the parent chip's public `remove()` method if applicable. */ _handleClick() { diff --git a/src/lib/chips/chips.scss b/src/lib/chips/chips.scss index b170a27039e1..3aabae3c431f 100644 --- a/src/lib/chips/chips.scss +++ b/src/lib/chips/chips.scss @@ -1,4 +1,4 @@ -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; @import '../core/style/elevation'; $mat-chip-vertical-padding: 7px; diff --git a/src/lib/core/_core.scss b/src/lib/core/_core.scss index b13dd35b4ea4..7ae874518a80 100644 --- a/src/lib/core/_core.scss +++ b/src/lib/core/_core.scss @@ -1,9 +1,9 @@ // We can use relative imports for imports from the cdk because we bundle everything // up into a single flat scss file for material. @import '../../cdk/overlay/overlay'; +@import '../../cdk/a11y/a11y'; // Core styles that can be used to apply material design treatments to any element. -@import 'a11y/a11y'; @import 'style/elevation'; @import 'ripple/ripple'; @import 'option/option'; diff --git a/src/lib/core/a11y/README.md b/src/lib/core/a11y/README.md deleted file mode 100644 index 45e45eac659a..000000000000 --- a/src/lib/core/a11y/README.md +++ /dev/null @@ -1 +0,0 @@ -See [cdk/a11y](../../../cdk/a11y/README.md) diff --git a/src/lib/core/a11y/activedescendant-key-manager.ts b/src/lib/core/a11y/activedescendant-key-manager.ts deleted file mode 100644 index 8ccabcab6c6a..000000000000 --- a/src/lib/core/a11y/activedescendant-key-manager.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {ActiveDescendantKeyManager, Highlightable} from '@angular/cdk/a11y'; diff --git a/src/lib/core/a11y/fake-mousedown.ts b/src/lib/core/a11y/fake-mousedown.ts deleted file mode 100644 index f3d2b68e6827..000000000000 --- a/src/lib/core/a11y/fake-mousedown.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {isFakeMousedownFromScreenReader} from '@angular/cdk/a11y'; diff --git a/src/lib/core/a11y/focus-key-manager.ts b/src/lib/core/a11y/focus-key-manager.ts deleted file mode 100644 index 0a603e1eba27..000000000000 --- a/src/lib/core/a11y/focus-key-manager.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {FocusKeyManager, FocusableOption} from '@angular/cdk/a11y'; diff --git a/src/lib/core/a11y/focus-trap.ts b/src/lib/core/a11y/focus-trap.ts deleted file mode 100644 index 7ee2f473073b..000000000000 --- a/src/lib/core/a11y/focus-trap.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export { - FocusTrap, - FocusTrapFactory, - FocusTrapDeprecatedDirective, - FocusTrapDirective -} from '@angular/cdk/a11y'; - - - - - diff --git a/src/lib/core/a11y/index.ts b/src/lib/core/a11y/index.ts deleted file mode 100644 index 50ef493946c2..000000000000 --- a/src/lib/core/a11y/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {A11yModule} from '@angular/cdk/a11y'; diff --git a/src/lib/core/a11y/interactivity-checker.ts b/src/lib/core/a11y/interactivity-checker.ts deleted file mode 100644 index def5fa2b1511..000000000000 --- a/src/lib/core/a11y/interactivity-checker.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {InteractivityChecker} from '@angular/cdk/a11y'; diff --git a/src/lib/core/a11y/list-key-manager.ts b/src/lib/core/a11y/list-key-manager.ts deleted file mode 100644 index 8710826427ee..000000000000 --- a/src/lib/core/a11y/list-key-manager.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {ListKeyManagerOption, ListKeyManager} from '@angular/cdk/a11y'; diff --git a/src/lib/core/a11y/live-announcer.ts b/src/lib/core/a11y/live-announcer.ts deleted file mode 100644 index 7965fd4cf102..000000000000 --- a/src/lib/core/a11y/live-announcer.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export { - AriaLivePoliteness, - LIVE_ANNOUNCER_ELEMENT_TOKEN, - LiveAnnouncer, - LIVE_ANNOUNCER_PROVIDER_FACTORY, - LIVE_ANNOUNCER_PROVIDER -} from '@angular/cdk/a11y'; diff --git a/src/lib/core/bidi/dir.ts b/src/lib/core/bidi/dir.ts deleted file mode 100644 index a264ca5780cb..000000000000 --- a/src/lib/core/bidi/dir.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {Dir} from '@angular/cdk/bidi'; - diff --git a/src/lib/core/bidi/directionality.ts b/src/lib/core/bidi/directionality.ts deleted file mode 100644 index 00f584c8c8ff..000000000000 --- a/src/lib/core/bidi/directionality.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export { - Direction, - DIR_DOCUMENT, - Directionality, - DIRECTIONALITY_PROVIDER_FACTORY, - DIRECTIONALITY_PROVIDER, -} from '@angular/cdk/bidi'; diff --git a/src/lib/core/bidi/index.ts b/src/lib/core/bidi/index.ts deleted file mode 100644 index df77755789b3..000000000000 --- a/src/lib/core/bidi/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export { - Directionality, - DIRECTIONALITY_PROVIDER, - DIR_DOCUMENT, - Direction, - Dir, - BidiModule, -} from '@angular/cdk/bidi'; diff --git a/src/lib/core/keyboard/keycodes.ts b/src/lib/core/keyboard/keycodes.ts deleted file mode 100644 index 3aef9a4baa83..000000000000 --- a/src/lib/core/keyboard/keycodes.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - - -export { - UP_ARROW, - DOWN_ARROW, - RIGHT_ARROW, - LEFT_ARROW, - PAGE_UP, - PAGE_DOWN, - HOME, - END, - ENTER, - SPACE, - TAB, - ESCAPE, - BACKSPACE, - DELETE, - A, - Z, -} from '@angular/cdk/keycodes'; diff --git a/src/lib/core/option/_option.scss b/src/lib/core/option/_option.scss index 4bd536b08e3f..bf9e20c2d3f5 100644 --- a/src/lib/core/option/_option.scss +++ b/src/lib/core/option/_option.scss @@ -1,6 +1,6 @@ @import '../style/menu-common'; @import '../style/vendor-prefixes'; -@import '../a11y/a11y'; +@import '../../../cdk/a11y/a11y'; @import '../style/layout-common'; /** diff --git a/src/lib/core/option/option.ts b/src/lib/core/option/option.ts index 09730a275466..0af7ceb47d62 100644 --- a/src/lib/core/option/option.ts +++ b/src/lib/core/option/option.ts @@ -6,21 +6,21 @@ * found in the LICENSE file at https://angular.io/license */ +import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {ENTER, SPACE} from '@angular/cdk/keycodes'; import { + ChangeDetectionStrategy, + ChangeDetectorRef, Component, ElementRef, EventEmitter, - Input, - Output, - ViewEncapsulation, Inject, + Input, Optional, - ChangeDetectionStrategy, - ChangeDetectorRef, + Output, QueryList, + ViewEncapsulation, } from '@angular/core'; -import {ENTER, SPACE} from '../keyboard/keycodes'; -import {coerceBooleanProperty} from '@angular/cdk/coercion'; import {MATERIAL_COMPATIBILITY_MODE} from '../compatibility/compatibility'; import {MdOptgroup} from './optgroup'; diff --git a/src/lib/core/overlay/index.ts b/src/lib/core/overlay/index.ts deleted file mode 100644 index 621bec001c17..000000000000 --- a/src/lib/core/overlay/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export * from '@angular/cdk/overlay'; diff --git a/src/lib/core/platform/features.ts b/src/lib/core/platform/features.ts deleted file mode 100644 index 04844f624ef6..000000000000 --- a/src/lib/core/platform/features.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {getSupportedInputTypes} from '@angular/cdk/platform'; diff --git a/src/lib/core/platform/index.ts b/src/lib/core/platform/index.ts deleted file mode 100644 index e8f8a33331cc..000000000000 --- a/src/lib/core/platform/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {PlatformModule} from '@angular/cdk/platform'; -export * from './platform'; -export * from './features'; diff --git a/src/lib/core/platform/platform.ts b/src/lib/core/platform/platform.ts deleted file mode 100755 index 648567b59d24..000000000000 --- a/src/lib/core/platform/platform.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {Platform} from '@angular/cdk/platform'; diff --git a/src/lib/core/portal/README.md b/src/lib/core/portal/README.md deleted file mode 100644 index f9e84739173a..000000000000 --- a/src/lib/core/portal/README.md +++ /dev/null @@ -1 +0,0 @@ -See [cdk/portal](../../../cdk/portal/portal.md) diff --git a/src/lib/core/portal/dom-portal-host.ts b/src/lib/core/portal/dom-portal-host.ts deleted file mode 100644 index 45424d674bbd..000000000000 --- a/src/lib/core/portal/dom-portal-host.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -export {DomPortalHost} from '@angular/cdk/portal'; diff --git a/src/lib/core/portal/portal-directives.ts b/src/lib/core/portal/portal-directives.ts deleted file mode 100644 index e2eed6c434aa..000000000000 --- a/src/lib/core/portal/portal-directives.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {TemplatePortalDirective, PortalHostDirective, PortalModule} from '@angular/cdk/portal'; diff --git a/src/lib/core/portal/portal.ts b/src/lib/core/portal/portal.ts deleted file mode 100644 index 91ac14adaeab..000000000000 --- a/src/lib/core/portal/portal.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export { - Portal, - PortalHost, - BasePortalHost, - ComponentPortal, - TemplatePortal -} from '@angular/cdk/portal'; diff --git a/src/lib/core/public_api.ts b/src/lib/core/public_api.ts index b13cbd5df890..93fe2e869d02 100644 --- a/src/lib/core/public_api.ts +++ b/src/lib/core/public_api.ts @@ -6,9 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -export * from './a11y/index'; export * from './animation/animation'; -export * from './bidi/index'; export * from './common-behaviors/index'; export * from './compatibility/compatibility'; export * from './coordination/unique-selection-dispatcher'; @@ -16,18 +14,10 @@ export * from './datetime/index'; export * from './error/error-options'; export * from './gestures/gesture-annotations'; export * from './gestures/gesture-config'; -export * from './keyboard/keycodes'; export * from './line/line'; export * from './option/index'; -export * from './overlay/index'; export * from './placeholder/placeholder-options'; -export * from './platform/index'; -export * from './portal/portal'; -export * from './portal/dom-portal-host'; -export * from './portal/portal-directives'; -export * from './portal/portal-injector'; export * from './ripple/index'; -export * from './rxjs/index'; export * from './selection/index'; export * from './style/index'; export * from './util/object-extend'; diff --git a/src/lib/core/ripple/_ripple.scss b/src/lib/core/ripple/_ripple.scss index 47623e1497fc..257df0e8ba69 100644 --- a/src/lib/core/ripple/_ripple.scss +++ b/src/lib/core/ripple/_ripple.scss @@ -1,5 +1,5 @@ @import '../theming/theming'; -@import '../a11y/a11y'; +@import '../../../cdk/a11y/a11y'; $mat-ripple-color-opacity: 0.1; diff --git a/src/lib/core/rxjs/index.ts b/src/lib/core/rxjs/index.ts deleted file mode 100644 index a6f22e575d8e..000000000000 --- a/src/lib/core/rxjs/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export * from './rx-chain'; -export * from './rx-operators'; diff --git a/src/lib/core/rxjs/rx-chain.spec.ts b/src/lib/core/rxjs/rx-chain.spec.ts deleted file mode 100644 index e9bc10ec5401..000000000000 --- a/src/lib/core/rxjs/rx-chain.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -import {Observable} from 'rxjs/Observable'; -import {of as observableOf} from 'rxjs/observable/of'; -import {RxChain, map, filter, first} from './index'; - -describe('RxChain', () => { - it('should call all of the operators in the chain', () => { - let operators = { map, filter, first }; - - spyOn(operators, 'map'); - spyOn(operators, 'filter'); - spyOn(operators, 'first'); - - RxChain.from(observableOf(1, 2, 3)) - .call(operators.map, i => i * 2) - .call(operators.filter, i => i % 2 === 0) - .call(operators.first); - - expect(operators.map).toHaveBeenCalled(); - expect(operators.filter).toHaveBeenCalled(); - expect(operators.first).toHaveBeenCalled(); - }); - - it('should be able to subscribe', () => { - const spy = jasmine.createSpy('subscription spy'); - - RxChain.from(observableOf(1, 2)) - .call(map, i => i * 2) - .call(first) - .subscribe(spy); - - expect(spy).toHaveBeenCalledWith(2); - }); - - it('should be able to return the result observable', () => { - const chain = RxChain.from(observableOf(1, 2)) - .call(map, i => i * 2) - .call(first); - - expect(chain.result() instanceof Observable).toBe(true); - }); -}); diff --git a/src/lib/core/rxjs/rx-chain.ts b/src/lib/core/rxjs/rx-chain.ts deleted file mode 100644 index fa3f771efcf7..000000000000 --- a/src/lib/core/rxjs/rx-chain.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export {RxChain} from '@angular/cdk/rxjs'; diff --git a/src/lib/core/rxjs/rx-operators.ts b/src/lib/core/rxjs/rx-operators.ts deleted file mode 100644 index 864b6be10b2f..000000000000 --- a/src/lib/core/rxjs/rx-operators.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export { - StrictRxChain, - FinallyBrand, - CatchBrand, - DoBrand, - MapBrand, - FilterBrand, - ShareBrand, - FirstBrand, - SwitchMapBrand, - StartWithBrand, - DebounceTimeBrand, - AuditTimeBrand, - TakeUntilBrand, - finallyOperatorType, - catchOperatorType, - doOperatorType, - mapOperatorType, - filterOperatorType, - shareOperatorType, - firstOperatorType, - switchMapOperatorType, - startWithOperatorType, - debounceTimeOperatorType, - auditTimeOperatorType, - takeUntilOperatorType, - finallyOperator, - catchOperator, - doOperator, - map, - filter, - share, - first, - switchMap, - startWith, - debounceTime, - auditTime, - takeUntil, -} from '@angular/cdk/rxjs'; diff --git a/src/lib/core/style/focus-origin-monitor.spec.ts b/src/lib/core/style/focus-origin-monitor.spec.ts index 672d8dedc16f..7f0f75532c04 100644 --- a/src/lib/core/style/focus-origin-monitor.spec.ts +++ b/src/lib/core/style/focus-origin-monitor.spec.ts @@ -1,10 +1,10 @@ -import {ComponentFixture, inject, TestBed, fakeAsync, tick} from '@angular/core/testing'; +import {TAB} from '@angular/cdk/keycodes'; +import {dispatchFakeEvent, dispatchKeyboardEvent, dispatchMouseEvent} from '@angular/cdk/testing'; import {Component, Renderer2} from '@angular/core'; -import {StyleModule} from './index'; +import {ComponentFixture, fakeAsync, inject, TestBed, tick} from '@angular/core/testing'; import {By} from '@angular/platform-browser'; -import {TAB} from '../keyboard/keycodes'; import {FocusOrigin, FocusOriginMonitor, TOUCH_BUFFER_MS} from './focus-origin-monitor'; -import {dispatchFakeEvent, dispatchKeyboardEvent, dispatchMouseEvent} from '@angular/cdk/testing'; +import {StyleModule} from './index'; describe('FocusOriginMonitor', () => { diff --git a/src/lib/core/style/focus-origin-monitor.ts b/src/lib/core/style/focus-origin-monitor.ts index 418777bec907..65c8899b99b0 100644 --- a/src/lib/core/style/focus-origin-monitor.ts +++ b/src/lib/core/style/focus-origin-monitor.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {Platform} from '@angular/cdk/platform'; import { Directive, ElementRef, @@ -19,10 +20,9 @@ import { SkipSelf, } from '@angular/core'; import {Observable} from 'rxjs/Observable'; +import {of as observableOf} from 'rxjs/observable/of'; import {Subject} from 'rxjs/Subject'; import {Subscription} from 'rxjs/Subscription'; -import {Platform} from '../platform/platform'; -import {of as observableOf} from 'rxjs/observable/of'; // This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found diff --git a/src/lib/core/style/index.ts b/src/lib/core/style/index.ts index ef0610762e15..540902ff8d6d 100644 --- a/src/lib/core/style/index.ts +++ b/src/lib/core/style/index.ts @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ +import {PlatformModule} from '@angular/cdk/platform'; import {NgModule} from '@angular/core'; import {CdkMonitorFocus, FOCUS_ORIGIN_MONITOR_PROVIDER} from './focus-origin-monitor'; -import {PlatformModule} from '../platform/index'; @NgModule({ diff --git a/src/lib/dialog/dialog.scss b/src/lib/dialog/dialog.scss index 8ef8eea9df4c..2f04aec0b4cb 100644 --- a/src/lib/dialog/dialog.scss +++ b/src/lib/dialog/dialog.scss @@ -1,6 +1,6 @@ @import '../core/style/elevation'; @import '../core/style/vendor-prefixes'; -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; $mat-dialog-padding: 24px !default; diff --git a/src/lib/dialog/dialog.ts b/src/lib/dialog/dialog.ts index 86865578919c..dca3dfc349b9 100644 --- a/src/lib/dialog/dialog.ts +++ b/src/lib/dialog/dialog.ts @@ -14,7 +14,7 @@ import { OverlayState, ScrollStrategy, } from '@angular/cdk/overlay'; -import {ComponentPortal, ComponentType, TemplatePortal} from '@angular/cdk/portal'; +import {ComponentPortal, ComponentType, PortalInjector, TemplatePortal} from '@angular/cdk/portal'; import {startWith} from '@angular/cdk/rxjs'; import {Location} from '@angular/common'; import { @@ -27,7 +27,7 @@ import { SkipSelf, TemplateRef, } from '@angular/core'; -import {extendObject, PortalInjector} from '@angular/material/core'; +import {extendObject} from '@angular/material/core'; import {Observable} from 'rxjs/Observable'; import {defer} from 'rxjs/observable/defer'; import {Subject} from 'rxjs/Subject'; @@ -35,6 +35,7 @@ import {MdDialogConfig} from './dialog-config'; import {MdDialogContainer} from './dialog-container'; import {MdDialogRef} from './dialog-ref'; + export const MD_DIALOG_DATA = new InjectionToken('MdDialogData'); diff --git a/src/lib/expansion/expansion-panel-header.ts b/src/lib/expansion/expansion-panel-header.ts index d6657d751331..cf6d5093b76e 100644 --- a/src/lib/expansion/expansion-panel-header.ts +++ b/src/lib/expansion/expansion-panel-header.ts @@ -6,31 +6,25 @@ * found in the LICENSE file at https://angular.io/license */ +import {animate, state, style, transition, trigger} from '@angular/animations'; +import {ENTER, SPACE} from '@angular/cdk/keycodes'; +import {filter} from '@angular/cdk/rxjs'; import { + ChangeDetectionStrategy, + ChangeDetectorRef, Component, Directive, + ElementRef, Host, - ViewEncapsulation, - ChangeDetectionStrategy, - ChangeDetectorRef, + Input, OnDestroy, Renderer2, - ElementRef, - Input, + ViewEncapsulation, } from '@angular/core'; -import { - trigger, - state, - style, - transition, - animate, -} from '@angular/animations'; -import {SPACE, ENTER} from '@angular/material/core'; -import {MdExpansionPanel, EXPANSION_PANEL_ANIMATION_TIMING} from './expansion-panel'; -import {filter} from '@angular/material/core'; import {FocusOriginMonitor} from '@angular/material/core'; import {merge} from 'rxjs/observable/merge'; import {Subscription} from 'rxjs/Subscription'; +import {EXPANSION_PANEL_ANIMATION_TIMING, MdExpansionPanel} from './expansion-panel'; /** diff --git a/src/lib/form-field/public_api.ts b/src/lib/form-field/public_api.ts index eb3047954a48..144c5c3fcad2 100644 --- a/src/lib/form-field/public_api.ts +++ b/src/lib/form-field/public_api.ts @@ -6,6 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ +import {PlatformModule} from '@angular/cdk/platform'; +import {CommonModule} from '@angular/common'; import {NgModule} from '@angular/core'; import {MdError} from './error'; import {MdFormField} from './form-field'; @@ -13,8 +15,6 @@ import {MdHint} from './hint'; import {MdPlaceholder} from './placeholder'; import {MdPrefix} from './prefix'; import {MdSuffix} from './suffix'; -import {CommonModule} from '@angular/common'; -import {PlatformModule} from '@angular/material/core'; @NgModule({ diff --git a/src/lib/icon/icon-registry.ts b/src/lib/icon/icon-registry.ts index 3507ef0f30f0..7ff669fc292d 100644 --- a/src/lib/icon/icon-registry.ts +++ b/src/lib/icon/icon-registry.ts @@ -6,22 +6,16 @@ * found in the LICENSE file at https://angular.io/license */ +import {catchOperator, doOperator, finallyOperator, map, RxChain, share} from '@angular/cdk/rxjs'; import {Injectable, Optional, SecurityContext, SkipSelf} from '@angular/core'; import {Http} from '@angular/http'; -import { - catchOperator, - doOperator, - finallyOperator, - map, - RxChain, - share, -} from '@angular/material/core'; import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser'; import {Observable} from 'rxjs/Observable'; import {forkJoin} from 'rxjs/observable/forkJoin'; import {of as observableOf} from 'rxjs/observable/of'; import {_throw as observableThrow} from 'rxjs/observable/throw'; + /** * Returns an exception to be thrown in the case when attempting to * load an icon with a name that cannot be found. diff --git a/src/lib/icon/icon.ts b/src/lib/icon/icon.ts index b10ddcf96953..83298172e0c9 100644 --- a/src/lib/icon/icon.ts +++ b/src/lib/icon/icon.ts @@ -6,7 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ +import {first} from '@angular/cdk/rxjs'; import { + Attribute, ChangeDetectionStrategy, Component, ElementRef, @@ -16,11 +18,9 @@ import { Renderer2, SimpleChanges, ViewEncapsulation, - Attribute, } from '@angular/core'; -import {MdIconRegistry} from './icon-registry'; import {CanColor, mixinColor} from '@angular/material/core'; -import {first} from '@angular/material/core'; +import {MdIconRegistry} from './icon-registry'; // Boilerplate for applying mixins to MdIcon. diff --git a/src/lib/input/public_api.ts b/src/lib/input/public_api.ts index eafbd183b27b..52db0c023953 100644 --- a/src/lib/input/public_api.ts +++ b/src/lib/input/public_api.ts @@ -6,12 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdInput} from './input'; -import {MdTextareaAutosize} from './autosize'; +import {PlatformModule} from '@angular/cdk/platform'; import {CommonModule} from '@angular/common'; -import {PlatformModule} from '@angular/material/core'; +import {NgModule} from '@angular/core'; import {MdFormFieldModule} from '@angular/material/form-field'; +import {MdTextareaAutosize} from './autosize'; +import {MdInput} from './input'; @NgModule({ diff --git a/src/lib/list/selection-list.ts b/src/lib/list/selection-list.ts index df76d6ec39e0..8cc683be9f04 100644 --- a/src/lib/list/selection-list.ts +++ b/src/lib/list/selection-list.ts @@ -9,6 +9,8 @@ import {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y'; import {coerceBooleanProperty} from '@angular/cdk/coercion'; import {SelectionModel} from '@angular/cdk/collections'; +import {SPACE} from '@angular/cdk/keycodes'; +import {RxChain, startWith, switchMap} from '@angular/cdk/rxjs'; import { AfterContentInit, ChangeDetectionStrategy, @@ -35,10 +37,6 @@ import { MdLineSetter, mixinDisabled, mixinDisableRipple, - RxChain, - SPACE, - startWith, - switchMap, } from '@angular/material/core'; import {merge} from 'rxjs/observable/merge'; import {Subscription} from 'rxjs/Subscription'; diff --git a/src/lib/menu/menu-directive.ts b/src/lib/menu/menu-directive.ts index 3c673254278f..727420308c95 100644 --- a/src/lib/menu/menu-directive.ts +++ b/src/lib/menu/menu-directive.ts @@ -6,11 +6,20 @@ * found in the LICENSE file at https://angular.io/license */ +import {AnimationEvent} from '@angular/animations'; +import {FocusKeyManager} from '@angular/cdk/a11y'; +import {Direction} from '@angular/cdk/bidi'; +import {ESCAPE, LEFT_ARROW, RIGHT_ARROW} from '@angular/cdk/keycodes'; +import {RxChain, startWith, switchMap} from '@angular/cdk/rxjs'; import { AfterContentInit, + ChangeDetectionStrategy, Component, ContentChildren, + ElementRef, EventEmitter, + Inject, + InjectionToken, Input, OnDestroy, Output, @@ -18,24 +27,16 @@ import { TemplateRef, ViewChild, ViewEncapsulation, - ElementRef, - ChangeDetectionStrategy, - InjectionToken, - Inject, } from '@angular/core'; -import {AnimationEvent} from '@angular/animations'; -import {MenuPositionX, MenuPositionY} from './menu-positions'; +import {Observable} from 'rxjs/Observable'; +import {merge} from 'rxjs/observable/merge'; +import {Subscription} from 'rxjs/Subscription'; +import {fadeInItems, transformMenu} from './menu-animations'; import {throwMdMenuInvalidPositionX, throwMdMenuInvalidPositionY} from './menu-errors'; import {MdMenuItem} from './menu-item'; -import {FocusKeyManager} from '@angular/cdk/a11y'; import {MdMenuPanel} from './menu-panel'; -import {Subscription} from 'rxjs/Subscription'; -import {transformMenu, fadeInItems} from './menu-animations'; -import {ESCAPE, LEFT_ARROW, RIGHT_ARROW} from '@angular/material/core'; -import {merge} from 'rxjs/observable/merge'; -import {Observable} from 'rxjs/Observable'; -import {Direction} from '@angular/cdk/bidi'; -import {RxChain, startWith, switchMap} from '@angular/cdk/rxjs'; +import {MenuPositionX, MenuPositionY} from './menu-positions'; + /** Default `md-menu` options that can be overridden. */ export interface MdMenuDefaultOptions { diff --git a/src/lib/menu/menu.scss b/src/lib/menu/menu.scss index 04cfcc38a1fa..5fcc8a889650 100644 --- a/src/lib/menu/menu.scss +++ b/src/lib/menu/menu.scss @@ -3,7 +3,7 @@ @import '../core/style/button-common'; @import '../core/style/layout-common'; @import '../core/style/menu-common'; -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; @import '../core/style/layout-common'; $mat-menu-vertical-padding: 8px !default; diff --git a/src/lib/select/select.scss b/src/lib/select/select.scss index 9b57b49d63ea..1056cef91149 100644 --- a/src/lib/select/select.scss +++ b/src/lib/select/select.scss @@ -2,7 +2,7 @@ @import '../core/style/list-common'; @import '../core/style/variables'; @import '../core/style/vendor-prefixes'; -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; $mat-select-trigger-height: 30px !default; $mat-select-trigger-min-width: 112px !default; diff --git a/src/lib/sidenav/drawer.scss b/src/lib/sidenav/drawer.scss index 26800af1f258..9d46906c21fd 100644 --- a/src/lib/sidenav/drawer.scss +++ b/src/lib/sidenav/drawer.scss @@ -1,7 +1,7 @@ @import '../core/style/variables'; @import '../core/style/elevation'; @import '../core/style/layout-common'; -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; // stylelint-disable max-line-length // Mixin that creates a new stacking context. diff --git a/src/lib/sidenav/drawer.ts b/src/lib/sidenav/drawer.ts index ea4d0af73d96..4966beaa9913 100644 --- a/src/lib/sidenav/drawer.ts +++ b/src/lib/sidenav/drawer.ts @@ -10,6 +10,7 @@ import {animate, AnimationEvent, state, style, transition, trigger} from '@angul import {FocusTrap, FocusTrapFactory} from '@angular/cdk/a11y'; import {Directionality} from '@angular/cdk/bidi'; import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {ESCAPE} from '@angular/cdk/keycodes'; import { AfterContentInit, ChangeDetectionStrategy, @@ -28,9 +29,11 @@ import { Renderer2, ViewEncapsulation, } from '@angular/core'; -import {ESCAPE, first, startWith, takeUntil} from '@angular/material/core'; import {DOCUMENT} from '@angular/platform-browser'; import {merge} from 'rxjs/observable/merge'; +import {first} from 'rxjs/operator/first'; +import {startWith} from 'rxjs/operator/startWith'; +import {takeUntil} from 'rxjs/operator/takeUntil'; import {Subscription} from 'rxjs/Subscription'; diff --git a/src/lib/slide-toggle/slide-toggle.scss b/src/lib/slide-toggle/slide-toggle.scss index 62f3298d78a4..8fd0e11da000 100644 --- a/src/lib/slide-toggle/slide-toggle.scss +++ b/src/lib/slide-toggle/slide-toggle.scss @@ -2,7 +2,7 @@ @import '../core/ripple/ripple'; @import '../core/style/elevation'; @import '../core/style/vendor-prefixes'; -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; $mat-slide-toggle-thumb-size: 20px !default; $mat-slide-toggle-bar-border-radius: 8px !default; diff --git a/src/lib/slider/public_api.ts b/src/lib/slider/public_api.ts index f7cc6fb8acd1..e61ce027da62 100644 --- a/src/lib/slider/public_api.ts +++ b/src/lib/slider/public_api.ts @@ -6,12 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ +import {BidiModule} from '@angular/cdk/bidi'; +import {CommonModule} from '@angular/common'; import {NgModule} from '@angular/core'; +import {GestureConfig, MdCommonModule, StyleModule} from '@angular/material/core'; import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser'; -import {CommonModule} from '@angular/common'; -import {MdCommonModule, GestureConfig, StyleModule} from '@angular/material/core'; import {MdSlider} from './slider'; -import {BidiModule} from '@angular/material/core'; @NgModule({ diff --git a/src/lib/snack-bar/snack-bar-container.scss b/src/lib/snack-bar/snack-bar-container.scss index 164040d9b079..72e1ae221690 100644 --- a/src/lib/snack-bar/snack-bar-container.scss +++ b/src/lib/snack-bar/snack-bar-container.scss @@ -1,4 +1,4 @@ -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; $mat-snack-bar-padding: 14px 24px !default; $mat-snack-bar-min-width: 288px !default; diff --git a/src/lib/snack-bar/snack-bar.ts b/src/lib/snack-bar/snack-bar.ts index a4ed737b2add..610160f32d17 100644 --- a/src/lib/snack-bar/snack-bar.ts +++ b/src/lib/snack-bar/snack-bar.ts @@ -6,16 +6,15 @@ * found in the LICENSE file at https://angular.io/license */ -import {ComponentRef, Injectable, Injector, Optional, SkipSelf } from '@angular/core'; -import {Overlay, OverlayRef, OverlayState} from '@angular/cdk/overlay'; -import {ComponentPortal, ComponentType} from '@angular/cdk/portal'; import {LiveAnnouncer} from '@angular/cdk/a11y'; -import {PortalInjector} from '@angular/material/core'; +import {Overlay, OverlayRef, OverlayState} from '@angular/cdk/overlay'; +import {ComponentPortal, ComponentType, PortalInjector} from '@angular/cdk/portal'; +import {ComponentRef, Injectable, Injector, Optional, SkipSelf} from '@angular/core'; import {extendObject} from '@angular/material/core'; +import {SimpleSnackBar} from './simple-snack-bar'; import {MD_SNACK_BAR_DATA, MdSnackBarConfig} from './snack-bar-config'; -import {MdSnackBarRef} from './snack-bar-ref'; import {MdSnackBarContainer} from './snack-bar-container'; -import {SimpleSnackBar} from './simple-snack-bar'; +import {MdSnackBarRef} from './snack-bar-ref'; /** diff --git a/src/lib/tabs/tab.ts b/src/lib/tabs/tab.ts index f848e33f0443..d8c6860a749f 100644 --- a/src/lib/tabs/tab.ts +++ b/src/lib/tabs/tab.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {TemplatePortal} from '@angular/material/core'; +import {TemplatePortal} from '@angular/cdk/portal'; import { ChangeDetectionStrategy, Component, @@ -22,8 +22,9 @@ import { ViewEncapsulation, } from '@angular/core'; import {CanDisable, mixinDisabled} from '@angular/material/core'; -import {MdTabLabel} from './tab-label'; import {Subject} from 'rxjs/Subject'; +import {MdTabLabel} from './tab-label'; + // Boilerplate for applying mixins to MdTab. /** @docs-private */ diff --git a/src/lib/tooltip/tooltip.scss b/src/lib/tooltip/tooltip.scss index 1b69d057673f..e3bb19b162ab 100644 --- a/src/lib/tooltip/tooltip.scss +++ b/src/lib/tooltip/tooltip.scss @@ -1,5 +1,5 @@ @import '../core/style/variables'; -@import '../core/a11y/a11y'; +@import '../../cdk/a11y/a11y'; $mat-tooltip-horizontal-padding: 8px; $mat-tooltip-max-width: 250px;