UNPKG

25.6 kBJavaScriptView Raw
1var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4 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;
5 return c > 3 && r && Object.defineProperty(target, key, r), r;
6};
7var __metadata = (this && this.__metadata) || function (k, v) {
8 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9};
10import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, Renderer, ViewEncapsulation, forwardRef, NgModule } from '@angular/core';
11import { NG_VALUE_ACCESSOR } from '@angular/forms';
12/**
13 * Monotonically increasing integer used to auto-generate unique ids for checkbox components.
14 */
15var nextId = 0;
16/**
17 * Provider Expression that allows md-checkbox to register as a ControlValueAccessor. This allows it
18 * to support [(ngModel)].
19 */
20export var MD_CHECKBOX_CONTROL_VALUE_ACCESSOR = {
21 provide: NG_VALUE_ACCESSOR,
22 useExisting: forwardRef(function () { return MdCheckbox; }),
23 multi: true
24};
25/**
26 * Represents the different states that require custom transitions between them.
27 */
28export var TransitionCheckState;
29(function (TransitionCheckState) {
30 /** The initial state of the component before any user interaction. */
31 TransitionCheckState[TransitionCheckState["Init"] = 0] = "Init";
32 /** The state representing the component when it's becoming checked. */
33 TransitionCheckState[TransitionCheckState["Checked"] = 1] = "Checked";
34 /** The state representing the component when it's becoming unchecked. */
35 TransitionCheckState[TransitionCheckState["Unchecked"] = 2] = "Unchecked";
36 /** The state representing the component when it's becoming indeterminate. */
37 TransitionCheckState[TransitionCheckState["Indeterminate"] = 3] = "Indeterminate";
38})(TransitionCheckState || (TransitionCheckState = {}));
39// A simple change event emitted by the MdCheckbox component.
40export var MdCheckboxChange = (function () {
41 function MdCheckboxChange() {
42 }
43 return MdCheckboxChange;
44}());
45/**
46 * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,
47 * and exposes a similar API. An MdCheckbox can be either checked, unchecked, indeterminate, or
48 * disabled. Note that all additional accessibility attributes are taken care of by the component,
49 * so there is no need to provide them yourself. However, if you want to omit a label and still
50 * have the checkbox be accessible, you may supply an [aria-label] input.
51 * See: https://www.google.com/design/spec/components/selection-controls.html
52 */
53export var MdCheckbox = (function () {
54 function MdCheckbox(_renderer, _elementRef) {
55 this._renderer = _renderer;
56 this._elementRef = _elementRef;
57 /**
58 * Attached to the aria-label attribute of the host element. In most cases, arial-labelledby will
59 * take precedence so this may be omitted.
60 */
61 this.ariaLabel = '';
62 /**
63 * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element
64 */
65 this.ariaLabelledby = null;
66 /** A unique id for the checkbox. If one is not supplied, it is auto-generated. */
67 this.id = "md-checkbox-" + ++nextId;
68 /** Whether or not the checkbox should come before or after the label. */
69 this.align = 'start';
70 /**
71 * Whether the checkbox is disabled. When the checkbox is disabled it cannot be interacted with.
72 * The correct ARIA attributes are applied to denote this to assistive technology.
73 */
74 this.disabled = false;
75 /**
76 * The tabindex attribute for the checkbox. Note that when the checkbox is disabled, the attribute
77 * on the host element will be removed. It will be placed back when the checkbox is re-enabled.
78 */
79 this.tabindex = 0;
80 /** Name value will be applied to the input element if present */
81 this.name = null;
82 /** Event emitted when the checkbox's `checked` value changes. */
83 this.change = new EventEmitter();
84 /** Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor. */
85 this.onTouched = function () { };
86 this._currentAnimationClass = '';
87 this._currentCheckState = TransitionCheckState.Init;
88 this._checked = false;
89 this._indeterminate = false;
90 this._controlValueAccessorChangeFn = function (value) { };
91 this.hasFocus = false;
92 }
93 Object.defineProperty(MdCheckbox.prototype, "inputId", {
94 /** ID to be applied to the `input` element */
95 get: function () {
96 return "input-" + this.id;
97 },
98 enumerable: true,
99 configurable: true
100 });
101 Object.defineProperty(MdCheckbox.prototype, "checked", {
102 /**
103 * Whether the checkbox is checked. Note that setting `checked` will immediately set
104 * `indeterminate` to false.
105 */
106 get: function () {
107 return this._checked;
108 },
109 set: function (checked) {
110 if (checked != this.checked) {
111 this._indeterminate = false;
112 this._checked = checked;
113 this._transitionCheckState(this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);
114 }
115 },
116 enumerable: true,
117 configurable: true
118 });
119 Object.defineProperty(MdCheckbox.prototype, "indeterminate", {
120 /**
121 * Whether the checkbox is indeterminate. This is also known as "mixed" mode and can be used to
122 * represent a checkbox with three states, e.g. a checkbox that represents a nested list of
123 * checkable items. Note that whenever `checked` is set, indeterminate is immediately set to
124 * false. This differs from the web platform in that indeterminate state on native
125 * checkboxes is only remove when the user manually checks the checkbox (rather than setting the
126 * `checked` property programmatically). However, we feel that this behavior is more accommodating
127 * to the way consumers would envision using this component.
128 */
129 get: function () {
130 return this._indeterminate;
131 },
132 set: function (indeterminate) {
133 this._indeterminate = indeterminate;
134 if (this._indeterminate) {
135 this._transitionCheckState(TransitionCheckState.Indeterminate);
136 }
137 else {
138 this._transitionCheckState(this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);
139 }
140 },
141 enumerable: true,
142 configurable: true
143 });
144 /**
145 * Implemented as part of ControlValueAccessor.
146 * TODO: internal
147 */
148 MdCheckbox.prototype.writeValue = function (value) {
149 this.checked = !!value;
150 };
151 /**
152 * Implemented as part of ControlValueAccessor.
153 * TODO: internal
154 */
155 MdCheckbox.prototype.registerOnChange = function (fn) {
156 this._controlValueAccessorChangeFn = fn;
157 };
158 /**
159 * Implemented as part of ControlValueAccessor.
160 * TODO: internal
161 */
162 MdCheckbox.prototype.registerOnTouched = function (fn) {
163 this.onTouched = fn;
164 };
165 MdCheckbox.prototype._transitionCheckState = function (newState) {
166 var oldState = this._currentCheckState;
167 var renderer = this._renderer;
168 var elementRef = this._elementRef;
169 if (oldState === newState) {
170 return;
171 }
172 if (this._currentAnimationClass.length > 0) {
173 renderer.setElementClass(elementRef.nativeElement, this._currentAnimationClass, false);
174 }
175 this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(oldState, newState);
176 this._currentCheckState = newState;
177 if (this._currentAnimationClass.length > 0) {
178 renderer.setElementClass(elementRef.nativeElement, this._currentAnimationClass, true);
179 }
180 };
181 MdCheckbox.prototype._emitChangeEvent = function () {
182 var event = new MdCheckboxChange();
183 event.source = this;
184 event.checked = this.checked;
185 this._controlValueAccessorChangeFn(this.checked);
186 this.change.emit(event);
187 };
188 /** Informs the component when the input has focus so that we can style accordingly */
189 MdCheckbox.prototype._onInputFocus = function () {
190 this.hasFocus = true;
191 };
192 /** Informs the component when we lose focus in order to style accordingly */
193 MdCheckbox.prototype._onInputBlur = function () {
194 this.hasFocus = false;
195 this.onTouched();
196 };
197 /**
198 * Toggles the `checked` value between true and false
199 */
200 MdCheckbox.prototype.toggle = function () {
201 this.checked = !this.checked;
202 };
203 /**
204 * Event handler for checkbox input element.
205 * Toggles checked state if element is not disabled.
206 * @param event
207 */
208 MdCheckbox.prototype._onInteractionEvent = function (event) {
209 // We always have to stop propagation on the change event.
210 // Otherwise the change event, from the input element, will bubble up and
211 // emit its event object to the `change` output.
212 event.stopPropagation();
213 if (!this.disabled) {
214 this.toggle();
215 // Emit our custom change event if the native input emitted one.
216 // It is important to only emit it, if the native input triggered one, because
217 // we don't want to trigger a change event, when the `checked` variable changes for example.
218 this._emitChangeEvent();
219 }
220 };
221 MdCheckbox.prototype._onInputClick = function (event) {
222 // We have to stop propagation for click events on the visual hidden input element.
223 // By default, when a user clicks on a label element, a generated click event will be
224 // dispatched on the associated input element. Since we are using a label element as our
225 // root container, the click event on the `checkbox` will be executed twice.
226 // The real click event will bubble up, and the generated click event also tries to bubble up.
227 // This will lead to multiple click events.
228 // Preventing bubbling for the second event will solve that issue.
229 event.stopPropagation();
230 };
231 MdCheckbox.prototype._getAnimationClassForCheckStateTransition = function (oldState, newState) {
232 var animSuffix;
233 switch (oldState) {
234 case TransitionCheckState.Init:
235 // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or
236 // [checked] bound to it.
237 if (newState === TransitionCheckState.Checked) {
238 animSuffix = 'unchecked-checked';
239 }
240 else {
241 return '';
242 }
243 break;
244 case TransitionCheckState.Unchecked:
245 animSuffix = newState === TransitionCheckState.Checked ?
246 'unchecked-checked' : 'unchecked-indeterminate';
247 break;
248 case TransitionCheckState.Checked:
249 animSuffix = newState === TransitionCheckState.Unchecked ?
250 'checked-unchecked' : 'checked-indeterminate';
251 break;
252 case TransitionCheckState.Indeterminate:
253 animSuffix = newState === TransitionCheckState.Checked ?
254 'indeterminate-checked' : 'indeterminate-unchecked';
255 }
256 return "md-checkbox-anim-" + animSuffix;
257 };
258 __decorate([
259 Input('aria-label'),
260 __metadata('design:type', String)
261 ], MdCheckbox.prototype, "ariaLabel", void 0);
262 __decorate([
263 Input('aria-labelledby'),
264 __metadata('design:type', String)
265 ], MdCheckbox.prototype, "ariaLabelledby", void 0);
266 __decorate([
267 Input(),
268 __metadata('design:type', String)
269 ], MdCheckbox.prototype, "id", void 0);
270 __decorate([
271 Input(),
272 __metadata('design:type', Object)
273 ], MdCheckbox.prototype, "align", void 0);
274 __decorate([
275 Input(),
276 __metadata('design:type', Boolean)
277 ], MdCheckbox.prototype, "disabled", void 0);
278 __decorate([
279 Input(),
280 __metadata('design:type', Number)
281 ], MdCheckbox.prototype, "tabindex", void 0);
282 __decorate([
283 Input(),
284 __metadata('design:type', String)
285 ], MdCheckbox.prototype, "name", void 0);
286 __decorate([
287 Output(),
288 __metadata('design:type', EventEmitter)
289 ], MdCheckbox.prototype, "change", void 0);
290 __decorate([
291 Input(),
292 __metadata('design:type', Object)
293 ], MdCheckbox.prototype, "checked", null);
294 __decorate([
295 Input(),
296 __metadata('design:type', Object)
297 ], MdCheckbox.prototype, "indeterminate", null);
298 MdCheckbox = __decorate([
299 Component({selector: 'md-checkbox',
300 template: "<label class=\"md-checkbox-layout\"> <div class=\"md-checkbox-inner-container\"> <input class=\"md-checkbox-input\" type=\"checkbox\" [id]=\"inputId\" [checked]=\"checked\" [disabled]=\"disabled\" [name]=\"name\" [tabIndex]=\"tabindex\" [indeterminate]=\"indeterminate\" [attr.aria-label]=\"ariaLabel\" [attr.aria-labelledby]=\"ariaLabelledby\" (focus)=\"_onInputFocus()\" (blur)=\"_onInputBlur()\" (change)=\"_onInteractionEvent($event)\" (click)=\"_onInputClick($event)\"> <div class=\"md-ink-ripple\"></div> <div class=\"md-checkbox-frame\"></div> <div class=\"md-checkbox-background\"> <svg version=\"1.1\" class=\"md-checkbox-checkmark\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" xml:space=\"preserve\"> <path class=\"md-checkbox-checkmark-path\" fill=\"none\" stroke=\"white\" d=\"M4.1,12.7 9,17.6 20.3,6.3\"/> </svg> <!-- Element for rendering the indeterminate state checkbox. --> <div class=\"md-checkbox-mixedmark\"></div> </div> </div> <span class=\"md-checkbox-label\"> <ng-content></ng-content> </span> </label> ",
301 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. */ /** The width/height of the checkbox element. */ /** The width of the line used to draw the checkmark / mixedmark. */ /** The width of the checkbox border shown when the checkbox is unchecked. */ /** The color of the checkbox border. */ /** The color of the checkbox's checkmark / mixedmark. */ /** The color that is used as the checkbox background when it is checked. */ /** The base duration used for the majority of transitions for the checkbox. */ /** The amount of spacing between the checkbox and its label. */ /** * Fades in the background of the checkbox when it goes from unchecked -> {checked,indeterminate}. */ @keyframes md-checkbox-fade-in-background { 0% { opacity: 0; } 50% { opacity: 1; } } /** * Fades out the background of the checkbox when it goes from {checked,indeterminate} -> unchecked. */ @keyframes md-checkbox-fade-out-background { 0%, 50% { opacity: 1; } 100% { opacity: 0; } } /** * \"Draws\" in the checkmark when the checkbox goes from unchecked -> checked. */ @keyframes md-checkbox-unchecked-checked-checkmark-path { 0%, 50% { stroke-dashoffset: 22.91026; } 50% { animation-timing-function: cubic-bezier(0, 0, 0.2, 0.1); } 100% { stroke-dashoffset: 0; } } /** * Horizontally expands the mixedmark when the checkbox goes from unchecked -> indeterminate. */ @keyframes md-checkbox-unchecked-indeterminate-mixedmark { 0%, 68.2% { transform: scaleX(0); } 68.2% { animation-timing-function: cubic-bezier(0, 0, 0, 1); } 100% { transform: scaleX(1); } } /** * \"Erases\" the checkmark when the checkbox goes from checked -> unchecked. */ @keyframes md-checkbox-checked-unchecked-checkmark-path { from { animation-timing-function: cubic-bezier(0.4, 0, 1, 1); stroke-dashoffset: 0; } to { stroke-dashoffset: -22.91026; } } /** * Rotates and fades out the checkmark when the checkbox goes from checked -> indeterminate. This * animation helps provide the illusion of the checkmark \"morphing\" into the mixedmark. */ @keyframes md-checkbox-checked-indeterminate-checkmark { from { animation-timing-function: cubic-bezier(0, 0, 0.2, 0.1); opacity: 1; transform: rotate(0deg); } to { opacity: 0; transform: rotate(45deg); } } /** * Rotates and fades the checkmark back into position when the checkbox goes from indeterminate -> * checked. This animation helps provide the illusion that the mixedmark is \"morphing\" into the * checkmark. */ @keyframes md-checkbox-indeterminate-checked-checkmark { from { animation-timing-function: cubic-bezier(0.14, 0, 0, 1); opacity: 0; transform: rotate(45deg); } to { opacity: 1; transform: rotate(360deg); } } /** * Rotates and fades in the mixedmark when the checkbox goes from checked -> indeterminate. This * animation, similar to md-checkbox-checked-indeterminate-checkmark, helps provide an illusion * of \"morphing\" from checkmark -> mixedmark. */ @keyframes md-checkbox-checked-indeterminate-mixedmark { from { animation-timing-function: cubic-bezier(0, 0, 0.2, 0.1); opacity: 0; transform: rotate(-45deg); } to { opacity: 1; transform: rotate(0deg); } } /** * Rotates and fades out the mixedmark when the checkbox goes from indeterminate -> checked. This * animation, similar to md-checkbox-indeterminate-checked-checkmark, helps provide an illusion * of \"morphing\" from mixedmark -> checkmark. */ @keyframes md-checkbox-indeterminate-checked-mixedmark { from { animation-timing-function: cubic-bezier(0.14, 0, 0, 1); opacity: 1; transform: rotate(0deg); } to { opacity: 0; transform: rotate(315deg); } } /** * Horizontally collapses and fades out the mixedmark when the checkbox goes from indeterminate -> * unchecked. */ @keyframes md-checkbox-indeterminate-unchecked-mixedmark { 0% { animation-timing-function: linear; opacity: 1; transform: scaleX(1); } 32.8%, 100% { opacity: 0; transform: scaleX(0); } } /** * Applied to elements that cover the checkbox's entire inner container. */ .md-checkbox-frame, .md-checkbox-background, .md-checkbox-checkmark { bottom: 0; left: 0; position: absolute; right: 0; top: 0; } /** * Applied to elements that are considered \"marks\" within the checkbox, e.g. the checkmark and * the mixedmark. */ .md-checkbox-checkmark, .md-checkbox-mixedmark { width: calc(100% - 4px); } /** * Applied to elements that appear to make up the outer box of the checkmark, such as the frame * that contains the border and the actual background element that contains the marks. */ .md-checkbox-frame, .md-checkbox-background { border-radius: 2px; box-sizing: border-box; pointer-events: none; } md-checkbox { cursor: pointer; } .md-checkbox-layout { cursor: inherit; align-items: baseline; display: inline-flex; } .md-checkbox-inner-container { display: inline-block; height: 20px; line-height: 0; margin: auto; margin-right: 8px; order: 0; position: relative; vertical-align: middle; white-space: nowrap; width: 20px; } [dir='rtl'] .md-checkbox-inner-container { margin-left: 8px; margin-right: auto; } .md-checkbox-layout .md-checkbox-label { line-height: 24px; } .md-checkbox-frame { background-color: transparent; border: 2px solid rgba(0, 0, 0, 0.54); transition: border-color 90ms cubic-bezier(0, 0, 0.2, 0.1); will-change: border-color; } .md-checkbox-background { align-items: center; display: inline-flex; justify-content: center; transition: background-color 90ms cubic-bezier(0, 0, 0.2, 0.1), opacity 90ms cubic-bezier(0, 0, 0.2, 0.1); will-change: background-color, opacity; } .md-checkbox-checkmark { fill: #fafafa; width: 100%; } .md-checkbox-checkmark-path { stroke: #fafafa !important; stroke-dashoffset: 22.91026; stroke-dasharray: 22.91026; stroke-width: 2.66667px; } .md-checkbox-mixedmark { background-color: #fafafa; height: 2px; opacity: 0; transform: scaleX(0) rotate(0deg); } .md-checkbox-align-end .md-checkbox-inner-container { order: 1; margin-left: 8px; margin-right: auto; } [dir='rtl'] .md-checkbox-align-end .md-checkbox-inner-container { margin-left: auto; margin-right: 8px; } .md-checkbox-checked .md-checkbox-checkmark { opacity: 1; } .md-checkbox-checked .md-checkbox-checkmark-path { stroke-dashoffset: 0; } .md-checkbox-checked .md-checkbox-mixedmark { transform: scaleX(1) rotate(-45deg); } .md-checkbox-checked .md-checkbox-background { background-color: #9c27b0; } .md-checkbox-indeterminate .md-checkbox-background { background-color: #9c27b0; } .md-checkbox-indeterminate .md-checkbox-checkmark { opacity: 0; transform: rotate(45deg); } .md-checkbox-indeterminate .md-checkbox-checkmark-path { stroke-dashoffset: 0; } .md-checkbox-indeterminate .md-checkbox-mixedmark { opacity: 1; transform: scaleX(1) rotate(0deg); } .md-checkbox-unchecked .md-checkbox-background { background-color: transparent; } .md-checkbox-disabled { cursor: default; } .md-checkbox-disabled.md-checkbox-checked .md-checkbox-background, .md-checkbox-disabled.md-checkbox-indeterminate .md-checkbox-background { background-color: #b0b0b0; } .md-checkbox-disabled:not(.md-checkbox-checked) .md-checkbox-frame { border-color: #b0b0b0; } .md-checkbox-anim-unchecked-checked .md-checkbox-background { animation: 180ms linear 0ms md-checkbox-fade-in-background; } .md-checkbox-anim-unchecked-checked .md-checkbox-checkmark-path { animation: 180ms linear 0ms md-checkbox-unchecked-checked-checkmark-path; } .md-checkbox-anim-unchecked-indeterminate .md-checkbox-background { animation: 180ms linear 0ms md-checkbox-fade-in-background; } .md-checkbox-anim-unchecked-indeterminate .md-checkbox-mixedmark { animation: 90ms linear 0ms md-checkbox-unchecked-indeterminate-mixedmark; } .md-checkbox-anim-checked-unchecked .md-checkbox-background { animation: 180ms linear 0ms md-checkbox-fade-out-background; } .md-checkbox-anim-checked-unchecked .md-checkbox-checkmark-path { animation: 90ms linear 0ms md-checkbox-checked-unchecked-checkmark-path; } .md-checkbox-anim-checked-indeterminate .md-checkbox-checkmark { animation: 90ms linear 0ms md-checkbox-checked-indeterminate-checkmark; } .md-checkbox-anim-checked-indeterminate .md-checkbox-mixedmark { animation: 90ms linear 0ms md-checkbox-checked-indeterminate-mixedmark; } .md-checkbox-anim-indeterminate-checked .md-checkbox-checkmark { animation: 500ms linear 0ms md-checkbox-indeterminate-checked-checkmark; } .md-checkbox-anim-indeterminate-checked .md-checkbox-mixedmark { animation: 500ms linear 0ms md-checkbox-indeterminate-checked-mixedmark; } .md-checkbox-anim-indeterminate-unchecked .md-checkbox-background { animation: 180ms linear 0ms md-checkbox-fade-out-background; } .md-checkbox-anim-indeterminate-unchecked .md-checkbox-mixedmark { animation: 300ms linear 0ms md-checkbox-indeterminate-unchecked-mixedmark; } .md-checkbox-input { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; text-transform: none; width: 1px; } .md-ink-ripple { border-radius: 50%; opacity: 0; height: 48px; left: 50%; overflow: hidden; pointer-events: none; position: absolute; top: 50%; transform: translate(-50%, -50%); transition: opacity ease 280ms, background-color ease 280ms; width: 48px; } .md-checkbox-focused .md-ink-ripple { opacity: 1; background-color: rgba(156, 39, 176, 0.26); } .md-checkbox-disabled .md-ink-ripple { background-color: #000; } /*# sourceMappingURL=checkbox.css.map */ "],
302 host: {
303 '[class.md-checkbox-indeterminate]': 'indeterminate',
304 '[class.md-checkbox-checked]': 'checked',
305 '[class.md-checkbox-disabled]': 'disabled',
306 '[class.md-checkbox-align-end]': 'align == "end"',
307 '[class.md-checkbox-focused]': 'hasFocus',
308 },
309 providers: [MD_CHECKBOX_CONTROL_VALUE_ACCESSOR],
310 encapsulation: ViewEncapsulation.None,
311 changeDetection: ChangeDetectionStrategy.OnPush
312 }),
313 __metadata('design:paramtypes', [Renderer, ElementRef])
314 ], MdCheckbox);
315 return MdCheckbox;
316}());
317export var MdCheckboxModule = (function () {
318 function MdCheckboxModule() {
319 }
320 MdCheckboxModule.forRoot = function () {
321 return {
322 ngModule: MdCheckboxModule,
323 providers: []
324 };
325 };
326 MdCheckboxModule = __decorate([
327 NgModule({
328 exports: [MdCheckbox],
329 declarations: [MdCheckbox],
330 }),
331 __metadata('design:paramtypes', [])
332 ], MdCheckboxModule);
333 return MdCheckboxModule;
334}());
335
336//# sourceMappingURL=checkbox.js.map