1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | (function webpackUniversalModuleDefinition(root, factory) {
|
9 | if(typeof exports === 'object' && typeof module === 'object')
|
10 | module.exports = factory();
|
11 | else if(typeof define === 'function' && define.amd)
|
12 | define([], factory);
|
13 | else if(typeof exports === 'object')
|
14 | exports["switch"] = factory();
|
15 | else
|
16 | root["mdc"] = root["mdc"] || {}, root["mdc"]["switch"] = factory();
|
17 | })(this, function() {
|
18 | return (function(modules) {
|
19 |
|
20 | var installedModules = {};
|
21 |
|
22 |
|
23 | function __webpack_require__(moduleId) {
|
24 |
|
25 |
|
26 | if(installedModules[moduleId]) {
|
27 | return installedModules[moduleId].exports;
|
28 | }
|
29 |
|
30 | var module = installedModules[moduleId] = {
|
31 | i: moduleId,
|
32 | l: false,
|
33 | exports: {}
|
34 | };
|
35 |
|
36 |
|
37 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
38 |
|
39 |
|
40 | module.l = true;
|
41 |
|
42 |
|
43 | return module.exports;
|
44 | }
|
45 |
|
46 |
|
47 |
|
48 | __webpack_require__.m = modules;
|
49 |
|
50 |
|
51 | __webpack_require__.c = installedModules;
|
52 |
|
53 |
|
54 | __webpack_require__.d = function(exports, name, getter) {
|
55 | if(!__webpack_require__.o(exports, name)) {
|
56 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
57 | }
|
58 | };
|
59 |
|
60 |
|
61 | __webpack_require__.r = function(exports) {
|
62 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
63 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
64 | }
|
65 | Object.defineProperty(exports, '__esModule', { value: true });
|
66 | };
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | __webpack_require__.t = function(value, mode) {
|
74 | if(mode & 1) value = __webpack_require__(value);
|
75 | if(mode & 8) return value;
|
76 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
77 | var ns = Object.create(null);
|
78 | __webpack_require__.r(ns);
|
79 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
80 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
81 | return ns;
|
82 | };
|
83 |
|
84 |
|
85 | __webpack_require__.n = function(module) {
|
86 | var getter = module && module.__esModule ?
|
87 | function getDefault() { return module['default']; } :
|
88 | function getModuleExports() { return module; };
|
89 | __webpack_require__.d(getter, 'a', getter);
|
90 | return getter;
|
91 | };
|
92 |
|
93 |
|
94 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
95 |
|
96 |
|
97 | __webpack_require__.p = "";
|
98 |
|
99 |
|
100 |
|
101 | return __webpack_require__(__webpack_require__.s = "./packages/mdc-switch/index.ts");
|
102 | })
|
103 |
|
104 | ({
|
105 |
|
106 | "./packages/mdc-base/component.ts":
|
107 |
|
108 |
|
109 |
|
110 |
|
111 | (function(module, exports, __webpack_require__) {
|
112 |
|
113 | "use strict";
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 | var __read = this && this.__read || function (o, n) {
|
139 | var m = typeof Symbol === "function" && o[Symbol.iterator];
|
140 | if (!m) return o;
|
141 | var i = m.call(o),
|
142 | r,
|
143 | ar = [],
|
144 | e;
|
145 | try {
|
146 | while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
147 | ar.push(r.value);
|
148 | }
|
149 | } catch (error) {
|
150 | e = { error: error };
|
151 | } finally {
|
152 | try {
|
153 | if (r && !r.done && (m = i["return"])) m.call(i);
|
154 | } finally {
|
155 | if (e) throw e.error;
|
156 | }
|
157 | }
|
158 | return ar;
|
159 | };
|
160 | var __spreadArray = this && this.__spreadArray || function (to, from) {
|
161 | for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) {
|
162 | to[j] = from[i];
|
163 | }return to;
|
164 | };
|
165 | Object.defineProperty(exports, "__esModule", { value: true });
|
166 | exports.MDCComponent = void 0;
|
167 | var foundation_1 = __webpack_require__( "./packages/mdc-base/foundation.ts");
|
168 | var MDCComponent = function () {
|
169 | function MDCComponent(root, foundation) {
|
170 | var args = [];
|
171 | for (var _i = 2; _i < arguments.length; _i++) {
|
172 | args[_i - 2] = arguments[_i];
|
173 | }
|
174 | this.root = root;
|
175 | this.initialize.apply(this, __spreadArray([], __read(args)));
|
176 |
|
177 |
|
178 | this.foundation = foundation === undefined ? this.getDefaultFoundation() : foundation;
|
179 | this.foundation.init();
|
180 | this.initialSyncWithDOM();
|
181 | }
|
182 | MDCComponent.attachTo = function (root) {
|
183 |
|
184 |
|
185 |
|
186 |
|
187 | return new MDCComponent(root, new foundation_1.MDCFoundation({}));
|
188 | };
|
189 |
|
190 | MDCComponent.prototype.initialize = function () {
|
191 | var _args = [];
|
192 | for (var _i = 0; _i < arguments.length; _i++) {
|
193 | _args[_i] = arguments[_i];
|
194 | }
|
195 |
|
196 |
|
197 |
|
198 | };
|
199 | MDCComponent.prototype.getDefaultFoundation = function () {
|
200 |
|
201 |
|
202 | throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' + 'foundation class');
|
203 | };
|
204 | MDCComponent.prototype.initialSyncWithDOM = function () {
|
205 |
|
206 |
|
207 |
|
208 |
|
209 | };
|
210 | MDCComponent.prototype.destroy = function () {
|
211 |
|
212 |
|
213 | this.foundation.destroy();
|
214 | };
|
215 | MDCComponent.prototype.listen = function (evtType, handler, options) {
|
216 | this.root.addEventListener(evtType, handler, options);
|
217 | };
|
218 | MDCComponent.prototype.unlisten = function (evtType, handler, options) {
|
219 | this.root.removeEventListener(evtType, handler, options);
|
220 | };
|
221 | |
222 |
|
223 |
|
224 | MDCComponent.prototype.emit = function (evtType, evtData, shouldBubble) {
|
225 | if (shouldBubble === void 0) {
|
226 | shouldBubble = false;
|
227 | }
|
228 | var evt;
|
229 | if (typeof CustomEvent === 'function') {
|
230 | evt = new CustomEvent(evtType, {
|
231 | bubbles: shouldBubble,
|
232 | detail: evtData
|
233 | });
|
234 | } else {
|
235 | evt = document.createEvent('CustomEvent');
|
236 | evt.initCustomEvent(evtType, shouldBubble, false, evtData);
|
237 | }
|
238 | this.root.dispatchEvent(evt);
|
239 | };
|
240 | return MDCComponent;
|
241 | }();
|
242 | exports.MDCComponent = MDCComponent;
|
243 |
|
244 | exports.default = MDCComponent;
|
245 |
|
246 | }),
|
247 |
|
248 | "./packages/mdc-base/foundation.ts":
|
249 |
|
250 |
|
251 |
|
252 |
|
253 | (function(module, exports, __webpack_require__) {
|
254 |
|
255 | "use strict";
|
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 |
|
267 |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 | Object.defineProperty(exports, "__esModule", { value: true });
|
281 | exports.MDCFoundation = void 0;
|
282 | var MDCFoundation = function () {
|
283 | function MDCFoundation(adapter) {
|
284 | if (adapter === void 0) {
|
285 | adapter = {};
|
286 | }
|
287 | this.adapter = adapter;
|
288 | }
|
289 | Object.defineProperty(MDCFoundation, "cssClasses", {
|
290 | get: function get() {
|
291 |
|
292 |
|
293 | return {};
|
294 | },
|
295 | enumerable: false,
|
296 | configurable: true
|
297 | });
|
298 | Object.defineProperty(MDCFoundation, "strings", {
|
299 | get: function get() {
|
300 |
|
301 |
|
302 | return {};
|
303 | },
|
304 | enumerable: false,
|
305 | configurable: true
|
306 | });
|
307 | Object.defineProperty(MDCFoundation, "numbers", {
|
308 | get: function get() {
|
309 |
|
310 |
|
311 | return {};
|
312 | },
|
313 | enumerable: false,
|
314 | configurable: true
|
315 | });
|
316 | Object.defineProperty(MDCFoundation, "defaultAdapter", {
|
317 | get: function get() {
|
318 |
|
319 |
|
320 |
|
321 | return {};
|
322 | },
|
323 | enumerable: false,
|
324 | configurable: true
|
325 | });
|
326 | MDCFoundation.prototype.init = function () {
|
327 |
|
328 | };
|
329 | MDCFoundation.prototype.destroy = function () {
|
330 |
|
331 | };
|
332 | return MDCFoundation;
|
333 | }();
|
334 | exports.MDCFoundation = MDCFoundation;
|
335 |
|
336 | exports.default = MDCFoundation;
|
337 |
|
338 | }),
|
339 |
|
340 | "./packages/mdc-dom/events.ts":
|
341 |
|
342 |
|
343 |
|
344 |
|
345 | (function(module, exports, __webpack_require__) {
|
346 |
|
347 | "use strict";
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 | Object.defineProperty(exports, "__esModule", { value: true });
|
373 | exports.applyPassive = void 0;
|
374 |
|
375 |
|
376 |
|
377 |
|
378 | function applyPassive(globalObj) {
|
379 | if (globalObj === void 0) {
|
380 | globalObj = window;
|
381 | }
|
382 | return supportsPassiveOption(globalObj) ? { passive: true } : false;
|
383 | }
|
384 | exports.applyPassive = applyPassive;
|
385 | function supportsPassiveOption(globalObj) {
|
386 | if (globalObj === void 0) {
|
387 | globalObj = window;
|
388 | }
|
389 |
|
390 |
|
391 | var passiveSupported = false;
|
392 | try {
|
393 | var options = {
|
394 |
|
395 |
|
396 | get passive() {
|
397 | passiveSupported = true;
|
398 | return false;
|
399 | }
|
400 | };
|
401 | var handler = function handler() {};
|
402 | globalObj.document.addEventListener('test', handler, options);
|
403 | globalObj.document.removeEventListener('test', handler, options);
|
404 | } catch (err) {
|
405 | passiveSupported = false;
|
406 | }
|
407 | return passiveSupported;
|
408 | }
|
409 |
|
410 | }),
|
411 |
|
412 | "./packages/mdc-dom/ponyfill.ts":
|
413 |
|
414 |
|
415 |
|
416 |
|
417 | (function(module, exports, __webpack_require__) {
|
418 |
|
419 | "use strict";
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 | Object.defineProperty(exports, "__esModule", { value: true });
|
445 | exports.estimateScrollWidth = exports.matches = exports.closest = void 0;
|
446 |
|
447 |
|
448 |
|
449 |
|
450 | function closest(element, selector) {
|
451 | if (element.closest) {
|
452 | return element.closest(selector);
|
453 | }
|
454 | var el = element;
|
455 | while (el) {
|
456 | if (matches(el, selector)) {
|
457 | return el;
|
458 | }
|
459 | el = el.parentElement;
|
460 | }
|
461 | return null;
|
462 | }
|
463 | exports.closest = closest;
|
464 | function matches(element, selector) {
|
465 | var nativeMatches = element.matches || element.webkitMatchesSelector || element.msMatchesSelector;
|
466 | return nativeMatches.call(element, selector);
|
467 | }
|
468 | exports.matches = matches;
|
469 |
|
470 |
|
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 |
|
477 | function estimateScrollWidth(element) {
|
478 |
|
479 |
|
480 |
|
481 |
|
482 | var htmlEl = element;
|
483 | if (htmlEl.offsetParent !== null) {
|
484 | return htmlEl.scrollWidth;
|
485 | }
|
486 | var clone = htmlEl.cloneNode(true);
|
487 | clone.style.setProperty('position', 'absolute');
|
488 | clone.style.setProperty('transform', 'translate(-9999px, -9999px)');
|
489 | document.documentElement.appendChild(clone);
|
490 | var scrollWidth = clone.scrollWidth;
|
491 | document.documentElement.removeChild(clone);
|
492 | return scrollWidth;
|
493 | }
|
494 | exports.estimateScrollWidth = estimateScrollWidth;
|
495 |
|
496 | }),
|
497 |
|
498 | "./packages/mdc-ripple/component.ts":
|
499 |
|
500 |
|
501 |
|
502 |
|
503 | (function(module, exports, __webpack_require__) {
|
504 |
|
505 | "use strict";
|
506 |
|
507 |
|
508 |
|
509 |
|
510 |
|
511 |
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 |
|
521 |
|
522 |
|
523 |
|
524 |
|
525 |
|
526 |
|
527 |
|
528 |
|
529 |
|
530 | var __extends = this && this.__extends || function () {
|
531 | var _extendStatics = function extendStatics(d, b) {
|
532 | _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {
|
533 | d.__proto__ = b;
|
534 | } || function (d, b) {
|
535 | for (var p in b) {
|
536 | if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
537 | }
|
538 | };
|
539 | return _extendStatics(d, b);
|
540 | };
|
541 | return function (d, b) {
|
542 | if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
543 | _extendStatics(d, b);
|
544 | function __() {
|
545 | this.constructor = d;
|
546 | }
|
547 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
548 | };
|
549 | }();
|
550 | var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
551 | if (k2 === undefined) k2 = k;
|
552 | Object.defineProperty(o, k2, { enumerable: true, get: function get() {
|
553 | return m[k];
|
554 | } });
|
555 | } : function (o, m, k, k2) {
|
556 | if (k2 === undefined) k2 = k;
|
557 | o[k2] = m[k];
|
558 | });
|
559 | var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
560 | Object.defineProperty(o, "default", { enumerable: true, value: v });
|
561 | } : function (o, v) {
|
562 | o["default"] = v;
|
563 | });
|
564 | var __importStar = this && this.__importStar || function (mod) {
|
565 | if (mod && mod.__esModule) return mod;
|
566 | var result = {};
|
567 | if (mod != null) for (var k in mod) {
|
568 | if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
569 | }__setModuleDefault(result, mod);
|
570 | return result;
|
571 | };
|
572 | Object.defineProperty(exports, "__esModule", { value: true });
|
573 | exports.MDCRipple = void 0;
|
574 | var component_1 = __webpack_require__( "./packages/mdc-base/component.ts");
|
575 | var events_1 = __webpack_require__( "./packages/mdc-dom/events.ts");
|
576 | var ponyfill_1 = __webpack_require__( "./packages/mdc-dom/ponyfill.ts");
|
577 | var foundation_1 = __webpack_require__( "./packages/mdc-ripple/foundation.ts");
|
578 | var util = __importStar(__webpack_require__( "./packages/mdc-ripple/util.ts"));
|
579 | var MDCRipple = function (_super) {
|
580 | __extends(MDCRipple, _super);
|
581 | function MDCRipple() {
|
582 | var _this = _super !== null && _super.apply(this, arguments) || this;
|
583 | _this.disabled = false;
|
584 | return _this;
|
585 | }
|
586 | MDCRipple.attachTo = function (root, opts) {
|
587 | if (opts === void 0) {
|
588 | opts = { isUnbounded: undefined };
|
589 | }
|
590 | var ripple = new MDCRipple(root);
|
591 |
|
592 | if (opts.isUnbounded !== undefined) {
|
593 | ripple.unbounded = opts.isUnbounded;
|
594 | }
|
595 | return ripple;
|
596 | };
|
597 | MDCRipple.createAdapter = function (instance) {
|
598 | return {
|
599 | addClass: function addClass(className) {
|
600 | return instance.root.classList.add(className);
|
601 | },
|
602 | browserSupportsCssVars: function browserSupportsCssVars() {
|
603 | return util.supportsCssVariables(window);
|
604 | },
|
605 | computeBoundingRect: function computeBoundingRect() {
|
606 | return instance.root.getBoundingClientRect();
|
607 | },
|
608 | containsEventTarget: function containsEventTarget(target) {
|
609 | return instance.root.contains(target);
|
610 | },
|
611 | deregisterDocumentInteractionHandler: function deregisterDocumentInteractionHandler(evtType, handler) {
|
612 | return document.documentElement.removeEventListener(evtType, handler, events_1.applyPassive());
|
613 | },
|
614 | deregisterInteractionHandler: function deregisterInteractionHandler(evtType, handler) {
|
615 | return instance.root.removeEventListener(evtType, handler, events_1.applyPassive());
|
616 | },
|
617 | deregisterResizeHandler: function deregisterResizeHandler(handler) {
|
618 | return window.removeEventListener('resize', handler);
|
619 | },
|
620 | getWindowPageOffset: function getWindowPageOffset() {
|
621 | return { x: window.pageXOffset, y: window.pageYOffset };
|
622 | },
|
623 | isSurfaceActive: function isSurfaceActive() {
|
624 | return ponyfill_1.matches(instance.root, ':active');
|
625 | },
|
626 | isSurfaceDisabled: function isSurfaceDisabled() {
|
627 | return Boolean(instance.disabled);
|
628 | },
|
629 | isUnbounded: function isUnbounded() {
|
630 | return Boolean(instance.unbounded);
|
631 | },
|
632 | registerDocumentInteractionHandler: function registerDocumentInteractionHandler(evtType, handler) {
|
633 | return document.documentElement.addEventListener(evtType, handler, events_1.applyPassive());
|
634 | },
|
635 | registerInteractionHandler: function registerInteractionHandler(evtType, handler) {
|
636 | return instance.root.addEventListener(evtType, handler, events_1.applyPassive());
|
637 | },
|
638 | registerResizeHandler: function registerResizeHandler(handler) {
|
639 | return window.addEventListener('resize', handler);
|
640 | },
|
641 | removeClass: function removeClass(className) {
|
642 | return instance.root.classList.remove(className);
|
643 | },
|
644 | updateCssVariable: function updateCssVariable(varName, value) {
|
645 | return instance.root.style.setProperty(varName, value);
|
646 | }
|
647 | };
|
648 | };
|
649 | Object.defineProperty(MDCRipple.prototype, "unbounded", {
|
650 | get: function get() {
|
651 | return Boolean(this.unbounded_);
|
652 | },
|
653 | set: function set(unbounded) {
|
654 | this.unbounded_ = Boolean(unbounded);
|
655 | this.setUnbounded_();
|
656 | },
|
657 | enumerable: false,
|
658 | configurable: true
|
659 | });
|
660 | MDCRipple.prototype.activate = function () {
|
661 | this.foundation.activate();
|
662 | };
|
663 | MDCRipple.prototype.deactivate = function () {
|
664 | this.foundation.deactivate();
|
665 | };
|
666 | MDCRipple.prototype.layout = function () {
|
667 | this.foundation.layout();
|
668 | };
|
669 | MDCRipple.prototype.getDefaultFoundation = function () {
|
670 | return new foundation_1.MDCRippleFoundation(MDCRipple.createAdapter(this));
|
671 | };
|
672 | MDCRipple.prototype.initialSyncWithDOM = function () {
|
673 | var root = this.root;
|
674 | this.unbounded = 'mdcRippleIsUnbounded' in root.dataset;
|
675 | };
|
676 | |
677 |
|
678 |
|
679 |
|
680 |
|
681 |
|
682 | MDCRipple.prototype.setUnbounded_ = function () {
|
683 | this.foundation.setUnbounded(Boolean(this.unbounded_));
|
684 | };
|
685 | return MDCRipple;
|
686 | }(component_1.MDCComponent);
|
687 | exports.MDCRipple = MDCRipple;
|
688 |
|
689 | }),
|
690 |
|
691 | "./packages/mdc-ripple/constants.ts":
|
692 |
|
693 |
|
694 |
|
695 |
|
696 | (function(module, exports, __webpack_require__) {
|
697 |
|
698 | "use strict";
|
699 |
|
700 |
|
701 |
|
702 |
|
703 |
|
704 |
|
705 |
|
706 |
|
707 |
|
708 |
|
709 |
|
710 |
|
711 |
|
712 |
|
713 |
|
714 |
|
715 |
|
716 |
|
717 |
|
718 |
|
719 |
|
720 |
|
721 |
|
722 |
|
723 | Object.defineProperty(exports, "__esModule", { value: true });
|
724 | exports.numbers = exports.strings = exports.cssClasses = void 0;
|
725 | exports.cssClasses = {
|
726 |
|
727 |
|
728 |
|
729 | BG_FOCUSED: 'mdc-ripple-upgraded--background-focused',
|
730 | FG_ACTIVATION: 'mdc-ripple-upgraded--foreground-activation',
|
731 | FG_DEACTIVATION: 'mdc-ripple-upgraded--foreground-deactivation',
|
732 | ROOT: 'mdc-ripple-upgraded',
|
733 | UNBOUNDED: 'mdc-ripple-upgraded--unbounded'
|
734 | };
|
735 | exports.strings = {
|
736 | VAR_FG_SCALE: '--mdc-ripple-fg-scale',
|
737 | VAR_FG_SIZE: '--mdc-ripple-fg-size',
|
738 | VAR_FG_TRANSLATE_END: '--mdc-ripple-fg-translate-end',
|
739 | VAR_FG_TRANSLATE_START: '--mdc-ripple-fg-translate-start',
|
740 | VAR_LEFT: '--mdc-ripple-left',
|
741 | VAR_TOP: '--mdc-ripple-top'
|
742 | };
|
743 | exports.numbers = {
|
744 | DEACTIVATION_TIMEOUT_MS: 225,
|
745 | FG_DEACTIVATION_MS: 150,
|
746 | INITIAL_ORIGIN_SCALE: 0.6,
|
747 | PADDING: 10,
|
748 | TAP_DELAY_MS: 300 };
|
749 |
|
750 | }),
|
751 |
|
752 | "./packages/mdc-ripple/foundation.ts":
|
753 |
|
754 |
|
755 |
|
756 |
|
757 | (function(module, exports, __webpack_require__) {
|
758 |
|
759 | "use strict";
|
760 |
|
761 |
|
762 |
|
763 |
|
764 |
|
765 |
|
766 |
|
767 |
|
768 |
|
769 |
|
770 |
|
771 |
|
772 |
|
773 |
|
774 |
|
775 |
|
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 | var __extends = this && this.__extends || function () {
|
785 | var _extendStatics = function extendStatics(d, b) {
|
786 | _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {
|
787 | d.__proto__ = b;
|
788 | } || function (d, b) {
|
789 | for (var p in b) {
|
790 | if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
791 | }
|
792 | };
|
793 | return _extendStatics(d, b);
|
794 | };
|
795 | return function (d, b) {
|
796 | if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
797 | _extendStatics(d, b);
|
798 | function __() {
|
799 | this.constructor = d;
|
800 | }
|
801 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
802 | };
|
803 | }();
|
804 | var __assign = this && this.__assign || function () {
|
805 | __assign = Object.assign || function (t) {
|
806 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
807 | s = arguments[i];
|
808 | for (var p in s) {
|
809 | if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
810 | }
|
811 | }
|
812 | return t;
|
813 | };
|
814 | return __assign.apply(this, arguments);
|
815 | };
|
816 | Object.defineProperty(exports, "__esModule", { value: true });
|
817 | exports.MDCRippleFoundation = void 0;
|
818 | var foundation_1 = __webpack_require__( "./packages/mdc-base/foundation.ts");
|
819 | var constants_1 = __webpack_require__( "./packages/mdc-ripple/constants.ts");
|
820 | var util_1 = __webpack_require__( "./packages/mdc-ripple/util.ts");
|
821 |
|
822 | var ACTIVATION_EVENT_TYPES = ['touchstart', 'pointerdown', 'mousedown', 'keydown'];
|
823 |
|
824 | var POINTER_DEACTIVATION_EVENT_TYPES = ['touchend', 'pointerup', 'mouseup', 'contextmenu'];
|
825 |
|
826 | var activatedTargets = [];
|
827 | var MDCRippleFoundation = function (_super) {
|
828 | __extends(MDCRippleFoundation, _super);
|
829 | function MDCRippleFoundation(adapter) {
|
830 | var _this = _super.call(this, __assign(__assign({}, MDCRippleFoundation.defaultAdapter), adapter)) || this;
|
831 | _this.activationAnimationHasEnded_ = false;
|
832 | _this.activationTimer_ = 0;
|
833 | _this.fgDeactivationRemovalTimer_ = 0;
|
834 | _this.fgScale_ = '0';
|
835 | _this.frame_ = { width: 0, height: 0 };
|
836 | _this.initialSize_ = 0;
|
837 | _this.layoutFrame_ = 0;
|
838 | _this.maxRadius_ = 0;
|
839 | _this.unboundedCoords_ = { left: 0, top: 0 };
|
840 | _this.activationState_ = _this.defaultActivationState_();
|
841 | _this.activationTimerCallback_ = function () {
|
842 | _this.activationAnimationHasEnded_ = true;
|
843 | _this.runDeactivationUXLogicIfReady_();
|
844 | };
|
845 | _this.activateHandler_ = function (e) {
|
846 | return _this.activate_(e);
|
847 | };
|
848 | _this.deactivateHandler_ = function () {
|
849 | return _this.deactivate_();
|
850 | };
|
851 | _this.focusHandler_ = function () {
|
852 | return _this.handleFocus();
|
853 | };
|
854 | _this.blurHandler_ = function () {
|
855 | return _this.handleBlur();
|
856 | };
|
857 | _this.resizeHandler_ = function () {
|
858 | return _this.layout();
|
859 | };
|
860 | return _this;
|
861 | }
|
862 | Object.defineProperty(MDCRippleFoundation, "cssClasses", {
|
863 | get: function get() {
|
864 | return constants_1.cssClasses;
|
865 | },
|
866 | enumerable: false,
|
867 | configurable: true
|
868 | });
|
869 | Object.defineProperty(MDCRippleFoundation, "strings", {
|
870 | get: function get() {
|
871 | return constants_1.strings;
|
872 | },
|
873 | enumerable: false,
|
874 | configurable: true
|
875 | });
|
876 | Object.defineProperty(MDCRippleFoundation, "numbers", {
|
877 | get: function get() {
|
878 | return constants_1.numbers;
|
879 | },
|
880 | enumerable: false,
|
881 | configurable: true
|
882 | });
|
883 | Object.defineProperty(MDCRippleFoundation, "defaultAdapter", {
|
884 | get: function get() {
|
885 | return {
|
886 | addClass: function addClass() {
|
887 | return undefined;
|
888 | },
|
889 | browserSupportsCssVars: function browserSupportsCssVars() {
|
890 | return true;
|
891 | },
|
892 | computeBoundingRect: function computeBoundingRect() {
|
893 | return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
894 | },
|
895 | containsEventTarget: function containsEventTarget() {
|
896 | return true;
|
897 | },
|
898 | deregisterDocumentInteractionHandler: function deregisterDocumentInteractionHandler() {
|
899 | return undefined;
|
900 | },
|
901 | deregisterInteractionHandler: function deregisterInteractionHandler() {
|
902 | return undefined;
|
903 | },
|
904 | deregisterResizeHandler: function deregisterResizeHandler() {
|
905 | return undefined;
|
906 | },
|
907 | getWindowPageOffset: function getWindowPageOffset() {
|
908 | return { x: 0, y: 0 };
|
909 | },
|
910 | isSurfaceActive: function isSurfaceActive() {
|
911 | return true;
|
912 | },
|
913 | isSurfaceDisabled: function isSurfaceDisabled() {
|
914 | return true;
|
915 | },
|
916 | isUnbounded: function isUnbounded() {
|
917 | return true;
|
918 | },
|
919 | registerDocumentInteractionHandler: function registerDocumentInteractionHandler() {
|
920 | return undefined;
|
921 | },
|
922 | registerInteractionHandler: function registerInteractionHandler() {
|
923 | return undefined;
|
924 | },
|
925 | registerResizeHandler: function registerResizeHandler() {
|
926 | return undefined;
|
927 | },
|
928 | removeClass: function removeClass() {
|
929 | return undefined;
|
930 | },
|
931 | updateCssVariable: function updateCssVariable() {
|
932 | return undefined;
|
933 | }
|
934 | };
|
935 | },
|
936 | enumerable: false,
|
937 | configurable: true
|
938 | });
|
939 | MDCRippleFoundation.prototype.init = function () {
|
940 | var _this = this;
|
941 | var supportsPressRipple = this.supportsPressRipple_();
|
942 | this.registerRootHandlers_(supportsPressRipple);
|
943 | if (supportsPressRipple) {
|
944 | var _a = MDCRippleFoundation.cssClasses,
|
945 | ROOT_1 = _a.ROOT,
|
946 | UNBOUNDED_1 = _a.UNBOUNDED;
|
947 | requestAnimationFrame(function () {
|
948 | _this.adapter.addClass(ROOT_1);
|
949 | if (_this.adapter.isUnbounded()) {
|
950 | _this.adapter.addClass(UNBOUNDED_1);
|
951 |
|
952 | _this.layoutInternal_();
|
953 | }
|
954 | });
|
955 | }
|
956 | };
|
957 | MDCRippleFoundation.prototype.destroy = function () {
|
958 | var _this = this;
|
959 | if (this.supportsPressRipple_()) {
|
960 | if (this.activationTimer_) {
|
961 | clearTimeout(this.activationTimer_);
|
962 | this.activationTimer_ = 0;
|
963 | this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_ACTIVATION);
|
964 | }
|
965 | if (this.fgDeactivationRemovalTimer_) {
|
966 | clearTimeout(this.fgDeactivationRemovalTimer_);
|
967 | this.fgDeactivationRemovalTimer_ = 0;
|
968 | this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_DEACTIVATION);
|
969 | }
|
970 | var _a = MDCRippleFoundation.cssClasses,
|
971 | ROOT_2 = _a.ROOT,
|
972 | UNBOUNDED_2 = _a.UNBOUNDED;
|
973 | requestAnimationFrame(function () {
|
974 | _this.adapter.removeClass(ROOT_2);
|
975 | _this.adapter.removeClass(UNBOUNDED_2);
|
976 | _this.removeCssVars_();
|
977 | });
|
978 | }
|
979 | this.deregisterRootHandlers_();
|
980 | this.deregisterDeactivationHandlers_();
|
981 | };
|
982 | |
983 |
|
984 |
|
985 | MDCRippleFoundation.prototype.activate = function (evt) {
|
986 | this.activate_(evt);
|
987 | };
|
988 | MDCRippleFoundation.prototype.deactivate = function () {
|
989 | this.deactivate_();
|
990 | };
|
991 | MDCRippleFoundation.prototype.layout = function () {
|
992 | var _this = this;
|
993 | if (this.layoutFrame_) {
|
994 | cancelAnimationFrame(this.layoutFrame_);
|
995 | }
|
996 | this.layoutFrame_ = requestAnimationFrame(function () {
|
997 | _this.layoutInternal_();
|
998 | _this.layoutFrame_ = 0;
|
999 | });
|
1000 | };
|
1001 | MDCRippleFoundation.prototype.setUnbounded = function (unbounded) {
|
1002 | var UNBOUNDED = MDCRippleFoundation.cssClasses.UNBOUNDED;
|
1003 | if (unbounded) {
|
1004 | this.adapter.addClass(UNBOUNDED);
|
1005 | } else {
|
1006 | this.adapter.removeClass(UNBOUNDED);
|
1007 | }
|
1008 | };
|
1009 | MDCRippleFoundation.prototype.handleFocus = function () {
|
1010 | var _this = this;
|
1011 | requestAnimationFrame(function () {
|
1012 | return _this.adapter.addClass(MDCRippleFoundation.cssClasses.BG_FOCUSED);
|
1013 | });
|
1014 | };
|
1015 | MDCRippleFoundation.prototype.handleBlur = function () {
|
1016 | var _this = this;
|
1017 | requestAnimationFrame(function () {
|
1018 | return _this.adapter.removeClass(MDCRippleFoundation.cssClasses.BG_FOCUSED);
|
1019 | });
|
1020 | };
|
1021 | |
1022 |
|
1023 |
|
1024 |
|
1025 |
|
1026 |
|
1027 | MDCRippleFoundation.prototype.supportsPressRipple_ = function () {
|
1028 | return this.adapter.browserSupportsCssVars();
|
1029 | };
|
1030 | MDCRippleFoundation.prototype.defaultActivationState_ = function () {
|
1031 | return {
|
1032 | activationEvent: undefined,
|
1033 | hasDeactivationUXRun: false,
|
1034 | isActivated: false,
|
1035 | isProgrammatic: false,
|
1036 | wasActivatedByPointer: false,
|
1037 | wasElementMadeActive: false
|
1038 | };
|
1039 | };
|
1040 | |
1041 |
|
1042 |
|
1043 | MDCRippleFoundation.prototype.registerRootHandlers_ = function (supportsPressRipple) {
|
1044 | var _this = this;
|
1045 | if (supportsPressRipple) {
|
1046 | ACTIVATION_EVENT_TYPES.forEach(function (evtType) {
|
1047 | _this.adapter.registerInteractionHandler(evtType, _this.activateHandler_);
|
1048 | });
|
1049 | if (this.adapter.isUnbounded()) {
|
1050 | this.adapter.registerResizeHandler(this.resizeHandler_);
|
1051 | }
|
1052 | }
|
1053 | this.adapter.registerInteractionHandler('focus', this.focusHandler_);
|
1054 | this.adapter.registerInteractionHandler('blur', this.blurHandler_);
|
1055 | };
|
1056 | MDCRippleFoundation.prototype.registerDeactivationHandlers_ = function (evt) {
|
1057 | var _this = this;
|
1058 | if (evt.type === 'keydown') {
|
1059 | this.adapter.registerInteractionHandler('keyup', this.deactivateHandler_);
|
1060 | } else {
|
1061 | POINTER_DEACTIVATION_EVENT_TYPES.forEach(function (evtType) {
|
1062 | _this.adapter.registerDocumentInteractionHandler(evtType, _this.deactivateHandler_);
|
1063 | });
|
1064 | }
|
1065 | };
|
1066 | MDCRippleFoundation.prototype.deregisterRootHandlers_ = function () {
|
1067 | var _this = this;
|
1068 | ACTIVATION_EVENT_TYPES.forEach(function (evtType) {
|
1069 | _this.adapter.deregisterInteractionHandler(evtType, _this.activateHandler_);
|
1070 | });
|
1071 | this.adapter.deregisterInteractionHandler('focus', this.focusHandler_);
|
1072 | this.adapter.deregisterInteractionHandler('blur', this.blurHandler_);
|
1073 | if (this.adapter.isUnbounded()) {
|
1074 | this.adapter.deregisterResizeHandler(this.resizeHandler_);
|
1075 | }
|
1076 | };
|
1077 | MDCRippleFoundation.prototype.deregisterDeactivationHandlers_ = function () {
|
1078 | var _this = this;
|
1079 | this.adapter.deregisterInteractionHandler('keyup', this.deactivateHandler_);
|
1080 | POINTER_DEACTIVATION_EVENT_TYPES.forEach(function (evtType) {
|
1081 | _this.adapter.deregisterDocumentInteractionHandler(evtType, _this.deactivateHandler_);
|
1082 | });
|
1083 | };
|
1084 | MDCRippleFoundation.prototype.removeCssVars_ = function () {
|
1085 | var _this = this;
|
1086 | var rippleStrings = MDCRippleFoundation.strings;
|
1087 | var keys = Object.keys(rippleStrings);
|
1088 | keys.forEach(function (key) {
|
1089 | if (key.indexOf('VAR_') === 0) {
|
1090 | _this.adapter.updateCssVariable(rippleStrings[key], null);
|
1091 | }
|
1092 | });
|
1093 | };
|
1094 | MDCRippleFoundation.prototype.activate_ = function (evt) {
|
1095 | var _this = this;
|
1096 | if (this.adapter.isSurfaceDisabled()) {
|
1097 | return;
|
1098 | }
|
1099 | var activationState = this.activationState_;
|
1100 | if (activationState.isActivated) {
|
1101 | return;
|
1102 | }
|
1103 |
|
1104 | var previousActivationEvent = this.previousActivationEvent_;
|
1105 | var isSameInteraction = previousActivationEvent && evt !== undefined && previousActivationEvent.type !== evt.type;
|
1106 | if (isSameInteraction) {
|
1107 | return;
|
1108 | }
|
1109 | activationState.isActivated = true;
|
1110 | activationState.isProgrammatic = evt === undefined;
|
1111 | activationState.activationEvent = evt;
|
1112 | activationState.wasActivatedByPointer = activationState.isProgrammatic ? false : evt !== undefined && (evt.type === 'mousedown' || evt.type === 'touchstart' || evt.type === 'pointerdown');
|
1113 | var hasActivatedChild = evt !== undefined && activatedTargets.length > 0 && activatedTargets.some(function (target) {
|
1114 | return _this.adapter.containsEventTarget(target);
|
1115 | });
|
1116 | if (hasActivatedChild) {
|
1117 |
|
1118 | this.resetActivationState_();
|
1119 | return;
|
1120 | }
|
1121 | if (evt !== undefined) {
|
1122 | activatedTargets.push(evt.target);
|
1123 | this.registerDeactivationHandlers_(evt);
|
1124 | }
|
1125 | activationState.wasElementMadeActive = this.checkElementMadeActive_(evt);
|
1126 | if (activationState.wasElementMadeActive) {
|
1127 | this.animateActivation_();
|
1128 | }
|
1129 | requestAnimationFrame(function () {
|
1130 |
|
1131 | activatedTargets = [];
|
1132 | if (!activationState.wasElementMadeActive && evt !== undefined && (evt.key === ' ' || evt.keyCode === 32)) {
|
1133 |
|
1134 |
|
1135 |
|
1136 |
|
1137 |
|
1138 |
|
1139 | activationState.wasElementMadeActive = _this.checkElementMadeActive_(evt);
|
1140 | if (activationState.wasElementMadeActive) {
|
1141 | _this.animateActivation_();
|
1142 | }
|
1143 | }
|
1144 | if (!activationState.wasElementMadeActive) {
|
1145 |
|
1146 | _this.activationState_ = _this.defaultActivationState_();
|
1147 | }
|
1148 | });
|
1149 | };
|
1150 | MDCRippleFoundation.prototype.checkElementMadeActive_ = function (evt) {
|
1151 | return evt !== undefined && evt.type === 'keydown' ? this.adapter.isSurfaceActive() : true;
|
1152 | };
|
1153 | MDCRippleFoundation.prototype.animateActivation_ = function () {
|
1154 | var _this = this;
|
1155 | var _a = MDCRippleFoundation.strings,
|
1156 | VAR_FG_TRANSLATE_START = _a.VAR_FG_TRANSLATE_START,
|
1157 | VAR_FG_TRANSLATE_END = _a.VAR_FG_TRANSLATE_END;
|
1158 | var _b = MDCRippleFoundation.cssClasses,
|
1159 | FG_DEACTIVATION = _b.FG_DEACTIVATION,
|
1160 | FG_ACTIVATION = _b.FG_ACTIVATION;
|
1161 | var DEACTIVATION_TIMEOUT_MS = MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS;
|
1162 | this.layoutInternal_();
|
1163 | var translateStart = '';
|
1164 | var translateEnd = '';
|
1165 | if (!this.adapter.isUnbounded()) {
|
1166 | var _c = this.getFgTranslationCoordinates_(),
|
1167 | startPoint = _c.startPoint,
|
1168 | endPoint = _c.endPoint;
|
1169 | translateStart = startPoint.x + "px, " + startPoint.y + "px";
|
1170 | translateEnd = endPoint.x + "px, " + endPoint.y + "px";
|
1171 | }
|
1172 | this.adapter.updateCssVariable(VAR_FG_TRANSLATE_START, translateStart);
|
1173 | this.adapter.updateCssVariable(VAR_FG_TRANSLATE_END, translateEnd);
|
1174 |
|
1175 | clearTimeout(this.activationTimer_);
|
1176 | clearTimeout(this.fgDeactivationRemovalTimer_);
|
1177 | this.rmBoundedActivationClasses_();
|
1178 | this.adapter.removeClass(FG_DEACTIVATION);
|
1179 |
|
1180 | this.adapter.computeBoundingRect();
|
1181 | this.adapter.addClass(FG_ACTIVATION);
|
1182 | this.activationTimer_ = setTimeout(function () {
|
1183 | return _this.activationTimerCallback_();
|
1184 | }, DEACTIVATION_TIMEOUT_MS);
|
1185 | };
|
1186 | MDCRippleFoundation.prototype.getFgTranslationCoordinates_ = function () {
|
1187 | var _a = this.activationState_,
|
1188 | activationEvent = _a.activationEvent,
|
1189 | wasActivatedByPointer = _a.wasActivatedByPointer;
|
1190 | var startPoint;
|
1191 | if (wasActivatedByPointer) {
|
1192 | startPoint = util_1.getNormalizedEventCoords(activationEvent, this.adapter.getWindowPageOffset(), this.adapter.computeBoundingRect());
|
1193 | } else {
|
1194 | startPoint = {
|
1195 | x: this.frame_.width / 2,
|
1196 | y: this.frame_.height / 2
|
1197 | };
|
1198 | }
|
1199 |
|
1200 | startPoint = {
|
1201 | x: startPoint.x - this.initialSize_ / 2,
|
1202 | y: startPoint.y - this.initialSize_ / 2
|
1203 | };
|
1204 | var endPoint = {
|
1205 | x: this.frame_.width / 2 - this.initialSize_ / 2,
|
1206 | y: this.frame_.height / 2 - this.initialSize_ / 2
|
1207 | };
|
1208 | return { startPoint: startPoint, endPoint: endPoint };
|
1209 | };
|
1210 | MDCRippleFoundation.prototype.runDeactivationUXLogicIfReady_ = function () {
|
1211 | var _this = this;
|
1212 |
|
1213 |
|
1214 | var FG_DEACTIVATION = MDCRippleFoundation.cssClasses.FG_DEACTIVATION;
|
1215 | var _a = this.activationState_,
|
1216 | hasDeactivationUXRun = _a.hasDeactivationUXRun,
|
1217 | isActivated = _a.isActivated;
|
1218 | var activationHasEnded = hasDeactivationUXRun || !isActivated;
|
1219 | if (activationHasEnded && this.activationAnimationHasEnded_) {
|
1220 | this.rmBoundedActivationClasses_();
|
1221 | this.adapter.addClass(FG_DEACTIVATION);
|
1222 | this.fgDeactivationRemovalTimer_ = setTimeout(function () {
|
1223 | _this.adapter.removeClass(FG_DEACTIVATION);
|
1224 | }, constants_1.numbers.FG_DEACTIVATION_MS);
|
1225 | }
|
1226 | };
|
1227 | MDCRippleFoundation.prototype.rmBoundedActivationClasses_ = function () {
|
1228 | var FG_ACTIVATION = MDCRippleFoundation.cssClasses.FG_ACTIVATION;
|
1229 | this.adapter.removeClass(FG_ACTIVATION);
|
1230 | this.activationAnimationHasEnded_ = false;
|
1231 | this.adapter.computeBoundingRect();
|
1232 | };
|
1233 | MDCRippleFoundation.prototype.resetActivationState_ = function () {
|
1234 | var _this = this;
|
1235 | this.previousActivationEvent_ = this.activationState_.activationEvent;
|
1236 | this.activationState_ = this.defaultActivationState_();
|
1237 |
|
1238 |
|
1239 | setTimeout(function () {
|
1240 | return _this.previousActivationEvent_ = undefined;
|
1241 | }, MDCRippleFoundation.numbers.TAP_DELAY_MS);
|
1242 | };
|
1243 | MDCRippleFoundation.prototype.deactivate_ = function () {
|
1244 | var _this = this;
|
1245 | var activationState = this.activationState_;
|
1246 |
|
1247 | if (!activationState.isActivated) {
|
1248 | return;
|
1249 | }
|
1250 | var state = __assign({}, activationState);
|
1251 | if (activationState.isProgrammatic) {
|
1252 | requestAnimationFrame(function () {
|
1253 | return _this.animateDeactivation_(state);
|
1254 | });
|
1255 | this.resetActivationState_();
|
1256 | } else {
|
1257 | this.deregisterDeactivationHandlers_();
|
1258 | requestAnimationFrame(function () {
|
1259 | _this.activationState_.hasDeactivationUXRun = true;
|
1260 | _this.animateDeactivation_(state);
|
1261 | _this.resetActivationState_();
|
1262 | });
|
1263 | }
|
1264 | };
|
1265 | MDCRippleFoundation.prototype.animateDeactivation_ = function (_a) {
|
1266 | var wasActivatedByPointer = _a.wasActivatedByPointer,
|
1267 | wasElementMadeActive = _a.wasElementMadeActive;
|
1268 | if (wasActivatedByPointer || wasElementMadeActive) {
|
1269 | this.runDeactivationUXLogicIfReady_();
|
1270 | }
|
1271 | };
|
1272 | MDCRippleFoundation.prototype.layoutInternal_ = function () {
|
1273 | var _this = this;
|
1274 | this.frame_ = this.adapter.computeBoundingRect();
|
1275 | var maxDim = Math.max(this.frame_.height, this.frame_.width);
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 | var getBoundedRadius = function getBoundedRadius() {
|
1283 | var hypotenuse = Math.sqrt(Math.pow(_this.frame_.width, 2) + Math.pow(_this.frame_.height, 2));
|
1284 | return hypotenuse + MDCRippleFoundation.numbers.PADDING;
|
1285 | };
|
1286 | this.maxRadius_ = this.adapter.isUnbounded() ? maxDim : getBoundedRadius();
|
1287 |
|
1288 | var initialSize = Math.floor(maxDim * MDCRippleFoundation.numbers.INITIAL_ORIGIN_SCALE);
|
1289 |
|
1290 | if (this.adapter.isUnbounded() && initialSize % 2 !== 0) {
|
1291 | this.initialSize_ = initialSize - 1;
|
1292 | } else {
|
1293 | this.initialSize_ = initialSize;
|
1294 | }
|
1295 | this.fgScale_ = "" + this.maxRadius_ / this.initialSize_;
|
1296 | this.updateLayoutCssVars_();
|
1297 | };
|
1298 | MDCRippleFoundation.prototype.updateLayoutCssVars_ = function () {
|
1299 | var _a = MDCRippleFoundation.strings,
|
1300 | VAR_FG_SIZE = _a.VAR_FG_SIZE,
|
1301 | VAR_LEFT = _a.VAR_LEFT,
|
1302 | VAR_TOP = _a.VAR_TOP,
|
1303 | VAR_FG_SCALE = _a.VAR_FG_SCALE;
|
1304 | this.adapter.updateCssVariable(VAR_FG_SIZE, this.initialSize_ + "px");
|
1305 | this.adapter.updateCssVariable(VAR_FG_SCALE, this.fgScale_);
|
1306 | if (this.adapter.isUnbounded()) {
|
1307 | this.unboundedCoords_ = {
|
1308 | left: Math.round(this.frame_.width / 2 - this.initialSize_ / 2),
|
1309 | top: Math.round(this.frame_.height / 2 - this.initialSize_ / 2)
|
1310 | };
|
1311 | this.adapter.updateCssVariable(VAR_LEFT, this.unboundedCoords_.left + "px");
|
1312 | this.adapter.updateCssVariable(VAR_TOP, this.unboundedCoords_.top + "px");
|
1313 | }
|
1314 | };
|
1315 | return MDCRippleFoundation;
|
1316 | }(foundation_1.MDCFoundation);
|
1317 | exports.MDCRippleFoundation = MDCRippleFoundation;
|
1318 |
|
1319 | exports.default = MDCRippleFoundation;
|
1320 |
|
1321 | }),
|
1322 |
|
1323 | "./packages/mdc-ripple/util.ts":
|
1324 |
|
1325 |
|
1326 |
|
1327 |
|
1328 | (function(module, exports, __webpack_require__) {
|
1329 |
|
1330 | "use strict";
|
1331 |
|
1332 |
|
1333 | Object.defineProperty(exports, "__esModule", { value: true });
|
1334 | exports.getNormalizedEventCoords = exports.supportsCssVariables = void 0;
|
1335 |
|
1336 |
|
1337 |
|
1338 |
|
1339 | var supportsCssVariables_;
|
1340 | function supportsCssVariables(windowObj, forceRefresh) {
|
1341 | if (forceRefresh === void 0) {
|
1342 | forceRefresh = false;
|
1343 | }
|
1344 | var CSS = windowObj.CSS;
|
1345 | var supportsCssVars = supportsCssVariables_;
|
1346 | if (typeof supportsCssVariables_ === 'boolean' && !forceRefresh) {
|
1347 | return supportsCssVariables_;
|
1348 | }
|
1349 | var supportsFunctionPresent = CSS && typeof CSS.supports === 'function';
|
1350 | if (!supportsFunctionPresent) {
|
1351 | return false;
|
1352 | }
|
1353 | var explicitlySupportsCssVars = CSS.supports('--css-vars', 'yes');
|
1354 |
|
1355 |
|
1356 | var weAreFeatureDetectingSafari10plus = CSS.supports('(--css-vars: yes)') && CSS.supports('color', '#00000000');
|
1357 | supportsCssVars = explicitlySupportsCssVars || weAreFeatureDetectingSafari10plus;
|
1358 | if (!forceRefresh) {
|
1359 | supportsCssVariables_ = supportsCssVars;
|
1360 | }
|
1361 | return supportsCssVars;
|
1362 | }
|
1363 | exports.supportsCssVariables = supportsCssVariables;
|
1364 | function getNormalizedEventCoords(evt, pageOffset, clientRect) {
|
1365 | if (!evt) {
|
1366 | return { x: 0, y: 0 };
|
1367 | }
|
1368 | var x = pageOffset.x,
|
1369 | y = pageOffset.y;
|
1370 | var documentX = x + clientRect.left;
|
1371 | var documentY = y + clientRect.top;
|
1372 | var normalizedX;
|
1373 | var normalizedY;
|
1374 |
|
1375 | if (evt.type === 'touchstart') {
|
1376 | var touchEvent = evt;
|
1377 | normalizedX = touchEvent.changedTouches[0].pageX - documentX;
|
1378 | normalizedY = touchEvent.changedTouches[0].pageY - documentY;
|
1379 | } else {
|
1380 | var mouseEvent = evt;
|
1381 | normalizedX = mouseEvent.pageX - documentX;
|
1382 | normalizedY = mouseEvent.pageY - documentY;
|
1383 | }
|
1384 | return { x: normalizedX, y: normalizedY };
|
1385 | }
|
1386 | exports.getNormalizedEventCoords = getNormalizedEventCoords;
|
1387 |
|
1388 | }),
|
1389 |
|
1390 | "./packages/mdc-switch/adapter.ts":
|
1391 |
|
1392 |
|
1393 |
|
1394 |
|
1395 | (function(module, exports, __webpack_require__) {
|
1396 |
|
1397 | "use strict";
|
1398 |
|
1399 |
|
1400 |
|
1401 |
|
1402 |
|
1403 |
|
1404 |
|
1405 |
|
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 |
|
1416 |
|
1417 |
|
1418 |
|
1419 |
|
1420 |
|
1421 |
|
1422 | Object.defineProperty(exports, "__esModule", { value: true });
|
1423 |
|
1424 | }),
|
1425 |
|
1426 | "./packages/mdc-switch/component.ts":
|
1427 |
|
1428 |
|
1429 |
|
1430 |
|
1431 | (function(module, exports, __webpack_require__) {
|
1432 |
|
1433 | "use strict";
|
1434 |
|
1435 |
|
1436 |
|
1437 |
|
1438 |
|
1439 |
|
1440 |
|
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 |
|
1446 |
|
1447 |
|
1448 |
|
1449 |
|
1450 |
|
1451 |
|
1452 |
|
1453 |
|
1454 |
|
1455 |
|
1456 |
|
1457 |
|
1458 | var __extends = this && this.__extends || function () {
|
1459 | var _extendStatics = function extendStatics(d, b) {
|
1460 | _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {
|
1461 | d.__proto__ = b;
|
1462 | } || function (d, b) {
|
1463 | for (var p in b) {
|
1464 | if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
1465 | }
|
1466 | };
|
1467 | return _extendStatics(d, b);
|
1468 | };
|
1469 | return function (d, b) {
|
1470 | if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
1471 | _extendStatics(d, b);
|
1472 | function __() {
|
1473 | this.constructor = d;
|
1474 | }
|
1475 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
1476 | };
|
1477 | }();
|
1478 | var __assign = this && this.__assign || function () {
|
1479 | __assign = Object.assign || function (t) {
|
1480 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
1481 | s = arguments[i];
|
1482 | for (var p in s) {
|
1483 | if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
1484 | }
|
1485 | }
|
1486 | return t;
|
1487 | };
|
1488 | return __assign.apply(this, arguments);
|
1489 | };
|
1490 | var __read = this && this.__read || function (o, n) {
|
1491 | var m = typeof Symbol === "function" && o[Symbol.iterator];
|
1492 | if (!m) return o;
|
1493 | var i = m.call(o),
|
1494 | r,
|
1495 | ar = [],
|
1496 | e;
|
1497 | try {
|
1498 | while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
1499 | ar.push(r.value);
|
1500 | }
|
1501 | } catch (error) {
|
1502 | e = { error: error };
|
1503 | } finally {
|
1504 | try {
|
1505 | if (r && !r.done && (m = i["return"])) m.call(i);
|
1506 | } finally {
|
1507 | if (e) throw e.error;
|
1508 | }
|
1509 | }
|
1510 | return ar;
|
1511 | };
|
1512 | var __spreadArray = this && this.__spreadArray || function (to, from) {
|
1513 | for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) {
|
1514 | to[j] = from[i];
|
1515 | }return to;
|
1516 | };
|
1517 | Object.defineProperty(exports, "__esModule", { value: true });
|
1518 | exports.MDCSwitch = void 0;
|
1519 | var component_1 = __webpack_require__( "./packages/mdc-base/component.ts");
|
1520 | var events_1 = __webpack_require__( "./packages/mdc-dom/events.ts");
|
1521 | var ponyfill_1 = __webpack_require__( "./packages/mdc-dom/ponyfill.ts");
|
1522 | var component_2 = __webpack_require__( "./packages/mdc-ripple/component.ts");
|
1523 | var foundation_1 = __webpack_require__( "./packages/mdc-ripple/foundation.ts");
|
1524 | var foundation_2 = __webpack_require__( "./packages/mdc-switch/foundation.ts");
|
1525 | var MDCSwitch = function (_super) {
|
1526 | __extends(MDCSwitch, _super);
|
1527 | function MDCSwitch() {
|
1528 | var _this = _super !== null && _super.apply(this, arguments) || this;
|
1529 | _this.ripple_ = _this.createRipple_();
|
1530 | return _this;
|
1531 | }
|
1532 | MDCSwitch.attachTo = function (root) {
|
1533 | return new MDCSwitch(root);
|
1534 | };
|
1535 | MDCSwitch.prototype.destroy = function () {
|
1536 | _super.prototype.destroy.call(this);
|
1537 | this.ripple_.destroy();
|
1538 | this.nativeControl_.removeEventListener('change', this.changeHandler_);
|
1539 | };
|
1540 | MDCSwitch.prototype.initialSyncWithDOM = function () {
|
1541 | var _this = this;
|
1542 | this.changeHandler_ = function () {
|
1543 | var _a;
|
1544 | var args = [];
|
1545 | for (var _i = 0; _i < arguments.length; _i++) {
|
1546 | args[_i] = arguments[_i];
|
1547 | }
|
1548 | return (_a = _this.foundation).handleChange.apply(_a, __spreadArray([], __read(args)));
|
1549 | };
|
1550 | this.nativeControl_.addEventListener('change', this.changeHandler_);
|
1551 |
|
1552 |
|
1553 |
|
1554 | this.checked = this.checked;
|
1555 | };
|
1556 | MDCSwitch.prototype.getDefaultFoundation = function () {
|
1557 | var _this = this;
|
1558 |
|
1559 |
|
1560 | var adapter = {
|
1561 | addClass: function addClass(className) {
|
1562 | return _this.root.classList.add(className);
|
1563 | },
|
1564 | removeClass: function removeClass(className) {
|
1565 | return _this.root.classList.remove(className);
|
1566 | },
|
1567 | setNativeControlChecked: function setNativeControlChecked(checked) {
|
1568 | return _this.nativeControl_.checked = checked;
|
1569 | },
|
1570 | setNativeControlDisabled: function setNativeControlDisabled(disabled) {
|
1571 | return _this.nativeControl_.disabled = disabled;
|
1572 | },
|
1573 | setNativeControlAttr: function setNativeControlAttr(attr, value) {
|
1574 | return _this.nativeControl_.setAttribute(attr, value);
|
1575 | }
|
1576 | };
|
1577 | return new foundation_2.MDCSwitchFoundation(adapter);
|
1578 | };
|
1579 | Object.defineProperty(MDCSwitch.prototype, "ripple", {
|
1580 | get: function get() {
|
1581 | return this.ripple_;
|
1582 | },
|
1583 | enumerable: false,
|
1584 | configurable: true
|
1585 | });
|
1586 | Object.defineProperty(MDCSwitch.prototype, "checked", {
|
1587 | get: function get() {
|
1588 | return this.nativeControl_.checked;
|
1589 | },
|
1590 | set: function set(checked) {
|
1591 | this.foundation.setChecked(checked);
|
1592 | },
|
1593 | enumerable: false,
|
1594 | configurable: true
|
1595 | });
|
1596 | Object.defineProperty(MDCSwitch.prototype, "disabled", {
|
1597 | get: function get() {
|
1598 | return this.nativeControl_.disabled;
|
1599 | },
|
1600 | set: function set(disabled) {
|
1601 | this.foundation.setDisabled(disabled);
|
1602 | },
|
1603 | enumerable: false,
|
1604 | configurable: true
|
1605 | });
|
1606 | MDCSwitch.prototype.createRipple_ = function () {
|
1607 | var _this = this;
|
1608 | var RIPPLE_SURFACE_SELECTOR = foundation_2.MDCSwitchFoundation.strings.RIPPLE_SURFACE_SELECTOR;
|
1609 | var rippleSurface = this.root.querySelector(RIPPLE_SURFACE_SELECTOR);
|
1610 |
|
1611 |
|
1612 | var adapter = __assign(__assign({}, component_2.MDCRipple.createAdapter(this)), { addClass: function addClass(className) {
|
1613 | return rippleSurface.classList.add(className);
|
1614 | }, computeBoundingRect: function computeBoundingRect() {
|
1615 | return rippleSurface.getBoundingClientRect();
|
1616 | }, deregisterInteractionHandler: function deregisterInteractionHandler(evtType, handler) {
|
1617 | _this.nativeControl_.removeEventListener(evtType, handler, events_1.applyPassive());
|
1618 | }, isSurfaceActive: function isSurfaceActive() {
|
1619 | return ponyfill_1.matches(_this.nativeControl_, ':active');
|
1620 | }, isUnbounded: function isUnbounded() {
|
1621 | return true;
|
1622 | }, registerInteractionHandler: function registerInteractionHandler(evtType, handler) {
|
1623 | _this.nativeControl_.addEventListener(evtType, handler, events_1.applyPassive());
|
1624 | }, removeClass: function removeClass(className) {
|
1625 | rippleSurface.classList.remove(className);
|
1626 | }, updateCssVariable: function updateCssVariable(varName, value) {
|
1627 | rippleSurface.style.setProperty(varName, value);
|
1628 | } });
|
1629 | return new component_2.MDCRipple(this.root, new foundation_1.MDCRippleFoundation(adapter));
|
1630 | };
|
1631 | Object.defineProperty(MDCSwitch.prototype, "nativeControl_", {
|
1632 | get: function get() {
|
1633 | var NATIVE_CONTROL_SELECTOR = foundation_2.MDCSwitchFoundation.strings.NATIVE_CONTROL_SELECTOR;
|
1634 | return this.root.querySelector(NATIVE_CONTROL_SELECTOR);
|
1635 | },
|
1636 | enumerable: false,
|
1637 | configurable: true
|
1638 | });
|
1639 | return MDCSwitch;
|
1640 | }(component_1.MDCComponent);
|
1641 | exports.MDCSwitch = MDCSwitch;
|
1642 |
|
1643 | }),
|
1644 |
|
1645 | "./packages/mdc-switch/constants.ts":
|
1646 |
|
1647 |
|
1648 |
|
1649 |
|
1650 | (function(module, exports, __webpack_require__) {
|
1651 |
|
1652 | "use strict";
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 |
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 |
|
1677 | Object.defineProperty(exports, "__esModule", { value: true });
|
1678 | exports.strings = exports.cssClasses = void 0;
|
1679 |
|
1680 | var cssClasses = {
|
1681 |
|
1682 | CHECKED: 'mdc-switch--checked',
|
1683 |
|
1684 | DISABLED: 'mdc-switch--disabled'
|
1685 | };
|
1686 | exports.cssClasses = cssClasses;
|
1687 |
|
1688 | var strings = {
|
1689 |
|
1690 | ARIA_CHECKED_ATTR: 'aria-checked',
|
1691 |
|
1692 | NATIVE_CONTROL_SELECTOR: '.mdc-switch__native-control',
|
1693 |
|
1694 | RIPPLE_SURFACE_SELECTOR: '.mdc-switch__thumb-underlay'
|
1695 | };
|
1696 | exports.strings = strings;
|
1697 |
|
1698 | }),
|
1699 |
|
1700 | "./packages/mdc-switch/foundation.ts":
|
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 | (function(module, exports, __webpack_require__) {
|
1706 |
|
1707 | "use strict";
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 |
|
1718 |
|
1719 |
|
1720 |
|
1721 |
|
1722 |
|
1723 |
|
1724 |
|
1725 |
|
1726 |
|
1727 |
|
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 | var __extends = this && this.__extends || function () {
|
1733 | var _extendStatics = function extendStatics(d, b) {
|
1734 | _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {
|
1735 | d.__proto__ = b;
|
1736 | } || function (d, b) {
|
1737 | for (var p in b) {
|
1738 | if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
1739 | }
|
1740 | };
|
1741 | return _extendStatics(d, b);
|
1742 | };
|
1743 | return function (d, b) {
|
1744 | if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
1745 | _extendStatics(d, b);
|
1746 | function __() {
|
1747 | this.constructor = d;
|
1748 | }
|
1749 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
1750 | };
|
1751 | }();
|
1752 | var __assign = this && this.__assign || function () {
|
1753 | __assign = Object.assign || function (t) {
|
1754 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
1755 | s = arguments[i];
|
1756 | for (var p in s) {
|
1757 | if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
1758 | }
|
1759 | }
|
1760 | return t;
|
1761 | };
|
1762 | return __assign.apply(this, arguments);
|
1763 | };
|
1764 | Object.defineProperty(exports, "__esModule", { value: true });
|
1765 | exports.MDCSwitchFoundation = void 0;
|
1766 | var foundation_1 = __webpack_require__( "./packages/mdc-base/foundation.ts");
|
1767 | var constants_1 = __webpack_require__( "./packages/mdc-switch/constants.ts");
|
1768 | var MDCSwitchFoundation = function (_super) {
|
1769 | __extends(MDCSwitchFoundation, _super);
|
1770 | function MDCSwitchFoundation(adapter) {
|
1771 | return _super.call(this, __assign(__assign({}, MDCSwitchFoundation.defaultAdapter), adapter)) || this;
|
1772 | }
|
1773 | Object.defineProperty(MDCSwitchFoundation, "strings", {
|
1774 |
|
1775 | get: function get() {
|
1776 | return constants_1.strings;
|
1777 | },
|
1778 | enumerable: false,
|
1779 | configurable: true
|
1780 | });
|
1781 | Object.defineProperty(MDCSwitchFoundation, "cssClasses", {
|
1782 |
|
1783 | get: function get() {
|
1784 | return constants_1.cssClasses;
|
1785 | },
|
1786 | enumerable: false,
|
1787 | configurable: true
|
1788 | });
|
1789 | Object.defineProperty(MDCSwitchFoundation, "defaultAdapter", {
|
1790 |
|
1791 | get: function get() {
|
1792 | return {
|
1793 | addClass: function addClass() {
|
1794 | return undefined;
|
1795 | },
|
1796 | removeClass: function removeClass() {
|
1797 | return undefined;
|
1798 | },
|
1799 | setNativeControlChecked: function setNativeControlChecked() {
|
1800 | return undefined;
|
1801 | },
|
1802 | setNativeControlDisabled: function setNativeControlDisabled() {
|
1803 | return undefined;
|
1804 | },
|
1805 | setNativeControlAttr: function setNativeControlAttr() {
|
1806 | return undefined;
|
1807 | }
|
1808 | };
|
1809 | },
|
1810 | enumerable: false,
|
1811 | configurable: true
|
1812 | });
|
1813 |
|
1814 | MDCSwitchFoundation.prototype.setChecked = function (checked) {
|
1815 | this.adapter.setNativeControlChecked(checked);
|
1816 | this.updateAriaChecked_(checked);
|
1817 | this.updateCheckedStyling_(checked);
|
1818 | };
|
1819 |
|
1820 | MDCSwitchFoundation.prototype.setDisabled = function (disabled) {
|
1821 | this.adapter.setNativeControlDisabled(disabled);
|
1822 | if (disabled) {
|
1823 | this.adapter.addClass(constants_1.cssClasses.DISABLED);
|
1824 | } else {
|
1825 | this.adapter.removeClass(constants_1.cssClasses.DISABLED);
|
1826 | }
|
1827 | };
|
1828 |
|
1829 | MDCSwitchFoundation.prototype.handleChange = function (evt) {
|
1830 | var nativeControl = evt.target;
|
1831 | this.updateAriaChecked_(nativeControl.checked);
|
1832 | this.updateCheckedStyling_(nativeControl.checked);
|
1833 | };
|
1834 |
|
1835 | MDCSwitchFoundation.prototype.updateCheckedStyling_ = function (checked) {
|
1836 | if (checked) {
|
1837 | this.adapter.addClass(constants_1.cssClasses.CHECKED);
|
1838 | } else {
|
1839 | this.adapter.removeClass(constants_1.cssClasses.CHECKED);
|
1840 | }
|
1841 | };
|
1842 | MDCSwitchFoundation.prototype.updateAriaChecked_ = function (checked) {
|
1843 | this.adapter.setNativeControlAttr(constants_1.strings.ARIA_CHECKED_ATTR, "" + !!checked);
|
1844 | };
|
1845 | return MDCSwitchFoundation;
|
1846 | }(foundation_1.MDCFoundation);
|
1847 | exports.MDCSwitchFoundation = MDCSwitchFoundation;
|
1848 |
|
1849 | exports.default = MDCSwitchFoundation;
|
1850 |
|
1851 | }),
|
1852 |
|
1853 | "./packages/mdc-switch/index.ts":
|
1854 |
|
1855 |
|
1856 |
|
1857 |
|
1858 | (function(module, exports, __webpack_require__) {
|
1859 |
|
1860 | "use strict";
|
1861 |
|
1862 |
|
1863 |
|
1864 |
|
1865 |
|
1866 |
|
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 |
|
1872 |
|
1873 |
|
1874 |
|
1875 |
|
1876 |
|
1877 |
|
1878 |
|
1879 |
|
1880 |
|
1881 |
|
1882 |
|
1883 |
|
1884 |
|
1885 | var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
1886 | if (k2 === undefined) k2 = k;
|
1887 | Object.defineProperty(o, k2, { enumerable: true, get: function get() {
|
1888 | return m[k];
|
1889 | } });
|
1890 | } : function (o, m, k, k2) {
|
1891 | if (k2 === undefined) k2 = k;
|
1892 | o[k2] = m[k];
|
1893 | });
|
1894 | var __exportStar = this && this.__exportStar || function (m, exports) {
|
1895 | for (var p in m) {
|
1896 | if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
1897 | }
|
1898 | };
|
1899 | Object.defineProperty(exports, "__esModule", { value: true });
|
1900 | __exportStar(__webpack_require__( "./packages/mdc-switch/adapter.ts"), exports);
|
1901 | __exportStar(__webpack_require__( "./packages/mdc-switch/component.ts"), exports);
|
1902 | __exportStar(__webpack_require__( "./packages/mdc-switch/constants.ts"), exports);
|
1903 | __exportStar(__webpack_require__( "./packages/mdc-switch/foundation.ts"), exports);
|
1904 |
|
1905 | })
|
1906 |
|
1907 | });
|
1908 | });
|
1909 |
|
\ | No newline at end of file |