@mgdis/stencil-helpers 1.1.7 → 1.1.9
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/ide/index.d.ts.map +1 -1
- package/dist/index.es.js +514 -349
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/storybook/index.d.ts +28 -0
- package/dist/storybook/index.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/index.es.js
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var ve = Object.defineProperty;
|
|
2
|
+
var X = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var he = (e, t, s) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
6
|
+
var g = (e, t, s) => he(e, typeof t != "symbol" ? t + "" : t, s), ye = (e, t, s) => t.has(e) || X("Cannot " + s);
|
|
7
|
+
var k = (e, t, s) => (ye(e, t, "read from private field"), s ? s.call(e) : t.get(e)), P = (e, t, s) => t.has(e) ? X("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
8
|
+
const ze = (e = "", t = 10) => {
|
|
5
9
|
const s = new Uint8Array(t);
|
|
6
10
|
crypto.getRandomValues(s);
|
|
7
11
|
const r = Array.from(s).map((o) => o.toString(16).padStart(2, "0")).join("").slice(0, t);
|
|
8
12
|
return e !== "" ? `${e}-${r}` : r;
|
|
9
13
|
};
|
|
10
|
-
class
|
|
14
|
+
class Ie {
|
|
11
15
|
constructor(t = []) {
|
|
12
16
|
/**
|
|
13
17
|
* Available classes
|
|
14
18
|
*/
|
|
15
|
-
|
|
19
|
+
g(this, "classes");
|
|
16
20
|
/**
|
|
17
21
|
* Add class
|
|
18
22
|
* @param className - class name to add
|
|
19
23
|
*/
|
|
20
|
-
|
|
24
|
+
g(this, "add", (t) => {
|
|
21
25
|
this.has(t) || this.classes.push(t);
|
|
22
26
|
});
|
|
23
27
|
/**
|
|
24
28
|
* Delete class
|
|
25
29
|
* @param className - class name to delete
|
|
26
30
|
*/
|
|
27
|
-
|
|
31
|
+
g(this, "delete", (t) => {
|
|
28
32
|
const s = this.classes.indexOf(t);
|
|
29
33
|
s > -1 && this.classes.splice(s, 1);
|
|
30
34
|
});
|
|
@@ -33,146 +37,34 @@ class He {
|
|
|
33
37
|
* @param className - class name to check
|
|
34
38
|
* @returns class name is in the list
|
|
35
39
|
*/
|
|
36
|
-
|
|
40
|
+
g(this, "has", (t) => this.classes.includes(t));
|
|
37
41
|
/**
|
|
38
42
|
* Join classes seperated by spaces
|
|
39
43
|
* @returns joined values
|
|
40
44
|
*/
|
|
41
|
-
|
|
45
|
+
g(this, "join", () => this.classes.join(" "));
|
|
42
46
|
this.classes = t;
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
|
-
const
|
|
46
|
-
const t =
|
|
49
|
+
const Ge = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Xe = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Ke = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Qe = (e) => {
|
|
50
|
+
const t = te(e), s = se(e);
|
|
47
51
|
return [e, ...t, ...s];
|
|
48
|
-
},
|
|
52
|
+
}, te = (e, t = []) => {
|
|
49
53
|
if (e.self !== e.top)
|
|
50
54
|
try {
|
|
51
55
|
const s = e.parent;
|
|
52
|
-
return s ? (t.push(s),
|
|
56
|
+
return s ? (t.push(s), te(s, t)) : t;
|
|
53
57
|
} catch (s) {
|
|
54
58
|
return console.error("Different hosts between iframes:", s), t;
|
|
55
59
|
}
|
|
56
60
|
return t;
|
|
57
|
-
},
|
|
61
|
+
}, se = (e, t = []) => {
|
|
58
62
|
if (e.frames.length > 0)
|
|
59
63
|
for (const s of Array.from(e.frames))
|
|
60
|
-
t.push(s),
|
|
64
|
+
t.push(s), se(s, t);
|
|
61
65
|
return t;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
return;
|
|
65
|
-
const s = t.split("/");
|
|
66
|
-
return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
|
|
67
|
-
}, de = (e, t) => {
|
|
68
|
-
if (t)
|
|
69
|
-
return `${e}${t}`;
|
|
70
|
-
}, Y = (e) => {
|
|
71
|
-
let t = e.overview ? `${e.overview}
|
|
72
|
-
|
|
73
|
-
` : "";
|
|
74
|
-
const s = e.props.filter(({ attr: o }) => o !== void 0);
|
|
75
|
-
s.length && (t += `Attributes:
|
|
76
|
-
`, t += s.map(({ attr: o, docs: l }) => `- \`${o}\`: ${l}
|
|
77
|
-
`).join(""), t += `
|
|
78
|
-
`);
|
|
79
|
-
const r = e.props.filter(({ attr: o }) => o === void 0);
|
|
80
|
-
return r.length && (t += `Properties:
|
|
81
|
-
`, t += r.map(({ name: o, docs: l }) => `- \`${o}\`: ${l}
|
|
82
|
-
`).join(""), t += `
|
|
83
|
-
`), e.methods.length && (t += `Methods:
|
|
84
|
-
`, t += e.methods.map(({ name: o, docs: l }) => `- \`${o}\`: ${l}
|
|
85
|
-
`).join(""), t += `
|
|
86
|
-
`), e.events.length && (t += `Events:
|
|
87
|
-
`, t += e.events.map(({ event: o, docs: l }) => `- \`${o}\`: ${l}
|
|
88
|
-
`).join(""), t += `
|
|
89
|
-
`), e.listeners.length && (t += `Listeners:
|
|
90
|
-
`, t += e.listeners.map(({ event: o }) => `- \`${o}\`
|
|
91
|
-
`).join(""), t += `
|
|
92
|
-
`), e.slots.length && (t += `Slots:
|
|
93
|
-
`, t += e.slots.map(({ name: o, docs: l }) => `- \`${o}\`: ${l}
|
|
94
|
-
`).join(""), t += `
|
|
95
|
-
`), t;
|
|
96
|
-
}, _ = (e) => `${e.docs}
|
|
97
|
-
|
|
98
|
-
Type: \`${e.type}\``, Xe = (e, t, s, r) => ({
|
|
99
|
-
$schema: "https://json.schemastore.org/web-types",
|
|
100
|
-
name: e,
|
|
101
|
-
version: t,
|
|
102
|
-
"description-markup": "markdown",
|
|
103
|
-
contributions: {
|
|
104
|
-
html: {
|
|
105
|
-
elements: s.components.map((o) => {
|
|
106
|
-
const l = J(r, o.filePath);
|
|
107
|
-
return {
|
|
108
|
-
name: o.tag,
|
|
109
|
-
description: Y(o),
|
|
110
|
-
"doc-url": l,
|
|
111
|
-
attributes: o.props.filter((n) => n.attr).map((n) => ({
|
|
112
|
-
name: n.attr,
|
|
113
|
-
description: _(n),
|
|
114
|
-
"doc-url": l,
|
|
115
|
-
value: {
|
|
116
|
-
type: n.type,
|
|
117
|
-
default: n.default,
|
|
118
|
-
required: n.required
|
|
119
|
-
}
|
|
120
|
-
})),
|
|
121
|
-
js: {
|
|
122
|
-
properties: o.props.map((n) => ({
|
|
123
|
-
name: n.name,
|
|
124
|
-
description: _(n),
|
|
125
|
-
"doc-url": l,
|
|
126
|
-
value: {
|
|
127
|
-
type: n.type,
|
|
128
|
-
default: n.default,
|
|
129
|
-
required: n.required
|
|
130
|
-
}
|
|
131
|
-
})),
|
|
132
|
-
events: o.events.map((n) => ({
|
|
133
|
-
name: n.event,
|
|
134
|
-
description: n.docs
|
|
135
|
-
}))
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
})
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}), pe = (e, t, s) => [
|
|
142
|
-
{ name: "Storybook", url: J(e, s) },
|
|
143
|
-
{ name: "Sources", url: de(t, s) }
|
|
144
|
-
], ve = (e) => {
|
|
145
|
-
if (!e.values.some(({ value: t }) => t === void 0))
|
|
146
|
-
return e.values.map(({ value: t }) => ({ name: t }));
|
|
147
|
-
}, Ke = (e, t, s, r) => ({
|
|
148
|
-
version: e,
|
|
149
|
-
tags: t.components.map((o) => {
|
|
150
|
-
const l = pe(s, r, o.filePath);
|
|
151
|
-
return {
|
|
152
|
-
name: o.tag,
|
|
153
|
-
description: Y(o),
|
|
154
|
-
attributes: o.props.map((n) => ({
|
|
155
|
-
name: n.attr || n.name,
|
|
156
|
-
description: _(n),
|
|
157
|
-
values: ve(n),
|
|
158
|
-
references: l
|
|
159
|
-
})),
|
|
160
|
-
references: l
|
|
161
|
-
};
|
|
162
|
-
}),
|
|
163
|
-
globalAttributes: [],
|
|
164
|
-
valueSets: []
|
|
165
|
-
}), Qe = (e) => {
|
|
166
|
-
const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
|
|
167
|
-
return ye([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);
|
|
168
|
-
}, Ze = (e) => e.toISOString().split("T")[0], ge = (e, t, s) => {
|
|
169
|
-
const r = e.closest("[lang]"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), l = o.length > 0 && typeof o[0] == "string" ? o[0] : navigator.language || s, n = l.split("-").shift();
|
|
170
|
-
return {
|
|
171
|
-
locale: l,
|
|
172
|
-
messages: t[n] || t[s]
|
|
173
|
-
};
|
|
174
|
-
}, Je = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), Ye = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), he = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ye = (e, t, s) => typeof e != "string" || e === "" || !he.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), Ve = (e, t) => (s) => ge(s, e, t);
|
|
175
|
-
var N = {
|
|
66
|
+
}, Ze = (e) => typeof e == "string" && e.trim() !== "", Je = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Ye = async (e) => e();
|
|
67
|
+
var E = {
|
|
176
68
|
allRenderFn: !1,
|
|
177
69
|
cmpDidLoad: !0,
|
|
178
70
|
cmpDidUnload: !1,
|
|
@@ -255,18 +147,18 @@ var N = {
|
|
|
255
147
|
devTools: !1,
|
|
256
148
|
shadowDelegatesFocus: !0,
|
|
257
149
|
initializeNextTick: !1,
|
|
258
|
-
asyncLoading: !
|
|
150
|
+
asyncLoading: !0,
|
|
259
151
|
asyncQueue: !1,
|
|
260
152
|
transformTagName: !1,
|
|
261
153
|
attachStyles: !0,
|
|
262
154
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
263
155
|
experimentalSlotFixes: !1
|
|
264
|
-
},
|
|
156
|
+
}, me = Object.defineProperty, be = (e, t) => {
|
|
265
157
|
for (var s in t)
|
|
266
|
-
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
var
|
|
158
|
+
me(e, s, { get: t[s], enumerable: !0 });
|
|
159
|
+
}, K = (e, t) => t in e, Q = "http://www.w3.org/1999/xlink", q = typeof window < "u" ? window : {}, _ = q.document || { head: {} };
|
|
160
|
+
q.HTMLElement;
|
|
161
|
+
var L = {
|
|
270
162
|
$flags$: 0,
|
|
271
163
|
$resourcesUrl$: "",
|
|
272
164
|
jmp: (e) => e(),
|
|
@@ -274,35 +166,35 @@ var x = {
|
|
|
274
166
|
ael: (e, t, s, r) => e.addEventListener(t, s, r),
|
|
275
167
|
rel: (e, t, s, r) => e.removeEventListener(t, s, r),
|
|
276
168
|
ce: (e, t) => new CustomEvent(e, t)
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
err: () =>
|
|
280
|
-
map: () =>
|
|
281
|
-
ok: () =>
|
|
282
|
-
unwrap: () =>
|
|
169
|
+
}, Z = {}, Se = "http://www.w3.org/2000/svg", Te = "http://www.w3.org/1999/xhtml", ke = (e) => e != null, re = (e) => (e = typeof e, e === "object" || e === "function"), xe = {};
|
|
170
|
+
be(xe, {
|
|
171
|
+
err: () => oe,
|
|
172
|
+
map: () => Ae,
|
|
173
|
+
ok: () => U,
|
|
174
|
+
unwrap: () => Ee,
|
|
283
175
|
unwrapErr: () => Le
|
|
284
176
|
});
|
|
285
|
-
var
|
|
177
|
+
var U = (e) => ({
|
|
286
178
|
isOk: !0,
|
|
287
179
|
isErr: !1,
|
|
288
180
|
value: e
|
|
289
|
-
}),
|
|
181
|
+
}), oe = (e) => ({
|
|
290
182
|
isOk: !1,
|
|
291
183
|
isErr: !0,
|
|
292
184
|
value: e
|
|
293
185
|
});
|
|
294
|
-
function
|
|
186
|
+
function Ae(e, t) {
|
|
295
187
|
if (e.isOk) {
|
|
296
188
|
const s = t(e.value);
|
|
297
|
-
return s instanceof Promise ? s.then((r) =>
|
|
189
|
+
return s instanceof Promise ? s.then((r) => U(r)) : U(s);
|
|
298
190
|
}
|
|
299
191
|
if (e.isErr) {
|
|
300
192
|
const s = e.value;
|
|
301
|
-
return
|
|
193
|
+
return oe(s);
|
|
302
194
|
}
|
|
303
195
|
throw "should never get here";
|
|
304
196
|
}
|
|
305
|
-
var
|
|
197
|
+
var Ee = (e) => {
|
|
306
198
|
if (e.isOk)
|
|
307
199
|
return e.value;
|
|
308
200
|
throw e.value;
|
|
@@ -310,16 +202,16 @@ var Ae = (e) => {
|
|
|
310
202
|
if (e.isErr)
|
|
311
203
|
return e.value;
|
|
312
204
|
throw e.value;
|
|
313
|
-
},
|
|
314
|
-
let r = null, o = null,
|
|
315
|
-
const
|
|
316
|
-
for (let $ = 0; $ <
|
|
317
|
-
r =
|
|
205
|
+
}, je = (e, t, ...s) => {
|
|
206
|
+
let r = null, o = null, n = null, l = !1, a = !1;
|
|
207
|
+
const c = [], d = (i) => {
|
|
208
|
+
for (let $ = 0; $ < i.length; $++)
|
|
209
|
+
r = i[$], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((l = !re(r)) && (r = String(r)), l && a ? c[c.length - 1].$text$ += r : c.push(l ? W(null, r) : r), a = l);
|
|
318
210
|
};
|
|
319
211
|
d(s);
|
|
320
|
-
const
|
|
321
|
-
return
|
|
322
|
-
},
|
|
212
|
+
const f = W(e, null);
|
|
213
|
+
return f.$attrs$ = t, c.length > 0 && (f.$children$ = c), f.$key$ = o, f.$name$ = n, f;
|
|
214
|
+
}, W = (e, t) => {
|
|
323
215
|
const s = {
|
|
324
216
|
$flags$: 0,
|
|
325
217
|
$tag$: e,
|
|
@@ -328,48 +220,48 @@ var Ae = (e) => {
|
|
|
328
220
|
$children$: null
|
|
329
221
|
};
|
|
330
222
|
return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
|
|
331
|
-
},
|
|
223
|
+
}, Re = {}, Oe = (e) => e && e.$tag$ === Re, J = (e, t, s, r, o, n) => {
|
|
332
224
|
if (s !== r) {
|
|
333
|
-
let
|
|
225
|
+
let l = K(e, t), a = t.toLowerCase();
|
|
334
226
|
if (t === "class") {
|
|
335
|
-
const
|
|
336
|
-
|
|
227
|
+
const c = e.classList, d = Y(s), f = Y(r);
|
|
228
|
+
c.remove(...d.filter((i) => i && !f.includes(i))), c.add(...f.filter((i) => i && !d.includes(i)));
|
|
337
229
|
} else if (t === "style") {
|
|
338
|
-
for (const
|
|
339
|
-
(!r || r[
|
|
340
|
-
for (const
|
|
341
|
-
(!s || r[
|
|
230
|
+
for (const c in s)
|
|
231
|
+
(!r || r[c] == null) && (c.includes("-") ? e.style.removeProperty(c) : e.style[c] = "");
|
|
232
|
+
for (const c in r)
|
|
233
|
+
(!s || r[c] !== s[c]) && (c.includes("-") ? e.style.setProperty(c, r[c]) : e.style[c] = r[c]);
|
|
342
234
|
} else if (t !== "key") if (t === "ref")
|
|
343
235
|
r && r(e);
|
|
344
236
|
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
345
|
-
if (t[2] === "-" ? t = t.slice(3) :
|
|
346
|
-
const
|
|
347
|
-
t = t.replace(
|
|
237
|
+
if (t[2] === "-" ? t = t.slice(3) : K(q, a) ? t = a.slice(2) : t = a[2] + t.slice(3), s || r) {
|
|
238
|
+
const c = t.endsWith(ne);
|
|
239
|
+
t = t.replace(_e, ""), s && L.rel(e, t, s, c), r && L.ael(e, t, r, c);
|
|
348
240
|
}
|
|
349
241
|
} else {
|
|
350
|
-
const
|
|
351
|
-
if ((
|
|
242
|
+
const c = re(r);
|
|
243
|
+
if ((l || c && r !== null) && !o)
|
|
352
244
|
try {
|
|
353
245
|
if (e.tagName.includes("-"))
|
|
354
246
|
e[t] = r;
|
|
355
247
|
else {
|
|
356
|
-
const
|
|
357
|
-
t === "list" ?
|
|
248
|
+
const f = r ?? "";
|
|
249
|
+
t === "list" ? l = !1 : (s == null || e[t] != f) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = f : e.setAttribute(t, f));
|
|
358
250
|
}
|
|
359
251
|
} catch {
|
|
360
252
|
}
|
|
361
253
|
let d = !1;
|
|
362
|
-
|
|
254
|
+
a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (d ? e.removeAttributeNS(Q, t) : e.removeAttribute(t)) : (!l || n & 4 || o) && !c && (r = r === !0 ? "" : r, d ? e.setAttributeNS(Q, t, r) : e.setAttribute(t, r));
|
|
363
255
|
}
|
|
364
256
|
}
|
|
365
|
-
}, Me = /\s/,
|
|
366
|
-
const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ ||
|
|
367
|
-
for (const
|
|
368
|
-
|
|
369
|
-
for (const
|
|
370
|
-
|
|
257
|
+
}, Me = /\s/, Y = (e) => e ? e.split(Me) : [], ne = "Capture", _e = new RegExp(ne + "$"), le = (e, t, s) => {
|
|
258
|
+
const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ || Z, n = t.$attrs$ || Z;
|
|
259
|
+
for (const l of V(Object.keys(o)))
|
|
260
|
+
l in n || J(r, l, o[l], void 0, s, t.$flags$);
|
|
261
|
+
for (const l of V(Object.keys(n)))
|
|
262
|
+
J(r, l, o[l], n[l], s, t.$flags$);
|
|
371
263
|
};
|
|
372
|
-
function
|
|
264
|
+
function V(e) {
|
|
373
265
|
return e.includes("ref") ? (
|
|
374
266
|
// we need to sort these to ensure that `'ref'` is the last attr
|
|
375
267
|
[...e.filter((t) => t !== "ref"), "ref"]
|
|
@@ -378,11 +270,11 @@ function X(e) {
|
|
|
378
270
|
e
|
|
379
271
|
);
|
|
380
272
|
}
|
|
381
|
-
var
|
|
273
|
+
var x, H, j, N = !1, F = !1, z = !1, h = !1, C = (e, t, s, r) => {
|
|
382
274
|
var o;
|
|
383
|
-
const
|
|
384
|
-
let
|
|
385
|
-
if (
|
|
275
|
+
const n = t.$children$[s];
|
|
276
|
+
let l = 0, a, c, d;
|
|
277
|
+
if (N || (z = !0, n.$tag$ === "slot" && (x && r.classList.add(x + "-s"), n.$flags$ |= n.$children$ ? (
|
|
386
278
|
// slot element has fallback content
|
|
387
279
|
// still create an element that "mocks" the slot element
|
|
388
280
|
2
|
|
@@ -391,85 +283,94 @@ var T, w, E, O = !1, M = !1, H = !1, h = !1, D = (e, t, s, r) => {
|
|
|
391
283
|
// create an html comment we'll use to always reference
|
|
392
284
|
// where actual slot content should sit next to
|
|
393
285
|
1
|
|
394
|
-
))),
|
|
395
|
-
|
|
396
|
-
else if (
|
|
397
|
-
|
|
286
|
+
))), n.$text$ !== null)
|
|
287
|
+
a = n.$elm$ = _.createTextNode(n.$text$);
|
|
288
|
+
else if (n.$flags$ & 1)
|
|
289
|
+
a = n.$elm$ = _.createTextNode("");
|
|
398
290
|
else {
|
|
399
|
-
if (h || (h =
|
|
400
|
-
h ?
|
|
401
|
-
!
|
|
402
|
-
), h &&
|
|
403
|
-
for (
|
|
404
|
-
|
|
405
|
-
|
|
291
|
+
if (h || (h = n.$tag$ === "svg"), a = n.$elm$ = _.createElementNS(
|
|
292
|
+
h ? Se : Te,
|
|
293
|
+
!N && E.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
|
|
294
|
+
), h && n.$tag$ === "foreignObject" && (h = !1), le(null, n, h), !!a.getRootNode().querySelector("body") && E.scoped && ke(x) && a["s-si"] !== x && a.classList.add(a["s-si"] = x), G(a, r), n.$children$)
|
|
295
|
+
for (l = 0; l < n.$children$.length; ++l)
|
|
296
|
+
c = C(e, n, l, a), c && a.appendChild(c);
|
|
297
|
+
n.$tag$ === "svg" ? h = !1 : a.tagName === "foreignObject" && (h = !0);
|
|
406
298
|
}
|
|
407
|
-
return
|
|
408
|
-
},
|
|
409
|
-
|
|
299
|
+
return a["s-hn"] = j, n.$flags$ & 3 && (a["s-sr"] = !0, a["s-cr"] = H, a["s-sn"] = n.$name$ || "", a["s-rf"] = (o = n.$attrs$) == null ? void 0 : o.ref, d = e && e.$children$ && e.$children$[s], d && d.$tag$ === n.$tag$ && e.$elm$ && R(e.$elm$, !1)), a;
|
|
300
|
+
}, R = (e, t) => {
|
|
301
|
+
L.$flags$ |= 1;
|
|
410
302
|
const s = Array.from(e.childNodes);
|
|
411
|
-
if (e["s-sr"] &&
|
|
303
|
+
if (e["s-sr"] && E.experimentalSlotFixes) {
|
|
412
304
|
let r = e;
|
|
413
305
|
for (; r = r.nextSibling; )
|
|
414
|
-
r && r["s-sn"] === e["s-sn"] && r["s-sh"] ===
|
|
306
|
+
r && r["s-sn"] === e["s-sn"] && r["s-sh"] === j && s.push(r);
|
|
415
307
|
}
|
|
416
308
|
for (let r = s.length - 1; r >= 0; r--) {
|
|
417
309
|
const o = s[r];
|
|
418
|
-
o["s-hn"] !==
|
|
310
|
+
o["s-hn"] !== j && o["s-ol"] && (T(ce(o), o, I(o)), o["s-ol"].remove(), o["s-ol"] = void 0, o["s-sh"] = void 0, z = !0), t && R(o, t);
|
|
419
311
|
}
|
|
420
|
-
|
|
421
|
-
},
|
|
422
|
-
let
|
|
423
|
-
for (
|
|
424
|
-
r[o] && (
|
|
425
|
-
},
|
|
312
|
+
L.$flags$ &= -2;
|
|
313
|
+
}, ie = (e, t, s, r, o, n) => {
|
|
314
|
+
let l = e["s-cr"] && e["s-cr"].parentNode || e, a;
|
|
315
|
+
for (l.shadowRoot && l.tagName === j && (l = l.shadowRoot); o <= n; ++o)
|
|
316
|
+
r[o] && (a = C(null, s, o, e), a && (r[o].$elm$ = a, T(l, a, I(t))));
|
|
317
|
+
}, ae = (e, t, s) => {
|
|
426
318
|
for (let r = t; r <= s; ++r) {
|
|
427
319
|
const o = e[r];
|
|
428
320
|
if (o) {
|
|
429
|
-
const
|
|
430
|
-
|
|
321
|
+
const n = o.$elm$;
|
|
322
|
+
$e(o), n && (F = !0, n["s-ol"] ? n["s-ol"].remove() : R(n, !0), n.remove());
|
|
431
323
|
}
|
|
432
324
|
}
|
|
433
325
|
}, Ne = (e, t, s, r, o = !1) => {
|
|
434
|
-
let
|
|
435
|
-
for (;
|
|
436
|
-
if (
|
|
437
|
-
|
|
438
|
-
else if (
|
|
439
|
-
|
|
440
|
-
else if (
|
|
441
|
-
|
|
326
|
+
let n = 0, l = 0, a = 0, c = 0, d = t.length - 1, f = t[0], i = t[d], $ = r.length - 1, u = r[0], p = r[$], m, y;
|
|
327
|
+
for (; n <= d && l <= $; )
|
|
328
|
+
if (f == null)
|
|
329
|
+
f = t[++n];
|
|
330
|
+
else if (i == null)
|
|
331
|
+
i = t[--d];
|
|
332
|
+
else if (u == null)
|
|
333
|
+
u = r[++l];
|
|
442
334
|
else if (p == null)
|
|
443
335
|
p = r[--$];
|
|
444
|
-
else if (
|
|
445
|
-
|
|
446
|
-
else if (
|
|
447
|
-
|
|
448
|
-
else if (
|
|
449
|
-
(
|
|
450
|
-
else if (
|
|
451
|
-
(
|
|
336
|
+
else if (M(f, u, o))
|
|
337
|
+
A(f, u, o), f = t[++n], u = r[++l];
|
|
338
|
+
else if (M(i, p, o))
|
|
339
|
+
A(i, p, o), i = t[--d], p = r[--$];
|
|
340
|
+
else if (M(f, p, o))
|
|
341
|
+
(f.$tag$ === "slot" || p.$tag$ === "slot") && R(f.$elm$.parentNode, !1), A(f, p, o), T(e, f.$elm$, i.$elm$.nextSibling), f = t[++n], p = r[--$];
|
|
342
|
+
else if (M(i, u, o))
|
|
343
|
+
(f.$tag$ === "slot" || p.$tag$ === "slot") && R(i.$elm$.parentNode, !1), A(i, u, o), T(e, i.$elm$, f.$elm$), i = t[--d], u = r[++l];
|
|
452
344
|
else {
|
|
453
|
-
for (
|
|
454
|
-
if (t[
|
|
455
|
-
|
|
345
|
+
for (a = -1, c = n; c <= d; ++c)
|
|
346
|
+
if (t[c] && t[c].$key$ !== null && t[c].$key$ === u.$key$) {
|
|
347
|
+
a = c;
|
|
456
348
|
break;
|
|
457
349
|
}
|
|
458
|
-
|
|
350
|
+
a >= 0 ? (y = t[a], y.$tag$ !== u.$tag$ ? m = C(t && t[l], s, a, e) : (A(y, u, o), t[a] = void 0, m = y.$elm$), u = r[++l]) : (m = C(t && t[l], s, l, e), u = r[++l]), m && T(ce(f.$elm$), m, I(f.$elm$));
|
|
459
351
|
}
|
|
460
|
-
|
|
352
|
+
n > d ? ie(
|
|
461
353
|
e,
|
|
462
354
|
r[$ + 1] == null ? null : r[$ + 1].$elm$,
|
|
463
355
|
s,
|
|
464
356
|
r,
|
|
465
|
-
|
|
357
|
+
l,
|
|
466
358
|
$
|
|
467
|
-
) :
|
|
468
|
-
},
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
359
|
+
) : l > $ && ae(t, n, d);
|
|
360
|
+
}, M = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? (
|
|
361
|
+
// The component gets hydrated and no VDOM has been initialized.
|
|
362
|
+
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
363
|
+
"$nodeId$" in e && s && // `leftNode` is not from type HTMLComment which would cause many
|
|
364
|
+
// hydration comments to be removed
|
|
365
|
+
e.$elm$.nodeType !== 8 ? !1 : e.$name$ === t.$name$
|
|
366
|
+
) : s ? !0 : e.$key$ === t.$key$ : !1, I = (e) => e && e["s-ol"] || e, ce = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, A = (e, t, s = !1) => {
|
|
367
|
+
const r = t.$elm$ = e.$elm$, o = e.$children$, n = t.$children$, l = t.$tag$, a = t.$text$;
|
|
368
|
+
let c;
|
|
369
|
+
a === null ? (h = l === "svg" ? !0 : l === "foreignObject" ? !1 : h, l === "slot" && !N || le(e, t, h), o !== null && n !== null ? Ne(r, o, t, n, s) : n !== null ? (e.$text$ !== null && (r.textContent = ""), ie(r, null, t, n, 0, n.length - 1)) : (
|
|
370
|
+
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
371
|
+
!s && E.updatable && o !== null && ae(o, 0, o.length - 1)
|
|
372
|
+
), h && l === "svg" && (h = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = a : e.$text$ !== a && (r.data = a);
|
|
373
|
+
}, fe = (e) => {
|
|
473
374
|
const t = e.childNodes;
|
|
474
375
|
for (const s of t)
|
|
475
376
|
if (s.nodeType === 1) {
|
|
@@ -489,129 +390,129 @@ var T, w, E, O = !1, M = !1, H = !1, h = !1, D = (e, t, s, r) => {
|
|
|
489
390
|
}
|
|
490
391
|
}
|
|
491
392
|
}
|
|
492
|
-
|
|
393
|
+
fe(s);
|
|
493
394
|
}
|
|
494
|
-
},
|
|
395
|
+
}, b = [], ue = (e) => {
|
|
495
396
|
let t, s, r;
|
|
496
397
|
for (const o of e.childNodes) {
|
|
497
398
|
if (o["s-sr"] && (t = o["s-cr"]) && t.parentNode) {
|
|
498
399
|
s = t.parentNode.childNodes;
|
|
499
|
-
const
|
|
400
|
+
const n = o["s-sn"];
|
|
500
401
|
for (r = s.length - 1; r >= 0; r--)
|
|
501
|
-
if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"] && !
|
|
502
|
-
if (
|
|
503
|
-
let
|
|
504
|
-
|
|
402
|
+
if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"] && !E.experimentalSlotFixes)
|
|
403
|
+
if (ee(t, n)) {
|
|
404
|
+
let l = b.find((a) => a.$nodeToRelocate$ === t);
|
|
405
|
+
F = !0, t["s-sn"] = t["s-sn"] || n, l ? (l.$nodeToRelocate$["s-sh"] = o["s-hn"], l.$slotRefNode$ = o) : (t["s-sh"] = o["s-hn"], b.push({
|
|
505
406
|
$slotRefNode$: o,
|
|
506
407
|
$nodeToRelocate$: t
|
|
507
|
-
})), t["s-sr"] &&
|
|
508
|
-
|
|
408
|
+
})), t["s-sr"] && b.map((a) => {
|
|
409
|
+
ee(a.$nodeToRelocate$, t["s-sn"]) && (l = b.find((c) => c.$nodeToRelocate$ === t), l && !a.$slotRefNode$ && (a.$slotRefNode$ = l.$slotRefNode$));
|
|
509
410
|
});
|
|
510
|
-
} else
|
|
411
|
+
} else b.some((l) => l.$nodeToRelocate$ === t) || b.push({
|
|
511
412
|
$nodeToRelocate$: t
|
|
512
413
|
});
|
|
513
414
|
}
|
|
514
|
-
o.nodeType === 1 &&
|
|
415
|
+
o.nodeType === 1 && ue(o);
|
|
515
416
|
}
|
|
516
|
-
},
|
|
517
|
-
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(
|
|
518
|
-
},
|
|
417
|
+
}, ee = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", $e = (e) => {
|
|
418
|
+
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map($e);
|
|
419
|
+
}, T = (e, t, s) => {
|
|
519
420
|
const r = e == null ? void 0 : e.insertBefore(t, s);
|
|
520
|
-
return
|
|
521
|
-
},
|
|
421
|
+
return G(t, e), r;
|
|
422
|
+
}, de = (e) => {
|
|
522
423
|
const t = [];
|
|
523
424
|
return e && t.push(
|
|
524
425
|
...e["s-scs"] || [],
|
|
525
426
|
e["s-si"],
|
|
526
427
|
e["s-sc"],
|
|
527
|
-
...
|
|
428
|
+
...de(e.parentElement)
|
|
528
429
|
), t;
|
|
529
|
-
},
|
|
430
|
+
}, G = (e, t, s = !1) => {
|
|
530
431
|
var r;
|
|
531
432
|
if (e && t && e.nodeType === 1) {
|
|
532
|
-
const o = new Set(
|
|
433
|
+
const o = new Set(de(t).filter(Boolean));
|
|
533
434
|
if (o.size && ((r = e.classList) == null || r.add(...e["s-scs"] = [...o]), e["s-ol"] || s))
|
|
534
|
-
for (const
|
|
535
|
-
|
|
435
|
+
for (const n of Array.from(e.childNodes))
|
|
436
|
+
G(n, e, !0);
|
|
536
437
|
}
|
|
537
|
-
},
|
|
538
|
-
var r, o,
|
|
539
|
-
const
|
|
540
|
-
if (
|
|
541
|
-
([$,
|
|
542
|
-
)), s &&
|
|
543
|
-
for (const $ of Object.keys(
|
|
544
|
-
|
|
545
|
-
|
|
438
|
+
}, Fe = (e, t, s = !1) => {
|
|
439
|
+
var r, o, n, l, a;
|
|
440
|
+
const c = e.$hostElement$, d = e.$cmpMeta$, f = e.$vnode$ || W(null, null), i = Oe(t) ? t : je(null, null, t);
|
|
441
|
+
if (j = c.tagName, d.$attrsToReflect$ && (i.$attrs$ = i.$attrs$ || {}, d.$attrsToReflect$.map(
|
|
442
|
+
([$, u]) => i.$attrs$[u] = c[$]
|
|
443
|
+
)), s && i.$attrs$)
|
|
444
|
+
for (const $ of Object.keys(i.$attrs$))
|
|
445
|
+
c.hasAttribute($) && !["key", "ref", "style", "class"].includes($) && (i.$attrs$[$] = c[$]);
|
|
446
|
+
i.$tag$ = null, i.$flags$ |= 4, e.$vnode$ = i, i.$elm$ = f.$elm$ = c.shadowRoot || c, x = c["s-sc"], N = (d.$flags$ & 1) !== 0, H = c["s-cr"], F = !1, A(f, i, s);
|
|
546
447
|
{
|
|
547
|
-
if (
|
|
548
|
-
|
|
549
|
-
for (const $ of
|
|
550
|
-
const
|
|
551
|
-
if (!
|
|
552
|
-
const p =
|
|
553
|
-
p["s-nr"] =
|
|
448
|
+
if (L.$flags$ |= 1, z) {
|
|
449
|
+
ue(i.$elm$);
|
|
450
|
+
for (const $ of b) {
|
|
451
|
+
const u = $.$nodeToRelocate$;
|
|
452
|
+
if (!u["s-ol"]) {
|
|
453
|
+
const p = _.createTextNode("");
|
|
454
|
+
p["s-nr"] = u, T(u.parentNode, u["s-ol"] = p, u);
|
|
554
455
|
}
|
|
555
456
|
}
|
|
556
|
-
for (const $ of
|
|
557
|
-
const
|
|
457
|
+
for (const $ of b) {
|
|
458
|
+
const u = $.$nodeToRelocate$, p = $.$slotRefNode$;
|
|
558
459
|
if (p) {
|
|
559
|
-
const
|
|
460
|
+
const m = p.parentNode;
|
|
560
461
|
let y = p.nextSibling;
|
|
561
462
|
{
|
|
562
|
-
let
|
|
563
|
-
for (;
|
|
564
|
-
let
|
|
565
|
-
if (
|
|
566
|
-
for (
|
|
567
|
-
|
|
568
|
-
if (!
|
|
569
|
-
y =
|
|
463
|
+
let O = (r = u["s-ol"]) == null ? void 0 : r.previousSibling;
|
|
464
|
+
for (; O; ) {
|
|
465
|
+
let v = (o = O["s-nr"]) != null ? o : null;
|
|
466
|
+
if (v && v["s-sn"] === u["s-sn"] && m === v.parentNode) {
|
|
467
|
+
for (v = v.nextSibling; v === u || v != null && v["s-sr"]; )
|
|
468
|
+
v = v == null ? void 0 : v.nextSibling;
|
|
469
|
+
if (!v || !v["s-nr"]) {
|
|
470
|
+
y = v;
|
|
570
471
|
break;
|
|
571
472
|
}
|
|
572
473
|
}
|
|
573
|
-
|
|
474
|
+
O = O.previousSibling;
|
|
574
475
|
}
|
|
575
476
|
}
|
|
576
|
-
(!y &&
|
|
477
|
+
(!y && m !== u.parentNode || u.nextSibling !== y) && u !== y && (!u["s-hn"] && u["s-ol"] && (u["s-hn"] = u["s-ol"].parentNode.nodeName), T(m, u, y), u.nodeType === 1 && (u.hidden = (n = u["s-ih"]) != null ? n : !1)), u && typeof p["s-rf"] == "function" && p["s-rf"](u);
|
|
577
478
|
} else
|
|
578
|
-
|
|
479
|
+
u.nodeType === 1 && (s && (u["s-ih"] = (l = u.hidden) != null ? l : !1), u.hidden = !0);
|
|
579
480
|
}
|
|
580
481
|
}
|
|
581
|
-
|
|
482
|
+
F && fe(i.$elm$), L.$flags$ &= -2, b.length = 0;
|
|
582
483
|
}
|
|
583
|
-
if (
|
|
584
|
-
for (const $ of
|
|
585
|
-
$["s-hn"] !==
|
|
586
|
-
|
|
484
|
+
if (E.experimentalScopedSlotChanges && d.$flags$ & 2)
|
|
485
|
+
for (const $ of i.$elm$.childNodes)
|
|
486
|
+
$["s-hn"] !== j && !$["s-sh"] && (s && $["s-ih"] == null && ($["s-ih"] = (a = $.hidden) != null ? a : !1), $.hidden = !0);
|
|
487
|
+
H = void 0;
|
|
587
488
|
};
|
|
588
|
-
const
|
|
489
|
+
const Ce = (e, t, s) => {
|
|
589
490
|
[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);
|
|
590
|
-
},
|
|
491
|
+
}, pe = (e, t, s, r, o) => {
|
|
591
492
|
if (t && typeof t == "string") {
|
|
592
|
-
const
|
|
593
|
-
Object.keys(s || {}).forEach((
|
|
594
|
-
|
|
595
|
-
}), r == null || r.forEach((
|
|
596
|
-
|
|
597
|
-
}), s != null && s.innerHTML && (
|
|
493
|
+
const n = document.createElement(t);
|
|
494
|
+
Object.keys(s || {}).forEach((l) => {
|
|
495
|
+
Ce(n, l, s[l]);
|
|
496
|
+
}), r == null || r.forEach((l) => {
|
|
497
|
+
pe(n, l.$tag$, l.$attrs$, l.$children$, l.$text$);
|
|
498
|
+
}), s != null && s.innerHTML && (n.innerHTML = s.innerHTML), e.appendChild(n);
|
|
598
499
|
}
|
|
599
500
|
o && (e.innerHTML = o);
|
|
600
|
-
},
|
|
501
|
+
}, Ve = (e, t) => {
|
|
601
502
|
const s = {};
|
|
602
503
|
if (typeof e != "object")
|
|
603
504
|
throw new Error("filterArgs - args isn't an object.");
|
|
604
505
|
for (const r in e)
|
|
605
506
|
if (!r.startsWith("slot")) {
|
|
606
|
-
const o = e[r],
|
|
607
|
-
(!t || !Object.keys(t).includes(r) || t[r] !== o) && (s[
|
|
507
|
+
const o = e[r], n = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
508
|
+
(!t || !Object.keys(t).includes(r) || t[r] !== o) && (s[n] = o);
|
|
608
509
|
}
|
|
609
510
|
return s;
|
|
610
|
-
},
|
|
511
|
+
}, et = (e, t) => {
|
|
611
512
|
var r, o;
|
|
612
513
|
const s = document.getElementById("storybook-root");
|
|
613
|
-
if (s)
|
|
614
|
-
return (o = document.querySelector("[lang]")) == null || o.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"),
|
|
514
|
+
if (s !== null)
|
|
515
|
+
return (o = document.querySelector("[lang]")) == null || o.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), Fe(
|
|
615
516
|
{
|
|
616
517
|
$ancestorComponent$: void 0,
|
|
617
518
|
$flags$: 0,
|
|
@@ -624,29 +525,291 @@ const Fe = (e, t, s) => {
|
|
|
624
525
|
},
|
|
625
526
|
e(t)
|
|
626
527
|
), s.children[s.children.length - 1];
|
|
627
|
-
},
|
|
528
|
+
}, tt = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
|
|
628
529
|
const o = document.createElement("div");
|
|
629
|
-
return
|
|
630
|
-
},
|
|
530
|
+
return pe(o, e, t, s, r), o.innerHTML;
|
|
531
|
+
}, D = (e, t) => {
|
|
532
|
+
if (!t)
|
|
533
|
+
return;
|
|
534
|
+
const s = t.split("/");
|
|
535
|
+
return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
|
|
536
|
+
};
|
|
537
|
+
var S, w;
|
|
538
|
+
class st {
|
|
539
|
+
constructor(t) {
|
|
540
|
+
/**
|
|
541
|
+
* JsonDocs
|
|
542
|
+
*/
|
|
543
|
+
g(this, "jsonDoc");
|
|
544
|
+
/**
|
|
545
|
+
* Get component data from the jsonDoc
|
|
546
|
+
* @param tagName - tag name we want to get the data from
|
|
547
|
+
* @returns component data
|
|
548
|
+
*/
|
|
549
|
+
P(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));
|
|
550
|
+
/**
|
|
551
|
+
* Get the control for the given prop
|
|
552
|
+
* Based on https://storybook.js.org/docs/api/arg-types#controltype
|
|
553
|
+
* @param prop - prop to get control for
|
|
554
|
+
* @returns control type and options if applicable
|
|
555
|
+
*/
|
|
556
|
+
P(this, w, (t) => {
|
|
557
|
+
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, "|"));
|
|
558
|
+
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" } };
|
|
559
|
+
});
|
|
560
|
+
/**
|
|
561
|
+
* Extract component arg types from the component data
|
|
562
|
+
* @param tagName - tag name we want to extract the arg types from
|
|
563
|
+
* @returns component arg types
|
|
564
|
+
*/
|
|
565
|
+
g(this, "extractArgTypes", (t) => {
|
|
566
|
+
const s = k(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((f, i) => {
|
|
567
|
+
const { control: $, options: u } = k(this, w).call(this, i);
|
|
568
|
+
return {
|
|
569
|
+
...f,
|
|
570
|
+
[i.name]: {
|
|
571
|
+
name: i.attr || i.name,
|
|
572
|
+
description: i.docs,
|
|
573
|
+
type: { required: i.required },
|
|
574
|
+
table: {
|
|
575
|
+
category: "props",
|
|
576
|
+
type: { summary: i.type },
|
|
577
|
+
defaultValue: { summary: i.default }
|
|
578
|
+
},
|
|
579
|
+
control: $,
|
|
580
|
+
options: u
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
}, {}), o = s == null ? void 0 : s.events.reduce(
|
|
584
|
+
(f, i) => ({
|
|
585
|
+
...f,
|
|
586
|
+
[i.event]: {
|
|
587
|
+
name: i.event,
|
|
588
|
+
description: i.docs,
|
|
589
|
+
table: {
|
|
590
|
+
category: "events",
|
|
591
|
+
type: { summary: i.detail }
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}),
|
|
595
|
+
{}
|
|
596
|
+
), n = s == null ? void 0 : s.methods.reduce(
|
|
597
|
+
(f, i) => ({
|
|
598
|
+
...f,
|
|
599
|
+
[i.name]: {
|
|
600
|
+
name: i.name,
|
|
601
|
+
description: i.docs,
|
|
602
|
+
table: {
|
|
603
|
+
category: "methods",
|
|
604
|
+
type: { summary: i.signature }
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}),
|
|
608
|
+
{}
|
|
609
|
+
), l = s == null ? void 0 : s.slots.reduce(
|
|
610
|
+
(f, i) => ({
|
|
611
|
+
...f,
|
|
612
|
+
[i.name]: {
|
|
613
|
+
name: i.name !== "" ? i.name : "default",
|
|
614
|
+
// default slot are unnamed
|
|
615
|
+
description: i.docs,
|
|
616
|
+
table: {
|
|
617
|
+
category: "slots",
|
|
618
|
+
type: { summary: void 0 }
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}),
|
|
622
|
+
{}
|
|
623
|
+
), a = s == null ? void 0 : s.styles.reduce(
|
|
624
|
+
(f, i) => ({
|
|
625
|
+
...f,
|
|
626
|
+
[i.name]: {
|
|
627
|
+
name: i.name,
|
|
628
|
+
description: i.docs,
|
|
629
|
+
table: {
|
|
630
|
+
category: "custom properties",
|
|
631
|
+
type: { summary: void 0 }
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}),
|
|
635
|
+
{}
|
|
636
|
+
), c = s == null ? void 0 : s.dependencies.reduce((f, i) => {
|
|
637
|
+
const $ = k(this, S).call(this, i);
|
|
638
|
+
return {
|
|
639
|
+
...f,
|
|
640
|
+
[i]: {
|
|
641
|
+
name: i,
|
|
642
|
+
description: `<a href="./?path=/docs/${D("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
|
|
643
|
+
table: {
|
|
644
|
+
category: "depends on",
|
|
645
|
+
type: { summary: void 0 }
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
}, {}), d = s == null ? void 0 : s.dependents.reduce((f, i) => {
|
|
650
|
+
const $ = k(this, S).call(this, i);
|
|
651
|
+
return {
|
|
652
|
+
...f,
|
|
653
|
+
[i]: {
|
|
654
|
+
name: i,
|
|
655
|
+
description: `<a href="./?path=/docs/${D("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
|
|
656
|
+
table: {
|
|
657
|
+
category: "used by",
|
|
658
|
+
type: { summary: void 0 }
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
};
|
|
662
|
+
}, {});
|
|
663
|
+
return {
|
|
664
|
+
...r,
|
|
665
|
+
...o,
|
|
666
|
+
...n,
|
|
667
|
+
...l,
|
|
668
|
+
...a,
|
|
669
|
+
...c,
|
|
670
|
+
...d
|
|
671
|
+
};
|
|
672
|
+
});
|
|
673
|
+
/**
|
|
674
|
+
* Extract component description from the component data
|
|
675
|
+
* @param tagName - tag name we want to extract the description from
|
|
676
|
+
* @returns component description
|
|
677
|
+
*/
|
|
678
|
+
g(this, "extractComponentDescription", (t) => {
|
|
679
|
+
const s = k(this, S).call(this, t);
|
|
680
|
+
return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);
|
|
681
|
+
});
|
|
682
|
+
this.jsonDoc = t;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
S = new WeakMap(), w = new WeakMap();
|
|
686
|
+
const De = (e, t) => {
|
|
687
|
+
if (t)
|
|
688
|
+
return `${e}${t}`;
|
|
689
|
+
}, ge = (e) => {
|
|
690
|
+
let t = e.overview ? `${e.overview}
|
|
691
|
+
|
|
692
|
+
` : "";
|
|
693
|
+
const s = e.props.filter(({ attr: o }) => o !== void 0);
|
|
694
|
+
s.length && (t += `Attributes:
|
|
695
|
+
`, t += s.map(({ attr: o, docs: n }) => `- \`${o}\`: ${n}
|
|
696
|
+
`).join(""), t += `
|
|
697
|
+
`);
|
|
698
|
+
const r = e.props.filter(({ attr: o }) => o === void 0);
|
|
699
|
+
return r.length && (t += `Properties:
|
|
700
|
+
`, t += r.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
|
|
701
|
+
`).join(""), t += `
|
|
702
|
+
`), e.methods.length && (t += `Methods:
|
|
703
|
+
`, t += e.methods.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
|
|
704
|
+
`).join(""), t += `
|
|
705
|
+
`), e.events.length && (t += `Events:
|
|
706
|
+
`, t += e.events.map(({ event: o, docs: n }) => `- \`${o}\`: ${n}
|
|
707
|
+
`).join(""), t += `
|
|
708
|
+
`), e.listeners.length && (t += `Listeners:
|
|
709
|
+
`, t += e.listeners.map(({ event: o }) => `- \`${o}\`
|
|
710
|
+
`).join(""), t += `
|
|
711
|
+
`), e.slots.length && (t += `Slots:
|
|
712
|
+
`, t += e.slots.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
|
|
713
|
+
`).join(""), t += `
|
|
714
|
+
`), t;
|
|
715
|
+
}, B = (e) => `${e.docs}
|
|
716
|
+
|
|
717
|
+
Type: \`${e.type}\``, rt = (e, t, s, r) => ({
|
|
718
|
+
$schema: "https://json.schemastore.org/web-types",
|
|
719
|
+
name: e,
|
|
720
|
+
version: t,
|
|
721
|
+
"description-markup": "markdown",
|
|
722
|
+
contributions: {
|
|
723
|
+
html: {
|
|
724
|
+
elements: s.components.map((o) => {
|
|
725
|
+
const n = D(r, o.filePath);
|
|
726
|
+
return {
|
|
727
|
+
name: o.tag,
|
|
728
|
+
description: ge(o),
|
|
729
|
+
"doc-url": n,
|
|
730
|
+
attributes: o.props.filter((l) => l.attr).map((l) => ({
|
|
731
|
+
name: l.attr,
|
|
732
|
+
description: B(l),
|
|
733
|
+
"doc-url": n,
|
|
734
|
+
value: {
|
|
735
|
+
type: l.type,
|
|
736
|
+
default: l.default,
|
|
737
|
+
required: l.required
|
|
738
|
+
}
|
|
739
|
+
})),
|
|
740
|
+
js: {
|
|
741
|
+
properties: o.props.map((l) => ({
|
|
742
|
+
name: l.name,
|
|
743
|
+
description: B(l),
|
|
744
|
+
"doc-url": n,
|
|
745
|
+
value: {
|
|
746
|
+
type: l.type,
|
|
747
|
+
default: l.default,
|
|
748
|
+
required: l.required
|
|
749
|
+
}
|
|
750
|
+
})),
|
|
751
|
+
events: o.events.map((l) => ({
|
|
752
|
+
name: l.event,
|
|
753
|
+
description: l.docs
|
|
754
|
+
}))
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
})
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}), we = (e, t, s) => [
|
|
761
|
+
{ name: "Storybook", url: D(e, s) },
|
|
762
|
+
{ name: "Sources", url: De(t, s) }
|
|
763
|
+
], Pe = (e) => {
|
|
764
|
+
if (!e.values.some(({ value: t }) => t === void 0))
|
|
765
|
+
return e.values.map(({ value: t }) => ({ name: t }));
|
|
766
|
+
}, ot = (e, t, s, r) => ({
|
|
767
|
+
version: e,
|
|
768
|
+
tags: t.components.map((o) => {
|
|
769
|
+
const n = we(s, r, o.filePath);
|
|
770
|
+
return {
|
|
771
|
+
name: o.tag,
|
|
772
|
+
description: ge(o),
|
|
773
|
+
attributes: o.props.map((l) => ({
|
|
774
|
+
name: l.attr || l.name,
|
|
775
|
+
description: B(l),
|
|
776
|
+
values: Pe(l),
|
|
777
|
+
references: n
|
|
778
|
+
})),
|
|
779
|
+
references: n
|
|
780
|
+
};
|
|
781
|
+
}),
|
|
782
|
+
globalAttributes: [],
|
|
783
|
+
valueSets: []
|
|
784
|
+
}), nt = (e) => {
|
|
785
|
+
const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
|
|
786
|
+
return He([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);
|
|
787
|
+
}, lt = (e) => e.toISOString().split("T")[0], Ue = (e, t, s) => {
|
|
788
|
+
const r = e.closest("[lang]"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), n = o.length > 0 && typeof o[0] == "string" ? o[0] : navigator.language || s, l = n.split("-").shift();
|
|
789
|
+
return {
|
|
790
|
+
locale: n,
|
|
791
|
+
messages: t[l] || t[s]
|
|
792
|
+
};
|
|
793
|
+
}, it = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), at = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), We = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, He = (e, t, s) => typeof e != "string" || e === "" || !We.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ct = (e, t) => (s) => Ue(s, e, t), ft = ({ disconnect: e, observe: t, takeRecords: s }) => {
|
|
631
794
|
class r {
|
|
632
|
-
constructor(
|
|
795
|
+
constructor(n) {
|
|
633
796
|
/**
|
|
634
797
|
*
|
|
635
798
|
*/
|
|
636
|
-
|
|
799
|
+
g(this, "disconnect", e);
|
|
637
800
|
/**
|
|
638
801
|
*
|
|
639
802
|
*/
|
|
640
|
-
|
|
803
|
+
g(this, "observe", t);
|
|
641
804
|
/**
|
|
642
805
|
*
|
|
643
806
|
*/
|
|
644
|
-
|
|
807
|
+
g(this, "takeRecords", s);
|
|
645
808
|
/**
|
|
646
809
|
*
|
|
647
810
|
*/
|
|
648
|
-
|
|
649
|
-
this.cb =
|
|
811
|
+
g(this, "cb");
|
|
812
|
+
this.cb = n;
|
|
650
813
|
}
|
|
651
814
|
}
|
|
652
815
|
return [window, global].forEach((o) => {
|
|
@@ -656,25 +819,25 @@ const Fe = (e, t, s) => {
|
|
|
656
819
|
value: r
|
|
657
820
|
});
|
|
658
821
|
}), r;
|
|
659
|
-
},
|
|
822
|
+
}, ut = ({ disconnect: e, observe: t }) => {
|
|
660
823
|
class s {
|
|
661
824
|
constructor(o) {
|
|
662
825
|
/**
|
|
663
826
|
*
|
|
664
827
|
*/
|
|
665
|
-
|
|
828
|
+
g(this, "disconnect", e);
|
|
666
829
|
/**
|
|
667
830
|
*
|
|
668
831
|
*/
|
|
669
|
-
|
|
832
|
+
g(this, "observe", t);
|
|
670
833
|
/**
|
|
671
834
|
*
|
|
672
835
|
*/
|
|
673
|
-
|
|
836
|
+
g(this, "unobserve");
|
|
674
837
|
/**
|
|
675
838
|
*
|
|
676
839
|
*/
|
|
677
|
-
|
|
840
|
+
g(this, "cb");
|
|
678
841
|
this.cb = o;
|
|
679
842
|
}
|
|
680
843
|
}
|
|
@@ -686,18 +849,18 @@ const Fe = (e, t, s) => {
|
|
|
686
849
|
});
|
|
687
850
|
}), s;
|
|
688
851
|
};
|
|
689
|
-
class
|
|
852
|
+
class Be extends Event {
|
|
690
853
|
constructor() {
|
|
691
854
|
super(...arguments);
|
|
692
855
|
/**
|
|
693
856
|
*
|
|
694
857
|
*/
|
|
695
858
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
696
|
-
|
|
859
|
+
g(this, "detail");
|
|
697
860
|
}
|
|
698
861
|
}
|
|
699
|
-
const
|
|
700
|
-
class e extends
|
|
862
|
+
const $t = () => {
|
|
863
|
+
class e extends Be {
|
|
701
864
|
}
|
|
702
865
|
return [window, global].forEach((t) => {
|
|
703
866
|
Object.defineProperty(t, "SubmitEvent", {
|
|
@@ -708,30 +871,32 @@ const lt = () => {
|
|
|
708
871
|
}), e;
|
|
709
872
|
};
|
|
710
873
|
export {
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
874
|
+
Ie as ClassList,
|
|
875
|
+
st as StorybookPreview,
|
|
876
|
+
Ge as allItemsAreString,
|
|
877
|
+
Je as cleanString,
|
|
878
|
+
ze as createID,
|
|
879
|
+
We as dateRegExp,
|
|
880
|
+
lt as dateToString,
|
|
881
|
+
ct as defineLocales,
|
|
882
|
+
Ve as filterArgs,
|
|
883
|
+
Ke as focusableElements,
|
|
884
|
+
nt as getLocaleDatePattern,
|
|
885
|
+
te as getParentWindows,
|
|
886
|
+
tt as getStoryHTML,
|
|
887
|
+
D as getStorybookUrl,
|
|
888
|
+
Qe as getWindows,
|
|
889
|
+
Xe as isTagName,
|
|
890
|
+
Ze as isValidString,
|
|
891
|
+
it as localeCurrency,
|
|
892
|
+
He as localeDate,
|
|
893
|
+
at as localeNumber,
|
|
894
|
+
Ye as nextTick,
|
|
895
|
+
ft as setupMutationObserverMock,
|
|
896
|
+
ut as setupResizeObserverMock,
|
|
897
|
+
$t as setupSubmitEventMock,
|
|
898
|
+
et as stencilWrapper,
|
|
899
|
+
ot as vsCodeGenerator,
|
|
900
|
+
rt as webTypesGenerator
|
|
736
901
|
};
|
|
737
902
|
//# sourceMappingURL=index.es.js.map
|