@fluid-topics/ft-ripple 0.3.12 → 0.3.14

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.
@@ -0,0 +1,18 @@
1
+ export declare const FtRippleCssVariables: {
2
+ color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
3
+ backgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
4
+ opacityContentOnSurfacePressed: import("@fluid-topics/ft-wc-utils").FtCssVariable;
5
+ opacityContentOnSurfaceHover: import("@fluid-topics/ft-wc-utils").FtCssVariable;
6
+ opacityContentOnSurfaceFocused: import("@fluid-topics/ft-wc-utils").FtCssVariable;
7
+ opacityContentOnSurfaceSelected: import("@fluid-topics/ft-wc-utils").FtCssVariable;
8
+ };
9
+ export declare const FtRipplePrimaryCssVariables: {
10
+ color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
11
+ backgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
12
+ };
13
+ export declare const FtRippleSecondaryCssVariables: {
14
+ color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
15
+ backgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
16
+ };
17
+ export declare const styles: import("lit").CSSResult;
18
+ //# sourceMappingURL=ft-ripple.css.d.ts.map
@@ -0,0 +1,113 @@
1
+ import { css } from "lit";
2
+ import { designSystemVariables, FtCssVariableFactory } from "@fluid-topics/ft-wc-utils";
3
+ const colorCssVar = FtCssVariableFactory.extend("--ft-ripple-color", designSystemVariables.colorContent);
4
+ export const FtRippleCssVariables = {
5
+ color: colorCssVar,
6
+ backgroundColor: FtCssVariableFactory.extend("--ft-ripple-background-color", colorCssVar),
7
+ opacityContentOnSurfacePressed: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfacePressed, "Design system"),
8
+ opacityContentOnSurfaceHover: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfaceHover, "Design system"),
9
+ opacityContentOnSurfaceFocused: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfaceFocused, "Design system"),
10
+ opacityContentOnSurfaceSelected: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfaceSelected, "Design system"),
11
+ };
12
+ const primaryColorCssVar = FtCssVariableFactory.extend("--ft-ripple-color", designSystemVariables.colorPrimary);
13
+ export const FtRipplePrimaryCssVariables = {
14
+ color: primaryColorCssVar,
15
+ backgroundColor: FtCssVariableFactory.extend("--ft-ripple-background-color", primaryColorCssVar),
16
+ };
17
+ const secondaryColorCssVar = FtCssVariableFactory.extend("--ft-ripple-color", designSystemVariables.colorSecondary);
18
+ export const FtRippleSecondaryCssVariables = {
19
+ color: secondaryColorCssVar,
20
+ backgroundColor: FtCssVariableFactory.extend("--ft-ripple-background-color", secondaryColorCssVar),
21
+ };
22
+ //language=css
23
+ export const styles = css `
24
+ :host {
25
+ display: contents;
26
+ }
27
+
28
+ .ft-ripple {
29
+ position: absolute;
30
+ inset: 0;
31
+ pointer-events: none;
32
+ }
33
+
34
+ .ft-ripple:not(.ft-ripple--unbounded) {
35
+ overflow: hidden;
36
+ }
37
+
38
+ .ft-ripple .ft-ripple--background,
39
+ .ft-ripple .ft-ripple--effect {
40
+ position: absolute;
41
+ opacity: 0;
42
+ }
43
+
44
+ .ft-ripple .ft-ripple--background {
45
+ background-color: ${FtRippleCssVariables.backgroundColor};
46
+ }
47
+
48
+ .ft-ripple .ft-ripple--effect {
49
+ background-color: ${FtRippleCssVariables.color};
50
+ }
51
+
52
+ .ft-ripple.ft-ripple--secondary .ft-ripple--background {
53
+ background-color: ${FtRippleSecondaryCssVariables.backgroundColor};
54
+ }
55
+
56
+ .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
57
+ background-color: ${FtRippleSecondaryCssVariables.color};
58
+ }
59
+
60
+ .ft-ripple.ft-ripple--primary .ft-ripple--background {
61
+ background-color: ${FtRipplePrimaryCssVariables.backgroundColor};
62
+ }
63
+
64
+ .ft-ripple.ft-ripple--primary .ft-ripple--effect {
65
+ background-color: ${FtRipplePrimaryCssVariables.color};
66
+ }
67
+
68
+ .ft-ripple .ft-ripple--background {
69
+ top: 0;
70
+ left: 0;
71
+ height: 100%;
72
+ width: 100%;
73
+ transition: opacity 75ms linear;
74
+ }
75
+
76
+ .ft-ripple .ft-ripple--effect,
77
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
78
+ border-radius: 50%;
79
+ }
80
+
81
+ .ft-ripple .ft-ripple--effect {
82
+ transform: translate(-50%, -50%) scale(0.15);
83
+ transition: transform 300ms ease, opacity 75ms linear;
84
+ }
85
+
86
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
87
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
88
+ left: 50%;
89
+ top: 50%;
90
+ }
91
+
92
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
93
+ transform: translate(-50%, -50%);
94
+ }
95
+
96
+ .ft-ripple.ft-ripple--hovered .ft-ripple--background {
97
+ opacity: ${FtRippleCssVariables.opacityContentOnSurfaceHover};
98
+ }
99
+
100
+ .ft-ripple.ft-ripple--selected .ft-ripple--background {
101
+ opacity: ${FtRippleCssVariables.opacityContentOnSurfaceSelected};
102
+ }
103
+
104
+ .ft-ripple.ft-ripple--focused .ft-ripple--background {
105
+ opacity: ${FtRippleCssVariables.opacityContentOnSurfaceFocused};
106
+ }
107
+
108
+ .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
109
+ opacity: ${FtRippleCssVariables.opacityContentOnSurfacePressed};
110
+ transform: translate(-50%, -50%) scale(1);
111
+ }
112
+ `;
113
+ //# sourceMappingURL=ft-ripple.css.js.map
@@ -1,20 +1,6 @@
1
1
  import { PropertyValues } from "lit";
