@nysds/nys-fileinput 1.11.1 → 1.11.3
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/dist/nys-fileinput.js +108 -905
- package/dist/nys-fileinput.js.map +1 -1
- package/package.json +8 -8
- package/dist/index.d.ts +0 -1
- package/dist/nys-fileinput.d.ts +0 -55
- package/dist/nys-fileinput.figma.d.ts +0 -1
- package/dist/nys-fileinput.styles.d.ts +0 -2
- package/dist/nys-fileitem.d.ts +0 -11
- package/dist/nys-fileitem.styles.d.ts +0 -2
- package/dist/validateFileHeader.d.ts +0 -1
package/dist/nys-fileinput.js
CHANGED
|
@@ -1,818 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* ▒█░░▀█ ░░▒█░░ ▒█▄▄▄█ ▒█▄▄▀ ▒█▄▄▄█
|
|
6
|
-
*
|
|
7
|
-
* Fileinput Component
|
|
8
|
-
* Part of the New York State Design System
|
|
9
|
-
* Repository: https://github.com/its-hcd/nysds
|
|
10
|
-
* License: MIT
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* @license
|
|
14
|
-
* Copyright 2019 Google LLC
|
|
15
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
-
*/
|
|
17
|
-
const D = globalThis, L = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, oe = Symbol(), Y = /* @__PURE__ */ new WeakMap();
|
|
18
|
-
let de = class {
|
|
19
|
-
constructor(e, t, i) {
|
|
20
|
-
if (this._$cssResult$ = !0, i !== oe) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
21
|
-
this.cssText = e, this.t = t;
|
|
22
|
-
}
|
|
23
|
-
get styleSheet() {
|
|
24
|
-
let e = this.o;
|
|
25
|
-
const t = this.t;
|
|
26
|
-
if (L && e === void 0) {
|
|
27
|
-
const i = t !== void 0 && t.length === 1;
|
|
28
|
-
i && (e = Y.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && Y.set(t, e));
|
|
29
|
-
}
|
|
30
|
-
return e;
|
|
31
|
-
}
|
|
32
|
-
toString() {
|
|
33
|
-
return this.cssText;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const ce = (o) => new de(typeof o == "string" ? o : o + "", void 0, oe), pe = (o, e) => {
|
|
37
|
-
if (L) o.adoptedStyleSheets = e.map(((t) => t instanceof CSSStyleSheet ? t : t.styleSheet));
|
|
38
|
-
else for (const t of e) {
|
|
39
|
-
const i = document.createElement("style"), s = D.litNonce;
|
|
40
|
-
s !== void 0 && i.setAttribute("nonce", s), i.textContent = t.cssText, o.appendChild(i);
|
|
41
|
-
}
|
|
42
|
-
}, G = L ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((e) => {
|
|
43
|
-
let t = "";
|
|
44
|
-
for (const i of e.cssRules) t += i.cssText;
|
|
45
|
-
return ce(t);
|
|
46
|
-
})(o) : o;
|
|
47
|
-
/**
|
|
48
|
-
* @license
|
|
49
|
-
* Copyright 2017 Google LLC
|
|
50
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/
|
|
52
|
-
const { is: ue, defineProperty: fe, getOwnPropertyDescriptor: _e, getOwnPropertyNames: ye, getOwnPropertySymbols: ge, getPrototypeOf: me } = Object, q = globalThis, J = q.trustedTypes, ve = J ? J.emptyScript : "", $e = q.reactiveElementPolyfillSupport, C = (o, e) => o, U = { toAttribute(o, e) {
|
|
53
|
-
switch (e) {
|
|
54
|
-
case Boolean:
|
|
55
|
-
o = o ? ve : null;
|
|
56
|
-
break;
|
|
57
|
-
case Object:
|
|
58
|
-
case Array:
|
|
59
|
-
o = o == null ? o : JSON.stringify(o);
|
|
60
|
-
}
|
|
61
|
-
return o;
|
|
62
|
-
}, fromAttribute(o, e) {
|
|
63
|
-
let t = o;
|
|
64
|
-
switch (e) {
|
|
65
|
-
case Boolean:
|
|
66
|
-
t = o !== null;
|
|
67
|
-
break;
|
|
68
|
-
case Number:
|
|
69
|
-
t = o === null ? null : Number(o);
|
|
70
|
-
break;
|
|
71
|
-
case Object:
|
|
72
|
-
case Array:
|
|
73
|
-
try {
|
|
74
|
-
t = JSON.parse(o);
|
|
75
|
-
} catch {
|
|
76
|
-
t = null;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return t;
|
|
80
|
-
} }, B = (o, e) => !ue(o, e), K = { attribute: !0, type: String, converter: U, reflect: !1, useDefault: !1, hasChanged: B };
|
|
81
|
-
Symbol.metadata ??= Symbol("metadata"), q.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
82
|
-
class S extends HTMLElement {
|
|
83
|
-
static addInitializer(e) {
|
|
84
|
-
this._$Ei(), (this.l ??= []).push(e);
|
|
85
|
-
}
|
|
86
|
-
static get observedAttributes() {
|
|
87
|
-
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
88
|
-
}
|
|
89
|
-
static createProperty(e, t = K) {
|
|
90
|
-
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
91
|
-
const i = Symbol(), s = this.getPropertyDescriptor(e, i, t);
|
|
92
|
-
s !== void 0 && fe(this.prototype, e, s);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
static getPropertyDescriptor(e, t, i) {
|
|
96
|
-
const { get: s, set: r } = _e(this.prototype, e) ?? { get() {
|
|
97
|
-
return this[t];
|
|
98
|
-
}, set(n) {
|
|
99
|
-
this[t] = n;
|
|
100
|
-
} };
|
|
101
|
-
return { get: s, set(n) {
|
|
102
|
-
const a = s?.call(this);
|
|
103
|
-
r?.call(this, n), this.requestUpdate(e, a, i);
|
|
104
|
-
}, configurable: !0, enumerable: !0 };
|
|
105
|
-
}
|
|
106
|
-
static getPropertyOptions(e) {
|
|
107
|
-
return this.elementProperties.get(e) ?? K;
|
|
108
|
-
}
|
|
109
|
-
static _$Ei() {
|
|
110
|
-
if (this.hasOwnProperty(C("elementProperties"))) return;
|
|
111
|
-
const e = me(this);
|
|
112
|
-
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
113
|
-
}
|
|
114
|
-
static finalize() {
|
|
115
|
-
if (this.hasOwnProperty(C("finalized"))) return;
|
|
116
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(C("properties"))) {
|
|
117
|
-
const t = this.properties, i = [...ye(t), ...ge(t)];
|
|
118
|
-
for (const s of i) this.createProperty(s, t[s]);
|
|
119
|
-
}
|
|
120
|
-
const e = this[Symbol.metadata];
|
|
121
|
-
if (e !== null) {
|
|
122
|
-
const t = litPropertyMetadata.get(e);
|
|
123
|
-
if (t !== void 0) for (const [i, s] of t) this.elementProperties.set(i, s);
|
|
124
|
-
}
|
|
125
|
-
this._$Eh = /* @__PURE__ */ new Map();
|
|
126
|
-
for (const [t, i] of this.elementProperties) {
|
|
127
|
-
const s = this._$Eu(t, i);
|
|
128
|
-
s !== void 0 && this._$Eh.set(s, t);
|
|
129
|
-
}
|
|
130
|
-
this.elementStyles = this.finalizeStyles(this.styles);
|
|
131
|
-
}
|
|
132
|
-
static finalizeStyles(e) {
|
|
133
|
-
const t = [];
|
|
134
|
-
if (Array.isArray(e)) {
|
|
135
|
-
const i = new Set(e.flat(1 / 0).reverse());
|
|
136
|
-
for (const s of i) t.unshift(G(s));
|
|
137
|
-
} else e !== void 0 && t.push(G(e));
|
|
138
|
-
return t;
|
|
139
|
-
}
|
|
140
|
-
static _$Eu(e, t) {
|
|
141
|
-
const i = t.attribute;
|
|
142
|
-
return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
143
|
-
}
|
|
144
|
-
constructor() {
|
|
145
|
-
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
146
|
-
}
|
|
147
|
-
_$Ev() {
|
|
148
|
-
this._$ES = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((e) => e(this)));
|
|
149
|
-
}
|
|
150
|
-
addController(e) {
|
|
151
|
-
(this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
|
|
152
|
-
}
|
|
153
|
-
removeController(e) {
|
|
154
|
-
this._$EO?.delete(e);
|
|
155
|
-
}
|
|
156
|
-
_$E_() {
|
|
157
|
-
const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
|
|
158
|
-
for (const i of t.keys()) this.hasOwnProperty(i) && (e.set(i, this[i]), delete this[i]);
|
|
159
|
-
e.size > 0 && (this._$Ep = e);
|
|
160
|
-
}
|
|
161
|
-
createRenderRoot() {
|
|
162
|
-
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
163
|
-
return pe(e, this.constructor.elementStyles), e;
|
|
164
|
-
}
|
|
165
|
-
connectedCallback() {
|
|
166
|
-
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((e) => e.hostConnected?.()));
|
|
167
|
-
}
|
|
168
|
-
enableUpdating(e) {
|
|
169
|
-
}
|
|
170
|
-
disconnectedCallback() {
|
|
171
|
-
this._$EO?.forEach(((e) => e.hostDisconnected?.()));
|
|
172
|
-
}
|
|
173
|
-
attributeChangedCallback(e, t, i) {
|
|
174
|
-
this._$AK(e, i);
|
|
175
|
-
}
|
|
176
|
-
_$ET(e, t) {
|
|
177
|
-
const i = this.constructor.elementProperties.get(e), s = this.constructor._$Eu(e, i);
|
|
178
|
-
if (s !== void 0 && i.reflect === !0) {
|
|
179
|
-
const r = (i.converter?.toAttribute !== void 0 ? i.converter : U).toAttribute(t, i.type);
|
|
180
|
-
this._$Em = e, r == null ? this.removeAttribute(s) : this.setAttribute(s, r), this._$Em = null;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
_$AK(e, t) {
|
|
184
|
-
const i = this.constructor, s = i._$Eh.get(e);
|
|
185
|
-
if (s !== void 0 && this._$Em !== s) {
|
|
186
|
-
const r = i.getPropertyOptions(s), n = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter : U;
|
|
187
|
-
this._$Em = s;
|
|
188
|
-
const a = n.fromAttribute(t, r.type);
|
|
189
|
-
this[s] = a ?? this._$Ej?.get(s) ?? a, this._$Em = null;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
requestUpdate(e, t, i) {
|
|
193
|
-
if (e !== void 0) {
|
|
194
|
-
const s = this.constructor, r = this[e];
|
|
195
|
-
if (i ??= s.getPropertyOptions(e), !((i.hasChanged ?? B)(r, t) || i.useDefault && i.reflect && r === this._$Ej?.get(e) && !this.hasAttribute(s._$Eu(e, i)))) return;
|
|
196
|
-
this.C(e, t, i);
|
|
197
|
-
}
|
|
198
|
-
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
199
|
-
}
|
|
200
|
-
C(e, t, { useDefault: i, reflect: s, wrapped: r }, n) {
|
|
201
|
-
i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, n ?? t ?? this[e]), r !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || i || (t = void 0), this._$AL.set(e, t)), s === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
|
|
202
|
-
}
|
|
203
|
-
async _$EP() {
|
|
204
|
-
this.isUpdatePending = !0;
|
|
205
|
-
try {
|
|
206
|
-
await this._$ES;
|
|
207
|
-
} catch (t) {
|
|
208
|
-
Promise.reject(t);
|
|
209
|
-
}
|
|
210
|
-
const e = this.scheduleUpdate();
|
|
211
|
-
return e != null && await e, !this.isUpdatePending;
|
|
212
|
-
}
|
|
213
|
-
scheduleUpdate() {
|
|
214
|
-
return this.performUpdate();
|
|
215
|
-
}
|
|
216
|
-
performUpdate() {
|
|
217
|
-
if (!this.isUpdatePending) return;
|
|
218
|
-
if (!this.hasUpdated) {
|
|
219
|
-
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
220
|
-
for (const [s, r] of this._$Ep) this[s] = r;
|
|
221
|
-
this._$Ep = void 0;
|
|
222
|
-
}
|
|
223
|
-
const i = this.constructor.elementProperties;
|
|
224
|
-
if (i.size > 0) for (const [s, r] of i) {
|
|
225
|
-
const { wrapped: n } = r, a = this[s];
|
|
226
|
-
n !== !0 || this._$AL.has(s) || a === void 0 || this.C(s, void 0, r, a);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
let e = !1;
|
|
230
|
-
const t = this._$AL;
|
|
231
|
-
try {
|
|
232
|
-
e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach(((i) => i.hostUpdate?.())), this.update(t)) : this._$EM();
|
|
233
|
-
} catch (i) {
|
|
234
|
-
throw e = !1, this._$EM(), i;
|
|
235
|
-
}
|
|
236
|
-
e && this._$AE(t);
|
|
237
|
-
}
|
|
238
|
-
willUpdate(e) {
|
|
239
|
-
}
|
|
240
|
-
_$AE(e) {
|
|
241
|
-
this._$EO?.forEach(((t) => t.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
242
|
-
}
|
|
243
|
-
_$EM() {
|
|
244
|
-
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
245
|
-
}
|
|
246
|
-
get updateComplete() {
|
|
247
|
-
return this.getUpdateComplete();
|
|
248
|
-
}
|
|
249
|
-
getUpdateComplete() {
|
|
250
|
-
return this._$ES;
|
|
251
|
-
}
|
|
252
|
-
shouldUpdate(e) {
|
|
253
|
-
return !0;
|
|
254
|
-
}
|
|
255
|
-
update(e) {
|
|
256
|
-
this._$Eq &&= this._$Eq.forEach(((t) => this._$ET(t, this[t]))), this._$EM();
|
|
257
|
-
}
|
|
258
|
-
updated(e) {
|
|
259
|
-
}
|
|
260
|
-
firstUpdated(e) {
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[C("elementProperties")] = /* @__PURE__ */ new Map(), S[C("finalized")] = /* @__PURE__ */ new Map(), $e?.({ ReactiveElement: S }), (q.reactiveElementVersions ??= []).push("2.1.1");
|
|
264
|
-
/**
|
|
265
|
-
* @license
|
|
266
|
-
* Copyright 2017 Google LLC
|
|
267
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
268
|
-
*/
|
|
269
|
-
const be = { attribute: !0, type: String, converter: U, reflect: !1, hasChanged: B }, Ae = (o = be, e, t) => {
|
|
270
|
-
const { kind: i, metadata: s } = t;
|
|
271
|
-
let r = globalThis.litPropertyMetadata.get(s);
|
|
272
|
-
if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), i === "setter" && ((o = Object.create(o)).wrapped = !0), r.set(t.name, o), i === "accessor") {
|
|
273
|
-
const { name: n } = t;
|
|
274
|
-
return { set(a) {
|
|
275
|
-
const l = e.get.call(this);
|
|
276
|
-
e.set.call(this, a), this.requestUpdate(n, l, o);
|
|
277
|
-
}, init(a) {
|
|
278
|
-
return a !== void 0 && this.C(n, void 0, o, a), a;
|
|
279
|
-
} };
|
|
280
|
-
}
|
|
281
|
-
if (i === "setter") {
|
|
282
|
-
const { name: n } = t;
|
|
283
|
-
return function(a) {
|
|
284
|
-
const l = this[n];
|
|
285
|
-
e.call(this, a), this.requestUpdate(n, l, o);
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
throw Error("Unsupported decorator location: " + i);
|
|
289
|
-
};
|
|
290
|
-
function d(o) {
|
|
291
|
-
return (e, t) => typeof t == "object" ? Ae(o, e, t) : ((i, s, r) => {
|
|
292
|
-
const n = s.hasOwnProperty(r);
|
|
293
|
-
return s.constructor.createProperty(r, i), n ? Object.getOwnPropertyDescriptor(s, r) : void 0;
|
|
294
|
-
})(o, e, t);
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* @license
|
|
298
|
-
* Copyright 2017 Google LLC
|
|
299
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
300
|
-
*/
|
|
301
|
-
const j = globalThis, z = j.trustedTypes, Z = z ? z.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, ne = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, le = "?" + v, we = `<${le}>`, A = document, R = () => A.createComment(""), P = (o) => o === null || typeof o != "object" && typeof o != "function", V = Array.isArray, Ee = (o) => V(o) || typeof o?.[Symbol.iterator] == "function", I = `[
|
|
302
|
-
\f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Q = /-->/g, X = />/g, $ = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
|
|
303
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), ee = /'/g, te = /"/g, ae = /^(?:script|style|textarea|title)$/i, k = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ie = /* @__PURE__ */ new WeakMap(), b = A.createTreeWalker(A, 129);
|
|
304
|
-
function he(o, e) {
|
|
305
|
-
if (!V(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
306
|
-
return Z !== void 0 ? Z.createHTML(e) : e;
|
|
307
|
-
}
|
|
308
|
-
const Se = (o, e) => {
|
|
309
|
-
const t = o.length - 1, i = [];
|
|
310
|
-
let s, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = x;
|
|
311
|
-
for (let a = 0; a < t; a++) {
|
|
312
|
-
const l = o[a];
|
|
313
|
-
let u, f, h = -1, g = 0;
|
|
314
|
-
for (; g < l.length && (n.lastIndex = g, f = n.exec(l), f !== null); ) g = n.lastIndex, n === x ? f[1] === "!--" ? n = Q : f[1] !== void 0 ? n = X : f[2] !== void 0 ? (ae.test(f[2]) && (s = RegExp("</" + f[2], "g")), n = $) : f[3] !== void 0 && (n = $) : n === $ ? f[0] === ">" ? (n = s ?? x, h = -1) : f[1] === void 0 ? h = -2 : (h = n.lastIndex - f[2].length, u = f[1], n = f[3] === void 0 ? $ : f[3] === '"' ? te : ee) : n === te || n === ee ? n = $ : n === Q || n === X ? n = x : (n = $, s = void 0);
|
|
315
|
-
const m = n === $ && o[a + 1].startsWith("/>") ? " " : "";
|
|
316
|
-
r += n === x ? l + we : h >= 0 ? (i.push(u), l.slice(0, h) + ne + l.slice(h) + v + m) : l + v + (h === -2 ? a : m);
|
|
317
|
-
}
|
|
318
|
-
return [he(o, r + (o[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
319
|
-
};
|
|
320
|
-
class F {
|
|
321
|
-
constructor({ strings: e, _$litType$: t }, i) {
|
|
322
|
-
let s;
|
|
323
|
-
this.parts = [];
|
|
324
|
-
let r = 0, n = 0;
|
|
325
|
-
const a = e.length - 1, l = this.parts, [u, f] = Se(e, t);
|
|
326
|
-
if (this.el = F.createElement(u, i), b.currentNode = this.el.content, t === 2 || t === 3) {
|
|
327
|
-
const h = this.el.content.firstChild;
|
|
328
|
-
h.replaceWith(...h.childNodes);
|
|
329
|
-
}
|
|
330
|
-
for (; (s = b.nextNode()) !== null && l.length < a; ) {
|
|
331
|
-
if (s.nodeType === 1) {
|
|
332
|
-
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(ne)) {
|
|
333
|
-
const g = f[n++], m = s.getAttribute(h).split(v), M = /([.?@])?(.*)/.exec(g);
|
|
334
|
-
l.push({ type: 1, index: r, name: M[2], strings: m, ctor: M[1] === "." ? Ce : M[1] === "?" ? Pe : M[1] === "@" ? ke : T }), s.removeAttribute(h);
|
|
335
|
-
} else h.startsWith(v) && (l.push({ type: 6, index: r }), s.removeAttribute(h));
|
|
336
|
-
if (ae.test(s.tagName)) {
|
|
337
|
-
const h = s.textContent.split(v), g = h.length - 1;
|
|
338
|
-
if (g > 0) {
|
|
339
|
-
s.textContent = z ? z.emptyScript : "";
|
|
340
|
-
for (let m = 0; m < g; m++) s.append(h[m], R()), b.nextNode(), l.push({ type: 2, index: ++r });
|
|
341
|
-
s.append(h[g], R());
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
} else if (s.nodeType === 8) if (s.data === le) l.push({ type: 2, index: r });
|
|
345
|
-
else {
|
|
346
|
-
let h = -1;
|
|
347
|
-
for (; (h = s.data.indexOf(v, h + 1)) !== -1; ) l.push({ type: 7, index: r }), h += v.length - 1;
|
|
348
|
-
}
|
|
349
|
-
r++;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
static createElement(e, t) {
|
|
353
|
-
const i = A.createElement("template");
|
|
354
|
-
return i.innerHTML = e, i;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
function E(o, e, t = o, i) {
|
|
358
|
-
if (e === k) return e;
|
|
359
|
-
let s = i !== void 0 ? t._$Co?.[i] : t._$Cl;
|
|
360
|
-
const r = P(e) ? void 0 : e._$litDirective$;
|
|
361
|
-
return s?.constructor !== r && (s?._$AO?.(!1), r === void 0 ? s = void 0 : (s = new r(o), s._$AT(o, t, i)), i !== void 0 ? (t._$Co ??= [])[i] = s : t._$Cl = s), s !== void 0 && (e = E(o, s._$AS(o, e.values), s, i)), e;
|
|
362
|
-
}
|
|
363
|
-
class xe {
|
|
364
|
-
constructor(e, t) {
|
|
365
|
-
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
366
|
-
}
|
|
367
|
-
get parentNode() {
|
|
368
|
-
return this._$AM.parentNode;
|
|
369
|
-
}
|
|
370
|
-
get _$AU() {
|
|
371
|
-
return this._$AM._$AU;
|
|
372
|
-
}
|
|
373
|
-
u(e) {
|
|
374
|
-
const { el: { content: t }, parts: i } = this._$AD, s = (e?.creationScope ?? A).importNode(t, !0);
|
|
375
|
-
b.currentNode = s;
|
|
376
|
-
let r = b.nextNode(), n = 0, a = 0, l = i[0];
|
|
377
|
-
for (; l !== void 0; ) {
|
|
378
|
-
if (n === l.index) {
|
|
379
|
-
let u;
|
|
380
|
-
l.type === 2 ? u = new H(r, r.nextSibling, this, e) : l.type === 1 ? u = new l.ctor(r, l.name, l.strings, this, e) : l.type === 6 && (u = new Fe(r, this, e)), this._$AV.push(u), l = i[++a];
|
|
381
|
-
}
|
|
382
|
-
n !== l?.index && (r = b.nextNode(), n++);
|
|
383
|
-
}
|
|
384
|
-
return b.currentNode = A, s;
|
|
385
|
-
}
|
|
386
|
-
p(e) {
|
|
387
|
-
let t = 0;
|
|
388
|
-
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, t), t += i.strings.length - 2) : i._$AI(e[t])), t++;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
class H {
|
|
392
|
-
get _$AU() {
|
|
393
|
-
return this._$AM?._$AU ?? this._$Cv;
|
|
394
|
-
}
|
|
395
|
-
constructor(e, t, i, s) {
|
|
396
|
-
this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = s, this._$Cv = s?.isConnected ?? !0;
|
|
397
|
-
}
|
|
398
|
-
get parentNode() {
|
|
399
|
-
let e = this._$AA.parentNode;
|
|
400
|
-
const t = this._$AM;
|
|
401
|
-
return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
|
|
402
|
-
}
|
|
403
|
-
get startNode() {
|
|
404
|
-
return this._$AA;
|
|
405
|
-
}
|
|
406
|
-
get endNode() {
|
|
407
|
-
return this._$AB;
|
|
408
|
-
}
|
|
409
|
-
_$AI(e, t = this) {
|
|
410
|
-
e = E(this, e, t), P(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== k && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Ee(e) ? this.k(e) : this._(e);
|
|
411
|
-
}
|
|
412
|
-
O(e) {
|
|
413
|
-
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
414
|
-
}
|
|
415
|
-
T(e) {
|
|
416
|
-
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
417
|
-
}
|
|
418
|
-
_(e) {
|
|
419
|
-
this._$AH !== c && P(this._$AH) ? this._$AA.nextSibling.data = e : this.T(A.createTextNode(e)), this._$AH = e;
|
|
420
|
-
}
|
|
421
|
-
$(e) {
|
|
422
|
-
const { values: t, _$litType$: i } = e, s = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = F.createElement(he(i.h, i.h[0]), this.options)), i);
|
|
423
|
-
if (this._$AH?._$AD === s) this._$AH.p(t);
|
|
424
|
-
else {
|
|
425
|
-
const r = new xe(s, this), n = r.u(this.options);
|
|
426
|
-
r.p(t), this.T(n), this._$AH = r;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
_$AC(e) {
|
|
430
|
-
let t = ie.get(e.strings);
|
|
431
|
-
return t === void 0 && ie.set(e.strings, t = new F(e)), t;
|
|
432
|
-
}
|
|
433
|
-
k(e) {
|
|
434
|
-
V(this._$AH) || (this._$AH = [], this._$AR());
|
|
435
|
-
const t = this._$AH;
|
|
436
|
-
let i, s = 0;
|
|
437
|
-
for (const r of e) s === t.length ? t.push(i = new H(this.O(R()), this.O(R()), this, this.options)) : i = t[s], i._$AI(r), s++;
|
|
438
|
-
s < t.length && (this._$AR(i && i._$AB.nextSibling, s), t.length = s);
|
|
439
|
-
}
|
|
440
|
-
_$AR(e = this._$AA.nextSibling, t) {
|
|
441
|
-
for (this._$AP?.(!1, !0, t); e !== this._$AB; ) {
|
|
442
|
-
const i = e.nextSibling;
|
|
443
|
-
e.remove(), e = i;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
setConnected(e) {
|
|
447
|
-
this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
class T {
|
|
451
|
-
get tagName() {
|
|
452
|
-
return this.element.tagName;
|
|
453
|
-
}
|
|
454
|
-
get _$AU() {
|
|
455
|
-
return this._$AM._$AU;
|
|
456
|
-
}
|
|
457
|
-
constructor(e, t, i, s, r) {
|
|
458
|
-
this.type = 1, this._$AH = c, this._$AN = void 0, this.element = e, this.name = t, this._$AM = s, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = c;
|
|
459
|
-
}
|
|
460
|
-
_$AI(e, t = this, i, s) {
|
|
461
|
-
const r = this.strings;
|
|
462
|
-
let n = !1;
|
|
463
|
-
if (r === void 0) e = E(this, e, t, 0), n = !P(e) || e !== this._$AH && e !== k, n && (this._$AH = e);
|
|
464
|
-
else {
|
|
465
|
-
const a = e;
|
|
466
|
-
let l, u;
|
|
467
|
-
for (e = r[0], l = 0; l < r.length - 1; l++) u = E(this, a[i + l], t, l), u === k && (u = this._$AH[l]), n ||= !P(u) || u !== this._$AH[l], u === c ? e = c : e !== c && (e += (u ?? "") + r[l + 1]), this._$AH[l] = u;
|
|
468
|
-
}
|
|
469
|
-
n && !s && this.j(e);
|
|
470
|
-
}
|
|
471
|
-
j(e) {
|
|
472
|
-
e === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
class Ce extends T {
|
|
476
|
-
constructor() {
|
|
477
|
-
super(...arguments), this.type = 3;
|
|
478
|
-
}
|
|
479
|
-
j(e) {
|
|
480
|
-
this.element[this.name] = e === c ? void 0 : e;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
class Pe extends T {
|
|
484
|
-
constructor() {
|
|
485
|
-
super(...arguments), this.type = 4;
|
|
486
|
-
}
|
|
487
|
-
j(e) {
|
|
488
|
-
this.element.toggleAttribute(this.name, !!e && e !== c);
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
class ke extends T {
|
|
492
|
-
constructor(e, t, i, s, r) {
|
|
493
|
-
super(e, t, i, s, r), this.type = 5;
|
|
494
|
-
}
|
|
495
|
-
_$AI(e, t = this) {
|
|
496
|
-
if ((e = E(this, e, t, 0) ?? c) === k) return;
|
|
497
|
-
const i = this._$AH, s = e === c && i !== c || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, r = e !== c && (i === c || s);
|
|
498
|
-
s && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
499
|
-
}
|
|
500
|
-
handleEvent(e) {
|
|
501
|
-
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
class Fe {
|
|
505
|
-
constructor(e, t, i) {
|
|
506
|
-
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
|
|
507
|
-
}
|
|
508
|
-
get _$AU() {
|
|
509
|
-
return this._$AM._$AU;
|
|
510
|
-
}
|
|
511
|
-
_$AI(e) {
|
|
512
|
-
E(this, e);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
const Me = j.litHtmlPolyfillSupport;
|
|
516
|
-
Me?.(F, H), (j.litHtmlVersions ??= []).push("3.3.1");
|
|
517
|
-
/**
|
|
518
|
-
* @license
|
|
519
|
-
* Copyright 2018 Google LLC
|
|
520
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
521
|
-
*/
|
|
522
|
-
const De = (o) => o ?? c;
|
|
523
|
-
async function Ue(o, e) {
|
|
1
|
+
import { LitElement as y, unsafeCSS as g, html as a } from "lit";
|
|
2
|
+
import { property as n } from "lit/decorators.js";
|
|
3
|
+
import { ifDefined as m } from "lit/directives/if-defined.js";
|
|
4
|
+
async function _(p, e) {
|
|
524
5
|
if (!e || e.trim() === "") return !0;
|
|
525
|
-
const t = e.toLowerCase().split(",").map((r) => r.trim()), i =
|
|
6
|
+
const t = e.toLowerCase().split(",").map((r) => r.trim()), i = p.name.toLowerCase(), s = i.includes(".") ? i.split(".").pop() : "";
|
|
526
7
|
for (const r of t)
|
|
527
|
-
if (r.startsWith(".") && r.slice(1) === s || r.endsWith("/*") &&
|
|
8
|
+
if (r.startsWith(".") && r.slice(1) === s || r.endsWith("/*") && p.type.startsWith(r.slice(0, -1)) || p.type === r)
|
|
528
9
|
return !0;
|
|
529
10
|
return !1;
|
|
530
11
|
}
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
/* Typography */
|
|
537
|
-
--_nys-fileinput-font-size: var(--nys-font-size-ui-md, 16px);
|
|
538
|
-
--_nys-fileinput-font-weight: var(--nys-font-weight-semibold, 600);
|
|
539
|
-
--_nys-fileinput-line-height: var(--nys-font-lineheight-ui-md, 24px);
|
|
540
|
-
--_nys-fileinput-font-family: var(
|
|
541
|
-
--nys-font-family-ui,
|
|
542
|
-
var(
|
|
543
|
-
--nys-font-family-sans,
|
|
544
|
-
"Proxima Nova",
|
|
545
|
-
"Helvetica Neue",
|
|
546
|
-
"Helvetica",
|
|
547
|
-
"Arial",
|
|
548
|
-
sans-serif
|
|
549
|
-
)
|
|
550
|
-
);
|
|
551
|
-
|
|
552
|
-
/* Dropzone */
|
|
553
|
-
--_nys-fileinput-background-color--dropzone: var(
|
|
554
|
-
--nys-color-ink-reverse,
|
|
555
|
-
#fff
|
|
556
|
-
);
|
|
557
|
-
--_nys-fileinput-background-color--dropzone--disabled: var(
|
|
558
|
-
--nys-color-neutral-10,
|
|
559
|
-
#f6f6f6
|
|
560
|
-
);
|
|
561
|
-
--_nys-fileinput-background-color--dropzone--active: var(
|
|
562
|
-
--nys-color-theme-faint,
|
|
563
|
-
#f7fafd
|
|
564
|
-
);
|
|
565
|
-
--_nys-fileinput-border-radius--dropzone: var(
|
|
566
|
-
--nys-radius-lg,
|
|
567
|
-
var(--nys-space-100, 8px)
|
|
568
|
-
);
|
|
569
|
-
--_nys-fileinput-border-style: dashed;
|
|
570
|
-
--_nys-fileinput-border-color: var(--nys-color-neutral-200, #bec0c1);
|
|
571
|
-
--_nys-fileinput-border-width: var(--nys-border-width-sm, 1px);
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
.nys-fileinput {
|
|
575
|
-
display: flex;
|
|
576
|
-
flex-direction: column;
|
|
577
|
-
align-items: flex-start;
|
|
578
|
-
justify-content: center;
|
|
579
|
-
gap: var(--_nys-fileinput-gap);
|
|
580
|
-
font-family: var(--_nys-fileinput-font-family);
|
|
581
|
-
font-size: var(--_nys-fileinput-font-size);
|
|
582
|
-
font-weight: var(--_nys-fileinput-font-weight);
|
|
583
|
-
line-height: var(--_nys-fileinput-line-height);
|
|
584
|
-
}
|
|
585
|
-
:host([width="lg"]) .nys-fileinput {
|
|
586
|
-
max-width: var(--nys-form-width-lg, 384px);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
ul {
|
|
590
|
-
list-style-type: none;
|
|
591
|
-
padding: 0px;
|
|
592
|
-
margin: 0px;
|
|
593
|
-
width: 100%;
|
|
594
|
-
display: flex;
|
|
595
|
-
flex-direction: column;
|
|
596
|
-
gap: var(--_nys-fileinput-gap);
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
/***** Dropzone *****/
|
|
600
|
-
.nys-fileinput__dropzone {
|
|
601
|
-
display: flex;
|
|
602
|
-
padding: var(--nys-space-400, 32px) var(--nys-space-200, 16px);
|
|
603
|
-
justify-content: center;
|
|
604
|
-
align-items: center;
|
|
605
|
-
gap: 12px;
|
|
606
|
-
align-self: stretch;
|
|
607
|
-
border-radius: var(--_nys-fileinput-border-radius--dropzone);
|
|
608
|
-
outline: var(--_nys-fileinput-border-width)
|
|
609
|
-
var(--_nys-fileinput-border-style) var(--_nys-fileinput-border-color);
|
|
610
|
-
background-color: var(--_nys-fileinput-background-color--dropzone);
|
|
611
|
-
transition: all 60ms ease-in-out;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
.nys-fileinput__dropzone:hover {
|
|
615
|
-
cursor: pointer;
|
|
616
|
-
--_nys-fileinput-border-width: var(--nys-border-width-md, 2px);
|
|
617
|
-
--_nys-fileinput-border-color: var(--nys-color-neutral-700, #4a4d4f);
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
.nys-fileinput__dropzone.drag-active {
|
|
621
|
-
--_nys-fileinput-border-width: var(--nys-border-width-md, 2px);
|
|
622
|
-
--_nys-fileinput-border-color: var(--nys-color-theme, #154973);
|
|
623
|
-
--_nys-fileinput-border-style: solid;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
.nys-fileinput__dropzone.error {
|
|
627
|
-
--_nys-fileinput-border-color: var(--nys-color-danger, #b52c2c);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.nys-fileinput__dropzone.error:hover {
|
|
631
|
-
--_nys-fileinput-border-width: var(--nys-border-width-md, 2px);
|
|
632
|
-
--_nys-fileinput-border-color: var(--nys-color-emergency, #721c1c);
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
.nys-fileinput__dropzone.disabled {
|
|
636
|
-
cursor: not-allowed;
|
|
637
|
-
--_nys-fileinput-border-color: var(--nys-color-neutral-300, #a7a9ab);
|
|
638
|
-
--_nys-fileinput-border-width: var(--nys-border-width-sm, 1px);
|
|
639
|
-
background-color: var(
|
|
640
|
-
--_nys-fileinput-background-color--dropzone--disabled
|
|
641
|
-
);
|
|
642
|
-
color: var(--_nys-fileinput-color--dropzone--disabled);
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
progress {
|
|
646
|
-
display: flex;
|
|
647
|
-
width: 100%;
|
|
648
|
-
height: 6px;
|
|
649
|
-
border-radius: var(--nys-radius-round, 1776px);
|
|
650
|
-
background-color: var(--_nys-fileinput-progress-background);
|
|
651
|
-
overflow: hidden;
|
|
652
|
-
appearance: none;
|
|
653
|
-
border: none;
|
|
654
|
-
}
|
|
655
|
-
progress::-moz-progress-bar {
|
|
656
|
-
background-color: var(--_nys-fileinput-progress-background);
|
|
657
|
-
}
|
|
658
|
-
progress::-webkit-progress-value {
|
|
659
|
-
background-color: var(--_nys-fileinput-progress-background);
|
|
660
|
-
}
|
|
661
|
-
progress::-webkit-progress-bar {
|
|
662
|
-
background-color: var(--_nys-fileinput-progress-background);
|
|
663
|
-
}
|
|
664
|
-
`, Re = se`
|
|
665
|
-
:host {
|
|
666
|
-
/* Global fileitem Styles */
|
|
667
|
-
--_nys-fileitem-border-radius: var(--nys-radius-md, 4px);
|
|
668
|
-
--_nys-fileitem-padding: var(--nys-space-100, 8px)
|
|
669
|
-
var(--nys-space-200, 16px);
|
|
670
|
-
--_nys-fileitem-background-color: var(--nys-color-ink-reverse, #fff);
|
|
671
|
-
--_nys-fileitem-border-color: var(--nys-color-neutral-100, #d0d0ce);
|
|
672
|
-
|
|
673
|
-
/* Typography */
|
|
674
|
-
--_nys-fileitem-font-family: var(
|
|
675
|
-
--nys-font-family-ui,
|
|
676
|
-
var(
|
|
677
|
-
--nys-font-family-sans,
|
|
678
|
-
"Proxima Nova",
|
|
679
|
-
"Helvetica Neue",
|
|
680
|
-
"Helvetica",
|
|
681
|
-
"Arial",
|
|
682
|
-
sans-serif
|
|
683
|
-
)
|
|
684
|
-
);
|
|
685
|
-
--_nys-fileitem-font-size: var(--nys-font-size-ui-md, 16px);
|
|
686
|
-
--_nys-fileitem-font-weight: var(--nys-font-weight-regular, 400);
|
|
687
|
-
--_nys-fileitem-line-height: var(--nys-font-lineheight-ui-md, 24px);
|
|
688
|
-
--_nys-fileitem-letter-spacing: var(
|
|
689
|
-
--nys-font-letterspacing-ui-md,
|
|
690
|
-
0.044px
|
|
691
|
-
);
|
|
692
|
-
|
|
693
|
-
/* Progress Bar */
|
|
694
|
-
--_nys-fileitem-background-color--progress: var(
|
|
695
|
-
--nys-color-neutral-50,
|
|
696
|
-
#ededed
|
|
697
|
-
);
|
|
698
|
-
--_nys-fileitem-background-color--progress--fill: var(
|
|
699
|
-
--nys-color-info,
|
|
700
|
-
#004dd1
|
|
701
|
-
);
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
/***** File List Item *****/
|
|
705
|
-
.file-item {
|
|
706
|
-
position: relative;
|
|
707
|
-
border-radius: var(--_nys-fileitem-border-radius);
|
|
708
|
-
border-width: var(--nys-border-width-sm, 1px);
|
|
709
|
-
border-style: solid;
|
|
710
|
-
border-color: var(--_nys-fileitem-border-color);
|
|
711
|
-
background-color: var(--_nys-fileitem-background-color);
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
.file-item.error {
|
|
715
|
-
--_nys-fileitem-border-color: var(--nys-color-danger, #b52c2c);
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
.file-item__main {
|
|
719
|
-
display: flex;
|
|
720
|
-
justify-items: center;
|
|
721
|
-
align-items: center;
|
|
722
|
-
gap: var(--_nys-fileinput-gap);
|
|
723
|
-
padding: var(--_nys-fileitem-padding);
|
|
724
|
-
height: 56px;
|
|
725
|
-
box-sizing: border-box;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
.file-item__info {
|
|
729
|
-
display: flex;
|
|
730
|
-
flex-direction: column;
|
|
731
|
-
flex: 1;
|
|
732
|
-
min-width: 0;
|
|
733
|
-
font-family: var(--_nys-fileitem-font-family);
|
|
734
|
-
font-size: var(--_nys-fileitem-font-size);
|
|
735
|
-
font-style: normal;
|
|
736
|
-
font-weight: var(--_nys-fileitem-font-weight);
|
|
737
|
-
line-height: var(--_nys-fileitem-line-height);
|
|
738
|
-
letter-spacing: var(--_nys-fileitem-letter-spacing);
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
.file-item__info-name {
|
|
742
|
-
display: flex;
|
|
743
|
-
max-width: 100%;
|
|
744
|
-
overflow: hidden;
|
|
745
|
-
white-space: nowrap;
|
|
746
|
-
align-items: center;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
.file-item__info-name-start {
|
|
750
|
-
overflow: hidden;
|
|
751
|
-
text-overflow: ellipsis;
|
|
752
|
-
white-space: nowrap;
|
|
753
|
-
flex-shrink: 1;
|
|
754
|
-
min-width: 0;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
.file-item p {
|
|
758
|
-
margin: 0;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.file-item__error {
|
|
762
|
-
color: var(--nys-color-danger, #b52c2c);
|
|
763
|
-
text-overflow: ellipsis;
|
|
764
|
-
font-weight: 700;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
/**** Progress Bar ****/
|
|
768
|
-
progress {
|
|
769
|
-
position: absolute;
|
|
770
|
-
bottom: 0;
|
|
771
|
-
display: flex;
|
|
772
|
-
width: 100%;
|
|
773
|
-
height: 6px;
|
|
774
|
-
border-radius: var(--nys-radius-round, 1776px);
|
|
775
|
-
background: var(--_nys-fileitem-background-color--progress--fill);
|
|
776
|
-
overflow: hidden;
|
|
777
|
-
appearance: none;
|
|
778
|
-
}
|
|
779
|
-
/* Track */
|
|
780
|
-
progress::-moz-progress-bar {
|
|
781
|
-
background-color: var(--_nys-fileitem-background-color--progress);
|
|
782
|
-
}
|
|
783
|
-
/* Filled value (the blue bar) */
|
|
784
|
-
progress::-webkit-progress-value {
|
|
785
|
-
background-color: var(--_nys-fileitem-background-color--progress--fill);
|
|
786
|
-
}
|
|
787
|
-
/* Firefox */
|
|
788
|
-
progress::-webkit-progress-bar {
|
|
789
|
-
background-color: var(--_nys-fileitem-background-color--progress);
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
/**** Icon ****/
|
|
793
|
-
.file-icon[name="progress_activity"] {
|
|
794
|
-
animation: spin 1s linear infinite;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
.file-icon[name="error"] {
|
|
798
|
-
color: var(--nys-color-danger, #b52c2c);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
@keyframes spin {
|
|
802
|
-
0% {
|
|
803
|
-
transform: rotate(0deg);
|
|
804
|
-
}
|
|
805
|
-
100% {
|
|
806
|
-
transform: rotate(360deg);
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
`;
|
|
810
|
-
var Oe = Object.defineProperty, N = (o, e, t, i) => {
|
|
811
|
-
for (var s = void 0, r = o.length - 1, n; r >= 0; r--)
|
|
812
|
-
(n = o[r]) && (s = n(e, t, s) || s);
|
|
813
|
-
return s && Oe(e, t, s), s;
|
|
12
|
+
const v = ':host{--_nys-fileitem-border-radius: var(--nys-radius-md, 4px);--_nys-fileitem-padding: var(--nys-space-100, 8px) var(--nys-space-200, 16px);--_nys-fileitem-background-color: var(--nys-color-ink-reverse, #fff);--_nys-fileitem-border-color: var(--nys-color-neutral-100, #d0d0ce);--_nys-fileitem-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-fileitem-font-size: var(--nys-font-size-ui-md, 16px);--_nys-fileitem-font-weight: var(--nys-font-weight-regular, 400);--_nys-fileitem-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-fileitem-letter-spacing: var( --nys-font-letterspacing-ui-md, .044px );--_nys-fileitem-background-color--progress: var( --nys-color-neutral-50, #ededed );--_nys-fileitem-background-color--progress--fill: var( --nys-color-info, #004dd1 )}.file-item{position:relative;border-radius:var(--_nys-fileitem-border-radius);border-width:var(--nys-border-width-sm, 1px);border-style:solid;border-color:var(--_nys-fileitem-border-color);background-color:var(--_nys-fileitem-background-color)}.file-item.error{--_nys-fileitem-border-color: var(--nys-color-danger, #b52c2c)}.file-item__main{display:flex;justify-items:center;align-items:center;gap:var(--_nys-fileinput-gap);padding:var(--_nys-fileitem-padding);height:56px;box-sizing:border-box}.file-item__info{display:flex;flex-direction:column;flex:1;min-width:0;font-family:var(--_nys-fileitem-font-family);font-size:var(--_nys-fileitem-font-size);font-style:normal;font-weight:var(--_nys-fileitem-font-weight);line-height:var(--_nys-fileitem-line-height);letter-spacing:var(--_nys-fileitem-letter-spacing)}.file-item__info-name{display:flex;max-width:100%;overflow:hidden;white-space:nowrap;align-items:center}.file-item__info-name-start{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0}.file-item p{margin:0}.file-item__error{color:var(--nys-color-danger, #b52c2c);text-overflow:ellipsis;font-weight:700}progress{position:absolute;bottom:0;display:flex;width:100%;height:6px;border-radius:var(--nys-radius-round, 1776px);background:var(--_nys-fileitem-background-color--progress--fill);overflow:hidden;appearance:none}progress::-moz-progress-bar{background-color:var(--_nys-fileitem-background-color--progress)}progress::-webkit-progress-value{background-color:var(--_nys-fileitem-background-color--progress--fill)}progress::-webkit-progress-bar{background-color:var(--_nys-fileitem-background-color--progress)}.file-icon[name=progress_activity]{animation:spin 1s linear infinite}.file-icon[name=error]{color:var(--nys-color-danger, #b52c2c)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}';
|
|
13
|
+
var b = Object.defineProperty, u = (p, e, t, i) => {
|
|
14
|
+
for (var s = void 0, r = p.length - 1, d; r >= 0; r--)
|
|
15
|
+
(d = p[r]) && (s = d(e, t, s) || s);
|
|
16
|
+
return s && b(e, t, s), s;
|
|
814
17
|
};
|
|
815
|
-
const
|
|
18
|
+
const h = class h extends y {
|
|
816
19
|
constructor() {
|
|
817
20
|
super(...arguments), this.filename = "", this.status = "pending", this.progress = 0, this.errorMessage = "";
|
|
818
21
|
}
|
|
@@ -826,12 +29,12 @@ const W = class W extends re {
|
|
|
826
29
|
);
|
|
827
30
|
}
|
|
828
31
|
splitFilename(e) {
|
|
829
|
-
const t = e.lastIndexOf("."), i = t !== -1 ? e.slice(t) : "", s = t !== -1 ? e.slice(0, t) : e, r = s.slice(0, s.length - 3),
|
|
830
|
-
return { startPart: r, endPart:
|
|
32
|
+
const t = e.lastIndexOf("."), i = t !== -1 ? e.slice(t) : "", s = t !== -1 ? e.slice(0, t) : e, r = s.slice(0, s.length - 3), d = s.slice(-3);
|
|
33
|
+
return { startPart: r, endPart: d, extension: i };
|
|
831
34
|
}
|
|
832
35
|
render() {
|
|
833
36
|
const { startPart: e, endPart: t, extension: i } = this.splitFilename(this.filename);
|
|
834
|
-
return
|
|
37
|
+
return a`
|
|
835
38
|
<div
|
|
836
39
|
class="file-item ${this.status}"
|
|
837
40
|
aria-busy=${this.status === "processing" ? "true" : "false"}
|
|
@@ -850,7 +53,7 @@ const W = class W extends re {
|
|
|
850
53
|
>${t}${i}</span
|
|
851
54
|
>
|
|
852
55
|
</div>
|
|
853
|
-
${this.errorMessage ?
|
|
56
|
+
${this.errorMessage ? a`<p
|
|
854
57
|
class="file-item__error"
|
|
855
58
|
role="alert"
|
|
856
59
|
aria-live="assertive"
|
|
@@ -871,7 +74,7 @@ const W = class W extends re {
|
|
|
871
74
|
ariaLabel="Remove file: ${this.filename}"
|
|
872
75
|
></nys-button>
|
|
873
76
|
</div>
|
|
874
|
-
${this.status === "processing" ?
|
|
77
|
+
${this.status === "processing" ? a`<div
|
|
875
78
|
class="file-item__progress-container"
|
|
876
79
|
role="progressbar"
|
|
877
80
|
aria-valuemin="0"
|
|
@@ -885,28 +88,29 @@ const W = class W extends re {
|
|
|
885
88
|
`;
|
|
886
89
|
}
|
|
887
90
|
};
|
|
888
|
-
|
|
889
|
-
let
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
],
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
],
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
],
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
],
|
|
902
|
-
customElements.define("nys-fileitem",
|
|
903
|
-
var
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
91
|
+
h.styles = g(v);
|
|
92
|
+
let c = h;
|
|
93
|
+
u([
|
|
94
|
+
n({ type: String })
|
|
95
|
+
], c.prototype, "filename");
|
|
96
|
+
u([
|
|
97
|
+
n({ type: String })
|
|
98
|
+
], c.prototype, "status");
|
|
99
|
+
u([
|
|
100
|
+
n({ type: Number })
|
|
101
|
+
], c.prototype, "progress");
|
|
102
|
+
u([
|
|
103
|
+
n({ type: String })
|
|
104
|
+
], c.prototype, "errorMessage");
|
|
105
|
+
customElements.define("nys-fileitem", c);
|
|
106
|
+
const w = ':host{--_nys-fileinput-gap: var(--nys-space-100, 8px);--_nys-fileinput-font-size: var(--nys-font-size-ui-md, 16px);--_nys-fileinput-font-weight: var(--nys-font-weight-semibold, 600);--_nys-fileinput-line-height: var(--nys-font-lineheight-ui-md, 24px);--_nys-fileinput-font-family: var( --nys-font-family-ui, var( --nys-font-family-sans, "Proxima Nova", "Helvetica Neue", "Helvetica", "Arial", sans-serif ) );--_nys-fileinput-background-color--dropzone: var( --nys-color-ink-reverse, #fff );--_nys-fileinput-background-color--dropzone--disabled: var( --nys-color-neutral-10, #f6f6f6 );--_nys-fileinput-background-color--dropzone--active: var( --nys-color-theme-faint, #f7fafd );--_nys-fileinput-border-radius--dropzone: var( --nys-radius-lg, var(--nys-space-100, 8px) );--_nys-fileinput-border-style: dashed;--_nys-fileinput-border-color: var(--nys-color-neutral-200, #bec0c1);--_nys-fileinput-border-width: var(--nys-border-width-sm, 1px)}.nys-fileinput{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:var(--_nys-fileinput-gap);font-family:var(--_nys-fileinput-font-family);font-size:var(--_nys-fileinput-font-size);font-weight:var(--_nys-fileinput-font-weight);line-height:var(--_nys-fileinput-line-height)}:host([width=lg]) .nys-fileinput{max-width:var(--nys-form-width-lg, 384px)}ul{list-style-type:none;padding:0;margin:0;width:100%;display:flex;flex-direction:column;gap:var(--_nys-fileinput-gap)}.nys-fileinput__dropzone{display:flex;padding:var(--nys-space-400, 32px) var(--nys-space-200, 16px);justify-content:center;align-items:center;gap:12px;align-self:stretch;border-radius:var(--_nys-fileinput-border-radius--dropzone);outline:var(--_nys-fileinput-border-width) var(--_nys-fileinput-border-style) var(--_nys-fileinput-border-color);background-color:var(--_nys-fileinput-background-color--dropzone);transition:all 60ms ease-in-out}.nys-fileinput__dropzone:hover{cursor:pointer;--_nys-fileinput-border-width: var(--nys-border-width-md, 2px);--_nys-fileinput-border-color: var(--nys-color-neutral-700, #4a4d4f)}.nys-fileinput__dropzone.drag-active{--_nys-fileinput-border-width: var(--nys-border-width-md, 2px);--_nys-fileinput-border-color: var(--nys-color-theme, #154973);--_nys-fileinput-border-style: solid}.nys-fileinput__dropzone.error{--_nys-fileinput-border-color: var(--nys-color-danger, #b52c2c)}.nys-fileinput__dropzone.error:hover{--_nys-fileinput-border-width: var(--nys-border-width-md, 2px);--_nys-fileinput-border-color: var(--nys-color-emergency, #721c1c)}.nys-fileinput__dropzone.disabled{cursor:not-allowed;--_nys-fileinput-border-color: var(--nys-color-neutral-300, #a7a9ab);--_nys-fileinput-border-width: var(--nys-border-width-sm, 1px);background-color:var(--_nys-fileinput-background-color--dropzone--disabled);color:var(--_nys-fileinput-color--dropzone--disabled)}progress{display:flex;width:100%;height:6px;border-radius:var(--nys-radius-round, 1776px);background-color:var(--_nys-fileinput-progress-background);overflow:hidden;appearance:none;border:none}progress::-moz-progress-bar{background-color:var(--_nys-fileinput-progress-background)}progress::-webkit-progress-value{background-color:var(--_nys-fileinput-progress-background)}progress::-webkit-progress-bar{background-color:var(--_nys-fileinput-progress-background)}';
|
|
107
|
+
var $ = Object.defineProperty, l = (p, e, t, i) => {
|
|
108
|
+
for (var s = void 0, r = p.length - 1, d; r >= 0; r--)
|
|
109
|
+
(d = p[r]) && (s = d(e, t, s) || s);
|
|
110
|
+
return s && $(e, t, s), s;
|
|
907
111
|
};
|
|
908
|
-
let
|
|
909
|
-
const
|
|
112
|
+
let x = 0;
|
|
113
|
+
const f = class f extends y {
|
|
910
114
|
// allows use of elementInternals' API
|
|
911
115
|
constructor() {
|
|
912
116
|
super(), this.id = "", this.name = "", this.label = "", this.description = "", this.multiple = !1, this.form = null, this._tooltip = "", this.accept = "", this.disabled = !1, this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.dropzone = !1, this.width = "full", this.inverted = !1, this._selectedFiles = [], this._dragActive = !1, this._internals = this.attachInternals();
|
|
@@ -941,7 +145,7 @@ const O = class O extends re {
|
|
|
941
145
|
}
|
|
942
146
|
// Generate a unique ID if one is not provided
|
|
943
147
|
connectedCallback() {
|
|
944
|
-
super.connectedCallback(), this.id || (this.id = `nys-fileinput-${Date.now()}-${
|
|
148
|
+
super.connectedCallback(), this.id || (this.id = `nys-fileinput-${Date.now()}-${x++}`), this.addEventListener("invalid", this._handleInvalid);
|
|
945
149
|
}
|
|
946
150
|
disconnectedCallback() {
|
|
947
151
|
super.disconnectedCallback(), this.removeEventListener("invalid", this._handleInvalid);
|
|
@@ -999,7 +203,7 @@ const O = class O extends re {
|
|
|
999
203
|
if (t) {
|
|
1000
204
|
const i = this._internals.form;
|
|
1001
205
|
i ? Array.from(i.elements).find(
|
|
1002
|
-
(
|
|
206
|
+
(d) => typeof d.checkValidity == "function" && !d.checkValidity()
|
|
1003
207
|
) === this && (t.focus(), t.classList.add("active-focus")) : (t.focus(), t.classList.add("active-focus"));
|
|
1004
208
|
}
|
|
1005
209
|
}
|
|
@@ -1020,7 +224,7 @@ const O = class O extends re {
|
|
|
1020
224
|
async _processFile(e) {
|
|
1021
225
|
e.status = "processing";
|
|
1022
226
|
try {
|
|
1023
|
-
if (!await
|
|
227
|
+
if (!await _(e.file, this.accept)) {
|
|
1024
228
|
e.status = "error", e.errorMsg = "File type is invalid.", this.requestUpdate();
|
|
1025
229
|
return;
|
|
1026
230
|
}
|
|
@@ -1109,12 +313,11 @@ const O = class O extends re {
|
|
|
1109
313
|
}) : this._saveSelectedFiles(i[0]), this.requestUpdate(), this._dispatchChangeEvent();
|
|
1110
314
|
}
|
|
1111
315
|
render() {
|
|
1112
|
-
return
|
|
316
|
+
return a`<div
|
|
1113
317
|
class="nys-fileinput"
|
|
1114
318
|
@nys-fileRemove=${this._handleFileRemove}
|
|
1115
319
|
>
|
|
1116
320
|
<nys-label
|
|
1117
|
-
for=${this.id}
|
|
1118
321
|
label=${this.label}
|
|
1119
322
|
description=${this.description}
|
|
1120
323
|
flag=${this.required ? "required" : this.optional ? "optional" : ""}
|
|
@@ -1130,7 +333,7 @@ const O = class O extends re {
|
|
|
1130
333
|
type="file"
|
|
1131
334
|
name=${this.name}
|
|
1132
335
|
accept=${this.accept}
|
|
1133
|
-
form=${
|
|
336
|
+
form=${m(this.form || void 0)}
|
|
1134
337
|
?multiple=${this.multiple}
|
|
1135
338
|
?required=${this.required}
|
|
1136
339
|
?disabled=${this.disabled || !this.multiple && this._selectedFiles.length > 0}
|
|
@@ -1140,19 +343,20 @@ const O = class O extends re {
|
|
|
1140
343
|
hidden
|
|
1141
344
|
/>
|
|
1142
345
|
|
|
1143
|
-
${this.dropzone ?
|
|
346
|
+
${this.dropzone ? a`<div
|
|
1144
347
|
class="nys-fileinput__dropzone
|
|
1145
348
|
${this._dragActive ? "drag-active" : ""}
|
|
1146
349
|
${this._isDropDisabled ? "disabled" : ""}
|
|
1147
350
|
${this.showError && !this._isDropDisabled ? "error" : ""}"
|
|
1148
|
-
@click=${this._isDropDisabled ? null :
|
|
1149
|
-
|
|
351
|
+
@click=${this._isDropDisabled ? null : (e) => {
|
|
352
|
+
e.target.closest("nys-button") || this._openFileDialog();
|
|
353
|
+
}}
|
|
1150
354
|
@dragover=${this._isDropDisabled ? null : this._onDragOver}
|
|
1151
355
|
@dragleave=${this._isDropDisabled ? null : this._onDragLeave}
|
|
1152
356
|
@drop=${this._isDropDisabled ? null : this._onDrop}
|
|
1153
357
|
aria-label="Drag files here or choose from folder"
|
|
1154
358
|
>
|
|
1155
|
-
${this._dragActive ?
|
|
359
|
+
${this._dragActive ? a`<p>Drop file to upload</p>` : a` <nys-button
|
|
1156
360
|
id="choose-files-btn-drag"
|
|
1157
361
|
name="file-btn"
|
|
1158
362
|
label=${this.multiple ? "Choose files" : "Choose file"}
|
|
@@ -1160,13 +364,12 @@ const O = class O extends re {
|
|
|
1160
364
|
ariaLabel=${this._buttonAriaLabel}
|
|
1161
365
|
ariaDescription=${this._buttonAriaDescription}
|
|
1162
366
|
?disabled=${this._isDropDisabled}
|
|
1163
|
-
@nys-click
|
|
1164
|
-
e.stopPropagation(), this._openFileDialog();
|
|
1165
|
-
}}
|
|
1166
|
-
@click=${(e) => e.stopPropagation()}
|
|
367
|
+
@nys-click="${(e) => {
|
|
368
|
+
e.preventDefault(), e.stopPropagation(), this._openFileDialog();
|
|
369
|
+
}}"
|
|
1167
370
|
></nys-button>
|
|
1168
371
|
<p>or drag here</p>`}
|
|
1169
|
-
</div>` :
|
|
372
|
+
</div>` : a`<nys-button
|
|
1170
373
|
id="choose-files-btn"
|
|
1171
374
|
name="file-btn"
|
|
1172
375
|
label=${this.multiple ? "Choose files" : "Choose file"}
|
|
@@ -1176,16 +379,16 @@ const O = class O extends re {
|
|
|
1176
379
|
?disabled=${this.disabled || !this.multiple && this._selectedFiles.length > 0}
|
|
1177
380
|
@nys-click=${this._openFileDialog}
|
|
1178
381
|
></nys-button>`}
|
|
1179
|
-
${this.showError ?
|
|
382
|
+
${this.showError ? a`
|
|
1180
383
|
<nys-errormessage
|
|
1181
384
|
?showError=${this.showError}
|
|
1182
385
|
errorMessage=${this._internals.validationMessage || this.errorMessage}
|
|
1183
386
|
></nys-errormessage>
|
|
1184
387
|
` : null}
|
|
1185
|
-
${this._selectedFiles.length > 0 ?
|
|
388
|
+
${this._selectedFiles.length > 0 ? a`
|
|
1186
389
|
<ul>
|
|
1187
390
|
${this._selectedFiles.map(
|
|
1188
|
-
(e) =>
|
|
391
|
+
(e) => a`<li>
|
|
1189
392
|
<nys-fileitem
|
|
1190
393
|
filename=${e.file.name}
|
|
1191
394
|
status=${e.status}
|
|
@@ -1199,58 +402,58 @@ const O = class O extends re {
|
|
|
1199
402
|
</div>`;
|
|
1200
403
|
}
|
|
1201
404
|
};
|
|
1202
|
-
|
|
1203
|
-
let
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
],
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
],
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
],
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
],
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
],
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
],
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
],
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
],
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
],
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
],
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
],
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
],
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
],
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
],
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
],
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
],
|
|
1252
|
-
customElements.get("nys-fileinput") || customElements.define("nys-fileinput",
|
|
405
|
+
f.styles = g(w), f.formAssociated = !0;
|
|
406
|
+
let o = f;
|
|
407
|
+
l([
|
|
408
|
+
n({ type: String, reflect: !0 })
|
|
409
|
+
], o.prototype, "id");
|
|
410
|
+
l([
|
|
411
|
+
n({ type: String, reflect: !0 })
|
|
412
|
+
], o.prototype, "name");
|
|
413
|
+
l([
|
|
414
|
+
n({ type: String })
|
|
415
|
+
], o.prototype, "label");
|
|
416
|
+
l([
|
|
417
|
+
n({ type: String })
|
|
418
|
+
], o.prototype, "description");
|
|
419
|
+
l([
|
|
420
|
+
n({ type: Boolean })
|
|
421
|
+
], o.prototype, "multiple");
|
|
422
|
+
l([
|
|
423
|
+
n({ type: String, reflect: !0 })
|
|
424
|
+
], o.prototype, "form");
|
|
425
|
+
l([
|
|
426
|
+
n({ type: String })
|
|
427
|
+
], o.prototype, "_tooltip");
|
|
428
|
+
l([
|
|
429
|
+
n({ type: String })
|
|
430
|
+
], o.prototype, "accept");
|
|
431
|
+
l([
|
|
432
|
+
n({ type: Boolean, reflect: !0 })
|
|
433
|
+
], o.prototype, "disabled");
|
|
434
|
+
l([
|
|
435
|
+
n({ type: Boolean, reflect: !0 })
|
|
436
|
+
], o.prototype, "required");
|
|
437
|
+
l([
|
|
438
|
+
n({ type: Boolean, reflect: !0 })
|
|
439
|
+
], o.prototype, "optional");
|
|
440
|
+
l([
|
|
441
|
+
n({ type: Boolean, reflect: !0 })
|
|
442
|
+
], o.prototype, "showError");
|
|
443
|
+
l([
|
|
444
|
+
n({ type: String })
|
|
445
|
+
], o.prototype, "errorMessage");
|
|
446
|
+
l([
|
|
447
|
+
n({ type: Boolean })
|
|
448
|
+
], o.prototype, "dropzone");
|
|
449
|
+
l([
|
|
450
|
+
n({ type: String, reflect: !0 })
|
|
451
|
+
], o.prototype, "width");
|
|
452
|
+
l([
|
|
453
|
+
n({ type: Boolean, reflect: !0 })
|
|
454
|
+
], o.prototype, "inverted");
|
|
455
|
+
customElements.get("nys-fileinput") || customElements.define("nys-fileinput", o);
|
|
1253
456
|
export {
|
|
1254
|
-
|
|
457
|
+
o as NysFileinput
|
|
1255
458
|
};
|
|
1256
459
|
//# sourceMappingURL=nys-fileinput.js.map
|