nve-designsystem 0.1.65 → 0.1.67
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/chunks/chunk.GMVRWIWU.js +5 -11
- package/chunks/class-map.js +3 -6
- package/chunks/directive-helpers.js +4 -4
- package/chunks/lit-element.js +39 -74
- package/chunks/live.js +6 -12
- package/chunks/query.js +8 -22
- package/chunks/static.js +3 -6
- package/components/nve-alert/nve-alert.component.js +4 -9
- package/components/nve-button/nve-button.component.d.ts +3 -1
- package/components/nve-button/nve-button.component.js +18 -18
- package/components/nve-checkbox/nve-checkbox.component.js +0 -2
- package/components/nve-checkbox-group/nve-checkbox-group.component.js +41 -57
- package/components/nve-dialog/nve-dialog.component.js +13 -17
- package/components/nve-dropdown/nve-dropdown.component.d.ts +3 -1
- package/components/nve-dropdown/nve-dropdown.component.js +37 -34
- package/components/nve-input/nve-input.component.d.ts +11 -1
- package/components/nve-input/nve-input.component.js +35 -26
- package/components/nve-label/nve-label.component.js +32 -40
- package/components/nve-menu-item/nve-menu-item.component.js +26 -41
- package/components/nve-option/nve-option.component.js +0 -2
- package/components/nve-popup/nve-popup.component.js +6 -8
- package/components/nve-radio/nve-radio.component.js +0 -2
- package/components/nve-select/nve-select.component.js +5 -14
- package/components/nve-select/nve-select.styles.js +1 -2
- package/components/nve-stepper/nve-stepper.component.js +1 -3
- package/components/nve-textarea/nve-textarea.component.d.ts +6 -1
- package/components/nve-textarea/nve-textarea.component.js +92 -98
- package/components/nve-tooltip/nve-tooltip.component.js +0 -1
- package/interfaces/NveComponent.interface.d.ts +11 -0
- package/interfaces/NveComponent.interface.js +1 -0
- package/nve-designsystem.js +48 -93
- package/package.json +1 -1
package/chunks/chunk.GMVRWIWU.js
CHANGED
|
@@ -829,8 +829,7 @@ function pe(t, e, n) {
|
|
|
829
829
|
if ((j(e) !== "body" || tt(i)) && (l = at(e)), o) {
|
|
830
830
|
const c = I(e, !0, r, e);
|
|
831
831
|
a.x = c.x + e.clientLeft, a.y = c.y + e.clientTop;
|
|
832
|
-
} else
|
|
833
|
-
i && (a.x = Tt(i));
|
|
832
|
+
} else i && (a.x = Tt(i));
|
|
834
833
|
return {
|
|
835
834
|
x: s.left + l.scrollLeft - a.x,
|
|
836
835
|
y: s.top + l.scrollTop - a.y,
|
|
@@ -980,12 +979,9 @@ function lt(t) {
|
|
|
980
979
|
return t.assignedSlot ? t.assignedSlot : t.parentNode instanceof ShadowRoot ? t.parentNode.host : t.parentNode;
|
|
981
980
|
}
|
|
982
981
|
function be(t) {
|
|
983
|
-
for (let e = t; e; e = lt(e))
|
|
984
|
-
if (e instanceof Element && getComputedStyle(e).display === "none")
|
|
985
|
-
return null;
|
|
982
|
+
for (let e = t; e; e = lt(e)) if (e instanceof Element && getComputedStyle(e).display === "none") return null;
|
|
986
983
|
for (let e = lt(t); e; e = lt(e)) {
|
|
987
|
-
if (!(e instanceof Element))
|
|
988
|
-
continue;
|
|
984
|
+
if (!(e instanceof Element)) continue;
|
|
989
985
|
const n = getComputedStyle(e);
|
|
990
986
|
if (n.display !== "contents" && (n.position !== "static" || n.filter !== "none" || e.tagName === "BODY"))
|
|
991
987
|
return e;
|
|
@@ -1012,8 +1008,7 @@ var x = class extends Ft {
|
|
|
1012
1008
|
if (await this.stop(), this.anchor && typeof this.anchor == "string") {
|
|
1013
1009
|
const t = this.getRootNode();
|
|
1014
1010
|
this.anchorEl = t.getElementById(this.anchor);
|
|
1015
|
-
} else
|
|
1016
|
-
this.anchor instanceof Element || xe(this.anchor) ? this.anchorEl = this.anchor : this.anchorEl = this.querySelector('[slot="anchor"]');
|
|
1011
|
+
} else this.anchor instanceof Element || xe(this.anchor) ? this.anchorEl = this.anchor : this.anchorEl = this.querySelector('[slot="anchor"]');
|
|
1017
1012
|
this.anchorEl instanceof HTMLSlotElement && (this.anchorEl = this.anchorEl.assignedElements({ flatten: !0 })[0]), this.anchorEl && this.start();
|
|
1018
1013
|
}
|
|
1019
1014
|
start() {
|
|
@@ -1090,8 +1085,7 @@ var x = class extends Ft {
|
|
|
1090
1085
|
} else if (this.arrowPlacement === "end") {
|
|
1091
1086
|
const u = typeof a == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
|
|
1092
1087
|
p = s ? "" : u, f = s ? u : "", d = typeof c == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
|
|
1093
|
-
} else
|
|
1094
|
-
this.arrowPlacement === "center" ? (f = typeof a == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "", h = typeof c == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "") : (f = typeof a == "number" ? `${a}px` : "", h = typeof c == "number" ? `${c}px` : "");
|
|
1088
|
+
} else this.arrowPlacement === "center" ? (f = typeof a == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "", h = typeof c == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "") : (f = typeof a == "number" ? `${a}px` : "", h = typeof c == "number" ? `${c}px` : "");
|
|
1095
1089
|
Object.assign(this.arrowEl.style, {
|
|
1096
1090
|
top: h,
|
|
1097
1091
|
right: p,
|
package/chunks/class-map.js
CHANGED
|
@@ -29,8 +29,7 @@ class d {
|
|
|
29
29
|
const u = c(class extends d {
|
|
30
30
|
constructor(e) {
|
|
31
31
|
var t;
|
|
32
|
-
if (super(e), e.type !== a.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2)
|
|
33
|
-
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
32
|
+
if (super(e), e.type !== a.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
34
33
|
}
|
|
35
34
|
render(e) {
|
|
36
35
|
return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
|
|
@@ -39,13 +38,11 @@ const u = c(class extends d {
|
|
|
39
38
|
var r, n;
|
|
40
39
|
if (this.it === void 0) {
|
|
41
40
|
this.it = /* @__PURE__ */ new Set(), e.strings !== void 0 && (this.st = new Set(e.strings.join(" ").split(/\s/).filter((s) => s !== "")));
|
|
42
|
-
for (const s in t)
|
|
43
|
-
t[s] && !((r = this.st) != null && r.has(s)) && this.it.add(s);
|
|
41
|
+
for (const s in t) t[s] && !((r = this.st) != null && r.has(s)) && this.it.add(s);
|
|
44
42
|
return this.render(t);
|
|
45
43
|
}
|
|
46
44
|
const i = e.element.classList;
|
|
47
|
-
for (const s of this.it)
|
|
48
|
-
s in t || (i.remove(s), this.it.delete(s));
|
|
45
|
+
for (const s of this.it) s in t || (i.remove(s), this.it.delete(s));
|
|
49
46
|
for (const s in t) {
|
|
50
47
|
const o = !!t[s];
|
|
51
48
|
o === this.it.has(s) || (n = this.st) != null && n.has(s) || (o ? (i.add(s), this.it.add(s)) : (i.remove(s), this.it.delete(s)));
|
|
@@ -4,9 +4,9 @@ import "./lit-element.js";
|
|
|
4
4
|
* Copyright 2020 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const
|
|
7
|
+
const e = (t, i) => (t == null ? void 0 : t._$litType$) !== void 0, p = (t) => t.strings === void 0, s = {}, r = (t, i = s) => t._$AH = i;
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
e,
|
|
10
|
+
p as f,
|
|
11
|
+
r as m
|
|
12
12
|
};
|
package/chunks/lit-element.js
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
const T = globalThis, I = T.ShadowRoot && (T.ShadyCSS === void 0 || T.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, B = Symbol(), j = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let Y = class {
|
|
8
8
|
constructor(t, e, s) {
|
|
9
|
-
if (this._$cssResult$ = !0, s !== B)
|
|
10
|
-
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
9
|
+
if (this._$cssResult$ = !0, s !== B) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
11
10
|
this.cssText = t, this.t = e;
|
|
12
11
|
}
|
|
13
12
|
get styleSheet() {
|
|
@@ -25,25 +24,20 @@ let Y = class {
|
|
|
25
24
|
};
|
|
26
25
|
const ot = (n) => new Y(typeof n == "string" ? n : n + "", void 0, B), wt = (n, ...t) => {
|
|
27
26
|
const e = n.length === 1 ? n[0] : t.reduce((s, i, o) => s + ((r) => {
|
|
28
|
-
if (r._$cssResult$ === !0)
|
|
29
|
-
|
|
30
|
-
if (typeof r == "number")
|
|
31
|
-
return r;
|
|
27
|
+
if (r._$cssResult$ === !0) return r.cssText;
|
|
28
|
+
if (typeof r == "number") return r;
|
|
32
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
33
30
|
})(i) + n[o + 1], n[0]);
|
|
34
31
|
return new Y(e, n, B);
|
|
35
32
|
}, ht = (n, t) => {
|
|
36
|
-
if (I)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, n.appendChild(s);
|
|
42
|
-
}
|
|
33
|
+
if (I) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
|
+
else for (const e of t) {
|
|
35
|
+
const s = document.createElement("style"), i = T.litNonce;
|
|
36
|
+
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, n.appendChild(s);
|
|
37
|
+
}
|
|
43
38
|
}, W = I ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
44
39
|
let e = "";
|
|
45
|
-
for (const s of t.cssRules)
|
|
46
|
-
e += s.cssText;
|
|
40
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
47
41
|
return ot(e);
|
|
48
42
|
})(n) : n;
|
|
49
43
|
/**
|
|
@@ -111,25 +105,20 @@ class y extends HTMLElement {
|
|
|
111
105
|
return this.elementProperties.get(t) ?? q;
|
|
112
106
|
}
|
|
113
107
|
static _$Ei() {
|
|
114
|
-
if (this.hasOwnProperty(b("elementProperties")))
|
|
115
|
-
return;
|
|
108
|
+
if (this.hasOwnProperty(b("elementProperties"))) return;
|
|
116
109
|
const t = $t(this);
|
|
117
110
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
118
111
|
}
|
|
119
112
|
static finalize() {
|
|
120
|
-
if (this.hasOwnProperty(b("finalized")))
|
|
121
|
-
return;
|
|
113
|
+
if (this.hasOwnProperty(b("finalized"))) return;
|
|
122
114
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(b("properties"))) {
|
|
123
115
|
const e = this.properties, s = [...dt(e), ...pt(e)];
|
|
124
|
-
for (const i of s)
|
|
125
|
-
this.createProperty(i, e[i]);
|
|
116
|
+
for (const i of s) this.createProperty(i, e[i]);
|
|
126
117
|
}
|
|
127
118
|
const t = this[Symbol.metadata];
|
|
128
119
|
if (t !== null) {
|
|
129
120
|
const e = litPropertyMetadata.get(t);
|
|
130
|
-
if (e !== void 0)
|
|
131
|
-
for (const [s, i] of e)
|
|
132
|
-
this.elementProperties.set(s, i);
|
|
121
|
+
if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
|
|
133
122
|
}
|
|
134
123
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
135
124
|
for (const [e, s] of this.elementProperties) {
|
|
@@ -142,10 +131,8 @@ class y extends HTMLElement {
|
|
|
142
131
|
const e = [];
|
|
143
132
|
if (Array.isArray(t)) {
|
|
144
133
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
145
|
-
for (const i of s)
|
|
146
|
-
|
|
147
|
-
} else
|
|
148
|
-
t !== void 0 && e.push(W(t));
|
|
134
|
+
for (const i of s) e.unshift(W(i));
|
|
135
|
+
} else t !== void 0 && e.push(W(t));
|
|
149
136
|
return e;
|
|
150
137
|
}
|
|
151
138
|
static _$Eu(t, e) {
|
|
@@ -169,8 +156,7 @@ class y extends HTMLElement {
|
|
|
169
156
|
}
|
|
170
157
|
_$ES() {
|
|
171
158
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
172
|
-
for (const s of e.keys())
|
|
173
|
-
this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
159
|
+
for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
174
160
|
t.size > 0 && (this._$Ep = t);
|
|
175
161
|
}
|
|
176
162
|
createRenderRoot() {
|
|
@@ -214,8 +200,7 @@ class y extends HTMLElement {
|
|
|
214
200
|
}
|
|
215
201
|
requestUpdate(t, e, s, i = !1, o) {
|
|
216
202
|
if (t !== void 0) {
|
|
217
|
-
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? tt)(i ? o : this[t], e))
|
|
218
|
-
return;
|
|
203
|
+
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? tt)(i ? o : this[t], e)) return;
|
|
219
204
|
this.C(t, e, s);
|
|
220
205
|
}
|
|
221
206
|
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
|
@@ -238,18 +223,14 @@ class y extends HTMLElement {
|
|
|
238
223
|
}
|
|
239
224
|
performUpdate() {
|
|
240
225
|
var s;
|
|
241
|
-
if (!this.isUpdatePending)
|
|
242
|
-
return;
|
|
226
|
+
if (!this.isUpdatePending) return;
|
|
243
227
|
if (!this.hasUpdated) {
|
|
244
228
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
245
|
-
for (const [o, r] of this._$Ep)
|
|
246
|
-
this[o] = r;
|
|
229
|
+
for (const [o, r] of this._$Ep) this[o] = r;
|
|
247
230
|
this._$Ep = void 0;
|
|
248
231
|
}
|
|
249
232
|
const i = this.constructor.elementProperties;
|
|
250
|
-
if (i.size > 0)
|
|
251
|
-
for (const [o, r] of i)
|
|
252
|
-
r.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.C(o, this[o], r);
|
|
233
|
+
if (i.size > 0) for (const [o, r] of i) r.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.C(o, this[o], r);
|
|
253
234
|
}
|
|
254
235
|
let t = !1;
|
|
255
236
|
const e = this._$AL;
|
|
@@ -302,8 +283,7 @@ const C = globalThis, O = C.trustedTypes, J = O ? O.createPolicy("lit-html", { c
|
|
|
302
283
|
\f\r]`, S = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, K = /-->/g, Z = />/g, A = RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
|
|
303
284
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), F = /'/g, G = /"/g, nt = /^(?:script|style|textarea|title)$/i, At = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), Pt = At(1), v = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Q = /* @__PURE__ */ new WeakMap(), g = m.createTreeWalker(m, 129);
|
|
304
285
|
function rt(n, t) {
|
|
305
|
-
if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
|
|
306
|
-
throw Error("invalid template strings array");
|
|
286
|
+
if (!Array.isArray(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
307
287
|
return J !== void 0 ? J.createHTML(t) : t;
|
|
308
288
|
}
|
|
309
289
|
const gt = (n, t) => {
|
|
@@ -312,8 +292,7 @@ const gt = (n, t) => {
|
|
|
312
292
|
for (let l = 0; l < e; l++) {
|
|
313
293
|
const h = n[l];
|
|
314
294
|
let c, p, a = -1, $ = 0;
|
|
315
|
-
for (; $ < h.length && (r.lastIndex = $, p = r.exec(h), p !== null); )
|
|
316
|
-
$ = r.lastIndex, r === S ? p[1] === "!--" ? r = K : p[1] !== void 0 ? r = Z : p[2] !== void 0 ? (nt.test(p[2]) && (i = RegExp("</" + p[2], "g")), r = A) : p[3] !== void 0 && (r = A) : r === A ? p[0] === ">" ? (r = i ?? S, a = -1) : p[1] === void 0 ? a = -2 : (a = r.lastIndex - p[2].length, c = p[1], r = p[3] === void 0 ? A : p[3] === '"' ? G : F) : r === G || r === F ? r = A : r === K || r === Z ? r = S : (r = A, i = void 0);
|
|
295
|
+
for (; $ < h.length && (r.lastIndex = $, p = r.exec(h), p !== null); ) $ = r.lastIndex, r === S ? p[1] === "!--" ? r = K : p[1] !== void 0 ? r = Z : p[2] !== void 0 ? (nt.test(p[2]) && (i = RegExp("</" + p[2], "g")), r = A) : p[3] !== void 0 && (r = A) : r === A ? p[0] === ">" ? (r = i ?? S, a = -1) : p[1] === void 0 ? a = -2 : (a = r.lastIndex - p[2].length, c = p[1], r = p[3] === void 0 ? A : p[3] === '"' ? G : F) : r === G || r === F ? r = A : r === K || r === Z ? r = S : (r = A, i = void 0);
|
|
317
296
|
const u = r === A && n[l + 1].startsWith("/>") ? " " : "";
|
|
318
297
|
o += r === S ? h + _t : a >= 0 ? (s.push(c), h.slice(0, a) + et + h.slice(a) + _ + u) : h + _ + (a === -2 ? l : u);
|
|
319
298
|
}
|
|
@@ -331,30 +310,23 @@ class x {
|
|
|
331
310
|
}
|
|
332
311
|
for (; (i = g.nextNode()) !== null && h.length < l; ) {
|
|
333
312
|
if (i.nodeType === 1) {
|
|
334
|
-
if (i.hasAttributes())
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
h.push({ type: 1, index: o, name: H[2], strings: u, ctor: H[1] === "." ? yt : H[1] === "?" ? vt : H[1] === "@" ? Et : R }), i.removeAttribute(a);
|
|
339
|
-
} else
|
|
340
|
-
a.startsWith(_) && (h.push({ type: 6, index: o }), i.removeAttribute(a));
|
|
313
|
+
if (i.hasAttributes()) for (const a of i.getAttributeNames()) if (a.endsWith(et)) {
|
|
314
|
+
const $ = p[r++], u = i.getAttribute(a).split(_), H = /([.?@])?(.*)/.exec($);
|
|
315
|
+
h.push({ type: 1, index: o, name: H[2], strings: u, ctor: H[1] === "." ? yt : H[1] === "?" ? vt : H[1] === "@" ? Et : R }), i.removeAttribute(a);
|
|
316
|
+
} else a.startsWith(_) && (h.push({ type: 6, index: o }), i.removeAttribute(a));
|
|
341
317
|
if (nt.test(i.tagName)) {
|
|
342
318
|
const a = i.textContent.split(_), $ = a.length - 1;
|
|
343
319
|
if ($ > 0) {
|
|
344
320
|
i.textContent = O ? O.emptyScript : "";
|
|
345
|
-
for (let u = 0; u < $; u++)
|
|
346
|
-
i.append(a[u], w()), g.nextNode(), h.push({ type: 2, index: ++o });
|
|
321
|
+
for (let u = 0; u < $; u++) i.append(a[u], w()), g.nextNode(), h.push({ type: 2, index: ++o });
|
|
347
322
|
i.append(a[$], w());
|
|
348
323
|
}
|
|
349
324
|
}
|
|
350
|
-
} else if (i.nodeType === 8)
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
for (; (a = i.data.indexOf(_, a + 1)) !== -1; )
|
|
356
|
-
h.push({ type: 7, index: o }), a += _.length - 1;
|
|
357
|
-
}
|
|
325
|
+
} else if (i.nodeType === 8) if (i.data === st) h.push({ type: 2, index: o });
|
|
326
|
+
else {
|
|
327
|
+
let a = -1;
|
|
328
|
+
for (; (a = i.data.indexOf(_, a + 1)) !== -1; ) h.push({ type: 7, index: o }), a += _.length - 1;
|
|
329
|
+
}
|
|
358
330
|
o++;
|
|
359
331
|
}
|
|
360
332
|
}
|
|
@@ -365,8 +337,7 @@ class x {
|
|
|
365
337
|
}
|
|
366
338
|
function E(n, t, e = n, s) {
|
|
367
339
|
var r, l;
|
|
368
|
-
if (t === v)
|
|
369
|
-
return t;
|
|
340
|
+
if (t === v) return t;
|
|
370
341
|
let i = s !== void 0 ? (r = e._$Co) == null ? void 0 : r[s] : e._$Cl;
|
|
371
342
|
const o = P(t) ? void 0 : t._$litDirective$;
|
|
372
343
|
return (i == null ? void 0 : i.constructor) !== o && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), o === void 0 ? i = void 0 : (i = new o(n), i._$AT(n, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = E(n, i._$AS(n, t.values), i, s)), t;
|
|
@@ -396,8 +367,7 @@ class mt {
|
|
|
396
367
|
}
|
|
397
368
|
p(t) {
|
|
398
369
|
let e = 0;
|
|
399
|
-
for (const s of this._$AV)
|
|
400
|
-
s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
370
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
401
371
|
}
|
|
402
372
|
}
|
|
403
373
|
class U {
|
|
@@ -434,8 +404,7 @@ class U {
|
|
|
434
404
|
g(t) {
|
|
435
405
|
var o;
|
|
436
406
|
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = x.createElement(rt(s.h, s.h[0]), this.options)), s);
|
|
437
|
-
if (((o = this._$AH) == null ? void 0 : o._$AD) === i)
|
|
438
|
-
this._$AH.p(e);
|
|
407
|
+
if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(e);
|
|
439
408
|
else {
|
|
440
409
|
const r = new mt(i, this), l = r.u(this.options);
|
|
441
410
|
r.p(e), this.$(l), this._$AH = r;
|
|
@@ -449,8 +418,7 @@ class U {
|
|
|
449
418
|
it(this._$AH) || (this._$AH = [], this._$AR());
|
|
450
419
|
const e = this._$AH;
|
|
451
420
|
let s, i = 0;
|
|
452
|
-
for (const o of t)
|
|
453
|
-
i === e.length ? e.push(s = new U(this.k(w()), this.k(w()), this, this.options)) : s = e[i], s._$AI(o), i++;
|
|
421
|
+
for (const o of t) i === e.length ? e.push(s = new U(this.k(w()), this.k(w()), this, this.options)) : s = e[i], s._$AI(o), i++;
|
|
454
422
|
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
|
|
455
423
|
}
|
|
456
424
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -478,13 +446,11 @@ class R {
|
|
|
478
446
|
_$AI(t, e = this, s, i) {
|
|
479
447
|
const o = this.strings;
|
|
480
448
|
let r = !1;
|
|
481
|
-
if (o === void 0)
|
|
482
|
-
t = E(this, t, e, 0), r = !P(t) || t !== this._$AH && t !== v, r && (this._$AH = t);
|
|
449
|
+
if (o === void 0) t = E(this, t, e, 0), r = !P(t) || t !== this._$AH && t !== v, r && (this._$AH = t);
|
|
483
450
|
else {
|
|
484
451
|
const l = t;
|
|
485
452
|
let h, c;
|
|
486
|
-
for (t = o[0], h = 0; h < o.length - 1; h++)
|
|
487
|
-
c = E(this, l[s + h], e, h), c === v && (c = this._$AH[h]), r || (r = !P(c) || c !== this._$AH[h]), c === d ? t = d : t !== d && (t += (c ?? "") + o[h + 1]), this._$AH[h] = c;
|
|
453
|
+
for (t = o[0], h = 0; h < o.length - 1; h++) c = E(this, l[s + h], e, h), c === v && (c = this._$AH[h]), r || (r = !P(c) || c !== this._$AH[h]), c === d ? t = d : t !== d && (t += (c ?? "") + o[h + 1]), this._$AH[h] = c;
|
|
488
454
|
}
|
|
489
455
|
r && !i && this.O(t);
|
|
490
456
|
}
|
|
@@ -513,8 +479,7 @@ class Et extends R {
|
|
|
513
479
|
super(t, e, s, i, o), this.type = 5;
|
|
514
480
|
}
|
|
515
481
|
_$AI(t, e = this) {
|
|
516
|
-
if ((t = E(this, t, e, 0) ?? d) === v)
|
|
517
|
-
return;
|
|
482
|
+
if ((t = E(this, t, e, 0) ?? d) === v) return;
|
|
518
483
|
const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== d && (s === d || i);
|
|
519
484
|
i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
520
485
|
}
|
package/chunks/live.js
CHANGED
|
@@ -8,26 +8,20 @@ import { f as l, m as p } from "./directive-helpers.js";
|
|
|
8
8
|
*/
|
|
9
9
|
const c = T(class extends f {
|
|
10
10
|
constructor(e) {
|
|
11
|
-
if (super(e), e.type !== t.PROPERTY && e.type !== t.ATTRIBUTE && e.type !== t.BOOLEAN_ATTRIBUTE)
|
|
12
|
-
|
|
13
|
-
if (!l(e))
|
|
14
|
-
throw Error("`live` bindings can only contain a single expression");
|
|
11
|
+
if (super(e), e.type !== t.PROPERTY && e.type !== t.ATTRIBUTE && e.type !== t.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
12
|
+
if (!l(e)) throw Error("`live` bindings can only contain a single expression");
|
|
15
13
|
}
|
|
16
14
|
render(e) {
|
|
17
15
|
return e;
|
|
18
16
|
}
|
|
19
17
|
update(e, [r]) {
|
|
20
|
-
if (r === n || r === s)
|
|
21
|
-
return r;
|
|
18
|
+
if (r === n || r === s) return r;
|
|
22
19
|
const o = e.element, i = e.name;
|
|
23
20
|
if (e.type === t.PROPERTY) {
|
|
24
|
-
if (r === o[i])
|
|
25
|
-
return n;
|
|
21
|
+
if (r === o[i]) return n;
|
|
26
22
|
} else if (e.type === t.BOOLEAN_ATTRIBUTE) {
|
|
27
|
-
if (!!r === o.hasAttribute(i))
|
|
28
|
-
|
|
29
|
-
} else if (e.type === t.ATTRIBUTE && o.getAttribute(i) === r + "")
|
|
30
|
-
return n;
|
|
23
|
+
if (!!r === o.hasAttribute(i)) return n;
|
|
24
|
+
} else if (e.type === t.ATTRIBUTE && o.getAttribute(i) === r + "") return n;
|
|
31
25
|
return p(e), r;
|
|
32
26
|
}
|
|
33
27
|
});
|
package/chunks/query.js
CHANGED
|
@@ -3,37 +3,23 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
6
|
+
const l = (r, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(r, t, e), e);
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
function
|
|
13
|
-
return (e,
|
|
14
|
-
const
|
|
12
|
+
function i(r, t) {
|
|
13
|
+
return (e, n, f) => {
|
|
14
|
+
const u = (c) => {
|
|
15
15
|
var o;
|
|
16
|
-
return ((o =
|
|
16
|
+
return ((o = c.renderRoot) == null ? void 0 : o.querySelector(r)) ?? null;
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const t = Symbol();
|
|
21
|
-
return { get() {
|
|
22
|
-
return this[t];
|
|
23
|
-
}, set(h) {
|
|
24
|
-
this[t] = h;
|
|
25
|
-
} };
|
|
26
|
-
})();
|
|
27
|
-
return s(e, l, { get() {
|
|
28
|
-
let t = u.call(this);
|
|
29
|
-
return t === void 0 && (t = i(this), (t !== null || this.hasUpdated) && o.call(this, t)), t;
|
|
30
|
-
} });
|
|
31
|
-
}
|
|
32
|
-
return s(e, l, { get() {
|
|
33
|
-
return i(this);
|
|
18
|
+
return l(e, n, { get() {
|
|
19
|
+
return u(this);
|
|
34
20
|
} });
|
|
35
21
|
};
|
|
36
22
|
}
|
|
37
23
|
export {
|
|
38
|
-
|
|
24
|
+
i as e
|
|
39
25
|
};
|
package/chunks/static.js
CHANGED
|
@@ -5,11 +5,9 @@ import { x as S } from "./lit-element.js";
|
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
7
|
const p = Symbol.for(""), d = (t) => {
|
|
8
|
-
if ((t == null ? void 0 : t.r) === p)
|
|
9
|
-
return t == null ? void 0 : t._$litStatic$;
|
|
8
|
+
if ((t == null ? void 0 : t.r) === p) return t == null ? void 0 : t._$litStatic$;
|
|
10
9
|
}, v = (t, ...e) => ({ _$litStatic$: e.reduce((s, o, l) => s + ((r) => {
|
|
11
|
-
if (r._$litStatic$ !== void 0)
|
|
12
|
-
return r._$litStatic$;
|
|
10
|
+
if (r._$litStatic$ !== void 0) return r._$litStatic$;
|
|
13
11
|
throw Error(`Value passed to 'literal' function must be a 'literal' result: ${r}. Use 'unsafeStatic' to pass non-literal values, but
|
|
14
12
|
take care to ensure page security.`);
|
|
15
13
|
})(o) + t[l + 1], t[0]), r: p }), f = /* @__PURE__ */ new Map(), h = (t) => (e, ...s) => {
|
|
@@ -18,8 +16,7 @@ const p = Symbol.for(""), d = (t) => {
|
|
|
18
16
|
const a = [], u = [];
|
|
19
17
|
let n, i = 0, c = !1;
|
|
20
18
|
for (; i < o; ) {
|
|
21
|
-
for (n = e[i]; i < o && (r = s[i], (l = d(r)) !== void 0); )
|
|
22
|
-
n += l + e[++i], c = !0;
|
|
19
|
+
for (n = e[i]; i < o && (r = s[i], (l = d(r)) !== void 0); ) n += l + e[++i], c = !0;
|
|
23
20
|
i !== o && u.push(r), a.push(n), i++;
|
|
24
21
|
}
|
|
25
22
|
if (i === o && a.push(e[o]), c) {
|
|
@@ -10,11 +10,6 @@ import { n as a, t as k } from "../../chunks/property.js";
|
|
|
10
10
|
import { e as H } from "../../chunks/query.js";
|
|
11
11
|
import "../../chunks/chunk.2HU27ZWH.js";
|
|
12
12
|
import O from "./nve-alert.styles.js";
|
|
13
|
-
import "../../chunks/static.js";
|
|
14
|
-
import "../../chunks/if-defined.js";
|
|
15
|
-
import "../../chunks/state.js";
|
|
16
|
-
import "../../chunks/chunk.3WAW4E2K.js";
|
|
17
|
-
import "../../chunks/directive-helpers.js";
|
|
18
13
|
var T = $`
|
|
19
14
|
${z}
|
|
20
15
|
|
|
@@ -247,10 +242,10 @@ b("alert.hide", {
|
|
|
247
242
|
});
|
|
248
243
|
var _ = t;
|
|
249
244
|
t.define("sl-alert");
|
|
250
|
-
var D = Object.defineProperty, B = Object.getOwnPropertyDescriptor, n = (e, r,
|
|
251
|
-
for (var s = c > 1 ? void 0 : c ? B(r,
|
|
252
|
-
(
|
|
253
|
-
return c && s && D(r,
|
|
245
|
+
var D = Object.defineProperty, B = Object.getOwnPropertyDescriptor, n = (e, r, h, c) => {
|
|
246
|
+
for (var s = c > 1 ? void 0 : c ? B(r, h) : r, d = e.length - 1, p; d >= 0; d--)
|
|
247
|
+
(p = e[d]) && (s = (c ? p(r, h, s) : p(s)) || s);
|
|
248
|
+
return c && s && D(r, h, s), s;
|
|
254
249
|
};
|
|
255
250
|
let o = class extends _ {
|
|
256
251
|
constructor() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import SlButton from '@shoelace-style/shoelace/dist/components/button/button.js';
|
|
2
|
+
import { INveComponent } from '../../interfaces/NveComponent.interface';
|
|
2
3
|
/**
|
|
3
4
|
* En Shoelace-knapp i NVE-forkledning.
|
|
4
5
|
* Se https://shoelace.style/components/button
|
|
@@ -10,10 +11,11 @@ import SlButton from '@shoelace-style/shoelace/dist/components/button/button.js'
|
|
|
10
11
|
* - caret
|
|
11
12
|
* - pill
|
|
12
13
|
*/
|
|
13
|
-
export default class NveButton extends SlButton {
|
|
14
|
+
export default class NveButton extends SlButton implements INveComponent {
|
|
14
15
|
constructor();
|
|
15
16
|
static styles: import("lit").CSSResultGroup[];
|
|
16
17
|
size: 'small' | 'medium' | 'large';
|
|
18
|
+
testId: string;
|
|
17
19
|
}
|
|
18
20
|
declare global {
|
|
19
21
|
interface HTMLElementTagNameMap {
|
|
@@ -8,14 +8,11 @@ import { S as x } from "../../chunks/chunk.2HU27ZWH.js";
|
|
|
8
8
|
import { w as S } from "../../chunks/chunk.Q6ASPMKT.js";
|
|
9
9
|
import { b as e, S as w } from "../../chunks/chunk.JS655M6J.js";
|
|
10
10
|
import { e as F } from "../../chunks/class-map.js";
|
|
11
|
-
import { s as
|
|
11
|
+
import { s as c, n as f } from "../../chunks/static.js";
|
|
12
12
|
import { o as s } from "../../chunks/if-defined.js";
|
|
13
13
|
import { r as m } from "../../chunks/state.js";
|
|
14
14
|
import { e as V } from "../../chunks/query.js";
|
|
15
15
|
import z from "./nve-button.styles.js";
|
|
16
|
-
import "../../chunks/lit-element.js";
|
|
17
|
-
import "../../chunks/chunk.3WAW4E2K.js";
|
|
18
|
-
import "../../chunks/directive-helpers.js";
|
|
19
16
|
var t = class extends w {
|
|
20
17
|
constructor() {
|
|
21
18
|
super(...arguments), this.formControlController = new C(this, {
|
|
@@ -90,7 +87,7 @@ var t = class extends w {
|
|
|
90
87
|
this.isButton() && (this.button.setCustomValidity(o), this.formControlController.updateValidity());
|
|
91
88
|
}
|
|
92
89
|
render() {
|
|
93
|
-
const o = this.isLink(), i = o ?
|
|
90
|
+
const o = this.isLink(), i = o ? c`a` : c`button`;
|
|
94
91
|
return f`
|
|
95
92
|
<${i}
|
|
96
93
|
part="base"
|
|
@@ -228,25 +225,28 @@ e([
|
|
|
228
225
|
e([
|
|
229
226
|
S("disabled", { waitUntilFirstUpdate: !0 })
|
|
230
227
|
], t.prototype, "handleDisabledChange", 1);
|
|
231
|
-
var
|
|
228
|
+
var b = t;
|
|
232
229
|
t.define("sl-button");
|
|
233
|
-
var I = Object.defineProperty, k = Object.getOwnPropertyDescriptor,
|
|
234
|
-
for (var l =
|
|
235
|
-
(p = o[h]) && (l = (
|
|
236
|
-
return
|
|
230
|
+
var I = Object.defineProperty, k = Object.getOwnPropertyDescriptor, d = (o, i, a, u) => {
|
|
231
|
+
for (var l = u > 1 ? void 0 : u ? k(i, a) : i, h = o.length - 1, p; h >= 0; h--)
|
|
232
|
+
(p = o[h]) && (l = (u ? p(i, a, l) : p(l)) || l);
|
|
233
|
+
return u && l && I(i, a, l), l;
|
|
237
234
|
};
|
|
238
|
-
let
|
|
235
|
+
let n = class extends b {
|
|
239
236
|
constructor() {
|
|
240
|
-
super(), this.size = "large";
|
|
237
|
+
super(), this.size = "large", this.testId = "";
|
|
241
238
|
}
|
|
242
239
|
};
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
n.styles = [b.styles, z];
|
|
241
|
+
d([
|
|
245
242
|
r({ reflect: !0 })
|
|
246
|
-
],
|
|
247
|
-
|
|
243
|
+
], n.prototype, "size", 2);
|
|
244
|
+
d([
|
|
245
|
+
r({ reflect: !0, type: String })
|
|
246
|
+
], n.prototype, "testId", 2);
|
|
247
|
+
n = d([
|
|
248
248
|
y("nve-button")
|
|
249
|
-
],
|
|
249
|
+
], n);
|
|
250
250
|
export {
|
|
251
|
-
|
|
251
|
+
n as default
|
|
252
252
|
};
|
|
@@ -11,8 +11,6 @@ import { l as u } from "../../chunks/live.js";
|
|
|
11
11
|
import { r as z } from "../../chunks/state.js";
|
|
12
12
|
import { e as $ } from "../../chunks/query.js";
|
|
13
13
|
import w from "./nve-checkbox.styles.js";
|
|
14
|
-
import "../../chunks/chunk.3WAW4E2K.js";
|
|
15
|
-
import "../../chunks/directive-helpers.js";
|
|
16
14
|
var F = m`
|
|
17
15
|
${f}
|
|
18
16
|
|