2
2
  import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
3
- export interface FtRippleProperties {
4
- primary: boolean;
5
- secondary: boolean;
6
- unbounded: boolean;
7
- selected: boolean;
8
- disabled: boolean;
9
- }
10
- export declare const FtRippleCssVariables: {
11
- color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
12
- backgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
13
- opacityContentOnSurfacePressed: import("@fluid-topics/ft-wc-utils").FtCssVariable;
14
- opacityContentOnSurfaceHover: import("@fluid-topics/ft-wc-utils").FtCssVariable;
15
- opacityContentOnSurfaceFocused: import("@fluid-topics/ft-wc-utils").FtCssVariable;
16
- opacityContentOnSurfaceSelected: import("@fluid-topics/ft-wc-utils").FtCssVariable;
17
- };
3
+ import { FtRippleProperties } from "./ft-ripple.properties";
18
4
  export declare class FtRipple extends FtLitElement implements FtRippleProperties {
19
5
  static elementDefinitions: ElementDefinitionsMap;
20
6
  primary: boolean;
@@ -4,29 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { css, html, } from "lit";
7
+ import { html, } from "lit";
8
8
  import { property, query, state } from "lit/decorators.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
10
- import { Debouncer, designSystemVariables, FtCssVariableFactory, FtLitElement } from "@fluid-topics/ft-wc-utils";
11
- const colorCssVar = FtCssVariableFactory.extend("--ft-ripple-color", designSystemVariables.colorContent);
12
- export const FtRippleCssVariables = {
13
- color: colorCssVar,
14
- backgroundColor: FtCssVariableFactory.extend("--ft-ripple-background-color", colorCssVar),
15
- opacityContentOnSurfacePressed: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfacePressed, "Design system"),
16
- opacityContentOnSurfaceHover: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfaceHover, "Design system"),
17
- opacityContentOnSurfaceFocused: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfaceFocused, "Design system"),
18
- opacityContentOnSurfaceSelected: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfaceSelected, "Design system"),
19
- };
20
- const primaryColorCssVar = FtCssVariableFactory.extend("--ft-ripple-color", designSystemVariables.colorPrimary);
21
- const FtRipplePrimaryCssVariables = {
22
- color: primaryColorCssVar,
23
- backgroundColor: FtCssVariableFactory.extend("--ft-ripple-background-color", primaryColorCssVar),
24
- };
25
- const secondaryColorCssVar = FtCssVariableFactory.extend("--ft-ripple-color", designSystemVariables.colorSecondary);
26
- const FtRippleSecondaryCssVariables = {
27
- color: secondaryColorCssVar,
28
- backgroundColor: FtCssVariableFactory.extend("--ft-ripple-background-color", secondaryColorCssVar),
29
- };
10
+ import { Debouncer, FtLitElement } from "@fluid-topics/ft-wc-utils";
11
+ import { styles } from "./ft-ripple.css";
30
12
  export class FtRipple extends FtLitElement {
31
13
  constructor() {
32
14
  super(...arguments);
@@ -245,97 +227,7 @@ export class FtRipple extends FtLitElement {
245
227
  }
246
228
  }
247
229
  FtRipple.elementDefinitions = {};
248
- //language=css
249
- FtRipple.styles = css `
250
- :host {
251
- display: contents;
252
- }
253
-
254
- .ft-ripple {
255
- position: absolute;
256
- inset: 0;
257
- pointer-events: none;
258
- }
259
-
260
- .ft-ripple:not(.ft-ripple--unbounded) {
261
- overflow: hidden;
262
- }
263
-
264
- .ft-ripple .ft-ripple--background,
265
- .ft-ripple .ft-ripple--effect {
266
- position: absolute;
267
- opacity: 0;
268
- }
269
-
270
- .ft-ripple .ft-ripple--background {
271
- background-color: ${FtRippleCssVariables.backgroundColor};
272
- }
273
-
274
- .ft-ripple .ft-ripple--effect {
275
- background-color: ${FtRippleCssVariables.color};
276
- }
277
-
278
- .ft-ripple.ft-ripple--secondary .ft-ripple--background {
279
- background-color: ${FtRippleSecondaryCssVariables.backgroundColor};
280
- }
281
-
282
- .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
283
- background-color: ${FtRippleSecondaryCssVariables.color};
284
- }
285
-
286
- .ft-ripple.ft-ripple--primary .ft-ripple--background {
287
- background-color: ${FtRipplePrimaryCssVariables.backgroundColor};
288
- }
289
-
290
- .ft-ripple.ft-ripple--primary .ft-ripple--effect {
291
- background-color: ${FtRipplePrimaryCssVariables.color};
292
- }
293
-
294
- .ft-ripple .ft-ripple--background {
295
- top: 0;
296
- left: 0;
297
- height: 100%;
298
- width: 100%;
299
- transition: opacity 75ms linear;
300
- }
301
-
302
- .ft-ripple .ft-ripple--effect,
303
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
304
- border-radius: 50%;
305
- }
306
-
307
- .ft-ripple .ft-ripple--effect {
308
- transform: translate(-50%, -50%) scale(0.15);
309
- transition: transform 300ms ease, opacity 75ms linear;
310
- }
311
-
312
- .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
313
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
314
- left: 50%;
315
- top: 50%;
316
- }
317
-
318
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
319
- transform: translate(-50%, -50%);
320
- }
321
-
322
- .ft-ripple.ft-ripple--hovered .ft-ripple--background {
323
- opacity: ${FtRippleCssVariables.opacityContentOnSurfaceHover};
324
- }
325
-
326
- .ft-ripple.ft-ripple--selected .ft-ripple--background {
327
- opacity: ${FtRippleCssVariables.opacityContentOnSurfaceSelected};
328
- }
329
-
330
- .ft-ripple.ft-ripple--focused .ft-ripple--background {
331
- opacity: ${FtRippleCssVariables.opacityContentOnSurfaceFocused};
332
- }
333
-
334
- .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
335
- opacity: ${FtRippleCssVariables.opacityContentOnSurfacePressed};
336
- transform: translate(-50%, -50%) scale(1);
337
- }
338
- `;
230
+ FtRipple.styles = styles;
339
231
  __decorate([
340
232
  property({ type: Boolean })
341
233
  ], FtRipple.prototype, "primary", void 0);
@@ -1,4 +1,93 @@
1
- !function(t,i,e,s,r){var p=function(t,i,e,s){for(var r,p=arguments.length,o=p<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(p<3?r(o):p>3?r(i,e,o):r(i,e))||o);return p>3&&o&&Object.defineProperty(i,e,o),o};const o=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),l={color:o,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",o),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},n=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),f=n,h=i.FtCssVariableFactory.extend("--ft-ripple-background-color",n),a=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),d=a,c=i.FtCssVariableFactory.extend("--ft-ripple-background-color",a);class u extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:s,y:r}=this.getCoordinates(t),p=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=s?s-p.x:p.width/2),this.originY=Math.round(null!=r?r-p.y:p.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
1
+ !function(t,i,e,s,r){const p=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),o={color:p,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",p),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},l=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),n={color:l,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",l)},f=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),h={color:f,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",f)},a=e.css`
2
+ :host {
3
+ display: contents;
4
+ }
5
+
6
+ .ft-ripple {
7
+ position: absolute;
8
+ inset: 0;
9
+ pointer-events: none;
10
+ }
11
+
12
+ .ft-ripple:not(.ft-ripple--unbounded) {
13
+ overflow: hidden;
14
+ }
15
+
16
+ .ft-ripple .ft-ripple--background,
17
+ .ft-ripple .ft-ripple--effect {
18
+ position: absolute;
19
+ opacity: 0;
20
+ }
21
+
22
+ .ft-ripple .ft-ripple--background {
23
+ background-color: ${o.backgroundColor};
24
+ }
25
+
26
+ .ft-ripple .ft-ripple--effect {
27
+ background-color: ${o.color};
28
+ }
29
+
30
+ .ft-ripple.ft-ripple--secondary .ft-ripple--background {
31
+ background-color: ${h.backgroundColor};
32
+ }
33
+
34
+ .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
35
+ background-color: ${h.color};
36
+ }
37
+
38
+ .ft-ripple.ft-ripple--primary .ft-ripple--background {
39
+ background-color: ${n.backgroundColor};
40
+ }
41
+
42
+ .ft-ripple.ft-ripple--primary .ft-ripple--effect {
43
+ background-color: ${n.color};
44
+ }
45
+
46
+ .ft-ripple .ft-ripple--background {
47
+ top: 0;
48
+ left: 0;
49
+ height: 100%;
50
+ width: 100%;
51
+ transition: opacity 75ms linear;
52
+ }
53
+
54
+ .ft-ripple .ft-ripple--effect,
55
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
56
+ border-radius: 50%;
57
+ }
58
+
59
+ .ft-ripple .ft-ripple--effect {
60
+ transform: translate(-50%, -50%) scale(0.15);
61
+ transition: transform 300ms ease, opacity 75ms linear;
62
+ }
63
+
64
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
65
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
66
+ left: 50%;
67
+ top: 50%;
68
+ }
69
+
70
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
71
+ transform: translate(-50%, -50%);
72
+ }
73
+
74
+ .ft-ripple.ft-ripple--hovered .ft-ripple--background {
75
+ opacity: ${o.opacityContentOnSurfaceHover};
76
+ }
77
+
78
+ .ft-ripple.ft-ripple--selected .ft-ripple--background {
79
+ opacity: ${o.opacityContentOnSurfaceSelected};
80
+ }
81
+
82
+ .ft-ripple.ft-ripple--focused .ft-ripple--background {
83
+ opacity: ${o.opacityContentOnSurfaceFocused};
84
+ }
85
+
86
+ .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
87
+ opacity: ${o.opacityContentOnSurfacePressed};
88
+ transform: translate(-50%, -50%) scale(1);
89
+ }
90
+ `;var d=function(t,i,e,s){for(var r,p=arguments.length,o=p<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(p<3?r(o):p>3?r(i,e,o):r(i,e))||o);return p>3&&o&&Object.defineProperty(i,e,o),o};class c extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:s,y:r}=this.getCoordinates(t),p=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=s?s-p.x:p.width/2),this.originY=Math.round(null!=r?r-p.y:p.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
2
91
  <style>
3
92
  .ft-ripple .ft-ripple--effect,
4
93
  .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
@@ -15,93 +104,4 @@
15
104
  <div class="ft-ripple--background"></div>
16
105
  <div class="ft-ripple--effect"></div>
17
106
  </div>
18
- `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),s=i("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",s),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",s),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let s,r;return null!=i.x?({x:s,y:r}=i):null!=e.touches&&(s=e.touches[0].clientX,r=e.touches[0].clientY),{x:s,y:r}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}u.elementDefinitions={},u.styles=e.css`
19
- :host {
20
- display: contents;
21
- }
22
-
23
- .ft-ripple {
24
- position: absolute;
25
- inset: 0;
26
- pointer-events: none;
27
- }
28
-
29
- .ft-ripple:not(.ft-ripple--unbounded) {
30
- overflow: hidden;
31
- }
32
-
33
- .ft-ripple .ft-ripple--background,
34
- .ft-ripple .ft-ripple--effect {
35
- position: absolute;
36
- opacity: 0;
37
- }
38
-
39
- .ft-ripple .ft-ripple--background {
40
- background-color: ${l.backgroundColor};
41
- }
42
-
43
- .ft-ripple .ft-ripple--effect {
44
- background-color: ${l.color};
45
- }
46
-
47
- .ft-ripple.ft-ripple--secondary .ft-ripple--background {
48
- background-color: ${c};
49
- }
50
-
51
- .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
52
- background-color: ${d};
53
- }
54
-
55
- .ft-ripple.ft-ripple--primary .ft-ripple--background {
56
- background-color: ${h};
57
- }
58
-
59
- .ft-ripple.ft-ripple--primary .ft-ripple--effect {
60
- background-color: ${f};
61
- }
62
-
63
- .ft-ripple .ft-ripple--background {
64
- top: 0;
65
- left: 0;
66
- height: 100%;
67
- width: 100%;
68
- transition: opacity 75ms linear;
69
- }
70
-
71
- .ft-ripple .ft-ripple--effect,
72
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
73
- border-radius: 50%;
74
- }
75
-
76
- .ft-ripple .ft-ripple--effect {
77
- transform: translate(-50%, -50%) scale(0.15);
78
- transition: transform 300ms ease, opacity 75ms linear;
79
- }
80
-
81
- .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
82
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
83
- left: 50%;
84
- top: 50%;
85
- }
86
-
87
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
88
- transform: translate(-50%, -50%);
89
- }
90
-
91
- .ft-ripple.ft-ripple--hovered .ft-ripple--background {
92
- opacity: ${l.opacityContentOnSurfaceHover};
93
- }
94
-
95
- .ft-ripple.ft-ripple--selected .ft-ripple--background {
96
- opacity: ${l.opacityContentOnSurfaceSelected};
97
- }
98
-
99
- .ft-ripple.ft-ripple--focused .ft-ripple--background {
100
- opacity: ${l.opacityContentOnSurfaceFocused};
101
- }
102
-
103
- .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
104
- opacity: ${l.opacityContentOnSurfacePressed};
105
- transform: translate(-50%, -50%) scale(1);
106
- }
107
- `,p([s.property({type:Boolean})],u.prototype,"primary",void 0),p([s.property({type:Boolean})],u.prototype,"secondary",void 0),p([s.property({type:Boolean})],u.prototype,"unbounded",void 0),p([s.property({type:Boolean})],u.prototype,"activated",void 0),p([s.property({type:Boolean})],u.prototype,"selected",void 0),p([s.property({type:Boolean})],u.prototype,"disabled",void 0),p([s.state()],u.prototype,"hovered",void 0),p([s.state()],u.prototype,"focused",void 0),p([s.state()],u.prototype,"pressed",void 0),p([s.state()],u.prototype,"rippling",void 0),p([s.state()],u.prototype,"rippleSize",void 0),p([s.state()],u.prototype,"originX",void 0),p([s.state()],u.prototype,"originY",void 0),p([s.query(".ft-ripple")],u.prototype,"ripple",void 0),p([s.query(".ft-ripple--effect")],u.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(u),t.FtRipple=u,t.FtRippleCssVariables=l,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
107
+ `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),s=i("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",s),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",s),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let s,r;return null!=i.x?({x:s,y:r}=i):null!=e.touches&&(s=e.touches[0].clientX,r=e.touches[0].clientY),{x:s,y:r}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}c.elementDefinitions={},c.styles=a,d([s.property({type:Boolean})],c.prototype,"primary",void 0),d([s.property({type:Boolean})],c.prototype,"secondary",void 0),d([s.property({type:Boolean})],c.prototype,"unbounded",void 0),d([s.property({type:Boolean})],c.prototype,"activated",void 0),d([s.property({type:Boolean})],c.prototype,"selected",void 0),d([s.property({type:Boolean})],c.prototype,"disabled",void 0),d([s.state()],c.prototype,"hovered",void 0),d([s.state()],c.prototype,"focused",void 0),d([s.state()],c.prototype,"pressed",void 0),d([s.state()],c.prototype,"rippling",void 0),d([s.state()],c.prototype,"rippleSize",void 0),d([s.state()],c.prototype,"originX",void 0),d([s.state()],c.prototype,"originY",void 0),d([s.query(".ft-ripple")],c.prototype,"ripple",void 0),d([s.query(".ft-ripple--effect")],c.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(c),t.FtRipple=c,t.FtRippleCssVariables=o,t.FtRipplePrimaryCssVariables=n,t.FtRippleSecondaryCssVariables=h,t.styles=a,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
16
16
  */
