@webority/ui-react 0.6.8 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/AppOtpInput.d.ts +12 -0
- package/dist/ui-react.js +228 -232
- 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,60 +512,57 @@ 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
|
}
|
|
553
558
|
_position(e, t) {
|
|
554
|
-
|
|
555
|
-
t.classList.toggle("drop-up", a), t.style.position = "fixed", t.style.top = a ? `${Math.max(4, n.top - r - 4)}px` : `${n.bottom + 4}px`;
|
|
556
|
-
let o = t.offsetWidth, s = Math.min(n.left, window.innerWidth - o - 4);
|
|
557
|
-
t.style.left = `${Math.max(4, s)}px`;
|
|
559
|
+
F(e, t);
|
|
558
560
|
}
|
|
559
561
|
_wire() {
|
|
560
562
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector(".datepicker-pop");
|
|
561
563
|
if (!e || !t) return;
|
|
562
564
|
let n = () => !t.hidden, r = () => {
|
|
563
|
-
if (!
|
|
565
|
+
if (!G(this._value) && !this._viewNavigated) {
|
|
564
566
|
let e = /* @__PURE__ */ new Date();
|
|
565
567
|
this._viewY = e.getFullYear(), this._viewM = e.getMonth();
|
|
566
568
|
}
|
|
@@ -589,7 +591,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
589
591
|
disconnectedCallback() {
|
|
590
592
|
this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey);
|
|
591
593
|
}
|
|
592
|
-
},
|
|
594
|
+
}, re = class extends HTMLElement {
|
|
593
595
|
_accessibleName() {
|
|
594
596
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
595
597
|
}
|
|
@@ -621,7 +623,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
621
623
|
return this._values.slice();
|
|
622
624
|
}
|
|
623
625
|
set values(e) {
|
|
624
|
-
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();
|
|
625
627
|
}
|
|
626
628
|
set options(e) {
|
|
627
629
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -635,7 +637,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
635
637
|
e.length && (this._declared = e.map((e) => ({
|
|
636
638
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
637
639
|
label: e.innerHTML,
|
|
638
|
-
[
|
|
640
|
+
[R]: !0,
|
|
639
641
|
selected: e.hasAttribute("selected")
|
|
640
642
|
})));
|
|
641
643
|
}
|
|
@@ -648,50 +650,47 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
648
650
|
}
|
|
649
651
|
_labelHtmlFor(e) {
|
|
650
652
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
651
|
-
return t ?
|
|
653
|
+
return t ? B(t) : z(e);
|
|
652
654
|
}
|
|
653
655
|
render() {
|
|
654
656
|
this._snapshotDeclared();
|
|
655
657
|
let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…";
|
|
656
|
-
|
|
658
|
+
L(this, this._values.join(",")), this.innerHTML = `
|
|
657
659
|
<div class="search-select">
|
|
658
|
-
<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\"" : ""}>
|
|
659
661
|
<div class="ms-chips" data-chips></div>
|
|
660
662
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
661
663
|
</div>
|
|
662
664
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
|
|
663
|
-
${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>` : ""}
|
|
664
666
|
<div class="search-select-options"></div>
|
|
665
667
|
<div class="search-select-empty" hidden>No matches</div>
|
|
666
668
|
</div>
|
|
667
|
-
</div>`, this._rendered = !0,
|
|
669
|
+
</div>`, this._rendered = !0, L(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
|
|
668
670
|
}
|
|
669
671
|
_renderControl() {
|
|
670
672
|
let e = this.querySelector("[data-chips]");
|
|
671
673
|
if (!e) return;
|
|
672
674
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
673
675
|
if (!this._values.length) {
|
|
674
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
676
|
+
e.innerHTML = `<span class="search-select-placeholder">${z(t)}</span>`;
|
|
675
677
|
return;
|
|
676
678
|
}
|
|
677
|
-
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("");
|
|
678
680
|
}
|
|
679
681
|
_renderOptions(e) {
|
|
680
682
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
681
683
|
if (!t) return;
|
|
682
684
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
683
|
-
r && (i = i.filter((e) =>
|
|
685
|
+
r && (i = i.filter((e) => ie(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
|
|
684
686
|
let t = this._values.includes(String(e.value));
|
|
685
|
-
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>`;
|
|
686
688
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1;
|
|
687
689
|
}
|
|
688
690
|
_wire() {
|
|
689
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");
|
|
690
692
|
if (!e || !t) return;
|
|
691
|
-
let a = () => this.hasAttribute("disabled"), o = () => {
|
|
692
|
-
let n = e.getBoundingClientRect();
|
|
693
|
-
t.style.position = "fixed", t.style.top = `${n.bottom + 4}px`, t.style.left = `${n.left}px`, t.style.width = `${n.width}px`;
|
|
694
|
-
}, 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) => {
|
|
695
694
|
let t = c();
|
|
696
695
|
this._active = e;
|
|
697
696
|
for (let e of s()) e.classList.remove("is-active");
|
|
@@ -701,7 +700,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
701
700
|
}, f = () => {
|
|
702
701
|
t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
|
|
703
702
|
}, p = () => {
|
|
704
|
-
|
|
703
|
+
L(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
705
704
|
}, m = (e) => {
|
|
706
705
|
let t = String(e);
|
|
707
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();
|
|
@@ -745,7 +744,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
745
744
|
disconnectedCallback() {
|
|
746
745
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
747
746
|
}
|
|
748
|
-
},
|
|
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 {
|
|
749
748
|
static get observedAttributes() {
|
|
750
749
|
return [
|
|
751
750
|
"value",
|
|
@@ -772,16 +771,16 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
772
771
|
return this._value ?? "";
|
|
773
772
|
}
|
|
774
773
|
set value(e) {
|
|
775
|
-
this._value = this._clean(e),
|
|
774
|
+
this._value = this._clean(e), L(this, this._value), this._paint();
|
|
776
775
|
}
|
|
777
776
|
_clean(e) {
|
|
778
|
-
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);
|
|
779
778
|
}
|
|
780
779
|
connectedCallback() {
|
|
781
780
|
this._rendered || this.render();
|
|
782
781
|
}
|
|
783
782
|
attributeChangedCallback(e, t, n) {
|
|
784
|
-
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());
|
|
785
784
|
}
|
|
786
785
|
render() {
|
|
787
786
|
this._value = this._clean(this.getAttribute("value") ?? this._value);
|
|
@@ -799,7 +798,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
799
798
|
spellcheck="false"
|
|
800
799
|
${n ? "disabled" : ""} />
|
|
801
800
|
<div class="otp-slots" aria-hidden="true">${r}</div>
|
|
802
|
-
</div>`, this._rendered = !0,
|
|
801
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire(), this._paint();
|
|
803
802
|
}
|
|
804
803
|
_refs() {
|
|
805
804
|
return {
|
|
@@ -821,7 +820,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
821
820
|
if (!e) return;
|
|
822
821
|
let t = (e) => {
|
|
823
822
|
let t = this._clean(e), n = t !== this._value;
|
|
824
|
-
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", {
|
|
825
824
|
bubbles: !0,
|
|
826
825
|
detail: t
|
|
827
826
|
}));
|
|
@@ -841,7 +840,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
841
840
|
document.activeElement === e && this._paint();
|
|
842
841
|
});
|
|
843
842
|
}
|
|
844
|
-
},
|
|
843
|
+
}, ce = [
|
|
845
844
|
[
|
|
846
845
|
"AF",
|
|
847
846
|
"Afghanistan",
|
|
@@ -2067,11 +2066,11 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2067
2066
|
"Zimbabwe",
|
|
2068
2067
|
"263"
|
|
2069
2068
|
]
|
|
2070
|
-
],
|
|
2069
|
+
], le = (e) => (ce.find((t) => t[0] === e) || [
|
|
2071
2070
|
"",
|
|
2072
2071
|
"",
|
|
2073
2072
|
""
|
|
2074
|
-
])[2],
|
|
2073
|
+
])[2], ue = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, de = class extends HTMLElement {
|
|
2075
2074
|
static get observedAttributes() {
|
|
2076
2075
|
return [
|
|
2077
2076
|
"value",
|
|
@@ -2090,33 +2089,33 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2090
2089
|
this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
|
|
2091
2090
|
}
|
|
2092
2091
|
get value() {
|
|
2093
|
-
return `+${
|
|
2092
|
+
return `+${le(this._country)}${this._national}`;
|
|
2094
2093
|
}
|
|
2095
2094
|
set value(e) {
|
|
2096
2095
|
this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
|
|
2097
2096
|
}
|
|
2098
2097
|
_commit() {
|
|
2099
|
-
|
|
2098
|
+
L(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2100
2099
|
}
|
|
2101
2100
|
render() {
|
|
2102
2101
|
let e = this.getAttribute("placeholder") || "Enter phone number";
|
|
2103
2102
|
this._country = this.getAttribute("country") || this._country;
|
|
2104
|
-
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("");
|
|
2105
2104
|
this.innerHTML = `
|
|
2106
2105
|
<div class="phone-input-wrap">
|
|
2107
2106
|
<div class="phone-country-adornment">
|
|
2108
2107
|
<button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2109
|
-
<span class="${
|
|
2108
|
+
<span class="${ue(this._country)}" data-flag aria-hidden="true"></span>
|
|
2110
2109
|
<i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
|
|
2111
|
-
<span class="phone-dial" data-dial>+${
|
|
2110
|
+
<span class="phone-dial" data-dial>+${le(this._country)}</span>
|
|
2112
2111
|
</button>
|
|
2113
2112
|
<div class="country-dropdown-menu" role="listbox" hidden>
|
|
2114
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>
|
|
2115
2114
|
<div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
|
|
2116
2115
|
</div>
|
|
2117
2116
|
</div>
|
|
2118
|
-
<input type="tel" class="input" placeholder="${
|
|
2119
|
-
</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();
|
|
2120
2119
|
}
|
|
2121
2120
|
_wire() {
|
|
2122
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]");
|
|
@@ -2140,7 +2139,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2140
2139
|
}
|
|
2141
2140
|
i && (i.hidden = n > 0);
|
|
2142
2141
|
}, p = (e) => {
|
|
2143
|
-
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)}`);
|
|
2144
2143
|
for (let t of r.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
|
|
2145
2144
|
d(), this._commit();
|
|
2146
2145
|
};
|
|
@@ -2151,12 +2150,12 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2151
2150
|
this._national = a.value.replace(/[^0-9]/g, ""), this._commit();
|
|
2152
2151
|
}), this._onDocClick = (e) => {
|
|
2153
2152
|
c() && !this.contains(e.target) && d();
|
|
2154
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
2153
|
+
}, document.addEventListener("click", this._onDocClick), L(this, this.value);
|
|
2155
2154
|
}
|
|
2156
2155
|
disconnectedCallback() {
|
|
2157
2156
|
this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2158
2157
|
}
|
|
2159
|
-
},
|
|
2158
|
+
}, fe = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), pe = class extends HTMLElement {
|
|
2160
2159
|
static get observedAttributes() {
|
|
2161
2160
|
return [
|
|
2162
2161
|
"value",
|
|
@@ -2186,7 +2185,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2186
2185
|
return this._value;
|
|
2187
2186
|
}
|
|
2188
2187
|
set value(e) {
|
|
2189
|
-
this._value = e == null ? "" : String(e),
|
|
2188
|
+
this._value = e == null ? "" : String(e), L(this, this._value), this._syncSelected(), this._syncReset();
|
|
2190
2189
|
}
|
|
2191
2190
|
set options(e) {
|
|
2192
2191
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -2200,7 +2199,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2200
2199
|
e.length && (this._declared = e.map((e) => ({
|
|
2201
2200
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
2202
2201
|
label: e.innerHTML,
|
|
2203
|
-
[
|
|
2202
|
+
[R]: !0,
|
|
2204
2203
|
selected: e.hasAttribute("selected")
|
|
2205
2204
|
})));
|
|
2206
2205
|
}
|
|
@@ -2210,23 +2209,23 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2210
2209
|
render() {
|
|
2211
2210
|
this._snapshotDeclared();
|
|
2212
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);
|
|
2213
|
-
s && (this._value = String(s.value)),
|
|
2212
|
+
s && (this._value = String(s.value)), L(this, this._value);
|
|
2214
2213
|
let c = e.map((e) => {
|
|
2215
2214
|
let t = String(e.value) === String(this._value);
|
|
2216
|
-
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>`;
|
|
2217
2216
|
}).join("");
|
|
2218
2217
|
this.innerHTML = `
|
|
2219
2218
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
2220
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
2221
|
-
<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>
|
|
2222
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>" : ""}
|
|
2223
2222
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
2224
2223
|
</button>
|
|
2225
2224
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
|
|
2226
|
-
${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>` : ""}
|
|
2227
2226
|
<div class="search-select-options">${c}<div class="search-select-empty" hidden>No matches</div></div>
|
|
2228
2227
|
</div>
|
|
2229
|
-
</div>`, this._rendered = !0,
|
|
2228
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire(), this._syncReset();
|
|
2230
2229
|
}
|
|
2231
2230
|
_refs() {
|
|
2232
2231
|
return {
|
|
@@ -2252,7 +2251,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2252
2251
|
let t = e.dataset.value === String(this._value);
|
|
2253
2252
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
2254
2253
|
}
|
|
2255
|
-
e && (e.innerHTML = t ?
|
|
2254
|
+
e && (e.innerHTML = t ? B(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
|
|
2256
2255
|
}
|
|
2257
2256
|
_syncReset() {
|
|
2258
2257
|
let { reset: e } = this._refs();
|
|
@@ -2261,10 +2260,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2261
2260
|
_wire() {
|
|
2262
2261
|
let e = this._refs();
|
|
2263
2262
|
if (!e.control || !e.menu) return;
|
|
2264
|
-
let t = () => {
|
|
2265
|
-
let t = e.control.getBoundingClientRect();
|
|
2266
|
-
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`;
|
|
2267
|
-
}, n = (e) => {
|
|
2263
|
+
let t = () => F(e.control, e.menu, { matchWidth: !0 }), n = (e) => {
|
|
2268
2264
|
let t = this._visible();
|
|
2269
2265
|
this._active = e;
|
|
2270
2266
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -2313,14 +2309,14 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2313
2309
|
disconnectedCallback() {
|
|
2314
2310
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2315
2311
|
}
|
|
2316
|
-
},
|
|
2312
|
+
}, me = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), he = "image/png,image/jpeg,image/webp", ge = {
|
|
2317
2313
|
"image/png": [".png"],
|
|
2318
2314
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
2319
2315
|
"image/webp": [".webp"],
|
|
2320
2316
|
"image/gif": [".gif"],
|
|
2321
2317
|
"image/svg+xml": [".svg"],
|
|
2322
2318
|
"application/pdf": [".pdf"]
|
|
2323
|
-
},
|
|
2319
|
+
}, _e = {
|
|
2324
2320
|
"image/png": "PNG",
|
|
2325
2321
|
"image/jpeg": "JPG",
|
|
2326
2322
|
"image/webp": "WEBP",
|
|
@@ -2334,33 +2330,33 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2334
2330
|
".gif": "GIF",
|
|
2335
2331
|
".svg": "SVG",
|
|
2336
2332
|
".pdf": "PDF"
|
|
2337
|
-
},
|
|
2338
|
-
function
|
|
2333
|
+
}, ve = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
2334
|
+
function ye(e) {
|
|
2339
2335
|
let t = [];
|
|
2340
|
-
for (let n of
|
|
2341
|
-
let e =
|
|
2336
|
+
for (let n of ve(e)) {
|
|
2337
|
+
let e = _e[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
2342
2338
|
t.includes(e) || t.push(e);
|
|
2343
2339
|
}
|
|
2344
2340
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
2345
2341
|
}
|
|
2346
|
-
function
|
|
2347
|
-
let n =
|
|
2342
|
+
function be(e, t) {
|
|
2343
|
+
let n = ve(t);
|
|
2348
2344
|
if (!n.length) return !0;
|
|
2349
2345
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
2350
|
-
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)));
|
|
2351
2347
|
}
|
|
2352
|
-
function
|
|
2348
|
+
function xe(e, t = {}) {
|
|
2353
2349
|
if (!e) return null;
|
|
2354
|
-
let n = t.accept === void 0 ?
|
|
2355
|
-
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.`;
|
|
2356
2352
|
}
|
|
2357
2353
|
var Y = (e, t) => {
|
|
2358
2354
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
2359
2355
|
};
|
|
2360
|
-
function
|
|
2361
|
-
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);
|
|
2362
2358
|
}
|
|
2363
|
-
|
|
2359
|
+
Se();
|
|
2364
2360
|
//#endregion
|
|
2365
2361
|
//#region src/components/RequiredMark.jsx
|
|
2366
2362
|
function X() {
|
|
@@ -2372,7 +2368,7 @@ function X() {
|
|
|
2372
2368
|
}
|
|
2373
2369
|
//#endregion
|
|
2374
2370
|
//#region src/components/AppAutocomplete.jsx
|
|
2375
|
-
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 }) {
|
|
2376
2372
|
T("AppAutocomplete", v);
|
|
2377
2373
|
let y = c(null), b = typeof o == "function";
|
|
2378
2374
|
return a(() => {
|
|
@@ -2433,13 +2429,13 @@ function xe({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
|
|
|
2433
2429
|
}
|
|
2434
2430
|
//#endregion
|
|
2435
2431
|
//#region src/components/AppAvatar.jsx
|
|
2436
|
-
function
|
|
2432
|
+
function we(e) {
|
|
2437
2433
|
let t = (e || "").trim();
|
|
2438
2434
|
if (!t) return "?";
|
|
2439
2435
|
let n = t.split(/\s+/).filter(Boolean);
|
|
2440
2436
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
2441
2437
|
}
|
|
2442
|
-
function
|
|
2438
|
+
function Te({ name: e, src: n, className: r = "", ...i }) {
|
|
2443
2439
|
T("AppAvatar", i);
|
|
2444
2440
|
let a = ["avatar", r].filter(Boolean).join(" ");
|
|
2445
2441
|
return n ? /* @__PURE__ */ t("span", {
|
|
@@ -2453,12 +2449,12 @@ function Ce({ name: e, src: n, className: r = "", ...i }) {
|
|
|
2453
2449
|
className: a,
|
|
2454
2450
|
role: "img",
|
|
2455
2451
|
"aria-label": e,
|
|
2456
|
-
children:
|
|
2452
|
+
children: we(e)
|
|
2457
2453
|
});
|
|
2458
2454
|
}
|
|
2459
2455
|
//#endregion
|
|
2460
2456
|
//#region src/components/AppBadge.jsx
|
|
2461
|
-
function
|
|
2457
|
+
function Ee({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
2462
2458
|
return T("AppBadge", a), /* @__PURE__ */ t(d, {
|
|
2463
2459
|
bg: !1,
|
|
2464
2460
|
className: [
|
|
@@ -2472,14 +2468,14 @@ function we({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
|
2472
2468
|
}
|
|
2473
2469
|
//#endregion
|
|
2474
2470
|
//#region src/components/AppButton.jsx
|
|
2475
|
-
var
|
|
2471
|
+
var De = {
|
|
2476
2472
|
primary: "primary",
|
|
2477
2473
|
secondary: "secondary",
|
|
2478
2474
|
outline: "outline-primary",
|
|
2479
2475
|
ghost: "link",
|
|
2480
2476
|
danger: "danger"
|
|
2481
2477
|
};
|
|
2482
|
-
function
|
|
2478
|
+
function Oe(e, n) {
|
|
2483
2479
|
if (!e) return null;
|
|
2484
2480
|
let r = n === "left" ? "me-2" : "ms-2";
|
|
2485
2481
|
return typeof e == "string" ? /* @__PURE__ */ t(O, {
|
|
@@ -2496,7 +2492,7 @@ function Z({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2496
2492
|
let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
|
|
2497
2493
|
return /* @__PURE__ */ n(f, {
|
|
2498
2494
|
type: (p.as === void 0 || p.as === "button") && p.href === void 0 ? a : void 0,
|
|
2499
|
-
variant:
|
|
2495
|
+
variant: De[r] ?? "primary",
|
|
2500
2496
|
size: i === "md" ? void 0 : i,
|
|
2501
2497
|
disabled: s || o,
|
|
2502
2498
|
className: m || void 0,
|
|
@@ -2506,15 +2502,15 @@ function Z({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2506
2502
|
className: "spinner-border spinner-border-sm me-2",
|
|
2507
2503
|
"aria-hidden": "true"
|
|
2508
2504
|
}),
|
|
2509
|
-
!o &&
|
|
2505
|
+
!o && Oe(l, "left"),
|
|
2510
2506
|
e,
|
|
2511
|
-
!o &&
|
|
2507
|
+
!o && Oe(u, "right")
|
|
2512
2508
|
]
|
|
2513
2509
|
});
|
|
2514
2510
|
}
|
|
2515
2511
|
//#endregion
|
|
2516
2512
|
//#region src/components/AppCallout.jsx
|
|
2517
|
-
function
|
|
2513
|
+
function ke({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
2518
2514
|
return T("AppCallout", a), /* @__PURE__ */ n("div", {
|
|
2519
2515
|
className: `info-callout${i ? ` ${i}` : ""}`,
|
|
2520
2516
|
children: [r && /* @__PURE__ */ t("span", {
|
|
@@ -2528,7 +2524,7 @@ function De({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
|
2528
2524
|
}
|
|
2529
2525
|
//#endregion
|
|
2530
2526
|
//#region src/components/AppCard.jsx
|
|
2531
|
-
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 }) {
|
|
2532
2528
|
T("AppCard", h);
|
|
2533
2529
|
let g = a != null || r != null || o != null || s != null;
|
|
2534
2530
|
return /* @__PURE__ */ n(p, {
|
|
@@ -2553,7 +2549,7 @@ function Oe({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2553
2549
|
}
|
|
2554
2550
|
//#endregion
|
|
2555
2551
|
//#region src/components/AppCheckbox.jsx
|
|
2556
|
-
var
|
|
2552
|
+
var je = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
2557
2553
|
T("AppCheckbox", s);
|
|
2558
2554
|
let l = o(), u = r || i || l;
|
|
2559
2555
|
return /* @__PURE__ */ n("div", {
|
|
@@ -2574,7 +2570,7 @@ var ke = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
2574
2570
|
});
|
|
2575
2571
|
//#endregion
|
|
2576
2572
|
//#region src/components/AppChip.jsx
|
|
2577
|
-
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 }) {
|
|
2578
2574
|
T("AppChip", m);
|
|
2579
2575
|
let h = r ?? i, g = [
|
|
2580
2576
|
"chip",
|
|
@@ -2626,7 +2622,7 @@ function Ae({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2626
2622
|
}
|
|
2627
2623
|
//#endregion
|
|
2628
2624
|
//#region src/components/AppChoiceCard.jsx
|
|
2629
|
-
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 }) {
|
|
2630
2626
|
return T("AppChoiceCard", y), /* @__PURE__ */ n("label", {
|
|
2631
2627
|
className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
2632
2628
|
children: [
|
|
@@ -2674,7 +2670,7 @@ function je({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2674
2670
|
}
|
|
2675
2671
|
//#endregion
|
|
2676
2672
|
//#region src/components/AppChoiceChip.jsx
|
|
2677
|
-
function
|
|
2673
|
+
function Pe({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
|
|
2678
2674
|
return T("AppChoiceChip", d), /* @__PURE__ */ n("label", {
|
|
2679
2675
|
className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
|
|
2680
2676
|
children: [
|
|
@@ -2695,7 +2691,7 @@ function Me({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
|
|
|
2695
2691
|
}
|
|
2696
2692
|
//#endregion
|
|
2697
2693
|
//#region src/components/AppColorField.jsx
|
|
2698
|
-
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 }) {
|
|
2699
2695
|
T("AppColorField", f);
|
|
2700
2696
|
let p = l || c;
|
|
2701
2697
|
return /* @__PURE__ */ n("div", {
|
|
@@ -2743,7 +2739,7 @@ function Ne({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
2743
2739
|
}
|
|
2744
2740
|
//#endregion
|
|
2745
2741
|
//#region src/components/AppCompareTable.jsx
|
|
2746
|
-
function
|
|
2742
|
+
function Ie({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
|
|
2747
2743
|
T("AppCompareTable", o);
|
|
2748
2744
|
let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
|
|
2749
2745
|
className: "compare-yes",
|
|
@@ -2826,56 +2822,56 @@ function Q({ label: e, children: r, ...i }) {
|
|
|
2826
2822
|
}
|
|
2827
2823
|
//#endregion
|
|
2828
2824
|
//#region src/components/AppInput.jsx
|
|
2829
|
-
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) {
|
|
2830
2826
|
T("AppInput", j);
|
|
2831
|
-
let [N,
|
|
2832
|
-
|
|
2833
|
-
},
|
|
2834
|
-
|
|
2835
|
-
},
|
|
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", {
|
|
2836
2832
|
type: "button",
|
|
2837
2833
|
className: "input-clear",
|
|
2838
2834
|
onClick: () => {
|
|
2839
|
-
let e =
|
|
2835
|
+
let e = R.current;
|
|
2840
2836
|
if (!e) return;
|
|
2841
2837
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
2842
|
-
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();
|
|
2843
2839
|
},
|
|
2844
2840
|
"aria-label": "Clear",
|
|
2845
2841
|
tabIndex: -1,
|
|
2846
|
-
hidden: !
|
|
2842
|
+
hidden: !ee,
|
|
2847
2843
|
children: /* @__PURE__ */ t(O, {
|
|
2848
2844
|
name: "x",
|
|
2849
2845
|
size: 16
|
|
2850
2846
|
})
|
|
2851
|
-
}) : null,
|
|
2847
|
+
}) : null, K = [
|
|
2852
2848
|
"input",
|
|
2853
2849
|
d === "sm" ? "input-sm" : "",
|
|
2854
2850
|
d === "lg" ? "input-lg" : "",
|
|
2855
2851
|
i ? "error" : "",
|
|
2856
|
-
|
|
2852
|
+
I ? "pw" : "",
|
|
2857
2853
|
_ ? "num-input" : "",
|
|
2858
2854
|
C ? "has-clear" : "",
|
|
2859
2855
|
b
|
|
2860
|
-
].filter(Boolean).join(" "),
|
|
2861
|
-
id:
|
|
2856
|
+
].filter(Boolean).join(" "), q = /* @__PURE__ */ t(m.Control, {
|
|
2857
|
+
id: F,
|
|
2862
2858
|
name: y,
|
|
2863
|
-
type:
|
|
2864
|
-
className:
|
|
2859
|
+
type: L,
|
|
2860
|
+
className: K,
|
|
2865
2861
|
disabled: S,
|
|
2866
2862
|
required: r,
|
|
2867
2863
|
"aria-invalid": i ? "true" : "false",
|
|
2868
2864
|
maxLength: E,
|
|
2869
2865
|
...j,
|
|
2870
2866
|
placeholder: A ? " " : j.placeholder,
|
|
2871
|
-
ref:
|
|
2872
|
-
onInput:
|
|
2873
|
-
}),
|
|
2874
|
-
return
|
|
2867
|
+
ref: z,
|
|
2868
|
+
onInput: W ? ne : j.onInput
|
|
2869
|
+
}), re;
|
|
2870
|
+
return re = A && e ? /* @__PURE__ */ n("div", {
|
|
2875
2871
|
className: "field-float",
|
|
2876
|
-
children: [
|
|
2872
|
+
children: [q, /* @__PURE__ */ n("label", {
|
|
2877
2873
|
className: "float-label",
|
|
2878
|
-
htmlFor:
|
|
2874
|
+
htmlFor: F,
|
|
2879
2875
|
children: [e, r && /* @__PURE__ */ t(X, {})]
|
|
2880
2876
|
})]
|
|
2881
2877
|
}) : D || k ? /* @__PURE__ */ n("div", {
|
|
@@ -2885,7 +2881,7 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2885
2881
|
className: "affix affix-pre",
|
|
2886
2882
|
children: D
|
|
2887
2883
|
}),
|
|
2888
|
-
|
|
2884
|
+
q,
|
|
2889
2885
|
k != null && /* @__PURE__ */ t("span", {
|
|
2890
2886
|
className: "affix affix-suf",
|
|
2891
2887
|
children: k
|
|
@@ -2893,16 +2889,16 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2893
2889
|
]
|
|
2894
2890
|
}) : _ ? /* @__PURE__ */ n("div", {
|
|
2895
2891
|
className: "input-with-unit",
|
|
2896
|
-
children: [
|
|
2892
|
+
children: [q, /* @__PURE__ */ t("span", {
|
|
2897
2893
|
className: "unit",
|
|
2898
2894
|
children: _
|
|
2899
2895
|
})]
|
|
2900
|
-
}) :
|
|
2896
|
+
}) : I ? /* @__PURE__ */ n("div", {
|
|
2901
2897
|
className: "input-wrap",
|
|
2902
|
-
children: [
|
|
2898
|
+
children: [q, /* @__PURE__ */ t("button", {
|
|
2903
2899
|
type: "button",
|
|
2904
2900
|
className: "pw-toggle",
|
|
2905
|
-
onClick: () =>
|
|
2901
|
+
onClick: () => P((e) => !e),
|
|
2906
2902
|
"aria-label": N ? "Hide password" : "Show password",
|
|
2907
2903
|
tabIndex: -1,
|
|
2908
2904
|
children: /* @__PURE__ */ t(O, {
|
|
@@ -2912,7 +2908,7 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2912
2908
|
})]
|
|
2913
2909
|
}) : p ? /* @__PURE__ */ n("div", {
|
|
2914
2910
|
className: "input-wrap",
|
|
2915
|
-
children: [
|
|
2911
|
+
children: [q, /* @__PURE__ */ t("button", {
|
|
2916
2912
|
type: "button",
|
|
2917
2913
|
className: "pw-toggle",
|
|
2918
2914
|
onClick: h,
|
|
@@ -2934,8 +2930,8 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2934
2930
|
size: 16
|
|
2935
2931
|
})
|
|
2936
2932
|
}),
|
|
2937
|
-
|
|
2938
|
-
|
|
2933
|
+
q,
|
|
2934
|
+
G
|
|
2939
2935
|
]
|
|
2940
2936
|
}) : f ? /* @__PURE__ */ n("div", {
|
|
2941
2937
|
className: "input-icon",
|
|
@@ -2945,13 +2941,13 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2945
2941
|
name: f,
|
|
2946
2942
|
size: 16
|
|
2947
2943
|
})
|
|
2948
|
-
}),
|
|
2949
|
-
}) :
|
|
2944
|
+
}), q]
|
|
2945
|
+
}) : q, /* @__PURE__ */ n(m.Group, {
|
|
2950
2946
|
className: `field${x ? ` ${x}` : ""}`,
|
|
2951
2947
|
children: [
|
|
2952
2948
|
e && !A && /* @__PURE__ */ n(m.Label, {
|
|
2953
2949
|
className: "label",
|
|
2954
|
-
htmlFor:
|
|
2950
|
+
htmlFor: F,
|
|
2955
2951
|
children: [
|
|
2956
2952
|
e,
|
|
2957
2953
|
r && /* @__PURE__ */ t(X, {}),
|
|
@@ -2961,7 +2957,7 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2961
2957
|
})
|
|
2962
2958
|
]
|
|
2963
2959
|
}),
|
|
2964
|
-
|
|
2960
|
+
re,
|
|
2965
2961
|
i ? /* @__PURE__ */ t("div", {
|
|
2966
2962
|
className: "field-error",
|
|
2967
2963
|
children: i
|
|
@@ -2970,20 +2966,20 @@ var Fe = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
2970
2966
|
children: a
|
|
2971
2967
|
}) : null,
|
|
2972
2968
|
w && /* @__PURE__ */ n("div", {
|
|
2973
|
-
className: `field-count${E &&
|
|
2974
|
-
children: [
|
|
2969
|
+
className: `field-count${E && H >= E ? " at-limit" : ""}`,
|
|
2970
|
+
children: [H, E ? ` / ${E}` : ""]
|
|
2975
2971
|
})
|
|
2976
2972
|
]
|
|
2977
2973
|
});
|
|
2978
|
-
}),
|
|
2979
|
-
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 }) {
|
|
2980
2976
|
T("AppModal", v);
|
|
2981
2977
|
let y = c(null);
|
|
2982
2978
|
a(() => {
|
|
2983
2979
|
if (!e) return;
|
|
2984
2980
|
let t = y.current?.closest(".modal-content");
|
|
2985
2981
|
if (!t) return;
|
|
2986
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
2982
|
+
let n = () => Array.from(t.querySelectorAll(Re));
|
|
2987
2983
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
|
|
2988
2984
|
}, [e]);
|
|
2989
2985
|
let b = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
|
|
@@ -3068,7 +3064,7 @@ var $ = (e) => function({ size: n = 72 }) {
|
|
|
3068
3064
|
tone: e,
|
|
3069
3065
|
size: n
|
|
3070
3066
|
});
|
|
3071
|
-
},
|
|
3067
|
+
}, Be = {
|
|
3072
3068
|
success: $("success"),
|
|
3073
3069
|
error: $("error"),
|
|
3074
3070
|
warning: $("warning"),
|
|
@@ -3077,14 +3073,14 @@ var $ = (e) => function({ size: n = 72 }) {
|
|
|
3077
3073
|
};
|
|
3078
3074
|
//#endregion
|
|
3079
3075
|
//#region src/components/AppConfirmDialog.jsx
|
|
3080
|
-
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 }) {
|
|
3081
3077
|
T("AppConfirmDialog", h);
|
|
3082
3078
|
let [g, _] = l("");
|
|
3083
3079
|
if (a(() => {
|
|
3084
3080
|
r || _("");
|
|
3085
3081
|
}, [r]), !r) return null;
|
|
3086
|
-
let v = !!f && g.trim() !== f, y =
|
|
3087
|
-
return /* @__PURE__ */ t(
|
|
3082
|
+
let v = !!f && g.trim() !== f, y = Be[d || (u ? "delete" : "info")];
|
|
3083
|
+
return /* @__PURE__ */ t(ze, {
|
|
3088
3084
|
open: r,
|
|
3089
3085
|
hideHeader: !0,
|
|
3090
3086
|
title: i,
|
|
@@ -3120,7 +3116,7 @@ function ze({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
3120
3116
|
className: "lx-confirm-msg",
|
|
3121
3117
|
children: o
|
|
3122
3118
|
}),
|
|
3123
|
-
f && /* @__PURE__ */ t(
|
|
3119
|
+
f && /* @__PURE__ */ t(Le, {
|
|
3124
3120
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
3125
3121
|
label: /* @__PURE__ */ n(e, { children: [
|
|
3126
3122
|
"Type ",
|
|
@@ -3137,7 +3133,7 @@ function ze({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
3137
3133
|
}
|
|
3138
3134
|
//#endregion
|
|
3139
3135
|
//#region src/components/AppSkeleton.jsx
|
|
3140
|
-
function
|
|
3136
|
+
function He({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
|
|
3141
3137
|
return T("AppSkeleton", o), /* @__PURE__ */ t("span", {
|
|
3142
3138
|
className: `skeleton${i ? ` ${i}` : ""}`,
|
|
3143
3139
|
"aria-hidden": "true",
|
|
@@ -3149,7 +3145,7 @@ function Be({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
|
|
|
3149
3145
|
}
|
|
3150
3146
|
});
|
|
3151
3147
|
}
|
|
3152
|
-
var
|
|
3148
|
+
var Ue = [
|
|
3153
3149
|
"r0",
|
|
3154
3150
|
"r1",
|
|
3155
3151
|
"r2",
|
|
@@ -3158,7 +3154,7 @@ var Ve = [
|
|
|
3158
3154
|
"r5",
|
|
3159
3155
|
"r6",
|
|
3160
3156
|
"r7"
|
|
3161
|
-
],
|
|
3157
|
+
], We = [
|
|
3162
3158
|
"c0",
|
|
3163
3159
|
"c1",
|
|
3164
3160
|
"c2",
|
|
@@ -3168,15 +3164,15 @@ var Ve = [
|
|
|
3168
3164
|
"c6",
|
|
3169
3165
|
"c7"
|
|
3170
3166
|
];
|
|
3171
|
-
function
|
|
3172
|
-
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, {
|
|
3173
3169
|
width: n === 0 ? "70%" : "50%",
|
|
3174
3170
|
height: 12
|
|
3175
3171
|
}) }, e)) }, e));
|
|
3176
3172
|
}
|
|
3177
3173
|
//#endregion
|
|
3178
3174
|
//#region src/components/AppSelectMini.jsx
|
|
3179
|
-
function
|
|
3175
|
+
function Ke({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: l, disabled: u, className: d, ...f }) {
|
|
3180
3176
|
T("AppSelectMini", f);
|
|
3181
3177
|
let p = c(null);
|
|
3182
3178
|
return a(() => {
|
|
@@ -3205,19 +3201,19 @@ function We({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
|
|
|
3205
3201
|
}
|
|
3206
3202
|
//#endregion
|
|
3207
3203
|
//#region src/components/AppTablePagination.jsx
|
|
3208
|
-
var
|
|
3204
|
+
var qe = [
|
|
3209
3205
|
5,
|
|
3210
3206
|
10,
|
|
3211
3207
|
25,
|
|
3212
3208
|
50
|
|
3213
3209
|
];
|
|
3214
|
-
function
|
|
3210
|
+
function Je({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = qe, ...d }) {
|
|
3215
3211
|
return T("AppTablePagination", d), /* @__PURE__ */ n("div", {
|
|
3216
3212
|
className: "table-pagination",
|
|
3217
3213
|
children: [
|
|
3218
3214
|
/* @__PURE__ */ n("span", {
|
|
3219
3215
|
className: "tpg-rows",
|
|
3220
|
-
children: ["Rows per page:", /* @__PURE__ */ t(
|
|
3216
|
+
children: ["Rows per page:", /* @__PURE__ */ t(Ke, {
|
|
3221
3217
|
value: i,
|
|
3222
3218
|
onChange: (e) => l(Number(e)),
|
|
3223
3219
|
ariaLabel: "Rows per page",
|
|
@@ -3266,13 +3262,13 @@ function Ke({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
|
|
|
3266
3262
|
}
|
|
3267
3263
|
//#endregion
|
|
3268
3264
|
//#region src/components/AppDataTable.jsx
|
|
3269
|
-
function
|
|
3265
|
+
function Ye(e) {
|
|
3270
3266
|
return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
3271
3267
|
}
|
|
3272
|
-
function
|
|
3268
|
+
function Xe(e) {
|
|
3273
3269
|
return e == null || e === "" ? "—" : e;
|
|
3274
3270
|
}
|
|
3275
|
-
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 }) {
|
|
3276
3272
|
T("AppDataTable", S);
|
|
3277
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) => {
|
|
3278
3274
|
e && (e.indeterminate = D);
|
|
@@ -3297,7 +3293,7 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3297
3293
|
r.map((e, r) => {
|
|
3298
3294
|
let i = !!(e.sortable && s), a = o && o.key === e.key;
|
|
3299
3295
|
return /* @__PURE__ */ n("th", {
|
|
3300
|
-
className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") +
|
|
3296
|
+
className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") + Ye(e.align),
|
|
3301
3297
|
style: e.width ? { width: e.width } : void 0,
|
|
3302
3298
|
tabIndex: i ? 0 : void 0,
|
|
3303
3299
|
"aria-sort": a ? o.dir === "asc" ? "ascending" : "descending" : i ? "none" : void 0,
|
|
@@ -3324,7 +3320,7 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3324
3320
|
children: "Actions"
|
|
3325
3321
|
})
|
|
3326
3322
|
}))
|
|
3327
|
-
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(
|
|
3323
|
+
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(Ge, {
|
|
3328
3324
|
rows: l,
|
|
3329
3325
|
cols: C
|
|
3330
3326
|
}) : i?.length ? i.map((e) => {
|
|
@@ -3343,8 +3339,8 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3343
3339
|
})
|
|
3344
3340
|
}),
|
|
3345
3341
|
r.map((n, r) => /* @__PURE__ */ t("td", {
|
|
3346
|
-
className: (r === 0 ? "lx-name-cell " : "") +
|
|
3347
|
-
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])
|
|
3348
3344
|
}, n.key)),
|
|
3349
3345
|
p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
|
|
3350
3346
|
className: "u-row-actions",
|
|
@@ -3358,7 +3354,7 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3358
3354
|
children: A
|
|
3359
3355
|
}) }) })]
|
|
3360
3356
|
})
|
|
3361
|
-
}), h && !c && h.total > 0 && /* @__PURE__ */ t(
|
|
3357
|
+
}), h && !c && h.total > 0 && /* @__PURE__ */ t(Je, {
|
|
3362
3358
|
page: h.page,
|
|
3363
3359
|
totalPages: h.totalPages,
|
|
3364
3360
|
pageSize: h.pageSize,
|
|
@@ -3371,7 +3367,7 @@ function Ye({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3371
3367
|
}
|
|
3372
3368
|
//#endregion
|
|
3373
3369
|
//#region src/components/AppDatePicker.jsx
|
|
3374
|
-
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 }) {
|
|
3375
3371
|
T("AppDatePicker", y);
|
|
3376
3372
|
let b = c(null), x = o(), S = g || d || x;
|
|
3377
3373
|
a(() => {
|
|
@@ -3421,7 +3417,7 @@ function Xe({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
|
|
|
3421
3417
|
}
|
|
3422
3418
|
//#endregion
|
|
3423
3419
|
//#region src/components/AppDropdown.jsx
|
|
3424
|
-
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) {
|
|
3425
3421
|
return /* @__PURE__ */ t("button", {
|
|
3426
3422
|
ref: l,
|
|
3427
3423
|
type: "button",
|
|
@@ -3435,11 +3431,11 @@ var Ze = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
|
|
|
3435
3431
|
})
|
|
3436
3432
|
});
|
|
3437
3433
|
});
|
|
3438
|
-
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 }) {
|
|
3439
3435
|
return T("AppDropdown", d), /* @__PURE__ */ n(_, {
|
|
3440
3436
|
align: s,
|
|
3441
3437
|
children: [/* @__PURE__ */ t(_.Toggle, {
|
|
3442
|
-
as:
|
|
3438
|
+
as: $e,
|
|
3443
3439
|
icon: e,
|
|
3444
3440
|
iconSize: r,
|
|
3445
3441
|
btnClassName: i,
|
|
@@ -3477,7 +3473,7 @@ function Qe({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3477
3473
|
}
|
|
3478
3474
|
//#endregion
|
|
3479
3475
|
//#region src/components/AppEmptyState.jsx
|
|
3480
|
-
function
|
|
3476
|
+
function tt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
|
|
3481
3477
|
return T("AppEmptyState", u), /* @__PURE__ */ n("div", {
|
|
3482
3478
|
className: [
|
|
3483
3479
|
"empty-state",
|
|
@@ -3510,7 +3506,7 @@ function $e({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
3510
3506
|
}
|
|
3511
3507
|
//#endregion
|
|
3512
3508
|
//#region src/components/AppFileAttachment.jsx
|
|
3513
|
-
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 }) {
|
|
3514
3510
|
T("AppFileAttachment", h);
|
|
3515
3511
|
let g = o(), _ = m || s || g, [v, y] = l(null), [b, x] = l("");
|
|
3516
3512
|
a(() => {
|
|
@@ -3523,7 +3519,7 @@ function et({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
|
|
|
3523
3519
|
function S(e) {
|
|
3524
3520
|
let t = e.target.files?.[0];
|
|
3525
3521
|
if (e.target.value = "", !t) return;
|
|
3526
|
-
let n =
|
|
3522
|
+
let n = xe(t, {
|
|
3527
3523
|
accept: u,
|
|
3528
3524
|
maxSizeMb: d
|
|
3529
3525
|
});
|
|
@@ -3622,22 +3618,22 @@ function et({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
|
|
|
3622
3618
|
}
|
|
3623
3619
|
//#endregion
|
|
3624
3620
|
//#region src/components/toast.js
|
|
3625
|
-
var
|
|
3621
|
+
var rt = /* @__PURE__ */ new Set([
|
|
3626
3622
|
"success",
|
|
3627
3623
|
"info",
|
|
3628
3624
|
"warning",
|
|
3629
3625
|
"error"
|
|
3630
3626
|
]);
|
|
3631
|
-
function
|
|
3632
|
-
let n =
|
|
3627
|
+
function it(e, t = "success") {
|
|
3628
|
+
let n = rt.has(t) ? t : "success";
|
|
3633
3629
|
v[n](e, { toastId: `${n}:${e}` });
|
|
3634
3630
|
}
|
|
3635
|
-
function
|
|
3631
|
+
function at(e) {
|
|
3636
3632
|
v.error(e, { toastId: `error:${e}` });
|
|
3637
3633
|
}
|
|
3638
3634
|
//#endregion
|
|
3639
3635
|
//#region src/components/AppFilePicker.jsx
|
|
3640
|
-
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 }) {
|
|
3641
3637
|
T("AppFilePicker", m);
|
|
3642
3638
|
let [h, g] = l(null), [_, v] = l(!1), y = c(null), b = o(), x = i || b;
|
|
3643
3639
|
a(() => {
|
|
@@ -3648,11 +3644,11 @@ function it({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
|
|
|
3648
3644
|
g(null);
|
|
3649
3645
|
}, [r]);
|
|
3650
3646
|
let S = r?.url || h, C = (e) => {
|
|
3651
|
-
let t =
|
|
3647
|
+
let t = xe(e, {
|
|
3652
3648
|
accept: u,
|
|
3653
3649
|
maxSizeMb: d
|
|
3654
3650
|
});
|
|
3655
|
-
return t ? (
|
|
3651
|
+
return t ? (it(t, "error"), !1) : (s(e), !0);
|
|
3656
3652
|
}, w = (e) => {
|
|
3657
3653
|
let t = e.target.files?.[0] || null;
|
|
3658
3654
|
t && (C(t) || (e.target.value = ""));
|
|
@@ -3763,7 +3759,7 @@ function it({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
|
|
|
3763
3759
|
}
|
|
3764
3760
|
//#endregion
|
|
3765
3761
|
//#region src/components/AppInfoList.jsx
|
|
3766
|
-
function
|
|
3762
|
+
function st({ items: r = [], className: i = "", ...a }) {
|
|
3767
3763
|
return T("AppInfoList", a), /* @__PURE__ */ t("div", {
|
|
3768
3764
|
className: `info-list${i ? ` ${i}` : ""}`,
|
|
3769
3765
|
children: r.map((r, i) => {
|
|
@@ -3796,7 +3792,7 @@ function at({ items: r = [], className: i = "", ...a }) {
|
|
|
3796
3792
|
}
|
|
3797
3793
|
//#endregion
|
|
3798
3794
|
//#region src/components/AppKpiTile.jsx
|
|
3799
|
-
function
|
|
3795
|
+
function ct({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
|
|
3800
3796
|
T("AppKpiTile", l);
|
|
3801
3797
|
let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
|
|
3802
3798
|
return /* @__PURE__ */ n("div", {
|
|
@@ -3829,7 +3825,7 @@ function ot({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
|
|
|
3829
3825
|
}
|
|
3830
3826
|
//#endregion
|
|
3831
3827
|
//#region src/components/AppLogoPicker.jsx
|
|
3832
|
-
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 }) {
|
|
3833
3829
|
T("AppLogoPicker", m);
|
|
3834
3830
|
let h = c(null);
|
|
3835
3831
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
|
|
@@ -3875,12 +3871,12 @@ function st({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
|
|
|
3875
3871
|
onChange: (e) => {
|
|
3876
3872
|
let t = e.target.files?.[0];
|
|
3877
3873
|
if (e.target.value = "", !t) return;
|
|
3878
|
-
let n =
|
|
3874
|
+
let n = xe(t, {
|
|
3879
3875
|
accept: l,
|
|
3880
3876
|
maxSizeMb: u
|
|
3881
3877
|
});
|
|
3882
3878
|
if (n) {
|
|
3883
|
-
|
|
3879
|
+
it(n, "error");
|
|
3884
3880
|
return;
|
|
3885
3881
|
}
|
|
3886
3882
|
o(t);
|
|
@@ -3890,7 +3886,7 @@ function st({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
|
|
|
3890
3886
|
}
|
|
3891
3887
|
//#endregion
|
|
3892
3888
|
//#region src/components/AppMultiSelect.jsx
|
|
3893
|
-
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 = "", ..._ }) {
|
|
3894
3890
|
T("AppMultiSelect", _);
|
|
3895
3891
|
let v = c(null);
|
|
3896
3892
|
return a(() => {
|
|
@@ -3937,7 +3933,7 @@ function ct({ values: e, onChange: r, options: i, placeholder: o = "Select…",
|
|
|
3937
3933
|
}
|
|
3938
3934
|
//#endregion
|
|
3939
3935
|
//#region src/components/AppOtpInput.jsx
|
|
3940
|
-
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) {
|
|
3941
3937
|
T("AppOtpInput", v);
|
|
3942
3938
|
let b = c(null), x = o(), S = g || h || x, C = (e) => {
|
|
3943
3939
|
b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
|
|
@@ -3990,7 +3986,7 @@ var lt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
|
|
|
3990
3986
|
});
|
|
3991
3987
|
//#endregion
|
|
3992
3988
|
//#region src/components/AppPageHeader.jsx
|
|
3993
|
-
function
|
|
3989
|
+
function ft({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
3994
3990
|
return T("AppPageHeader", o), /* @__PURE__ */ n("div", {
|
|
3995
3991
|
className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
|
|
3996
3992
|
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
|
|
@@ -4007,7 +4003,7 @@ function ut({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
|
4007
4003
|
}
|
|
4008
4004
|
//#endregion
|
|
4009
4005
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
4010
|
-
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 }) {
|
|
4011
4007
|
T("AppPhoneNumberInput", m);
|
|
4012
4008
|
let h = c(null);
|
|
4013
4009
|
return a(() => {
|
|
@@ -4042,7 +4038,7 @@ function dt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
|
|
|
4042
4038
|
}
|
|
4043
4039
|
//#endregion
|
|
4044
4040
|
//#region src/components/AppPricingCard.jsx
|
|
4045
|
-
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 }) {
|
|
4046
4042
|
return T("AppPricingCard", f), /* @__PURE__ */ n("div", {
|
|
4047
4043
|
className: [
|
|
4048
4044
|
"plan-card",
|
|
@@ -4095,7 +4091,7 @@ function ft({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
|
|
|
4095
4091
|
}
|
|
4096
4092
|
//#endregion
|
|
4097
4093
|
//#region src/components/AppRadio.jsx
|
|
4098
|
-
var
|
|
4094
|
+
var ht = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
4099
4095
|
T("AppRadio", s);
|
|
4100
4096
|
let l = o(), u = r || i || l;
|
|
4101
4097
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4116,7 +4112,7 @@ var pt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
4116
4112
|
});
|
|
4117
4113
|
//#endregion
|
|
4118
4114
|
//#region src/components/AppRepeater.jsx
|
|
4119
|
-
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 }) {
|
|
4120
4116
|
T("AppRepeater", p);
|
|
4121
4117
|
let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
|
|
4122
4118
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4160,7 +4156,7 @@ function mt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
4160
4156
|
}
|
|
4161
4157
|
//#endregion
|
|
4162
4158
|
//#region src/components/AppResourceCard.jsx
|
|
4163
|
-
function
|
|
4159
|
+
function _t({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
|
|
4164
4160
|
T("AppResourceCard", u);
|
|
4165
4161
|
let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
4166
4162
|
className: "res-card-icon",
|
|
@@ -4192,7 +4188,7 @@ function ht({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
|
|
|
4192
4188
|
}
|
|
4193
4189
|
//#endregion
|
|
4194
4190
|
//#region src/components/AppSearch.jsx
|
|
4195
|
-
function
|
|
4191
|
+
function vt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize: o = 18, className: s = "", ...c }) {
|
|
4196
4192
|
return T("AppSearch", c), /* @__PURE__ */ n("div", {
|
|
4197
4193
|
className: [
|
|
4198
4194
|
"search-wrap",
|
|
@@ -4229,7 +4225,7 @@ function gt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
4229
4225
|
}
|
|
4230
4226
|
//#endregion
|
|
4231
4227
|
//#region src/components/AppSegmented.jsx
|
|
4232
|
-
function
|
|
4228
|
+
function yt({ options: e = [], value: r, onChange: i, label: a, name: s, size: c = "md", className: l = "", ...u }) {
|
|
4233
4229
|
T("AppSegmented", u);
|
|
4234
4230
|
let d = o(), f = s || d;
|
|
4235
4231
|
return /* @__PURE__ */ t("div", {
|
|
@@ -4258,14 +4254,14 @@ function _t({ options: e = [], value: r, onChange: i, label: a, name: s, size: c
|
|
|
4258
4254
|
}
|
|
4259
4255
|
//#endregion
|
|
4260
4256
|
//#region src/components/AppSelect.jsx
|
|
4261
|
-
var
|
|
4262
|
-
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 }) {
|
|
4263
4259
|
T("AppSelect", w);
|
|
4264
4260
|
let E = c(null);
|
|
4265
4261
|
a(() => {
|
|
4266
4262
|
E.current && (E.current.options = i.map((e) => ({
|
|
4267
4263
|
value: e.value,
|
|
4268
|
-
label:
|
|
4264
|
+
label: bt(e)
|
|
4269
4265
|
})));
|
|
4270
4266
|
}, [i]), a(() => {
|
|
4271
4267
|
let t = E.current;
|
|
@@ -4330,7 +4326,7 @@ function yt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
|
|
|
4330
4326
|
}
|
|
4331
4327
|
//#endregion
|
|
4332
4328
|
//#region src/components/AppShell.jsx
|
|
4333
|
-
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 = "", ..._ }) {
|
|
4334
4330
|
T("AppShell", _);
|
|
4335
4331
|
let [v, y] = l(!1), [b, x] = l(!1), [S, C] = l(!1), w = d ?? v;
|
|
4336
4332
|
return a(() => {
|
|
@@ -4366,7 +4362,7 @@ function bt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
|
|
|
4366
4362
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
4367
4363
|
className: "app-nav-group-label",
|
|
4368
4364
|
children: e.label
|
|
4369
|
-
}), e.items.map((e) => /* @__PURE__ */ t(
|
|
4365
|
+
}), e.items.map((e) => /* @__PURE__ */ t(Ct, {
|
|
4370
4366
|
item: e,
|
|
4371
4367
|
linkComponent: h,
|
|
4372
4368
|
onNavigate: () => x(!1)
|
|
@@ -4436,7 +4432,7 @@ function bt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
|
|
|
4436
4432
|
]
|
|
4437
4433
|
});
|
|
4438
4434
|
}
|
|
4439
|
-
function
|
|
4435
|
+
function Ct({ item: r, linkComponent: i, onNavigate: a }) {
|
|
4440
4436
|
let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
|
|
4441
4437
|
r.icon && /* @__PURE__ */ t("span", {
|
|
4442
4438
|
className: "app-nav-icon",
|
|
@@ -4470,7 +4466,7 @@ function xt({ item: r, linkComponent: i, onNavigate: a }) {
|
|
|
4470
4466
|
}
|
|
4471
4467
|
//#endregion
|
|
4472
4468
|
//#region src/components/AppSidebarMenu.jsx
|
|
4473
|
-
var
|
|
4469
|
+
var wt = {
|
|
4474
4470
|
left: "start",
|
|
4475
4471
|
right: "end",
|
|
4476
4472
|
start: "start",
|
|
@@ -4478,11 +4474,11 @@ var St = {
|
|
|
4478
4474
|
top: "top",
|
|
4479
4475
|
bottom: "bottom"
|
|
4480
4476
|
};
|
|
4481
|
-
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 }) {
|
|
4482
4478
|
return T("AppSidebarMenu", b), /* @__PURE__ */ n(y, {
|
|
4483
4479
|
show: e,
|
|
4484
4480
|
onHide: r,
|
|
4485
|
-
placement:
|
|
4481
|
+
placement: wt[i] || "end",
|
|
4486
4482
|
backdrop: d,
|
|
4487
4483
|
scroll: f,
|
|
4488
4484
|
keyboard: p,
|
|
@@ -4526,7 +4522,7 @@ function Ct({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
4526
4522
|
}
|
|
4527
4523
|
//#endregion
|
|
4528
4524
|
//#region src/components/AppSpinner.jsx
|
|
4529
|
-
function
|
|
4525
|
+
function Et({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
4530
4526
|
return T("AppSpinner", i), /* @__PURE__ */ t("span", {
|
|
4531
4527
|
className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
|
|
4532
4528
|
role: "status",
|
|
@@ -4535,7 +4531,7 @@ function wt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
|
4535
4531
|
}
|
|
4536
4532
|
//#endregion
|
|
4537
4533
|
//#region src/components/AppSplash.jsx
|
|
4538
|
-
function
|
|
4534
|
+
function Dt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
|
|
4539
4535
|
return T("AppSplash", s), /* @__PURE__ */ t("div", {
|
|
4540
4536
|
className: `splash${o ? ` ${o}` : ""}`,
|
|
4541
4537
|
role: "status",
|
|
@@ -4562,7 +4558,7 @@ function Tt({ logo: e, initials: r, text: i, label: a = "Loading", className: o
|
|
|
4562
4558
|
}
|
|
4563
4559
|
//#endregion
|
|
4564
4560
|
//#region src/components/AppStatusBadge.jsx
|
|
4565
|
-
function
|
|
4561
|
+
function Ot({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
4566
4562
|
return T("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
|
|
4567
4563
|
className: `status-label ${n}${r ? ` ${r}` : ""}`,
|
|
4568
4564
|
children: e
|
|
@@ -4570,7 +4566,7 @@ function Et({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
|
4570
4566
|
}
|
|
4571
4567
|
//#endregion
|
|
4572
4568
|
//#region src/components/AppStepper.jsx
|
|
4573
|
-
function
|
|
4569
|
+
function kt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
4574
4570
|
return T("AppStepper", c), /* @__PURE__ */ t("nav", {
|
|
4575
4571
|
className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
|
|
4576
4572
|
"aria-label": a,
|
|
@@ -4617,7 +4613,7 @@ function Dt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
|
|
|
4617
4613
|
}
|
|
4618
4614
|
//#endregion
|
|
4619
4615
|
//#region src/components/AppSwitch.jsx
|
|
4620
|
-
var
|
|
4616
|
+
var At = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
4621
4617
|
T("AppSwitch", s);
|
|
4622
4618
|
let l = o(), u = r || i || l;
|
|
4623
4619
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4638,7 +4634,7 @@ var Ot = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
4638
4634
|
});
|
|
4639
4635
|
//#endregion
|
|
4640
4636
|
//#region src/components/AppTableEmptyState.jsx
|
|
4641
|
-
function
|
|
4637
|
+
function jt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
4642
4638
|
return T("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
|
|
4643
4639
|
className: "tbl-empty",
|
|
4644
4640
|
children: [
|
|
@@ -4666,7 +4662,7 @@ function kt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
|
4666
4662
|
}
|
|
4667
4663
|
//#endregion
|
|
4668
4664
|
//#region src/components/AppTabs.jsx
|
|
4669
|
-
function
|
|
4665
|
+
function Mt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...l }) {
|
|
4670
4666
|
T("AppTabs", l);
|
|
4671
4667
|
let u = c(null);
|
|
4672
4668
|
function d(t) {
|
|
@@ -4710,7 +4706,7 @@ function At({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4710
4706
|
}
|
|
4711
4707
|
//#endregion
|
|
4712
4708
|
//#region src/components/AppTextarea.jsx
|
|
4713
|
-
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) {
|
|
4714
4710
|
T("AppTextarea", v);
|
|
4715
4711
|
let b = d || f, x = [
|
|
4716
4712
|
"textarea",
|
|
@@ -4772,7 +4768,7 @@ var jt = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
|
|
|
4772
4768
|
});
|
|
4773
4769
|
//#endregion
|
|
4774
4770
|
//#region src/components/AppTimeline.jsx
|
|
4775
|
-
function
|
|
4771
|
+
function Pt({ items: e = [], className: r = "", ...i }) {
|
|
4776
4772
|
return T("AppTimeline", i), /* @__PURE__ */ t("ol", {
|
|
4777
4773
|
className: `timeline${r ? ` ${r}` : ""}`,
|
|
4778
4774
|
children: e.map((e, r) => /* @__PURE__ */ n("li", {
|
|
@@ -4810,4 +4806,4 @@ function Mt({ items: e = [], className: r = "", ...i }) {
|
|
|
4810
4806
|
});
|
|
4811
4807
|
}
|
|
4812
4808
|
//#endregion
|
|
4813
|
-
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 };
|