@fluid-topics/ft-select 0.3.11 → 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-select.css.d.ts +18 -0
- package/build/ft-select.css.js +171 -0
- package/build/ft-select.d.ts +1 -31
- package/build/ft-select.js +7 -170
- package/build/ft-select.light.js +471 -471
- package/build/ft-select.min.js +474 -474
- package/build/ft-select.properties.d.ts +16 -0
- package/build/ft-select.properties.js +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +7 -7
package/build/ft-select.light.js
CHANGED
|
@@ -10,109 +10,225 @@ var r;const p=globalThis.trustedTypes,a=p?p.createPolicy("lit-html",{createHTML:
|
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const W=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:W}),F=new Map,G=(t=>(e,...i)=>{const o=i.length;let s,l;const n=[],r=[];let p,a=0,f=!1;for(;a<o;){for(p=e[a];a<o&&void 0!==(l=i[a],s=K(l));)p+=s+e[++a],f=!0;r.push(l),n.push(p),a++}if(a===o&&n.push(e[o]),f){const t=n.join("$$lit$$");void 0===(e=F.get(t))&&(n.raw=n,F.set(t,e=n)),i=r}return t(e,...i)})(z);var H
|
|
13
|
+
const W=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:W}),F=new Map,G=(t=>(e,...i)=>{const o=i.length;let s,l;const n=[],r=[];let p,a=0,f=!1;for(;a<o;){for(p=e[a];a<o&&void 0!==(l=i[a],s=K(l));)p+=s+e[++a],f=!0;r.push(l),n.push(p),a++}if(a===o&&n.push(e[o]),f){const t=n.join("$$lit$$");void 0===(e=F.get(t))&&(n.raw=n,F.set(t,e=n)),i=r}return t(e,...i)})(z);var H;!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"}(H||(H={}));const q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),L=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),X={fontFamily:L,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",q),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),V=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),et=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),it=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",q),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",L),at=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",L),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),mt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",L),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit")},$t=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",L),wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),Et={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",L),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit")},Nt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",L),Ct=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",L),Bt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Rt=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",L),Wt=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",X.fontSize,"14px"),Kt=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),Pt=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",X.lineHeight,"1.15"),Gt=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase"),Ht=i.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: ${Y};
|
|
16
|
+
font-size: ${J};
|
|
17
|
+
font-weight: ${Q};
|
|
18
|
+
letter-spacing: ${V};
|
|
19
|
+
line-height: ${tt};
|
|
20
|
+
text-transform: ${et};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,qt=i.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: ${it};
|
|
25
|
+
font-size: ${ot};
|
|
26
|
+
font-weight: ${st};
|
|
27
|
+
letter-spacing: ${lt};
|
|
28
|
+
line-height: ${nt};
|
|
29
|
+
text-transform: ${rt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Lt=i.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: ${pt};
|
|
34
|
+
font-size: ${at};
|
|
35
|
+
font-weight: ${ft};
|
|
36
|
+
letter-spacing: ${ht};
|
|
37
|
+
line-height: ${dt};
|
|
38
|
+
text-transform: ${ct};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Xt=i.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: ${yt};
|
|
44
|
+
font-weight: ${xt};
|
|
45
|
+
letter-spacing: ${gt};
|
|
46
|
+
line-height: ${bt};
|
|
47
|
+
text-transform: ${vt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Yt=i.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.fontFamily};
|
|
53
|
+
font-size: ${mt.fontSize};
|
|
54
|
+
font-weight: ${mt.fontWeight};
|
|
55
|
+
letter-spacing: ${mt.letterSpacing};
|
|
56
|
+
line-height: ${mt.lineHeight};
|
|
57
|
+
text-transform: ${mt.textTransform};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,Jt=i.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: ${$t};
|
|
62
|
+
font-size: ${wt};
|
|
63
|
+
font-weight: ${kt};
|
|
64
|
+
letter-spacing: ${zt};
|
|
65
|
+
line-height: ${St};
|
|
66
|
+
text-transform: ${Ot};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Qt=i.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: ${Et.fontFamily};
|
|
71
|
+
font-size: ${Et.fontSize};
|
|
72
|
+
font-weight: ${Et.fontWeight};
|
|
73
|
+
letter-spacing: ${Et.letterSpacing};
|
|
74
|
+
line-height: ${Et.lineHeight};
|
|
75
|
+
text-transform: ${Et.textTransform};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,Vt=i.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: ${Nt};
|
|
80
|
+
font-size: ${Ct};
|
|
81
|
+
font-weight: ${jt};
|
|
82
|
+
letter-spacing: ${At};
|
|
83
|
+
line-height: ${It};
|
|
84
|
+
text-transform: ${Dt};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,te=i.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: ${Mt};
|
|
89
|
+
font-size: ${Bt};
|
|
90
|
+
font-weight: ${_t};
|
|
91
|
+
letter-spacing: ${Ut};
|
|
92
|
+
line-height: ${Zt};
|
|
93
|
+
text-transform: ${Tt};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,ee=i.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: ${Rt};
|
|
98
|
+
font-size: ${Wt};
|
|
99
|
+
font-weight: ${Kt};
|
|
100
|
+
letter-spacing: ${Pt};
|
|
101
|
+
line-height: ${Ft};
|
|
102
|
+
text-transform: ${Gt};
|
|
103
|
+
}
|
|
104
|
+
`,ie=i.css`
|
|
105
|
+
.ft-typography {
|
|
106
|
+
vertical-align: inherit;
|
|
107
|
+
}
|
|
108
|
+
`;var oe=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class se extends e.FtLitElement{constructor(){super(...arguments),this.variant=H.body1}render(){return this.element?G`
|
|
105
109
|
<${P(this.element)}
|
|
106
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
111
|
<slot></slot>
|
|
108
112
|
</${P(this.element)}>
|
|
109
113
|
`:G`
|
|
110
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
`}}se.styles=[Ht,qt,Lt,Xt,Yt,Jt,Qt,Vt,te,ee,ie],oe([o.property()],se.prototype,"element",void 0),oe([o.property()],se.prototype,"variant",void 0),e.customElement("ft-typography")(se);const le={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},ne=i.css`
|
|
116
|
+
.ft-input-label {
|
|
117
|
+
position: absolute;
|
|
118
|
+
inset: 0;
|
|
119
|
+
display: flex;
|
|
120
|
+
background-color: ${le.colorSurface};
|
|
121
|
+
border-radius: ${le.borderRadiusS} ${le.borderRadiusS} 0 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.ft-input-label--outlined {
|
|
125
|
+
border-radius: ${le.borderRadiusS};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ft-input-label {
|
|
129
|
+
border-color: ${le.borderColor};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ft-input-label.ft-input-label--in-error {
|
|
133
|
+
border-color: ${le.colorError}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ft-input-label:before,
|
|
137
|
+
.ft-input-label:after {
|
|
138
|
+
content: "";
|
|
139
|
+
display: flex;
|
|
140
|
+
border-bottom-width: 1px;
|
|
141
|
+
border-bottom-style: solid;
|
|
142
|
+
border-color: inherit;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ft-input-label:before {
|
|
146
|
+
width: ${le.horizontalSpacing};
|
|
147
|
+
flex-shrink: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.ft-input-label:after {
|
|
151
|
+
flex-grow: 1;
|
|
152
|
+
flex-shrink: 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.ft-input-label--text {
|
|
156
|
+
display: flex;
|
|
157
|
+
flex-shrink: 1;
|
|
158
|
+
position: relative;
|
|
159
|
+
border-bottom-width: 1px;
|
|
160
|
+
border-bottom-style: solid;
|
|
161
|
+
border-color: inherit;
|
|
162
|
+
color: ${le.textColor};
|
|
163
|
+
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
164
|
+
${e.setVariable(Et.fontSize,le.fontSize)};
|
|
165
|
+
${e.setVariable(Et.lineHeight,le.fontSize)};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
169
|
+
color: ${le.colorError}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ft-input-label--disabled .ft-input-label--text {
|
|
173
|
+
color: ${le.disabledTextColor};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.ft-input-label--hidden-text {
|
|
177
|
+
padding: 0 4px;
|
|
178
|
+
opacity: 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ft-input-label--floating-text {
|
|
182
|
+
position: absolute;
|
|
183
|
+
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
184
|
+
transition: top 250ms;
|
|
185
|
+
overflow: hidden;
|
|
186
|
+
white-space: nowrap;
|
|
187
|
+
text-overflow: ellipsis;
|
|
188
|
+
padding: ${le.verticalSpacing} 4px;
|
|
189
|
+
margin: calc(${le.verticalSpacing} * -1) 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.ft-input-label--raised .ft-input-label--text {
|
|
193
|
+
${e.setVariable(Et.fontSize,le.raisedFontSize)};
|
|
194
|
+
${e.setVariable(Et.lineHeight,le.raisedFontSize)};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.ft-input-label--raised .ft-input-label--floating-text {
|
|
198
|
+
top: ${le.verticalSpacing};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.ft-input-label--outlined .ft-input-label--text,
|
|
202
|
+
.ft-input-label--outlined:before,
|
|
203
|
+
.ft-input-label--outlined:after {
|
|
204
|
+
border-top-width: 1px;
|
|
205
|
+
border-top-style: solid;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.ft-input-label--outlined:before {
|
|
209
|
+
border-left-width: 1px;
|
|
210
|
+
border-left-style: solid;
|
|
211
|
+
border-radius: ${le.borderRadiusS} 0 0 ${le.borderRadiusS};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.ft-input-label--outlined:after {
|
|
215
|
+
border-right-width: 1px;
|
|
216
|
+
border-right-style: solid;
|
|
217
|
+
border-radius: 0 ${le.borderRadiusS} ${le.borderRadiusS} 0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
221
|
+
padding: 2px 4px;
|
|
222
|
+
z-index: ${le.raisedZIndex};
|
|
223
|
+
background-color: ${le.colorSurface};
|
|
224
|
+
border-radius: ${le.borderRadiusS};
|
|
225
|
+
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
229
|
+
border-top: none;
|
|
230
|
+
}
|
|
231
|
+
`;var re=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class pe extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return i.html`
|
|
116
232
|
<div class="${s.classMap(t)}">
|
|
117
233
|
${this.text?i.html`
|
|
118
234
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -121,123 +237,96 @@ const W=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
121
237
|
</div>
|
|
122
238
|
`:null}
|
|
123
239
|
</div>
|
|
124
|
-
`}}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
border-top-style: solid;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.ft-input-label--outlined:before {
|
|
218
|
-
border-left-width: 1px;
|
|
219
|
-
border-left-style: solid;
|
|
220
|
-
border-radius: ${le.borderRadiusS} 0 0 ${le.borderRadiusS};
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.ft-input-label--outlined:after {
|
|
224
|
-
border-right-width: 1px;
|
|
225
|
-
border-right-style: solid;
|
|
226
|
-
border-radius: 0 ${le.borderRadiusS} ${le.borderRadiusS} 0;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
230
|
-
padding: 2px 4px;
|
|
231
|
-
z-index: ${le.raisedZIndex};
|
|
232
|
-
background-color: ${le.colorSurface};
|
|
233
|
-
border-radius: ${le.borderRadiusS};
|
|
234
|
-
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
238
|
-
border-top: none;
|
|
239
|
-
}
|
|
240
|
-
`],se([o.property({type:String})],ne.prototype,"text",void 0),se([o.property({type:Boolean})],ne.prototype,"raised",void 0),se([o.property({type:Boolean})],ne.prototype,"outlined",void 0),se([o.property({type:Boolean})],ne.prototype,"disabled",void 0),se([o.property({type:Boolean})],ne.prototype,"error",void 0),e.customElement("ft-input-label")(ne);var re=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};const pe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),ae={color:pe,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",pe),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},fe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),he=fe,de=e.FtCssVariableFactory.extend("--ft-ripple-background-color",fe),ce=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),ue=ce,ye=e.FtCssVariableFactory.extend("--ft-ripple-background-color",ce);class xe extends e.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 e.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 e,i;let{x:o,y:s}=this.getCoordinates(t),l=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-l.x:l.width/2),this.originY=Math.round(null!=s?s-l.y:l.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 i.html`
|
|
240
|
+
`}}pe.elementDefinitions={},pe.styles=[Qt,ne],re([o.property({type:String})],pe.prototype,"text",void 0),re([o.property({type:Boolean})],pe.prototype,"raised",void 0),re([o.property({type:Boolean})],pe.prototype,"outlined",void 0),re([o.property({type:Boolean})],pe.prototype,"disabled",void 0),re([o.property({type:Boolean})],pe.prototype,"error",void 0),e.customElement("ft-input-label")(pe);const ae=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),fe={color:ae,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",ae),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},he=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),de=he,ce=e.FtCssVariableFactory.extend("--ft-ripple-background-color",he),ue=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),ye=ue,xe=e.FtCssVariableFactory.extend("--ft-ripple-background-color",ue),ge=i.css`
|
|
241
|
+
:host {
|
|
242
|
+
display: contents;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.ft-ripple {
|
|
246
|
+
position: absolute;
|
|
247
|
+
inset: 0;
|
|
248
|
+
pointer-events: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
252
|
+
overflow: hidden;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.ft-ripple .ft-ripple--background,
|
|
256
|
+
.ft-ripple .ft-ripple--effect {
|
|
257
|
+
position: absolute;
|
|
258
|
+
opacity: 0;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.ft-ripple .ft-ripple--background {
|
|
262
|
+
background-color: ${fe.backgroundColor};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.ft-ripple .ft-ripple--effect {
|
|
266
|
+
background-color: ${fe.color};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
270
|
+
background-color: ${xe};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
274
|
+
background-color: ${ye};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
278
|
+
background-color: ${ce};
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
282
|
+
background-color: ${de};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.ft-ripple .ft-ripple--background {
|
|
286
|
+
top: 0;
|
|
287
|
+
left: 0;
|
|
288
|
+
height: 100%;
|
|
289
|
+
width: 100%;
|
|
290
|
+
transition: opacity 75ms linear;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.ft-ripple .ft-ripple--effect,
|
|
294
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
295
|
+
border-radius: 50%;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.ft-ripple .ft-ripple--effect {
|
|
299
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
300
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
304
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
305
|
+
left: 50%;
|
|
306
|
+
top: 50%;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
310
|
+
transform: translate(-50%, -50%);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
314
|
+
opacity: ${fe.opacityContentOnSurfaceHover};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
318
|
+
opacity: ${fe.opacityContentOnSurfaceSelected};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
322
|
+
opacity: ${fe.opacityContentOnSurfaceFocused};
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
326
|
+
opacity: ${fe.opacityContentOnSurfacePressed};
|
|
327
|
+
transform: translate(-50%, -50%) scale(1);
|
|
328
|
+
}
|
|
329
|
+
`;var be,ve,me=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class $e extends e.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 e.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 e,i;let{x:o,y:s}=this.getCoordinates(t),l=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-l.x:l.width/2),this.originY=Math.round(null!=s?s-l.y:l.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 i.html`
|
|
241
330
|
<style>
|
|
242
331
|
.ft-ripple .ft-ripple--effect,
|
|
243
332
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -254,138 +343,196 @@ const W=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
254
343
|
<div class="ft-ripple--background"></div>
|
|
255
344
|
<div class="ft-ripple--effect"></div>
|
|
256
345
|
</div>
|
|
257
|
-
`}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 e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.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 e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),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 e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),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",i),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 e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}var ge,be;xe.elementDefinitions={},xe.styles=i.css`
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
background-color: ${de};
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
299
|
-
background-color: ${he};
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.ft-ripple .ft-ripple--background {
|
|
303
|
-
top: 0;
|
|
304
|
-
left: 0;
|
|
305
|
-
height: 100%;
|
|
306
|
-
width: 100%;
|
|
307
|
-
transition: opacity 75ms linear;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.ft-ripple .ft-ripple--effect,
|
|
311
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
312
|
-
border-radius: 50%;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.ft-ripple .ft-ripple--effect {
|
|
316
|
-
transform: translate(-50%, -50%) scale(0.15);
|
|
317
|
-
transition: transform 300ms ease, opacity 75ms linear;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
321
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
322
|
-
left: 50%;
|
|
323
|
-
top: 50%;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
327
|
-
transform: translate(-50%, -50%);
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
331
|
-
opacity: ${ae.opacityContentOnSurfaceHover};
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
335
|
-
opacity: ${ae.opacityContentOnSurfaceSelected};
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
339
|
-
opacity: ${ae.opacityContentOnSurfaceFocused};
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
343
|
-
opacity: ${ae.opacityContentOnSurfacePressed};
|
|
344
|
-
transform: translate(-50%, -50%) scale(1);
|
|
345
|
-
}
|
|
346
|
-
`,re([o.property({type:Boolean})],xe.prototype,"primary",void 0),re([o.property({type:Boolean})],xe.prototype,"secondary",void 0),re([o.property({type:Boolean})],xe.prototype,"unbounded",void 0),re([o.property({type:Boolean})],xe.prototype,"activated",void 0),re([o.property({type:Boolean})],xe.prototype,"selected",void 0),re([o.property({type:Boolean})],xe.prototype,"disabled",void 0),re([o.state()],xe.prototype,"hovered",void 0),re([o.state()],xe.prototype,"focused",void 0),re([o.state()],xe.prototype,"pressed",void 0),re([o.state()],xe.prototype,"rippling",void 0),re([o.state()],xe.prototype,"rippleSize",void 0),re([o.state()],xe.prototype,"originX",void 0),re([o.state()],xe.prototype,"originY",void 0),re([o.query(".ft-ripple")],xe.prototype,"ripple",void 0),re([o.query(".ft-ripple--effect")],xe.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(xe),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=""}(ge||(ge={})),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=""}(be||(be={})),new Map([...["abw"].map((t=>[t,be.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,be.AUDIO])),...["avi"].map((t=>[t,be.AVI])),...["chm","xhs"].map((t=>[t,be.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,be.CODE])),...["csv"].map((t=>[t,be.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,be.DITA])),...["epub"].map((t=>[t,be.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,be.EXCEL])),...["flac"].map((t=>[t,be.FLAC])),...["gif"].map((t=>[t,be.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,be.GZIP])),...["html","htm","xhtml"].map((t=>[t,be.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,be.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,be.JPEG])),...["json"].map((t=>[t,be.JSON])),...["m4a","m4p"].map((t=>[t,be.M4A])),...["mov","qt"].map((t=>[t,be.MOV])),...["mp3"].map((t=>[t,be.MP3])),...["mp4","m4v"].map((t=>[t,be.MP4])),...["ogg","oga"].map((t=>[t,be.OGG])),...["pdf","ps"].map((t=>[t,be.PDF])),...["png"].map((t=>[t,be.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,be.POWERPOINT])),...["rar"].map((t=>[t,be.RAR])),...["stp"].map((t=>[t,be.STP])),...["txt","rtf","md","mdown"].map((t=>[t,be.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,be.VIDEO])),...["wav"].map((t=>[t,be.WAV])),...["wma"].map((t=>[t,be.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,be.WORD])),...["xml","xsl","rdf"].map((t=>[t,be.XML])),...["yaml","yml","x-yaml"].map((t=>[t,be.YAML])),...["zip"].map((t=>[t,be.ZIP]))]);var ve,me=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ve||(ve={}));const $e=e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),we=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),ke=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),ze=e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Se=e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset");class Oe extends e.FtLitElement{constructor(){super(...arguments),this.variant=ve.fluid_topics,this.resolvedIcon=i.nothing}render(){return i.html`
|
|
346
|
+
`}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 e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.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 e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),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 e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),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",i),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 e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}$e.elementDefinitions={},$e.styles=ge,me([o.property({type:Boolean})],$e.prototype,"primary",void 0),me([o.property({type:Boolean})],$e.prototype,"secondary",void 0),me([o.property({type:Boolean})],$e.prototype,"unbounded",void 0),me([o.property({type:Boolean})],$e.prototype,"activated",void 0),me([o.property({type:Boolean})],$e.prototype,"selected",void 0),me([o.property({type:Boolean})],$e.prototype,"disabled",void 0),me([o.state()],$e.prototype,"hovered",void 0),me([o.state()],$e.prototype,"focused",void 0),me([o.state()],$e.prototype,"pressed",void 0),me([o.state()],$e.prototype,"rippling",void 0),me([o.state()],$e.prototype,"rippleSize",void 0),me([o.state()],$e.prototype,"originX",void 0),me([o.state()],$e.prototype,"originY",void 0),me([o.query(".ft-ripple")],$e.prototype,"ripple",void 0),me([o.query(".ft-ripple--effect")],$e.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")($e),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=""}(be||(be={})),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=""}(ve||(ve={})),new Map([...["abw"].map((t=>[t,ve.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,ve.AUDIO])),...["avi"].map((t=>[t,ve.AVI])),...["chm","xhs"].map((t=>[t,ve.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,ve.CODE])),...["csv"].map((t=>[t,ve.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ve.DITA])),...["epub"].map((t=>[t,ve.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ve.EXCEL])),...["flac"].map((t=>[t,ve.FLAC])),...["gif"].map((t=>[t,ve.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ve.GZIP])),...["html","htm","xhtml"].map((t=>[t,ve.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,ve.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ve.JPEG])),...["json"].map((t=>[t,ve.JSON])),...["m4a","m4p"].map((t=>[t,ve.M4A])),...["mov","qt"].map((t=>[t,ve.MOV])),...["mp3"].map((t=>[t,ve.MP3])),...["mp4","m4v"].map((t=>[t,ve.MP4])),...["ogg","oga"].map((t=>[t,ve.OGG])),...["pdf","ps"].map((t=>[t,ve.PDF])),...["png"].map((t=>[t,ve.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ve.POWERPOINT])),...["rar"].map((t=>[t,ve.RAR])),...["stp"].map((t=>[t,ve.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ve.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,ve.VIDEO])),...["wav"].map((t=>[t,ve.WAV])),...["wma"].map((t=>[t,ve.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ve.WORD])),...["xml","xsl","rdf"].map((t=>[t,ve.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ve.YAML])),...["zip"].map((t=>[t,ve.ZIP]))]);const we=e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),ke=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),ze=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Se=e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Oe=e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),Ee=i.css`
|
|
347
|
+
:host {
|
|
348
|
+
display: inline-block;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
:host, i.ft-icon {
|
|
352
|
+
width: ${we};
|
|
353
|
+
height: ${we};
|
|
354
|
+
text-align: center;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
i.ft-icon {
|
|
358
|
+
font-size: ${we};
|
|
359
|
+
line-height: 1;
|
|
360
|
+
font-weight: normal;
|
|
361
|
+
text-transform: none;
|
|
362
|
+
font-style: normal;
|
|
363
|
+
font-variant: normal;
|
|
364
|
+
speak: none;
|
|
365
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
366
|
+
text-rendering: auto;
|
|
367
|
+
-webkit-font-smoothing: antialiased;
|
|
368
|
+
-moz-osx-font-smoothing: grayscale;
|
|
369
|
+
vertical-align: ${Oe};
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.ft-icon--fluid-topics {
|
|
373
|
+
font-family: ${ke}, ft-icons, fticons, sans-serif;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.ft-icon--file-format {
|
|
377
|
+
font-family: ${ze}, ft-mime, sans-serif;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.ft-icon--material {
|
|
381
|
+
font-family: ${Se}, "Material Icons", sans-serif;
|
|
382
|
+
}
|
|
383
|
+
`;var Ne;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ne||(Ne={}));var Ce=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class je extends e.FtLitElement{constructor(){super(...arguments),this.variant=Ne.fluid_topics,this.resolvedIcon=i.nothing}render(){const t="material"!==this.variant||this.value;return i.html`
|
|
347
384
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
348
385
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
349
|
-
<slot ?hidden=${
|
|
386
|
+
<slot ?hidden=${t}></slot>
|
|
350
387
|
</i>
|
|
351
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
388
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Ne.file_format:this.resolvedIcon=null!==(t=ve[o.toUpperCase()])&&void 0!==t?t:o;break;case Ne.fluid_topics:this.resolvedIcon=null!==(e=be[o.toUpperCase()])&&void 0!==e?e:o;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}je.elementDefinitions={},je.styles=Ee,Ce([o.property()],je.prototype,"variant",void 0),Ce([o.property()],je.prototype,"value",void 0),Ce([o.state()],je.prototype,"resolvedIcon",void 0),Ce([o.query("slot")],je.prototype,"slottedContent",void 0),e.customElement("ft-icon")(je);const Ae={labelSize:e.FtCssVariableFactory.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariableFactory.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:e.FtCssVariableFactory.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:e.FtCssVariableFactory.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariableFactory.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariableFactory.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariableFactory.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},Ie=i.css`
|
|
389
|
+
*:focus {
|
|
390
|
+
outline: none;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.ft-select {
|
|
394
|
+
display: flex;
|
|
395
|
+
flex-direction: column;
|
|
396
|
+
align-items: stretch;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.ft-select--main-panel {
|
|
400
|
+
position: relative;
|
|
401
|
+
display: flex;
|
|
402
|
+
height: calc(4 * ${Ae.verticalSpacing} + ${Ae.labelSize} + ${Ae.selectedOptionSize});
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.ft-select--input-panel {
|
|
406
|
+
flex-grow: 1;
|
|
407
|
+
position: relative;
|
|
408
|
+
display: flex;
|
|
409
|
+
align-items: center;
|
|
410
|
+
overflow: hidden;
|
|
411
|
+
padding-left: 16px;
|
|
412
|
+
padding-right: 8px;
|
|
413
|
+
gap: 8px;
|
|
414
|
+
color: ${Ae.selectedOptionColor};
|
|
415
|
+
${e.setVariable(fe.color,Ae.selectedOptionColor)};
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.ft-select--input-panel,
|
|
419
|
+
.ft-select--option {
|
|
420
|
+
${e.setVariable(fe.opacityContentOnSurfaceHover,"0.08")};
|
|
421
|
+
${e.setVariable(fe.opacityContentOnSurfacePressed,"0.04")};
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.ft-select--input-panel > *:not(ft-ripple),
|
|
425
|
+
.ft-select--option > *:not(ft-ripple) {
|
|
426
|
+
position: relative;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.ft-select--disabled .ft-select--input-panel,
|
|
430
|
+
.ft-select--disabled .ft-select--option {
|
|
431
|
+
color: ${Ae.colorOnSurfaceDisabled};
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
435
|
+
.ft-select:not(.ft-select--disabled) .ft-select--option {
|
|
436
|
+
cursor: pointer;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
ft-input-label {
|
|
440
|
+
${e.setVariable(le.fontSize,Ae.selectedOptionSize)};
|
|
441
|
+
${e.setVariable(le.raisedFontSize,Ae.labelSize)};
|
|
442
|
+
${e.setVariable(le.verticalSpacing,Ae.verticalSpacing)};
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
446
|
+
color: ${Ae.colorPrimary};
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
450
|
+
${e.setVariable(le.borderColor,Ae.colorPrimary)};
|
|
451
|
+
${e.setVariable(le.textColor,Ae.colorPrimary)};
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.ft-select--selected-option {
|
|
455
|
+
display: block;
|
|
456
|
+
flex-grow: 1;
|
|
457
|
+
flex-shrink: 1;
|
|
458
|
+
overflow: hidden;
|
|
459
|
+
white-space: nowrap;
|
|
460
|
+
text-overflow: ellipsis;
|
|
461
|
+
${e.setVariable(mt.fontSize,Ae.selectedOptionSize)};
|
|
462
|
+
${e.setVariable(mt.lineHeight,Ae.selectedOptionSize)};
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.ft-select--in-error .ft-select--selected-option {
|
|
466
|
+
color: ${Ae.colorError};
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
ft-icon {
|
|
470
|
+
flex-shrink: 0;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
slot {
|
|
474
|
+
display: none;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.ft-select--filled .ft-select--input-panel {
|
|
478
|
+
border-radius: ${Ae.borderRadiusS} ${Ae.borderRadiusS} 0 0;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
482
|
+
align-self: stretch;
|
|
483
|
+
padding-top: calc(${Ae.labelSize} + 2 * ${Ae.verticalSpacing});
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.ft-select--outlined .ft-select--input-panel {
|
|
487
|
+
border-radius: ${Ae.borderRadiusS};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.ft-select--options {
|
|
491
|
+
display: none;
|
|
492
|
+
position: absolute;
|
|
493
|
+
top: 100%;
|
|
494
|
+
left: 0;
|
|
495
|
+
right: 0;
|
|
496
|
+
color: ${Ae.optionsColor};
|
|
497
|
+
background: ${Ae.colorSurface};
|
|
498
|
+
z-index: ${Ae.optionsZIndex};
|
|
499
|
+
box-shadow: ${Ae.elevation02};
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.ft-select--fixed .ft-select--options {
|
|
503
|
+
position: fixed;
|
|
504
|
+
right: unset;
|
|
505
|
+
/* left and top are set dynamically */
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.ft-select--options-displayed .ft-select--options {
|
|
509
|
+
display: block;
|
|
510
|
+
max-height: ${Ae.optionsHeight};
|
|
511
|
+
overflow-y: auto;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.ft-select--option {
|
|
515
|
+
position: relative;
|
|
516
|
+
padding: 4px 16px;
|
|
517
|
+
min-height: 32px;
|
|
518
|
+
display: flex;
|
|
519
|
+
align-items: center;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.ft-select--option span {
|
|
523
|
+
text-overflow: ellipsis;
|
|
524
|
+
overflow: hidden;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.ft-select--helper-text {
|
|
528
|
+
padding: 0 12px 0 16px;
|
|
529
|
+
color: ${Ae.helperColor};
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.ft-select--in-error .ft-select--helper-text {
|
|
533
|
+
color: ${Ae.colorError};
|
|
534
|
+
}
|
|
535
|
+
`;var De=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Me extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return i.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Me.elementDefinitions={},De([o.property({type:String})],Me.prototype,"label",void 0),De([o.property({type:Object,converter:t=>t})],Me.prototype,"value",void 0),De([o.property({type:Boolean,reflect:!0})],Me.prototype,"selected",void 0);class Be extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,n,r;let p=this.hasOptionsMenuOpen,a=this.disabled||!this.hasOptions;const f=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,h={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":p,"ft-select--has-option-selected":f,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return i.html`
|
|
389
536
|
<div class="${s.classMap(h)}" part="container">
|
|
390
537
|
<div class="ft-select--main-panel" part="main-panel">
|
|
391
538
|
<ft-input-label text="${this.label}"
|
|
@@ -433,151 +580,4 @@ const W=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
433
580
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
434
581
|
<span>${t.label}</span>
|
|
435
582
|
</div>
|
|
436
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,l;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(l=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==l?l:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}
|
|
437
|
-
*:focus {
|
|
438
|
-
outline: none;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.ft-select {
|
|
442
|
-
display: flex;
|
|
443
|
-
flex-direction: column;
|
|
444
|
-
align-items: stretch;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.ft-select--main-panel {
|
|
448
|
-
position: relative;
|
|
449
|
-
display: flex;
|
|
450
|
-
height: calc(4 * ${Ce.verticalSpacing} + ${Ce.labelSize} + ${Ce.selectedOptionSize});
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.ft-select--input-panel {
|
|
454
|
-
flex-grow: 1;
|
|
455
|
-
position: relative;
|
|
456
|
-
display: flex;
|
|
457
|
-
align-items: center;
|
|
458
|
-
overflow: hidden;
|
|
459
|
-
padding-left: 16px;
|
|
460
|
-
padding-right: 8px;
|
|
461
|
-
gap: 8px;
|
|
462
|
-
color: ${Ce.selectedOptionColor};
|
|
463
|
-
${e.setVariable(ae.color,Ce.selectedOptionColor)};
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
.ft-select--input-panel,
|
|
467
|
-
.ft-select--option {
|
|
468
|
-
${e.setVariable(ae.opacityContentOnSurfaceHover,"0.08")};
|
|
469
|
-
${e.setVariable(ae.opacityContentOnSurfacePressed,"0.04")};
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.ft-select--input-panel > *:not(ft-ripple),
|
|
473
|
-
.ft-select--option > *:not(ft-ripple) {
|
|
474
|
-
position: relative;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.ft-select--disabled .ft-select--input-panel,
|
|
478
|
-
.ft-select--disabled .ft-select--option {
|
|
479
|
-
color: ${Ce.colorOnSurfaceDisabled};
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
483
|
-
.ft-select:not(.ft-select--disabled) .ft-select--option {
|
|
484
|
-
cursor: pointer;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
ft-input-label {
|
|
488
|
-
${e.setVariable(le.fontSize,Ce.selectedOptionSize)};
|
|
489
|
-
${e.setVariable(le.raisedFontSize,Ce.labelSize)};
|
|
490
|
-
${e.setVariable(le.verticalSpacing,Ce.verticalSpacing)};
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
494
|
-
color: ${Ce.colorPrimary};
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
498
|
-
${e.setVariable(le.borderColor,Ce.colorPrimary)};
|
|
499
|
-
${e.setVariable(le.textColor,Ce.colorPrimary)};
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.ft-select--selected-option {
|
|
503
|
-
display: block;
|
|
504
|
-
flex-grow: 1;
|
|
505
|
-
flex-shrink: 1;
|
|
506
|
-
overflow: hidden;
|
|
507
|
-
white-space: nowrap;
|
|
508
|
-
text-overflow: ellipsis;
|
|
509
|
-
${e.setVariable($t.fontSize,Ce.selectedOptionSize)};
|
|
510
|
-
${e.setVariable($t.lineHeight,Ce.selectedOptionSize)};
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
.ft-select--in-error .ft-select--selected-option {
|
|
514
|
-
color: ${Ce.colorError};
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
ft-icon {
|
|
518
|
-
flex-shrink: 0;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
slot {
|
|
522
|
-
display: none;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
.ft-select--filled .ft-select--input-panel {
|
|
526
|
-
border-radius: ${Ce.borderRadiusS} ${Ce.borderRadiusS} 0 0;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
530
|
-
align-self: stretch;
|
|
531
|
-
padding-top: calc(${Ce.labelSize} + 2 * ${Ce.verticalSpacing});
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
.ft-select--outlined .ft-select--input-panel {
|
|
535
|
-
border-radius: ${Ce.borderRadiusS};
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
.ft-select--options {
|
|
539
|
-
display: none;
|
|
540
|
-
position: absolute;
|
|
541
|
-
top: 100%;
|
|
542
|
-
left: 0;
|
|
543
|
-
right: 0;
|
|
544
|
-
color: ${Ce.optionsColor};
|
|
545
|
-
background: ${Ce.colorSurface};
|
|
546
|
-
z-index: ${Ce.optionsZIndex};
|
|
547
|
-
box-shadow: ${Ce.elevation02};
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
.ft-select--fixed .ft-select--options {
|
|
551
|
-
position: fixed;
|
|
552
|
-
right: unset;
|
|
553
|
-
/* left and top are set dynamically */
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
.ft-select--options-displayed .ft-select--options {
|
|
557
|
-
display: block;
|
|
558
|
-
max-height: ${Ce.optionsHeight};
|
|
559
|
-
overflow-y: auto;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
.ft-select--option {
|
|
563
|
-
position: relative;
|
|
564
|
-
padding: 4px 16px;
|
|
565
|
-
min-height: 32px;
|
|
566
|
-
display: flex;
|
|
567
|
-
align-items: center;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.ft-select--option span {
|
|
571
|
-
text-overflow: ellipsis;
|
|
572
|
-
overflow: hidden;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
.ft-select--helper-text {
|
|
576
|
-
padding: 0 12px 0 16px;
|
|
577
|
-
color: ${Ce.helperColor};
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
.ft-select--in-error .ft-select--helper-text {
|
|
581
|
-
color: ${Ce.colorError};
|
|
582
|
-
}
|
|
583
|
-
`],Ee([o.property({type:String})],je.prototype,"label",void 0),Ee([o.property({type:String})],je.prototype,"helper",void 0),Ee([o.property({type:Boolean})],je.prototype,"outlined",void 0),Ee([o.property({type:Boolean})],je.prototype,"disabled",void 0),Ee([o.property({type:Boolean})],je.prototype,"error",void 0),Ee([o.property({type:Boolean})],je.prototype,"fixedMenuPosition",void 0),Ee([o.property({type:Array})],je.prototype,"options",void 0),Ee([o.state()],je.prototype,"selectedOption",void 0),Ee([o.state()],je.prototype,"optionsDisplayed",void 0),Ee([o.state()],je.prototype,"focusOptions",void 0),Ee([o.query(".ft-select")],je.prototype,"container",void 0),Ee([o.query(".ft-select--options")],je.prototype,"optionsMenu",void 0),Ee([o.query(".ft-select--input-panel")],je.prototype,"mainPanel",void 0),Ee([o.query(".ft-select--option:first-child")],je.prototype,"firstOption",void 0),Ee([o.query(".ft-select--option:focus")],je.prototype,"focusedOption",void 0),Ee([o.query(".ft-select--option.ft-select--option-selected")],je.prototype,"selectedOptionElement",void 0),Ee([o.query(".ft-select--option:last-child")],je.prototype,"lastOption",void 0),Ee([o.query("slot")],je.prototype,"optionsSlot",void 0),e.customElement("ft-select")(je),e.customElement("ft-select-option")(Ne),t.FtSelect=je,t.FtSelectCssVariables=Ce,t.FtSelectOption=Ne,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML);
|
|
583
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,l;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(l=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==l?l:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Be.elementDefinitions={"ft-input-label":pe,"ft-typography":se,"ft-ripple":$e,"ft-icon":je},Be.styles=[Jt,Qt,Ie],De([o.property({type:String})],Be.prototype,"label",void 0),De([o.property({type:String})],Be.prototype,"helper",void 0),De([o.property({type:Boolean})],Be.prototype,"outlined",void 0),De([o.property({type:Boolean})],Be.prototype,"disabled",void 0),De([o.property({type:Boolean})],Be.prototype,"error",void 0),De([o.property({type:Boolean})],Be.prototype,"fixedMenuPosition",void 0),De([o.property({type:Array})],Be.prototype,"options",void 0),De([o.state()],Be.prototype,"selectedOption",void 0),De([o.state()],Be.prototype,"optionsDisplayed",void 0),De([o.state()],Be.prototype,"focusOptions",void 0),De([o.query(".ft-select")],Be.prototype,"container",void 0),De([o.query(".ft-select--options")],Be.prototype,"optionsMenu",void 0),De([o.query(".ft-select--input-panel")],Be.prototype,"mainPanel",void 0),De([o.query(".ft-select--option:first-child")],Be.prototype,"firstOption",void 0),De([o.query(".ft-select--option:focus")],Be.prototype,"focusedOption",void 0),De([o.query(".ft-select--option.ft-select--option-selected")],Be.prototype,"selectedOptionElement",void 0),De([o.query(".ft-select--option:last-child")],Be.prototype,"lastOption",void 0),De([o.query("slot")],Be.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Be),e.customElement("ft-select-option")(Me),t.FtSelect=Be,t.FtSelectCssVariables=Ae,t.FtSelectOption=Me,t.styles=Ie,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML);
|