@fluid-topics/ft-number-field 2.2.10 → 2.2.12
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var ke=Object.create;var Dt=Object.defineProperty;var Le=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Ve=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var
|
|
1
|
+
"use strict";(()=>{var ke=Object.create;var Dt=Object.defineProperty;var Le=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Ve=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var lt=(r,t)=>()=>{try{return t||r((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var Ie=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Pe(t))!Me.call(r,o)&&o!==e&&Dt(r,o,{get:()=>t[o],enumerable:!(i=Le(t,o))||i.enumerable});return r};var y=(r,t,e)=>(e=r!=null?ke(Ve(r)):{},Ie(t||!r||!r.__esModule?Dt(e,"default",{value:r,enumerable:!0}):e,r));var C=lt((Ke,Ot)=>{Ot.exports=ftGlobals.wcUtils});var W=lt((qe,Rt)=>{Rt.exports=ftGlobals.lit});var J=lt((si,oe)=>{oe.exports=ftGlobals.litDecorators});var ft=lt((ai,re)=>{re.exports=ftGlobals.litClassMap});var We=y(C());var q=y(W()),et=y(C());var ee=y(W()),d=y(C());var T=y(W()),a=y(C()),Bt=a.FtCssVariableFactory.extend("--ft-typography-font-family","",a.designSystemVariables.titleFont),R=a.FtCssVariableFactory.extend("--ft-typography-font-family","",a.designSystemVariables.contentFont),l={fontFamily:R,fontSize:a.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:a.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:a.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:a.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:a.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit"),textDecoration:a.FtCssVariableFactory.create("--ft-typography-text-decoration","","UNKNOWN","inherit")},L={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Bt),fontSize:a.FtCssVariableFactory.extend("--ft-typography-title-font-size","",l.fontSize,"20px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",l.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",l.letterSpacing,"0.15px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-title-line-height","",l.lineHeight,"1.2"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",l.textTransform,"inherit"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-title-text-decoration","",l.textDecoration,"inherit")},P={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Bt),fontSize:a.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",l.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",l.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",l.letterSpacing,"0.105px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",l.lineHeight,"1.7"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",l.textTransform,"inherit"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-title-dense-text-decoration","",l.textDecoration,"inherit")},V={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",R),fontSize:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",l.fontSize,"16px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",l.fontWeight,"600"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",l.letterSpacing,"0.144px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",l.lineHeight,"1.5"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",l.textTransform,"inherit"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-decoration","",l.textDecoration,"inherit")},M={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",R),fontSize:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",l.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",l.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",l.letterSpacing,"0.098px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",l.lineHeight,"1.7"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",l.textTransform,"inherit"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-decoration","",l.textDecoration,"inherit")},E={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",R),fontSize:a.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",l.fontSize,"16px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",l.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",l.letterSpacing,"0.496px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",l.lineHeight,"1.5"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",l.textTransform,"inherit"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-body1-text-decoration","",l.textDecoration,"inherit")},I={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",R),fontSize:a.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",l.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",l.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",l.letterSpacing,"0.252px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",l.lineHeight,"1.4"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",l.textTransform,"inherit"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-body2-text-decoration","",l.textDecoration,"inherit")},A={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",R),fontSize:a.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",l.fontSize,"12px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",l.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",l.letterSpacing,"0.396px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",l.lineHeight,"1.33"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",l.textTransform,"inherit"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-caption-text-decoration","",l.textDecoration,"inherit")},j={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",R),fontSize:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",l.fontSize,"10px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",l.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",l.letterSpacing,"0.33px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",l.lineHeight,"1.6"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",l.textTransform,"inherit"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-decoration","",l.textDecoration,"inherit")},U={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",R),fontSize:a.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",l.fontSize,"10px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",l.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",l.letterSpacing,"1.5px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",l.lineHeight,"1.6"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",l.textTransform,"uppercase"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-overline-text-decoration","",l.textDecoration,"inherit")},Z={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-button-font-family","",R),fontSize:a.FtCssVariableFactory.extend("--ft-typography-button-font-size","",l.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",l.fontWeight,"600"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",l.letterSpacing,"1.246px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-button-line-height","",l.lineHeight,"1.15"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",l.textTransform,"uppercase"),textDecoration:a.FtCssVariableFactory.extend("--ft-typography-button-text-decoration","",l.textDecoration,"inherit")},Nt=T.css`
|
|
2
2
|
.ft-typography--title {
|
|
3
3
|
font-family: ${L.fontFamily};
|
|
4
4
|
font-size: ${L.fontSize};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
text-transform: ${L.textTransform};
|
|
9
9
|
text-decoration: ${L.textDecoration};
|
|
10
10
|
}
|
|
11
|
-
`,Wt=
|
|
11
|
+
`,Wt=T.css`
|
|
12
12
|
.ft-typography--title-dense {
|
|
13
13
|
font-family: ${P.fontFamily};
|
|
14
14
|
font-size: ${P.fontSize};
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
text-transform: ${P.textTransform};
|
|
19
19
|
text-decoration: ${P.textDecoration};
|
|
20
20
|
}
|
|
21
|
-
`,kt=
|
|
21
|
+
`,kt=T.css`
|
|
22
22
|
.ft-typography--subtitle1 {
|
|
23
23
|
font-family: ${V.fontFamily};
|
|
24
24
|
font-size: ${V.fontSize};
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
text-transform: ${V.textTransform};
|
|
29
29
|
text-decoration: ${V.textDecoration};
|
|
30
30
|
}
|
|
31
|
-
`,Lt=
|
|
31
|
+
`,Lt=T.css`
|
|
32
32
|
.ft-typography--subtitle2 {
|
|
33
33
|
font-family: ${M.fontFamily};
|
|
34
34
|
font-size: ${M.fontSize};
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
text-decoration: ${M.textDecoration};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
`,Pt=
|
|
42
|
+
`,Pt=T.css`
|
|
43
43
|
.ft-typography--body1 {
|
|
44
44
|
font-family: ${E.fontFamily};
|
|
45
45
|
font-size: ${E.fontSize};
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
text-transform: ${E.textTransform};
|
|
50
50
|
text-decoration: ${E.textDecoration};
|
|
51
51
|
}
|
|
52
|
-
`,Vt=
|
|
52
|
+
`,Vt=T.css`
|
|
53
53
|
.ft-typography--body2 {
|
|
54
54
|
font-family: ${I.fontFamily};
|
|
55
55
|
font-size: ${I.fontSize};
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
text-transform: ${I.textTransform};
|
|
60
60
|
text-decoration: ${I.textDecoration};
|
|
61
61
|
}
|
|
62
|
-
`,pt=
|
|
62
|
+
`,pt=T.css`
|
|
63
63
|
.ft-typography--caption {
|
|
64
64
|
font-family: ${A.fontFamily};
|
|
65
65
|
font-size: ${A.fontSize};
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
text-transform: ${A.textTransform};
|
|
70
70
|
text-decoration: ${A.textDecoration};
|
|
71
71
|
}
|
|
72
|
-
`,Mt=
|
|
72
|
+
`,Mt=T.css`
|
|
73
73
|
.ft-typography--breadcrumb {
|
|
74
74
|
font-family: ${j.fontFamily};
|
|
75
75
|
font-size: ${j.fontSize};
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
text-transform: ${j.textTransform};
|
|
80
80
|
text-decoration: ${j.textDecoration};
|
|
81
81
|
}
|
|
82
|
-
`,It=
|
|
82
|
+
`,It=T.css`
|
|
83
83
|
.ft-typography--overline {
|
|
84
84
|
font-family: ${U.fontFamily};
|
|
85
85
|
font-size: ${U.fontSize};
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
text-transform: ${U.textTransform};
|
|
90
90
|
text-decoration: ${U.textDecoration};
|
|
91
91
|
}
|
|
92
|
-
`,jt=
|
|
92
|
+
`,jt=T.css`
|
|
93
93
|
.ft-typography--button {
|
|
94
94
|
font-family: ${Z.fontFamily};
|
|
95
95
|
font-size: ${Z.fontSize};
|
|
@@ -99,42 +99,40 @@
|
|
|
99
99
|
text-transform: ${Z.textTransform};
|
|
100
100
|
text-decoration: ${Z.textDecoration};
|
|
101
101
|
}
|
|
102
|
-
`,Ut=
|
|
102
|
+
`,Ut=T.css`
|
|
103
103
|
.ft-typography {
|
|
104
104
|
vertical-align: inherit;
|
|
105
105
|
}
|
|
106
|
-
`;var Zt=y(W()),m=y(C());var
|
|
106
|
+
`;var Zt=y(W()),m=y(C());var c={fontSize:m.FtCssVariableFactory.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:m.FtCssVariableFactory.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:m.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:m.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:m.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:m.FtCssVariableFactory.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:m.FtCssVariableFactory.extend("--ft-input-label-border-color","",m.designSystemVariables.colorOutline),textColor:m.FtCssVariableFactory.extend("--ft-input-label-text-color","",m.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:m.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color","",m.designSystemVariables.colorOnSurfaceDisabled),backgroundColor:m.FtCssVariableFactory.extend("--ft-input-label-background-color","",m.designSystemVariables.colorSurface),borderRadius:m.FtCssVariableFactory.extend("--ft-input-label-border-radius","",m.designSystemVariables.borderRadiusS),colorError:m.FtCssVariableFactory.external(m.designSystemVariables.colorError,"Design system")},Xt=Zt.css`
|
|
107
107
|
.ft-input-label {
|
|
108
108
|
position: absolute;
|
|
109
109
|
inset: 0;
|
|
110
110
|
display: flex;
|
|
111
|
-
background-color: ${
|
|
112
|
-
border-radius: ${
|
|
111
|
+
background-color: ${c.backgroundColor};
|
|
112
|
+
border-radius: ${c.borderRadius} ${c.borderRadius} 0 0;
|
|
113
|
+
border-color: ${c.borderColor};
|
|
114
|
+
border-bottom-width: 1px;
|
|
115
|
+
border-bottom-style: solid;
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
.ft-input-label--outlined {
|
|
116
|
-
border-radius: ${
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
.ft-input-label {
|
|
120
|
-
border-color: ${d.borderColor};
|
|
119
|
+
border-radius: ${c.borderRadius};
|
|
120
|
+
border-width: 1px;
|
|
121
|
+
border-style: solid;
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
.ft-input-label.ft-input-label--in-error {
|
|
124
|
-
border-color: ${
|
|
125
|
+
border-color: ${c.colorError}
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
.ft-input-label:before,
|
|
128
129
|
.ft-input-label:after {
|
|
129
130
|
content: "";
|
|
130
131
|
display: flex;
|
|
131
|
-
border-bottom-width: 1px;
|
|
132
|
-
border-bottom-style: solid;
|
|
133
|
-
border-color: inherit;
|
|
134
132
|
}
|
|
135
133
|
|
|
136
134
|
.ft-input-label:before {
|
|
137
|
-
width: calc(${
|
|
135
|
+
width: calc(${c.horizontalSpacing} - 4px);
|
|
138
136
|
flex-shrink: 0;
|
|
139
137
|
}
|
|
140
138
|
|
|
@@ -147,23 +145,20 @@
|
|
|
147
145
|
display: flex;
|
|
148
146
|
flex-shrink: 1;
|
|
149
147
|
position: relative;
|
|
150
|
-
|
|
151
|
-
border-bottom-style: solid;
|
|
152
|
-
border-color: inherit;
|
|
153
|
-
color: ${d.textColor};
|
|
148
|
+
color: ${c.textColor};
|
|
154
149
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
155
|
-
max-width: calc(${
|
|
150
|
+
max-width: calc(${c.labelMaxWidth} - 2 * (${c.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
156
151
|
text-overflow: ellipsis;
|
|
157
|
-
${(0,m.setVariable)(A.fontSize,
|
|
158
|
-
${(0,m.setVariable)(A.lineHeight,
|
|
152
|
+
${(0,m.setVariable)(A.fontSize,c.fontSize)};
|
|
153
|
+
${(0,m.setVariable)(A.lineHeight,c.fontSize)};
|
|
159
154
|
}
|
|
160
155
|
|
|
161
156
|
.ft-input-label--in-error .ft-input-label--text {
|
|
162
|
-
color: ${
|
|
157
|
+
color: ${c.colorError}
|
|
163
158
|
}
|
|
164
159
|
|
|
165
160
|
.ft-input-label--disabled .ft-input-label--text {
|
|
166
|
-
color: ${
|
|
161
|
+
color: ${c.disabledTextColor};
|
|
167
162
|
}
|
|
168
163
|
|
|
169
164
|
.ft-input-label--hidden-text {
|
|
@@ -180,51 +175,28 @@
|
|
|
180
175
|
overflow: hidden;
|
|
181
176
|
white-space: nowrap;
|
|
182
177
|
text-overflow: ellipsis;
|
|
183
|
-
padding: ${
|
|
184
|
-
margin: calc(${
|
|
178
|
+
padding: ${c.verticalSpacing} 4px;
|
|
179
|
+
margin: calc(${c.verticalSpacing} * -1) 0;
|
|
185
180
|
max-width: 100%;
|
|
186
181
|
box-sizing: border-box;
|
|
187
182
|
}
|
|
188
183
|
|
|
189
184
|
.ft-input-label--raised .ft-input-label--text {
|
|
190
|
-
${(0,m.setVariable)(A.fontSize,
|
|
191
|
-
${(0,m.setVariable)(A.lineHeight,
|
|
185
|
+
${(0,m.setVariable)(A.fontSize,c.raisedFontSize)};
|
|
186
|
+
${(0,m.setVariable)(A.lineHeight,c.raisedFontSize)};
|
|
192
187
|
}
|
|
193
188
|
|
|
194
189
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
195
|
-
top: ${
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.ft-input-label--outlined .ft-input-label--text,
|
|
199
|
-
.ft-input-label--outlined:before,
|
|
200
|
-
.ft-input-label--outlined:after {
|
|
201
|
-
border-top-width: 1px;
|
|
202
|
-
border-top-style: solid;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.ft-input-label--outlined:before {
|
|
206
|
-
border-left-width: 1px;
|
|
207
|
-
border-left-style: solid;
|
|
208
|
-
border-radius: ${d.borderRadius} 0 0 ${d.borderRadius};
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.ft-input-label--outlined:after {
|
|
212
|
-
border-right-width: 1px;
|
|
213
|
-
border-right-style: solid;
|
|
214
|
-
border-radius: 0 ${d.borderRadius} ${d.borderRadius} 0;
|
|
190
|
+
top: ${c.verticalSpacing};
|
|
215
191
|
}
|
|
216
192
|
|
|
217
193
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
218
194
|
padding: 2px 4px;
|
|
219
|
-
z-index: ${
|
|
220
|
-
background-color: ${
|
|
221
|
-
border-radius: ${
|
|
195
|
+
z-index: ${c.raisedZIndex};
|
|
196
|
+
background-color: ${c.backgroundColor};
|
|
197
|
+
border-radius: ${c.borderRadius};
|
|
222
198
|
top: calc((${A.lineHeight} / -2) + 2px);
|
|
223
199
|
}
|
|
224
|
-
|
|
225
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
226
|
-
border-top: none;
|
|
227
|
-
}
|
|
228
200
|
`;var Qt=y(W()),x=y(C()),Yt=x.FtCssVariableFactory.extend("--ft-ripple-color","",x.designSystemVariables.colorContent),D={color:Yt,backgroundColor:x.FtCssVariableFactory.extend("--ft-ripple-background-color","",Yt),opacityContentOnSurfacePressed:x.FtCssVariableFactory.external(x.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:x.FtCssVariableFactory.external(x.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:x.FtCssVariableFactory.external(x.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:x.FtCssVariableFactory.external(x.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:x.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Gt=x.FtCssVariableFactory.extend("--ft-ripple-color","",x.designSystemVariables.colorPrimary),Kt={color:Gt,backgroundColor:x.FtCssVariableFactory.extend("--ft-ripple-background-color","",Gt)},qt=x.FtCssVariableFactory.extend("--ft-ripple-color","",x.designSystemVariables.colorSecondary),Jt={color:qt,backgroundColor:x.FtCssVariableFactory.extend("--ft-ripple-background-color","",qt)},te=Qt.css`
|
|
229
201
|
:host {
|
|
230
202
|
display: contents;
|
|
@@ -337,7 +309,7 @@
|
|
|
337
309
|
opacity: ${D.opacityContentOnSurfacePressed};
|
|
338
310
|
transform: translate(-50%, -50%) scale(1);
|
|
339
311
|
}
|
|
340
|
-
`;var g={fontSize:
|
|
312
|
+
`;var g={fontSize:d.FtCssVariableFactory.create("--ft-number-field-font-size","","SIZE","14px"),labelSize:d.FtCssVariableFactory.create("--ft-number-field-label-size","","SIZE","11px"),verticalSpacing:d.FtCssVariableFactory.create("--ft-number-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:d.FtCssVariableFactory.create("--ft-number-field-horizontal-spacing","","SIZE","16px"),helperColor:d.FtCssVariableFactory.extend("--ft-number-field-helper-color","",d.designSystemVariables.colorOnSurfaceMedium),colorPrimary:d.FtCssVariableFactory.external(d.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:d.FtCssVariableFactory.external(d.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:d.FtCssVariableFactory.external(d.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:d.FtCssVariableFactory.external(d.designSystemVariables.borderRadiusS,"Design system"),colorSurface:d.FtCssVariableFactory.external(d.designSystemVariables.colorSurface,"Design system"),colorOutline:d.FtCssVariableFactory.external(d.designSystemVariables.colorOutline,"Design system")},ie=ee.css`
|
|
341
313
|
*:focus {
|
|
342
314
|
outline: none;
|
|
343
315
|
}
|
|
@@ -350,10 +322,10 @@
|
|
|
350
322
|
}
|
|
351
323
|
|
|
352
324
|
ft-input-label {
|
|
353
|
-
${(0,
|
|
354
|
-
${(0,
|
|
355
|
-
${(0,
|
|
356
|
-
${(0,
|
|
325
|
+
${(0,d.setVariable)(c.fontSize,g.fontSize)};
|
|
326
|
+
${(0,d.setVariable)(c.raisedFontSize,g.labelSize)};
|
|
327
|
+
${(0,d.setVariable)(c.verticalSpacing,g.verticalSpacing)};
|
|
328
|
+
${(0,d.setVariable)(c.horizontalSpacing,g.horizontalSpacing)};
|
|
357
329
|
}
|
|
358
330
|
|
|
359
331
|
.ft-number-field--main-panel {
|
|
@@ -370,13 +342,13 @@
|
|
|
370
342
|
overflow: hidden;
|
|
371
343
|
padding: 0 ${g.horizontalSpacing};
|
|
372
344
|
|
|
373
|
-
${(0,
|
|
374
|
-
${(0,
|
|
345
|
+
${(0,d.setVariable)(E.fontSize,g.fontSize)};
|
|
346
|
+
${(0,d.setVariable)(E.lineHeight,g.fontSize)};
|
|
375
347
|
}
|
|
376
348
|
|
|
377
349
|
.ft-number-field--input-panel ft-ripple {
|
|
378
|
-
${(0,
|
|
379
|
-
${(0,
|
|
350
|
+
${(0,d.setVariable)(D.opacityContentOnSurfaceHover,"0.08")};
|
|
351
|
+
${(0,d.setVariable)(D.opacityContentOnSurfacePressed,"0.04")};
|
|
380
352
|
}
|
|
381
353
|
|
|
382
354
|
.ft-number-field--filled.ft-number-field--with-label .ft-number-field--input-panel {
|
|
@@ -409,8 +381,8 @@
|
|
|
409
381
|
}
|
|
410
382
|
|
|
411
383
|
.ft-number-field:not(.ft-number-field--disabled):focus-within ft-input-label {
|
|
412
|
-
${(0,
|
|
413
|
-
${(0,
|
|
384
|
+
${(0,d.setVariable)(c.borderColor,g.colorPrimary)};
|
|
385
|
+
${(0,d.setVariable)(c.textColor,g.colorPrimary)};
|
|
414
386
|
}
|
|
415
387
|
|
|
416
388
|
.ft-number-field--filled .ft-number-field--input-panel {
|
|
@@ -431,8 +403,8 @@
|
|
|
431
403
|
padding: 0 12px 0 ${g.horizontalSpacing};
|
|
432
404
|
color: ${g.helperColor};
|
|
433
405
|
}
|
|
434
|
-
`;var H=y(J()),Be=y(ft());var dt=y(J());var mt=y(W()),gt=y(J());function ne(r,t,e){return r?t(r):e?.(r)}var
|
|
435
|
-
<div class="${(0,
|
|
406
|
+
`;var H=y(J()),Be=y(ft());var dt=y(J());var mt=y(W()),gt=y(J());function ne(r,t,e){return r?t(r):e?.(r)}var ae=y(ft()),le=y(C()),se=function(r,t,e,i){var o=arguments.length,n=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var f=r.length-1;f>=0;f--)(s=r[f])&&(n=(o<3?s(n):o>3?s(t,e,n):s(t,e))||n);return o>3&&n&&Object.defineProperty(t,e,n),n},X=class extends le.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1}get inputLabelClasses(){return{}}render(){return mt.html`
|
|
407
|
+
<div class="${(0,ae.classMap)(this.inputLabelClasses)}">
|
|
436
408
|
${ne(this.text,()=>mt.html`
|
|
437
409
|
<div class="ft-input-label--text ft-typography--caption">
|
|
438
410
|
<label class="ft-input-label--floating-text">${this.text}</label>
|
|
@@ -440,7 +412,7 @@
|
|
|
440
412
|
</div>
|
|
441
413
|
`)}
|
|
442
414
|
</div>
|
|
443
|
-
`}};X.elementDefinitions={};se([(0,gt.property)({type:String})],X.prototype,"text",void 0);se([(0,gt.property)({type:Boolean})],X.prototype,"raised",void 0);var bt=function(r,t,e,i){var o=arguments.length,n=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var f=r.length-1;f>=0;f--)(s=r[f])&&(n=(o<3?s(n):o>3?s(t,e,n):s(t,e))||n);return o>3&&n&&Object.defineProperty(t,e,n),n},
|
|
415
|
+
`}};X.elementDefinitions={};se([(0,gt.property)({type:String})],X.prototype,"text",void 0);se([(0,gt.property)({type:Boolean})],X.prototype,"raised",void 0);var bt=function(r,t,e,i){var o=arguments.length,n=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var f=r.length-1;f>=0;f--)(s=r[f])&&(n=(o<3?s(n):o>3?s(t,e,n):s(t,e))||n);return o>3&&n&&Object.defineProperty(t,e,n),n},w=class extends X{constructor(){super(...arguments),this.outlined=!1,this.error=!1,this.disabled=!1}get inputLabelClasses(){return{"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}}};w.elementDefinitions={};w.styles=[pt,Xt];bt([(0,dt.property)({type:Boolean})],w.prototype,"outlined",void 0);bt([(0,dt.property)({type:Boolean})],w.prototype,"error",void 0);bt([(0,dt.property)({type:Boolean})],w.prototype,"disabled",void 0);var fe=y(C());var pe={"ft-input-label":w};(0,fe.customElements)(pe);var de=y(W()),S=y(J()),he=y(ft()),it=y(C());var F=function(r,t,e,i){var o=arguments.length,n=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var f=r.length-1;f>=0;f--)(s=r[f])&&(n=(o<3?s(n):o>3?s(t,e,n):s(t,e))||n);return o>3&&n&&Object.defineProperty(t,e,n),n},b=class extends it.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.originX=0,this.originY=0,this.debouncer=new it.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new it.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),s=(i=(e=this.ripple)===null||e===void 0?void 0:e.getBoundingClientRect())!==null&&i!==void 0?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(o!=null?o-s.x:s.width/2),this.originY=Math.round(n!=null?n-s.y:s.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.isFocusVisible(t?.target)&&!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 de.html`
|
|
444
416
|
<style>
|
|
445
417
|
.ft-ripple .ft-ripple--effect {
|
|
446
418
|
left: ${this.originX}px;
|
|
@@ -451,17 +423,17 @@
|
|
|
451
423
|
<div class="ft-ripple--background"></div>
|
|
452
424
|
<div class="ft-ripple--effect"></div>
|
|
453
425
|
</div>
|
|
454
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(e=this.target)===null||e===void 0||e.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,e;let i=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;i&&this.setupFor((e=this.target)!==null&&e!==void 0?e:i)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let e=(...f)=>p=>{f.forEach(
|
|
426
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(e=this.target)===null||e===void 0||e.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,e;let i=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;i&&this.setupFor((e=this.target)!==null&&e!==void 0?e:i)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let e=(...f)=>p=>{f.forEach(h=>window.addEventListener(h,this.endPress,{once:!0})),this.startPress(p)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=f=>{["Enter"," "].includes(f.key)&&e("keyup")(f)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",i,s),t.addEventListener("touchstart",o,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",n,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",i,s),t.removeEventListener("touchstart",o,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",n,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let e=t,i=t,o,n;return e.x!=null?{x:o,y:n}=e:i.touches!=null&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)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.endRipple()}};b.elementDefinitions={};b.styles=te;F([(0,S.property)({type:Boolean})],b.prototype,"primary",void 0);F([(0,S.property)({type:Boolean})],b.prototype,"secondary",void 0);F([(0,S.property)({type:Boolean})],b.prototype,"unbounded",void 0);F([(0,S.property)({type:Boolean})],b.prototype,"activated",void 0);F([(0,S.property)({type:Boolean})],b.prototype,"selected",void 0);F([(0,S.property)({type:Boolean})],b.prototype,"disabled",void 0);F([(0,S.state)()],b.prototype,"hovered",void 0);F([(0,S.state)()],b.prototype,"focused",void 0);F([(0,S.state)()],b.prototype,"pressed",void 0);F([(0,S.state)()],b.prototype,"rippling",void 0);F([(0,S.state)()],b.prototype,"originX",void 0);F([(0,S.state)()],b.prototype,"originY",void 0);F([(0,S.query)(".ft-ripple")],b.prototype,"ripple",void 0);F([(0,S.query)(".ft-ripple--effect")],b.prototype,"rippleEffect",void 0);var ue=y(C());var ce={"ft-ripple":b};(0,ue.customElements)(ce);var Ft=globalThis,ye=r=>r,ht=Ft.trustedTypes,me=ht?ht.createPolicy("lit-html",{createHTML:r=>r}):void 0,Se="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,_e="?"+k,je=`<${_e}>`,K=document,ct=()=>K.createComment(""),rt=r=>r===null||typeof r!="object"&&typeof r!="function",Ct=Array.isArray,Ue=r=>Ct(r)||typeof r?.[Symbol.iterator]=="function",xt=`[
|
|
455
427
|
\f\r]`,ot=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ge=/-->/g,be=/>/g,Y=RegExp(`>|${xt}(?:([^\\s"'>=/]+)(${xt}*=${xt}*(?:[^
|
|
456
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),xe=/'/g,$e=/"/g,Ae=/^(?:script|style|textarea|title)$/i,
|
|
457
|
-
<${
|
|
428
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),xe=/'/g,$e=/"/g,Ae=/^(?:script|style|textarea|title)$/i,Tt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),Fe=Tt(1),Ce=Tt(2),Te=Tt(3),nt=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),ve=new WeakMap,G=K.createTreeWalker(K,129);function we(r,t){if(!Ct(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return me!==void 0?me.createHTML(t):t}var Ze=(r,t)=>{let e=r.length-1,i=[],o,n=t===2?"<svg>":t===3?"<math>":"",s=ot;for(let f=0;f<e;f++){let p=r[f],h,$,u=-1,O=0;for(;O<p.length&&(s.lastIndex=O,$=s.exec(p),$!==null);)O=s.lastIndex,s===ot?$[1]==="!--"?s=ge:$[1]!==void 0?s=be:$[2]!==void 0?(Ae.test($[2])&&(o=RegExp("</"+$[2],"g")),s=Y):$[3]!==void 0&&(s=Y):s===Y?$[0]===">"?(s=o??ot,u=-1):$[1]===void 0?u=-2:(u=s.lastIndex-$[2].length,h=$[1],s=$[3]===void 0?Y:$[3]==='"'?$e:xe):s===$e||s===xe?s=Y:s===ge||s===be?s=ot:(s=Y,o=void 0);let N=s===Y&&r[f+1].startsWith("/>")?" ":"";n+=s===ot?p+je:u>=0?(i.push(h),p.slice(0,u)+Se+p.slice(u)+k+N):p+k+(u===-2?f:N)}return[we(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},st=class r{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0,f=t.length-1,p=this.parts,[h,$]=Ze(t,e);if(this.el=r.createElement(h,i),G.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=G.nextNode())!==null&&p.length<f;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Se)){let O=$[s++],N=o.getAttribute(u).split(k),at=/([.?@])?(.*)/.exec(O);p.push({type:1,index:n,name:at[2],strings:N,ctor:at[1]==="."?vt:at[1]==="?"?St:at[1]==="@"?_t:tt}),o.removeAttribute(u)}else u.startsWith(k)&&(p.push({type:6,index:n}),o.removeAttribute(u));if(Ae.test(o.tagName)){let u=o.textContent.split(k),O=u.length-1;if(O>0){o.textContent=ht?ht.emptyScript:"";for(let N=0;N<O;N++)o.append(u[N],ct()),G.nextNode(),p.push({type:2,index:++n});o.append(u[O],ct())}}}else if(o.nodeType===8)if(o.data===_e)p.push({type:2,index:n});else{let u=-1;for(;(u=o.data.indexOf(k,u+1))!==-1;)p.push({type:7,index:n}),u+=k.length-1}n++}}static createElement(t,e){let i=K.createElement("template");return i.innerHTML=t,i}};function Q(r,t,e=r,i){if(t===nt)return t;let o=i!==void 0?e._$Co?.[i]:e._$Cl,n=rt(t)?void 0:t._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),n===void 0?o=void 0:(o=new n(r),o._$AT(r,e,i)),i!==void 0?(e._$Co??=[])[i]=o:e._$Cl=o),o!==void 0&&(t=Q(r,o._$AS(r,t.values),o,i)),t}var $t=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:i}=this._$AD,o=(t?.creationScope??K).importNode(e,!0);G.currentNode=o;let n=G.nextNode(),s=0,f=0,p=i[0];for(;p!==void 0;){if(s===p.index){let h;p.type===2?h=new ut(n,n.nextSibling,this,t):p.type===1?h=new p.ctor(n,p.name,p.strings,this,t):p.type===6&&(h=new At(n,this,t)),this._$AV.push(h),p=i[++f]}s!==p?.index&&(n=G.nextNode(),s++)}return G.currentNode=K,o}p(t){let e=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},ut=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,o){this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),rt(t)?t===v||t==null||t===""?(this._$AH!==v&&this._$AR(),this._$AH=v):t!==this._$AH&&t!==nt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ue(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==v&&rt(this._$AH)?this._$AA.nextSibling.data=t:this.T(K.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=st.createElement(we(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{let n=new $t(o,this),s=n.u(this.options);n.p(e),this.T(s),this._$AH=n}}_$AC(t){let e=ve.get(t.strings);return e===void 0&&ve.set(t.strings,e=new st(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,o=0;for(let n of t)o===e.length?e.push(i=new r(this.O(ct()),this.O(ct()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let i=ye(t).nextSibling;ye(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},tt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,n){this.type=1,this._$AH=v,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=v}_$AI(t,e=this,i,o){let n=this.strings,s=!1;if(n===void 0)t=Q(this,t,e,0),s=!rt(t)||t!==this._$AH&&t!==nt,s&&(this._$AH=t);else{let f=t,p,h;for(t=n[0],p=0;p<n.length-1;p++)h=Q(this,f[i+p],e,p),h===nt&&(h=this._$AH[p]),s||=!rt(h)||h!==this._$AH[p],h===v?t=v:t!==v&&(t+=(h??"")+n[p+1]),this._$AH[p]=h}s&&!o&&this.j(t)}j(t){t===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},vt=class extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===v?void 0:t}},St=class extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==v)}},_t=class extends tt{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??v)===nt)return;let i=this._$AH,o=t===v&&i!==v||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==v&&(i===v||o);o&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},At=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}};var Xe=Ft.litHtmlPolyfillSupport;Xe?.(st,ut),(Ft.litHtmlVersions??=[]).push("3.3.3");var He=Symbol.for(""),Ye=r=>{if(r?.r===He)return r?._$litStatic$},wt=r=>({_$litStatic$:r,r:He});var ze=new Map,zt=r=>(t,...e)=>{let i=e.length,o,n,s=[],f=[],p,h=0,$=!1;for(;h<i;){for(p=t[h];h<i&&(n=e[h],(o=Ye(n))!==void 0);)p+=o+t[++h],$=!0;h!==i&&f.push(n),s.push(p),h++}if(h===i&&s.push(t[i]),$){let u=s.join("$$lit$$");(t=ze.get(u))===void 0&&(s.raw=s,ze.set(u,t=s)),e=f}return r(t,...e)},Ht=zt(Fe),Wi=zt(Ce),ki=zt(Te);var Et=y(J()),De=y(C());var yt;(function(r){r.title="title",r.title_dense="title-dense",r.subtitle1="subtitle1",r.subtitle2="subtitle2",r.body1="body1",r.body2="body2",r.caption="caption",r.breadcrumb="breadcrumb",r.overline="overline",r.button="button"})(yt||(yt={}));var Ee=function(r,t,e,i){var o=arguments.length,n=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var f=r.length-1;f>=0;f--)(s=r[f])&&(n=(o<3?s(n):o>3?s(t,e,n):s(t,e))||n);return o>3&&n&&Object.defineProperty(t,e,n),n},B=class extends De.FtLitElement{constructor(){super(...arguments),this.variant=yt.body1}render(){return this.element?Ht`
|
|
429
|
+
<${wt(this.element)}
|
|
458
430
|
part="text"
|
|
459
431
|
class="ft-typography ft-typography--${this.variant}">
|
|
460
432
|
<slot></slot>
|
|
461
|
-
</${
|
|
433
|
+
</${wt(this.element)}>
|
|
462
434
|
`:Ht`
|
|
463
435
|
<slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
|
|
464
|
-
`}};B.styles=[Nt,Wt,kt,Lt,Pt,Vt,pt,Mt,It,jt,Ut];Ee([(0,Et.property)()],B.prototype,"element",void 0);Ee([(0,Et.property)()],B.prototype,"variant",void 0);var
|
|
436
|
+
`}};B.styles=[Nt,Wt,kt,Lt,Pt,Vt,pt,Mt,It,jt,Ut];Ee([(0,Et.property)()],B.prototype,"element",void 0);Ee([(0,Et.property)()],B.prototype,"variant",void 0);var Re=y(C());var Oe={"ft-typography":B};(0,Re.customElements)(Oe);var z=function(r,t,e,i){var o=arguments.length,n=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var f=r.length-1;f>=0;f--)(s=r[f])&&(n=(o<3?s(n):o>3?s(t,e,n):s(t,e))||n);return o>3&&n&&Object.defineProperty(t,e,n),n},_=class extends et.FtLitElement{constructor(){super(...arguments),this.integer=!1,this.helper="",this.outlined=!1,this.disabled=!1,this.focused=!1}render(){var t;let e={"ft-number-field":!0,"ft-number-field--filled":!this.outlined,"ft-number-field--outlined":this.outlined,"ft-number-field--disabled":this.disabled,"ft-number-field--has-value":this.value!=null,"ft-number-field--with-label":!!this.label};return q.html`
|
|
465
437
|
<div class="${(0,Be.classMap)(e)}">
|
|
466
438
|
<div class="ft-number-field--main-panel"
|
|
467
439
|
@focusout=${this.onMainPanelBlur}>
|
|
@@ -492,7 +464,7 @@
|
|
|
492
464
|
${this.helper}
|
|
493
465
|
</ft-typography>`:q.nothing}
|
|
494
466
|
</div>
|
|
495
|
-
`}update(t){super.update(t),(t.has("max")||t.has("min"))&&this.setValue(this.value)}lowerBound(t){return this.min!=null?Math.max(this.min,t):t}upperBound(t){return this.max!=null?Math.min(this.max,t):t}round(t){return this.integer?Math.floor(t):t}onChange(t){t.preventDefault(),t.stopPropagation(),this.setValue(+t.target.value)}setValue(t){let e=this.value;this.value=t;let i=this.value==null?void 0:this.round(this.lowerBound(this.upperBound(this.value)));setTimeout(()=>{this.value=i,e!==i&&this.dispatchEvent(new CustomEvent("change",{detail:this.value}))})}onFocus(){this.focused=!0}onMainPanelBlur(){var t;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1)}};_.elementDefinitions={"ft-input-label":
|
|
467
|
+
`}update(t){super.update(t),(t.has("max")||t.has("min"))&&this.setValue(this.value)}lowerBound(t){return this.min!=null?Math.max(this.min,t):t}upperBound(t){return this.max!=null?Math.min(this.max,t):t}round(t){return this.integer?Math.floor(t):t}onChange(t){t.preventDefault(),t.stopPropagation(),this.setValue(+t.target.value)}setValue(t){let e=this.value;this.value=t;let i=this.value==null?void 0:this.round(this.lowerBound(this.upperBound(this.value)));setTimeout(()=>{this.value=i,e!==i&&this.dispatchEvent(new CustomEvent("change",{detail:this.value}))})}onFocus(){this.focused=!0}onMainPanelBlur(){var t;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1)}};_.elementDefinitions={"ft-input-label":w,"ft-ripple":b,"ft-typography":B};_.styles=ie;z([(0,H.property)()],_.prototype,"label",void 0);z([(0,et.numberProperty)()],_.prototype,"value",void 0);z([(0,H.property)({type:Boolean})],_.prototype,"integer",void 0);z([(0,H.property)({type:String})],_.prototype,"helper",void 0);z([(0,H.property)({type:Boolean})],_.prototype,"outlined",void 0);z([(0,H.property)({type:Boolean})],_.prototype,"disabled",void 0);z([(0,et.numberProperty)()],_.prototype,"min",void 0);z([(0,et.numberProperty)()],_.prototype,"max",void 0);z([(0,H.state)()],_.prototype,"focused",void 0);z([(0,H.query)(".ft-number-field--input")],_.prototype,"input",void 0);z([(0,H.query)(".ft-number-field--main-panel")],_.prototype,"mainPanel",void 0);var Ne={"ft-number-field":_};(0,We.customElements)(Ne);})();
|
|
496
468
|
/*! Bundled license information:
|
|
497
469
|
|
|
498
470
|
lit-html/directives/when.js:
|
|
@@ -193,14 +193,15 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
193
193
|
display: flex;
|
|
194
194
|
background-color: ${D.backgroundColor};
|
|
195
195
|
border-radius: ${D.borderRadius} ${D.borderRadius} 0 0;
|
|
196
|
+
border-color: ${D.borderColor};
|
|
197
|
+
border-bottom-width: 1px;
|
|
198
|
+
border-bottom-style: solid;
|
|
196
199
|
}
|
|
197
200
|
|
|
198
201
|
.ft-input-label--outlined {
|
|
199
202
|
border-radius: ${D.borderRadius};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
.ft-input-label {
|
|
203
|
-
border-color: ${D.borderColor};
|
|
203
|
+
border-width: 1px;
|
|
204
|
+
border-style: solid;
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
.ft-input-label.ft-input-label--in-error {
|
|
@@ -211,9 +212,6 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
211
212
|
.ft-input-label:after {
|
|
212
213
|
content: "";
|
|
213
214
|
display: flex;
|
|
214
|
-
border-bottom-width: 1px;
|
|
215
|
-
border-bottom-style: solid;
|
|
216
|
-
border-color: inherit;
|
|
217
215
|
}
|
|
218
216
|
|
|
219
217
|
.ft-input-label:before {
|
|
@@ -230,9 +228,6 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
230
228
|
display: flex;
|
|
231
229
|
flex-shrink: 1;
|
|
232
230
|
position: relative;
|
|
233
|
-
border-bottom-width: 1px;
|
|
234
|
-
border-bottom-style: solid;
|
|
235
|
-
border-color: inherit;
|
|
236
231
|
color: ${D.textColor};
|
|
237
232
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
238
233
|
max-width: calc(${D.labelMaxWidth} - 2 * (${D.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
@@ -278,25 +273,6 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
278
273
|
top: ${D.verticalSpacing};
|
|
279
274
|
}
|
|
280
275
|
|
|
281
|
-
.ft-input-label--outlined .ft-input-label--text,
|
|
282
|
-
.ft-input-label--outlined:before,
|
|
283
|
-
.ft-input-label--outlined:after {
|
|
284
|
-
border-top-width: 1px;
|
|
285
|
-
border-top-style: solid;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.ft-input-label--outlined:before {
|
|
289
|
-
border-left-width: 1px;
|
|
290
|
-
border-left-style: solid;
|
|
291
|
-
border-radius: ${D.borderRadius} 0 0 ${D.borderRadius};
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.ft-input-label--outlined:after {
|
|
295
|
-
border-right-width: 1px;
|
|
296
|
-
border-right-style: solid;
|
|
297
|
-
border-radius: 0 ${D.borderRadius} ${D.borderRadius} 0;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
276
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
301
277
|
padding: 2px 4px;
|
|
302
278
|
z-index: ${D.raisedZIndex};
|
|
@@ -304,10 +280,6 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
304
280
|
border-radius: ${D.borderRadius};
|
|
305
281
|
top: calc((${J.lineHeight} / -2) + 2px);
|
|
306
282
|
}
|
|
307
|
-
|
|
308
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
309
|
-
border-top: none;
|
|
310
|
-
}
|
|
311
283
|
`;var Uc=r.extend("--ft-ripple-color","",U.colorContent),ve={color:Uc,backgroundColor:r.extend("--ft-ripple-background-color","",Uc),opacityContentOnSurfacePressed:r.external(U.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:r.external(U.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:r.external(U.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:r.external(U.opacityContentOnSurfaceSelected,"Design system"),borderRadius:r.create("--ft-ripple-border-radius","","SIZE","0px")},$c=r.extend("--ft-ripple-color","",U.colorPrimary),Bc={color:$c,backgroundColor:r.extend("--ft-ripple-background-color","",$c)},zc=r.extend("--ft-ripple-color","",U.colorSecondary),Hc={color:zc,backgroundColor:r.extend("--ft-ripple-background-color","",zc)},Vc=F`
|
|
312
284
|
:host {
|
|
313
285
|
display: contents;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-number-field",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.12",
|
|
4
4
|
"description": "A number field input component.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "2.2.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "2.2.12",
|
|
23
23
|
"lit": "3.3.3"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "3f8686496b8ce4f3b095e6184e387a89c353c3b8"
|
|
26
26
|
}
|