@webority/ui-react 0.6.7 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui-react.js +231 -229
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -273,18 +273,26 @@ var N = class extends HTMLElement {
|
|
|
273
273
|
let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = M[e] || M.info;
|
|
274
274
|
this.innerHTML = `<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;
|
|
275
275
|
}
|
|
276
|
-
},
|
|
277
|
-
function
|
|
278
|
-
|
|
276
|
+
}, P = 4;
|
|
277
|
+
function F(e, t, n = {}) {
|
|
278
|
+
if (!e || !t) return;
|
|
279
|
+
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + P && r.top > a;
|
|
280
|
+
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(P, r.top - i - P)}px` : `${r.bottom + P}px`, n.matchWidth && (t.style.width = `${r.width}px`);
|
|
281
|
+
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - P);
|
|
282
|
+
t.style.left = `${Math.max(P, c)}px`;
|
|
283
|
+
}
|
|
284
|
+
var I = "data-wui-mirror";
|
|
285
|
+
function L(e, t) {
|
|
286
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${I}]`);
|
|
279
287
|
if (!n) {
|
|
280
288
|
r?.remove();
|
|
281
289
|
return;
|
|
282
290
|
}
|
|
283
|
-
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(
|
|
291
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(I, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
|
|
284
292
|
for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
|
|
285
293
|
r.disabled = e.hasAttribute("disabled");
|
|
286
294
|
}
|
|
287
|
-
var
|
|
295
|
+
var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), B = (e) => e?.[R] ? String(e.label ?? "") : z(e == null ? "" : e.label), ee = class extends HTMLElement {
|
|
288
296
|
_accessibleName() {
|
|
289
297
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
290
298
|
}
|
|
@@ -312,9 +320,9 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
312
320
|
return this._value;
|
|
313
321
|
}
|
|
314
322
|
set value(e) {
|
|
315
|
-
this._value = e == null ? "" : String(e),
|
|
323
|
+
this._value = e == null ? "" : String(e), L(this, this._value);
|
|
316
324
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
317
|
-
t && (this._label =
|
|
325
|
+
t && (this._label = H(t.label)), this._syncInput();
|
|
318
326
|
}
|
|
319
327
|
set options(e) {
|
|
320
328
|
this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
|
|
@@ -344,7 +352,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
344
352
|
e.length && (this._declared = e.map((e) => ({
|
|
345
353
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
346
354
|
label: e.innerHTML,
|
|
347
|
-
[
|
|
355
|
+
[R]: !0,
|
|
348
356
|
selected: e.hasAttribute("selected")
|
|
349
357
|
})));
|
|
350
358
|
}
|
|
@@ -356,8 +364,8 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
356
364
|
let e = this.getAttribute("placeholder") || "Search…";
|
|
357
365
|
this.innerHTML = `
|
|
358
366
|
<div class="search-select">
|
|
359
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
360
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
367
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${V(this._accessibleName())}">
|
|
368
|
+
<input class="search-select-input search-select-ac-input" placeholder="${V(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
361
369
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
362
370
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
|
|
363
371
|
</div>
|
|
@@ -366,7 +374,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
366
374
|
<div class="search-select-empty" hidden>No matches</div>
|
|
367
375
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
368
376
|
</div>
|
|
369
|
-
</div>`, this._rendered = !0,
|
|
377
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
|
|
370
378
|
}
|
|
371
379
|
_refs() {
|
|
372
380
|
return {
|
|
@@ -395,9 +403,9 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
395
403
|
let t = this._refs();
|
|
396
404
|
if (!t.optionsWrap) return;
|
|
397
405
|
let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
|
|
398
|
-
!this._remote && n && (r = r.filter((e) =>
|
|
406
|
+
!this._remote && n && (r = r.filter((e) => H(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
|
|
399
407
|
let t = String(e.value) === String(this._value);
|
|
400
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
408
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${V(e.value)}" aria-selected="${t}">${B(e)}</button>`;
|
|
401
409
|
}).join(""), this._active = -1;
|
|
402
410
|
let i = n.length < this._minChars;
|
|
403
411
|
t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
|
|
@@ -405,10 +413,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
405
413
|
_wire() {
|
|
406
414
|
let e = this._refs();
|
|
407
415
|
if (!e.control || !e.input) return;
|
|
408
|
-
let t = () => {
|
|
409
|
-
let t = e.control.getBoundingClientRect();
|
|
410
|
-
e.menu.style.position = "fixed", e.menu.style.top = `${t.bottom + 4}px`, e.menu.style.left = `${t.left}px`, e.menu.style.width = `${t.width}px`;
|
|
411
|
-
}, n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
|
|
416
|
+
let t = () => F(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
|
|
412
417
|
let t = n();
|
|
413
418
|
this._active = e;
|
|
414
419
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -418,7 +423,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
418
423
|
}, o = () => {
|
|
419
424
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
|
|
420
425
|
}, s = (t) => {
|
|
421
|
-
this._value = t.dataset.value, this._label =
|
|
426
|
+
this._value = t.dataset.value, this._label = H(t.innerHTML), L(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
|
|
422
427
|
};
|
|
423
428
|
e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
|
|
424
429
|
let t = e.input.value;
|
|
@@ -441,7 +446,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
441
446
|
let t = e.target.closest(".search-select-option");
|
|
442
447
|
t && r(this._optionEls().indexOf(t));
|
|
443
448
|
}), e.clear?.addEventListener("click", () => {
|
|
444
|
-
this._value = "", this._label = "",
|
|
449
|
+
this._value = "", this._label = "", L(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
|
|
445
450
|
}), this._onDocClick = (e) => {
|
|
446
451
|
i() && !this.contains(e.target) && o();
|
|
447
452
|
}, document.addEventListener("click", this._onDocClick), window.addEventListener("resize", () => {
|
|
@@ -451,7 +456,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
451
456
|
disconnectedCallback() {
|
|
452
457
|
this._onDocClick && document.removeEventListener("click", this._onDocClick), clearTimeout(this._timer);
|
|
453
458
|
}
|
|
454
|
-
},
|
|
459
|
+
}, V = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), H = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), U = [
|
|
455
460
|
"January",
|
|
456
461
|
"February",
|
|
457
462
|
"March",
|
|
@@ -464,7 +469,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
464
469
|
"October",
|
|
465
470
|
"November",
|
|
466
471
|
"December"
|
|
467
|
-
],
|
|
472
|
+
], te = [
|
|
468
473
|
"Su",
|
|
469
474
|
"Mo",
|
|
470
475
|
"Tu",
|
|
@@ -472,17 +477,17 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
472
477
|
"Th",
|
|
473
478
|
"Fr",
|
|
474
479
|
"Sa"
|
|
475
|
-
],
|
|
480
|
+
], W = (e) => String(e).padStart(2, "0"), ne = (e, t, n) => `${e}-${W(t + 1)}-${W(n)}`, G = (e) => {
|
|
476
481
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
477
482
|
return t ? {
|
|
478
483
|
y: +t[1],
|
|
479
484
|
m: t[2] - 1,
|
|
480
485
|
d: +t[3]
|
|
481
486
|
} : null;
|
|
482
|
-
},
|
|
483
|
-
let t =
|
|
484
|
-
return t ? `${
|
|
485
|
-
},
|
|
487
|
+
}, K = (e) => {
|
|
488
|
+
let t = G(e);
|
|
489
|
+
return t ? `${W(t.d)} ${U[t.m].slice(0, 3)} ${t.y}` : "";
|
|
490
|
+
}, q = class extends HTMLElement {
|
|
486
491
|
static get observedAttributes() {
|
|
487
492
|
return [
|
|
488
493
|
"value",
|
|
@@ -507,58 +512,61 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
507
512
|
return this._value;
|
|
508
513
|
}
|
|
509
514
|
set value(e) {
|
|
510
|
-
this._value = e || "",
|
|
515
|
+
this._value = e || "", L(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
511
516
|
}
|
|
512
517
|
render() {
|
|
513
518
|
this._value = this.getAttribute("value") || this._value;
|
|
514
|
-
let e = this.getAttribute("placeholder") || "Enter Date", t =
|
|
519
|
+
let e = this.getAttribute("placeholder") || "Enter Date", t = G(this._value);
|
|
515
520
|
t && (this._viewY = t.y, this._viewM = t.m), this.innerHTML = `
|
|
516
521
|
<div class="datepicker">
|
|
517
522
|
<button type="button" class="input datepicker-trigger" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
518
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
523
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? K(this._value) : e}</span>
|
|
519
524
|
<i class="bi bi-calendar3" aria-hidden="true"></i>
|
|
520
525
|
</button>
|
|
521
526
|
<div class="datepicker-pop" role="dialog" hidden></div>
|
|
522
|
-
</div>`, this._rendered = !0,
|
|
527
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire();
|
|
523
528
|
}
|
|
524
529
|
_syncFormValue() {
|
|
525
|
-
|
|
530
|
+
L(this, this._value);
|
|
526
531
|
}
|
|
527
532
|
_syncTrigger() {
|
|
528
533
|
let e = this.querySelector("[data-trigger-label]");
|
|
529
534
|
if (!e) return;
|
|
530
|
-
let t =
|
|
531
|
-
e.textContent = t ?
|
|
535
|
+
let t = G(this._value);
|
|
536
|
+
e.textContent = t ? K(this._value) : this.getAttribute("placeholder") || "Enter Date", e.classList.toggle("search-select-placeholder", !t);
|
|
532
537
|
}
|
|
533
538
|
_renderMonth() {
|
|
534
|
-
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 =
|
|
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 = G(this._value), i = G(this.getAttribute("min")), a = G(this.getAttribute("max")), o = (e, t, n) => {
|
|
535
540
|
let r = new Date(e, t, n).getTime();
|
|
536
541
|
return !!(i && r < new Date(i.y, i.m, i.d).getTime() || a && r > new Date(a.y, a.m, a.d).getTime());
|
|
537
542
|
}, s = "";
|
|
538
543
|
for (let e = 0; e < t; e++) s += "<span class=\"datepicker-day is-outside\"></span>";
|
|
539
544
|
for (let e = 1; e <= n; e++) {
|
|
540
|
-
let t =
|
|
545
|
+
let t = ne(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);
|
|
541
546
|
s += `<button type="button" class="datepicker-day${n ? " selected" : ""}" data-iso="${t}"${i ? " disabled" : ""}>${e}</button>`;
|
|
542
547
|
}
|
|
543
548
|
e.innerHTML = `
|
|
544
549
|
<div class="datepicker-head">
|
|
545
550
|
<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>
|
|
546
|
-
<span class="datepicker-month">${
|
|
551
|
+
<span class="datepicker-month">${U[this._viewM]} ${this._viewY}</span>
|
|
547
552
|
<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>
|
|
548
553
|
</div>
|
|
549
|
-
<div class="datepicker-weekdays">${
|
|
554
|
+
<div class="datepicker-weekdays">${te.map((e) => `<span>${e}</span>`).join("")}</div>
|
|
550
555
|
<div class="datepicker-grid">${s}</div>
|
|
551
556
|
<div class="datepicker-foot"><button type="button" class="datepicker-link" data-clear>Clear</button></div>`;
|
|
552
557
|
}
|
|
558
|
+
_position(e, t) {
|
|
559
|
+
F(e, t);
|
|
560
|
+
}
|
|
553
561
|
_wire() {
|
|
554
562
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector(".datepicker-pop");
|
|
555
563
|
if (!e || !t) return;
|
|
556
564
|
let n = () => !t.hidden, r = () => {
|
|
557
|
-
if (!
|
|
565
|
+
if (!G(this._value) && !this._viewNavigated) {
|
|
558
566
|
let e = /* @__PURE__ */ new Date();
|
|
559
567
|
this._viewY = e.getFullYear(), this._viewM = e.getMonth();
|
|
560
568
|
}
|
|
561
|
-
this._renderMonth(), t.hidden = !1, e.setAttribute("aria-expanded", "true");
|
|
569
|
+
this._renderMonth(), t.hidden = !1, this._position(e, t), e.setAttribute("aria-expanded", "true");
|
|
562
570
|
}, i = () => {
|
|
563
571
|
t.hidden = !0, e.setAttribute("aria-expanded", "false");
|
|
564
572
|
};
|
|
@@ -583,7 +591,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
583
591
|
disconnectedCallback() {
|
|
584
592
|
this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey);
|
|
585
593
|
}
|
|
586
|
-
},
|
|
594
|
+
}, re = class extends HTMLElement {
|
|
587
595
|
_accessibleName() {
|
|
588
596
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
589
597
|
}
|
|
@@ -615,7 +623,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
615
623
|
return this._values.slice();
|
|
616
624
|
}
|
|
617
625
|
set values(e) {
|
|
618
|
-
this._values = Array.isArray(e) ? e.map(String) : [],
|
|
626
|
+
this._values = Array.isArray(e) ? e.map(String) : [], L(this, this._values.join(",")), this._rendered && this._renderControl();
|
|
619
627
|
}
|
|
620
628
|
set options(e) {
|
|
621
629
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -629,7 +637,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
629
637
|
e.length && (this._declared = e.map((e) => ({
|
|
630
638
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
631
639
|
label: e.innerHTML,
|
|
632
|
-
[
|
|
640
|
+
[R]: !0,
|
|
633
641
|
selected: e.hasAttribute("selected")
|
|
634
642
|
})));
|
|
635
643
|
}
|
|
@@ -642,50 +650,47 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
642
650
|
}
|
|
643
651
|
_labelHtmlFor(e) {
|
|
644
652
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
645
|
-
return t ?
|
|
653
|
+
return t ? B(t) : z(e);
|
|
646
654
|
}
|
|
647
655
|
render() {
|
|
648
656
|
this._snapshotDeclared();
|
|
649
657
|
let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…";
|
|
650
|
-
|
|
658
|
+
L(this, this._values.join(",")), this.innerHTML = `
|
|
651
659
|
<div class="search-select">
|
|
652
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
660
|
+
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${J(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
653
661
|
<div class="ms-chips" data-chips></div>
|
|
654
662
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
655
663
|
</div>
|
|
656
664
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
|
|
657
|
-
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
665
|
+
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${J(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>` : ""}
|
|
658
666
|
<div class="search-select-options"></div>
|
|
659
667
|
<div class="search-select-empty" hidden>No matches</div>
|
|
660
668
|
</div>
|
|
661
|
-
</div>`, this._rendered = !0,
|
|
669
|
+
</div>`, this._rendered = !0, L(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
|
|
662
670
|
}
|
|
663
671
|
_renderControl() {
|
|
664
672
|
let e = this.querySelector("[data-chips]");
|
|
665
673
|
if (!e) return;
|
|
666
674
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
667
675
|
if (!this._values.length) {
|
|
668
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
676
|
+
e.innerHTML = `<span class="search-select-placeholder">${z(t)}</span>`;
|
|
669
677
|
return;
|
|
670
678
|
}
|
|
671
|
-
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="${
|
|
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="${J(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join("");
|
|
672
680
|
}
|
|
673
681
|
_renderOptions(e) {
|
|
674
682
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
675
683
|
if (!t) return;
|
|
676
684
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
677
|
-
r && (i = i.filter((e) =>
|
|
685
|
+
r && (i = i.filter((e) => ie(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
|
|
678
686
|
let t = this._values.includes(String(e.value));
|
|
679
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
687
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${J(e.value)}" aria-selected="${t}"><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span><span class="ms-opt-label">${B(e)}</span></button>`;
|
|
680
688
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1;
|
|
681
689
|
}
|
|
682
690
|
_wire() {
|
|
683
691
|
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");
|
|
684
692
|
if (!e || !t) return;
|
|
685
|
-
let a = () => this.hasAttribute("disabled"), o = () => {
|
|
686
|
-
let n = e.getBoundingClientRect();
|
|
687
|
-
t.style.position = "fixed", t.style.top = `${n.bottom + 4}px`, t.style.left = `${n.left}px`, t.style.width = `${n.width}px`;
|
|
688
|
-
}, s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
|
|
693
|
+
let a = () => this.hasAttribute("disabled"), o = () => F(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
|
|
689
694
|
let t = c();
|
|
690
695
|
this._active = e;
|
|
691
696
|
for (let e of s()) e.classList.remove("is-active");
|
|
@@ -695,7 +700,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
695
700
|
}, f = () => {
|
|
696
701
|
t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
|
|
697
702
|
}, p = () => {
|
|
698
|
-
|
|
703
|
+
L(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
699
704
|
}, m = (e) => {
|
|
700
705
|
let t = String(e);
|
|
701
706
|
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();
|
|
@@ -739,7 +744,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
739
744
|
disconnectedCallback() {
|
|
740
745
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
741
746
|
}
|
|
742
|
-
},
|
|
747
|
+
}, J = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), ie = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ae = /[^0-9]/g, oe = /[^0-9a-zA-Z]/g, se = class extends HTMLElement {
|
|
743
748
|
static get observedAttributes() {
|
|
744
749
|
return [
|
|
745
750
|
"value",
|
|
@@ -766,16 +771,16 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
766
771
|
return this._value ?? "";
|
|
767
772
|
}
|
|
768
773
|
set value(e) {
|
|
769
|
-
this._value = this._clean(e),
|
|
774
|
+
this._value = this._clean(e), L(this, this._value), this._paint();
|
|
770
775
|
}
|
|
771
776
|
_clean(e) {
|
|
772
|
-
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ?
|
|
777
|
+
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? oe : ae, "").slice(0, this.length);
|
|
773
778
|
}
|
|
774
779
|
connectedCallback() {
|
|
775
780
|
this._rendered || this.render();
|
|
776
781
|
}
|
|
777
782
|
attributeChangedCallback(e, t, n) {
|
|
778
|
-
this._rendered && (e === "value" ? (this._value = this._clean(n),
|
|
783
|
+
this._rendered && (e === "value" ? (this._value = this._clean(n), L(this, this._value), this._paint()) : this.render());
|
|
779
784
|
}
|
|
780
785
|
render() {
|
|
781
786
|
this._value = this._clean(this.getAttribute("value") ?? this._value);
|
|
@@ -793,7 +798,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
793
798
|
spellcheck="false"
|
|
794
799
|
${n ? "disabled" : ""} />
|
|
795
800
|
<div class="otp-slots" aria-hidden="true">${r}</div>
|
|
796
|
-
</div>`, this._rendered = !0,
|
|
801
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire(), this._paint();
|
|
797
802
|
}
|
|
798
803
|
_refs() {
|
|
799
804
|
return {
|
|
@@ -815,7 +820,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
815
820
|
if (!e) return;
|
|
816
821
|
let t = (e) => {
|
|
817
822
|
let t = this._clean(e), n = t !== this._value;
|
|
818
|
-
this._value = t,
|
|
823
|
+
this._value = t, L(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
|
|
819
824
|
bubbles: !0,
|
|
820
825
|
detail: t
|
|
821
826
|
}));
|
|
@@ -835,7 +840,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
835
840
|
document.activeElement === e && this._paint();
|
|
836
841
|
});
|
|
837
842
|
}
|
|
838
|
-
},
|
|
843
|
+
}, ce = [
|
|
839
844
|
[
|
|
840
845
|
"AF",
|
|
841
846
|
"Afghanistan",
|
|
@@ -2061,11 +2066,11 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2061
2066
|
"Zimbabwe",
|
|
2062
2067
|
"263"
|
|
2063
2068
|
]
|
|
2064
|
-
],
|
|
2069
|
+
], le = (e) => (ce.find((t) => t[0] === e) || [
|
|
2065
2070
|
"",
|
|
2066
2071
|
"",
|
|
2067
2072
|
""
|
|
2068
|
-
])[2],
|
|
2073
|
+
])[2], ue = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, de = class extends HTMLElement {
|
|
2069
2074
|
static get observedAttributes() {
|
|
2070
2075
|
return [
|
|
2071
2076
|
"value",
|
|
@@ -2084,33 +2089,33 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2084
2089
|
this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
|
|
2085
2090
|
}
|
|
2086
2091
|
get value() {
|
|
2087
|
-
return `+${
|
|
2092
|
+
return `+${le(this._country)}${this._national}`;
|
|
2088
2093
|
}
|
|
2089
2094
|
set value(e) {
|
|
2090
2095
|
this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
|
|
2091
2096
|
}
|
|
2092
2097
|
_commit() {
|
|
2093
|
-
|
|
2098
|
+
L(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2094
2099
|
}
|
|
2095
2100
|
render() {
|
|
2096
2101
|
let e = this.getAttribute("placeholder") || "Enter phone number";
|
|
2097
2102
|
this._country = this.getAttribute("country") || this._country;
|
|
2098
|
-
let t =
|
|
2103
|
+
let t = ce.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${ue(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
|
|
2099
2104
|
this.innerHTML = `
|
|
2100
2105
|
<div class="phone-input-wrap">
|
|
2101
2106
|
<div class="phone-country-adornment">
|
|
2102
2107
|
<button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2103
|
-
<span class="${
|
|
2108
|
+
<span class="${ue(this._country)}" data-flag aria-hidden="true"></span>
|
|
2104
2109
|
<i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
|
|
2105
|
-
<span class="phone-dial" data-dial>+${
|
|
2110
|
+
<span class="phone-dial" data-dial>+${le(this._country)}</span>
|
|
2106
2111
|
</button>
|
|
2107
2112
|
<div class="country-dropdown-menu" role="listbox" hidden>
|
|
2108
2113
|
<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>
|
|
2109
2114
|
<div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
|
|
2110
2115
|
</div>
|
|
2111
2116
|
</div>
|
|
2112
|
-
<input type="tel" class="input" placeholder="${
|
|
2113
|
-
</div>`, this._rendered = !0,
|
|
2117
|
+
<input type="tel" class="input" placeholder="${fe(e)}" value="${fe(this._national)}"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
2118
|
+
</div>`, this._rendered = !0, L(this, this.value), this._wire();
|
|
2114
2119
|
}
|
|
2115
2120
|
_wire() {
|
|
2116
2121
|
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]");
|
|
@@ -2134,7 +2139,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2134
2139
|
}
|
|
2135
2140
|
i && (i.hidden = n > 0);
|
|
2136
2141
|
}, p = (e) => {
|
|
2137
|
-
this._country = e, this.setAttribute("country", e), o && (o.className =
|
|
2142
|
+
this._country = e, this.setAttribute("country", e), o && (o.className = ue(e)), s && (s.textContent = `+${le(e)}`);
|
|
2138
2143
|
for (let t of r.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
|
|
2139
2144
|
d(), this._commit();
|
|
2140
2145
|
};
|
|
@@ -2145,12 +2150,12 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2145
2150
|
this._national = a.value.replace(/[^0-9]/g, ""), this._commit();
|
|
2146
2151
|
}), this._onDocClick = (e) => {
|
|
2147
2152
|
c() && !this.contains(e.target) && d();
|
|
2148
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
2153
|
+
}, document.addEventListener("click", this._onDocClick), L(this, this.value);
|
|
2149
2154
|
}
|
|
2150
2155
|
disconnectedCallback() {
|
|
2151
2156
|
this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2152
2157
|
}
|
|
2153
|
-
},
|
|
2158
|
+
}, fe = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), pe = class extends HTMLElement {
|
|
2154
2159
|
static get observedAttributes() {
|
|
2155
2160
|
return [
|
|
2156
2161
|
"value",
|
|
@@ -2180,7 +2185,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2180
2185
|
return this._value;
|
|
2181
2186
|
}
|
|
2182
2187
|
set value(e) {
|
|
2183
|
-
this._value = e == null ? "" : String(e),
|
|
2188
|
+
this._value = e == null ? "" : String(e), L(this, this._value), this._syncSelected(), this._syncReset();
|
|
2184
2189
|
}
|
|
2185
2190
|
set options(e) {
|
|
2186
2191
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -2194,7 +2199,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2194
2199
|
e.length && (this._declared = e.map((e) => ({
|
|
2195
2200
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
2196
2201
|
label: e.innerHTML,
|
|
2197
|
-
[
|
|
2202
|
+
[R]: !0,
|
|
2198
2203
|
selected: e.hasAttribute("selected")
|
|
2199
2204
|
})));
|
|
2200
2205
|
}
|
|
@@ -2204,23 +2209,23 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2204
2209
|
render() {
|
|
2205
2210
|
this._snapshotDeclared();
|
|
2206
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...", o = this.getAttribute("search-placeholder") || "Search...", s = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
|
|
2207
|
-
s && (this._value = String(s.value)),
|
|
2212
|
+
s && (this._value = String(s.value)), L(this, this._value);
|
|
2208
2213
|
let c = e.map((e) => {
|
|
2209
2214
|
let t = String(e.value) === String(this._value);
|
|
2210
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
2215
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${me(e.value)}" aria-selected="${t}">${B(e)}</button>`;
|
|
2211
2216
|
}).join("");
|
|
2212
2217
|
this.innerHTML = `
|
|
2213
2218
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
2214
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
2215
|
-
<span class="${s ? "" : "search-select-placeholder"}" data-label>${s ?
|
|
2219
|
+
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${me(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2220
|
+
<span class="${s ? "" : "search-select-placeholder"}" data-label>${s ? B(s) : z(a)}</span>
|
|
2216
2221
|
${n ? "<span class=\"search-select-reset\" role=\"button\" aria-label=\"Clear selection\" hidden><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></span>" : ""}
|
|
2217
2222
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
2218
2223
|
</button>
|
|
2219
2224
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
|
|
2220
|
-
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
2225
|
+
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${me(o)}" 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>` : ""}
|
|
2221
2226
|
<div class="search-select-options">${c}<div class="search-select-empty" hidden>No matches</div></div>
|
|
2222
2227
|
</div>
|
|
2223
|
-
</div>`, this._rendered = !0,
|
|
2228
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire(), this._syncReset();
|
|
2224
2229
|
}
|
|
2225
2230
|
_refs() {
|
|
2226
2231
|
return {
|
|
@@ -2246,7 +2251,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2246
2251
|
let t = e.dataset.value === String(this._value);
|
|
2247
2252
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
2248
2253
|
}
|
|
2249
|
-
e && (e.innerHTML = t ?
|
|
2254
|
+
e && (e.innerHTML = t ? B(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
|
|
2250
2255
|
}
|
|
2251
2256
|
_syncReset() {
|
|
2252
2257
|
let { reset: e } = this._refs();
|
|
@@ -2255,10 +2260,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2255
2260
|
_wire() {
|
|
2256
2261
|
let e = this._refs();
|
|
2257
2262
|
if (!e.control || !e.menu) return;
|
|
2258
|
-
let t = () => {
|
|
2259
|
-
let t = e.control.getBoundingClientRect();
|
|
2260
|
-
e.menu.style.position = "fixed", e.menu.style.top = `${t.bottom + 4}px`, e.menu.style.left = `${t.left}px`, e.menu.style.width = `${t.width}px`;
|
|
2261
|
-
}, n = (e) => {
|
|
2263
|
+
let t = () => F(e.control, e.menu, { matchWidth: !0 }), n = (e) => {
|
|
2262
2264
|
let t = this._visible();
|
|
2263
2265
|
this._active = e;
|
|
2264
2266
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -2307,14 +2309,14 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2307
2309
|
disconnectedCallback() {
|
|
2308
2310
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2309
2311
|
}
|
|
2310
|
-
},
|
|
2312
|
+
}, me = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), he = "image/png,image/jpeg,image/webp", ge = {
|
|
2311
2313
|
"image/png": [".png"],
|
|
2312
2314
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
2313
2315
|
"image/webp": [".webp"],
|
|
2314
2316
|
"image/gif": [".gif"],
|
|
2315
2317
|
"image/svg+xml": [".svg"],
|
|
2316
2318
|
"application/pdf": [".pdf"]
|
|
2317
|
-
},
|
|
2319
|
+
}, _e = {
|
|
2318
2320
|
"image/png": "PNG",
|
|
2319
2321
|
"image/jpeg": "JPG",
|
|
2320
2322
|
"image/webp": "WEBP",
|
|
@@ -2328,33 +2330,33 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2328
2330
|
".gif": "GIF",
|
|
2329
2331
|
".svg": "SVG",
|
|
2330
2332
|
".pdf": "PDF"
|
|
2331
|
-
},
|
|
2332
|
-
function
|
|
2333
|
+
}, ve = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
2334
|
+
function ye(e) {
|
|
2333
2335
|
let t = [];
|
|
2334
|
-
for (let n of
|
|
2335
|
-
let e =
|
|
2336
|
+
for (let n of ve(e)) {
|
|
2337
|
+
let e = _e[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
2336
2338
|
t.includes(e) || t.push(e);
|
|
2337
2339
|
}
|
|
2338
2340
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
2339
2341
|
}
|
|
2340
|
-
function
|
|
2341
|
-
let n =
|
|
2342
|
+
function be(e, t) {
|
|
2343
|
+
let n = ve(t);
|
|
2342
2344
|
if (!n.length) return !0;
|
|
2343
2345
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
2344
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
2346
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (ge[e] || []).some((e) => i.endsWith(e)));
|
|
2345
2347
|
}
|
|
2346
|
-
function
|
|
2348
|
+
function xe(e, t = {}) {
|
|
2347
2349
|
if (!e) return null;
|
|
2348
|
-
let n = t.accept === void 0 ?
|
|
2349
|
-
return
|
|
2350
|
+
let n = t.accept === void 0 ? he : t.accept, r = t.maxSizeMb || 5;
|
|
2351
|
+
return be(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${ye(n)} file.`;
|
|
2350
2352
|
}
|
|
2351
2353
|
var Y = (e, t) => {
|
|
2352
2354
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
2353
2355
|
};
|
|
2354
|
-
function
|
|
2355
|
-
Y("wui-select",
|
|
2356
|
+
function Se() {
|
|
2357
|
+
Y("wui-select", pe), Y("wui-phone", de), Y("wui-datepicker", q), Y("wui-autocomplete", ee), Y("wui-multiselect", re), Y("wui-otp", se), Y("wui-status-icon", N);
|
|
2356
2358
|
}
|
|
2357
|
-
|
|
2359
|
+
Se();
|
|
2358
2360
|
//#endregion
|
|
2359
2361
|
//#region src/components/RequiredMark.jsx
|
|
2360
2362
|
function X() {
|
|
@@ -2366,7 +2368,7 @@ function X() {
|
|
|
2366
2368
|
}
|
|
2367
2369
|
//#endregion
|
|
2368
2370
|
//#region src/components/AppAutocomplete.jsx
|
|
2369
|
-
function
|
|
2371
|
+
function Ce({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: l, debounce: u, disabled: d = !1, name: f, label: p, error: m, hint: h, required: g = !1, fieldClassName: _ = "", ...v }) {
|
|
2370
2372
|
T("AppAutocomplete", v);
|
|
2371
2373
|
let y = c(null), b = typeof o == "function";
|
|
2372
2374
|
return a(() => {
|
|
@@ -2427,13 +2429,13 @@ function xe({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
|
|
|
2427
2429
|
}
|
|
2428
2430
|
//#endregion
|
|
2429
2431
|
//#region src/components/AppAvatar.jsx
|
|
2430
|
-
function
|
|
2432
|
+
function we(e) {
|
|
2431
2433
|
let t = (e || "").trim();
|
|
2432
2434
|
if (!t) return "?";
|
|
2433
2435
|
let n = t.split(/\s+/).filter(Boolean);
|
|
2434
2436
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
2435
2437
|
}
|
|
2436
|
-
function
|
|
2438
|
+
function Te({ name: e, src: n, className: r = "", ...i }) {
|
|
2437
2439
|
T("AppAvatar", i);
|
|
2438
2440
|
let a = ["avatar", r].filter(Boolean).join(" ");
|
|
2439
2441
|
return n ? /* @__PURE__ */ t("span", {
|
|
@@ -2447,12 +2449,12 @@ function Ce({ name: e, src: n, className: r = "", ...i }) {
|
|
|
2447
2449
|
className: a,
|
|
2448
2450
|
role: "img",
|
|
2449
2451
|
"aria-label": e,
|
|
2450
|
-
children:
|
|
2452
|
+
children: we(e)
|
|
2451
2453
|
});
|
|
2452
2454
|
}
|
|
2453
2455
|
//#endregion
|
|
2454
2456
|
//#region src/components/AppBadge.jsx
|
|
2455
|
-
function
|
|
2457
|
+
function Ee({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
2456
2458
|
return T("AppBadge", a), /* @__PURE__ */ t(d, {
|
|
2457
2459
|
bg: !1,
|
|
2458
2460
|
className: [
|
|
@@ -2466,14 +2468,14 @@ function we({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
|
2466
2468
|
}
|
|
2467
2469
|
//#endregion
|
|
2468
2470
|
//#region src/components/AppButton.jsx
|
|
2469
|
-
var
|
|
2471
|
+
var De = {
|
|
2470
2472
|
primary: "primary",
|
|
2471
2473
|
secondary: "secondary",
|
|
2472
2474
|
outline: "outline-primary",
|
|
2473
2475
|
ghost: "link",
|
|
2474
2476
|
danger: "danger"
|
|
2475
2477
|
};
|
|
2476
|
-
function
|
|
2478
|
+
function Oe(e, n) {
|
|
2477
2479
|
if (!e) return null;
|
|
2478
2480
|
let r = n === "left" ? "me-2" : "ms-2";
|
|
2479
2481
|
return typeof e == "string" ? /* @__PURE__ */ t(O, {
|
|
@@ -2490,7 +2492,7 @@ function Z({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2490
2492
|
let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
|
|
2491
2493
|
return /* @__PURE__ */ n(f, {
|
|
2492
2494
|
type: (p.as === void 0 || p.as === "button") && p.href === void 0 ? a : void 0,
|
|
2493
|
-
variant:
|
|
2495
|
+
variant: De[r] ?? "primary",
|
|
2494
2496
|
size: i === "md" ? void 0 : i,
|
|
2495
2497
|
disabled: s || o,
|
|
2496
2498
|
className: m || void 0,
|
|
@@ -2500,15 +2502,15 @@ function Z({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2500
2502
|
className: "spinner-border spinner-border-sm me-2",
|
|
2501
2503
|
"aria-hidden": "true"
|
|
2502
2504
|
}),
|
|
2503
|
-
!o &&
|
|
2505
|
+
!o && Oe(l, "left"),
|
|
2504
2506
|
e,
|
|
2505
|
-
!o &&
|
|
2507
|
+
!o && Oe(u, "right")
|
|
2506
2508
|
]
|
|
2507
2509
|
});
|
|
2508
2510
|
}
|
|
2509
2511
|
//#endregion
|
|
2510
2512
|
//#region src/components/AppCallout.jsx
|
|
2511
|
-
function
|
|
2513
|
+
function ke({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
2512
2514
|
return T("AppCallout", a), /* @__PURE__ */ n("div", {
|
|
2513
2515
|
className: `info-callout${i ? ` ${i}` : ""}`,
|
|
2514
2516
|
children: [r && /* @__PURE__ */ t("span", {
|
|
@@ -2522,7 +2524,7 @@ function De({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
|
2522
2524
|
}
|
|
2523
2525
|
//#endregion
|
|
2524
2526
|
//#region src/components/AppCard.jsx
|
|
2525
|
-
function
|
|
2527
|
+
function Ae({ 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 }) {
|
|
2526
2528
|
T("AppCard", h);
|
|
2527
2529
|
let g = a != null || r != null || o != null || s != null;
|
|
2528
2530
|
return /* @__PURE__ */ n(p, {
|
|
@@ -2547,7 +2549,7 @@ function Oe({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2547
2549
|
}
|
|
2548
2550
|
//#endregion
|
|
2549
2551
|
//#region src/components/AppCheckbox.jsx
|
|
2550
|
-
var
|
|
2552
|
+
var je = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
2551
2553
|
T("AppCheckbox", s);
|
|
2552
2554
|
let l = o(), u = r || i || l;
|
|
2553
2555
|
return /* @__PURE__ */ n("div", {
|
|
@@ -2568,7 +2570,7 @@ var ke = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
2568
2570
|
});
|
|
2569
2571
|
//#endregion
|
|
2570
2572
|
//#region src/components/AppChip.jsx
|
|
2571
|
-
function
|
|
2573
|
+
function Me({ 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 }) {
|
|
2572
2574
|
T("AppChip", m);
|
|
2573
2575
|
let h = r ?? i, g = [
|
|
2574
2576
|
"chip",
|
|
@@ -2620,7 +2622,7 @@ function Ae({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2620
2622
|
}
|
|
2621
2623
|
//#endregion
|
|
2622
2624
|
//#region src/components/AppChoiceCard.jsx
|
|
2623
|
-
function
|
|
2625
|
+
function Ne({ 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 }) {
|
|
2624
2626
|
return T("AppChoiceCard", y), /* @__PURE__ */ n("label", {
|
|
2625
2627
|
className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
2626
2628
|
children: [
|
|
@@ -2668,7 +2670,7 @@ function je({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2668
2670
|
}
|
|
2669
2671
|
//#endregion
|
|
2670
2672
|
//#region src/components/AppChoiceChip.jsx
|
|
2671
|
-
function
|
|
2673
|
+
function Pe({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
|
|
2672
2674
|
return T("AppChoiceChip", d), /* @__PURE__ */ n("label", {
|
|
2673
2675
|
className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
|
|
2674
2676
|
children: [
|
|
@@ -2689,7 +2691,7 @@ function Me({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
|
|
|
2689
2691
|
}
|
|
2690
2692
|
//#endregion
|
|
2691
2693
|
//#region src/components/AppColorField.jsx
|
|
2692
|
-
function
|
|
2694
|
+
function Fe({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: o, hint: s, name: c, id: l, disabled: u = !1, className: d = "", ...f }) {
|
|
2693
2695
|
T("AppColorField", f);
|
|
2694
2696
|
let p = l || c;
|
|
2695
2697
|
return /* @__PURE__ */ n("div", {
|
|
@@ -2737,7 +2739,7 @@ function Ne({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
2737
2739
|
}
|
|
2738
2740
|
//#endregion
|
|
2739
2741
|
//#region src/components/AppCompareTable.jsx
|
|
2740
|
-
function
|
|
2742
|
+
function Ie({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
|
|
2741
2743
|
T("AppCompareTable", o);
|
|
2742
2744
|
let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
|
|
2743
2745
|
className: "compare-yes",
|
|
@@ -2820,56 +2822,56 @@ function Q({ label: e, children: r, ...i }) {
|
|
|
2820
2822
|
}
|
|
2821
2823
|
//#endregion
|
|
2822
2824
|
//#region src/components/AppInput.jsx
|
|
2823
|
-
var
|
|
2825
|
+
var Le = 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) {
|
|
2824
2826
|
T("AppInput", j);
|
|
2825
|
-
let [N,
|
|
2826
|
-
|
|
2827
|
-
},
|
|
2828
|
-
|
|
2829
|
-
},
|
|
2827
|
+
let [N, P] = l(!1), F = v || y, I = u === "password", L = I && N ? "text" : u, R = c(null), z = (e) => {
|
|
2828
|
+
R.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
|
|
2829
|
+
}, B = String(j.value ?? j.defaultValue ?? ""), [ee, V] = l(() => !!B), [H, U] = l(() => B.length), te = C && !S, W = C || w, ne = (e) => {
|
|
2830
|
+
V(!!e.target.value), U(e.target.value.length), j.onInput?.(e);
|
|
2831
|
+
}, G = te ? /* @__PURE__ */ t("button", {
|
|
2830
2832
|
type: "button",
|
|
2831
2833
|
className: "input-clear",
|
|
2832
2834
|
onClick: () => {
|
|
2833
|
-
let e =
|
|
2835
|
+
let e = R.current;
|
|
2834
2836
|
if (!e) return;
|
|
2835
2837
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
2836
|
-
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })),
|
|
2838
|
+
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), V(!1), e.focus();
|
|
2837
2839
|
},
|
|
2838
2840
|
"aria-label": "Clear",
|
|
2839
2841
|
tabIndex: -1,
|
|
2840
|
-
hidden: !
|
|
2842
|
+
hidden: !ee,
|
|
2841
2843
|
children: /* @__PURE__ */ t(O, {
|
|
2842
2844
|
name: "x",
|
|
2843
2845
|
size: 16
|
|
2844
2846
|
})
|
|
2845
|
-
}) : null,
|
|
2847
|
+
}) : null, K = [
|
|
2846
2848
|
"input",
|
|
2847
2849
|
d === "sm" ? "input-sm" : "",
|
|
2848
2850
|
d === "lg" ? "input-lg" : "",
|
|
2849
2851
|
i ? "error" : "",
|
|
2850
|
-
|
|
2852
|
+
I ? "pw" : "",
|
|
2851
2853
|
_ ? "num-input" : "",
|
|
2852
2854
|
C ? "has-clear" : "",
|
|
2853
2855
|
b
|
|
2854
|
-
].filter(Boolean).join(" "),
|
|
2855
|
-
id:
|
|
2856
|
+
].filter(Boolean).join(" "), q = /* @__PURE__ */ t(m.Control, {
|
|
2857
|
+
id: F,
|
|
2856
2858
|
name: y,
|
|
2857
|
-
type:
|
|
2858
|
-
className:
|
|
2859
|
+
type: L,
|
|
2860
|
+
className: K,
|
|
2859
2861
|
disabled: S,
|
|
2860
2862
|
required: r,
|
|
2861
2863
|
"aria-invalid": i ? "true" : "false",
|
|
2862
2864
|
maxLength: E,
|
|
2863
2865
|
...j,
|
|
2864
2866
|
placeholder: A ? " " : j.placeholder,
|
|
2865
|
-
ref:
|
|
2866
|
-
onInput:
|
|
2867
|
-
}),
|
|
2868
|
-
return
|
|
2867
|
+
ref: z,
|
|
2868
|
+
onInput: W ? ne : j.onInput
|
|
2869
|
+
}), re;
|
|
2870
|
+
return re = A && e ? /* @__PURE__ */ n("div", {
|
|
2869
2871
|
className: "field-float",
|
|
2870
|
-
children: [
|
|
2872
|
+
children: [q, /* @__PURE__ */ n("label", {
|
|
2871
2873
|
className: "float-label",
|
|
2872
|
-
htmlFor:
|
|
2874
|
+
htmlFor: F,
|
|
2873
2875
|
children: [e, r && /* @__PURE__ */ t(X, {})]
|
|
2874
2876
|
})]
|
|
2875
2877
|
}) : D || k ? /* @__PURE__ */ n("div", {
|
|
@@ -2879,7 +2881,7 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2879
2881
|
className: "affix affix-pre",
|
|
2880
2882
|
children: D
|
|
2881
2883
|
}),
|
|
2882
|
-
|
|
2884
|
+
q,
|
|
2883
2885
|
k != null && /* @__PURE__ */ t("span", {
|
|
2884
2886
|
className: "affix affix-suf",
|
|
2885
2887
|
children: k
|
|
@@ -2887,16 +2889,16 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2887
2889
|
]
|
|
2888
2890
|
}) : _ ? /* @__PURE__ */ n("div", {
|
|
2889
2891
|
className: "input-with-unit",
|
|
2890
|
-
children: [
|
|
2892
|
+
children: [q, /* @__PURE__ */ t("span", {
|
|
2891
2893
|
className: "unit",
|
|
2892
2894
|
children: _
|
|
2893
2895
|
})]
|
|
2894
|
-
}) :
|
|
2896
|
+
}) : I ? /* @__PURE__ */ n("div", {
|
|
2895
2897
|
className: "input-wrap",
|
|
2896
|
-
children: [
|
|
2898
|
+
children: [q, /* @__PURE__ */ t("button", {
|
|
2897
2899
|
type: "button",
|
|
2898
2900
|
className: "pw-toggle",
|
|
2899
|
-
onClick: () =>
|
|
2901
|
+
onClick: () => P((e) => !e),
|
|
2900
2902
|
"aria-label": N ? "Hide password" : "Show password",
|
|
2901
2903
|
tabIndex: -1,
|
|
2902
2904
|
children: /* @__PURE__ */ t(O, {
|
|
@@ -2906,7 +2908,7 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2906
2908
|
})]
|
|
2907
2909
|
}) : p ? /* @__PURE__ */ n("div", {
|
|
2908
2910
|
className: "input-wrap",
|
|
2909
|
-
children: [
|
|
2911
|
+
children: [q, /* @__PURE__ */ t("button", {
|
|
2910
2912
|
type: "button",
|
|
2911
2913
|
className: "pw-toggle",
|
|
2912
2914
|
onClick: h,
|
|
@@ -2928,8 +2930,8 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2928
2930
|
size: 16
|
|
2929
2931
|
})
|
|
2930
2932
|
}),
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
+
q,
|
|
2934
|
+
G
|
|
2933
2935
|
]
|
|
2934
2936
|
}) : f ? /* @__PURE__ */ n("div", {
|
|
2935
2937
|
className: "input-icon",
|
|
@@ -2939,13 +2941,13 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2939
2941
|
name: f,
|
|
2940
2942
|
size: 16
|
|
2941
2943
|
})
|
|
2942
|
-
}),
|
|
2943
|
-
}) :
|
|
2944
|
+
}), q]
|
|
2945
|
+
}) : q, /* @__PURE__ */ n(m.Group, {
|
|
2944
2946
|
className: `field${x ? ` ${x}` : ""}`,
|
|
2945
2947
|
children: [
|
|
2946
2948
|
e && !A && /* @__PURE__ */ n(m.Label, {
|
|
2947
2949
|
className: "label",
|
|
2948
|
-
htmlFor:
|
|
2950
|
+
htmlFor: F,
|
|
2949
2951
|
children: [
|
|
2950
2952
|
e,
|
|
2951
2953
|
r && /* @__PURE__ */ t(X, {}),
|
|
@@ -2955,7 +2957,7 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2955
2957
|
})
|
|
2956
2958
|
]
|
|
2957
2959
|
}),
|
|
2958
|
-
|
|
2960
|
+
re,
|
|
2959
2961
|
i ? /* @__PURE__ */ t("div", {
|
|
2960
2962
|
className: "field-error",
|
|
2961
2963
|
children: i
|
|
@@ -2964,20 +2966,20 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2964
2966
|
children: a
|
|
2965
2967
|
}) : null,
|
|
2966
2968
|
w && /* @__PURE__ */ n("div", {
|
|
2967
|
-
className: `field-count${E &&
|
|
2968
|
-
children: [
|
|
2969
|
+
className: `field-count${E && H >= E ? " at-limit" : ""}`,
|
|
2970
|
+
children: [H, E ? ` / ${E}` : ""]
|
|
2969
2971
|
})
|
|
2970
2972
|
]
|
|
2971
2973
|
});
|
|
2972
|
-
}),
|
|
2973
|
-
function
|
|
2974
|
+
}), Re = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
|
|
2975
|
+
function ze({ 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 }) {
|
|
2974
2976
|
T("AppModal", v);
|
|
2975
2977
|
let y = c(null);
|
|
2976
2978
|
a(() => {
|
|
2977
2979
|
if (!e) return;
|
|
2978
2980
|
let t = y.current?.closest(".modal-content");
|
|
2979
2981
|
if (!t) return;
|
|
2980
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
2982
|
+
let n = () => Array.from(t.querySelectorAll(Re));
|
|
2981
2983
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
|
|
2982
2984
|
}, [e]);
|
|
2983
2985
|
let b = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
|
|
@@ -3062,7 +3064,7 @@ var $ = (e) => function({ size: n = 72 }) {
|
|
|
3062
3064
|
tone: e,
|
|
3063
3065
|
size: n
|
|
3064
3066
|
});
|
|
3065
|
-
},
|
|
3067
|
+
}, Be = {
|
|
3066
3068
|
success: $("success"),
|
|
3067
3069
|
error: $("error"),
|
|
3068
3070
|
warning: $("warning"),
|
|
@@ -3071,14 +3073,14 @@ var $ = (e) => function({ size: n = 72 }) {
|
|
|
3071
3073
|
};
|
|
3072
3074
|
//#endregion
|
|
3073
3075
|
//#region src/components/AppConfirmDialog.jsx
|
|
3074
|
-
function
|
|
3076
|
+
function Ve({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: u = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, ...h }) {
|
|
3075
3077
|
T("AppConfirmDialog", h);
|
|
3076
3078
|
let [g, _] = l("");
|
|
3077
3079
|
if (a(() => {
|
|
3078
3080
|
r || _("");
|
|
3079
3081
|
}, [r]), !r) return null;
|
|
3080
|
-
let v = !!f && g.trim() !== f, y =
|
|
3081
|
-
return /* @__PURE__ */ t(
|
|
3082
|
+
let v = !!f && g.trim() !== f, y = Be[d || (u ? "delete" : "info")];
|
|
3083
|
+
return /* @__PURE__ */ t(ze, {
|
|
3082
3084
|
open: r,
|
|
3083
3085
|
hideHeader: !0,
|
|
3084
3086
|
title: i,
|
|
@@ -3114,7 +3116,7 @@ function ze({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
3114
3116
|
className: "lx-confirm-msg",
|
|
3115
3117
|
children: o
|
|
3116
3118
|
}),
|
|
3117
|
-
f && /* @__PURE__ */ t(
|
|
3119
|
+
f && /* @__PURE__ */ t(Le, {
|
|
3118
3120
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
3119
3121
|
label: /* @__PURE__ */ n(e, { children: [
|
|
3120
3122
|
"Type ",
|
|
@@ -3131,7 +3133,7 @@ function ze({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
3131
3133
|
}
|
|
3132
3134
|
//#endregion
|
|
3133
3135
|
//#region src/components/AppSkeleton.jsx
|
|
3134
|
-
function
|
|
3136
|
+
function He({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
|
|
3135
3137
|
return T("AppSkeleton", o), /* @__PURE__ */ t("span", {
|
|
3136
3138
|
className: `skeleton${i ? ` ${i}` : ""}`,
|
|
3137
3139
|
"aria-hidden": "true",
|
|
@@ -3143,7 +3145,7 @@ function Be({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
|
|
|
3143
3145
|
}
|
|
3144
3146
|
});
|
|
3145
3147
|
}
|
|
3146
|
-
var
|
|
3148
|
+
var Ue = [
|
|
3147
3149
|
"r0",
|
|
3148
3150
|
"r1",
|
|
3149
3151
|
"r2",
|
|
@@ -3152,7 +3154,7 @@ var Ve = [
|
|
|
3152
3154
|
"r5",
|
|
3153
3155
|
"r6",
|
|
3154
3156
|
"r7"
|
|
3155
|
-
],
|
|
3157
|
+
], We = [
|
|
3156
3158
|
"c0",
|
|
3157
3159
|
"c1",
|
|
3158
3160
|
"c2",
|
|
@@ -3162,15 +3164,15 @@ var Ve = [
|
|
|
3162
3164
|
"c6",
|
|
3163
3165
|
"c7"
|
|
3164
3166
|
];
|
|
3165
|
-
function
|
|
3166
|
-
return
|
|
3167
|
+
function Ge({ rows: e = 4, cols: n = 5 }) {
|
|
3168
|
+
return Ue.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: We.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(He, {
|
|
3167
3169
|
width: n === 0 ? "70%" : "50%",
|
|
3168
3170
|
height: 12
|
|
3169
3171
|
}) }, e)) }, e));
|
|
3170
3172
|
}
|
|
3171
3173
|
//#endregion
|
|
3172
3174
|
//#region src/components/AppSelectMini.jsx
|
|
3173
|
-
function
|
|
3175
|
+
function Ke({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: l, disabled: u, className: d, ...f }) {
|
|
3174
3176
|
T("AppSelectMini", f);
|
|
3175
3177
|
let p = c(null);
|
|
3176
3178
|
return a(() => {
|
|
@@ -3199,19 +3201,19 @@ function We({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
|
|
|
3199
3201
|
}
|
|
3200
3202
|
//#endregion
|
|
3201
3203
|
//#region src/components/AppTablePagination.jsx
|
|
3202
|
-
var
|
|
3204
|
+
var qe = [
|
|
3203
3205
|
5,
|
|
3204
3206
|
10,
|
|
3205
3207
|
25,
|
|
3206
3208
|
50
|
|
3207
3209
|
];
|
|
3208
|
-
function
|
|
3210
|
+
function Je({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = qe, ...d }) {
|
|
3209
3211
|
return T("AppTablePagination", d), /* @__PURE__ */ n("div", {
|
|
3210
3212
|
className: "table-pagination",
|
|
3211
3213
|
children: [
|
|
3212
3214
|
/* @__PURE__ */ n("span", {
|
|
3213
3215
|
className: "tpg-rows",
|
|
3214
|
-
children: ["Rows per page:", /* @__PURE__ */ t(
|
|
3216
|
+
children: ["Rows per page:", /* @__PURE__ */ t(Ke, {
|
|
3215
3217
|
value: i,
|
|
3216
3218
|
onChange: (e) => l(Number(e)),
|
|
3217
3219
|
ariaLabel: "Rows per page",
|
|
@@ -3260,13 +3262,13 @@ function Ke({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
|
|
|
3260
3262
|
}
|
|
3261
3263
|
//#endregion
|
|
3262
3264
|
//#region src/components/AppDataTable.jsx
|
|
3263
|
-
function
|
|
3265
|
+
function Ye(e) {
|
|
3264
3266
|
return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
3265
3267
|
}
|
|
3266
|
-
function
|
|
3268
|
+
function Xe(e) {
|
|
3267
3269
|
return e == null || e === "" ? "—" : e;
|
|
3268
3270
|
}
|
|
3269
|
-
function
|
|
3271
|
+
function Ze({ 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 }) {
|
|
3270
3272
|
T("AppDataTable", S);
|
|
3271
3273
|
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) => {
|
|
3272
3274
|
e && (e.indeterminate = D);
|
|
@@ -3291,7 +3293,7 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3291
3293
|
r.map((e, r) => {
|
|
3292
3294
|
let i = !!(e.sortable && s), a = o && o.key === e.key;
|
|
3293
3295
|
return /* @__PURE__ */ n("th", {
|
|
3294
|
-
className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") +
|
|
3296
|
+
className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") + Ye(e.align),
|
|
3295
3297
|
style: e.width ? { width: e.width } : void 0,
|
|
3296
3298
|
tabIndex: i ? 0 : void 0,
|
|
3297
3299
|
"aria-sort": a ? o.dir === "asc" ? "ascending" : "descending" : i ? "none" : void 0,
|
|
@@ -3318,7 +3320,7 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3318
3320
|
children: "Actions"
|
|
3319
3321
|
})
|
|
3320
3322
|
}))
|
|
3321
|
-
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(
|
|
3323
|
+
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(Ge, {
|
|
3322
3324
|
rows: l,
|
|
3323
3325
|
cols: C
|
|
3324
3326
|
}) : i?.length ? i.map((e) => {
|
|
@@ -3337,8 +3339,8 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3337
3339
|
})
|
|
3338
3340
|
}),
|
|
3339
3341
|
r.map((n, r) => /* @__PURE__ */ t("td", {
|
|
3340
|
-
className: (r === 0 ? "lx-name-cell " : "") +
|
|
3341
|
-
children: n.render ? n.render(e) :
|
|
3342
|
+
className: (r === 0 ? "lx-name-cell " : "") + Ye(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
|
|
3343
|
+
children: n.render ? n.render(e) : Xe(e[n.key])
|
|
3342
3344
|
}, n.key)),
|
|
3343
3345
|
p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
|
|
3344
3346
|
className: "u-row-actions",
|
|
@@ -3352,7 +3354,7 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3352
3354
|
children: A
|
|
3353
3355
|
}) }) })]
|
|
3354
3356
|
})
|
|
3355
|
-
}), h && !c && h.total > 0 && /* @__PURE__ */ t(
|
|
3357
|
+
}), h && !c && h.total > 0 && /* @__PURE__ */ t(Je, {
|
|
3356
3358
|
page: h.page,
|
|
3357
3359
|
totalPages: h.totalPages,
|
|
3358
3360
|
pageSize: h.pageSize,
|
|
@@ -3365,7 +3367,7 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3365
3367
|
}
|
|
3366
3368
|
//#endregion
|
|
3367
3369
|
//#region src/components/AppDatePicker.jsx
|
|
3368
|
-
function
|
|
3370
|
+
function Qe({ 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 }) {
|
|
3369
3371
|
T("AppDatePicker", y);
|
|
3370
3372
|
let b = c(null), x = o(), S = g || d || x;
|
|
3371
3373
|
a(() => {
|
|
@@ -3415,7 +3417,7 @@ function Xe({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
|
|
|
3415
3417
|
}
|
|
3416
3418
|
//#endregion
|
|
3417
3419
|
//#region src/components/AppDropdown.jsx
|
|
3418
|
-
var
|
|
3420
|
+
var $e = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
|
|
3419
3421
|
return /* @__PURE__ */ t("button", {
|
|
3420
3422
|
ref: l,
|
|
3421
3423
|
type: "button",
|
|
@@ -3429,11 +3431,11 @@ var Ze = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
|
|
|
3429
3431
|
})
|
|
3430
3432
|
});
|
|
3431
3433
|
});
|
|
3432
|
-
function
|
|
3434
|
+
function et({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
|
|
3433
3435
|
return T("AppDropdown", d), /* @__PURE__ */ n(_, {
|
|
3434
3436
|
align: s,
|
|
3435
3437
|
children: [/* @__PURE__ */ t(_.Toggle, {
|
|
3436
|
-
as:
|
|
3438
|
+
as: $e,
|
|
3437
3439
|
icon: e,
|
|
3438
3440
|
iconSize: r,
|
|
3439
3441
|
btnClassName: i,
|
|
@@ -3471,7 +3473,7 @@ function Qe({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3471
3473
|
}
|
|
3472
3474
|
//#endregion
|
|
3473
3475
|
//#region src/components/AppEmptyState.jsx
|
|
3474
|
-
function
|
|
3476
|
+
function tt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
|
|
3475
3477
|
return T("AppEmptyState", u), /* @__PURE__ */ n("div", {
|
|
3476
3478
|
className: [
|
|
3477
3479
|
"empty-state",
|
|
@@ -3504,7 +3506,7 @@ function $e({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
3504
3506
|
}
|
|
3505
3507
|
//#endregion
|
|
3506
3508
|
//#region src/components/AppFileAttachment.jsx
|
|
3507
|
-
function
|
|
3509
|
+
function nt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u = he, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
|
|
3508
3510
|
T("AppFileAttachment", h);
|
|
3509
3511
|
let g = o(), _ = m || s || g, [v, y] = l(null), [b, x] = l("");
|
|
3510
3512
|
a(() => {
|
|
@@ -3517,7 +3519,7 @@ function et({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
|
|
|
3517
3519
|
function S(e) {
|
|
3518
3520
|
let t = e.target.files?.[0];
|
|
3519
3521
|
if (e.target.value = "", !t) return;
|
|
3520
|
-
let n =
|
|
3522
|
+
let n = xe(t, {
|
|
3521
3523
|
accept: u,
|
|
3522
3524
|
maxSizeMb: d
|
|
3523
3525
|
});
|
|
@@ -3616,22 +3618,22 @@ function et({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
|
|
|
3616
3618
|
}
|
|
3617
3619
|
//#endregion
|
|
3618
3620
|
//#region src/components/toast.js
|
|
3619
|
-
var
|
|
3621
|
+
var rt = /* @__PURE__ */ new Set([
|
|
3620
3622
|
"success",
|
|
3621
3623
|
"info",
|
|
3622
3624
|
"warning",
|
|
3623
3625
|
"error"
|
|
3624
3626
|
]);
|
|
3625
|
-
function
|
|
3626
|
-
let n =
|
|
3627
|
+
function it(e, t = "success") {
|
|
3628
|
+
let n = rt.has(t) ? t : "success";
|
|
3627
3629
|
v[n](e, { toastId: `${n}:${e}` });
|
|
3628
3630
|
}
|
|
3629
|
-
function
|
|
3631
|
+
function at(e) {
|
|
3630
3632
|
v.error(e, { toastId: `error:${e}` });
|
|
3631
3633
|
}
|
|
3632
3634
|
//#endregion
|
|
3633
3635
|
//#region src/components/AppFilePicker.jsx
|
|
3634
|
-
function
|
|
3636
|
+
function ot({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p, ...m }) {
|
|
3635
3637
|
T("AppFilePicker", m);
|
|
3636
3638
|
let [h, g] = l(null), [_, v] = l(!1), y = c(null), b = o(), x = i || b;
|
|
3637
3639
|
a(() => {
|
|
@@ -3642,11 +3644,11 @@ function it({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
|
|
|
3642
3644
|
g(null);
|
|
3643
3645
|
}, [r]);
|
|
3644
3646
|
let S = r?.url || h, C = (e) => {
|
|
3645
|
-
let t =
|
|
3647
|
+
let t = xe(e, {
|
|
3646
3648
|
accept: u,
|
|
3647
3649
|
maxSizeMb: d
|
|
3648
3650
|
});
|
|
3649
|
-
return t ? (
|
|
3651
|
+
return t ? (it(t, "error"), !1) : (s(e), !0);
|
|
3650
3652
|
}, w = (e) => {
|
|
3651
3653
|
let t = e.target.files?.[0] || null;
|
|
3652
3654
|
t && (C(t) || (e.target.value = ""));
|
|
@@ -3757,7 +3759,7 @@ function it({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
|
|
|
3757
3759
|
}
|
|
3758
3760
|
//#endregion
|
|
3759
3761
|
//#region src/components/AppInfoList.jsx
|
|
3760
|
-
function
|
|
3762
|
+
function st({ items: r = [], className: i = "", ...a }) {
|
|
3761
3763
|
return T("AppInfoList", a), /* @__PURE__ */ t("div", {
|
|
3762
3764
|
className: `info-list${i ? ` ${i}` : ""}`,
|
|
3763
3765
|
children: r.map((r, i) => {
|
|
@@ -3790,7 +3792,7 @@ function at({ items: r = [], className: i = "", ...a }) {
|
|
|
3790
3792
|
}
|
|
3791
3793
|
//#endregion
|
|
3792
3794
|
//#region src/components/AppKpiTile.jsx
|
|
3793
|
-
function
|
|
3795
|
+
function ct({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
|
|
3794
3796
|
T("AppKpiTile", l);
|
|
3795
3797
|
let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
|
|
3796
3798
|
return /* @__PURE__ */ n("div", {
|
|
@@ -3823,7 +3825,7 @@ function ot({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
|
|
|
3823
3825
|
}
|
|
3824
3826
|
//#endregion
|
|
3825
3827
|
//#region src/components/AppLogoPicker.jsx
|
|
3826
|
-
function
|
|
3828
|
+
function lt({ 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 }) {
|
|
3827
3829
|
T("AppLogoPicker", m);
|
|
3828
3830
|
let h = c(null);
|
|
3829
3831
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
|
|
@@ -3869,12 +3871,12 @@ function st({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
|
|
|
3869
3871
|
onChange: (e) => {
|
|
3870
3872
|
let t = e.target.files?.[0];
|
|
3871
3873
|
if (e.target.value = "", !t) return;
|
|
3872
|
-
let n =
|
|
3874
|
+
let n = xe(t, {
|
|
3873
3875
|
accept: l,
|
|
3874
3876
|
maxSizeMb: u
|
|
3875
3877
|
});
|
|
3876
3878
|
if (n) {
|
|
3877
|
-
|
|
3879
|
+
it(n, "error");
|
|
3878
3880
|
return;
|
|
3879
3881
|
}
|
|
3880
3882
|
o(t);
|
|
@@ -3884,7 +3886,7 @@ function st({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
|
|
|
3884
3886
|
}
|
|
3885
3887
|
//#endregion
|
|
3886
3888
|
//#region src/components/AppMultiSelect.jsx
|
|
3887
|
-
function
|
|
3889
|
+
function ut({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: l = !0, disabled: u = !1, name: d, label: f, error: p, hint: m, required: h = !1, fieldClassName: g = "", ..._ }) {
|
|
3888
3890
|
T("AppMultiSelect", _);
|
|
3889
3891
|
let v = c(null);
|
|
3890
3892
|
return a(() => {
|
|
@@ -3931,7 +3933,7 @@ function ct({ values: e, onChange: r, options: i, placeholder: o = "Select…",
|
|
|
3931
3933
|
}
|
|
3932
3934
|
//#endregion
|
|
3933
3935
|
//#region src/components/AppOtpInput.jsx
|
|
3934
|
-
var
|
|
3936
|
+
var dt = 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) {
|
|
3935
3937
|
T("AppOtpInput", v);
|
|
3936
3938
|
let b = c(null), x = o(), S = g || h || x, C = (e) => {
|
|
3937
3939
|
b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
|
|
@@ -3984,7 +3986,7 @@ var lt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
|
|
|
3984
3986
|
});
|
|
3985
3987
|
//#endregion
|
|
3986
3988
|
//#region src/components/AppPageHeader.jsx
|
|
3987
|
-
function
|
|
3989
|
+
function ft({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
3988
3990
|
return T("AppPageHeader", o), /* @__PURE__ */ n("div", {
|
|
3989
3991
|
className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
|
|
3990
3992
|
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
|
|
@@ -4001,7 +4003,7 @@ function ut({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
|
4001
4003
|
}
|
|
4002
4004
|
//#endregion
|
|
4003
4005
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
4004
|
-
function
|
|
4006
|
+
function pt({ 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 }) {
|
|
4005
4007
|
T("AppPhoneNumberInput", m);
|
|
4006
4008
|
let h = c(null);
|
|
4007
4009
|
return a(() => {
|
|
@@ -4036,7 +4038,7 @@ function dt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
|
|
|
4036
4038
|
}
|
|
4037
4039
|
//#endregion
|
|
4038
4040
|
//#region src/components/AppPricingCard.jsx
|
|
4039
|
-
function
|
|
4041
|
+
function mt({ 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 }) {
|
|
4040
4042
|
return T("AppPricingCard", f), /* @__PURE__ */ n("div", {
|
|
4041
4043
|
className: [
|
|
4042
4044
|
"plan-card",
|
|
@@ -4089,7 +4091,7 @@ function ft({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
|
|
|
4089
4091
|
}
|
|
4090
4092
|
//#endregion
|
|
4091
4093
|
//#region src/components/AppRadio.jsx
|
|
4092
|
-
var
|
|
4094
|
+
var ht = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
4093
4095
|
T("AppRadio", s);
|
|
4094
4096
|
let l = o(), u = r || i || l;
|
|
4095
4097
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4110,7 +4112,7 @@ var pt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
4110
4112
|
});
|
|
4111
4113
|
//#endregion
|
|
4112
4114
|
//#region src/components/AppRepeater.jsx
|
|
4113
|
-
function
|
|
4115
|
+
function gt({ 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 }) {
|
|
4114
4116
|
T("AppRepeater", p);
|
|
4115
4117
|
let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
|
|
4116
4118
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4154,7 +4156,7 @@ function mt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
4154
4156
|
}
|
|
4155
4157
|
//#endregion
|
|
4156
4158
|
//#region src/components/AppResourceCard.jsx
|
|
4157
|
-
function
|
|
4159
|
+
function _t({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
|
|
4158
4160
|
T("AppResourceCard", u);
|
|
4159
4161
|
let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
4160
4162
|
className: "res-card-icon",
|
|
@@ -4186,7 +4188,7 @@ function ht({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
|
|
|
4186
4188
|
}
|
|
4187
4189
|
//#endregion
|
|
4188
4190
|
//#region src/components/AppSearch.jsx
|
|
4189
|
-
function
|
|
4191
|
+
function vt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize: o = 18, className: s = "", ...c }) {
|
|
4190
4192
|
return T("AppSearch", c), /* @__PURE__ */ n("div", {
|
|
4191
4193
|
className: [
|
|
4192
4194
|
"search-wrap",
|
|
@@ -4223,7 +4225,7 @@ function gt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
4223
4225
|
}
|
|
4224
4226
|
//#endregion
|
|
4225
4227
|
//#region src/components/AppSegmented.jsx
|
|
4226
|
-
function
|
|
4228
|
+
function yt({ options: e = [], value: r, onChange: i, label: a, name: s, size: c = "md", className: l = "", ...u }) {
|
|
4227
4229
|
T("AppSegmented", u);
|
|
4228
4230
|
let d = o(), f = s || d;
|
|
4229
4231
|
return /* @__PURE__ */ t("div", {
|
|
@@ -4252,14 +4254,14 @@ function _t({ options: e = [], value: r, onChange: i, label: a, name: s, size: c
|
|
|
4252
4254
|
}
|
|
4253
4255
|
//#endregion
|
|
4254
4256
|
//#region src/components/AppSelect.jsx
|
|
4255
|
-
var
|
|
4256
|
-
function
|
|
4257
|
+
var bt = (e) => e == null ? "" : e.label ?? e.text ?? "";
|
|
4258
|
+
function xt({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: l = !1, clearable: u = !1, size: d, floatingLabel: f = !1, disabled: p, label: m, required: h = !1, error: g, hint: _, help: v, helpLabel: y = "More information", id: b, name: x, className: S = "", fieldClassName: C = "", ...w }) {
|
|
4257
4259
|
T("AppSelect", w);
|
|
4258
4260
|
let E = c(null);
|
|
4259
4261
|
a(() => {
|
|
4260
4262
|
E.current && (E.current.options = i.map((e) => ({
|
|
4261
4263
|
value: e.value,
|
|
4262
|
-
label:
|
|
4264
|
+
label: bt(e)
|
|
4263
4265
|
})));
|
|
4264
4266
|
}, [i]), a(() => {
|
|
4265
4267
|
let t = E.current;
|
|
@@ -4324,7 +4326,7 @@ function yt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
|
|
|
4324
4326
|
}
|
|
4325
4327
|
//#endregion
|
|
4326
4328
|
//#region src/components/AppShell.jsx
|
|
4327
|
-
function
|
|
4329
|
+
function St({ 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 = "", ..._ }) {
|
|
4328
4330
|
T("AppShell", _);
|
|
4329
4331
|
let [v, y] = l(!1), [b, x] = l(!1), [S, C] = l(!1), w = d ?? v;
|
|
4330
4332
|
return a(() => {
|
|
@@ -4360,7 +4362,7 @@ function bt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
|
|
|
4360
4362
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
4361
4363
|
className: "app-nav-group-label",
|
|
4362
4364
|
children: e.label
|
|
4363
|
-
}), e.items.map((e) => /* @__PURE__ */ t(
|
|
4365
|
+
}), e.items.map((e) => /* @__PURE__ */ t(Ct, {
|
|
4364
4366
|
item: e,
|
|
4365
4367
|
linkComponent: h,
|
|
4366
4368
|
onNavigate: () => x(!1)
|
|
@@ -4430,7 +4432,7 @@ function bt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
|
|
|
4430
4432
|
]
|
|
4431
4433
|
});
|
|
4432
4434
|
}
|
|
4433
|
-
function
|
|
4435
|
+
function Ct({ item: r, linkComponent: i, onNavigate: a }) {
|
|
4434
4436
|
let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
|
|
4435
4437
|
r.icon && /* @__PURE__ */ t("span", {
|
|
4436
4438
|
className: "app-nav-icon",
|
|
@@ -4464,7 +4466,7 @@ function xt({ item: r, linkComponent: i, onNavigate: a }) {
|
|
|
4464
4466
|
}
|
|
4465
4467
|
//#endregion
|
|
4466
4468
|
//#region src/components/AppSidebarMenu.jsx
|
|
4467
|
-
var
|
|
4469
|
+
var wt = {
|
|
4468
4470
|
left: "start",
|
|
4469
4471
|
right: "end",
|
|
4470
4472
|
start: "start",
|
|
@@ -4472,11 +4474,11 @@ var St = {
|
|
|
4472
4474
|
top: "top",
|
|
4473
4475
|
bottom: "bottom"
|
|
4474
4476
|
};
|
|
4475
|
-
function
|
|
4477
|
+
function Tt({ 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 }) {
|
|
4476
4478
|
return T("AppSidebarMenu", b), /* @__PURE__ */ n(y, {
|
|
4477
4479
|
show: e,
|
|
4478
4480
|
onHide: r,
|
|
4479
|
-
placement:
|
|
4481
|
+
placement: wt[i] || "end",
|
|
4480
4482
|
backdrop: d,
|
|
4481
4483
|
scroll: f,
|
|
4482
4484
|
keyboard: p,
|
|
@@ -4520,7 +4522,7 @@ function Ct({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
4520
4522
|
}
|
|
4521
4523
|
//#endregion
|
|
4522
4524
|
//#region src/components/AppSpinner.jsx
|
|
4523
|
-
function
|
|
4525
|
+
function Et({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
4524
4526
|
return T("AppSpinner", i), /* @__PURE__ */ t("span", {
|
|
4525
4527
|
className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
|
|
4526
4528
|
role: "status",
|
|
@@ -4529,7 +4531,7 @@ function wt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
|
4529
4531
|
}
|
|
4530
4532
|
//#endregion
|
|
4531
4533
|
//#region src/components/AppSplash.jsx
|
|
4532
|
-
function
|
|
4534
|
+
function Dt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
|
|
4533
4535
|
return T("AppSplash", s), /* @__PURE__ */ t("div", {
|
|
4534
4536
|
className: `splash${o ? ` ${o}` : ""}`,
|
|
4535
4537
|
role: "status",
|
|
@@ -4556,7 +4558,7 @@ function Tt({ logo: e, initials: r, text: i, label: a = "Loading", className: o
|
|
|
4556
4558
|
}
|
|
4557
4559
|
//#endregion
|
|
4558
4560
|
//#region src/components/AppStatusBadge.jsx
|
|
4559
|
-
function
|
|
4561
|
+
function Ot({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
4560
4562
|
return T("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
|
|
4561
4563
|
className: `status-label ${n}${r ? ` ${r}` : ""}`,
|
|
4562
4564
|
children: e
|
|
@@ -4564,7 +4566,7 @@ function Et({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
|
4564
4566
|
}
|
|
4565
4567
|
//#endregion
|
|
4566
4568
|
//#region src/components/AppStepper.jsx
|
|
4567
|
-
function
|
|
4569
|
+
function kt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
4568
4570
|
return T("AppStepper", c), /* @__PURE__ */ t("nav", {
|
|
4569
4571
|
className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
|
|
4570
4572
|
"aria-label": a,
|
|
@@ -4611,7 +4613,7 @@ function Dt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
|
|
|
4611
4613
|
}
|
|
4612
4614
|
//#endregion
|
|
4613
4615
|
//#region src/components/AppSwitch.jsx
|
|
4614
|
-
var
|
|
4616
|
+
var At = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
4615
4617
|
T("AppSwitch", s);
|
|
4616
4618
|
let l = o(), u = r || i || l;
|
|
4617
4619
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4632,7 +4634,7 @@ var Ot = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
4632
4634
|
});
|
|
4633
4635
|
//#endregion
|
|
4634
4636
|
//#region src/components/AppTableEmptyState.jsx
|
|
4635
|
-
function
|
|
4637
|
+
function jt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
4636
4638
|
return T("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
|
|
4637
4639
|
className: "tbl-empty",
|
|
4638
4640
|
children: [
|
|
@@ -4660,7 +4662,7 @@ function kt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
|
4660
4662
|
}
|
|
4661
4663
|
//#endregion
|
|
4662
4664
|
//#region src/components/AppTabs.jsx
|
|
4663
|
-
function
|
|
4665
|
+
function Mt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...l }) {
|
|
4664
4666
|
T("AppTabs", l);
|
|
4665
4667
|
let u = c(null);
|
|
4666
4668
|
function d(t) {
|
|
@@ -4704,7 +4706,7 @@ function At({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4704
4706
|
}
|
|
4705
4707
|
//#endregion
|
|
4706
4708
|
//#region src/components/AppTextarea.jsx
|
|
4707
|
-
var
|
|
4709
|
+
var Nt = 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) {
|
|
4708
4710
|
T("AppTextarea", v);
|
|
4709
4711
|
let b = d || f, x = [
|
|
4710
4712
|
"textarea",
|
|
@@ -4766,7 +4768,7 @@ var jt = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
|
|
|
4766
4768
|
});
|
|
4767
4769
|
//#endregion
|
|
4768
4770
|
//#region src/components/AppTimeline.jsx
|
|
4769
|
-
function
|
|
4771
|
+
function Pt({ items: e = [], className: r = "", ...i }) {
|
|
4770
4772
|
return T("AppTimeline", i), /* @__PURE__ */ t("ol", {
|
|
4771
4773
|
className: `timeline${r ? ` ${r}` : ""}`,
|
|
4772
4774
|
children: e.map((e, r) => /* @__PURE__ */ n("li", {
|
|
@@ -4804,4 +4806,4 @@ function Mt({ items: e = [], className: r = "", ...i }) {
|
|
|
4804
4806
|
});
|
|
4805
4807
|
}
|
|
4806
4808
|
//#endregion
|
|
4807
|
-
export { k as ActionIcon, A as AppAccordion, j as AppAlert,
|
|
4809
|
+
export { k as ActionIcon, A as AppAccordion, j as AppAlert, Ce as AppAutocomplete, Te as AppAvatar, Ee as AppBadge, Z as AppButton, ke as AppCallout, Ae as AppCard, je as AppCheckbox, Me as AppChip, Ne as AppChoiceCard, Pe as AppChoiceChip, Fe as AppColorField, Ie as AppCompareTable, Ve as AppConfirmDialog, Ze as AppDataTable, Qe as AppDatePicker, et as AppDropdown, tt as AppEmptyState, nt as AppFileAttachment, ot as AppFilePicker, st as AppInfoList, Q as AppInfoTip, Le as AppInput, ct as AppKpiTile, lt as AppLogoPicker, ze as AppModal, ut as AppMultiSelect, dt as AppOtpInput, ft as AppPageHeader, pt as AppPhoneNumberInput, mt as AppPricingCard, ht as AppRadio, gt as AppRepeater, _t as AppResourceCard, vt as AppSearch, yt as AppSegmented, xt as AppSelect, Ke as AppSelectMini, St as AppShell, Tt as AppSidebarMenu, He as AppSkeleton, Ge as AppSkeletonRows, Et as AppSpinner, Dt as AppSplash, Ot as AppStatusBadge, kt as AppStepper, At as AppSwitch, jt as AppTableEmptyState, Je as AppTablePagination, Mt as AppTabs, Nt as AppTextarea, Pt as AppTimeline, O as Icon, Be as MODAL_ICONS, X as RequiredMark, at as errorToast, D as iconNames, it as toast };
|