@hortiview/shared-components 0.0.4722 → 0.0.4724

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/_getTag-DyrzUAbj.js +494 -0
  2. package/dist/assets/DeleteModal.css +1 -1
  3. package/dist/components/BaseView/BaseView.js +43 -297
  4. package/dist/components/BasicHeading/BasicHeading.js +24 -25
  5. package/dist/components/BasicHeading/BasicHeading.test.js +4 -4
  6. package/dist/components/BlockView/BlockView.js +14 -14
  7. package/dist/components/DeleteModal/DeleteModal.js +49 -4687
  8. package/dist/components/Disclaimer/Disclaimer.js +8 -10
  9. package/dist/components/EmptyView/EmptyView.js +8 -247
  10. package/dist/components/HashTabView/HashTabView.js +52 -1838
  11. package/dist/components/HeaderFilter/HeaderFilter.js +18 -7595
  12. package/dist/components/Iconify/Iconify.js +1 -1
  13. package/dist/components/ListArea/ListArea.js +316 -261
  14. package/dist/components/ListArea/ListArea.test.js +1 -1
  15. package/dist/components/ListArea/ListAreaService.js +34 -35
  16. package/dist/components/SearchBar/SearchBar.js +21 -2043
  17. package/dist/main.d.ts +1 -0
  18. package/package.json +1 -1
  19. package/dist/_getTag-DNUtgXkb.js +0 -136
  20. package/dist/_stringToPath-BfzwTbL6.js +0 -54
  21. package/dist/component-Rx4bNsGO.js +0 -680
  22. package/dist/index.es-Ba9oZK_n.js +0 -769
  23. package/dist/index.es-C1ojb4Lq.js +0 -106
  24. package/dist/index.es-CNBieliG.js +0 -151
  25. package/dist/index.es-CQ3ep412.js +0 -305
  26. package/dist/index.es-CVCp4d0C.js +0 -45
  27. package/dist/index.es-Cct4Uapb.js +0 -1776
  28. package/dist/index.es-Cj9DW-2T.js +0 -430
  29. package/dist/index.es-Cm4X20_S.js +0 -673
  30. package/dist/index.es-InSNsV4f.js +0 -1067
  31. package/dist/index.es-L0ZCcbUf.js +0 -4939
  32. package/dist/tslib.es6-CIXEwqhg.js +0 -72
