UNPKG

25.6 kBJavaScriptView Raw
1var __extends = (this && this.__extends) || function (d, b) {
2 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3 function __() { this.constructor = d; }
4 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
5};
6var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
7 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
10 return c > 3 && r && Object.defineProperty(target, key, r), r;
11};
12var __metadata = (this && this.__metadata) || function (k, v) {
13 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
14};
15var __param = (this && this.__param) || function (paramIndex, decorator) {
16 return function (target, key) { decorator(target, key, paramIndex); }
17};
18import { NgModule, Component, ContentChildren, ElementRef, HostBinding, Input, Optional, Output, QueryList, ChangeDetectionStrategy, EventEmitter, Renderer, ViewEncapsulation } from '@angular/core';
19import { CommonModule } from '@angular/common';
20import { Dir, MdError, BooleanFieldValue } from '@angular2-material/core';
21/** Exception thrown when two MdSidenav are matching the same side. */
22export var MdDuplicatedSidenavError = (function (_super) {
23 __extends(MdDuplicatedSidenavError, _super);
24 function MdDuplicatedSidenavError(align) {
25 _super.call(this, "A sidenav was already declared for 'align=\"" + align + "\"'");
26 }
27 return MdDuplicatedSidenavError;
28}(MdError));
29/**
30 * <md-sidenav> component.
31 *
32 * This component corresponds to the drawer of the sidenav.
33 *
34 * Please refer to README.md for examples on how to use it.
35 */
36export var MdSidenav = (function () {
37 /**
38 * @param _elementRef The DOM element reference. Used for transition and width calculation.
39 * If not available we do not hook on transitions.
40 */
41 function MdSidenav(_elementRef) {
42 this._elementRef = _elementRef;
43 /** Alignment of the sidenav (direction neutral); whether 'start' or 'end'. */
44 this.align = 'start';
45 /** Mode of the sidenav; whether 'over' or 'side'. */
46 this.mode = 'over';
47 /** Whether the sidenav is opened. */
48 this._opened = false;
49 /** Event emitted when the sidenav is being opened. Use this to synchronize animations. */
50 this.onOpenStart = new EventEmitter();
51 /** Event emitted when the sidenav is fully opened. */
52 this.onOpen = new EventEmitter();
53 /** Event emitted when the sidenav is being closed. Use this to synchronize animations. */
54 this.onCloseStart = new EventEmitter();
55 /** Event emitted when the sidenav is fully closed. */
56 this.onClose = new EventEmitter();
57 this._transition = false;
58 }
59 Object.defineProperty(MdSidenav.prototype, "opened", {
60 /**
61 * Whether the sidenav is opened. We overload this because we trigger an event when it
62 * starts or end.
63 */
64 get: function () { return this._opened; },
65 set: function (v) {
66 this.toggle(v);
67 },
68 enumerable: true,
69 configurable: true
70 });
71 /** Open this sidenav, and return a Promise that will resolve when it's fully opened (or get
72 * rejected if it didn't). */
73 MdSidenav.prototype.open = function () {
74 return this.toggle(true);
75 };
76 /**
77 * Close this sidenav, and return a Promise that will resolve when it's fully closed (or get
78 * rejected if it didn't).
79 */
80 MdSidenav.prototype.close = function () {
81 return this.toggle(false);
82 };
83 /**
84 * Toggle this sidenav. This is equivalent to calling open() when it's already opened, or
85 * close() when it's closed.
86 * @param isOpen
87 */
88 MdSidenav.prototype.toggle = function (isOpen) {
89 var _this = this;
90 if (isOpen === void 0) { isOpen = !this.opened; }
91 // Shortcut it if we're already opened.
92 if (isOpen === this.opened) {
93 if (!this._transition) {
94 return Promise.resolve(null);
95 }
96 else {
97 return isOpen ? this._openPromise : this._closePromise;
98 }
99 }
100 this._opened = isOpen;
101 this._transition = true;
102 if (isOpen) {
103 this.onOpenStart.emit(null);
104 }
105 else {
106 this.onCloseStart.emit(null);
107 }
108 if (isOpen) {
109 if (this._openPromise == null) {
110 this._openPromise = new Promise(function (resolve, reject) {
111 _this._openPromiseResolve = resolve;
112 _this._openPromiseReject = reject;
113 });
114 }
115 return this._openPromise;
116 }
117 else {
118 if (this._closePromise == null) {
119 this._closePromise = new Promise(function (resolve, reject) {
120 _this._closePromiseResolve = resolve;
121 _this._closePromiseReject = reject;
122 });
123 }
124 return this._closePromise;
125 }
126 };
127 /**
128 * When transition has finished, set the internal state for classes and emit the proper event.
129 * The event passed is actually of type TransitionEvent, but that type is not available in
130 * Android so we use any.
131 */
132 MdSidenav.prototype._onTransitionEnd = function (transitionEvent) {
133 if (transitionEvent.target == this._elementRef.nativeElement
134 && transitionEvent.propertyName.endsWith('transform')) {
135 this._transition = false;
136 if (this._opened) {
137 if (this._openPromise != null) {
138 this._openPromiseResolve();
139 }
140 if (this._closePromise != null) {
141 this._closePromiseReject();
142 }
143 this.onOpen.emit(null);
144 }
145 else {
146 if (this._closePromise != null) {
147 this._closePromiseResolve();
148 }
149 if (this._openPromise != null) {
150 this._openPromiseReject();
151 }
152 this.onClose.emit(null);
153 }
154 this._openPromise = null;
155 this._closePromise = null;
156 }
157 };
158 Object.defineProperty(MdSidenav.prototype, "_isClosing", {
159 get: function () {
160 return !this._opened && this._transition;
161 },
162 enumerable: true,
163 configurable: true
164 });
165 Object.defineProperty(MdSidenav.prototype, "_isOpening", {
166 get: function () {
167 return this._opened && this._transition;
168 },
169 enumerable: true,
170 configurable: true
171 });
172 Object.defineProperty(MdSidenav.prototype, "_isClosed", {
173 get: function () {
174 return !this._opened && !this._transition;
175 },
176 enumerable: true,
177 configurable: true
178 });
179 Object.defineProperty(MdSidenav.prototype, "_isOpened", {
180 get: function () {
181 return this._opened && !this._transition;
182 },
183 enumerable: true,
184 configurable: true
185 });
186 Object.defineProperty(MdSidenav.prototype, "_isEnd", {
187 get: function () {
188 return this.align == 'end';
189 },
190 enumerable: true,
191 configurable: true
192 });
193 Object.defineProperty(MdSidenav.prototype, "_modeSide", {
194 get: function () {
195 return this.mode == 'side';
196 },
197 enumerable: true,
198 configurable: true
199 });
200 Object.defineProperty(MdSidenav.prototype, "_modeOver", {
201 get: function () {
202 return this.mode == 'over';
203 },
204 enumerable: true,
205 configurable: true
206 });
207 Object.defineProperty(MdSidenav.prototype, "_modePush", {
208 get: function () {
209 return this.mode == 'push';
210 },
211 enumerable: true,
212 configurable: true
213 });
214 Object.defineProperty(MdSidenav.prototype, "_width", {
215 /** TODO: internal (needed by MdSidenavLayout). */
216 get: function () {
217 if (this._elementRef.nativeElement) {
218 return this._elementRef.nativeElement.offsetWidth;
219 }
220 return 0;
221 },
222 enumerable: true,
223 configurable: true
224 });
225 __decorate([
226 Input(),
227 __metadata('design:type', Object)
228 ], MdSidenav.prototype, "align", void 0);
229 __decorate([
230 Input(),
231 __metadata('design:type', Object)
232 ], MdSidenav.prototype, "mode", void 0);
233 __decorate([
234 Input('opened'),
235 BooleanFieldValue(),
236 __metadata('design:type', Boolean)
237 ], MdSidenav.prototype, "_opened", void 0);
238 __decorate([
239 Output('open-start'),
240 __metadata('design:type', Object)
241 ], MdSidenav.prototype, "onOpenStart", void 0);
242 __decorate([
243 Output('open'),
244 __metadata('design:type', Object)
245 ], MdSidenav.prototype, "onOpen", void 0);
246 __decorate([
247 Output('close-start'),
248 __metadata('design:type', Object)
249 ], MdSidenav.prototype, "onCloseStart", void 0);
250 __decorate([
251 Output('close'),
252 __metadata('design:type', Object)
253 ], MdSidenav.prototype, "onClose", void 0);
254 __decorate([
255 HostBinding('class.md-sidenav-closing'),
256 __metadata('design:type', Object)
257 ], MdSidenav.prototype, "_isClosing", null);
258 __decorate([
259 HostBinding('class.md-sidenav-opening'),
260 __metadata('design:type', Object)
261 ], MdSidenav.prototype, "_isOpening", null);
262 __decorate([
263 HostBinding('class.md-sidenav-closed'),
264 __metadata('design:type', Object)
265 ], MdSidenav.prototype, "_isClosed", null);
266 __decorate([
267 HostBinding('class.md-sidenav-opened'),
268 __metadata('design:type', Object)
269 ], MdSidenav.prototype, "_isOpened", null);
270 __decorate([
271 HostBinding('class.md-sidenav-end'),
272 __metadata('design:type', Object)
273 ], MdSidenav.prototype, "_isEnd", null);
274 __decorate([
275 HostBinding('class.md-sidenav-side'),
276 __metadata('design:type', Object)
277 ], MdSidenav.prototype, "_modeSide", null);
278 __decorate([
279 HostBinding('class.md-sidenav-over'),
280 __metadata('design:type', Object)
281 ], MdSidenav.prototype, "_modeOver", null);
282 __decorate([
283 HostBinding('class.md-sidenav-push'),
284 __metadata('design:type', Object)
285 ], MdSidenav.prototype, "_modePush", null);
286 MdSidenav = __decorate([
287 Component({selector: 'md-sidenav',
288 template: '<ng-content></ng-content>',
289 host: {
290 '(transitionend)': '_onTransitionEnd($event)',
291 },
292 changeDetection: ChangeDetectionStrategy.OnPush,
293 encapsulation: ViewEncapsulation.None,
294 }),
295 __metadata('design:paramtypes', [ElementRef])
296 ], MdSidenav);
297 return MdSidenav;
298}());
299/**
300 * <md-sidenav-layout> component.
301 *
302 * This is the parent component to one or two <md-sidenav>s that validates the state internally
303 * and coordinate the backdrop and content styling.
304 */
305export var MdSidenavLayout = (function () {
306 function MdSidenavLayout(_dir, _element, _renderer) {
307 var _this = this;
308 this._dir = _dir;
309 this._element = _element;
310 this._renderer = _renderer;
311 // If a `Dir` directive exists up the tree, listen direction changes and update the left/right
312 // properties to point to the proper start/end.
313 if (_dir != null) {
314 _dir.dirChange.subscribe(function () { return _this._validateDrawers(); });
315 }
316 }
317 Object.defineProperty(MdSidenavLayout.prototype, "start", {
318 get: function () { return this._start; },
319 enumerable: true,
320 configurable: true
321 });
322 Object.defineProperty(MdSidenavLayout.prototype, "end", {
323 get: function () { return this._end; },
324 enumerable: true,
325 configurable: true
326 });
327 /** TODO: internal */
328 MdSidenavLayout.prototype.ngAfterContentInit = function () {
329 var _this = this;
330 // On changes, assert on consistency.
331 this._sidenavs.changes.subscribe(function () { return _this._validateDrawers(); });
332 this._sidenavs.forEach(function (sidenav) { return _this._watchSidenavToggle(sidenav); });
333 this._validateDrawers();
334 };
335 /*
336 * Subscribes to sidenav events in order to set a class on the main layout element when the sidenav
337 * is open and the backdrop is visible. This ensures any overflow on the layout element is properly
338 * hidden.
339 */
340 MdSidenavLayout.prototype._watchSidenavToggle = function (sidenav) {
341 var _this = this;
342 if (!sidenav || sidenav.mode === 'side') {
343 return;
344 }
345 sidenav.onOpen.subscribe(function () { return _this._setLayoutClass(sidenav, true); });
346 sidenav.onClose.subscribe(function () { return _this._setLayoutClass(sidenav, false); });
347 };
348 /* Toggles the 'md-sidenav-opened' class on the main 'md-sidenav-layout' element. */
349 MdSidenavLayout.prototype._setLayoutClass = function (sidenav, bool) {
350 this._renderer.setElementClass(this._element.nativeElement, 'md-sidenav-opened', bool);
351 };
352 /** Validate the state of the sidenav children components. */
353 MdSidenavLayout.prototype._validateDrawers = function () {
354 var _this = this;
355 this._start = this._end = null;
356 // Ensure that we have at most one start and one end sidenav.
357 this._sidenavs.forEach(function (sidenav) {
358 if (sidenav.align == 'end') {
359 if (_this._end != null) {
360 throw new MdDuplicatedSidenavError('end');
361 }
362 _this._end = sidenav;
363 }
364 else {
365 if (_this._start != null) {
366 throw new MdDuplicatedSidenavError('start');
367 }
368 _this._start = sidenav;
369 }
370 });
371 this._right = this._left = null;
372 // Detect if we're LTR or RTL.
373 if (this._dir == null || this._dir.value == 'ltr') {
374 this._left = this._start;
375 this._right = this._end;
376 }
377 else {
378 this._left = this._end;
379 this._right = this._start;
380 }
381 };
382 MdSidenavLayout.prototype._closeModalSidenav = function () {
383 if (this._start != null && this._start.mode != 'side') {
384 this._start.close();
385 }
386 if (this._end != null && this._end.mode != 'side') {
387 this._end.close();
388 }
389 };
390 MdSidenavLayout.prototype._isShowingBackdrop = function () {
391 return (this._isSidenavOpen(this._start) && this._start.mode != 'side')
392 || (this._isSidenavOpen(this._end) && this._end.mode != 'side');
393 };
394 MdSidenavLayout.prototype._isSidenavOpen = function (side) {
395 return side != null && side.opened;
396 };
397 /**
398 * Return the width of the sidenav, if it's in the proper mode and opened.
399 * This may relayout the view, so do not call this often.
400 * @param sidenav
401 * @param mode
402 */
403 MdSidenavLayout.prototype._getSidenavEffectiveWidth = function (sidenav, mode) {
404 return (this._isSidenavOpen(sidenav) && sidenav.mode == mode) ? sidenav._width : 0;
405 };
406 MdSidenavLayout.prototype._getMarginLeft = function () {
407 return this._getSidenavEffectiveWidth(this._left, 'side');
408 };
409 MdSidenavLayout.prototype._getMarginRight = function () {
410 return this._getSidenavEffectiveWidth(this._right, 'side');
411 };
412 MdSidenavLayout.prototype._getPositionLeft = function () {
413 return this._getSidenavEffectiveWidth(this._left, 'push');
414 };
415 MdSidenavLayout.prototype._getPositionRight = function () {
416 return this._getSidenavEffectiveWidth(this._right, 'push');
417 };
418 /**
419 * Returns the horizontal offset for the content area. There should never be a value for both
420 * left and right, so by subtracting the right value from the left value, we should always get
421 * the appropriate offset.
422 */
423 MdSidenavLayout.prototype._getPositionOffset = function () {
424 return this._getPositionLeft() - this._getPositionRight();
425 };
426 /**
427 * This is using [ngStyle] rather than separate [style...] properties because [style.transform]
428 * doesn't seem to work right now.
429 */
430 MdSidenavLayout.prototype._getStyles = function () {
431 return {
432 marginLeft: this._getMarginLeft() + "px",
433 marginRight: this._getMarginRight() + "px",
434 transform: "translate3d(" + this._getPositionOffset() + "px, 0, 0)"
435 };
436 };
437 __decorate([
438 ContentChildren(MdSidenav),
439 __metadata('design:type', QueryList)
440 ], MdSidenavLayout.prototype, "_sidenavs", void 0);
441 MdSidenavLayout = __decorate([
442 Component({selector: 'md-sidenav-layout',
443 // Do not use ChangeDetectionStrategy.OnPush. It does not work for this component because
444 // technically it is a sibling of MdSidenav (on the content tree) and isn't updated when MdSidenav
445 // changes its state.
446 template: "<div class=\"md-sidenav-backdrop\" (click)=\"_closeModalSidenav()\" [class.md-sidenav-shown]=\"_isShowingBackdrop()\"></div> <ng-content select=\"md-sidenav\"></ng-content> <div class=\"md-sidenav-content\" [ngStyle]=\"_getStyles()\"> <ng-content></ng-content> </div> ",
447 styles: ["/** * Mixin that creates a new stacking context. * see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context */ /** * This mixin hides an element visually. * That means it's still accessible for screen-readers but not visible in view. */ /** * Forces an element to grow to fit floated contents; used as as an alternative to * `overflow: hidden;` because it doesn't cut off contents. */ /** * A mixin, which generates temporary ink ripple on a given component. * When $bindToParent is set to true, it will check for the focused class on the same selector as you included * that mixin. * It is also possible to specify the color palette of the temporary ripple. By default it uses the * accent palette for its background. */ /** * A collection of mixins and CSS classes that can be used to apply elevation to a material * element. * See: https://www.google.com/design/spec/what-is-material/elevation-shadows.html * Examples: * * * .md-foo { * @include $md-elevation(2); * * &:active { * @include $md-elevation(8); * } * } * * <div id=\"external-card\" class=\"md-elevation-z2\"><p>Some content</p></div> * * For an explanation of the design behind how elevation is implemented, see the design doc at * https://goo.gl/Kq0k9Z. */ /** * The css property used for elevation. In most cases this should not be changed. It is exposed * as a variable for abstraction / easy use when needing to reference the property directly, for * example in a will-change rule. */ /** The default duration value for elevation transitions. */ /** The default easing value for elevation transitions. */ /** * Applies the correct css rules to an element to give it the elevation specified by $zValue. * The $zValue must be between 0 and 24. */ /** * Returns a string that can be used as the value for a transition property for elevation. * Calling this function directly is useful in situations where a component needs to transition * more than one property. * * .foo { * transition: md-elevation-transition-property-value(), opacity 100ms ease; * will-change: $md-elevation-property, opacity; * } */ /** * Applies the correct css rules needed to have an element transition between elevations. * This mixin should be applied to elements whose elevation values will change depending on their * context (e.g. when active or disabled). */ /* This mixin ensures an element spans the whole viewport.*/ /** * Mixin to help with defining LTR/RTL 'transform: translate3d()' values. * @param $open The translation value when the sidenav is opened. * @param $close The translation value when the sidenav is closed. */ md-sidenav-layout { position: relative; transform: translate3d(0, 0, 0); box-sizing: border-box; -webkit-overflow-scrolling: touch; display: block; overflow: hidden; } md-sidenav-layout[fullscreen] { position: fixed; top: 0; left: 0; right: 0; bottom: 0; } md-sidenav-layout[fullscreen].md-sidenav-opened { overflow: hidden; } .md-sidenav-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: block; z-index: 2; visibility: hidden; } .md-sidenav-backdrop.md-sidenav-shown { visibility: visible; background-color: rgba(0, 0, 0, 0.6); } .md-sidenav-content { position: relative; transform: translate3d(0, 0, 0); display: block; height: 100%; overflow: auto; } md-sidenav { position: relative; transform: translate3d(0, 0, 0); display: block; position: absolute; top: 0; bottom: 0; z-index: 3; min-width: 5%; overflow-y: auto; background-color: white; transform: translate3d(-100%, 0, 0); } md-sidenav.md-sidenav-closed { visibility: hidden; } md-sidenav.md-sidenav-closing { transform: translate3d(-100%, 0, 0); will-change: transform; } md-sidenav.md-sidenav-opening { box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); visibility: visible; transform: translate3d(0, 0, 0); will-change: transform; } md-sidenav.md-sidenav-opened { box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); transform: translate3d(0, 0, 0); } md-sidenav.md-sidenav-push { background-color: white; } md-sidenav.md-sidenav-side { z-index: 1; } md-sidenav.md-sidenav-end { right: 0; transform: translate3d(100%, 0, 0); } md-sidenav.md-sidenav-end.md-sidenav-closed { visibility: hidden; } md-sidenav.md-sidenav-end.md-sidenav-closing { transform: translate3d(100%, 0, 0); will-change: transform; } md-sidenav.md-sidenav-end.md-sidenav-opening { box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); visibility: visible; transform: translate3d(0, 0, 0); will-change: transform; } md-sidenav.md-sidenav-end.md-sidenav-opened { box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); transform: translate3d(0, 0, 0); } [dir='rtl'] md-sidenav { transform: translate3d(100%, 0, 0); } [dir='rtl'] md-sidenav.md-sidenav-closed { visibility: hidden; } [dir='rtl'] md-sidenav.md-sidenav-closing { transform: translate3d(100%, 0, 0); will-change: transform; } [dir='rtl'] md-sidenav.md-sidenav-opening { box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); visibility: visible; transform: translate3d(0, 0, 0); will-change: transform; } [dir='rtl'] md-sidenav.md-sidenav-opened { box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); transform: translate3d(0, 0, 0); } [dir='rtl'] md-sidenav.md-sidenav-end { left: 0; right: auto; transform: translate3d(-100%, 0, 0); } [dir='rtl'] md-sidenav.md-sidenav-end.md-sidenav-closed { visibility: hidden; } [dir='rtl'] md-sidenav.md-sidenav-end.md-sidenav-closing { transform: translate3d(-100%, 0, 0); will-change: transform; } [dir='rtl'] md-sidenav.md-sidenav-end.md-sidenav-opening { box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); visibility: visible; transform: translate3d(0, 0, 0); will-change: transform; } [dir='rtl'] md-sidenav.md-sidenav-end.md-sidenav-opened { box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); transform: translate3d(0, 0, 0); } /*# sourceMappingURL=sidenav.css.map */ ",
448"/** * We separate transitions to be able to disable them in unit tests, by simply not loading this file. */ md-sidenav { transition: transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1); } .md-sidenav-content { transition: transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1); } .md-sidenav-backdrop.md-sidenav-shown { transition: background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1); } /*# sourceMappingURL=sidenav-transitions.css.map */ "],
449 encapsulation: ViewEncapsulation.None,
450 }),
451 __param(0, Optional()),
452 __metadata('design:paramtypes', [Dir, ElementRef, Renderer])
453 ], MdSidenavLayout);
454 return MdSidenavLayout;
455}());
456export var MdSidenavModule = (function () {
457 function MdSidenavModule() {
458 }
459 MdSidenavModule.forRoot = function () {
460 return {
461 ngModule: MdSidenavModule,
462 providers: []
463 };
464 };
465 MdSidenavModule = __decorate([
466 NgModule({
467 imports: [CommonModule],
468 exports: [MdSidenavLayout, MdSidenav],
469 declarations: [MdSidenavLayout, MdSidenav],
470 }),
471 __metadata('design:paramtypes', [])
472 ], MdSidenavModule);
473 return MdSidenavModule;
474}());
475
476//# sourceMappingURL=sidenav.js.map