@webority/ui-react 0.9.8 → 0.9.10
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/types/components/AppColorField.d.ts +4 -2
- package/dist/types/components/AppDatePicker.d.ts +2 -1
- package/dist/types/components/AppDateRangePicker.d.ts +2 -1
- package/dist/types/components/AppFilePicker.d.ts +8 -4
- package/dist/types/components/AppOtpInput.d.ts +2 -1
- package/dist/types/components/AppSelect.d.ts +5 -0
- package/dist/types/components/AppSlider.d.ts +2 -1
- package/dist/types/components/AppTimePicker.d.ts +2 -1
- package/dist/ui-react.js +720 -720
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -173,36 +173,36 @@ function L() {
|
|
|
173
173
|
}), F;
|
|
174
174
|
}
|
|
175
175
|
var ee = new Set(D), R = null, z = null, B = /* @__PURE__ */ new Set();
|
|
176
|
-
function
|
|
176
|
+
function V() {
|
|
177
177
|
return z ||= import("./iconCatalogFull.g-BKUr0SVj.js").then((e) => {
|
|
178
178
|
R = e.FULL_GLYPHS;
|
|
179
179
|
for (let e of B) e();
|
|
180
180
|
B.clear();
|
|
181
181
|
}), z;
|
|
182
182
|
}
|
|
183
|
-
var
|
|
183
|
+
var te = {
|
|
184
184
|
outline: () => import("./iconCatalogFull.outline.g-AOnxJAAj.js"),
|
|
185
185
|
bold: () => import("./iconCatalogFull.bold.g-OK3eOiMp.js"),
|
|
186
186
|
bulk: () => import("./iconCatalogFull.bulk.g-B7wsb4AN.js"),
|
|
187
187
|
broken: () => import("./iconCatalogFull.broken.g-BZsyxXcp.js"),
|
|
188
188
|
twotone: () => import("./iconCatalogFull.twotone.g-DR6Qdpib.js")
|
|
189
|
-
},
|
|
190
|
-
function
|
|
191
|
-
let t =
|
|
192
|
-
return t ? (
|
|
193
|
-
|
|
194
|
-
let n =
|
|
189
|
+
}, ne = Object.create(null), re = Object.create(null), ie = Object.create(null);
|
|
190
|
+
function ae(e) {
|
|
191
|
+
let t = te[e];
|
|
192
|
+
return t ? (re[e] ||= t().then((t) => {
|
|
193
|
+
ne[e] = t.FULL_VARIANT_GLYPHS;
|
|
194
|
+
let n = ie[e];
|
|
195
195
|
if (n) {
|
|
196
196
|
for (let e of n) e();
|
|
197
197
|
n.clear();
|
|
198
198
|
}
|
|
199
|
-
}),
|
|
199
|
+
}), re[e]) : null;
|
|
200
200
|
}
|
|
201
|
-
var
|
|
202
|
-
function
|
|
203
|
-
for (let [t, n] of Object.entries(e))
|
|
201
|
+
var oe = D, se = /* @__PURE__ */ new Map();
|
|
202
|
+
function ce(e) {
|
|
203
|
+
for (let [t, n] of Object.entries(e)) se.set(t, n);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function H({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color: a, style: s, ...c }) {
|
|
206
206
|
N("AppIcon", c);
|
|
207
207
|
let l = !!n && n !== "linear", u = r != null && r !== "", f = (e) => u ? /* @__PURE__ */ p("span", {
|
|
208
208
|
className: "wui-icon-tip",
|
|
@@ -213,8 +213,8 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
213
213
|
}) : e, h = O[e] !== void 0, g = !h && ee.has(e), [, _] = d(0);
|
|
214
214
|
o(() => {
|
|
215
215
|
let e = () => _((e) => e + 1);
|
|
216
|
-
return l && h && !P && (I.add(e), L()), g && !R && (B.add(e),
|
|
217
|
-
I.delete(e), B.delete(e),
|
|
216
|
+
return l && h && !P && (I.add(e), L()), g && !R && (B.add(e), V()), l && g && !ne[n] && ((ie[n] ||= /* @__PURE__ */ new Set()).add(e), ae(n)), () => {
|
|
217
|
+
I.delete(e), B.delete(e), ie[n]?.delete(e);
|
|
218
218
|
};
|
|
219
219
|
}, [
|
|
220
220
|
l,
|
|
@@ -222,7 +222,7 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
222
222
|
g,
|
|
223
223
|
n
|
|
224
224
|
]);
|
|
225
|
-
let v =
|
|
225
|
+
let v = se.get(e);
|
|
226
226
|
if (v) return f(v({
|
|
227
227
|
size: t,
|
|
228
228
|
color: a,
|
|
@@ -252,7 +252,7 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
252
252
|
}), /* @__PURE__ */ p("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
|
|
253
253
|
})
|
|
254
254
|
}));
|
|
255
|
-
let y = l && (P?.[n]?.[e] ||
|
|
255
|
+
let y = l && (P?.[n]?.[e] || ne?.[n]?.[e]) || O[e] || R?.[e];
|
|
256
256
|
return y ? f(/* @__PURE__ */ p("svg", {
|
|
257
257
|
width: t,
|
|
258
258
|
height: t,
|
|
@@ -272,7 +272,7 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
272
272
|
}
|
|
273
273
|
//#endregion
|
|
274
274
|
//#region src/components/AppAccordion.jsx
|
|
275
|
-
function
|
|
275
|
+
function le({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i }) {
|
|
276
276
|
N("AppAccordion", i);
|
|
277
277
|
let a = s(), o = n || a, [c, l] = d(() => {
|
|
278
278
|
let n = e.map((e, t) => ({
|
|
@@ -302,7 +302,7 @@ function ue({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i })
|
|
|
302
302
|
onClick: () => f(n),
|
|
303
303
|
children: [e.title, /* @__PURE__ */ p("span", {
|
|
304
304
|
className: "faq-q-icon",
|
|
305
|
-
children: /* @__PURE__ */ p(
|
|
305
|
+
children: /* @__PURE__ */ p(H, {
|
|
306
306
|
name: "chevron-down",
|
|
307
307
|
size: 18
|
|
308
308
|
})
|
|
@@ -324,8 +324,8 @@ function ue({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i })
|
|
|
324
324
|
}
|
|
325
325
|
//#endregion
|
|
326
326
|
//#region src/components/renderIconProp.js
|
|
327
|
-
function
|
|
328
|
-
return e == null || e === !1 ? null : typeof e == "string" ? r(
|
|
327
|
+
function U(e, { size: t = 16, className: n } = {}) {
|
|
328
|
+
return e == null || e === !1 ? null : typeof e == "string" ? r(H, {
|
|
329
329
|
name: e,
|
|
330
330
|
size: t,
|
|
331
331
|
className: n
|
|
@@ -333,7 +333,7 @@ function H(e, { size: t = 16, className: n } = {}) {
|
|
|
333
333
|
}
|
|
334
334
|
//#endregion
|
|
335
335
|
//#region src/components/AppActionIcon.jsx
|
|
336
|
-
function
|
|
336
|
+
function ue({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20, onClick: a, className: o = "", as: s, href: c, ...l }) {
|
|
337
337
|
N("AppActionIcon", l);
|
|
338
338
|
let u = [
|
|
339
339
|
"u-action",
|
|
@@ -358,18 +358,18 @@ function de({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20,
|
|
|
358
358
|
a?.(e);
|
|
359
359
|
},
|
|
360
360
|
...l,
|
|
361
|
-
children:
|
|
361
|
+
children: U(e, { size: i })
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region src/components/AppAlert.jsx
|
|
366
|
-
var
|
|
366
|
+
var de = {
|
|
367
367
|
info: "info",
|
|
368
368
|
success: "check",
|
|
369
369
|
warning: "alert-triangle",
|
|
370
370
|
danger: "x"
|
|
371
371
|
};
|
|
372
|
-
function
|
|
372
|
+
function fe(e, t, n, r) {
|
|
373
373
|
return n ? /* @__PURE__ */ p("span", {
|
|
374
374
|
className: "alert-icon alert-icon-image",
|
|
375
375
|
children: /* @__PURE__ */ p("img", {
|
|
@@ -378,7 +378,7 @@ function pe(e, t, n, r) {
|
|
|
378
378
|
})
|
|
379
379
|
}) : e ? typeof e == "string" ? /* @__PURE__ */ p("span", {
|
|
380
380
|
className: "alert-icon",
|
|
381
|
-
children: /* @__PURE__ */ p(
|
|
381
|
+
children: /* @__PURE__ */ p(H, {
|
|
382
382
|
name: e,
|
|
383
383
|
size: t
|
|
384
384
|
})
|
|
@@ -387,9 +387,9 @@ function pe(e, t, n, r) {
|
|
|
387
387
|
children: e
|
|
388
388
|
}) : null;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function pe({ 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 }) {
|
|
391
391
|
N("AppAlert", d);
|
|
392
|
-
let g = r === void 0 ?
|
|
392
|
+
let g = r === void 0 ? de[e] : r === "none" ? null : r, _ = !!i || !!g, v = n ? /* @__PURE__ */ p("div", {
|
|
393
393
|
className: "alert-heading",
|
|
394
394
|
children: n
|
|
395
395
|
}) : null, y = _ && !!v && !!t, b = y ? 13 : 11;
|
|
@@ -406,7 +406,7 @@ function me({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
406
406
|
transition: !1,
|
|
407
407
|
role: u,
|
|
408
408
|
...d,
|
|
409
|
-
children: _ ? /* @__PURE__ */ m(f, { children: [
|
|
409
|
+
children: _ ? /* @__PURE__ */ m(f, { children: [fe(g, b, i, a), /* @__PURE__ */ m("div", {
|
|
410
410
|
className: "alert-content",
|
|
411
411
|
children: [v, t]
|
|
412
412
|
})] }) : /* @__PURE__ */ m(f, { children: [v, t] })
|
|
@@ -414,23 +414,23 @@ function me({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
414
414
|
}
|
|
415
415
|
//#endregion
|
|
416
416
|
//#region src/components/warnInvalidValue.js
|
|
417
|
-
var
|
|
417
|
+
var W = () => {
|
|
418
418
|
try {
|
|
419
419
|
return process.env.NODE_ENV !== "production";
|
|
420
420
|
} catch {
|
|
421
421
|
return !0;
|
|
422
422
|
}
|
|
423
|
-
},
|
|
424
|
-
function
|
|
425
|
-
if (!
|
|
423
|
+
}, me = /* @__PURE__ */ new Set();
|
|
424
|
+
function G(e, t, n, r) {
|
|
425
|
+
if (!W() || n == null) return;
|
|
426
426
|
let i = r instanceof Set ? r : new Set(r);
|
|
427
427
|
if (i.has(n)) return;
|
|
428
428
|
let a = `${e}.${t}.${String(n)}`;
|
|
429
|
-
|
|
429
|
+
me.has(a) || (me.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.`));
|
|
430
430
|
}
|
|
431
431
|
//#endregion
|
|
432
432
|
//#region src/components/AppButton.jsx
|
|
433
|
-
var
|
|
433
|
+
var he = {
|
|
434
434
|
primary: "primary",
|
|
435
435
|
secondary: "secondary",
|
|
436
436
|
outline: "outline-primary",
|
|
@@ -443,28 +443,28 @@ var ge = {
|
|
|
443
443
|
warning: "warning",
|
|
444
444
|
subtle: "subtle",
|
|
445
445
|
"outline-light": "outline-light"
|
|
446
|
-
},
|
|
446
|
+
}, ge = {
|
|
447
447
|
sm: 14,
|
|
448
448
|
md: 16,
|
|
449
449
|
lg: 20
|
|
450
450
|
};
|
|
451
|
-
function
|
|
451
|
+
function _e(e, t, n) {
|
|
452
452
|
if (!e) return null;
|
|
453
453
|
let r = t === "left" ? "me-2" : "ms-2";
|
|
454
|
-
return typeof e == "string" ? /* @__PURE__ */ p(
|
|
454
|
+
return typeof e == "string" ? /* @__PURE__ */ p(H, {
|
|
455
455
|
name: e,
|
|
456
|
-
size:
|
|
456
|
+
size: ge[n] ?? ge.md,
|
|
457
457
|
className: r
|
|
458
458
|
}) : /* @__PURE__ */ p("span", {
|
|
459
459
|
className: `d-inline-flex ${r}`,
|
|
460
460
|
children: e
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
if (N("AppButton", f),
|
|
463
|
+
function ve({ 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, static: u = !1, className: d = "", ...f }) {
|
|
464
|
+
if (N("AppButton", f), G("AppButton", "variant", t, Object.keys(he)), G("AppButton", "size", n, Object.keys(ge)), u) return /* @__PURE__ */ m("span", {
|
|
465
465
|
className: [
|
|
466
466
|
"btn",
|
|
467
|
-
`btn-${
|
|
467
|
+
`btn-${he[t] ?? "primary"}`,
|
|
468
468
|
n === "sm" ? "btn-sm" : n === "lg" ? "btn-lg" : "",
|
|
469
469
|
o ? "w-100" : "",
|
|
470
470
|
"btn-static",
|
|
@@ -472,9 +472,9 @@ function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
472
472
|
].filter(Boolean).join(" "),
|
|
473
473
|
...f,
|
|
474
474
|
children: [
|
|
475
|
-
|
|
475
|
+
_e(s, "left", n),
|
|
476
476
|
e,
|
|
477
|
-
|
|
477
|
+
_e(c, "right", n)
|
|
478
478
|
]
|
|
479
479
|
});
|
|
480
480
|
let h = [
|
|
@@ -485,7 +485,7 @@ function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
485
485
|
return /* @__PURE__ */ m(v, {
|
|
486
486
|
type: (f.as === void 0 || f.as === "button") && l === void 0 ? r : void 0,
|
|
487
487
|
href: l,
|
|
488
|
-
variant:
|
|
488
|
+
variant: he[t] ?? "primary",
|
|
489
489
|
size: n === "md" ? void 0 : n,
|
|
490
490
|
disabled: a || i,
|
|
491
491
|
"aria-busy": i || void 0,
|
|
@@ -496,15 +496,15 @@ function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
496
496
|
className: "spinner-border spinner-border-sm me-2",
|
|
497
497
|
"aria-hidden": "true"
|
|
498
498
|
}),
|
|
499
|
-
!i &&
|
|
499
|
+
!i && _e(s, "left", n),
|
|
500
500
|
e,
|
|
501
|
-
!i &&
|
|
501
|
+
!i && _e(c, "right", n)
|
|
502
502
|
]
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
505
|
//#endregion
|
|
506
506
|
//#region src/components/AppEmptyState.jsx
|
|
507
|
-
function
|
|
507
|
+
function ye({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, action: a, className: o = "", style: s, ...c }) {
|
|
508
508
|
return N("AppEmptyState", c), /* @__PURE__ */ m("div", {
|
|
509
509
|
className: [
|
|
510
510
|
"empty-state",
|
|
@@ -516,7 +516,7 @@ function be({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
516
516
|
children: [
|
|
517
517
|
e ? /* @__PURE__ */ p("div", {
|
|
518
518
|
className: "empty-state-icon",
|
|
519
|
-
children:
|
|
519
|
+
children: U(e, { size: t })
|
|
520
520
|
}) : null,
|
|
521
521
|
r != null && /* @__PURE__ */ p("div", {
|
|
522
522
|
className: "empty-state-title",
|
|
@@ -535,7 +535,7 @@ function be({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
535
535
|
}
|
|
536
536
|
//#endregion
|
|
537
537
|
//#region src/components/AppSpinner.jsx
|
|
538
|
-
function
|
|
538
|
+
function be({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
539
539
|
N("AppSpinner", r);
|
|
540
540
|
let { style: i, ...a } = r, o = Number(e), s = Number.isFinite(o) && o > 0;
|
|
541
541
|
return /* @__PURE__ */ p("span", {
|
|
@@ -553,7 +553,7 @@ function xe({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
|
553
553
|
}
|
|
554
554
|
//#endregion
|
|
555
555
|
//#region src/components/AppAsyncBlock.jsx
|
|
556
|
-
function
|
|
556
|
+
function xe({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRetry: i, skeleton: a, className: o = "", ...s }) {
|
|
557
557
|
N("AppAsyncBlock", s);
|
|
558
558
|
let c = `async-block${o ? ` ${o}` : ""}`;
|
|
559
559
|
return e ? /* @__PURE__ */ p("div", {
|
|
@@ -562,17 +562,17 @@ function Se({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
562
562
|
...s,
|
|
563
563
|
children: a ?? /* @__PURE__ */ p("div", {
|
|
564
564
|
className: "d-flex align-items-center justify-content-center py-5",
|
|
565
|
-
children: /* @__PURE__ */ p(
|
|
565
|
+
children: /* @__PURE__ */ p(be, { label: "Loading" })
|
|
566
566
|
})
|
|
567
567
|
}) : t ? /* @__PURE__ */ p("div", {
|
|
568
568
|
className: c,
|
|
569
569
|
"data-state": "error",
|
|
570
570
|
...s,
|
|
571
|
-
children: /* @__PURE__ */ p(
|
|
571
|
+
children: /* @__PURE__ */ p(ye, {
|
|
572
572
|
icon: "alert-circle",
|
|
573
573
|
title: "Something went wrong",
|
|
574
574
|
text: t,
|
|
575
|
-
action: i ? /* @__PURE__ */ p(
|
|
575
|
+
action: i ? /* @__PURE__ */ p(ve, {
|
|
576
576
|
variant: "secondary",
|
|
577
577
|
onClick: i,
|
|
578
578
|
children: "Retry"
|
|
@@ -582,7 +582,7 @@ function Se({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
582
582
|
className: c,
|
|
583
583
|
"data-state": "empty",
|
|
584
584
|
...s,
|
|
585
|
-
children: /* @__PURE__ */ p(
|
|
585
|
+
children: /* @__PURE__ */ p(ye, {
|
|
586
586
|
icon: "inbox",
|
|
587
587
|
title: "Nothing to show yet"
|
|
588
588
|
})
|
|
@@ -595,15 +595,15 @@ function Se({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
595
595
|
}
|
|
596
596
|
//#endregion
|
|
597
597
|
//#region ../elements/dist/ui-elements.js
|
|
598
|
-
var
|
|
598
|
+
var Se = {
|
|
599
599
|
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>",
|
|
600
600
|
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>",
|
|
601
601
|
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>",
|
|
602
602
|
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>",
|
|
603
603
|
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>"
|
|
604
604
|
};
|
|
605
|
-
Object.keys(
|
|
606
|
-
var
|
|
605
|
+
Object.keys(Se);
|
|
606
|
+
var Ce = class extends HTMLElement {
|
|
607
607
|
static get observedAttributes() {
|
|
608
608
|
return ["tone", "size"];
|
|
609
609
|
}
|
|
@@ -614,36 +614,36 @@ var we = class extends HTMLElement {
|
|
|
614
614
|
this.isConnected && this.render();
|
|
615
615
|
}
|
|
616
616
|
render() {
|
|
617
|
-
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n =
|
|
617
|
+
let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n = Se[e] || Se.info;
|
|
618
618
|
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>`;
|
|
619
619
|
}
|
|
620
|
-
},
|
|
621
|
-
function
|
|
620
|
+
}, we = 4, Te = 300, Ee = 400;
|
|
621
|
+
function De(e, t, n = {}) {
|
|
622
622
|
if (!e || !t) return;
|
|
623
|
-
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i +
|
|
624
|
-
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(
|
|
625
|
-
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s -
|
|
626
|
-
t.style.left = `${Math.max(
|
|
623
|
+
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + we && r.top > a;
|
|
624
|
+
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(we, r.top - i - we)}px` : `${r.bottom + we}px`, n.matchWidth && (r.width >= Te ? (t.style.minWidth = `${r.width}px`, t.style.width = `${r.width}px`, t.style.maxWidth = `${r.width}px`) : (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${Math.min(Ee, window.innerWidth - we * 2)}px`));
|
|
625
|
+
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - we);
|
|
626
|
+
t.style.left = `${Math.max(we, c)}px`;
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
|
|
628
|
+
function Oe(e, t) {
|
|
629
|
+
ke(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function ke(e) {
|
|
632
632
|
e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
|
|
633
633
|
}
|
|
634
|
-
var
|
|
635
|
-
function
|
|
636
|
-
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${
|
|
634
|
+
var Ae = "data-wui-mirror";
|
|
635
|
+
function K(e, t) {
|
|
636
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${Ae}]`);
|
|
637
637
|
if (!n) {
|
|
638
638
|
r?.remove();
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
|
-
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(
|
|
641
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(Ae, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
|
|
642
642
|
for (let t of [...r.attributes]) t.name.startsWith("data-val") && !e.hasAttribute(t.name) && r.removeAttribute(t.name);
|
|
643
643
|
for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
|
|
644
644
|
r.disabled = e.hasAttribute("disabled");
|
|
645
645
|
}
|
|
646
|
-
var
|
|
646
|
+
var je = {
|
|
647
647
|
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>",
|
|
648
648
|
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>",
|
|
649
649
|
"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>",
|
|
@@ -786,12 +786,12 @@ var Me = {
|
|
|
786
786
|
"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>",
|
|
787
787
|
"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>"
|
|
788
788
|
};
|
|
789
|
-
Object.keys(
|
|
790
|
-
function
|
|
791
|
-
let i =
|
|
789
|
+
Object.keys(je);
|
|
790
|
+
function q(e, { size: t = 16, className: n = "", style: r = "" } = {}) {
|
|
791
|
+
let i = je[e];
|
|
792
792
|
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>` : "";
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function Me(e) {
|
|
795
795
|
let { getVisibleOptions: t, getActive: n, setActive: r, onEnter: i, onEscape: a, onTypeahead: o, typeaheadMs: s = 500 } = e, c = "", l = null, u = () => {
|
|
796
796
|
clearTimeout(l), l = null, c = "";
|
|
797
797
|
};
|
|
@@ -820,15 +820,15 @@ function Ne(e) {
|
|
|
820
820
|
teardown: u
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
|
-
var
|
|
823
|
+
var Ne = Symbol("wui.trustedHtml"), J = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Pe = (e) => {
|
|
824
824
|
if (!e) return "";
|
|
825
825
|
let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
826
|
-
return t ?
|
|
827
|
-
},
|
|
826
|
+
return t ? q(t) : "";
|
|
827
|
+
}, Fe = (e) => {
|
|
828
828
|
if (e == null) return "";
|
|
829
|
-
let t = e[
|
|
829
|
+
let t = e[Ne] ? String(e.label ?? "") : J(e.label), n = Pe(e.icon);
|
|
830
830
|
return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
|
|
831
|
-
},
|
|
831
|
+
}, Ie = class extends HTMLElement {
|
|
832
832
|
static formAssociated = !0;
|
|
833
833
|
_accessibleName() {
|
|
834
834
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -887,14 +887,14 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
887
887
|
return this._value;
|
|
888
888
|
}
|
|
889
889
|
set value(e) {
|
|
890
|
-
this._value = e == null ? "" : String(e),
|
|
890
|
+
this._value = e == null ? "" : String(e), K(this, this._value);
|
|
891
891
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
892
|
-
this._label = t ?
|
|
892
|
+
this._label = t ? Re(t.label) : "", this._syncInput(), this._renderOptions("");
|
|
893
893
|
}
|
|
894
894
|
set options(e) {
|
|
895
895
|
this._optionsProp = Array.isArray(e) ? e : [];
|
|
896
896
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
897
|
-
t && (this._label =
|
|
897
|
+
t && (this._label = Re(t.label)), this._renderOptions(), this._syncInput();
|
|
898
898
|
}
|
|
899
899
|
get options() {
|
|
900
900
|
return this._readOptions();
|
|
@@ -913,7 +913,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
913
913
|
}
|
|
914
914
|
_matchesKnownOption(e) {
|
|
915
915
|
let t = e.toLowerCase();
|
|
916
|
-
return this._readOptions().some((e) =>
|
|
916
|
+
return this._readOptions().some((e) => Re(e.label).toLowerCase() === t || String(e.value ?? "").toLowerCase() === t);
|
|
917
917
|
}
|
|
918
918
|
get _minChars() {
|
|
919
919
|
return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
|
|
@@ -931,7 +931,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
931
931
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
932
932
|
label: e.innerHTML,
|
|
933
933
|
icon: e.getAttribute("icon") || void 0,
|
|
934
|
-
[
|
|
934
|
+
[Ne]: !0,
|
|
935
935
|
selected: e.hasAttribute("selected")
|
|
936
936
|
})));
|
|
937
937
|
}
|
|
@@ -945,17 +945,17 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
945
945
|
let r = `${this.id}-listbox`;
|
|
946
946
|
this._listboxId = r, this.innerHTML = `
|
|
947
947
|
<div class="search-select${n}">
|
|
948
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
949
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
948
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Le(r)}" aria-label="${Le(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}>
|
|
949
|
+
<input class="search-select-input search-select-ac-input" placeholder="${Le(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
950
950
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
951
|
-
<button type="button" class="search-select-clear" aria-label="Clear" hidden>${
|
|
951
|
+
<button type="button" class="search-select-clear" aria-label="Clear" hidden>${q("x")}</button>
|
|
952
952
|
</div>
|
|
953
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
953
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Le(r)}" tabindex="-1" hidden>
|
|
954
954
|
<div class="search-select-options"></div>
|
|
955
955
|
<div class="search-select-empty" hidden>No matches</div>
|
|
956
956
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
957
957
|
</div>
|
|
958
|
-
</div>`, this._rendered = !0,
|
|
958
|
+
</div>`, this._rendered = !0, K(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
|
|
959
959
|
}
|
|
960
960
|
_refs() {
|
|
961
961
|
return {
|
|
@@ -984,7 +984,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
984
984
|
let t = this._refs();
|
|
985
985
|
if (!t.optionsWrap) return;
|
|
986
986
|
let n = e ?? (t.input ? t.input.value : ""), r = n.trim().toLowerCase(), i = this._readOptions();
|
|
987
|
-
!this._remote && r && (i = i.filter((e) =>
|
|
987
|
+
!this._remote && r && (i = i.filter((e) => Re(e.label).toLowerCase().includes(r)));
|
|
988
988
|
let a = n.trim(), o = this._allowCustom && a && !this._matchesKnownOption(a) ? [...i, {
|
|
989
989
|
value: a,
|
|
990
990
|
custom: !0
|
|
@@ -992,11 +992,11 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
992
992
|
t.optionsWrap.innerHTML = o.map((e, t) => {
|
|
993
993
|
let n = `${s}-opt-${t}`;
|
|
994
994
|
if (e.custom) {
|
|
995
|
-
let t = `Add “${
|
|
996
|
-
return `<button type="button" role="option" id="${
|
|
995
|
+
let t = `Add “${J(e.value)}”`;
|
|
996
|
+
return `<button type="button" role="option" id="${Le(n)}" class="search-select-option search-select-option-custom" data-value="${Le(e.value)}" data-custom="true" aria-selected="false">${t}</button>`;
|
|
997
997
|
}
|
|
998
998
|
let r = String(e.value) === String(this._value);
|
|
999
|
-
return `<button type="button" role="option" id="${
|
|
999
|
+
return `<button type="button" role="option" id="${Le(n)}" class="search-select-option${r ? " selected" : ""}" data-value="${Le(e.value)}" aria-selected="${r}">${Fe(e)}</button>`;
|
|
1000
1000
|
}).join(""), this._active = -1, t.control?.removeAttribute("aria-activedescendant");
|
|
1001
1001
|
let c = r.length < this._minChars;
|
|
1002
1002
|
t.hint && (t.hint.hidden = !(this._remote && c && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && c), this._reanchor?.();
|
|
@@ -1005,7 +1005,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1005
1005
|
this._teardown();
|
|
1006
1006
|
let e = this._refs();
|
|
1007
1007
|
if (!e.control || !e.input) return;
|
|
1008
|
-
let t = () =>
|
|
1008
|
+
let t = () => De(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (t) => {
|
|
1009
1009
|
let r = n();
|
|
1010
1010
|
this._active = t;
|
|
1011
1011
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -1016,12 +1016,12 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1016
1016
|
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();
|
|
1017
1017
|
}, s = (t) => {
|
|
1018
1018
|
let n = t.dataset.custom === "true";
|
|
1019
|
-
this._value = t.dataset.value, this._label = n ? t.dataset.value :
|
|
1019
|
+
this._value = t.dataset.value, this._label = n ? t.dataset.value : Re(t.innerHTML), K(this, this._value), e.input.value = this._label, this.dispatchEvent(new CustomEvent("change", {
|
|
1020
1020
|
bubbles: !0,
|
|
1021
1021
|
detail: { isCustom: n }
|
|
1022
1022
|
})), o(), e.input.focus();
|
|
1023
1023
|
}, c = (t) => {
|
|
1024
|
-
this._value = t, this._label = t,
|
|
1024
|
+
this._value = t, this._label = t, K(this, t), e.input.value = t, this.dispatchEvent(new CustomEvent("change", {
|
|
1025
1025
|
bubbles: !0,
|
|
1026
1026
|
detail: { isCustom: !0 }
|
|
1027
1027
|
})), o();
|
|
@@ -1039,7 +1039,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1039
1039
|
}, this._timer = setTimeout(() => this._fireSearch(t, e), this._debounceMs);
|
|
1040
1040
|
} else this._renderOptions(t);
|
|
1041
1041
|
};
|
|
1042
|
-
this._navHandler =
|
|
1042
|
+
this._navHandler = Me({
|
|
1043
1043
|
getVisibleOptions: n,
|
|
1044
1044
|
getActive: () => this._active,
|
|
1045
1045
|
setActive: (e) => r(e),
|
|
@@ -1079,11 +1079,11 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1079
1079
|
let t = e.target.closest(".search-select-option");
|
|
1080
1080
|
t && r(this._optionEls().indexOf(t));
|
|
1081
1081
|
}), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
|
|
1082
|
-
this._value = "", this._label = "",
|
|
1082
|
+
this._value = "", this._label = "", K(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
|
|
1083
1083
|
}), this._bindGlobal = () => {
|
|
1084
1084
|
this._teardown(), this._onDocClick = (e) => {
|
|
1085
1085
|
i() && !this.contains(e.target) && o();
|
|
1086
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1086
|
+
}, document.addEventListener("click", this._onDocClick), Oe(this, () => {
|
|
1087
1087
|
i() && t();
|
|
1088
1088
|
});
|
|
1089
1089
|
}, this._bindGlobal();
|
|
@@ -1098,12 +1098,12 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1098
1098
|
}));
|
|
1099
1099
|
}
|
|
1100
1100
|
_teardown() {
|
|
1101
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1101
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), ke(this), clearTimeout(this._timer), this._navHandler?.teardown();
|
|
1102
1102
|
}
|
|
1103
1103
|
disconnectedCallback() {
|
|
1104
1104
|
this._teardown();
|
|
1105
1105
|
}
|
|
1106
|
-
},
|
|
1106
|
+
}, Le = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Re = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ze = [
|
|
1107
1107
|
"January",
|
|
1108
1108
|
"February",
|
|
1109
1109
|
"March",
|
|
@@ -1116,7 +1116,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1116
1116
|
"October",
|
|
1117
1117
|
"November",
|
|
1118
1118
|
"December"
|
|
1119
|
-
],
|
|
1119
|
+
], Be = [
|
|
1120
1120
|
"Su",
|
|
1121
1121
|
"Mo",
|
|
1122
1122
|
"Tu",
|
|
@@ -1124,24 +1124,24 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1124
1124
|
"Th",
|
|
1125
1125
|
"Fr",
|
|
1126
1126
|
"Sa"
|
|
1127
|
-
],
|
|
1127
|
+
], Ve = (e) => String(e).padStart(2, "0"), He = (e, t, n) => `${e}-${Ve(t + 1)}-${Ve(n)}`, Y = (e) => {
|
|
1128
1128
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
1129
1129
|
return t ? {
|
|
1130
1130
|
y: +t[1],
|
|
1131
1131
|
m: t[2] - 1,
|
|
1132
1132
|
d: +t[3]
|
|
1133
1133
|
} : null;
|
|
1134
|
-
},
|
|
1135
|
-
let t =
|
|
1136
|
-
return t ? `${
|
|
1137
|
-
},
|
|
1134
|
+
}, Ue = (e) => {
|
|
1135
|
+
let t = Y(e);
|
|
1136
|
+
return t ? `${Ve(t.d)} ${ze[t.m].slice(0, 3)} ${t.y}` : "";
|
|
1137
|
+
}, We = (e, t) => new Date(e, t + 1, 0).getDate(), Ge = (e, t) => {
|
|
1138
1138
|
for (; t < 0;) t += 12, --e;
|
|
1139
1139
|
for (; t > 11;) t -= 12, e += 1;
|
|
1140
1140
|
return {
|
|
1141
1141
|
y: e,
|
|
1142
1142
|
m: t
|
|
1143
1143
|
};
|
|
1144
|
-
},
|
|
1144
|
+
}, Ke = class extends HTMLElement {
|
|
1145
1145
|
static formAssociated = !0;
|
|
1146
1146
|
static get observedAttributes() {
|
|
1147
1147
|
return [
|
|
@@ -1184,7 +1184,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1184
1184
|
return this._value;
|
|
1185
1185
|
}
|
|
1186
1186
|
set value(e) {
|
|
1187
|
-
this._value = e || "",
|
|
1187
|
+
this._value = e || "", K(this, this._value), this._syncTrigger();
|
|
1188
1188
|
}
|
|
1189
1189
|
_firstDay() {
|
|
1190
1190
|
let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
|
|
@@ -1192,29 +1192,29 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1192
1192
|
}
|
|
1193
1193
|
render() {
|
|
1194
1194
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
|
|
1195
|
-
let e = this.getAttribute("placeholder") || "Enter Date", t =
|
|
1195
|
+
let e = this.getAttribute("placeholder") || "Enter Date", t = Y(this._value);
|
|
1196
1196
|
t && (this._viewY = t.y, this._viewM = t.m);
|
|
1197
1197
|
let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "", i = this.getAttribute("aria-label"), a = this.getAttribute("aria-describedby");
|
|
1198
1198
|
this.innerHTML = `
|
|
1199
1199
|
<div class="datepicker">
|
|
1200
|
-
<button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${
|
|
1201
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
1202
|
-
${
|
|
1200
|
+
<button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${J(i)}"` : ""}${a ? ` aria-describedby="${J(a)}"` : ""}>
|
|
1201
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? Ue(this._value) : J(e)}</span>
|
|
1202
|
+
${q("calendar-dots")}
|
|
1203
1203
|
</button>
|
|
1204
1204
|
<div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
|
|
1205
|
-
</div>`, this._rendered = !0,
|
|
1205
|
+
</div>`, this._rendered = !0, K(this, this._value), this._wire();
|
|
1206
1206
|
}
|
|
1207
1207
|
_syncFormValue() {
|
|
1208
|
-
|
|
1208
|
+
K(this, this._value);
|
|
1209
1209
|
}
|
|
1210
1210
|
_syncTrigger() {
|
|
1211
1211
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
1212
1212
|
if (!t) return;
|
|
1213
|
-
let n =
|
|
1214
|
-
t.textContent = n ?
|
|
1213
|
+
let n = Y(this._value);
|
|
1214
|
+
t.textContent = n ? Ue(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
1215
1215
|
}
|
|
1216
1216
|
_limits() {
|
|
1217
|
-
let e =
|
|
1217
|
+
let e = Y(this.getAttribute("min")), t = Y(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;
|
|
1218
1218
|
return {
|
|
1219
1219
|
dayDisabled: (e, t, i) => {
|
|
1220
1220
|
let a = new Date(e, t, i).getTime();
|
|
@@ -1222,7 +1222,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1222
1222
|
},
|
|
1223
1223
|
monthDisabled: (e, t) => {
|
|
1224
1224
|
let i = new Date(e, t, 1).getTime();
|
|
1225
|
-
return new Date(e, t,
|
|
1225
|
+
return new Date(e, t, We(e, t)).getTime() < n || i > r;
|
|
1226
1226
|
},
|
|
1227
1227
|
yearDisabled: (e) => {
|
|
1228
1228
|
let t = new Date(e, 0, 1).getTime();
|
|
@@ -1235,29 +1235,29 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1235
1235
|
e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
|
|
1236
1236
|
}
|
|
1237
1237
|
_daysHtml() {
|
|
1238
|
-
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n =
|
|
1238
|
+
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = We(this._viewY, this._viewM), r = Y(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
|
|
1239
1239
|
y: this._viewY,
|
|
1240
1240
|
m: this._viewM,
|
|
1241
1241
|
d: 1
|
|
1242
1242
|
}, s = (e, t, n, s) => {
|
|
1243
|
-
let c =
|
|
1243
|
+
let c = He(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);
|
|
1244
1244
|
return `<button type="button" class="${[
|
|
1245
1245
|
"datepicker-day",
|
|
1246
1246
|
s ? "is-outside" : "",
|
|
1247
1247
|
u ? "is-today" : "",
|
|
1248
1248
|
l ? "is-selected" : ""
|
|
1249
1249
|
].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
|
|
1250
|
-
}, c = "", l =
|
|
1250
|
+
}, c = "", l = Ge(this._viewY, this._viewM - 1), u = We(l.y, l.m);
|
|
1251
1251
|
for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1252
1252
|
for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
|
|
1253
|
-
let d =
|
|
1253
|
+
let d = Ge(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
|
|
1254
1254
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1255
|
-
let p =
|
|
1255
|
+
let p = Be.map((t, n) => Be[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
|
|
1256
1256
|
return `
|
|
1257
1257
|
<div class="datepicker-head">
|
|
1258
|
-
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${
|
|
1259
|
-
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${
|
|
1260
|
-
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${
|
|
1258
|
+
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${q("chevron-left")}</button>
|
|
1259
|
+
<button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${ze[this._viewM]} ${this._viewY}</button>
|
|
1260
|
+
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${q("chevron-right")}</button>
|
|
1261
1261
|
</div>
|
|
1262
1262
|
<div class="datepicker-weekdays">${p}</div>
|
|
1263
1263
|
<div class="datepicker-grid${this._slide ? ` ${this._slide}` : ""}" role="grid">${c}</div>
|
|
@@ -1267,25 +1267,25 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1267
1267
|
</div>`;
|
|
1268
1268
|
}
|
|
1269
1269
|
_monthsHtml() {
|
|
1270
|
-
let e =
|
|
1270
|
+
let e = Y(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
|
|
1271
1271
|
for (let i = 0; i < 12; i++) {
|
|
1272
1272
|
let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
|
|
1273
1273
|
"datepicker-cell",
|
|
1274
1274
|
o ? "is-today" : "",
|
|
1275
1275
|
a ? "is-selected" : ""
|
|
1276
1276
|
].filter(Boolean).join(" ");
|
|
1277
|
-
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${
|
|
1277
|
+
r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${ze[i].slice(0, 3)}</button>`;
|
|
1278
1278
|
}
|
|
1279
1279
|
return `
|
|
1280
1280
|
<div class="datepicker-head">
|
|
1281
|
-
<button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${
|
|
1281
|
+
<button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${q("chevron-left")}</button>
|
|
1282
1282
|
<button type="button" class="datepicker-month" data-view="years" aria-label="Choose year">${this._viewY}</button>
|
|
1283
|
-
<button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="Next year">${
|
|
1283
|
+
<button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="Next year">${q("chevron-right")}</button>
|
|
1284
1284
|
</div>
|
|
1285
1285
|
<div class="datepicker-cells">${r}</div>`;
|
|
1286
1286
|
}
|
|
1287
1287
|
_yearsHtml() {
|
|
1288
|
-
let e =
|
|
1288
|
+
let e = Y(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
|
|
1289
1289
|
for (let a = 0; a < 12; a++) {
|
|
1290
1290
|
let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
|
|
1291
1291
|
"datepicker-cell",
|
|
@@ -1296,9 +1296,9 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1296
1296
|
}
|
|
1297
1297
|
return `
|
|
1298
1298
|
<div class="datepicker-head">
|
|
1299
|
-
<button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="Previous decade">${
|
|
1299
|
+
<button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="Previous decade">${q("chevron-left")}</button>
|
|
1300
1300
|
<span class="datepicker-month">${r + 1} – ${r + 10}</span>
|
|
1301
|
-
<button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${
|
|
1301
|
+
<button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${q("chevron-right")}</button>
|
|
1302
1302
|
</div>
|
|
1303
1303
|
<div class="datepicker-cells">${i}</div>`;
|
|
1304
1304
|
}
|
|
@@ -1307,24 +1307,24 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1307
1307
|
t && e.contains(document.activeElement) && t.focus();
|
|
1308
1308
|
}
|
|
1309
1309
|
_position(e, t) {
|
|
1310
|
-
|
|
1310
|
+
De(e, t);
|
|
1311
1311
|
}
|
|
1312
1312
|
_setFocus(e, t, n, r) {
|
|
1313
|
-
let { y: i, m: a } =
|
|
1313
|
+
let { y: i, m: a } = Ge(e, t);
|
|
1314
1314
|
this._focus = {
|
|
1315
1315
|
y: i,
|
|
1316
1316
|
m: a,
|
|
1317
1317
|
d: n
|
|
1318
1318
|
};
|
|
1319
1319
|
let o = i !== this._viewY || a !== this._viewM;
|
|
1320
|
-
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${
|
|
1320
|
+
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${He(i, a, n)}"]`)?.focus();
|
|
1321
1321
|
}
|
|
1322
1322
|
_onKey(e) {
|
|
1323
1323
|
if (this._mode !== "days") {
|
|
1324
1324
|
e.key === "Escape" && this._close();
|
|
1325
1325
|
return;
|
|
1326
1326
|
}
|
|
1327
|
-
let t = this._focus ||
|
|
1327
|
+
let t = this._focus || Y(this._value) || {
|
|
1328
1328
|
y: this._viewY,
|
|
1329
1329
|
m: this._viewM,
|
|
1330
1330
|
d: 1
|
|
@@ -1342,17 +1342,17 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1342
1342
|
case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
|
|
1343
1343
|
case "PageUp": {
|
|
1344
1344
|
e.preventDefault();
|
|
1345
|
-
let n =
|
|
1346
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1345
|
+
let n = Ge(t.y, t.m - (e.shiftKey ? 12 : 1));
|
|
1346
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, We(n.y, n.m)), "slide-prev");
|
|
1347
1347
|
}
|
|
1348
1348
|
case "PageDown": {
|
|
1349
1349
|
e.preventDefault();
|
|
1350
|
-
let n =
|
|
1351
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
1350
|
+
let n = Ge(t.y, t.m + (e.shiftKey ? 12 : 1));
|
|
1351
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, We(n.y, n.m)), "slide-next");
|
|
1352
1352
|
}
|
|
1353
1353
|
case "Enter":
|
|
1354
1354
|
case " ":
|
|
1355
|
-
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value =
|
|
1355
|
+
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = He(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
|
|
1356
1356
|
return;
|
|
1357
1357
|
case "Escape": return this._close();
|
|
1358
1358
|
default:
|
|
@@ -1364,7 +1364,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1364
1364
|
if (!e || !t) return;
|
|
1365
1365
|
let r = () => !t.hidden;
|
|
1366
1366
|
this._open = () => {
|
|
1367
|
-
let r = /* @__PURE__ */ new Date(), i =
|
|
1367
|
+
let r = /* @__PURE__ */ new Date(), i = Y(this._value);
|
|
1368
1368
|
(i || !this._viewNavigated) && (this._viewY = r.getFullYear(), this._viewM = r.getMonth()), this._mode = "days";
|
|
1369
1369
|
let a = r.getFullYear() === this._viewY && r.getMonth() === this._viewM, o = i && i.y === this._viewY && i.m === this._viewM;
|
|
1370
1370
|
this._focus = o ? i : {
|
|
@@ -1379,7 +1379,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1379
1379
|
let t = e.target.closest("[data-nav]");
|
|
1380
1380
|
if (t) {
|
|
1381
1381
|
this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
|
|
1382
|
-
let e =
|
|
1382
|
+
let e = Ge(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1383
1383
|
this._viewY = e.y, this._viewM = e.m, this._focus = {
|
|
1384
1384
|
y: e.y,
|
|
1385
1385
|
m: e.m,
|
|
@@ -1418,7 +1418,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1418
1418
|
}
|
|
1419
1419
|
if (e.target.closest("[data-today]")) {
|
|
1420
1420
|
let e = /* @__PURE__ */ new Date();
|
|
1421
|
-
this.value =
|
|
1421
|
+
this.value = He(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
|
|
1422
1422
|
return;
|
|
1423
1423
|
}
|
|
1424
1424
|
if (e.target.closest("[data-clear]")) {
|
|
@@ -1435,18 +1435,18 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1435
1435
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1436
1436
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1437
1437
|
r() && e.key === "Escape" && this._close();
|
|
1438
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1438
|
+
}, document.addEventListener("keydown", this._onDocKey), Oe(this, () => {
|
|
1439
1439
|
r() && this._position(e, t);
|
|
1440
1440
|
});
|
|
1441
1441
|
}, this._bindGlobal(), this._syncFormValue();
|
|
1442
1442
|
}
|
|
1443
1443
|
_teardown() {
|
|
1444
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1444
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), ke(this);
|
|
1445
1445
|
}
|
|
1446
1446
|
disconnectedCallback() {
|
|
1447
1447
|
this._teardown();
|
|
1448
1448
|
}
|
|
1449
|
-
},
|
|
1449
|
+
}, qe = class extends HTMLElement {
|
|
1450
1450
|
static formAssociated = !0;
|
|
1451
1451
|
static get observedAttributes() {
|
|
1452
1452
|
return [
|
|
@@ -1505,20 +1505,20 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1505
1505
|
text: e,
|
|
1506
1506
|
empty: !0
|
|
1507
1507
|
} : {
|
|
1508
|
-
text: `${
|
|
1508
|
+
text: `${Ue(this._start) || "Start"} – ${Ue(this._end) || "End"}`,
|
|
1509
1509
|
empty: !1
|
|
1510
1510
|
};
|
|
1511
1511
|
}
|
|
1512
1512
|
render() {
|
|
1513
1513
|
this._defaultStart === void 0 && (this._defaultStart = this.getAttribute("start") || "", this._defaultEnd = this.getAttribute("end") || "", this._start = this._defaultStart || this._start, this._end = this._defaultEnd || this._end);
|
|
1514
|
-
let e =
|
|
1514
|
+
let e = Y(this._start);
|
|
1515
1515
|
e && (this._viewY = e.y, this._viewM = e.m);
|
|
1516
1516
|
let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label(), a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
|
|
1517
1517
|
this.innerHTML = `
|
|
1518
1518
|
<div class="daterange">
|
|
1519
|
-
<button type="button" class="input daterange-trigger${n}${i ? "" : " has-value"}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${
|
|
1520
|
-
<span data-range-label class="${i ? "search-select-placeholder" : ""}">${
|
|
1521
|
-
${
|
|
1519
|
+
<button type="button" class="input daterange-trigger${n}${i ? "" : " has-value"}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${J(a)}"` : ""}${o ? ` aria-describedby="${J(o)}"` : ""}>
|
|
1520
|
+
<span data-range-label class="${i ? "search-select-placeholder" : ""}">${J(r)}</span>
|
|
1521
|
+
${q("calendar")}
|
|
1522
1522
|
</button>
|
|
1523
1523
|
<div class="daterange-pop" role="dialog" aria-modal="false" hidden></div>
|
|
1524
1524
|
</div>`, this._rendered = !0, this._syncMirrors(), this._wire();
|
|
@@ -1545,24 +1545,24 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1545
1545
|
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "", r.disabled = this.hasAttribute("disabled");
|
|
1546
1546
|
}
|
|
1547
1547
|
_limits() {
|
|
1548
|
-
let e =
|
|
1548
|
+
let e = Y(this.getAttribute("min")), t = Y(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;
|
|
1549
1549
|
return (e, t, i) => {
|
|
1550
1550
|
let a = new Date(e, t, i).getTime();
|
|
1551
1551
|
return a < n || a > r;
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
1554
|
_monthHtml(e, t) {
|
|
1555
|
-
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i =
|
|
1556
|
-
let i =
|
|
1555
|
+
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = We(e, t), a = this._limits(), o = Be.map((e, t) => Be[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
|
|
1556
|
+
let i = He(e, t, n), o = a(e, t, n);
|
|
1557
1557
|
return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
|
|
1558
|
-
}, c = "", l =
|
|
1558
|
+
}, c = "", l = Ge(e, t - 1), u = We(l.y, l.m);
|
|
1559
1559
|
for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
1560
1560
|
for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
|
|
1561
|
-
let d =
|
|
1561
|
+
let d = Ge(e, t + 1), f = (7 - (r + i) % 7) % 7;
|
|
1562
1562
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
1563
1563
|
return `
|
|
1564
1564
|
<div class="daterange-cal">
|
|
1565
|
-
<div class="datepicker-month-label">${
|
|
1565
|
+
<div class="datepicker-month-label">${ze[t]} ${e}</div>
|
|
1566
1566
|
<div class="datepicker-weekdays">${o}</div>
|
|
1567
1567
|
<div class="datepicker-grid" role="grid">${c}</div>
|
|
1568
1568
|
</div>`;
|
|
@@ -1570,11 +1570,11 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1570
1570
|
_renderView() {
|
|
1571
1571
|
let e = this.querySelector(".daterange-pop");
|
|
1572
1572
|
if (!e) return;
|
|
1573
|
-
let t =
|
|
1573
|
+
let t = Ge(this._viewY, this._viewM + 1);
|
|
1574
1574
|
e.innerHTML = `
|
|
1575
1575
|
<div class="daterange-head">
|
|
1576
|
-
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${
|
|
1577
|
-
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${
|
|
1576
|
+
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${q("chevron-left")}</button>
|
|
1577
|
+
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${q("chevron-right")}</button>
|
|
1578
1578
|
</div>
|
|
1579
1579
|
<div class="daterange-cals">
|
|
1580
1580
|
${this._monthHtml(this._viewY, this._viewM)}
|
|
@@ -1596,10 +1596,10 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1596
1596
|
n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
|
|
1597
1597
|
}
|
|
1598
1598
|
let i = e.querySelector("[data-range-hint]");
|
|
1599
|
-
i && (i.textContent = this._start ? this._end ? `${
|
|
1599
|
+
i && (i.textContent = this._start ? this._end ? `${Ue(this._start)} – ${Ue(this._end)}` : "Pick an end date" : "Pick a start date");
|
|
1600
1600
|
}
|
|
1601
1601
|
_position(e, t) {
|
|
1602
|
-
|
|
1602
|
+
De(e, t);
|
|
1603
1603
|
}
|
|
1604
1604
|
_pick(e) {
|
|
1605
1605
|
if (!this._start || this._start && this._end) {
|
|
@@ -1618,7 +1618,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1618
1618
|
if (!e || !t) return;
|
|
1619
1619
|
let r = () => !t.hidden;
|
|
1620
1620
|
this._open = () => {
|
|
1621
|
-
let r =
|
|
1621
|
+
let r = Y(this._start);
|
|
1622
1622
|
if (r) this._viewY = r.y, this._viewM = r.m;
|
|
1623
1623
|
else {
|
|
1624
1624
|
let e = /* @__PURE__ */ new Date();
|
|
@@ -1631,7 +1631,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1631
1631
|
this._popClick = !0;
|
|
1632
1632
|
let t = e.target.closest("[data-nav]");
|
|
1633
1633
|
if (t) {
|
|
1634
|
-
let e =
|
|
1634
|
+
let e = Ge(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
1635
1635
|
this._viewY = e.y, this._viewM = e.m, this._renderView();
|
|
1636
1636
|
return;
|
|
1637
1637
|
}
|
|
@@ -1650,18 +1650,18 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1650
1650
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1651
1651
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1652
1652
|
r() && e.key === "Escape" && this._close();
|
|
1653
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1653
|
+
}, document.addEventListener("keydown", this._onDocKey), Oe(this, () => {
|
|
1654
1654
|
r() && this._position(e, t);
|
|
1655
1655
|
});
|
|
1656
1656
|
}, this._bindGlobal(), this._syncMirrors();
|
|
1657
1657
|
}
|
|
1658
1658
|
_teardown() {
|
|
1659
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
1659
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), ke(this);
|
|
1660
1660
|
}
|
|
1661
1661
|
disconnectedCallback() {
|
|
1662
1662
|
this._teardown();
|
|
1663
1663
|
}
|
|
1664
|
-
},
|
|
1664
|
+
}, Je = class extends HTMLElement {
|
|
1665
1665
|
static get observedAttributes() {
|
|
1666
1666
|
return [
|
|
1667
1667
|
"static",
|
|
@@ -1682,10 +1682,10 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1682
1682
|
e === "static" && this.isConnected && this._wire();
|
|
1683
1683
|
}
|
|
1684
1684
|
_maxScale() {
|
|
1685
|
-
return
|
|
1685
|
+
return Ye(this.getAttribute("max-scale"), 1.6);
|
|
1686
1686
|
}
|
|
1687
1687
|
_radius() {
|
|
1688
|
-
return
|
|
1688
|
+
return Ye(this.getAttribute("radius"), 100);
|
|
1689
1689
|
}
|
|
1690
1690
|
_magnifyEnabled() {
|
|
1691
1691
|
return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
|
|
@@ -1710,10 +1710,10 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1710
1710
|
_teardown() {
|
|
1711
1711
|
this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
|
|
1712
1712
|
}
|
|
1713
|
-
},
|
|
1713
|
+
}, Ye = (e, t) => {
|
|
1714
1714
|
let n = Number.parseFloat(e);
|
|
1715
1715
|
return Number.isFinite(n) ? n : t;
|
|
1716
|
-
},
|
|
1716
|
+
}, Xe = class extends HTMLElement {
|
|
1717
1717
|
static formAssociated = !0;
|
|
1718
1718
|
_accessibleName() {
|
|
1719
1719
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -1772,7 +1772,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1772
1772
|
return this._values.slice();
|
|
1773
1773
|
}
|
|
1774
1774
|
set values(e) {
|
|
1775
|
-
if (this._values = Array.isArray(e) ? e.map(String) : [],
|
|
1775
|
+
if (this._values = Array.isArray(e) ? e.map(String) : [], K(this, this._values.join(",")), this._rendered) {
|
|
1776
1776
|
this._renderControl();
|
|
1777
1777
|
let e = this.querySelector(".search-select-input");
|
|
1778
1778
|
this._renderOptions(e ? e.value : "");
|
|
@@ -1791,7 +1791,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1791
1791
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
1792
1792
|
label: e.innerHTML,
|
|
1793
1793
|
icon: e.getAttribute("icon") || void 0,
|
|
1794
|
-
[
|
|
1794
|
+
[Ne]: !0,
|
|
1795
1795
|
selected: e.hasAttribute("selected")
|
|
1796
1796
|
})));
|
|
1797
1797
|
}
|
|
@@ -1804,36 +1804,36 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1804
1804
|
}
|
|
1805
1805
|
_labelHtmlFor(e) {
|
|
1806
1806
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
1807
|
-
return t ?
|
|
1807
|
+
return t ? Fe(t) : J(e);
|
|
1808
1808
|
}
|
|
1809
1809
|
render() {
|
|
1810
1810
|
this._snapshotDeclared();
|
|
1811
1811
|
let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…", n = this.getAttribute("icon"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "";
|
|
1812
|
-
|
|
1812
|
+
K(this, this._values.join(",")), this.id ||= `wui-multiselect-${Math.random().toString(36).slice(2, 9)}`;
|
|
1813
1813
|
let a = `${this.id}-listbox`;
|
|
1814
1814
|
this._listboxId = a, this.innerHTML = `
|
|
1815
1815
|
<div class="search-select${i}">
|
|
1816
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
1817
|
-
${n ?
|
|
1816
|
+
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Ze(a)}" aria-label="${Ze(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
|
|
1817
|
+
${n ? q(n, { className: "search-select-icon" }) : ""}
|
|
1818
1818
|
<div class="ms-chips" data-chips></div>
|
|
1819
|
-
${
|
|
1819
|
+
${q("chevron-down", { className: "search-select-caret" })}
|
|
1820
1820
|
</div>
|
|
1821
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
1822
|
-
${e ? `<div class="search-select-search">${
|
|
1821
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Ze(a)}" aria-multiselectable="true" tabindex="-1" hidden>
|
|
1822
|
+
${e ? `<div class="search-select-search">${q("search")}<input class="search-select-input" placeholder="${Ze(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${q("x")}</button></div>` : ""}
|
|
1823
1823
|
<div class="search-select-options"></div>
|
|
1824
1824
|
<div class="search-select-empty" hidden>No matches</div>
|
|
1825
1825
|
</div>
|
|
1826
|
-
</div>`, this._rendered = !0,
|
|
1826
|
+
</div>`, this._rendered = !0, K(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
|
|
1827
1827
|
}
|
|
1828
1828
|
_renderControl() {
|
|
1829
1829
|
let e = this.querySelector("[data-chips]");
|
|
1830
1830
|
if (!e) return;
|
|
1831
1831
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
1832
1832
|
if (!this._values.length) {
|
|
1833
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
1833
|
+
e.innerHTML = `<span class="search-select-placeholder">${J(t)}</span>`;
|
|
1834
1834
|
return;
|
|
1835
1835
|
}
|
|
1836
|
-
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="${
|
|
1836
|
+
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="${Ze(e)}" aria-label="Remove ${Ze(Qe(this._labelFor(e)))}">${q("x")}</button></span>`).join(""), this._collapseChips();
|
|
1837
1837
|
}
|
|
1838
1838
|
_collapseChips() {
|
|
1839
1839
|
let e = this.querySelector("[data-chips]");
|
|
@@ -1857,18 +1857,18 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1857
1857
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
1858
1858
|
if (!t) return;
|
|
1859
1859
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
1860
|
-
r && (i = i.filter((e) =>
|
|
1860
|
+
r && (i = i.filter((e) => Qe(e.label).toLowerCase().includes(r)));
|
|
1861
1861
|
let a = this._listboxId || `${this.id || "wui-multiselect"}-listbox`;
|
|
1862
1862
|
t.innerHTML = i.map((e, t) => {
|
|
1863
1863
|
let n = this._values.includes(String(e.value));
|
|
1864
|
-
return `<button type="button" role="option" id="${
|
|
1864
|
+
return `<button type="button" role="option" id="${Ze(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${Ze(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${Fe(e)}</span><span class="ms-check">${q("check")}</span></button>`;
|
|
1865
1865
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant"), this._reanchor?.();
|
|
1866
1866
|
}
|
|
1867
1867
|
_wire() {
|
|
1868
1868
|
this._teardown();
|
|
1869
1869
|
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");
|
|
1870
1870
|
if (!e || !t) return;
|
|
1871
|
-
let a = () => this.hasAttribute("disabled"), o = () =>
|
|
1871
|
+
let a = () => this.hasAttribute("disabled"), o = () => De(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (t) => {
|
|
1872
1872
|
let n = c();
|
|
1873
1873
|
this._active = t;
|
|
1874
1874
|
for (let e of s()) e.classList.remove("is-active");
|
|
@@ -1878,7 +1878,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1878
1878
|
}, f = () => {
|
|
1879
1879
|
t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
|
|
1880
1880
|
}, p = () => {
|
|
1881
|
-
|
|
1881
|
+
K(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1882
1882
|
}, m = (e) => {
|
|
1883
1883
|
let t = String(e);
|
|
1884
1884
|
this._values.includes(t) ? this._values = this._values.filter((e) => e !== t) : this._values = [...this._values, t], this._renderControl(), this._renderOptions(n ? n.value : ""), p();
|
|
@@ -1901,7 +1901,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1901
1901
|
t && l(c().indexOf(t));
|
|
1902
1902
|
}), i.addEventListener("mouseleave", () => l(-1)), n?.addEventListener("input", () => {
|
|
1903
1903
|
this._renderOptions(n.value), r && (r.hidden = !n.value), l(-1);
|
|
1904
|
-
}), this._navHandler =
|
|
1904
|
+
}), this._navHandler = Me({
|
|
1905
1905
|
getVisibleOptions: c,
|
|
1906
1906
|
getActive: () => this._active,
|
|
1907
1907
|
setActive: (e) => l(e),
|
|
@@ -1930,18 +1930,18 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1930
1930
|
}), this._bindGlobal = () => {
|
|
1931
1931
|
this._teardown(), !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this)), this._onDocClick = (e) => {
|
|
1932
1932
|
u() && !this.contains(e.target) && f();
|
|
1933
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1933
|
+
}, document.addEventListener("click", this._onDocClick), Oe(this, () => {
|
|
1934
1934
|
u() && o();
|
|
1935
1935
|
});
|
|
1936
1936
|
}, this._bindGlobal();
|
|
1937
1937
|
}
|
|
1938
1938
|
_teardown() {
|
|
1939
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
1939
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), ke(this), this._navHandler?.teardown();
|
|
1940
1940
|
}
|
|
1941
1941
|
disconnectedCallback() {
|
|
1942
1942
|
this._teardown(), this._ro?.disconnect(), this._ro = null;
|
|
1943
1943
|
}
|
|
1944
|
-
},
|
|
1944
|
+
}, Ze = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Qe = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), $e = /[^0-9]/g, et = /[^0-9a-zA-Z]/g, tt = class extends HTMLElement {
|
|
1945
1945
|
static formAssociated = !0;
|
|
1946
1946
|
static get observedAttributes() {
|
|
1947
1947
|
return [
|
|
@@ -1969,10 +1969,10 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1969
1969
|
return this._value ?? "";
|
|
1970
1970
|
}
|
|
1971
1971
|
set value(e) {
|
|
1972
|
-
this._value = this._clean(e),
|
|
1972
|
+
this._value = this._clean(e), K(this, this._value), this._paint();
|
|
1973
1973
|
}
|
|
1974
1974
|
_clean(e) {
|
|
1975
|
-
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ?
|
|
1975
|
+
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? et : $e, "").slice(0, this.length);
|
|
1976
1976
|
}
|
|
1977
1977
|
constructor() {
|
|
1978
1978
|
super();
|
|
@@ -1986,10 +1986,10 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1986
1986
|
this._rendered ? this._onSelectionChange && document.addEventListener("selectionchange", this._onSelectionChange) : (this._defaultCaptured ||= (this._defaultValue = this._value, !0), this.render());
|
|
1987
1987
|
}
|
|
1988
1988
|
formResetCallback() {
|
|
1989
|
-
this._value = this._defaultValue || "",
|
|
1989
|
+
this._value = this._defaultValue || "", K(this, this._value), this._paint();
|
|
1990
1990
|
}
|
|
1991
1991
|
attributeChangedCallback(e, t, n) {
|
|
1992
|
-
this._rendered && (e === "value" ? (this._value = this._clean(n),
|
|
1992
|
+
this._rendered && (e === "value" ? (this._value = this._clean(n), K(this, this._value), this._paint()) : this.render());
|
|
1993
1993
|
}
|
|
1994
1994
|
render() {
|
|
1995
1995
|
this._value = this._clean(this.getAttribute("value") ?? this._value);
|
|
@@ -2007,7 +2007,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
2007
2007
|
spellcheck="false"
|
|
2008
2008
|
${n ? "disabled" : ""} />
|
|
2009
2009
|
<div class="otp-slots" aria-hidden="true">${r}</div>
|
|
2010
|
-
</div>`, this._rendered = !0,
|
|
2010
|
+
</div>`, this._rendered = !0, K(this, this._value), this._wire(), this._paint();
|
|
2011
2011
|
}
|
|
2012
2012
|
_refs() {
|
|
2013
2013
|
return {
|
|
@@ -2029,7 +2029,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
2029
2029
|
if (!e) return;
|
|
2030
2030
|
let t = (e) => {
|
|
2031
2031
|
let t = this._clean(e), n = t !== this._value;
|
|
2032
|
-
this._value = t,
|
|
2032
|
+
this._value = t, K(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
|
|
2033
2033
|
bubbles: !0,
|
|
2034
2034
|
detail: t
|
|
2035
2035
|
}));
|
|
@@ -2063,7 +2063,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
2063
2063
|
disconnectedCallback() {
|
|
2064
2064
|
this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
|
|
2065
2065
|
}
|
|
2066
|
-
},
|
|
2066
|
+
}, nt = [
|
|
2067
2067
|
[
|
|
2068
2068
|
"AF",
|
|
2069
2069
|
"Afghanistan",
|
|
@@ -3289,56 +3289,56 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
3289
3289
|
"Zimbabwe",
|
|
3290
3290
|
"263"
|
|
3291
3291
|
]
|
|
3292
|
-
],
|
|
3292
|
+
], rt = (e) => (nt.find((t) => t[0] === e) || [
|
|
3293
3293
|
"",
|
|
3294
3294
|
"",
|
|
3295
3295
|
""
|
|
3296
|
-
])[2],
|
|
3297
|
-
function
|
|
3298
|
-
return
|
|
3296
|
+
])[2], it = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, X = null, at = null;
|
|
3297
|
+
function ot() {
|
|
3298
|
+
return X ? Promise.resolve(X) : (at ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (X = {
|
|
3299
3299
|
AsYouType: e.AsYouType,
|
|
3300
3300
|
getExampleNumber: e.getExampleNumber,
|
|
3301
3301
|
isValidPhoneNumber: e.isValidPhoneNumber,
|
|
3302
3302
|
examples: t.default || t
|
|
3303
|
-
},
|
|
3303
|
+
}, X)).catch(() => null), at);
|
|
3304
3304
|
}
|
|
3305
|
-
function
|
|
3306
|
-
if (!
|
|
3305
|
+
function st(e, t) {
|
|
3306
|
+
if (!X || !t) return t;
|
|
3307
3307
|
try {
|
|
3308
|
-
return new
|
|
3308
|
+
return new X.AsYouType(e).input(t);
|
|
3309
3309
|
} catch {
|
|
3310
3310
|
return t;
|
|
3311
3311
|
}
|
|
3312
3312
|
}
|
|
3313
|
-
function
|
|
3314
|
-
if (!
|
|
3313
|
+
function ct(e) {
|
|
3314
|
+
if (!X) return null;
|
|
3315
3315
|
try {
|
|
3316
|
-
return
|
|
3316
|
+
return X.getExampleNumber(e, X.examples)?.formatNational() || null;
|
|
3317
3317
|
} catch {
|
|
3318
3318
|
return null;
|
|
3319
3319
|
}
|
|
3320
3320
|
}
|
|
3321
|
-
function
|
|
3322
|
-
if (!
|
|
3321
|
+
function lt(e) {
|
|
3322
|
+
if (!X || !e) return null;
|
|
3323
3323
|
try {
|
|
3324
|
-
return
|
|
3324
|
+
return X.isValidPhoneNumber(e);
|
|
3325
3325
|
} catch {
|
|
3326
3326
|
return null;
|
|
3327
3327
|
}
|
|
3328
3328
|
}
|
|
3329
|
-
function
|
|
3330
|
-
if (!
|
|
3329
|
+
function ut(e) {
|
|
3330
|
+
if (!X) return null;
|
|
3331
3331
|
try {
|
|
3332
|
-
let t =
|
|
3332
|
+
let t = X.getExampleNumber(e, X.examples);
|
|
3333
3333
|
return t?.nationalNumber ? t.nationalNumber.length : null;
|
|
3334
3334
|
} catch {
|
|
3335
3335
|
return null;
|
|
3336
3336
|
}
|
|
3337
3337
|
}
|
|
3338
|
-
function
|
|
3339
|
-
if (!
|
|
3338
|
+
function dt(e) {
|
|
3339
|
+
if (!X || !e?.trim().startsWith("+")) return null;
|
|
3340
3340
|
try {
|
|
3341
|
-
let t = new
|
|
3341
|
+
let t = new X.AsYouType();
|
|
3342
3342
|
t.input(e.trim());
|
|
3343
3343
|
let n = t.getCountry();
|
|
3344
3344
|
return n ? {
|
|
@@ -3349,7 +3349,7 @@ function ft(e) {
|
|
|
3349
3349
|
return null;
|
|
3350
3350
|
}
|
|
3351
3351
|
}
|
|
3352
|
-
var
|
|
3352
|
+
var ft = class extends HTMLElement {
|
|
3353
3353
|
static formAssociated = !0;
|
|
3354
3354
|
static get observedAttributes() {
|
|
3355
3355
|
return [
|
|
@@ -3396,19 +3396,19 @@ var pt = class extends HTMLElement {
|
|
|
3396
3396
|
this.value = this._defaultValue || "";
|
|
3397
3397
|
}
|
|
3398
3398
|
get value() {
|
|
3399
|
-
return this._national ? `+${
|
|
3399
|
+
return this._national ? `+${rt(this._country)}${this._national}` : "";
|
|
3400
3400
|
}
|
|
3401
3401
|
set value(e) {
|
|
3402
|
-
let t = String(e ?? "").trim(), n =
|
|
3402
|
+
let t = String(e ?? "").trim(), n = dt(t);
|
|
3403
3403
|
if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
|
|
3404
3404
|
else if (t.startsWith("+")) {
|
|
3405
|
-
let e = t.replace(/[^0-9]/g, ""), n = String(
|
|
3405
|
+
let e = t.replace(/[^0-9]/g, ""), n = String(rt(this._country));
|
|
3406
3406
|
n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
|
|
3407
3407
|
} else this._national = t.replace(/[^0-9]/g, "");
|
|
3408
3408
|
n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
|
|
3409
3409
|
}
|
|
3410
3410
|
_syncMirror() {
|
|
3411
|
-
|
|
3411
|
+
K(this, this.value);
|
|
3412
3412
|
}
|
|
3413
3413
|
_emitInput() {
|
|
3414
3414
|
this.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
@@ -3418,27 +3418,27 @@ var pt = class extends HTMLElement {
|
|
|
3418
3418
|
}
|
|
3419
3419
|
render() {
|
|
3420
3420
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
|
|
3421
|
-
let e = this.getAttribute("placeholder") ||
|
|
3421
|
+
let e = this.getAttribute("placeholder") || ct(this._country) || "Enter phone number";
|
|
3422
3422
|
this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
|
|
3423
3423
|
let t = `${this.id}-listbox`;
|
|
3424
3424
|
this._listboxId = t;
|
|
3425
|
-
let n =
|
|
3425
|
+
let n = nt.map(([e, n, r], i) => `<button type="button" role="option" id="${pt(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${it(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
|
|
3426
3426
|
this.innerHTML = `
|
|
3427
3427
|
<div class="phone-input-wrap">
|
|
3428
3428
|
<div class="phone-country-adornment">
|
|
3429
|
-
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
3430
|
-
<span class="${
|
|
3431
|
-
${
|
|
3432
|
-
<span class="phone-dial" data-dial>+${
|
|
3429
|
+
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${pt(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3430
|
+
<span class="${it(this._country)}" data-flag aria-hidden="true"></span>
|
|
3431
|
+
${q("chevron-down", { className: "phone-chevron" })}
|
|
3432
|
+
<span class="phone-dial" data-dial>+${rt(this._country)}</span>
|
|
3433
3433
|
</button>
|
|
3434
|
-
<div class="country-dropdown-menu" role="listbox" id="${
|
|
3435
|
-
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${
|
|
3434
|
+
<div class="country-dropdown-menu" role="listbox" id="${pt(t)}" tabindex="-1" hidden>
|
|
3435
|
+
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${q("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${pt(t)}" aria-autocomplete="list" /></div>
|
|
3436
3436
|
<div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
|
|
3437
3437
|
</div>
|
|
3438
3438
|
</div>
|
|
3439
|
-
<input type="tel" class="input" placeholder="${
|
|
3439
|
+
<input type="tel" class="input" placeholder="${pt(e)}" value="${pt(st(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${pt(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${pt(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
3440
3440
|
</div>
|
|
3441
|
-
<div class="field-error" data-phone-error hidden></div>`, this._rendered = !0,
|
|
3441
|
+
<div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, K(this, this.value), this._wire();
|
|
3442
3442
|
}
|
|
3443
3443
|
_itemEls() {
|
|
3444
3444
|
return [...this.querySelectorAll(".country-dropdown-item")];
|
|
@@ -3450,7 +3450,7 @@ var pt = class extends HTMLElement {
|
|
|
3450
3450
|
this._teardown();
|
|
3451
3451
|
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]");
|
|
3452
3452
|
if (!e || !n) return;
|
|
3453
|
-
let l = () => !n.hidden, u = () =>
|
|
3453
|
+
let l = () => !n.hidden, u = () => De(t || e, n), d = (e) => {
|
|
3454
3454
|
let t = this._visibleItems();
|
|
3455
3455
|
this._active = e;
|
|
3456
3456
|
for (let e of this._itemEls()) e.classList.remove("is-active");
|
|
@@ -3467,12 +3467,12 @@ var pt = class extends HTMLElement {
|
|
|
3467
3467
|
}
|
|
3468
3468
|
a && (a.hidden = n > 0);
|
|
3469
3469
|
}, h = (e) => {
|
|
3470
|
-
this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className =
|
|
3470
|
+
this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className = it(e)), c && (c.textContent = `+${rt(e)}`);
|
|
3471
3471
|
for (let t of this._itemEls()) {
|
|
3472
3472
|
let n = t.dataset.iso === e;
|
|
3473
3473
|
t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
|
|
3474
3474
|
}
|
|
3475
|
-
!this.getAttribute("placeholder") && o && (o.placeholder =
|
|
3475
|
+
!this.getAttribute("placeholder") && o && (o.placeholder = ct(e) || "Enter phone number"), o && this._national && (o.value = st(e, this._national)), p(), this._syncMirror(), this._emitChange(), o?.focus();
|
|
3476
3476
|
}, g = (t) => {
|
|
3477
3477
|
let n = this._visibleItems();
|
|
3478
3478
|
if (t.key === "ArrowDown") {
|
|
@@ -3506,7 +3506,7 @@ var pt = class extends HTMLElement {
|
|
|
3506
3506
|
let _ = this.querySelector("[data-phone-error]"), v = (e) => {
|
|
3507
3507
|
if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), _) {
|
|
3508
3508
|
if (e) {
|
|
3509
|
-
let e =
|
|
3509
|
+
let e = ct(this._country);
|
|
3510
3510
|
_.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
|
|
3511
3511
|
}
|
|
3512
3512
|
_.hidden = !e;
|
|
@@ -3514,26 +3514,26 @@ var pt = class extends HTMLElement {
|
|
|
3514
3514
|
};
|
|
3515
3515
|
o.addEventListener("input", (e) => {
|
|
3516
3516
|
e.stopPropagation();
|
|
3517
|
-
let t = o.value.replace(/[^0-9]/g, ""), n =
|
|
3517
|
+
let t = o.value.replace(/[^0-9]/g, ""), n = ut(this._country);
|
|
3518
3518
|
n && t.length > n && (t = t.slice(0, n)), this._national = t;
|
|
3519
|
-
let r =
|
|
3520
|
-
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national ||
|
|
3519
|
+
let r = st(this._country, this._national);
|
|
3520
|
+
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || lt(this.value) === !0) && v(!1);
|
|
3521
3521
|
}), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
|
|
3522
|
-
v(this._national.length > 0 &&
|
|
3522
|
+
v(this._national.length > 0 && lt(this.value) === !1), this.value !== this._committedValue && this._emitChange();
|
|
3523
3523
|
}), o.addEventListener("paste", (e) => {
|
|
3524
|
-
let t =
|
|
3525
|
-
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value =
|
|
3524
|
+
let t = dt(e.clipboardData?.getData("text"));
|
|
3525
|
+
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = st(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
|
|
3526
3526
|
}), this._bindGlobal = () => {
|
|
3527
3527
|
this._teardownGlobals?.(), this._onDocClick = (e) => {
|
|
3528
3528
|
l() && !this.contains(e.target) && p();
|
|
3529
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3529
|
+
}, document.addEventListener("click", this._onDocClick), Oe(this, () => {
|
|
3530
3530
|
l() && u();
|
|
3531
3531
|
});
|
|
3532
3532
|
}, this._teardownGlobals = () => {
|
|
3533
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3534
|
-
}, this._bindGlobal(),
|
|
3535
|
-
if (!(!e || !o.isConnected) && (this._national && (o.value =
|
|
3536
|
-
let e =
|
|
3533
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), ke(this);
|
|
3534
|
+
}, this._bindGlobal(), ot().then((e) => {
|
|
3535
|
+
if (!(!e || !o.isConnected) && (this._national && (o.value = st(this._country, this._national)), !this.getAttribute("placeholder"))) {
|
|
3536
|
+
let e = ct(this._country);
|
|
3537
3537
|
e && (o.placeholder = e);
|
|
3538
3538
|
}
|
|
3539
3539
|
}), this._syncMirror();
|
|
@@ -3544,7 +3544,7 @@ var pt = class extends HTMLElement {
|
|
|
3544
3544
|
disconnectedCallback() {
|
|
3545
3545
|
this._teardown();
|
|
3546
3546
|
}
|
|
3547
|
-
},
|
|
3547
|
+
}, pt = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), mt = class extends HTMLElement {
|
|
3548
3548
|
static formAssociated = !0;
|
|
3549
3549
|
static get observedAttributes() {
|
|
3550
3550
|
return [
|
|
@@ -3603,7 +3603,7 @@ var pt = class extends HTMLElement {
|
|
|
3603
3603
|
return this._value;
|
|
3604
3604
|
}
|
|
3605
3605
|
set value(e) {
|
|
3606
|
-
this._value = e == null ? "" : String(e),
|
|
3606
|
+
this._value = e == null ? "" : String(e), K(this, this._value), this._syncSelected(), this._syncReset();
|
|
3607
3607
|
}
|
|
3608
3608
|
set options(e) {
|
|
3609
3609
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -3618,7 +3618,7 @@ var pt = class extends HTMLElement {
|
|
|
3618
3618
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
3619
3619
|
label: e.innerHTML,
|
|
3620
3620
|
icon: e.getAttribute("icon") || void 0,
|
|
3621
|
-
[
|
|
3621
|
+
[Ne]: !0,
|
|
3622
3622
|
selected: e.hasAttribute("selected")
|
|
3623
3623
|
})));
|
|
3624
3624
|
}
|
|
@@ -3628,27 +3628,27 @@ var pt = class extends HTMLElement {
|
|
|
3628
3628
|
render() {
|
|
3629
3629
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._snapshotDeclared();
|
|
3630
3630
|
let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.hasAttribute("clearable"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "", a = this.getAttribute("icon"), o = this.getAttribute("prefix"), s = this.getAttribute("placeholder") || "Select...", c = this.getAttribute("search-placeholder") || "Search...", l = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
|
|
3631
|
-
l && (this._value = String(l.value)),
|
|
3631
|
+
l && (this._value = String(l.value)), K(this, this._value), this.id ||= `wui-select-${Math.random().toString(36).slice(2, 9)}`;
|
|
3632
3632
|
let u = `${this.id}-listbox`;
|
|
3633
3633
|
this._listboxId = u;
|
|
3634
3634
|
let d = e.map((e, t) => {
|
|
3635
3635
|
let n = String(e.value) === String(this._value);
|
|
3636
|
-
return `<button type="button" role="option" id="${
|
|
3636
|
+
return `<button type="button" role="option" id="${ht(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${ht(e.value)}" aria-selected="${n}">${Fe(e)}</button>`;
|
|
3637
3637
|
}).join("");
|
|
3638
3638
|
this.innerHTML = `
|
|
3639
3639
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
3640
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
3641
|
-
${a ?
|
|
3642
|
-
${o ? `<span class="search-select-prefix">${
|
|
3643
|
-
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ?
|
|
3644
|
-
${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${
|
|
3645
|
-
${
|
|
3640
|
+
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${ht(u)}" aria-label="${ht(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3641
|
+
${a ? q(a, { className: "search-select-icon" }) : ""}
|
|
3642
|
+
${o ? `<span class="search-select-prefix">${J(o)}</span>` : ""}
|
|
3643
|
+
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? Fe(l) : J(s)}</span>
|
|
3644
|
+
${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${q("x")}</span>` : ""}
|
|
3645
|
+
${q("chevron-down", { className: "search-select-caret" })}
|
|
3646
3646
|
</button>
|
|
3647
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
3648
|
-
${t ? `<div class="search-select-search">${
|
|
3647
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${ht(u)}" tabindex="-1" hidden>
|
|
3648
|
+
${t ? `<div class="search-select-search">${q("search")}<input class="search-select-input" placeholder="${ht(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${q("x")}</button></div>` : ""}
|
|
3649
3649
|
<div class="search-select-options">${d}<div class="search-select-empty" hidden>No matches</div></div>
|
|
3650
3650
|
</div>
|
|
3651
|
-
</div>`, this._rendered = !0,
|
|
3651
|
+
</div>`, this._rendered = !0, K(this, this._value), this._wire(), this._syncReset();
|
|
3652
3652
|
}
|
|
3653
3653
|
_refs() {
|
|
3654
3654
|
return {
|
|
@@ -3674,7 +3674,7 @@ var pt = class extends HTMLElement {
|
|
|
3674
3674
|
let t = e.dataset.value === String(this._value);
|
|
3675
3675
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
3676
3676
|
}
|
|
3677
|
-
e && (e.innerHTML = t ?
|
|
3677
|
+
e && (e.innerHTML = t ? Fe(t) : J(this.getAttribute("placeholder") || "Select..."), e.classList.toggle("search-select-placeholder", !t));
|
|
3678
3678
|
}
|
|
3679
3679
|
_syncReset() {
|
|
3680
3680
|
let { reset: e } = this._refs();
|
|
@@ -3687,8 +3687,8 @@ var pt = class extends HTMLElement {
|
|
|
3687
3687
|
let t = () => {
|
|
3688
3688
|
if (this.hasAttribute("compact")) {
|
|
3689
3689
|
let t = e.control.getBoundingClientRect();
|
|
3690
|
-
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px",
|
|
3691
|
-
} else
|
|
3690
|
+
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", De(e.control, e.menu);
|
|
3691
|
+
} else De(e.control, e.menu, { matchWidth: !0 });
|
|
3692
3692
|
}, n = (t) => {
|
|
3693
3693
|
let n = this._visible();
|
|
3694
3694
|
this._active = t;
|
|
@@ -3708,7 +3708,7 @@ var pt = class extends HTMLElement {
|
|
|
3708
3708
|
}, s = (t) => {
|
|
3709
3709
|
this.value = t.dataset.value, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.control.focus();
|
|
3710
3710
|
};
|
|
3711
|
-
this._navHandler =
|
|
3711
|
+
this._navHandler = Me({
|
|
3712
3712
|
getVisibleOptions: () => this._visible(),
|
|
3713
3713
|
getActive: () => this._active,
|
|
3714
3714
|
setActive: (e) => n(e),
|
|
@@ -3739,18 +3739,18 @@ var pt = class extends HTMLElement {
|
|
|
3739
3739
|
}), e.menu.addEventListener("keydown", this._navHandler.handler), this._bindGlobal = () => {
|
|
3740
3740
|
this._teardown(), this._onDocClick = (e) => {
|
|
3741
3741
|
i() && !this.contains(e.target) && o();
|
|
3742
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
3742
|
+
}, document.addEventListener("click", this._onDocClick), Oe(this, () => {
|
|
3743
3743
|
i() && t();
|
|
3744
3744
|
});
|
|
3745
3745
|
}, this._bindGlobal();
|
|
3746
3746
|
}
|
|
3747
3747
|
_teardown() {
|
|
3748
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null),
|
|
3748
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), ke(this), this._navHandler?.teardown();
|
|
3749
3749
|
}
|
|
3750
3750
|
disconnectedCallback() {
|
|
3751
3751
|
this._teardown();
|
|
3752
3752
|
}
|
|
3753
|
-
},
|
|
3753
|
+
}, ht = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), gt = class extends HTMLElement {
|
|
3754
3754
|
static formAssociated = !0;
|
|
3755
3755
|
static get observedAttributes() {
|
|
3756
3756
|
return [
|
|
@@ -3790,19 +3790,19 @@ var pt = class extends HTMLElement {
|
|
|
3790
3790
|
return this._value;
|
|
3791
3791
|
}
|
|
3792
3792
|
set value(e) {
|
|
3793
|
-
this._value = this._snapToStep(this._clamp(
|
|
3793
|
+
this._value = this._snapToStep(this._clamp(_t(e, this._value))), this._syncValue(), this._syncMirrors();
|
|
3794
3794
|
}
|
|
3795
3795
|
get start() {
|
|
3796
3796
|
return this._start;
|
|
3797
3797
|
}
|
|
3798
3798
|
set start(e) {
|
|
3799
|
-
this._start = Math.min(this._snapToStep(this._clamp(
|
|
3799
|
+
this._start = Math.min(this._snapToStep(this._clamp(_t(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
|
|
3800
3800
|
}
|
|
3801
3801
|
get end() {
|
|
3802
3802
|
return this._end;
|
|
3803
3803
|
}
|
|
3804
3804
|
set end(e) {
|
|
3805
|
-
this._end = Math.max(this._snapToStep(this._clamp(
|
|
3805
|
+
this._end = Math.max(this._snapToStep(this._clamp(_t(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
|
|
3806
3806
|
}
|
|
3807
3807
|
attributeChangedCallback(e, t, n) {
|
|
3808
3808
|
if (e === "value" || e === "start" || e === "end" || e === "min" || e === "max" || e === "step") {
|
|
@@ -3815,19 +3815,19 @@ var pt = class extends HTMLElement {
|
|
|
3815
3815
|
this._isRange() ? this._resetRange() : this._resetSingle();
|
|
3816
3816
|
}
|
|
3817
3817
|
_updateFromAttribute(e) {
|
|
3818
|
-
e === "value" ? this._value = this._snapToStep(this._clamp(
|
|
3818
|
+
e === "value" ? this._value = this._snapToStep(this._clamp(_t(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(_t(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(_t(this.getAttribute("end"), this._end))));
|
|
3819
3819
|
}
|
|
3820
3820
|
_isRange() {
|
|
3821
3821
|
return this.hasAttribute("range");
|
|
3822
3822
|
}
|
|
3823
3823
|
_min() {
|
|
3824
|
-
return
|
|
3824
|
+
return _t(this.getAttribute("min"), 0);
|
|
3825
3825
|
}
|
|
3826
3826
|
_max() {
|
|
3827
|
-
return
|
|
3827
|
+
return _t(this.getAttribute("max"), 100);
|
|
3828
3828
|
}
|
|
3829
3829
|
_step() {
|
|
3830
|
-
return
|
|
3830
|
+
return _t(this.getAttribute("step"), 1);
|
|
3831
3831
|
}
|
|
3832
3832
|
_clamp(e) {
|
|
3833
3833
|
return Math.max(this._min(), Math.min(e, this._max()));
|
|
@@ -3892,7 +3892,7 @@ var pt = class extends HTMLElement {
|
|
|
3892
3892
|
aria-valuenow="${this._value}"
|
|
3893
3893
|
aria-valuetext="${this._formatValue(this._value)}"
|
|
3894
3894
|
${a ? "disabled" : ""}
|
|
3895
|
-
aria-label="${
|
|
3895
|
+
aria-label="${vt(this.getAttribute("aria-label") || "Value")}"
|
|
3896
3896
|
></button>
|
|
3897
3897
|
`}
|
|
3898
3898
|
${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>` : ""}
|
|
@@ -3925,7 +3925,7 @@ var pt = class extends HTMLElement {
|
|
|
3925
3925
|
this._isRange() ? this._syncRangeMirrors() : this._syncSingleMirror();
|
|
3926
3926
|
}
|
|
3927
3927
|
_syncSingleMirror() {
|
|
3928
|
-
this.getAttribute("name") &&
|
|
3928
|
+
this.getAttribute("name") && K(this, String(this._value));
|
|
3929
3929
|
}
|
|
3930
3930
|
_syncRangeMirrors() {
|
|
3931
3931
|
let e = this.getAttribute("start-name") || this.getAttribute("name"), t = this.getAttribute("end-name");
|
|
@@ -3992,10 +3992,10 @@ var pt = class extends HTMLElement {
|
|
|
3992
3992
|
disconnectedCallback() {
|
|
3993
3993
|
this._teardown();
|
|
3994
3994
|
}
|
|
3995
|
-
},
|
|
3995
|
+
}, _t = (e, t) => {
|
|
3996
3996
|
let n = Number.parseFloat(e);
|
|
3997
3997
|
return Number.isFinite(n) ? n : t;
|
|
3998
|
-
},
|
|
3998
|
+
}, vt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), yt = class extends HTMLElement {
|
|
3999
3999
|
static formAssociated = !0;
|
|
4000
4000
|
_accessibleName() {
|
|
4001
4001
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
|
|
@@ -4061,17 +4061,17 @@ var pt = class extends HTMLElement {
|
|
|
4061
4061
|
return this._values.slice();
|
|
4062
4062
|
}
|
|
4063
4063
|
set values(e) {
|
|
4064
|
-
this._values = Array.isArray(e) ? e.map(String) : [],
|
|
4064
|
+
this._values = Array.isArray(e) ? e.map(String) : [], K(this, this._values.join(",")), this._rendered && this._renderControl();
|
|
4065
4065
|
}
|
|
4066
4066
|
render() {
|
|
4067
4067
|
let e = this.getAttribute("size"), t = e === "sm" ? " search-select-sm" : e === "lg" ? " search-select-lg" : "";
|
|
4068
|
-
|
|
4068
|
+
K(this, this._values.join(",")), this.innerHTML = `
|
|
4069
4069
|
<div class="search-select${t}">
|
|
4070
4070
|
<div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
4071
|
-
<input type="text" class="ms-input" data-input aria-label="${
|
|
4071
|
+
<input type="text" class="ms-input" data-input aria-label="${xt(this._accessibleName())}" placeholder="${xt(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
|
|
4072
4072
|
<div class="ms-chips" data-chips></div>
|
|
4073
4073
|
</div>
|
|
4074
|
-
</div>`, this._rendered = !0,
|
|
4074
|
+
</div>`, this._rendered = !0, K(this, this._values.join(",")), this._renderControl(), this._wire();
|
|
4075
4075
|
}
|
|
4076
4076
|
_renderControl() {
|
|
4077
4077
|
let e = this.querySelector("[data-chips]");
|
|
@@ -4080,7 +4080,7 @@ var pt = class extends HTMLElement {
|
|
|
4080
4080
|
e.innerHTML = "";
|
|
4081
4081
|
return;
|
|
4082
4082
|
}
|
|
4083
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${
|
|
4083
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${bt(e)}</span><button type="button" class="chip-remove" data-remove="${xt(e)}" aria-label="Remove ${xt(e)}">${q("x")}</button></span>`).join("");
|
|
4084
4084
|
}
|
|
4085
4085
|
}
|
|
4086
4086
|
_wire() {
|
|
@@ -4090,7 +4090,7 @@ var pt = class extends HTMLElement {
|
|
|
4090
4090
|
let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = /* @__PURE__ */ new Set();
|
|
4091
4091
|
for (let e of r) e === "enter" ? o.add("Enter") : e === "comma" ? o.add(",") : e === "space" ? o.add(" ") : e === "tab" && o.add("Tab");
|
|
4092
4092
|
let s = () => {
|
|
4093
|
-
|
|
4093
|
+
K(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
4094
4094
|
}, c = (e) => {
|
|
4095
4095
|
let t = e.trim();
|
|
4096
4096
|
if (!t || i && this._values.length >= parseInt(i, 10)) return;
|
|
@@ -4151,18 +4151,18 @@ var pt = class extends HTMLElement {
|
|
|
4151
4151
|
disconnectedCallback() {
|
|
4152
4152
|
this._teardown();
|
|
4153
4153
|
}
|
|
4154
|
-
},
|
|
4154
|
+
}, bt = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), xt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), St = (e) => String(e).padStart(2, "0"), Ct = (e, t) => `${St(e)}:${St(t)}`, wt = (e) => {
|
|
4155
4155
|
let t = /^(\d{2}):(\d{2})$/.exec(e || "");
|
|
4156
4156
|
return t ? {
|
|
4157
4157
|
h: +t[1],
|
|
4158
4158
|
m: +t[2]
|
|
4159
4159
|
} : null;
|
|
4160
|
-
},
|
|
4160
|
+
}, Tt = (e, t = "24") => {
|
|
4161
4161
|
if (!e) return "";
|
|
4162
|
-
if (t === "24") return
|
|
4162
|
+
if (t === "24") return Ct(e.h, e.m);
|
|
4163
4163
|
let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
|
|
4164
|
-
return `${n}:${
|
|
4165
|
-
},
|
|
4164
|
+
return `${n}:${St(e.m)} ${r}`;
|
|
4165
|
+
}, Et = class extends HTMLElement {
|
|
4166
4166
|
static formAssociated = !0;
|
|
4167
4167
|
static get observedAttributes() {
|
|
4168
4168
|
return [
|
|
@@ -4205,34 +4205,34 @@ var pt = class extends HTMLElement {
|
|
|
4205
4205
|
return this._value;
|
|
4206
4206
|
}
|
|
4207
4207
|
set value(e) {
|
|
4208
|
-
this._value = e || "",
|
|
4208
|
+
this._value = e || "", K(this, this._value), this._syncTrigger();
|
|
4209
4209
|
}
|
|
4210
4210
|
render() {
|
|
4211
4211
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
|
|
4212
|
-
let e = this.getAttribute("placeholder") || "Select time", t =
|
|
4212
|
+
let e = this.getAttribute("placeholder") || "Select time", t = wt(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");
|
|
4213
4213
|
this.innerHTML = `
|
|
4214
4214
|
<div class="timepicker">
|
|
4215
|
-
<button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${
|
|
4216
|
-
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ?
|
|
4217
|
-
${
|
|
4215
|
+
<button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${J(a)}"` : ""}${o ? ` aria-describedby="${J(o)}"` : ""}>
|
|
4216
|
+
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? Tt(t, n) : J(e)}</span>
|
|
4217
|
+
${q("clock")}
|
|
4218
4218
|
</button>
|
|
4219
4219
|
<div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
|
|
4220
|
-
</div>`, this._rendered = !0,
|
|
4220
|
+
</div>`, this._rendered = !0, K(this, this._value), this._wire();
|
|
4221
4221
|
}
|
|
4222
4222
|
_syncFormValue() {
|
|
4223
|
-
|
|
4223
|
+
K(this, this._value);
|
|
4224
4224
|
}
|
|
4225
4225
|
_syncTrigger() {
|
|
4226
4226
|
let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
4227
4227
|
if (!t) return;
|
|
4228
|
-
let n =
|
|
4229
|
-
t.textContent = n ?
|
|
4228
|
+
let n = wt(this._value), r = this.getAttribute("format") || "24";
|
|
4229
|
+
t.textContent = n ? Tt(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
4230
4230
|
}
|
|
4231
4231
|
_buildTimes() {
|
|
4232
|
-
let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r =
|
|
4232
|
+
let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = wt(t) || {
|
|
4233
4233
|
h: 0,
|
|
4234
4234
|
m: 0
|
|
4235
|
-
}, i =
|
|
4235
|
+
}, i = wt(n) || {
|
|
4236
4236
|
h: 23,
|
|
4237
4237
|
m: 59
|
|
4238
4238
|
}, a = [], o = r.h, s = r.m;
|
|
@@ -4245,10 +4245,10 @@ var pt = class extends HTMLElement {
|
|
|
4245
4245
|
_renderOptions() {
|
|
4246
4246
|
let e = this.querySelector(".timepicker-pop");
|
|
4247
4247
|
if (!e) return;
|
|
4248
|
-
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r =
|
|
4248
|
+
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = wt(this._value), i = this._focus, a = "";
|
|
4249
4249
|
for (let e = 0; e < n.length; e++) {
|
|
4250
|
-
let o = n[e], s =
|
|
4251
|
-
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${
|
|
4250
|
+
let o = n[e], s = Ct(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
|
|
4251
|
+
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${Tt(o, t)}</button>`;
|
|
4252
4252
|
}
|
|
4253
4253
|
e.innerHTML = a, this._focusActive();
|
|
4254
4254
|
}
|
|
@@ -4257,7 +4257,7 @@ var pt = class extends HTMLElement {
|
|
|
4257
4257
|
t && !e.hidden && t.focus();
|
|
4258
4258
|
}
|
|
4259
4259
|
_position(e, t) {
|
|
4260
|
-
|
|
4260
|
+
De(e, t);
|
|
4261
4261
|
}
|
|
4262
4262
|
_onKey(e) {
|
|
4263
4263
|
let t = [...this.querySelector(".timepicker-pop").querySelectorAll(".timepicker-option")];
|
|
@@ -4335,18 +4335,18 @@ var pt = class extends HTMLElement {
|
|
|
4335
4335
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
4336
4336
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
4337
4337
|
r() && e.key === "Escape" && this._close();
|
|
4338
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
4338
|
+
}, document.addEventListener("keydown", this._onDocKey), Oe(this, () => {
|
|
4339
4339
|
r() && this._position(e, t);
|
|
4340
4340
|
});
|
|
4341
4341
|
}, this._bindGlobal(), this._syncFormValue();
|
|
4342
4342
|
}
|
|
4343
4343
|
_teardown() {
|
|
4344
|
-
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null),
|
|
4344
|
+
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), ke(this), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
|
|
4345
4345
|
}
|
|
4346
4346
|
disconnectedCallback() {
|
|
4347
4347
|
this._teardown();
|
|
4348
4348
|
}
|
|
4349
|
-
},
|
|
4349
|
+
}, Dt = "wui-wizard-step", Ot = class extends HTMLElement {
|
|
4350
4350
|
static get observedAttributes() {
|
|
4351
4351
|
return [
|
|
4352
4352
|
"active",
|
|
@@ -4380,7 +4380,7 @@ var pt = class extends HTMLElement {
|
|
|
4380
4380
|
this._beforeNext = typeof e == "function" ? e : null;
|
|
4381
4381
|
}
|
|
4382
4382
|
get _steps() {
|
|
4383
|
-
return [...this.querySelectorAll(`:scope > ${
|
|
4383
|
+
return [...this.querySelectorAll(`:scope > ${Dt}`)];
|
|
4384
4384
|
}
|
|
4385
4385
|
refresh() {
|
|
4386
4386
|
this._rendered && this._renderChrome();
|
|
@@ -4438,14 +4438,14 @@ var pt = class extends HTMLElement {
|
|
|
4438
4438
|
let i = this.hasAttribute("non-linear");
|
|
4439
4439
|
return e.map((e, r) => {
|
|
4440
4440
|
let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
|
|
4441
|
-
u = a === "done" ?
|
|
4442
|
-
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${
|
|
4443
|
-
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${
|
|
4441
|
+
u = a === "done" ? q("check") : a === "error" ? q("alert-triangle") : a === "skipped" ? q("minus") : c ? q(c) : String(l);
|
|
4442
|
+
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${kt(s)}</span>` : "", h;
|
|
4443
|
+
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${kt(o)}</span>${m}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${kt(o)}</span>${m}` : `<span class="step-circle">${u}</span><span class="step-label">${kt(o)}</span>${m}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${h}</button>` : `<div class="${d}"${f}>${h}</div>`;
|
|
4444
4444
|
}).join("");
|
|
4445
4445
|
}
|
|
4446
4446
|
_footerHtml(e) {
|
|
4447
4447
|
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";
|
|
4448
|
-
return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${
|
|
4448
|
+
return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${q("arrow-left", { className: "me-2" })}${kt(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${kt(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${kt(o)}${q("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${kt(c)}</button>`}</span>`;
|
|
4449
4449
|
}
|
|
4450
4450
|
_wire() {
|
|
4451
4451
|
this._teardown(), this._onHeaderClick = (e) => {
|
|
@@ -4513,7 +4513,7 @@ var pt = class extends HTMLElement {
|
|
|
4513
4513
|
_reflectActive(e) {
|
|
4514
4514
|
this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
|
|
4515
4515
|
}
|
|
4516
|
-
},
|
|
4516
|
+
}, kt = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), At = class extends HTMLElement {
|
|
4517
4517
|
static get observedAttributes() {
|
|
4518
4518
|
return [
|
|
4519
4519
|
"label",
|
|
@@ -4527,14 +4527,14 @@ var pt = class extends HTMLElement {
|
|
|
4527
4527
|
let e = this.closest("wui-wizard");
|
|
4528
4528
|
e && typeof e.refresh == "function" && e.refresh();
|
|
4529
4529
|
}
|
|
4530
|
-
},
|
|
4530
|
+
}, jt = "image/png,image/jpeg,image/webp", Mt = {
|
|
4531
4531
|
"image/png": [".png"],
|
|
4532
4532
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
4533
4533
|
"image/webp": [".webp"],
|
|
4534
4534
|
"image/gif": [".gif"],
|
|
4535
4535
|
"image/svg+xml": [".svg"],
|
|
4536
4536
|
"application/pdf": [".pdf"]
|
|
4537
|
-
},
|
|
4537
|
+
}, Nt = {
|
|
4538
4538
|
"image/png": "PNG",
|
|
4539
4539
|
"image/jpeg": "JPG",
|
|
4540
4540
|
"image/webp": "WEBP",
|
|
@@ -4548,7 +4548,7 @@ var pt = class extends HTMLElement {
|
|
|
4548
4548
|
".gif": "GIF",
|
|
4549
4549
|
".svg": "SVG",
|
|
4550
4550
|
".pdf": "PDF"
|
|
4551
|
-
},
|
|
4551
|
+
}, Pt = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Ft = [
|
|
4552
4552
|
".png",
|
|
4553
4553
|
".jpg",
|
|
4554
4554
|
".jpeg",
|
|
@@ -4559,46 +4559,46 @@ var pt = class extends HTMLElement {
|
|
|
4559
4559
|
".avif",
|
|
4560
4560
|
".heic"
|
|
4561
4561
|
];
|
|
4562
|
-
function
|
|
4562
|
+
function It(e) {
|
|
4563
4563
|
if (!e) return !1;
|
|
4564
4564
|
let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
|
|
4565
4565
|
if (t) return t.startsWith("image/");
|
|
4566
4566
|
let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
|
|
4567
|
-
return
|
|
4567
|
+
return Ft.some((e) => r.endsWith(e));
|
|
4568
4568
|
}
|
|
4569
|
-
function
|
|
4570
|
-
let t =
|
|
4571
|
-
return t.length ? t.every((e) => e.startsWith(".") ?
|
|
4569
|
+
function Lt(e) {
|
|
4570
|
+
let t = Pt(e);
|
|
4571
|
+
return t.length ? t.every((e) => e.startsWith(".") ? Ft.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
|
|
4572
4572
|
}
|
|
4573
|
-
function
|
|
4573
|
+
function Rt(e) {
|
|
4574
4574
|
let t = [];
|
|
4575
|
-
for (let n of
|
|
4576
|
-
let e =
|
|
4575
|
+
for (let n of Pt(e)) {
|
|
4576
|
+
let e = Nt[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
4577
4577
|
t.includes(e) || t.push(e);
|
|
4578
4578
|
}
|
|
4579
4579
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
4580
4580
|
}
|
|
4581
|
-
function
|
|
4582
|
-
let n =
|
|
4581
|
+
function zt(e, t) {
|
|
4582
|
+
let n = Pt(t);
|
|
4583
4583
|
if (!n.length) return !0;
|
|
4584
4584
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
4585
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
4585
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Mt[e] || []).some((e) => i.endsWith(e)));
|
|
4586
4586
|
}
|
|
4587
|
-
function
|
|
4587
|
+
function Bt(e, t = {}) {
|
|
4588
4588
|
if (!e) return null;
|
|
4589
|
-
let n = t.accept === void 0 ?
|
|
4590
|
-
return
|
|
4589
|
+
let n = t.accept === void 0 ? jt : t.accept, r = t.maxSizeMb || 5;
|
|
4590
|
+
return zt(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Rt(n)} file.`;
|
|
4591
4591
|
}
|
|
4592
|
-
var
|
|
4592
|
+
var Z = (e, t) => {
|
|
4593
4593
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
4594
4594
|
};
|
|
4595
|
-
function
|
|
4596
|
-
|
|
4595
|
+
function Vt() {
|
|
4596
|
+
Z("wui-select", mt), Z("wui-phone", ft), Z("wui-datepicker", Ke), Z("wui-date-range", qe), Z("wui-dock", Je), Z("wui-slider", gt), Z("wui-timepicker", Et), Z("wui-autocomplete", Ie), Z("wui-multiselect", Xe), Z("wui-taginput", yt), Z("wui-otp", tt), Z("wui-status-icon", Ce), Z("wui-wizard-step", At), Z("wui-wizard", Ot);
|
|
4597
4597
|
}
|
|
4598
|
-
|
|
4598
|
+
Vt();
|
|
4599
4599
|
//#endregion
|
|
4600
4600
|
//#region src/components/AppPopover.jsx
|
|
4601
|
-
function
|
|
4601
|
+
function Ht({ trigger: e, children: t, title: r, placement: i = "bottom", triggerType: a = "click", onToggle: o, className: c = "", ...l }) {
|
|
4602
4602
|
N("AppPopover", l);
|
|
4603
4603
|
let u = s(), [f, h] = d(!1), g = (e) => {
|
|
4604
4604
|
h(e), o?.(e);
|
|
@@ -4633,18 +4633,18 @@ function Ut({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
4633
4633
|
}
|
|
4634
4634
|
//#endregion
|
|
4635
4635
|
//#region src/components/AppInfoTip.jsx
|
|
4636
|
-
function
|
|
4636
|
+
function Ut({ label: e, children: t, placement: n = "auto", className: r = "", ...i }) {
|
|
4637
4637
|
N("AppInfoTip", i);
|
|
4638
4638
|
let [a, o] = d(!1), s = !!e;
|
|
4639
4639
|
return !s && !t ? null : /* @__PURE__ */ p("span", {
|
|
4640
4640
|
className: `infotip${r ? ` ${r}` : ""}`,
|
|
4641
4641
|
...i,
|
|
4642
|
-
children: /* @__PURE__ */ p(
|
|
4642
|
+
children: /* @__PURE__ */ p(Ht, {
|
|
4643
4643
|
trigger: /* @__PURE__ */ p("button", {
|
|
4644
4644
|
type: "button",
|
|
4645
4645
|
className: "infotip-btn",
|
|
4646
4646
|
"aria-label": e || "More information",
|
|
4647
|
-
children: /* @__PURE__ */ p(
|
|
4647
|
+
children: /* @__PURE__ */ p(H, {
|
|
4648
4648
|
name: "info",
|
|
4649
4649
|
size: 16
|
|
4650
4650
|
})
|
|
@@ -4660,7 +4660,7 @@ function Wt({ label: e, children: t, placement: n = "auto", className: r = "", .
|
|
|
4660
4660
|
}
|
|
4661
4661
|
//#endregion
|
|
4662
4662
|
//#region src/components/AppRequiredMark.jsx
|
|
4663
|
-
function
|
|
4663
|
+
function Q() {
|
|
4664
4664
|
return /* @__PURE__ */ p("span", {
|
|
4665
4665
|
className: "required",
|
|
4666
4666
|
"aria-hidden": "true",
|
|
@@ -4669,7 +4669,7 @@ function Z() {
|
|
|
4669
4669
|
}
|
|
4670
4670
|
//#endregion
|
|
4671
4671
|
//#region src/components/useWuiControl.js
|
|
4672
|
-
function
|
|
4672
|
+
function Wt({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: s = Gt, on: c, syncDeps: l = [] } = {}) {
|
|
4673
4673
|
let d = u(null), f = r ?? Kt, p = i ?? qt, m = (s || Gt).join("\0"), h = Object.keys(c ?? {}).join("\0"), g = u({});
|
|
4674
4674
|
g.current = {
|
|
4675
4675
|
ref: e,
|
|
@@ -4760,7 +4760,7 @@ function Qt(e, t) {
|
|
|
4760
4760
|
//#region src/components/AppAutocomplete.jsx
|
|
4761
4761
|
var $t = 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) {
|
|
4762
4762
|
N("AppAutocomplete", S);
|
|
4763
|
-
let w = typeof r == "function", T = s(), E = f || T, { setRef: D, innerRef: O } =
|
|
4763
|
+
let w = typeof r == "function", T = s(), E = f || T, { setRef: D, innerRef: O } = Wt({
|
|
4764
4764
|
ref: C,
|
|
4765
4765
|
value: e ?? ""
|
|
4766
4766
|
});
|
|
@@ -4806,8 +4806,8 @@ var $t = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4806
4806
|
htmlFor: E,
|
|
4807
4807
|
children: [
|
|
4808
4808
|
h,
|
|
4809
|
-
v && /* @__PURE__ */ p(
|
|
4810
|
-
y && /* @__PURE__ */ p(
|
|
4809
|
+
v && /* @__PURE__ */ p(Q, {}),
|
|
4810
|
+
y && /* @__PURE__ */ p(Ut, {
|
|
4811
4811
|
label: b,
|
|
4812
4812
|
children: y
|
|
4813
4813
|
})
|
|
@@ -4895,7 +4895,7 @@ function on({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4895
4895
|
} : void 0, j = /* @__PURE__ */ p("span", {
|
|
4896
4896
|
className: "avatar-face",
|
|
4897
4897
|
"aria-hidden": "true",
|
|
4898
|
-
children: l == null ? nn(e) : /* @__PURE__ */ p(
|
|
4898
|
+
children: l == null ? nn(e) : /* @__PURE__ */ p(H, {
|
|
4899
4899
|
name: l,
|
|
4900
4900
|
size: Math.round(an(n) * .55)
|
|
4901
4901
|
})
|
|
@@ -5029,7 +5029,7 @@ function fn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
5029
5029
|
children: [
|
|
5030
5030
|
t && /* @__PURE__ */ p("span", {
|
|
5031
5031
|
className: "wui-banner-icon",
|
|
5032
|
-
children:
|
|
5032
|
+
children: U(t, { size: 18 })
|
|
5033
5033
|
}),
|
|
5034
5034
|
/* @__PURE__ */ p("div", {
|
|
5035
5035
|
className: "wui-banner-body",
|
|
@@ -5040,7 +5040,7 @@ function fn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
5040
5040
|
className: "wui-banner-dismiss",
|
|
5041
5041
|
"aria-label": "Dismiss",
|
|
5042
5042
|
onClick: u,
|
|
5043
|
-
children: /* @__PURE__ */ p(
|
|
5043
|
+
children: /* @__PURE__ */ p(H, {
|
|
5044
5044
|
name: "x",
|
|
5045
5045
|
size: 18
|
|
5046
5046
|
})
|
|
@@ -5055,7 +5055,7 @@ function pn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
5055
5055
|
className: n || void 0,
|
|
5056
5056
|
...r,
|
|
5057
5057
|
children: e.map((n, r) => {
|
|
5058
|
-
let i = r === e.length - 1, a = n.icon ?
|
|
5058
|
+
let i = r === e.length - 1, a = n.icon ? U(n.icon, { size: 14 }) : null, o = {};
|
|
5059
5059
|
return i || (n.to && t ? o = {
|
|
5060
5060
|
linkAs: t,
|
|
5061
5061
|
linkProps: { to: n.to }
|
|
@@ -5096,7 +5096,7 @@ function hn({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
5096
5096
|
children: y ? /* @__PURE__ */ p("img", {
|
|
5097
5097
|
src: i,
|
|
5098
5098
|
alt: a
|
|
5099
|
-
}) : typeof v == "string" ? /* @__PURE__ */ p(
|
|
5099
|
+
}) : typeof v == "string" ? /* @__PURE__ */ p(H, {
|
|
5100
5100
|
name: v,
|
|
5101
5101
|
size: S
|
|
5102
5102
|
}) : v
|
|
@@ -5119,7 +5119,7 @@ function hn({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
5119
5119
|
onClick: () => {
|
|
5120
5120
|
_(!1), u?.();
|
|
5121
5121
|
},
|
|
5122
|
-
children: /* @__PURE__ */ p(
|
|
5122
|
+
children: /* @__PURE__ */ p(H, {
|
|
5123
5123
|
name: "x",
|
|
5124
5124
|
size: 18
|
|
5125
5125
|
})
|
|
@@ -5163,7 +5163,7 @@ function _n({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5163
5163
|
as: "a",
|
|
5164
5164
|
href: C
|
|
5165
5165
|
}, w && (P.onClick = w));
|
|
5166
|
-
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(
|
|
5166
|
+
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(H, {
|
|
5167
5167
|
name: n,
|
|
5168
5168
|
size: 18
|
|
5169
5169
|
}) : n;
|
|
@@ -5279,7 +5279,7 @@ function bn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5279
5279
|
}) : o
|
|
5280
5280
|
}) : a ? /* @__PURE__ */ p("span", {
|
|
5281
5281
|
className: "chip-ic",
|
|
5282
|
-
children: /* @__PURE__ */ p(
|
|
5282
|
+
children: /* @__PURE__ */ p(H, {
|
|
5283
5283
|
name: a,
|
|
5284
5284
|
size: i === "sm" ? 12 : 14
|
|
5285
5285
|
})
|
|
@@ -5305,7 +5305,7 @@ function bn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5305
5305
|
onClick: s,
|
|
5306
5306
|
disabled: l,
|
|
5307
5307
|
"aria-label": u || (typeof g == "string" ? `Remove ${g}` : "Remove"),
|
|
5308
|
-
children: /* @__PURE__ */ p(
|
|
5308
|
+
children: /* @__PURE__ */ p(H, {
|
|
5309
5309
|
name: "x",
|
|
5310
5310
|
size: i === "sm" ? 12 : 14
|
|
5311
5311
|
})
|
|
@@ -5336,7 +5336,7 @@ function xn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5336
5336
|
})
|
|
5337
5337
|
}) : o || a ? /* @__PURE__ */ p("span", {
|
|
5338
5338
|
className: "struct-card-ic",
|
|
5339
|
-
children: o || /* @__PURE__ */ p(
|
|
5339
|
+
children: o || /* @__PURE__ */ p(H, {
|
|
5340
5340
|
name: a,
|
|
5341
5341
|
size: s
|
|
5342
5342
|
})
|
|
@@ -5353,7 +5353,7 @@ function xn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5353
5353
|
}),
|
|
5354
5354
|
/* @__PURE__ */ p("span", {
|
|
5355
5355
|
className: "struct-card-check",
|
|
5356
|
-
children: /* @__PURE__ */ p(
|
|
5356
|
+
children: /* @__PURE__ */ p(H, {
|
|
5357
5357
|
name: g,
|
|
5358
5358
|
size: _
|
|
5359
5359
|
})
|
|
@@ -5385,31 +5385,31 @@ function Sn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChang
|
|
|
5385
5385
|
}
|
|
5386
5386
|
//#endregion
|
|
5387
5387
|
//#region src/components/AppColorField.jsx
|
|
5388
|
-
function Cn({ 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 = "",
|
|
5389
|
-
N("AppColorField",
|
|
5390
|
-
let
|
|
5388
|
+
function Cn({ 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 = "", fieldClassName: f = "", ...h }) {
|
|
5389
|
+
N("AppColorField", h);
|
|
5390
|
+
let g = s(), _ = c || g, v = (e) => /^#[0-9a-f]{6}$/i.test(e), y = u === "sm" ? " color-field-sm" : u === "lg" ? " color-field-lg" : "", b = u === "sm" ? " input-sm" : u === "lg" ? " input-lg" : "";
|
|
5391
5391
|
return /* @__PURE__ */ m("div", {
|
|
5392
|
-
className: `field${
|
|
5392
|
+
className: `field${f ? ` ${f}` : ""}`,
|
|
5393
5393
|
children: [
|
|
5394
5394
|
n && /* @__PURE__ */ m("label", {
|
|
5395
5395
|
className: "label",
|
|
5396
|
-
htmlFor:
|
|
5397
|
-
children: [n, r && /* @__PURE__ */ p(
|
|
5396
|
+
htmlFor: _,
|
|
5397
|
+
children: [n, r && /* @__PURE__ */ p(Q, {})]
|
|
5398
5398
|
}),
|
|
5399
5399
|
/* @__PURE__ */ m("div", {
|
|
5400
|
-
className: `color-field${
|
|
5400
|
+
className: `color-field${y}`,
|
|
5401
5401
|
children: [/* @__PURE__ */ p("input", {
|
|
5402
5402
|
type: "color",
|
|
5403
5403
|
className: "color-field-swatch",
|
|
5404
|
-
value:
|
|
5404
|
+
value: v(e) ? e : "#000000",
|
|
5405
5405
|
onChange: (e) => t?.(e.target.value),
|
|
5406
5406
|
disabled: l,
|
|
5407
5407
|
"aria-label": `${n || "Colour"} — colour picker`,
|
|
5408
5408
|
tabIndex: -1
|
|
5409
5409
|
}), /* @__PURE__ */ p("input", {
|
|
5410
5410
|
type: "text",
|
|
5411
|
-
className: `input color-field-hex${
|
|
5412
|
-
id:
|
|
5411
|
+
className: `input color-field-hex${b}${i ? " error" : ""}${d ? ` ${d}` : ""}`,
|
|
5412
|
+
id: _,
|
|
5413
5413
|
name: o,
|
|
5414
5414
|
value: e,
|
|
5415
5415
|
onChange: (e) => t?.(e.target.value),
|
|
@@ -5419,7 +5419,7 @@ function Cn({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
5419
5419
|
required: r,
|
|
5420
5420
|
disabled: l,
|
|
5421
5421
|
"aria-invalid": i ? "true" : "false",
|
|
5422
|
-
...
|
|
5422
|
+
...h
|
|
5423
5423
|
})]
|
|
5424
5424
|
}),
|
|
5425
5425
|
i ? /* @__PURE__ */ p("div", {
|
|
@@ -5438,7 +5438,7 @@ function wn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5438
5438
|
N("AppCompareTable", i);
|
|
5439
5439
|
let a = (e) => e === !0 ? /* @__PURE__ */ p("span", {
|
|
5440
5440
|
className: "compare-yes",
|
|
5441
|
-
children: /* @__PURE__ */ p(
|
|
5441
|
+
children: /* @__PURE__ */ p(H, {
|
|
5442
5442
|
name: "check",
|
|
5443
5443
|
size: 16
|
|
5444
5444
|
})
|
|
@@ -5473,63 +5473,63 @@ function wn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5473
5473
|
//#region src/components/AppInput.jsx
|
|
5474
5474
|
var Tn = 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, action: A, floatingLabel: j = !1, variant: M, ...P }, F) {
|
|
5475
5475
|
N("AppInput", P);
|
|
5476
|
-
let [I, L] = d(!1), ee = s(), R = y || ee, z = c === "password", B = z && I ? "text" : c,
|
|
5477
|
-
|
|
5478
|
-
},
|
|
5476
|
+
let [I, L] = d(!1), ee = s(), R = y || ee, z = c === "password", B = z && I ? "text" : c, V = u(null), te = (e) => {
|
|
5477
|
+
V.current = e, typeof F == "function" ? F(e) : F && (F.current = e);
|
|
5478
|
+
}, ne = String(P.value ?? P.defaultValue ?? ""), [re, ie] = d(() => !!ne), [ae, oe] = d(() => ne.length), se = T && !w, ce = T || E;
|
|
5479
5479
|
o(() => {
|
|
5480
|
-
if (!
|
|
5480
|
+
if (!ce || P.value === void 0) return;
|
|
5481
5481
|
let e = String(P.value ?? "");
|
|
5482
|
-
|
|
5483
|
-
}, [P.value,
|
|
5484
|
-
let
|
|
5485
|
-
|
|
5486
|
-
},
|
|
5482
|
+
ie(!!e), oe(e.length);
|
|
5483
|
+
}, [P.value, ce]);
|
|
5484
|
+
let le = (e) => {
|
|
5485
|
+
ie(!!e.target.value), oe(e.target.value.length), P.onInput?.(e);
|
|
5486
|
+
}, U = se ? /* @__PURE__ */ p("button", {
|
|
5487
5487
|
type: "button",
|
|
5488
5488
|
className: "input-clear",
|
|
5489
5489
|
onClick: () => {
|
|
5490
|
-
let e =
|
|
5490
|
+
let e = V.current;
|
|
5491
5491
|
if (!e) return;
|
|
5492
5492
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
5493
|
-
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })),
|
|
5493
|
+
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ie(!1), e.focus();
|
|
5494
5494
|
},
|
|
5495
5495
|
"aria-label": "Clear",
|
|
5496
5496
|
tabIndex: -1,
|
|
5497
|
-
hidden: !
|
|
5498
|
-
children: /* @__PURE__ */ p(
|
|
5497
|
+
hidden: !re,
|
|
5498
|
+
children: /* @__PURE__ */ p(H, {
|
|
5499
5499
|
name: "x",
|
|
5500
5500
|
size: 16
|
|
5501
5501
|
})
|
|
5502
|
-
}) : null,
|
|
5502
|
+
}) : null, ue = n && R ? `${R}-error` : void 0, de = r && R ? `${R}-hint` : void 0, fe = ue || de, pe = [
|
|
5503
5503
|
"input",
|
|
5504
5504
|
l === "sm" ? "input-sm" : "",
|
|
5505
5505
|
l === "lg" ? "input-lg" : "",
|
|
5506
5506
|
n ? "error" : "",
|
|
5507
5507
|
z ? "pw" : "",
|
|
5508
5508
|
v ? "num-input" : "",
|
|
5509
|
-
!(j && e || O || k || v || z || h) && T &&
|
|
5509
|
+
!(j && e || O || k || v || z || h) && T && se ? "has-clear" : "",
|
|
5510
5510
|
M === "bare" ? "input-bare" : "",
|
|
5511
5511
|
S
|
|
5512
|
-
].filter(Boolean).join(" "),
|
|
5512
|
+
].filter(Boolean).join(" "), W = /* @__PURE__ */ p(x.Control, {
|
|
5513
5513
|
id: R,
|
|
5514
5514
|
name: b,
|
|
5515
5515
|
type: B,
|
|
5516
|
-
className:
|
|
5516
|
+
className: pe,
|
|
5517
5517
|
disabled: w,
|
|
5518
5518
|
required: t,
|
|
5519
5519
|
"aria-invalid": n ? "true" : "false",
|
|
5520
|
-
"aria-describedby":
|
|
5520
|
+
"aria-describedby": fe,
|
|
5521
5521
|
maxLength: D,
|
|
5522
5522
|
...P,
|
|
5523
5523
|
placeholder: j ? " " : P.placeholder,
|
|
5524
|
-
ref:
|
|
5525
|
-
onInput:
|
|
5526
|
-
}),
|
|
5527
|
-
return
|
|
5524
|
+
ref: te,
|
|
5525
|
+
onInput: ce ? le : P.onInput
|
|
5526
|
+
}), me;
|
|
5527
|
+
return me = j && e ? /* @__PURE__ */ m("div", {
|
|
5528
5528
|
className: "field-float",
|
|
5529
|
-
children: [
|
|
5529
|
+
children: [W, /* @__PURE__ */ m("label", {
|
|
5530
5530
|
className: "float-label",
|
|
5531
5531
|
htmlFor: R,
|
|
5532
|
-
children: [e, t && /* @__PURE__ */ p(
|
|
5532
|
+
children: [e, t && /* @__PURE__ */ p(Q, {})]
|
|
5533
5533
|
})]
|
|
5534
5534
|
}) : A ? /* @__PURE__ */ m("div", {
|
|
5535
5535
|
className: "input-action-row",
|
|
@@ -5537,11 +5537,11 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5537
5537
|
className: f ? "input-icon" : "input-wrap",
|
|
5538
5538
|
children: [f && /* @__PURE__ */ p("span", {
|
|
5539
5539
|
className: "ic",
|
|
5540
|
-
children: /* @__PURE__ */ p(
|
|
5540
|
+
children: /* @__PURE__ */ p(H, {
|
|
5541
5541
|
name: f,
|
|
5542
5542
|
size: 16
|
|
5543
5543
|
})
|
|
5544
|
-
}),
|
|
5544
|
+
}), W]
|
|
5545
5545
|
}), /* @__PURE__ */ p("div", {
|
|
5546
5546
|
className: "input-action",
|
|
5547
5547
|
children: A
|
|
@@ -5553,7 +5553,7 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5553
5553
|
className: "affix affix-pre",
|
|
5554
5554
|
children: O
|
|
5555
5555
|
}),
|
|
5556
|
-
|
|
5556
|
+
W,
|
|
5557
5557
|
k != null && /* @__PURE__ */ p("span", {
|
|
5558
5558
|
className: "affix affix-suf",
|
|
5559
5559
|
children: k
|
|
@@ -5561,7 +5561,7 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5561
5561
|
]
|
|
5562
5562
|
}) : v ? /* @__PURE__ */ m("div", {
|
|
5563
5563
|
className: "input-with-unit",
|
|
5564
|
-
children: [
|
|
5564
|
+
children: [W, /* @__PURE__ */ p("span", {
|
|
5565
5565
|
className: "unit",
|
|
5566
5566
|
children: v
|
|
5567
5567
|
})]
|
|
@@ -5570,19 +5570,19 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5570
5570
|
children: [
|
|
5571
5571
|
f && /* @__PURE__ */ p("span", {
|
|
5572
5572
|
className: "ic",
|
|
5573
|
-
children: /* @__PURE__ */ p(
|
|
5573
|
+
children: /* @__PURE__ */ p(H, {
|
|
5574
5574
|
name: f,
|
|
5575
5575
|
size: 16
|
|
5576
5576
|
})
|
|
5577
5577
|
}),
|
|
5578
|
-
|
|
5578
|
+
W,
|
|
5579
5579
|
/* @__PURE__ */ p("button", {
|
|
5580
5580
|
type: "button",
|
|
5581
5581
|
className: "pw-toggle",
|
|
5582
5582
|
onClick: () => L((e) => !e),
|
|
5583
5583
|
"aria-label": I ? "Hide password" : "Show password",
|
|
5584
5584
|
tabIndex: -1,
|
|
5585
|
-
children: /* @__PURE__ */ p(
|
|
5585
|
+
children: /* @__PURE__ */ p(H, {
|
|
5586
5586
|
name: I ? "eye-off" : "eye",
|
|
5587
5587
|
size: 18
|
|
5588
5588
|
})
|
|
@@ -5590,14 +5590,14 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5590
5590
|
]
|
|
5591
5591
|
}) : h ? /* @__PURE__ */ m("div", {
|
|
5592
5592
|
className: "input-wrap",
|
|
5593
|
-
children: [
|
|
5593
|
+
children: [W, /* @__PURE__ */ p("button", {
|
|
5594
5594
|
type: "button",
|
|
5595
5595
|
className: "pw-toggle",
|
|
5596
5596
|
onClick: g,
|
|
5597
5597
|
disabled: !g,
|
|
5598
5598
|
tabIndex: -1,
|
|
5599
5599
|
"aria-label": _ || h,
|
|
5600
|
-
children: /* @__PURE__ */ p(
|
|
5600
|
+
children: /* @__PURE__ */ p(H, {
|
|
5601
5601
|
name: h,
|
|
5602
5602
|
size: 18
|
|
5603
5603
|
})
|
|
@@ -5607,24 +5607,24 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5607
5607
|
children: [
|
|
5608
5608
|
f && /* @__PURE__ */ p("span", {
|
|
5609
5609
|
className: "ic",
|
|
5610
|
-
children: /* @__PURE__ */ p(
|
|
5610
|
+
children: /* @__PURE__ */ p(H, {
|
|
5611
5611
|
name: f,
|
|
5612
5612
|
size: 16
|
|
5613
5613
|
})
|
|
5614
5614
|
}),
|
|
5615
|
-
|
|
5616
|
-
|
|
5615
|
+
W,
|
|
5616
|
+
U
|
|
5617
5617
|
]
|
|
5618
5618
|
}) : f ? /* @__PURE__ */ m("div", {
|
|
5619
5619
|
className: "input-icon",
|
|
5620
5620
|
children: [/* @__PURE__ */ p("span", {
|
|
5621
5621
|
className: "ic",
|
|
5622
|
-
children: /* @__PURE__ */ p(
|
|
5622
|
+
children: /* @__PURE__ */ p(H, {
|
|
5623
5623
|
name: f,
|
|
5624
5624
|
size: 16
|
|
5625
5625
|
})
|
|
5626
|
-
}),
|
|
5627
|
-
}) :
|
|
5626
|
+
}), W]
|
|
5627
|
+
}) : W, /* @__PURE__ */ m(x.Group, {
|
|
5628
5628
|
className: `field${C ? ` ${C}` : ""}`,
|
|
5629
5629
|
children: [
|
|
5630
5630
|
e && !j && /* @__PURE__ */ m(x.Label, {
|
|
@@ -5632,26 +5632,26 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5632
5632
|
htmlFor: R,
|
|
5633
5633
|
children: [
|
|
5634
5634
|
e,
|
|
5635
|
-
t && /* @__PURE__ */ p(
|
|
5636
|
-
i && /* @__PURE__ */ p(
|
|
5635
|
+
t && /* @__PURE__ */ p(Q, {}),
|
|
5636
|
+
i && /* @__PURE__ */ p(Ut, {
|
|
5637
5637
|
label: a,
|
|
5638
5638
|
children: i
|
|
5639
5639
|
})
|
|
5640
5640
|
]
|
|
5641
5641
|
}),
|
|
5642
|
-
|
|
5642
|
+
me,
|
|
5643
5643
|
n ? /* @__PURE__ */ p("div", {
|
|
5644
5644
|
className: "field-error",
|
|
5645
|
-
id:
|
|
5645
|
+
id: ue,
|
|
5646
5646
|
children: n
|
|
5647
5647
|
}) : r ? /* @__PURE__ */ p("div", {
|
|
5648
5648
|
className: "field-hint",
|
|
5649
|
-
id:
|
|
5649
|
+
id: de,
|
|
5650
5650
|
children: r
|
|
5651
5651
|
}) : null,
|
|
5652
5652
|
E && /* @__PURE__ */ m("div", {
|
|
5653
|
-
className: `field-count${D &&
|
|
5654
|
-
children: [
|
|
5653
|
+
className: `field-count${D && ae >= D ? " at-limit" : ""}`,
|
|
5654
|
+
children: [ae, D ? ` / ${D}` : ""]
|
|
5655
5655
|
})
|
|
5656
5656
|
]
|
|
5657
5657
|
});
|
|
@@ -5671,7 +5671,7 @@ function kn() {
|
|
|
5671
5671
|
!e || On || (On = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
5672
5672
|
}
|
|
5673
5673
|
function An({ 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 }) {
|
|
5674
|
-
N("AppModal", b),
|
|
5674
|
+
N("AppModal", b), G("AppModal", "size", typeof d == "string" ? d : null, Object.keys(Dn));
|
|
5675
5675
|
let { style: x, ...C } = b;
|
|
5676
5676
|
h && !_ && typeof n != "string" && kn();
|
|
5677
5677
|
let w = u(null);
|
|
@@ -5713,7 +5713,7 @@ function An({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
5713
5713
|
className: "wui-modal-heading",
|
|
5714
5714
|
children: [i && /* @__PURE__ */ p("span", {
|
|
5715
5715
|
className: "wui-modal-headicon",
|
|
5716
|
-
children: /* @__PURE__ */ p(
|
|
5716
|
+
children: /* @__PURE__ */ p(H, {
|
|
5717
5717
|
name: i,
|
|
5718
5718
|
size: 18
|
|
5719
5719
|
})
|
|
@@ -5801,12 +5801,12 @@ function Nn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5801
5801
|
className: ["wui-confirm", v].filter(Boolean).join(" "),
|
|
5802
5802
|
footer: /* @__PURE__ */ m("div", {
|
|
5803
5803
|
className: "wui-confirm-actions",
|
|
5804
|
-
children: [/* @__PURE__ */ p(
|
|
5804
|
+
children: [/* @__PURE__ */ p(ve, {
|
|
5805
5805
|
variant: "secondary",
|
|
5806
5806
|
disabled: h,
|
|
5807
5807
|
onClick: w,
|
|
5808
5808
|
children: i
|
|
5809
|
-
}), /* @__PURE__ */ p(
|
|
5809
|
+
}), /* @__PURE__ */ p(ve, {
|
|
5810
5810
|
variant: a ? "danger" : "primary",
|
|
5811
5811
|
disabled: S,
|
|
5812
5812
|
loading: h,
|
|
@@ -5855,7 +5855,7 @@ var Pn = {
|
|
|
5855
5855
|
lg: 20
|
|
5856
5856
|
};
|
|
5857
5857
|
function Fn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r = !1, size: i = "md", variant: o = "ghost", onCopied: s, className: c = "", ...l }) {
|
|
5858
|
-
N("AppCopyButton", l),
|
|
5858
|
+
N("AppCopyButton", l), G("AppCopyButton", "size", i, Object.keys(Pn));
|
|
5859
5859
|
let [u, f] = d(!1), m = a(async () => {
|
|
5860
5860
|
try {
|
|
5861
5861
|
if (navigator.clipboard?.writeText) {
|
|
@@ -5870,14 +5870,14 @@ function Fn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5870
5870
|
document.body.removeChild(t), n && (f(!0), s?.(), setTimeout(() => f(!1), 2e3));
|
|
5871
5871
|
} catch {}
|
|
5872
5872
|
}, [e, s]), h = u ? n : t, g = u ? "check" : "files";
|
|
5873
|
-
return r ? /* @__PURE__ */ p(
|
|
5873
|
+
return r ? /* @__PURE__ */ p(ue, {
|
|
5874
5874
|
icon: g,
|
|
5875
5875
|
label: h,
|
|
5876
5876
|
size: Pn[i] ?? Pn.md,
|
|
5877
5877
|
onClick: m,
|
|
5878
5878
|
className: c,
|
|
5879
5879
|
...l
|
|
5880
|
-
}) : /* @__PURE__ */ p(
|
|
5880
|
+
}) : /* @__PURE__ */ p(ve, {
|
|
5881
5881
|
leftIcon: g,
|
|
5882
5882
|
variant: o,
|
|
5883
5883
|
size: i,
|
|
@@ -5926,7 +5926,7 @@ function zn(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
|
5926
5926
|
//#region src/components/AppSelectMini.jsx
|
|
5927
5927
|
function Bn({ 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 }) {
|
|
5928
5928
|
N("AppSelectMini", m);
|
|
5929
|
-
let { setRef: h, innerRef: g } =
|
|
5929
|
+
let { setRef: h, innerRef: g } = Wt({
|
|
5930
5930
|
value: e ?? "",
|
|
5931
5931
|
onChange: t
|
|
5932
5932
|
});
|
|
@@ -6005,7 +6005,7 @@ function Hn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
6005
6005
|
onClick: () => o(Math.max(1, e - 1)),
|
|
6006
6006
|
disabled: e <= 1,
|
|
6007
6007
|
"aria-label": "Previous page",
|
|
6008
|
-
children: /* @__PURE__ */ p(
|
|
6008
|
+
children: /* @__PURE__ */ p(H, {
|
|
6009
6009
|
name: "arrow-left",
|
|
6010
6010
|
size: 18
|
|
6011
6011
|
})
|
|
@@ -6028,7 +6028,7 @@ function Hn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
6028
6028
|
onClick: () => o(Math.min(t, e + 1)),
|
|
6029
6029
|
disabled: e >= t,
|
|
6030
6030
|
"aria-label": "Next page",
|
|
6031
|
-
children: /* @__PURE__ */ p(
|
|
6031
|
+
children: /* @__PURE__ */ p(H, {
|
|
6032
6032
|
name: "arrow-right",
|
|
6033
6033
|
size: 18
|
|
6034
6034
|
})
|
|
@@ -6092,7 +6092,7 @@ function Gn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6092
6092
|
} : void 0,
|
|
6093
6093
|
children: [e.label, n && /* @__PURE__ */ p("span", {
|
|
6094
6094
|
className: "sort-icon",
|
|
6095
|
-
children: /* @__PURE__ */ p(
|
|
6095
|
+
children: /* @__PURE__ */ p(H, {
|
|
6096
6096
|
name: "chevrons-up-down",
|
|
6097
6097
|
size: 14
|
|
6098
6098
|
})
|
|
@@ -6126,7 +6126,7 @@ function Gn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6126
6126
|
"aria-controls": o ? `${s}-expanded` : void 0,
|
|
6127
6127
|
"aria-label": o ? "Collapse row" : "Expand row",
|
|
6128
6128
|
onClick: () => A(a),
|
|
6129
|
-
children: /* @__PURE__ */ p(
|
|
6129
|
+
children: /* @__PURE__ */ p(H, {
|
|
6130
6130
|
name: "chevron-down",
|
|
6131
6131
|
size: 16
|
|
6132
6132
|
})
|
|
@@ -6182,15 +6182,15 @@ function Gn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6182
6182
|
}
|
|
6183
6183
|
//#endregion
|
|
6184
6184
|
//#region src/components/AppDatePicker.jsx
|
|
6185
|
-
var Kn = 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 = "",
|
|
6186
|
-
N("AppDatePicker",
|
|
6187
|
-
let
|
|
6188
|
-
ref:
|
|
6185
|
+
var Kn = 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 = "", fieldClassName: y = "", ...b }, x) {
|
|
6186
|
+
N("AppDatePicker", b);
|
|
6187
|
+
let S = s(), C = g || o || S, { setRef: w } = Wt({
|
|
6188
|
+
ref: x,
|
|
6189
6189
|
value: e ?? "",
|
|
6190
6190
|
onChange: t
|
|
6191
|
-
}),
|
|
6192
|
-
ref:
|
|
6193
|
-
id:
|
|
6191
|
+
}), T = !n && !a && !i, E = a ? `${C}-error` : void 0, D = i ? `${C}-hint` : void 0, O = /* @__PURE__ */ p("wui-datepicker", {
|
|
6192
|
+
ref: w,
|
|
6193
|
+
id: C,
|
|
6194
6194
|
name: o,
|
|
6195
6195
|
min: c,
|
|
6196
6196
|
max: l,
|
|
@@ -6198,42 +6198,42 @@ var Kn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6198
6198
|
size: f || void 0,
|
|
6199
6199
|
"first-day": h == null ? void 0 : String(h),
|
|
6200
6200
|
"aria-label": _ || (typeof n == "string" ? n : void 0),
|
|
6201
|
-
"aria-describedby":
|
|
6201
|
+
"aria-describedby": E || D,
|
|
6202
6202
|
"aria-invalid": a ? "true" : void 0,
|
|
6203
6203
|
disabled: d ? "" : void 0,
|
|
6204
6204
|
required: r ? "" : void 0,
|
|
6205
|
-
className:
|
|
6206
|
-
...
|
|
6205
|
+
className: v || void 0,
|
|
6206
|
+
...b
|
|
6207
6207
|
});
|
|
6208
|
-
return
|
|
6209
|
-
className: `field${
|
|
6208
|
+
return T ? O : /* @__PURE__ */ m("div", {
|
|
6209
|
+
className: `field${y ? ` ${y}` : ""}`,
|
|
6210
6210
|
children: [
|
|
6211
6211
|
n && /* @__PURE__ */ m("label", {
|
|
6212
6212
|
className: "label",
|
|
6213
|
-
htmlFor:
|
|
6214
|
-
children: [n, r && /* @__PURE__ */ p(
|
|
6213
|
+
htmlFor: C,
|
|
6214
|
+
children: [n, r && /* @__PURE__ */ p(Q, {})]
|
|
6215
6215
|
}),
|
|
6216
|
-
|
|
6216
|
+
O,
|
|
6217
6217
|
a && /* @__PURE__ */ p("div", {
|
|
6218
6218
|
className: "field-error",
|
|
6219
|
-
id:
|
|
6219
|
+
id: E,
|
|
6220
6220
|
children: a
|
|
6221
6221
|
}),
|
|
6222
6222
|
!a && i && /* @__PURE__ */ p("div", {
|
|
6223
6223
|
className: "field-hint",
|
|
6224
|
-
id:
|
|
6224
|
+
id: D,
|
|
6225
6225
|
children: i
|
|
6226
6226
|
})
|
|
6227
6227
|
]
|
|
6228
6228
|
});
|
|
6229
|
-
}), qn = 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 = "",
|
|
6230
|
-
N("AppDateRangePicker",
|
|
6231
|
-
let
|
|
6232
|
-
ref:
|
|
6229
|
+
}), qn = 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 = "", fieldClassName: S = "", ...C }, w) {
|
|
6230
|
+
N("AppDateRangePicker", C);
|
|
6231
|
+
let T = s(), E = y || l || T, { setRef: D, innerRef: O } = Wt({
|
|
6232
|
+
ref: w,
|
|
6233
6233
|
onChange: n
|
|
6234
6234
|
});
|
|
6235
6235
|
o(() => {
|
|
6236
|
-
let n =
|
|
6236
|
+
let n = O.current;
|
|
6237
6237
|
if (!n) return;
|
|
6238
6238
|
let r = e === void 0 ? n.value.start : e, i = t === void 0 ? n.value.end : t;
|
|
6239
6239
|
(n.value.start !== r || n.value.end !== i) && (n.value = {
|
|
@@ -6243,11 +6243,11 @@ var Kn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6243
6243
|
}, [
|
|
6244
6244
|
e,
|
|
6245
6245
|
t,
|
|
6246
|
-
|
|
6246
|
+
O
|
|
6247
6247
|
]);
|
|
6248
|
-
let
|
|
6249
|
-
ref:
|
|
6250
|
-
id:
|
|
6248
|
+
let k = !r && !c && !a, A = c ? `${E}-error` : void 0, j = a ? `${E}-hint` : void 0, M = /* @__PURE__ */ p("wui-date-range", {
|
|
6249
|
+
ref: D,
|
|
6250
|
+
id: E,
|
|
6251
6251
|
"start-name": l,
|
|
6252
6252
|
"end-name": u,
|
|
6253
6253
|
min: d,
|
|
@@ -6256,30 +6256,30 @@ var Kn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6256
6256
|
size: _ || void 0,
|
|
6257
6257
|
"first-day": v == null ? void 0 : String(v),
|
|
6258
6258
|
"aria-label": b || (typeof r == "string" ? r : void 0),
|
|
6259
|
-
"aria-describedby":
|
|
6259
|
+
"aria-describedby": A || j,
|
|
6260
6260
|
"aria-invalid": c ? "true" : void 0,
|
|
6261
6261
|
disabled: g ? "" : void 0,
|
|
6262
6262
|
required: i ? "" : void 0,
|
|
6263
|
-
className:
|
|
6264
|
-
...
|
|
6263
|
+
className: x || void 0,
|
|
6264
|
+
...C
|
|
6265
6265
|
});
|
|
6266
|
-
return
|
|
6267
|
-
className: `field${
|
|
6266
|
+
return k ? M : /* @__PURE__ */ m("div", {
|
|
6267
|
+
className: `field${S ? ` ${S}` : ""}`,
|
|
6268
6268
|
children: [
|
|
6269
6269
|
r && /* @__PURE__ */ m("label", {
|
|
6270
6270
|
className: "label",
|
|
6271
|
-
htmlFor:
|
|
6272
|
-
children: [r, i && /* @__PURE__ */ p(
|
|
6271
|
+
htmlFor: E,
|
|
6272
|
+
children: [r, i && /* @__PURE__ */ p(Q, {})]
|
|
6273
6273
|
}),
|
|
6274
|
-
|
|
6274
|
+
M,
|
|
6275
6275
|
c && /* @__PURE__ */ p("div", {
|
|
6276
6276
|
className: "field-error",
|
|
6277
|
-
id:
|
|
6277
|
+
id: A,
|
|
6278
6278
|
children: c
|
|
6279
6279
|
}),
|
|
6280
6280
|
!c && a && /* @__PURE__ */ p("div", {
|
|
6281
6281
|
className: "field-hint",
|
|
6282
|
-
id:
|
|
6282
|
+
id: j,
|
|
6283
6283
|
children: a
|
|
6284
6284
|
})
|
|
6285
6285
|
]
|
|
@@ -6373,7 +6373,7 @@ function Qn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6373
6373
|
children: [e.image ? /* @__PURE__ */ p("img", {
|
|
6374
6374
|
src: e.image,
|
|
6375
6375
|
alt: ""
|
|
6376
|
-
}) :
|
|
6376
|
+
}) : U(e.icon, { size: 16 }), e.label]
|
|
6377
6377
|
}, e.key);
|
|
6378
6378
|
})
|
|
6379
6379
|
})]
|
|
@@ -6386,7 +6386,7 @@ var $n = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
6386
6386
|
className: n,
|
|
6387
6387
|
"aria-label": i,
|
|
6388
6388
|
...o,
|
|
6389
|
-
children: r ?? /* @__PURE__ */ p(
|
|
6389
|
+
children: r ?? /* @__PURE__ */ p(H, {
|
|
6390
6390
|
name: e,
|
|
6391
6391
|
size: t
|
|
6392
6392
|
})
|
|
@@ -6429,7 +6429,7 @@ function ir({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6429
6429
|
children: i ? /* @__PURE__ */ p("img", {
|
|
6430
6430
|
src: i,
|
|
6431
6431
|
alt: a
|
|
6432
|
-
}) : /* @__PURE__ */ p(
|
|
6432
|
+
}) : /* @__PURE__ */ p(H, {
|
|
6433
6433
|
name: "file-text",
|
|
6434
6434
|
size: 18
|
|
6435
6435
|
})
|
|
@@ -6449,7 +6449,7 @@ function ir({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6449
6449
|
className: "attach-item-remove",
|
|
6450
6450
|
"aria-label": `Remove ${a || r}`,
|
|
6451
6451
|
onClick: n,
|
|
6452
|
-
children: /* @__PURE__ */ p(
|
|
6452
|
+
children: /* @__PURE__ */ p(H, {
|
|
6453
6453
|
name: "x",
|
|
6454
6454
|
size: 16
|
|
6455
6455
|
})
|
|
@@ -6459,15 +6459,15 @@ function ir({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6459
6459
|
}
|
|
6460
6460
|
//#endregion
|
|
6461
6461
|
//#region src/components/AppFileAttachment.jsx
|
|
6462
|
-
function ar({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a =
|
|
6462
|
+
function ar({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = jt, maxSizeMb: o = 5, optional: c = !1, error: l, id: u, ...h }) {
|
|
6463
6463
|
N("AppFileAttachment", h);
|
|
6464
|
-
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x =
|
|
6464
|
+
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x = Lt(a), S = (e) => e instanceof File ? It(e) : x || It(e), C = !i && b.length === 1 && S(b[0]);
|
|
6465
6465
|
function w(e) {
|
|
6466
6466
|
let n = Array.from(e.target.files || []);
|
|
6467
6467
|
if (e.target.value = "", !n.length) return;
|
|
6468
6468
|
let s = [], c = "";
|
|
6469
6469
|
for (let e of n) {
|
|
6470
|
-
let t =
|
|
6470
|
+
let t = Bt(e, {
|
|
6471
6471
|
accept: a,
|
|
6472
6472
|
maxSizeMb: o
|
|
6473
6473
|
});
|
|
@@ -6503,7 +6503,7 @@ function ar({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6503
6503
|
children: [
|
|
6504
6504
|
/* @__PURE__ */ p("span", {
|
|
6505
6505
|
className: "attach-drop-icon",
|
|
6506
|
-
children: /* @__PURE__ */ p(
|
|
6506
|
+
children: /* @__PURE__ */ p(H, {
|
|
6507
6507
|
name: x ? "image" : "file-text",
|
|
6508
6508
|
size: 18
|
|
6509
6509
|
})
|
|
@@ -6516,7 +6516,7 @@ function ar({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6516
6516
|
}), /* @__PURE__ */ m("span", {
|
|
6517
6517
|
className: "attach-drop-hint",
|
|
6518
6518
|
children: [
|
|
6519
|
-
|
|
6519
|
+
Rt(a),
|
|
6520
6520
|
", up to ",
|
|
6521
6521
|
o,
|
|
6522
6522
|
" MB"
|
|
@@ -6571,7 +6571,7 @@ function or({ item: e, isImage: t, onRemove: n }) {
|
|
|
6571
6571
|
className: "attach-remove",
|
|
6572
6572
|
"aria-label": "Remove attachment",
|
|
6573
6573
|
onClick: n,
|
|
6574
|
-
children: /* @__PURE__ */ p(
|
|
6574
|
+
children: /* @__PURE__ */ p(H, {
|
|
6575
6575
|
name: "x",
|
|
6576
6576
|
size: 18
|
|
6577
6577
|
})
|
|
@@ -6590,28 +6590,28 @@ function or({ item: e, isImage: t, onRemove: n }) {
|
|
|
6590
6590
|
}
|
|
6591
6591
|
//#endregion
|
|
6592
6592
|
//#region src/components/AppFilePicker.jsx
|
|
6593
|
-
function sr({ 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 = "",
|
|
6594
|
-
N("AppFilePicker",
|
|
6595
|
-
let [
|
|
6593
|
+
function sr({ 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 = "", fieldClassName: _ = "", style: v, ...y }) {
|
|
6594
|
+
N("AppFilePicker", y);
|
|
6595
|
+
let [b, x] = d(null), [S, C] = d(!1), [w, T] = d(""), E = u(null), D = s(), O = n || D;
|
|
6596
6596
|
o(() => {
|
|
6597
|
-
if (!i && t instanceof File &&
|
|
6597
|
+
if (!i && t instanceof File && It(t)) {
|
|
6598
6598
|
let e = URL.createObjectURL(t);
|
|
6599
|
-
return
|
|
6599
|
+
return x(e), () => URL.revokeObjectURL(e);
|
|
6600
6600
|
}
|
|
6601
|
-
|
|
6601
|
+
x(null);
|
|
6602
6602
|
}, [t, i]);
|
|
6603
|
-
let
|
|
6604
|
-
let t =
|
|
6603
|
+
let k = i ? Array.isArray(t) ? t : t ? [t] : [] : [], A = h || w, j = Lt(c), M = !i && !!t, P = M && (t instanceof File ? It(t) : j || It(t)), F = t?.name, I = P ? t?.url || b : null, L = P ? "image" : "file", ee = e ? `Change ${e}` : `Change ${L}`, R = e ? `Remove ${e}` : `Remove ${L}`, z = e ? `${e} preview` : `Selected ${L} preview`, B = (e) => {
|
|
6604
|
+
let t = Bt(e, {
|
|
6605
6605
|
accept: c,
|
|
6606
6606
|
maxSizeMb: l
|
|
6607
6607
|
});
|
|
6608
|
-
return t ? (
|
|
6609
|
-
},
|
|
6608
|
+
return t ? (T(t), !1) : (T(""), r(e), !0);
|
|
6609
|
+
}, V = (e) => {
|
|
6610
6610
|
let n = Array.from(e || []);
|
|
6611
6611
|
if (!n.length) return;
|
|
6612
6612
|
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(er)), s = "", u = [];
|
|
6613
6613
|
for (let e of n) {
|
|
6614
|
-
let t =
|
|
6614
|
+
let t = Bt(e, {
|
|
6615
6615
|
accept: c,
|
|
6616
6616
|
maxSizeMb: l
|
|
6617
6617
|
});
|
|
@@ -6622,27 +6622,27 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6622
6622
|
o.has(er(e)) || (o.add(er(e)), u.push(e));
|
|
6623
6623
|
}
|
|
6624
6624
|
let d = i.concat(u);
|
|
6625
|
-
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`),
|
|
6626
|
-
},
|
|
6625
|
+
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`), T(s), r(d);
|
|
6626
|
+
}, te = (e) => {
|
|
6627
6627
|
if (i) {
|
|
6628
|
-
|
|
6628
|
+
V(e.target.files);
|
|
6629
6629
|
return;
|
|
6630
6630
|
}
|
|
6631
6631
|
let t = e.target.files?.[0] || null;
|
|
6632
|
-
t && (
|
|
6633
|
-
},
|
|
6634
|
-
if (e.preventDefault(),
|
|
6635
|
-
|
|
6632
|
+
t && (B(t) || (e.target.value = ""));
|
|
6633
|
+
}, ne = (e) => {
|
|
6634
|
+
if (e.preventDefault(), C(!1), i) {
|
|
6635
|
+
V(e.dataTransfer.files);
|
|
6636
6636
|
return;
|
|
6637
6637
|
}
|
|
6638
6638
|
let t = e.dataTransfer.files?.[0];
|
|
6639
|
-
t &&
|
|
6640
|
-
},
|
|
6641
|
-
|
|
6642
|
-
},
|
|
6643
|
-
id:
|
|
6639
|
+
t && B(t);
|
|
6640
|
+
}, re = (e) => {
|
|
6641
|
+
T(""), r(k.filter((t, n) => n !== e));
|
|
6642
|
+
}, ie = () => E.current?.click(), ae = /* @__PURE__ */ p("input", {
|
|
6643
|
+
id: O,
|
|
6644
6644
|
name: n,
|
|
6645
|
-
ref:
|
|
6645
|
+
ref: E,
|
|
6646
6646
|
type: "file",
|
|
6647
6647
|
accept: c,
|
|
6648
6648
|
multiple: i || void 0,
|
|
@@ -6650,49 +6650,50 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6650
6650
|
onClick: (e) => {
|
|
6651
6651
|
e.currentTarget.value = "";
|
|
6652
6652
|
},
|
|
6653
|
-
onChange:
|
|
6654
|
-
...
|
|
6653
|
+
onChange: te,
|
|
6654
|
+
...y
|
|
6655
6655
|
});
|
|
6656
6656
|
return /* @__PURE__ */ m("div", {
|
|
6657
|
-
className: `field${
|
|
6657
|
+
className: `field${_ ? ` ${_}` : ""}`,
|
|
6658
6658
|
children: [
|
|
6659
6659
|
/* @__PURE__ */ m("label", {
|
|
6660
6660
|
className: "label",
|
|
6661
|
-
htmlFor:
|
|
6662
|
-
children: [e, f && /* @__PURE__ */ p(
|
|
6661
|
+
htmlFor: O,
|
|
6662
|
+
children: [e, f && /* @__PURE__ */ p(Q, {})]
|
|
6663
6663
|
}),
|
|
6664
|
-
|
|
6665
|
-
className: `file-preview${
|
|
6664
|
+
M ? /* @__PURE__ */ m("div", {
|
|
6665
|
+
className: `file-preview${A ? " error" : ""}${g ? ` ${g}` : ""}`,
|
|
6666
|
+
style: v,
|
|
6666
6667
|
children: [
|
|
6667
6668
|
/* @__PURE__ */ m("button", {
|
|
6668
6669
|
type: "button",
|
|
6669
6670
|
className: "file-preview-open",
|
|
6670
|
-
"aria-label":
|
|
6671
|
-
onClick:
|
|
6672
|
-
children: [
|
|
6673
|
-
src:
|
|
6674
|
-
alt:
|
|
6671
|
+
"aria-label": ee,
|
|
6672
|
+
onClick: ie,
|
|
6673
|
+
children: [P && I ? /* @__PURE__ */ p("img", {
|
|
6674
|
+
src: I,
|
|
6675
|
+
alt: z,
|
|
6675
6676
|
className: "file-preview-img"
|
|
6676
6677
|
}) : /* @__PURE__ */ m("span", {
|
|
6677
6678
|
className: "file-preview-file",
|
|
6678
|
-
children: [/* @__PURE__ */ p(
|
|
6679
|
+
children: [/* @__PURE__ */ p(H, {
|
|
6679
6680
|
name: "file-text",
|
|
6680
6681
|
size: 28
|
|
6681
6682
|
}), /* @__PURE__ */ p("span", {
|
|
6682
6683
|
className: "file-preview-file-name",
|
|
6683
|
-
children:
|
|
6684
|
+
children: F
|
|
6684
6685
|
})]
|
|
6685
6686
|
}), /* @__PURE__ */ p("span", {
|
|
6686
6687
|
className: "file-preview-overlay",
|
|
6687
6688
|
children: /* @__PURE__ */ m("span", {
|
|
6688
6689
|
className: "file-preview-cta",
|
|
6689
6690
|
children: [
|
|
6690
|
-
/* @__PURE__ */ p(
|
|
6691
|
-
name:
|
|
6691
|
+
/* @__PURE__ */ p(H, {
|
|
6692
|
+
name: P ? "image" : "file-text",
|
|
6692
6693
|
size: 16
|
|
6693
6694
|
}),
|
|
6694
6695
|
" ",
|
|
6695
|
-
|
|
6696
|
+
P ? "Change image" : "Change file"
|
|
6696
6697
|
]
|
|
6697
6698
|
})
|
|
6698
6699
|
})]
|
|
@@ -6700,33 +6701,34 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6700
6701
|
/* @__PURE__ */ p("button", {
|
|
6701
6702
|
type: "button",
|
|
6702
6703
|
className: "file-preview-remove",
|
|
6703
|
-
"aria-label":
|
|
6704
|
-
title:
|
|
6704
|
+
"aria-label": R,
|
|
6705
|
+
title: R,
|
|
6705
6706
|
onClick: () => r(null),
|
|
6706
|
-
children: /* @__PURE__ */ p(
|
|
6707
|
+
children: /* @__PURE__ */ p(H, {
|
|
6707
6708
|
name: "x",
|
|
6708
6709
|
size: 16
|
|
6709
6710
|
})
|
|
6710
6711
|
}),
|
|
6711
|
-
|
|
6712
|
+
ae
|
|
6712
6713
|
]
|
|
6713
6714
|
}) : /* @__PURE__ */ m("div", {
|
|
6714
|
-
className: `file-input file-input-tall${
|
|
6715
|
+
className: `file-input file-input-tall${S ? " dragging" : ""}${A ? " error" : ""}${i && k.length > 0 ? " has-files" : ""}${g ? ` ${g}` : ""}`,
|
|
6716
|
+
style: v,
|
|
6715
6717
|
onDragOver: (e) => {
|
|
6716
|
-
e.preventDefault(),
|
|
6718
|
+
e.preventDefault(), S || C(!0);
|
|
6717
6719
|
},
|
|
6718
6720
|
onDragLeave: (e) => {
|
|
6719
|
-
e.preventDefault(),
|
|
6721
|
+
e.preventDefault(), C(!1);
|
|
6720
6722
|
},
|
|
6721
|
-
onDrop:
|
|
6723
|
+
onDrop: ne,
|
|
6722
6724
|
children: [
|
|
6723
6725
|
/* @__PURE__ */ m("label", {
|
|
6724
|
-
htmlFor:
|
|
6726
|
+
htmlFor: O,
|
|
6725
6727
|
className: "file-input-zone-label",
|
|
6726
6728
|
children: [
|
|
6727
6729
|
/* @__PURE__ */ p("span", {
|
|
6728
6730
|
className: "file-input-icon",
|
|
6729
|
-
children: /* @__PURE__ */ p(
|
|
6731
|
+
children: /* @__PURE__ */ p(H, {
|
|
6730
6732
|
name: "upload",
|
|
6731
6733
|
size: 24
|
|
6732
6734
|
})
|
|
@@ -6741,7 +6743,7 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6741
6743
|
/* @__PURE__ */ m("span", {
|
|
6742
6744
|
className: "file-input-text",
|
|
6743
6745
|
children: [
|
|
6744
|
-
|
|
6746
|
+
Rt(c),
|
|
6745
6747
|
" · up to ",
|
|
6746
6748
|
l,
|
|
6747
6749
|
" MB"
|
|
@@ -6749,21 +6751,21 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6749
6751
|
})
|
|
6750
6752
|
]
|
|
6751
6753
|
}),
|
|
6752
|
-
|
|
6753
|
-
i &&
|
|
6754
|
+
ae,
|
|
6755
|
+
i && k.length > 0 && /* @__PURE__ */ p("div", {
|
|
6754
6756
|
className: "attach-list",
|
|
6755
|
-
children:
|
|
6757
|
+
children: k.map((e, t) => /* @__PURE__ */ p(ir, {
|
|
6756
6758
|
item: e,
|
|
6757
|
-
isImage: e instanceof File ?
|
|
6759
|
+
isImage: e instanceof File ? It(e) : j || It(e),
|
|
6758
6760
|
noun: "file",
|
|
6759
|
-
onRemove: () =>
|
|
6761
|
+
onRemove: () => re(t)
|
|
6760
6762
|
}, er(e)))
|
|
6761
6763
|
})
|
|
6762
6764
|
]
|
|
6763
6765
|
}),
|
|
6764
|
-
|
|
6766
|
+
A && /* @__PURE__ */ p("div", {
|
|
6765
6767
|
className: "field-error",
|
|
6766
|
-
children:
|
|
6768
|
+
children: A
|
|
6767
6769
|
})
|
|
6768
6770
|
]
|
|
6769
6771
|
});
|
|
@@ -6786,7 +6788,7 @@ function cr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6786
6788
|
children: e.title
|
|
6787
6789
|
}), /* @__PURE__ */ p("span", {
|
|
6788
6790
|
className: "dock-item-icon",
|
|
6789
|
-
children:
|
|
6791
|
+
children: U(e.icon, { size: 18 })
|
|
6790
6792
|
})] });
|
|
6791
6793
|
if (e.to && t) return /* @__PURE__ */ p(t, {
|
|
6792
6794
|
className: "dock-item",
|
|
@@ -6869,7 +6871,7 @@ function fr({ items: e = [], className: t = "", ...n }) {
|
|
|
6869
6871
|
children: e.map((e, t) => {
|
|
6870
6872
|
let n = Jn(e.value), r = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
6871
6873
|
className: "info-icon",
|
|
6872
|
-
children:
|
|
6874
|
+
children: U(e.icon, { size: 16 })
|
|
6873
6875
|
}), /* @__PURE__ */ m("span", {
|
|
6874
6876
|
className: "info-meta",
|
|
6875
6877
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -6924,7 +6926,7 @@ function _r({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6924
6926
|
children: [
|
|
6925
6927
|
r && /* @__PURE__ */ p("span", {
|
|
6926
6928
|
className: `kpi-icon${i ? ` kpi-icon-${i}` : ""}${y ? ` ${y}` : ""}`,
|
|
6927
|
-
children:
|
|
6929
|
+
children: U(r, { size: 20 })
|
|
6928
6930
|
}),
|
|
6929
6931
|
/* @__PURE__ */ p("div", {
|
|
6930
6932
|
className: `kpi-label${b ? ` ${b}` : ""}`,
|
|
@@ -6940,7 +6942,7 @@ function _r({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6940
6942
|
}),
|
|
6941
6943
|
a && /* @__PURE__ */ m("div", {
|
|
6942
6944
|
className: `kpi-delta${O === "flat" ? "" : ` ${O}`}${C ? ` ${C}` : ""}`,
|
|
6943
|
-
children: [k && /* @__PURE__ */ p(
|
|
6945
|
+
children: [k && /* @__PURE__ */ p(H, {
|
|
6944
6946
|
name: k,
|
|
6945
6947
|
size: 13
|
|
6946
6948
|
}), a]
|
|
@@ -6968,15 +6970,15 @@ var vr = {
|
|
|
6968
6970
|
lg: 160
|
|
6969
6971
|
};
|
|
6970
6972
|
function yr({ 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 }) {
|
|
6971
|
-
N("AppLogoPicker", k),
|
|
6973
|
+
N("AppLogoPicker", k), G("AppLogoPicker", "size", typeof E == "string" ? E : null, Object.keys(vr));
|
|
6972
6974
|
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [ee, R] = d(!1), [z, B] = d(!1);
|
|
6973
6975
|
o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
|
|
6974
6976
|
F(null), R(!1);
|
|
6975
6977
|
}, [e]);
|
|
6976
|
-
let
|
|
6977
|
-
|
|
6978
|
-
},
|
|
6979
|
-
let t =
|
|
6978
|
+
let V = a || c, te = P || (e && !ee ? e : null), ne = b || I, re = !V && (!!P || !!te && !!i), ie = () => {
|
|
6979
|
+
V || A.current?.click();
|
|
6980
|
+
}, ae = (e) => {
|
|
6981
|
+
let t = Bt(e, {
|
|
6980
6982
|
accept: l,
|
|
6981
6983
|
maxSizeMb: f
|
|
6982
6984
|
});
|
|
@@ -6985,66 +6987,66 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6985
6987
|
return;
|
|
6986
6988
|
}
|
|
6987
6989
|
L(""), R(!1), F(URL.createObjectURL(e)), r(e);
|
|
6988
|
-
},
|
|
6990
|
+
}, oe = (e) => {
|
|
6989
6991
|
let t = e.target.files?.[0];
|
|
6990
|
-
e.target.value = "", t &&
|
|
6991
|
-
},
|
|
6992
|
-
if (e.preventDefault(), B(!1),
|
|
6992
|
+
e.target.value = "", t && ae(t);
|
|
6993
|
+
}, se = (e) => {
|
|
6994
|
+
if (e.preventDefault(), B(!1), V) return;
|
|
6993
6995
|
let t = e.dataTransfer.files?.[0];
|
|
6994
|
-
t &&
|
|
6995
|
-
},
|
|
6996
|
+
t && ae(t);
|
|
6997
|
+
}, ce = () => {
|
|
6996
6998
|
F(null), L(""), R(!1), A.current && (A.current.value = ""), i?.();
|
|
6997
|
-
},
|
|
6999
|
+
}, le = typeof E == "number" ? E : vr[E] ?? vr.md, U = Math.max(14, Math.round(le * .18)), ue = Math.round(le * .5), de = [
|
|
6998
7000
|
"set-uploader",
|
|
6999
7001
|
T === "avatar" ? "set-uploader--avatar" : "",
|
|
7000
7002
|
D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
|
|
7001
7003
|
z && "is-dragging"
|
|
7002
|
-
].filter(Boolean).join(" "),
|
|
7004
|
+
].filter(Boolean).join(" "), fe = x === "inline", pe = x === "profile", W = /* @__PURE__ */ m("div", {
|
|
7003
7005
|
className: "set-uploader-shell",
|
|
7004
7006
|
children: [
|
|
7005
7007
|
/* @__PURE__ */ p("button", {
|
|
7006
7008
|
type: "button",
|
|
7007
|
-
className:
|
|
7008
|
-
style: { "--wui-logo-size": `${
|
|
7009
|
+
className: de,
|
|
7010
|
+
style: { "--wui-logo-size": `${le}px` },
|
|
7009
7011
|
"aria-busy": a || void 0,
|
|
7010
|
-
disabled:
|
|
7011
|
-
onClick:
|
|
7012
|
+
disabled: V,
|
|
7013
|
+
onClick: ie,
|
|
7012
7014
|
"aria-label": _,
|
|
7013
7015
|
onDragOver: (e) => {
|
|
7014
|
-
e.preventDefault(), !
|
|
7016
|
+
e.preventDefault(), !V && !z && B(!0);
|
|
7015
7017
|
},
|
|
7016
7018
|
onDragLeave: (e) => {
|
|
7017
7019
|
e.preventDefault(), B(!1);
|
|
7018
7020
|
},
|
|
7019
|
-
onDrop:
|
|
7021
|
+
onDrop: se,
|
|
7020
7022
|
...k,
|
|
7021
7023
|
children: /* @__PURE__ */ m("span", {
|
|
7022
7024
|
className: "set-uploader-ring",
|
|
7023
7025
|
"data-overlay-label": g,
|
|
7024
|
-
children: [
|
|
7026
|
+
children: [te ? /* @__PURE__ */ p("img", {
|
|
7025
7027
|
className: "set-uploader-img",
|
|
7026
|
-
src:
|
|
7028
|
+
src: te,
|
|
7027
7029
|
alt: "",
|
|
7028
7030
|
onError: () => R(!0)
|
|
7029
7031
|
}) : /* @__PURE__ */ p("span", {
|
|
7030
7032
|
className: "set-uploader-logo",
|
|
7031
|
-
children: t || T === "avatar" && /* @__PURE__ */ p(
|
|
7033
|
+
children: t || T === "avatar" && /* @__PURE__ */ p(H, {
|
|
7032
7034
|
name: "user",
|
|
7033
|
-
size:
|
|
7035
|
+
size: ue
|
|
7034
7036
|
})
|
|
7035
7037
|
}), a ? /* @__PURE__ */ p("span", {
|
|
7036
7038
|
className: "set-uploader-overlay is-loading",
|
|
7037
7039
|
"aria-hidden": "true",
|
|
7038
|
-
children: /* @__PURE__ */ p(
|
|
7040
|
+
children: /* @__PURE__ */ p(H, {
|
|
7039
7041
|
name: "refresh-cw",
|
|
7040
|
-
size:
|
|
7042
|
+
size: U,
|
|
7041
7043
|
className: "wui-spin"
|
|
7042
7044
|
})
|
|
7043
7045
|
}) : !c && /* @__PURE__ */ m("span", {
|
|
7044
7046
|
className: "set-uploader-overlay",
|
|
7045
|
-
children: [/* @__PURE__ */ p(
|
|
7047
|
+
children: [/* @__PURE__ */ p(H, {
|
|
7046
7048
|
name: h,
|
|
7047
|
-
size:
|
|
7049
|
+
size: U
|
|
7048
7050
|
}), /* @__PURE__ */ p("span", { children: g })]
|
|
7049
7051
|
})]
|
|
7050
7052
|
})
|
|
@@ -7052,11 +7054,11 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7052
7054
|
/* @__PURE__ */ p("button", {
|
|
7053
7055
|
type: "button",
|
|
7054
7056
|
className: "set-uploader-remove",
|
|
7055
|
-
hidden: !
|
|
7057
|
+
hidden: !re,
|
|
7056
7058
|
"aria-label": "Remove photo",
|
|
7057
7059
|
title: "Remove photo",
|
|
7058
|
-
onClick:
|
|
7059
|
-
children: /* @__PURE__ */ p(
|
|
7060
|
+
onClick: ce,
|
|
7061
|
+
children: /* @__PURE__ */ p(H, {
|
|
7060
7062
|
name: "x",
|
|
7061
7063
|
size: 14
|
|
7062
7064
|
})
|
|
@@ -7068,21 +7070,21 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7068
7070
|
name: n,
|
|
7069
7071
|
hidden: !0,
|
|
7070
7072
|
accept: l,
|
|
7071
|
-
onChange:
|
|
7072
|
-
disabled:
|
|
7073
|
+
onChange: oe,
|
|
7074
|
+
disabled: V
|
|
7073
7075
|
})
|
|
7074
7076
|
]
|
|
7075
|
-
}),
|
|
7077
|
+
}), me = y && !ne && /* @__PURE__ */ p("div", {
|
|
7076
7078
|
className: "set-uploader-hint",
|
|
7077
7079
|
children: y
|
|
7078
|
-
}),
|
|
7080
|
+
}), he = ne && /* @__PURE__ */ p("div", {
|
|
7079
7081
|
className: "field-error",
|
|
7080
|
-
children:
|
|
7081
|
-
}),
|
|
7082
|
+
children: ne
|
|
7083
|
+
}), ge = v && /* @__PURE__ */ m("label", {
|
|
7082
7084
|
className: "label",
|
|
7083
7085
|
htmlFor: M,
|
|
7084
|
-
children: [v, w && /* @__PURE__ */ p(
|
|
7085
|
-
}),
|
|
7086
|
+
children: [v, w && /* @__PURE__ */ p(Q, {})]
|
|
7087
|
+
}), _e = /* @__PURE__ */ m("div", {
|
|
7086
7088
|
className: "set-uploader-meta",
|
|
7087
7089
|
children: [
|
|
7088
7090
|
S && /* @__PURE__ */ p("div", {
|
|
@@ -7093,30 +7095,30 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7093
7095
|
className: "set-uploader-subtitle",
|
|
7094
7096
|
children: C
|
|
7095
7097
|
}),
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
+
me,
|
|
7099
|
+
he
|
|
7098
7100
|
]
|
|
7099
7101
|
});
|
|
7100
|
-
return
|
|
7102
|
+
return fe ? /* @__PURE__ */ m("div", {
|
|
7101
7103
|
className: `field set-uploader-field set-uploader-field--inline${O ? ` ${O}` : ""}`,
|
|
7102
|
-
children: [
|
|
7104
|
+
children: [ge, /* @__PURE__ */ m("div", {
|
|
7103
7105
|
className: "set-uploader-row",
|
|
7104
|
-
children: [
|
|
7106
|
+
children: [W, _e]
|
|
7105
7107
|
})]
|
|
7106
|
-
}) :
|
|
7108
|
+
}) : pe ? /* @__PURE__ */ m("div", {
|
|
7107
7109
|
className: `field set-uploader-field set-uploader-field--profile${O ? ` ${O}` : ""}`,
|
|
7108
7110
|
children: [
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7111
|
+
ge,
|
|
7112
|
+
W,
|
|
7113
|
+
_e
|
|
7112
7114
|
]
|
|
7113
7115
|
}) : /* @__PURE__ */ m("div", {
|
|
7114
7116
|
className: `field set-uploader-field${O ? ` ${O}` : ""}`,
|
|
7115
7117
|
children: [
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7118
|
+
ge,
|
|
7119
|
+
W,
|
|
7120
|
+
me,
|
|
7121
|
+
he
|
|
7120
7122
|
]
|
|
7121
7123
|
});
|
|
7122
7124
|
}
|
|
@@ -7162,7 +7164,7 @@ function Cr({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
7162
7164
|
//#region src/components/AppMultiSelect.jsx
|
|
7163
7165
|
var wr = 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) {
|
|
7164
7166
|
N("AppMultiSelect", S);
|
|
7165
|
-
let w = s(), T = f || w, { setRef: E, innerRef: D } =
|
|
7167
|
+
let w = s(), T = f || w, { setRef: E, innerRef: D } = Wt({
|
|
7166
7168
|
ref: C,
|
|
7167
7169
|
value: e,
|
|
7168
7170
|
onChange: t,
|
|
@@ -7182,8 +7184,8 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7182
7184
|
htmlFor: T,
|
|
7183
7185
|
children: [
|
|
7184
7186
|
h,
|
|
7185
|
-
v && /* @__PURE__ */ p(
|
|
7186
|
-
y && /* @__PURE__ */ p(
|
|
7187
|
+
v && /* @__PURE__ */ p(Q, {}),
|
|
7188
|
+
y && /* @__PURE__ */ p(Ut, {
|
|
7187
7189
|
label: b,
|
|
7188
7190
|
children: y
|
|
7189
7191
|
})
|
|
@@ -7237,19 +7239,19 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7237
7239
|
let F = (e) => {
|
|
7238
7240
|
let t = (j(M) ?? A(0)) + e * h, n = A(k(t));
|
|
7239
7241
|
P(String(n)), l?.(n);
|
|
7240
|
-
}, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, ee = w || I !== null && typeof f == "number" && I >= f, R = n && O ? `${O}-error` : void 0, z = r && O ? `${O}-hint` : void 0, B = R || z,
|
|
7242
|
+
}, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, ee = w || I !== null && typeof f == "number" && I >= f, R = n && O ? `${O}-error` : void 0, z = r && O ? `${O}-hint` : void 0, B = R || z, V = [
|
|
7241
7243
|
"input",
|
|
7242
7244
|
v === "sm" ? "input-sm" : "",
|
|
7243
7245
|
v === "lg" ? "input-lg" : "",
|
|
7244
7246
|
n ? "error" : "",
|
|
7245
7247
|
"num-input",
|
|
7246
7248
|
S
|
|
7247
|
-
].filter(Boolean).join(" "),
|
|
7249
|
+
].filter(Boolean).join(" "), te = (e) => {
|
|
7248
7250
|
let t = e.target.value;
|
|
7249
7251
|
P(t);
|
|
7250
7252
|
let n = j(t);
|
|
7251
7253
|
n !== null && l?.(n);
|
|
7252
|
-
},
|
|
7254
|
+
}, ne = (e) => {
|
|
7253
7255
|
let t = j(e.target.value);
|
|
7254
7256
|
if (t === null) P(""), l?.("");
|
|
7255
7257
|
else {
|
|
@@ -7257,25 +7259,25 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7257
7259
|
P(String(e)), l?.(e);
|
|
7258
7260
|
}
|
|
7259
7261
|
T.onBlur?.(e);
|
|
7260
|
-
},
|
|
7262
|
+
}, re = (e) => {
|
|
7261
7263
|
e.key === "ArrowUp" ? (e.preventDefault(), F(1)) : e.key === "ArrowDown" && (e.preventDefault(), F(-1)), T.onKeyDown?.(e);
|
|
7262
|
-
},
|
|
7264
|
+
}, ie = /* @__PURE__ */ p(x.Control, {
|
|
7263
7265
|
...T,
|
|
7264
7266
|
id: O,
|
|
7265
7267
|
name: b,
|
|
7266
7268
|
type: "text",
|
|
7267
7269
|
inputMode: g > 0 ? "decimal" : "numeric",
|
|
7268
|
-
className:
|
|
7270
|
+
className: V,
|
|
7269
7271
|
disabled: w,
|
|
7270
7272
|
required: t,
|
|
7271
7273
|
"aria-invalid": n ? "true" : "false",
|
|
7272
7274
|
"aria-describedby": B,
|
|
7273
7275
|
value: M,
|
|
7274
7276
|
ref: E,
|
|
7275
|
-
onChange:
|
|
7276
|
-
onBlur:
|
|
7277
|
-
onKeyDown:
|
|
7278
|
-
}),
|
|
7277
|
+
onChange: te,
|
|
7278
|
+
onBlur: ne,
|
|
7279
|
+
onKeyDown: re
|
|
7280
|
+
}), ae = /* @__PURE__ */ m("div", {
|
|
7279
7281
|
className: [
|
|
7280
7282
|
"num-wrap",
|
|
7281
7283
|
v === "sm" ? "num-wrap-sm" : "",
|
|
@@ -7289,12 +7291,12 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7289
7291
|
tabIndex: -1,
|
|
7290
7292
|
disabled: L,
|
|
7291
7293
|
onClick: () => F(-1),
|
|
7292
|
-
children: /* @__PURE__ */ p(
|
|
7294
|
+
children: /* @__PURE__ */ p(H, {
|
|
7293
7295
|
name: "minus",
|
|
7294
7296
|
size: 16
|
|
7295
7297
|
})
|
|
7296
7298
|
}),
|
|
7297
|
-
|
|
7299
|
+
ie,
|
|
7298
7300
|
_ && /* @__PURE__ */ p("span", {
|
|
7299
7301
|
className: "affix",
|
|
7300
7302
|
children: _
|
|
@@ -7306,7 +7308,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7306
7308
|
tabIndex: -1,
|
|
7307
7309
|
disabled: ee,
|
|
7308
7310
|
onClick: () => F(1),
|
|
7309
|
-
children: /* @__PURE__ */ p(
|
|
7311
|
+
children: /* @__PURE__ */ p(H, {
|
|
7310
7312
|
name: "plus",
|
|
7311
7313
|
size: 16
|
|
7312
7314
|
})
|
|
@@ -7321,14 +7323,14 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7321
7323
|
htmlFor: O,
|
|
7322
7324
|
children: [
|
|
7323
7325
|
e,
|
|
7324
|
-
t && /* @__PURE__ */ p(
|
|
7325
|
-
i && /* @__PURE__ */ p(
|
|
7326
|
+
t && /* @__PURE__ */ p(Q, {}),
|
|
7327
|
+
i && /* @__PURE__ */ p(Ut, {
|
|
7326
7328
|
label: a,
|
|
7327
7329
|
children: i
|
|
7328
7330
|
})
|
|
7329
7331
|
]
|
|
7330
7332
|
}),
|
|
7331
|
-
|
|
7333
|
+
ae,
|
|
7332
7334
|
n ? /* @__PURE__ */ p("div", {
|
|
7333
7335
|
className: "field-error",
|
|
7334
7336
|
id: R,
|
|
@@ -7340,34 +7342,35 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7340
7342
|
}) : null
|
|
7341
7343
|
]
|
|
7342
7344
|
});
|
|
7343
|
-
}), Er = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: o = !1, hint: c, error: l, disabled: u = !1, name: d, id: f, className: h = "",
|
|
7344
|
-
N("AppOtpInput",
|
|
7345
|
-
let
|
|
7346
|
-
ref:
|
|
7345
|
+
}), Er = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: o = !1, hint: c, error: l, disabled: u = !1, name: d, id: f, className: h = "", fieldClassName: g = "", ..._ }, v) {
|
|
7346
|
+
N("AppOtpInput", _);
|
|
7347
|
+
let y = s(), b = f || y, { setRef: x } = Wt({
|
|
7348
|
+
ref: v,
|
|
7347
7349
|
value: e ?? "",
|
|
7348
7350
|
onChange: t,
|
|
7349
7351
|
on: { complete: (e) => n?.(e.detail) }
|
|
7350
|
-
}),
|
|
7352
|
+
}), S = /* @__PURE__ */ p("wui-otp", {
|
|
7351
7353
|
"aria-label": typeof a == "string" ? a : void 0,
|
|
7352
|
-
ref:
|
|
7353
|
-
id:
|
|
7354
|
+
ref: x,
|
|
7355
|
+
id: b,
|
|
7354
7356
|
name: d,
|
|
7355
7357
|
length: String(r),
|
|
7356
7358
|
mode: i,
|
|
7357
7359
|
"aria-invalid": l ? "true" : void 0,
|
|
7358
7360
|
disabled: u ? "" : void 0,
|
|
7359
7361
|
required: o ? "" : void 0,
|
|
7360
|
-
|
|
7362
|
+
className: h || void 0,
|
|
7363
|
+
..._
|
|
7361
7364
|
});
|
|
7362
|
-
return !a && !l && !c ?
|
|
7363
|
-
className: `field${
|
|
7365
|
+
return !a && !l && !c ? S : /* @__PURE__ */ m("div", {
|
|
7366
|
+
className: `field${g ? ` ${g}` : ""}`,
|
|
7364
7367
|
children: [
|
|
7365
7368
|
a && /* @__PURE__ */ m("label", {
|
|
7366
7369
|
className: "label",
|
|
7367
|
-
htmlFor:
|
|
7368
|
-
children: [a, o && /* @__PURE__ */ p(
|
|
7370
|
+
htmlFor: b,
|
|
7371
|
+
children: [a, o && /* @__PURE__ */ p(Q, {})]
|
|
7369
7372
|
}),
|
|
7370
|
-
|
|
7373
|
+
S,
|
|
7371
7374
|
l && /* @__PURE__ */ p("div", {
|
|
7372
7375
|
className: "field-error",
|
|
7373
7376
|
children: l
|
|
@@ -7391,7 +7394,7 @@ function Dr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7391
7394
|
d ? "page-header-sticky" : "",
|
|
7392
7395
|
i && i !== "primary" ? `tone-${i}` : "",
|
|
7393
7396
|
f
|
|
7394
|
-
].filter(Boolean).join(" "), _ = r == null ? null : typeof r == "string" ? /* @__PURE__ */ p(
|
|
7397
|
+
].filter(Boolean).join(" "), _ = r == null ? null : typeof r == "string" ? /* @__PURE__ */ p(H, {
|
|
7395
7398
|
name: r,
|
|
7396
7399
|
size: 20
|
|
7397
7400
|
}) : r;
|
|
@@ -7502,7 +7505,7 @@ function Or({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
7502
7505
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
7503
7506
|
var kr = 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 }, _) {
|
|
7504
7507
|
N("AppPhoneNumberInput", g);
|
|
7505
|
-
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } =
|
|
7508
|
+
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } = Wt({
|
|
7506
7509
|
ref: _,
|
|
7507
7510
|
value: e ?? "",
|
|
7508
7511
|
onChange: t,
|
|
@@ -7514,7 +7517,7 @@ var kr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7514
7517
|
a && /* @__PURE__ */ m("label", {
|
|
7515
7518
|
className: "label",
|
|
7516
7519
|
htmlFor: y,
|
|
7517
|
-
children: [a, c && /* @__PURE__ */ p(
|
|
7520
|
+
children: [a, c && /* @__PURE__ */ p(Q, {})]
|
|
7518
7521
|
}),
|
|
7519
7522
|
/* @__PURE__ */ p("wui-phone", {
|
|
7520
7523
|
"aria-label": typeof a == "string" ? a : void 0,
|
|
@@ -7577,7 +7580,7 @@ function Ar({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7577
7580
|
className: n ? void 0 : "excluded",
|
|
7578
7581
|
children: [/* @__PURE__ */ p("span", {
|
|
7579
7582
|
className: "plan-feature-icon",
|
|
7580
|
-
children: /* @__PURE__ */ p(
|
|
7583
|
+
children: /* @__PURE__ */ p(H, {
|
|
7581
7584
|
name: n ? "check" : "x",
|
|
7582
7585
|
size: 16
|
|
7583
7586
|
})
|
|
@@ -7670,7 +7673,7 @@ function Fr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7670
7673
|
className: "repeater-body",
|
|
7671
7674
|
children: t(e, n)
|
|
7672
7675
|
}),
|
|
7673
|
-
h && /* @__PURE__ */ p(
|
|
7676
|
+
h && /* @__PURE__ */ p(ue, {
|
|
7674
7677
|
icon: "trash-2",
|
|
7675
7678
|
label: `${a} ${n + 1}`,
|
|
7676
7679
|
danger: !0,
|
|
@@ -7679,7 +7682,7 @@ function Fr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7679
7682
|
})
|
|
7680
7683
|
]
|
|
7681
7684
|
}, e.id ?? n)),
|
|
7682
|
-
/* @__PURE__ */ p(
|
|
7685
|
+
/* @__PURE__ */ p(ve, {
|
|
7683
7686
|
variant: "secondary",
|
|
7684
7687
|
size: "sm",
|
|
7685
7688
|
leftIcon: "plus",
|
|
@@ -7697,7 +7700,7 @@ function Ir({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
7697
7700
|
N("AppResourceCard", s);
|
|
7698
7701
|
let c = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
7699
7702
|
className: "res-card-icon",
|
|
7700
|
-
children: /* @__PURE__ */ p(
|
|
7703
|
+
children: /* @__PURE__ */ p(H, {
|
|
7701
7704
|
name: e,
|
|
7702
7705
|
size: 18
|
|
7703
7706
|
})
|
|
@@ -7749,7 +7752,7 @@ var Lr = {
|
|
|
7749
7752
|
500: { tone: "muted" }
|
|
7750
7753
|
};
|
|
7751
7754
|
function Rr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
7752
|
-
N("AppResult", s),
|
|
7755
|
+
N("AppResult", s), G("AppResult", "status", e, Object.keys(Lr));
|
|
7753
7756
|
let c = Lr[e] || Lr.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
7754
7757
|
return /* @__PURE__ */ m("div", {
|
|
7755
7758
|
className: [
|
|
@@ -7765,7 +7768,7 @@ function Rr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7765
7768
|
children: e
|
|
7766
7769
|
}) : d ? /* @__PURE__ */ p("div", {
|
|
7767
7770
|
className: "result-icon",
|
|
7768
|
-
children:
|
|
7771
|
+
children: U(d, { size: 48 })
|
|
7769
7772
|
}) : null,
|
|
7770
7773
|
t != null && /* @__PURE__ */ p("h2", {
|
|
7771
7774
|
className: "result-title",
|
|
@@ -7817,7 +7820,7 @@ function Br({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7817
7820
|
className: "search-spinner",
|
|
7818
7821
|
"aria-hidden": "true"
|
|
7819
7822
|
}),
|
|
7820
|
-
/* @__PURE__ */ p(
|
|
7823
|
+
/* @__PURE__ */ p(H, {
|
|
7821
7824
|
name: "search",
|
|
7822
7825
|
size: a,
|
|
7823
7826
|
className: "search-icon"
|
|
@@ -7838,7 +7841,7 @@ function Br({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7838
7841
|
"aria-label": "Clear search",
|
|
7839
7842
|
onClick: () => d?.(""),
|
|
7840
7843
|
hidden: !e,
|
|
7841
|
-
children: /* @__PURE__ */ p(
|
|
7844
|
+
children: /* @__PURE__ */ p(H, {
|
|
7842
7845
|
name: "x",
|
|
7843
7846
|
size: 16
|
|
7844
7847
|
})
|
|
@@ -7903,7 +7906,7 @@ function Vr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7903
7906
|
disabled: d || e.disabled,
|
|
7904
7907
|
onChange: () => n?.(e.value)
|
|
7905
7908
|
}),
|
|
7906
|
-
e.icon && /* @__PURE__ */ p(
|
|
7909
|
+
e.icon && /* @__PURE__ */ p(H, {
|
|
7907
7910
|
name: e.icon,
|
|
7908
7911
|
size: 13
|
|
7909
7912
|
}),
|
|
@@ -7925,7 +7928,7 @@ function Vr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7925
7928
|
//#region src/components/AppSelect.jsx
|
|
7926
7929
|
var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = 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) {
|
|
7927
7930
|
N("AppSelect", O);
|
|
7928
|
-
let A = s(), { setRef: j, innerRef: M } =
|
|
7931
|
+
let A = s(), { setRef: j, innerRef: M } = Wt({
|
|
7929
7932
|
ref: k,
|
|
7930
7933
|
value: e ?? "",
|
|
7931
7934
|
onChange: t
|
|
@@ -7956,22 +7959,19 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
|
|
|
7956
7959
|
icon: u || void 0,
|
|
7957
7960
|
disabled: f ? "" : void 0,
|
|
7958
7961
|
required: g ? "" : void 0,
|
|
7962
|
+
className: C || void 0,
|
|
7959
7963
|
...O
|
|
7960
7964
|
});
|
|
7961
7965
|
return !h && !_ && !v ? ee : /* @__PURE__ */ m("div", {
|
|
7962
|
-
className: [
|
|
7963
|
-
"field",
|
|
7964
|
-
C,
|
|
7965
|
-
w
|
|
7966
|
-
].filter(Boolean).join(" "),
|
|
7966
|
+
className: ["field", w].filter(Boolean).join(" "),
|
|
7967
7967
|
children: [
|
|
7968
7968
|
h && !F && /* @__PURE__ */ m("label", {
|
|
7969
7969
|
className: "label",
|
|
7970
7970
|
htmlFor: P,
|
|
7971
7971
|
children: [
|
|
7972
7972
|
h,
|
|
7973
|
-
g && /* @__PURE__ */ p(
|
|
7974
|
-
y && /* @__PURE__ */ p(
|
|
7973
|
+
g && /* @__PURE__ */ p(Q, {}),
|
|
7974
|
+
y && /* @__PURE__ */ p(Ut, {
|
|
7975
7975
|
label: b,
|
|
7976
7976
|
children: y
|
|
7977
7977
|
})
|
|
@@ -7982,7 +7982,7 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
|
|
|
7982
7982
|
children: [ee, /* @__PURE__ */ m("label", {
|
|
7983
7983
|
className: "float-label",
|
|
7984
7984
|
htmlFor: P,
|
|
7985
|
-
children: [h, g && /* @__PURE__ */ p(
|
|
7985
|
+
children: [h, g && /* @__PURE__ */ p(Q, {})]
|
|
7986
7986
|
})]
|
|
7987
7987
|
}) : ee,
|
|
7988
7988
|
_ ? /* @__PURE__ */ p("div", {
|
|
@@ -8066,7 +8066,7 @@ function Wr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
8066
8066
|
onClick: D,
|
|
8067
8067
|
"aria-label": E ? "Expand navigation" : "Collapse navigation",
|
|
8068
8068
|
"aria-expanded": !E,
|
|
8069
|
-
children: /* @__PURE__ */ p(
|
|
8069
|
+
children: /* @__PURE__ */ p(H, {
|
|
8070
8070
|
name: "chevron-left",
|
|
8071
8071
|
size: 14
|
|
8072
8072
|
})
|
|
@@ -8084,7 +8084,7 @@ function Wr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
8084
8084
|
onClick: () => C(!0),
|
|
8085
8085
|
"aria-label": "Open navigation",
|
|
8086
8086
|
"aria-expanded": S,
|
|
8087
|
-
children: /* @__PURE__ */ p(
|
|
8087
|
+
children: /* @__PURE__ */ p(H, {
|
|
8088
8088
|
name: "menu",
|
|
8089
8089
|
size: 18
|
|
8090
8090
|
})
|
|
@@ -8121,7 +8121,7 @@ function Gr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8121
8121
|
}, [a, s]);
|
|
8122
8122
|
let l = typeof e.label == "string" ? e.label : void 0, u = !r && e.icon && /* @__PURE__ */ p("span", {
|
|
8123
8123
|
className: "app-nav-icon",
|
|
8124
|
-
children: typeof e.icon == "string" ? /* @__PURE__ */ p(
|
|
8124
|
+
children: typeof e.icon == "string" ? /* @__PURE__ */ p(H, {
|
|
8125
8125
|
name: e.icon,
|
|
8126
8126
|
size: 22
|
|
8127
8127
|
}) : e.icon
|
|
@@ -8144,7 +8144,7 @@ function Gr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8144
8144
|
h,
|
|
8145
8145
|
/* @__PURE__ */ p("span", {
|
|
8146
8146
|
className: "app-nav-caret",
|
|
8147
|
-
children: /* @__PURE__ */ p(
|
|
8147
|
+
children: /* @__PURE__ */ p(H, {
|
|
8148
8148
|
name: "chevron-right",
|
|
8149
8149
|
size: 16
|
|
8150
8150
|
})
|
|
@@ -8171,7 +8171,7 @@ function Gr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8171
8171
|
h,
|
|
8172
8172
|
e.trailingIcon && /* @__PURE__ */ p("span", {
|
|
8173
8173
|
className: "app-nav-trailing",
|
|
8174
|
-
children: typeof e.trailingIcon == "string" ? /* @__PURE__ */ p(
|
|
8174
|
+
children: typeof e.trailingIcon == "string" ? /* @__PURE__ */ p(H, {
|
|
8175
8175
|
name: e.trailingIcon,
|
|
8176
8176
|
size: 16
|
|
8177
8177
|
}) : e.trailingIcon
|
|
@@ -8204,7 +8204,7 @@ var Kr = {
|
|
|
8204
8204
|
bottom: "bottom"
|
|
8205
8205
|
};
|
|
8206
8206
|
function qr({ 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 }) {
|
|
8207
|
-
N("AppSidebarMenu", b),
|
|
8207
|
+
N("AppSidebarMenu", b), G("AppSidebarMenu", "side", n, Object.keys(Kr));
|
|
8208
8208
|
let { style: x, ...S } = b, w = Kr[n] || "end", T = c || l || x ? {
|
|
8209
8209
|
...c && { "--asm-width": c },
|
|
8210
8210
|
...l && { "--asm-max-width": l },
|
|
@@ -8229,17 +8229,17 @@ function qr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8229
8229
|
className: "drawer-title",
|
|
8230
8230
|
children: [i && /* @__PURE__ */ p("span", {
|
|
8231
8231
|
className: "drawer-title-ic",
|
|
8232
|
-
children: /* @__PURE__ */ p(
|
|
8232
|
+
children: /* @__PURE__ */ p(H, {
|
|
8233
8233
|
name: i,
|
|
8234
8234
|
size: 18
|
|
8235
8235
|
})
|
|
8236
8236
|
}), r]
|
|
8237
|
-
}), h && /* @__PURE__ */ p(
|
|
8237
|
+
}), h && /* @__PURE__ */ p(ve, {
|
|
8238
8238
|
variant: "ghost",
|
|
8239
8239
|
className: "btn-icon",
|
|
8240
8240
|
onClick: t,
|
|
8241
8241
|
"aria-label": "Close",
|
|
8242
|
-
children: /* @__PURE__ */ p(
|
|
8242
|
+
children: /* @__PURE__ */ p(H, {
|
|
8243
8243
|
name: "x",
|
|
8244
8244
|
size: 16
|
|
8245
8245
|
})
|
|
@@ -8258,28 +8258,28 @@ function qr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8258
8258
|
}
|
|
8259
8259
|
//#endregion
|
|
8260
8260
|
//#region src/components/AppSlider.jsx
|
|
8261
|
-
var Jr = 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 = "",
|
|
8262
|
-
N("AppSlider",
|
|
8263
|
-
let
|
|
8264
|
-
ref:
|
|
8265
|
-
value:
|
|
8261
|
+
var Jr = 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 = "", fieldClassName: E = "", ...D }, O) {
|
|
8262
|
+
N("AppSlider", D);
|
|
8263
|
+
let k = s(), A = C || d || r && f || k, j = r, { setRef: M, innerRef: P } = Wt({
|
|
8264
|
+
ref: O,
|
|
8265
|
+
value: j ? void 0 : e,
|
|
8266
8266
|
onChange: i,
|
|
8267
|
-
readValue:
|
|
8268
|
-
writeValue:
|
|
8267
|
+
readValue: j ? Zt : void 0,
|
|
8268
|
+
writeValue: j ? void 0 : Qt
|
|
8269
8269
|
});
|
|
8270
8270
|
o(() => {
|
|
8271
|
-
if (!
|
|
8272
|
-
let e =
|
|
8271
|
+
if (!j) return;
|
|
8272
|
+
let e = P.current;
|
|
8273
8273
|
e && (t !== void 0 && t > e.end ? (n !== void 0 && e.end !== n && (e.end = n), t !== void 0 && e.start !== t && (e.start = t)) : (t !== void 0 && e.start !== t && (e.start = t), n !== void 0 && e.end !== n && (e.end = n)));
|
|
8274
8274
|
}, [
|
|
8275
8275
|
t,
|
|
8276
8276
|
n,
|
|
8277
|
-
|
|
8278
|
-
|
|
8277
|
+
j,
|
|
8278
|
+
P
|
|
8279
8279
|
]);
|
|
8280
|
-
let
|
|
8281
|
-
ref:
|
|
8282
|
-
id:
|
|
8280
|
+
let F = !a && !u && !l, I = u ? `${A}-error` : void 0, L = l ? `${A}-hint` : void 0, ee = /* @__PURE__ */ p("wui-slider", {
|
|
8281
|
+
ref: M,
|
|
8282
|
+
id: A,
|
|
8283
8283
|
name: d || void 0,
|
|
8284
8284
|
"start-name": f || void 0,
|
|
8285
8285
|
"end-name": h || void 0,
|
|
@@ -8288,33 +8288,33 @@ var Jr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
8288
8288
|
step: v,
|
|
8289
8289
|
size: b || void 0,
|
|
8290
8290
|
"aria-label": w || (typeof a == "string" ? a : void 0),
|
|
8291
|
-
"aria-describedby":
|
|
8291
|
+
"aria-describedby": I || L,
|
|
8292
8292
|
"aria-invalid": u ? "true" : void 0,
|
|
8293
8293
|
disabled: y ? "" : void 0,
|
|
8294
8294
|
required: c ? "" : void 0,
|
|
8295
|
-
range:
|
|
8295
|
+
range: j ? "" : void 0,
|
|
8296
8296
|
"show-value": x ? "" : void 0,
|
|
8297
8297
|
unit: S || void 0,
|
|
8298
|
-
className:
|
|
8299
|
-
...
|
|
8298
|
+
className: T || void 0,
|
|
8299
|
+
...D
|
|
8300
8300
|
});
|
|
8301
|
-
return
|
|
8302
|
-
className: `field${
|
|
8301
|
+
return F ? ee : /* @__PURE__ */ m("div", {
|
|
8302
|
+
className: `field${E ? ` ${E}` : ""}`,
|
|
8303
8303
|
children: [
|
|
8304
8304
|
a && /* @__PURE__ */ m("label", {
|
|
8305
8305
|
className: "label",
|
|
8306
|
-
htmlFor:
|
|
8307
|
-
children: [a, c && /* @__PURE__ */ p(
|
|
8306
|
+
htmlFor: A,
|
|
8307
|
+
children: [a, c && /* @__PURE__ */ p(Q, {})]
|
|
8308
8308
|
}),
|
|
8309
|
-
|
|
8309
|
+
ee,
|
|
8310
8310
|
u && /* @__PURE__ */ p("div", {
|
|
8311
8311
|
className: "field-error",
|
|
8312
|
-
id:
|
|
8312
|
+
id: I,
|
|
8313
8313
|
children: u
|
|
8314
8314
|
}),
|
|
8315
8315
|
!u && l && /* @__PURE__ */ p("div", {
|
|
8316
8316
|
className: "field-hint",
|
|
8317
|
-
id:
|
|
8317
|
+
id: L,
|
|
8318
8318
|
children: l
|
|
8319
8319
|
})
|
|
8320
8320
|
]
|
|
@@ -8325,7 +8325,7 @@ var Jr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
8325
8325
|
lg: 72
|
|
8326
8326
|
};
|
|
8327
8327
|
function Xr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
8328
|
-
N("AppSplash", c),
|
|
8328
|
+
N("AppSplash", c), G("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(Yr));
|
|
8329
8329
|
let { style: l, ...u } = c, d = typeof a == "number" ? a : Yr[a] ?? Yr.md, f = i === "ring" ? /* @__PURE__ */ p("span", {
|
|
8330
8330
|
className: "splash-ring",
|
|
8331
8331
|
"aria-hidden": "true"
|
|
@@ -8396,13 +8396,13 @@ function Qr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8396
8396
|
...c,
|
|
8397
8397
|
children: e.map((t, n) => {
|
|
8398
8398
|
let a = t.status || $r(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
8399
|
-
c = a === "done" ? /* @__PURE__ */ p(
|
|
8399
|
+
c = a === "done" ? /* @__PURE__ */ p(H, {
|
|
8400
8400
|
name: "check",
|
|
8401
8401
|
size: 14
|
|
8402
|
-
}) : a === "error" ? /* @__PURE__ */ p(
|
|
8402
|
+
}) : a === "error" ? /* @__PURE__ */ p(H, {
|
|
8403
8403
|
name: "alert-triangle",
|
|
8404
8404
|
size: 14
|
|
8405
|
-
}) : t.icon ? /* @__PURE__ */ p(
|
|
8405
|
+
}) : t.icon ? /* @__PURE__ */ p(H, {
|
|
8406
8406
|
name: t.icon,
|
|
8407
8407
|
size: 14
|
|
8408
8408
|
}) : n + 1;
|
|
@@ -8487,7 +8487,7 @@ function ti({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
8487
8487
|
children: [
|
|
8488
8488
|
/* @__PURE__ */ p("span", {
|
|
8489
8489
|
className: "tbl-empty-icon",
|
|
8490
|
-
children:
|
|
8490
|
+
children: U(e, { size: 24 })
|
|
8491
8491
|
}),
|
|
8492
8492
|
/* @__PURE__ */ p("div", {
|
|
8493
8493
|
className: "tbl-empty-title",
|
|
@@ -8629,7 +8629,7 @@ function ii({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8629
8629
|
className: "app-tab-img",
|
|
8630
8630
|
src: e.image,
|
|
8631
8631
|
alt: e.imageAlt ?? ""
|
|
8632
|
-
}) :
|
|
8632
|
+
}) : U(e.icon, {
|
|
8633
8633
|
size: 16,
|
|
8634
8634
|
className: "app-tab-icon"
|
|
8635
8635
|
}),
|
|
@@ -8660,7 +8660,7 @@ function ii({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8660
8660
|
"aria-label": "Scroll tabs backward",
|
|
8661
8661
|
tabIndex: -1,
|
|
8662
8662
|
onClick: () => F(-1),
|
|
8663
|
-
children: /* @__PURE__ */ p(
|
|
8663
|
+
children: /* @__PURE__ */ p(H, {
|
|
8664
8664
|
name: "chevron-left",
|
|
8665
8665
|
size: 16
|
|
8666
8666
|
})
|
|
@@ -8672,7 +8672,7 @@ function ii({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8672
8672
|
"aria-label": "Scroll tabs forward",
|
|
8673
8673
|
tabIndex: -1,
|
|
8674
8674
|
onClick: () => F(1),
|
|
8675
|
-
children: /* @__PURE__ */ p(
|
|
8675
|
+
children: /* @__PURE__ */ p(H, {
|
|
8676
8676
|
name: "chevron-right",
|
|
8677
8677
|
size: 16
|
|
8678
8678
|
})
|
|
@@ -8684,7 +8684,7 @@ function ii({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8684
8684
|
//#region src/components/AppTagInput.jsx
|
|
8685
8685
|
var ai = 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) {
|
|
8686
8686
|
N("AppTagInput", x);
|
|
8687
|
-
let C = s(), w = h || r || C, { setRef: T } =
|
|
8687
|
+
let C = s(), w = h || r || C, { setRef: T } = Wt({
|
|
8688
8688
|
ref: S,
|
|
8689
8689
|
value: e,
|
|
8690
8690
|
onChange: t,
|
|
@@ -8699,8 +8699,8 @@ var ai = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8699
8699
|
htmlFor: w,
|
|
8700
8700
|
children: [
|
|
8701
8701
|
i,
|
|
8702
|
-
c && /* @__PURE__ */ p(
|
|
8703
|
-
y && /* @__PURE__ */ p(
|
|
8702
|
+
c && /* @__PURE__ */ p(Q, {}),
|
|
8703
|
+
y && /* @__PURE__ */ p(Ut, {
|
|
8704
8704
|
label: b,
|
|
8705
8705
|
children: y
|
|
8706
8706
|
})
|
|
@@ -8768,8 +8768,8 @@ var ai = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8768
8768
|
htmlFor: E,
|
|
8769
8769
|
children: [
|
|
8770
8770
|
e,
|
|
8771
|
-
t && /* @__PURE__ */ p(
|
|
8772
|
-
i && /* @__PURE__ */ p(
|
|
8771
|
+
t && /* @__PURE__ */ p(Q, {}),
|
|
8772
|
+
i && /* @__PURE__ */ p(Ut, {
|
|
8773
8773
|
label: l,
|
|
8774
8774
|
children: i
|
|
8775
8775
|
})
|
|
@@ -8829,7 +8829,7 @@ function ci({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8829
8829
|
className: `timeline-item${r}${i}`,
|
|
8830
8830
|
children: [/* @__PURE__ */ p("span", {
|
|
8831
8831
|
className: "timeline-dot",
|
|
8832
|
-
children: a ? /* @__PURE__ */ p(
|
|
8832
|
+
children: a ? /* @__PURE__ */ p(H, {
|
|
8833
8833
|
name: a,
|
|
8834
8834
|
size: u
|
|
8835
8835
|
}) : null
|
|
@@ -8882,15 +8882,15 @@ function ci({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8882
8882
|
}
|
|
8883
8883
|
//#endregion
|
|
8884
8884
|
//#region src/components/AppTimePicker.jsx
|
|
8885
|
-
var li = 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 = "",
|
|
8886
|
-
N("AppTimePicker",
|
|
8887
|
-
let
|
|
8888
|
-
ref:
|
|
8885
|
+
var li = 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 = "", fieldClassName: b = "", ...x }, S) {
|
|
8886
|
+
N("AppTimePicker", x);
|
|
8887
|
+
let C = s(), w = _ || o || C, { setRef: T } = Wt({
|
|
8888
|
+
ref: S,
|
|
8889
8889
|
value: e ?? "",
|
|
8890
8890
|
onChange: t
|
|
8891
|
-
}),
|
|
8892
|
-
ref:
|
|
8893
|
-
id:
|
|
8891
|
+
}), E = !n && !a && !i, D = a ? `${w}-error` : void 0, O = i ? `${w}-hint` : void 0, k = /* @__PURE__ */ p("wui-timepicker", {
|
|
8892
|
+
ref: T,
|
|
8893
|
+
id: w,
|
|
8894
8894
|
name: o,
|
|
8895
8895
|
min: c,
|
|
8896
8896
|
max: l,
|
|
@@ -8899,30 +8899,30 @@ var li = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
8899
8899
|
placeholder: f,
|
|
8900
8900
|
size: g || void 0,
|
|
8901
8901
|
"aria-label": v || (typeof n == "string" ? n : void 0),
|
|
8902
|
-
"aria-describedby":
|
|
8902
|
+
"aria-describedby": D || O,
|
|
8903
8903
|
"aria-invalid": a ? "true" : void 0,
|
|
8904
8904
|
disabled: h ? "" : void 0,
|
|
8905
8905
|
required: r ? "" : void 0,
|
|
8906
|
-
className:
|
|
8907
|
-
...
|
|
8906
|
+
className: y || void 0,
|
|
8907
|
+
...x
|
|
8908
8908
|
});
|
|
8909
|
-
return
|
|
8910
|
-
className: `field${
|
|
8909
|
+
return E ? k : /* @__PURE__ */ m("div", {
|
|
8910
|
+
className: `field${b ? ` ${b}` : ""}`,
|
|
8911
8911
|
children: [
|
|
8912
8912
|
n && /* @__PURE__ */ m("label", {
|
|
8913
8913
|
className: "label",
|
|
8914
|
-
htmlFor:
|
|
8915
|
-
children: [n, r && /* @__PURE__ */ p(
|
|
8914
|
+
htmlFor: w,
|
|
8915
|
+
children: [n, r && /* @__PURE__ */ p(Q, {})]
|
|
8916
8916
|
}),
|
|
8917
|
-
|
|
8917
|
+
k,
|
|
8918
8918
|
a && /* @__PURE__ */ p("div", {
|
|
8919
8919
|
className: "field-error",
|
|
8920
|
-
id:
|
|
8920
|
+
id: D,
|
|
8921
8921
|
children: a
|
|
8922
8922
|
}),
|
|
8923
8923
|
!a && i && /* @__PURE__ */ p("div", {
|
|
8924
8924
|
className: "field-hint",
|
|
8925
|
-
id:
|
|
8925
|
+
id: O,
|
|
8926
8926
|
children: i
|
|
8927
8927
|
})
|
|
8928
8928
|
]
|
|
@@ -9031,7 +9031,7 @@ var xi = {
|
|
|
9031
9031
|
"sharp"
|
|
9032
9032
|
]), Ei = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
9033
9033
|
function Di({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
9034
|
-
N("AppToast", s),
|
|
9034
|
+
N("AppToast", s), G("AppToast", "position", e, Object.keys(Si)), G("AppToast", "animation", n, wi), G("AppToast", "shape", r, Ti), G("AppToast", "surface", i, Ei);
|
|
9035
9035
|
let [c, l] = d([]);
|
|
9036
9036
|
o(() => _i(l), []);
|
|
9037
9037
|
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h = Si[e] ?? Si["bottom-end"];
|
|
@@ -9087,7 +9087,7 @@ function Oi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
9087
9087
|
/* @__PURE__ */ p("span", {
|
|
9088
9088
|
className: "wui-toast-icon",
|
|
9089
9089
|
"aria-hidden": "true",
|
|
9090
|
-
children: /* @__PURE__ */ p(
|
|
9090
|
+
children: /* @__PURE__ */ p(H, {
|
|
9091
9091
|
name: i.icon,
|
|
9092
9092
|
size: 20
|
|
9093
9093
|
})
|
|
@@ -9177,7 +9177,7 @@ function ki({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9177
9177
|
}),
|
|
9178
9178
|
/* @__PURE__ */ p("span", {
|
|
9179
9179
|
className: "toolbar-item-icon",
|
|
9180
|
-
children:
|
|
9180
|
+
children: U(e.icon, { size: 16 })
|
|
9181
9181
|
}),
|
|
9182
9182
|
/* @__PURE__ */ p("span", {
|
|
9183
9183
|
className: "toolbar-item-label",
|
|
@@ -9197,7 +9197,7 @@ function ki({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9197
9197
|
onClick: e.onClick,
|
|
9198
9198
|
children: /* @__PURE__ */ p("span", {
|
|
9199
9199
|
className: "toolbar-item-icon",
|
|
9200
|
-
children:
|
|
9200
|
+
children: U(e.icon, { size: 16 })
|
|
9201
9201
|
})
|
|
9202
9202
|
}, e.key ?? `${e.title}-${t}`))
|
|
9203
9203
|
]
|
|
@@ -9302,7 +9302,7 @@ function ji({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9302
9302
|
}) : null,
|
|
9303
9303
|
s ? /* @__PURE__ */ m("div", {
|
|
9304
9304
|
className: "workspace-switcher-search",
|
|
9305
|
-
children: [/* @__PURE__ */ p(
|
|
9305
|
+
children: [/* @__PURE__ */ p(H, {
|
|
9306
9306
|
name: "search",
|
|
9307
9307
|
size: 14
|
|
9308
9308
|
}), /* @__PURE__ */ p("input", {
|
|
@@ -9332,7 +9332,7 @@ function ji({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9332
9332
|
className: "workspace-switcher-badge",
|
|
9333
9333
|
children: e.badge
|
|
9334
9334
|
}) : null,
|
|
9335
|
-
e.id === O?.id ? /* @__PURE__ */ p(
|
|
9335
|
+
e.id === O?.id ? /* @__PURE__ */ p(H, {
|
|
9336
9336
|
name: "check",
|
|
9337
9337
|
size: 16,
|
|
9338
9338
|
className: "workspace-switcher-tick"
|
|
@@ -9348,7 +9348,7 @@ function ji({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9348
9348
|
type: "button",
|
|
9349
9349
|
className: "workspace-switcher-create",
|
|
9350
9350
|
onClick: () => c?.(),
|
|
9351
|
-
children: [/* @__PURE__ */ p(
|
|
9351
|
+
children: [/* @__PURE__ */ p(H, {
|
|
9352
9352
|
name: "plus",
|
|
9353
9353
|
size: 16
|
|
9354
9354
|
}), h]
|
|
@@ -9382,7 +9382,7 @@ function Pi(e, t) {
|
|
|
9382
9382
|
return /* @__PURE__ */ m(i ? t ?? "a" : "button", {
|
|
9383
9383
|
className: "workspace-switcher-footer-action",
|
|
9384
9384
|
...i ? t ? { to: i } : { href: i } : { type: "button" },
|
|
9385
|
-
children: [r ? /* @__PURE__ */ p(
|
|
9385
|
+
children: [r ? /* @__PURE__ */ p(H, {
|
|
9386
9386
|
name: r,
|
|
9387
9387
|
size: 16
|
|
9388
9388
|
}) : null, n]
|
|
@@ -9399,7 +9399,7 @@ var Fi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9399
9399
|
children: [/* @__PURE__ */ p(Ni, { tenant: t }), e ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
9400
9400
|
className: "workspace-switcher-trigger-name",
|
|
9401
9401
|
children: t?.name
|
|
9402
|
-
}), /* @__PURE__ */ p(
|
|
9402
|
+
}), /* @__PURE__ */ p(H, {
|
|
9403
9403
|
name: "chevrons-up-down",
|
|
9404
9404
|
size: 16,
|
|
9405
9405
|
className: "workspace-switcher-chevron"
|
|
@@ -9473,4 +9473,4 @@ function Bi(e, t = 10) {
|
|
|
9473
9473
|
};
|
|
9474
9474
|
}
|
|
9475
9475
|
//#endregion
|
|
9476
|
-
export {
|
|
9476
|
+
export { le as AppAccordion, ue as AppActionIcon, pe as AppAlert, xe as AppAsyncBlock, $t as AppAutocomplete, on as AppAvatar, ln as AppAvatarGroup, un as AppBadge, fn as AppBanner, pn as AppBreadcrumbs, ve as AppButton, hn as AppCallout, _n as AppCard, yn as AppCheckbox, bn as AppChip, xn as AppChoiceCard, Sn as AppChoiceChip, Cn as AppColorField, wn as AppCompareTable, Nn as AppConfirmDialog, Fn as AppCopyButton, Gn as AppDataTable, Kn as AppDatePicker, qn as AppDateRangePicker, Yn as AppDescriptions, Qn as AppDropdown, ye as AppEmptyState, ar as AppFileAttachment, sr as AppFilePicker, cr as AppFloatingDock, lr as AppFormActions, ur as AppFormRow, dr as AppFormSection, H as AppIcon, fr as AppInfoList, Ut as AppInfoTip, Tn as AppInput, _r as AppKpiTile, yr as AppLogoPicker, Cr as AppMeter, An as AppModal, wr as AppMultiSelect, Tr as AppNumberInput, Er as AppOtpInput, Dr as AppPageHeader, Or as AppPagination, kr as AppPhoneNumberInput, Ht as AppPopover, Ar as AppPricingCard, Nr as AppProgress, Pr as AppRadio, Fr as AppRepeater, Q as AppRequiredMark, Ir as AppResourceCard, Rr as AppResult, zr as AppScrollbar, Br as AppSearch, Vr as AppSegmented, Ur as AppSelect, Bn as AppSelectMini, Wr as AppShell, qr as AppSidebarMenu, In as AppSkeleton, Ln as AppSkeletonRows, Jr as AppSlider, be as AppSpinner, Xr as AppSplash, Zr as AppStatusBadge, Qr as AppStepper, ei as AppSwitch, ti as AppTableEmptyState, Hn as AppTablePagination, ii as AppTabs, ai as AppTagInput, oi as AppTextarea, li as AppTimePicker, ci as AppTimeline, Di as AppToast, ki as AppToolbar, ri as AppTooltip, Ai as AppWizard, ji as AppWorkspaceSwitcher, Mn as MODAL_ICONS, Ii as dismissAll, zi as errorToast, oe as iconNames, ce as registerIcons, Ri as toast, Bi as usePagination };
|