@webority/ui-react 0.6.9 → 0.6.11
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/AppAutocomplete.d.ts +3 -1
- package/dist/types/components/AppMultiSelect.d.ts +8 -1
- package/dist/types/components/AppOtpInput.d.ts +12 -0
- package/dist/types/components/AppSearch.d.ts +8 -2
- package/dist/types/components/AppSelect.d.ts +2 -1
- package/dist/types/components/AppSelectMini.d.ts +4 -1
- package/dist/ui-react.js +388 -317
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -281,18 +281,32 @@ function F(e, t, n = {}) {
|
|
|
281
281
|
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - P);
|
|
282
282
|
t.style.left = `${Math.max(P, c)}px`;
|
|
283
283
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
function I(e, t) {
|
|
285
|
+
L(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
|
|
286
|
+
}
|
|
287
|
+
function L(e) {
|
|
288
|
+
e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
|
|
289
|
+
}
|
|
290
|
+
var ee = "data-wui-mirror";
|
|
291
|
+
function R(e, t) {
|
|
292
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${ee}]`);
|
|
287
293
|
if (!n) {
|
|
288
294
|
r?.remove();
|
|
289
295
|
return;
|
|
290
296
|
}
|
|
291
|
-
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(
|
|
297
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(ee, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
|
|
292
298
|
for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
|
|
293
299
|
r.disabled = e.hasAttribute("disabled");
|
|
294
300
|
}
|
|
295
|
-
var
|
|
301
|
+
var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), te = (e) => {
|
|
302
|
+
if (!e) return "";
|
|
303
|
+
let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
304
|
+
return t ? `<i class="bi bi-${t}" aria-hidden="true"></i>` : "";
|
|
305
|
+
}, V = (e) => {
|
|
306
|
+
if (e == null) return "";
|
|
307
|
+
let t = e[z] ? String(e.label ?? "") : B(e.label), n = te(e.icon);
|
|
308
|
+
return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
|
|
309
|
+
}, ne = class extends HTMLElement {
|
|
296
310
|
_accessibleName() {
|
|
297
311
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
298
312
|
}
|
|
@@ -304,6 +318,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
304
318
|
"min-chars",
|
|
305
319
|
"debounce",
|
|
306
320
|
"remote",
|
|
321
|
+
"size",
|
|
307
322
|
"aria-label"
|
|
308
323
|
];
|
|
309
324
|
}
|
|
@@ -320,9 +335,9 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
320
335
|
return this._value;
|
|
321
336
|
}
|
|
322
337
|
set value(e) {
|
|
323
|
-
this._value = e == null ? "" : String(e),
|
|
338
|
+
this._value = e == null ? "" : String(e), R(this, this._value);
|
|
324
339
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
325
|
-
t && (this._label =
|
|
340
|
+
t && (this._label = U(t.label)), this._syncInput();
|
|
326
341
|
}
|
|
327
342
|
set options(e) {
|
|
328
343
|
this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
|
|
@@ -352,7 +367,8 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
352
367
|
e.length && (this._declared = e.map((e) => ({
|
|
353
368
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
354
369
|
label: e.innerHTML,
|
|
355
|
-
|
|
370
|
+
icon: e.getAttribute("icon") || void 0,
|
|
371
|
+
[z]: !0,
|
|
356
372
|
selected: e.hasAttribute("selected")
|
|
357
373
|
})));
|
|
358
374
|
}
|
|
@@ -361,11 +377,11 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
361
377
|
}
|
|
362
378
|
render() {
|
|
363
379
|
this._snapshotDeclared();
|
|
364
|
-
let e = this.getAttribute("placeholder") || "Search…";
|
|
380
|
+
let e = this.getAttribute("placeholder") || "Search…", t = this.getAttribute("size"), n = t === "sm" ? " search-select-sm" : t === "lg" ? " search-select-lg" : "";
|
|
365
381
|
this.innerHTML = `
|
|
366
|
-
<div class="search-select">
|
|
367
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
368
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
382
|
+
<div class="search-select${n}">
|
|
383
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${H(this._accessibleName())}">
|
|
384
|
+
<input class="search-select-input search-select-ac-input" placeholder="${H(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
369
385
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
370
386
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
|
|
371
387
|
</div>
|
|
@@ -374,7 +390,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
374
390
|
<div class="search-select-empty" hidden>No matches</div>
|
|
375
391
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
376
392
|
</div>
|
|
377
|
-
</div>`, this._rendered = !0,
|
|
393
|
+
</div>`, this._rendered = !0, R(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
|
|
378
394
|
}
|
|
379
395
|
_refs() {
|
|
380
396
|
return {
|
|
@@ -403,9 +419,9 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
403
419
|
let t = this._refs();
|
|
404
420
|
if (!t.optionsWrap) return;
|
|
405
421
|
let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
|
|
406
|
-
!this._remote && n && (r = r.filter((e) =>
|
|
422
|
+
!this._remote && n && (r = r.filter((e) => U(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
|
|
407
423
|
let t = String(e.value) === String(this._value);
|
|
408
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
424
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${H(e.value)}" aria-selected="${t}">${V(e)}</button>`;
|
|
409
425
|
}).join(""), this._active = -1;
|
|
410
426
|
let i = n.length < this._minChars;
|
|
411
427
|
t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
|
|
@@ -423,7 +439,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
423
439
|
}, o = () => {
|
|
424
440
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
|
|
425
441
|
}, s = (t) => {
|
|
426
|
-
this._value = t.dataset.value, this._label =
|
|
442
|
+
this._value = t.dataset.value, this._label = U(t.innerHTML), R(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
|
|
427
443
|
};
|
|
428
444
|
e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
|
|
429
445
|
let t = e.input.value;
|
|
@@ -445,18 +461,18 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
445
461
|
}), e.optionsWrap.addEventListener("mousemove", (e) => {
|
|
446
462
|
let t = e.target.closest(".search-select-option");
|
|
447
463
|
t && r(this._optionEls().indexOf(t));
|
|
448
|
-
}), e.clear?.addEventListener("click", () => {
|
|
449
|
-
this._value = "", this._label = "",
|
|
464
|
+
}), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
|
|
465
|
+
this._value = "", this._label = "", R(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
|
|
450
466
|
}), this._onDocClick = (e) => {
|
|
451
467
|
i() && !this.contains(e.target) && o();
|
|
452
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
468
|
+
}, document.addEventListener("click", this._onDocClick), I(this, () => {
|
|
453
469
|
i() && t();
|
|
454
470
|
});
|
|
455
471
|
}
|
|
456
472
|
disconnectedCallback() {
|
|
457
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick), clearTimeout(this._timer);
|
|
473
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), clearTimeout(this._timer);
|
|
458
474
|
}
|
|
459
|
-
},
|
|
475
|
+
}, H = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), U = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), re = [
|
|
460
476
|
"January",
|
|
461
477
|
"February",
|
|
462
478
|
"March",
|
|
@@ -469,7 +485,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
469
485
|
"October",
|
|
470
486
|
"November",
|
|
471
487
|
"December"
|
|
472
|
-
],
|
|
488
|
+
], ie = [
|
|
473
489
|
"Su",
|
|
474
490
|
"Mo",
|
|
475
491
|
"Tu",
|
|
@@ -477,17 +493,17 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
477
493
|
"Th",
|
|
478
494
|
"Fr",
|
|
479
495
|
"Sa"
|
|
480
|
-
], W = (e) => String(e).padStart(2, "0"),
|
|
496
|
+
], W = (e) => String(e).padStart(2, "0"), G = (e, t, n) => `${e}-${W(t + 1)}-${W(n)}`, K = (e) => {
|
|
481
497
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
482
498
|
return t ? {
|
|
483
499
|
y: +t[1],
|
|
484
500
|
m: t[2] - 1,
|
|
485
501
|
d: +t[3]
|
|
486
502
|
} : null;
|
|
487
|
-
},
|
|
488
|
-
let t =
|
|
489
|
-
return t ? `${W(t.d)} ${
|
|
490
|
-
},
|
|
503
|
+
}, ae = (e) => {
|
|
504
|
+
let t = K(e);
|
|
505
|
+
return t ? `${W(t.d)} ${re[t.m].slice(0, 3)} ${t.y}` : "";
|
|
506
|
+
}, oe = class extends HTMLElement {
|
|
491
507
|
static get observedAttributes() {
|
|
492
508
|
return [
|
|
493
509
|
"value",
|
|
@@ -512,46 +528,46 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
512
528
|
return this._value;
|
|
513
529
|
}
|
|
514
530
|
set value(e) {
|
|
515
|
-
this._value = e || "",
|
|
531
|
+
this._value = e || "", R(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
516
532
|
}
|
|
517
533
|
render() {
|
|
518
534
|
this._value = this.getAttribute("value") || this._value;
|
|
519
|
-
let e = this.getAttribute("placeholder") || "Enter Date", t =
|
|
535
|
+
let e = this.getAttribute("placeholder") || "Enter Date", t = K(this._value);
|
|
520
536
|
t && (this._viewY = t.y, this._viewM = t.m), this.innerHTML = `
|
|
521
537
|
<div class="datepicker">
|
|
522
538
|
<button type="button" class="input datepicker-trigger" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
523
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
539
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? ae(this._value) : e}</span>
|
|
524
540
|
<i class="bi bi-calendar3" aria-hidden="true"></i>
|
|
525
541
|
</button>
|
|
526
542
|
<div class="datepicker-pop" role="dialog" hidden></div>
|
|
527
|
-
</div>`, this._rendered = !0,
|
|
543
|
+
</div>`, this._rendered = !0, R(this, this._value), this._wire();
|
|
528
544
|
}
|
|
529
545
|
_syncFormValue() {
|
|
530
|
-
|
|
546
|
+
R(this, this._value);
|
|
531
547
|
}
|
|
532
548
|
_syncTrigger() {
|
|
533
549
|
let e = this.querySelector("[data-trigger-label]");
|
|
534
550
|
if (!e) return;
|
|
535
|
-
let t =
|
|
536
|
-
e.textContent = t ?
|
|
551
|
+
let t = K(this._value);
|
|
552
|
+
e.textContent = t ? ae(this._value) : this.getAttribute("placeholder") || "Enter Date", e.classList.toggle("search-select-placeholder", !t);
|
|
537
553
|
}
|
|
538
554
|
_renderMonth() {
|
|
539
|
-
let e = this.querySelector(".datepicker-pop"), t = new Date(this._viewY, this._viewM, 1).getDay(), n = new Date(this._viewY, this._viewM + 1, 0).getDate(), r =
|
|
555
|
+
let e = this.querySelector(".datepicker-pop"), t = new Date(this._viewY, this._viewM, 1).getDay(), n = new Date(this._viewY, this._viewM + 1, 0).getDate(), r = K(this._value), i = K(this.getAttribute("min")), a = K(this.getAttribute("max")), o = (e, t, n) => {
|
|
540
556
|
let r = new Date(e, t, n).getTime();
|
|
541
557
|
return !!(i && r < new Date(i.y, i.m, i.d).getTime() || a && r > new Date(a.y, a.m, a.d).getTime());
|
|
542
558
|
}, s = "";
|
|
543
559
|
for (let e = 0; e < t; e++) s += "<span class=\"datepicker-day is-outside\"></span>";
|
|
544
560
|
for (let e = 1; e <= n; e++) {
|
|
545
|
-
let t =
|
|
561
|
+
let t = G(this._viewY, this._viewM, e), n = r && r.y === this._viewY && r.m === this._viewM && r.d === e, i = o(this._viewY, this._viewM, e);
|
|
546
562
|
s += `<button type="button" class="datepicker-day${n ? " selected" : ""}" data-iso="${t}"${i ? " disabled" : ""}>${e}</button>`;
|
|
547
563
|
}
|
|
548
564
|
e.innerHTML = `
|
|
549
565
|
<div class="datepicker-head">
|
|
550
566
|
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month"><i class="bi bi-chevron-left" aria-hidden="true"></i></button>
|
|
551
|
-
<span class="datepicker-month">${
|
|
567
|
+
<span class="datepicker-month">${re[this._viewM]} ${this._viewY}</span>
|
|
552
568
|
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month"><i class="bi bi-chevron-right" aria-hidden="true"></i></button>
|
|
553
569
|
</div>
|
|
554
|
-
<div class="datepicker-weekdays">${
|
|
570
|
+
<div class="datepicker-weekdays">${ie.map((e) => `<span>${e}</span>`).join("")}</div>
|
|
555
571
|
<div class="datepicker-grid">${s}</div>
|
|
556
572
|
<div class="datepicker-foot"><button type="button" class="datepicker-link" data-clear>Clear</button></div>`;
|
|
557
573
|
}
|
|
@@ -562,7 +578,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
562
578
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector(".datepicker-pop");
|
|
563
579
|
if (!e || !t) return;
|
|
564
580
|
let n = () => !t.hidden, r = () => {
|
|
565
|
-
if (!
|
|
581
|
+
if (!K(this._value) && !this._viewNavigated) {
|
|
566
582
|
let e = /* @__PURE__ */ new Date();
|
|
567
583
|
this._viewY = e.getFullYear(), this._viewM = e.getMonth();
|
|
568
584
|
}
|
|
@@ -586,12 +602,14 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
586
602
|
n() && !this.contains(e.target) && i();
|
|
587
603
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
588
604
|
n() && e.key === "Escape" && i();
|
|
589
|
-
}, document.addEventListener("keydown", this._onDocKey), this
|
|
605
|
+
}, document.addEventListener("keydown", this._onDocKey), I(this, () => {
|
|
606
|
+
n() && this._position(e, t);
|
|
607
|
+
}), this._syncFormValue();
|
|
590
608
|
}
|
|
591
609
|
disconnectedCallback() {
|
|
592
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey);
|
|
610
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), L(this);
|
|
593
611
|
}
|
|
594
|
-
},
|
|
612
|
+
}, se = class extends HTMLElement {
|
|
595
613
|
_accessibleName() {
|
|
596
614
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
597
615
|
}
|
|
@@ -601,6 +619,9 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
601
619
|
"search-placeholder",
|
|
602
620
|
"searchable",
|
|
603
621
|
"disabled",
|
|
622
|
+
"icon",
|
|
623
|
+
"size",
|
|
624
|
+
"collapse-chips",
|
|
604
625
|
"aria-label"
|
|
605
626
|
];
|
|
606
627
|
}
|
|
@@ -623,7 +644,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
623
644
|
return this._values.slice();
|
|
624
645
|
}
|
|
625
646
|
set values(e) {
|
|
626
|
-
this._values = Array.isArray(e) ? e.map(String) : [],
|
|
647
|
+
this._values = Array.isArray(e) ? e.map(String) : [], R(this, this._values.join(",")), this._rendered && this._renderControl();
|
|
627
648
|
}
|
|
628
649
|
set options(e) {
|
|
629
650
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -637,7 +658,8 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
637
658
|
e.length && (this._declared = e.map((e) => ({
|
|
638
659
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
639
660
|
label: e.innerHTML,
|
|
640
|
-
|
|
661
|
+
icon: e.getAttribute("icon") || void 0,
|
|
662
|
+
[z]: !0,
|
|
641
663
|
selected: e.hasAttribute("selected")
|
|
642
664
|
})));
|
|
643
665
|
}
|
|
@@ -650,47 +672,68 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
650
672
|
}
|
|
651
673
|
_labelHtmlFor(e) {
|
|
652
674
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
653
|
-
return t ?
|
|
675
|
+
return t ? V(t) : B(e);
|
|
654
676
|
}
|
|
655
677
|
render() {
|
|
656
678
|
this._snapshotDeclared();
|
|
657
|
-
let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…";
|
|
658
|
-
|
|
659
|
-
<div class="search-select">
|
|
660
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
679
|
+
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" : "";
|
|
680
|
+
R(this, this._values.join(",")), this.innerHTML = `
|
|
681
|
+
<div class="search-select${i}">
|
|
682
|
+
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${q(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
683
|
+
${n ? `<i class="bi bi-${q(n)} search-select-icon" aria-hidden="true"></i>` : ""}
|
|
661
684
|
<div class="ms-chips" data-chips></div>
|
|
662
685
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
663
686
|
</div>
|
|
664
687
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
|
|
665
|
-
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
688
|
+
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${q(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
|
|
666
689
|
<div class="search-select-options"></div>
|
|
667
690
|
<div class="search-select-empty" hidden>No matches</div>
|
|
668
691
|
</div>
|
|
669
|
-
</div>`, this._rendered = !0,
|
|
692
|
+
</div>`, this._rendered = !0, R(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
|
|
670
693
|
}
|
|
671
694
|
_renderControl() {
|
|
672
695
|
let e = this.querySelector("[data-chips]");
|
|
673
696
|
if (!e) return;
|
|
674
697
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
675
698
|
if (!this._values.length) {
|
|
676
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
699
|
+
e.innerHTML = `<span class="search-select-placeholder">${B(t)}</span>`;
|
|
677
700
|
return;
|
|
678
701
|
}
|
|
679
|
-
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="${
|
|
702
|
+
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="${q(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join(""), this._collapseChips();
|
|
703
|
+
}
|
|
704
|
+
_collapseChips() {
|
|
705
|
+
let e = this.querySelector("[data-chips]");
|
|
706
|
+
if (!e || !this.hasAttribute("collapse-chips") || !this._values.length) return;
|
|
707
|
+
e.querySelector(".chip-more")?.remove();
|
|
708
|
+
let t = [...e.querySelectorAll(":scope > .chip:not(.chip-more)")];
|
|
709
|
+
for (let e of t) e.style.display = "";
|
|
710
|
+
if (!t.length) return;
|
|
711
|
+
let n = e.clientWidth, r = (e) => e.offsetLeft + e.offsetWidth;
|
|
712
|
+
if (r(t[t.length - 1]) <= n) return;
|
|
713
|
+
let i = document.createElement("span");
|
|
714
|
+
i.className = "chip chip-sm chip-more", i.textContent = `+${t.length}`, e.appendChild(i);
|
|
715
|
+
let a = i.offsetWidth + 6, o = 0;
|
|
716
|
+
for (let e of t) if (r(e) <= n - a) o += 1;
|
|
717
|
+
else break;
|
|
718
|
+
o < 1 && (o = 1);
|
|
719
|
+
for (let e = o; e < t.length; e += 1) t[e].style.display = "none";
|
|
720
|
+
i.textContent = `+${t.length - o}`;
|
|
680
721
|
}
|
|
681
722
|
_renderOptions(e) {
|
|
682
723
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
683
724
|
if (!t) return;
|
|
684
725
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
685
|
-
r && (i = i.filter((e) =>
|
|
726
|
+
r && (i = i.filter((e) => ce(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
|
|
686
727
|
let t = this._values.includes(String(e.value));
|
|
687
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
728
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${q(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${V(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
|
|
688
729
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1;
|
|
689
730
|
}
|
|
690
731
|
_wire() {
|
|
691
732
|
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");
|
|
692
733
|
if (!e || !t) return;
|
|
693
|
-
let a = () => this.hasAttribute("disabled")
|
|
734
|
+
let a = () => this.hasAttribute("disabled");
|
|
735
|
+
!this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this));
|
|
736
|
+
let o = () => F(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
|
|
694
737
|
let t = c();
|
|
695
738
|
this._active = e;
|
|
696
739
|
for (let e of s()) e.classList.remove("is-active");
|
|
@@ -700,7 +743,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
700
743
|
}, f = () => {
|
|
701
744
|
t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
|
|
702
745
|
}, p = () => {
|
|
703
|
-
|
|
746
|
+
R(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
704
747
|
}, m = (e) => {
|
|
705
748
|
let t = String(e);
|
|
706
749
|
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();
|
|
@@ -720,7 +763,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
720
763
|
}), i.addEventListener("mousemove", (e) => {
|
|
721
764
|
let t = e.target.closest(".search-select-option");
|
|
722
765
|
t && l(c().indexOf(t));
|
|
723
|
-
}), n?.addEventListener("input", () => {
|
|
766
|
+
}), i.addEventListener("mouseleave", () => l(-1)), n?.addEventListener("input", () => {
|
|
724
767
|
this._renderOptions(n.value), r && (r.hidden = !n.value), l(-1);
|
|
725
768
|
});
|
|
726
769
|
let g = (t) => {
|
|
@@ -737,14 +780,14 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
737
780
|
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
|
|
738
781
|
}), this._onDocClick = (e) => {
|
|
739
782
|
u() && !this.contains(e.target) && f();
|
|
740
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
783
|
+
}, document.addEventListener("click", this._onDocClick), I(this, () => {
|
|
741
784
|
u() && o();
|
|
742
785
|
});
|
|
743
786
|
}
|
|
744
787
|
disconnectedCallback() {
|
|
745
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
788
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), this._ro?.disconnect(), this._ro = null;
|
|
746
789
|
}
|
|
747
|
-
},
|
|
790
|
+
}, q = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), ce = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), le = /[^0-9]/g, ue = /[^0-9a-zA-Z]/g, de = class extends HTMLElement {
|
|
748
791
|
static get observedAttributes() {
|
|
749
792
|
return [
|
|
750
793
|
"value",
|
|
@@ -771,16 +814,16 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
771
814
|
return this._value ?? "";
|
|
772
815
|
}
|
|
773
816
|
set value(e) {
|
|
774
|
-
this._value = this._clean(e),
|
|
817
|
+
this._value = this._clean(e), R(this, this._value), this._paint();
|
|
775
818
|
}
|
|
776
819
|
_clean(e) {
|
|
777
|
-
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ?
|
|
820
|
+
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? ue : le, "").slice(0, this.length);
|
|
778
821
|
}
|
|
779
822
|
connectedCallback() {
|
|
780
823
|
this._rendered || this.render();
|
|
781
824
|
}
|
|
782
825
|
attributeChangedCallback(e, t, n) {
|
|
783
|
-
this._rendered && (e === "value" ? (this._value = this._clean(n),
|
|
826
|
+
this._rendered && (e === "value" ? (this._value = this._clean(n), R(this, this._value), this._paint()) : this.render());
|
|
784
827
|
}
|
|
785
828
|
render() {
|
|
786
829
|
this._value = this._clean(this.getAttribute("value") ?? this._value);
|
|
@@ -798,7 +841,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
798
841
|
spellcheck="false"
|
|
799
842
|
${n ? "disabled" : ""} />
|
|
800
843
|
<div class="otp-slots" aria-hidden="true">${r}</div>
|
|
801
|
-
</div>`, this._rendered = !0,
|
|
844
|
+
</div>`, this._rendered = !0, R(this, this._value), this._wire(), this._paint();
|
|
802
845
|
}
|
|
803
846
|
_refs() {
|
|
804
847
|
return {
|
|
@@ -820,7 +863,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
820
863
|
if (!e) return;
|
|
821
864
|
let t = (e) => {
|
|
822
865
|
let t = this._clean(e), n = t !== this._value;
|
|
823
|
-
this._value = t,
|
|
866
|
+
this._value = t, R(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
|
|
824
867
|
bubbles: !0,
|
|
825
868
|
detail: t
|
|
826
869
|
}));
|
|
@@ -840,7 +883,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
840
883
|
document.activeElement === e && this._paint();
|
|
841
884
|
});
|
|
842
885
|
}
|
|
843
|
-
},
|
|
886
|
+
}, fe = [
|
|
844
887
|
[
|
|
845
888
|
"AF",
|
|
846
889
|
"Afghanistan",
|
|
@@ -2066,11 +2109,11 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2066
2109
|
"Zimbabwe",
|
|
2067
2110
|
"263"
|
|
2068
2111
|
]
|
|
2069
|
-
],
|
|
2112
|
+
], pe = (e) => (fe.find((t) => t[0] === e) || [
|
|
2070
2113
|
"",
|
|
2071
2114
|
"",
|
|
2072
2115
|
""
|
|
2073
|
-
])[2],
|
|
2116
|
+
])[2], me = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, he = class extends HTMLElement {
|
|
2074
2117
|
static get observedAttributes() {
|
|
2075
2118
|
return [
|
|
2076
2119
|
"value",
|
|
@@ -2089,33 +2132,33 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2089
2132
|
this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
|
|
2090
2133
|
}
|
|
2091
2134
|
get value() {
|
|
2092
|
-
return `+${
|
|
2135
|
+
return `+${pe(this._country)}${this._national}`;
|
|
2093
2136
|
}
|
|
2094
2137
|
set value(e) {
|
|
2095
2138
|
this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
|
|
2096
2139
|
}
|
|
2097
2140
|
_commit() {
|
|
2098
|
-
|
|
2141
|
+
R(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2099
2142
|
}
|
|
2100
2143
|
render() {
|
|
2101
2144
|
let e = this.getAttribute("placeholder") || "Enter phone number";
|
|
2102
2145
|
this._country = this.getAttribute("country") || this._country;
|
|
2103
|
-
let t =
|
|
2146
|
+
let t = fe.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${me(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
|
|
2104
2147
|
this.innerHTML = `
|
|
2105
2148
|
<div class="phone-input-wrap">
|
|
2106
2149
|
<div class="phone-country-adornment">
|
|
2107
2150
|
<button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2108
|
-
<span class="${
|
|
2151
|
+
<span class="${me(this._country)}" data-flag aria-hidden="true"></span>
|
|
2109
2152
|
<i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
|
|
2110
|
-
<span class="phone-dial" data-dial>+${
|
|
2153
|
+
<span class="phone-dial" data-dial>+${pe(this._country)}</span>
|
|
2111
2154
|
</button>
|
|
2112
2155
|
<div class="country-dropdown-menu" role="listbox" hidden>
|
|
2113
2156
|
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon"><i class="bi bi-search" aria-hidden="true"></i></span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" /></div>
|
|
2114
2157
|
<div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
|
|
2115
2158
|
</div>
|
|
2116
2159
|
</div>
|
|
2117
|
-
<input type="tel" class="input" placeholder="${
|
|
2118
|
-
</div>`, this._rendered = !0,
|
|
2160
|
+
<input type="tel" class="input" placeholder="${ge(e)}" value="${ge(this._national)}"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
2161
|
+
</div>`, this._rendered = !0, R(this, this.value), this._wire();
|
|
2119
2162
|
}
|
|
2120
2163
|
_wire() {
|
|
2121
2164
|
let e = this.querySelector(".country-toggle"), t = this.querySelector(".country-dropdown-menu"), n = this.querySelector(".dropdown-search-input"), r = this.querySelector(".country-list-scroll"), i = this.querySelector(".country-empty"), a = this.querySelector("input[type=tel]"), o = this.querySelector("[data-flag]"), s = this.querySelector("[data-dial]");
|
|
@@ -2139,7 +2182,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2139
2182
|
}
|
|
2140
2183
|
i && (i.hidden = n > 0);
|
|
2141
2184
|
}, p = (e) => {
|
|
2142
|
-
this._country = e, this.setAttribute("country", e), o && (o.className =
|
|
2185
|
+
this._country = e, this.setAttribute("country", e), o && (o.className = me(e)), s && (s.textContent = `+${pe(e)}`);
|
|
2143
2186
|
for (let t of r.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
|
|
2144
2187
|
d(), this._commit();
|
|
2145
2188
|
};
|
|
@@ -2150,12 +2193,12 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2150
2193
|
this._national = a.value.replace(/[^0-9]/g, ""), this._commit();
|
|
2151
2194
|
}), this._onDocClick = (e) => {
|
|
2152
2195
|
c() && !this.contains(e.target) && d();
|
|
2153
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
2196
|
+
}, document.addEventListener("click", this._onDocClick), R(this, this.value);
|
|
2154
2197
|
}
|
|
2155
2198
|
disconnectedCallback() {
|
|
2156
2199
|
this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2157
2200
|
}
|
|
2158
|
-
},
|
|
2201
|
+
}, ge = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), _e = class extends HTMLElement {
|
|
2159
2202
|
static get observedAttributes() {
|
|
2160
2203
|
return [
|
|
2161
2204
|
"value",
|
|
@@ -2166,6 +2209,8 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2166
2209
|
"compact",
|
|
2167
2210
|
"size",
|
|
2168
2211
|
"clearable",
|
|
2212
|
+
"icon",
|
|
2213
|
+
"prefix",
|
|
2169
2214
|
"aria-label"
|
|
2170
2215
|
];
|
|
2171
2216
|
}
|
|
@@ -2185,7 +2230,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2185
2230
|
return this._value;
|
|
2186
2231
|
}
|
|
2187
2232
|
set value(e) {
|
|
2188
|
-
this._value = e == null ? "" : String(e),
|
|
2233
|
+
this._value = e == null ? "" : String(e), R(this, this._value), this._syncSelected(), this._syncReset();
|
|
2189
2234
|
}
|
|
2190
2235
|
set options(e) {
|
|
2191
2236
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -2199,7 +2244,8 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2199
2244
|
e.length && (this._declared = e.map((e) => ({
|
|
2200
2245
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
2201
2246
|
label: e.innerHTML,
|
|
2202
|
-
|
|
2247
|
+
icon: e.getAttribute("icon") || void 0,
|
|
2248
|
+
[z]: !0,
|
|
2203
2249
|
selected: e.hasAttribute("selected")
|
|
2204
2250
|
})));
|
|
2205
2251
|
}
|
|
@@ -2208,24 +2254,26 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2208
2254
|
}
|
|
2209
2255
|
render() {
|
|
2210
2256
|
this._snapshotDeclared();
|
|
2211
|
-
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("placeholder") || "Select...",
|
|
2212
|
-
|
|
2213
|
-
let
|
|
2257
|
+
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);
|
|
2258
|
+
l && (this._value = String(l.value)), R(this, this._value);
|
|
2259
|
+
let u = e.map((e) => {
|
|
2214
2260
|
let t = String(e.value) === String(this._value);
|
|
2215
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
2261
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${J(e.value)}" aria-selected="${t}">${V(e)}</button>`;
|
|
2216
2262
|
}).join("");
|
|
2217
2263
|
this.innerHTML = `
|
|
2218
2264
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
2219
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
2220
|
-
|
|
2265
|
+
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${J(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2266
|
+
${a ? `<i class="bi bi-${J(a)} search-select-icon" aria-hidden="true"></i>` : ""}
|
|
2267
|
+
${o ? `<span class="search-select-prefix">${B(o)}</span>` : ""}
|
|
2268
|
+
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? V(l) : B(s)}</span>
|
|
2221
2269
|
${n ? "<span class=\"search-select-reset\" role=\"button\" aria-label=\"Clear selection\" hidden><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></span>" : ""}
|
|
2222
2270
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
2223
2271
|
</button>
|
|
2224
2272
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
|
|
2225
|
-
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
2226
|
-
<div class="search-select-options">${
|
|
2273
|
+
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${J(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
|
|
2274
|
+
<div class="search-select-options">${u}<div class="search-select-empty" hidden>No matches</div></div>
|
|
2227
2275
|
</div>
|
|
2228
|
-
</div>`, this._rendered = !0,
|
|
2276
|
+
</div>`, this._rendered = !0, R(this, this._value), this._wire(), this._syncReset();
|
|
2229
2277
|
}
|
|
2230
2278
|
_refs() {
|
|
2231
2279
|
return {
|
|
@@ -2251,7 +2299,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2251
2299
|
let t = e.dataset.value === String(this._value);
|
|
2252
2300
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
2253
2301
|
}
|
|
2254
|
-
e && (e.innerHTML = t ?
|
|
2302
|
+
e && (e.innerHTML = t ? V(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
|
|
2255
2303
|
}
|
|
2256
2304
|
_syncReset() {
|
|
2257
2305
|
let { reset: e } = this._refs();
|
|
@@ -2260,7 +2308,12 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2260
2308
|
_wire() {
|
|
2261
2309
|
let e = this._refs();
|
|
2262
2310
|
if (!e.control || !e.menu) return;
|
|
2263
|
-
let t = () =>
|
|
2311
|
+
let t = () => {
|
|
2312
|
+
if (this.hasAttribute("compact")) {
|
|
2313
|
+
let t = e.control.getBoundingClientRect();
|
|
2314
|
+
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", F(e.control, e.menu);
|
|
2315
|
+
} else F(e.control, e.menu, { matchWidth: !0 });
|
|
2316
|
+
}, n = (e) => {
|
|
2264
2317
|
let t = this._visible();
|
|
2265
2318
|
this._active = e;
|
|
2266
2319
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -2302,21 +2355,21 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2302
2355
|
e.search.value = "", r(""), e.search.focus();
|
|
2303
2356
|
}), e.menu.addEventListener("keydown", c), this._onDocClick = (e) => {
|
|
2304
2357
|
i() && !this.contains(e.target) && o();
|
|
2305
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
2358
|
+
}, document.addEventListener("click", this._onDocClick), I(this, () => {
|
|
2306
2359
|
i() && t();
|
|
2307
2360
|
});
|
|
2308
2361
|
}
|
|
2309
2362
|
disconnectedCallback() {
|
|
2310
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2363
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
|
|
2311
2364
|
}
|
|
2312
|
-
},
|
|
2365
|
+
}, J = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), ve = "image/png,image/jpeg,image/webp", ye = {
|
|
2313
2366
|
"image/png": [".png"],
|
|
2314
2367
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
2315
2368
|
"image/webp": [".webp"],
|
|
2316
2369
|
"image/gif": [".gif"],
|
|
2317
2370
|
"image/svg+xml": [".svg"],
|
|
2318
2371
|
"application/pdf": [".pdf"]
|
|
2319
|
-
},
|
|
2372
|
+
}, be = {
|
|
2320
2373
|
"image/png": "PNG",
|
|
2321
2374
|
"image/jpeg": "JPG",
|
|
2322
2375
|
"image/webp": "WEBP",
|
|
@@ -2330,33 +2383,33 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2330
2383
|
".gif": "GIF",
|
|
2331
2384
|
".svg": "SVG",
|
|
2332
2385
|
".pdf": "PDF"
|
|
2333
|
-
},
|
|
2334
|
-
function
|
|
2386
|
+
}, xe = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
2387
|
+
function Se(e) {
|
|
2335
2388
|
let t = [];
|
|
2336
|
-
for (let n of
|
|
2337
|
-
let e =
|
|
2389
|
+
for (let n of xe(e)) {
|
|
2390
|
+
let e = be[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
2338
2391
|
t.includes(e) || t.push(e);
|
|
2339
2392
|
}
|
|
2340
2393
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
2341
2394
|
}
|
|
2342
|
-
function
|
|
2343
|
-
let n =
|
|
2395
|
+
function Ce(e, t) {
|
|
2396
|
+
let n = xe(t);
|
|
2344
2397
|
if (!n.length) return !0;
|
|
2345
2398
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
2346
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
2399
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (ye[e] || []).some((e) => i.endsWith(e)));
|
|
2347
2400
|
}
|
|
2348
|
-
function
|
|
2401
|
+
function we(e, t = {}) {
|
|
2349
2402
|
if (!e) return null;
|
|
2350
|
-
let n = t.accept === void 0 ?
|
|
2351
|
-
return
|
|
2403
|
+
let n = t.accept === void 0 ? ve : t.accept, r = t.maxSizeMb || 5;
|
|
2404
|
+
return Ce(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Se(n)} file.`;
|
|
2352
2405
|
}
|
|
2353
2406
|
var Y = (e, t) => {
|
|
2354
2407
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
2355
2408
|
};
|
|
2356
|
-
function
|
|
2357
|
-
Y("wui-select",
|
|
2409
|
+
function Te() {
|
|
2410
|
+
Y("wui-select", _e), Y("wui-phone", he), Y("wui-datepicker", oe), Y("wui-autocomplete", ne), Y("wui-multiselect", se), Y("wui-otp", de), Y("wui-status-icon", N);
|
|
2358
2411
|
}
|
|
2359
|
-
|
|
2412
|
+
Te();
|
|
2360
2413
|
//#endregion
|
|
2361
2414
|
//#region src/components/RequiredMark.jsx
|
|
2362
2415
|
function X() {
|
|
@@ -2368,23 +2421,23 @@ function X() {
|
|
|
2368
2421
|
}
|
|
2369
2422
|
//#endregion
|
|
2370
2423
|
//#region src/components/AppAutocomplete.jsx
|
|
2371
|
-
function
|
|
2372
|
-
T("AppAutocomplete",
|
|
2373
|
-
let
|
|
2424
|
+
function Ee({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: l, debounce: u, disabled: d = !1, size: f, name: p, label: m, error: h, hint: g, required: _ = !1, fieldClassName: v = "", ...y }) {
|
|
2425
|
+
T("AppAutocomplete", y);
|
|
2426
|
+
let b = c(null), x = typeof o == "function";
|
|
2374
2427
|
return a(() => {
|
|
2375
|
-
let e =
|
|
2376
|
-
e && !
|
|
2377
|
-
}, [i,
|
|
2378
|
-
let t =
|
|
2428
|
+
let e = b.current;
|
|
2429
|
+
e && !x && (e.options = i || []);
|
|
2430
|
+
}, [i, x]), a(() => {
|
|
2431
|
+
let t = b.current;
|
|
2379
2432
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
2380
2433
|
}, [e]), a(() => {
|
|
2381
|
-
let e =
|
|
2434
|
+
let e = b.current;
|
|
2382
2435
|
if (!e) return;
|
|
2383
2436
|
let t = () => r?.(e.value);
|
|
2384
2437
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
2385
2438
|
}, [r]), a(() => {
|
|
2386
|
-
let e =
|
|
2387
|
-
if (!e || !
|
|
2439
|
+
let e = b.current;
|
|
2440
|
+
if (!e || !x) return;
|
|
2388
2441
|
let t = !1, n = async (n) => {
|
|
2389
2442
|
e.loading = !0;
|
|
2390
2443
|
try {
|
|
@@ -2397,45 +2450,46 @@ function Ce({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
|
|
|
2397
2450
|
return e.addEventListener("search", n), () => {
|
|
2398
2451
|
t = !0, e.removeEventListener("search", n);
|
|
2399
2452
|
};
|
|
2400
|
-
}, [
|
|
2401
|
-
className: `field${
|
|
2453
|
+
}, [x, o]), /* @__PURE__ */ n("div", {
|
|
2454
|
+
className: `field${v ? ` ${v}` : ""}`,
|
|
2402
2455
|
children: [
|
|
2403
|
-
|
|
2456
|
+
m && /* @__PURE__ */ n("label", {
|
|
2404
2457
|
className: "label",
|
|
2405
|
-
htmlFor:
|
|
2406
|
-
children: [
|
|
2458
|
+
htmlFor: p,
|
|
2459
|
+
children: [m, _ && /* @__PURE__ */ t(X, {})]
|
|
2407
2460
|
}),
|
|
2408
2461
|
/* @__PURE__ */ t("wui-autocomplete", {
|
|
2409
|
-
"aria-label": typeof
|
|
2410
|
-
id:
|
|
2411
|
-
ref:
|
|
2412
|
-
name:
|
|
2462
|
+
"aria-label": typeof m == "string" ? m : void 0,
|
|
2463
|
+
id: p,
|
|
2464
|
+
ref: b,
|
|
2465
|
+
name: p,
|
|
2413
2466
|
placeholder: s,
|
|
2414
|
-
remote:
|
|
2467
|
+
remote: x ? "" : void 0,
|
|
2415
2468
|
"min-chars": l == null ? void 0 : String(l),
|
|
2416
2469
|
debounce: u == null ? void 0 : String(u),
|
|
2470
|
+
size: f || void 0,
|
|
2417
2471
|
disabled: d ? "" : void 0,
|
|
2418
|
-
required:
|
|
2472
|
+
required: _ ? "" : void 0
|
|
2419
2473
|
}),
|
|
2420
|
-
|
|
2474
|
+
h ? /* @__PURE__ */ t("div", {
|
|
2421
2475
|
className: "field-error",
|
|
2422
|
-
children: m
|
|
2423
|
-
}) : h ? /* @__PURE__ */ t("div", {
|
|
2424
|
-
className: "field-hint",
|
|
2425
2476
|
children: h
|
|
2477
|
+
}) : g ? /* @__PURE__ */ t("div", {
|
|
2478
|
+
className: "field-hint",
|
|
2479
|
+
children: g
|
|
2426
2480
|
}) : null
|
|
2427
2481
|
]
|
|
2428
2482
|
});
|
|
2429
2483
|
}
|
|
2430
2484
|
//#endregion
|
|
2431
2485
|
//#region src/components/AppAvatar.jsx
|
|
2432
|
-
function
|
|
2486
|
+
function De(e) {
|
|
2433
2487
|
let t = (e || "").trim();
|
|
2434
2488
|
if (!t) return "?";
|
|
2435
2489
|
let n = t.split(/\s+/).filter(Boolean);
|
|
2436
2490
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
2437
2491
|
}
|
|
2438
|
-
function
|
|
2492
|
+
function Oe({ name: e, src: n, className: r = "", ...i }) {
|
|
2439
2493
|
T("AppAvatar", i);
|
|
2440
2494
|
let a = ["avatar", r].filter(Boolean).join(" ");
|
|
2441
2495
|
return n ? /* @__PURE__ */ t("span", {
|
|
@@ -2449,12 +2503,12 @@ function Te({ name: e, src: n, className: r = "", ...i }) {
|
|
|
2449
2503
|
className: a,
|
|
2450
2504
|
role: "img",
|
|
2451
2505
|
"aria-label": e,
|
|
2452
|
-
children:
|
|
2506
|
+
children: De(e)
|
|
2453
2507
|
});
|
|
2454
2508
|
}
|
|
2455
2509
|
//#endregion
|
|
2456
2510
|
//#region src/components/AppBadge.jsx
|
|
2457
|
-
function
|
|
2511
|
+
function ke({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
2458
2512
|
return T("AppBadge", a), /* @__PURE__ */ t(d, {
|
|
2459
2513
|
bg: !1,
|
|
2460
2514
|
className: [
|
|
@@ -2468,14 +2522,14 @@ function Ee({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
|
2468
2522
|
}
|
|
2469
2523
|
//#endregion
|
|
2470
2524
|
//#region src/components/AppButton.jsx
|
|
2471
|
-
var
|
|
2525
|
+
var Ae = {
|
|
2472
2526
|
primary: "primary",
|
|
2473
2527
|
secondary: "secondary",
|
|
2474
2528
|
outline: "outline-primary",
|
|
2475
2529
|
ghost: "link",
|
|
2476
2530
|
danger: "danger"
|
|
2477
2531
|
};
|
|
2478
|
-
function
|
|
2532
|
+
function je(e, n) {
|
|
2479
2533
|
if (!e) return null;
|
|
2480
2534
|
let r = n === "left" ? "me-2" : "ms-2";
|
|
2481
2535
|
return typeof e == "string" ? /* @__PURE__ */ t(O, {
|
|
@@ -2492,7 +2546,7 @@ function Z({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2492
2546
|
let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
|
|
2493
2547
|
return /* @__PURE__ */ n(f, {
|
|
2494
2548
|
type: (p.as === void 0 || p.as === "button") && p.href === void 0 ? a : void 0,
|
|
2495
|
-
variant:
|
|
2549
|
+
variant: Ae[r] ?? "primary",
|
|
2496
2550
|
size: i === "md" ? void 0 : i,
|
|
2497
2551
|
disabled: s || o,
|
|
2498
2552
|
className: m || void 0,
|
|
@@ -2502,15 +2556,15 @@ function Z({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2502
2556
|
className: "spinner-border spinner-border-sm me-2",
|
|
2503
2557
|
"aria-hidden": "true"
|
|
2504
2558
|
}),
|
|
2505
|
-
!o &&
|
|
2559
|
+
!o && je(l, "left"),
|
|
2506
2560
|
e,
|
|
2507
|
-
!o &&
|
|
2561
|
+
!o && je(u, "right")
|
|
2508
2562
|
]
|
|
2509
2563
|
});
|
|
2510
2564
|
}
|
|
2511
2565
|
//#endregion
|
|
2512
2566
|
//#region src/components/AppCallout.jsx
|
|
2513
|
-
function
|
|
2567
|
+
function Me({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
2514
2568
|
return T("AppCallout", a), /* @__PURE__ */ n("div", {
|
|
2515
2569
|
className: `info-callout${i ? ` ${i}` : ""}`,
|
|
2516
2570
|
children: [r && /* @__PURE__ */ t("span", {
|
|
@@ -2524,7 +2578,7 @@ function ke({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
|
2524
2578
|
}
|
|
2525
2579
|
//#endregion
|
|
2526
2580
|
//#region src/components/AppCard.jsx
|
|
2527
|
-
function
|
|
2581
|
+
function Ne({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: m = !1, ...h }) {
|
|
2528
2582
|
T("AppCard", h);
|
|
2529
2583
|
let g = a != null || r != null || o != null || s != null;
|
|
2530
2584
|
return /* @__PURE__ */ n(p, {
|
|
@@ -2549,7 +2603,7 @@ function Ae({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2549
2603
|
}
|
|
2550
2604
|
//#endregion
|
|
2551
2605
|
//#region src/components/AppCheckbox.jsx
|
|
2552
|
-
var
|
|
2606
|
+
var Pe = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
2553
2607
|
T("AppCheckbox", s);
|
|
2554
2608
|
let l = o(), u = r || i || l;
|
|
2555
2609
|
return /* @__PURE__ */ n("div", {
|
|
@@ -2570,7 +2624,7 @@ var je = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
2570
2624
|
});
|
|
2571
2625
|
//#endregion
|
|
2572
2626
|
//#region src/components/AppChip.jsx
|
|
2573
|
-
function
|
|
2627
|
+
function Fe({ label: r, children: i, tone: a = "neutral", size: o = "md", leadingIcon: s, avatar: c, onRemove: l, onClick: u, disabled: d = !1, removeLabel: f, className: p = "", ...m }) {
|
|
2574
2628
|
T("AppChip", m);
|
|
2575
2629
|
let h = r ?? i, g = [
|
|
2576
2630
|
"chip",
|
|
@@ -2622,7 +2676,7 @@ function Me({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2622
2676
|
}
|
|
2623
2677
|
//#endregion
|
|
2624
2678
|
//#region src/components/AppChoiceCard.jsx
|
|
2625
|
-
function
|
|
2679
|
+
function Ie({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon: c, iconNode: l, iconSize: u = 18, image: d, imageAlt: f = "", children: p, title: m, description: h, checkIcon: g = "check", checkSize: _ = 12, className: v = "", ...y }) {
|
|
2626
2680
|
return T("AppChoiceCard", y), /* @__PURE__ */ n("label", {
|
|
2627
2681
|
className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
2628
2682
|
children: [
|
|
@@ -2670,7 +2724,7 @@ function Ne({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2670
2724
|
}
|
|
2671
2725
|
//#endregion
|
|
2672
2726
|
//#region src/components/AppChoiceChip.jsx
|
|
2673
|
-
function
|
|
2727
|
+
function Le({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
|
|
2674
2728
|
return T("AppChoiceChip", d), /* @__PURE__ */ n("label", {
|
|
2675
2729
|
className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
|
|
2676
2730
|
children: [
|
|
@@ -2691,7 +2745,7 @@ function Pe({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
|
|
|
2691
2745
|
}
|
|
2692
2746
|
//#endregion
|
|
2693
2747
|
//#region src/components/AppColorField.jsx
|
|
2694
|
-
function
|
|
2748
|
+
function Re({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: o, hint: s, name: c, id: l, disabled: u = !1, className: d = "", ...f }) {
|
|
2695
2749
|
T("AppColorField", f);
|
|
2696
2750
|
let p = l || c;
|
|
2697
2751
|
return /* @__PURE__ */ n("div", {
|
|
@@ -2739,7 +2793,7 @@ function Fe({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
2739
2793
|
}
|
|
2740
2794
|
//#endregion
|
|
2741
2795
|
//#region src/components/AppCompareTable.jsx
|
|
2742
|
-
function
|
|
2796
|
+
function ze({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
|
|
2743
2797
|
T("AppCompareTable", o);
|
|
2744
2798
|
let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
|
|
2745
2799
|
className: "compare-yes",
|
|
@@ -2822,29 +2876,29 @@ function Q({ label: e, children: r, ...i }) {
|
|
|
2822
2876
|
}
|
|
2823
2877
|
//#endregion
|
|
2824
2878
|
//#region src/components/AppInput.jsx
|
|
2825
|
-
var
|
|
2879
|
+
var Be = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: u = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: h, rightIconLabel: g, unit: _, id: v, name: y, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: E, prefix: D, suffix: k, floatingLabel: A = !1, ...j }, M) {
|
|
2826
2880
|
T("AppInput", j);
|
|
2827
|
-
let [N, P] = l(!1), F = v || y, I = u === "password", L = I && N ? "text" : u,
|
|
2828
|
-
|
|
2829
|
-
},
|
|
2830
|
-
|
|
2831
|
-
},
|
|
2881
|
+
let [N, P] = l(!1), F = v || y, I = u === "password", L = I && N ? "text" : u, ee = c(null), R = (e) => {
|
|
2882
|
+
ee.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
|
|
2883
|
+
}, z = String(j.value ?? j.defaultValue ?? ""), [B, te] = l(() => !!z), [V, ne] = l(() => z.length), H = C && !S, U = C || w, re = (e) => {
|
|
2884
|
+
te(!!e.target.value), ne(e.target.value.length), j.onInput?.(e);
|
|
2885
|
+
}, ie = H ? /* @__PURE__ */ t("button", {
|
|
2832
2886
|
type: "button",
|
|
2833
2887
|
className: "input-clear",
|
|
2834
2888
|
onClick: () => {
|
|
2835
|
-
let e =
|
|
2889
|
+
let e = ee.current;
|
|
2836
2890
|
if (!e) return;
|
|
2837
2891
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
2838
|
-
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })),
|
|
2892
|
+
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), te(!1), e.focus();
|
|
2839
2893
|
},
|
|
2840
2894
|
"aria-label": "Clear",
|
|
2841
2895
|
tabIndex: -1,
|
|
2842
|
-
hidden: !
|
|
2896
|
+
hidden: !B,
|
|
2843
2897
|
children: /* @__PURE__ */ t(O, {
|
|
2844
2898
|
name: "x",
|
|
2845
2899
|
size: 16
|
|
2846
2900
|
})
|
|
2847
|
-
}) : null,
|
|
2901
|
+
}) : null, W = [
|
|
2848
2902
|
"input",
|
|
2849
2903
|
d === "sm" ? "input-sm" : "",
|
|
2850
2904
|
d === "lg" ? "input-lg" : "",
|
|
@@ -2853,23 +2907,23 @@ var Le = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2853
2907
|
_ ? "num-input" : "",
|
|
2854
2908
|
C ? "has-clear" : "",
|
|
2855
2909
|
b
|
|
2856
|
-
].filter(Boolean).join(" "),
|
|
2910
|
+
].filter(Boolean).join(" "), G = /* @__PURE__ */ t(m.Control, {
|
|
2857
2911
|
id: F,
|
|
2858
2912
|
name: y,
|
|
2859
2913
|
type: L,
|
|
2860
|
-
className:
|
|
2914
|
+
className: W,
|
|
2861
2915
|
disabled: S,
|
|
2862
2916
|
required: r,
|
|
2863
2917
|
"aria-invalid": i ? "true" : "false",
|
|
2864
2918
|
maxLength: E,
|
|
2865
2919
|
...j,
|
|
2866
2920
|
placeholder: A ? " " : j.placeholder,
|
|
2867
|
-
ref:
|
|
2868
|
-
onInput:
|
|
2869
|
-
}),
|
|
2870
|
-
return
|
|
2921
|
+
ref: R,
|
|
2922
|
+
onInput: U ? re : j.onInput
|
|
2923
|
+
}), K;
|
|
2924
|
+
return K = A && e ? /* @__PURE__ */ n("div", {
|
|
2871
2925
|
className: "field-float",
|
|
2872
|
-
children: [
|
|
2926
|
+
children: [G, /* @__PURE__ */ n("label", {
|
|
2873
2927
|
className: "float-label",
|
|
2874
2928
|
htmlFor: F,
|
|
2875
2929
|
children: [e, r && /* @__PURE__ */ t(X, {})]
|
|
@@ -2881,7 +2935,7 @@ var Le = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2881
2935
|
className: "affix affix-pre",
|
|
2882
2936
|
children: D
|
|
2883
2937
|
}),
|
|
2884
|
-
|
|
2938
|
+
G,
|
|
2885
2939
|
k != null && /* @__PURE__ */ t("span", {
|
|
2886
2940
|
className: "affix affix-suf",
|
|
2887
2941
|
children: k
|
|
@@ -2889,13 +2943,13 @@ var Le = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2889
2943
|
]
|
|
2890
2944
|
}) : _ ? /* @__PURE__ */ n("div", {
|
|
2891
2945
|
className: "input-with-unit",
|
|
2892
|
-
children: [
|
|
2946
|
+
children: [G, /* @__PURE__ */ t("span", {
|
|
2893
2947
|
className: "unit",
|
|
2894
2948
|
children: _
|
|
2895
2949
|
})]
|
|
2896
2950
|
}) : I ? /* @__PURE__ */ n("div", {
|
|
2897
2951
|
className: "input-wrap",
|
|
2898
|
-
children: [
|
|
2952
|
+
children: [G, /* @__PURE__ */ t("button", {
|
|
2899
2953
|
type: "button",
|
|
2900
2954
|
className: "pw-toggle",
|
|
2901
2955
|
onClick: () => P((e) => !e),
|
|
@@ -2908,7 +2962,7 @@ var Le = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2908
2962
|
})]
|
|
2909
2963
|
}) : p ? /* @__PURE__ */ n("div", {
|
|
2910
2964
|
className: "input-wrap",
|
|
2911
|
-
children: [
|
|
2965
|
+
children: [G, /* @__PURE__ */ t("button", {
|
|
2912
2966
|
type: "button",
|
|
2913
2967
|
className: "pw-toggle",
|
|
2914
2968
|
onClick: h,
|
|
@@ -2930,8 +2984,8 @@ var Le = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2930
2984
|
size: 16
|
|
2931
2985
|
})
|
|
2932
2986
|
}),
|
|
2933
|
-
|
|
2934
|
-
|
|
2987
|
+
G,
|
|
2988
|
+
ie
|
|
2935
2989
|
]
|
|
2936
2990
|
}) : f ? /* @__PURE__ */ n("div", {
|
|
2937
2991
|
className: "input-icon",
|
|
@@ -2941,8 +2995,8 @@ var Le = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2941
2995
|
name: f,
|
|
2942
2996
|
size: 16
|
|
2943
2997
|
})
|
|
2944
|
-
}),
|
|
2945
|
-
}) :
|
|
2998
|
+
}), G]
|
|
2999
|
+
}) : G, /* @__PURE__ */ n(m.Group, {
|
|
2946
3000
|
className: `field${x ? ` ${x}` : ""}`,
|
|
2947
3001
|
children: [
|
|
2948
3002
|
e && !A && /* @__PURE__ */ n(m.Label, {
|
|
@@ -2957,7 +3011,7 @@ var Le = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2957
3011
|
})
|
|
2958
3012
|
]
|
|
2959
3013
|
}),
|
|
2960
|
-
|
|
3014
|
+
K,
|
|
2961
3015
|
i ? /* @__PURE__ */ t("div", {
|
|
2962
3016
|
className: "field-error",
|
|
2963
3017
|
children: i
|
|
@@ -2966,20 +3020,20 @@ var Le = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2966
3020
|
children: a
|
|
2967
3021
|
}) : null,
|
|
2968
3022
|
w && /* @__PURE__ */ n("div", {
|
|
2969
|
-
className: `field-count${E &&
|
|
2970
|
-
children: [
|
|
3023
|
+
className: `field-count${E && V >= E ? " at-limit" : ""}`,
|
|
3024
|
+
children: [V, E ? ` / ${E}` : ""]
|
|
2971
3025
|
})
|
|
2972
3026
|
]
|
|
2973
3027
|
});
|
|
2974
|
-
}),
|
|
2975
|
-
function
|
|
3028
|
+
}), Ve = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
|
|
3029
|
+
function He({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer: l, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, className: h = "", children: _, ...v }) {
|
|
2976
3030
|
T("AppModal", v);
|
|
2977
3031
|
let y = c(null);
|
|
2978
3032
|
a(() => {
|
|
2979
3033
|
if (!e) return;
|
|
2980
3034
|
let t = y.current?.closest(".modal-content");
|
|
2981
3035
|
if (!t) return;
|
|
2982
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
3036
|
+
let n = () => Array.from(t.querySelectorAll(Ve));
|
|
2983
3037
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
|
|
2984
3038
|
}, [e]);
|
|
2985
3039
|
let b = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
|
|
@@ -3064,7 +3118,7 @@ var $ = (e) => function({ size: n = 72 }) {
|
|
|
3064
3118
|
tone: e,
|
|
3065
3119
|
size: n
|
|
3066
3120
|
});
|
|
3067
|
-
},
|
|
3121
|
+
}, Ue = {
|
|
3068
3122
|
success: $("success"),
|
|
3069
3123
|
error: $("error"),
|
|
3070
3124
|
warning: $("warning"),
|
|
@@ -3073,14 +3127,14 @@ var $ = (e) => function({ size: n = 72 }) {
|
|
|
3073
3127
|
};
|
|
3074
3128
|
//#endregion
|
|
3075
3129
|
//#region src/components/AppConfirmDialog.jsx
|
|
3076
|
-
function
|
|
3130
|
+
function We({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: u = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, ...h }) {
|
|
3077
3131
|
T("AppConfirmDialog", h);
|
|
3078
3132
|
let [g, _] = l("");
|
|
3079
3133
|
if (a(() => {
|
|
3080
3134
|
r || _("");
|
|
3081
3135
|
}, [r]), !r) return null;
|
|
3082
|
-
let v = !!f && g.trim() !== f, y =
|
|
3083
|
-
return /* @__PURE__ */ t(
|
|
3136
|
+
let v = !!f && g.trim() !== f, y = Ue[d || (u ? "delete" : "info")];
|
|
3137
|
+
return /* @__PURE__ */ t(He, {
|
|
3084
3138
|
open: r,
|
|
3085
3139
|
hideHeader: !0,
|
|
3086
3140
|
title: i,
|
|
@@ -3116,7 +3170,7 @@ function Ve({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
3116
3170
|
className: "lx-confirm-msg",
|
|
3117
3171
|
children: o
|
|
3118
3172
|
}),
|
|
3119
|
-
f && /* @__PURE__ */ t(
|
|
3173
|
+
f && /* @__PURE__ */ t(Be, {
|
|
3120
3174
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
3121
3175
|
label: /* @__PURE__ */ n(e, { children: [
|
|
3122
3176
|
"Type ",
|
|
@@ -3133,7 +3187,7 @@ function Ve({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
3133
3187
|
}
|
|
3134
3188
|
//#endregion
|
|
3135
3189
|
//#region src/components/AppSkeleton.jsx
|
|
3136
|
-
function
|
|
3190
|
+
function Ge({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
|
|
3137
3191
|
return T("AppSkeleton", o), /* @__PURE__ */ t("span", {
|
|
3138
3192
|
className: `skeleton${i ? ` ${i}` : ""}`,
|
|
3139
3193
|
"aria-hidden": "true",
|
|
@@ -3145,7 +3199,7 @@ function He({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
|
|
|
3145
3199
|
}
|
|
3146
3200
|
});
|
|
3147
3201
|
}
|
|
3148
|
-
var
|
|
3202
|
+
var Ke = [
|
|
3149
3203
|
"r0",
|
|
3150
3204
|
"r1",
|
|
3151
3205
|
"r2",
|
|
@@ -3154,7 +3208,7 @@ var Ue = [
|
|
|
3154
3208
|
"r5",
|
|
3155
3209
|
"r6",
|
|
3156
3210
|
"r7"
|
|
3157
|
-
],
|
|
3211
|
+
], qe = [
|
|
3158
3212
|
"c0",
|
|
3159
3213
|
"c1",
|
|
3160
3214
|
"c2",
|
|
@@ -3164,56 +3218,61 @@ var Ue = [
|
|
|
3164
3218
|
"c6",
|
|
3165
3219
|
"c7"
|
|
3166
3220
|
];
|
|
3167
|
-
function
|
|
3168
|
-
return
|
|
3221
|
+
function Je({ rows: e = 4, cols: n = 5 }) {
|
|
3222
|
+
return Ke.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: qe.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(Ge, {
|
|
3169
3223
|
width: n === 0 ? "70%" : "50%",
|
|
3170
3224
|
height: 12
|
|
3171
3225
|
}) }, e)) }, e));
|
|
3172
3226
|
}
|
|
3173
3227
|
//#endregion
|
|
3174
3228
|
//#region src/components/AppSelectMini.jsx
|
|
3175
|
-
function
|
|
3176
|
-
T("AppSelectMini",
|
|
3177
|
-
let
|
|
3229
|
+
function Ye({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: l, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
|
|
3230
|
+
T("AppSelectMini", h);
|
|
3231
|
+
let g = c(null);
|
|
3178
3232
|
return a(() => {
|
|
3179
|
-
|
|
3233
|
+
g.current && (g.current.options = r.map((e) => ({
|
|
3180
3234
|
value: e.value,
|
|
3181
|
-
label: e.label ?? e.text ?? ""
|
|
3235
|
+
label: e.label ?? e.text ?? "",
|
|
3236
|
+
icon: e.icon
|
|
3182
3237
|
})));
|
|
3183
3238
|
}, [r]), a(() => {
|
|
3184
|
-
let t =
|
|
3239
|
+
let t = g.current;
|
|
3185
3240
|
t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
|
|
3186
3241
|
}, [e]), a(() => {
|
|
3187
|
-
let e =
|
|
3242
|
+
let e = g.current;
|
|
3188
3243
|
if (!e) return;
|
|
3189
3244
|
let t = () => n?.(e.value);
|
|
3190
3245
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
3191
|
-
}, [n]),
|
|
3192
|
-
|
|
3246
|
+
}, [n]), a(() => {
|
|
3247
|
+
let e = g.current;
|
|
3248
|
+
if (e) for (let [t, n] of [["icon", f], ["prefix", p]]) n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
3249
|
+
}, [f, p]), /* @__PURE__ */ t("wui-select", {
|
|
3250
|
+
ref: g,
|
|
3193
3251
|
name: o,
|
|
3194
3252
|
compact: "",
|
|
3195
3253
|
id: l,
|
|
3196
3254
|
placeholder: i,
|
|
3197
3255
|
"aria-label": s,
|
|
3256
|
+
size: d || void 0,
|
|
3198
3257
|
disabled: u ? "" : void 0,
|
|
3199
|
-
className:
|
|
3258
|
+
className: m
|
|
3200
3259
|
});
|
|
3201
3260
|
}
|
|
3202
3261
|
//#endregion
|
|
3203
3262
|
//#region src/components/AppTablePagination.jsx
|
|
3204
|
-
var
|
|
3263
|
+
var Xe = [
|
|
3205
3264
|
5,
|
|
3206
3265
|
10,
|
|
3207
3266
|
25,
|
|
3208
3267
|
50
|
|
3209
3268
|
];
|
|
3210
|
-
function
|
|
3269
|
+
function Ze({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = Xe, ...d }) {
|
|
3211
3270
|
return T("AppTablePagination", d), /* @__PURE__ */ n("div", {
|
|
3212
3271
|
className: "table-pagination",
|
|
3213
3272
|
children: [
|
|
3214
3273
|
/* @__PURE__ */ n("span", {
|
|
3215
3274
|
className: "tpg-rows",
|
|
3216
|
-
children: ["Rows per page:", /* @__PURE__ */ t(
|
|
3275
|
+
children: ["Rows per page:", /* @__PURE__ */ t(Ye, {
|
|
3217
3276
|
value: i,
|
|
3218
3277
|
onChange: (e) => l(Number(e)),
|
|
3219
3278
|
ariaLabel: "Rows per page",
|
|
@@ -3262,13 +3321,13 @@ function Je({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
|
|
|
3262
3321
|
}
|
|
3263
3322
|
//#endregion
|
|
3264
3323
|
//#region src/components/AppDataTable.jsx
|
|
3265
|
-
function
|
|
3324
|
+
function Qe(e) {
|
|
3266
3325
|
return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
3267
3326
|
}
|
|
3268
|
-
function
|
|
3327
|
+
function $e(e) {
|
|
3269
3328
|
return e == null || e === "" ? "—" : e;
|
|
3270
3329
|
}
|
|
3271
|
-
function
|
|
3330
|
+
function et({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s, loading: c = !1, skeletonRows: l = 5, empty: u = "No records found.", emptyFiltered: d, sourceCount: f, rowActions: p, rowActionsLabel: m, pagination: h, ariaLabel: g, className: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, ...S }) {
|
|
3272
3331
|
T("AppDataTable", S);
|
|
3273
3332
|
let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t) => e + +!!y?.has(a(t)), 0) : 0, E = v && i && i.length > 0 && w === i.length, D = w > 0 && !E, k = (e) => {
|
|
3274
3333
|
e && (e.indeterminate = D);
|
|
@@ -3293,7 +3352,7 @@ function Ze({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3293
3352
|
r.map((e, r) => {
|
|
3294
3353
|
let i = !!(e.sortable && s), a = o && o.key === e.key;
|
|
3295
3354
|
return /* @__PURE__ */ n("th", {
|
|
3296
|
-
className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") +
|
|
3355
|
+
className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") + Qe(e.align),
|
|
3297
3356
|
style: e.width ? { width: e.width } : void 0,
|
|
3298
3357
|
tabIndex: i ? 0 : void 0,
|
|
3299
3358
|
"aria-sort": a ? o.dir === "asc" ? "ascending" : "descending" : i ? "none" : void 0,
|
|
@@ -3320,7 +3379,7 @@ function Ze({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3320
3379
|
children: "Actions"
|
|
3321
3380
|
})
|
|
3322
3381
|
}))
|
|
3323
|
-
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(
|
|
3382
|
+
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(Je, {
|
|
3324
3383
|
rows: l,
|
|
3325
3384
|
cols: C
|
|
3326
3385
|
}) : i?.length ? i.map((e) => {
|
|
@@ -3339,8 +3398,8 @@ function Ze({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3339
3398
|
})
|
|
3340
3399
|
}),
|
|
3341
3400
|
r.map((n, r) => /* @__PURE__ */ t("td", {
|
|
3342
|
-
className: (r === 0 ? "lx-name-cell " : "") +
|
|
3343
|
-
children: n.render ? n.render(e) :
|
|
3401
|
+
className: (r === 0 ? "lx-name-cell " : "") + Qe(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
|
|
3402
|
+
children: n.render ? n.render(e) : $e(e[n.key])
|
|
3344
3403
|
}, n.key)),
|
|
3345
3404
|
p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
|
|
3346
3405
|
className: "u-row-actions",
|
|
@@ -3354,7 +3413,7 @@ function Ze({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3354
3413
|
children: A
|
|
3355
3414
|
}) }) })]
|
|
3356
3415
|
})
|
|
3357
|
-
}), h && !c && h.total > 0 && /* @__PURE__ */ t(
|
|
3416
|
+
}), h && !c && h.total > 0 && /* @__PURE__ */ t(Ze, {
|
|
3358
3417
|
page: h.page,
|
|
3359
3418
|
totalPages: h.totalPages,
|
|
3360
3419
|
pageSize: h.pageSize,
|
|
@@ -3367,7 +3426,7 @@ function Ze({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3367
3426
|
}
|
|
3368
3427
|
//#endregion
|
|
3369
3428
|
//#region src/components/AppDatePicker.jsx
|
|
3370
|
-
function
|
|
3429
|
+
function tt({ value: e, onChange: r, label: i, required: s = !1, hint: l, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, id: g, ariaLabel: _, className: v = "", ...y }) {
|
|
3371
3430
|
T("AppDatePicker", y);
|
|
3372
3431
|
let b = c(null), x = o(), S = g || d || x;
|
|
3373
3432
|
a(() => {
|
|
@@ -3417,7 +3476,7 @@ function Qe({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
|
|
|
3417
3476
|
}
|
|
3418
3477
|
//#endregion
|
|
3419
3478
|
//#region src/components/AppDropdown.jsx
|
|
3420
|
-
var
|
|
3479
|
+
var nt = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
|
|
3421
3480
|
return /* @__PURE__ */ t("button", {
|
|
3422
3481
|
ref: l,
|
|
3423
3482
|
type: "button",
|
|
@@ -3431,11 +3490,11 @@ var $e = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
|
|
|
3431
3490
|
})
|
|
3432
3491
|
});
|
|
3433
3492
|
});
|
|
3434
|
-
function
|
|
3493
|
+
function rt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
|
|
3435
3494
|
return T("AppDropdown", d), /* @__PURE__ */ n(_, {
|
|
3436
3495
|
align: s,
|
|
3437
3496
|
children: [/* @__PURE__ */ t(_.Toggle, {
|
|
3438
|
-
as:
|
|
3497
|
+
as: nt,
|
|
3439
3498
|
icon: e,
|
|
3440
3499
|
iconSize: r,
|
|
3441
3500
|
btnClassName: i,
|
|
@@ -3473,7 +3532,7 @@ function et({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3473
3532
|
}
|
|
3474
3533
|
//#endregion
|
|
3475
3534
|
//#region src/components/AppEmptyState.jsx
|
|
3476
|
-
function
|
|
3535
|
+
function it({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
|
|
3477
3536
|
return T("AppEmptyState", u), /* @__PURE__ */ n("div", {
|
|
3478
3537
|
className: [
|
|
3479
3538
|
"empty-state",
|
|
@@ -3506,7 +3565,7 @@ function tt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
3506
3565
|
}
|
|
3507
3566
|
//#endregion
|
|
3508
3567
|
//#region src/components/AppFileAttachment.jsx
|
|
3509
|
-
function
|
|
3568
|
+
function at({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u = ve, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
|
|
3510
3569
|
T("AppFileAttachment", h);
|
|
3511
3570
|
let g = o(), _ = m || s || g, [v, y] = l(null), [b, x] = l("");
|
|
3512
3571
|
a(() => {
|
|
@@ -3519,7 +3578,7 @@ function nt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
|
|
|
3519
3578
|
function S(e) {
|
|
3520
3579
|
let t = e.target.files?.[0];
|
|
3521
3580
|
if (e.target.value = "", !t) return;
|
|
3522
|
-
let n =
|
|
3581
|
+
let n = we(t, {
|
|
3523
3582
|
accept: u,
|
|
3524
3583
|
maxSizeMb: d
|
|
3525
3584
|
});
|
|
@@ -3618,22 +3677,22 @@ function nt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
|
|
|
3618
3677
|
}
|
|
3619
3678
|
//#endregion
|
|
3620
3679
|
//#region src/components/toast.js
|
|
3621
|
-
var
|
|
3680
|
+
var ot = /* @__PURE__ */ new Set([
|
|
3622
3681
|
"success",
|
|
3623
3682
|
"info",
|
|
3624
3683
|
"warning",
|
|
3625
3684
|
"error"
|
|
3626
3685
|
]);
|
|
3627
|
-
function
|
|
3628
|
-
let n =
|
|
3686
|
+
function st(e, t = "success") {
|
|
3687
|
+
let n = ot.has(t) ? t : "success";
|
|
3629
3688
|
v[n](e, { toastId: `${n}:${e}` });
|
|
3630
3689
|
}
|
|
3631
|
-
function
|
|
3690
|
+
function ct(e) {
|
|
3632
3691
|
v.error(e, { toastId: `error:${e}` });
|
|
3633
3692
|
}
|
|
3634
3693
|
//#endregion
|
|
3635
3694
|
//#region src/components/AppFilePicker.jsx
|
|
3636
|
-
function
|
|
3695
|
+
function lt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p, ...m }) {
|
|
3637
3696
|
T("AppFilePicker", m);
|
|
3638
3697
|
let [h, g] = l(null), [_, v] = l(!1), y = c(null), b = o(), x = i || b;
|
|
3639
3698
|
a(() => {
|
|
@@ -3644,11 +3703,11 @@ function ot({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
|
|
|
3644
3703
|
g(null);
|
|
3645
3704
|
}, [r]);
|
|
3646
3705
|
let S = r?.url || h, C = (e) => {
|
|
3647
|
-
let t =
|
|
3706
|
+
let t = we(e, {
|
|
3648
3707
|
accept: u,
|
|
3649
3708
|
maxSizeMb: d
|
|
3650
3709
|
});
|
|
3651
|
-
return t ? (
|
|
3710
|
+
return t ? (st(t, "error"), !1) : (s(e), !0);
|
|
3652
3711
|
}, w = (e) => {
|
|
3653
3712
|
let t = e.target.files?.[0] || null;
|
|
3654
3713
|
t && (C(t) || (e.target.value = ""));
|
|
@@ -3759,7 +3818,7 @@ function ot({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
|
|
|
3759
3818
|
}
|
|
3760
3819
|
//#endregion
|
|
3761
3820
|
//#region src/components/AppInfoList.jsx
|
|
3762
|
-
function
|
|
3821
|
+
function ut({ items: r = [], className: i = "", ...a }) {
|
|
3763
3822
|
return T("AppInfoList", a), /* @__PURE__ */ t("div", {
|
|
3764
3823
|
className: `info-list${i ? ` ${i}` : ""}`,
|
|
3765
3824
|
children: r.map((r, i) => {
|
|
@@ -3792,7 +3851,7 @@ function st({ items: r = [], className: i = "", ...a }) {
|
|
|
3792
3851
|
}
|
|
3793
3852
|
//#endregion
|
|
3794
3853
|
//#region src/components/AppKpiTile.jsx
|
|
3795
|
-
function
|
|
3854
|
+
function dt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
|
|
3796
3855
|
T("AppKpiTile", l);
|
|
3797
3856
|
let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
|
|
3798
3857
|
return /* @__PURE__ */ n("div", {
|
|
@@ -3825,7 +3884,7 @@ function ct({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
|
|
|
3825
3884
|
}
|
|
3826
3885
|
//#endregion
|
|
3827
3886
|
//#region src/components/AppLogoPicker.jsx
|
|
3828
|
-
function
|
|
3887
|
+
function ft({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept: l = "image/png,image/jpeg", maxSizeMb: u = 5, overlayIcon: d = "image", overlayLabel: f = "Update photo", ariaLabel: p = "Upload photo", ...m }) {
|
|
3829
3888
|
T("AppLogoPicker", m);
|
|
3830
3889
|
let h = c(null);
|
|
3831
3890
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
|
|
@@ -3871,12 +3930,12 @@ function lt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
|
|
|
3871
3930
|
onChange: (e) => {
|
|
3872
3931
|
let t = e.target.files?.[0];
|
|
3873
3932
|
if (e.target.value = "", !t) return;
|
|
3874
|
-
let n =
|
|
3933
|
+
let n = we(t, {
|
|
3875
3934
|
accept: l,
|
|
3876
3935
|
maxSizeMb: u
|
|
3877
3936
|
});
|
|
3878
3937
|
if (n) {
|
|
3879
|
-
|
|
3938
|
+
st(n, "error");
|
|
3880
3939
|
return;
|
|
3881
3940
|
}
|
|
3882
3941
|
o(t);
|
|
@@ -3886,54 +3945,57 @@ function lt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
|
|
|
3886
3945
|
}
|
|
3887
3946
|
//#endregion
|
|
3888
3947
|
//#region src/components/AppMultiSelect.jsx
|
|
3889
|
-
function
|
|
3890
|
-
T("AppMultiSelect",
|
|
3891
|
-
let
|
|
3948
|
+
function pt({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: l = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
|
|
3949
|
+
T("AppMultiSelect", b);
|
|
3950
|
+
let x = c(null);
|
|
3892
3951
|
return a(() => {
|
|
3893
|
-
let e =
|
|
3952
|
+
let e = x.current;
|
|
3894
3953
|
e && (e.options = i || []);
|
|
3895
3954
|
}, [i]), a(() => {
|
|
3896
|
-
let t =
|
|
3955
|
+
let t = x.current;
|
|
3897
3956
|
if (!t) return;
|
|
3898
3957
|
let n = e || [], r = t.values || [];
|
|
3899
3958
|
n.join(",") !== r.join(",") && (t.values = n);
|
|
3900
3959
|
}, [e]), a(() => {
|
|
3901
|
-
let e =
|
|
3960
|
+
let e = x.current;
|
|
3902
3961
|
if (!e) return;
|
|
3903
3962
|
let t = () => r?.(e.values);
|
|
3904
3963
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
3905
3964
|
}, [r]), /* @__PURE__ */ n("div", {
|
|
3906
|
-
className: `field${
|
|
3965
|
+
className: `field${y ? ` ${y}` : ""}`,
|
|
3907
3966
|
children: [
|
|
3908
|
-
|
|
3967
|
+
h && /* @__PURE__ */ n("label", {
|
|
3909
3968
|
className: "label",
|
|
3910
|
-
htmlFor:
|
|
3911
|
-
children: [
|
|
3969
|
+
htmlFor: m,
|
|
3970
|
+
children: [h, v && /* @__PURE__ */ t(X, {})]
|
|
3912
3971
|
}),
|
|
3913
3972
|
/* @__PURE__ */ t("wui-multiselect", {
|
|
3914
|
-
"aria-label": typeof
|
|
3915
|
-
id:
|
|
3916
|
-
ref:
|
|
3917
|
-
name:
|
|
3973
|
+
"aria-label": typeof h == "string" ? h : void 0,
|
|
3974
|
+
id: m,
|
|
3975
|
+
ref: x,
|
|
3976
|
+
name: m,
|
|
3918
3977
|
placeholder: o,
|
|
3919
3978
|
"search-placeholder": s,
|
|
3979
|
+
icon: d || void 0,
|
|
3980
|
+
size: f || void 0,
|
|
3981
|
+
"collapse-chips": p ? "" : void 0,
|
|
3920
3982
|
searchable: l ? "" : void 0,
|
|
3921
3983
|
disabled: u ? "" : void 0,
|
|
3922
|
-
required:
|
|
3984
|
+
required: v ? "" : void 0
|
|
3923
3985
|
}),
|
|
3924
|
-
|
|
3986
|
+
g ? /* @__PURE__ */ t("div", {
|
|
3925
3987
|
className: "field-error",
|
|
3926
|
-
children:
|
|
3927
|
-
}) :
|
|
3988
|
+
children: g
|
|
3989
|
+
}) : _ ? /* @__PURE__ */ t("div", {
|
|
3928
3990
|
className: "field-hint",
|
|
3929
|
-
children:
|
|
3991
|
+
children: _
|
|
3930
3992
|
}) : null
|
|
3931
3993
|
]
|
|
3932
3994
|
});
|
|
3933
3995
|
}
|
|
3934
3996
|
//#endregion
|
|
3935
3997
|
//#region src/components/AppOtpInput.jsx
|
|
3936
|
-
var
|
|
3998
|
+
var mt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode: l = "numeric", label: u, required: d = !1, hint: f, error: p, disabled: m = !1, name: h, id: g, className: _ = "", ...v }, y) {
|
|
3937
3999
|
T("AppOtpInput", v);
|
|
3938
4000
|
let b = c(null), x = o(), S = g || h || x, C = (e) => {
|
|
3939
4001
|
b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
|
|
@@ -3986,7 +4048,7 @@ var dt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
|
|
|
3986
4048
|
});
|
|
3987
4049
|
//#endregion
|
|
3988
4050
|
//#region src/components/AppPageHeader.jsx
|
|
3989
|
-
function
|
|
4051
|
+
function ht({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
3990
4052
|
return T("AppPageHeader", o), /* @__PURE__ */ n("div", {
|
|
3991
4053
|
className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
|
|
3992
4054
|
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
|
|
@@ -4003,7 +4065,7 @@ function ft({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
|
4003
4065
|
}
|
|
4004
4066
|
//#endregion
|
|
4005
4067
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
4006
|
-
function
|
|
4068
|
+
function gt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: l = "Phone number", placeholder: u = "Enter phone number", required: d = !1, error: f, fieldClassName: p = "", ...m }) {
|
|
4007
4069
|
T("AppPhoneNumberInput", m);
|
|
4008
4070
|
let h = c(null);
|
|
4009
4071
|
return a(() => {
|
|
@@ -4038,7 +4100,7 @@ function pt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
|
|
|
4038
4100
|
}
|
|
4039
4101
|
//#endregion
|
|
4040
4102
|
//#region src/components/AppPricingCard.jsx
|
|
4041
|
-
function
|
|
4103
|
+
function _t({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "", ...f }) {
|
|
4042
4104
|
return T("AppPricingCard", f), /* @__PURE__ */ n("div", {
|
|
4043
4105
|
className: [
|
|
4044
4106
|
"plan-card",
|
|
@@ -4091,9 +4153,9 @@ function mt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
|
|
|
4091
4153
|
}
|
|
4092
4154
|
//#endregion
|
|
4093
4155
|
//#region src/components/AppRadio.jsx
|
|
4094
|
-
var
|
|
4156
|
+
var vt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
4095
4157
|
T("AppRadio", s);
|
|
4096
|
-
let l = o(), u = r ||
|
|
4158
|
+
let l = o(), u = r || l;
|
|
4097
4159
|
return /* @__PURE__ */ n("div", {
|
|
4098
4160
|
className: `form-check${a ? ` ${a}` : ""}`,
|
|
4099
4161
|
children: [/* @__PURE__ */ t("input", {
|
|
@@ -4112,7 +4174,7 @@ var ht = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
4112
4174
|
});
|
|
4113
4175
|
//#endregion
|
|
4114
4176
|
//#region src/components/AppRepeater.jsx
|
|
4115
|
-
function
|
|
4177
|
+
function yt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "Add another", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
|
|
4116
4178
|
T("AppRepeater", p);
|
|
4117
4179
|
let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
|
|
4118
4180
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4156,7 +4218,7 @@ function gt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
4156
4218
|
}
|
|
4157
4219
|
//#endregion
|
|
4158
4220
|
//#region src/components/AppResourceCard.jsx
|
|
4159
|
-
function
|
|
4221
|
+
function bt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
|
|
4160
4222
|
T("AppResourceCard", u);
|
|
4161
4223
|
let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
4162
4224
|
className: "res-card-icon",
|
|
@@ -4188,14 +4250,20 @@ function _t({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
|
|
|
4188
4250
|
}
|
|
4189
4251
|
//#endregion
|
|
4190
4252
|
//#region src/components/AppSearch.jsx
|
|
4191
|
-
function
|
|
4192
|
-
return T("AppSearch",
|
|
4253
|
+
function xt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
|
|
4254
|
+
return T("AppSearch", d), /* @__PURE__ */ n("div", {
|
|
4193
4255
|
className: [
|
|
4194
4256
|
"search-wrap",
|
|
4195
4257
|
e ? "has-value" : "",
|
|
4196
|
-
s
|
|
4258
|
+
s === "sm" ? "search-sm" : s === "lg" ? "search-lg" : "",
|
|
4259
|
+
c ? "is-loading" : "",
|
|
4260
|
+
u
|
|
4197
4261
|
].filter(Boolean).join(" "),
|
|
4198
4262
|
children: [
|
|
4263
|
+
c && /* @__PURE__ */ t("span", {
|
|
4264
|
+
className: "search-spinner",
|
|
4265
|
+
"aria-hidden": "true"
|
|
4266
|
+
}),
|
|
4199
4267
|
/* @__PURE__ */ t(O, {
|
|
4200
4268
|
name: "search",
|
|
4201
4269
|
size: o,
|
|
@@ -4208,9 +4276,10 @@ function vt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
4208
4276
|
value: e,
|
|
4209
4277
|
onChange: (e) => r(e.target.value),
|
|
4210
4278
|
"aria-label": a,
|
|
4211
|
-
|
|
4279
|
+
disabled: l,
|
|
4280
|
+
...d
|
|
4212
4281
|
}),
|
|
4213
|
-
|
|
4282
|
+
!l && /* @__PURE__ */ t("button", {
|
|
4214
4283
|
type: "button",
|
|
4215
4284
|
className: "search-clear",
|
|
4216
4285
|
"aria-label": "Clear search",
|
|
@@ -4225,7 +4294,7 @@ function vt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
4225
4294
|
}
|
|
4226
4295
|
//#endregion
|
|
4227
4296
|
//#region src/components/AppSegmented.jsx
|
|
4228
|
-
function
|
|
4297
|
+
function St({ options: e = [], value: r, onChange: i, label: a, name: s, size: c = "md", className: l = "", ...u }) {
|
|
4229
4298
|
T("AppSegmented", u);
|
|
4230
4299
|
let d = o(), f = s || d;
|
|
4231
4300
|
return /* @__PURE__ */ t("div", {
|
|
@@ -4254,79 +4323,81 @@ function yt({ options: e = [], value: r, onChange: i, label: a, name: s, size: c
|
|
|
4254
4323
|
}
|
|
4255
4324
|
//#endregion
|
|
4256
4325
|
//#region src/components/AppSelect.jsx
|
|
4257
|
-
var
|
|
4258
|
-
function
|
|
4259
|
-
T("AppSelect",
|
|
4260
|
-
let
|
|
4326
|
+
var Ct = (e) => e == null ? "" : e.label ?? e.text ?? "";
|
|
4327
|
+
function wt({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: l = !1, clearable: u = !1, size: d, icon: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", ...E }) {
|
|
4328
|
+
T("AppSelect", E);
|
|
4329
|
+
let D = c(null);
|
|
4261
4330
|
a(() => {
|
|
4262
|
-
|
|
4331
|
+
D.current && (D.current.options = i.map((e) => ({
|
|
4263
4332
|
value: e.value,
|
|
4264
|
-
label:
|
|
4333
|
+
label: Ct(e),
|
|
4334
|
+
icon: e.icon
|
|
4265
4335
|
})));
|
|
4266
4336
|
}, [i]), a(() => {
|
|
4267
|
-
let t =
|
|
4337
|
+
let t = D.current;
|
|
4268
4338
|
t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
|
|
4269
4339
|
}, [e]), a(() => {
|
|
4270
|
-
let e =
|
|
4340
|
+
let e = D.current;
|
|
4271
4341
|
if (!e) return;
|
|
4272
4342
|
let t = () => r?.(e.value);
|
|
4273
4343
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
4274
4344
|
}, [r]);
|
|
4275
|
-
let
|
|
4276
|
-
"aria-label": typeof
|
|
4277
|
-
ref:
|
|
4278
|
-
id:
|
|
4279
|
-
name:
|
|
4280
|
-
placeholder:
|
|
4345
|
+
let O = /* @__PURE__ */ t("wui-select", {
|
|
4346
|
+
"aria-label": typeof h == "string" ? h : void 0,
|
|
4347
|
+
ref: D,
|
|
4348
|
+
id: x || S,
|
|
4349
|
+
name: S,
|
|
4350
|
+
placeholder: p ? " " : o,
|
|
4281
4351
|
"search-placeholder": s,
|
|
4282
4352
|
searchable: l ? "" : void 0,
|
|
4283
4353
|
clearable: u ? "" : void 0,
|
|
4284
4354
|
size: d || void 0,
|
|
4285
|
-
|
|
4286
|
-
|
|
4355
|
+
icon: f || void 0,
|
|
4356
|
+
disabled: m ? "" : void 0,
|
|
4357
|
+
required: g ? "" : void 0
|
|
4287
4358
|
});
|
|
4288
|
-
if (!
|
|
4289
|
-
let
|
|
4359
|
+
if (!h && !_ && !v) return O;
|
|
4360
|
+
let k = x || S, A = p && h;
|
|
4290
4361
|
return /* @__PURE__ */ n("div", {
|
|
4291
4362
|
className: [
|
|
4292
4363
|
"field",
|
|
4293
|
-
|
|
4294
|
-
|
|
4364
|
+
C,
|
|
4365
|
+
w
|
|
4295
4366
|
].filter(Boolean).join(" "),
|
|
4296
4367
|
children: [
|
|
4297
|
-
|
|
4368
|
+
h && !A && /* @__PURE__ */ n("label", {
|
|
4298
4369
|
className: "label",
|
|
4299
|
-
htmlFor:
|
|
4370
|
+
htmlFor: k,
|
|
4300
4371
|
children: [
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
label:
|
|
4305
|
-
children:
|
|
4372
|
+
h,
|
|
4373
|
+
g && /* @__PURE__ */ t(X, {}),
|
|
4374
|
+
y && /* @__PURE__ */ t(Q, {
|
|
4375
|
+
label: b,
|
|
4376
|
+
children: y
|
|
4306
4377
|
})
|
|
4307
4378
|
]
|
|
4308
4379
|
}),
|
|
4309
|
-
|
|
4380
|
+
A ? /* @__PURE__ */ n("div", {
|
|
4310
4381
|
className: "field-float",
|
|
4311
|
-
children: [
|
|
4382
|
+
children: [O, /* @__PURE__ */ n("label", {
|
|
4312
4383
|
className: "float-label",
|
|
4313
|
-
htmlFor:
|
|
4314
|
-
children: [
|
|
4384
|
+
htmlFor: k,
|
|
4385
|
+
children: [h, g && /* @__PURE__ */ t(X, {})]
|
|
4315
4386
|
})]
|
|
4316
|
-
}) :
|
|
4317
|
-
|
|
4387
|
+
}) : O,
|
|
4388
|
+
_ ? /* @__PURE__ */ t("div", {
|
|
4318
4389
|
className: "field-error",
|
|
4319
|
-
children: g
|
|
4320
|
-
}) : _ ? /* @__PURE__ */ t("div", {
|
|
4321
|
-
className: "field-hint",
|
|
4322
4390
|
children: _
|
|
4391
|
+
}) : v ? /* @__PURE__ */ t("div", {
|
|
4392
|
+
className: "field-hint",
|
|
4393
|
+
children: v
|
|
4323
4394
|
}) : null
|
|
4324
4395
|
]
|
|
4325
4396
|
});
|
|
4326
4397
|
}
|
|
4327
4398
|
//#endregion
|
|
4328
4399
|
//#region src/components/AppShell.jsx
|
|
4329
|
-
function
|
|
4400
|
+
function Tt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: u, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
|
|
4330
4401
|
T("AppShell", _);
|
|
4331
4402
|
let [v, y] = l(!1), [b, x] = l(!1), [S, C] = l(!1), w = d ?? v;
|
|
4332
4403
|
return a(() => {
|
|
@@ -4362,7 +4433,7 @@ function St({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
|
|
|
4362
4433
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
4363
4434
|
className: "app-nav-group-label",
|
|
4364
4435
|
children: e.label
|
|
4365
|
-
}), e.items.map((e) => /* @__PURE__ */ t(
|
|
4436
|
+
}), e.items.map((e) => /* @__PURE__ */ t(Et, {
|
|
4366
4437
|
item: e,
|
|
4367
4438
|
linkComponent: h,
|
|
4368
4439
|
onNavigate: () => x(!1)
|
|
@@ -4432,7 +4503,7 @@ function St({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
|
|
|
4432
4503
|
]
|
|
4433
4504
|
});
|
|
4434
4505
|
}
|
|
4435
|
-
function
|
|
4506
|
+
function Et({ item: r, linkComponent: i, onNavigate: a }) {
|
|
4436
4507
|
let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
|
|
4437
4508
|
r.icon && /* @__PURE__ */ t("span", {
|
|
4438
4509
|
className: "app-nav-icon",
|
|
@@ -4466,7 +4537,7 @@ function Ct({ item: r, linkComponent: i, onNavigate: a }) {
|
|
|
4466
4537
|
}
|
|
4467
4538
|
//#endregion
|
|
4468
4539
|
//#region src/components/AppSidebarMenu.jsx
|
|
4469
|
-
var
|
|
4540
|
+
var Dt = {
|
|
4470
4541
|
left: "start",
|
|
4471
4542
|
right: "end",
|
|
4472
4543
|
start: "start",
|
|
@@ -4474,11 +4545,11 @@ var wt = {
|
|
|
4474
4545
|
top: "top",
|
|
4475
4546
|
bottom: "bottom"
|
|
4476
4547
|
};
|
|
4477
|
-
function
|
|
4548
|
+
function Ot({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, header: s, children: c, footer: l, width: u, backdrop: d = !0, scroll: f = !1, keyboard: p = !0, closeButton: m = !0, responsive: h, className: g = "", bodyClassName: _ = "", ariaLabel: v, ...b }) {
|
|
4478
4549
|
return T("AppSidebarMenu", b), /* @__PURE__ */ n(y, {
|
|
4479
4550
|
show: e,
|
|
4480
4551
|
onHide: r,
|
|
4481
|
-
placement:
|
|
4552
|
+
placement: Dt[i] || "end",
|
|
4482
4553
|
backdrop: d,
|
|
4483
4554
|
scroll: f,
|
|
4484
4555
|
keyboard: p,
|
|
@@ -4522,7 +4593,7 @@ function Tt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
4522
4593
|
}
|
|
4523
4594
|
//#endregion
|
|
4524
4595
|
//#region src/components/AppSpinner.jsx
|
|
4525
|
-
function
|
|
4596
|
+
function kt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
4526
4597
|
return T("AppSpinner", i), /* @__PURE__ */ t("span", {
|
|
4527
4598
|
className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
|
|
4528
4599
|
role: "status",
|
|
@@ -4531,7 +4602,7 @@ function Et({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
|
4531
4602
|
}
|
|
4532
4603
|
//#endregion
|
|
4533
4604
|
//#region src/components/AppSplash.jsx
|
|
4534
|
-
function
|
|
4605
|
+
function At({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
|
|
4535
4606
|
return T("AppSplash", s), /* @__PURE__ */ t("div", {
|
|
4536
4607
|
className: `splash${o ? ` ${o}` : ""}`,
|
|
4537
4608
|
role: "status",
|
|
@@ -4558,7 +4629,7 @@ function Dt({ logo: e, initials: r, text: i, label: a = "Loading", className: o
|
|
|
4558
4629
|
}
|
|
4559
4630
|
//#endregion
|
|
4560
4631
|
//#region src/components/AppStatusBadge.jsx
|
|
4561
|
-
function
|
|
4632
|
+
function jt({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
4562
4633
|
return T("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
|
|
4563
4634
|
className: `status-label ${n}${r ? ` ${r}` : ""}`,
|
|
4564
4635
|
children: e
|
|
@@ -4566,7 +4637,7 @@ function Ot({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
|
4566
4637
|
}
|
|
4567
4638
|
//#endregion
|
|
4568
4639
|
//#region src/components/AppStepper.jsx
|
|
4569
|
-
function
|
|
4640
|
+
function Mt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
4570
4641
|
return T("AppStepper", c), /* @__PURE__ */ t("nav", {
|
|
4571
4642
|
className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
|
|
4572
4643
|
"aria-label": a,
|
|
@@ -4613,7 +4684,7 @@ function kt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
|
|
|
4613
4684
|
}
|
|
4614
4685
|
//#endregion
|
|
4615
4686
|
//#region src/components/AppSwitch.jsx
|
|
4616
|
-
var
|
|
4687
|
+
var Nt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
4617
4688
|
T("AppSwitch", s);
|
|
4618
4689
|
let l = o(), u = r || i || l;
|
|
4619
4690
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4634,7 +4705,7 @@ var At = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
4634
4705
|
});
|
|
4635
4706
|
//#endregion
|
|
4636
4707
|
//#region src/components/AppTableEmptyState.jsx
|
|
4637
|
-
function
|
|
4708
|
+
function Pt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
4638
4709
|
return T("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
|
|
4639
4710
|
className: "tbl-empty",
|
|
4640
4711
|
children: [
|
|
@@ -4662,7 +4733,7 @@ function jt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
|
4662
4733
|
}
|
|
4663
4734
|
//#endregion
|
|
4664
4735
|
//#region src/components/AppTabs.jsx
|
|
4665
|
-
function
|
|
4736
|
+
function Ft({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...l }) {
|
|
4666
4737
|
T("AppTabs", l);
|
|
4667
4738
|
let u = c(null);
|
|
4668
4739
|
function d(t) {
|
|
@@ -4706,7 +4777,7 @@ function Mt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4706
4777
|
}
|
|
4707
4778
|
//#endregion
|
|
4708
4779
|
//#region src/components/AppTextarea.jsx
|
|
4709
|
-
var
|
|
4780
|
+
var It = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: h = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
|
|
4710
4781
|
T("AppTextarea", v);
|
|
4711
4782
|
let b = d || f, x = [
|
|
4712
4783
|
"textarea",
|
|
@@ -4768,7 +4839,7 @@ var Nt = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
|
|
|
4768
4839
|
});
|
|
4769
4840
|
//#endregion
|
|
4770
4841
|
//#region src/components/AppTimeline.jsx
|
|
4771
|
-
function
|
|
4842
|
+
function Lt({ items: e = [], className: r = "", ...i }) {
|
|
4772
4843
|
return T("AppTimeline", i), /* @__PURE__ */ t("ol", {
|
|
4773
4844
|
className: `timeline${r ? ` ${r}` : ""}`,
|
|
4774
4845
|
children: e.map((e, r) => /* @__PURE__ */ n("li", {
|
|
@@ -4806,4 +4877,4 @@ function Pt({ items: e = [], className: r = "", ...i }) {
|
|
|
4806
4877
|
});
|
|
4807
4878
|
}
|
|
4808
4879
|
//#endregion
|
|
4809
|
-
export { k as ActionIcon, A as AppAccordion, j as AppAlert,
|
|
4880
|
+
export { k as ActionIcon, A as AppAccordion, j as AppAlert, Ee as AppAutocomplete, Oe as AppAvatar, ke as AppBadge, Z as AppButton, Me as AppCallout, Ne as AppCard, Pe as AppCheckbox, Fe as AppChip, Ie as AppChoiceCard, Le as AppChoiceChip, Re as AppColorField, ze as AppCompareTable, We as AppConfirmDialog, et as AppDataTable, tt as AppDatePicker, rt as AppDropdown, it as AppEmptyState, at as AppFileAttachment, lt as AppFilePicker, ut as AppInfoList, Q as AppInfoTip, Be as AppInput, dt as AppKpiTile, ft as AppLogoPicker, He as AppModal, pt as AppMultiSelect, mt as AppOtpInput, ht as AppPageHeader, gt as AppPhoneNumberInput, _t as AppPricingCard, vt as AppRadio, yt as AppRepeater, bt as AppResourceCard, xt as AppSearch, St as AppSegmented, wt as AppSelect, Ye as AppSelectMini, Tt as AppShell, Ot as AppSidebarMenu, Ge as AppSkeleton, Je as AppSkeletonRows, kt as AppSpinner, At as AppSplash, jt as AppStatusBadge, Mt as AppStepper, Nt as AppSwitch, Pt as AppTableEmptyState, Ze as AppTablePagination, Ft as AppTabs, It as AppTextarea, Lt as AppTimeline, O as Icon, Ue as MODAL_ICONS, X as RequiredMark, ct as errorToast, D as iconNames, st as toast };
|