@@ -1,680 +0,0 @@
1
- import { b, c as I, _ as E, a as v } from "./tslib.es6-CIXEwqhg.js";
2
- /**
3
- * @license
4
- * Copyright 2016 Google Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in
14
- * all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- * THE SOFTWARE.
23
- */
24
- var S = (
25
- /** @class */
26
- function() {
27
- function a(i) {
28
- i === void 0 && (i = {}), this.adapter = i;
29
- }
30
- return Object.defineProperty(a, "cssClasses", {
31
- get: function() {
32
- return {};
33
- },
34
- enumerable: !1,
35
- configurable: !0
36
- }), Object.defineProperty(a, "strings", {
37
- get: function() {
38
- return {};
39
- },
40
- enumerable: !1,
41
- configurable: !0
42
- }), Object.defineProperty(a, "numbers", {
43
- get: function() {
44
- return {};
45
- },
46
- enumerable: !1,
47
- configurable: !0
48
- }), Object.defineProperty(a, "defaultAdapter", {
49
- get: function() {
50
- return {};
51
- },
52
- enumerable: !1,
53
- configurable: !0
54
- }), a.prototype.init = function() {
55
- }, a.prototype.destroy = function() {
56
- }, a;
57
- }()
58
- );
59
- /**
60
- * @license
61
- * Copyright 2016 Google Inc.
62
- *
63
- * Permission is hereby granted, free of charge, to any person obtaining a copy
64
- * of this software and associated documentation files (the "Software"), to deal
65
- * in the Software without restriction, including without limitation the rights
66
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
67
- * copies of the Software, and to permit persons to whom the Software is
68
- * furnished to do so, subject to the following conditions:
69
- *
70
- * The above copyright notice and this permission notice shall be included in
71
- * all copies or substantial portions of the Software.
72
- *
73
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
74
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
75
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
76
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
77
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
78
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
79
- * THE SOFTWARE.
80
- */
81
- var D = (
82
- /** @class */
83
- function() {
84
- function a(i, t) {
85
- for (var e = [], n = 2; n < arguments.length; n++)
86
- e[n - 2] = arguments[n];
87
- this.root = i, this.initialize.apply(this, b([], I(e))), this.foundation = t === void 0 ? this.getDefaultFoundation() : t, this.foundation.init(), this.initialSyncWithDOM();
88
- }
89
- return a.attachTo = function(i) {
90
- return new a(i, new S({}));
91
- }, a.prototype.initialize = function() {
92
- }, a.prototype.getDefaultFoundation = function() {
93
- throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class");
94
- }, a.prototype.initialSyncWithDOM = function() {
95
- }, a.prototype.destroy = function() {
96
- this.foundation.destroy();
97
- }, a.prototype.listen = function(i, t, e) {
98
- this.root.addEventListener(i, t, e);
99
- }, a.prototype.unlisten = function(i, t, e) {
100
- this.root.removeEventListener(i, t, e);
101
- }, a.prototype.emit = function(i, t, e) {
102
- e === void 0 && (e = !1);
103
- var n;
104
- typeof CustomEvent == "function" ? n = new CustomEvent(i, {
105
- bubbles: e,
106
- detail: t
107
- }) : (n = document.createEvent("CustomEvent"), n.initCustomEvent(i, e, !1, t)), this.root.dispatchEvent(n);
108
- }, a;
109
- }()
110
- );
111
- /**
112
- * @license
113
- * Copyright 2018 Google Inc.
114
- *
115
- * Permission is hereby granted, free of charge, to any person obtaining a copy
116
- * of this software and associated documentation files (the "Software"), to deal
117
- * in the Software without restriction, including without limitation the rights
118
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
119
- * copies of the Software, and to permit persons to whom the Software is
120
- * furnished to do so, subject to the following conditions:
121
- *
122
- * The above copyright notice and this permission notice shall be included in
123
- * all copies or substantial portions of the Software.
124
- *
125
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
126
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
127
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
128
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
129
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
130
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
131
- * THE SOFTWARE.
132
- */
133
- function R(a, i) {
134
- if (a.closest)
135
- return a.closest(i);
136
- for (var t = a; t; ) {
137
- if (h(t, i))
138
- return t;
139
- t = t.parentElement;
140
- }
141
- return null;
142
- }
143
- function h(a, i) {
144
- var t = a.matches || a.webkitMatchesSelector || a.msMatchesSelector;
145
- return t.call(a, i);
146
- }
147
- function w(a) {
148
- var i = a;
149
- if (i.offsetParent !== null)
150
- return i.scrollWidth;
151
- var t = i.cloneNode(!0);
152
- t.style.setProperty("position", "absolute"), t.style.setProperty("transform", "translate(-9999px, -9999px)"), document.documentElement.appendChild(t);
153
- var e = t.scrollWidth;
154
- return document.documentElement.removeChild(t), e;
155
- }
156
- const U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
157
- __proto__: null,
158
- closest: R,
159
- estimateScrollWidth: w,
160
- matches: h
161
- }, Symbol.toStringTag, { value: "Module" }));
162
- /**
163
- * @license
164
- * Copyright 2019 Google Inc.
165
- *
166
- * Permission is hereby granted, free of charge, to any person obtaining a copy
167
- * of this software and associated documentation files (the "Software"), to deal
168
- * in the Software without restriction, including without limitation the rights
169
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
170
- * copies of the Software, and to permit persons to whom the Software is
171
- * furnished to do so, subject to the following conditions:
172
- *
173
- * The above copyright notice and this permission notice shall be included in
174
- * all copies or substantial portions of the Software.
175
- *
176
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
177
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
178
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
179
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
180
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
181
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
182
- * THE SOFTWARE.
183
- */
184
- function l(a) {
185
- return a === void 0 && (a = window), F(a) ? { passive: !0 } : !1;
186
- }
187
- function F(a) {
188
- a === void 0 && (a = window);
189
- var i = !1;
190
- try {
191
- var t = {
192
- // This function will be called when the browser
193
- // attempts to access the passive property.
194
- get passive() {
195
- return i = !0, !1;
196
- }
197
- }, e = function() {
198
- };
199
- a.document.addEventListener("test", e, t), a.document.removeEventListener("test", e, t);
200
- } catch {
201
- i = !1;
202
- }
203
- return i;
204
- }
205
- /**
206
- * @license
207
- * Copyright 2016 Google Inc.
208
- *
209
- * Permission is hereby granted, free of charge, to any person obtaining a copy
210
- * of this software and associated documentation files (the "Software"), to deal
211
- * in the Software without restriction, including without limitation the rights
212
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
213
- * copies of the Software, and to permit persons to whom the Software is
214
- * furnished to do so, subject to the following conditions:
215
- *
216
- * The above copyright notice and this permission notice shall be included in
217
- * all copies or substantial portions of the Software.
218
- *
219
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
220
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
221
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
222
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
223
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
224
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
225
- * THE SOFTWARE.
226
- */
227
- var V = {
228
- // Ripple is a special case where the "root" component is really a "mixin" of sorts,
229
- // given that it's an 'upgrade' to an existing component. That being said it is the root
230
- // CSS class that all other CSS classes derive from.
231
- BG_FOCUSED: "mdc-ripple-upgraded--background-focused",
232
- FG_ACTIVATION: "mdc-ripple-upgraded--foreground-activation",
233
- FG_DEACTIVATION: "mdc-ripple-upgraded--foreground-deactivation",
234
- ROOT: "mdc-ripple-upgraded",
235
- UNBOUNDED: "mdc-ripple-upgraded--unbounded"
236
- }, O = {
237
- VAR_FG_SCALE: "--mdc-ripple-fg-scale",
238
- VAR_FG_SIZE: "--mdc-ripple-fg-size",
239
- VAR_FG_TRANSLATE_END: "--mdc-ripple-fg-translate-end",
240
- VAR_FG_TRANSLATE_START: "--mdc-ripple-fg-translate-start",
241
- VAR_LEFT: "--mdc-ripple-left",
242
- VAR_TOP: "--mdc-ripple-top"
243
- }, y = {
244
- DEACTIVATION_TIMEOUT_MS: 225,
245
- FG_DEACTIVATION_MS: 150,
246
- INITIAL_ORIGIN_SCALE: 0.6,
247
- PADDING: 10,
248
- TAP_DELAY_MS: 300
249
- // Delay between touch and simulated mouse events on touch devices
250
- }, f;
251
- function H(a, i) {
252
- i === void 0 && (i = !1);
253
- var t = a.CSS, e = f;
254
- if (typeof f == "boolean" && !i)
255
- return f;
256
- var n = t && typeof t.supports == "function";
257
- if (!n)
258
- return !1;
259
- var r = t.supports("--css-vars", "yes"), s = t.supports("(--css-vars: yes)") && t.supports("color", "#00000000");
260
- return e = r || s, i || (f = e), e;
261
- }
262
- function N(a, i, t) {
263
- if (!a)
264
- return { x: 0, y: 0 };
265
- var e = i.x, n = i.y, r = e + t.left, s = n + t.top, o, u;
266
- if (a.type === "touchstart") {
267
- var c = a;
268
- o = c.changedTouches[0].pageX - r, u = c.changedTouches[0].pageY - s;
269
- } else {
270
- var d = a;
271
- o = d.pageX - r, u = d.pageY - s;
272
- }
273
- return { x: o, y: u };
274
- }
275
- /**
276
- * @license
277
- * Copyright 2016 Google Inc.
278
- *
279
- * Permission is hereby granted, free of charge, to any person obtaining a copy
280
- * of this software and associated documentation files (the "Software"), to deal
281
- * in the Software without restriction, including without limitation the rights
282
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
283
- * copies of the Software, and to permit persons to whom the Software is
284
- * furnished to do so, subject to the following conditions:
285
- *
286
- * The above copyright notice and this permission notice shall be included in
287
- * all copies or substantial portions of the Software.
288
- *
289
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
290
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
291
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
292
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
293
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
294
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
295
- * THE SOFTWARE.
296
- */
297
- var C = [
298
- "touchstart",
299
- "pointerdown",
300
- "mousedown",
301
- "keydown"
302
- ], T = [
303
- "touchend",
304
- "pointerup",
305
- "mouseup",
306
- "contextmenu"
307
- ], p = [], P = (
308
- /** @class */
309
- function(a) {
310
- E(i, a);
311
- function i(t) {
312
- var e = a.call(this, v(v({}, i.defaultAdapter), t)) || this;
313
- return e.activationAnimationHasEnded_ = !1, e.activationTimer_ = 0, e.fgDeactivationRemovalTimer_ = 0, e.fgScale_ = "0", e.frame_ = { width: 0, height: 0 }, e.initialSize_ = 0, e.layoutFrame_ = 0, e.maxRadius_ = 0, e.unboundedCoords_ = { left: 0, top: 0 }, e.activationState_ = e.defaultActivationState_(), e.activationTimerCallback_ = function() {
314
- e.activationAnimationHasEnded_ = !0, e.runDeactivationUXLogicIfReady_();
315
- }, e.activateHandler_ = function(n) {
316
- return e.activate_(n);
317
- }, e.deactivateHandler_ = function() {
318
- return e.deactivate_();
319
- }, e.focusHandler_ = function() {
320
- return e.handleFocus();
321
- }, e.blurHandler_ = function() {
322
- return e.handleBlur();
323
- }, e.resizeHandler_ = function() {
324
- return e.layout();
325
- }, e;
326
- }
327
- return Object.defineProperty(i, "cssClasses", {
328
- get: function() {
329
- return V;
330
- },
331
- enumerable: !1,
332
- configurable: !0
333
- }), Object.defineProperty(i, "strings", {
334
- get: function() {
335
- return O;
336
- },
337
- enumerable: !1,
338
- configurable: !0
339
- }), Object.defineProperty(i, "numbers", {
340
- get: function() {
341
- return y;
342
- },
343
- enumerable: !1,
344
- configurable: !0
345
- }), Object.defineProperty(i, "defaultAdapter", {
346
- get: function() {
347
- return {
348
- addClass: function() {
349
- },
350
- browserSupportsCssVars: function() {
351
- return !0;
352
- },
353
- computeBoundingRect: function() {
354
- return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
355
- },
356
- containsEventTarget: function() {
357
- return !0;
358
- },
359
- deregisterDocumentInteractionHandler: function() {
360
- },
361
- deregisterInteractionHandler: function() {
362
- },
363
- deregisterResizeHandler: function() {
364
- },
365
- getWindowPageOffset: function() {
366
- return { x: 0, y: 0 };
367
- },
368
- isSurfaceActive: function() {
369
- return !0;
370
- },
371
- isSurfaceDisabled: function() {
372
- return !0;
373
- },
374
- isUnbounded: function() {
375
- return !0;
376
- },
377
- registerDocumentInteractionHandler: function() {
378
- },
379
- registerInteractionHandler: function() {
380
- },
381
- registerResizeHandler: function() {
382
- },
383
- removeClass: function() {
384
- },
385
- updateCssVariable: function() {
386
- }
387
- };
388
- },
389
- enumerable: !1,
390
- configurable: !0
391
- }), i.prototype.init = function() {
392
- var t = this, e = this.supportsPressRipple_();
393
- if (this.registerRootHandlers_(e), e) {
394
- var n = i.cssClasses, r = n.ROOT, s = n.UNBOUNDED;
395
- requestAnimationFrame(function() {
396
- t.adapter.addClass(r), t.adapter.isUnbounded() && (t.adapter.addClass(s), t.layoutInternal_());
397
- });
398
- }
399
- }, i.prototype.destroy = function() {
400
- var t = this;
401
- if (this.supportsPressRipple_()) {
402
- this.activationTimer_ && (clearTimeout(this.activationTimer_), this.activationTimer_ = 0, this.adapter.removeClass(i.cssClasses.FG_ACTIVATION)), this.fgDeactivationRemovalTimer_ && (clearTimeout(this.fgDeactivationRemovalTimer_), this.fgDeactivationRemovalTimer_ = 0, this.adapter.removeClass(i.cssClasses.FG_DEACTIVATION));
403
- var e = i.cssClasses, n = e.ROOT, r = e.UNBOUNDED;
404
- requestAnimationFrame(function() {
405
- t.adapter.removeClass(n), t.adapter.removeClass(r), t.removeCssVars_();
406
- });
407
- }
408
- this.deregisterRootHandlers_(), this.deregisterDeactivationHandlers_();
409
- }, i.prototype.activate = function(t) {
410
- this.activate_(t);
411
- }, i.prototype.deactivate = function() {
412
- this.deactivate_();
413
- }, i.prototype.layout = function() {
414
- var t = this;
415
- this.layoutFrame_ && cancelAnimationFrame(this.layoutFrame_), this.layoutFrame_ = requestAnimationFrame(function() {
416
- t.layoutInternal_(), t.layoutFrame_ = 0;
417
- });
418
- }, i.prototype.setUnbounded = function(t) {
419
- var e = i.cssClasses.UNBOUNDED;
420
- t ? this.adapter.addClass(e) : this.adapter.removeClass(e);
421
- }, i.prototype.handleFocus = function() {
422
- var t = this;
423
- requestAnimationFrame(function() {
424
- return t.adapter.addClass(i.cssClasses.BG_FOCUSED);
425
- });
426
- }, i.prototype.handleBlur = function() {
427
- var t = this;
428
- requestAnimationFrame(function() {
429
- return t.adapter.removeClass(i.cssClasses.BG_FOCUSED);
430
- });
431
- }, i.prototype.supportsPressRipple_ = function() {
432
- return this.adapter.browserSupportsCssVars();
433
- }, i.prototype.defaultActivationState_ = function() {
434
- return {
435
- activationEvent: void 0,
436
- hasDeactivationUXRun: !1,
437
- isActivated: !1,
438
- isProgrammatic: !1,
439
- wasActivatedByPointer: !1,
440
- wasElementMadeActive: !1
441
- };
442
- }, i.prototype.registerRootHandlers_ = function(t) {
443
- var e = this;
444
- t && (C.forEach(function(n) {
445
- e.adapter.registerInteractionHandler(n, e.activateHandler_);
446
- }), this.adapter.isUnbounded() && this.adapter.registerResizeHandler(this.resizeHandler_)), this.adapter.registerInteractionHandler("focus", this.focusHandler_), this.adapter.registerInteractionHandler("blur", this.blurHandler_);
447
- }, i.prototype.registerDeactivationHandlers_ = function(t) {
448
- var e = this;
449
- t.type === "keydown" ? this.adapter.registerInteractionHandler("keyup", this.deactivateHandler_) : T.forEach(function(n) {
450
- e.adapter.registerDocumentInteractionHandler(n, e.deactivateHandler_);
451
- });
452
- }, i.prototype.deregisterRootHandlers_ = function() {
453
- var t = this;
454
- C.forEach(function(e) {
455
- t.adapter.deregisterInteractionHandler(e, t.activateHandler_);
456
- }), this.adapter.deregisterInteractionHandler("focus", this.focusHandler_), this.adapter.deregisterInteractionHandler("blur", this.blurHandler_), this.adapter.isUnbounded() && this.adapter.deregisterResizeHandler(this.resizeHandler_);
457
- }, i.prototype.deregisterDeactivationHandlers_ = function() {
458
- var t = this;
459
- this.adapter.deregisterInteractionHandler("keyup", this.deactivateHandler_), T.forEach(function(e) {
460
- t.adapter.deregisterDocumentInteractionHandler(e, t.deactivateHandler_);
461
- });
462
- }, i.prototype.removeCssVars_ = function() {
463
- var t = this, e = i.strings, n = Object.keys(e);
464
- n.forEach(function(r) {
465
- r.indexOf("VAR_") === 0 && t.adapter.updateCssVariable(e[r], null);
466
- });
467
- }, i.prototype.activate_ = function(t) {
468
- var e = this;
469
- if (!this.adapter.isSurfaceDisabled()) {
470
- var n = this.activationState_;
471
- if (!n.isActivated) {
472
- var r = this.previousActivationEvent_, s = r && t !== void 0 && r.type !== t.type;
473
- if (!s) {
474
- n.isActivated = !0, n.isProgrammatic = t === void 0, n.activationEvent = t, n.wasActivatedByPointer = n.isProgrammatic ? !1 : t !== void 0 && (t.type === "mousedown" || t.type === "touchstart" || t.type === "pointerdown");
475
- var o = t !== void 0 && p.length > 0 && p.some(function(u) {
476
- return e.adapter.containsEventTarget(u);
477
- });
478
- if (o) {
479
- this.resetActivationState_();
480
- return;
481
- }
482
- t !== void 0 && (p.push(t.target), this.registerDeactivationHandlers_(t)), n.wasElementMadeActive = this.checkElementMadeActive_(t), n.wasElementMadeActive && this.animateActivation_(), requestAnimationFrame(function() {
483
- p = [], !n.wasElementMadeActive && t !== void 0 && (t.key === " " || t.keyCode === 32) && (n.wasElementMadeActive = e.checkElementMadeActive_(t), n.wasElementMadeActive && e.animateActivation_()), n.wasElementMadeActive || (e.activationState_ = e.defaultActivationState_());
484
- });
485
- }
486
- }
487
- }
488
- }, i.prototype.checkElementMadeActive_ = function(t) {
489
- return t !== void 0 && t.type === "keydown" ? this.adapter.isSurfaceActive() : !0;
490
- }, i.prototype.animateActivation_ = function() {
491
- var t = this, e = i.strings, n = e.VAR_FG_TRANSLATE_START, r = e.VAR_FG_TRANSLATE_END, s = i.cssClasses, o = s.FG_DEACTIVATION, u = s.FG_ACTIVATION, c = i.numbers.DEACTIVATION_TIMEOUT_MS;
492
- this.layoutInternal_();
493
- var d = "", _ = "";
494
- if (!this.adapter.isUnbounded()) {
495
- var m = this.getFgTranslationCoordinates_(), A = m.startPoint, g = m.endPoint;
496
- d = A.x + "px, " + A.y + "px", _ = g.x + "px, " + g.y + "px";
497
- }
498
- this.adapter.updateCssVariable(n, d), this.adapter.updateCssVariable(r, _), clearTimeout(this.activationTimer_), clearTimeout(this.fgDeactivationRemovalTimer_), this.rmBoundedActivationClasses_(), this.adapter.removeClass(o), this.adapter.computeBoundingRect(), this.adapter.addClass(u), this.activationTimer_ = setTimeout(function() {
499
- return t.activationTimerCallback_();
500
- }, c);
501
- }, i.prototype.getFgTranslationCoordinates_ = function() {
502
- var t = this.activationState_, e = t.activationEvent, n = t.wasActivatedByPointer, r;
503
- n ? r = N(e, this.adapter.getWindowPageOffset(), this.adapter.computeBoundingRect()) : r = {
504
- x: this.frame_.width / 2,
505
- y: this.frame_.height / 2
506
- }, r = {
507
- x: r.x - this.initialSize_ / 2,
508
- y: r.y - this.initialSize_ / 2
509
- };
510
- var s = {
511
- x: this.frame_.width / 2 - this.initialSize_ / 2,
512
- y: this.frame_.height / 2 - this.initialSize_ / 2
513
- };
514
- return { startPoint: r, endPoint: s };
515
- }, i.prototype.runDeactivationUXLogicIfReady_ = function() {
516
- var t = this, e = i.cssClasses.FG_DEACTIVATION, n = this.activationState_, r = n.hasDeactivationUXRun, s = n.isActivated, o = r || !s;
517
- o && this.activationAnimationHasEnded_ && (this.rmBoundedActivationClasses_(), this.adapter.addClass(e), this.fgDeactivationRemovalTimer_ = setTimeout(function() {
518
- t.adapter.removeClass(e);
519
- }, y.FG_DEACTIVATION_MS));
520
- }, i.prototype.rmBoundedActivationClasses_ = function() {
521
- var t = i.cssClasses.FG_ACTIVATION;
522
- this.adapter.removeClass(t), this.activationAnimationHasEnded_ = !1, this.adapter.computeBoundingRect();
523
- }, i.prototype.resetActivationState_ = function() {
524
- var t = this;
525
- this.previousActivationEvent_ = this.activationState_.activationEvent, this.activationState_ = this.defaultActivationState_(), setTimeout(function() {
526
- return t.previousActivationEvent_ = void 0;
527
- }, i.numbers.TAP_DELAY_MS);
528
- }, i.prototype.deactivate_ = function() {
529
- var t = this, e = this.activationState_;
530
- if (e.isActivated) {
531
- var n = v({}, e);
532
- e.isProgrammatic ? (requestAnimationFrame(function() {
533
- return t.animateDeactivation_(n);
534
- }), this.resetActivationState_()) : (this.deregisterDeactivationHandlers_(), requestAnimationFrame(function() {
535
- t.activationState_.hasDeactivationUXRun = !0, t.animateDeactivation_(n), t.resetActivationState_();
536
- }));
537
- }
538
- }, i.prototype.animateDeactivation_ = function(t) {
539
- var e = t.wasActivatedByPointer, n = t.wasElementMadeActive;
540
- (e || n) && this.runDeactivationUXLogicIfReady_();
541
- }, i.prototype.layoutInternal_ = function() {
542
- var t = this;
543
- this.frame_ = this.adapter.computeBoundingRect();
544
- var e = Math.max(this.frame_.height, this.frame_.width), n = function() {
545
- var s = Math.sqrt(Math.pow(t.frame_.width, 2) + Math.pow(t.frame_.height, 2));
546
- return s + i.numbers.PADDING;
547
- };
548
- this.maxRadius_ = this.adapter.isUnbounded() ? e : n();
549
- var r = Math.floor(e * i.numbers.INITIAL_ORIGIN_SCALE);
550
- this.adapter.isUnbounded() && r % 2 !== 0 ? this.initialSize_ = r - 1 : this.initialSize_ = r, this.fgScale_ = "" + this.maxRadius_ / this.initialSize_, this.updateLayoutCssVars_();
551
- }, i.prototype.updateLayoutCssVars_ = function() {
552
- var t = i.strings, e = t.VAR_FG_SIZE, n = t.VAR_LEFT, r = t.VAR_TOP, s = t.VAR_FG_SCALE;
553
- this.adapter.updateCssVariable(e, this.initialSize_ + "px"), this.adapter.updateCssVariable(s, this.fgScale_), this.adapter.isUnbounded() && (this.unboundedCoords_ = {
554
- left: Math.round(this.frame_.width / 2 - this.initialSize_ / 2),
555
- top: Math.round(this.frame_.height / 2 - this.initialSize_ / 2)
556
- }, this.adapter.updateCssVariable(n, this.unboundedCoords_.left + "px"), this.adapter.updateCssVariable(r, this.unboundedCoords_.top + "px"));
557
- }, i;
558
- }(S)
559
- );
560
- /**
561
- * @license
562
- * Copyright 2016 Google Inc.
563
- *
564
- * Permission is hereby granted, free of charge, to any person obtaining a copy
565
- * of this software and associated documentation files (the "Software"), to deal
566
- * in the Software without restriction, including without limitation the rights
567
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
568
- * copies of the Software, and to permit persons to whom the Software is
569
- * furnished to do so, subject to the following conditions:
570
- *
571
- * The above copyright notice and this permission notice shall be included in
572
- * all copies or substantial portions of the Software.
573
- *
574
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
575
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
576
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
577
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
578
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
579
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
580
- * THE SOFTWARE.
581
- */
582
- var L = (
583
- /** @class */
584
- function(a) {
585
- E(i, a);
586
- function i() {
587
- var t = a !== null && a.apply(this, arguments) || this;
588
- return t.disabled = !1, t;
589
- }
590
- return i.attachTo = function(t, e) {
591
- e === void 0 && (e = { isUnbounded: void 0 });
592
- var n = new i(t);
593
- return e.isUnbounded !== void 0 && (n.unbounded = e.isUnbounded), n;
594
- }, i.createAdapter = function(t) {
595
- return {
596
- addClass: function(e) {
597
- return t.root.classList.add(e);
598
- },
599
- browserSupportsCssVars: function() {
600
- return H(window);
601
- },
602
- computeBoundingRect: function() {
603
- return t.root.getBoundingClientRect();
604
- },
605
- containsEventTarget: function(e) {
606
- return t.root.contains(e);
607
- },
608
- deregisterDocumentInteractionHandler: function(e, n) {
609
- return document.documentElement.removeEventListener(e, n, l());
610
- },
611
- deregisterInteractionHandler: function(e, n) {
612
- return t.root.removeEventListener(e, n, l());
613
- },
614
- deregisterResizeHandler: function(e) {
615
- return window.removeEventListener("resize", e);
616
- },
617
- getWindowPageOffset: function() {
618
- return { x: window.pageXOffset, y: window.pageYOffset };
619
- },
620
- isSurfaceActive: function() {
621
- return h(t.root, ":active");
622
- },
623
- isSurfaceDisabled: function() {
624
- return !!t.disabled;
625
- },
626
- isUnbounded: function() {
627
- return !!t.unbounded;
628
- },
629
- registerDocumentInteractionHandler: function(e, n) {
630
- return document.documentElement.addEventListener(e, n, l());
631
- },
632
- registerInteractionHandler: function(e, n) {
633
- return t.root.addEventListener(e, n, l());
634
- },
635
- registerResizeHandler: function(e) {
636
- return window.addEventListener("resize", e);
637
- },
638
- removeClass: function(e) {
639
- return t.root.classList.remove(e);
640
- },
641
- updateCssVariable: function(e, n) {
642
- return t.root.style.setProperty(e, n);
643
- }
644
- };
645
- }, Object.defineProperty(i.prototype, "unbounded", {
646
- get: function() {
647
- return !!this.unbounded_;
648
- },
649
- set: function(t) {
650
- this.unbounded_ = !!t, this.setUnbounded_();
651
- },
652
- enumerable: !1,
653
- configurable: !0
654
- }), i.prototype.activate = function() {
655
- this.foundation.activate();
656
- }, i.prototype.deactivate = function() {
657
- this.foundation.deactivate();
658
- }, i.prototype.layout = function() {
659
- this.foundation.layout();
660
- }, i.prototype.getDefaultFoundation = function() {
661
- return new P(i.createAdapter(this));
662
- }, i.prototype.initialSyncWithDOM = function() {
663
- var t = this.root;
664
- this.unbounded = "mdcRippleIsUnbounded" in t.dataset;
665
- }, i.prototype.setUnbounded_ = function() {
666
- this.foundation.setUnbounded(!!this.unbounded_);
667
- }, i;
668
- }(D)
669
- );
670
- export {
671
- L as M,
672
- S as a,
673
- D as b,
674
- R as c,
675
- l as d,
676
- w as e,
677
- P as f,
678
- h as m,
679
- U as p
680
- };