@webority/ui-react 0.6.12 → 0.6.13
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/examples.mobile.json-BMXTGiGC-Dl_Tt3py.js +250 -0
- package/dist/libphonenumber-js-BcNT8oq0-DMpMlice.js +11439 -0
- package/dist/types/components/AppColorField.d.ts +4 -1
- package/dist/types/components/AppPhoneNumberInput.d.ts +1 -1
- package/dist/ui-react.js +398 -318
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -259,7 +259,7 @@ var M = {
|
|
|
259
259
|
delete: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_delete_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<path d=\"M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z\" fill=\"var(--wui-danger-active)\"/>\n<path d=\"M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z\" fill=\"var(--wui-danger)\"/>\n<g clip-path=\"url(#wui_delete_clip1)\">\n<path d=\"M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z\" fill=\"white\"/>\n<path d=\"M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_delete_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_delete_clip1\"><rect width=\"65\" height=\"65\" fill=\"white\" transform=\"translate(54.3535 54.502)\"/></clipPath></defs>"
|
|
260
260
|
};
|
|
261
261
|
Object.keys(M);
|
|
262
|
-
var
|
|
262
|
+
var ee = class extends HTMLElement {
|
|
263
263
|
static get observedAttributes() {
|
|
264
264
|
return ["tone", "size"];
|
|
265
265
|
}
|
|
@@ -273,40 +273,40 @@ 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
|
|
276
|
+
}, N = 4;
|
|
277
|
+
function P(e, t, n = {}) {
|
|
278
278
|
if (!e || !t) return;
|
|
279
|
-
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i +
|
|
280
|
-
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(
|
|
281
|
-
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s -
|
|
282
|
-
t.style.left = `${Math.max(
|
|
279
|
+
let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + N && r.top > a;
|
|
280
|
+
t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(N, r.top - i - N)}px` : `${r.bottom + N}px`, n.matchWidth && (t.style.width = `${r.width}px`);
|
|
281
|
+
let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - N);
|
|
282
|
+
t.style.left = `${Math.max(N, c)}px`;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
|
|
284
|
+
function F(e, t) {
|
|
285
|
+
I(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function I(e) {
|
|
288
288
|
e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
|
|
289
289
|
}
|
|
290
|
-
var
|
|
291
|
-
function
|
|
292
|
-
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${
|
|
290
|
+
var te = "data-wui-mirror";
|
|
291
|
+
function L(e, t) {
|
|
292
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${te}]`);
|
|
293
293
|
if (!n) {
|
|
294
294
|
r?.remove();
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(
|
|
297
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(te, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
|
|
298
298
|
for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
|
|
299
299
|
r.disabled = e.hasAttribute("disabled");
|
|
300
300
|
}
|
|
301
|
-
var
|
|
301
|
+
var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), ne = (e) => {
|
|
302
302
|
if (!e) return "";
|
|
303
303
|
let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
304
304
|
return t ? `<i class="bi bi-${t}" aria-hidden="true"></i>` : "";
|
|
305
|
-
},
|
|
305
|
+
}, B = (e) => {
|
|
306
306
|
if (e == null) return "";
|
|
307
|
-
let t = e[
|
|
307
|
+
let t = e[R] ? String(e.label ?? "") : z(e.label), n = ne(e.icon);
|
|
308
308
|
return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
|
|
309
|
-
},
|
|
309
|
+
}, re = class extends HTMLElement {
|
|
310
310
|
_accessibleName() {
|
|
311
311
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
312
312
|
}
|
|
@@ -335,9 +335,9 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
335
335
|
return this._value;
|
|
336
336
|
}
|
|
337
337
|
set value(e) {
|
|
338
|
-
this._value = e == null ? "" : String(e),
|
|
338
|
+
this._value = e == null ? "" : String(e), L(this, this._value);
|
|
339
339
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
340
|
-
t && (this._label =
|
|
340
|
+
t && (this._label = H(t.label)), this._syncInput();
|
|
341
341
|
}
|
|
342
342
|
set options(e) {
|
|
343
343
|
this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
|
|
@@ -368,7 +368,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
368
368
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
369
369
|
label: e.innerHTML,
|
|
370
370
|
icon: e.getAttribute("icon") || void 0,
|
|
371
|
-
[
|
|
371
|
+
[R]: !0,
|
|
372
372
|
selected: e.hasAttribute("selected")
|
|
373
373
|
})));
|
|
374
374
|
}
|
|
@@ -380,8 +380,8 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
380
380
|
let e = this.getAttribute("placeholder") || "Search…", t = this.getAttribute("size"), n = t === "sm" ? " search-select-sm" : t === "lg" ? " search-select-lg" : "";
|
|
381
381
|
this.innerHTML = `
|
|
382
382
|
<div class="search-select${n}">
|
|
383
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
384
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
383
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${V(this._accessibleName())}">
|
|
384
|
+
<input class="search-select-input search-select-ac-input" placeholder="${V(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
385
385
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
386
386
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
|
|
387
387
|
</div>
|
|
@@ -390,7 +390,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
390
390
|
<div class="search-select-empty" hidden>No matches</div>
|
|
391
391
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
392
392
|
</div>
|
|
393
|
-
</div>`, this._rendered = !0,
|
|
393
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
|
|
394
394
|
}
|
|
395
395
|
_refs() {
|
|
396
396
|
return {
|
|
@@ -419,9 +419,9 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
419
419
|
let t = this._refs();
|
|
420
420
|
if (!t.optionsWrap) return;
|
|
421
421
|
let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
|
|
422
|
-
!this._remote && n && (r = r.filter((e) =>
|
|
422
|
+
!this._remote && n && (r = r.filter((e) => H(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
|
|
423
423
|
let t = String(e.value) === String(this._value);
|
|
424
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
424
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${V(e.value)}" aria-selected="${t}">${B(e)}</button>`;
|
|
425
425
|
}).join(""), this._active = -1;
|
|
426
426
|
let i = n.length < this._minChars;
|
|
427
427
|
t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
|
|
@@ -429,7 +429,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
429
429
|
_wire() {
|
|
430
430
|
let e = this._refs();
|
|
431
431
|
if (!e.control || !e.input) return;
|
|
432
|
-
let t = () =>
|
|
432
|
+
let t = () => P(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
|
|
433
433
|
let t = n();
|
|
434
434
|
this._active = e;
|
|
435
435
|
for (let e of this._optionEls()) e.classList.remove("is-active");
|
|
@@ -439,7 +439,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
439
439
|
}, o = () => {
|
|
440
440
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
|
|
441
441
|
}, s = (t) => {
|
|
442
|
-
this._value = t.dataset.value, this._label =
|
|
442
|
+
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();
|
|
443
443
|
};
|
|
444
444
|
e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
|
|
445
445
|
let t = e.input.value;
|
|
@@ -462,17 +462,17 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
462
462
|
let t = e.target.closest(".search-select-option");
|
|
463
463
|
t && r(this._optionEls().indexOf(t));
|
|
464
464
|
}), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
|
|
465
|
-
this._value = "", this._label = "",
|
|
465
|
+
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();
|
|
466
466
|
}), this._onDocClick = (e) => {
|
|
467
467
|
i() && !this.contains(e.target) && o();
|
|
468
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
468
|
+
}, document.addEventListener("click", this._onDocClick), F(this, () => {
|
|
469
469
|
i() && t();
|
|
470
470
|
});
|
|
471
471
|
}
|
|
472
472
|
disconnectedCallback() {
|
|
473
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick),
|
|
473
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this), clearTimeout(this._timer);
|
|
474
474
|
}
|
|
475
|
-
},
|
|
475
|
+
}, V = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), H = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ie = [
|
|
476
476
|
"January",
|
|
477
477
|
"February",
|
|
478
478
|
"March",
|
|
@@ -493,24 +493,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
493
493
|
"Th",
|
|
494
494
|
"Fr",
|
|
495
495
|
"Sa"
|
|
496
|
-
],
|
|
496
|
+
], oe = (e) => String(e).padStart(2, "0"), U = (e, t, n) => `${e}-${oe(t + 1)}-${oe(n)}`, W = (e) => {
|
|
497
497
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
498
498
|
return t ? {
|
|
499
499
|
y: +t[1],
|
|
500
500
|
m: t[2] - 1,
|
|
501
501
|
d: +t[3]
|
|
502
502
|
} : null;
|
|
503
|
-
},
|
|
504
|
-
let t =
|
|
505
|
-
return t ? `${
|
|
506
|
-
},
|
|
503
|
+
}, se = (e) => {
|
|
504
|
+
let t = W(e);
|
|
505
|
+
return t ? `${oe(t.d)} ${ie[t.m].slice(0, 3)} ${t.y}` : "";
|
|
506
|
+
}, G = (e, t) => new Date(e, t + 1, 0).getDate(), K = (e, t) => {
|
|
507
507
|
for (; t < 0;) t += 12, --e;
|
|
508
508
|
for (; t > 11;) t -= 12, e += 1;
|
|
509
509
|
return {
|
|
510
510
|
y: e,
|
|
511
511
|
m: t
|
|
512
512
|
};
|
|
513
|
-
},
|
|
513
|
+
}, ce = class extends HTMLElement {
|
|
514
514
|
static get observedAttributes() {
|
|
515
515
|
return [
|
|
516
516
|
"value",
|
|
@@ -537,7 +537,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
537
537
|
return this._value;
|
|
538
538
|
}
|
|
539
539
|
set value(e) {
|
|
540
|
-
this._value = e || "",
|
|
540
|
+
this._value = e || "", L(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
541
541
|
}
|
|
542
542
|
_firstDay() {
|
|
543
543
|
let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
|
|
@@ -545,29 +545,29 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
545
545
|
}
|
|
546
546
|
render() {
|
|
547
547
|
this._value = this.getAttribute("value") || this._value;
|
|
548
|
-
let e = this.getAttribute("placeholder") || "Enter Date", t =
|
|
548
|
+
let e = this.getAttribute("placeholder") || "Enter Date", t = W(this._value);
|
|
549
549
|
t && (this._viewY = t.y, this._viewM = t.m);
|
|
550
550
|
let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "";
|
|
551
551
|
this.innerHTML = `
|
|
552
552
|
<div class="datepicker">
|
|
553
553
|
<button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
554
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
554
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? se(this._value) : e}</span>
|
|
555
555
|
<i class="bi bi-calendar3" aria-hidden="true"></i>
|
|
556
556
|
</button>
|
|
557
557
|
<div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
|
|
558
|
-
</div>`, this._rendered = !0,
|
|
558
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire();
|
|
559
559
|
}
|
|
560
560
|
_syncFormValue() {
|
|
561
|
-
|
|
561
|
+
L(this, this._value);
|
|
562
562
|
}
|
|
563
563
|
_syncTrigger() {
|
|
564
564
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
565
565
|
if (!t) return;
|
|
566
|
-
let n =
|
|
567
|
-
t.textContent = n ?
|
|
566
|
+
let n = W(this._value);
|
|
567
|
+
t.textContent = n ? se(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
568
568
|
}
|
|
569
569
|
_limits() {
|
|
570
|
-
let e =
|
|
570
|
+
let e = W(this.getAttribute("min")), t = W(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
|
|
571
571
|
return {
|
|
572
572
|
dayDisabled: (e, t, i) => {
|
|
573
573
|
let a = new Date(e, t, i).getTime();
|
|
@@ -575,7 +575,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
575
575
|
},
|
|
576
576
|
monthDisabled: (e, t) => {
|
|
577
577
|
let i = new Date(e, t, 1).getTime();
|
|
578
|
-
return new Date(e, t,
|
|
578
|
+
return new Date(e, t, G(e, t)).getTime() < n || i > r;
|
|
579
579
|
},
|
|
580
580
|
yearDisabled: (e) => {
|
|
581
581
|
let t = new Date(e, 0, 1).getTime();
|
|
@@ -588,22 +588,22 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
588
588
|
e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
|
|
589
589
|
}
|
|
590
590
|
_daysHtml() {
|
|
591
|
-
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n =
|
|
591
|
+
let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = G(this._viewY, this._viewM), r = W(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
|
|
592
592
|
y: this._viewY,
|
|
593
593
|
m: this._viewM,
|
|
594
594
|
d: 1
|
|
595
595
|
}, s = (e, t, n, s) => {
|
|
596
|
-
let c =
|
|
596
|
+
let c = U(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
|
|
597
597
|
return `<button type="button" class="${[
|
|
598
598
|
"datepicker-day",
|
|
599
599
|
s ? "is-outside" : "",
|
|
600
600
|
u ? "is-today" : "",
|
|
601
601
|
l ? "is-selected" : ""
|
|
602
602
|
].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
|
|
603
|
-
}, c = "", l =
|
|
603
|
+
}, c = "", l = K(this._viewY, this._viewM - 1), u = G(l.y, l.m);
|
|
604
604
|
for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
605
605
|
for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
|
|
606
|
-
let d =
|
|
606
|
+
let d = K(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
|
|
607
607
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
608
608
|
let p = ae.map((t, n) => ae[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
|
|
609
609
|
return `
|
|
@@ -620,7 +620,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
620
620
|
</div>`;
|
|
621
621
|
}
|
|
622
622
|
_monthsHtml() {
|
|
623
|
-
let e =
|
|
623
|
+
let e = W(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
|
|
624
624
|
for (let i = 0; i < 12; i++) {
|
|
625
625
|
let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
|
|
626
626
|
"datepicker-cell",
|
|
@@ -638,7 +638,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
638
638
|
<div class="datepicker-cells">${r}</div>`;
|
|
639
639
|
}
|
|
640
640
|
_yearsHtml() {
|
|
641
|
-
let e =
|
|
641
|
+
let e = W(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
|
|
642
642
|
for (let a = 0; a < 12; a++) {
|
|
643
643
|
let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
|
|
644
644
|
"datepicker-cell",
|
|
@@ -660,24 +660,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
660
660
|
t && e.contains(document.activeElement) && t.focus();
|
|
661
661
|
}
|
|
662
662
|
_position(e, t) {
|
|
663
|
-
|
|
663
|
+
P(e, t);
|
|
664
664
|
}
|
|
665
665
|
_setFocus(e, t, n, r) {
|
|
666
|
-
let { y: i, m: a } =
|
|
666
|
+
let { y: i, m: a } = K(e, t);
|
|
667
667
|
this._focus = {
|
|
668
668
|
y: i,
|
|
669
669
|
m: a,
|
|
670
670
|
d: n
|
|
671
671
|
};
|
|
672
672
|
let o = i !== this._viewY || a !== this._viewM;
|
|
673
|
-
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${
|
|
673
|
+
this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${U(i, a, n)}"]`)?.focus();
|
|
674
674
|
}
|
|
675
675
|
_onKey(e) {
|
|
676
676
|
if (this._mode !== "days") {
|
|
677
677
|
e.key === "Escape" && this._close();
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
|
-
let t = this._focus ||
|
|
680
|
+
let t = this._focus || W(this._value) || {
|
|
681
681
|
y: this._viewY,
|
|
682
682
|
m: this._viewM,
|
|
683
683
|
d: 1
|
|
@@ -695,17 +695,17 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
695
695
|
case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
|
|
696
696
|
case "PageUp": {
|
|
697
697
|
e.preventDefault();
|
|
698
|
-
let n =
|
|
699
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
698
|
+
let n = K(t.y, t.m - (e.shiftKey ? 12 : 1));
|
|
699
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, G(n.y, n.m)), "slide-prev");
|
|
700
700
|
}
|
|
701
701
|
case "PageDown": {
|
|
702
702
|
e.preventDefault();
|
|
703
|
-
let n =
|
|
704
|
-
return this._setFocus(n.y, n.m, Math.min(t.d,
|
|
703
|
+
let n = K(t.y, t.m + (e.shiftKey ? 12 : 1));
|
|
704
|
+
return this._setFocus(n.y, n.m, Math.min(t.d, G(n.y, n.m)), "slide-next");
|
|
705
705
|
}
|
|
706
706
|
case "Enter":
|
|
707
707
|
case " ":
|
|
708
|
-
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value =
|
|
708
|
+
e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = U(t.y, t.m, t.d), this._close());
|
|
709
709
|
return;
|
|
710
710
|
case "Escape": return this._close();
|
|
711
711
|
default:
|
|
@@ -716,11 +716,11 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
716
716
|
if (!e || !t) return;
|
|
717
717
|
let r = () => !t.hidden;
|
|
718
718
|
this._open = () => {
|
|
719
|
-
if (!
|
|
719
|
+
if (!W(this._value) && !this._viewNavigated) {
|
|
720
720
|
let e = /* @__PURE__ */ new Date();
|
|
721
721
|
this._viewY = e.getFullYear(), this._viewM = e.getMonth();
|
|
722
722
|
}
|
|
723
|
-
let r =
|
|
723
|
+
let r = W(this._value), i = /* @__PURE__ */ new Date();
|
|
724
724
|
this._mode = "days", this._focus = r || {
|
|
725
725
|
y: this._viewY,
|
|
726
726
|
m: this._viewM,
|
|
@@ -733,7 +733,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
733
733
|
let t = e.target.closest("[data-nav]");
|
|
734
734
|
if (t) {
|
|
735
735
|
this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
|
|
736
|
-
let e =
|
|
736
|
+
let e = K(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
737
737
|
this._viewY = e.y, this._viewM = e.m, this._focus = {
|
|
738
738
|
y: e.y,
|
|
739
739
|
m: e.m,
|
|
@@ -772,7 +772,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
772
772
|
}
|
|
773
773
|
if (e.target.closest("[data-today]")) {
|
|
774
774
|
let e = /* @__PURE__ */ new Date();
|
|
775
|
-
this.value =
|
|
775
|
+
this.value = U(e.getFullYear(), e.getMonth(), e.getDate()), this._close();
|
|
776
776
|
return;
|
|
777
777
|
}
|
|
778
778
|
if (e.target.closest("[data-clear]")) {
|
|
@@ -786,14 +786,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
786
786
|
}, t.addEventListener("keydown", this._onKeyBound), this._onDocClick = (e) => {
|
|
787
787
|
let t = this._popClick;
|
|
788
788
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
789
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
789
|
+
}, document.addEventListener("click", this._onDocClick), F(this, () => {
|
|
790
790
|
r() && this._position(e, t);
|
|
791
791
|
}), this._syncFormValue();
|
|
792
792
|
}
|
|
793
793
|
disconnectedCallback() {
|
|
794
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick),
|
|
794
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this);
|
|
795
795
|
}
|
|
796
|
-
},
|
|
796
|
+
}, le = [
|
|
797
797
|
"January",
|
|
798
798
|
"February",
|
|
799
799
|
"March",
|
|
@@ -806,7 +806,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
806
806
|
"October",
|
|
807
807
|
"November",
|
|
808
808
|
"December"
|
|
809
|
-
],
|
|
809
|
+
], ue = [
|
|
810
810
|
"Su",
|
|
811
811
|
"Mo",
|
|
812
812
|
"Tu",
|
|
@@ -814,24 +814,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
814
814
|
"Th",
|
|
815
815
|
"Fr",
|
|
816
816
|
"Sa"
|
|
817
|
-
],
|
|
817
|
+
], de = (e) => String(e).padStart(2, "0"), fe = (e, t, n) => `${e}-${de(t + 1)}-${de(n)}`, q = (e) => {
|
|
818
818
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
819
819
|
return t ? {
|
|
820
820
|
y: +t[1],
|
|
821
821
|
m: t[2] - 1,
|
|
822
822
|
d: +t[3]
|
|
823
823
|
} : null;
|
|
824
|
-
},
|
|
825
|
-
let t =
|
|
826
|
-
return t ? `${
|
|
827
|
-
},
|
|
824
|
+
}, pe = (e) => {
|
|
825
|
+
let t = q(e);
|
|
826
|
+
return t ? `${de(t.d)} ${le[t.m].slice(0, 3)} ${t.y}` : "";
|
|
827
|
+
}, me = (e, t) => new Date(e, t + 1, 0).getDate(), he = (e, t) => {
|
|
828
828
|
for (; t < 0;) t += 12, --e;
|
|
829
829
|
for (; t > 11;) t -= 12, e += 1;
|
|
830
830
|
return {
|
|
831
831
|
y: e,
|
|
832
832
|
m: t
|
|
833
833
|
};
|
|
834
|
-
},
|
|
834
|
+
}, ge = class extends HTMLElement {
|
|
835
835
|
static get observedAttributes() {
|
|
836
836
|
return [
|
|
837
837
|
"start",
|
|
@@ -874,13 +874,13 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
874
874
|
text: e,
|
|
875
875
|
empty: !0
|
|
876
876
|
} : {
|
|
877
|
-
text: `${
|
|
877
|
+
text: `${pe(this._start) || "Start"} – ${pe(this._end) || "End"}`,
|
|
878
878
|
empty: !1
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
881
|
render() {
|
|
882
882
|
this._start = this.getAttribute("start") || this._start, this._end = this.getAttribute("end") || this._end;
|
|
883
|
-
let e =
|
|
883
|
+
let e = q(this._start);
|
|
884
884
|
e && (this._viewY = e.y, this._viewM = e.m);
|
|
885
885
|
let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label();
|
|
886
886
|
this.innerHTML = `
|
|
@@ -908,24 +908,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
908
908
|
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "";
|
|
909
909
|
}
|
|
910
910
|
_limits() {
|
|
911
|
-
let e =
|
|
911
|
+
let e = q(this.getAttribute("min")), t = q(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
|
|
912
912
|
return (e, t, i) => {
|
|
913
913
|
let a = new Date(e, t, i).getTime();
|
|
914
914
|
return a < n || a > r;
|
|
915
915
|
};
|
|
916
916
|
}
|
|
917
917
|
_monthHtml(e, t) {
|
|
918
|
-
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i =
|
|
919
|
-
let i =
|
|
918
|
+
let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = me(e, t), a = this._limits(), o = ue.map((e, t) => ue[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
|
|
919
|
+
let i = fe(e, t, n), o = a(e, t, n);
|
|
920
920
|
return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
|
|
921
|
-
}, c = "", l =
|
|
921
|
+
}, c = "", l = he(e, t - 1), u = me(l.y, l.m);
|
|
922
922
|
for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
|
|
923
923
|
for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
|
|
924
|
-
let d =
|
|
924
|
+
let d = he(e, t + 1), f = (7 - (r + i) % 7) % 7;
|
|
925
925
|
for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
|
|
926
926
|
return `
|
|
927
927
|
<div class="daterange-cal">
|
|
928
|
-
<div class="datepicker-month-label">${
|
|
928
|
+
<div class="datepicker-month-label">${le[t]} ${e}</div>
|
|
929
929
|
<div class="datepicker-weekdays">${o}</div>
|
|
930
930
|
<div class="datepicker-grid" role="grid">${c}</div>
|
|
931
931
|
</div>`;
|
|
@@ -933,7 +933,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
933
933
|
_renderView() {
|
|
934
934
|
let e = this.querySelector(".daterange-pop");
|
|
935
935
|
if (!e) return;
|
|
936
|
-
let t =
|
|
936
|
+
let t = he(this._viewY, this._viewM + 1);
|
|
937
937
|
e.innerHTML = `
|
|
938
938
|
<div class="daterange-head">
|
|
939
939
|
<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>
|
|
@@ -959,10 +959,10 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
959
959
|
n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
|
|
960
960
|
}
|
|
961
961
|
let i = e.querySelector("[data-range-hint]");
|
|
962
|
-
i && (i.textContent = this._start ? this._end ? `${
|
|
962
|
+
i && (i.textContent = this._start ? this._end ? `${pe(this._start)} – ${pe(this._end)}` : "Pick an end date" : "Pick a start date");
|
|
963
963
|
}
|
|
964
964
|
_position(e, t) {
|
|
965
|
-
|
|
965
|
+
P(e, t);
|
|
966
966
|
}
|
|
967
967
|
_pick(e) {
|
|
968
968
|
if (!this._start || this._start && this._end) {
|
|
@@ -980,7 +980,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
980
980
|
if (!e || !t) return;
|
|
981
981
|
let r = () => !t.hidden;
|
|
982
982
|
this._open = () => {
|
|
983
|
-
let r =
|
|
983
|
+
let r = q(this._start);
|
|
984
984
|
if (r) this._viewY = r.y, this._viewM = r.m;
|
|
985
985
|
else {
|
|
986
986
|
let e = /* @__PURE__ */ new Date();
|
|
@@ -993,7 +993,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
993
993
|
this._popClick = !0;
|
|
994
994
|
let t = e.target.closest("[data-nav]");
|
|
995
995
|
if (t) {
|
|
996
|
-
let e =
|
|
996
|
+
let e = he(this._viewY, this._viewM + Number(t.dataset.nav));
|
|
997
997
|
this._viewY = e.y, this._viewM = e.m, this._renderView();
|
|
998
998
|
return;
|
|
999
999
|
}
|
|
@@ -1011,14 +1011,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1011
1011
|
this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
|
|
1012
1012
|
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
1013
1013
|
r() && e.key === "Escape" && this._close();
|
|
1014
|
-
}, document.addEventListener("keydown", this._onDocKey),
|
|
1014
|
+
}, document.addEventListener("keydown", this._onDocKey), F(this, () => {
|
|
1015
1015
|
r() && this._position(e, t);
|
|
1016
1016
|
}), this._syncMirrors();
|
|
1017
1017
|
}
|
|
1018
1018
|
disconnectedCallback() {
|
|
1019
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey),
|
|
1019
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), I(this);
|
|
1020
1020
|
}
|
|
1021
|
-
},
|
|
1021
|
+
}, _e = class extends HTMLElement {
|
|
1022
1022
|
_accessibleName() {
|
|
1023
1023
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
1024
1024
|
}
|
|
@@ -1053,7 +1053,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1053
1053
|
return this._values.slice();
|
|
1054
1054
|
}
|
|
1055
1055
|
set values(e) {
|
|
1056
|
-
this._values = Array.isArray(e) ? e.map(String) : [],
|
|
1056
|
+
this._values = Array.isArray(e) ? e.map(String) : [], L(this, this._values.join(",")), this._rendered && this._renderControl();
|
|
1057
1057
|
}
|
|
1058
1058
|
set options(e) {
|
|
1059
1059
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -1068,7 +1068,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1068
1068
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
1069
1069
|
label: e.innerHTML,
|
|
1070
1070
|
icon: e.getAttribute("icon") || void 0,
|
|
1071
|
-
[
|
|
1071
|
+
[R]: !0,
|
|
1072
1072
|
selected: e.hasAttribute("selected")
|
|
1073
1073
|
})));
|
|
1074
1074
|
}
|
|
@@ -1081,34 +1081,34 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1081
1081
|
}
|
|
1082
1082
|
_labelHtmlFor(e) {
|
|
1083
1083
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
1084
|
-
return t ?
|
|
1084
|
+
return t ? B(t) : z(e);
|
|
1085
1085
|
}
|
|
1086
1086
|
render() {
|
|
1087
1087
|
this._snapshotDeclared();
|
|
1088
1088
|
let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…", n = this.getAttribute("icon"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "";
|
|
1089
|
-
|
|
1089
|
+
L(this, this._values.join(",")), this.innerHTML = `
|
|
1090
1090
|
<div class="search-select${i}">
|
|
1091
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
1092
|
-
${n ? `<i class="bi bi-${
|
|
1091
|
+
<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\"" : ""}>
|
|
1092
|
+
${n ? `<i class="bi bi-${J(n)} search-select-icon" aria-hidden="true"></i>` : ""}
|
|
1093
1093
|
<div class="ms-chips" data-chips></div>
|
|
1094
1094
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
1095
1095
|
</div>
|
|
1096
1096
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
|
|
1097
|
-
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
1097
|
+
${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>` : ""}
|
|
1098
1098
|
<div class="search-select-options"></div>
|
|
1099
1099
|
<div class="search-select-empty" hidden>No matches</div>
|
|
1100
1100
|
</div>
|
|
1101
|
-
</div>`, this._rendered = !0,
|
|
1101
|
+
</div>`, this._rendered = !0, L(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
|
|
1102
1102
|
}
|
|
1103
1103
|
_renderControl() {
|
|
1104
1104
|
let e = this.querySelector("[data-chips]");
|
|
1105
1105
|
if (!e) return;
|
|
1106
1106
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
1107
1107
|
if (!this._values.length) {
|
|
1108
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
1108
|
+
e.innerHTML = `<span class="search-select-placeholder">${z(t)}</span>`;
|
|
1109
1109
|
return;
|
|
1110
1110
|
}
|
|
1111
|
-
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="${
|
|
1111
|
+
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(""), this._collapseChips();
|
|
1112
1112
|
}
|
|
1113
1113
|
_collapseChips() {
|
|
1114
1114
|
let e = this.querySelector("[data-chips]");
|
|
@@ -1132,9 +1132,9 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1132
1132
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
1133
1133
|
if (!t) return;
|
|
1134
1134
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
1135
|
-
r && (i = i.filter((e) =>
|
|
1135
|
+
r && (i = i.filter((e) => ve(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
|
|
1136
1136
|
let t = this._values.includes(String(e.value));
|
|
1137
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
1137
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${J(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${B(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
|
|
1138
1138
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1;
|
|
1139
1139
|
}
|
|
1140
1140
|
_wire() {
|
|
@@ -1142,7 +1142,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1142
1142
|
if (!e || !t) return;
|
|
1143
1143
|
let a = () => this.hasAttribute("disabled");
|
|
1144
1144
|
!this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this));
|
|
1145
|
-
let o = () =>
|
|
1145
|
+
let o = () => P(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
|
|
1146
1146
|
let t = c();
|
|
1147
1147
|
this._active = e;
|
|
1148
1148
|
for (let e of s()) e.classList.remove("is-active");
|
|
@@ -1152,7 +1152,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1152
1152
|
}, f = () => {
|
|
1153
1153
|
t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
|
|
1154
1154
|
}, p = () => {
|
|
1155
|
-
|
|
1155
|
+
L(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1156
1156
|
}, m = (e) => {
|
|
1157
1157
|
let t = String(e);
|
|
1158
1158
|
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();
|
|
@@ -1189,14 +1189,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1189
1189
|
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
|
|
1190
1190
|
}), this._onDocClick = (e) => {
|
|
1191
1191
|
u() && !this.contains(e.target) && f();
|
|
1192
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
1192
|
+
}, document.addEventListener("click", this._onDocClick), F(this, () => {
|
|
1193
1193
|
u() && o();
|
|
1194
1194
|
});
|
|
1195
1195
|
}
|
|
1196
1196
|
disconnectedCallback() {
|
|
1197
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick),
|
|
1197
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this), this._ro?.disconnect(), this._ro = null;
|
|
1198
1198
|
}
|
|
1199
|
-
},
|
|
1199
|
+
}, J = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), ve = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ye = /[^0-9]/g, be = /[^0-9a-zA-Z]/g, xe = class extends HTMLElement {
|
|
1200
1200
|
static get observedAttributes() {
|
|
1201
1201
|
return [
|
|
1202
1202
|
"value",
|
|
@@ -1223,16 +1223,16 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1223
1223
|
return this._value ?? "";
|
|
1224
1224
|
}
|
|
1225
1225
|
set value(e) {
|
|
1226
|
-
this._value = this._clean(e),
|
|
1226
|
+
this._value = this._clean(e), L(this, this._value), this._paint();
|
|
1227
1227
|
}
|
|
1228
1228
|
_clean(e) {
|
|
1229
|
-
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ?
|
|
1229
|
+
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? be : ye, "").slice(0, this.length);
|
|
1230
1230
|
}
|
|
1231
1231
|
connectedCallback() {
|
|
1232
1232
|
this._rendered || this.render();
|
|
1233
1233
|
}
|
|
1234
1234
|
attributeChangedCallback(e, t, n) {
|
|
1235
|
-
this._rendered && (e === "value" ? (this._value = this._clean(n),
|
|
1235
|
+
this._rendered && (e === "value" ? (this._value = this._clean(n), L(this, this._value), this._paint()) : this.render());
|
|
1236
1236
|
}
|
|
1237
1237
|
render() {
|
|
1238
1238
|
this._value = this._clean(this.getAttribute("value") ?? this._value);
|
|
@@ -1250,7 +1250,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1250
1250
|
spellcheck="false"
|
|
1251
1251
|
${n ? "disabled" : ""} />
|
|
1252
1252
|
<div class="otp-slots" aria-hidden="true">${r}</div>
|
|
1253
|
-
</div>`, this._rendered = !0,
|
|
1253
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire(), this._paint();
|
|
1254
1254
|
}
|
|
1255
1255
|
_refs() {
|
|
1256
1256
|
return {
|
|
@@ -1272,7 +1272,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1272
1272
|
if (!e) return;
|
|
1273
1273
|
let t = (e) => {
|
|
1274
1274
|
let t = this._clean(e), n = t !== this._value;
|
|
1275
|
-
this._value = t,
|
|
1275
|
+
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", {
|
|
1276
1276
|
bubbles: !0,
|
|
1277
1277
|
detail: t
|
|
1278
1278
|
}));
|
|
@@ -1292,7 +1292,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1292
1292
|
document.activeElement === e && this._paint();
|
|
1293
1293
|
});
|
|
1294
1294
|
}
|
|
1295
|
-
},
|
|
1295
|
+
}, Se = [
|
|
1296
1296
|
[
|
|
1297
1297
|
"AF",
|
|
1298
1298
|
"Afghanistan",
|
|
@@ -2518,11 +2518,67 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2518
2518
|
"Zimbabwe",
|
|
2519
2519
|
"263"
|
|
2520
2520
|
]
|
|
2521
|
-
],
|
|
2521
|
+
], Ce = (e) => (Se.find((t) => t[0] === e) || [
|
|
2522
2522
|
"",
|
|
2523
2523
|
"",
|
|
2524
2524
|
""
|
|
2525
|
-
])[2],
|
|
2525
|
+
])[2], we = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, Te = null;
|
|
2526
|
+
function Ee() {
|
|
2527
|
+
return Y ? Promise.resolve(Y) : (Te ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
|
|
2528
|
+
AsYouType: e.AsYouType,
|
|
2529
|
+
getExampleNumber: e.getExampleNumber,
|
|
2530
|
+
isValidPhoneNumber: e.isValidPhoneNumber,
|
|
2531
|
+
examples: t.default || t
|
|
2532
|
+
}, Y)).catch(() => null), Te);
|
|
2533
|
+
}
|
|
2534
|
+
function De(e, t) {
|
|
2535
|
+
if (!Y || !t) return t;
|
|
2536
|
+
try {
|
|
2537
|
+
return new Y.AsYouType(e).input(t);
|
|
2538
|
+
} catch {
|
|
2539
|
+
return t;
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
function Oe(e) {
|
|
2543
|
+
if (!Y) return null;
|
|
2544
|
+
try {
|
|
2545
|
+
return Y.getExampleNumber(e, Y.examples)?.formatNational() || null;
|
|
2546
|
+
} catch {
|
|
2547
|
+
return null;
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
function ke(e) {
|
|
2551
|
+
if (!Y || !e) return null;
|
|
2552
|
+
try {
|
|
2553
|
+
return Y.isValidPhoneNumber(e);
|
|
2554
|
+
} catch {
|
|
2555
|
+
return null;
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
function Ae(e) {
|
|
2559
|
+
if (!Y) return null;
|
|
2560
|
+
try {
|
|
2561
|
+
let t = Y.getExampleNumber(e, Y.examples);
|
|
2562
|
+
return t?.nationalNumber ? t.nationalNumber.length : null;
|
|
2563
|
+
} catch {
|
|
2564
|
+
return null;
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
function je(e) {
|
|
2568
|
+
if (!Y || !e?.trim().startsWith("+")) return null;
|
|
2569
|
+
try {
|
|
2570
|
+
let t = new Y.AsYouType();
|
|
2571
|
+
t.input(e.trim());
|
|
2572
|
+
let n = t.getCountry();
|
|
2573
|
+
return n ? {
|
|
2574
|
+
country: n,
|
|
2575
|
+
national: t.getNationalNumber() || ""
|
|
2576
|
+
} : null;
|
|
2577
|
+
} catch {
|
|
2578
|
+
return null;
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
var Me = class extends HTMLElement {
|
|
2526
2582
|
static get observedAttributes() {
|
|
2527
2583
|
return [
|
|
2528
2584
|
"value",
|
|
@@ -2541,73 +2597,97 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2541
2597
|
this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
|
|
2542
2598
|
}
|
|
2543
2599
|
get value() {
|
|
2544
|
-
return `+${
|
|
2600
|
+
return `+${Ce(this._country)}${this._national}`;
|
|
2545
2601
|
}
|
|
2546
2602
|
set value(e) {
|
|
2547
2603
|
this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
|
|
2548
2604
|
}
|
|
2549
2605
|
_commit() {
|
|
2550
|
-
|
|
2606
|
+
L(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2551
2607
|
}
|
|
2552
2608
|
render() {
|
|
2553
|
-
let e = this.getAttribute("placeholder") || "Enter phone number";
|
|
2609
|
+
let e = this.getAttribute("placeholder") || Oe(this._country) || "Enter phone number";
|
|
2554
2610
|
this._country = this.getAttribute("country") || this._country;
|
|
2555
|
-
let t =
|
|
2611
|
+
let t = Se.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${we(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
|
|
2556
2612
|
this.innerHTML = `
|
|
2557
2613
|
<div class="phone-input-wrap">
|
|
2558
2614
|
<div class="phone-country-adornment">
|
|
2559
2615
|
<button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2560
|
-
<span class="${
|
|
2616
|
+
<span class="${we(this._country)}" data-flag aria-hidden="true"></span>
|
|
2561
2617
|
<i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
|
|
2562
|
-
<span class="phone-dial" data-dial>+${
|
|
2618
|
+
<span class="phone-dial" data-dial>+${Ce(this._country)}</span>
|
|
2563
2619
|
</button>
|
|
2564
2620
|
<div class="country-dropdown-menu" role="listbox" hidden>
|
|
2565
2621
|
<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>
|
|
2566
2622
|
<div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
|
|
2567
2623
|
</div>
|
|
2568
2624
|
</div>
|
|
2569
|
-
<input type="tel" class="input" placeholder="${
|
|
2570
|
-
</div
|
|
2625
|
+
<input type="tel" class="input" placeholder="${Ne(e)}" value="${Ne(De(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
2626
|
+
</div>
|
|
2627
|
+
<div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, L(this, this.value), this._wire();
|
|
2571
2628
|
}
|
|
2572
2629
|
_wire() {
|
|
2573
|
-
let e = this.querySelector(".country-toggle"), t = this.querySelector(".country-dropdown-menu"),
|
|
2574
|
-
if (!e || !
|
|
2575
|
-
let
|
|
2576
|
-
let
|
|
2577
|
-
|
|
2578
|
-
}, u = () => {
|
|
2579
|
-
t.hidden = !1, e.setAttribute("aria-expanded", "true"), n.value = "", f(""), l(), n.focus();
|
|
2630
|
+
let e = this.querySelector(".country-toggle"), t = this.querySelector(".phone-input-wrap"), n = this.querySelector(".country-dropdown-menu"), r = this.querySelector(".dropdown-search-input"), i = this.querySelector(".country-list-scroll"), a = this.querySelector(".country-empty"), o = this.querySelector("input[type=tel]"), s = this.querySelector("[data-flag]"), c = this.querySelector("[data-dial]");
|
|
2631
|
+
if (!e || !n) return;
|
|
2632
|
+
let l = () => !n.hidden, u = () => {
|
|
2633
|
+
let r = (t || e).getBoundingClientRect(), i = n.offsetWidth || 320, a = n.offsetHeight || 320, o = window.innerHeight - r.bottom, s = o < a + 6 && r.top > o ? r.top - a - 6 : r.bottom + 6, c = Math.min(Math.max(8, r.left), Math.max(8, window.innerWidth - i - 8));
|
|
2634
|
+
n.style.top = `${Math.max(8, s)}px`, n.style.left = `${c}px`;
|
|
2580
2635
|
}, d = () => {
|
|
2581
|
-
|
|
2636
|
+
n.hidden = !1, e.setAttribute("aria-expanded", "true"), r.value = "", p(""), u(), r.focus();
|
|
2637
|
+
}, f = () => {
|
|
2638
|
+
n.hidden = !0, e.setAttribute("aria-expanded", "false");
|
|
2582
2639
|
};
|
|
2583
2640
|
this._reposition = () => {
|
|
2584
|
-
|
|
2641
|
+
l() && u();
|
|
2585
2642
|
}, window.addEventListener("scroll", this._reposition, !0), window.addEventListener("resize", this._reposition);
|
|
2586
|
-
let
|
|
2643
|
+
let p = (e) => {
|
|
2587
2644
|
let t = e.trim().toLowerCase(), n = 0;
|
|
2588
|
-
for (let e of
|
|
2645
|
+
for (let e of i.querySelectorAll(".country-dropdown-item")) {
|
|
2589
2646
|
let r = !t || e.textContent.toLowerCase().includes(t);
|
|
2590
2647
|
e.hidden = !r, r && (n += 1);
|
|
2591
2648
|
}
|
|
2592
|
-
|
|
2593
|
-
},
|
|
2594
|
-
this._country = e, this.setAttribute("country", e),
|
|
2595
|
-
for (let t of
|
|
2596
|
-
|
|
2649
|
+
a && (a.hidden = n > 0);
|
|
2650
|
+
}, m = (e) => {
|
|
2651
|
+
this._country = e, this.setAttribute("country", e), s && (s.className = we(e)), c && (c.textContent = `+${Ce(e)}`);
|
|
2652
|
+
for (let t of i.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
|
|
2653
|
+
f(), this._commit();
|
|
2597
2654
|
};
|
|
2598
|
-
e.addEventListener("click", () =>
|
|
2655
|
+
e.addEventListener("click", () => l() ? f() : d()), r.addEventListener("input", () => p(r.value)), i.addEventListener("click", (e) => {
|
|
2599
2656
|
let t = e.target.closest(".country-dropdown-item");
|
|
2600
|
-
t &&
|
|
2601
|
-
})
|
|
2602
|
-
|
|
2657
|
+
t && m(t.dataset.iso);
|
|
2658
|
+
});
|
|
2659
|
+
let h = this.querySelector("[data-phone-error]"), g = (e) => {
|
|
2660
|
+
if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), h) {
|
|
2661
|
+
if (e) {
|
|
2662
|
+
let e = Oe(this._country);
|
|
2663
|
+
h.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
|
|
2664
|
+
}
|
|
2665
|
+
h.hidden = !e;
|
|
2666
|
+
}
|
|
2667
|
+
};
|
|
2668
|
+
o.addEventListener("input", () => {
|
|
2669
|
+
let e = o.value.replace(/[^0-9]/g, ""), t = Ae(this._country);
|
|
2670
|
+
t && e.length > t && (e = e.slice(0, t)), this._national = e;
|
|
2671
|
+
let n = De(this._country, this._national);
|
|
2672
|
+
o.value !== n && (o.value = n), this._commit(), o.classList.contains("is-invalid") && (!this._national || ke(this.value) === !0) && g(!1);
|
|
2673
|
+
}), o.addEventListener("blur", () => {
|
|
2674
|
+
g(this._national.length > 0 && ke(this.value) === !1);
|
|
2675
|
+
}), o.addEventListener("paste", (e) => {
|
|
2676
|
+
let t = je(e.clipboardData?.getData("text"));
|
|
2677
|
+
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = De(this._country, this._national) : this.setAttribute("country", t.country), this._commit(), this.querySelector("input[type=tel]")?.focus());
|
|
2603
2678
|
}), this._onDocClick = (e) => {
|
|
2604
|
-
|
|
2605
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
2679
|
+
l() && !this.contains(e.target) && f();
|
|
2680
|
+
}, document.addEventListener("click", this._onDocClick), Ee().then((e) => {
|
|
2681
|
+
if (!(!e || !o) && (this._national && (o.value = De(this._country, this._national)), !this.getAttribute("placeholder"))) {
|
|
2682
|
+
let e = Oe(this._country);
|
|
2683
|
+
e && (o.placeholder = e);
|
|
2684
|
+
}
|
|
2685
|
+
}), L(this, this.value);
|
|
2606
2686
|
}
|
|
2607
2687
|
disconnectedCallback() {
|
|
2608
2688
|
this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2609
2689
|
}
|
|
2610
|
-
},
|
|
2690
|
+
}, Ne = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), Pe = class extends HTMLElement {
|
|
2611
2691
|
static get observedAttributes() {
|
|
2612
2692
|
return [
|
|
2613
2693
|
"value",
|
|
@@ -2639,7 +2719,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2639
2719
|
return this._value;
|
|
2640
2720
|
}
|
|
2641
2721
|
set value(e) {
|
|
2642
|
-
this._value = e == null ? "" : String(e),
|
|
2722
|
+
this._value = e == null ? "" : String(e), L(this, this._value), this._syncSelected(), this._syncReset();
|
|
2643
2723
|
}
|
|
2644
2724
|
set options(e) {
|
|
2645
2725
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -2654,7 +2734,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2654
2734
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
2655
2735
|
label: e.innerHTML,
|
|
2656
2736
|
icon: e.getAttribute("icon") || void 0,
|
|
2657
|
-
[
|
|
2737
|
+
[R]: !0,
|
|
2658
2738
|
selected: e.hasAttribute("selected")
|
|
2659
2739
|
})));
|
|
2660
2740
|
}
|
|
@@ -2664,25 +2744,25 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2664
2744
|
render() {
|
|
2665
2745
|
this._snapshotDeclared();
|
|
2666
2746
|
let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.hasAttribute("clearable"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "", a = this.getAttribute("icon"), o = this.getAttribute("prefix"), s = this.getAttribute("placeholder") || "Select...", c = this.getAttribute("search-placeholder") || "Search...", l = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
|
|
2667
|
-
l && (this._value = String(l.value)),
|
|
2747
|
+
l && (this._value = String(l.value)), L(this, this._value);
|
|
2668
2748
|
let u = e.map((e) => {
|
|
2669
2749
|
let t = String(e.value) === String(this._value);
|
|
2670
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
2750
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Fe(e.value)}" aria-selected="${t}">${B(e)}</button>`;
|
|
2671
2751
|
}).join("");
|
|
2672
2752
|
this.innerHTML = `
|
|
2673
2753
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
2674
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
2675
|
-
${a ? `<i class="bi bi-${
|
|
2676
|
-
${o ? `<span class="search-select-prefix">${
|
|
2677
|
-
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ?
|
|
2754
|
+
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${Fe(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2755
|
+
${a ? `<i class="bi bi-${Fe(a)} search-select-icon" aria-hidden="true"></i>` : ""}
|
|
2756
|
+
${o ? `<span class="search-select-prefix">${z(o)}</span>` : ""}
|
|
2757
|
+
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? B(l) : z(s)}</span>
|
|
2678
2758
|
${n ? "<span class=\"search-select-reset\" role=\"button\" aria-label=\"Clear selection\" hidden><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></span>" : ""}
|
|
2679
2759
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
2680
2760
|
</button>
|
|
2681
2761
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
|
|
2682
|
-
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
2762
|
+
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${Fe(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
|
|
2683
2763
|
<div class="search-select-options">${u}<div class="search-select-empty" hidden>No matches</div></div>
|
|
2684
2764
|
</div>
|
|
2685
|
-
</div>`, this._rendered = !0,
|
|
2765
|
+
</div>`, this._rendered = !0, L(this, this._value), this._wire(), this._syncReset();
|
|
2686
2766
|
}
|
|
2687
2767
|
_refs() {
|
|
2688
2768
|
return {
|
|
@@ -2708,7 +2788,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2708
2788
|
let t = e.dataset.value === String(this._value);
|
|
2709
2789
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
2710
2790
|
}
|
|
2711
|
-
e && (e.innerHTML = t ?
|
|
2791
|
+
e && (e.innerHTML = t ? B(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
|
|
2712
2792
|
}
|
|
2713
2793
|
_syncReset() {
|
|
2714
2794
|
let { reset: e } = this._refs();
|
|
@@ -2720,8 +2800,8 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2720
2800
|
let t = () => {
|
|
2721
2801
|
if (this.hasAttribute("compact")) {
|
|
2722
2802
|
let t = e.control.getBoundingClientRect();
|
|
2723
|
-
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px",
|
|
2724
|
-
} else
|
|
2803
|
+
e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", P(e.control, e.menu);
|
|
2804
|
+
} else P(e.control, e.menu, { matchWidth: !0 });
|
|
2725
2805
|
}, n = (e) => {
|
|
2726
2806
|
let t = this._visible();
|
|
2727
2807
|
this._active = e;
|
|
@@ -2764,21 +2844,21 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2764
2844
|
e.search.value = "", r(""), e.search.focus();
|
|
2765
2845
|
}), e.menu.addEventListener("keydown", c), this._onDocClick = (e) => {
|
|
2766
2846
|
i() && !this.contains(e.target) && o();
|
|
2767
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
2847
|
+
}, document.addEventListener("click", this._onDocClick), F(this, () => {
|
|
2768
2848
|
i() && t();
|
|
2769
2849
|
});
|
|
2770
2850
|
}
|
|
2771
2851
|
disconnectedCallback() {
|
|
2772
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick),
|
|
2852
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this);
|
|
2773
2853
|
}
|
|
2774
|
-
},
|
|
2854
|
+
}, Fe = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), Ie = "image/png,image/jpeg,image/webp", Le = {
|
|
2775
2855
|
"image/png": [".png"],
|
|
2776
2856
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
2777
2857
|
"image/webp": [".webp"],
|
|
2778
2858
|
"image/gif": [".gif"],
|
|
2779
2859
|
"image/svg+xml": [".svg"],
|
|
2780
2860
|
"application/pdf": [".pdf"]
|
|
2781
|
-
},
|
|
2861
|
+
}, Re = {
|
|
2782
2862
|
"image/png": "PNG",
|
|
2783
2863
|
"image/jpeg": "JPG",
|
|
2784
2864
|
"image/webp": "WEBP",
|
|
@@ -2792,33 +2872,33 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2792
2872
|
".gif": "GIF",
|
|
2793
2873
|
".svg": "SVG",
|
|
2794
2874
|
".pdf": "PDF"
|
|
2795
|
-
},
|
|
2796
|
-
function
|
|
2875
|
+
}, ze = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
2876
|
+
function Be(e) {
|
|
2797
2877
|
let t = [];
|
|
2798
|
-
for (let n of
|
|
2799
|
-
let e =
|
|
2878
|
+
for (let n of ze(e)) {
|
|
2879
|
+
let e = Re[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
2800
2880
|
t.includes(e) || t.push(e);
|
|
2801
2881
|
}
|
|
2802
2882
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
2803
2883
|
}
|
|
2804
|
-
function
|
|
2805
|
-
let n =
|
|
2884
|
+
function Ve(e, t) {
|
|
2885
|
+
let n = ze(t);
|
|
2806
2886
|
if (!n.length) return !0;
|
|
2807
2887
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
2808
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
2888
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Le[e] || []).some((e) => i.endsWith(e)));
|
|
2809
2889
|
}
|
|
2810
|
-
function
|
|
2890
|
+
function He(e, t = {}) {
|
|
2811
2891
|
if (!e) return null;
|
|
2812
|
-
let n = t.accept === void 0 ?
|
|
2813
|
-
return
|
|
2892
|
+
let n = t.accept === void 0 ? Ie : t.accept, r = t.maxSizeMb || 5;
|
|
2893
|
+
return Ve(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Be(n)} file.`;
|
|
2814
2894
|
}
|
|
2815
2895
|
var X = (e, t) => {
|
|
2816
2896
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
2817
2897
|
};
|
|
2818
|
-
function
|
|
2819
|
-
X("wui-select",
|
|
2898
|
+
function Ue() {
|
|
2899
|
+
X("wui-select", Pe), X("wui-phone", Me), X("wui-datepicker", ce), X("wui-date-range", ge), X("wui-autocomplete", re), X("wui-multiselect", _e), X("wui-otp", xe), X("wui-status-icon", ee);
|
|
2820
2900
|
}
|
|
2821
|
-
|
|
2901
|
+
Ue();
|
|
2822
2902
|
//#endregion
|
|
2823
2903
|
//#region src/components/RequiredMark.jsx
|
|
2824
2904
|
function Z() {
|
|
@@ -2830,7 +2910,7 @@ function Z() {
|
|
|
2830
2910
|
}
|
|
2831
2911
|
//#endregion
|
|
2832
2912
|
//#region src/components/AppAutocomplete.jsx
|
|
2833
|
-
function
|
|
2913
|
+
function We({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: l, debounce: u, disabled: d = !1, size: f, name: p, label: m, error: h, hint: g, required: _ = !1, fieldClassName: v = "", ...y }) {
|
|
2834
2914
|
T("AppAutocomplete", y);
|
|
2835
2915
|
let b = c(null), x = typeof o == "function";
|
|
2836
2916
|
return a(() => {
|
|
@@ -2892,13 +2972,13 @@ function Ie({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
|
|
|
2892
2972
|
}
|
|
2893
2973
|
//#endregion
|
|
2894
2974
|
//#region src/components/AppAvatar.jsx
|
|
2895
|
-
function
|
|
2975
|
+
function Ge(e) {
|
|
2896
2976
|
let t = (e || "").trim();
|
|
2897
2977
|
if (!t) return "?";
|
|
2898
2978
|
let n = t.split(/\s+/).filter(Boolean);
|
|
2899
2979
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
2900
2980
|
}
|
|
2901
|
-
function
|
|
2981
|
+
function Ke({ name: e, src: n, className: r = "", ...i }) {
|
|
2902
2982
|
T("AppAvatar", i);
|
|
2903
2983
|
let a = ["avatar", r].filter(Boolean).join(" ");
|
|
2904
2984
|
return n ? /* @__PURE__ */ t("span", {
|
|
@@ -2912,12 +2992,12 @@ function Re({ name: e, src: n, className: r = "", ...i }) {
|
|
|
2912
2992
|
className: a,
|
|
2913
2993
|
role: "img",
|
|
2914
2994
|
"aria-label": e,
|
|
2915
|
-
children:
|
|
2995
|
+
children: Ge(e)
|
|
2916
2996
|
});
|
|
2917
2997
|
}
|
|
2918
2998
|
//#endregion
|
|
2919
2999
|
//#region src/components/AppBadge.jsx
|
|
2920
|
-
function
|
|
3000
|
+
function qe({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
2921
3001
|
return T("AppBadge", a), /* @__PURE__ */ t(d, {
|
|
2922
3002
|
bg: !1,
|
|
2923
3003
|
className: [
|
|
@@ -2931,14 +3011,14 @@ function ze({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
|
2931
3011
|
}
|
|
2932
3012
|
//#endregion
|
|
2933
3013
|
//#region src/components/AppButton.jsx
|
|
2934
|
-
var
|
|
3014
|
+
var Je = {
|
|
2935
3015
|
primary: "primary",
|
|
2936
3016
|
secondary: "secondary",
|
|
2937
3017
|
outline: "outline-primary",
|
|
2938
3018
|
ghost: "link",
|
|
2939
3019
|
danger: "danger"
|
|
2940
3020
|
};
|
|
2941
|
-
function
|
|
3021
|
+
function Ye(e, n) {
|
|
2942
3022
|
if (!e) return null;
|
|
2943
3023
|
let r = n === "left" ? "me-2" : "ms-2";
|
|
2944
3024
|
return typeof e == "string" ? /* @__PURE__ */ t(O, {
|
|
@@ -2955,7 +3035,7 @@ function Q({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2955
3035
|
let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
|
|
2956
3036
|
return /* @__PURE__ */ n(f, {
|
|
2957
3037
|
type: (p.as === void 0 || p.as === "button") && p.href === void 0 ? a : void 0,
|
|
2958
|
-
variant:
|
|
3038
|
+
variant: Je[r] ?? "primary",
|
|
2959
3039
|
size: i === "md" ? void 0 : i,
|
|
2960
3040
|
disabled: s || o,
|
|
2961
3041
|
className: m || void 0,
|
|
@@ -2965,15 +3045,15 @@ function Q({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2965
3045
|
className: "spinner-border spinner-border-sm me-2",
|
|
2966
3046
|
"aria-hidden": "true"
|
|
2967
3047
|
}),
|
|
2968
|
-
!o &&
|
|
3048
|
+
!o && Ye(l, "left"),
|
|
2969
3049
|
e,
|
|
2970
|
-
!o &&
|
|
3050
|
+
!o && Ye(u, "right")
|
|
2971
3051
|
]
|
|
2972
3052
|
});
|
|
2973
3053
|
}
|
|
2974
3054
|
//#endregion
|
|
2975
3055
|
//#region src/components/AppCallout.jsx
|
|
2976
|
-
function
|
|
3056
|
+
function Xe({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
2977
3057
|
return T("AppCallout", a), /* @__PURE__ */ n("div", {
|
|
2978
3058
|
className: `info-callout${i ? ` ${i}` : ""}`,
|
|
2979
3059
|
children: [r && /* @__PURE__ */ t("span", {
|
|
@@ -2987,7 +3067,7 @@ function He({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
|
2987
3067
|
}
|
|
2988
3068
|
//#endregion
|
|
2989
3069
|
//#region src/components/AppCard.jsx
|
|
2990
|
-
function
|
|
3070
|
+
function Ze({ 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 }) {
|
|
2991
3071
|
T("AppCard", h);
|
|
2992
3072
|
let g = a != null || r != null || o != null || s != null;
|
|
2993
3073
|
return /* @__PURE__ */ n(p, {
|
|
@@ -3012,7 +3092,7 @@ function Ue({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
3012
3092
|
}
|
|
3013
3093
|
//#endregion
|
|
3014
3094
|
//#region src/components/AppCheckbox.jsx
|
|
3015
|
-
var
|
|
3095
|
+
var Qe = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
3016
3096
|
T("AppCheckbox", s);
|
|
3017
3097
|
let l = o(), u = r || i || l;
|
|
3018
3098
|
return /* @__PURE__ */ n("div", {
|
|
@@ -3033,7 +3113,7 @@ var We = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
3033
3113
|
});
|
|
3034
3114
|
//#endregion
|
|
3035
3115
|
//#region src/components/AppChip.jsx
|
|
3036
|
-
function
|
|
3116
|
+
function $e({ 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 }) {
|
|
3037
3117
|
T("AppChip", m);
|
|
3038
3118
|
let h = r ?? i, g = [
|
|
3039
3119
|
"chip",
|
|
@@ -3085,7 +3165,7 @@ function Ge({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
3085
3165
|
}
|
|
3086
3166
|
//#endregion
|
|
3087
3167
|
//#region src/components/AppChoiceCard.jsx
|
|
3088
|
-
function
|
|
3168
|
+
function et({ 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 }) {
|
|
3089
3169
|
return T("AppChoiceCard", y), /* @__PURE__ */ n("label", {
|
|
3090
3170
|
className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
3091
3171
|
children: [
|
|
@@ -3133,7 +3213,7 @@ function Ke({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
3133
3213
|
}
|
|
3134
3214
|
//#endregion
|
|
3135
3215
|
//#region src/components/AppChoiceChip.jsx
|
|
3136
|
-
function
|
|
3216
|
+
function tt({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
|
|
3137
3217
|
return T("AppChoiceChip", d), /* @__PURE__ */ n("label", {
|
|
3138
3218
|
className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
|
|
3139
3219
|
children: [
|
|
@@ -3154,31 +3234,31 @@ function qe({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
|
|
|
3154
3234
|
}
|
|
3155
3235
|
//#endregion
|
|
3156
3236
|
//#region src/components/AppColorField.jsx
|
|
3157
|
-
function
|
|
3158
|
-
T("AppColorField",
|
|
3159
|
-
let
|
|
3237
|
+
function nt({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: o, hint: s, name: c, id: l, disabled: u = !1, size: d = "md", className: f = "", ...p }) {
|
|
3238
|
+
T("AppColorField", p);
|
|
3239
|
+
let m = l || c, h = (e) => /^#[0-9a-f]{6}$/i.test(e), g = d === "sm" ? " color-field-sm" : d === "lg" ? " color-field-lg" : "", _ = d === "sm" ? " input-sm" : d === "lg" ? " input-lg" : "";
|
|
3160
3240
|
return /* @__PURE__ */ n("div", {
|
|
3161
|
-
className: `field${
|
|
3241
|
+
className: `field${f ? ` ${f}` : ""}`,
|
|
3162
3242
|
children: [
|
|
3163
3243
|
i && /* @__PURE__ */ n("label", {
|
|
3164
3244
|
className: "label",
|
|
3165
|
-
htmlFor:
|
|
3245
|
+
htmlFor: m,
|
|
3166
3246
|
children: [i, a && /* @__PURE__ */ t(Z, {})]
|
|
3167
3247
|
}),
|
|
3168
3248
|
/* @__PURE__ */ n("div", {
|
|
3169
|
-
className:
|
|
3249
|
+
className: `color-field${g}`,
|
|
3170
3250
|
children: [/* @__PURE__ */ t("input", {
|
|
3171
3251
|
type: "color",
|
|
3172
3252
|
className: "color-field-swatch",
|
|
3173
|
-
value: (
|
|
3253
|
+
value: h(e) ? e : "#000000",
|
|
3174
3254
|
onChange: (e) => r?.(e.target.value),
|
|
3175
3255
|
disabled: u,
|
|
3176
3256
|
"aria-label": `${i || "Colour"} — colour picker`,
|
|
3177
3257
|
tabIndex: -1
|
|
3178
3258
|
}), /* @__PURE__ */ t("input", {
|
|
3179
3259
|
type: "text",
|
|
3180
|
-
className: `input color-field-hex${o ? " error" : ""}`,
|
|
3181
|
-
id:
|
|
3260
|
+
className: `input color-field-hex${_}${o ? " error" : ""}`,
|
|
3261
|
+
id: m,
|
|
3182
3262
|
name: c,
|
|
3183
3263
|
value: e,
|
|
3184
3264
|
onChange: (e) => r?.(e.target.value),
|
|
@@ -3202,7 +3282,7 @@ function Je({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
3202
3282
|
}
|
|
3203
3283
|
//#endregion
|
|
3204
3284
|
//#region src/components/AppCompareTable.jsx
|
|
3205
|
-
function
|
|
3285
|
+
function rt({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
|
|
3206
3286
|
T("AppCompareTable", o);
|
|
3207
3287
|
let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
|
|
3208
3288
|
className: "compare-yes",
|
|
@@ -3238,7 +3318,7 @@ function Ye({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o
|
|
|
3238
3318
|
}
|
|
3239
3319
|
//#endregion
|
|
3240
3320
|
//#region src/components/AppInfoTip.jsx
|
|
3241
|
-
function
|
|
3321
|
+
function it({ label: e, children: r, ...i }) {
|
|
3242
3322
|
T("AppInfoTip", i);
|
|
3243
3323
|
let [a, u] = l(!1), [d, f] = l(null), p = c(null), m = c(null), g = o();
|
|
3244
3324
|
return s(() => {
|
|
@@ -3285,56 +3365,56 @@ function Xe({ label: e, children: r, ...i }) {
|
|
|
3285
3365
|
}
|
|
3286
3366
|
//#endregion
|
|
3287
3367
|
//#region src/components/AppInput.jsx
|
|
3288
|
-
var
|
|
3368
|
+
var at = 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) {
|
|
3289
3369
|
T("AppInput", j);
|
|
3290
|
-
let [
|
|
3291
|
-
|
|
3292
|
-
},
|
|
3293
|
-
|
|
3294
|
-
}, ae =
|
|
3370
|
+
let [ee, N] = l(!1), P = v || y, F = u === "password", I = F && ee ? "text" : u, te = c(null), L = (e) => {
|
|
3371
|
+
te.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
|
|
3372
|
+
}, R = String(j.value ?? j.defaultValue ?? ""), [z, ne] = l(() => !!R), [B, re] = l(() => R.length), V = C && !S, H = C || w, ie = (e) => {
|
|
3373
|
+
ne(!!e.target.value), re(e.target.value.length), j.onInput?.(e);
|
|
3374
|
+
}, ae = V ? /* @__PURE__ */ t("button", {
|
|
3295
3375
|
type: "button",
|
|
3296
3376
|
className: "input-clear",
|
|
3297
3377
|
onClick: () => {
|
|
3298
|
-
let e =
|
|
3378
|
+
let e = te.current;
|
|
3299
3379
|
if (!e) return;
|
|
3300
3380
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
3301
|
-
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })),
|
|
3381
|
+
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ne(!1), e.focus();
|
|
3302
3382
|
},
|
|
3303
3383
|
"aria-label": "Clear",
|
|
3304
3384
|
tabIndex: -1,
|
|
3305
|
-
hidden: !
|
|
3385
|
+
hidden: !z,
|
|
3306
3386
|
children: /* @__PURE__ */ t(O, {
|
|
3307
3387
|
name: "x",
|
|
3308
3388
|
size: 16
|
|
3309
3389
|
})
|
|
3310
|
-
}) : null,
|
|
3390
|
+
}) : null, oe = [
|
|
3311
3391
|
"input",
|
|
3312
3392
|
d === "sm" ? "input-sm" : "",
|
|
3313
3393
|
d === "lg" ? "input-lg" : "",
|
|
3314
3394
|
i ? "error" : "",
|
|
3315
|
-
|
|
3395
|
+
F ? "pw" : "",
|
|
3316
3396
|
_ ? "num-input" : "",
|
|
3317
3397
|
C ? "has-clear" : "",
|
|
3318
3398
|
b
|
|
3319
|
-
].filter(Boolean).join(" "),
|
|
3320
|
-
id:
|
|
3399
|
+
].filter(Boolean).join(" "), U = /* @__PURE__ */ t(m.Control, {
|
|
3400
|
+
id: P,
|
|
3321
3401
|
name: y,
|
|
3322
|
-
type:
|
|
3323
|
-
className:
|
|
3402
|
+
type: I,
|
|
3403
|
+
className: oe,
|
|
3324
3404
|
disabled: S,
|
|
3325
3405
|
required: r,
|
|
3326
3406
|
"aria-invalid": i ? "true" : "false",
|
|
3327
3407
|
maxLength: E,
|
|
3328
3408
|
...j,
|
|
3329
3409
|
placeholder: A ? " " : j.placeholder,
|
|
3330
|
-
ref:
|
|
3331
|
-
onInput:
|
|
3332
|
-
}),
|
|
3333
|
-
return
|
|
3410
|
+
ref: L,
|
|
3411
|
+
onInput: H ? ie : j.onInput
|
|
3412
|
+
}), W;
|
|
3413
|
+
return W = A && e ? /* @__PURE__ */ n("div", {
|
|
3334
3414
|
className: "field-float",
|
|
3335
|
-
children: [
|
|
3415
|
+
children: [U, /* @__PURE__ */ n("label", {
|
|
3336
3416
|
className: "float-label",
|
|
3337
|
-
htmlFor:
|
|
3417
|
+
htmlFor: P,
|
|
3338
3418
|
children: [e, r && /* @__PURE__ */ t(Z, {})]
|
|
3339
3419
|
})]
|
|
3340
3420
|
}) : D || k ? /* @__PURE__ */ n("div", {
|
|
@@ -3344,7 +3424,7 @@ var Ze = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
3344
3424
|
className: "affix affix-pre",
|
|
3345
3425
|
children: D
|
|
3346
3426
|
}),
|
|
3347
|
-
|
|
3427
|
+
U,
|
|
3348
3428
|
k != null && /* @__PURE__ */ t("span", {
|
|
3349
3429
|
className: "affix affix-suf",
|
|
3350
3430
|
children: k
|
|
@@ -3352,26 +3432,26 @@ var Ze = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
3352
3432
|
]
|
|
3353
3433
|
}) : _ ? /* @__PURE__ */ n("div", {
|
|
3354
3434
|
className: "input-with-unit",
|
|
3355
|
-
children: [
|
|
3435
|
+
children: [U, /* @__PURE__ */ t("span", {
|
|
3356
3436
|
className: "unit",
|
|
3357
3437
|
children: _
|
|
3358
3438
|
})]
|
|
3359
|
-
}) :
|
|
3439
|
+
}) : F ? /* @__PURE__ */ n("div", {
|
|
3360
3440
|
className: "input-wrap",
|
|
3361
|
-
children: [
|
|
3441
|
+
children: [U, /* @__PURE__ */ t("button", {
|
|
3362
3442
|
type: "button",
|
|
3363
3443
|
className: "pw-toggle",
|
|
3364
|
-
onClick: () =>
|
|
3365
|
-
"aria-label":
|
|
3444
|
+
onClick: () => N((e) => !e),
|
|
3445
|
+
"aria-label": ee ? "Hide password" : "Show password",
|
|
3366
3446
|
tabIndex: -1,
|
|
3367
3447
|
children: /* @__PURE__ */ t(O, {
|
|
3368
|
-
name:
|
|
3448
|
+
name: ee ? "eye-off" : "eye",
|
|
3369
3449
|
size: 18
|
|
3370
3450
|
})
|
|
3371
3451
|
})]
|
|
3372
3452
|
}) : p ? /* @__PURE__ */ n("div", {
|
|
3373
3453
|
className: "input-wrap",
|
|
3374
|
-
children: [
|
|
3454
|
+
children: [U, /* @__PURE__ */ t("button", {
|
|
3375
3455
|
type: "button",
|
|
3376
3456
|
className: "pw-toggle",
|
|
3377
3457
|
onClick: h,
|
|
@@ -3393,7 +3473,7 @@ var Ze = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
3393
3473
|
size: 16
|
|
3394
3474
|
})
|
|
3395
3475
|
}),
|
|
3396
|
-
|
|
3476
|
+
U,
|
|
3397
3477
|
ae
|
|
3398
3478
|
]
|
|
3399
3479
|
}) : f ? /* @__PURE__ */ n("div", {
|
|
@@ -3404,23 +3484,23 @@ var Ze = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
3404
3484
|
name: f,
|
|
3405
3485
|
size: 16
|
|
3406
3486
|
})
|
|
3407
|
-
}),
|
|
3408
|
-
}) :
|
|
3487
|
+
}), U]
|
|
3488
|
+
}) : U, /* @__PURE__ */ n(m.Group, {
|
|
3409
3489
|
className: `field${x ? ` ${x}` : ""}`,
|
|
3410
3490
|
children: [
|
|
3411
3491
|
e && !A && /* @__PURE__ */ n(m.Label, {
|
|
3412
3492
|
className: "label",
|
|
3413
|
-
htmlFor:
|
|
3493
|
+
htmlFor: P,
|
|
3414
3494
|
children: [
|
|
3415
3495
|
e,
|
|
3416
3496
|
r && /* @__PURE__ */ t(Z, {}),
|
|
3417
|
-
o && /* @__PURE__ */ t(
|
|
3497
|
+
o && /* @__PURE__ */ t(it, {
|
|
3418
3498
|
label: s,
|
|
3419
3499
|
children: o
|
|
3420
3500
|
})
|
|
3421
3501
|
]
|
|
3422
3502
|
}),
|
|
3423
|
-
|
|
3503
|
+
W,
|
|
3424
3504
|
i ? /* @__PURE__ */ t("div", {
|
|
3425
3505
|
className: "field-error",
|
|
3426
3506
|
children: i
|
|
@@ -3429,20 +3509,20 @@ var Ze = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
3429
3509
|
children: a
|
|
3430
3510
|
}) : null,
|
|
3431
3511
|
w && /* @__PURE__ */ n("div", {
|
|
3432
|
-
className: `field-count${E &&
|
|
3433
|
-
children: [
|
|
3512
|
+
className: `field-count${E && B >= E ? " at-limit" : ""}`,
|
|
3513
|
+
children: [B, E ? ` / ${E}` : ""]
|
|
3434
3514
|
})
|
|
3435
3515
|
]
|
|
3436
3516
|
});
|
|
3437
|
-
}),
|
|
3438
|
-
function
|
|
3517
|
+
}), ot = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
|
|
3518
|
+
function st({ 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 }) {
|
|
3439
3519
|
T("AppModal", v);
|
|
3440
3520
|
let y = c(null);
|
|
3441
3521
|
a(() => {
|
|
3442
3522
|
if (!e) return;
|
|
3443
3523
|
let t = y.current?.closest(".modal-content");
|
|
3444
3524
|
if (!t) return;
|
|
3445
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
3525
|
+
let n = () => Array.from(t.querySelectorAll(ot));
|
|
3446
3526
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
|
|
3447
3527
|
}, [e]);
|
|
3448
3528
|
let b = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
|
|
@@ -3527,7 +3607,7 @@ var $ = (e) => function({ size: n = 72 }) {
|
|
|
3527
3607
|
tone: e,
|
|
3528
3608
|
size: n
|
|
3529
3609
|
});
|
|
3530
|
-
},
|
|
3610
|
+
}, ct = {
|
|
3531
3611
|
success: $("success"),
|
|
3532
3612
|
error: $("error"),
|
|
3533
3613
|
warning: $("warning"),
|
|
@@ -3536,14 +3616,14 @@ var $ = (e) => function({ size: n = 72 }) {
|
|
|
3536
3616
|
};
|
|
3537
3617
|
//#endregion
|
|
3538
3618
|
//#region src/components/AppConfirmDialog.jsx
|
|
3539
|
-
function
|
|
3619
|
+
function lt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: u = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, ...h }) {
|
|
3540
3620
|
T("AppConfirmDialog", h);
|
|
3541
3621
|
let [g, _] = l("");
|
|
3542
3622
|
if (a(() => {
|
|
3543
3623
|
r || _("");
|
|
3544
3624
|
}, [r]), !r) return null;
|
|
3545
|
-
let v = !!f && g.trim() !== f, y =
|
|
3546
|
-
return /* @__PURE__ */ t(
|
|
3625
|
+
let v = !!f && g.trim() !== f, y = ct[d || (u ? "delete" : "info")];
|
|
3626
|
+
return /* @__PURE__ */ t(st, {
|
|
3547
3627
|
open: r,
|
|
3548
3628
|
hideHeader: !0,
|
|
3549
3629
|
title: i,
|
|
@@ -3579,7 +3659,7 @@ function tt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
3579
3659
|
className: "lx-confirm-msg",
|
|
3580
3660
|
children: o
|
|
3581
3661
|
}),
|
|
3582
|
-
f && /* @__PURE__ */ t(
|
|
3662
|
+
f && /* @__PURE__ */ t(at, {
|
|
3583
3663
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
3584
3664
|
label: /* @__PURE__ */ n(e, { children: [
|
|
3585
3665
|
"Type ",
|
|
@@ -3596,7 +3676,7 @@ function tt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
3596
3676
|
}
|
|
3597
3677
|
//#endregion
|
|
3598
3678
|
//#region src/components/AppSkeleton.jsx
|
|
3599
|
-
function
|
|
3679
|
+
function ut({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
|
|
3600
3680
|
return T("AppSkeleton", o), /* @__PURE__ */ t("span", {
|
|
3601
3681
|
className: `skeleton${i ? ` ${i}` : ""}`,
|
|
3602
3682
|
"aria-hidden": "true",
|
|
@@ -3608,7 +3688,7 @@ function nt({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
|
|
|
3608
3688
|
}
|
|
3609
3689
|
});
|
|
3610
3690
|
}
|
|
3611
|
-
var
|
|
3691
|
+
var dt = [
|
|
3612
3692
|
"r0",
|
|
3613
3693
|
"r1",
|
|
3614
3694
|
"r2",
|
|
@@ -3617,7 +3697,7 @@ var rt = [
|
|
|
3617
3697
|
"r5",
|
|
3618
3698
|
"r6",
|
|
3619
3699
|
"r7"
|
|
3620
|
-
],
|
|
3700
|
+
], ft = [
|
|
3621
3701
|
"c0",
|
|
3622
3702
|
"c1",
|
|
3623
3703
|
"c2",
|
|
@@ -3627,15 +3707,15 @@ var rt = [
|
|
|
3627
3707
|
"c6",
|
|
3628
3708
|
"c7"
|
|
3629
3709
|
];
|
|
3630
|
-
function
|
|
3631
|
-
return
|
|
3710
|
+
function pt({ rows: e = 4, cols: n = 5 }) {
|
|
3711
|
+
return dt.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: ft.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(ut, {
|
|
3632
3712
|
width: n === 0 ? "70%" : "50%",
|
|
3633
3713
|
height: 12
|
|
3634
3714
|
}) }, e)) }, e));
|
|
3635
3715
|
}
|
|
3636
3716
|
//#endregion
|
|
3637
3717
|
//#region src/components/AppSelectMini.jsx
|
|
3638
|
-
function
|
|
3718
|
+
function mt({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: l, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
|
|
3639
3719
|
T("AppSelectMini", h);
|
|
3640
3720
|
let g = c(null);
|
|
3641
3721
|
return a(() => {
|
|
@@ -3669,19 +3749,19 @@ function ot({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
|
|
|
3669
3749
|
}
|
|
3670
3750
|
//#endregion
|
|
3671
3751
|
//#region src/components/AppTablePagination.jsx
|
|
3672
|
-
var
|
|
3752
|
+
var ht = [
|
|
3673
3753
|
5,
|
|
3674
3754
|
10,
|
|
3675
3755
|
25,
|
|
3676
3756
|
50
|
|
3677
3757
|
];
|
|
3678
|
-
function
|
|
3758
|
+
function gt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = ht, ...d }) {
|
|
3679
3759
|
return T("AppTablePagination", d), /* @__PURE__ */ n("div", {
|
|
3680
3760
|
className: "table-pagination",
|
|
3681
3761
|
children: [
|
|
3682
3762
|
/* @__PURE__ */ n("span", {
|
|
3683
3763
|
className: "tpg-rows",
|
|
3684
|
-
children: ["Rows per page:", /* @__PURE__ */ t(
|
|
3764
|
+
children: ["Rows per page:", /* @__PURE__ */ t(mt, {
|
|
3685
3765
|
value: i,
|
|
3686
3766
|
onChange: (e) => l(Number(e)),
|
|
3687
3767
|
ariaLabel: "Rows per page",
|
|
@@ -3730,13 +3810,13 @@ function ct({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
|
|
|
3730
3810
|
}
|
|
3731
3811
|
//#endregion
|
|
3732
3812
|
//#region src/components/AppDataTable.jsx
|
|
3733
|
-
function
|
|
3813
|
+
function _t(e) {
|
|
3734
3814
|
return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
3735
3815
|
}
|
|
3736
|
-
function
|
|
3816
|
+
function vt(e) {
|
|
3737
3817
|
return e == null || e === "" ? "—" : e;
|
|
3738
3818
|
}
|
|
3739
|
-
function
|
|
3819
|
+
function yt({ 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 }) {
|
|
3740
3820
|
T("AppDataTable", S);
|
|
3741
3821
|
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) => {
|
|
3742
3822
|
e && (e.indeterminate = D);
|
|
@@ -3761,7 +3841,7 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3761
3841
|
r.map((e, r) => {
|
|
3762
3842
|
let i = !!(e.sortable && s), a = o && o.key === e.key;
|
|
3763
3843
|
return /* @__PURE__ */ n("th", {
|
|
3764
|
-
className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") +
|
|
3844
|
+
className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") + _t(e.align),
|
|
3765
3845
|
style: e.width ? { width: e.width } : void 0,
|
|
3766
3846
|
tabIndex: i ? 0 : void 0,
|
|
3767
3847
|
"aria-sort": a ? o.dir === "asc" ? "ascending" : "descending" : i ? "none" : void 0,
|
|
@@ -3788,7 +3868,7 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3788
3868
|
children: "Actions"
|
|
3789
3869
|
})
|
|
3790
3870
|
}))
|
|
3791
|
-
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(
|
|
3871
|
+
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(pt, {
|
|
3792
3872
|
rows: l,
|
|
3793
3873
|
cols: C
|
|
3794
3874
|
}) : i?.length ? i.map((e) => {
|
|
@@ -3807,8 +3887,8 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3807
3887
|
})
|
|
3808
3888
|
}),
|
|
3809
3889
|
r.map((n, r) => /* @__PURE__ */ t("td", {
|
|
3810
|
-
className: (r === 0 ? "lx-name-cell " : "") +
|
|
3811
|
-
children: n.render ? n.render(e) :
|
|
3890
|
+
className: (r === 0 ? "lx-name-cell " : "") + _t(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
|
|
3891
|
+
children: n.render ? n.render(e) : vt(e[n.key])
|
|
3812
3892
|
}, n.key)),
|
|
3813
3893
|
p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
|
|
3814
3894
|
className: "u-row-actions",
|
|
@@ -3822,7 +3902,7 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3822
3902
|
children: A
|
|
3823
3903
|
}) }) })]
|
|
3824
3904
|
})
|
|
3825
|
-
}), h && !c && h.total > 0 && /* @__PURE__ */ t(
|
|
3905
|
+
}), h && !c && h.total > 0 && /* @__PURE__ */ t(gt, {
|
|
3826
3906
|
page: h.page,
|
|
3827
3907
|
totalPages: h.totalPages,
|
|
3828
3908
|
pageSize: h.pageSize,
|
|
@@ -3835,7 +3915,7 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3835
3915
|
}
|
|
3836
3916
|
//#endregion
|
|
3837
3917
|
//#region src/components/AppDatePicker.jsx
|
|
3838
|
-
function
|
|
3918
|
+
function bt({ 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, size: g, firstDay: _, id: v, ariaLabel: y, className: b = "", ...x }) {
|
|
3839
3919
|
T("AppDatePicker", x);
|
|
3840
3920
|
let S = c(null), C = o(), w = v || d || C;
|
|
3841
3921
|
a(() => {
|
|
@@ -3888,7 +3968,7 @@ function ft({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
|
|
|
3888
3968
|
}
|
|
3889
3969
|
//#endregion
|
|
3890
3970
|
//#region src/components/AppDateRangePicker.jsx
|
|
3891
|
-
function
|
|
3971
|
+
function xt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u, error: d, startName: f, endName: p, min: m, max: h, placeholder: g = "Start – End", disabled: _, size: v, firstDay: y, id: b, ariaLabel: x, className: S = "", ...C }) {
|
|
3892
3972
|
T("AppDateRangePicker", C);
|
|
3893
3973
|
let w = c(null), E = o(), D = b || f || E;
|
|
3894
3974
|
a(() => {
|
|
@@ -3945,7 +4025,7 @@ function pt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
|
|
|
3945
4025
|
}
|
|
3946
4026
|
//#endregion
|
|
3947
4027
|
//#region src/components/AppDropdown.jsx
|
|
3948
|
-
var
|
|
4028
|
+
var St = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
|
|
3949
4029
|
return /* @__PURE__ */ t("button", {
|
|
3950
4030
|
ref: l,
|
|
3951
4031
|
type: "button",
|
|
@@ -3959,11 +4039,11 @@ var mt = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
|
|
|
3959
4039
|
})
|
|
3960
4040
|
});
|
|
3961
4041
|
});
|
|
3962
|
-
function
|
|
4042
|
+
function Ct({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
|
|
3963
4043
|
return T("AppDropdown", d), /* @__PURE__ */ n(_, {
|
|
3964
4044
|
align: s,
|
|
3965
4045
|
children: [/* @__PURE__ */ t(_.Toggle, {
|
|
3966
|
-
as:
|
|
4046
|
+
as: St,
|
|
3967
4047
|
icon: e,
|
|
3968
4048
|
iconSize: r,
|
|
3969
4049
|
btnClassName: i,
|
|
@@ -4001,7 +4081,7 @@ function ht({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
4001
4081
|
}
|
|
4002
4082
|
//#endregion
|
|
4003
4083
|
//#region src/components/AppEmptyState.jsx
|
|
4004
|
-
function
|
|
4084
|
+
function wt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
|
|
4005
4085
|
return T("AppEmptyState", u), /* @__PURE__ */ n("div", {
|
|
4006
4086
|
className: [
|
|
4007
4087
|
"empty-state",
|
|
@@ -4034,7 +4114,7 @@ function gt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
4034
4114
|
}
|
|
4035
4115
|
//#endregion
|
|
4036
4116
|
//#region src/components/AppFileAttachment.jsx
|
|
4037
|
-
function
|
|
4117
|
+
function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u = Ie, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
|
|
4038
4118
|
T("AppFileAttachment", h);
|
|
4039
4119
|
let g = o(), _ = m || s || g, [v, y] = l(null), [b, x] = l("");
|
|
4040
4120
|
a(() => {
|
|
@@ -4047,7 +4127,7 @@ function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
|
|
|
4047
4127
|
function S(e) {
|
|
4048
4128
|
let t = e.target.files?.[0];
|
|
4049
4129
|
if (e.target.value = "", !t) return;
|
|
4050
|
-
let n =
|
|
4130
|
+
let n = He(t, {
|
|
4051
4131
|
accept: u,
|
|
4052
4132
|
maxSizeMb: d
|
|
4053
4133
|
});
|
|
@@ -4146,22 +4226,22 @@ function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
|
|
|
4146
4226
|
}
|
|
4147
4227
|
//#endregion
|
|
4148
4228
|
//#region src/components/toast.js
|
|
4149
|
-
var
|
|
4229
|
+
var Et = /* @__PURE__ */ new Set([
|
|
4150
4230
|
"success",
|
|
4151
4231
|
"info",
|
|
4152
4232
|
"warning",
|
|
4153
4233
|
"error"
|
|
4154
4234
|
]);
|
|
4155
|
-
function
|
|
4156
|
-
let n =
|
|
4235
|
+
function Dt(e, t = "success") {
|
|
4236
|
+
let n = Et.has(t) ? t : "success";
|
|
4157
4237
|
v[n](e, { toastId: `${n}:${e}` });
|
|
4158
4238
|
}
|
|
4159
|
-
function
|
|
4239
|
+
function Ot(e) {
|
|
4160
4240
|
v.error(e, { toastId: `error:${e}` });
|
|
4161
4241
|
}
|
|
4162
4242
|
//#endregion
|
|
4163
4243
|
//#region src/components/AppFilePicker.jsx
|
|
4164
|
-
function
|
|
4244
|
+
function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p, ...m }) {
|
|
4165
4245
|
T("AppFilePicker", m);
|
|
4166
4246
|
let [h, g] = l(null), [_, v] = l(!1), y = c(null), b = o(), x = i || b;
|
|
4167
4247
|
a(() => {
|
|
@@ -4172,11 +4252,11 @@ function xt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
|
|
|
4172
4252
|
g(null);
|
|
4173
4253
|
}, [r]);
|
|
4174
4254
|
let S = r?.url || h, C = (e) => {
|
|
4175
|
-
let t =
|
|
4255
|
+
let t = He(e, {
|
|
4176
4256
|
accept: u,
|
|
4177
4257
|
maxSizeMb: d
|
|
4178
4258
|
});
|
|
4179
|
-
return t ? (
|
|
4259
|
+
return t ? (Dt(t, "error"), !1) : (s(e), !0);
|
|
4180
4260
|
}, w = (e) => {
|
|
4181
4261
|
let t = e.target.files?.[0] || null;
|
|
4182
4262
|
t && (C(t) || (e.target.value = ""));
|
|
@@ -4287,7 +4367,7 @@ function xt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
|
|
|
4287
4367
|
}
|
|
4288
4368
|
//#endregion
|
|
4289
4369
|
//#region src/components/AppInfoList.jsx
|
|
4290
|
-
function
|
|
4370
|
+
function At({ items: r = [], className: i = "", ...a }) {
|
|
4291
4371
|
return T("AppInfoList", a), /* @__PURE__ */ t("div", {
|
|
4292
4372
|
className: `info-list${i ? ` ${i}` : ""}`,
|
|
4293
4373
|
children: r.map((r, i) => {
|
|
@@ -4320,7 +4400,7 @@ function St({ items: r = [], className: i = "", ...a }) {
|
|
|
4320
4400
|
}
|
|
4321
4401
|
//#endregion
|
|
4322
4402
|
//#region src/components/AppKpiTile.jsx
|
|
4323
|
-
function
|
|
4403
|
+
function jt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
|
|
4324
4404
|
T("AppKpiTile", l);
|
|
4325
4405
|
let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
|
|
4326
4406
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4353,7 +4433,7 @@ function Ct({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
|
|
|
4353
4433
|
}
|
|
4354
4434
|
//#endregion
|
|
4355
4435
|
//#region src/components/AppLogoPicker.jsx
|
|
4356
|
-
function
|
|
4436
|
+
function Mt({ 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 }) {
|
|
4357
4437
|
T("AppLogoPicker", m);
|
|
4358
4438
|
let h = c(null);
|
|
4359
4439
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
|
|
@@ -4399,12 +4479,12 @@ function wt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
|
|
|
4399
4479
|
onChange: (e) => {
|
|
4400
4480
|
let t = e.target.files?.[0];
|
|
4401
4481
|
if (e.target.value = "", !t) return;
|
|
4402
|
-
let n =
|
|
4482
|
+
let n = He(t, {
|
|
4403
4483
|
accept: l,
|
|
4404
4484
|
maxSizeMb: u
|
|
4405
4485
|
});
|
|
4406
4486
|
if (n) {
|
|
4407
|
-
|
|
4487
|
+
Dt(n, "error");
|
|
4408
4488
|
return;
|
|
4409
4489
|
}
|
|
4410
4490
|
o(t);
|
|
@@ -4414,7 +4494,7 @@ function wt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
|
|
|
4414
4494
|
}
|
|
4415
4495
|
//#endregion
|
|
4416
4496
|
//#region src/components/AppMultiSelect.jsx
|
|
4417
|
-
function
|
|
4497
|
+
function Nt({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: l = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
|
|
4418
4498
|
T("AppMultiSelect", b);
|
|
4419
4499
|
let x = c(null);
|
|
4420
4500
|
return a(() => {
|
|
@@ -4464,7 +4544,7 @@ function Tt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
|
|
|
4464
4544
|
}
|
|
4465
4545
|
//#endregion
|
|
4466
4546
|
//#region src/components/AppOtpInput.jsx
|
|
4467
|
-
var
|
|
4547
|
+
var Pt = 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) {
|
|
4468
4548
|
T("AppOtpInput", v);
|
|
4469
4549
|
let b = c(null), x = o(), S = g || h || x, C = (e) => {
|
|
4470
4550
|
b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
|
|
@@ -4517,7 +4597,7 @@ var Et = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
|
|
|
4517
4597
|
});
|
|
4518
4598
|
//#endregion
|
|
4519
4599
|
//#region src/components/AppPageHeader.jsx
|
|
4520
|
-
function
|
|
4600
|
+
function Ft({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
4521
4601
|
return T("AppPageHeader", o), /* @__PURE__ */ n("div", {
|
|
4522
4602
|
className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
|
|
4523
4603
|
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
|
|
@@ -4534,7 +4614,7 @@ function Dt({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
|
4534
4614
|
}
|
|
4535
4615
|
//#endregion
|
|
4536
4616
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
4537
|
-
function
|
|
4617
|
+
function It({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: l = "Phone number", placeholder: u, required: d = !1, error: f, fieldClassName: p = "", ...m }) {
|
|
4538
4618
|
T("AppPhoneNumberInput", m);
|
|
4539
4619
|
let h = c(null);
|
|
4540
4620
|
return a(() => {
|
|
@@ -4569,7 +4649,7 @@ function Ot({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
|
|
|
4569
4649
|
}
|
|
4570
4650
|
//#endregion
|
|
4571
4651
|
//#region src/components/AppPricingCard.jsx
|
|
4572
|
-
function
|
|
4652
|
+
function Lt({ 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 }) {
|
|
4573
4653
|
return T("AppPricingCard", f), /* @__PURE__ */ n("div", {
|
|
4574
4654
|
className: [
|
|
4575
4655
|
"plan-card",
|
|
@@ -4622,7 +4702,7 @@ function kt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
|
|
|
4622
4702
|
}
|
|
4623
4703
|
//#endregion
|
|
4624
4704
|
//#region src/components/AppRadio.jsx
|
|
4625
|
-
var
|
|
4705
|
+
var Rt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
4626
4706
|
T("AppRadio", s);
|
|
4627
4707
|
let l = o(), u = r || l;
|
|
4628
4708
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4643,7 +4723,7 @@ var At = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
4643
4723
|
});
|
|
4644
4724
|
//#endregion
|
|
4645
4725
|
//#region src/components/AppRepeater.jsx
|
|
4646
|
-
function
|
|
4726
|
+
function zt({ 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 }) {
|
|
4647
4727
|
T("AppRepeater", p);
|
|
4648
4728
|
let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
|
|
4649
4729
|
return /* @__PURE__ */ n("div", {
|
|
@@ -4687,7 +4767,7 @@ function jt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
4687
4767
|
}
|
|
4688
4768
|
//#endregion
|
|
4689
4769
|
//#region src/components/AppResourceCard.jsx
|
|
4690
|
-
function
|
|
4770
|
+
function Bt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
|
|
4691
4771
|
T("AppResourceCard", u);
|
|
4692
4772
|
let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
4693
4773
|
className: "res-card-icon",
|
|
@@ -4719,7 +4799,7 @@ function Mt({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
|
|
|
4719
4799
|
}
|
|
4720
4800
|
//#endregion
|
|
4721
4801
|
//#region src/components/AppSearch.jsx
|
|
4722
|
-
function
|
|
4802
|
+
function Vt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
|
|
4723
4803
|
return T("AppSearch", d), /* @__PURE__ */ n("div", {
|
|
4724
4804
|
className: [
|
|
4725
4805
|
"search-wrap",
|
|
@@ -4763,7 +4843,7 @@ function Nt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
|
|
|
4763
4843
|
}
|
|
4764
4844
|
//#endregion
|
|
4765
4845
|
//#region src/components/AppSegmented.jsx
|
|
4766
|
-
function
|
|
4846
|
+
function Ht({ options: e = [], value: r, onChange: i, label: l, name: u, size: d = "md", fullWidth: f = !1, disabled: p = !1, className: m = "", ...h }) {
|
|
4767
4847
|
T("AppSegmented", h);
|
|
4768
4848
|
let g = o(), _ = u || g, v = c(null), y = c(null), b = [
|
|
4769
4849
|
"segmented",
|
|
@@ -4828,14 +4908,14 @@ function Pt({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
|
|
|
4828
4908
|
}
|
|
4829
4909
|
//#endregion
|
|
4830
4910
|
//#region src/components/AppSelect.jsx
|
|
4831
|
-
var
|
|
4832
|
-
function
|
|
4911
|
+
var Ut = (e) => e == null ? "" : e.label ?? e.text ?? "";
|
|
4912
|
+
function Wt({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: l = !1, clearable: u = !1, size: d, icon: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", ...E }) {
|
|
4833
4913
|
T("AppSelect", E);
|
|
4834
4914
|
let D = c(null);
|
|
4835
4915
|
a(() => {
|
|
4836
4916
|
D.current && (D.current.options = i.map((e) => ({
|
|
4837
4917
|
value: e.value,
|
|
4838
|
-
label:
|
|
4918
|
+
label: Ut(e),
|
|
4839
4919
|
icon: e.icon
|
|
4840
4920
|
})));
|
|
4841
4921
|
}, [i]), a(() => {
|
|
@@ -4876,7 +4956,7 @@ function It({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
|
|
|
4876
4956
|
children: [
|
|
4877
4957
|
h,
|
|
4878
4958
|
g && /* @__PURE__ */ t(Z, {}),
|
|
4879
|
-
y && /* @__PURE__ */ t(
|
|
4959
|
+
y && /* @__PURE__ */ t(it, {
|
|
4880
4960
|
label: b,
|
|
4881
4961
|
children: y
|
|
4882
4962
|
})
|
|
@@ -4902,7 +4982,7 @@ function It({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
|
|
|
4902
4982
|
}
|
|
4903
4983
|
//#endregion
|
|
4904
4984
|
//#region src/components/AppShell.jsx
|
|
4905
|
-
function
|
|
4985
|
+
function Gt({ 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 = "", ..._ }) {
|
|
4906
4986
|
T("AppShell", _);
|
|
4907
4987
|
let [v, y] = l(!1), [b, x] = l(!1), [S, C] = l(!1), w = d ?? v;
|
|
4908
4988
|
return a(() => {
|
|
@@ -4938,7 +5018,7 @@ function Lt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
|
|
|
4938
5018
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
4939
5019
|
className: "app-nav-group-label",
|
|
4940
5020
|
children: e.label
|
|
4941
|
-
}), e.items.map((e) => /* @__PURE__ */ t(
|
|
5021
|
+
}), e.items.map((e) => /* @__PURE__ */ t(Kt, {
|
|
4942
5022
|
item: e,
|
|
4943
5023
|
linkComponent: h,
|
|
4944
5024
|
onNavigate: () => x(!1)
|
|
@@ -5008,7 +5088,7 @@ function Lt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
|
|
|
5008
5088
|
]
|
|
5009
5089
|
});
|
|
5010
5090
|
}
|
|
5011
|
-
function
|
|
5091
|
+
function Kt({ item: r, linkComponent: i, onNavigate: a }) {
|
|
5012
5092
|
let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
|
|
5013
5093
|
r.icon && /* @__PURE__ */ t("span", {
|
|
5014
5094
|
className: "app-nav-icon",
|
|
@@ -5042,7 +5122,7 @@ function Rt({ item: r, linkComponent: i, onNavigate: a }) {
|
|
|
5042
5122
|
}
|
|
5043
5123
|
//#endregion
|
|
5044
5124
|
//#region src/components/AppSidebarMenu.jsx
|
|
5045
|
-
var
|
|
5125
|
+
var qt = {
|
|
5046
5126
|
left: "start",
|
|
5047
5127
|
right: "end",
|
|
5048
5128
|
start: "start",
|
|
@@ -5050,11 +5130,11 @@ var zt = {
|
|
|
5050
5130
|
top: "top",
|
|
5051
5131
|
bottom: "bottom"
|
|
5052
5132
|
};
|
|
5053
|
-
function
|
|
5133
|
+
function Jt({ 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 }) {
|
|
5054
5134
|
return T("AppSidebarMenu", b), /* @__PURE__ */ n(y, {
|
|
5055
5135
|
show: e,
|
|
5056
5136
|
onHide: r,
|
|
5057
|
-
placement:
|
|
5137
|
+
placement: qt[i] || "end",
|
|
5058
5138
|
backdrop: d,
|
|
5059
5139
|
scroll: f,
|
|
5060
5140
|
keyboard: p,
|
|
@@ -5098,7 +5178,7 @@ function Bt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
5098
5178
|
}
|
|
5099
5179
|
//#endregion
|
|
5100
5180
|
//#region src/components/AppSpinner.jsx
|
|
5101
|
-
function
|
|
5181
|
+
function Yt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
5102
5182
|
return T("AppSpinner", i), /* @__PURE__ */ t("span", {
|
|
5103
5183
|
className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
|
|
5104
5184
|
role: "status",
|
|
@@ -5107,7 +5187,7 @@ function Vt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
|
5107
5187
|
}
|
|
5108
5188
|
//#endregion
|
|
5109
5189
|
//#region src/components/AppSplash.jsx
|
|
5110
|
-
function
|
|
5190
|
+
function Xt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
|
|
5111
5191
|
return T("AppSplash", s), /* @__PURE__ */ t("div", {
|
|
5112
5192
|
className: `splash${o ? ` ${o}` : ""}`,
|
|
5113
5193
|
role: "status",
|
|
@@ -5134,7 +5214,7 @@ function Ht({ logo: e, initials: r, text: i, label: a = "Loading", className: o
|
|
|
5134
5214
|
}
|
|
5135
5215
|
//#endregion
|
|
5136
5216
|
//#region src/components/AppStatusBadge.jsx
|
|
5137
|
-
function
|
|
5217
|
+
function Zt({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
5138
5218
|
return T("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
|
|
5139
5219
|
className: `status-label ${n}${r ? ` ${r}` : ""}`,
|
|
5140
5220
|
children: e
|
|
@@ -5142,7 +5222,7 @@ function Ut({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
|
5142
5222
|
}
|
|
5143
5223
|
//#endregion
|
|
5144
5224
|
//#region src/components/AppStepper.jsx
|
|
5145
|
-
function
|
|
5225
|
+
function Qt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
5146
5226
|
return T("AppStepper", c), /* @__PURE__ */ t("nav", {
|
|
5147
5227
|
className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
|
|
5148
5228
|
"aria-label": a,
|
|
@@ -5189,7 +5269,7 @@ function Wt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
|
|
|
5189
5269
|
}
|
|
5190
5270
|
//#endregion
|
|
5191
5271
|
//#region src/components/AppSwitch.jsx
|
|
5192
|
-
var
|
|
5272
|
+
var $t = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
5193
5273
|
T("AppSwitch", s);
|
|
5194
5274
|
let l = o(), u = r || i || l;
|
|
5195
5275
|
return /* @__PURE__ */ n("div", {
|
|
@@ -5210,7 +5290,7 @@ var Gt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
|
5210
5290
|
});
|
|
5211
5291
|
//#endregion
|
|
5212
5292
|
//#region src/components/AppTableEmptyState.jsx
|
|
5213
|
-
function
|
|
5293
|
+
function en({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
5214
5294
|
return T("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
|
|
5215
5295
|
className: "tbl-empty",
|
|
5216
5296
|
children: [
|
|
@@ -5238,7 +5318,7 @@ function Kt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
|
5238
5318
|
}
|
|
5239
5319
|
//#endregion
|
|
5240
5320
|
//#region src/components/AppTabs.jsx
|
|
5241
|
-
function
|
|
5321
|
+
function tn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...l }) {
|
|
5242
5322
|
T("AppTabs", l);
|
|
5243
5323
|
let u = c(null);
|
|
5244
5324
|
function d(t) {
|
|
@@ -5282,7 +5362,7 @@ function qt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
5282
5362
|
}
|
|
5283
5363
|
//#endregion
|
|
5284
5364
|
//#region src/components/AppTextarea.jsx
|
|
5285
|
-
var
|
|
5365
|
+
var nn = 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) {
|
|
5286
5366
|
T("AppTextarea", v);
|
|
5287
5367
|
let b = d || f, x = [
|
|
5288
5368
|
"textarea",
|
|
@@ -5314,7 +5394,7 @@ var Jt = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
|
|
|
5314
5394
|
children: [
|
|
5315
5395
|
e,
|
|
5316
5396
|
r && /* @__PURE__ */ t(Z, {}),
|
|
5317
|
-
l && /* @__PURE__ */ t(
|
|
5397
|
+
l && /* @__PURE__ */ t(it, {
|
|
5318
5398
|
label: u,
|
|
5319
5399
|
children: l
|
|
5320
5400
|
})
|
|
@@ -5344,7 +5424,7 @@ var Jt = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
|
|
|
5344
5424
|
});
|
|
5345
5425
|
//#endregion
|
|
5346
5426
|
//#region src/components/AppTimeline.jsx
|
|
5347
|
-
function
|
|
5427
|
+
function rn({ items: e = [], className: r = "", ...i }) {
|
|
5348
5428
|
return T("AppTimeline", i), /* @__PURE__ */ t("ol", {
|
|
5349
5429
|
className: `timeline${r ? ` ${r}` : ""}`,
|
|
5350
5430
|
children: e.map((e, r) => /* @__PURE__ */ n("li", {
|
|
@@ -5382,4 +5462,4 @@ function Yt({ items: e = [], className: r = "", ...i }) {
|
|
|
5382
5462
|
});
|
|
5383
5463
|
}
|
|
5384
5464
|
//#endregion
|
|
5385
|
-
export { k as ActionIcon, A as AppAccordion, j as AppAlert,
|
|
5465
|
+
export { k as ActionIcon, A as AppAccordion, j as AppAlert, We as AppAutocomplete, Ke as AppAvatar, qe as AppBadge, Q as AppButton, Xe as AppCallout, Ze as AppCard, Qe as AppCheckbox, $e as AppChip, et as AppChoiceCard, tt as AppChoiceChip, nt as AppColorField, rt as AppCompareTable, lt as AppConfirmDialog, yt as AppDataTable, bt as AppDatePicker, xt as AppDateRangePicker, Ct as AppDropdown, wt as AppEmptyState, Tt as AppFileAttachment, kt as AppFilePicker, At as AppInfoList, it as AppInfoTip, at as AppInput, jt as AppKpiTile, Mt as AppLogoPicker, st as AppModal, Nt as AppMultiSelect, Pt as AppOtpInput, Ft as AppPageHeader, It as AppPhoneNumberInput, Lt as AppPricingCard, Rt as AppRadio, zt as AppRepeater, Bt as AppResourceCard, Vt as AppSearch, Ht as AppSegmented, Wt as AppSelect, mt as AppSelectMini, Gt as AppShell, Jt as AppSidebarMenu, ut as AppSkeleton, pt as AppSkeletonRows, Yt as AppSpinner, Xt as AppSplash, Zt as AppStatusBadge, Qt as AppStepper, $t as AppSwitch, en as AppTableEmptyState, gt as AppTablePagination, tn as AppTabs, nn as AppTextarea, rn as AppTimeline, O as Icon, ct as MODAL_ICONS, Z as RequiredMark, Ot as errorToast, D as iconNames, Dt as toast };
|