@webority/ui-react 0.9.0 → 0.9.1
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/{iconCatalogFull.g-ofRXGqrB.js → iconCatalogFull.g-DHZusHbO.js} +0 -12
- package/dist/{iconVariants.g-3DZ_Lh8k.js → iconVariants.g-BL1d2HPV.js} +10 -0
- package/dist/types/components/AppToast.d.ts +3 -1
- package/dist/types/components/iconCatalogFull.g.d.ts +0 -12
- package/dist/types/components/iconGlyphs.g.d.ts +2 -0
- package/dist/types/components/iconVariants.g.d.ts +10 -0
- package/dist/types/components/warnInvalidValue.d.ts +18 -0
- package/dist/ui-react.js +735 -713
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -88,9 +88,11 @@ var D = /* @__PURE__ */ "aave.activity.add.add-circle.add-square.additem.airdrop
|
|
|
88
88
|
"log-out": "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-miterlimit=\"10\" stroke-width=\"1.5\" d=\"M17.44 14.62L20 12.06 17.44 9.5M9.76 12.06h10.17M11.76 20c-4.42 0-8-3-8-8s3.58-8 8-8\"></path>",
|
|
89
89
|
mail: "<path d=\"M17 20.5H7c-3 0-5-1.5-5-5v-7c0-3.5 2-5 5-5h10c3 0 5 1.5 5 5v7c0 3.5-2 5-5 5Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"m17 9-3.13 2.5c-1.03.82-2.72.82-3.75 0L7 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
90
90
|
"map-pin": "<path d=\"M12 13.43a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24Z\" stroke=\"currentColor\" stroke-width=\"1.5\"></path><path d=\"M3.62 8.49c1.97-8.66 14.8-8.65 16.76.01 1.15 5.08-2.01 9.38-4.78 12.04a5.193 5.193 0 0 1-7.21 0c-2.76-2.66-5.92-6.97-4.77-12.05Z\" stroke=\"currentColor\" stroke-width=\"1.5\"></path>",
|
|
91
|
+
"maximize-4": "<path d=\"M21 9V3h-6M3 15v6h6M21 3l-7.5 7.5M10.5 13.5 3 21\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
91
92
|
menu: "<path d=\"M3 7h18M3 12h18M3 17h18\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>",
|
|
92
93
|
"message-square": "<path d=\"M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M15.996 11h.01M11.995 11h.01M7.995 11h.008\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
93
94
|
minus: "<path d=\"M6 12h12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
95
|
+
mobile: "<path d=\"M17 6v10c0 4-1 5-5 5H6c-4 0-5-1-5-5V6c0-4 1-5 5-5h6c4 0 5 1 5 5ZM11 4.5H7\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M9 18.1A1.55 1.55 0 1 0 9 15a1.55 1.55 0 0 0 0 3.1Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
94
96
|
moon: "<path d=\"M2.03 12.42c.36 5.15 4.73 9.34 9.96 9.57 3.69.16 6.99-1.56 8.97-4.27.82-1.11.38-1.85-.99-1.6-.67.12-1.36.17-2.08.14C13 16.06 9 11.97 8.98 7.14c-.01-1.3.26-2.53.75-3.65.54-1.24-.11-1.83-1.36-1.3C4.41 3.86 1.7 7.85 2.03 12.42Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
95
97
|
"more-horizontal": "<path d=\"M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z\" stroke=\"currentColor\" stroke-width=\"1.5\"></path>",
|
|
96
98
|
palette: "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M10 4.5V18c0 1.08-.44 2.07-1.14 2.79l-.04.04c-.09.09-.19.18-.28.25-.3.26-.64.46-.99.6-.11.05-.22.09-.33.13-.39.13-.81.19-1.22.19-.27 0-.54-.03-.8-.08-.13-.03-.26-.06-.39-.1-.16-.05-.31-.1-.46-.17 0-.01 0-.01-.01 0-.28-.14-.55-.3-.8-.49l-.01-.01c-.13-.1-.25-.2-.36-.32-.11-.12-.22-.24-.33-.37-.19-.25-.35-.52-.49-.8.01-.01.01-.01 0-.01 0 0 0-.01-.01-.02-.06-.14-.11-.29-.16-.44a5.58 5.58 0 01-.1-.39c-.05-.26-.08-.53-.08-.8V4.5C2 3 3 2 4.5 2h3C9 2 10 3 10 4.5z\"></path><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M22 16.5v3c0 1.5-1 2.5-2.5 2.5H6c.41 0 .83-.06 1.22-.19.11-.04.22-.08.33-.13.35-.14.69-.34.99-.6.09-.07.19-.16.28-.25l.04-.04 6.8-6.79h3.84c1.5 0 2.5 1 2.5 2.5zM4.81 21.82c-.6-.18-1.17-.51-1.64-.99-.48-.47-.81-1.04-.99-1.64a4.02 4.02 0 002.63 2.63z\"></path><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M18.37 11.29L15.66 14l-6.8 6.79C9.56 20.07 10 19.08 10 18V8.34l2.71-2.71c1.06-1.06 2.48-1.06 3.54 0l2.12 2.12c1.06 1.06 1.06 2.48 0 3.54zM6 19a1 1 0 100-2 1 1 0 000 2z\"></path>",
|
|
@@ -164,25 +166,25 @@ function N(e, t) {
|
|
|
164
166
|
//#region src/components/AppIcon.jsx
|
|
165
167
|
var P = null, F = null, I = /* @__PURE__ */ new Set();
|
|
166
168
|
function L() {
|
|
167
|
-
return F ||= import("./iconVariants.g-
|
|
169
|
+
return F ||= import("./iconVariants.g-BL1d2HPV.js").then((e) => {
|
|
168
170
|
P = e.VARIANT_GLYPHS;
|
|
169
171
|
for (let e of I) e();
|
|
170
172
|
I.clear();
|
|
171
173
|
}), F;
|
|
172
174
|
}
|
|
173
|
-
var R = new Set(D), z = null, ee = null,
|
|
174
|
-
function
|
|
175
|
-
return
|
|
175
|
+
var R = new Set(D), z = null, ee = null, te = null, B = /* @__PURE__ */ new Set();
|
|
176
|
+
function ne() {
|
|
177
|
+
return te ||= import("./iconCatalogFull.g-DHZusHbO.js").then((e) => {
|
|
176
178
|
z = e.FULL_GLYPHS, ee = e.FULL_VARIANT_GLYPHS;
|
|
177
|
-
for (let e of
|
|
178
|
-
|
|
179
|
-
}),
|
|
179
|
+
for (let e of B) e();
|
|
180
|
+
B.clear();
|
|
181
|
+
}), te;
|
|
180
182
|
}
|
|
181
|
-
var
|
|
182
|
-
function
|
|
183
|
-
for (let [t, n] of Object.entries(e))
|
|
183
|
+
var re = D, ie = /* @__PURE__ */ new Map();
|
|
184
|
+
function ae(e) {
|
|
185
|
+
for (let [t, n] of Object.entries(e)) ie.set(t, n);
|
|
184
186
|
}
|
|
185
|
-
function
|
|
187
|
+
function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color: a, style: s, ...c }) {
|
|
186
188
|
N("AppIcon", c);
|
|
187
189
|
let l = !!n && n !== "linear", u = r != null && r !== "", f = (e) => u ? /* @__PURE__ */ p("span", {
|
|
188
190
|
className: "wui-icon-tip",
|
|
@@ -193,15 +195,15 @@ function H({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
193
195
|
}) : e, h = O[e] !== void 0, g = !h && R.has(e), [, _] = d(0);
|
|
194
196
|
o(() => {
|
|
195
197
|
let e = () => _((e) => e + 1);
|
|
196
|
-
return l && h && !P && (I.add(e), L()), g && !z && (
|
|
197
|
-
I.delete(e),
|
|
198
|
+
return l && h && !P && (I.add(e), L()), g && !z && (B.add(e), ne()), () => {
|
|
199
|
+
I.delete(e), B.delete(e);
|
|
198
200
|
};
|
|
199
201
|
}, [
|
|
200
202
|
l,
|
|
201
203
|
h,
|
|
202
204
|
g
|
|
203
205
|
]);
|
|
204
|
-
let v =
|
|
206
|
+
let v = ie.get(e);
|
|
205
207
|
if (v) return f(v({
|
|
206
208
|
size: t,
|
|
207
209
|
color: a,
|
|
@@ -251,7 +253,7 @@ function H({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
251
253
|
}
|
|
252
254
|
//#endregion
|
|
253
255
|
//#region src/components/AppAccordion.jsx
|
|
254
|
-
function
|
|
256
|
+
function oe({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i }) {
|
|
255
257
|
N("AppAccordion", i);
|
|
256
258
|
let a = s(), o = n || a, [c, l] = d(() => {
|
|
257
259
|
let n = e.map((e, t) => ({
|
|
@@ -281,7 +283,7 @@ function ae({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i })
|
|
|
281
283
|
onClick: () => f(n),
|
|
282
284
|
children: [e.title, /* @__PURE__ */ p("span", {
|
|
283
285
|
className: "faq-q-icon",
|
|
284
|
-
children: /* @__PURE__ */ p(
|
|
286
|
+
children: /* @__PURE__ */ p(V, {
|
|
285
287
|
name: "chevron-down",
|
|
286
288
|
size: 18
|
|
287
289
|
})
|
|
@@ -303,8 +305,8 @@ function ae({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i })
|
|
|
303
305
|
}
|
|
304
306
|
//#endregion
|
|
305
307
|
//#region src/components/renderIconProp.js
|
|
306
|
-
function
|
|
307
|
-
return e == null || e === !1 ? null : typeof e == "string" ? r(
|
|
308
|
+
function H(e, { size: t = 16, className: n } = {}) {
|
|
309
|
+
return e == null || e === !1 ? null : typeof e == "string" ? r(V, {
|
|
308
310
|
name: e,
|
|
309
311
|
size: t,
|
|
310
312
|
className: n
|
|
@@ -312,7 +314,7 @@ function U(e, { size: t = 16, className: n } = {}) {
|
|
|
312
314
|
}
|
|
313
315
|
//#endregion
|
|
314
316
|
//#region src/components/AppActionIcon.jsx
|
|
315
|
-
function
|
|
317
|
+
function se({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20, onClick: a, className: o = "", as: s, href: c, ...l }) {
|
|
316
318
|
N("AppActionIcon", l);
|
|
317
319
|
let u = [
|
|
318
320
|
"u-action",
|
|
@@ -337,18 +339,18 @@ function oe({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20,
|
|
|
337
339
|
a?.(e);
|
|
338
340
|
},
|
|
339
341
|
...l,
|
|
340
|
-
children:
|
|
342
|
+
children: H(e, { size: i })
|
|
341
343
|
});
|
|
342
344
|
}
|
|
343
345
|
//#endregion
|
|
344
346
|
//#region src/components/AppAlert.jsx
|
|
345
|
-
var
|
|
347
|
+
var ce = {
|
|
346
348
|
info: "info",
|
|
347
349
|
success: "check",
|
|
348
350
|
warning: "alert-triangle",
|
|
349
351
|
danger: "x"
|
|
350
352
|
};
|
|
351
|
-
function
|
|
353
|
+
function le(e, t, n, r) {
|
|
352
354
|
return n ? /* @__PURE__ */ p("span", {
|
|
353
355
|
className: "alert-icon alert-icon-image",
|
|
354
356
|
children: /* @__PURE__ */ p("img", {
|
|
@@ -357,7 +359,7 @@ function ce(e, t, n, r) {
|
|
|
357
359
|
})
|
|
358
360
|
}) : e ? typeof e == "string" ? /* @__PURE__ */ p("span", {
|
|
359
361
|
className: "alert-icon",
|
|
360
|
-
children: /* @__PURE__ */ p(
|
|
362
|
+
children: /* @__PURE__ */ p(V, {
|
|
361
363
|
name: e,
|
|
362
364
|
size: t
|
|
363
365
|
})
|
|
@@ -366,9 +368,9 @@ function ce(e, t, n, r) {
|
|
|
366
368
|
children: e
|
|
367
369
|
}) : null;
|
|
368
370
|
}
|
|
369
|
-
function
|
|
371
|
+
function ue({ variant: e = "info", children: t, title: n, icon: r, image: i, imageAlt: a = "", className: o = "", onClose: s, dismissible: c, bordered: l = !0, role: u = "alert", ...d }) {
|
|
370
372
|
N("AppAlert", d);
|
|
371
|
-
let g = r === void 0 ?
|
|
373
|
+
let g = r === void 0 ? ce[e] : r === "none" ? null : r, _ = !!i || !!g, v = n ? /* @__PURE__ */ p("div", {
|
|
372
374
|
className: "alert-heading",
|
|
373
375
|
children: n
|
|
374
376
|
}) : null, y = _ && !!v && !!t, b = y ? 13 : 11;
|
|
@@ -385,15 +387,31 @@ function le({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
385
387
|
transition: !1,
|
|
386
388
|
role: u,
|
|
387
389
|
...d,
|
|
388
|
-
children: _ ? /* @__PURE__ */ m(f, { children: [
|
|
390
|
+
children: _ ? /* @__PURE__ */ m(f, { children: [le(g, b, i, a), /* @__PURE__ */ m("div", {
|
|
389
391
|
className: "alert-content",
|
|
390
392
|
children: [v, t]
|
|
391
393
|
})] }) : /* @__PURE__ */ m(f, { children: [v, t] })
|
|
392
394
|
});
|
|
393
395
|
}
|
|
394
396
|
//#endregion
|
|
397
|
+
//#region src/components/warnInvalidValue.js
|
|
398
|
+
var de = () => {
|
|
399
|
+
try {
|
|
400
|
+
return process.env.NODE_ENV !== "production";
|
|
401
|
+
} catch {
|
|
402
|
+
return !0;
|
|
403
|
+
}
|
|
404
|
+
}, fe = /* @__PURE__ */ new Set();
|
|
405
|
+
function U(e, t, n, r) {
|
|
406
|
+
if (!de() || n == null) return;
|
|
407
|
+
let i = r instanceof Set ? r : new Set(r);
|
|
408
|
+
if (i.has(n)) return;
|
|
409
|
+
let a = `${e}.${t}.${String(n)}`;
|
|
410
|
+
fe.has(a) || (fe.add(a), console.warn(`[@webority/ui-react] <${e}> received ${t}="${String(n)}", which is not one of ${[...i].map((e) => `"${e}"`).join(" | ")}. The component fell back to its default, so this renders something other than what the call site asks for — check the value against the component catalogue at https://ui-react.webority.dev.`));
|
|
411
|
+
}
|
|
412
|
+
//#endregion
|
|
395
413
|
//#region src/components/AppButton.jsx
|
|
396
|
-
var
|
|
414
|
+
var W = {
|
|
397
415
|
primary: "primary",
|
|
398
416
|
secondary: "secondary",
|
|
399
417
|
outline: "outline-primary",
|
|
@@ -404,25 +422,25 @@ var ue = {
|
|
|
404
422
|
warning: "warning",
|
|
405
423
|
subtle: "subtle",
|
|
406
424
|
"outline-light": "outline-light"
|
|
407
|
-
},
|
|
425
|
+
}, pe = {
|
|
408
426
|
sm: 14,
|
|
409
427
|
md: 16,
|
|
410
428
|
lg: 20
|
|
411
429
|
};
|
|
412
|
-
function
|
|
430
|
+
function me(e, t, n) {
|
|
413
431
|
if (!e) return null;
|
|
414
432
|
let r = t === "left" ? "me-2" : "ms-2";
|
|
415
|
-
return typeof e == "string" ? /* @__PURE__ */ p(
|
|
433
|
+
return typeof e == "string" ? /* @__PURE__ */ p(V, {
|
|
416
434
|
name: e,
|
|
417
|
-
size:
|
|
435
|
+
size: pe[n] ?? pe.md,
|
|
418
436
|
className: r
|
|
419
437
|
}) : /* @__PURE__ */ p("span", {
|
|
420
438
|
className: `d-inline-flex ${r}`,
|
|
421
439
|
children: e
|
|
422
440
|
});
|
|
423
441
|
}
|
|
424
|
-
function
|
|
425
|
-
N("AppButton", d);
|
|
442
|
+
function he({ children: e, variant: t = "primary", size: n = "md", type: r = "button", loading: i = !1, disabled: a = !1, block: o = !1, leftIcon: s = null, rightIcon: c = null, href: l, className: u = "", ...d }) {
|
|
443
|
+
N("AppButton", d), U("AppButton", "variant", t, Object.keys(W)), U("AppButton", "size", n, Object.keys(pe));
|
|
426
444
|
let f = [
|
|
427
445
|
o ? "w-100" : "",
|
|
428
446
|
i ? "is-loading" : "",
|
|
@@ -431,7 +449,7 @@ function W({ children: e, variant: t = "primary", size: n = "md", type: r = "but
|
|
|
431
449
|
return /* @__PURE__ */ m(v, {
|
|
432
450
|
type: (d.as === void 0 || d.as === "button") && l === void 0 ? r : void 0,
|
|
433
451
|
href: l,
|
|
434
|
-
variant:
|
|
452
|
+
variant: W[t] ?? "primary",
|
|
435
453
|
size: n === "md" ? void 0 : n,
|
|
436
454
|
disabled: a || i,
|
|
437
455
|
"aria-busy": i || void 0,
|
|
@@ -442,15 +460,15 @@ function W({ children: e, variant: t = "primary", size: n = "md", type: r = "but
|
|
|
442
460
|
className: "spinner-border spinner-border-sm me-2",
|
|
443
461
|
"aria-hidden": "true"
|
|
444
462
|
}),
|
|
445
|
-
!i &&
|
|
463
|
+
!i && me(s, "left", n),
|
|
446
464
|
e,
|
|
447
|
-
!i &&
|
|
465
|
+
!i && me(c, "right", n)
|
|
448
466
|
]
|
|
449
467
|
});
|
|
450
468
|
}
|
|
451
469
|
//#endregion
|
|
452
470
|
//#region src/components/AppEmptyState.jsx
|
|
453
|
-
function
|
|
471
|
+
function ge({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, action: a, className: o = "", style: s, ...c }) {
|
|
454
472
|
return N("AppEmptyState", c), /* @__PURE__ */ m("div", {
|
|
455
473
|
className: [
|
|
456
474
|
"empty-state",
|
|
@@ -462,7 +480,7 @@ function pe({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
462
480
|
children: [
|
|
463
481
|
e ? /* @__PURE__ */ p("div", {
|
|
464
482
|
className: "empty-state-icon",
|
|
465
|
-
children:
|
|
483
|
+
children: H(e, { size: t })
|
|
466
484
|
}) : null,
|
|
467
485
|
r != null && /* @__PURE__ */ p("div", {
|
|
468
486
|
className: "empty-state-title",
|
|
@@ -481,7 +499,7 @@ function pe({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
481
499
|
}
|
|
482
500
|
//#endregion
|
|
483
501
|
//#region src/components/AppSpinner.jsx
|
|
484
|
-
function
|
|
502
|
+
function _e({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
485
503
|
N("AppSpinner", r);
|
|
486
504
|
let { style: i, ...a } = r, o = Number(e), s = Number.isFinite(o) && o > 0;
|
|
487
505
|
return /* @__PURE__ */ p("span", {
|
|
@@ -499,7 +517,7 @@ function me({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
|
499
517
|
}
|
|
500
518
|
//#endregion
|
|
501
519
|
//#region src/components/AppAsyncBlock.jsx
|
|
502
|
-
function
|
|
520
|
+
function ve({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRetry: i, skeleton: a, className: o = "", ...s }) {
|
|
503
521
|
N("AppAsyncBlock", s);
|
|
504
522
|
let c = `async-block${o ? ` ${o}` : ""}`;
|
|
505
523
|
return e ? /* @__PURE__ */ p("div", {
|
|
@@ -508,17 +526,17 @@ function he({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
508
526
|
...s,
|
|
509
527
|
children: a ?? /* @__PURE__ */ p("div", {
|
|
510
528
|
className: "d-flex align-items-center justify-content-center py-5",
|
|
511
|
-
children: /* @__PURE__ */ p(
|
|
529
|
+
children: /* @__PURE__ */ p(_e, { label: "Loading" })
|
|
512
530
|
})
|
|
513
531
|
}) : t ? /* @__PURE__ */ p("div", {
|
|
514
532
|
className: c,
|
|
515
533
|
"data-state": "error",
|
|
516
534
|
...s,
|
|
517
|
-
children: /* @__PURE__ */ p(
|
|
535
|
+
children: /* @__PURE__ */ p(ge, {
|
|
518
536
|
icon: "alert-circle",
|
|
519
537
|
title: "Something went wrong",
|
|
520
538
|
text: t,
|
|
521
|
-
action: i ? /* @__PURE__ */ p(
|
|
539
|
+
action: i ? /* @__PURE__ */ p(he, {
|
|
522
540
|
variant: "secondary",
|
|
523
541
|
onClick: i,
|
|
524
542
|
children: "Retry"
|
|
@@ -528,7 +546,7 @@ function he({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
528
546
|
className: c,
|
|
529
547
|
"data-state": "empty",
|
|
530
548
|
...s,
|
|
531
|
-
children: /* @__PURE__ */ p(
|
|
549
|
+
children: /* @__PURE__ */ p(ge, {
|
|
532
550
|
icon: "inbox",
|
|
533
551
|
title: "Nothing to show yet"
|
|
534
552
|
})
|
|
@@ -541,15 +559,15 @@ function he({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
541
559
|
}
|
|
542
560
|
//#endregion
|
|
543
561
|
//#region ../elements/dist/ui-elements.js
|
|
544
|
-
var
|
|
562
|
+
var ye = {
|
|
545
563
|
success: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-success-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-success-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_success_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-success-active)\"/>\n<rect x=\"108.758\" y=\"67.5986\" width=\"75.5044\" height=\"49.155\" transform=\"rotate(45 108.758 67.5986)\" fill=\"var(--wui-success)\"/>\n<path d=\"M87.895 96.1046C89.7154 97.9249 89.7154 101.046 87.895 102.866L84.1243 106.637C82.3039 108.457 79.1833 108.457 77.3629 106.637L60.8496 89.9934C59.0293 88.173 59.0293 85.0524 60.8496 83.232L64.6204 79.4613C66.4408 77.6409 69.5614 77.6409 71.3817 79.4613L87.895 96.1046Z\" fill=\"white\"/>\n<path d=\"M102.324 67.3672C104.144 65.5469 107.265 65.5469 109.085 67.3672L112.856 71.138C114.676 72.9583 114.676 76.079 112.856 77.8993L84.2499 106.375C82.4296 108.195 79.3089 108.195 77.4886 106.375L73.7178 102.604C71.8975 100.784 71.8975 97.6633 73.7178 95.8429L102.324 67.3672Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_success_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
546
564
|
error: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>",
|
|
547
565
|
warning: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-warning-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-warning-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_warning_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-warning)\"/>\n<path d=\"M93.7812 60.9731L156.173 123.365L113.082 166.456L60 113.5L97 109L93.7812 60.9731Z\" fill=\"var(--wui-warning-active)\"/>\n<path d=\"M116.145 101.611L96.0431 62.7255C94.8912 60.6967 93.0607 59.1479 90.8656 58.3543C88.6768 57.5543 86.2768 57.5607 84.0945 58.3671C83.0001 58.7767 81.9953 59.3655 81.125 60.1079C80.2545 60.8567 79.5122 61.7527 78.9425 62.7703L57.8933 101.554C56.1525 104.594 56.1717 108.331 57.9317 111.358C59.6981 114.392 62.9427 116.248 66.4435 116.242H107.563C111.051 116.248 114.283 114.398 116.049 111.39C116.952 109.854 117.4 108.133 117.4 106.418C117.4 104.76 116.984 103.102 116.145 101.611ZM87.0064 105.714C85.0672 105.714 83.4929 104.146 83.4929 102.207C83.4929 100.267 85.0672 98.6993 87.0064 98.6993C88.9392 98.6993 90.5136 100.267 90.5136 102.207C90.5136 104.146 88.9392 105.714 87.0064 105.714ZM90.9104 78.098L88.0432 95.3266C88.0049 95.8706 87.5504 96.2994 87.0064 96.2994C86.4561 96.2994 86.0016 95.8706 85.9633 95.3266L83.0961 78.098C83.0385 77.8101 83.0065 77.522 83.0065 77.2405C83.0065 76.3125 83.3137 75.4037 83.8833 74.6485C84.6321 73.6629 85.7713 73.0549 87.0064 72.9717C88.2352 73.0549 89.3744 73.6629 90.1232 74.6485C90.872 75.6341 91.16 76.8885 90.9104 78.098Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_warning_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
548
566
|
info: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-info-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-info-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_info_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-info)\"/>\n<path d=\"M104.999 67.5L111.454 64L163.495 116.041L115.739 163.797L62.999 111L101.897 104.102L104.999 67.5Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M87 121C105.778 121 121 105.778 121 87C121 68.2223 105.778 53 87 53C68.2223 53 53 68.2223 53 87C53 105.778 68.2223 121 87 121Z\" fill=\"white\"/>\n<path d=\"M87 75.542C89.3472 75.542 91.25 73.6392 91.25 71.292C91.25 68.9448 89.3472 67.042 87 67.042C84.6528 67.042 82.75 68.9448 82.75 71.292C82.75 73.6392 84.6528 75.542 87 75.542Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M86.9992 106.992C86.0975 106.992 85.2327 106.634 84.5951 105.996C83.9574 105.359 83.5992 104.494 83.5992 103.592V86.592C82.6975 86.592 81.8327 86.2338 81.1951 85.5962C80.5574 84.9585 80.1992 84.0937 80.1992 83.192C80.1992 82.2903 80.5574 81.4255 81.1951 80.7878C81.8327 80.1502 82.6975 79.792 83.5992 79.792H86.9992C87.901 79.792 88.7658 80.1502 89.4034 80.7878C90.041 81.4255 90.3992 82.2903 90.3992 83.192V103.592C90.3992 104.494 90.041 105.359 89.4034 105.996C88.7658 106.634 87.901 106.992 86.9992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M90.3992 106.992H83.5992C82.6975 106.992 81.8327 106.634 81.1951 105.996C80.5574 105.358 80.1992 104.494 80.1992 103.592C80.1992 102.69 80.5574 101.825 81.1951 101.188C81.8327 100.55 82.6975 100.192 83.5992 100.192H90.3992C91.301 100.192 92.1658 100.55 92.8034 101.188C93.441 101.825 93.7992 102.69 93.7992 103.592C93.7992 104.494 93.441 105.358 92.8034 105.996C92.1658 106.634 91.301 106.992 90.3992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n</g>\n<defs><clipPath id=\"wui_info_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
549
567
|
delete: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_delete_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<path d=\"M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z\" fill=\"var(--wui-danger-active)\"/>\n<path d=\"M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z\" fill=\"var(--wui-danger)\"/>\n<g clip-path=\"url(#wui_delete_clip1)\">\n<path d=\"M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z\" fill=\"white\"/>\n<path d=\"M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_delete_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_delete_clip1\"><rect width=\"65\" height=\"65\" fill=\"white\" transform=\"translate(54.3535 54.502)\"/></clipPath></defs>"
|
|
550
568
|
};
|
|
551
|
-
Object.keys(
|
|
552
|
-
var
|
|
569
|
+
Object.keys(ye);
|
|
570
|
+
var be = class extends HTMLElement {
|
|
553
571
|
static get observedAttributes() {
|
|
554
572
|
return ["tone", "size"];
|
|
555
573
|
}
|
|
@@ -560,36 +578,36 @@ var _e = class extends HTMLElement {
|
|
|
560
578
|
this.isConnected && this.render();
|
|
561
579
|
}
|
|
562
580
|
render() {
|
|
563
|
-
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n =
|
|
581
|
+
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n = ye[e] || ye.info;
|
|
564
582
|
this.innerHTML = `<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;
|
|
565
583
|
}
|
|
566
|
-
},
|
|
567
|
-
function
|
|
584
|
+
}, xe = 4;
|
|
585
|
+
function Se(e, t, n = {}) {
|
|
568
586
|
if (!e || !t) return;
|
|
569
|
-
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i +
|
|
570
|
-
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(
|
|
571
|
-
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s -
|
|
572
|
-
t.style.left = `${Math.max(
|
|
587
|
+
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + xe && r.top > a;
|
|
588
|
+
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(xe, r.top - i - xe)}px` : `${r.bottom + xe}px`, n.matchWidth && (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${window.innerWidth - xe * 2}px`);
|
|
589
|
+
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - xe);
|
|
590
|
+
t.style.left = `${Math.max(xe, c)}px`;
|
|
573
591
|
}
|
|
574
|
-
function
|
|
575
|
-
|
|
592
|
+
function Ce(e, t) {
|
|
593
|
+
we(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
|
|
576
594
|
}
|
|
577
|
-
function
|
|
595
|
+
function we(e) {
|
|
578
596
|
e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
|
|
579
597
|
}
|
|
580
|
-
var
|
|
598
|
+
var Te = "data-wui-mirror";
|
|
581
599
|
function G(e, t) {
|
|
582
|
-
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${
|
|
600
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${Te}]`);
|
|
583
601
|
if (!n) {
|
|
584
602
|
r?.remove();
|
|
585
603
|
return;
|
|
586
604
|
}
|
|
587
|
-
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(
|
|
605
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(Te, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
|
|
588
606
|
for (let t of [...r.attributes]) t.name.startsWith("data-val") && !e.hasAttribute(t.name) && r.removeAttribute(t.name);
|
|
589
607
|
for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
|
|
590
608
|
r.disabled = e.hasAttribute("disabled");
|
|
591
609
|
}
|
|
592
|
-
var
|
|
610
|
+
var Ee = {
|
|
593
611
|
activity: "<path d=\"M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"m7.33 14.49 2.38-3.09c.34-.44.97-.52 1.41-.18l1.83 1.44c.44.34 1.07.26 1.41-.17l2.31-2.98\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
594
612
|
alarm: "<path d=\"M2 22h20M12 6a9 9 0 0 0-9 9v7h18v-7a9 9 0 0 0-9-9ZM12 2v1M4 4l1 1M20 4l-1 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
595
613
|
"alert-circle": "<path d=\"M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M12 16.2v.1\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
@@ -675,9 +693,11 @@ var Ce = {
|
|
|
675
693
|
"log-out": "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-miterlimit=\"10\" stroke-width=\"1.5\" d=\"M17.44 14.62L20 12.06 17.44 9.5M9.76 12.06h10.17M11.76 20c-4.42 0-8-3-8-8s3.58-8 8-8\"></path>",
|
|
676
694
|
mail: "<path d=\"M17 20.5H7c-3 0-5-1.5-5-5v-7c0-3.5 2-5 5-5h10c3 0 5 1.5 5 5v7c0 3.5-2 5-5 5Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"m17 9-3.13 2.5c-1.03.82-2.72.82-3.75 0L7 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
677
695
|
"map-pin": "<path d=\"M12 13.43a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24Z\" stroke=\"currentColor\" stroke-width=\"1.5\"></path><path d=\"M3.62 8.49c1.97-8.66 14.8-8.65 16.76.01 1.15 5.08-2.01 9.38-4.78 12.04a5.193 5.193 0 0 1-7.21 0c-2.76-2.66-5.92-6.97-4.77-12.05Z\" stroke=\"currentColor\" stroke-width=\"1.5\"></path>",
|
|
696
|
+
"maximize-4": "<path d=\"M21 9V3h-6M3 15v6h6M21 3l-7.5 7.5M10.5 13.5 3 21\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
678
697
|
menu: "<path d=\"M3 7h18M3 12h18M3 17h18\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>",
|
|
679
698
|
"message-square": "<path d=\"M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M15.996 11h.01M11.995 11h.01M7.995 11h.008\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
680
699
|
minus: "<path d=\"M6 12h12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
700
|
+
mobile: "<path d=\"M17 6v10c0 4-1 5-5 5H6c-4 0-5-1-5-5V6c0-4 1-5 5-5h6c4 0 5 1 5 5ZM11 4.5H7\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M9 18.1A1.55 1.55 0 1 0 9 15a1.55 1.55 0 0 0 0 3.1Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
681
701
|
moon: "<path d=\"M2.03 12.42c.36 5.15 4.73 9.34 9.96 9.57 3.69.16 6.99-1.56 8.97-4.27.82-1.11.38-1.85-.99-1.6-.67.12-1.36.17-2.08.14C13 16.06 9 11.97 8.98 7.14c-.01-1.3.26-2.53.75-3.65.54-1.24-.11-1.83-1.36-1.3C4.41 3.86 1.7 7.85 2.03 12.42Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
682
702
|
"more-horizontal": "<path d=\"M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z\" stroke=\"currentColor\" stroke-width=\"1.5\"></path>",
|
|
683
703
|
palette: "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M10 4.5V18c0 1.08-.44 2.07-1.14 2.79l-.04.04c-.09.09-.19.18-.28.25-.3.26-.64.46-.99.6-.11.05-.22.09-.33.13-.39.13-.81.19-1.22.19-.27 0-.54-.03-.8-.08-.13-.03-.26-.06-.39-.1-.16-.05-.31-.1-.46-.17 0-.01 0-.01-.01 0-.28-.14-.55-.3-.8-.49l-.01-.01c-.13-.1-.25-.2-.36-.32-.11-.12-.22-.24-.33-.37-.19-.25-.35-.52-.49-.8.01-.01.01-.01 0-.01 0 0 0-.01-.01-.02-.06-.14-.11-.29-.16-.44a5.58 5.58 0 01-.1-.39c-.05-.26-.08-.53-.08-.8V4.5C2 3 3 2 4.5 2h3C9 2 10 3 10 4.5z\"></path><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M22 16.5v3c0 1.5-1 2.5-2.5 2.5H6c.41 0 .83-.06 1.22-.19.11-.04.22-.08.33-.13.35-.14.69-.34.99-.6.09-.07.19-.16.28-.25l.04-.04 6.8-6.79h3.84c1.5 0 2.5 1 2.5 2.5zM4.81 21.82c-.6-.18-1.17-.51-1.64-.99-.48-.47-.81-1.04-.99-1.64a4.02 4.02 0 002.63 2.63z\"></path><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M18.37 11.29L15.66 14l-6.8 6.79C9.56 20.07 10 19.08 10 18V8.34l2.71-2.71c1.06-1.06 2.48-1.06 3.54 0l2.12 2.12c1.06 1.06 1.06 2.48 0 3.54zM6 19a1 1 0 100-2 1 1 0 000 2z\"></path>",
|
|
@@ -730,12 +750,12 @@ var Ce = {
|
|
|
730
750
|
"zoom-in": "<path d=\"M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>",
|
|
731
751
|
"zoom-out": "<path d=\"M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>"
|
|
732
752
|
};
|
|
733
|
-
Object.keys(
|
|
753
|
+
Object.keys(Ee);
|
|
734
754
|
function K(e, { size: t = 16, className: n = "", style: r = "" } = {}) {
|
|
735
|
-
let i =
|
|
755
|
+
let i = Ee[e];
|
|
736
756
|
return i ? `<svg class="${n ? `wui-icon ${n}` : "wui-icon"}" data-icon="${e}" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true" style="vertical-align:-.125em${r ? `;${r}` : ""}">${i}</svg>` : "";
|
|
737
757
|
}
|
|
738
|
-
function
|
|
758
|
+
function De(e) {
|
|
739
759
|
let { getVisibleOptions: t, getActive: n, setActive: r, onEnter: i, onEscape: a, onTypeahead: o, typeaheadMs: s = 500 } = e, c = "", l = null, u = () => {
|
|
740
760
|
clearTimeout(l), l = null, c = "";
|
|
741
761
|
};
|
|
@@ -764,15 +784,15 @@ function we(e) {
|
|
|
764
784
|
teardown: u
|
|
765
785
|
};
|
|
766
786
|
}
|
|
767
|
-
var
|
|
787
|
+
var Oe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), ke = (e) => {
|
|
768
788
|
if (!e) return "";
|
|
769
789
|
let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
770
790
|
return t ? K(t) : "";
|
|
771
|
-
},
|
|
791
|
+
}, Ae = (e) => {
|
|
772
792
|
if (e == null) return "";
|
|
773
|
-
let t = e[
|
|
793
|
+
let t = e[Oe] ? String(e.label ?? "") : q(e.label), n = ke(e.icon);
|
|
774
794
|
return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
|
|
775
|
-
},
|
|
795
|
+
}, je = class extends HTMLElement {
|
|
776
796
|
static formAssociated = !0;
|
|
777
797
|
_accessibleName() {
|
|
778
798
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -824,12 +844,12 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
824
844
|
set value(e) {
|
|
825
845
|
this._value = e == null ? "" : String(e), G(this, this._value);
|
|
826
846
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
827
|
-
this._label = t ?
|
|
847
|
+
this._label = t ? Ne(t.label) : "", this._syncInput(), this._renderOptions("");
|
|
828
848
|
}
|
|
829
849
|
set options(e) {
|
|
830
850
|
this._optionsProp = Array.isArray(e) ? e : [];
|
|
831
851
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
832
|
-
t && (this._label =
|
|
852
|
+
t && (this._label = Ne(t.label)), this._renderOptions(), this._syncInput();
|
|
833
853
|
}
|
|
834
854
|
get options() {
|
|
835
855
|
return this._readOptions();
|
|
@@ -848,7 +868,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
848
868
|
}
|
|
849
869
|
_matchesKnownOption(e) {
|
|
850
870
|
let t = e.toLowerCase();
|
|
851
|
-
return this._readOptions().some((e) =>
|
|
871
|
+
return this._readOptions().some((e) => Ne(e.label).toLowerCase() === t || String(e.value ?? "").toLowerCase() === t);
|
|
852
872
|
}
|
|
853
873
|
get _minChars() {
|
|
854
874
|
return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
|
|
@@ -866,7 +886,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
866
886
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
867
887
|
label: e.innerHTML,
|
|
868
888
|
icon: e.getAttribute("icon") || void 0,
|
|
869
|
-
[
|
|
889
|
+
[Oe]: !0,
|
|
870
890
|
selected: e.hasAttribute("selected")
|
|
871
891
|
})));
|
|
872
892
|
}
|
|
@@ -880,12 +900,12 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
880
900
|
let r = `${this.id}-listbox`;
|
|
881
901
|
this._listboxId = r, this.innerHTML = `
|
|
882
902
|
<div class="search-select${n}">
|
|
883
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
884
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
903
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Me(r)}" aria-label="${Me(this._accessibleName())}">
|
|
904
|
+
<input class="search-select-input search-select-ac-input" placeholder="${Me(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
885
905
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
886
906
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden>${K("x")}</button>
|
|
887
907
|
</div>
|
|
888
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
908
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Me(r)}" tabindex="-1" hidden>
|
|
889
909
|
<div class="search-select-options"></div>
|
|
890
910
|
<div class="search-select-empty" hidden>No matches</div>
|
|
891
911
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
@@ -919,7 +939,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
919
939
|
let t = this._refs();
|
|
920
940
|
if (!t.optionsWrap) return;
|
|
921
941
|
let n = e ?? (t.input ? t.input.value : ""), r = n.trim().toLowerCase(), i = this._readOptions();
|
|
922
|
-
!this._remote && r && (i = i.filter((e) =>
|
|
942
|
+
!this._remote && r && (i = i.filter((e) => Ne(e.label).toLowerCase().includes(r)));
|
|
923
943
|
let a = n.trim(), o = this._allowCustom && a && !this._matchesKnownOption(a) ? [...i, {
|
|
924
944
|
value: a,
|
|
925
945
|
custom: !0
|
|
@@ -928,10 +948,10 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
928
948
|
let n = `${s}-opt-${t}`;
|
|
929
949
|
if (e.custom) {
|
|
930
950
|
let t = `Add “${q(e.value)}”`;
|
|
931
|
-
return `<button type="button" role="option" id="${
|
|
951
|
+
return `<button type="button" role="option" id="${Me(n)}" class="search-select-option search-select-option-custom" data-value="${Me(e.value)}" data-custom="true" aria-selected="false">${t}</button>`;
|
|
932
952
|
}
|
|
933
953
|
let r = String(e.value) === String(this._value);
|
|
934
|
-
return `<button type="button" role="option" id="${
|
|
954
|
+
return `<button type="button" role="option" id="${Me(n)}" class="search-select-option${r ? " selected" : ""}" data-value="${Me(e.value)}" aria-selected="${r}">${Ae(e)}</button>`;
|
|
935
955
|
}).join(""), this._active = -1, t.control?.removeAttribute("aria-activedescendant");
|
|
936
956
|
let c = r.length < this._minChars;
|
|
937
957
|
t.hint && (t.hint.hidden = !(this._remote && c && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && c);
|
|
@@ -940,7 +960,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
940
960
|
this._teardown();
|
|
941
961
|
let e = this._refs();
|
|
942
962
|
if (!e.control || !e.input) return;
|
|
943
|
-
let t = () =>
|
|
963
|
+
let t = () => Se(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (t) => {
|
|
944
964
|
let r = n();
|
|
945
965
|
this._active = t;
|
|
946
966
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -951,7 +971,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
951
971
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "", this._syncInput();
|
|
952
972
|
}, s = (t) => {
|
|
953
973
|
let n = t.dataset.custom === "true";
|
|
954
|
-
this._value = t.dataset.value, this._label = n ? t.dataset.value :
|
|
974
|
+
this._value = t.dataset.value, this._label = n ? t.dataset.value : Ne(t.innerHTML), G(this, this._value), e.input.value = this._label, this.dispatchEvent(new CustomEvent("change", {
|
|
955
975
|
bubbles: !0,
|
|
956
976
|
detail: { isCustom: n }
|
|
957
977
|
})), o(), e.input.focus();
|
|
@@ -974,7 +994,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
974
994
|
}, this._timer = setTimeout(() => this._fireSearch(t, e), this._debounceMs);
|
|
975
995
|
} else this._renderOptions(t);
|
|
976
996
|
};
|
|
977
|
-
this._navHandler =
|
|
997
|
+
this._navHandler = De({
|
|
978
998
|
getVisibleOptions: n,
|
|
979
999
|
getActive: () => this._active,
|
|
980
1000
|
setActive: (e) => r(e),
|
|
@@ -1018,7 +1038,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1018
1038
|
}), this._bindGlobal = () => {
|
|
1019
1039
|
this._teardown(), this._onDocClick = (e) => {
|
|
1020
1040
|
i() && !this.contains(e.target) && o();
|
|
1021
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1041
|
+
}, document.addEventListener("click", this._onDocClick), Ce(this, () => {
|
|
1022
1042
|
i() && t();
|
|
1023
1043
|
});
|
|
1024
1044
|
}, this._bindGlobal();
|
|
@@ -1033,12 +1053,12 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1033
1053
|
}));
|
|
1034
1054
|
}
|
|
1035
1055
|
_teardown() {
|
|
1036
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1056
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), we(this), clearTimeout(this._timer), this._navHandler?.teardown();
|
|
1037
1057
|
}
|
|
1038
1058
|
disconnectedCallback() {
|
|
1039
1059
|
this._teardown();
|
|
1040
1060
|
}
|
|
1041
|
-
},
|
|
1061
|
+
}, Me = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Ne = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Pe = [
|
|
1042
1062
|
"January",
|
|
1043
1063
|
"February",
|
|
1044
1064
|
"March",
|
|
@@ -1051,7 +1071,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1051
1071
|
"October",
|
|
1052
1072
|
"November",
|
|
1053
1073
|
"December"
|
|
1054
|
-
],
|
|
1074
|
+
], Fe = [
|
|
1055
1075
|
"Su",
|
|
1056
1076
|
"Mo",
|
|
1057
1077
|
"Tu",
|
|
@@ -1059,24 +1079,24 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1059
1079
|
"Th",
|
|
1060
1080
|
"Fr",
|
|
1061
1081
|
"Sa"
|
|
1062
|
-
],
|
|
1082
|
+
], Ie = (e) => String(e).padStart(2, "0"), Le = (e, t, n) => `${e}-${Ie(t + 1)}-${Ie(n)}`, J = (e) => {
|
|
1063
1083
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
1064
1084
|
return t ? {
|
|
1065
1085
|
y: +t[1],
|
|
1066
1086
|
m: t[2] - 1,
|
|
1067
1087
|
d: +t[3]
|
|
1068
1088
|
} : null;
|
|
1069
|
-
},
|
|
1089
|
+
}, Re = (e) => {
|
|
1070
1090
|
let t = J(e);
|
|
1071
|
-
return t ? `${
|
|
1072
|
-
},
|
|
1091
|
+
return t ? `${Ie(t.d)} ${Pe[t.m].slice(0, 3)} ${t.y}` : "";
|
|
1092
|
+
}, ze = (e, t) => new Date(e, t + 1, 0).getDate(), Be = (e, t) => {
|
|
1073
1093
|
for (; t < 0;) t += 12, --e;
|
|
1074
1094
|
for (; t > 11;) t -= 12, e += 1;
|
|
1075
1095
|
return {
|
|
1076
1096
|
y: e,
|
|
1077
1097
|
m: t
|
|
1078
1098
|
};
|
|
1079
|
-
},
|
|
1099
|
+
}, Ve = class extends HTMLElement {
|
|
1080
1100
|
static formAssociated = !0;
|
|
1081
1101
|
static get observedAttributes() {
|
|
1082
1102
|
return [
|
|
@@ -1133,7 +1153,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1133
1153
|
this.innerHTML = `
|
|
1134
1154
|
<div class="datepicker">
|
|
1135
1155
|
<button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${q(i)}"` : ""}${a ? ` aria-describedby="${q(a)}"` : ""}>
|
|
1136
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
1156
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? Re(this._value) : q(e)}</span>
|
|
1137
1157
|
${K("calendar-dots")}
|
|
1138
1158
|
</button>
|
|
1139
1159
|
<div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
|
|
@@ -1146,7 +1166,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1146
1166
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
1147
1167
|
if (!t) return;
|
|
1148
1168
|
let n = J(this._value);
|
|
1149
|
-
t.textContent = n ?
|
|
1169
|
+
t.textContent = n ? Re(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
1150
1170
|
}
|
|
1151
1171
|
_limits() {
|
|
1152
1172
|
let e = J(this.getAttribute("min")), t = J(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
|
|
@@ -1157,7 +1177,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1157
1177
|
},
|
|
1158
1178
|
monthDisabled: (e, t) => {
|
|
1159
1179
|
let i = new Date(e, t, 1).getTime();
|
|
1160
|
-
return new Date(e, t,
|
|
1180
|
+
return new Date(e, t, ze(e, t)).getTime() < n || i > r;
|
|
1161
1181
|
},
|
|
1162
1182
|
yearDisabled: (e) => {
|
|
1163
1183
|
let t = new Date(e, 0, 1).getTime();
|
|
@@ -1170,28 +1190,28 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1170
1190
|
e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
|
|
1171
1191
|
}
|
|
1172
1192
|
_daysHtml() {
|
|
1173
|
-
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n =
|
|
1193
|
+
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = ze(this._viewY, this._viewM), r = J(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
|
|
1174
1194
|
y: this._viewY,
|
|
1175
1195
|
m: this._viewM,
|
|
1176
1196
|
d: 1
|
|
1177
1197
|
}, s = (e, t, n, s) => {
|
|
1178
|
-
let c =
|
|
1198
|
+
let c = Le(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
|
|
1179
1199
|
return `<button type="button" class="${[
|
|
1180
1200
|
"datepicker-day",
|
|
1181
1201
|
s ? "is-outside" : "",
|
|
1182
1202
|
u ? "is-today" : "",
|
|
1183
1203
|
l ? "is-selected" : ""
|
|
1184
1204
|
].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
|
|
1185
|
-
}, c = "", l =
|
|
1205
|
+
}, c = "", l = Be(this._viewY, this._viewM - 1), u = ze(l.y, l.m);
|
|
1186
1206
|
for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1187
1207
|
for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
|
|
1188
|
-
let d =
|
|
1208
|
+
let d = Be(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
|
|
1189
1209
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1190
|
-
let p =
|
|
1210
|
+
let p = Fe.map((t, n) => Fe[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
|
|
1191
1211
|
return `
|
|
1192
1212
|
<div class="datepicker-head">
|
|
1193
1213
|
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${K("chevron-left")}</button>
|
|
1194
|
-
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${
|
|
1214
|
+
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${Pe[this._viewM]} ${this._viewY}</button>
|
|
1195
1215
|
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${K("chevron-right")}</button>
|
|
1196
1216
|
</div>
|
|
1197
1217
|
<div class="datepicker-weekdays">${p}</div>
|
|
@@ -1209,7 +1229,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1209
1229
|
o ? "is-today" : "",
|
|
1210
1230
|
a ? "is-selected" : ""
|
|
1211
1231
|
].filter(Boolean).join(" ");
|
|
1212
|
-
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${
|
|
1232
|
+
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${Pe[i].slice(0, 3)}</button>`;
|
|
1213
1233
|
}
|
|
1214
1234
|
return `
|
|
1215
1235
|
<div class="datepicker-head">
|
|
@@ -1242,17 +1262,17 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1242
1262
|
t && e.contains(document.activeElement) && t.focus();
|
|
1243
1263
|
}
|
|
1244
1264
|
_position(e, t) {
|
|
1245
|
-
|
|
1265
|
+
Se(e, t);
|
|
1246
1266
|
}
|
|
1247
1267
|
_setFocus(e, t, n, r) {
|
|
1248
|
-
let { y: i, m: a } =
|
|
1268
|
+
let { y: i, m: a } = Be(e, t);
|
|
1249
1269
|
this._focus = {
|
|
1250
1270
|
y: i,
|
|
1251
1271
|
m: a,
|
|
1252
1272
|
d: n
|
|
1253
1273
|
};
|
|
1254
1274
|
let o = i !== this._viewY || a !== this._viewM;
|
|
1255
|
-
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${
|
|
1275
|
+
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${Le(i, a, n)}"]`)?.focus();
|
|
1256
1276
|
}
|
|
1257
1277
|
_onKey(e) {
|
|
1258
1278
|
if (this._mode !== "days") {
|
|
@@ -1277,17 +1297,17 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1277
1297
|
case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
|
|
1278
1298
|
case "PageUp": {
|
|
1279
1299
|
e.preventDefault();
|
|
1280
|
-
let n =
|
|
1281
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1300
|
+
let n = Be(t.y, t.m - (e.shiftKey ? 12 : 1));
|
|
1301
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, ze(n.y, n.m)), "slide-prev");
|
|
1282
1302
|
}
|
|
1283
1303
|
case "PageDown": {
|
|
1284
1304
|
e.preventDefault();
|
|
1285
|
-
let n =
|
|
1286
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1305
|
+
let n = Be(t.y, t.m + (e.shiftKey ? 12 : 1));
|
|
1306
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, ze(n.y, n.m)), "slide-next");
|
|
1287
1307
|
}
|
|
1288
1308
|
case "Enter":
|
|
1289
1309
|
case " ":
|
|
1290
|
-
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value =
|
|
1310
|
+
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = Le(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
|
|
1291
1311
|
return;
|
|
1292
1312
|
case "Escape": return this._close();
|
|
1293
1313
|
default:
|
|
@@ -1316,7 +1336,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1316
1336
|
let t = e.target.closest("[data-nav]");
|
|
1317
1337
|
if (t) {
|
|
1318
1338
|
this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
|
|
1319
|
-
let e =
|
|
1339
|
+
let e = Be(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1320
1340
|
this._viewY = e.y, this._viewM = e.m, this._focus = {
|
|
1321
1341
|
y: e.y,
|
|
1322
1342
|
m: e.m,
|
|
@@ -1355,7 +1375,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1355
1375
|
}
|
|
1356
1376
|
if (e.target.closest("[data-today]")) {
|
|
1357
1377
|
let e = /* @__PURE__ */ new Date();
|
|
1358
|
-
this.value =
|
|
1378
|
+
this.value = Le(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
|
|
1359
1379
|
return;
|
|
1360
1380
|
}
|
|
1361
1381
|
if (e.target.closest("[data-clear]")) {
|
|
@@ -1372,18 +1392,18 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1372
1392
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1373
1393
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1374
1394
|
r() && e.key === "Escape" && this._close();
|
|
1375
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1395
|
+
}, document.addEventListener("keydown", this._onDocKey), Ce(this, () => {
|
|
1376
1396
|
r() && this._position(e, t);
|
|
1377
1397
|
});
|
|
1378
1398
|
}, this._bindGlobal(), this._syncFormValue();
|
|
1379
1399
|
}
|
|
1380
1400
|
_teardown() {
|
|
1381
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1401
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), we(this);
|
|
1382
1402
|
}
|
|
1383
1403
|
disconnectedCallback() {
|
|
1384
1404
|
this._teardown();
|
|
1385
1405
|
}
|
|
1386
|
-
},
|
|
1406
|
+
}, He = class extends HTMLElement {
|
|
1387
1407
|
static formAssociated = !0;
|
|
1388
1408
|
static get observedAttributes() {
|
|
1389
1409
|
return [
|
|
@@ -1442,7 +1462,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1442
1462
|
text: e,
|
|
1443
1463
|
empty: !0
|
|
1444
1464
|
} : {
|
|
1445
|
-
text: `${
|
|
1465
|
+
text: `${Re(this._start) || "Start"} – ${Re(this._end) || "End"}`,
|
|
1446
1466
|
empty: !1
|
|
1447
1467
|
};
|
|
1448
1468
|
}
|
|
@@ -1489,17 +1509,17 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1489
1509
|
};
|
|
1490
1510
|
}
|
|
1491
1511
|
_monthHtml(e, t) {
|
|
1492
|
-
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i =
|
|
1493
|
-
let i =
|
|
1512
|
+
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = ze(e, t), a = this._limits(), o = Fe.map((e, t) => Fe[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
|
|
1513
|
+
let i = Le(e, t, n), o = a(e, t, n);
|
|
1494
1514
|
return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
|
|
1495
|
-
}, c = "", l =
|
|
1515
|
+
}, c = "", l = Be(e, t - 1), u = ze(l.y, l.m);
|
|
1496
1516
|
for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1497
1517
|
for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
|
|
1498
|
-
let d =
|
|
1518
|
+
let d = Be(e, t + 1), f = (7 - (r + i) % 7) % 7;
|
|
1499
1519
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1500
1520
|
return `
|
|
1501
1521
|
<div class="daterange-cal">
|
|
1502
|
-
<div class="datepicker-month-label">${
|
|
1522
|
+
<div class="datepicker-month-label">${Pe[t]} ${e}</div>
|
|
1503
1523
|
<div class="datepicker-weekdays">${o}</div>
|
|
1504
1524
|
<div class="datepicker-grid" role="grid">${c}</div>
|
|
1505
1525
|
</div>`;
|
|
@@ -1507,7 +1527,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1507
1527
|
_renderView() {
|
|
1508
1528
|
let e = this.querySelector(".daterange-pop");
|
|
1509
1529
|
if (!e) return;
|
|
1510
|
-
let t =
|
|
1530
|
+
let t = Be(this._viewY, this._viewM + 1);
|
|
1511
1531
|
e.innerHTML = `
|
|
1512
1532
|
<div class="daterange-head">
|
|
1513
1533
|
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${K("chevron-left")}</button>
|
|
@@ -1533,10 +1553,10 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1533
1553
|
n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
|
|
1534
1554
|
}
|
|
1535
1555
|
let i = e.querySelector("[data-range-hint]");
|
|
1536
|
-
i && (i.textContent = this._start ? this._end ? `${
|
|
1556
|
+
i && (i.textContent = this._start ? this._end ? `${Re(this._start)} – ${Re(this._end)}` : "Pick an end date" : "Pick a start date");
|
|
1537
1557
|
}
|
|
1538
1558
|
_position(e, t) {
|
|
1539
|
-
|
|
1559
|
+
Se(e, t);
|
|
1540
1560
|
}
|
|
1541
1561
|
_pick(e) {
|
|
1542
1562
|
if (!this._start || this._start && this._end) {
|
|
@@ -1568,7 +1588,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1568
1588
|
this._popClick = !0;
|
|
1569
1589
|
let t = e.target.closest("[data-nav]");
|
|
1570
1590
|
if (t) {
|
|
1571
|
-
let e =
|
|
1591
|
+
let e = Be(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1572
1592
|
this._viewY = e.y, this._viewM = e.m, this._renderView();
|
|
1573
1593
|
return;
|
|
1574
1594
|
}
|
|
@@ -1587,18 +1607,18 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1587
1607
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1588
1608
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1589
1609
|
r() && e.key === "Escape" && this._close();
|
|
1590
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1610
|
+
}, document.addEventListener("keydown", this._onDocKey), Ce(this, () => {
|
|
1591
1611
|
r() && this._position(e, t);
|
|
1592
1612
|
});
|
|
1593
1613
|
}, this._bindGlobal(), this._syncMirrors();
|
|
1594
1614
|
}
|
|
1595
1615
|
_teardown() {
|
|
1596
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1616
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), we(this);
|
|
1597
1617
|
}
|
|
1598
1618
|
disconnectedCallback() {
|
|
1599
1619
|
this._teardown();
|
|
1600
1620
|
}
|
|
1601
|
-
},
|
|
1621
|
+
}, Ue = class extends HTMLElement {
|
|
1602
1622
|
static get observedAttributes() {
|
|
1603
1623
|
return [
|
|
1604
1624
|
"static",
|
|
@@ -1619,10 +1639,10 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1619
1639
|
e === "static" && this.isConnected && this._wire();
|
|
1620
1640
|
}
|
|
1621
1641
|
_maxScale() {
|
|
1622
|
-
return
|
|
1642
|
+
return We(this.getAttribute("max-scale"), 1.6);
|
|
1623
1643
|
}
|
|
1624
1644
|
_radius() {
|
|
1625
|
-
return
|
|
1645
|
+
return We(this.getAttribute("radius"), 100);
|
|
1626
1646
|
}
|
|
1627
1647
|
_magnifyEnabled() {
|
|
1628
1648
|
return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
|
|
@@ -1647,10 +1667,10 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1647
1667
|
_teardown() {
|
|
1648
1668
|
this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
|
|
1649
1669
|
}
|
|
1650
|
-
},
|
|
1670
|
+
}, We = (e, t) => {
|
|
1651
1671
|
let n = Number.parseFloat(e);
|
|
1652
1672
|
return Number.isFinite(n) ? n : t;
|
|
1653
|
-
},
|
|
1673
|
+
}, Ge = class extends HTMLElement {
|
|
1654
1674
|
static formAssociated = !0;
|
|
1655
1675
|
_accessibleName() {
|
|
1656
1676
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -1719,7 +1739,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1719
1739
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
1720
1740
|
label: e.innerHTML,
|
|
1721
1741
|
icon: e.getAttribute("icon") || void 0,
|
|
1722
|
-
[
|
|
1742
|
+
[Oe]: !0,
|
|
1723
1743
|
selected: e.hasAttribute("selected")
|
|
1724
1744
|
})));
|
|
1725
1745
|
}
|
|
@@ -1732,7 +1752,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1732
1752
|
}
|
|
1733
1753
|
_labelHtmlFor(e) {
|
|
1734
1754
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
1735
|
-
return t ?
|
|
1755
|
+
return t ? Ae(t) : q(e);
|
|
1736
1756
|
}
|
|
1737
1757
|
render() {
|
|
1738
1758
|
this._snapshotDeclared();
|
|
@@ -1741,13 +1761,13 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1741
1761
|
let a = `${this.id}-listbox`;
|
|
1742
1762
|
this._listboxId = a, this.innerHTML = `
|
|
1743
1763
|
<div class="search-select${i}">
|
|
1744
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
1764
|
+
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Ke(a)}" aria-label="${Ke(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
|
|
1745
1765
|
${n ? K(n, { className: "search-select-icon" }) : ""}
|
|
1746
1766
|
<div class="ms-chips" data-chips></div>
|
|
1747
1767
|
${K("chevron-down", { className: "search-select-caret" })}
|
|
1748
1768
|
</div>
|
|
1749
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
1750
|
-
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${
|
|
1769
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Ke(a)}" aria-multiselectable="true" tabindex="-1" hidden>
|
|
1770
|
+
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${Ke(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
1751
1771
|
<div class="search-select-options"></div>
|
|
1752
1772
|
<div class="search-select-empty" hidden>No matches</div>
|
|
1753
1773
|
</div>
|
|
@@ -1761,7 +1781,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1761
1781
|
e.innerHTML = `<span class="search-select-placeholder">${q(t)}</span>`;
|
|
1762
1782
|
return;
|
|
1763
1783
|
}
|
|
1764
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${
|
|
1784
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${Ke(e)}" aria-label="Remove ${Ke(qe(this._labelFor(e)))}">${K("x")}</button></span>`).join(""), this._collapseChips();
|
|
1765
1785
|
}
|
|
1766
1786
|
_collapseChips() {
|
|
1767
1787
|
let e = this.querySelector("[data-chips]");
|
|
@@ -1785,18 +1805,18 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1785
1805
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
1786
1806
|
if (!t) return;
|
|
1787
1807
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
1788
|
-
r && (i = i.filter((e) =>
|
|
1808
|
+
r && (i = i.filter((e) => qe(e.label).toLowerCase().includes(r)));
|
|
1789
1809
|
let a = this._listboxId || `${this.id || "wui-multiselect"}-listbox`;
|
|
1790
1810
|
t.innerHTML = i.map((e, t) => {
|
|
1791
1811
|
let n = this._values.includes(String(e.value));
|
|
1792
|
-
return `<button type="button" role="option" id="${
|
|
1812
|
+
return `<button type="button" role="option" id="${Ke(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${Ke(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${Ae(e)}</span><span class="ms-check">${K("check")}</span></button>`;
|
|
1793
1813
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant");
|
|
1794
1814
|
}
|
|
1795
1815
|
_wire() {
|
|
1796
1816
|
this._teardown();
|
|
1797
1817
|
let e = this.querySelector(".search-select-control"), t = this.querySelector(".search-select-menu"), n = this.querySelector(".search-select-input"), r = this.querySelector(".search-select-clear"), i = this.querySelector(".search-select-options");
|
|
1798
1818
|
if (!e || !t) return;
|
|
1799
|
-
let a = () => this.hasAttribute("disabled"), o = () =>
|
|
1819
|
+
let a = () => this.hasAttribute("disabled"), o = () => Se(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (t) => {
|
|
1800
1820
|
let n = c();
|
|
1801
1821
|
this._active = t;
|
|
1802
1822
|
for (let e of s()) e.classList.remove("is-active");
|
|
@@ -1829,7 +1849,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1829
1849
|
t && l(c().indexOf(t));
|
|
1830
1850
|
}), i.addEventListener("mouseleave", () => l(-1)), n?.addEventListener("input", () => {
|
|
1831
1851
|
this._renderOptions(n.value), r && (r.hidden = !n.value), l(-1);
|
|
1832
|
-
}), this._navHandler =
|
|
1852
|
+
}), this._navHandler = De({
|
|
1833
1853
|
getVisibleOptions: c,
|
|
1834
1854
|
getActive: () => this._active,
|
|
1835
1855
|
setActive: (e) => l(e),
|
|
@@ -1858,18 +1878,18 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1858
1878
|
}), this._bindGlobal = () => {
|
|
1859
1879
|
this._teardown(), !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this)), this._onDocClick = (e) => {
|
|
1860
1880
|
u() && !this.contains(e.target) && f();
|
|
1861
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1881
|
+
}, document.addEventListener("click", this._onDocClick), Ce(this, () => {
|
|
1862
1882
|
u() && o();
|
|
1863
1883
|
});
|
|
1864
1884
|
}, this._bindGlobal();
|
|
1865
1885
|
}
|
|
1866
1886
|
_teardown() {
|
|
1867
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1887
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), we(this), this._navHandler?.teardown();
|
|
1868
1888
|
}
|
|
1869
1889
|
disconnectedCallback() {
|
|
1870
1890
|
this._teardown(), this._ro?.disconnect(), this._ro = null;
|
|
1871
1891
|
}
|
|
1872
|
-
},
|
|
1892
|
+
}, Ke = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), qe = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Je = /[^0-9]/g, Ye = /[^0-9a-zA-Z]/g, Xe = class extends HTMLElement {
|
|
1873
1893
|
static formAssociated = !0;
|
|
1874
1894
|
static get observedAttributes() {
|
|
1875
1895
|
return [
|
|
@@ -1900,7 +1920,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1900
1920
|
this._value = this._clean(e), G(this, this._value), this._paint();
|
|
1901
1921
|
}
|
|
1902
1922
|
_clean(e) {
|
|
1903
|
-
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ?
|
|
1923
|
+
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Ye : Je, "").slice(0, this.length);
|
|
1904
1924
|
}
|
|
1905
1925
|
constructor() {
|
|
1906
1926
|
super();
|
|
@@ -1980,7 +2000,7 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1980
2000
|
disconnectedCallback() {
|
|
1981
2001
|
this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
|
|
1982
2002
|
}
|
|
1983
|
-
},
|
|
2003
|
+
}, Ze = [
|
|
1984
2004
|
[
|
|
1985
2005
|
"AF",
|
|
1986
2006
|
"Afghanistan",
|
|
@@ -3206,20 +3226,20 @@ var Te = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
3206
3226
|
"Zimbabwe",
|
|
3207
3227
|
"263"
|
|
3208
3228
|
]
|
|
3209
|
-
],
|
|
3229
|
+
], Qe = (e) => (Ze.find((t) => t[0] === e) || [
|
|
3210
3230
|
"",
|
|
3211
3231
|
"",
|
|
3212
3232
|
""
|
|
3213
|
-
])[2],
|
|
3214
|
-
function
|
|
3215
|
-
return Y ? Promise.resolve(Y) : (
|
|
3233
|
+
])[2], $e = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, et = null;
|
|
3234
|
+
function tt() {
|
|
3235
|
+
return Y ? Promise.resolve(Y) : (et ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
|
|
3216
3236
|
AsYouType: e.AsYouType,
|
|
3217
3237
|
getExampleNumber: e.getExampleNumber,
|
|
3218
3238
|
isValidPhoneNumber: e.isValidPhoneNumber,
|
|
3219
3239
|
examples: t.default || t
|
|
3220
|
-
}, Y)).catch(() => null),
|
|
3240
|
+
}, Y)).catch(() => null), et);
|
|
3221
3241
|
}
|
|
3222
|
-
function
|
|
3242
|
+
function nt(e, t) {
|
|
3223
3243
|
if (!Y || !t) return t;
|
|
3224
3244
|
try {
|
|
3225
3245
|
return new Y.AsYouType(e).input(t);
|
|
@@ -3227,7 +3247,7 @@ function $e(e, t) {
|
|
|
3227
3247
|
return t;
|
|
3228
3248
|
}
|
|
3229
3249
|
}
|
|
3230
|
-
function
|
|
3250
|
+
function rt(e) {
|
|
3231
3251
|
if (!Y) return null;
|
|
3232
3252
|
try {
|
|
3233
3253
|
return Y.getExampleNumber(e, Y.examples)?.formatNational() || null;
|
|
@@ -3235,7 +3255,7 @@ function et(e) {
|
|
|
3235
3255
|
return null;
|
|
3236
3256
|
}
|
|
3237
3257
|
}
|
|
3238
|
-
function
|
|
3258
|
+
function it(e) {
|
|
3239
3259
|
if (!Y || !e) return null;
|
|
3240
3260
|
try {
|
|
3241
3261
|
return Y.isValidPhoneNumber(e);
|
|
@@ -3243,7 +3263,7 @@ function tt(e) {
|
|
|
3243
3263
|
return null;
|
|
3244
3264
|
}
|
|
3245
3265
|
}
|
|
3246
|
-
function
|
|
3266
|
+
function at(e) {
|
|
3247
3267
|
if (!Y) return null;
|
|
3248
3268
|
try {
|
|
3249
3269
|
let t = Y.getExampleNumber(e, Y.examples);
|
|
@@ -3252,7 +3272,7 @@ function nt(e) {
|
|
|
3252
3272
|
return null;
|
|
3253
3273
|
}
|
|
3254
3274
|
}
|
|
3255
|
-
function
|
|
3275
|
+
function ot(e) {
|
|
3256
3276
|
if (!Y || !e?.trim().startsWith("+")) return null;
|
|
3257
3277
|
try {
|
|
3258
3278
|
let t = new Y.AsYouType();
|
|
@@ -3266,7 +3286,7 @@ function rt(e) {
|
|
|
3266
3286
|
return null;
|
|
3267
3287
|
}
|
|
3268
3288
|
}
|
|
3269
|
-
var
|
|
3289
|
+
var st = class extends HTMLElement {
|
|
3270
3290
|
static formAssociated = !0;
|
|
3271
3291
|
static get observedAttributes() {
|
|
3272
3292
|
return [
|
|
@@ -3306,13 +3326,13 @@ var it = class extends HTMLElement {
|
|
|
3306
3326
|
this.value = this._defaultValue || "";
|
|
3307
3327
|
}
|
|
3308
3328
|
get value() {
|
|
3309
|
-
return this._national ? `+${
|
|
3329
|
+
return this._national ? `+${Qe(this._country)}${this._national}` : "";
|
|
3310
3330
|
}
|
|
3311
3331
|
set value(e) {
|
|
3312
|
-
let t = String(e ?? "").trim(), n =
|
|
3332
|
+
let t = String(e ?? "").trim(), n = ot(t);
|
|
3313
3333
|
if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
|
|
3314
3334
|
else if (t.startsWith("+")) {
|
|
3315
|
-
let e = t.replace(/[^0-9]/g, ""), n = String(
|
|
3335
|
+
let e = t.replace(/[^0-9]/g, ""), n = String(Qe(this._country));
|
|
3316
3336
|
n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
|
|
3317
3337
|
} else this._national = t.replace(/[^0-9]/g, "");
|
|
3318
3338
|
n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
|
|
@@ -3328,25 +3348,25 @@ var it = class extends HTMLElement {
|
|
|
3328
3348
|
}
|
|
3329
3349
|
render() {
|
|
3330
3350
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
|
|
3331
|
-
let e = this.getAttribute("placeholder") ||
|
|
3351
|
+
let e = this.getAttribute("placeholder") || rt(this._country) || "Enter phone number";
|
|
3332
3352
|
this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
|
|
3333
3353
|
let t = `${this.id}-listbox`;
|
|
3334
3354
|
this._listboxId = t;
|
|
3335
|
-
let n =
|
|
3355
|
+
let n = Ze.map(([e, n, r], i) => `<button type="button" role="option" id="${ct(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${$e(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
|
|
3336
3356
|
this.innerHTML = `
|
|
3337
3357
|
<div class="phone-input-wrap">
|
|
3338
3358
|
<div class="phone-country-adornment">
|
|
3339
|
-
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
3340
|
-
<span class="${
|
|
3359
|
+
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${ct(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3360
|
+
<span class="${$e(this._country)}" data-flag aria-hidden="true"></span>
|
|
3341
3361
|
${K("chevron-down", { className: "phone-chevron" })}
|
|
3342
|
-
<span class="phone-dial" data-dial>+${
|
|
3362
|
+
<span class="phone-dial" data-dial>+${Qe(this._country)}</span>
|
|
3343
3363
|
</button>
|
|
3344
|
-
<div class="country-dropdown-menu" role="listbox" id="${
|
|
3345
|
-
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${K("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${
|
|
3364
|
+
<div class="country-dropdown-menu" role="listbox" id="${ct(t)}" tabindex="-1" hidden>
|
|
3365
|
+
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${K("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${ct(t)}" aria-autocomplete="list" /></div>
|
|
3346
3366
|
<div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
|
|
3347
3367
|
</div>
|
|
3348
3368
|
</div>
|
|
3349
|
-
<input type="tel" class="input" placeholder="${
|
|
3369
|
+
<input type="tel" class="input" placeholder="${ct(e)}" value="${ct(nt(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${ct(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${ct(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
3350
3370
|
</div>
|
|
3351
3371
|
<div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, G(this, this.value), this._wire();
|
|
3352
3372
|
}
|
|
@@ -3360,7 +3380,7 @@ var it = class extends HTMLElement {
|
|
|
3360
3380
|
this._teardown();
|
|
3361
3381
|
let e = this.querySelector(".country-toggle"), t = this.querySelector(".phone-input-wrap"), n = this.querySelector(".country-dropdown-menu"), r = this.querySelector(".dropdown-search-input"), i = this.querySelector(".country-list-scroll"), a = this.querySelector(".country-empty"), o = this.querySelector("input[type=tel]"), s = this.querySelector("[data-flag]"), c = this.querySelector("[data-dial]");
|
|
3362
3382
|
if (!e || !n) return;
|
|
3363
|
-
let l = () => !n.hidden, u = () =>
|
|
3383
|
+
let l = () => !n.hidden, u = () => Se(t || e, n), d = (e) => {
|
|
3364
3384
|
let t = this._visibleItems();
|
|
3365
3385
|
this._active = e;
|
|
3366
3386
|
for (let e of this._itemEls()) e.classList.remove("is-active");
|
|
@@ -3377,12 +3397,12 @@ var it = class extends HTMLElement {
|
|
|
3377
3397
|
}
|
|
3378
3398
|
a && (a.hidden = n > 0);
|
|
3379
3399
|
}, h = (e) => {
|
|
3380
|
-
this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className =
|
|
3400
|
+
this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className = $e(e)), c && (c.textContent = `+${Qe(e)}`);
|
|
3381
3401
|
for (let t of this._itemEls()) {
|
|
3382
3402
|
let n = t.dataset.iso === e;
|
|
3383
3403
|
t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
|
|
3384
3404
|
}
|
|
3385
|
-
!this.getAttribute("placeholder") && o && (o.placeholder =
|
|
3405
|
+
!this.getAttribute("placeholder") && o && (o.placeholder = rt(e) || "Enter phone number"), o && this._national && (o.value = nt(e, this._national)), p(), this._syncMirror(), this._emitChange(), o?.focus();
|
|
3386
3406
|
}, g = (t) => {
|
|
3387
3407
|
let n = this._visibleItems();
|
|
3388
3408
|
if (t.key === "ArrowDown") {
|
|
@@ -3416,7 +3436,7 @@ var it = class extends HTMLElement {
|
|
|
3416
3436
|
let _ = this.querySelector("[data-phone-error]"), v = (e) => {
|
|
3417
3437
|
if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), _) {
|
|
3418
3438
|
if (e) {
|
|
3419
|
-
let e =
|
|
3439
|
+
let e = rt(this._country);
|
|
3420
3440
|
_.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
|
|
3421
3441
|
}
|
|
3422
3442
|
_.hidden = !e;
|
|
@@ -3424,26 +3444,26 @@ var it = class extends HTMLElement {
|
|
|
3424
3444
|
};
|
|
3425
3445
|
o.addEventListener("input", (e) => {
|
|
3426
3446
|
e.stopPropagation();
|
|
3427
|
-
let t = o.value.replace(/[^0-9]/g, ""), n =
|
|
3447
|
+
let t = o.value.replace(/[^0-9]/g, ""), n = at(this._country);
|
|
3428
3448
|
n && t.length > n && (t = t.slice(0, n)), this._national = t;
|
|
3429
|
-
let r =
|
|
3430
|
-
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national ||
|
|
3449
|
+
let r = nt(this._country, this._national);
|
|
3450
|
+
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || it(this.value) === !0) && v(!1);
|
|
3431
3451
|
}), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
|
|
3432
|
-
v(this._national.length > 0 &&
|
|
3452
|
+
v(this._national.length > 0 && it(this.value) === !1), this.value !== this._committedValue && this._emitChange();
|
|
3433
3453
|
}), o.addEventListener("paste", (e) => {
|
|
3434
|
-
let t =
|
|
3435
|
-
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value =
|
|
3454
|
+
let t = ot(e.clipboardData?.getData("text"));
|
|
3455
|
+
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = nt(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
|
|
3436
3456
|
}), this._bindGlobal = () => {
|
|
3437
3457
|
this._teardownGlobals?.(), this._onDocClick = (e) => {
|
|
3438
3458
|
l() && !this.contains(e.target) && p();
|
|
3439
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3459
|
+
}, document.addEventListener("click", this._onDocClick), Ce(this, () => {
|
|
3440
3460
|
l() && u();
|
|
3441
3461
|
});
|
|
3442
3462
|
}, this._teardownGlobals = () => {
|
|
3443
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3444
|
-
}, this._bindGlobal(),
|
|
3445
|
-
if (!(!e || !o.isConnected) && (this._national && (o.value =
|
|
3446
|
-
let e =
|
|
3463
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), we(this);
|
|
3464
|
+
}, this._bindGlobal(), tt().then((e) => {
|
|
3465
|
+
if (!(!e || !o.isConnected) && (this._national && (o.value = nt(this._country, this._national)), !this.getAttribute("placeholder"))) {
|
|
3466
|
+
let e = rt(this._country);
|
|
3447
3467
|
e && (o.placeholder = e);
|
|
3448
3468
|
}
|
|
3449
3469
|
}), this._syncMirror();
|
|
@@ -3454,7 +3474,7 @@ var it = class extends HTMLElement {
|
|
|
3454
3474
|
disconnectedCallback() {
|
|
3455
3475
|
this._teardown();
|
|
3456
3476
|
}
|
|
3457
|
-
},
|
|
3477
|
+
}, ct = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), lt = class extends HTMLElement {
|
|
3458
3478
|
static formAssociated = !0;
|
|
3459
3479
|
static get observedAttributes() {
|
|
3460
3480
|
return [
|
|
@@ -3519,7 +3539,7 @@ var it = class extends HTMLElement {
|
|
|
3519
3539
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
3520
3540
|
label: e.innerHTML,
|
|
3521
3541
|
icon: e.getAttribute("icon") || void 0,
|
|
3522
|
-
[
|
|
3542
|
+
[Oe]: !0,
|
|
3523
3543
|
selected: e.hasAttribute("selected")
|
|
3524
3544
|
})));
|
|
3525
3545
|
}
|
|
@@ -3534,19 +3554,19 @@ var it = class extends HTMLElement {
|
|
|
3534
3554
|
this._listboxId = u;
|
|
3535
3555
|
let d = e.map((e, t) => {
|
|
3536
3556
|
let n = String(e.value) === String(this._value);
|
|
3537
|
-
return `<button type="button" role="option" id="${
|
|
3557
|
+
return `<button type="button" role="option" id="${ut(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${ut(e.value)}" aria-selected="${n}">${Ae(e)}</button>`;
|
|
3538
3558
|
}).join("");
|
|
3539
3559
|
this.innerHTML = `
|
|
3540
3560
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
3541
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
3561
|
+
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${ut(u)}" aria-label="${ut(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3542
3562
|
${a ? K(a, { className: "search-select-icon" }) : ""}
|
|
3543
3563
|
${o ? `<span class="search-select-prefix">${q(o)}</span>` : ""}
|
|
3544
|
-
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ?
|
|
3564
|
+
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? Ae(l) : q(s)}</span>
|
|
3545
3565
|
${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${K("x")}</span>` : ""}
|
|
3546
3566
|
${K("chevron-down", { className: "search-select-caret" })}
|
|
3547
3567
|
</button>
|
|
3548
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
3549
|
-
${t ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${
|
|
3568
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${ut(u)}" tabindex="-1" hidden>
|
|
3569
|
+
${t ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${ut(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
3550
3570
|
<div class="search-select-options">${d}<div class="search-select-empty" hidden>No matches</div></div>
|
|
3551
3571
|
</div>
|
|
3552
3572
|
</div>`, this._rendered = !0, G(this, this._value), this._wire(), this._syncReset();
|
|
@@ -3575,7 +3595,7 @@ var it = class extends HTMLElement {
|
|
|
3575
3595
|
let t = e.dataset.value === String(this._value);
|
|
3576
3596
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
3577
3597
|
}
|
|
3578
|
-
e && (e.innerHTML = t ?
|
|
3598
|
+
e && (e.innerHTML = t ? Ae(t) : q(this.getAttribute("placeholder") || "Select..."), e.classList.toggle("search-select-placeholder", !t));
|
|
3579
3599
|
}
|
|
3580
3600
|
_syncReset() {
|
|
3581
3601
|
let { reset: e } = this._refs();
|
|
@@ -3588,8 +3608,8 @@ var it = class extends HTMLElement {
|
|
|
3588
3608
|
let t = () => {
|
|
3589
3609
|
if (this.hasAttribute("compact")) {
|
|
3590
3610
|
let t = e.control.getBoundingClientRect();
|
|
3591
|
-
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px",
|
|
3592
|
-
} else
|
|
3611
|
+
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", Se(e.control, e.menu);
|
|
3612
|
+
} else Se(e.control, e.menu, { matchWidth: !0 });
|
|
3593
3613
|
}, n = (t) => {
|
|
3594
3614
|
let n = this._visible();
|
|
3595
3615
|
this._active = t;
|
|
@@ -3609,7 +3629,7 @@ var it = class extends HTMLElement {
|
|
|
3609
3629
|
}, s = (t) => {
|
|
3610
3630
|
this.value = t.dataset.value, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.control.focus();
|
|
3611
3631
|
};
|
|
3612
|
-
this._navHandler =
|
|
3632
|
+
this._navHandler = De({
|
|
3613
3633
|
getVisibleOptions: () => this._visible(),
|
|
3614
3634
|
getActive: () => this._active,
|
|
3615
3635
|
setActive: (e) => n(e),
|
|
@@ -3640,18 +3660,18 @@ var it = class extends HTMLElement {
|
|
|
3640
3660
|
}), e.menu.addEventListener("keydown", this._navHandler.handler), this._bindGlobal = () => {
|
|
3641
3661
|
this._teardown(), this._onDocClick = (e) => {
|
|
3642
3662
|
i() && !this.contains(e.target) && o();
|
|
3643
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3663
|
+
}, document.addEventListener("click", this._onDocClick), Ce(this, () => {
|
|
3644
3664
|
i() && t();
|
|
3645
3665
|
});
|
|
3646
3666
|
}, this._bindGlobal();
|
|
3647
3667
|
}
|
|
3648
3668
|
_teardown() {
|
|
3649
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3669
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), we(this), this._navHandler?.teardown();
|
|
3650
3670
|
}
|
|
3651
3671
|
disconnectedCallback() {
|
|
3652
3672
|
this._teardown();
|
|
3653
3673
|
}
|
|
3654
|
-
},
|
|
3674
|
+
}, ut = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), dt = class extends HTMLElement {
|
|
3655
3675
|
static formAssociated = !0;
|
|
3656
3676
|
static get observedAttributes() {
|
|
3657
3677
|
return [
|
|
@@ -3691,19 +3711,19 @@ var it = class extends HTMLElement {
|
|
|
3691
3711
|
return this._value;
|
|
3692
3712
|
}
|
|
3693
3713
|
set value(e) {
|
|
3694
|
-
this._value = this._snapToStep(this._clamp(
|
|
3714
|
+
this._value = this._snapToStep(this._clamp(ft(e, this._value))), this._syncValue(), this._syncMirrors();
|
|
3695
3715
|
}
|
|
3696
3716
|
get start() {
|
|
3697
3717
|
return this._start;
|
|
3698
3718
|
}
|
|
3699
3719
|
set start(e) {
|
|
3700
|
-
this._start = Math.min(this._snapToStep(this._clamp(
|
|
3720
|
+
this._start = Math.min(this._snapToStep(this._clamp(ft(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
|
|
3701
3721
|
}
|
|
3702
3722
|
get end() {
|
|
3703
3723
|
return this._end;
|
|
3704
3724
|
}
|
|
3705
3725
|
set end(e) {
|
|
3706
|
-
this._end = Math.max(this._snapToStep(this._clamp(
|
|
3726
|
+
this._end = Math.max(this._snapToStep(this._clamp(ft(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
|
|
3707
3727
|
}
|
|
3708
3728
|
attributeChangedCallback(e, t, n) {
|
|
3709
3729
|
if (e === "value" || e === "start" || e === "end" || e === "min" || e === "max" || e === "step") {
|
|
@@ -3716,19 +3736,19 @@ var it = class extends HTMLElement {
|
|
|
3716
3736
|
this._isRange() ? this._resetRange() : this._resetSingle();
|
|
3717
3737
|
}
|
|
3718
3738
|
_updateFromAttribute(e) {
|
|
3719
|
-
e === "value" ? this._value = this._snapToStep(this._clamp(
|
|
3739
|
+
e === "value" ? this._value = this._snapToStep(this._clamp(ft(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(ft(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(ft(this.getAttribute("end"), this._end))));
|
|
3720
3740
|
}
|
|
3721
3741
|
_isRange() {
|
|
3722
3742
|
return this.hasAttribute("range");
|
|
3723
3743
|
}
|
|
3724
3744
|
_min() {
|
|
3725
|
-
return
|
|
3745
|
+
return ft(this.getAttribute("min"), 0);
|
|
3726
3746
|
}
|
|
3727
3747
|
_max() {
|
|
3728
|
-
return
|
|
3748
|
+
return ft(this.getAttribute("max"), 100);
|
|
3729
3749
|
}
|
|
3730
3750
|
_step() {
|
|
3731
|
-
return
|
|
3751
|
+
return ft(this.getAttribute("step"), 1);
|
|
3732
3752
|
}
|
|
3733
3753
|
_clamp(e) {
|
|
3734
3754
|
return Math.max(this._min(), Math.min(e, this._max()));
|
|
@@ -3793,7 +3813,7 @@ var it = class extends HTMLElement {
|
|
|
3793
3813
|
aria-valuenow="${this._value}"
|
|
3794
3814
|
aria-valuetext="${this._formatValue(this._value)}"
|
|
3795
3815
|
${a ? "disabled" : ""}
|
|
3796
|
-
aria-label="${
|
|
3816
|
+
aria-label="${pt(this.getAttribute("aria-label") || "Value")}"
|
|
3797
3817
|
></button>
|
|
3798
3818
|
`}
|
|
3799
3819
|
${this.hasAttribute("show-value") ? n ? `<span class="slider-value">${this._formatValue(this._start)} – ${this._formatValue(this._end)}</span>` : `<span class="slider-value">${this._formatValue(this._value)}</span>` : ""}
|
|
@@ -3893,10 +3913,10 @@ var it = class extends HTMLElement {
|
|
|
3893
3913
|
disconnectedCallback() {
|
|
3894
3914
|
this._teardown();
|
|
3895
3915
|
}
|
|
3896
|
-
},
|
|
3916
|
+
}, ft = (e, t) => {
|
|
3897
3917
|
let n = Number.parseFloat(e);
|
|
3898
3918
|
return Number.isFinite(n) ? n : t;
|
|
3899
|
-
},
|
|
3919
|
+
}, pt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), mt = class extends HTMLElement {
|
|
3900
3920
|
static formAssociated = !0;
|
|
3901
3921
|
_accessibleName() {
|
|
3902
3922
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
|
|
@@ -3960,7 +3980,7 @@ var it = class extends HTMLElement {
|
|
|
3960
3980
|
G(this, this._values.join(",")), this.innerHTML = `
|
|
3961
3981
|
<div class="search-select${t}">
|
|
3962
3982
|
<div class="input search-select-control search-select-multi"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
3963
|
-
<input type="text" class="ms-input" data-input aria-label="${
|
|
3983
|
+
<input type="text" class="ms-input" data-input aria-label="${gt(this._accessibleName())}" placeholder="${gt(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
|
|
3964
3984
|
<div class="ms-chips" data-chips></div>
|
|
3965
3985
|
</div>
|
|
3966
3986
|
</div>`, this._rendered = !0, G(this, this._values.join(",")), this._renderControl(), this._wire();
|
|
@@ -3972,7 +3992,7 @@ var it = class extends HTMLElement {
|
|
|
3972
3992
|
e.innerHTML = "";
|
|
3973
3993
|
return;
|
|
3974
3994
|
}
|
|
3975
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${
|
|
3995
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${ht(e)}</span><button type="button" class="chip-remove" data-remove="${gt(e)}" aria-label="Remove ${gt(e)}">${K("x")}</button></span>`).join("");
|
|
3976
3996
|
}
|
|
3977
3997
|
}
|
|
3978
3998
|
_wire() {
|
|
@@ -4043,18 +4063,18 @@ var it = class extends HTMLElement {
|
|
|
4043
4063
|
disconnectedCallback() {
|
|
4044
4064
|
this._teardown();
|
|
4045
4065
|
}
|
|
4046
|
-
},
|
|
4066
|
+
}, ht = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), gt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), _t = (e) => String(e).padStart(2, "0"), vt = (e, t) => `${_t(e)}:${_t(t)}`, yt = (e) => {
|
|
4047
4067
|
let t = /^(\d{2}):(\d{2})$/.exec(e || "");
|
|
4048
4068
|
return t ? {
|
|
4049
4069
|
h: +t[1],
|
|
4050
4070
|
m: +t[2]
|
|
4051
4071
|
} : null;
|
|
4052
|
-
},
|
|
4072
|
+
}, bt = (e, t = "24") => {
|
|
4053
4073
|
if (!e) return "";
|
|
4054
|
-
if (t === "24") return
|
|
4074
|
+
if (t === "24") return vt(e.h, e.m);
|
|
4055
4075
|
let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
|
|
4056
|
-
return `${n}:${
|
|
4057
|
-
},
|
|
4076
|
+
return `${n}:${_t(e.m)} ${r}`;
|
|
4077
|
+
}, xt = class extends HTMLElement {
|
|
4058
4078
|
static formAssociated = !0;
|
|
4059
4079
|
static get observedAttributes() {
|
|
4060
4080
|
return [
|
|
@@ -4101,11 +4121,11 @@ var it = class extends HTMLElement {
|
|
|
4101
4121
|
}
|
|
4102
4122
|
render() {
|
|
4103
4123
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
|
|
4104
|
-
let e = this.getAttribute("placeholder") || "Select time", t =
|
|
4124
|
+
let e = this.getAttribute("placeholder") || "Select time", t = yt(this._value), n = this.getAttribute("format") || "24", r = this.getAttribute("size"), i = r === "sm" ? " input-sm" : r === "lg" ? " input-lg" : "", a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
|
|
4105
4125
|
this.innerHTML = `
|
|
4106
4126
|
<div class="timepicker">
|
|
4107
4127
|
<button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${q(a)}"` : ""}${o ? ` aria-describedby="${q(o)}"` : ""}>
|
|
4108
|
-
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ?
|
|
4128
|
+
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? bt(t, n) : q(e)}</span>
|
|
4109
4129
|
${K("clock")}
|
|
4110
4130
|
</button>
|
|
4111
4131
|
<div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
|
|
@@ -4117,14 +4137,14 @@ var it = class extends HTMLElement {
|
|
|
4117
4137
|
_syncTrigger() {
|
|
4118
4138
|
let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
4119
4139
|
if (!t) return;
|
|
4120
|
-
let n =
|
|
4121
|
-
t.textContent = n ?
|
|
4140
|
+
let n = yt(this._value), r = this.getAttribute("format") || "24";
|
|
4141
|
+
t.textContent = n ? bt(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
4122
4142
|
}
|
|
4123
4143
|
_buildTimes() {
|
|
4124
|
-
let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r =
|
|
4144
|
+
let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = yt(t) || {
|
|
4125
4145
|
h: 0,
|
|
4126
4146
|
m: 0
|
|
4127
|
-
}, i =
|
|
4147
|
+
}, i = yt(n) || {
|
|
4128
4148
|
h: 23,
|
|
4129
4149
|
m: 59
|
|
4130
4150
|
}, a = [], o = r.h, s = r.m;
|
|
@@ -4137,10 +4157,10 @@ var it = class extends HTMLElement {
|
|
|
4137
4157
|
_renderOptions() {
|
|
4138
4158
|
let e = this.querySelector(".timepicker-pop");
|
|
4139
4159
|
if (!e) return;
|
|
4140
|
-
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r =
|
|
4160
|
+
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = yt(this._value), i = this._focus, a = "";
|
|
4141
4161
|
for (let e = 0; e < n.length; e++) {
|
|
4142
|
-
let o = n[e], s =
|
|
4143
|
-
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${
|
|
4162
|
+
let o = n[e], s = vt(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
|
|
4163
|
+
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${bt(o, t)}</button>`;
|
|
4144
4164
|
}
|
|
4145
4165
|
e.innerHTML = a, this._focusActive();
|
|
4146
4166
|
}
|
|
@@ -4149,7 +4169,7 @@ var it = class extends HTMLElement {
|
|
|
4149
4169
|
t && !e.hidden && t.focus();
|
|
4150
4170
|
}
|
|
4151
4171
|
_position(e, t) {
|
|
4152
|
-
|
|
4172
|
+
Se(e, t);
|
|
4153
4173
|
}
|
|
4154
4174
|
_onKey(e) {
|
|
4155
4175
|
let t = [...this.querySelector(".timepicker-pop").querySelectorAll(".timepicker-option")];
|
|
@@ -4227,18 +4247,18 @@ var it = class extends HTMLElement {
|
|
|
4227
4247
|
this._popClick = !1, n() && !t && !this.contains(e.target) && this._close();
|
|
4228
4248
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
4229
4249
|
n() && e.key === "Escape" && this._close();
|
|
4230
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
4250
|
+
}, document.addEventListener("keydown", this._onDocKey), Ce(this, () => {
|
|
4231
4251
|
n() && this._position(e, t);
|
|
4232
4252
|
});
|
|
4233
4253
|
}, this._bindGlobal(), this._syncFormValue();
|
|
4234
4254
|
}
|
|
4235
4255
|
_teardown() {
|
|
4236
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
4256
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), we(this), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
|
|
4237
4257
|
}
|
|
4238
4258
|
disconnectedCallback() {
|
|
4239
4259
|
this._teardown();
|
|
4240
4260
|
}
|
|
4241
|
-
},
|
|
4261
|
+
}, St = "wui-wizard-step", Ct = class extends HTMLElement {
|
|
4242
4262
|
static get observedAttributes() {
|
|
4243
4263
|
return [
|
|
4244
4264
|
"active",
|
|
@@ -4272,7 +4292,7 @@ var it = class extends HTMLElement {
|
|
|
4272
4292
|
this._beforeNext = typeof e == "function" ? e : null;
|
|
4273
4293
|
}
|
|
4274
4294
|
get _steps() {
|
|
4275
|
-
return [...this.querySelectorAll(`:scope > ${
|
|
4295
|
+
return [...this.querySelectorAll(`:scope > ${St}`)];
|
|
4276
4296
|
}
|
|
4277
4297
|
refresh() {
|
|
4278
4298
|
this._rendered && this._renderChrome();
|
|
@@ -4331,13 +4351,13 @@ var it = class extends HTMLElement {
|
|
|
4331
4351
|
return e.map((e, r) => {
|
|
4332
4352
|
let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
|
|
4333
4353
|
u = a === "done" ? K("check") : a === "error" ? K("alert-triangle") : a === "skipped" ? K("minus") : c ? K(c) : String(l);
|
|
4334
|
-
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${
|
|
4335
|
-
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${
|
|
4354
|
+
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${wt(s)}</span>` : "", h;
|
|
4355
|
+
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${wt(o)}</span>${m}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${wt(o)}</span>${m}` : `<span class="step-circle">${u}</span><span class="step-label">${wt(o)}</span>${m}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${h}</button>` : `<div class="${d}"${f}>${h}</div>`;
|
|
4336
4356
|
}).join("");
|
|
4337
4357
|
}
|
|
4338
4358
|
_footerHtml(e) {
|
|
4339
4359
|
let t = this._active, n = e.length - 1, r = this.hasAttribute("disabled") ? " disabled" : "", i = e[t]?.hasAttribute("optional") || this.hasAttribute("skippable"), a = this.getAttribute("back-label") || "Back", o = this.getAttribute("next-label") || "Next", s = this.getAttribute("skip-label") || "Skip", c = this.getAttribute("finish-label") || "Finish";
|
|
4340
|
-
return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${
|
|
4360
|
+
return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${wt(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${wt(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${wt(o)}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${wt(c)}</button>`}</span>`;
|
|
4341
4361
|
}
|
|
4342
4362
|
_wire() {
|
|
4343
4363
|
this._teardown(), this._onHeaderClick = (e) => {
|
|
@@ -4405,7 +4425,7 @@ var it = class extends HTMLElement {
|
|
|
4405
4425
|
_reflectActive(e) {
|
|
4406
4426
|
this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
|
|
4407
4427
|
}
|
|
4408
|
-
},
|
|
4428
|
+
}, wt = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Tt = class extends HTMLElement {
|
|
4409
4429
|
static get observedAttributes() {
|
|
4410
4430
|
return [
|
|
4411
4431
|
"label",
|
|
@@ -4419,14 +4439,14 @@ var it = class extends HTMLElement {
|
|
|
4419
4439
|
let e = this.closest("wui-wizard");
|
|
4420
4440
|
e && typeof e.refresh == "function" && e.refresh();
|
|
4421
4441
|
}
|
|
4422
|
-
},
|
|
4442
|
+
}, Et = "image/png,image/jpeg,image/webp", Dt = {
|
|
4423
4443
|
"image/png": [".png"],
|
|
4424
4444
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
4425
4445
|
"image/webp": [".webp"],
|
|
4426
4446
|
"image/gif": [".gif"],
|
|
4427
4447
|
"image/svg+xml": [".svg"],
|
|
4428
4448
|
"application/pdf": [".pdf"]
|
|
4429
|
-
},
|
|
4449
|
+
}, Ot = {
|
|
4430
4450
|
"image/png": "PNG",
|
|
4431
4451
|
"image/jpeg": "JPG",
|
|
4432
4452
|
"image/webp": "WEBP",
|
|
@@ -4440,7 +4460,7 @@ var it = class extends HTMLElement {
|
|
|
4440
4460
|
".gif": "GIF",
|
|
4441
4461
|
".svg": "SVG",
|
|
4442
4462
|
".pdf": "PDF"
|
|
4443
|
-
},
|
|
4463
|
+
}, kt = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), At = [
|
|
4444
4464
|
".png",
|
|
4445
4465
|
".jpg",
|
|
4446
4466
|
".jpeg",
|
|
@@ -4451,46 +4471,46 @@ var it = class extends HTMLElement {
|
|
|
4451
4471
|
".avif",
|
|
4452
4472
|
".heic"
|
|
4453
4473
|
];
|
|
4454
|
-
function
|
|
4474
|
+
function jt(e) {
|
|
4455
4475
|
if (!e) return !1;
|
|
4456
4476
|
let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
|
|
4457
4477
|
if (t) return t.startsWith("image/");
|
|
4458
4478
|
let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
|
|
4459
|
-
return
|
|
4479
|
+
return At.some((e) => r.endsWith(e));
|
|
4460
4480
|
}
|
|
4461
|
-
function
|
|
4462
|
-
let t =
|
|
4463
|
-
return t.length ? t.every((e) => e.startsWith(".") ?
|
|
4481
|
+
function Mt(e) {
|
|
4482
|
+
let t = kt(e);
|
|
4483
|
+
return t.length ? t.every((e) => e.startsWith(".") ? At.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
|
|
4464
4484
|
}
|
|
4465
|
-
function
|
|
4485
|
+
function Nt(e) {
|
|
4466
4486
|
let t = [];
|
|
4467
|
-
for (let n of
|
|
4468
|
-
let e =
|
|
4487
|
+
for (let n of kt(e)) {
|
|
4488
|
+
let e = Ot[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
4469
4489
|
t.includes(e) || t.push(e);
|
|
4470
4490
|
}
|
|
4471
4491
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
4472
4492
|
}
|
|
4473
|
-
function
|
|
4474
|
-
let n =
|
|
4493
|
+
function Pt(e, t) {
|
|
4494
|
+
let n = kt(t);
|
|
4475
4495
|
if (!n.length) return !0;
|
|
4476
4496
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
4477
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
4497
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Dt[e] || []).some((e) => i.endsWith(e)));
|
|
4478
4498
|
}
|
|
4479
|
-
function
|
|
4499
|
+
function Ft(e, t = {}) {
|
|
4480
4500
|
if (!e) return null;
|
|
4481
|
-
let n = t.accept === void 0 ?
|
|
4482
|
-
return
|
|
4501
|
+
let n = t.accept === void 0 ? Et : t.accept, r = t.maxSizeMb || 5;
|
|
4502
|
+
return Pt(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Nt(n)} file.`;
|
|
4483
4503
|
}
|
|
4484
4504
|
var X = (e, t) => {
|
|
4485
4505
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
4486
4506
|
};
|
|
4487
|
-
function
|
|
4488
|
-
X("wui-select",
|
|
4507
|
+
function It() {
|
|
4508
|
+
X("wui-select", lt), X("wui-phone", st), X("wui-datepicker", Ve), X("wui-date-range", He), X("wui-dock", Ue), X("wui-slider", dt), X("wui-timepicker", xt), X("wui-autocomplete", je), X("wui-multiselect", Ge), X("wui-taginput", mt), X("wui-otp", Xe), X("wui-status-icon", be), X("wui-wizard-step", Tt), X("wui-wizard", Ct);
|
|
4489
4509
|
}
|
|
4490
|
-
|
|
4510
|
+
It();
|
|
4491
4511
|
//#endregion
|
|
4492
4512
|
//#region src/components/AppPopover.jsx
|
|
4493
|
-
function
|
|
4513
|
+
function Lt({ trigger: e, children: t, title: r, placement: i = "bottom", triggerType: a = "click", onToggle: o, className: c = "", ...l }) {
|
|
4494
4514
|
N("AppPopover", l);
|
|
4495
4515
|
let u = s(), [f, h] = d(!1), g = (e) => {
|
|
4496
4516
|
h(e), o?.(e);
|
|
@@ -4525,18 +4545,18 @@ function Pt({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
4525
4545
|
}
|
|
4526
4546
|
//#endregion
|
|
4527
4547
|
//#region src/components/AppInfoTip.jsx
|
|
4528
|
-
function
|
|
4548
|
+
function Rt({ label: e, children: t, placement: n = "auto", className: r = "", ...i }) {
|
|
4529
4549
|
N("AppInfoTip", i);
|
|
4530
4550
|
let [a, o] = d(!1), s = !!e;
|
|
4531
4551
|
return !s && !t ? null : /* @__PURE__ */ p("span", {
|
|
4532
4552
|
className: `infotip${r ? ` ${r}` : ""}`,
|
|
4533
4553
|
...i,
|
|
4534
|
-
children: /* @__PURE__ */ p(
|
|
4554
|
+
children: /* @__PURE__ */ p(Lt, {
|
|
4535
4555
|
trigger: /* @__PURE__ */ p("button", {
|
|
4536
4556
|
type: "button",
|
|
4537
4557
|
className: "infotip-btn",
|
|
4538
4558
|
"aria-label": e || "More information",
|
|
4539
|
-
children: /* @__PURE__ */ p(
|
|
4559
|
+
children: /* @__PURE__ */ p(V, {
|
|
4540
4560
|
name: "info",
|
|
4541
4561
|
size: 16
|
|
4542
4562
|
})
|
|
@@ -4561,8 +4581,8 @@ function Z() {
|
|
|
4561
4581
|
}
|
|
4562
4582
|
//#endregion
|
|
4563
4583
|
//#region src/components/useWuiControl.js
|
|
4564
|
-
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: a =
|
|
4565
|
-
let c = u(null), l = r ??
|
|
4584
|
+
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: a = zt, syncDeps: s = [] } = {}) {
|
|
4585
|
+
let c = u(null), l = r ?? Bt, d = i ?? Vt, f = (a || zt).join("\0"), p = (t) => {
|
|
4566
4586
|
c.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
|
|
4567
4587
|
};
|
|
4568
4588
|
return o(() => {
|
|
@@ -4575,7 +4595,7 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
4575
4595
|
]), o(() => {
|
|
4576
4596
|
let e = c.current;
|
|
4577
4597
|
if (!e) return;
|
|
4578
|
-
let t = f ? f.split("\0") :
|
|
4598
|
+
let t = f ? f.split("\0") : zt, r, i = () => {
|
|
4579
4599
|
let t = l(e);
|
|
4580
4600
|
Object.is(t, r) || (r = t, n?.(t));
|
|
4581
4601
|
};
|
|
@@ -4592,39 +4612,39 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
4592
4612
|
innerRef: c
|
|
4593
4613
|
};
|
|
4594
4614
|
}
|
|
4595
|
-
var
|
|
4596
|
-
function
|
|
4615
|
+
var zt = ["change"];
|
|
4616
|
+
function Bt(e) {
|
|
4597
4617
|
return e.value;
|
|
4598
4618
|
}
|
|
4599
|
-
function
|
|
4619
|
+
function Vt(e, t) {
|
|
4600
4620
|
let n = t ?? "";
|
|
4601
4621
|
String(e.value ?? "") !== String(n) && (e.value = n);
|
|
4602
4622
|
}
|
|
4603
|
-
function
|
|
4623
|
+
function Ht(e, t) {
|
|
4604
4624
|
let n = e || [], r = t || [];
|
|
4605
4625
|
return n.length === r.length && n.every((e, t) => e?.value === r[t]?.value && e?.label === r[t]?.label);
|
|
4606
4626
|
}
|
|
4607
|
-
function
|
|
4627
|
+
function Ut(e) {
|
|
4608
4628
|
return e.values;
|
|
4609
4629
|
}
|
|
4610
|
-
function
|
|
4630
|
+
function Wt(e, t) {
|
|
4611
4631
|
let n = t || [], r = e.values || [];
|
|
4612
4632
|
(n.length !== r.length || !n.every((e, t) => e === r[t])) && (e.values = n);
|
|
4613
4633
|
}
|
|
4614
|
-
function
|
|
4634
|
+
function Gt(e) {
|
|
4615
4635
|
return {
|
|
4616
4636
|
start: e.start,
|
|
4617
4637
|
end: e.end
|
|
4618
4638
|
};
|
|
4619
4639
|
}
|
|
4620
|
-
function
|
|
4640
|
+
function Kt(e, t) {
|
|
4621
4641
|
if (t === void 0) return;
|
|
4622
4642
|
let n = Number.parseFloat(t);
|
|
4623
4643
|
Number.isFinite(n) && e.value !== n && (e.value = n);
|
|
4624
4644
|
}
|
|
4625
4645
|
//#endregion
|
|
4626
4646
|
//#region src/components/AppAutocomplete.jsx
|
|
4627
|
-
var
|
|
4647
|
+
var qt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeholder: i = "Search…", minChars: a, debounce: c, disabled: l = !1, size: u, allowCustom: d = !1, name: f, label: h, error: g, hint: _, required: v = !1, help: y, helpLabel: b = "More information", fieldClassName: x = "", ...S }, C) {
|
|
4628
4648
|
N("AppAutocomplete", S);
|
|
4629
4649
|
let w = typeof r == "function", T = s(), E = f || T, { setRef: D, innerRef: O } = Q({
|
|
4630
4650
|
ref: C,
|
|
@@ -4673,7 +4693,7 @@ var Wt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4673
4693
|
children: [
|
|
4674
4694
|
h,
|
|
4675
4695
|
v && /* @__PURE__ */ p(Z, {}),
|
|
4676
|
-
y && /* @__PURE__ */ p(
|
|
4696
|
+
y && /* @__PURE__ */ p(Rt, {
|
|
4677
4697
|
label: b,
|
|
4678
4698
|
children: y
|
|
4679
4699
|
})
|
|
@@ -4707,14 +4727,14 @@ var Wt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4707
4727
|
}) : null
|
|
4708
4728
|
]
|
|
4709
4729
|
});
|
|
4710
|
-
}),
|
|
4730
|
+
}), Jt = /* @__PURE__ */ new Set([
|
|
4711
4731
|
"xs",
|
|
4712
4732
|
"sm",
|
|
4713
4733
|
"md",
|
|
4714
4734
|
"lg",
|
|
4715
4735
|
"xl",
|
|
4716
4736
|
"2xl"
|
|
4717
|
-
]),
|
|
4737
|
+
]), Yt = {
|
|
4718
4738
|
xs: 20,
|
|
4719
4739
|
sm: 24,
|
|
4720
4740
|
md: 32,
|
|
@@ -4722,30 +4742,30 @@ var Wt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4722
4742
|
xl: 64,
|
|
4723
4743
|
"2xl": 96
|
|
4724
4744
|
};
|
|
4725
|
-
function
|
|
4745
|
+
function Xt(e) {
|
|
4726
4746
|
let t = (e || "").trim();
|
|
4727
4747
|
if (!t) return "?";
|
|
4728
4748
|
let n = t.split(/\s+/).filter(Boolean);
|
|
4729
4749
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
4730
4750
|
}
|
|
4731
|
-
function
|
|
4751
|
+
function Zt(e) {
|
|
4732
4752
|
let t = e || "", n = 0;
|
|
4733
4753
|
for (let e = 0; e < t.length; e += 1) n = Math.imul(n, 31) + t.charCodeAt(e) >>> 0;
|
|
4734
4754
|
return n % 360;
|
|
4735
4755
|
}
|
|
4736
|
-
function
|
|
4756
|
+
function Qt(e) {
|
|
4737
4757
|
if (typeof e == "number") return e;
|
|
4738
|
-
if (
|
|
4758
|
+
if (Yt[e] != null) return Yt[e];
|
|
4739
4759
|
let t = Number.parseInt(e, 10);
|
|
4740
4760
|
return Number.isNaN(t) ? 32 : t;
|
|
4741
4761
|
}
|
|
4742
|
-
function
|
|
4762
|
+
function $t({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "primary", status: a = "none", ring: s = !1, label: c, icon: l, badge: u, href: h, onClick: g, linkComponent: _, className: v = "", ...y }) {
|
|
4743
4763
|
N("AppAvatar", y);
|
|
4744
4764
|
let { style: b, ...x } = y, [S, C] = d(!1);
|
|
4745
4765
|
o(() => {
|
|
4746
4766
|
C(!1);
|
|
4747
4767
|
}, [t]);
|
|
4748
|
-
let w = typeof n == "string" &&
|
|
4768
|
+
let w = typeof n == "string" && Jt.has(n), T = w ? null : typeof n == "number" || /^\d+$/.test(n) ? `${n}px` : n, E = h != null || g != null, D = t != null && t !== "" && !S, O = [
|
|
4749
4769
|
"avatar",
|
|
4750
4770
|
w && n !== "md" ? `avatar-${n}` : "",
|
|
4751
4771
|
r === "circle" ? "" : `avatar-${r}`,
|
|
@@ -4754,16 +4774,16 @@ function Xt({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4754
4774
|
E ? "avatar-clickable" : "",
|
|
4755
4775
|
v
|
|
4756
4776
|
].filter(Boolean).join(" "), k = {};
|
|
4757
|
-
T && (k["--avatar-size"] = T), i === "auto" && (k["--avatar-hue"] =
|
|
4777
|
+
T && (k["--avatar-size"] = T), i === "auto" && (k["--avatar-hue"] = Zt(e));
|
|
4758
4778
|
let A = Object.keys(k).length || b ? {
|
|
4759
4779
|
...k,
|
|
4760
4780
|
...b
|
|
4761
4781
|
} : void 0, j = /* @__PURE__ */ p("span", {
|
|
4762
4782
|
className: "avatar-face",
|
|
4763
4783
|
"aria-hidden": "true",
|
|
4764
|
-
children: l == null ?
|
|
4784
|
+
children: l == null ? Xt(e) : /* @__PURE__ */ p(V, {
|
|
4765
4785
|
name: l,
|
|
4766
|
-
size: Math.round(
|
|
4786
|
+
size: Math.round(Qt(n) * .55)
|
|
4767
4787
|
})
|
|
4768
4788
|
}), M = /* @__PURE__ */ m(f, { children: [
|
|
4769
4789
|
a !== "none" && /* @__PURE__ */ p("span", {
|
|
@@ -4825,7 +4845,7 @@ function Xt({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4825
4845
|
}
|
|
4826
4846
|
//#endregion
|
|
4827
4847
|
//#region src/components/AppAvatarGroup.jsx
|
|
4828
|
-
var
|
|
4848
|
+
var en = {
|
|
4829
4849
|
xs: 20,
|
|
4830
4850
|
sm: 24,
|
|
4831
4851
|
md: 32,
|
|
@@ -4833,16 +4853,16 @@ var Zt = {
|
|
|
4833
4853
|
xl: 64,
|
|
4834
4854
|
"2xl": 96
|
|
4835
4855
|
};
|
|
4836
|
-
function
|
|
4837
|
-
return e == null ? null : typeof e == "number" ? `${e}px` :
|
|
4856
|
+
function tn(e) {
|
|
4857
|
+
return e == null ? null : typeof e == "number" ? `${e}px` : en[e] == null ? /^\d+$/.test(e) ? `${e}px` : e : `${en[e]}px`;
|
|
4838
4858
|
}
|
|
4839
|
-
function
|
|
4859
|
+
function nn({ children: e, size: t, spacing: n = "normal", overflow: r, className: i = "", ...a }) {
|
|
4840
4860
|
N("AppAvatarGroup", a);
|
|
4841
4861
|
let { style: o, ...s } = a, c = [
|
|
4842
4862
|
"avatar-group",
|
|
4843
4863
|
n === "normal" ? "" : `avatar-group-${n}`,
|
|
4844
4864
|
i
|
|
4845
|
-
].filter(Boolean).join(" "), l =
|
|
4865
|
+
].filter(Boolean).join(" "), l = tn(t), u = l ? {
|
|
4846
4866
|
"--avatar-size": l,
|
|
4847
4867
|
...o
|
|
4848
4868
|
} : o, d = typeof r == "string" ? Number.parseInt(r, 10) : r;
|
|
@@ -4860,7 +4880,7 @@ function $t({ children: e, size: t, spacing: n = "normal", overflow: r, classNam
|
|
|
4860
4880
|
}
|
|
4861
4881
|
//#endregion
|
|
4862
4882
|
//#region src/components/AppBadge.jsx
|
|
4863
|
-
function
|
|
4883
|
+
function rn({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
4864
4884
|
return N("AppBadge", i), /* @__PURE__ */ p(g, {
|
|
4865
4885
|
bg: !1,
|
|
4866
4886
|
className: [
|
|
@@ -4874,18 +4894,18 @@ function en({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
|
4874
4894
|
}
|
|
4875
4895
|
//#endregion
|
|
4876
4896
|
//#region src/components/AppBanner.jsx
|
|
4877
|
-
var
|
|
4897
|
+
var an = [
|
|
4878
4898
|
"info",
|
|
4879
4899
|
"success",
|
|
4880
4900
|
"warning",
|
|
4881
4901
|
"danger",
|
|
4882
4902
|
"neutral"
|
|
4883
4903
|
];
|
|
4884
|
-
function
|
|
4904
|
+
function on({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDismiss: i, className: a = "", ...o }) {
|
|
4885
4905
|
N("AppBanner", o);
|
|
4886
4906
|
let [s, c] = d(!0);
|
|
4887
4907
|
if (!s) return null;
|
|
4888
|
-
let l =
|
|
4908
|
+
let l = an.includes(e) ? e : "info", u = () => {
|
|
4889
4909
|
c(!1), i?.();
|
|
4890
4910
|
};
|
|
4891
4911
|
return /* @__PURE__ */ m("div", {
|
|
@@ -4895,7 +4915,7 @@ function nn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4895
4915
|
children: [
|
|
4896
4916
|
t && /* @__PURE__ */ p("span", {
|
|
4897
4917
|
className: "wui-banner-icon",
|
|
4898
|
-
children:
|
|
4918
|
+
children: H(t, { size: 18 })
|
|
4899
4919
|
}),
|
|
4900
4920
|
/* @__PURE__ */ p("div", {
|
|
4901
4921
|
className: "wui-banner-body",
|
|
@@ -4906,7 +4926,7 @@ function nn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4906
4926
|
className: "wui-banner-dismiss",
|
|
4907
4927
|
"aria-label": "Dismiss",
|
|
4908
4928
|
onClick: u,
|
|
4909
|
-
children: /* @__PURE__ */ p(
|
|
4929
|
+
children: /* @__PURE__ */ p(V, {
|
|
4910
4930
|
name: "x",
|
|
4911
4931
|
size: 18
|
|
4912
4932
|
})
|
|
@@ -4916,12 +4936,12 @@ function nn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4916
4936
|
}
|
|
4917
4937
|
//#endregion
|
|
4918
4938
|
//#region src/components/AppBreadcrumbs.jsx
|
|
4919
|
-
function
|
|
4939
|
+
function sn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
4920
4940
|
return N("AppBreadcrumbs", r), /* @__PURE__ */ p(_, {
|
|
4921
4941
|
className: n || void 0,
|
|
4922
4942
|
...r,
|
|
4923
4943
|
children: e.map((n, r) => {
|
|
4924
|
-
let i = r === e.length - 1, a = n.icon ?
|
|
4944
|
+
let i = r === e.length - 1, a = n.icon ? H(n.icon, { size: 14 }) : null, o = {};
|
|
4925
4945
|
return i || (n.to && t ? o = {
|
|
4926
4946
|
linkAs: t,
|
|
4927
4947
|
linkProps: { to: n.to }
|
|
@@ -4935,17 +4955,17 @@ function rn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
4935
4955
|
}
|
|
4936
4956
|
//#endregion
|
|
4937
4957
|
//#region src/components/AppCallout.jsx
|
|
4938
|
-
var
|
|
4958
|
+
var cn = {
|
|
4939
4959
|
info: "info",
|
|
4940
4960
|
success: "check",
|
|
4941
4961
|
warning: "alert-triangle",
|
|
4942
4962
|
danger: "x"
|
|
4943
4963
|
};
|
|
4944
|
-
function
|
|
4964
|
+
function ln({ children: e, tone: t = "info", title: n, icon: r, image: i, imageAlt: a = "", size: o = "md", bordered: s = !0, action: c, dismissible: l = !1, onDismiss: u, className: f = "", ...h }) {
|
|
4945
4965
|
N("AppCallout", h);
|
|
4946
4966
|
let [g, _] = d(!0);
|
|
4947
4967
|
if (!g) return null;
|
|
4948
|
-
let v = r === void 0 ?
|
|
4968
|
+
let v = r === void 0 ? cn[t] : r === "none" ? null : r, y = !!i, b = y || !!v, x = b && !!n && e != null && e !== !1 && e !== "", S = x ? 13 : 11;
|
|
4949
4969
|
return /* @__PURE__ */ m("div", {
|
|
4950
4970
|
className: [
|
|
4951
4971
|
"info-callout",
|
|
@@ -4962,7 +4982,7 @@ function on({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
4962
4982
|
children: y ? /* @__PURE__ */ p("img", {
|
|
4963
4983
|
src: i,
|
|
4964
4984
|
alt: a
|
|
4965
|
-
}) : typeof v == "string" ? /* @__PURE__ */ p(
|
|
4985
|
+
}) : typeof v == "string" ? /* @__PURE__ */ p(V, {
|
|
4966
4986
|
name: v,
|
|
4967
4987
|
size: S
|
|
4968
4988
|
}) : v
|
|
@@ -4985,7 +5005,7 @@ function on({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
4985
5005
|
onClick: () => {
|
|
4986
5006
|
_(!1), u?.();
|
|
4987
5007
|
},
|
|
4988
|
-
children: /* @__PURE__ */ p(
|
|
5008
|
+
children: /* @__PURE__ */ p(V, {
|
|
4989
5009
|
name: "x",
|
|
4990
5010
|
size: 18
|
|
4991
5011
|
})
|
|
@@ -4995,13 +5015,13 @@ function on({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
4995
5015
|
}
|
|
4996
5016
|
//#endregion
|
|
4997
5017
|
//#region src/components/AppCard.jsx
|
|
4998
|
-
var
|
|
5018
|
+
var un = {
|
|
4999
5019
|
xs: 320,
|
|
5000
5020
|
sm: 420,
|
|
5001
5021
|
md: 560,
|
|
5002
5022
|
lg: 720
|
|
5003
5023
|
};
|
|
5004
|
-
function
|
|
5024
|
+
function dn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", header: i, headerExtra: a, headerActions: o, footer: s, media: c, children: l, variant: u = "default", tone: d = "primary", padding: h = "md", maxWidth: g, className: _ = "", bodyClassName: v = "", headerClassName: b = "", body: x = !0, lifted: S = !1, href: C, onClick: w, linkComponent: T, ...E }) {
|
|
5005
5025
|
N("AppCard", E);
|
|
5006
5026
|
let { style: D, ...O } = E, k = C != null || w != null, A = [
|
|
5007
5027
|
u && u !== "default" ? `card-${u}` : "",
|
|
@@ -5011,7 +5031,7 @@ function cn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5011
5031
|
g == null ? "" : "card-constrained",
|
|
5012
5032
|
k ? "card-clickable" : "",
|
|
5013
5033
|
_
|
|
5014
|
-
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 :
|
|
5034
|
+
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 : un[g] == null ? typeof g == "number" ? `${g}px` : g : `${un[g]}px`, M = j ? {
|
|
5015
5035
|
"--card-max-width": j,
|
|
5016
5036
|
...D
|
|
5017
5037
|
} : D, P = {};
|
|
@@ -5029,7 +5049,7 @@ function cn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5029
5049
|
as: "a",
|
|
5030
5050
|
href: C
|
|
5031
5051
|
}, w && (P.onClick = w));
|
|
5032
|
-
let F = e != null || t != null || n != null, I = i != null || F || a != null || o != null, L = n == null ? null : typeof n == "string" ? /* @__PURE__ */ p(
|
|
5052
|
+
let F = e != null || t != null || n != null, I = i != null || F || a != null || o != null, L = n == null ? null : typeof n == "string" ? /* @__PURE__ */ p(V, {
|
|
5033
5053
|
name: n,
|
|
5034
5054
|
size: 18
|
|
5035
5055
|
}) : n;
|
|
@@ -5082,7 +5102,7 @@ function cn({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5082
5102
|
}
|
|
5083
5103
|
//#endregion
|
|
5084
5104
|
//#region src/lib/CheckField.jsx
|
|
5085
|
-
var
|
|
5105
|
+
var fn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", rest: o = {}, inputType: c, wrapperClass: l }, u) {
|
|
5086
5106
|
let d = s(), f = t || d;
|
|
5087
5107
|
return /* @__PURE__ */ m("div", {
|
|
5088
5108
|
className: `${l}${a ? ` ${a}` : ""}`,
|
|
@@ -5110,8 +5130,8 @@ var ln = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5110
5130
|
}) : null
|
|
5111
5131
|
]
|
|
5112
5132
|
});
|
|
5113
|
-
}),
|
|
5114
|
-
return N("AppCheckbox", o), /* @__PURE__ */ p(
|
|
5133
|
+
}), pn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
5134
|
+
return N("AppCheckbox", o), /* @__PURE__ */ p(fn, {
|
|
5115
5135
|
ref: s,
|
|
5116
5136
|
label: e,
|
|
5117
5137
|
id: t,
|
|
@@ -5126,7 +5146,7 @@ var ln = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5126
5146
|
});
|
|
5127
5147
|
//#endregion
|
|
5128
5148
|
//#region src/components/AppChip.jsx
|
|
5129
|
-
function
|
|
5149
|
+
function mn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", size: i = "md", leadingIcon: a, avatar: o, onRemove: s, onClick: c, disabled: l = !1, removeLabel: u, className: d = "", ...h }) {
|
|
5130
5150
|
N("AppChip", h);
|
|
5131
5151
|
let g = e ?? t, _ = [
|
|
5132
5152
|
"chip",
|
|
@@ -5145,7 +5165,7 @@ function dn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5145
5165
|
}) : o
|
|
5146
5166
|
}) : a ? /* @__PURE__ */ p("span", {
|
|
5147
5167
|
className: "chip-ic",
|
|
5148
|
-
children: /* @__PURE__ */ p(
|
|
5168
|
+
children: /* @__PURE__ */ p(V, {
|
|
5149
5169
|
name: a,
|
|
5150
5170
|
size: i === "sm" ? 12 : 14
|
|
5151
5171
|
})
|
|
@@ -5171,7 +5191,7 @@ function dn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5171
5191
|
onClick: s,
|
|
5172
5192
|
disabled: l,
|
|
5173
5193
|
"aria-label": u || (typeof g == "string" ? `Remove ${g}` : "Remove"),
|
|
5174
|
-
children: /* @__PURE__ */ p(
|
|
5194
|
+
children: /* @__PURE__ */ p(V, {
|
|
5175
5195
|
name: "x",
|
|
5176
5196
|
size: i === "sm" ? 12 : 14
|
|
5177
5197
|
})
|
|
@@ -5180,7 +5200,7 @@ function dn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5180
5200
|
}
|
|
5181
5201
|
//#endregion
|
|
5182
5202
|
//#region src/components/AppChoiceCard.jsx
|
|
5183
|
-
function
|
|
5203
|
+
function hn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon: a, iconNode: o, iconSize: s = 18, image: c, imageAlt: l = "", children: u, title: d, description: h, checkIcon: g = "check", checkSize: _ = 12, className: v = "", ...y }) {
|
|
5184
5204
|
return N("AppChoiceCard", y), /* @__PURE__ */ m("label", {
|
|
5185
5205
|
className: `struct-card${c ? " struct-card-img-card" : ""}${r ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
5186
5206
|
...y,
|
|
@@ -5202,7 +5222,7 @@ function fn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5202
5222
|
})
|
|
5203
5223
|
}) : o || a ? /* @__PURE__ */ p("span", {
|
|
5204
5224
|
className: "struct-card-ic",
|
|
5205
|
-
children: o || /* @__PURE__ */ p(
|
|
5225
|
+
children: o || /* @__PURE__ */ p(V, {
|
|
5206
5226
|
name: a,
|
|
5207
5227
|
size: s
|
|
5208
5228
|
})
|
|
@@ -5219,7 +5239,7 @@ function fn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5219
5239
|
}),
|
|
5220
5240
|
/* @__PURE__ */ p("span", {
|
|
5221
5241
|
className: "struct-card-check",
|
|
5222
|
-
children: /* @__PURE__ */ p(
|
|
5242
|
+
children: /* @__PURE__ */ p(V, {
|
|
5223
5243
|
name: g,
|
|
5224
5244
|
size: _
|
|
5225
5245
|
})
|
|
@@ -5229,7 +5249,7 @@ function fn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5229
5249
|
}
|
|
5230
5250
|
//#endregion
|
|
5231
5251
|
//#region src/components/AppChoiceChip.jsx
|
|
5232
|
-
function
|
|
5252
|
+
function gn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChange: a, children: o, count: s, size: c = "md", className: l = "", ...u }) {
|
|
5233
5253
|
return N("AppChoiceChip", u), /* @__PURE__ */ m("label", {
|
|
5234
5254
|
className: `choice-chip${i ? " checked" : ""}${c === "sm" ? " choice-chip-sm" : c === "lg" ? " choice-chip-lg" : ""}${l ? ` ${l}` : ""}`,
|
|
5235
5255
|
...u,
|
|
@@ -5251,7 +5271,7 @@ function pn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChang
|
|
|
5251
5271
|
}
|
|
5252
5272
|
//#endregion
|
|
5253
5273
|
//#region src/components/AppColorField.jsx
|
|
5254
|
-
function
|
|
5274
|
+
function _n({ value: e = "#000000", onChange: t, label: n, required: r = !1, error: i, hint: a, name: o, id: c, disabled: l = !1, size: u = "md", className: d = "", ...f }) {
|
|
5255
5275
|
N("AppColorField", f);
|
|
5256
5276
|
let h = s(), g = c || h, _ = (e) => /^#[0-9a-f]{6}$/i.test(e), v = u === "sm" ? " color-field-sm" : u === "lg" ? " color-field-lg" : "", y = u === "sm" ? " input-sm" : u === "lg" ? " input-lg" : "";
|
|
5257
5277
|
return /* @__PURE__ */ m("div", {
|
|
@@ -5300,11 +5320,11 @@ function mn({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
5300
5320
|
}
|
|
5301
5321
|
//#endregion
|
|
5302
5322
|
//#region src/components/AppCompareTable.jsx
|
|
5303
|
-
function
|
|
5323
|
+
function vn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i }) {
|
|
5304
5324
|
N("AppCompareTable", i);
|
|
5305
5325
|
let a = (e) => e === !0 ? /* @__PURE__ */ p("span", {
|
|
5306
5326
|
className: "compare-yes",
|
|
5307
|
-
children: /* @__PURE__ */ p(
|
|
5327
|
+
children: /* @__PURE__ */ p(V, {
|
|
5308
5328
|
name: "check",
|
|
5309
5329
|
size: 16
|
|
5310
5330
|
})
|
|
@@ -5337,58 +5357,58 @@ function hn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5337
5357
|
}
|
|
5338
5358
|
//#endregion
|
|
5339
5359
|
//#region src/components/AppInput.jsx
|
|
5340
|
-
var
|
|
5360
|
+
var yn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", type: c = "text", size: l = "md", leftIcon: f, rightIcon: h, onRightIconClick: g, rightIconLabel: _, unit: v, id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, clearable: T = !1, showCount: E = !1, maxLength: D, prefix: O, suffix: k, floatingLabel: A = !1, variant: j, ...M }, P) {
|
|
5341
5361
|
N("AppInput", M);
|
|
5342
|
-
let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c,
|
|
5343
|
-
|
|
5344
|
-
},
|
|
5362
|
+
let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c, te = u(null), B = (e) => {
|
|
5363
|
+
te.current = e, typeof P == "function" ? P(e) : P && (P.current = e);
|
|
5364
|
+
}, ne = String(M.value ?? M.defaultValue ?? ""), [re, ie] = d(() => !!ne), [ae, oe] = d(() => ne.length), H = T && !w, se = T || E;
|
|
5345
5365
|
o(() => {
|
|
5346
|
-
if (!
|
|
5366
|
+
if (!se || M.value === void 0) return;
|
|
5347
5367
|
let e = String(M.value ?? "");
|
|
5348
|
-
|
|
5349
|
-
}, [M.value,
|
|
5350
|
-
let
|
|
5351
|
-
|
|
5352
|
-
},
|
|
5368
|
+
ie(!!e), oe(e.length);
|
|
5369
|
+
}, [M.value, se]);
|
|
5370
|
+
let ce = (e) => {
|
|
5371
|
+
ie(!!e.target.value), oe(e.target.value.length), M.onInput?.(e);
|
|
5372
|
+
}, le = H ? /* @__PURE__ */ p("button", {
|
|
5353
5373
|
type: "button",
|
|
5354
5374
|
className: "input-clear",
|
|
5355
5375
|
onClick: () => {
|
|
5356
|
-
let e =
|
|
5376
|
+
let e = te.current;
|
|
5357
5377
|
if (!e) return;
|
|
5358
5378
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
5359
|
-
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })),
|
|
5379
|
+
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ie(!1), e.focus();
|
|
5360
5380
|
},
|
|
5361
5381
|
"aria-label": "Clear",
|
|
5362
5382
|
tabIndex: -1,
|
|
5363
|
-
hidden: !
|
|
5364
|
-
children: /* @__PURE__ */ p(
|
|
5383
|
+
hidden: !re,
|
|
5384
|
+
children: /* @__PURE__ */ p(V, {
|
|
5365
5385
|
name: "x",
|
|
5366
5386
|
size: 16
|
|
5367
5387
|
})
|
|
5368
|
-
}) : null,
|
|
5388
|
+
}) : null, ue = n && R ? `${R}-error` : void 0, de = r && R ? `${R}-hint` : void 0, fe = ue || de, U = [
|
|
5369
5389
|
"input",
|
|
5370
5390
|
l === "sm" ? "input-sm" : "",
|
|
5371
5391
|
l === "lg" ? "input-lg" : "",
|
|
5372
5392
|
n ? "error" : "",
|
|
5373
5393
|
z ? "pw" : "",
|
|
5374
5394
|
v ? "num-input" : "",
|
|
5375
|
-
!(A && e || O || k || v || z || h) && T &&
|
|
5395
|
+
!(A && e || O || k || v || z || h) && T && H ? "has-clear" : "",
|
|
5376
5396
|
j === "bare" ? "input-bare" : "",
|
|
5377
5397
|
S
|
|
5378
5398
|
].filter(Boolean).join(" "), W = /* @__PURE__ */ p(x.Control, {
|
|
5379
5399
|
id: R,
|
|
5380
5400
|
name: b,
|
|
5381
5401
|
type: ee,
|
|
5382
|
-
className:
|
|
5402
|
+
className: U,
|
|
5383
5403
|
disabled: w,
|
|
5384
5404
|
required: t,
|
|
5385
5405
|
"aria-invalid": n ? "true" : "false",
|
|
5386
|
-
"aria-describedby":
|
|
5406
|
+
"aria-describedby": fe,
|
|
5387
5407
|
maxLength: D,
|
|
5388
5408
|
...M,
|
|
5389
5409
|
placeholder: A ? " " : M.placeholder,
|
|
5390
|
-
ref:
|
|
5391
|
-
onInput:
|
|
5410
|
+
ref: B,
|
|
5411
|
+
onInput: se ? ce : M.onInput
|
|
5392
5412
|
}), pe;
|
|
5393
5413
|
return pe = A && e ? /* @__PURE__ */ m("div", {
|
|
5394
5414
|
className: "field-float",
|
|
@@ -5421,7 +5441,7 @@ var gn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5421
5441
|
children: [
|
|
5422
5442
|
f && /* @__PURE__ */ p("span", {
|
|
5423
5443
|
className: "ic",
|
|
5424
|
-
children: /* @__PURE__ */ p(
|
|
5444
|
+
children: /* @__PURE__ */ p(V, {
|
|
5425
5445
|
name: f,
|
|
5426
5446
|
size: 16
|
|
5427
5447
|
})
|
|
@@ -5433,7 +5453,7 @@ var gn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5433
5453
|
onClick: () => I((e) => !e),
|
|
5434
5454
|
"aria-label": F ? "Hide password" : "Show password",
|
|
5435
5455
|
tabIndex: -1,
|
|
5436
|
-
children: /* @__PURE__ */ p(
|
|
5456
|
+
children: /* @__PURE__ */ p(V, {
|
|
5437
5457
|
name: F ? "eye-off" : "eye",
|
|
5438
5458
|
size: 18
|
|
5439
5459
|
})
|
|
@@ -5448,7 +5468,7 @@ var gn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5448
5468
|
disabled: !g,
|
|
5449
5469
|
tabIndex: -1,
|
|
5450
5470
|
"aria-label": _ || h,
|
|
5451
|
-
children: /* @__PURE__ */ p(
|
|
5471
|
+
children: /* @__PURE__ */ p(V, {
|
|
5452
5472
|
name: h,
|
|
5453
5473
|
size: 18
|
|
5454
5474
|
})
|
|
@@ -5458,19 +5478,19 @@ var gn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5458
5478
|
children: [
|
|
5459
5479
|
f && /* @__PURE__ */ p("span", {
|
|
5460
5480
|
className: "ic",
|
|
5461
|
-
children: /* @__PURE__ */ p(
|
|
5481
|
+
children: /* @__PURE__ */ p(V, {
|
|
5462
5482
|
name: f,
|
|
5463
5483
|
size: 16
|
|
5464
5484
|
})
|
|
5465
5485
|
}),
|
|
5466
5486
|
W,
|
|
5467
|
-
|
|
5487
|
+
le
|
|
5468
5488
|
]
|
|
5469
5489
|
}) : f ? /* @__PURE__ */ m("div", {
|
|
5470
5490
|
className: "input-icon",
|
|
5471
5491
|
children: [/* @__PURE__ */ p("span", {
|
|
5472
5492
|
className: "ic",
|
|
5473
|
-
children: /* @__PURE__ */ p(
|
|
5493
|
+
children: /* @__PURE__ */ p(V, {
|
|
5474
5494
|
name: f,
|
|
5475
5495
|
size: 16
|
|
5476
5496
|
})
|
|
@@ -5484,7 +5504,7 @@ var gn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5484
5504
|
children: [
|
|
5485
5505
|
e,
|
|
5486
5506
|
t && /* @__PURE__ */ p(Z, {}),
|
|
5487
|
-
i && /* @__PURE__ */ p(
|
|
5507
|
+
i && /* @__PURE__ */ p(Rt, {
|
|
5488
5508
|
label: a,
|
|
5489
5509
|
children: i
|
|
5490
5510
|
})
|
|
@@ -5493,47 +5513,47 @@ var gn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5493
5513
|
pe,
|
|
5494
5514
|
n ? /* @__PURE__ */ p("div", {
|
|
5495
5515
|
className: "field-error",
|
|
5496
|
-
id:
|
|
5516
|
+
id: ue,
|
|
5497
5517
|
children: n
|
|
5498
5518
|
}) : r ? /* @__PURE__ */ p("div", {
|
|
5499
5519
|
className: "field-hint",
|
|
5500
|
-
id:
|
|
5520
|
+
id: de,
|
|
5501
5521
|
children: r
|
|
5502
5522
|
}) : null,
|
|
5503
5523
|
E && /* @__PURE__ */ m("div", {
|
|
5504
|
-
className: `field-count${D &&
|
|
5505
|
-
children: [
|
|
5524
|
+
className: `field-count${D && ae >= D ? " at-limit" : ""}`,
|
|
5525
|
+
children: [ae, D ? ` / ${D}` : ""]
|
|
5506
5526
|
})
|
|
5507
5527
|
]
|
|
5508
5528
|
});
|
|
5509
|
-
}),
|
|
5529
|
+
}), bn = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", xn = {
|
|
5510
5530
|
sm: 380,
|
|
5511
5531
|
md: 440,
|
|
5512
5532
|
lg: 640,
|
|
5513
5533
|
xl: 880
|
|
5514
|
-
},
|
|
5515
|
-
function
|
|
5534
|
+
}, Sn = !1;
|
|
5535
|
+
function Cn() {
|
|
5516
5536
|
let e = !0;
|
|
5517
5537
|
try {
|
|
5518
5538
|
e = process.env.NODE_ENV !== "production";
|
|
5519
5539
|
} catch {
|
|
5520
5540
|
e = !0;
|
|
5521
5541
|
}
|
|
5522
|
-
!e ||
|
|
5542
|
+
!e || Sn || (Sn = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
5523
5543
|
}
|
|
5524
|
-
function
|
|
5525
|
-
N("AppModal", b);
|
|
5544
|
+
function wn({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a = "default", dismissible: s = !0, onClose: c, footer: l, size: d = "md", placement: f = "center", hideHeader: h = !1, staticBackdrop: g = !1, ariaLabel: _, className: v = "", children: y, ...b }) {
|
|
5545
|
+
N("AppModal", b), U("AppModal", "size", typeof d == "string" ? d : null, Object.keys(xn));
|
|
5526
5546
|
let { style: x, ...C } = b;
|
|
5527
|
-
h && !_ && typeof n != "string" &&
|
|
5547
|
+
h && !_ && typeof n != "string" && Cn();
|
|
5528
5548
|
let w = u(null);
|
|
5529
5549
|
o(() => {
|
|
5530
5550
|
if (!e) return;
|
|
5531
5551
|
let t = w.current?.closest(".modal-content");
|
|
5532
5552
|
if (!t) return;
|
|
5533
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
5553
|
+
let n = () => Array.from(t.querySelectorAll(bn));
|
|
5534
5554
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
5535
5555
|
}, [e]);
|
|
5536
|
-
let T = typeof d == "number" ? d :
|
|
5556
|
+
let T = typeof d == "number" ? d : xn[d] ?? xn.md, E = [
|
|
5537
5557
|
"wui-modal",
|
|
5538
5558
|
a === "default" ? "" : `tone-${a}`,
|
|
5539
5559
|
v
|
|
@@ -5564,7 +5584,7 @@ function xn({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
5564
5584
|
className: "wui-modal-heading",
|
|
5565
5585
|
children: [i && /* @__PURE__ */ p("span", {
|
|
5566
5586
|
className: "wui-modal-headicon",
|
|
5567
|
-
children: /* @__PURE__ */ p(
|
|
5587
|
+
children: /* @__PURE__ */ p(V, {
|
|
5568
5588
|
name: i,
|
|
5569
5589
|
size: 18
|
|
5570
5590
|
})
|
|
@@ -5618,30 +5638,30 @@ function xn({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
5618
5638
|
}
|
|
5619
5639
|
//#endregion
|
|
5620
5640
|
//#region src/components/ModalIcons.jsx
|
|
5621
|
-
var
|
|
5641
|
+
var Tn = (e) => function({ size: t = 72 }) {
|
|
5622
5642
|
return /* @__PURE__ */ p("wui-status-icon", {
|
|
5623
5643
|
tone: e,
|
|
5624
5644
|
size: t
|
|
5625
5645
|
});
|
|
5626
|
-
},
|
|
5627
|
-
success:
|
|
5628
|
-
error:
|
|
5629
|
-
warning:
|
|
5630
|
-
info:
|
|
5631
|
-
delete:
|
|
5646
|
+
}, En = {
|
|
5647
|
+
success: Tn("success"),
|
|
5648
|
+
error: Tn("error"),
|
|
5649
|
+
warning: Tn("warning"),
|
|
5650
|
+
info: Tn("info"),
|
|
5651
|
+
delete: Tn("delete")
|
|
5632
5652
|
};
|
|
5633
5653
|
//#endregion
|
|
5634
5654
|
//#region src/components/AppConfirmDialog.jsx
|
|
5635
|
-
function
|
|
5655
|
+
function Dn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", danger: a = !1, tone: s, confirmPhrase: c, onConfirm: l, onClose: u, loading: h = !1, staticBackdrop: g = !1, placement: _ = "center", className: v = "", ...y }) {
|
|
5636
5656
|
N("AppConfirmDialog", y);
|
|
5637
5657
|
let [b, x] = d("");
|
|
5638
5658
|
if (o(() => {
|
|
5639
5659
|
e || x("");
|
|
5640
5660
|
}, [e]), !e) return null;
|
|
5641
|
-
let S = !!c && b.trim() !== c, C =
|
|
5661
|
+
let S = !!c && b.trim() !== c, C = En[s || (a ? "delete" : "info")], w = () => {
|
|
5642
5662
|
h || u?.();
|
|
5643
5663
|
};
|
|
5644
|
-
return /* @__PURE__ */ p(
|
|
5664
|
+
return /* @__PURE__ */ p(wn, {
|
|
5645
5665
|
...y,
|
|
5646
5666
|
open: e,
|
|
5647
5667
|
hideHeader: !0,
|
|
@@ -5652,12 +5672,12 @@ function wn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5652
5672
|
className: ["wui-confirm", v].filter(Boolean).join(" "),
|
|
5653
5673
|
footer: /* @__PURE__ */ m("div", {
|
|
5654
5674
|
className: "wui-confirm-actions",
|
|
5655
|
-
children: [/* @__PURE__ */ p(
|
|
5675
|
+
children: [/* @__PURE__ */ p(he, {
|
|
5656
5676
|
variant: "secondary",
|
|
5657
5677
|
disabled: h,
|
|
5658
5678
|
onClick: w,
|
|
5659
5679
|
children: i
|
|
5660
|
-
}), /* @__PURE__ */ p(
|
|
5680
|
+
}), /* @__PURE__ */ p(he, {
|
|
5661
5681
|
variant: a ? "danger" : "primary",
|
|
5662
5682
|
disabled: S,
|
|
5663
5683
|
loading: h,
|
|
@@ -5682,7 +5702,7 @@ function wn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5682
5702
|
className: "wui-confirm-msg",
|
|
5683
5703
|
children: n
|
|
5684
5704
|
}),
|
|
5685
|
-
c && /* @__PURE__ */ p(
|
|
5705
|
+
c && /* @__PURE__ */ p(yn, {
|
|
5686
5706
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
5687
5707
|
label: /* @__PURE__ */ m(f, { children: [
|
|
5688
5708
|
"Type ",
|
|
@@ -5700,13 +5720,13 @@ function wn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5700
5720
|
}
|
|
5701
5721
|
//#endregion
|
|
5702
5722
|
//#region src/components/AppCopyButton.jsx
|
|
5703
|
-
var
|
|
5723
|
+
var On = {
|
|
5704
5724
|
sm: 14,
|
|
5705
5725
|
md: 16,
|
|
5706
5726
|
lg: 20
|
|
5707
5727
|
};
|
|
5708
|
-
function
|
|
5709
|
-
N("AppCopyButton", l);
|
|
5728
|
+
function kn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r = !1, size: i = "md", variant: o = "ghost", onCopied: s, className: c = "", ...l }) {
|
|
5729
|
+
N("AppCopyButton", l), U("AppCopyButton", "size", i, Object.keys(On));
|
|
5710
5730
|
let [u, f] = d(!1), m = a(async () => {
|
|
5711
5731
|
try {
|
|
5712
5732
|
if (navigator.clipboard?.writeText) {
|
|
@@ -5721,14 +5741,14 @@ function En({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5721
5741
|
document.body.removeChild(t), n && (f(!0), s?.(), setTimeout(() => f(!1), 2e3));
|
|
5722
5742
|
} catch {}
|
|
5723
5743
|
}, [e, s]), h = u ? n : t, g = u ? "check" : "files";
|
|
5724
|
-
return r ? /* @__PURE__ */ p(
|
|
5744
|
+
return r ? /* @__PURE__ */ p(se, {
|
|
5725
5745
|
icon: g,
|
|
5726
5746
|
label: h,
|
|
5727
|
-
size:
|
|
5747
|
+
size: On[i] ?? On.md,
|
|
5728
5748
|
onClick: m,
|
|
5729
5749
|
className: c,
|
|
5730
5750
|
...l
|
|
5731
|
-
}) : /* @__PURE__ */ p(
|
|
5751
|
+
}) : /* @__PURE__ */ p(he, {
|
|
5732
5752
|
leftIcon: g,
|
|
5733
5753
|
variant: o,
|
|
5734
5754
|
size: i,
|
|
@@ -5741,7 +5761,7 @@ function En({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5741
5761
|
}
|
|
5742
5762
|
//#endregion
|
|
5743
5763
|
//#region src/components/AppSkeleton.jsx
|
|
5744
|
-
function
|
|
5764
|
+
function An({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "", style: i, ...a }) {
|
|
5745
5765
|
return N("AppSkeleton", a), /* @__PURE__ */ p("span", {
|
|
5746
5766
|
className: `skeleton${r ? ` ${r}` : ""}`,
|
|
5747
5767
|
"aria-hidden": "true",
|
|
@@ -5754,28 +5774,28 @@ function Dn({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "
|
|
|
5754
5774
|
...a
|
|
5755
5775
|
});
|
|
5756
5776
|
}
|
|
5757
|
-
function
|
|
5758
|
-
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ p("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p(
|
|
5777
|
+
function jn({ rows: e = 4, cols: t = 5 }) {
|
|
5778
|
+
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ p("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p(An, {
|
|
5759
5779
|
width: t === 0 ? "70%" : "50%",
|
|
5760
5780
|
height: 12
|
|
5761
5781
|
}) }, `col-${t}`)) }, `row-${n}`));
|
|
5762
5782
|
}
|
|
5763
5783
|
//#endregion
|
|
5764
5784
|
//#region src/lib/pageWindow.js
|
|
5765
|
-
var
|
|
5785
|
+
var Mn = (e, t) => {
|
|
5766
5786
|
let n = [];
|
|
5767
5787
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
5768
5788
|
return n;
|
|
5769
5789
|
};
|
|
5770
|
-
function
|
|
5790
|
+
function Nn(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
5771
5791
|
let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
|
|
5772
|
-
if (i <= n * 2 + 3 + r * 2) return
|
|
5773
|
-
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u =
|
|
5774
|
-
return u.push(...c ? ["ellipsis-left"] :
|
|
5792
|
+
if (i <= n * 2 + 3 + r * 2) return Mn(1, i);
|
|
5793
|
+
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u = Mn(1, r);
|
|
5794
|
+
return u.push(...c ? ["ellipsis-left"] : Mn(r + 1, o - 1)), u.push(...Mn(o, s)), u.push(...l ? ["ellipsis-right"] : Mn(s + 1, i - r)), u.push(...Mn(i - r + 1, i)), u;
|
|
5775
5795
|
}
|
|
5776
5796
|
//#endregion
|
|
5777
5797
|
//#region src/components/AppSelectMini.jsx
|
|
5778
|
-
function
|
|
5798
|
+
function Pn({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", name: i, ariaLabel: a, id: s, disabled: c, size: l, icon: u, prefix: d, className: f, ...m }) {
|
|
5779
5799
|
N("AppSelectMini", m);
|
|
5780
5800
|
let { setRef: h, innerRef: g } = Q({
|
|
5781
5801
|
value: e ?? "",
|
|
@@ -5789,7 +5809,7 @@ function jn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5789
5809
|
label: e.label ?? e.text ?? "",
|
|
5790
5810
|
icon: e.icon
|
|
5791
5811
|
}));
|
|
5792
|
-
|
|
5812
|
+
Ht(t, e.options) || (e.options = t);
|
|
5793
5813
|
}, [n, g]), o(() => {
|
|
5794
5814
|
let e = g.current;
|
|
5795
5815
|
if (e) for (let [t, n] of [["icon", u], ["prefix", d]]) n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
@@ -5812,22 +5832,22 @@ function jn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5812
5832
|
}
|
|
5813
5833
|
//#endregion
|
|
5814
5834
|
//#region src/components/AppTablePagination.jsx
|
|
5815
|
-
var
|
|
5835
|
+
var Fn = [
|
|
5816
5836
|
5,
|
|
5817
5837
|
10,
|
|
5818
5838
|
25,
|
|
5819
5839
|
50
|
|
5820
5840
|
];
|
|
5821
|
-
function
|
|
5841
|
+
function In({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRow: a, onPageChange: o, onPageSizeChange: s, pageSizes: c = Fn, mode: l = "prev-next", showPageSize: u = !0, className: d = "", ...f }) {
|
|
5822
5842
|
N("AppTablePagination", f);
|
|
5823
|
-
let h = l === "numbered", g = h ?
|
|
5843
|
+
let h = l === "numbered", g = h ? Nn(e, t) : null;
|
|
5824
5844
|
return /* @__PURE__ */ m("div", {
|
|
5825
5845
|
className: `table-pagination${d ? ` ${d}` : ""}`,
|
|
5826
5846
|
...f,
|
|
5827
5847
|
children: [
|
|
5828
5848
|
u && /* @__PURE__ */ m("span", {
|
|
5829
5849
|
className: "tpg-rows",
|
|
5830
|
-
children: ["Rows per page:", /* @__PURE__ */ p(
|
|
5850
|
+
children: ["Rows per page:", /* @__PURE__ */ p(Pn, {
|
|
5831
5851
|
value: n,
|
|
5832
5852
|
onChange: (e) => s(Number(e)),
|
|
5833
5853
|
ariaLabel: "Rows per page",
|
|
@@ -5856,7 +5876,7 @@ function Nn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
5856
5876
|
onClick: () => o(Math.max(1, e - 1)),
|
|
5857
5877
|
disabled: e <= 1,
|
|
5858
5878
|
"aria-label": "Previous page",
|
|
5859
|
-
children: /* @__PURE__ */ p(
|
|
5879
|
+
children: /* @__PURE__ */ p(V, {
|
|
5860
5880
|
name: "arrow-left",
|
|
5861
5881
|
size: 18
|
|
5862
5882
|
})
|
|
@@ -5879,7 +5899,7 @@ function Nn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
5879
5899
|
onClick: () => o(Math.min(t, e + 1)),
|
|
5880
5900
|
disabled: e >= t,
|
|
5881
5901
|
"aria-label": "Next page",
|
|
5882
|
-
children: /* @__PURE__ */ p(
|
|
5902
|
+
children: /* @__PURE__ */ p(V, {
|
|
5883
5903
|
name: "arrow-right",
|
|
5884
5904
|
size: 18
|
|
5885
5905
|
})
|
|
@@ -5891,13 +5911,13 @@ function Nn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
5891
5911
|
}
|
|
5892
5912
|
//#endregion
|
|
5893
5913
|
//#region src/components/AppDataTable.jsx
|
|
5894
|
-
function
|
|
5914
|
+
function Ln(e) {
|
|
5895
5915
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
5896
5916
|
}
|
|
5897
|
-
function
|
|
5917
|
+
function Rn(e) {
|
|
5898
5918
|
return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
|
|
5899
5919
|
}
|
|
5900
|
-
function
|
|
5920
|
+
function zn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a, loading: o = !1, skeletonRows: s = 5, empty: c = "No records found.", emptyFiltered: l, sourceCount: u, rowActions: h, rowActionsLabel: g, pagination: _, ariaLabel: v, className: y = "", wrapperClassName: b = "", selectable: x = !1, selectedIds: S, onToggleRow: C, onToggleAll: w, renderExpanded: T, ...E }) {
|
|
5901
5921
|
N("AppDataTable", E);
|
|
5902
5922
|
let D = typeof T == "function", [O, k] = d(() => /* @__PURE__ */ new Set()), A = (e) => k((t) => {
|
|
5903
5923
|
let n = new Set(t);
|
|
@@ -5933,7 +5953,7 @@ function In({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5933
5953
|
e.map((e, t) => {
|
|
5934
5954
|
let n = !!(e.sortable && a), r = i && i.key === e.key;
|
|
5935
5955
|
return /* @__PURE__ */ m("th", {
|
|
5936
|
-
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") +
|
|
5956
|
+
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") + Ln(e.align),
|
|
5937
5957
|
style: e.width ? { width: e.width } : void 0,
|
|
5938
5958
|
tabIndex: n ? 0 : void 0,
|
|
5939
5959
|
"aria-sort": r ? i.dir === "asc" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
@@ -5943,7 +5963,7 @@ function In({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5943
5963
|
} : void 0,
|
|
5944
5964
|
children: [e.label, n && /* @__PURE__ */ p("span", {
|
|
5945
5965
|
className: "sort-icon",
|
|
5946
|
-
children: /* @__PURE__ */ p(
|
|
5966
|
+
children: /* @__PURE__ */ p(V, {
|
|
5947
5967
|
name: "chevrons-up-down",
|
|
5948
5968
|
size: 14
|
|
5949
5969
|
})
|
|
@@ -5960,7 +5980,7 @@ function In({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5960
5980
|
children: "Actions"
|
|
5961
5981
|
})
|
|
5962
5982
|
}))
|
|
5963
|
-
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(
|
|
5983
|
+
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(jn, {
|
|
5964
5984
|
rows: s,
|
|
5965
5985
|
cols: j
|
|
5966
5986
|
}) : n?.length ? n.map((n, i) => {
|
|
@@ -5977,7 +5997,7 @@ function In({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5977
5997
|
"aria-controls": o ? `${s}-expanded` : void 0,
|
|
5978
5998
|
"aria-label": o ? "Collapse row" : "Expand row",
|
|
5979
5999
|
onClick: () => A(a),
|
|
5980
|
-
children: /* @__PURE__ */ p(
|
|
6000
|
+
children: /* @__PURE__ */ p(V, {
|
|
5981
6001
|
name: "chevron-down",
|
|
5982
6002
|
size: 16
|
|
5983
6003
|
})
|
|
@@ -5994,9 +6014,9 @@ function In({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5994
6014
|
})
|
|
5995
6015
|
}),
|
|
5996
6016
|
e.map((e, t) => /* @__PURE__ */ p("td", {
|
|
5997
|
-
className: (t === 0 ? "wui-name-cell " : "") +
|
|
6017
|
+
className: (t === 0 ? "wui-name-cell " : "") + Ln(e.align) + (e.cellClassName ? ` ${e.cellClassName}` : ""),
|
|
5998
6018
|
style: e.cellStyle,
|
|
5999
|
-
children: e.render ? e.render(n) :
|
|
6019
|
+
children: e.render ? e.render(n) : Rn(n[e.key])
|
|
6000
6020
|
}, e.key)),
|
|
6001
6021
|
h && /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p("div", {
|
|
6002
6022
|
className: "u-row-actions",
|
|
@@ -6017,7 +6037,7 @@ function In({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6017
6037
|
children: L
|
|
6018
6038
|
}) }) })]
|
|
6019
6039
|
})
|
|
6020
|
-
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(
|
|
6040
|
+
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(In, {
|
|
6021
6041
|
page: _.page,
|
|
6022
6042
|
totalPages: _.totalPages,
|
|
6023
6043
|
pageSize: _.pageSize,
|
|
@@ -6030,7 +6050,7 @@ function In({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6030
6050
|
}
|
|
6031
6051
|
//#endregion
|
|
6032
6052
|
//#region src/components/AppDatePicker.jsx
|
|
6033
|
-
var
|
|
6053
|
+
var Bn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, placeholder: u = "Enter Date", disabled: d, size: f, firstDay: h, id: g, ariaLabel: _, className: v = "", ...y }, b) {
|
|
6034
6054
|
N("AppDatePicker", y);
|
|
6035
6055
|
let x = s(), S = g || o || x, { setRef: C } = Q({
|
|
6036
6056
|
ref: b,
|
|
@@ -6074,7 +6094,7 @@ var Ln = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6074
6094
|
})
|
|
6075
6095
|
]
|
|
6076
6096
|
});
|
|
6077
|
-
}),
|
|
6097
|
+
}), Vn = i(function({ start: e, end: t, onChange: n, label: r, required: i = !1, hint: a, error: c, startName: l, endName: u, min: d, max: f, placeholder: h = "Start – End", disabled: g, size: _, firstDay: v, id: y, ariaLabel: b, className: x = "", ...S }, C) {
|
|
6078
6098
|
N("AppDateRangePicker", S);
|
|
6079
6099
|
let w = s(), T = y || l || w, { setRef: E, innerRef: D } = Q({
|
|
6080
6100
|
ref: C,
|
|
@@ -6135,12 +6155,12 @@ var Ln = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6135
6155
|
});
|
|
6136
6156
|
//#endregion
|
|
6137
6157
|
//#region src/lib/emptyValue.js
|
|
6138
|
-
function
|
|
6158
|
+
function Hn(e) {
|
|
6139
6159
|
return e == null || e === "";
|
|
6140
6160
|
}
|
|
6141
6161
|
//#endregion
|
|
6142
6162
|
//#region src/components/AppDescriptions.jsx
|
|
6143
|
-
function
|
|
6163
|
+
function Un({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
6144
6164
|
return N("AppDescriptions", o), /* @__PURE__ */ m("div", {
|
|
6145
6165
|
className: [
|
|
6146
6166
|
"descs",
|
|
@@ -6156,7 +6176,7 @@ function Bn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6156
6176
|
}), /* @__PURE__ */ p("dl", {
|
|
6157
6177
|
className: "descs-list",
|
|
6158
6178
|
children: e.map((e, t) => {
|
|
6159
|
-
let n =
|
|
6179
|
+
let n = Hn(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
6160
6180
|
return /* @__PURE__ */ m("div", {
|
|
6161
6181
|
className: "descs-item",
|
|
6162
6182
|
style: { "--descs-span": r },
|
|
@@ -6174,24 +6194,24 @@ function Bn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6174
6194
|
}
|
|
6175
6195
|
//#endregion
|
|
6176
6196
|
//#region src/components/AppDropdown.jsx
|
|
6177
|
-
var
|
|
6178
|
-
function
|
|
6197
|
+
var Wn = !1;
|
|
6198
|
+
function Gn() {
|
|
6179
6199
|
let e = !0;
|
|
6180
6200
|
try {
|
|
6181
6201
|
e = process.env.NODE_ENV !== "production";
|
|
6182
6202
|
} catch {
|
|
6183
6203
|
e = !0;
|
|
6184
6204
|
}
|
|
6185
|
-
!e ||
|
|
6205
|
+
!e || Wn || (Wn = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
6186
6206
|
}
|
|
6187
|
-
function
|
|
6188
|
-
N("AppDropdown", d), !u && !i && !r &&
|
|
6207
|
+
function Kn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i, align: a = "end", items: o = [], menuClassName: s = "", linkComponent: c, children: l, trigger: u, ...d }) {
|
|
6208
|
+
N("AppDropdown", d), !u && !i && !r && Gn();
|
|
6189
6209
|
let f = n ?? (u ? "wui-dropdown-trigger" : "topbar-icon-btn");
|
|
6190
6210
|
return /* @__PURE__ */ m(b, {
|
|
6191
6211
|
align: a,
|
|
6192
6212
|
...d,
|
|
6193
6213
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
6194
|
-
as:
|
|
6214
|
+
as: qn,
|
|
6195
6215
|
icon: e,
|
|
6196
6216
|
iconSize: t,
|
|
6197
6217
|
btnClassName: f,
|
|
@@ -6220,20 +6240,20 @@ function Un({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6220
6240
|
children: [e.image ? /* @__PURE__ */ p("img", {
|
|
6221
6241
|
src: e.image,
|
|
6222
6242
|
alt: ""
|
|
6223
|
-
}) :
|
|
6243
|
+
}) : H(e.icon, { size: 16 }), e.label]
|
|
6224
6244
|
}, e.key);
|
|
6225
6245
|
})
|
|
6226
6246
|
})]
|
|
6227
6247
|
});
|
|
6228
6248
|
}
|
|
6229
|
-
var
|
|
6249
|
+
var qn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-btn", trigger: r, "aria-label": i, className: a, ...o }, s) {
|
|
6230
6250
|
return /* @__PURE__ */ p("button", {
|
|
6231
6251
|
ref: s,
|
|
6232
6252
|
type: "button",
|
|
6233
6253
|
className: n,
|
|
6234
6254
|
"aria-label": i,
|
|
6235
6255
|
...o,
|
|
6236
|
-
children: r ?? /* @__PURE__ */ p(
|
|
6256
|
+
children: r ?? /* @__PURE__ */ p(V, {
|
|
6237
6257
|
name: e,
|
|
6238
6258
|
size: t
|
|
6239
6259
|
})
|
|
@@ -6241,16 +6261,16 @@ var Wn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
6241
6261
|
});
|
|
6242
6262
|
//#endregion
|
|
6243
6263
|
//#region src/lib/fileItem.js
|
|
6244
|
-
function
|
|
6264
|
+
function Jn(e) {
|
|
6245
6265
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
6246
6266
|
}
|
|
6247
|
-
function
|
|
6267
|
+
function Yn(e) {
|
|
6248
6268
|
return e instanceof File ? e.name : e?.name;
|
|
6249
6269
|
}
|
|
6250
|
-
function
|
|
6270
|
+
function Xn(e) {
|
|
6251
6271
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
6252
6272
|
}
|
|
6253
|
-
function
|
|
6273
|
+
function Zn(e, t) {
|
|
6254
6274
|
let [n, r] = d(null);
|
|
6255
6275
|
return o(() => {
|
|
6256
6276
|
if (!t) {
|
|
@@ -6266,8 +6286,8 @@ function Jn(e, t) {
|
|
|
6266
6286
|
}
|
|
6267
6287
|
//#endregion
|
|
6268
6288
|
//#region src/lib/FileItemRow.jsx
|
|
6269
|
-
function
|
|
6270
|
-
let i =
|
|
6289
|
+
function Qn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
6290
|
+
let i = Zn(e, t), a = Yn(e), o = Xn(e);
|
|
6271
6291
|
return /* @__PURE__ */ m("div", {
|
|
6272
6292
|
className: "attach-item",
|
|
6273
6293
|
children: [
|
|
@@ -6276,7 +6296,7 @@ function Yn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6276
6296
|
children: i ? /* @__PURE__ */ p("img", {
|
|
6277
6297
|
src: i,
|
|
6278
6298
|
alt: a
|
|
6279
|
-
}) : /* @__PURE__ */ p(
|
|
6299
|
+
}) : /* @__PURE__ */ p(V, {
|
|
6280
6300
|
name: "file-text",
|
|
6281
6301
|
size: 18
|
|
6282
6302
|
})
|
|
@@ -6296,7 +6316,7 @@ function Yn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6296
6316
|
className: "attach-item-remove",
|
|
6297
6317
|
"aria-label": `Remove ${a || r}`,
|
|
6298
6318
|
onClick: n,
|
|
6299
|
-
children: /* @__PURE__ */ p(
|
|
6319
|
+
children: /* @__PURE__ */ p(V, {
|
|
6300
6320
|
name: "x",
|
|
6301
6321
|
size: 16
|
|
6302
6322
|
})
|
|
@@ -6306,15 +6326,15 @@ function Yn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6306
6326
|
}
|
|
6307
6327
|
//#endregion
|
|
6308
6328
|
//#region src/components/AppFileAttachment.jsx
|
|
6309
|
-
function
|
|
6329
|
+
function $n({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = Et, maxSizeMb: o = 5, optional: c = !1, error: l, id: u, ...h }) {
|
|
6310
6330
|
N("AppFileAttachment", h);
|
|
6311
|
-
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x =
|
|
6331
|
+
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x = Mt(a), S = (e) => e instanceof File ? jt(e) : x || jt(e), C = !i && b.length === 1 && S(b[0]);
|
|
6312
6332
|
function w(e) {
|
|
6313
6333
|
let n = Array.from(e.target.files || []);
|
|
6314
6334
|
if (e.target.value = "", !n.length) return;
|
|
6315
6335
|
let s = [], c = "";
|
|
6316
6336
|
for (let e of n) {
|
|
6317
|
-
let t =
|
|
6337
|
+
let t = Ft(e, {
|
|
6318
6338
|
accept: a,
|
|
6319
6339
|
maxSizeMb: o
|
|
6320
6340
|
});
|
|
@@ -6325,8 +6345,8 @@ function Xn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6325
6345
|
s.push(e);
|
|
6326
6346
|
}
|
|
6327
6347
|
if (y(c), s.length) if (i) {
|
|
6328
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
6329
|
-
r(e.concat(s.filter((e) => !n.has(
|
|
6348
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(Jn));
|
|
6349
|
+
r(e.concat(s.filter((e) => !n.has(Jn(e)))));
|
|
6330
6350
|
} else r(s[0]);
|
|
6331
6351
|
}
|
|
6332
6352
|
function T(e) {
|
|
@@ -6350,7 +6370,7 @@ function Xn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6350
6370
|
children: [
|
|
6351
6371
|
/* @__PURE__ */ p("span", {
|
|
6352
6372
|
className: "attach-drop-icon",
|
|
6353
|
-
children: /* @__PURE__ */ p(
|
|
6373
|
+
children: /* @__PURE__ */ p(V, {
|
|
6354
6374
|
name: x ? "image" : "file-text",
|
|
6355
6375
|
size: 18
|
|
6356
6376
|
})
|
|
@@ -6363,7 +6383,7 @@ function Xn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6363
6383
|
}), /* @__PURE__ */ m("span", {
|
|
6364
6384
|
className: "attach-drop-hint",
|
|
6365
6385
|
children: [
|
|
6366
|
-
|
|
6386
|
+
Nt(a),
|
|
6367
6387
|
", up to ",
|
|
6368
6388
|
o,
|
|
6369
6389
|
" MB"
|
|
@@ -6385,17 +6405,17 @@ function Xn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6385
6405
|
onChange: w,
|
|
6386
6406
|
...h
|
|
6387
6407
|
})] }),
|
|
6388
|
-
C ? /* @__PURE__ */ p(
|
|
6408
|
+
C ? /* @__PURE__ */ p(er, {
|
|
6389
6409
|
item: b[0],
|
|
6390
6410
|
isImage: !0,
|
|
6391
6411
|
onRemove: () => T(0)
|
|
6392
6412
|
}) : b.length > 0 && /* @__PURE__ */ p("div", {
|
|
6393
6413
|
className: "attach-list",
|
|
6394
|
-
children: b.map((e, t) => /* @__PURE__ */ p(
|
|
6414
|
+
children: b.map((e, t) => /* @__PURE__ */ p(Qn, {
|
|
6395
6415
|
item: e,
|
|
6396
6416
|
isImage: S(e),
|
|
6397
6417
|
onRemove: () => T(t)
|
|
6398
|
-
},
|
|
6418
|
+
}, Jn(e)))
|
|
6399
6419
|
}),
|
|
6400
6420
|
E && /* @__PURE__ */ p("div", {
|
|
6401
6421
|
className: "field-error",
|
|
@@ -6404,8 +6424,8 @@ function Xn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6404
6424
|
]
|
|
6405
6425
|
});
|
|
6406
6426
|
}
|
|
6407
|
-
function
|
|
6408
|
-
let r =
|
|
6427
|
+
function er({ item: e, isImage: t, onRemove: n }) {
|
|
6428
|
+
let r = Zn(e, t), i = Yn(e), a = Xn(e);
|
|
6409
6429
|
return /* @__PURE__ */ m("div", {
|
|
6410
6430
|
className: "attach-preview",
|
|
6411
6431
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -6418,7 +6438,7 @@ function Zn({ item: e, isImage: t, onRemove: n }) {
|
|
|
6418
6438
|
className: "attach-remove",
|
|
6419
6439
|
"aria-label": "Remove attachment",
|
|
6420
6440
|
onClick: n,
|
|
6421
|
-
children: /* @__PURE__ */ p(
|
|
6441
|
+
children: /* @__PURE__ */ p(V, {
|
|
6422
6442
|
name: "x",
|
|
6423
6443
|
size: 18
|
|
6424
6444
|
})
|
|
@@ -6437,18 +6457,18 @@ function Zn({ item: e, isImage: t, onRemove: n }) {
|
|
|
6437
6457
|
}
|
|
6438
6458
|
//#endregion
|
|
6439
6459
|
//#region src/components/AppFilePicker.jsx
|
|
6440
|
-
function
|
|
6460
|
+
function tr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles: a, accept: c = ".jpg,.jpeg,.png", maxSizeMb: l = 5, required: f, error: h, className: g = "", ..._ }) {
|
|
6441
6461
|
N("AppFilePicker", _);
|
|
6442
6462
|
let [v, y] = d(null), [b, x] = d(!1), [S, C] = d(""), w = u(null), T = s(), E = n || T;
|
|
6443
6463
|
o(() => {
|
|
6444
|
-
if (!i && t instanceof File &&
|
|
6464
|
+
if (!i && t instanceof File && jt(t)) {
|
|
6445
6465
|
let e = URL.createObjectURL(t);
|
|
6446
6466
|
return y(e), () => URL.revokeObjectURL(e);
|
|
6447
6467
|
}
|
|
6448
6468
|
y(null);
|
|
6449
6469
|
}, [t, i]);
|
|
6450
|
-
let D = i ? Array.isArray(t) ? t : t ? [t] : [] : [], O = h || S, k =
|
|
6451
|
-
let t =
|
|
6470
|
+
let D = i ? Array.isArray(t) ? t : t ? [t] : [] : [], O = h || S, k = Mt(c), A = !i && !!t, j = A && (t instanceof File ? jt(t) : k || jt(t)), M = t?.name, P = j ? t?.url || v : null, F = (e) => {
|
|
6471
|
+
let t = Ft(e, {
|
|
6452
6472
|
accept: c,
|
|
6453
6473
|
maxSizeMb: l
|
|
6454
6474
|
});
|
|
@@ -6456,9 +6476,9 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6456
6476
|
}, I = (e) => {
|
|
6457
6477
|
let n = Array.from(e || []);
|
|
6458
6478
|
if (!n.length) return;
|
|
6459
|
-
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(
|
|
6479
|
+
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(Jn)), s = "", u = [];
|
|
6460
6480
|
for (let e of n) {
|
|
6461
|
-
let t =
|
|
6481
|
+
let t = Ft(e, {
|
|
6462
6482
|
accept: c,
|
|
6463
6483
|
maxSizeMb: l
|
|
6464
6484
|
});
|
|
@@ -6466,7 +6486,7 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6466
6486
|
s ||= t;
|
|
6467
6487
|
continue;
|
|
6468
6488
|
}
|
|
6469
|
-
o.has(
|
|
6489
|
+
o.has(Jn(e)) || (o.add(Jn(e)), u.push(e));
|
|
6470
6490
|
}
|
|
6471
6491
|
let d = i.concat(u);
|
|
6472
6492
|
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`), C(s), r(d);
|
|
@@ -6486,7 +6506,7 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6486
6506
|
t && F(t);
|
|
6487
6507
|
}, z = (e) => {
|
|
6488
6508
|
C(""), r(D.filter((t, n) => n !== e));
|
|
6489
|
-
}, ee = () => w.current?.click(),
|
|
6509
|
+
}, ee = () => w.current?.click(), te = /* @__PURE__ */ p("input", {
|
|
6490
6510
|
id: E,
|
|
6491
6511
|
name: n,
|
|
6492
6512
|
ref: w,
|
|
@@ -6522,7 +6542,7 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6522
6542
|
className: "file-preview-img"
|
|
6523
6543
|
}) : /* @__PURE__ */ m("span", {
|
|
6524
6544
|
className: "file-preview-file",
|
|
6525
|
-
children: [/* @__PURE__ */ p(
|
|
6545
|
+
children: [/* @__PURE__ */ p(V, {
|
|
6526
6546
|
name: "file-text",
|
|
6527
6547
|
size: 28
|
|
6528
6548
|
}), /* @__PURE__ */ p("span", {
|
|
@@ -6534,7 +6554,7 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6534
6554
|
children: /* @__PURE__ */ m("span", {
|
|
6535
6555
|
className: "file-preview-cta",
|
|
6536
6556
|
children: [
|
|
6537
|
-
/* @__PURE__ */ p(
|
|
6557
|
+
/* @__PURE__ */ p(V, {
|
|
6538
6558
|
name: j ? "image" : "file-text",
|
|
6539
6559
|
size: 16
|
|
6540
6560
|
}),
|
|
@@ -6550,12 +6570,12 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6550
6570
|
"aria-label": `Remove ${e}`,
|
|
6551
6571
|
title: "Remove image",
|
|
6552
6572
|
onClick: () => r(null),
|
|
6553
|
-
children: /* @__PURE__ */ p(
|
|
6573
|
+
children: /* @__PURE__ */ p(V, {
|
|
6554
6574
|
name: "x",
|
|
6555
6575
|
size: 16
|
|
6556
6576
|
})
|
|
6557
6577
|
}),
|
|
6558
|
-
|
|
6578
|
+
te
|
|
6559
6579
|
]
|
|
6560
6580
|
}) : /* @__PURE__ */ m("div", {
|
|
6561
6581
|
className: `file-input file-input-tall${b ? " dragging" : ""}${O ? " error" : ""}${i && D.length > 0 ? " has-files" : ""}`,
|
|
@@ -6573,7 +6593,7 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6573
6593
|
children: [
|
|
6574
6594
|
/* @__PURE__ */ p("span", {
|
|
6575
6595
|
className: "file-input-icon",
|
|
6576
|
-
children: /* @__PURE__ */ p(
|
|
6596
|
+
children: /* @__PURE__ */ p(V, {
|
|
6577
6597
|
name: "upload",
|
|
6578
6598
|
size: 24
|
|
6579
6599
|
})
|
|
@@ -6588,7 +6608,7 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6588
6608
|
/* @__PURE__ */ m("span", {
|
|
6589
6609
|
className: "file-input-text",
|
|
6590
6610
|
children: [
|
|
6591
|
-
|
|
6611
|
+
Nt(c),
|
|
6592
6612
|
" · up to ",
|
|
6593
6613
|
l,
|
|
6594
6614
|
" MB"
|
|
@@ -6596,15 +6616,15 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6596
6616
|
})
|
|
6597
6617
|
]
|
|
6598
6618
|
}),
|
|
6599
|
-
|
|
6619
|
+
te,
|
|
6600
6620
|
i && D.length > 0 && /* @__PURE__ */ p("div", {
|
|
6601
6621
|
className: "attach-list",
|
|
6602
|
-
children: D.map((e, t) => /* @__PURE__ */ p(
|
|
6622
|
+
children: D.map((e, t) => /* @__PURE__ */ p(Qn, {
|
|
6603
6623
|
item: e,
|
|
6604
|
-
isImage: e instanceof File ?
|
|
6624
|
+
isImage: e instanceof File ? jt(e) : k || jt(e),
|
|
6605
6625
|
noun: "file",
|
|
6606
6626
|
onRemove: () => z(t)
|
|
6607
|
-
},
|
|
6627
|
+
}, Jn(e)))
|
|
6608
6628
|
})
|
|
6609
6629
|
]
|
|
6610
6630
|
}),
|
|
@@ -6617,7 +6637,7 @@ function Qn({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6617
6637
|
}
|
|
6618
6638
|
//#endregion
|
|
6619
6639
|
//#region src/components/AppFloatingDock.jsx
|
|
6620
|
-
function
|
|
6640
|
+
function nr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
6621
6641
|
return N("AppFloatingDock", s), /* @__PURE__ */ p("wui-dock", {
|
|
6622
6642
|
role: "navigation",
|
|
6623
6643
|
"aria-label": n,
|
|
@@ -6633,7 +6653,7 @@ function $n({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6633
6653
|
children: e.title
|
|
6634
6654
|
}), /* @__PURE__ */ p("span", {
|
|
6635
6655
|
className: "dock-item-icon",
|
|
6636
|
-
children:
|
|
6656
|
+
children: H(e.icon, { size: 18 })
|
|
6637
6657
|
})] });
|
|
6638
6658
|
if (e.to && t) return /* @__PURE__ */ p(t, {
|
|
6639
6659
|
className: "dock-item",
|
|
@@ -6659,7 +6679,7 @@ function $n({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6659
6679
|
}
|
|
6660
6680
|
//#endregion
|
|
6661
6681
|
//#region src/components/AppFormActions.jsx
|
|
6662
|
-
function
|
|
6682
|
+
function rr({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
6663
6683
|
return N("AppFormActions", i), /* @__PURE__ */ p("div", {
|
|
6664
6684
|
className: [
|
|
6665
6685
|
"form-actions",
|
|
@@ -6673,7 +6693,7 @@ function er({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
6673
6693
|
}
|
|
6674
6694
|
//#endregion
|
|
6675
6695
|
//#region src/components/AppFormRow.jsx
|
|
6676
|
-
function
|
|
6696
|
+
function ir({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
6677
6697
|
N("AppFormRow", r);
|
|
6678
6698
|
let { style: i, ...a } = r;
|
|
6679
6699
|
return /* @__PURE__ */ p("div", {
|
|
@@ -6688,7 +6708,7 @@ function tr({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
6688
6708
|
}
|
|
6689
6709
|
//#endregion
|
|
6690
6710
|
//#region src/components/AppFormSection.jsx
|
|
6691
|
-
function
|
|
6711
|
+
function ar({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
6692
6712
|
return N("AppFormSection", i), /* @__PURE__ */ m("section", {
|
|
6693
6713
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
6694
6714
|
...i,
|
|
@@ -6709,14 +6729,14 @@ function nr({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
6709
6729
|
}
|
|
6710
6730
|
//#endregion
|
|
6711
6731
|
//#region src/components/AppInfoList.jsx
|
|
6712
|
-
function
|
|
6732
|
+
function or({ items: e = [], className: t = "", ...n }) {
|
|
6713
6733
|
return N("AppInfoList", n), /* @__PURE__ */ p("div", {
|
|
6714
6734
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
6715
6735
|
...n,
|
|
6716
6736
|
children: e.map((e, t) => {
|
|
6717
|
-
let n =
|
|
6737
|
+
let n = Hn(e.value), r = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
6718
6738
|
className: "info-icon",
|
|
6719
|
-
children:
|
|
6739
|
+
children: H(e.icon, { size: 16 })
|
|
6720
6740
|
}), /* @__PURE__ */ m("span", {
|
|
6721
6741
|
className: "info-meta",
|
|
6722
6742
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -6740,23 +6760,23 @@ function rr({ items: e = [], className: t = "", ...n }) {
|
|
|
6740
6760
|
}
|
|
6741
6761
|
//#endregion
|
|
6742
6762
|
//#region src/components/AppKpiTile.jsx
|
|
6743
|
-
var
|
|
6744
|
-
function
|
|
6745
|
-
if (!e || e.length < 2) return `0,${
|
|
6746
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
6747
|
-
return e.map((e, i) => `${i * r},${n === 0 ?
|
|
6763
|
+
var sr = 48, cr = 16;
|
|
6764
|
+
function lr(e) {
|
|
6765
|
+
if (!e || e.length < 2) return `0,${cr / 2} ${sr},${cr / 2}`;
|
|
6766
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = sr / (e.length - 1);
|
|
6767
|
+
return e.map((e, i) => `${i * r},${n === 0 ? cr / 2 : cr - (e - t) / n * cr}`).join(" ");
|
|
6748
6768
|
}
|
|
6749
|
-
function
|
|
6769
|
+
function ur(e) {
|
|
6750
6770
|
if (typeof e != "string") return "flat";
|
|
6751
6771
|
let t = e.trim();
|
|
6752
6772
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
6753
6773
|
}
|
|
6754
|
-
function
|
|
6774
|
+
function dr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, deltaDirection: o, sparkline: s, variant: c = "plain", size: l = "md", valueSize: u, inline: d = !1, attention: f = !1, href: h, linkComponent: g, className: _ = "", style: v, iconClassName: y = "", labelClassName: b = "", valueClassName: x = "", captionClassName: S = "", deltaClassName: C = "", sparklineClassName: w = "", ...T }) {
|
|
6755
6775
|
N("AppKpiTile", T);
|
|
6756
6776
|
let E = `kpi${d ? " kpi-inline" : ""}${c === "filled" ? " kpi-filled" : c === "accent" ? " kpi-accent" : c === "spotlight" ? " kpi-spotlight" : ""}${l === "lg" ? " kpi-lg" : l === "sm" ? " kpi-sm" : ""}${f ? " kpi-attention" : ""}${_ ? ` ${_}` : ""}`, D = typeof u == "number" && u > 0 ? {
|
|
6757
6777
|
...v,
|
|
6758
6778
|
"--wui-kpi-value-size": `${u}px`
|
|
6759
|
-
} : v, O = o ??
|
|
6779
|
+
} : v, O = o ?? ur(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
6760
6780
|
return h != null && (A = g ? {
|
|
6761
6781
|
as: g,
|
|
6762
6782
|
to: h
|
|
@@ -6771,7 +6791,7 @@ function cr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6771
6791
|
children: [
|
|
6772
6792
|
r && /* @__PURE__ */ p("span", {
|
|
6773
6793
|
className: `kpi-icon${i ? ` kpi-icon-${i}` : ""}${y ? ` ${y}` : ""}`,
|
|
6774
|
-
children:
|
|
6794
|
+
children: H(r, { size: 20 })
|
|
6775
6795
|
}),
|
|
6776
6796
|
/* @__PURE__ */ p("div", {
|
|
6777
6797
|
className: `kpi-label${b ? ` ${b}` : ""}`,
|
|
@@ -6787,19 +6807,19 @@ function cr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6787
6807
|
}),
|
|
6788
6808
|
a && /* @__PURE__ */ m("div", {
|
|
6789
6809
|
className: `kpi-delta${O === "flat" ? "" : ` ${O}`}${C ? ` ${C}` : ""}`,
|
|
6790
|
-
children: [k && /* @__PURE__ */ p(
|
|
6810
|
+
children: [k && /* @__PURE__ */ p(V, {
|
|
6791
6811
|
name: k,
|
|
6792
6812
|
size: 13
|
|
6793
6813
|
}), a]
|
|
6794
6814
|
}),
|
|
6795
6815
|
s && s.length > 0 && /* @__PURE__ */ p("svg", {
|
|
6796
6816
|
className: `kpi-sparkline${w ? ` ${w}` : ""}`,
|
|
6797
|
-
width:
|
|
6798
|
-
height:
|
|
6799
|
-
viewBox: `0 0 ${
|
|
6817
|
+
width: sr,
|
|
6818
|
+
height: cr,
|
|
6819
|
+
viewBox: `0 0 ${sr} ${cr}`,
|
|
6800
6820
|
"aria-hidden": "true",
|
|
6801
6821
|
children: /* @__PURE__ */ p("polyline", {
|
|
6802
|
-
points:
|
|
6822
|
+
points: lr(s),
|
|
6803
6823
|
stroke: "currentColor",
|
|
6804
6824
|
fill: "none"
|
|
6805
6825
|
})
|
|
@@ -6809,21 +6829,21 @@ function cr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6809
6829
|
}
|
|
6810
6830
|
//#endregion
|
|
6811
6831
|
//#region src/components/AppLogoPicker.jsx
|
|
6812
|
-
var
|
|
6832
|
+
var fr = {
|
|
6813
6833
|
sm: 72,
|
|
6814
6834
|
md: 120,
|
|
6815
6835
|
lg: 160
|
|
6816
6836
|
};
|
|
6817
|
-
function
|
|
6818
|
-
N("AppLogoPicker", k);
|
|
6819
|
-
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee,
|
|
6837
|
+
function pr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a = !1, disabled: c = !1, accept: l = "image/png,image/jpeg,image/webp", maxSizeMb: f = 5, overlayIcon: h = "image", overlayLabel: g = "Update photo", ariaLabel: _ = "Upload photo", label: v, hint: y, error: b, layout: x = "stacked", title: S, subtitle: C, required: w = !1, variant: T = "initials", size: E = "md", shape: D = "circle", className: O = "", ...k }) {
|
|
6838
|
+
N("AppLogoPicker", k), U("AppLogoPicker", "size", typeof E == "string" ? E : null, Object.keys(fr));
|
|
6839
|
+
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee, te] = d(!1);
|
|
6820
6840
|
o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
|
|
6821
6841
|
F(null), z(!1);
|
|
6822
6842
|
}, [e]);
|
|
6823
|
-
let
|
|
6824
|
-
|
|
6825
|
-
},
|
|
6826
|
-
let t =
|
|
6843
|
+
let B = a || c, ne = P || (e && !R ? e : null), re = b || I, ie = !B && (!!P || !!ne && !!i), ae = () => {
|
|
6844
|
+
B || A.current?.click();
|
|
6845
|
+
}, oe = (e) => {
|
|
6846
|
+
let t = Ft(e, {
|
|
6827
6847
|
accept: l,
|
|
6828
6848
|
maxSizeMb: f
|
|
6829
6849
|
});
|
|
@@ -6832,65 +6852,65 @@ function ur({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6832
6852
|
return;
|
|
6833
6853
|
}
|
|
6834
6854
|
L(""), z(!1), F(URL.createObjectURL(e)), r(e);
|
|
6835
|
-
},
|
|
6855
|
+
}, H = (e) => {
|
|
6836
6856
|
let t = e.target.files?.[0];
|
|
6837
|
-
e.target.value = "", t &&
|
|
6838
|
-
},
|
|
6839
|
-
if (e.preventDefault(),
|
|
6857
|
+
e.target.value = "", t && oe(t);
|
|
6858
|
+
}, se = (e) => {
|
|
6859
|
+
if (e.preventDefault(), te(!1), B) return;
|
|
6840
6860
|
let t = e.dataTransfer.files?.[0];
|
|
6841
|
-
t &&
|
|
6842
|
-
},
|
|
6861
|
+
t && oe(t);
|
|
6862
|
+
}, ce = () => {
|
|
6843
6863
|
F(null), L(""), z(!1), A.current && (A.current.value = ""), i?.();
|
|
6844
|
-
},
|
|
6864
|
+
}, le = typeof E == "number" ? E : fr[E] ?? fr.md, ue = Math.max(14, Math.round(le * .18)), de = Math.round(le * .5), fe = [
|
|
6845
6865
|
"set-uploader",
|
|
6846
6866
|
T === "avatar" ? "set-uploader--avatar" : "",
|
|
6847
6867
|
D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
|
|
6848
6868
|
ee && "is-dragging"
|
|
6849
|
-
].filter(Boolean).join(" "),
|
|
6869
|
+
].filter(Boolean).join(" "), W = x === "inline", pe = x === "profile", me = /* @__PURE__ */ m("div", {
|
|
6850
6870
|
className: "set-uploader-shell",
|
|
6851
6871
|
children: [
|
|
6852
6872
|
/* @__PURE__ */ p("button", {
|
|
6853
6873
|
type: "button",
|
|
6854
|
-
className:
|
|
6855
|
-
style: { "--wui-logo-size": `${
|
|
6874
|
+
className: fe,
|
|
6875
|
+
style: { "--wui-logo-size": `${le}px` },
|
|
6856
6876
|
"aria-busy": a || void 0,
|
|
6857
|
-
disabled:
|
|
6858
|
-
onClick:
|
|
6877
|
+
disabled: B,
|
|
6878
|
+
onClick: ae,
|
|
6859
6879
|
"aria-label": _,
|
|
6860
6880
|
onDragOver: (e) => {
|
|
6861
|
-
e.preventDefault(), !
|
|
6881
|
+
e.preventDefault(), !B && !ee && te(!0);
|
|
6862
6882
|
},
|
|
6863
6883
|
onDragLeave: (e) => {
|
|
6864
|
-
e.preventDefault(),
|
|
6884
|
+
e.preventDefault(), te(!1);
|
|
6865
6885
|
},
|
|
6866
|
-
onDrop:
|
|
6886
|
+
onDrop: se,
|
|
6867
6887
|
...k,
|
|
6868
6888
|
children: /* @__PURE__ */ m("span", {
|
|
6869
6889
|
className: "set-uploader-ring",
|
|
6870
|
-
children: [
|
|
6890
|
+
children: [ne ? /* @__PURE__ */ p("img", {
|
|
6871
6891
|
className: "set-uploader-img",
|
|
6872
|
-
src:
|
|
6892
|
+
src: ne,
|
|
6873
6893
|
alt: "",
|
|
6874
6894
|
onError: () => z(!0)
|
|
6875
6895
|
}) : /* @__PURE__ */ p("span", {
|
|
6876
6896
|
className: "set-uploader-logo",
|
|
6877
|
-
children: t || T === "avatar" && /* @__PURE__ */ p(
|
|
6897
|
+
children: t || T === "avatar" && /* @__PURE__ */ p(V, {
|
|
6878
6898
|
name: "user",
|
|
6879
|
-
size:
|
|
6899
|
+
size: de
|
|
6880
6900
|
})
|
|
6881
6901
|
}), a ? /* @__PURE__ */ p("span", {
|
|
6882
6902
|
className: "set-uploader-overlay is-loading",
|
|
6883
6903
|
"aria-hidden": "true",
|
|
6884
|
-
children: /* @__PURE__ */ p(
|
|
6904
|
+
children: /* @__PURE__ */ p(V, {
|
|
6885
6905
|
name: "refresh-cw",
|
|
6886
|
-
size:
|
|
6906
|
+
size: ue,
|
|
6887
6907
|
className: "wui-spin"
|
|
6888
6908
|
})
|
|
6889
6909
|
}) : !c && /* @__PURE__ */ m("span", {
|
|
6890
6910
|
className: "set-uploader-overlay",
|
|
6891
|
-
children: [/* @__PURE__ */ p(
|
|
6911
|
+
children: [/* @__PURE__ */ p(V, {
|
|
6892
6912
|
name: h,
|
|
6893
|
-
size:
|
|
6913
|
+
size: ue
|
|
6894
6914
|
}), /* @__PURE__ */ p("span", { children: g })]
|
|
6895
6915
|
})]
|
|
6896
6916
|
})
|
|
@@ -6898,11 +6918,11 @@ function ur({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6898
6918
|
/* @__PURE__ */ p("button", {
|
|
6899
6919
|
type: "button",
|
|
6900
6920
|
className: "set-uploader-remove",
|
|
6901
|
-
hidden: !
|
|
6921
|
+
hidden: !ie,
|
|
6902
6922
|
"aria-label": "Remove photo",
|
|
6903
6923
|
title: "Remove photo",
|
|
6904
|
-
onClick:
|
|
6905
|
-
children: /* @__PURE__ */ p(
|
|
6924
|
+
onClick: ce,
|
|
6925
|
+
children: /* @__PURE__ */ p(V, {
|
|
6906
6926
|
name: "x",
|
|
6907
6927
|
size: 14
|
|
6908
6928
|
})
|
|
@@ -6914,21 +6934,21 @@ function ur({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6914
6934
|
name: n,
|
|
6915
6935
|
hidden: !0,
|
|
6916
6936
|
accept: l,
|
|
6917
|
-
onChange:
|
|
6918
|
-
disabled:
|
|
6937
|
+
onChange: H,
|
|
6938
|
+
disabled: B
|
|
6919
6939
|
})
|
|
6920
6940
|
]
|
|
6921
|
-
}),
|
|
6941
|
+
}), he = y && !re && /* @__PURE__ */ p("div", {
|
|
6922
6942
|
className: "set-uploader-hint",
|
|
6923
6943
|
children: y
|
|
6924
|
-
}),
|
|
6944
|
+
}), ge = re && /* @__PURE__ */ p("div", {
|
|
6925
6945
|
className: "field-error",
|
|
6926
|
-
children:
|
|
6927
|
-
}),
|
|
6946
|
+
children: re
|
|
6947
|
+
}), _e = v && /* @__PURE__ */ m("label", {
|
|
6928
6948
|
className: "label",
|
|
6929
6949
|
htmlFor: M,
|
|
6930
6950
|
children: [v, w && /* @__PURE__ */ p(Z, {})]
|
|
6931
|
-
}),
|
|
6951
|
+
}), ve = /* @__PURE__ */ m("div", {
|
|
6932
6952
|
className: "set-uploader-meta",
|
|
6933
6953
|
children: [
|
|
6934
6954
|
S && /* @__PURE__ */ p("div", {
|
|
@@ -6939,56 +6959,56 @@ function ur({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6939
6959
|
className: "set-uploader-subtitle",
|
|
6940
6960
|
children: C
|
|
6941
6961
|
}),
|
|
6942
|
-
|
|
6943
|
-
|
|
6962
|
+
he,
|
|
6963
|
+
ge
|
|
6944
6964
|
]
|
|
6945
6965
|
});
|
|
6946
|
-
return
|
|
6966
|
+
return W ? /* @__PURE__ */ m("div", {
|
|
6947
6967
|
className: `field set-uploader-field set-uploader-field--inline${O ? ` ${O}` : ""}`,
|
|
6948
|
-
children: [
|
|
6968
|
+
children: [_e, /* @__PURE__ */ m("div", {
|
|
6949
6969
|
className: "set-uploader-row",
|
|
6950
|
-
children: [
|
|
6970
|
+
children: [me, ve]
|
|
6951
6971
|
})]
|
|
6952
|
-
}) :
|
|
6972
|
+
}) : pe ? /* @__PURE__ */ m("div", {
|
|
6953
6973
|
className: `field set-uploader-field set-uploader-field--profile${O ? ` ${O}` : ""}`,
|
|
6954
6974
|
children: [
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6975
|
+
_e,
|
|
6976
|
+
me,
|
|
6977
|
+
ve
|
|
6958
6978
|
]
|
|
6959
6979
|
}) : /* @__PURE__ */ m("div", {
|
|
6960
6980
|
className: `field set-uploader-field${O ? ` ${O}` : ""}`,
|
|
6961
6981
|
children: [
|
|
6962
|
-
|
|
6963
|
-
pe,
|
|
6982
|
+
_e,
|
|
6964
6983
|
me,
|
|
6965
|
-
he
|
|
6984
|
+
he,
|
|
6985
|
+
ge
|
|
6966
6986
|
]
|
|
6967
6987
|
});
|
|
6968
6988
|
}
|
|
6969
6989
|
//#endregion
|
|
6970
6990
|
//#region src/components/AppMeter.jsx
|
|
6971
|
-
var
|
|
6991
|
+
var mr = [
|
|
6972
6992
|
"info",
|
|
6973
6993
|
"success",
|
|
6974
6994
|
"warning",
|
|
6975
6995
|
"danger",
|
|
6976
6996
|
"neutral"
|
|
6977
6997
|
];
|
|
6978
|
-
function
|
|
6998
|
+
function hr(e, t, n) {
|
|
6979
6999
|
let r = n - t;
|
|
6980
7000
|
if (!(r > 0)) return 0;
|
|
6981
7001
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
6982
7002
|
return Number(i.toFixed(2));
|
|
6983
7003
|
}
|
|
6984
|
-
function
|
|
7004
|
+
function gr(e, t, n, r, i) {
|
|
6985
7005
|
if (t == null && n == null) return i;
|
|
6986
7006
|
let a = "mid";
|
|
6987
7007
|
return t != null && e <= t ? a = "low" : n != null && e >= n && (a = "high"), r === "low" ? a === "low" ? "success" : a === "high" ? "danger" : "warning" : a === "high" ? "success" : a === "low" ? "danger" : "warning";
|
|
6988
7008
|
}
|
|
6989
|
-
function
|
|
7009
|
+
function _r({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum: i = "high", low: a, high: o, size: s = "md", label: c, showLabel: l = !1, className: u = "", ...d }) {
|
|
6990
7010
|
N("AppMeter", d);
|
|
6991
|
-
let f =
|
|
7011
|
+
let f = gr(e, a, o, i, mr.includes(r) ? r : "info"), m = hr(e, t, n);
|
|
6992
7012
|
return /* @__PURE__ */ p("div", {
|
|
6993
7013
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
6994
7014
|
role: "meter",
|
|
@@ -7006,20 +7026,20 @@ function mr({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
7006
7026
|
}
|
|
7007
7027
|
//#endregion
|
|
7008
7028
|
//#region src/components/AppMultiSelect.jsx
|
|
7009
|
-
var
|
|
7029
|
+
var vr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Select…", searchPlaceholder: i = "Search…", searchable: a = !0, disabled: c = !1, icon: l, size: u, collapseChips: d = !1, name: f, label: h, error: g, hint: _, required: v = !1, help: y, helpLabel: b = "More information", fieldClassName: x = "", ...S }, C) {
|
|
7010
7030
|
N("AppMultiSelect", S);
|
|
7011
7031
|
let w = s(), T = f || w, { setRef: E, innerRef: D } = Q({
|
|
7012
7032
|
ref: C,
|
|
7013
7033
|
value: e,
|
|
7014
7034
|
onChange: t,
|
|
7015
|
-
readValue:
|
|
7016
|
-
writeValue:
|
|
7035
|
+
readValue: Ut,
|
|
7036
|
+
writeValue: Wt
|
|
7017
7037
|
});
|
|
7018
7038
|
return o(() => {
|
|
7019
7039
|
let e = D.current;
|
|
7020
7040
|
if (!e) return;
|
|
7021
7041
|
let t = n || [];
|
|
7022
|
-
|
|
7042
|
+
Ht(t, e.options) || (e.options = t);
|
|
7023
7043
|
}, [n, D]), /* @__PURE__ */ m("div", {
|
|
7024
7044
|
className: `field${x ? ` ${x}` : ""}`,
|
|
7025
7045
|
children: [
|
|
@@ -7029,7 +7049,7 @@ var hr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7029
7049
|
children: [
|
|
7030
7050
|
h,
|
|
7031
7051
|
v && /* @__PURE__ */ p(Z, {}),
|
|
7032
|
-
y && /* @__PURE__ */ p(
|
|
7052
|
+
y && /* @__PURE__ */ p(Rt, {
|
|
7033
7053
|
label: b,
|
|
7034
7054
|
children: y
|
|
7035
7055
|
})
|
|
@@ -7063,7 +7083,7 @@ var hr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7063
7083
|
}) : null
|
|
7064
7084
|
]
|
|
7065
7085
|
});
|
|
7066
|
-
}),
|
|
7086
|
+
}), yr = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", value: c, onChange: l, min: u, max: f, step: h = 1, precision: g = 0, unit: _, size: v = "md", id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, ...T }, E) {
|
|
7067
7087
|
N("AppNumberInput", T);
|
|
7068
7088
|
let D = s(), O = y || D, k = (e) => {
|
|
7069
7089
|
if (g === 0) return Math.round(e);
|
|
@@ -7083,19 +7103,19 @@ var hr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7083
7103
|
let F = (e) => {
|
|
7084
7104
|
let t = (j(M) ?? A(0)) + e * h, n = A(k(t));
|
|
7085
7105
|
P(String(n)), l?.(n);
|
|
7086
|
-
}, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, R = w || I !== null && typeof f == "number" && I >= f, z = n && O ? `${O}-error` : void 0, ee = r && O ? `${O}-hint` : void 0,
|
|
7106
|
+
}, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, R = w || I !== null && typeof f == "number" && I >= f, z = n && O ? `${O}-error` : void 0, ee = r && O ? `${O}-hint` : void 0, te = z || ee, B = [
|
|
7087
7107
|
"input",
|
|
7088
7108
|
v === "sm" ? "input-sm" : "",
|
|
7089
7109
|
v === "lg" ? "input-lg" : "",
|
|
7090
7110
|
n ? "error" : "",
|
|
7091
7111
|
"num-input",
|
|
7092
7112
|
S
|
|
7093
|
-
].filter(Boolean).join(" "),
|
|
7113
|
+
].filter(Boolean).join(" "), ne = (e) => {
|
|
7094
7114
|
let t = e.target.value;
|
|
7095
7115
|
P(t);
|
|
7096
7116
|
let n = j(t);
|
|
7097
7117
|
n !== null && l?.(n);
|
|
7098
|
-
},
|
|
7118
|
+
}, re = (e) => {
|
|
7099
7119
|
let t = j(e.target.value);
|
|
7100
7120
|
if (t === null) P(""), l?.("");
|
|
7101
7121
|
else {
|
|
@@ -7103,25 +7123,25 @@ var hr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7103
7123
|
P(String(e)), l?.(e);
|
|
7104
7124
|
}
|
|
7105
7125
|
T.onBlur?.(e);
|
|
7106
|
-
},
|
|
7126
|
+
}, ie = (e) => {
|
|
7107
7127
|
e.key === "ArrowUp" ? (e.preventDefault(), F(1)) : e.key === "ArrowDown" && (e.preventDefault(), F(-1)), T.onKeyDown?.(e);
|
|
7108
|
-
},
|
|
7128
|
+
}, ae = /* @__PURE__ */ p(x.Control, {
|
|
7109
7129
|
...T,
|
|
7110
7130
|
id: O,
|
|
7111
7131
|
name: b,
|
|
7112
7132
|
type: "text",
|
|
7113
7133
|
inputMode: g > 0 ? "decimal" : "numeric",
|
|
7114
|
-
className:
|
|
7134
|
+
className: B,
|
|
7115
7135
|
disabled: w,
|
|
7116
7136
|
required: t,
|
|
7117
7137
|
"aria-invalid": n ? "true" : "false",
|
|
7118
|
-
"aria-describedby":
|
|
7138
|
+
"aria-describedby": te,
|
|
7119
7139
|
value: M,
|
|
7120
7140
|
ref: E,
|
|
7121
|
-
onChange:
|
|
7122
|
-
onBlur:
|
|
7123
|
-
onKeyDown:
|
|
7124
|
-
}),
|
|
7141
|
+
onChange: ne,
|
|
7142
|
+
onBlur: re,
|
|
7143
|
+
onKeyDown: ie
|
|
7144
|
+
}), oe = /* @__PURE__ */ m("div", {
|
|
7125
7145
|
className: [
|
|
7126
7146
|
"num-wrap",
|
|
7127
7147
|
v === "sm" ? "num-wrap-sm" : "",
|
|
@@ -7135,12 +7155,12 @@ var hr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7135
7155
|
tabIndex: -1,
|
|
7136
7156
|
disabled: L,
|
|
7137
7157
|
onClick: () => F(-1),
|
|
7138
|
-
children: /* @__PURE__ */ p(
|
|
7158
|
+
children: /* @__PURE__ */ p(V, {
|
|
7139
7159
|
name: "minus",
|
|
7140
7160
|
size: 16
|
|
7141
7161
|
})
|
|
7142
7162
|
}),
|
|
7143
|
-
|
|
7163
|
+
ae,
|
|
7144
7164
|
_ && /* @__PURE__ */ p("span", {
|
|
7145
7165
|
className: "affix",
|
|
7146
7166
|
children: _
|
|
@@ -7152,7 +7172,7 @@ var hr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7152
7172
|
tabIndex: -1,
|
|
7153
7173
|
disabled: R,
|
|
7154
7174
|
onClick: () => F(1),
|
|
7155
|
-
children: /* @__PURE__ */ p(
|
|
7175
|
+
children: /* @__PURE__ */ p(V, {
|
|
7156
7176
|
name: "plus",
|
|
7157
7177
|
size: 16
|
|
7158
7178
|
})
|
|
@@ -7168,13 +7188,13 @@ var hr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7168
7188
|
children: [
|
|
7169
7189
|
e,
|
|
7170
7190
|
t && /* @__PURE__ */ p(Z, {}),
|
|
7171
|
-
i && /* @__PURE__ */ p(
|
|
7191
|
+
i && /* @__PURE__ */ p(Rt, {
|
|
7172
7192
|
label: a,
|
|
7173
7193
|
children: i
|
|
7174
7194
|
})
|
|
7175
7195
|
]
|
|
7176
7196
|
}),
|
|
7177
|
-
|
|
7197
|
+
oe,
|
|
7178
7198
|
n ? /* @__PURE__ */ p("div", {
|
|
7179
7199
|
className: "field-error",
|
|
7180
7200
|
id: z,
|
|
@@ -7186,7 +7206,7 @@ var hr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7186
7206
|
}) : null
|
|
7187
7207
|
]
|
|
7188
7208
|
});
|
|
7189
|
-
}),
|
|
7209
|
+
}), br = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: c = !1, hint: l, error: u, disabled: d = !1, name: f, id: h, className: g = "", ..._ }, v) {
|
|
7190
7210
|
N("AppOtpInput", _);
|
|
7191
7211
|
let y = s(), b = h || y, { setRef: x, innerRef: S } = Q({
|
|
7192
7212
|
ref: v,
|
|
@@ -7233,7 +7253,7 @@ var hr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7233
7253
|
});
|
|
7234
7254
|
//#endregion
|
|
7235
7255
|
//#region src/components/AppPageHeader.jsx
|
|
7236
|
-
function
|
|
7256
|
+
function xr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", status: a, breadcrumbs: o, actions: s, size: c = "md", align: l = "start", divider: u = !1, sticky: d = !1, className: f = "", ...h }) {
|
|
7237
7257
|
N("AppPageHeader", h);
|
|
7238
7258
|
let g = [
|
|
7239
7259
|
"page-header",
|
|
@@ -7243,7 +7263,7 @@ function vr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7243
7263
|
d ? "page-header-sticky" : "",
|
|
7244
7264
|
i && i !== "primary" ? `tone-${i}` : "",
|
|
7245
7265
|
f
|
|
7246
|
-
].filter(Boolean).join(" "), _ = r == null ? null : typeof r == "string" ? /* @__PURE__ */ p(
|
|
7266
|
+
].filter(Boolean).join(" "), _ = r == null ? null : typeof r == "string" ? /* @__PURE__ */ p(V, {
|
|
7247
7267
|
name: r,
|
|
7248
7268
|
size: 20
|
|
7249
7269
|
}) : r;
|
|
@@ -7292,9 +7312,9 @@ function vr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7292
7312
|
}
|
|
7293
7313
|
//#endregion
|
|
7294
7314
|
//#region src/components/AppPagination.jsx
|
|
7295
|
-
function
|
|
7315
|
+
function Sr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
7296
7316
|
if (N("AppPagination", s), t <= 1) return null;
|
|
7297
|
-
let c =
|
|
7317
|
+
let c = Nn(e, t, { siblingCount: r });
|
|
7298
7318
|
return /* @__PURE__ */ p("nav", {
|
|
7299
7319
|
className: [
|
|
7300
7320
|
"pagination-nav",
|
|
@@ -7352,7 +7372,7 @@ function yr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
7352
7372
|
}
|
|
7353
7373
|
//#endregion
|
|
7354
7374
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
7355
|
-
var
|
|
7375
|
+
var Cr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name: i, label: a = "Phone number", placeholder: o, required: c = !1, error: l, showFlag: u = !0, showDialCode: d = !0, size: f = "md", fieldClassName: h = "", ...g }, _) {
|
|
7356
7376
|
N("AppPhoneNumberInput", g);
|
|
7357
7377
|
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } = Q({
|
|
7358
7378
|
ref: _,
|
|
@@ -7392,7 +7412,7 @@ var br = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7392
7412
|
});
|
|
7393
7413
|
//#endregion
|
|
7394
7414
|
//#region src/components/AppPricingCard.jsx
|
|
7395
|
-
function
|
|
7415
|
+
function wr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a, featured: o = !1, current: s = !1, badge: c = "Most popular", className: l = "", ...u }) {
|
|
7396
7416
|
return N("AppPricingCard", u), /* @__PURE__ */ m("div", {
|
|
7397
7417
|
className: [
|
|
7398
7418
|
"plan-card",
|
|
@@ -7429,7 +7449,7 @@ function xr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7429
7449
|
className: n ? void 0 : "excluded",
|
|
7430
7450
|
children: [/* @__PURE__ */ p("span", {
|
|
7431
7451
|
className: "plan-feature-icon",
|
|
7432
|
-
children: /* @__PURE__ */ p(
|
|
7452
|
+
children: /* @__PURE__ */ p(V, {
|
|
7433
7453
|
name: n ? "check" : "x",
|
|
7434
7454
|
size: 16
|
|
7435
7455
|
})
|
|
@@ -7446,21 +7466,21 @@ function xr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7446
7466
|
}
|
|
7447
7467
|
//#endregion
|
|
7448
7468
|
//#region src/components/AppProgress.jsx
|
|
7449
|
-
var
|
|
7469
|
+
var Tr = [
|
|
7450
7470
|
"info",
|
|
7451
7471
|
"success",
|
|
7452
7472
|
"warning",
|
|
7453
7473
|
"danger",
|
|
7454
7474
|
"neutral"
|
|
7455
7475
|
];
|
|
7456
|
-
function
|
|
7476
|
+
function Er(e, t) {
|
|
7457
7477
|
if (!(t > 0)) return 0;
|
|
7458
7478
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
7459
7479
|
return Number(n.toFixed(2));
|
|
7460
7480
|
}
|
|
7461
|
-
function
|
|
7481
|
+
function Dr({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", label: i, showLabel: a = !1, striped: o = !1, animated: s = !1, indeterminate: c = !1, className: l = "", ...u }) {
|
|
7462
7482
|
N("AppProgress", u);
|
|
7463
|
-
let d =
|
|
7483
|
+
let d = Tr.includes(n) ? n : "info", f = Er(e, t), m = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, h = [
|
|
7464
7484
|
"progress-bar",
|
|
7465
7485
|
`wui-progress-${d}`,
|
|
7466
7486
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -7484,8 +7504,8 @@ function wr({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
7484
7504
|
}
|
|
7485
7505
|
//#endregion
|
|
7486
7506
|
//#region src/components/AppRadio.jsx
|
|
7487
|
-
var
|
|
7488
|
-
return N("AppRadio", o), /* @__PURE__ */ p(
|
|
7507
|
+
var Or = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
7508
|
+
return N("AppRadio", o), /* @__PURE__ */ p(fn, {
|
|
7489
7509
|
ref: s,
|
|
7490
7510
|
label: e,
|
|
7491
7511
|
id: t,
|
|
@@ -7500,7 +7520,7 @@ var Tr = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
7500
7520
|
});
|
|
7501
7521
|
//#endregion
|
|
7502
7522
|
//#region src/components/AppRepeater.jsx
|
|
7503
|
-
function
|
|
7523
|
+
function kr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "Add another", removeLabel: a = "Remove row", emptyText: o, min: s = 0, max: c, numbered: l = !0, className: u = "", ...d }) {
|
|
7504
7524
|
N("AppRepeater", d);
|
|
7505
7525
|
let f = typeof c == "number" && e.length >= c, h = !!r && e.length > s;
|
|
7506
7526
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7522,7 +7542,7 @@ function Er({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7522
7542
|
className: "repeater-body",
|
|
7523
7543
|
children: t(e, n)
|
|
7524
7544
|
}),
|
|
7525
|
-
h && /* @__PURE__ */ p(
|
|
7545
|
+
h && /* @__PURE__ */ p(se, {
|
|
7526
7546
|
icon: "trash-2",
|
|
7527
7547
|
label: `${a} ${n + 1}`,
|
|
7528
7548
|
danger: !0,
|
|
@@ -7531,7 +7551,7 @@ function Er({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7531
7551
|
})
|
|
7532
7552
|
]
|
|
7533
7553
|
}, e.id ?? n)),
|
|
7534
|
-
/* @__PURE__ */ p(
|
|
7554
|
+
/* @__PURE__ */ p(he, {
|
|
7535
7555
|
variant: "secondary",
|
|
7536
7556
|
size: "sm",
|
|
7537
7557
|
leftIcon: "plus",
|
|
@@ -7545,11 +7565,11 @@ function Er({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7545
7565
|
}
|
|
7546
7566
|
//#endregion
|
|
7547
7567
|
//#region src/components/AppResourceCard.jsx
|
|
7548
|
-
function
|
|
7568
|
+
function Ar({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
7549
7569
|
N("AppResourceCard", s);
|
|
7550
7570
|
let c = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
7551
7571
|
className: "res-card-icon",
|
|
7552
|
-
children: /* @__PURE__ */ p(
|
|
7572
|
+
children: /* @__PURE__ */ p(V, {
|
|
7553
7573
|
name: e,
|
|
7554
7574
|
size: 18
|
|
7555
7575
|
})
|
|
@@ -7579,7 +7599,7 @@ function Dr({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
7579
7599
|
}
|
|
7580
7600
|
//#endregion
|
|
7581
7601
|
//#region src/components/AppResult.jsx
|
|
7582
|
-
var
|
|
7602
|
+
var jr = {
|
|
7583
7603
|
success: {
|
|
7584
7604
|
icon: "check-circle",
|
|
7585
7605
|
tone: "success"
|
|
@@ -7600,9 +7620,9 @@ var Or = {
|
|
|
7600
7620
|
404: { tone: "muted" },
|
|
7601
7621
|
500: { tone: "muted" }
|
|
7602
7622
|
};
|
|
7603
|
-
function
|
|
7604
|
-
N("AppResult", s);
|
|
7605
|
-
let c =
|
|
7623
|
+
function Mr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
7624
|
+
N("AppResult", s), U("AppResult", "status", e, Object.keys(jr));
|
|
7625
|
+
let c = jr[e] || jr.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
7606
7626
|
return /* @__PURE__ */ m("div", {
|
|
7607
7627
|
className: [
|
|
7608
7628
|
"result",
|
|
@@ -7617,7 +7637,7 @@ function kr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7617
7637
|
children: e
|
|
7618
7638
|
}) : d ? /* @__PURE__ */ p("div", {
|
|
7619
7639
|
className: "result-icon",
|
|
7620
|
-
children:
|
|
7640
|
+
children: H(d, { size: 48 })
|
|
7621
7641
|
}) : null,
|
|
7622
7642
|
t != null && /* @__PURE__ */ p("h2", {
|
|
7623
7643
|
className: "result-title",
|
|
@@ -7640,7 +7660,7 @@ function kr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7640
7660
|
}
|
|
7641
7661
|
//#endregion
|
|
7642
7662
|
//#region src/components/AppScrollbar.jsx
|
|
7643
|
-
function
|
|
7663
|
+
function Nr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
7644
7664
|
return N("AppScrollbar", i), /* @__PURE__ */ p("div", {
|
|
7645
7665
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
7646
7666
|
style: n == null ? r : {
|
|
@@ -7653,7 +7673,7 @@ function Ar({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
7653
7673
|
}
|
|
7654
7674
|
//#endregion
|
|
7655
7675
|
//#region src/components/AppSearch.jsx
|
|
7656
|
-
function
|
|
7676
|
+
function Pr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search…", ariaLabel: i, iconSize: a = 18, size: o, loading: s = !1, disabled: c = !1, className: l = "", ...u }) {
|
|
7657
7677
|
N("AppSearch", u);
|
|
7658
7678
|
let d = t || n;
|
|
7659
7679
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7669,7 +7689,7 @@ function jr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7669
7689
|
className: "search-spinner",
|
|
7670
7690
|
"aria-hidden": "true"
|
|
7671
7691
|
}),
|
|
7672
|
-
/* @__PURE__ */ p(
|
|
7692
|
+
/* @__PURE__ */ p(V, {
|
|
7673
7693
|
name: "search",
|
|
7674
7694
|
size: a,
|
|
7675
7695
|
className: "search-icon"
|
|
@@ -7690,7 +7710,7 @@ function jr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7690
7710
|
"aria-label": "Clear search",
|
|
7691
7711
|
onClick: () => d?.(""),
|
|
7692
7712
|
hidden: !e,
|
|
7693
|
-
children: /* @__PURE__ */ p(
|
|
7713
|
+
children: /* @__PURE__ */ p(V, {
|
|
7694
7714
|
name: "x",
|
|
7695
7715
|
size: 16
|
|
7696
7716
|
})
|
|
@@ -7700,7 +7720,7 @@ function jr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7700
7720
|
}
|
|
7701
7721
|
//#endregion
|
|
7702
7722
|
//#region src/components/AppSegmented.jsx
|
|
7703
|
-
function
|
|
7723
|
+
function Fr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: l = !1, disabled: d = !1, className: f = "", ...h }) {
|
|
7704
7724
|
N("AppSegmented", h);
|
|
7705
7725
|
let g = s(), _ = i || g, v = u(null), y = u(null), b = [
|
|
7706
7726
|
"segmented",
|
|
@@ -7755,7 +7775,7 @@ function Mr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7755
7775
|
disabled: d || e.disabled,
|
|
7756
7776
|
onChange: () => n?.(e.value)
|
|
7757
7777
|
}),
|
|
7758
|
-
e.icon && /* @__PURE__ */ p(
|
|
7778
|
+
e.icon && /* @__PURE__ */ p(V, {
|
|
7759
7779
|
name: e.icon,
|
|
7760
7780
|
size: 13
|
|
7761
7781
|
}),
|
|
@@ -7775,7 +7795,7 @@ function Mr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7775
7795
|
}
|
|
7776
7796
|
//#endregion
|
|
7777
7797
|
//#region src/components/AppSelect.jsx
|
|
7778
|
-
var
|
|
7798
|
+
var Ir = (e) => e == null ? "" : e.label ?? e.text ?? "", Lr = i(function({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", searchPlaceholder: i = "Search...", searchable: a = !1, clearable: c = !1, size: l, icon: u, floatingLabel: d = !1, disabled: f, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": E, "aria-describedby": D, ...O }, k) {
|
|
7779
7799
|
N("AppSelect", O);
|
|
7780
7800
|
let A = s(), { setRef: j, innerRef: M } = Q({
|
|
7781
7801
|
ref: k,
|
|
@@ -7787,10 +7807,10 @@ var Nr = (e) => e == null ? "" : e.label ?? e.text ?? "", Pr = i(function({ valu
|
|
|
7787
7807
|
if (!e) return;
|
|
7788
7808
|
let t = n.map((e) => ({
|
|
7789
7809
|
value: e.value,
|
|
7790
|
-
label:
|
|
7810
|
+
label: Ir(e),
|
|
7791
7811
|
icon: e.icon
|
|
7792
7812
|
}));
|
|
7793
|
-
|
|
7813
|
+
Ht(t, e.options) || (e.options = t);
|
|
7794
7814
|
}, [n, M]);
|
|
7795
7815
|
let P = x || S || A, F = d && h, I = _ && P ? `${P}-error` : void 0, L = v && P ? `${P}-hint` : void 0, R = /* @__PURE__ */ p("wui-select", {
|
|
7796
7816
|
"aria-label": T || (typeof h == "string" ? h : void 0),
|
|
@@ -7823,7 +7843,7 @@ var Nr = (e) => e == null ? "" : e.label ?? e.text ?? "", Pr = i(function({ valu
|
|
|
7823
7843
|
children: [
|
|
7824
7844
|
h,
|
|
7825
7845
|
g && /* @__PURE__ */ p(Z, {}),
|
|
7826
|
-
y && /* @__PURE__ */ p(
|
|
7846
|
+
y && /* @__PURE__ */ p(Rt, {
|
|
7827
7847
|
label: b,
|
|
7828
7848
|
children: y
|
|
7829
7849
|
})
|
|
@@ -7851,7 +7871,7 @@ var Nr = (e) => e == null ? "" : e.label ?? e.text ?? "", Pr = i(function({ valu
|
|
|
7851
7871
|
});
|
|
7852
7872
|
//#endregion
|
|
7853
7873
|
//#region src/components/AppShell.jsx
|
|
7854
|
-
function
|
|
7874
|
+
function Rr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r, sidebarFooter: i, topbarStart: a, topbarEnd: s, footer: c, children: l, collapsed: u, onCollapsedChange: f, noSidebar: h = !1, navLabel: g = "Main navigation", linkComponent: _, className: v = "", ...y }) {
|
|
7855
7875
|
N("AppShell", y);
|
|
7856
7876
|
let [b, x] = d(!1), [S, C] = d(!1), [w, T] = d(!1), E = u ?? b, D = () => {
|
|
7857
7877
|
let e = !E;
|
|
@@ -7899,7 +7919,7 @@ function Fr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7899
7919
|
children: [e.label && /* @__PURE__ */ p("div", {
|
|
7900
7920
|
className: "app-nav-group-label",
|
|
7901
7921
|
children: e.label
|
|
7902
|
-
}), e.items.map((e) => /* @__PURE__ */ p(
|
|
7922
|
+
}), e.items.map((e) => /* @__PURE__ */ p(zr, {
|
|
7903
7923
|
item: e,
|
|
7904
7924
|
linkComponent: _,
|
|
7905
7925
|
onNavigate: () => C(!1)
|
|
@@ -7918,7 +7938,7 @@ function Fr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7918
7938
|
onClick: D,
|
|
7919
7939
|
"aria-label": E ? "Expand navigation" : "Collapse navigation",
|
|
7920
7940
|
"aria-expanded": !E,
|
|
7921
|
-
children: /* @__PURE__ */ p(
|
|
7941
|
+
children: /* @__PURE__ */ p(V, {
|
|
7922
7942
|
name: "chevron-left",
|
|
7923
7943
|
size: 14
|
|
7924
7944
|
})
|
|
@@ -7936,7 +7956,7 @@ function Fr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7936
7956
|
onClick: () => C(!0),
|
|
7937
7957
|
"aria-label": "Open navigation",
|
|
7938
7958
|
"aria-expanded": S,
|
|
7939
|
-
children: /* @__PURE__ */ p(
|
|
7959
|
+
children: /* @__PURE__ */ p(V, {
|
|
7940
7960
|
name: "menu",
|
|
7941
7961
|
size: 18
|
|
7942
7962
|
})
|
|
@@ -7966,14 +7986,14 @@ function Fr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7966
7986
|
]
|
|
7967
7987
|
});
|
|
7968
7988
|
}
|
|
7969
|
-
function
|
|
7989
|
+
function zr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
7970
7990
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = d(a);
|
|
7971
7991
|
o(() => {
|
|
7972
7992
|
a && !s && c(!0);
|
|
7973
7993
|
}, [a, s]);
|
|
7974
7994
|
let l = typeof e.label == "string" ? e.label : void 0, u = !r && e.icon && /* @__PURE__ */ p("span", {
|
|
7975
7995
|
className: "app-nav-icon",
|
|
7976
|
-
children: typeof e.icon == "string" ? /* @__PURE__ */ p(
|
|
7996
|
+
children: typeof e.icon == "string" ? /* @__PURE__ */ p(V, {
|
|
7977
7997
|
name: e.icon,
|
|
7978
7998
|
size: 22
|
|
7979
7999
|
}) : e.icon
|
|
@@ -7996,7 +8016,7 @@ function Ir({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
7996
8016
|
h,
|
|
7997
8017
|
/* @__PURE__ */ p("span", {
|
|
7998
8018
|
className: "app-nav-caret",
|
|
7999
|
-
children: /* @__PURE__ */ p(
|
|
8019
|
+
children: /* @__PURE__ */ p(V, {
|
|
8000
8020
|
name: "chevron-right",
|
|
8001
8021
|
size: 16
|
|
8002
8022
|
})
|
|
@@ -8006,7 +8026,7 @@ function Ir({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8006
8026
|
className: `app-nav-sub${s ? " expanded" : ""}`,
|
|
8007
8027
|
children: /* @__PURE__ */ p("div", {
|
|
8008
8028
|
className: "app-nav-sub-inner",
|
|
8009
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
8029
|
+
children: e.children.map((e) => /* @__PURE__ */ p(zr, {
|
|
8010
8030
|
item: e,
|
|
8011
8031
|
linkComponent: t,
|
|
8012
8032
|
onNavigate: n,
|
|
@@ -8023,7 +8043,7 @@ function Ir({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8023
8043
|
h,
|
|
8024
8044
|
e.trailingIcon && /* @__PURE__ */ p("span", {
|
|
8025
8045
|
className: "app-nav-trailing",
|
|
8026
|
-
children: typeof e.trailingIcon == "string" ? /* @__PURE__ */ p(
|
|
8046
|
+
children: typeof e.trailingIcon == "string" ? /* @__PURE__ */ p(V, {
|
|
8027
8047
|
name: e.trailingIcon,
|
|
8028
8048
|
size: 16
|
|
8029
8049
|
}) : e.trailingIcon
|
|
@@ -8047,7 +8067,7 @@ function Ir({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8047
8067
|
}
|
|
8048
8068
|
//#endregion
|
|
8049
8069
|
//#region src/components/AppSidebarMenu.jsx
|
|
8050
|
-
var
|
|
8070
|
+
var Br = {
|
|
8051
8071
|
left: "start",
|
|
8052
8072
|
right: "end",
|
|
8053
8073
|
start: "start",
|
|
@@ -8055,9 +8075,9 @@ var Lr = {
|
|
|
8055
8075
|
top: "top",
|
|
8056
8076
|
bottom: "bottom"
|
|
8057
8077
|
};
|
|
8058
|
-
function
|
|
8059
|
-
N("AppSidebarMenu", b);
|
|
8060
|
-
let { style: x, ...S } = b, w =
|
|
8078
|
+
function Vr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, header: a, children: o, footer: s, width: c, maxWidth: l, backdrop: u = !0, scroll: d = !1, keyboard: f = !0, closeButton: h = !0, responsive: g, className: _ = "", bodyClassName: v = "", ariaLabel: y, ...b }) {
|
|
8079
|
+
N("AppSidebarMenu", b), U("AppSidebarMenu", "side", n, Object.keys(Br));
|
|
8080
|
+
let { style: x, ...S } = b, w = Br[n] || "end", T = c || l || x ? {
|
|
8061
8081
|
...c && { "--asm-width": c },
|
|
8062
8082
|
...l && { "--asm-max-width": l },
|
|
8063
8083
|
...x
|
|
@@ -8081,17 +8101,17 @@ function Rr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8081
8101
|
className: "drawer-title",
|
|
8082
8102
|
children: [i && /* @__PURE__ */ p("span", {
|
|
8083
8103
|
className: "drawer-title-ic",
|
|
8084
|
-
children: /* @__PURE__ */ p(
|
|
8104
|
+
children: /* @__PURE__ */ p(V, {
|
|
8085
8105
|
name: i,
|
|
8086
8106
|
size: 18
|
|
8087
8107
|
})
|
|
8088
8108
|
}), r]
|
|
8089
|
-
}), h && /* @__PURE__ */ p(
|
|
8109
|
+
}), h && /* @__PURE__ */ p(he, {
|
|
8090
8110
|
variant: "ghost",
|
|
8091
8111
|
className: "btn-icon",
|
|
8092
8112
|
onClick: t,
|
|
8093
8113
|
"aria-label": "Close",
|
|
8094
|
-
children: /* @__PURE__ */ p(
|
|
8114
|
+
children: /* @__PURE__ */ p(V, {
|
|
8095
8115
|
name: "x",
|
|
8096
8116
|
size: 16
|
|
8097
8117
|
})
|
|
@@ -8110,14 +8130,14 @@ function Rr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8110
8130
|
}
|
|
8111
8131
|
//#endregion
|
|
8112
8132
|
//#region src/components/AppSlider.jsx
|
|
8113
|
-
var
|
|
8133
|
+
var Hr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, label: a, required: c = !1, hint: l, error: u, name: d, startName: f, endName: h, min: g = 0, max: _ = 100, step: v = 1, disabled: y, size: b, showValue: x, unit: S, id: C, ariaLabel: w, className: T = "", ...E }, D) {
|
|
8114
8134
|
N("AppSlider", E);
|
|
8115
8135
|
let O = s(), k = C || d || r && f || O, A = r, { setRef: j, innerRef: M } = Q({
|
|
8116
8136
|
ref: D,
|
|
8117
8137
|
value: A ? void 0 : e,
|
|
8118
8138
|
onChange: i,
|
|
8119
|
-
readValue: A ?
|
|
8120
|
-
writeValue: A ? void 0 :
|
|
8139
|
+
readValue: A ? Gt : void 0,
|
|
8140
|
+
writeValue: A ? void 0 : Kt
|
|
8121
8141
|
});
|
|
8122
8142
|
o(() => {
|
|
8123
8143
|
if (!A) return;
|
|
@@ -8171,14 +8191,14 @@ var zr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
8171
8191
|
})
|
|
8172
8192
|
]
|
|
8173
8193
|
});
|
|
8174
|
-
}),
|
|
8194
|
+
}), Ur = {
|
|
8175
8195
|
sm: 44,
|
|
8176
8196
|
md: 56,
|
|
8177
8197
|
lg: 72
|
|
8178
8198
|
};
|
|
8179
|
-
function
|
|
8180
|
-
N("AppSplash", c);
|
|
8181
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
8199
|
+
function Wr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
8200
|
+
N("AppSplash", c), U("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(Ur));
|
|
8201
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : Ur[a] ?? Ur.md, f = i === "ring" ? /* @__PURE__ */ p("span", {
|
|
8182
8202
|
className: "splash-ring",
|
|
8183
8203
|
"aria-hidden": "true"
|
|
8184
8204
|
}) : i === "dots" ? /* @__PURE__ */ m("span", {
|
|
@@ -8225,7 +8245,7 @@ function Vr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
8225
8245
|
}
|
|
8226
8246
|
//#endregion
|
|
8227
8247
|
//#region src/components/AppStatusBadge.jsx
|
|
8228
|
-
function
|
|
8248
|
+
function Gr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
8229
8249
|
return N("AppStatusBadge", r), e == null || e === "" ? "—" : /* @__PURE__ */ p("span", {
|
|
8230
8250
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
8231
8251
|
...r,
|
|
@@ -8234,7 +8254,7 @@ function Hr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
|
8234
8254
|
}
|
|
8235
8255
|
//#endregion
|
|
8236
8256
|
//#region src/components/AppStepper.jsx
|
|
8237
|
-
function
|
|
8257
|
+
function Kr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
8238
8258
|
N("AppStepper", c);
|
|
8239
8259
|
let l = t === "journey";
|
|
8240
8260
|
return /* @__PURE__ */ p("nav", {
|
|
@@ -8247,14 +8267,14 @@ function Ur({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8247
8267
|
"aria-label": a,
|
|
8248
8268
|
...c,
|
|
8249
8269
|
children: e.map((t, n) => {
|
|
8250
|
-
let a = t.status ||
|
|
8251
|
-
c = a === "done" ? /* @__PURE__ */ p(
|
|
8270
|
+
let a = t.status || qr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
8271
|
+
c = a === "done" ? /* @__PURE__ */ p(V, {
|
|
8252
8272
|
name: "check",
|
|
8253
8273
|
size: 14
|
|
8254
|
-
}) : a === "error" ? /* @__PURE__ */ p(
|
|
8274
|
+
}) : a === "error" ? /* @__PURE__ */ p(V, {
|
|
8255
8275
|
name: "alert-triangle",
|
|
8256
8276
|
size: 14
|
|
8257
|
-
}) : t.icon ? /* @__PURE__ */ p(
|
|
8277
|
+
}) : t.icon ? /* @__PURE__ */ p(V, {
|
|
8258
8278
|
name: t.icon,
|
|
8259
8279
|
size: 14
|
|
8260
8280
|
}) : n + 1;
|
|
@@ -8311,13 +8331,13 @@ function Ur({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8311
8331
|
})
|
|
8312
8332
|
});
|
|
8313
8333
|
}
|
|
8314
|
-
function
|
|
8334
|
+
function qr(e, t) {
|
|
8315
8335
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
8316
8336
|
}
|
|
8317
8337
|
//#endregion
|
|
8318
8338
|
//#region src/components/AppSwitch.jsx
|
|
8319
|
-
var
|
|
8320
|
-
return N("AppSwitch", s), /* @__PURE__ */ p(
|
|
8339
|
+
var Jr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
8340
|
+
return N("AppSwitch", s), /* @__PURE__ */ p(fn, {
|
|
8321
8341
|
ref: c,
|
|
8322
8342
|
label: e,
|
|
8323
8343
|
id: t,
|
|
@@ -8332,14 +8352,14 @@ var Gr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
8332
8352
|
});
|
|
8333
8353
|
//#endregion
|
|
8334
8354
|
//#region src/components/AppTableEmptyState.jsx
|
|
8335
|
-
function
|
|
8355
|
+
function Yr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
8336
8356
|
return N("AppTableEmptyState", i), /* @__PURE__ */ m("div", {
|
|
8337
8357
|
className: "tbl-empty",
|
|
8338
8358
|
...i,
|
|
8339
8359
|
children: [
|
|
8340
8360
|
/* @__PURE__ */ p("span", {
|
|
8341
8361
|
className: "tbl-empty-icon",
|
|
8342
|
-
children:
|
|
8362
|
+
children: H(e, { size: 24 })
|
|
8343
8363
|
}),
|
|
8344
8364
|
/* @__PURE__ */ p("div", {
|
|
8345
8365
|
className: "tbl-empty-title",
|
|
@@ -8358,13 +8378,13 @@ function Kr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
8358
8378
|
}
|
|
8359
8379
|
//#endregion
|
|
8360
8380
|
//#region src/components/AppTooltip.jsx
|
|
8361
|
-
var
|
|
8381
|
+
var Xr = {
|
|
8362
8382
|
start: "left",
|
|
8363
8383
|
end: "right",
|
|
8364
8384
|
top: "top",
|
|
8365
8385
|
bottom: "bottom"
|
|
8366
8386
|
};
|
|
8367
|
-
function
|
|
8387
|
+
function Zr({ content: e, children: t, placement: r = "top", tone: i = "default", size: a = "md", className: o = "", ...c }) {
|
|
8368
8388
|
N("AppTooltip", c);
|
|
8369
8389
|
let l = /* @__PURE__ */ p(E, {
|
|
8370
8390
|
id: s(),
|
|
@@ -8378,14 +8398,14 @@ function Jr({ content: e, children: t, placement: r = "top", tone: i = "default"
|
|
|
8378
8398
|
});
|
|
8379
8399
|
return /* @__PURE__ */ p(w, {
|
|
8380
8400
|
trigger: ["hover", "focus"],
|
|
8381
|
-
placement:
|
|
8401
|
+
placement: Xr[r] || r,
|
|
8382
8402
|
overlay: l,
|
|
8383
8403
|
children: n(t, c)
|
|
8384
8404
|
});
|
|
8385
8405
|
}
|
|
8386
8406
|
//#endregion
|
|
8387
8407
|
//#region src/components/AppTabs.jsx
|
|
8388
|
-
function
|
|
8408
|
+
function Qr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientation: i = "horizontal", size: s = "md", fitted: l = !1, activation: f = "automatic", ariaLabel: h, className: g = "", style: _, ...v }) {
|
|
8389
8409
|
N("AppTabs", v);
|
|
8390
8410
|
let y = u(null), b = u(null), x = i === "vertical", [S, C] = d(t);
|
|
8391
8411
|
o(() => {
|
|
@@ -8481,7 +8501,7 @@ function Yr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8481
8501
|
className: "app-tab-img",
|
|
8482
8502
|
src: e.image,
|
|
8483
8503
|
alt: e.imageAlt ?? ""
|
|
8484
|
-
}) :
|
|
8504
|
+
}) : H(e.icon, {
|
|
8485
8505
|
size: 16,
|
|
8486
8506
|
className: "app-tab-icon"
|
|
8487
8507
|
}),
|
|
@@ -8492,7 +8512,7 @@ function Yr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8492
8512
|
})
|
|
8493
8513
|
]
|
|
8494
8514
|
}, e.key);
|
|
8495
|
-
return e.tooltip ? /* @__PURE__ */ p(
|
|
8515
|
+
return e.tooltip ? /* @__PURE__ */ p(Zr, {
|
|
8496
8516
|
content: e.tooltip,
|
|
8497
8517
|
children: i
|
|
8498
8518
|
}, e.key) : i;
|
|
@@ -8512,7 +8532,7 @@ function Yr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8512
8532
|
"aria-label": "Scroll tabs backward",
|
|
8513
8533
|
tabIndex: -1,
|
|
8514
8534
|
onClick: () => F(-1),
|
|
8515
|
-
children: /* @__PURE__ */ p(
|
|
8535
|
+
children: /* @__PURE__ */ p(V, {
|
|
8516
8536
|
name: "chevron-left",
|
|
8517
8537
|
size: 16
|
|
8518
8538
|
})
|
|
@@ -8524,7 +8544,7 @@ function Yr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8524
8544
|
"aria-label": "Scroll tabs forward",
|
|
8525
8545
|
tabIndex: -1,
|
|
8526
8546
|
onClick: () => F(1),
|
|
8527
|
-
children: /* @__PURE__ */ p(
|
|
8547
|
+
children: /* @__PURE__ */ p(V, {
|
|
8528
8548
|
name: "chevron-right",
|
|
8529
8549
|
size: 16
|
|
8530
8550
|
})
|
|
@@ -8534,14 +8554,14 @@ function Yr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8534
8554
|
}
|
|
8535
8555
|
//#endregion
|
|
8536
8556
|
//#region src/components/AppTagInput.jsx
|
|
8537
|
-
var
|
|
8557
|
+
var $r = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r, label: i, error: a, hint: o, required: c = !1, size: l, maxTags: u, allowDuplicates: d = !1, disabled: f = !1, id: h, ariaLabel: g, className: _ = "", fieldClassName: v = "", help: y, helpLabel: b = "More information", ...x }, S) {
|
|
8538
8558
|
N("AppTagInput", x);
|
|
8539
8559
|
let C = s(), w = h || r || C, { setRef: T } = Q({
|
|
8540
8560
|
ref: S,
|
|
8541
8561
|
value: e,
|
|
8542
8562
|
onChange: t,
|
|
8543
|
-
readValue:
|
|
8544
|
-
writeValue:
|
|
8563
|
+
readValue: Ut,
|
|
8564
|
+
writeValue: Wt
|
|
8545
8565
|
});
|
|
8546
8566
|
return /* @__PURE__ */ m("div", {
|
|
8547
8567
|
className: `field${v ? ` ${v}` : ""}`,
|
|
@@ -8552,7 +8572,7 @@ var Xr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8552
8572
|
children: [
|
|
8553
8573
|
i,
|
|
8554
8574
|
c && /* @__PURE__ */ p(Z, {}),
|
|
8555
|
-
y && /* @__PURE__ */ p(
|
|
8575
|
+
y && /* @__PURE__ */ p(Rt, {
|
|
8556
8576
|
label: b,
|
|
8557
8577
|
children: y
|
|
8558
8578
|
})
|
|
@@ -8585,7 +8605,7 @@ var Xr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8585
8605
|
}) : null
|
|
8586
8606
|
]
|
|
8587
8607
|
});
|
|
8588
|
-
}),
|
|
8608
|
+
}), ei = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: o = "More information", id: l, name: d, rows: f = 4, autoGrow: h = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
|
|
8589
8609
|
N("AppTextarea", v);
|
|
8590
8610
|
let b = s(), S = l || b, C = [
|
|
8591
8611
|
"textarea",
|
|
@@ -8617,7 +8637,7 @@ var Xr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8617
8637
|
children: [
|
|
8618
8638
|
e,
|
|
8619
8639
|
t && /* @__PURE__ */ p(Z, {}),
|
|
8620
|
-
i && /* @__PURE__ */ p(
|
|
8640
|
+
i && /* @__PURE__ */ p(Rt, {
|
|
8621
8641
|
label: o,
|
|
8622
8642
|
children: i
|
|
8623
8643
|
})
|
|
@@ -8647,7 +8667,7 @@ var Xr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8647
8667
|
}) : null
|
|
8648
8668
|
]
|
|
8649
8669
|
});
|
|
8650
|
-
}),
|
|
8670
|
+
}), ti = {
|
|
8651
8671
|
done: "check",
|
|
8652
8672
|
current: "clock",
|
|
8653
8673
|
"on-hold": "lock",
|
|
@@ -8656,7 +8676,7 @@ var Xr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8656
8676
|
skipped: "arrow-right",
|
|
8657
8677
|
upcoming: null
|
|
8658
8678
|
};
|
|
8659
|
-
function
|
|
8679
|
+
function ni({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
8660
8680
|
N("AppTimeline", o);
|
|
8661
8681
|
let s = t === "progress", c = `timeline${s ? " timeline--progress" : ""}${n === "horizontal" ? " timeline--horizontal" : ""}${i ? ` ${i}` : ""}`, l = typeof r == "number" && r > 0 ? r : void 0, u = l ? Math.round(l * .54) : s ? 13 : 12;
|
|
8662
8682
|
return /* @__PURE__ */ p("ol", {
|
|
@@ -8667,12 +8687,12 @@ function $r({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8667
8687
|
} : a,
|
|
8668
8688
|
...o,
|
|
8669
8689
|
children: e.map((e, t) => {
|
|
8670
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
8690
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? ti[n] : void 0) : e.icon || "circle";
|
|
8671
8691
|
return /* @__PURE__ */ m("li", {
|
|
8672
8692
|
className: `timeline-item${r}${i}`,
|
|
8673
8693
|
children: [/* @__PURE__ */ p("span", {
|
|
8674
8694
|
className: "timeline-dot",
|
|
8675
|
-
children: a ? /* @__PURE__ */ p(
|
|
8695
|
+
children: a ? /* @__PURE__ */ p(V, {
|
|
8676
8696
|
name: a,
|
|
8677
8697
|
size: u
|
|
8678
8698
|
}) : null
|
|
@@ -8725,7 +8745,7 @@ function $r({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8725
8745
|
}
|
|
8726
8746
|
//#endregion
|
|
8727
8747
|
//#region src/components/AppTimePicker.jsx
|
|
8728
|
-
var
|
|
8748
|
+
var ri = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, step: u, format: d = "24", placeholder: f = "Select time", disabled: h, size: g, id: _, ariaLabel: v, className: y = "", ...b }, x) {
|
|
8729
8749
|
N("AppTimePicker", b);
|
|
8730
8750
|
let S = s(), C = _ || o || S, { setRef: w } = Q({
|
|
8731
8751
|
ref: x,
|
|
@@ -8770,32 +8790,32 @@ var ei = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
8770
8790
|
})
|
|
8771
8791
|
]
|
|
8772
8792
|
});
|
|
8773
|
-
}),
|
|
8774
|
-
function
|
|
8775
|
-
for (let e of
|
|
8793
|
+
}), ii = 6, $ = [], ai = /* @__PURE__ */ new Set(), oi = /* @__PURE__ */ new Map(), si = 0;
|
|
8794
|
+
function ci() {
|
|
8795
|
+
for (let e of ai) e($);
|
|
8776
8796
|
}
|
|
8777
|
-
function
|
|
8778
|
-
let t =
|
|
8779
|
-
t !== void 0 && (clearTimeout(t),
|
|
8797
|
+
function li(e) {
|
|
8798
|
+
let t = oi.get(e);
|
|
8799
|
+
t !== void 0 && (clearTimeout(t), oi.delete(e));
|
|
8780
8800
|
}
|
|
8781
|
-
function
|
|
8782
|
-
if (e.length <=
|
|
8801
|
+
function ui(e) {
|
|
8802
|
+
if (e.length <= ii) return e;
|
|
8783
8803
|
let t = [...e];
|
|
8784
|
-
for (; t.length >
|
|
8804
|
+
for (; t.length > ii;) {
|
|
8785
8805
|
let e = t.findIndex((e) => e.duration !== 0);
|
|
8786
8806
|
t.splice(e === -1 ? 0 : e, 1);
|
|
8787
8807
|
}
|
|
8788
8808
|
return t;
|
|
8789
8809
|
}
|
|
8790
|
-
function
|
|
8791
|
-
return
|
|
8810
|
+
function di(e) {
|
|
8811
|
+
return ai.add(e), e($), () => ai.delete(e);
|
|
8792
8812
|
}
|
|
8793
|
-
function
|
|
8813
|
+
function fi(e, t, n = {}) {
|
|
8794
8814
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
8795
8815
|
if (r) {
|
|
8796
8816
|
let i = $.find((e) => e.externalId === r);
|
|
8797
8817
|
if (i) {
|
|
8798
|
-
|
|
8818
|
+
li(i.id);
|
|
8799
8819
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
8800
8820
|
$ = $.map((a) => a.id === i.id ? {
|
|
8801
8821
|
...a,
|
|
@@ -8808,12 +8828,12 @@ function li(e, t, n = {}) {
|
|
|
8808
8828
|
shape: n.shape,
|
|
8809
8829
|
surface: n.surface,
|
|
8810
8830
|
progress: n.progress
|
|
8811
|
-
} : a),
|
|
8831
|
+
} : a), ci(), r > 0 && oi.set(i.id, setTimeout(() => pi(i.id), r));
|
|
8812
8832
|
return;
|
|
8813
8833
|
}
|
|
8814
8834
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
8815
|
-
let a = ++
|
|
8816
|
-
$ =
|
|
8835
|
+
let a = ++si, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
8836
|
+
$ = ui([...$, {
|
|
8817
8837
|
id: a,
|
|
8818
8838
|
externalId: r,
|
|
8819
8839
|
message: e,
|
|
@@ -8826,19 +8846,19 @@ function li(e, t, n = {}) {
|
|
|
8826
8846
|
surface: n.surface,
|
|
8827
8847
|
progress: n.progress,
|
|
8828
8848
|
key: i
|
|
8829
|
-
}]),
|
|
8849
|
+
}]), ci(), o > 0 && oi.set(a, setTimeout(() => pi(a), o));
|
|
8830
8850
|
}
|
|
8831
|
-
function
|
|
8832
|
-
|
|
8851
|
+
function pi(e) {
|
|
8852
|
+
li(e);
|
|
8833
8853
|
let t = $.filter((t) => t.id !== e);
|
|
8834
|
-
t.length !== $.length && ($ = t,
|
|
8854
|
+
t.length !== $.length && ($ = t, ci());
|
|
8835
8855
|
}
|
|
8836
|
-
function
|
|
8837
|
-
$.length !== 0 && ($ = [],
|
|
8856
|
+
function mi() {
|
|
8857
|
+
$.length !== 0 && ($ = [], ci());
|
|
8838
8858
|
}
|
|
8839
8859
|
//#endregion
|
|
8840
8860
|
//#region src/components/AppToast.jsx
|
|
8841
|
-
var
|
|
8861
|
+
var hi = {
|
|
8842
8862
|
success: {
|
|
8843
8863
|
icon: "check-circle",
|
|
8844
8864
|
assertive: !1
|
|
@@ -8855,7 +8875,7 @@ var fi = {
|
|
|
8855
8875
|
icon: "alert-circle",
|
|
8856
8876
|
assertive: !0
|
|
8857
8877
|
}
|
|
8858
|
-
},
|
|
8878
|
+
}, gi = {
|
|
8859
8879
|
"top-start": "top-0 start-0",
|
|
8860
8880
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
8861
8881
|
"top-end": "top-0 end-0",
|
|
@@ -8863,31 +8883,33 @@ var fi = {
|
|
|
8863
8883
|
"bottom-start": "bottom-0 start-0",
|
|
8864
8884
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
8865
8885
|
"bottom-end": "bottom-0 end-0"
|
|
8866
|
-
},
|
|
8886
|
+
}, _i = 64, vi = /* @__PURE__ */ new Set([
|
|
8867
8887
|
"rise",
|
|
8868
8888
|
"organic",
|
|
8869
8889
|
"jelly",
|
|
8870
8890
|
"spring"
|
|
8871
|
-
]),
|
|
8891
|
+
]), yi = /* @__PURE__ */ new Set([
|
|
8872
8892
|
"rounded",
|
|
8873
8893
|
"pill",
|
|
8874
8894
|
"sharp"
|
|
8875
|
-
]),
|
|
8876
|
-
function
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8895
|
+
]), bi = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
8896
|
+
function xi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
8897
|
+
N("AppToast", s), U("AppToast", "position", e, Object.keys(gi)), U("AppToast", "animation", n, vi), U("AppToast", "shape", r, yi), U("AppToast", "surface", i, bi);
|
|
8898
|
+
let [c, l] = d([]);
|
|
8899
|
+
o(() => di(l), []);
|
|
8900
|
+
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h = gi[e] ?? gi["bottom-end"];
|
|
8880
8901
|
return /* @__PURE__ */ m("div", {
|
|
8881
|
-
|
|
8882
|
-
|
|
8902
|
+
...s,
|
|
8903
|
+
className: `wui-toast-container toast-container position-fixed ${h} p-3 ${a}`.trim(),
|
|
8904
|
+
children: [u > 0 && /* @__PURE__ */ m("div", {
|
|
8883
8905
|
className: "wui-toast-more",
|
|
8884
8906
|
"aria-hidden": "true",
|
|
8885
8907
|
children: [
|
|
8886
8908
|
"+",
|
|
8887
|
-
|
|
8909
|
+
u,
|
|
8888
8910
|
" more"
|
|
8889
8911
|
]
|
|
8890
|
-
}),
|
|
8912
|
+
}), f.map((e) => /* @__PURE__ */ p(Si, {
|
|
8891
8913
|
toast: e,
|
|
8892
8914
|
defaultAnimation: n,
|
|
8893
8915
|
defaultShape: r,
|
|
@@ -8895,8 +8917,8 @@ function vi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8895
8917
|
}, e.id))]
|
|
8896
8918
|
});
|
|
8897
8919
|
}
|
|
8898
|
-
function
|
|
8899
|
-
let i =
|
|
8920
|
+
function Si({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
8921
|
+
let i = hi[e.variant] ?? hi.success, a = vi.has(e.animation) ? e.animation : t, o = yi.has(e.shape) ? e.shape : n, s = bi.has(e.surface) ? e.surface : r, c = (a !== "rise" && vi.has(a) ? ` wui-toast--anim-${a}` : "") + (o !== "rounded" && yi.has(o) ? ` wui-toast--shape-${o}` : "") + (s === "inverse" ? " wui-toast--surface-inverse" : ""), l = e.duration === 0, [f, h] = d(0), [g, _] = d(!1), v = u(null), y = () => pi(e.id), b = (e) => {
|
|
8900
8922
|
e.button !== 0 || e.target.closest("button") || (v.current = e.clientX, _(!0), e.currentTarget.setPointerCapture?.(e.pointerId));
|
|
8901
8923
|
}, x = (e) => {
|
|
8902
8924
|
v.current !== null && h(e.clientX - v.current);
|
|
@@ -8905,7 +8927,7 @@ function yi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8905
8927
|
}, C = (e) => {
|
|
8906
8928
|
if (v.current === null) return;
|
|
8907
8929
|
let t = e.clientX - v.current;
|
|
8908
|
-
if (Math.abs(t) >
|
|
8930
|
+
if (Math.abs(t) > _i) {
|
|
8909
8931
|
y();
|
|
8910
8932
|
return;
|
|
8911
8933
|
}
|
|
@@ -8928,7 +8950,7 @@ function yi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8928
8950
|
/* @__PURE__ */ p("span", {
|
|
8929
8951
|
className: "wui-toast-icon",
|
|
8930
8952
|
"aria-hidden": "true",
|
|
8931
|
-
children: /* @__PURE__ */ p(
|
|
8953
|
+
children: /* @__PURE__ */ p(V, {
|
|
8932
8954
|
name: i.icon,
|
|
8933
8955
|
size: 20
|
|
8934
8956
|
})
|
|
@@ -8988,7 +9010,7 @@ function yi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8988
9010
|
}
|
|
8989
9011
|
//#endregion
|
|
8990
9012
|
//#region src/components/AppToolbar.jsx
|
|
8991
|
-
function
|
|
9013
|
+
function Ci({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
8992
9014
|
N("AppToolbar", u);
|
|
8993
9015
|
let f = s(), h = o || f, [g, _] = d(r), v = n === void 0 ? g : n;
|
|
8994
9016
|
return /* @__PURE__ */ m("div", {
|
|
@@ -9018,7 +9040,7 @@ function bi({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9018
9040
|
}),
|
|
9019
9041
|
/* @__PURE__ */ p("span", {
|
|
9020
9042
|
className: "toolbar-item-icon",
|
|
9021
|
-
children:
|
|
9043
|
+
children: H(e.icon, { size: 16 })
|
|
9022
9044
|
}),
|
|
9023
9045
|
/* @__PURE__ */ p("span", {
|
|
9024
9046
|
className: "toolbar-item-label",
|
|
@@ -9038,7 +9060,7 @@ function bi({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9038
9060
|
onClick: e.onClick,
|
|
9039
9061
|
children: /* @__PURE__ */ p("span", {
|
|
9040
9062
|
className: "toolbar-item-icon",
|
|
9041
|
-
children:
|
|
9063
|
+
children: H(e.icon, { size: 16 })
|
|
9042
9064
|
})
|
|
9043
9065
|
}, e.key ?? `${e.title}-${t}`))
|
|
9044
9066
|
]
|
|
@@ -9046,7 +9068,7 @@ function bi({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9046
9068
|
}
|
|
9047
9069
|
//#endregion
|
|
9048
9070
|
//#region src/components/AppWizard.jsx
|
|
9049
|
-
var
|
|
9071
|
+
var wi = i(function({ steps: t = [], children: n, active: r, defaultActive: i = 0, onStepChange: a, onFinish: s, onSkip: c, beforeNext: l, onInvalid: d, variant: f = "steps", tone: m, orientation: h = "horizontal", skippable: g = !1, nonLinear: _ = !1, hideStepper: v = !1, disabled: y = !1, label: b = "Progress", backLabel: x = "Back", nextLabel: S = "Next", skipLabel: C = "Skip", finishLabel: w = "Finish", className: T = "", ...E }, D) {
|
|
9050
9072
|
N("AppWizard", E);
|
|
9051
9073
|
let O = u(null), k = (e) => {
|
|
9052
9074
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -9101,7 +9123,7 @@ var xi = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
9101
9123
|
});
|
|
9102
9124
|
//#endregion
|
|
9103
9125
|
//#region src/components/AppWorkspaceSwitcher.jsx
|
|
9104
|
-
function
|
|
9126
|
+
function Ti({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAction: i, linkComponent: a, searchable: s = !1, onCreate: c, canCreate: f = !1, createLabel: h = "Create workspace", compact: g = !1, size: _ = "md", ariaLabel: v, ...y }) {
|
|
9105
9127
|
let { onToggle: x, ...S } = y;
|
|
9106
9128
|
N("AppWorkspaceSwitcher", S);
|
|
9107
9129
|
let [C, w] = d(""), [T, E] = d(!1), D = u(null), O = e.find((e) => e.id === t) ?? e[0], k = l(() => {
|
|
@@ -9129,7 +9151,7 @@ function Si({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9129
9151
|
},
|
|
9130
9152
|
...S,
|
|
9131
9153
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
9132
|
-
as:
|
|
9154
|
+
as: ki,
|
|
9133
9155
|
compact: g,
|
|
9134
9156
|
tenant: O,
|
|
9135
9157
|
"aria-label": j
|
|
@@ -9143,7 +9165,7 @@ function Si({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9143
9165
|
}) : null,
|
|
9144
9166
|
s ? /* @__PURE__ */ m("div", {
|
|
9145
9167
|
className: "workspace-switcher-search",
|
|
9146
|
-
children: [/* @__PURE__ */ p(
|
|
9168
|
+
children: [/* @__PURE__ */ p(V, {
|
|
9147
9169
|
name: "search",
|
|
9148
9170
|
size: 14
|
|
9149
9171
|
}), /* @__PURE__ */ p("input", {
|
|
@@ -9164,7 +9186,7 @@ function Si({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9164
9186
|
className: `workspace-switcher-option${e.id === O?.id ? " is-active" : ""}`,
|
|
9165
9187
|
onClick: () => n?.(e),
|
|
9166
9188
|
children: [
|
|
9167
|
-
/* @__PURE__ */ p(
|
|
9189
|
+
/* @__PURE__ */ p(Di, { tenant: e }),
|
|
9168
9190
|
/* @__PURE__ */ p("span", {
|
|
9169
9191
|
className: "workspace-switcher-option-name",
|
|
9170
9192
|
children: e.name
|
|
@@ -9173,7 +9195,7 @@ function Si({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9173
9195
|
className: "workspace-switcher-badge",
|
|
9174
9196
|
children: e.badge
|
|
9175
9197
|
}) : null,
|
|
9176
|
-
e.id === O?.id ? /* @__PURE__ */ p(
|
|
9198
|
+
e.id === O?.id ? /* @__PURE__ */ p(V, {
|
|
9177
9199
|
name: "check",
|
|
9178
9200
|
size: 16,
|
|
9179
9201
|
className: "workspace-switcher-tick"
|
|
@@ -9189,24 +9211,24 @@ function Si({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9189
9211
|
type: "button",
|
|
9190
9212
|
className: "workspace-switcher-create",
|
|
9191
9213
|
onClick: () => c?.(),
|
|
9192
|
-
children: [/* @__PURE__ */ p(
|
|
9214
|
+
children: [/* @__PURE__ */ p(V, {
|
|
9193
9215
|
name: "plus",
|
|
9194
9216
|
size: 16
|
|
9195
9217
|
}), h]
|
|
9196
9218
|
}) : null,
|
|
9197
9219
|
i ? /* @__PURE__ */ p("div", {
|
|
9198
9220
|
className: "workspace-switcher-footer",
|
|
9199
|
-
children:
|
|
9221
|
+
children: Oi(i, a)
|
|
9200
9222
|
}) : null
|
|
9201
9223
|
]
|
|
9202
9224
|
})]
|
|
9203
9225
|
});
|
|
9204
9226
|
}
|
|
9205
|
-
function
|
|
9227
|
+
function Ei(e) {
|
|
9206
9228
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
9207
9229
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
9208
9230
|
}
|
|
9209
|
-
function
|
|
9231
|
+
function Di({ tenant: e }) {
|
|
9210
9232
|
return e?.logoUrl ? /* @__PURE__ */ p("img", {
|
|
9211
9233
|
className: "workspace-switcher-mark",
|
|
9212
9234
|
src: e.logoUrl,
|
|
@@ -9214,22 +9236,22 @@ function wi({ tenant: e }) {
|
|
|
9214
9236
|
loading: "lazy"
|
|
9215
9237
|
}) : /* @__PURE__ */ p("span", {
|
|
9216
9238
|
className: "workspace-switcher-mark",
|
|
9217
|
-
children:
|
|
9239
|
+
children: Ei(e?.name)
|
|
9218
9240
|
});
|
|
9219
9241
|
}
|
|
9220
|
-
function
|
|
9242
|
+
function Oi(e, t) {
|
|
9221
9243
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
9222
9244
|
let { label: n, icon: r, href: i } = e;
|
|
9223
9245
|
return /* @__PURE__ */ m(i ? t ?? "a" : "button", {
|
|
9224
9246
|
className: "workspace-switcher-footer-action",
|
|
9225
9247
|
...i ? t ? { to: i } : { href: i } : { type: "button" },
|
|
9226
|
-
children: [r ? /* @__PURE__ */ p(
|
|
9248
|
+
children: [r ? /* @__PURE__ */ p(V, {
|
|
9227
9249
|
name: r,
|
|
9228
9250
|
size: 16
|
|
9229
9251
|
}) : null, n]
|
|
9230
9252
|
});
|
|
9231
9253
|
}
|
|
9232
|
-
var
|
|
9254
|
+
var ki = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
9233
9255
|
return /* @__PURE__ */ m("button", {
|
|
9234
9256
|
ref: a,
|
|
9235
9257
|
type: "button",
|
|
@@ -9237,10 +9259,10 @@ var Ei = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9237
9259
|
"aria-haspopup": "true",
|
|
9238
9260
|
"aria-label": n,
|
|
9239
9261
|
...i,
|
|
9240
|
-
children: [/* @__PURE__ */ p(
|
|
9262
|
+
children: [/* @__PURE__ */ p(Di, { tenant: t }), e ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
9241
9263
|
className: "workspace-switcher-trigger-name",
|
|
9242
9264
|
children: t?.name
|
|
9243
|
-
}), /* @__PURE__ */ p(
|
|
9265
|
+
}), /* @__PURE__ */ p(V, {
|
|
9244
9266
|
name: "chevrons-up-down",
|
|
9245
9267
|
size: 16,
|
|
9246
9268
|
className: "workspace-switcher-chevron"
|
|
@@ -9249,36 +9271,36 @@ var Ei = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9249
9271
|
});
|
|
9250
9272
|
//#endregion
|
|
9251
9273
|
//#region src/components/toast.js
|
|
9252
|
-
function
|
|
9253
|
-
|
|
9274
|
+
function Ai() {
|
|
9275
|
+
mi();
|
|
9254
9276
|
}
|
|
9255
|
-
var
|
|
9277
|
+
var ji = /* @__PURE__ */ new Set([
|
|
9256
9278
|
"success",
|
|
9257
9279
|
"info",
|
|
9258
9280
|
"warning",
|
|
9259
9281
|
"error"
|
|
9260
9282
|
]);
|
|
9261
|
-
function
|
|
9283
|
+
function Mi(e, t = "info") {
|
|
9262
9284
|
let n = "info", r = {};
|
|
9263
|
-
typeof t == "string" ? n =
|
|
9285
|
+
typeof t == "string" ? n = ji.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = ji.has(r.variant) ? r.variant : "info"), fi(e, n, r);
|
|
9264
9286
|
}
|
|
9265
|
-
function
|
|
9266
|
-
|
|
9287
|
+
function Ni(e, t = {}) {
|
|
9288
|
+
fi(e, "error", t);
|
|
9267
9289
|
}
|
|
9268
|
-
|
|
9290
|
+
Mi.promise = (e, t, n = {}) => {
|
|
9269
9291
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
9270
|
-
return
|
|
9292
|
+
return Mi(t.loading || "Loading...", {
|
|
9271
9293
|
...n,
|
|
9272
9294
|
variant: "info",
|
|
9273
9295
|
id: r,
|
|
9274
9296
|
duration: 0
|
|
9275
|
-
}), e.then((e) => (
|
|
9297
|
+
}), e.then((e) => (Mi((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
9276
9298
|
...n,
|
|
9277
9299
|
variant: "success",
|
|
9278
9300
|
id: r,
|
|
9279
9301
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
9280
9302
|
}), e)).catch((e) => {
|
|
9281
|
-
throw
|
|
9303
|
+
throw Mi((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
9282
9304
|
...n,
|
|
9283
9305
|
variant: "error",
|
|
9284
9306
|
id: r,
|
|
@@ -9288,7 +9310,7 @@ ki.promise = (e, t, n = {}) => {
|
|
|
9288
9310
|
};
|
|
9289
9311
|
//#endregion
|
|
9290
9312
|
//#region src/lib/usePagination.js
|
|
9291
|
-
function
|
|
9313
|
+
function Pi(e, t = 10) {
|
|
9292
9314
|
let [n, r] = d(1), [i, a] = d(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
9293
9315
|
o(() => {
|
|
9294
9316
|
n > c && r(c);
|
|
@@ -9314,4 +9336,4 @@ function ji(e, t = 10) {
|
|
|
9314
9336
|
};
|
|
9315
9337
|
}
|
|
9316
9338
|
//#endregion
|
|
9317
|
-
export {
|
|
9339
|
+
export { oe as AppAccordion, se as AppActionIcon, ue as AppAlert, ve as AppAsyncBlock, qt as AppAutocomplete, $t as AppAvatar, nn as AppAvatarGroup, rn as AppBadge, on as AppBanner, sn as AppBreadcrumbs, he as AppButton, ln as AppCallout, dn as AppCard, pn as AppCheckbox, mn as AppChip, hn as AppChoiceCard, gn as AppChoiceChip, _n as AppColorField, vn as AppCompareTable, Dn as AppConfirmDialog, kn as AppCopyButton, zn as AppDataTable, Bn as AppDatePicker, Vn as AppDateRangePicker, Un as AppDescriptions, Kn as AppDropdown, ge as AppEmptyState, $n as AppFileAttachment, tr as AppFilePicker, nr as AppFloatingDock, rr as AppFormActions, ir as AppFormRow, ar as AppFormSection, V as AppIcon, or as AppInfoList, Rt as AppInfoTip, yn as AppInput, dr as AppKpiTile, pr as AppLogoPicker, _r as AppMeter, wn as AppModal, vr as AppMultiSelect, yr as AppNumberInput, br as AppOtpInput, xr as AppPageHeader, Sr as AppPagination, Cr as AppPhoneNumberInput, Lt as AppPopover, wr as AppPricingCard, Dr as AppProgress, Or as AppRadio, kr as AppRepeater, Z as AppRequiredMark, Ar as AppResourceCard, Mr as AppResult, Nr as AppScrollbar, Pr as AppSearch, Fr as AppSegmented, Lr as AppSelect, Pn as AppSelectMini, Rr as AppShell, Vr as AppSidebarMenu, An as AppSkeleton, jn as AppSkeletonRows, Hr as AppSlider, _e as AppSpinner, Wr as AppSplash, Gr as AppStatusBadge, Kr as AppStepper, Jr as AppSwitch, Yr as AppTableEmptyState, In as AppTablePagination, Qr as AppTabs, $r as AppTagInput, ei as AppTextarea, ri as AppTimePicker, ni as AppTimeline, xi as AppToast, Ci as AppToolbar, Zr as AppTooltip, wi as AppWizard, Ti as AppWorkspaceSwitcher, En as MODAL_ICONS, Ai as dismissAll, Ni as errorToast, re as iconNames, ae as registerIcons, Mi as toast, Pi as usePagination };
|