@mgdis/stencil-helpers 2.2.2 → 2.2.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/index.es.js +312 -297
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +7 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var he = Object.defineProperty;
|
|
2
2
|
var G = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var g = (e, t, s) =>
|
|
7
|
-
var T = (e, t, s) => (
|
|
8
|
-
const
|
|
5
|
+
var ye = (e, t, s) => t in e ? he(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
6
|
+
var g = (e, t, s) => ye(e, typeof t != "symbol" ? t + "" : t, s), ve = (e, t, s) => t.has(e) || G("Cannot " + s);
|
|
7
|
+
var T = (e, t, s) => (ve(e, t, "read from private field"), s ? s.call(e) : t.get(e)), B = (e, t, s) => t.has(e) ? G("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
8
|
+
const Ge = (e = "", t = 10) => {
|
|
9
9
|
const s = new Uint8Array(t);
|
|
10
10
|
crypto.getRandomValues(s);
|
|
11
11
|
const r = Array.from(s).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
|
|
12
12
|
return e !== "" ? `${e}-${r}` : r;
|
|
13
|
-
},
|
|
14
|
-
class
|
|
13
|
+
}, Xe = (e) => me(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
|
|
14
|
+
class Ke {
|
|
15
15
|
constructor(t = []) {
|
|
16
16
|
/**
|
|
17
17
|
* Available classes
|
|
@@ -46,7 +46,7 @@ class Ge {
|
|
|
46
46
|
this.classes = t;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const Qe = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ze = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Je = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ye = (e) => {
|
|
50
50
|
const t = V(e), s = ee(e);
|
|
51
51
|
return [e, ...t, ...s];
|
|
52
52
|
}, V = (e, t = []) => {
|
|
@@ -63,8 +63,8 @@ const Xe = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ke =
|
|
|
63
63
|
for (const s of Array.from(e.frames))
|
|
64
64
|
t.push(s), ee(s, t);
|
|
65
65
|
return t;
|
|
66
|
-
},
|
|
67
|
-
var
|
|
66
|
+
}, me = (e) => typeof e == "string" && e.trim() !== "", Ve = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, et = (e) => typeof e == "number" && !Number.isNaN(e), tt = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, st = async (e) => e();
|
|
67
|
+
var w = {
|
|
68
68
|
allRenderFn: !1,
|
|
69
69
|
cmpDidLoad: !0,
|
|
70
70
|
cmpDidUnload: !1,
|
|
@@ -153,10 +153,10 @@ var H = {
|
|
|
153
153
|
attachStyles: !0,
|
|
154
154
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
155
155
|
experimentalSlotFixes: !1
|
|
156
|
-
},
|
|
156
|
+
}, be = Object.defineProperty, Se = (e, t) => {
|
|
157
157
|
for (var s in t)
|
|
158
|
-
|
|
159
|
-
},
|
|
158
|
+
be(e, s, { get: t[s], enumerable: !0 });
|
|
159
|
+
}, ke = "http://www.w3.org/2000/svg", Te = "http://www.w3.org/1999/xhtml", X = (e, t) => t in e, K = "http://www.w3.org/1999/xlink", z = typeof window < "u" ? window : {}, R = z.document || { head: {} };
|
|
160
160
|
z.HTMLElement;
|
|
161
161
|
var A = {
|
|
162
162
|
$flags$: 0,
|
|
@@ -166,13 +166,13 @@ var A = {
|
|
|
166
166
|
ael: (e, t, s, r) => e.addEventListener(t, s, r),
|
|
167
167
|
rel: (e, t, s, r) => e.removeEventListener(t, s, r),
|
|
168
168
|
ce: (e, t) => new CustomEvent(e, t)
|
|
169
|
-
},
|
|
170
|
-
|
|
169
|
+
}, xe = (e) => e != null && e !== void 0, te = (e) => (e = typeof e, e === "object" || e === "function"), Ae = {};
|
|
170
|
+
Se(Ae, {
|
|
171
171
|
err: () => se,
|
|
172
|
-
map: () =>
|
|
172
|
+
map: () => Ee,
|
|
173
173
|
ok: () => P,
|
|
174
|
-
unwrap: () =>
|
|
175
|
-
unwrapErr: () =>
|
|
174
|
+
unwrap: () => _e,
|
|
175
|
+
unwrapErr: () => je
|
|
176
176
|
});
|
|
177
177
|
var P = (e) => ({
|
|
178
178
|
isOk: !0,
|
|
@@ -183,7 +183,7 @@ var P = (e) => ({
|
|
|
183
183
|
isErr: !0,
|
|
184
184
|
value: e
|
|
185
185
|
});
|
|
186
|
-
function
|
|
186
|
+
function Ee(e, t) {
|
|
187
187
|
if (e.isOk) {
|
|
188
188
|
const s = t(e.value);
|
|
189
189
|
return s instanceof Promise ? s.then((r) => P(r)) : P(s);
|
|
@@ -194,11 +194,11 @@ function xe(e, t) {
|
|
|
194
194
|
}
|
|
195
195
|
throw "should never get here";
|
|
196
196
|
}
|
|
197
|
-
var
|
|
197
|
+
var _e = (e) => {
|
|
198
198
|
if (e.isOk)
|
|
199
199
|
return e.value;
|
|
200
200
|
throw e.value;
|
|
201
|
-
},
|
|
201
|
+
}, je = (e) => {
|
|
202
202
|
if (e.isErr)
|
|
203
203
|
return e.value;
|
|
204
204
|
throw e.value;
|
|
@@ -206,30 +206,32 @@ var Ae = (e) => {
|
|
|
206
206
|
const t = e.__childNodes || e.childNodes;
|
|
207
207
|
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && ne(t, e.tagName).forEach((s) => {
|
|
208
208
|
var r;
|
|
209
|
-
s.nodeType === 1 && s.tagName === "SLOT-FB" && ((r =
|
|
209
|
+
s.nodeType === 1 && s.tagName === "SLOT-FB" && ((r = Le(s, s["s-sn"], !1)) != null && r.length ? s.hidden = !0 : s.hidden = !1);
|
|
210
210
|
});
|
|
211
211
|
for (const s of t)
|
|
212
212
|
s.nodeType === 1 && (s.__childNodes || s.childNodes).length && re(s);
|
|
213
|
-
}
|
|
214
|
-
|
|
213
|
+
};
|
|
214
|
+
function ne(e, t, s) {
|
|
215
|
+
let r = 0, n = [], i;
|
|
215
216
|
for (; r < e.length; r++)
|
|
216
|
-
|
|
217
|
+
i = e[r], i["s-sr"] && i["s-hn"] === t && s === void 0 && n.push(i), n = [...n, ...ne(i.childNodes, t, s)];
|
|
217
218
|
return n;
|
|
218
|
-
}
|
|
219
|
+
}
|
|
220
|
+
var Le = (e, t, s = !0) => {
|
|
219
221
|
const r = [];
|
|
220
222
|
for ((s && e["s-sr"] || !e["s-sr"]) && r.push(e); (e = e.nextSibling) && e["s-sn"] === t; )
|
|
221
223
|
r.push(e);
|
|
222
224
|
return r;
|
|
223
|
-
}, Q = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "",
|
|
224
|
-
let r = null, n = null,
|
|
225
|
-
const
|
|
226
|
-
for (let
|
|
227
|
-
r = l[
|
|
225
|
+
}, Q = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", Oe = (e, t, ...s) => {
|
|
226
|
+
let r = null, n = null, i = null, o = !1, f = !1;
|
|
227
|
+
const c = [], u = (l) => {
|
|
228
|
+
for (let $ = 0; $ < l.length; $++)
|
|
229
|
+
r = l[$], Array.isArray(r) ? u(r) : r != null && typeof r != "boolean" && ((o = !te(r)) && (r = String(r)), o && f ? c[c.length - 1].$text$ += r : c.push(o ? q(null, r) : r), f = o);
|
|
228
230
|
};
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
return
|
|
232
|
-
},
|
|
231
|
+
u(s);
|
|
232
|
+
const d = q(e, null);
|
|
233
|
+
return d.$attrs$ = t, c.length > 0 && (d.$children$ = c), d.$key$ = n, d.$name$ = i, d;
|
|
234
|
+
}, q = (e, t) => {
|
|
233
235
|
const s = {
|
|
234
236
|
$flags$: 0,
|
|
235
237
|
$tag$: e,
|
|
@@ -238,49 +240,61 @@ var Ae = (e) => {
|
|
|
238
240
|
$children$: null
|
|
239
241
|
};
|
|
240
242
|
return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
|
|
241
|
-
},
|
|
243
|
+
}, Re = {}, Fe = (e) => e && e.$tag$ === Re, Z = (e, t, s, r, n, i, o) => {
|
|
242
244
|
if (s !== r) {
|
|
243
|
-
let
|
|
245
|
+
let f = X(e, t), c = t.toLowerCase();
|
|
244
246
|
if (t === "class") {
|
|
245
|
-
const
|
|
246
|
-
let
|
|
247
|
-
|
|
248
|
-
l.startsWith(e["s-si"]) && f.push(l);
|
|
249
|
-
}), f = [...new Set(f)], a.add(...f), delete e["s-si"]) : (a.remove(...$.filter((l) => l && !f.includes(l))), a.add(...f.filter((l) => l && !$.includes(l))));
|
|
247
|
+
const u = e.classList, d = J(s);
|
|
248
|
+
let l = J(r);
|
|
249
|
+
u.remove(...d.filter(($) => $ && !l.includes($))), u.add(...l.filter(($) => $ && !d.includes($)));
|
|
250
250
|
} else if (t === "style") {
|
|
251
|
-
for (const
|
|
252
|
-
(!r || r[
|
|
253
|
-
for (const
|
|
254
|
-
(!s || r[
|
|
251
|
+
for (const u in s)
|
|
252
|
+
(!r || r[u] == null) && (u.includes("-") ? e.style.removeProperty(u) : e.style[u] = "");
|
|
253
|
+
for (const u in r)
|
|
254
|
+
(!s || r[u] !== s[u]) && (u.includes("-") ? e.style.setProperty(u, r[u]) : e.style[u] = r[u]);
|
|
255
255
|
} else if (t !== "key") if (t === "ref")
|
|
256
256
|
r && r(e);
|
|
257
257
|
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
258
|
-
if (t[2] === "-" ? t = t.slice(3) : X(z,
|
|
259
|
-
const
|
|
260
|
-
t = t.replace(
|
|
258
|
+
if (t[2] === "-" ? t = t.slice(3) : X(z, c) ? t = c.slice(2) : t = c[2] + t.slice(3), s || r) {
|
|
259
|
+
const u = t.endsWith(ie);
|
|
260
|
+
t = t.replace(Ne, ""), s && A.rel(e, t, s, u), r && A.ael(e, t, r, u);
|
|
261
261
|
}
|
|
262
262
|
} else {
|
|
263
|
-
const
|
|
264
|
-
if ((
|
|
263
|
+
const u = te(r);
|
|
264
|
+
if ((f || u && r !== null) && !n)
|
|
265
265
|
try {
|
|
266
266
|
if (e.tagName.includes("-"))
|
|
267
|
-
e[t] = r;
|
|
267
|
+
e[t] !== r && (e[t] = r);
|
|
268
268
|
else {
|
|
269
|
-
const
|
|
270
|
-
t === "list" ?
|
|
269
|
+
const l = r ?? "";
|
|
270
|
+
t === "list" ? f = !1 : (s == null || e[t] != l) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = l : e.setAttribute(t, l));
|
|
271
271
|
}
|
|
272
272
|
} catch {
|
|
273
273
|
}
|
|
274
|
-
let
|
|
275
|
-
|
|
274
|
+
let d = !1;
|
|
275
|
+
c !== (c = c.replace(/^xlink\:?/, "")) && (t = c, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (d ? e.removeAttributeNS(K, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !u && (r = r === !0 ? "" : r, d ? e.setAttributeNS(K, t, r) : e.setAttribute(t, r));
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
},
|
|
279
|
-
const
|
|
280
|
-
for (const
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
278
|
+
}, Me = /\s/, J = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(Me)), ie = "Capture", Ne = new RegExp(ie + "$"), oe = (e, t, s, r) => {
|
|
279
|
+
const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
|
|
280
|
+
for (const f of Y(Object.keys(i)))
|
|
281
|
+
f in o || Z(
|
|
282
|
+
n,
|
|
283
|
+
f,
|
|
284
|
+
i[f],
|
|
285
|
+
void 0,
|
|
286
|
+
s,
|
|
287
|
+
t.$flags$
|
|
288
|
+
);
|
|
289
|
+
for (const f of Y(Object.keys(o)))
|
|
290
|
+
Z(
|
|
291
|
+
n,
|
|
292
|
+
f,
|
|
293
|
+
i[f],
|
|
294
|
+
o[f],
|
|
295
|
+
s,
|
|
296
|
+
t.$flags$
|
|
297
|
+
);
|
|
284
298
|
};
|
|
285
299
|
function Y(e) {
|
|
286
300
|
return e.includes("ref") ? (
|
|
@@ -291,11 +305,11 @@ function Y(e) {
|
|
|
291
305
|
e
|
|
292
306
|
);
|
|
293
307
|
}
|
|
294
|
-
var F,
|
|
308
|
+
var F, M, E, N = !1, D = !1, I = !1, y = !1, C = (e, t, s) => {
|
|
295
309
|
var r;
|
|
296
310
|
const n = t.$children$[s];
|
|
297
|
-
let
|
|
298
|
-
if (
|
|
311
|
+
let i = 0, o, f, c;
|
|
312
|
+
if (N || (I = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
|
|
299
313
|
// slot element has fallback content
|
|
300
314
|
// still create an element that "mocks" the slot element
|
|
301
315
|
2
|
|
@@ -305,160 +319,160 @@ var F, N, E, M = !1, D = !1, I = !1, y = !1, C = (e, t, s) => {
|
|
|
305
319
|
// where actual slot content should sit next to
|
|
306
320
|
1
|
|
307
321
|
))), n.$text$ !== null)
|
|
308
|
-
|
|
322
|
+
o = n.$elm$ = R.createTextNode(n.$text$);
|
|
309
323
|
else if (n.$flags$ & 1)
|
|
310
|
-
|
|
324
|
+
o = n.$elm$ = R.createTextNode("");
|
|
311
325
|
else {
|
|
312
|
-
if (y || (y = n.$tag$ === "svg"),
|
|
313
|
-
y ?
|
|
314
|
-
!
|
|
315
|
-
), y && n.$tag$ === "foreignObject" && (y = !1), oe(null, n, y),
|
|
316
|
-
for (
|
|
317
|
-
|
|
318
|
-
n.$tag$ === "svg" ? y = !1 :
|
|
326
|
+
if (y || (y = n.$tag$ === "svg"), o = n.$elm$ = R.createElementNS(
|
|
327
|
+
y ? ke : Te,
|
|
328
|
+
!N && w.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
|
|
329
|
+
), y && n.$tag$ === "foreignObject" && (y = !1), oe(null, n, y), xe(F) && o["s-si"] !== F && o.classList.add(o["s-si"] = F), n.$children$)
|
|
330
|
+
for (i = 0; i < n.$children$.length; ++i)
|
|
331
|
+
f = C(e, n, i), f && o.appendChild(f);
|
|
332
|
+
n.$tag$ === "svg" ? y = !1 : o.tagName === "foreignObject" && (y = !0);
|
|
319
333
|
}
|
|
320
|
-
return
|
|
321
|
-
},
|
|
334
|
+
return o["s-hn"] = E, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = M, o["s-sn"] = n.$name$ || "", o["s-rf"] = (r = n.$attrs$) == null ? void 0 : r.ref, c = e && e.$children$ && e.$children$[s], c && c.$tag$ === n.$tag$ && e.$elm$ && _(e.$elm$, !1), ue(M, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;
|
|
335
|
+
}, _ = (e, t) => {
|
|
322
336
|
A.$flags$ |= 1;
|
|
323
337
|
const s = Array.from(e.__childNodes || e.childNodes);
|
|
324
|
-
e["s-sr"] &&
|
|
338
|
+
e["s-sr"] && w.experimentalSlotFixes;
|
|
325
339
|
for (let r = s.length - 1; r >= 0; r--) {
|
|
326
340
|
const n = s[r];
|
|
327
|
-
n["s-hn"] !== E && n["s-ol"] && (k(
|
|
341
|
+
n["s-hn"] !== E && n["s-ol"] && (k(j(n).parentNode, n, j(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, I = !0), t && _(n, t);
|
|
328
342
|
}
|
|
329
343
|
A.$flags$ &= -2;
|
|
330
|
-
}, le = (e, t, s, r, n,
|
|
331
|
-
let
|
|
332
|
-
for (
|
|
333
|
-
r[n] && (
|
|
344
|
+
}, le = (e, t, s, r, n, i) => {
|
|
345
|
+
let o = e["s-cr"] && e["s-cr"].parentNode || e, f;
|
|
346
|
+
for (o.shadowRoot && o.tagName === E && (o = o.shadowRoot); n <= i; ++n)
|
|
347
|
+
r[n] && (f = C(null, s, n), f && (r[n].$elm$ = f, k(o, f, j(t))));
|
|
334
348
|
}, ae = (e, t, s) => {
|
|
335
349
|
for (let r = t; r <= s; ++r) {
|
|
336
350
|
const n = e[r];
|
|
337
351
|
if (n) {
|
|
338
|
-
const
|
|
339
|
-
fe(n),
|
|
352
|
+
const i = n.$elm$;
|
|
353
|
+
fe(n), i && (D = !0, i["s-ol"] ? i["s-ol"].remove() : _(i, !0), i.remove());
|
|
340
354
|
}
|
|
341
355
|
}
|
|
342
|
-
},
|
|
343
|
-
let
|
|
344
|
-
for (;
|
|
345
|
-
if (
|
|
346
|
-
|
|
356
|
+
}, De = (e, t, s, r, n = !1) => {
|
|
357
|
+
let i = 0, o = 0, f = 0, c = 0, u = t.length - 1, d = t[0], l = t[u], $ = r.length - 1, a = r[0], p = r[$], m, v;
|
|
358
|
+
for (; i <= u && o <= $; )
|
|
359
|
+
if (d == null)
|
|
360
|
+
d = t[++i];
|
|
347
361
|
else if (l == null)
|
|
348
|
-
l = t[
|
|
349
|
-
else if (
|
|
350
|
-
|
|
362
|
+
l = t[--u];
|
|
363
|
+
else if (a == null)
|
|
364
|
+
a = r[++o];
|
|
351
365
|
else if (p == null)
|
|
352
|
-
p = r[
|
|
353
|
-
else if (O(
|
|
354
|
-
x(
|
|
366
|
+
p = r[--$];
|
|
367
|
+
else if (O(d, a, n))
|
|
368
|
+
x(d, a, n), d = t[++i], a = r[++o];
|
|
355
369
|
else if (O(l, p, n))
|
|
356
|
-
x(l, p, n), l = t[
|
|
357
|
-
else if (O(
|
|
358
|
-
(
|
|
359
|
-
else if (O(l,
|
|
360
|
-
(
|
|
370
|
+
x(l, p, n), l = t[--u], p = r[--$];
|
|
371
|
+
else if (O(d, p, n))
|
|
372
|
+
(d.$tag$ === "slot" || p.$tag$ === "slot") && _(d.$elm$.parentNode, !1), x(d, p, n), k(e, d.$elm$, l.$elm$.nextSibling), d = t[++i], p = r[--$];
|
|
373
|
+
else if (O(l, a, n))
|
|
374
|
+
(d.$tag$ === "slot" || p.$tag$ === "slot") && _(l.$elm$.parentNode, !1), x(l, a, n), k(e, l.$elm$, d.$elm$), l = t[--u], a = r[++o];
|
|
361
375
|
else {
|
|
362
|
-
for (
|
|
363
|
-
if (t[
|
|
364
|
-
|
|
376
|
+
for (f = -1, c = i; c <= u; ++c)
|
|
377
|
+
if (t[c] && t[c].$key$ !== null && t[c].$key$ === a.$key$) {
|
|
378
|
+
f = c;
|
|
365
379
|
break;
|
|
366
380
|
}
|
|
367
|
-
|
|
368
|
-
|
|
381
|
+
f >= 0 ? (v = t[f], v.$tag$ !== a.$tag$ ? m = C(t && t[o], s, f) : (x(v, a, n), t[f] = void 0, m = v.$elm$), a = r[++o]) : (m = C(t && t[o], s, o), a = r[++o]), m && k(
|
|
382
|
+
j(d.$elm$).parentNode,
|
|
369
383
|
m,
|
|
370
|
-
|
|
384
|
+
j(d.$elm$)
|
|
371
385
|
);
|
|
372
386
|
}
|
|
373
|
-
|
|
387
|
+
i > u ? le(
|
|
374
388
|
e,
|
|
375
|
-
r[
|
|
389
|
+
r[$ + 1] == null ? null : r[$ + 1].$elm$,
|
|
376
390
|
s,
|
|
377
391
|
r,
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
) :
|
|
381
|
-
}, O = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? (s && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1,
|
|
382
|
-
const r = t.$elm$ = e.$elm$, n = e.$children$,
|
|
383
|
-
let
|
|
384
|
-
|
|
392
|
+
o,
|
|
393
|
+
$
|
|
394
|
+
) : o > $ && ae(t, i, u);
|
|
395
|
+
}, O = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? (s && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, j = (e) => e && e["s-ol"] || e, x = (e, t, s = !1) => {
|
|
396
|
+
const r = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;
|
|
397
|
+
let c;
|
|
398
|
+
f === null ? (y = o === "svg" ? !0 : o === "foreignObject" ? !1 : y, o === "slot" && !N || oe(e, t, y), n !== null && i !== null ? De(r, n, t, i, s) : i !== null ? (e.$text$ !== null && (r.textContent = ""), le(r, null, t, i, 0, i.length - 1)) : (
|
|
385
399
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
386
|
-
!s &&
|
|
387
|
-
), y &&
|
|
400
|
+
!s && w.updatable && n !== null && ae(n, 0, n.length - 1)
|
|
401
|
+
), y && o === "svg" && (y = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = f : e.$text$ !== f && (r.data = f);
|
|
388
402
|
}, b = [], ce = (e) => {
|
|
389
403
|
let t, s, r;
|
|
390
404
|
const n = e.__childNodes || e.childNodes;
|
|
391
|
-
for (const
|
|
392
|
-
if (
|
|
405
|
+
for (const i of n) {
|
|
406
|
+
if (i["s-sr"] && (t = i["s-cr"]) && t.parentNode) {
|
|
393
407
|
s = t.parentNode.__childNodes || t.parentNode.childNodes;
|
|
394
|
-
const
|
|
408
|
+
const o = i["s-sn"];
|
|
395
409
|
for (r = s.length - 1; r >= 0; r--)
|
|
396
|
-
if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !==
|
|
397
|
-
if (Q(t,
|
|
398
|
-
let
|
|
399
|
-
D = !0, t["s-sn"] = t["s-sn"] ||
|
|
400
|
-
$slotRefNode$:
|
|
410
|
+
if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
|
|
411
|
+
if (Q(t, o)) {
|
|
412
|
+
let f = b.find((c) => c.$nodeToRelocate$ === t);
|
|
413
|
+
D = !0, t["s-sn"] = t["s-sn"] || o, f ? (f.$nodeToRelocate$["s-sh"] = i["s-hn"], f.$slotRefNode$ = i) : (t["s-sh"] = i["s-hn"], b.push({
|
|
414
|
+
$slotRefNode$: i,
|
|
401
415
|
$nodeToRelocate$: t
|
|
402
|
-
})), t["s-sr"] && b.map((
|
|
403
|
-
Q(
|
|
416
|
+
})), t["s-sr"] && b.map((c) => {
|
|
417
|
+
Q(c.$nodeToRelocate$, t["s-sn"]) && (f = b.find((u) => u.$nodeToRelocate$ === t), f && !c.$slotRefNode$ && (c.$slotRefNode$ = f.$slotRefNode$));
|
|
404
418
|
});
|
|
405
|
-
} else b.some((
|
|
419
|
+
} else b.some((f) => f.$nodeToRelocate$ === t) || b.push({
|
|
406
420
|
$nodeToRelocate$: t
|
|
407
421
|
});
|
|
408
422
|
}
|
|
409
|
-
|
|
423
|
+
i.nodeType === 1 && ce(i);
|
|
410
424
|
}
|
|
411
425
|
}, fe = (e) => {
|
|
412
426
|
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(fe);
|
|
413
427
|
}, k = (e, t, s) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && ue(t["s-cr"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, s));
|
|
414
428
|
function ue(e, t, s, r) {
|
|
415
429
|
var n;
|
|
416
|
-
let
|
|
417
|
-
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (
|
|
418
|
-
const
|
|
419
|
-
if ((n = s.classList) == null || n.add(
|
|
420
|
-
let
|
|
421
|
-
for (;
|
|
422
|
-
if (
|
|
423
|
-
|
|
430
|
+
let i;
|
|
431
|
+
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (i = t["s-si"] || e.parentNode["s-sc"])) {
|
|
432
|
+
const o = t["s-sn"], f = t["s-hn"];
|
|
433
|
+
if ((n = s.classList) == null || n.add(i + "-s"), r && r.classList.contains(i + "-s")) {
|
|
434
|
+
let c = (r.__childNodes || r.childNodes)[0], u = !1;
|
|
435
|
+
for (; c; ) {
|
|
436
|
+
if (c["s-sn"] !== o && c["s-hn"] === f && c["s-sr"]) {
|
|
437
|
+
u = !0;
|
|
424
438
|
break;
|
|
425
439
|
}
|
|
426
|
-
|
|
440
|
+
c = c.nextSibling;
|
|
427
441
|
}
|
|
428
|
-
|
|
442
|
+
u || r.classList.remove(i + "-s");
|
|
429
443
|
}
|
|
430
444
|
}
|
|
431
445
|
}
|
|
432
|
-
var
|
|
433
|
-
var r, n,
|
|
434
|
-
const
|
|
435
|
-
if (E =
|
|
436
|
-
([
|
|
446
|
+
var Ce = (e, t, s = !1) => {
|
|
447
|
+
var r, n, i, o, f;
|
|
448
|
+
const c = e.$hostElement$, u = e.$cmpMeta$, d = e.$vnode$ || q(null, null), l = Fe(t) ? t : Oe(null, null, t);
|
|
449
|
+
if (E = c.tagName, u.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, u.$attrsToReflect$.map(
|
|
450
|
+
([$, a]) => l.$attrs$[a] = c[$]
|
|
437
451
|
)), s && l.$attrs$)
|
|
438
|
-
for (const
|
|
439
|
-
|
|
440
|
-
l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ =
|
|
452
|
+
for (const $ of Object.keys(l.$attrs$))
|
|
453
|
+
c.hasAttribute($) && !["key", "ref", "style", "class"].includes($) && (l.$attrs$[$] = c[$]);
|
|
454
|
+
l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = d.$elm$ = c.shadowRoot || c, F = c["s-sc"], N = (u.$flags$ & 1) !== 0, M = c["s-cr"], D = !1, x(d, l, s);
|
|
441
455
|
{
|
|
442
456
|
if (A.$flags$ |= 1, I) {
|
|
443
457
|
ce(l.$elm$);
|
|
444
|
-
for (const
|
|
445
|
-
const
|
|
446
|
-
if (!
|
|
458
|
+
for (const $ of b) {
|
|
459
|
+
const a = $.$nodeToRelocate$;
|
|
460
|
+
if (!a["s-ol"]) {
|
|
447
461
|
const p = R.createTextNode("");
|
|
448
|
-
p["s-nr"] =
|
|
462
|
+
p["s-nr"] = a, k(a.parentNode, a["s-ol"] = p, a);
|
|
449
463
|
}
|
|
450
464
|
}
|
|
451
|
-
for (const
|
|
452
|
-
const
|
|
465
|
+
for (const $ of b) {
|
|
466
|
+
const a = $.$nodeToRelocate$, p = $.$slotRefNode$;
|
|
453
467
|
if (p) {
|
|
454
468
|
const m = p.parentNode;
|
|
455
469
|
let v = p.nextSibling;
|
|
456
470
|
{
|
|
457
|
-
let L = (r =
|
|
471
|
+
let L = (r = a["s-ol"]) == null ? void 0 : r.previousSibling;
|
|
458
472
|
for (; L; ) {
|
|
459
473
|
let h = (n = L["s-nr"]) != null ? n : null;
|
|
460
|
-
if (h && h["s-sn"] ===
|
|
461
|
-
for (h = h.nextSibling; h ===
|
|
474
|
+
if (h && h["s-sn"] === a["s-sn"] && m === (h.__parentNode || h.parentNode)) {
|
|
475
|
+
for (h = h.nextSibling; h === a || h != null && h["s-sr"]; )
|
|
462
476
|
h = h == null ? void 0 : h.nextSibling;
|
|
463
477
|
if (!h || !h["s-nr"]) {
|
|
464
478
|
v = h;
|
|
@@ -468,47 +482,48 @@ var Me = (e, t, s = !1) => {
|
|
|
468
482
|
L = L.previousSibling;
|
|
469
483
|
}
|
|
470
484
|
}
|
|
471
|
-
|
|
485
|
+
const pe = a.__parentNode || a.parentNode, ge = a.__nextSibling || a.nextSibling;
|
|
486
|
+
(!v && m !== pe || ge !== v) && a !== v && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), k(m, a, v), a.nodeType === 1 && a.tagName !== "SLOT-FB" && (a.hidden = (i = a["s-ih"]) != null ? i : !1)), a && typeof p["s-rf"] == "function" && p["s-rf"](a);
|
|
472
487
|
} else
|
|
473
|
-
|
|
488
|
+
a.nodeType === 1 && (s && (a["s-ih"] = (o = a.hidden) != null ? o : !1), a.hidden = !0);
|
|
474
489
|
}
|
|
475
490
|
}
|
|
476
491
|
D && re(l.$elm$), A.$flags$ &= -2, b.length = 0;
|
|
477
492
|
}
|
|
478
|
-
if (
|
|
479
|
-
const
|
|
480
|
-
for (const
|
|
481
|
-
|
|
493
|
+
if (w.experimentalScopedSlotChanges && u.$flags$ & 2) {
|
|
494
|
+
const $ = l.$elm$.__childNodes || l.$elm$.childNodes;
|
|
495
|
+
for (const a of $)
|
|
496
|
+
a["s-hn"] !== E && !a["s-sh"] && (s && a["s-ih"] == null && (a["s-ih"] = (f = a.hidden) != null ? f : !1), a.hidden = !0);
|
|
482
497
|
}
|
|
483
|
-
|
|
498
|
+
M = void 0;
|
|
484
499
|
};
|
|
485
|
-
const
|
|
500
|
+
const Ue = (e, t, s) => {
|
|
486
501
|
[null, void 0, "", !1].includes(s) || ["innerHTML", "style"].includes(t) || e.setAttribute(t, ["object", "function"].includes(typeof s) ? "/!\\ Object props are not rendered in the code example" : s);
|
|
487
502
|
}, de = (e, t, s, r, n) => {
|
|
488
503
|
if (t && typeof t == "string") {
|
|
489
|
-
const
|
|
490
|
-
Object.keys(s || {}).forEach((
|
|
491
|
-
|
|
492
|
-
}), r == null || r.forEach((
|
|
493
|
-
de(
|
|
494
|
-
}), s != null && s.innerHTML && (
|
|
504
|
+
const i = document.createElement(t);
|
|
505
|
+
Object.keys(s || {}).forEach((o) => {
|
|
506
|
+
Ue(i, o, s[o]);
|
|
507
|
+
}), r == null || r.forEach((o) => {
|
|
508
|
+
de(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
|
|
509
|
+
}), s != null && s.innerHTML && (i.innerHTML = s.innerHTML), e.appendChild(i);
|
|
495
510
|
}
|
|
496
511
|
n && (e.innerHTML = n);
|
|
497
|
-
},
|
|
512
|
+
}, rt = (e, t) => {
|
|
498
513
|
const s = {};
|
|
499
514
|
if (typeof e != "object")
|
|
500
515
|
throw new Error("filterArgs - args isn't an object.");
|
|
501
516
|
for (const r in e)
|
|
502
517
|
if (!r.startsWith("slot")) {
|
|
503
|
-
const n = e[r],
|
|
504
|
-
(!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[
|
|
518
|
+
const n = e[r], i = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
519
|
+
(!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[i] = n);
|
|
505
520
|
}
|
|
506
521
|
return s;
|
|
507
|
-
},
|
|
522
|
+
}, nt = (e, t) => {
|
|
508
523
|
var r, n;
|
|
509
524
|
const s = document.getElementById("storybook-root");
|
|
510
525
|
if (s !== null)
|
|
511
|
-
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"),
|
|
526
|
+
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), Ce(
|
|
512
527
|
{
|
|
513
528
|
$ancestorComponent$: void 0,
|
|
514
529
|
$flags$: 0,
|
|
@@ -521,7 +536,7 @@ const De = (e, t, s) => {
|
|
|
521
536
|
},
|
|
522
537
|
e(t)
|
|
523
538
|
), s.children[s.children.length - 1];
|
|
524
|
-
},
|
|
539
|
+
}, it = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
|
|
525
540
|
const n = document.createElement("div");
|
|
526
541
|
return de(n, e, t, s, r), n.innerHTML;
|
|
527
542
|
}, U = (e, t) => {
|
|
@@ -530,8 +545,8 @@ const De = (e, t, s) => {
|
|
|
530
545
|
const s = t.split("/");
|
|
531
546
|
return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
|
|
532
547
|
};
|
|
533
|
-
var S,
|
|
534
|
-
class
|
|
548
|
+
var S, H;
|
|
549
|
+
class ot {
|
|
535
550
|
constructor(t) {
|
|
536
551
|
/**
|
|
537
552
|
* JsonDocs
|
|
@@ -549,7 +564,7 @@ class nt {
|
|
|
549
564
|
* @param prop - prop to get control for
|
|
550
565
|
* @returns control type and options if applicable
|
|
551
566
|
*/
|
|
552
|
-
B(this,
|
|
567
|
+
B(this, H, (t) => {
|
|
553
568
|
const s = t.type.replace(/"([^"]+)"/g, "$1").replace(/\s/g, "").replace(/\(.*?\)/g, (r) => r.replace(/\|/g, " OR ")).split("|").map((r) => r.trim().replace(/ OR /g, "|"));
|
|
554
569
|
return t.type === "string" ? { control: { type: "text" } } : t.type === "number" ? { control: { type: "number" } } : t.type === "boolean" ? { control: { type: "boolean" } } : t.type.startsWith("{") && t.type.endsWith("}") ? { control: { type: "object" } } : s.length > 1 ? s.includes("string") ? { control: { type: "text" } } : s.every((r) => r == null ? void 0 : r.includes("[]")) ? { control: { type: "object" } } : (s.unshift(void 0), { control: { type: "select" }, options: s }) : { control: { type: "object" } };
|
|
555
570
|
});
|
|
@@ -559,10 +574,10 @@ class nt {
|
|
|
559
574
|
* @returns component arg types
|
|
560
575
|
*/
|
|
561
576
|
g(this, "extractArgTypes", (t) => {
|
|
562
|
-
const s = T(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((
|
|
563
|
-
const { control:
|
|
577
|
+
const s = T(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((d, l) => {
|
|
578
|
+
const { control: $, options: a } = T(this, H).call(this, l);
|
|
564
579
|
return {
|
|
565
|
-
...
|
|
580
|
+
...d,
|
|
566
581
|
[l.name]: {
|
|
567
582
|
name: l.attr || l.name,
|
|
568
583
|
description: l.docs,
|
|
@@ -572,13 +587,13 @@ class nt {
|
|
|
572
587
|
type: { summary: l.type },
|
|
573
588
|
defaultValue: { summary: l.default }
|
|
574
589
|
},
|
|
575
|
-
control:
|
|
576
|
-
options:
|
|
590
|
+
control: $,
|
|
591
|
+
options: a
|
|
577
592
|
}
|
|
578
593
|
};
|
|
579
594
|
}, {}), n = s == null ? void 0 : s.events.reduce(
|
|
580
|
-
(
|
|
581
|
-
...
|
|
595
|
+
(d, l) => ({
|
|
596
|
+
...d,
|
|
582
597
|
[l.event]: {
|
|
583
598
|
name: l.event,
|
|
584
599
|
description: l.docs,
|
|
@@ -589,9 +604,9 @@ class nt {
|
|
|
589
604
|
}
|
|
590
605
|
}),
|
|
591
606
|
{}
|
|
592
|
-
),
|
|
593
|
-
(
|
|
594
|
-
...
|
|
607
|
+
), i = s == null ? void 0 : s.methods.reduce(
|
|
608
|
+
(d, l) => ({
|
|
609
|
+
...d,
|
|
595
610
|
[l.name]: {
|
|
596
611
|
name: l.name,
|
|
597
612
|
description: l.docs,
|
|
@@ -602,9 +617,9 @@ class nt {
|
|
|
602
617
|
}
|
|
603
618
|
}),
|
|
604
619
|
{}
|
|
605
|
-
),
|
|
606
|
-
(
|
|
607
|
-
...
|
|
620
|
+
), o = s == null ? void 0 : s.slots.reduce(
|
|
621
|
+
(d, l) => ({
|
|
622
|
+
...d,
|
|
608
623
|
[l.name]: {
|
|
609
624
|
name: l.name !== "" ? l.name : "default",
|
|
610
625
|
// default slot are unnamed
|
|
@@ -616,9 +631,9 @@ class nt {
|
|
|
616
631
|
}
|
|
617
632
|
}),
|
|
618
633
|
{}
|
|
619
|
-
),
|
|
620
|
-
(
|
|
621
|
-
...
|
|
634
|
+
), f = s == null ? void 0 : s.styles.reduce(
|
|
635
|
+
(d, l) => ({
|
|
636
|
+
...d,
|
|
622
637
|
[l.name]: {
|
|
623
638
|
name: l.name,
|
|
624
639
|
description: l.docs,
|
|
@@ -629,26 +644,26 @@ class nt {
|
|
|
629
644
|
}
|
|
630
645
|
}),
|
|
631
646
|
{}
|
|
632
|
-
),
|
|
633
|
-
const
|
|
647
|
+
), c = s == null ? void 0 : s.dependencies.reduce((d, l) => {
|
|
648
|
+
const $ = T(this, S).call(this, l);
|
|
634
649
|
return {
|
|
635
|
-
...
|
|
650
|
+
...d,
|
|
636
651
|
[l]: {
|
|
637
652
|
name: l,
|
|
638
|
-
description: `<a href="./?path=/docs/${U("",
|
|
653
|
+
description: `<a href="./?path=/docs/${U("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
|
|
639
654
|
table: {
|
|
640
655
|
category: "depends on",
|
|
641
656
|
type: { summary: void 0 }
|
|
642
657
|
}
|
|
643
658
|
}
|
|
644
659
|
};
|
|
645
|
-
}, {}),
|
|
646
|
-
const
|
|
660
|
+
}, {}), u = s == null ? void 0 : s.dependents.reduce((d, l) => {
|
|
661
|
+
const $ = T(this, S).call(this, l);
|
|
647
662
|
return {
|
|
648
|
-
...
|
|
663
|
+
...d,
|
|
649
664
|
[l]: {
|
|
650
665
|
name: l,
|
|
651
|
-
description: `<a href="./?path=/docs/${U("",
|
|
666
|
+
description: `<a href="./?path=/docs/${U("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
|
|
652
667
|
table: {
|
|
653
668
|
category: "used by",
|
|
654
669
|
type: { summary: void 0 }
|
|
@@ -659,11 +674,11 @@ class nt {
|
|
|
659
674
|
return {
|
|
660
675
|
...r,
|
|
661
676
|
...n,
|
|
662
|
-
...o,
|
|
663
677
|
...i,
|
|
664
|
-
...
|
|
665
|
-
...
|
|
666
|
-
|
|
678
|
+
...o,
|
|
679
|
+
...f,
|
|
680
|
+
...c,
|
|
681
|
+
...u
|
|
667
682
|
};
|
|
668
683
|
});
|
|
669
684
|
/**
|
|
@@ -678,8 +693,8 @@ class nt {
|
|
|
678
693
|
this.jsonDoc = t;
|
|
679
694
|
}
|
|
680
695
|
}
|
|
681
|
-
S = new WeakMap(),
|
|
682
|
-
const
|
|
696
|
+
S = new WeakMap(), H = new WeakMap();
|
|
697
|
+
const He = (e, t) => {
|
|
683
698
|
if (t)
|
|
684
699
|
return `${e}${t}`;
|
|
685
700
|
}, $e = (e) => {
|
|
@@ -688,29 +703,29 @@ const Ce = (e, t) => {
|
|
|
688
703
|
` : "";
|
|
689
704
|
const s = e.props.filter(({ attr: n }) => n !== void 0);
|
|
690
705
|
s.length && (t += `Attributes:
|
|
691
|
-
`, t += s.map(({ attr: n, docs:
|
|
706
|
+
`, t += s.map(({ attr: n, docs: i }) => `- \`${n}\`: ${i}
|
|
692
707
|
`).join(""), t += `
|
|
693
708
|
`);
|
|
694
709
|
const r = e.props.filter(({ attr: n }) => n === void 0);
|
|
695
710
|
return r.length && (t += `Properties:
|
|
696
|
-
`, t += r.map(({ name: n, docs:
|
|
711
|
+
`, t += r.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
697
712
|
`).join(""), t += `
|
|
698
713
|
`), e.methods.length && (t += `Methods:
|
|
699
|
-
`, t += e.methods.map(({ name: n, docs:
|
|
714
|
+
`, t += e.methods.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
700
715
|
`).join(""), t += `
|
|
701
716
|
`), e.events.length && (t += `Events:
|
|
702
|
-
`, t += e.events.map(({ event: n, docs:
|
|
717
|
+
`, t += e.events.map(({ event: n, docs: i }) => `- \`${n}\`: ${i}
|
|
703
718
|
`).join(""), t += `
|
|
704
719
|
`), e.listeners.length && (t += `Listeners:
|
|
705
720
|
`, t += e.listeners.map(({ event: n }) => `- \`${n}\`
|
|
706
721
|
`).join(""), t += `
|
|
707
722
|
`), e.slots.length && (t += `Slots:
|
|
708
|
-
`, t += e.slots.map(({ name: n, docs:
|
|
723
|
+
`, t += e.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
709
724
|
`).join(""), t += `
|
|
710
725
|
`), t;
|
|
711
|
-
},
|
|
726
|
+
}, W = (e) => `${e.docs}
|
|
712
727
|
|
|
713
|
-
Type: \`${e.type}\``,
|
|
728
|
+
Type: \`${e.type}\``, lt = (e, t, s, r) => ({
|
|
714
729
|
$schema: "https://json.schemastore.org/web-types",
|
|
715
730
|
name: e,
|
|
716
731
|
version: t,
|
|
@@ -718,64 +733,64 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
718
733
|
contributions: {
|
|
719
734
|
html: {
|
|
720
735
|
elements: s.components.map((n) => {
|
|
721
|
-
const
|
|
736
|
+
const i = U(r, n.filePath);
|
|
722
737
|
return {
|
|
723
738
|
name: n.tag,
|
|
724
739
|
description: $e(n),
|
|
725
|
-
"doc-url":
|
|
726
|
-
attributes: n.props.filter((
|
|
727
|
-
name:
|
|
728
|
-
description:
|
|
729
|
-
"doc-url":
|
|
740
|
+
"doc-url": i,
|
|
741
|
+
attributes: n.props.filter((o) => o.attr).map((o) => ({
|
|
742
|
+
name: o.attr,
|
|
743
|
+
description: W(o),
|
|
744
|
+
"doc-url": i,
|
|
730
745
|
value: {
|
|
731
|
-
type:
|
|
732
|
-
default:
|
|
733
|
-
required:
|
|
746
|
+
type: o.type,
|
|
747
|
+
default: o.default,
|
|
748
|
+
required: o.required
|
|
734
749
|
}
|
|
735
750
|
})),
|
|
736
751
|
js: {
|
|
737
|
-
properties: n.props.map((
|
|
738
|
-
name:
|
|
739
|
-
description:
|
|
740
|
-
"doc-url":
|
|
752
|
+
properties: n.props.map((o) => ({
|
|
753
|
+
name: o.name,
|
|
754
|
+
description: W(o),
|
|
755
|
+
"doc-url": i,
|
|
741
756
|
value: {
|
|
742
|
-
type:
|
|
743
|
-
default:
|
|
744
|
-
required:
|
|
757
|
+
type: o.type,
|
|
758
|
+
default: o.default,
|
|
759
|
+
required: o.required
|
|
745
760
|
}
|
|
746
761
|
})),
|
|
747
|
-
events: n.events.map((
|
|
748
|
-
name:
|
|
749
|
-
description:
|
|
762
|
+
events: n.events.map((o) => ({
|
|
763
|
+
name: o.event,
|
|
764
|
+
description: o.docs
|
|
750
765
|
}))
|
|
751
766
|
},
|
|
752
767
|
css: {
|
|
753
|
-
properties: n.styles.map((
|
|
754
|
-
name:
|
|
755
|
-
description:
|
|
768
|
+
properties: n.styles.map((o) => ({
|
|
769
|
+
name: o.name,
|
|
770
|
+
description: o.docs
|
|
756
771
|
}))
|
|
757
772
|
}
|
|
758
773
|
};
|
|
759
774
|
})
|
|
760
775
|
}
|
|
761
776
|
}
|
|
762
|
-
}),
|
|
777
|
+
}), we = (e, t, s) => [
|
|
763
778
|
{ name: "Storybook", url: U(e, s) },
|
|
764
|
-
{ name: "Sources", url:
|
|
765
|
-
],
|
|
779
|
+
{ name: "Sources", url: He(t, s) }
|
|
780
|
+
], Be = (e) => {
|
|
766
781
|
if (!e.values.some(({ value: t }) => t === void 0))
|
|
767
782
|
return e.values.map(({ value: t }) => ({ name: t }));
|
|
768
|
-
},
|
|
783
|
+
}, at = (e, t, s) => ({
|
|
769
784
|
version: 1.1,
|
|
770
785
|
tags: e.components.map((r) => {
|
|
771
|
-
const n =
|
|
786
|
+
const n = we(t, s, r.filePath);
|
|
772
787
|
return {
|
|
773
788
|
name: r.tag,
|
|
774
789
|
description: $e(r),
|
|
775
|
-
attributes: r.props.map((
|
|
776
|
-
name:
|
|
777
|
-
description:
|
|
778
|
-
values:
|
|
790
|
+
attributes: r.props.map((i) => ({
|
|
791
|
+
name: i.attr || i.name,
|
|
792
|
+
description: W(i),
|
|
793
|
+
values: Be(i),
|
|
779
794
|
references: n
|
|
780
795
|
})),
|
|
781
796
|
references: n
|
|
@@ -783,7 +798,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
783
798
|
}),
|
|
784
799
|
globalAttributes: [],
|
|
785
800
|
valueSets: []
|
|
786
|
-
}),
|
|
801
|
+
}), ct = (e) => ({
|
|
787
802
|
version: 1.1,
|
|
788
803
|
properties: e.components.flatMap(
|
|
789
804
|
(t) => t.styles.map((s) => ({
|
|
@@ -791,31 +806,31 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
791
806
|
description: s.docs
|
|
792
807
|
}))
|
|
793
808
|
)
|
|
794
|
-
}),
|
|
809
|
+
}), ft = (e) => {
|
|
795
810
|
const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
|
|
796
|
-
return
|
|
797
|
-
},
|
|
798
|
-
const r = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang),
|
|
811
|
+
return We([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
|
|
812
|
+
}, ut = (e) => e.toISOString().split("T")[0], Pe = (e, t, s) => {
|
|
813
|
+
const r = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, o = i.split("-").shift();
|
|
799
814
|
return Object.keys(t).length === 0 ? {
|
|
800
|
-
locale:
|
|
815
|
+
locale: i,
|
|
801
816
|
messages: { lang: s }
|
|
802
817
|
} : {
|
|
803
|
-
locale:
|
|
804
|
-
messages: t[
|
|
818
|
+
locale: i,
|
|
819
|
+
messages: t[o] || t[s] || { lang: s }
|
|
805
820
|
};
|
|
806
|
-
},
|
|
821
|
+
}, dt = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), $t = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), pt = (e, t, s = 0) => new Intl.NumberFormat(t, {
|
|
807
822
|
style: "percent",
|
|
808
823
|
minimumFractionDigits: s,
|
|
809
824
|
maximumFractionDigits: s
|
|
810
|
-
}).format(e),
|
|
825
|
+
}).format(e), gt = (e, t, s, r = "short", n = 0) => new Intl.NumberFormat(t, {
|
|
811
826
|
style: "unit",
|
|
812
827
|
unit: s,
|
|
813
828
|
unitDisplay: r,
|
|
814
829
|
minimumFractionDigits: n,
|
|
815
830
|
maximumFractionDigits: n
|
|
816
|
-
}).format(e),
|
|
831
|
+
}).format(e), qe = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, We = (e, t, s) => typeof e != "string" || e === "" || !qe.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ht = (e, t) => (s) => Pe(s, e, t), yt = ({ disconnect: e, observe: t, takeRecords: s }) => {
|
|
817
832
|
class r {
|
|
818
|
-
constructor(
|
|
833
|
+
constructor(i) {
|
|
819
834
|
/**
|
|
820
835
|
*
|
|
821
836
|
*/
|
|
@@ -832,7 +847,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
832
847
|
*
|
|
833
848
|
*/
|
|
834
849
|
g(this, "cb");
|
|
835
|
-
this.cb =
|
|
850
|
+
this.cb = i;
|
|
836
851
|
}
|
|
837
852
|
}
|
|
838
853
|
return [window, global].forEach((n) => {
|
|
@@ -842,7 +857,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
842
857
|
value: r
|
|
843
858
|
});
|
|
844
859
|
}), r;
|
|
845
|
-
},
|
|
860
|
+
}, vt = ({ disconnect: e, observe: t }) => {
|
|
846
861
|
class s {
|
|
847
862
|
constructor(n) {
|
|
848
863
|
/**
|
|
@@ -872,7 +887,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
872
887
|
});
|
|
873
888
|
}), s;
|
|
874
889
|
};
|
|
875
|
-
class
|
|
890
|
+
class ze extends Event {
|
|
876
891
|
constructor() {
|
|
877
892
|
super(...arguments);
|
|
878
893
|
/**
|
|
@@ -882,8 +897,8 @@ class We extends Event {
|
|
|
882
897
|
}
|
|
883
898
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
884
899
|
}
|
|
885
|
-
const
|
|
886
|
-
class e extends
|
|
900
|
+
const mt = () => {
|
|
901
|
+
class e extends ze {
|
|
887
902
|
}
|
|
888
903
|
return [window, global].forEach((t) => {
|
|
889
904
|
Object.defineProperty(t, "SubmitEvent", {
|
|
@@ -892,7 +907,7 @@ const yt = () => {
|
|
|
892
907
|
value: e
|
|
893
908
|
});
|
|
894
909
|
}), e;
|
|
895
|
-
},
|
|
910
|
+
}, bt = (e) => {
|
|
896
911
|
const t = (s) => (setTimeout(s, 1), e(), 0);
|
|
897
912
|
return [window, global].forEach((s) => {
|
|
898
913
|
Object.defineProperty(s, "requestAnimationFrame", {
|
|
@@ -903,39 +918,39 @@ const yt = () => {
|
|
|
903
918
|
}), t;
|
|
904
919
|
};
|
|
905
920
|
export {
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
921
|
+
Ke as ClassList,
|
|
922
|
+
ot as StorybookPreview,
|
|
923
|
+
Qe as allItemsAreString,
|
|
924
|
+
tt as cleanString,
|
|
925
|
+
Ge as createID,
|
|
926
|
+
qe as dateRegExp,
|
|
927
|
+
ut as dateToString,
|
|
928
|
+
ht as defineLocales,
|
|
929
|
+
rt as filterArgs,
|
|
930
|
+
Je as focusableElements,
|
|
931
|
+
ft as getLocaleDatePattern,
|
|
917
932
|
V as getParentWindows,
|
|
918
|
-
|
|
933
|
+
it as getStoryHTML,
|
|
919
934
|
U as getStorybookUrl,
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
935
|
+
Ye as getWindows,
|
|
936
|
+
Ze as isTagName,
|
|
937
|
+
et as isValidNumber,
|
|
938
|
+
me as isValidString,
|
|
939
|
+
Xe as isValideID,
|
|
940
|
+
dt as localeCurrency,
|
|
941
|
+
We as localeDate,
|
|
942
|
+
$t as localeNumber,
|
|
943
|
+
pt as localePercent,
|
|
944
|
+
gt as localeUnit,
|
|
945
|
+
st as nextTick,
|
|
946
|
+
bt as setUpRequestAnimationFrameMock,
|
|
947
|
+
yt as setupMutationObserverMock,
|
|
948
|
+
vt as setupResizeObserverMock,
|
|
949
|
+
mt as setupSubmitEventMock,
|
|
950
|
+
nt as stencilWrapper,
|
|
951
|
+
Ve as toString,
|
|
952
|
+
ct as vsCodeCssGenerator,
|
|
953
|
+
at as vsCodeGenerator,
|
|
954
|
+
lt as webTypesGenerator
|
|
940
955
|
};
|
|
941
956
|
//# sourceMappingURL=index.es.js.map
|