@fluid-topics/ft-filter 0.3.12 → 0.3.13
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.
- package/build/ft-filter-level.css.d.ts +17 -0
- package/build/ft-filter-level.css.js +88 -0
- package/build/ft-filter-level.d.ts +2 -17
- package/build/ft-filter-level.js +6 -88
- package/build/ft-filter-option.d.ts +1 -6
- package/build/ft-filter-option.properties.d.ts +7 -0
- package/build/ft-filter-option.properties.js +2 -0
- package/build/ft-filter.css.d.ts +11 -0
- package/build/ft-filter.css.js +126 -0
- package/build/ft-filter.d.ts +2 -23
- package/build/ft-filter.js +6 -125
- package/build/ft-filter.light.js +811 -811
- package/build/ft-filter.min.js +822 -822
- package/build/ft-filter.properties.d.ts +15 -0
- package/build/ft-filter.properties.js +2 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/package.json +10 -10
package/build/ft-filter.light.js
CHANGED
|
@@ -10,215 +10,247 @@ var l;const a=globalThis.trustedTypes,h=a?a.createPolicy("lit-html",{createHTML:
|
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t._$litStatic$},H=t=>({_$litStatic$:t,r:U}),P=new Map,W=(t=>(i,...e)=>{const o=e.length;let s,r;const n=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(r=e[h],s=V(r));)a+=s+i[++h],p=!0;l.push(r),n.push(a),h++}if(h===o&&n.push(i[o]),p){const t=n.join("$$lit$$");void 0===(i=P.get(t))&&(n.raw=n,P.set(t,i=n)),e=l}return t(i,...e)})(z);var Z
|
|
13
|
+
const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t._$litStatic$},H=t=>({_$litStatic$:t,r:U}),P=new Map,W=(t=>(i,...e)=>{const o=e.length;let s,r;const n=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(r=e[h],s=V(r));)a+=s+i[++h],p=!0;l.push(r),n.push(a),h++}if(h===o&&n.push(i[o]),p){const t=n.join("$$lit$$");void 0===(i=P.get(t))&&(n.raw=n,P.set(t,i=n)),e=l}return t(i,...e)})(z);var Z;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Z||(Z={}));const K=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),G=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),q={fontFamily:G,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",K),Y=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",q.fontSize,"20px"),J=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",q.fontWeight,"normal"),Q=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",q.letterSpacing,"0.15px"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",q.lineHeight,"1.2"),it=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",q.textTransform,"inherit"),et=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",K),ot=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",q.fontSize,"14px"),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",q.fontWeight,"normal"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",q.letterSpacing,"0.105px"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",q.lineHeight,"1.7"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",q.textTransform,"inherit"),at=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",G),ht=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",q.fontSize,"16px"),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",q.fontWeight,"600"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",q.letterSpacing,"0.144px"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",q.lineHeight,"1.5"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",q.textTransform,"inherit"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",G),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",q.fontSize,"14px"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",q.fontWeight,"normal"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",q.letterSpacing,"0.098px"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",q.lineHeight,"1.7"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",q.textTransform,"inherit"),mt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",G),$t=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",q.fontSize,"16px"),kt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",q.fontWeight,"normal"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",q.letterSpacing,"0.496px"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",q.lineHeight,"1.5"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",q.textTransform,"inherit"),Ot={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",G),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",q.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",q.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",q.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",q.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",q.textTransform,"inherit")},Ct=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",G),Bt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",q.fontSize,"12px"),jt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",q.fontWeight,"normal"),Et=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",q.letterSpacing,"0.396px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",q.lineHeight,"1.33"),Nt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",q.textTransform,"inherit"),Tt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",G),It=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",q.fontSize,"10px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",q.fontWeight,"normal"),Ft=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",q.letterSpacing,"0.33px"),At=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",q.lineHeight,"1.6"),_t=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",q.textTransform,"inherit"),Lt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",G),Rt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",q.fontSize,"10px"),Ut=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",q.fontWeight,"normal"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",q.letterSpacing,"1.5px"),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",q.lineHeight,"1.6"),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",q.textTransform,"uppercase"),Wt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",G),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",q.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",q.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",q.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",q.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",q.textTransform,"uppercase")},Zt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
20
|
-
text-transform: ${
|
|
15
|
+
font-family: ${X};
|
|
16
|
+
font-size: ${Y};
|
|
17
|
+
font-weight: ${J};
|
|
18
|
+
letter-spacing: ${Q};
|
|
19
|
+
line-height: ${tt};
|
|
20
|
+
text-transform: ${it};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Kt=e.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
26
|
-
font-weight: ${
|
|
27
|
-
letter-spacing: ${
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
24
|
+
font-family: ${et};
|
|
25
|
+
font-size: ${ot};
|
|
26
|
+
font-weight: ${st};
|
|
27
|
+
letter-spacing: ${rt};
|
|
28
|
+
line-height: ${nt};
|
|
29
|
+
text-transform: ${lt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Gt=e.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
|
-
font-family: ${
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
37
|
-
line-height: ${
|
|
38
|
-
text-transform: ${
|
|
33
|
+
font-family: ${at};
|
|
34
|
+
font-size: ${ht};
|
|
35
|
+
font-weight: ${pt};
|
|
36
|
+
letter-spacing: ${ft};
|
|
37
|
+
line-height: ${ct};
|
|
38
|
+
text-transform: ${dt};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,qt=e.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
|
-
font-family: ${
|
|
43
|
-
font-size: ${
|
|
44
|
-
font-weight: ${
|
|
45
|
-
letter-spacing: ${
|
|
46
|
-
line-height: ${
|
|
47
|
-
text-transform: ${
|
|
42
|
+
font-family: ${ut};
|
|
43
|
+
font-size: ${vt};
|
|
44
|
+
font-weight: ${bt};
|
|
45
|
+
letter-spacing: ${gt};
|
|
46
|
+
line-height: ${xt};
|
|
47
|
+
text-transform: ${yt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Xt=e.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
|
-
font-family: ${
|
|
53
|
-
font-size: ${
|
|
54
|
-
font-weight: ${
|
|
55
|
-
letter-spacing: ${
|
|
56
|
-
line-height: ${
|
|
57
|
-
text-transform: ${
|
|
52
|
+
font-family: ${mt};
|
|
53
|
+
font-size: ${$t};
|
|
54
|
+
font-weight: ${kt};
|
|
55
|
+
letter-spacing: ${wt};
|
|
56
|
+
line-height: ${zt};
|
|
57
|
+
text-transform: ${St};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,Yt=e.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
63
|
-
font-weight: ${
|
|
64
|
-
letter-spacing: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
61
|
+
font-family: ${Ot.fontFamily};
|
|
62
|
+
font-size: ${Ot.fontSize};
|
|
63
|
+
font-weight: ${Ot.fontWeight};
|
|
64
|
+
letter-spacing: ${Ot.letterSpacing};
|
|
65
|
+
line-height: ${Ot.lineHeight};
|
|
66
|
+
text-transform: ${Ot.textTransform};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Jt=e.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
74
|
-
line-height: ${
|
|
75
|
-
text-transform: ${
|
|
70
|
+
font-family: ${Ct};
|
|
71
|
+
font-size: ${Bt};
|
|
72
|
+
font-weight: ${jt};
|
|
73
|
+
letter-spacing: ${Et};
|
|
74
|
+
line-height: ${Dt};
|
|
75
|
+
text-transform: ${Nt};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,Qt=e.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
83
|
-
line-height: ${
|
|
84
|
-
text-transform: ${
|
|
79
|
+
font-family: ${Tt};
|
|
80
|
+
font-size: ${It};
|
|
81
|
+
font-weight: ${Mt};
|
|
82
|
+
letter-spacing: ${Ft};
|
|
83
|
+
line-height: ${At};
|
|
84
|
+
text-transform: ${_t};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,ti=e.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
88
|
+
font-family: ${Lt};
|
|
89
|
+
font-size: ${Rt};
|
|
90
|
+
font-weight: ${Ut};
|
|
91
|
+
letter-spacing: ${Vt};
|
|
92
|
+
line-height: ${Ht};
|
|
93
|
+
text-transform: ${Pt};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,ii=e.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
100
|
-
letter-spacing: ${
|
|
101
|
-
line-height: ${
|
|
102
|
-
text-transform: ${
|
|
103
|
-
}
|
|
104
|
-
|
|
97
|
+
font-family: ${Wt.fontFamily};
|
|
98
|
+
font-size: ${Wt.fontSize};
|
|
99
|
+
font-weight: ${Wt.fontWeight};
|
|
100
|
+
letter-spacing: ${Wt.letterSpacing};
|
|
101
|
+
line-height: ${Wt.lineHeight};
|
|
102
|
+
text-transform: ${Wt.textTransform};
|
|
103
|
+
}
|
|
104
|
+
`,ei=e.css`
|
|
105
|
+
.ft-typography {
|
|
106
|
+
vertical-align: inherit;
|
|
107
|
+
}
|
|
108
|
+
`;var oi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class si extends i.FtLitElement{constructor(){super(...arguments),this.variant=Z.body1}render(){return this.element?W`
|
|
105
109
|
<${H(this.element)}
|
|
106
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
111
|
<slot></slot>
|
|
108
112
|
</${H(this.element)}>
|
|
109
113
|
`:W`
|
|
110
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}function
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
`],K([o.property()],oi.prototype,"element",void 0),K([o.property()],oi.prototype,"variant",void 0),i.customElement("ft-typography")(oi);var ri=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const ni=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),li={color:ni,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",ni),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")},ai=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),hi=ai,pi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",ai),fi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),ci=fi,di=i.FtCssVariableFactory.extend("--ft-ripple-background-color",fi);class ui 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:o,y:s}=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!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-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 e.html`
|
|
116
|
-
<style>
|
|
117
|
-
.ft-ripple .ft-ripple--effect,
|
|
118
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
119
|
-
width: ${this.rippleSize}px;
|
|
120
|
-
height: ${this.rippleSize}px;
|
|
121
|
-
}
|
|
115
|
+
`}}function ri(t,i){return t.flatMap((t=>[t,...ri(i(t),i)]))}si.styles=[Zt,Kt,Gt,qt,Xt,Yt,Jt,Qt,ti,ii,ei],oi([o.property()],si.prototype,"element",void 0),oi([o.property()],si.prototype,"variant",void 0),i.customElement("ft-typography")(si);const ni=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),li={color:ni,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",ni),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")},ai=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),hi=ai,pi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",ai),fi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),ci=fi,di=i.FtCssVariableFactory.extend("--ft-ripple-background-color",fi),ui=e.css`
|
|
116
|
+
:host {
|
|
117
|
+
display: contents;
|
|
118
|
+
}
|
|
122
119
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<div class="${r.classMap(t)}">
|
|
129
|
-
<div class="ft-ripple--background"></div>
|
|
130
|
-
<div class="ft-ripple--effect"></div>
|
|
131
|
-
</div>
|
|
132
|
-
`}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"),o=i("touchend","touchcancel"),s=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",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),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",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),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 o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}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()}}ui.elementDefinitions={},ui.styles=e.css`
|
|
133
|
-
:host {
|
|
134
|
-
display: contents;
|
|
135
|
-
}
|
|
120
|
+
.ft-ripple {
|
|
121
|
+
position: absolute;
|
|
122
|
+
inset: 0;
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
}
|
|
136
125
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
pointer-events: none;
|
|
141
|
-
}
|
|
126
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
}
|
|
142
129
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
130
|
+
.ft-ripple .ft-ripple--background,
|
|
131
|
+
.ft-ripple .ft-ripple--effect {
|
|
132
|
+
position: absolute;
|
|
133
|
+
opacity: 0;
|
|
134
|
+
}
|
|
146
135
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
opacity: 0;
|
|
151
|
-
}
|
|
136
|
+
.ft-ripple .ft-ripple--background {
|
|
137
|
+
background-color: ${li.backgroundColor};
|
|
138
|
+
}
|
|
152
139
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
140
|
+
.ft-ripple .ft-ripple--effect {
|
|
141
|
+
background-color: ${li.color};
|
|
142
|
+
}
|
|
156
143
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
144
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
145
|
+
background-color: ${di};
|
|
146
|
+
}
|
|
160
147
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
148
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
149
|
+
background-color: ${ci};
|
|
150
|
+
}
|
|
164
151
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
152
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
153
|
+
background-color: ${pi};
|
|
154
|
+
}
|
|
168
155
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
156
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
157
|
+
background-color: ${hi};
|
|
158
|
+
}
|
|
172
159
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
160
|
+
.ft-ripple .ft-ripple--background {
|
|
161
|
+
top: 0;
|
|
162
|
+
left: 0;
|
|
163
|
+
height: 100%;
|
|
164
|
+
width: 100%;
|
|
165
|
+
transition: opacity 75ms linear;
|
|
166
|
+
}
|
|
176
167
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
width: 100%;
|
|
182
|
-
transition: opacity 75ms linear;
|
|
183
|
-
}
|
|
168
|
+
.ft-ripple .ft-ripple--effect,
|
|
169
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
170
|
+
border-radius: 50%;
|
|
171
|
+
}
|
|
184
172
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
173
|
+
.ft-ripple .ft-ripple--effect {
|
|
174
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
175
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
176
|
+
}
|
|
189
177
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
178
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
179
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
180
|
+
left: 50%;
|
|
181
|
+
top: 50%;
|
|
182
|
+
}
|
|
194
183
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
top: 50%;
|
|
199
|
-
}
|
|
184
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
185
|
+
transform: translate(-50%, -50%);
|
|
186
|
+
}
|
|
200
187
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
188
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
189
|
+
opacity: ${li.opacityContentOnSurfaceHover};
|
|
190
|
+
}
|
|
204
191
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
192
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
193
|
+
opacity: ${li.opacityContentOnSurfaceSelected};
|
|
194
|
+
}
|
|
208
195
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
196
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
197
|
+
opacity: ${li.opacityContentOnSurfaceFocused};
|
|
198
|
+
}
|
|
212
199
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
200
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
201
|
+
opacity: ${li.opacityContentOnSurfacePressed};
|
|
202
|
+
transform: translate(-50%, -50%) scale(1);
|
|
203
|
+
}
|
|
204
|
+
`;var vi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class bi 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:o,y:s}=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!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-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 e.html`
|
|
205
|
+
<style>
|
|
206
|
+
.ft-ripple .ft-ripple--effect,
|
|
207
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
208
|
+
width: ${this.rippleSize}px;
|
|
209
|
+
height: ${this.rippleSize}px;
|
|
210
|
+
}
|
|
216
211
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
212
|
+
.ft-ripple .ft-ripple--effect {
|
|
213
|
+
left: ${this.originX}px;
|
|
214
|
+
top: ${this.originY}px;
|
|
215
|
+
}
|
|
216
|
+
</style>
|
|
217
|
+
<div class="${r.classMap(t)}">
|
|
218
|
+
<div class="ft-ripple--background"></div>
|
|
219
|
+
<div class="ft-ripple--effect"></div>
|
|
220
|
+
</div>
|
|
221
|
+
`}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"),o=i("touchend","touchcancel"),s=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",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),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",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),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 o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}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()}}bi.elementDefinitions={},bi.styles=ui,vi([o.property({type:Boolean})],bi.prototype,"primary",void 0),vi([o.property({type:Boolean})],bi.prototype,"secondary",void 0),vi([o.property({type:Boolean})],bi.prototype,"unbounded",void 0),vi([o.property({type:Boolean})],bi.prototype,"activated",void 0),vi([o.property({type:Boolean})],bi.prototype,"selected",void 0),vi([o.property({type:Boolean})],bi.prototype,"disabled",void 0),vi([o.state()],bi.prototype,"hovered",void 0),vi([o.state()],bi.prototype,"focused",void 0),vi([o.state()],bi.prototype,"pressed",void 0),vi([o.state()],bi.prototype,"rippling",void 0),vi([o.state()],bi.prototype,"rippleSize",void 0),vi([o.state()],bi.prototype,"originX",void 0),vi([o.state()],bi.prototype,"originY",void 0),vi([o.query(".ft-ripple")],bi.prototype,"ripple",void 0),vi([o.query(".ft-ripple--effect")],bi.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(bi);const gi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),xi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),yi=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),mi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),$i=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),ki=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),wi=e.css`
|
|
222
|
+
.ft-tooltip--container {
|
|
223
|
+
display: block;
|
|
224
|
+
position: relative;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.ft-tooltip--inline {
|
|
228
|
+
display: inline-block;
|
|
229
|
+
max-width: 100%;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.ft-tooltip {
|
|
233
|
+
position: absolute;
|
|
234
|
+
box-sizing: border-box;
|
|
235
|
+
overflow: hidden;
|
|
236
|
+
width: max-content;
|
|
237
|
+
max-width: ${ki};
|
|
238
|
+
text-align: center;
|
|
239
|
+
padding: ${gi};
|
|
240
|
+
z-index: ${mi};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.ft-tooltip--content {
|
|
244
|
+
padding: 4px 8px;
|
|
245
|
+
border-radius: ${$i};
|
|
246
|
+
background-color: ${yi};
|
|
247
|
+
color: ${xi};
|
|
248
|
+
top: -500px;
|
|
249
|
+
left: -500px;
|
|
250
|
+
position: relative;
|
|
251
|
+
word-break: break-word;
|
|
252
|
+
}
|
|
253
|
+
`;var zi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Si extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
222
254
|
<div part="container"
|
|
223
255
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
224
256
|
@mouseenter=${this.onHover}
|
|
@@ -234,290 +266,258 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
234
266
|
</div>
|
|
235
267
|
<slot></slot>
|
|
236
268
|
</div>
|
|
237
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.position){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=i.height,s=o;break;case"left":r=e,s=-this.tooltip.clientWidth;break;case"right":r=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${i.width}px, ${
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.ft-tooltip--inline {
|
|
244
|
-
display: inline-block;
|
|
245
|
-
max-width: 100%;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.ft-tooltip {
|
|
249
|
-
position: absolute;
|
|
250
|
-
box-sizing: border-box;
|
|
251
|
-
overflow: hidden;
|
|
252
|
-
width: max-content;
|
|
253
|
-
max-width: ${$i};
|
|
254
|
-
text-align: center;
|
|
255
|
-
padding: ${bi};
|
|
256
|
-
z-index: ${yi};
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.ft-tooltip--content {
|
|
260
|
-
padding: 4px 8px;
|
|
261
|
-
border-radius: ${mi};
|
|
262
|
-
background-color: ${xi};
|
|
263
|
-
color: ${gi};
|
|
264
|
-
top: -500px;
|
|
265
|
-
left: -500px;
|
|
266
|
-
position: relative;
|
|
267
|
-
word-break: break-word;
|
|
268
|
-
}
|
|
269
|
-
`,vi([o.property()],ki.prototype,"text",void 0),vi([o.property({type:Boolean})],ki.prototype,"manual",void 0),vi([o.property({type:Boolean})],ki.prototype,"inline",void 0),vi([o.property({type:Number})],ki.prototype,"delay",void 0),vi([o.property()],ki.prototype,"position",void 0),vi([o.queryAssignedNodes("",!0)],ki.prototype,"slotNodes",void 0),vi([o.query(".ft-tooltip--container")],ki.prototype,"container",void 0),vi([o.query("slot")],ki.prototype,"target",void 0),vi([o.query(".ft-tooltip")],ki.prototype,"tooltip",void 0),vi([o.query(".ft-tooltip--content")],ki.prototype,"tooltipContent",void 0),vi([o.state()],ki.prototype,"visible",void 0),i.customElement("ft-tooltip")(ki);const wi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")};class zi extends i.FtLitElement{static get styles(){return e.css`
|
|
270
|
-
:host {
|
|
271
|
-
line-height: 0;
|
|
272
|
-
}
|
|
269
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.position){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=i.height,s=o;break;case"left":r=e,s=-this.tooltip.clientWidth;break;case"right":r=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${i.width}px, ${ki})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Si.elementDefinitions={"ft-typography":si},Si.styles=wi,zi([o.property()],Si.prototype,"text",void 0),zi([o.property({type:Boolean})],Si.prototype,"manual",void 0),zi([o.property({type:Boolean})],Si.prototype,"inline",void 0),zi([o.property({type:Number})],Si.prototype,"delay",void 0),zi([o.property()],Si.prototype,"position",void 0),zi([o.queryAssignedNodes("",!0)],Si.prototype,"slotNodes",void 0),zi([o.query(".ft-tooltip--container")],Si.prototype,"container",void 0),zi([o.query("slot")],Si.prototype,"target",void 0),zi([o.query(".ft-tooltip")],Si.prototype,"tooltip",void 0),zi([o.query(".ft-tooltip--content")],Si.prototype,"tooltipContent",void 0),zi([o.state()],Si.prototype,"visible",void 0),i.customElement("ft-tooltip")(Si);const Oi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ci=e.css`
|
|
270
|
+
:host {
|
|
271
|
+
line-height: 0;
|
|
272
|
+
}
|
|
273
273
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
.ft-loader {
|
|
275
|
+
display: inline-block;
|
|
276
|
+
position: relative;
|
|
277
277
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
width: ${Oi.size};
|
|
279
|
+
height: ${Oi.size};
|
|
280
|
+
}
|
|
281
281
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
282
|
+
.ft-loader div {
|
|
283
|
+
position: absolute;
|
|
284
|
+
top: 37.5%;
|
|
285
|
+
width: 25%;
|
|
286
|
+
height: 25%;
|
|
287
|
+
border-radius: 50%;
|
|
288
|
+
background: ${Oi.color};
|
|
289
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
290
|
+
}
|
|
291
291
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
292
|
+
.ft-loader div:nth-child(1) {
|
|
293
|
+
left: 2.5%;
|
|
294
|
+
animation: appear 0.6s infinite;
|
|
295
|
+
}
|
|
296
296
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
297
|
+
.ft-loader div:nth-child(2) {
|
|
298
|
+
left: 2.5%;
|
|
299
|
+
animation: move 0.6s infinite;
|
|
300
|
+
}
|
|
301
301
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
302
|
+
.ft-loader div:nth-child(3) {
|
|
303
|
+
left: 37.5%;
|
|
304
|
+
animation: move 0.6s infinite;
|
|
305
|
+
}
|
|
306
306
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
307
|
+
.ft-loader div:nth-child(4) {
|
|
308
|
+
left: 72.5%;
|
|
309
|
+
animation: disappear 0.6s infinite;
|
|
310
|
+
}
|
|
311
311
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
312
|
+
@keyframes appear {
|
|
313
|
+
0% {
|
|
314
|
+
transform: scale(0);
|
|
315
|
+
}
|
|
316
|
+
100% {
|
|
317
|
+
transform: scale(1);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
320
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
321
|
+
@keyframes disappear {
|
|
322
|
+
0% {
|
|
323
|
+
transform: scale(1);
|
|
324
|
+
}
|
|
325
|
+
100% {
|
|
326
|
+
transform: scale(0);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
329
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
330
|
+
@keyframes move {
|
|
331
|
+
0% {
|
|
332
|
+
transform: translate(0, 0);
|
|
333
|
+
}
|
|
334
|
+
100% {
|
|
335
|
+
transform: translate(calc(0.35 * ${Oi.size}), 0);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
`;class Bi extends i.FtLitElement{render(){return e.html`
|
|
339
339
|
<div class="ft-loader">
|
|
340
340
|
<div></div>
|
|
341
341
|
<div></div>
|
|
342
342
|
<div></div>
|
|
343
343
|
<div></div>
|
|
344
344
|
</div>
|
|
345
|
-
`}}var
|
|
345
|
+
`}}var ji,Ei;Bi.styles=Ci,i.customElement("ft-loader")(Bi),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ji||(ji={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Ei||(Ei={})),new Map([...["abw"].map((t=>[t,Ei.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Ei.AUDIO])),...["avi"].map((t=>[t,Ei.AVI])),...["chm","xhs"].map((t=>[t,Ei.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Ei.CODE])),...["csv"].map((t=>[t,Ei.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ei.DITA])),...["epub"].map((t=>[t,Ei.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ei.EXCEL])),...["flac"].map((t=>[t,Ei.FLAC])),...["gif"].map((t=>[t,Ei.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ei.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ei.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Ei.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ei.JPEG])),...["json"].map((t=>[t,Ei.JSON])),...["m4a","m4p"].map((t=>[t,Ei.M4A])),...["mov","qt"].map((t=>[t,Ei.MOV])),...["mp3"].map((t=>[t,Ei.MP3])),...["mp4","m4v"].map((t=>[t,Ei.MP4])),...["ogg","oga"].map((t=>[t,Ei.OGG])),...["pdf","ps"].map((t=>[t,Ei.PDF])),...["png"].map((t=>[t,Ei.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ei.POWERPOINT])),...["rar"].map((t=>[t,Ei.RAR])),...["stp"].map((t=>[t,Ei.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ei.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Ei.VIDEO])),...["wav"].map((t=>[t,Ei.WAV])),...["wma"].map((t=>[t,Ei.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ei.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ei.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ei.YAML])),...["zip"].map((t=>[t,Ei.ZIP]))]);const Di={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ni=e.css`
|
|
346
|
+
:host {
|
|
347
|
+
display: inline-block;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
:host, i.ft-icon {
|
|
351
|
+
width: ${Di.size};
|
|
352
|
+
height: ${Di.size};
|
|
353
|
+
text-align: center;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
i.ft-icon {
|
|
357
|
+
font-size: ${Di.size};
|
|
358
|
+
line-height: 1;
|
|
359
|
+
font-weight: normal;
|
|
360
|
+
text-transform: none;
|
|
361
|
+
font-style: normal;
|
|
362
|
+
font-variant: normal;
|
|
363
|
+
speak: none;
|
|
364
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
365
|
+
text-rendering: auto;
|
|
366
|
+
-webkit-font-smoothing: antialiased;
|
|
367
|
+
-moz-osx-font-smoothing: grayscale;
|
|
368
|
+
vertical-align: ${Di.verticalAlign};
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.ft-icon--fluid-topics {
|
|
372
|
+
font-family: ${Di.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.ft-icon--file-format {
|
|
376
|
+
font-family: ${Di.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.ft-icon--material {
|
|
380
|
+
font-family: ${Di.materialFontFamily}, "Material Icons", sans-serif;
|
|
381
|
+
}
|
|
382
|
+
`;var Ti;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ti||(Ti={}));var Ii=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Mi extends i.FtLitElement{constructor(){super(...arguments),this.variant=Ti.fluid_topics,this.resolvedIcon=e.nothing}render(){const t="material"!==this.variant||this.value;return e.html`
|
|
346
383
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
347
384
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
348
385
|
<slot ?hidden=${t}></slot>
|
|
349
386
|
</i>
|
|
350
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case
|
|
387
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Ti.file_format:this.resolvedIcon=null!==(t=Ei[o.toUpperCase()])&&void 0!==t?t:o;break;case Ti.fluid_topics:this.resolvedIcon=null!==(i=ji[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||e.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}Mi.elementDefinitions={},Mi.styles=Ni,Ii([o.property()],Mi.prototype,"variant",void 0),Ii([o.property()],Mi.prototype,"value",void 0),Ii([o.state()],Mi.prototype,"resolvedIcon",void 0),Ii([o.query("slot")],Mi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Mi);const Fi=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Ai={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Fi,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",Wt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Fi),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},_i=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Li={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:_i,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",_i)},Ri=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Ui=[i.noTextSelect,e.css`
|
|
351
388
|
:host {
|
|
352
389
|
display: inline-block;
|
|
390
|
+
max-width: 100%;
|
|
391
|
+
pointer-events: none;
|
|
353
392
|
}
|
|
354
393
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
text-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
i.ft-icon {
|
|
362
|
-
font-size: ${ji.size};
|
|
363
|
-
line-height: 1;
|
|
364
|
-
font-weight: normal;
|
|
365
|
-
text-transform: none;
|
|
366
|
-
font-style: normal;
|
|
367
|
-
font-variant: normal;
|
|
368
|
-
speak: none;
|
|
369
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
370
|
-
text-rendering: auto;
|
|
371
|
-
-webkit-font-smoothing: antialiased;
|
|
372
|
-
-moz-osx-font-smoothing: grayscale;
|
|
373
|
-
vertical-align: ${ji.verticalAlign};
|
|
394
|
+
button {
|
|
395
|
+
box-shadow: 0px 0px 0px transparent;
|
|
396
|
+
border: 0px solid transparent;
|
|
397
|
+
text-shadow: 0px 0px 0px transparent;
|
|
398
|
+
font-size: ${Ai.fontSize};
|
|
374
399
|
}
|
|
375
400
|
|
|
376
|
-
|
|
377
|
-
|
|
401
|
+
button:hover {
|
|
402
|
+
box-shadow: 0px 0px 0px transparent;
|
|
403
|
+
border: 0px solid transparent;
|
|
404
|
+
text-shadow: 0px 0px 0px transparent;
|
|
378
405
|
}
|
|
379
406
|
|
|
380
|
-
|
|
381
|
-
|
|
407
|
+
button:active {
|
|
408
|
+
outline: none;
|
|
409
|
+
border: none;
|
|
382
410
|
}
|
|
383
411
|
|
|
384
|
-
|
|
385
|
-
|
|
412
|
+
button:focus {
|
|
413
|
+
outline: 0;
|
|
386
414
|
}
|
|
387
|
-
`,Bi([o.property()],Ei.prototype,"variant",void 0),Bi([o.property()],Ei.prototype,"value",void 0),Bi([o.state()],Ei.prototype,"resolvedIcon",void 0),Bi([o.query("slot")],Ei.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Ei);var Di=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const Ni=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Ti={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Ni,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",Zt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Ni),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Ii=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Mi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Ii,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Ii)},Fi=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM));class Ai extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Ci.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[i.noTextSelect,e.css`
|
|
388
|
-
:host {
|
|
389
|
-
display: inline-block;
|
|
390
|
-
max-width: 100%;
|
|
391
|
-
pointer-events: none;
|
|
392
|
-
}
|
|
393
415
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
text-shadow: 0px 0px 0px transparent;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
button:active {
|
|
408
|
-
outline: none;
|
|
409
|
-
border: none;
|
|
410
|
-
}
|
|
416
|
+
.ft-button {
|
|
417
|
+
position: relative;
|
|
418
|
+
display: flex;
|
|
419
|
+
justify-content: center;
|
|
420
|
+
align-items: center;
|
|
421
|
+
width: 100%;
|
|
422
|
+
overflow: hidden;
|
|
423
|
+
box-sizing: border-box;
|
|
424
|
+
border: none;
|
|
425
|
+
pointer-events: auto;
|
|
411
426
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
427
|
+
--ft-button-internal-line-height: calc(${Ai.fontSize} + 2px);
|
|
428
|
+
--ft-button-internal-color: ${Ai.color};
|
|
429
|
+
${i.setVariable(Di.size,Ai.iconSize)};
|
|
430
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
431
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
432
|
+
${i.setVariable(li.color,Ai.rippleColor)};
|
|
433
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ai.iconSize});
|
|
415
434
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
overflow: hidden;
|
|
423
|
-
box-sizing: border-box;
|
|
424
|
-
border: none;
|
|
425
|
-
pointer-events: auto;
|
|
426
|
-
|
|
427
|
-
--ft-button-internal-line-height: calc(${Ti.fontSize} + 2px);
|
|
428
|
-
--ft-button-internal-color: ${Ti.color};
|
|
429
|
-
${i.setVariable(ji.size,Ti.iconSize)};
|
|
430
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
431
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
432
|
-
${i.setVariable(li.color,Ti.rippleColor)};
|
|
433
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ti.iconSize});
|
|
434
|
-
|
|
435
|
-
border-radius: ${Ti.borderRadius};
|
|
436
|
-
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
437
|
-
background-color: ${Ti.backgroundColor};
|
|
438
|
-
color: var(--ft-button-internal-color);
|
|
439
|
-
-webkit-mask-image: radial-gradient(white, black);
|
|
440
|
-
}
|
|
435
|
+
border-radius: ${Ai.borderRadius};
|
|
436
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
437
|
+
background-color: ${Ai.backgroundColor};
|
|
438
|
+
color: var(--ft-button-internal-color);
|
|
439
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
440
|
+
}
|
|
441
441
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
442
|
+
.ft-button:not([disabled]):hover {
|
|
443
|
+
cursor: pointer;
|
|
444
|
+
}
|
|
445
445
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
446
|
+
.ft-button--dense {
|
|
447
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
448
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
449
|
+
border-radius: ${Ri};
|
|
450
|
+
}
|
|
451
451
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
452
|
+
.ft-button--round {
|
|
453
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
454
|
+
}
|
|
455
455
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
456
|
+
.ft-button[disabled] {
|
|
457
|
+
filter: grayscale(1);
|
|
458
|
+
opacity: ${Ai.opacityDisabled};
|
|
459
|
+
}
|
|
460
460
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
461
|
+
.ft-button.ft-button--primary {
|
|
462
|
+
background-color: ${Li.backgroundColor};
|
|
463
|
+
--ft-button-internal-color: ${Li.color};
|
|
464
|
+
${i.setVariable(li.color,Li.rippleColor)};
|
|
465
|
+
}
|
|
466
466
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
467
|
+
.ft-button.ft-button--outlined {
|
|
468
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
469
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
470
|
+
}
|
|
471
471
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
472
|
+
.ft-button:focus {
|
|
473
|
+
outline: none;
|
|
474
|
+
}
|
|
475
475
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
476
|
+
.ft-button--label {
|
|
477
|
+
position: relative;
|
|
478
|
+
overflow: hidden;
|
|
479
|
+
white-space: nowrap;
|
|
480
|
+
text-overflow: ellipsis;
|
|
481
|
+
display: block;
|
|
482
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
483
|
+
${i.setVariable(Wt.fontSize,"1em")};
|
|
484
|
+
${i.setVariable(Wt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
485
|
+
}
|
|
486
486
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
487
|
+
.ft-button--safari-fix .ft-button--label {
|
|
488
|
+
margin-right: 0;
|
|
489
|
+
}
|
|
490
490
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
491
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
492
|
+
content: "\\0000a0";
|
|
493
|
+
display: inline-block;
|
|
494
|
+
width: 0;
|
|
495
|
+
}
|
|
496
496
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
497
|
+
.ft-button--label[hidden] {
|
|
498
|
+
display: none;
|
|
499
|
+
}
|
|
500
500
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
501
|
+
ft-icon {
|
|
502
|
+
flex-shrink: 0;
|
|
503
|
+
position: relative;
|
|
504
|
+
}
|
|
505
505
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
506
|
+
.ft-button--label[hidden] + ft-icon {
|
|
507
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
508
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
509
|
+
}
|
|
510
510
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
511
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
512
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
513
|
+
order: -1;
|
|
514
|
+
}
|
|
515
515
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
516
|
+
ft-loader {
|
|
517
|
+
${i.setVariable(Oi.size,Ai.iconSize)};
|
|
518
|
+
${i.setVariable(Oi.color,"var(--ft-button-internal-color)")};
|
|
519
|
+
}
|
|
520
|
+
`];var Vi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Hi extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Ti.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
521
521
|
<button part="button"
|
|
522
522
|
class="${r.classMap(t)}"
|
|
523
523
|
aria-label="${this.getLabel()}"
|
|
@@ -539,7 +539,84 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
539
539
|
</ft-tooltip>
|
|
540
540
|
`}resolveIcon(){return this.loading?e.html`
|
|
541
541
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
542
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
542
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Hi.elementDefinitions={"ft-ripple":bi,"ft-tooltip":Si,"ft-typography":si,"ft-icon":Mi,"ft-loader":Bi},Hi.styles=Ui,Vi([o.property({type:Boolean})],Hi.prototype,"primary",void 0),Vi([o.property({type:Boolean})],Hi.prototype,"outlined",void 0),Vi([o.property({type:Boolean})],Hi.prototype,"disabled",void 0),Vi([o.property({type:Boolean})],Hi.prototype,"dense",void 0),Vi([o.property({type:Boolean})],Hi.prototype,"round",void 0),Vi([o.property({type:String})],Hi.prototype,"label",void 0),Vi([o.property({type:String})],Hi.prototype,"icon",void 0),Vi([o.property({type:String})],Hi.prototype,"iconVariant",void 0),Vi([o.property({type:Boolean})],Hi.prototype,"trailingIcon",void 0),Vi([o.property({type:Boolean})],Hi.prototype,"loading",void 0),Vi([o.property({type:String})],Hi.prototype,"tooltipPosition",void 0),Vi([o.property({type:Boolean})],Hi.prototype,"hideTooltip",void 0),Vi([o.query(".ft-button")],Hi.prototype,"button",void 0),Vi([o.query(".ft-button--label slot")],Hi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Hi);const Pi=i.FtCssVariableFactory.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),Wi=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Zi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),Ki=i.FtCssVariableFactory.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),Gi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),qi=e.css`
|
|
543
|
+
* {
|
|
544
|
+
box-sizing: border-box;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.ft-checkbox {
|
|
548
|
+
box-sizing: border-box;
|
|
549
|
+
color: ${Pi};
|
|
550
|
+
|
|
551
|
+
display: inline-flex;
|
|
552
|
+
align-items: center;
|
|
553
|
+
gap: 4px;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.ft-checkbox--disabled {
|
|
557
|
+
color: ${Gi};
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
input {
|
|
561
|
+
opacity: 0;
|
|
562
|
+
position: absolute;
|
|
563
|
+
width: 40px;
|
|
564
|
+
height: 40px;
|
|
565
|
+
margin: 0;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.ft-checkbox--box-container {
|
|
569
|
+
position: relative;
|
|
570
|
+
width: 40px;
|
|
571
|
+
height: 40px;
|
|
572
|
+
|
|
573
|
+
display: flex;
|
|
574
|
+
justify-content: center;
|
|
575
|
+
align-items: center;
|
|
576
|
+
flex-shrink: 0;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.ft-checkbox--box {
|
|
580
|
+
display: flex;
|
|
581
|
+
border: 2px solid ${Ki};
|
|
582
|
+
border-radius: 2px;
|
|
583
|
+
|
|
584
|
+
width: 18px;
|
|
585
|
+
height: 18px;
|
|
586
|
+
|
|
587
|
+
color: ${Zi};
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
.ft-checkbox--checked .ft-checkbox--box,
|
|
592
|
+
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
593
|
+
border-color: ${Wi};
|
|
594
|
+
background-color: ${Wi};
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.ft-checkbox--disabled .ft-checkbox--box {
|
|
598
|
+
border-color: ${Gi};
|
|
599
|
+
background-color: transparent;
|
|
600
|
+
color: ${Gi};
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.ft-checkbox--checkmark {
|
|
604
|
+
transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
605
|
+
opacity: 0;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.ft-checkbox--checkmark-path {
|
|
609
|
+
stroke-dashoffset: 0;
|
|
610
|
+
stroke: currentcolor;
|
|
611
|
+
stroke-width: 3px;
|
|
612
|
+
stroke-dasharray: 30;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.ft-checkbox--checked .ft-checkbox--checkmark,
|
|
616
|
+
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
617
|
+
opacity: 1;
|
|
618
|
+
}
|
|
619
|
+
`;var Xi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Yi extends i.FtLitElement{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return e.html`
|
|
543
620
|
<label class="${r.classMap(t)}" for="checkbox-input">
|
|
544
621
|
<div class="ft-checkbox--box-container">
|
|
545
622
|
<ft-ripple
|
|
@@ -565,84 +642,86 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
565
642
|
<slot></slot>
|
|
566
643
|
</ft-typography>
|
|
567
644
|
</label>
|
|
568
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
645
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}Yi.elementDefinitions={"ft-ripple":bi,"ft-typography":si},Yi.styles=qi,Xi([o.property()],Yi.prototype,"name",void 0),Xi([o.property({type:Boolean,reflect:!0})],Yi.prototype,"checked",void 0),Xi([o.property({type:Boolean})],Yi.prototype,"indeterminate",void 0),Xi([o.property({type:Boolean})],Yi.prototype,"disabled",void 0),Xi([o.query(".ft-checkbox")],Yi.prototype,"container",void 0),Xi([o.query("ft-ripple")],Yi.prototype,"ripple",void 0),i.customElement("ft-checkbox")(Yi);const Ji=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),Qi=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),te=(i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),ie=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),ee=e.css`
|
|
646
|
+
* {
|
|
647
|
+
box-sizing: border-box;
|
|
648
|
+
}
|
|
572
649
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
650
|
+
.ft-radio {
|
|
651
|
+
box-sizing: border-box;
|
|
652
|
+
color: ${Ji};
|
|
576
653
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
654
|
+
display: inline-flex;
|
|
655
|
+
align-items: center;
|
|
656
|
+
gap: 4px;
|
|
657
|
+
}
|
|
581
658
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
659
|
+
.ft-radio--disabled {
|
|
660
|
+
color: ${ie};
|
|
661
|
+
}
|
|
585
662
|
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
663
|
+
input {
|
|
664
|
+
opacity: 0;
|
|
665
|
+
position: absolute;
|
|
666
|
+
width: 40px;
|
|
667
|
+
height: 40px;
|
|
668
|
+
margin: 0;
|
|
669
|
+
}
|
|
593
670
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
671
|
+
.ft-radio--box-container {
|
|
672
|
+
position: relative;
|
|
673
|
+
width: 40px;
|
|
674
|
+
height: 40px;
|
|
598
675
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
676
|
+
display: flex;
|
|
677
|
+
justify-content: center;
|
|
678
|
+
align-items: center;
|
|
679
|
+
flex-shrink: 0;
|
|
680
|
+
}
|
|
604
681
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
border-radius: 2px;
|
|
682
|
+
.ft-radio--box {
|
|
683
|
+
border: 2px solid ${te};
|
|
684
|
+
border-radius: 50%;
|
|
609
685
|
|
|
610
|
-
|
|
611
|
-
|
|
686
|
+
display: flex;
|
|
687
|
+
justify-content: center;
|
|
688
|
+
align-items: center;
|
|
612
689
|
|
|
613
|
-
|
|
614
|
-
|
|
690
|
+
width: 20px;
|
|
691
|
+
height: 20px;
|
|
692
|
+
}
|
|
615
693
|
|
|
694
|
+
.ft-radio--box:after {
|
|
695
|
+
content: " ";
|
|
696
|
+
background-color: ${Qi};
|
|
616
697
|
|
|
617
|
-
|
|
618
|
-
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
619
|
-
border-color: ${Ri};
|
|
620
|
-
background-color: ${Ri};
|
|
621
|
-
}
|
|
698
|
+
border-radius: 50%;
|
|
622
699
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
background-color: transparent;
|
|
626
|
-
color: ${Hi};
|
|
627
|
-
}
|
|
700
|
+
width: 12px;
|
|
701
|
+
height: 12px;
|
|
628
702
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
}
|
|
703
|
+
transform: scale(0);
|
|
704
|
+
transition: transform 100ms ease;
|
|
705
|
+
}
|
|
633
706
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
stroke-width: 3px;
|
|
638
|
-
stroke-dasharray: 30;
|
|
639
|
-
}
|
|
707
|
+
.ft-radio--checked .ft-radio--box {
|
|
708
|
+
border-color: ${Qi};
|
|
709
|
+
}
|
|
640
710
|
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
711
|
+
|
|
712
|
+
.ft-radio--checked .ft-radio--box:after {
|
|
713
|
+
transform: scale(1);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.ft-radio--disabled .ft-radio--box {
|
|
717
|
+
border-color: ${ie};
|
|
718
|
+
background-color: transparent;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.ft-radio--disabled .ft-radio--box:after {
|
|
722
|
+
background-color: ${ie};
|
|
723
|
+
}
|
|
724
|
+
`;var oe=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class se extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class re extends i.FtLitElement{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return e.html`
|
|
646
725
|
<div class="${r.classMap(t)}">
|
|
647
726
|
<div class="ft-radio--box-container">
|
|
648
727
|
<ft-ripple
|
|
@@ -667,96 +746,83 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
667
746
|
</ft-typography>
|
|
668
747
|
</label>
|
|
669
748
|
</div>
|
|
670
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
color: ${qi};
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
input {
|
|
689
|
-
opacity: 0;
|
|
690
|
-
position: absolute;
|
|
691
|
-
width: 40px;
|
|
692
|
-
height: 40px;
|
|
693
|
-
margin: 0;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
.ft-radio--box-container {
|
|
697
|
-
position: relative;
|
|
698
|
-
width: 40px;
|
|
699
|
-
height: 40px;
|
|
700
|
-
|
|
701
|
-
display: flex;
|
|
702
|
-
justify-content: center;
|
|
703
|
-
align-items: center;
|
|
704
|
-
flex-shrink: 0;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
.ft-radio--box {
|
|
708
|
-
border: 2px solid ${Gi};
|
|
709
|
-
border-radius: 50%;
|
|
710
|
-
|
|
711
|
-
display: flex;
|
|
712
|
-
justify-content: center;
|
|
713
|
-
align-items: center;
|
|
749
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new se(this.value,this.checked))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new se(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}re.elementDefinitions={"ft-ripple":bi,"ft-typography":si},re.styles=ee,oe([o.property()],re.prototype,"value",void 0),oe([o.property()],re.prototype,"name",void 0),oe([o.property({type:Boolean,reflect:!0})],re.prototype,"checked",void 0),oe([o.property({type:Boolean})],re.prototype,"disabled",void 0),oe([o.query(".ft-radio")],re.prototype,"container",void 0),oe([o.query("ft-ripple")],re.prototype,"ripple",void 0),oe([o.query("input")],re.prototype,"input",void 0);const ne=e.css`
|
|
750
|
+
:host {
|
|
751
|
+
display: contents;
|
|
752
|
+
}
|
|
753
|
+
`;var le=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class ae extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
754
|
+
<slot @slotchange=${this.onSlotChange}
|
|
755
|
+
@change=${this.onChange}
|
|
756
|
+
@keydown=${this.onKeyDown}
|
|
757
|
+
@focusin=${this.focusCurrentValue}
|
|
758
|
+
></slot>
|
|
759
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}ae.elementDefinitions={},ae.styles=ne,le([o.property()],ae.prototype,"name",void 0),le([o.queryAssignedElements()],ae.prototype,"radioButtons",void 0),i.customElement("ft-radio")(re),i.customElement("ft-radio-group")(ae);const he={borderRadiusM:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusM,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:i.FtCssVariableFactory.external(Ot.fontFamily,"Body2 typography"),fontSize:i.FtCssVariableFactory.external(Ot.fontSize,"Body2 typography"),fontWeight:i.FtCssVariableFactory.external(Ot.fontWeight,"Body2 typography"),letterSpacing:i.FtCssVariableFactory.external(Ot.letterSpacing,"Body2 typography"),lineHeight:i.FtCssVariableFactory.external(Ot.lineHeight,"Body2 typography"),textTransform:i.FtCssVariableFactory.external(Ot.textTransform,"Body2 typography")},pe=e.css`
|
|
760
|
+
.ft-filter-level--container {
|
|
761
|
+
display: flex;
|
|
762
|
+
flex-direction: column;
|
|
763
|
+
}
|
|
714
764
|
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
765
|
+
.ft-filter-level--container > * {
|
|
766
|
+
padding: 0 10px;
|
|
767
|
+
}
|
|
718
768
|
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
769
|
+
.ft-filter-level--go-back {
|
|
770
|
+
flex-shrink: 0;
|
|
771
|
+
text-decoration: none;
|
|
772
|
+
position: relative;
|
|
773
|
+
border-radius: ${he.borderRadiusM};
|
|
774
|
+
overflow: hidden;
|
|
775
|
+
display: flex;
|
|
776
|
+
align-items: center;
|
|
777
|
+
padding: 4px 4px;
|
|
778
|
+
gap: 4px;
|
|
779
|
+
cursor: pointer;
|
|
780
|
+
color: ${he.colorOnSurface};
|
|
781
|
+
}
|
|
722
782
|
|
|
723
|
-
|
|
783
|
+
.ft-filter-level--go-back:focus {
|
|
784
|
+
outline: none;
|
|
785
|
+
}
|
|
724
786
|
|
|
725
|
-
|
|
726
|
-
|
|
787
|
+
.ft-filter-level--go-back ft-icon {
|
|
788
|
+
flex-shrink: 0;
|
|
789
|
+
}
|
|
727
790
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
791
|
+
.ft-filter-level--go-back ft-typography {
|
|
792
|
+
display: block;
|
|
793
|
+
flex-grow: 1;
|
|
794
|
+
flex-shrink: 0;
|
|
795
|
+
}
|
|
731
796
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
797
|
+
.ft-filter-level--option {
|
|
798
|
+
display: flex;
|
|
799
|
+
align-items: center;
|
|
800
|
+
max-width: 100%;
|
|
801
|
+
}
|
|
735
802
|
|
|
803
|
+
.ft-filter-level--option ft-button {
|
|
804
|
+
margin-right: -10px;
|
|
805
|
+
flex-shrink: 0;
|
|
806
|
+
}
|
|
736
807
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
808
|
+
ft-button {
|
|
809
|
+
${i.setVariable(Ai.color,he.colorOnSurface)};
|
|
810
|
+
}
|
|
740
811
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
812
|
+
ft-radio, ft-checkbox {
|
|
813
|
+
flex-shrink: 1;
|
|
814
|
+
flex-grow: 1;
|
|
815
|
+
display: flex;
|
|
816
|
+
max-width: calc(100% + 10px);
|
|
817
|
+
margin-left: -10px;
|
|
818
|
+
word-break: break-word;
|
|
819
|
+
}
|
|
745
820
|
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
@change=${this.onChange}
|
|
752
|
-
@keydown=${this.onKeyDown}
|
|
753
|
-
@focusin=${this.focusCurrentValue}
|
|
754
|
-
></slot>
|
|
755
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Qi.elementDefinitions={},Qi.styles=e.css`
|
|
756
|
-
:host {
|
|
757
|
-
display: contents;
|
|
758
|
-
}
|
|
759
|
-
`,Ji([o.property()],Qi.prototype,"name",void 0),Ji([o.queryAssignedElements()],Qi.prototype,"radioButtons",void 0),i.customElement("ft-radio")(Yi),i.customElement("ft-radio-group")(Qi);var te=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const ie={borderRadiusM:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusM,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:i.FtCssVariableFactory.external(Ct.fontFamily,"Body2 typography"),fontSize:i.FtCssVariableFactory.external(Ct.fontSize,"Body2 typography"),fontWeight:i.FtCssVariableFactory.external(Ct.fontWeight,"Body2 typography"),letterSpacing:i.FtCssVariableFactory.external(Ct.letterSpacing,"Body2 typography"),lineHeight:i.FtCssVariableFactory.external(Ct.lineHeight,"Body2 typography"),textTransform:i.FtCssVariableFactory.external(Ct.textTransform,"Body2 typography")};class ee extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,i;return null!==(i=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==i?i:0}render(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const i=t.slice(0,this.limit);return e.html`
|
|
821
|
+
.ft-filter-level--no-values {
|
|
822
|
+
margin: 10px 0;
|
|
823
|
+
color: ${he.colorOnSurfaceMedium};
|
|
824
|
+
}
|
|
825
|
+
`;var fe=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class ce extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,i;return null!==(i=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==i?i:0}render(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const i=t.slice(0,this.limit);return e.html`
|
|
760
826
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
761
827
|
${null==this.parent?null:e.html`
|
|
762
828
|
<div tabindex="0"
|
|
@@ -805,7 +871,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
805
871
|
data-value="${t.value}"
|
|
806
872
|
.checked=${t.selected}
|
|
807
873
|
.disabled=${this.disabled}
|
|
808
|
-
.indeterminate=${
|
|
874
|
+
.indeterminate=${ri(null!==(i=t.subOptions)&&void 0!==i?i:[],(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]})).some((t=>t.selected))}
|
|
809
875
|
@change=${i=>this.optionsChanged(i,t)}>
|
|
810
876
|
${t.label}
|
|
811
877
|
</ft-checkbox>
|
|
@@ -820,73 +886,132 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
820
886
|
@change=${t=>t.stopPropagation()}>
|
|
821
887
|
${t.label}
|
|
822
888
|
</ft-radio>
|
|
823
|
-
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
889
|
+
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}ce.elementDefinitions={"ft-button":Hi,"ft-ripple":bi,"ft-typography":si,"ft-checkbox":Yi,"ft-icon":Mi,"ft-radio":re},ce.styles=pe,fe([o.property({type:String})],ce.prototype,"id",void 0),fe([o.property({type:Object})],ce.prototype,"parent",void 0),fe([o.property({type:Array})],ce.prototype,"options",void 0),fe([o.property({type:Boolean})],ce.prototype,"multivalued",void 0),fe([o.property({type:Boolean})],ce.prototype,"disabled",void 0),fe([o.property({type:Boolean})],ce.prototype,"hideSelectedOptions",void 0),fe([o.property({type:Boolean})],ce.prototype,"preventNavigation",void 0),fe([o.property({type:String})],ce.prototype,"filter",void 0),fe([o.property({type:String})],ce.prototype,"moreValuesButtonLabel",void 0),fe([o.property({type:String})],ce.prototype,"noValuesLabel",void 0),fe([o.property({type:Number})],ce.prototype,"displayedValuesLimit",void 0),fe([o.query(".ft-filter-level--container")],ce.prototype,"container",void 0),fe([o.state()],ce.prototype,"displayedPages",void 0);const de={buttonsColor:i.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color",i.designSystemVariables.colorPrimary),buttonsZIndex:i.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:i.FtCssVariableFactory.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system")},ue=e.css`
|
|
890
|
+
.ft-snap-scroll {
|
|
891
|
+
box-sizing: border-box;
|
|
892
|
+
position: relative;
|
|
893
|
+
display: flex;
|
|
828
894
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
}
|
|
895
|
+
--ft-snap-scroll-transparent-color: transparent;
|
|
896
|
+
}
|
|
832
897
|
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
overflow: hidden;
|
|
839
|
-
display: flex;
|
|
840
|
-
align-items: center;
|
|
841
|
-
padding: 4px 4px;
|
|
842
|
-
gap: 4px;
|
|
843
|
-
cursor: pointer;
|
|
844
|
-
color: ${ie.colorOnSurface};
|
|
845
|
-
}
|
|
898
|
+
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
899
|
+
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
900
|
+
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
901
|
+
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
902
|
+
}
|
|
846
903
|
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
904
|
+
.ft-snap-scroll,
|
|
905
|
+
.ft-snap-scroll--content {
|
|
906
|
+
overflow: hidden;
|
|
907
|
+
}
|
|
850
908
|
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
909
|
+
.ft-snap-scroll--limit-size,
|
|
910
|
+
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
911
|
+
width: 100%;
|
|
912
|
+
height: 100%;
|
|
913
|
+
}
|
|
854
914
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
915
|
+
.ft-snap-scroll--content {
|
|
916
|
+
flex-grow: 1;
|
|
917
|
+
flex-shrink: 1;
|
|
918
|
+
box-sizing: border-box;
|
|
919
|
+
scroll-snap-align: start;
|
|
920
|
+
display: flex;
|
|
921
|
+
flex-wrap: nowrap;
|
|
922
|
+
align-items: flex-start;
|
|
923
|
+
justify-content: flex-start;
|
|
924
|
+
gap: ${de.gap};
|
|
925
|
+
}
|
|
860
926
|
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
max-width: 100%;
|
|
865
|
-
}
|
|
927
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
928
|
+
display: none;
|
|
929
|
+
}
|
|
866
930
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
931
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
932
|
+
-ms-overflow-style: none;
|
|
933
|
+
scrollbar-width: none;
|
|
934
|
+
}
|
|
871
935
|
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
936
|
+
.ft-snap-scroll--content::slotted(*) {
|
|
937
|
+
flex-shrink: 0;
|
|
938
|
+
flex-grow: 1;
|
|
939
|
+
max-height: 100%;
|
|
940
|
+
max-width: 100%;
|
|
941
|
+
}
|
|
875
942
|
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
max-width: calc(100% + 10px);
|
|
881
|
-
margin-left: -10px;
|
|
882
|
-
word-break: break-word;
|
|
883
|
-
}
|
|
943
|
+
.ft-snap-scroll--horizontal,
|
|
944
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
945
|
+
width: 100%;
|
|
946
|
+
}
|
|
884
947
|
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
948
|
+
.ft-snap-scroll--vertical,
|
|
949
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
950
|
+
height: 100%;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
954
|
+
flex-direction: row;
|
|
955
|
+
overflow-x: auto;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
959
|
+
flex-direction: column;
|
|
960
|
+
overflow-y: auto;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
.ft-snap-scroll--previous,
|
|
964
|
+
.ft-snap-scroll--next {
|
|
965
|
+
position: absolute;
|
|
966
|
+
display: flex;
|
|
967
|
+
z-index: ${de.buttonsZIndex};
|
|
968
|
+
opacity: 1;
|
|
969
|
+
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
970
|
+
${i.setVariable(Ai.backgroundColor,"transparent")};
|
|
971
|
+
${i.setVariable(Ai.color,de.buttonsColor)};
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
.ft-snap-scroll--previous[hidden],
|
|
975
|
+
.ft-snap-scroll--next[hidden] {
|
|
976
|
+
z-index: -1;
|
|
977
|
+
opacity: 0;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
981
|
+
top: 0;
|
|
982
|
+
left: -1px;
|
|
983
|
+
bottom: 0;
|
|
984
|
+
background: linear-gradient(to right, ${de.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
988
|
+
top: -1px;
|
|
989
|
+
left: 0;
|
|
990
|
+
right: 0;
|
|
991
|
+
background: linear-gradient(to bottom, ${de.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
995
|
+
top: 0;
|
|
996
|
+
right: -1px;
|
|
997
|
+
bottom: 0;
|
|
998
|
+
background: linear-gradient(to left, ${de.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1002
|
+
left: 0;
|
|
1003
|
+
right: 0;
|
|
1004
|
+
bottom: -1px;
|
|
1005
|
+
background: linear-gradient(to top, ${de.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1009
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1010
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1011
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1012
|
+
background-color: ${de.colorSurface};
|
|
1013
|
+
}
|
|
1014
|
+
`;var ve=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class be extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class ge extends i.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new i.Debouncer(200),this.updateScrollDebouncer=new i.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let i=this.elements[t];if(i){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,e=this.contentSlot[this.scrollAttribute]+this.prevSize;(i[this.offsetAttribute]<e||i[this.offsetAttribute]+i[this.sizeAttribute]>t)&&this.scrollToElement(i)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=r.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":i.isSafari}),o=this.controls&&this.withScroll;return e.html`
|
|
890
1015
|
<div part="container" class="${t}">
|
|
891
1016
|
<ft-button
|
|
892
1017
|
class="ft-snap-scroll--previous"
|
|
@@ -910,201 +1035,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
910
1035
|
@click=${this.next}
|
|
911
1036
|
></ft-button>
|
|
912
1037
|
</div>
|
|
913
|
-
`}updated(t){var i;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(i=this.listenedContainer)||void 0===i||i.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
914
|
-
.ft-snap-scroll {
|
|
915
|
-
box-sizing: border-box;
|
|
916
|
-
position: relative;
|
|
917
|
-
display: flex;
|
|
918
|
-
|
|
919
|
-
--ft-snap-scroll-transparent-color: transparent;
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
923
|
-
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
924
|
-
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
925
|
-
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
.ft-snap-scroll,
|
|
929
|
-
.ft-snap-scroll--content {
|
|
930
|
-
overflow: hidden;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
.ft-snap-scroll--limit-size,
|
|
934
|
-
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
935
|
-
width: 100%;
|
|
936
|
-
height: 100%;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
.ft-snap-scroll--content {
|
|
940
|
-
flex-grow: 1;
|
|
941
|
-
flex-shrink: 1;
|
|
942
|
-
box-sizing: border-box;
|
|
943
|
-
scroll-snap-align: start;
|
|
944
|
-
display: flex;
|
|
945
|
-
flex-wrap: nowrap;
|
|
946
|
-
align-items: flex-start;
|
|
947
|
-
justify-content: flex-start;
|
|
948
|
-
gap: ${se.gap};
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
952
|
-
display: none;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
956
|
-
-ms-overflow-style: none;
|
|
957
|
-
scrollbar-width: none;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
.ft-snap-scroll--content::slotted(*) {
|
|
961
|
-
flex-shrink: 0;
|
|
962
|
-
flex-grow: 1;
|
|
963
|
-
max-height: 100%;
|
|
964
|
-
max-width: 100%;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
.ft-snap-scroll--horizontal,
|
|
968
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
969
|
-
width: 100%;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
.ft-snap-scroll--vertical,
|
|
973
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
974
|
-
height: 100%;
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
978
|
-
flex-direction: row;
|
|
979
|
-
overflow-x: auto;
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
983
|
-
flex-direction: column;
|
|
984
|
-
overflow-y: auto;
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
.ft-snap-scroll--previous,
|
|
988
|
-
.ft-snap-scroll--next {
|
|
989
|
-
position: absolute;
|
|
990
|
-
display: flex;
|
|
991
|
-
z-index: ${se.buttonsZIndex};
|
|
992
|
-
opacity: 1;
|
|
993
|
-
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
994
|
-
${i.setVariable(Ti.backgroundColor,"transparent")};
|
|
995
|
-
${i.setVariable(Ti.color,se.buttonsColor)};
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
.ft-snap-scroll--previous[hidden],
|
|
999
|
-
.ft-snap-scroll--next[hidden] {
|
|
1000
|
-
z-index: -1;
|
|
1001
|
-
opacity: 0;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1005
|
-
top: 0;
|
|
1006
|
-
left: -1px;
|
|
1007
|
-
bottom: 0;
|
|
1008
|
-
background: linear-gradient(to right, ${se.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1012
|
-
top: -1px;
|
|
1013
|
-
left: 0;
|
|
1014
|
-
right: 0;
|
|
1015
|
-
background: linear-gradient(to bottom, ${se.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1019
|
-
top: 0;
|
|
1020
|
-
right: -1px;
|
|
1021
|
-
bottom: 0;
|
|
1022
|
-
background: linear-gradient(to left, ${se.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1026
|
-
left: 0;
|
|
1027
|
-
right: 0;
|
|
1028
|
-
bottom: -1px;
|
|
1029
|
-
background: linear-gradient(to top, ${se.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1033
|
-
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1034
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1035
|
-
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1036
|
-
background-color: ${se.colorSurface};
|
|
1037
|
-
}
|
|
1038
|
-
`,oe([o.property({type:Boolean})],ne.prototype,"horizontal",void 0),oe([o.property({type:Boolean})],ne.prototype,"hideScrollbar",void 0),oe([o.property({type:Boolean})],ne.prototype,"controls",void 0),oe([o.property({type:Boolean})],ne.prototype,"limitSize",void 0),oe([o.state()],ne.prototype,"elements",void 0),oe([o.state()],ne.prototype,"currentElement",void 0),oe([o.state()],ne.prototype,"withScroll",void 0),oe([o.state()],ne.prototype,"startReached",void 0),oe([o.state()],ne.prototype,"endReached",void 0),oe([o.query(".ft-snap-scroll--content")],ne.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(ne);var le=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const ae={colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),transitionDuration:i.FtCssVariableFactory.external(i.designSystemVariables.transitionDuration,"Design system"),transitionTimingFunction:i.FtCssVariableFactory.external(i.designSystemVariables.transitionTimingFunction,"Design system")};class he extends CustomEvent{constructor(t){super("change",{detail:t})}}class pe extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new i.Debouncer(300),this.changeDebouncer=new i.Debouncer(10)}get flatOptions(){return si(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}render(){var t,i;const o=this.flatOptions.some((t=>t.selected));let s=this.withScroll||this.filter||null!==(i=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==i&&i;return e.html`
|
|
1039
|
-
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1040
|
-
part="container">
|
|
1041
|
-
${this.label||o?e.html`
|
|
1042
|
-
<div class="ft-filter--header" part="header">
|
|
1043
|
-
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1044
|
-
</ft-typography>
|
|
1045
|
-
${o?e.html`
|
|
1046
|
-
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1047
|
-
${this.clearButtonLabel}
|
|
1048
|
-
</ft-button>
|
|
1049
|
-
`:null}
|
|
1050
|
-
</div>
|
|
1051
|
-
`:null}
|
|
1052
|
-
<div class="ft-filter--filter" ?hidden=${!s}>
|
|
1053
|
-
<input type="search"
|
|
1054
|
-
part="input"
|
|
1055
|
-
class="ft-typography--caption"
|
|
1056
|
-
?disabled=${!s}
|
|
1057
|
-
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1058
|
-
@search=${this.onFilterChange}
|
|
1059
|
-
@keyup=${this.onFilterChange}>
|
|
1060
|
-
</div>
|
|
1061
|
-
<div class="ft-filter--values">
|
|
1062
|
-
${this.renderLevels()}
|
|
1063
|
-
</div>
|
|
1064
|
-
<slot class="ft-filter--slot"
|
|
1065
|
-
@slotchange=${this.updateOptionsFromSlot}
|
|
1066
|
-
@option-change=${this.optionsChanged}></slot>
|
|
1067
|
-
</div>
|
|
1068
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((i=>t.has(i)))}}contentAvailableCallback(t){var i,e;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(i=this.levelsContainer)||void 0===i||i.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(e=this.levelsContainer)||void 0===e||e.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,i=t.filter((t=>t.selected)),o=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,s=o<0?"ft-filter--level-center":"ft-filter--level-left";return e.html`
|
|
1069
|
-
${this.raiseSelectedOptions&&i.length>0?e.html`
|
|
1070
|
-
<ft-filter-level
|
|
1071
|
-
id="${this.id}"
|
|
1072
|
-
?multivalued=${this.multivalued}
|
|
1073
|
-
?disabled=${this.disabled}
|
|
1074
|
-
preventNavigation
|
|
1075
|
-
.options=${i}
|
|
1076
|
-
@change=${this.onChange}
|
|
1077
|
-
part="values selected-values"
|
|
1078
|
-
.exportpartsPrefixes=${["values","selected-values"]}
|
|
1079
|
-
></ft-filter-level>
|
|
1080
|
-
<div class="ft-filter--separator">
|
|
1081
|
-
`:null}
|
|
1082
|
-
<ft-snap-scroll horizontal hideScrollbar
|
|
1083
|
-
class="ft-filter--levels"
|
|
1084
|
-
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1085
|
-
${this.renderLevel(s,this.options)}
|
|
1086
|
-
${this.displayedLevels.map((i=>t.find((t=>t.value===i)))).map(((t,i)=>{var e;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":i===o?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(e=null==t?void 0:t.subOptions)&&void 0!==e?e:[],t)}))}
|
|
1087
|
-
</ft-snap-scroll>
|
|
1088
|
-
`}renderLevel(t,i,o){return e.html`
|
|
1089
|
-
<ft-filter-level
|
|
1090
|
-
class="${t}"
|
|
1091
|
-
id="${this.id}"
|
|
1092
|
-
filter="${this.filter}"
|
|
1093
|
-
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1094
|
-
?multivalued=${this.multivalued}
|
|
1095
|
-
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1096
|
-
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1097
|
-
.parent=${o}
|
|
1098
|
-
.options=${i}
|
|
1099
|
-
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1100
|
-
@change=${this.onChange}
|
|
1101
|
-
@go-back=${this.goBack}
|
|
1102
|
-
@display-level=${this.onDisplayLevel}
|
|
1103
|
-
part="values available-values"
|
|
1104
|
-
.exportpartsPrefixes=${["values","available-values"]}
|
|
1105
|
-
noValuesLabel="${this.noValuesLabel}"
|
|
1106
|
-
></ft-filter-level>
|
|
1107
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const i=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new he(i)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,i;this.filter=null!==(i=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==i?i:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}pe.elementDefinitions={"ft-button":Ai,"ft-filter-level":ee,"ft-snap-scroll":ne,"ft-typography":oi},pe.styles=[Qt,e.css`
|
|
1038
|
+
`}updated(t){var i;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(i=this.listenedContainer)||void 0===i||i.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new be(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const i=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<i&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var i,e;t&&(this.horizontal?null===(i=this.contentSlot)||void 0===i||i.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(e=this.contentSlot)||void 0===e||e.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,i;this.elements=null!==(i=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==i?i:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let i=0;i<this.elements.length;i++)(t<0||this.getDistanceFromStart(this.elements[i])<this.getDistanceFromStart(this.elements[t]))&&(t=i);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const i=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-i)}}ge.elementDefinitions={"ft-button":Hi},ge.styles=ue,ve([o.property({type:Boolean})],ge.prototype,"horizontal",void 0),ve([o.property({type:Boolean})],ge.prototype,"hideScrollbar",void 0),ve([o.property({type:Boolean})],ge.prototype,"controls",void 0),ve([o.property({type:Boolean})],ge.prototype,"limitSize",void 0),ve([o.state()],ge.prototype,"elements",void 0),ve([o.state()],ge.prototype,"currentElement",void 0),ve([o.state()],ge.prototype,"withScroll",void 0),ve([o.state()],ge.prototype,"startReached",void 0),ve([o.state()],ge.prototype,"endReached",void 0),ve([o.query(".ft-snap-scroll--content")],ge.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(ge);const xe={colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),transitionDuration:i.FtCssVariableFactory.external(i.designSystemVariables.transitionDuration,"Design system"),transitionTimingFunction:i.FtCssVariableFactory.external(i.designSystemVariables.transitionTimingFunction,"Design system")},ye=[Jt,e.css`
|
|
1108
1039
|
:host {
|
|
1109
1040
|
display: flex;
|
|
1110
1041
|
max-height: 100%;
|
|
@@ -1117,7 +1048,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1117
1048
|
flex-direction: column;
|
|
1118
1049
|
max-height: 100%;
|
|
1119
1050
|
max-width: 100%;
|
|
1120
|
-
color: ${
|
|
1051
|
+
color: ${xe.colorOnSurface};
|
|
1121
1052
|
}
|
|
1122
1053
|
|
|
1123
1054
|
.ft-filter--header {
|
|
@@ -1127,13 +1058,13 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1127
1058
|
flex-shrink: 0;
|
|
1128
1059
|
padding: 0 10px;
|
|
1129
1060
|
margin-bottom: 8px;
|
|
1130
|
-
${i.setVariable(
|
|
1061
|
+
${i.setVariable(q.fontSize,"14px")};
|
|
1131
1062
|
}
|
|
1132
1063
|
|
|
1133
1064
|
.ft-filter--header ft-button {
|
|
1134
1065
|
flex-shrink: 0;
|
|
1135
1066
|
margin-left: auto;
|
|
1136
|
-
${i.setVariable(
|
|
1067
|
+
${i.setVariable(Ai.iconSize,"18px")};
|
|
1137
1068
|
}
|
|
1138
1069
|
|
|
1139
1070
|
.ft-filter--label {
|
|
@@ -1141,8 +1072,8 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1141
1072
|
flex-shrink: 1;
|
|
1142
1073
|
flex-grow: 1;
|
|
1143
1074
|
word-break: break-word;
|
|
1144
|
-
${i.setVariable(
|
|
1145
|
-
${i.setVariable(
|
|
1075
|
+
${i.setVariable(q.lineHeight,"22px")};
|
|
1076
|
+
${i.setVariable(q.fontWeight,"bold")};
|
|
1146
1077
|
}
|
|
1147
1078
|
|
|
1148
1079
|
.ft-filter--filter {
|
|
@@ -1153,8 +1084,8 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1153
1084
|
padding: 0 10px;
|
|
1154
1085
|
overflow: hidden;
|
|
1155
1086
|
height: 32px;
|
|
1156
|
-
transition: height ${
|
|
1157
|
-
margin ${
|
|
1087
|
+
transition: height ${xe.transitionDuration} ${xe.transitionTimingFunction},
|
|
1088
|
+
margin ${xe.transitionDuration} ${xe.transitionTimingFunction};
|
|
1158
1089
|
transition-delay: 500ms;
|
|
1159
1090
|
}
|
|
1160
1091
|
|
|
@@ -1167,15 +1098,15 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1167
1098
|
display: block;
|
|
1168
1099
|
width: 100%;
|
|
1169
1100
|
border-radius: 4px;
|
|
1170
|
-
border: 1px solid ${
|
|
1101
|
+
border: 1px solid ${xe.colorOutline};
|
|
1171
1102
|
padding: 4px;
|
|
1172
|
-
background-color: ${
|
|
1173
|
-
color: ${
|
|
1174
|
-
outline-color: ${
|
|
1103
|
+
background-color: ${xe.colorSurface};
|
|
1104
|
+
color: ${xe.colorOnSurface};
|
|
1105
|
+
outline-color: ${xe.colorPrimary};
|
|
1175
1106
|
}
|
|
1176
1107
|
|
|
1177
1108
|
input::placeholder {
|
|
1178
|
-
color: ${
|
|
1109
|
+
color: ${xe.colorOnSurfaceMedium};
|
|
1179
1110
|
}
|
|
1180
1111
|
|
|
1181
1112
|
.ft-filter--values {
|
|
@@ -1187,7 +1118,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1187
1118
|
}
|
|
1188
1119
|
|
|
1189
1120
|
.ft-filter--separator {
|
|
1190
|
-
border-top: 1px solid ${
|
|
1121
|
+
border-top: 1px solid ${xe.colorOutline};
|
|
1191
1122
|
margin: 4px 10px;
|
|
1192
1123
|
}
|
|
1193
1124
|
|
|
@@ -1212,6 +1143,75 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1212
1143
|
slot {
|
|
1213
1144
|
display: none;
|
|
1214
1145
|
}
|
|
1215
|
-
`]
|
|
1146
|
+
`];var me=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class $e extends CustomEvent{constructor(t){super("change",{detail:t})}}class ke extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new i.Debouncer(300),this.changeDebouncer=new i.Debouncer(10)}get flatOptions(){return ri(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}render(){var t,i;const o=this.flatOptions.some((t=>t.selected));let s=this.withScroll||this.filter||null!==(i=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==i&&i;return e.html`
|
|
1147
|
+
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1148
|
+
part="container">
|
|
1149
|
+
${this.label||o?e.html`
|
|
1150
|
+
<div class="ft-filter--header" part="header">
|
|
1151
|
+
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1152
|
+
</ft-typography>
|
|
1153
|
+
${o?e.html`
|
|
1154
|
+
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1155
|
+
${this.clearButtonLabel}
|
|
1156
|
+
</ft-button>
|
|
1157
|
+
`:null}
|
|
1158
|
+
</div>
|
|
1159
|
+
`:null}
|
|
1160
|
+
<div class="ft-filter--filter" ?hidden=${!s}>
|
|
1161
|
+
<input type="search"
|
|
1162
|
+
part="input"
|
|
1163
|
+
class="ft-typography--caption"
|
|
1164
|
+
?disabled=${!s}
|
|
1165
|
+
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1166
|
+
@search=${this.onFilterChange}
|
|
1167
|
+
@keyup=${this.onFilterChange}>
|
|
1168
|
+
</div>
|
|
1169
|
+
<div class="ft-filter--values">
|
|
1170
|
+
${this.renderLevels()}
|
|
1171
|
+
</div>
|
|
1172
|
+
<slot class="ft-filter--slot"
|
|
1173
|
+
@slotchange=${this.updateOptionsFromSlot}
|
|
1174
|
+
@option-change=${this.optionsChanged}></slot>
|
|
1175
|
+
</div>
|
|
1176
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((i=>t.has(i)))}}contentAvailableCallback(t){var i,e;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(i=this.levelsContainer)||void 0===i||i.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(e=this.levelsContainer)||void 0===e||e.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,i=t.filter((t=>t.selected)),o=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,s=o<0?"ft-filter--level-center":"ft-filter--level-left";return e.html`
|
|
1177
|
+
${this.raiseSelectedOptions&&i.length>0?e.html`
|
|
1178
|
+
<ft-filter-level
|
|
1179
|
+
id="${this.id}"
|
|
1180
|
+
?multivalued=${this.multivalued}
|
|
1181
|
+
?disabled=${this.disabled}
|
|
1182
|
+
preventNavigation
|
|
1183
|
+
.options=${i}
|
|
1184
|
+
@change=${this.onChange}
|
|
1185
|
+
part="values selected-values"
|
|
1186
|
+
.exportpartsPrefixes=${["values","selected-values"]}
|
|
1187
|
+
></ft-filter-level>
|
|
1188
|
+
<div class="ft-filter--separator">
|
|
1189
|
+
`:null}
|
|
1190
|
+
<ft-snap-scroll horizontal hideScrollbar
|
|
1191
|
+
class="ft-filter--levels"
|
|
1192
|
+
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1193
|
+
${this.renderLevel(s,this.options)}
|
|
1194
|
+
${this.displayedLevels.map((i=>t.find((t=>t.value===i)))).map(((t,i)=>{var e;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":i===o?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(e=null==t?void 0:t.subOptions)&&void 0!==e?e:[],t)}))}
|
|
1195
|
+
</ft-snap-scroll>
|
|
1196
|
+
`}renderLevel(t,i,o){return e.html`
|
|
1197
|
+
<ft-filter-level
|
|
1198
|
+
class="${t}"
|
|
1199
|
+
id="${this.id}"
|
|
1200
|
+
filter="${this.filter}"
|
|
1201
|
+
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1202
|
+
?multivalued=${this.multivalued}
|
|
1203
|
+
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1204
|
+
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1205
|
+
.parent=${o}
|
|
1206
|
+
.options=${i}
|
|
1207
|
+
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1208
|
+
@change=${this.onChange}
|
|
1209
|
+
@go-back=${this.goBack}
|
|
1210
|
+
@display-level=${this.onDisplayLevel}
|
|
1211
|
+
part="values available-values"
|
|
1212
|
+
.exportpartsPrefixes=${["values","available-values"]}
|
|
1213
|
+
noValuesLabel="${this.noValuesLabel}"
|
|
1214
|
+
></ft-filter-level>
|
|
1215
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const i=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new $e(i)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,i;this.filter=null!==(i=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==i?i:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}ke.elementDefinitions={"ft-button":Hi,"ft-filter-level":ce,"ft-snap-scroll":ge,"ft-typography":si},ke.styles=ye,me([o.property({type:String})],ke.prototype,"id",void 0),me([o.property({type:String})],ke.prototype,"label",void 0),me([o.property({type:String})],ke.prototype,"filterPlaceHolder",void 0),me([o.property({type:String})],ke.prototype,"clearButtonLabel",void 0),me([o.property({type:String})],ke.prototype,"moreValuesButtonLabel",void 0),me([o.property({type:String})],ke.prototype,"noValuesLabel",void 0),me([i.jsonProperty([])],ke.prototype,"options",void 0),me([o.property({type:Boolean})],ke.prototype,"multivalued",void 0),me([o.property({type:Boolean})],ke.prototype,"disabled",void 0),me([o.property({type:Boolean})],ke.prototype,"raiseSelectedOptions",void 0),me([o.property({type:Number})],ke.prototype,"displayedValuesLimit",void 0),me([o.query(".ft-filter--slot")],ke.prototype,"slotElement",void 0),me([o.query(".ft-filter--container")],ke.prototype,"container",void 0),me([o.query(".ft-filter--values")],ke.prototype,"valuesContainer",void 0),me([o.query(".ft-filter--levels")],ke.prototype,"levelsContainer",void 0),me([o.query(".ft-filter--levels ft-filter-level:last-child")],ke.prototype,"lastLevel",void 0),me([o.query(".ft-filter--filter input")],ke.prototype,"filterInput",void 0),me([o.queryAll(".ft-filter--levels ft-filter-level")],ke.prototype,"levels",void 0),me([o.state()],ke.prototype,"withScroll",void 0),me([o.state()],ke.prototype,"filter",void 0),me([o.state()],ke.prototype,"slideIn",void 0),me([o.state()],ke.prototype,"slideOut",void 0);var we=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class ze extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1216
1216
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1217
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1217
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}ze.elementDefinitions={},we([o.property({type:String})],ze.prototype,"label",void 0),we([o.property({type:Object,converter:t=>t})],ze.prototype,"value",void 0),we([o.property({type:Boolean,reflect:!0})],ze.prototype,"selected",void 0),we([o.property({type:Object})],ze.prototype,"subOptions",void 0),we([o.query(".ft-filter-option--slot")],ze.prototype,"slotElement",void 0),i.customElement("ft-filter")(ke),i.customElement("ft-filter-option")(ze),t.FtFilter=ke,t.FtFilterChangeEvent=$e,t.FtFilterCssVariables=xe,t.FtFilterOption=ze,t.styles=ye,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|