source: trip-planner-front/node_modules/@angular/material/esm2015/checkbox/checkbox.js@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 61.5 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { FocusMonitor } from '@angular/cdk/a11y';
9import { coerceBooleanProperty } from '@angular/cdk/coercion';
10import { Attribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, Inject, Input, NgZone, Optional, Output, ViewChild, ViewEncapsulation, } from '@angular/core';
11import { NG_VALUE_ACCESSOR } from '@angular/forms';
12import { MatRipple, mixinColor, mixinDisabled, mixinDisableRipple, mixinTabIndex, } from '@angular/material/core';
13import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
14import { MAT_CHECKBOX_DEFAULT_OPTIONS, MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY, } from './checkbox-config';
15// Increasing integer for generating unique ids for checkbox components.
16let nextUniqueId = 0;
17// Default checkbox configuration.
18const defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();
19/**
20 * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.
21 * This allows it to support [(ngModel)].
22 * @docs-private
23 */
24export const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR = {
25 provide: NG_VALUE_ACCESSOR,
26 useExisting: forwardRef(() => MatCheckbox),
27 multi: true
28};
29/** Change event object emitted by MatCheckbox. */
30export class MatCheckboxChange {
31}
32// Boilerplate for applying mixins to MatCheckbox.
33/** @docs-private */
34const _MatCheckboxBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {
35 constructor(_elementRef) {
36 this._elementRef = _elementRef;
37 }
38}))));
39/**
40 * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,
41 * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or
42 * disabled. Note that all additional accessibility attributes are taken care of by the component,
43 * so there is no need to provide them yourself. However, if you want to omit a label and still
44 * have the checkbox be accessible, you may supply an [aria-label] input.
45 * See: https://material.io/design/components/selection-controls.html
46 */
47export class MatCheckbox extends _MatCheckboxBase {
48 constructor(elementRef, _changeDetectorRef, _focusMonitor, _ngZone, tabIndex, _animationMode, _options) {
49 super(elementRef);
50 this._changeDetectorRef = _changeDetectorRef;
51 this._focusMonitor = _focusMonitor;
52 this._ngZone = _ngZone;
53 this._animationMode = _animationMode;
54 this._options = _options;
55 /**
56 * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will
57 * take precedence so this may be omitted.
58 */
59 this.ariaLabel = '';
60 /**
61 * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element
62 */
63 this.ariaLabelledby = null;
64 this._uniqueId = `mat-checkbox-${++nextUniqueId}`;
65 /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */
66 this.id = this._uniqueId;
67 /** Whether the label should appear after or before the checkbox. Defaults to 'after' */
68 this.labelPosition = 'after';
69 /** Name value will be applied to the input element if present */
70 this.name = null;
71 /** Event emitted when the checkbox's `checked` value changes. */
72 this.change = new EventEmitter();
73 /** Event emitted when the checkbox's `indeterminate` value changes. */
74 this.indeterminateChange = new EventEmitter();
75 /**
76 * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.
77 * @docs-private
78 */
79 this._onTouched = () => { };
80 this._currentAnimationClass = '';
81 this._currentCheckState = 0 /* Init */;
82 this._controlValueAccessorChangeFn = () => { };
83 this._checked = false;
84 this._disabled = false;
85 this._indeterminate = false;
86 this._options = this._options || defaults;
87 this.color = this.defaultColor = this._options.color || defaults.color;
88 this.tabIndex = parseInt(tabIndex) || 0;
89 }
90 /** Returns the unique id for the visual hidden input. */
91 get inputId() { return `${this.id || this._uniqueId}-input`; }
92 /** Whether the checkbox is required. */
93 get required() { return this._required; }
94 set required(value) { this._required = coerceBooleanProperty(value); }
95 ngAfterViewInit() {
96 this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {
97 if (!focusOrigin) {
98 // When a focused element becomes disabled, the browser *immediately* fires a blur event.
99 // Angular does not expect events to be raised during change detection, so any state change
100 // (such as a form control's 'ng-touched') will cause a changed-after-checked error.
101 // See https://github.com/angular/angular/issues/17793. To work around this, we defer
102 // telling the form control it has been touched until the next tick.
103 Promise.resolve().then(() => {
104 this._onTouched();
105 this._changeDetectorRef.markForCheck();
106 });
107 }
108 });
109 this._syncIndeterminate(this._indeterminate);
110 }
111 // TODO: Delete next major revision.
112 ngAfterViewChecked() { }
113 ngOnDestroy() {
114 this._focusMonitor.stopMonitoring(this._elementRef);
115 }
116 /**
117 * Whether the checkbox is checked.
118 */
119 get checked() { return this._checked; }
120 set checked(value) {
121 if (value != this.checked) {
122 this._checked = value;
123 this._changeDetectorRef.markForCheck();
124 }
125 }
126 /**
127 * Whether the checkbox is disabled. This fully overrides the implementation provided by
128 * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.
129 */
130 get disabled() { return this._disabled; }
131 set disabled(value) {
132 const newValue = coerceBooleanProperty(value);
133 if (newValue !== this.disabled) {
134 this._disabled = newValue;
135 this._changeDetectorRef.markForCheck();
136 }
137 }
138 /**
139 * Whether the checkbox is indeterminate. This is also known as "mixed" mode and can be used to
140 * represent a checkbox with three states, e.g. a checkbox that represents a nested list of
141 * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately
142 * set to false.
143 */
144 get indeterminate() { return this._indeterminate; }
145 set indeterminate(value) {
146 const changed = value != this._indeterminate;
147 this._indeterminate = coerceBooleanProperty(value);
148 if (changed) {
149 if (this._indeterminate) {
150 this._transitionCheckState(3 /* Indeterminate */);
151 }
152 else {
153 this._transitionCheckState(this.checked ? 1 /* Checked */ : 2 /* Unchecked */);
154 }
155 this.indeterminateChange.emit(this._indeterminate);
156 }
157 this._syncIndeterminate(this._indeterminate);
158 }
159 _isRippleDisabled() {
160 return this.disableRipple || this.disabled;
161 }
162 /** Method being called whenever the label text changes. */
163 _onLabelTextChange() {
164 // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox
165 // component will be only marked for check, but no actual change detection runs automatically.
166 // Instead of going back into the zone in order to trigger a change detection which causes
167 // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger
168 // an explicit change detection for the checkbox view and its children.
169 this._changeDetectorRef.detectChanges();
170 }
171 // Implemented as part of ControlValueAccessor.
172 writeValue(value) {
173 this.checked = !!value;
174 }
175 // Implemented as part of ControlValueAccessor.
176 registerOnChange(fn) {
177 this._controlValueAccessorChangeFn = fn;
178 }
179 // Implemented as part of ControlValueAccessor.
180 registerOnTouched(fn) {
181 this._onTouched = fn;
182 }
183 // Implemented as part of ControlValueAccessor.
184 setDisabledState(isDisabled) {
185 this.disabled = isDisabled;
186 }
187 _getAriaChecked() {
188 if (this.checked) {
189 return 'true';
190 }
191 return this.indeterminate ? 'mixed' : 'false';
192 }
193 _transitionCheckState(newState) {
194 let oldState = this._currentCheckState;
195 let element = this._elementRef.nativeElement;
196 if (oldState === newState) {
197 return;
198 }
199 if (this._currentAnimationClass.length > 0) {
200 element.classList.remove(this._currentAnimationClass);
201 }
202 this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(oldState, newState);
203 this._currentCheckState = newState;
204 if (this._currentAnimationClass.length > 0) {
205 element.classList.add(this._currentAnimationClass);
206 // Remove the animation class to avoid animation when the checkbox is moved between containers
207 const animationClass = this._currentAnimationClass;
208 this._ngZone.runOutsideAngular(() => {
209 setTimeout(() => {
210 element.classList.remove(animationClass);
211 }, 1000);
212 });
213 }
214 }
215 _emitChangeEvent() {
216 const event = new MatCheckboxChange();
217 event.source = this;
218 event.checked = this.checked;
219 this._controlValueAccessorChangeFn(this.checked);
220 this.change.emit(event);
221 // Assigning the value again here is redundant, but we have to do it in case it was
222 // changed inside the `change` listener which will cause the input to be out of sync.
223 if (this._inputElement) {
224 this._inputElement.nativeElement.checked = this.checked;
225 }
226 }
227 /** Toggles the `checked` state of the checkbox. */
228 toggle() {
229 this.checked = !this.checked;
230 }
231 /**
232 * Event handler for checkbox input element.
233 * Toggles checked state if element is not disabled.
234 * Do not toggle on (change) event since IE doesn't fire change event when
235 * indeterminate checkbox is clicked.
236 * @param event
237 */
238 _onInputClick(event) {
239 var _a;
240 const clickAction = (_a = this._options) === null || _a === void 0 ? void 0 : _a.clickAction;
241 // We have to stop propagation for click events on the visual hidden input element.
242 // By default, when a user clicks on a label element, a generated click event will be
243 // dispatched on the associated input element. Since we are using a label element as our
244 // root container, the click event on the `checkbox` will be executed twice.
245 // The real click event will bubble up, and the generated click event also tries to bubble up.
246 // This will lead to multiple click events.
247 // Preventing bubbling for the second event will solve that issue.
248 event.stopPropagation();
249 // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click
250 if (!this.disabled && clickAction !== 'noop') {
251 // When user manually click on the checkbox, `indeterminate` is set to false.
252 if (this.indeterminate && clickAction !== 'check') {
253 Promise.resolve().then(() => {
254 this._indeterminate = false;
255 this.indeterminateChange.emit(this._indeterminate);
256 });
257 }
258 this.toggle();
259 this._transitionCheckState(this._checked ? 1 /* Checked */ : 2 /* Unchecked */);
260 // Emit our custom change event if the native input emitted one.
261 // It is important to only emit it, if the native input triggered one, because
262 // we don't want to trigger a change event, when the `checked` variable changes for example.
263 this._emitChangeEvent();
264 }
265 else if (!this.disabled && clickAction === 'noop') {
266 // Reset native input when clicked with noop. The native checkbox becomes checked after
267 // click, reset it to be align with `checked` value of `mat-checkbox`.
268 this._inputElement.nativeElement.checked = this.checked;
269 this._inputElement.nativeElement.indeterminate = this.indeterminate;
270 }
271 }
272 /** Focuses the checkbox. */
273 focus(origin, options) {
274 if (origin) {
275 this._focusMonitor.focusVia(this._inputElement, origin, options);
276 }
277 else {
278 this._inputElement.nativeElement.focus(options);
279 }
280 }
281 _onInteractionEvent(event) {
282 // We always have to stop propagation on the change event.
283 // Otherwise the change event, from the input element, will bubble up and
284 // emit its event object to the `change` output.
285 event.stopPropagation();
286 }
287 _getAnimationClassForCheckStateTransition(oldState, newState) {
288 // Don't transition if animations are disabled.
289 if (this._animationMode === 'NoopAnimations') {
290 return '';
291 }
292 let animSuffix = '';
293 switch (oldState) {
294 case 0 /* Init */:
295 // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or
296 // [checked] bound to it.
297 if (newState === 1 /* Checked */) {
298 animSuffix = 'unchecked-checked';
299 }
300 else if (newState == 3 /* Indeterminate */) {
301 animSuffix = 'unchecked-indeterminate';
302 }
303 else {
304 return '';
305 }
306 break;
307 case 2 /* Unchecked */:
308 animSuffix = newState === 1 /* Checked */ ?
309 'unchecked-checked' : 'unchecked-indeterminate';
310 break;
311 case 1 /* Checked */:
312 animSuffix = newState === 2 /* Unchecked */ ?
313 'checked-unchecked' : 'checked-indeterminate';
314 break;
315 case 3 /* Indeterminate */:
316 animSuffix = newState === 1 /* Checked */ ?
317 'indeterminate-checked' : 'indeterminate-unchecked';
318 break;
319 }
320 return `mat-checkbox-anim-${animSuffix}`;
321 }
322 /**
323 * Syncs the indeterminate value with the checkbox DOM node.
324 *
325 * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a
326 * property is supported on an element boils down to `if (propName in element)`. Domino's
327 * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during
328 * server-side rendering.
329 */
330 _syncIndeterminate(value) {
331 const nativeCheckbox = this._inputElement;
332 if (nativeCheckbox) {
333 nativeCheckbox.nativeElement.indeterminate = value;
334 }
335 }
336}
337MatCheckbox.decorators = [
338 { type: Component, args: [{
339 selector: 'mat-checkbox',
340 template: "<label [attr.for]=\"inputId\" class=\"mat-checkbox-layout\" #label>\n <span class=\"mat-checkbox-inner-container\"\n [class.mat-checkbox-inner-container-no-side-margin]=\"!checkboxLabel.textContent || !checkboxLabel.textContent.trim()\">\n <input #input\n class=\"mat-checkbox-input cdk-visually-hidden\" type=\"checkbox\"\n [id]=\"inputId\"\n [required]=\"required\"\n [checked]=\"checked\"\n [attr.value]=\"value\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [tabIndex]=\"tabIndex\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"_getAriaChecked()\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInteractionEvent($event)\"\n (click)=\"_onInputClick($event)\">\n <span matRipple class=\"mat-checkbox-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleRadius]=\"20\"\n [matRippleCentered]=\"true\"\n [matRippleAnimation]=\"{enterDuration: _animationMode === 'NoopAnimations' ? 0 : 150}\">\n <span class=\"mat-ripple-element mat-checkbox-persistent-ripple\"></span>\n </span>\n <span class=\"mat-checkbox-frame\"></span>\n <span class=\"mat-checkbox-background\">\n <svg version=\"1.1\"\n focusable=\"false\"\n class=\"mat-checkbox-checkmark\"\n viewBox=\"0 0 24 24\"\n xml:space=\"preserve\"\n aria-hidden=\"true\">\n <path class=\"mat-checkbox-checkmark-path\"\n fill=\"none\"\n stroke=\"white\"\n d=\"M4.1,12.7 9,17.6 20.3,6.3\"/>\n </svg>\n <!-- Element for rendering the indeterminate state checkbox. -->\n <span class=\"mat-checkbox-mixedmark\"></span>\n </span>\n </span>\n <span class=\"mat-checkbox-label\" #checkboxLabel (cdkObserveContent)=\"_onLabelTextChange()\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </span>\n</label>\n",
341 exportAs: 'matCheckbox',
342 host: {
343 'class': 'mat-checkbox',
344 '[id]': 'id',
345 '[attr.tabindex]': 'null',
346 '[class.mat-checkbox-indeterminate]': 'indeterminate',
347 '[class.mat-checkbox-checked]': 'checked',
348 '[class.mat-checkbox-disabled]': 'disabled',
349 '[class.mat-checkbox-label-before]': 'labelPosition == "before"',
350 '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,
351 },
352 providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],
353 inputs: ['disableRipple', 'color', 'tabIndex'],
354 encapsulation: ViewEncapsulation.None,
355 changeDetection: ChangeDetectionStrategy.OnPush,
356 styles: ["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-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)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-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)}}@keyframes mat-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)}}@keyframes mat-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)}}@keyframes mat-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)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-ripple{outline:solid 3px}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-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);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}\n"]
357 },] }
358];
359MatCheckbox.ctorParameters = () => [
360 { type: ElementRef },
361 { type: ChangeDetectorRef },
362 { type: FocusMonitor },
363 { type: NgZone },
364 { type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] },
365 { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] },
366 { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_CHECKBOX_DEFAULT_OPTIONS,] }] }
367];
368MatCheckbox.propDecorators = {
369 ariaLabel: [{ type: Input, args: ['aria-label',] }],
370 ariaLabelledby: [{ type: Input, args: ['aria-labelledby',] }],
371 ariaDescribedby: [{ type: Input, args: ['aria-describedby',] }],
372 id: [{ type: Input }],
373 required: [{ type: Input }],
374 labelPosition: [{ type: Input }],
375 name: [{ type: Input }],
376 change: [{ type: Output }],
377 indeterminateChange: [{ type: Output }],
378 value: [{ type: Input }],
379 _inputElement: [{ type: ViewChild, args: ['input',] }],
380 ripple: [{ type: ViewChild, args: [MatRipple,] }],
381 checked: [{ type: Input }],
382 disabled: [{ type: Input }],
383 indeterminate: [{ type: Input }]
384};
385//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpYWwvY2hlY2tib3gvY2hlY2tib3gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFrQixZQUFZLEVBQWMsTUFBTSxtQkFBbUIsQ0FBQztBQUM3RSxPQUFPLEVBQWUscUJBQXFCLEVBQWMsTUFBTSx1QkFBdUIsQ0FBQztBQUN2RixPQUFPLEVBRUwsU0FBUyxFQUNULHVCQUF1QixFQUN2QixpQkFBaUIsRUFDakIsU0FBUyxFQUNULFVBQVUsRUFDVixZQUFZLEVBQ1osVUFBVSxFQUNWLE1BQU0sRUFDTixLQUFLLEVBQ0wsTUFBTSxFQUVOLFFBQVEsRUFDUixNQUFNLEVBQ04sU0FBUyxFQUNULGlCQUFpQixHQUVsQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQXVCLGlCQUFpQixFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFDdkUsT0FBTyxFQUtMLFNBQVMsRUFDVCxVQUFVLEVBQ1YsYUFBYSxFQUNiLGtCQUFrQixFQUNsQixhQUFhLEdBQ2QsTUFBTSx3QkFBd0IsQ0FBQztBQUNoQyxPQUFPLEVBQUMscUJBQXFCLEVBQUMsTUFBTSxzQ0FBc0MsQ0FBQztBQUMzRSxPQUFPLEVBQ0wsNEJBQTRCLEVBRTVCLG9DQUFvQyxHQUNyQyxNQUFNLG1CQUF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