17
- if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,s=window.customElements,o=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,o){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(o))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=o.prototype.attributeChangedCallback,a=new Set(o.observedAttributes||[]);u(o,a,l);const c={elementClass:o,connectedCallback:o.prototype.connectedCallback,disconnectedCallback:o.prototype.disconnectedCallback,adoptedCallback:o.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:o.formAssociated,formAssociatedCallback:o.prototype.formAssociatedCallback,formDisabledCallback:o.prototype.formDisabledCallback,formResetCallback:o.prototype.formResetCallback,formStateRestoreCallback:o.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(o,c);let h=e.call(s,t);h||(h=p(t),i.call(s,t,h)),this===window.customElements&&(n.set(o,c),c.standInClass=h);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),f(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(o),this._whenDefinedPromises.delete(t)),o}upgrade(){y.push(this),s.upgrade.apply(s,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let s=this._awaitingUpgrade.get(i);s||this._awaitingUpgrade.set(i,s=new Set),e?s.add(t):s.delete(t)}},window.HTMLElement=function(){let i=a;if(i)return a=void 0,i;const e=n.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),o.set(i,e),i},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let i=t.getRootNode();if(!c(i)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),c(i)||(i=l.get(i)?.getRootNode()||document)}return i.customElements},p=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const s=h(e)||window.customElements,o=s._getDefinition(i);return o?f(e,o):r.set(e,s),e}connectedCallback(){const t=o.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=o.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){o.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=o.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=o.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=o.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=o.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},u=(t,i,e)=>{if(0===i.size||void 0===e)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,o){const r=t.toLowerCase();if(i.has(r)){const t=this.getAttribute(r);s.call(this,r,o),e.call(this,r,t,o)}else s.call(this,r,o)});const o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);o.call(this,s),e.call(this,s,t,null)}else o.call(this,s)})},d=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):d(e)},f=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),o.set(t,i),a=t;try{new i.elementClass}catch(t){d(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let y=[document];const b=(t,i,e)=>{const s=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){y.push(this);const t=s.apply(e||this,arguments);return void 0!==t&&l.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){y.push(this),e.set.call(this,t),y.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const s=i.call(this,...e);return t.set(s,this),s},e.forEach((i=>{const e=window.ElementInternals.prototype,s=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==o.get(e).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...i)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const i=new Map;t.forEach(((t,e)=>{const s=t.getAttribute("name"),o=i.get(s)||[];this[+e]=t,o.push(t),i.set(s,o)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new s(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),i=[];for(const e of t){const t=o.get(e);t&&!0!==t.formAssociated||i.push(e)}return new r(i)}})}}try{window.customElements.define("custom-element",null)}catch(t){const i=window.customElements.define;window.customElements.define=(t,e,s)=>{try{i.bind(window.customElements)(t,e,s)}catch(i){console.warn(t,e,s,i)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){this.callbacks=[t],this.debounce(i)}queue(t,i){this.callbacks.push(t),this.debounce(i)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
17
+ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,s=window.customElements,o=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,o){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(o))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=o.prototype.attributeChangedCallback,a=new Set(o.observedAttributes||[]);u(o,a,l);const c={elementClass:o,connectedCallback:o.prototype.connectedCallback,disconnectedCallback:o.prototype.disconnectedCallback,adoptedCallback:o.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:o.formAssociated,formAssociatedCallback:o.prototype.formAssociatedCallback,formDisabledCallback:o.prototype.formDisabledCallback,formResetCallback:o.prototype.formResetCallback,formStateRestoreCallback:o.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(o,c);let h=e.call(s,t);h||(h=p(t),i.call(s,t,h)),this===window.customElements&&(n.set(o,c),c.standInClass=h);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),f(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(o),this._whenDefinedPromises.delete(t)),o}upgrade(){b.push(this),s.upgrade.apply(s,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let s=this._awaitingUpgrade.get(i);s||this._awaitingUpgrade.set(i,s=new Set),e?s.add(t):s.delete(t)}},window.HTMLElement=function(){let i=a;if(i)return a=void 0,i;const e=n.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),o.set(i,e),i},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let i=t.getRootNode();if(!c(i)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),c(i)||(i=l.get(i)?.getRootNode()||document)}return i.customElements},p=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const s=h(e)||window.customElements,o=s._getDefinition(i);return o?f(e,o):r.set(e,s),e}connectedCallback(){const t=o.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=o.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){o.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=o.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=o.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=o.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=o.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},u=(t,i,e)=>{if(0===i.size||void 0===e)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,o){const r=t.toLowerCase();if(i.has(r)){const t=this.getAttribute(r);s.call(this,r,o),e.call(this,r,t,o)}else s.call(this,r,o)});const o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);o.call(this,s),e.call(this,s,t,null)}else o.call(this,s)})},d=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):d(e)},f=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),o.set(t,i),a=t;try{new i.elementClass}catch(t){d(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let b=[document];const y=(t,i,e)=>{const s=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){b.push(this);const t=s.apply(e||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};y(ShadowRoot,"createElement",document),y(ShadowRoot,"importNode",document),y(Element,"insertAdjacentHTML");const m=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){b.push(this),e.set.call(this,t),b.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const s=i.call(this,...e);return t.set(s,this),s},e.forEach((i=>{const e=window.ElementInternals.prototype,s=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==o.get(e).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...i)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const i=new Map;t.forEach(((t,e)=>{const s=t.getAttribute("name"),o=i.get(s)||[];this[+e]=t,o.push(t),i.set(s,o)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new s(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),i=[];for(const e of t){const t=o.get(e);t&&!0!==t.formAssociated||i.push(e)}return new r(i)}})}}try{window.customElements.define("custom-element",null)}catch(t){const i=window.customElements.define;window.customElements.define=(t,e,s)=>{try{i.bind(window.customElements)(t,e,s)}catch(i){console.warn(t,e,s,i)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){this.callbacks=[t],this.debounce(i)}queue(t,i){this.callbacks.push(t),this.debounce(i)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
@@ -51,7 +51,7 @@ const l=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShad
51
51
  * @license
52
52
  * Copyright 2017 Google LLC
53
53
  * SPDX-License-Identifier: BSD-3-Clause
54
- */;var v;const y=window.trustedTypes,b=y?y.emptyScript:"",m=window.reactiveElementPolyfillSupport,g={toAttribute(t,i){switch(i){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},x=(t,i)=>i!==t&&(i==i||t==t),w={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:x};class O extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var i;null!==(i=this.h)&&void 0!==i||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const s=this._$Ep(e,i);void 0!==s&&(this._$Ev.set(s,e),t.push(s))})),t}static createProperty(t,i=w){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const o=this[t];this[i]=s,this.requestUpdate(t,o,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||w}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(f(t))}else void 0!==t&&i.push(f(t));return i}static _$Ep(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return d(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$EO(t,i,e=w){var s,o;const r=this.constructor._$Ep(t,e);if(void 0!==r&&!0===e.reflect){const n=(null!==(o=null===(s=e.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==o?o:g.toAttribute)(i,e.type);this._$El=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,i){var e,s;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),n=t.converter,l=null!==(s=null!==(e=null==n?void 0:n.fromAttribute)&&void 0!==e?e:"function"==typeof n?n:null)&&void 0!==s?s:g.fromAttribute;this._$El=r,this[r]=l(i,t.type),this._$El=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||x)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
54
+ */;var v;const b=window.trustedTypes,y=b?b.emptyScript:"",m=window.reactiveElementPolyfillSupport,g={toAttribute(t,i){switch(i){case Boolean:t=t?y:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},x=(t,i)=>i!==t&&(i==i||t==t),w={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:x};class O extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var i;null!==(i=this.h)&&void 0!==i||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const s=this._$Ep(e,i);void 0!==s&&(this._$Ev.set(s,e),t.push(s))})),t}static createProperty(t,i=w){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const o=this[t];this[i]=s,this.requestUpdate(t,o,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||w}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(f(t))}else void 0!==t&&i.push(f(t));return i}static _$Ep(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return d(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$EO(t,i,e=w){var s,o;const r=this.constructor._$Ep(t,e);if(void 0!==r&&!0===e.reflect){const n=(null!==(o=null===(s=e.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==o?o:g.toAttribute)(i,e.type);this._$El=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,i){var e,s;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),n=t.converter,l=null!==(s=null!==(e=null==n?void 0:n.fromAttribute)&&void 0!==e?e:"function"==typeof n?n:null)&&void 0!==s?s:g.fromAttribute;this._$El=r,this[r]=l(i,t.type),this._$El=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||x)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
55
55
  /**
56
56
  * @license
57
57
  * Copyright 2017 Google LLC
@@ -94,7 +94,96 @@ const dt=1;
94
94
  * Copyright 2018 Google LLC
95
95
  * SPDX-License-Identifier: BSD-3-Clause
96
96
  */
97
- const ft=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==dt||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var e,s;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(e=this.st)||void 0===e?void 0:e.has(t))&&this.nt.add(t);return this.render(i)}const o=t.element.classList;this.nt.forEach((t=>{t in i||(o.remove(t),this.nt.delete(t))}));for(const t in i){const e=!!i[t];e===this.nt.has(t)||(null===(s=this.st)||void 0===s?void 0:s.has(t))||(e?(o.add(t),this.nt.add(t)):(o.remove(t),this.nt.delete(t)))}return W}});var vt=function(t,i,e,s){for(var o,r=arguments.length,n=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(i,e,n):o(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const yt=lt.extend("--ft-ripple-color",at.colorContent),bt={color:yt,backgroundColor:lt.extend("--ft-ripple-background-color",yt),opacityContentOnSurfacePressed:lt.external(at.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:lt.external(at.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:lt.external(at.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:lt.external(at.opacityContentOnSurfaceSelected,"Design system")},mt=lt.extend("--ft-ripple-color",at.colorPrimary),gt=mt,xt=lt.extend("--ft-ripple-background-color",mt),wt=lt.extend("--ft-ripple-color",at.colorSecondary),Ot=wt,St=lt.extend("--ft-ripple-background-color",wt);class Ct extends ut{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:s,y:o}=this.getCoordinates(t),r=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=s?s-r.x:r.width/2),this.originY=Math.round(null!=o?o-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return D`
97
+ const ft=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==dt||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var e,s;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(e=this.st)||void 0===e?void 0:e.has(t))&&this.nt.add(t);return this.render(i)}const o=t.element.classList;this.nt.forEach((t=>{t in i||(o.remove(t),this.nt.delete(t))}));for(const t in i){const e=!!i[t];e===this.nt.has(t)||(null===(s=this.st)||void 0===s?void 0:s.has(t))||(e?(o.add(t),this.nt.add(t)):(o.remove(t),this.nt.delete(t)))}return W}}),vt=lt.extend("--ft-ripple-color",at.colorContent),bt={color:vt,backgroundColor:lt.extend("--ft-ripple-background-color",vt),opacityContentOnSurfacePressed:lt.external(at.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:lt.external(at.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:lt.external(at.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:lt.external(at.opacityContentOnSurfaceSelected,"Design system")},yt=lt.extend("--ft-ripple-color",at.colorPrimary),mt={color:yt,backgroundColor:lt.extend("--ft-ripple-background-color",yt)},gt=lt.extend("--ft-ripple-color",at.colorSecondary),xt={color:gt,backgroundColor:lt.extend("--ft-ripple-background-color",gt)},wt=u`
98
+ :host {
99
+ display: contents;
100
+ }
101
+
102
+ .ft-ripple {
103
+ position: absolute;
104
+ inset: 0;
105
+ pointer-events: none;
106
+ }
107
+
108
+ .ft-ripple:not(.ft-ripple--unbounded) {
109
+ overflow: hidden;
110
+ }
111
+
112
+ .ft-ripple .ft-ripple--background,
113
+ .ft-ripple .ft-ripple--effect {
114
+ position: absolute;
115
+ opacity: 0;
116
+ }
117
+
118
+ .ft-ripple .ft-ripple--background {
119
+ background-color: ${bt.backgroundColor};
120
+ }
121
+
122
+ .ft-ripple .ft-ripple--effect {
123
+ background-color: ${bt.color};
124
+ }
125
+
126
+ .ft-ripple.ft-ripple--secondary .ft-ripple--background {
127
+ background-color: ${xt.backgroundColor};
128
+ }
129
+
130
+ .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
131
+ background-color: ${xt.color};
132
+ }
133
+
134
+ .ft-ripple.ft-ripple--primary .ft-ripple--background {
135
+ background-color: ${mt.backgroundColor};
136
+ }
137
+
138
+ .ft-ripple.ft-ripple--primary .ft-ripple--effect {
139
+ background-color: ${mt.color};
140
+ }
141
+
142
+ .ft-ripple .ft-ripple--background {
143
+ top: 0;
144
+ left: 0;
145
+ height: 100%;
146
+ width: 100%;
147
+ transition: opacity 75ms linear;
148
+ }
149
+
150
+ .ft-ripple .ft-ripple--effect,
151
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
152
+ border-radius: 50%;
153
+ }
154
+
155
+ .ft-ripple .ft-ripple--effect {
156
+ transform: translate(-50%, -50%) scale(0.15);
157
+ transition: transform 300ms ease, opacity 75ms linear;
158
+ }
159
+
160
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
161
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
162
+ left: 50%;
163
+ top: 50%;
164
+ }
165
+
166
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
167
+ transform: translate(-50%, -50%);
168
+ }
169
+
170
+ .ft-ripple.ft-ripple--hovered .ft-ripple--background {
171
+ opacity: ${bt.opacityContentOnSurfaceHover};
172
+ }
173
+
174
+ .ft-ripple.ft-ripple--selected .ft-ripple--background {
175
+ opacity: ${bt.opacityContentOnSurfaceSelected};
176
+ }
177
+
178
+ .ft-ripple.ft-ripple--focused .ft-ripple--background {
179
+ opacity: ${bt.opacityContentOnSurfaceFocused};
180
+ }
181
+
182
+ .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
183
+ opacity: ${bt.opacityContentOnSurfacePressed};
184
+ transform: translate(-50%, -50%) scale(1);
185
+ }
186
+ `;var Ot,St=function(t,i,e,s){for(var o,r=arguments.length,n=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(i,e,n):o(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Ct extends ut{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:s,y:o}=this.getCoordinates(t),r=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=s?s-r.x:r.width/2),this.originY=Math.round(null!=o?o-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return D`
98
187
  <style>
99
188
  .ft-ripple .ft-ripple--effect,
100
189
  .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
@@ -111,93 +200,4 @@ const ft=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
111
200
  <div class="ft-ripple--background"></div>
112
201
  <div class="ft-ripple--effect"></div>
113
202
  </div>
114
- `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),s=i("touchend","touchcancel"),o=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",s),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",o),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",s),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",o),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let s,o;return null!=i.x?({x:s,y:o}=i):null!=e.touches&&(s=e.touches[0].clientX,o=e.touches[0].clientY),{x:s,y:o}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}var Nt;Ct.elementDefinitions={},Ct.styles=u`
115
- :host {
116
- display: contents;
117
- }
118
-
119
- .ft-ripple {
120
- position: absolute;
121
- inset: 0;
122
- pointer-events: none;
123
- }
124
-
125
- .ft-ripple:not(.ft-ripple--unbounded) {
126
- overflow: hidden;
127
- }
128
-
129
- .ft-ripple .ft-ripple--background,
130
- .ft-ripple .ft-ripple--effect {
131
- position: absolute;
132
- opacity: 0;
133
- }
134
-
135
- .ft-ripple .ft-ripple--background {
136
- background-color: ${bt.backgroundColor};
137
- }
138
-
139
- .ft-ripple .ft-ripple--effect {
140
- background-color: ${bt.color};
141
- }
142
-
143
- .ft-ripple.ft-ripple--secondary .ft-ripple--background {
144
- background-color: ${St};
145
- }
146
-
147
- .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
148
- background-color: ${Ot};
149
- }
150
-
151
- .ft-ripple.ft-ripple--primary .ft-ripple--background {
152
- background-color: ${xt};
153
- }
154
-
155
- .ft-ripple.ft-ripple--primary .ft-ripple--effect {
156
- background-color: ${gt};
157
- }
158
-
159
- .ft-ripple .ft-ripple--background {
160
- top: 0;
161
- left: 0;
162
- height: 100%;
163
- width: 100%;
164
- transition: opacity 75ms linear;
165
- }
166
-
167
- .ft-ripple .ft-ripple--effect,
168
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
169
- border-radius: 50%;
170
- }
171
-
172
- .ft-ripple .ft-ripple--effect {
173
- transform: translate(-50%, -50%) scale(0.15);
174
- transition: transform 300ms ease, opacity 75ms linear;
175
- }
176
-
177
- .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
178
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
179
- left: 50%;
180
- top: 50%;
181
- }
182
-
183
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
184
- transform: translate(-50%, -50%);
185
- }
186
-
187
- .ft-ripple.ft-ripple--hovered .ft-ripple--background {
188
- opacity: ${bt.opacityContentOnSurfaceHover};
189
- }
190
-
191
- .ft-ripple.ft-ripple--selected .ft-ripple--background {
192
- opacity: ${bt.opacityContentOnSurfaceSelected};
193
- }
194
-
195
- .ft-ripple.ft-ripple--focused .ft-ripple--background {
196
- opacity: ${bt.opacityContentOnSurfaceFocused};
197
- }
198
-
199
- .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
200
- opacity: ${bt.opacityContentOnSurfacePressed};
201
- transform: translate(-50%, -50%) scale(1);
202
- }
203
- `,vt([s({type:Boolean})],Ct.prototype,"primary",void 0),vt([s({type:Boolean})],Ct.prototype,"secondary",void 0),vt([s({type:Boolean})],Ct.prototype,"unbounded",void 0),vt([s({type:Boolean})],Ct.prototype,"activated",void 0),vt([s({type:Boolean})],Ct.prototype,"selected",void 0),vt([s({type:Boolean})],Ct.prototype,"disabled",void 0),vt([o()],Ct.prototype,"hovered",void 0),vt([o()],Ct.prototype,"focused",void 0),vt([o()],Ct.prototype,"pressed",void 0),vt([o()],Ct.prototype,"rippling",void 0),vt([o()],Ct.prototype,"rippleSize",void 0),vt([o()],Ct.prototype,"originX",void 0),vt([o()],Ct.prototype,"originY",void 0),vt([r(".ft-ripple")],Ct.prototype,"ripple",void 0),vt([r(".ft-ripple--effect")],Ct.prototype,"rippleEffect",void 0),(Nt="ft-ripple",t=>{window.customElements.get(Nt)||window.customElements.define(Nt,t)})(Ct),t.FtRipple=Ct,t.FtRippleCssVariables=bt,Object.defineProperty(t,"i",{value:!0})}({});
203
+ `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),s=i("touchend","touchcancel"),o=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",s),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",o),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",s),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",o),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let s,o;return null!=i.x?({x:s,y:o}=i):null!=e.touches&&(s=e.touches[0].clientX,o=e.touches[0].clientY),{x:s,y:o}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Ct.elementDefinitions={},Ct.styles=wt,St([s({type:Boolean})],Ct.prototype,"primary",void 0),St([s({type:Boolean})],Ct.prototype,"secondary",void 0),St([s({type:Boolean})],Ct.prototype,"unbounded",void 0),St([s({type:Boolean})],Ct.prototype,"activated",void 0),St([s({type:Boolean})],Ct.prototype,"selected",void 0),St([s({type:Boolean})],Ct.prototype,"disabled",void 0),St([o()],Ct.prototype,"hovered",void 0),St([o()],Ct.prototype,"focused",void 0),St([o()],Ct.prototype,"pressed",void 0),St([o()],Ct.prototype,"rippling",void 0),St([o()],Ct.prototype,"rippleSize",void 0),St([o()],Ct.prototype,"originX",void 0),St([o()],Ct.prototype,"originY",void 0),St([r(".ft-ripple")],Ct.prototype,"ripple",void 0),St([r(".ft-ripple--effect")],Ct.prototype,"rippleEffect",void 0),(Ot="ft-ripple",t=>{window.customElements.get(Ot)||window.customElements.define(Ot,t)})(Ct),t.FtRipple=Ct,t.FtRippleCssVariables=bt,t.FtRipplePrimaryCssVariables=mt,t.FtRippleSecondaryCssVariables=xt,t.styles=wt,Object.defineProperty(t,"i",{value:!0})}({});
@@ -0,0 +1,8 @@
1
+ export interface FtRippleProperties {
2
+ primary: boolean;
3
+ secondary: boolean;
4
+ unbounded: boolean;
5
+ selected: boolean;
6
+ disabled: boolean;
7
+ }
8
+ //# sourceMappingURL=ft-ripple.properties.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ft-ripple.properties.js.map
package/build/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export * from "./ft-ripple";
2
+ export * from "./ft-ripple.css";
3
+ export * from "./ft-ripple.properties";
2
4
  //# sourceMappingURL=index.d.ts.map
package/build/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { customElement } from "@fluid-topics/ft-wc-utils";
2
2
  import { FtRipple } from "./ft-ripple";
3
3
  export * from "./ft-ripple";
4
+ export * from "./ft-ripple.css";
5
+ export * from "./ft-ripple.properties";
4
6
  customElement("ft-ripple")(FtRipple);
5
7
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-ripple",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "A custom Fluid Topics ripple component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,8 +19,8 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "0.3.12",
22
+ "@fluid-topics/ft-wc-utils": "0.3.14",
23
23
  "lit": "2.2.8"
24
24
  },
25
- "gitHead": "126fc60c5ec4b89c3897901d1a92ee9b17286686"
25
+ "gitHead": "46cc9dd160b2f3189a2e581a8237e962f1ae464d"
26
26
  }