@webority/ui-react 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/AppChoiceCard.d.ts +6 -0
- package/dist/types/components/AppChoiceChip.d.ts +2 -0
- package/dist/types/components/AppDataTable.d.ts +2 -0
- package/dist/types/components/AppFilePicker.d.ts +2 -0
- package/dist/types/components/AppSelectMini.d.ts +2 -1
- package/dist/types/components/AppTablePagination.d.ts +10 -4
- package/dist/types/lib/usePagination.d.ts +1 -1
- package/dist/ui-react.js +261 -227
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -247,8 +247,19 @@ var E = class extends HTMLElement {
|
|
|
247
247
|
let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = T[e] || T.info;
|
|
248
248
|
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>`;
|
|
249
249
|
}
|
|
250
|
-
}, D =
|
|
251
|
-
|
|
250
|
+
}, D = "data-wui-mirror";
|
|
251
|
+
function O(e, t) {
|
|
252
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${D}]`);
|
|
253
|
+
if (!n) {
|
|
254
|
+
r?.remove();
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(D, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t), r.disabled = e.hasAttribute("disabled");
|
|
258
|
+
}
|
|
259
|
+
var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), j = (e) => e?.[k] ? String(e.label ?? "") : A(e == null ? "" : e.label), ee = class extends HTMLElement {
|
|
260
|
+
_accessibleName() {
|
|
261
|
+
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
262
|
+
}
|
|
252
263
|
static get observedAttributes() {
|
|
253
264
|
return [
|
|
254
265
|
"value",
|
|
@@ -256,11 +267,12 @@ var E = class extends HTMLElement {
|
|
|
256
267
|
"disabled",
|
|
257
268
|
"min-chars",
|
|
258
269
|
"debounce",
|
|
259
|
-
"remote"
|
|
270
|
+
"remote",
|
|
271
|
+
"aria-label"
|
|
260
272
|
];
|
|
261
273
|
}
|
|
262
274
|
constructor() {
|
|
263
|
-
super(), this.
|
|
275
|
+
super(), this._value = "", this._label = "", this._optionsProp = null, this._loading = !1, this._active = -1, this._timer = null;
|
|
264
276
|
}
|
|
265
277
|
connectedCallback() {
|
|
266
278
|
this._rendered || this.render();
|
|
@@ -272,9 +284,9 @@ var E = class extends HTMLElement {
|
|
|
272
284
|
return this._value;
|
|
273
285
|
}
|
|
274
286
|
set value(e) {
|
|
275
|
-
this._value = e == null ? "" : String(e),
|
|
287
|
+
this._value = e == null ? "" : String(e), O(this, this._value);
|
|
276
288
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
277
|
-
t && (this._label =
|
|
289
|
+
t && (this._label = N(t.label)), this._syncInput();
|
|
278
290
|
}
|
|
279
291
|
set options(e) {
|
|
280
292
|
this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
|
|
@@ -304,6 +316,7 @@ var E = class extends HTMLElement {
|
|
|
304
316
|
e.length && (this._declared = e.map((e) => ({
|
|
305
317
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
306
318
|
label: e.innerHTML,
|
|
319
|
+
[k]: !0,
|
|
307
320
|
selected: e.hasAttribute("selected")
|
|
308
321
|
})));
|
|
309
322
|
}
|
|
@@ -315,8 +328,8 @@ var E = class extends HTMLElement {
|
|
|
315
328
|
let e = this.getAttribute("placeholder") || "Search…";
|
|
316
329
|
this.innerHTML = `
|
|
317
330
|
<div class="search-select">
|
|
318
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false">
|
|
319
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
331
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${M(this._accessibleName())}">
|
|
332
|
+
<input class="search-select-input search-select-ac-input" placeholder="${M(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
320
333
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
321
334
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
|
|
322
335
|
</div>
|
|
@@ -325,7 +338,7 @@ var E = class extends HTMLElement {
|
|
|
325
338
|
<div class="search-select-empty" hidden>No matches</div>
|
|
326
339
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
327
340
|
</div>
|
|
328
|
-
</div>`, this._rendered = !0, this._wire(), this._syncInput(), this._renderOptions();
|
|
341
|
+
</div>`, this._rendered = !0, O(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
|
|
329
342
|
}
|
|
330
343
|
_refs() {
|
|
331
344
|
return {
|
|
@@ -354,9 +367,9 @@ var E = class extends HTMLElement {
|
|
|
354
367
|
let t = this._refs();
|
|
355
368
|
if (!t.optionsWrap) return;
|
|
356
369
|
let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
|
|
357
|
-
!this._remote && n && (r = r.filter((e) =>
|
|
370
|
+
!this._remote && n && (r = r.filter((e) => N(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
|
|
358
371
|
let t = String(e.value) === String(this._value);
|
|
359
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
372
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${M(e.value)}" aria-selected="${t}">${j(e)}</button>`;
|
|
360
373
|
}).join(""), this._active = -1;
|
|
361
374
|
let i = n.length < this._minChars;
|
|
362
375
|
t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
|
|
@@ -377,7 +390,7 @@ var E = class extends HTMLElement {
|
|
|
377
390
|
}, o = () => {
|
|
378
391
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
|
|
379
392
|
}, s = (t) => {
|
|
380
|
-
this._value = t.dataset.value, this._label =
|
|
393
|
+
this._value = t.dataset.value, this._label = N(t.innerHTML), O(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
|
|
381
394
|
};
|
|
382
395
|
e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
|
|
383
396
|
let t = e.input.value;
|
|
@@ -400,7 +413,7 @@ var E = class extends HTMLElement {
|
|
|
400
413
|
let t = e.target.closest(".search-select-option");
|
|
401
414
|
t && r(this._optionEls().indexOf(t));
|
|
402
415
|
}), e.clear?.addEventListener("click", () => {
|
|
403
|
-
this._value = "", this._label = "", this
|
|
416
|
+
this._value = "", this._label = "", O(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
|
|
404
417
|
}), this._onDocClick = (e) => {
|
|
405
418
|
i() && !this.contains(e.target) && o();
|
|
406
419
|
}, document.addEventListener("click", this._onDocClick), window.addEventListener("resize", () => {
|
|
@@ -410,7 +423,7 @@ var E = class extends HTMLElement {
|
|
|
410
423
|
disconnectedCallback() {
|
|
411
424
|
this._onDocClick && document.removeEventListener("click", this._onDocClick), clearTimeout(this._timer);
|
|
412
425
|
}
|
|
413
|
-
},
|
|
426
|
+
}, M = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), N = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), te = [
|
|
414
427
|
"January",
|
|
415
428
|
"February",
|
|
416
429
|
"March",
|
|
@@ -423,7 +436,7 @@ var E = class extends HTMLElement {
|
|
|
423
436
|
"October",
|
|
424
437
|
"November",
|
|
425
438
|
"December"
|
|
426
|
-
],
|
|
439
|
+
], ne = [
|
|
427
440
|
"Su",
|
|
428
441
|
"Mo",
|
|
429
442
|
"Tu",
|
|
@@ -431,18 +444,17 @@ var E = class extends HTMLElement {
|
|
|
431
444
|
"Th",
|
|
432
445
|
"Fr",
|
|
433
446
|
"Sa"
|
|
434
|
-
],
|
|
447
|
+
], P = (e) => String(e).padStart(2, "0"), re = (e, t, n) => `${e}-${P(t + 1)}-${P(n)}`, F = (e) => {
|
|
435
448
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
436
449
|
return t ? {
|
|
437
450
|
y: +t[1],
|
|
438
451
|
m: t[2] - 1,
|
|
439
452
|
d: +t[3]
|
|
440
453
|
} : null;
|
|
441
|
-
},
|
|
442
|
-
let t =
|
|
443
|
-
return t ? `${
|
|
444
|
-
},
|
|
445
|
-
static formAssociated = !0;
|
|
454
|
+
}, ie = (e) => {
|
|
455
|
+
let t = F(e);
|
|
456
|
+
return t ? `${P(t.d)} ${te[t.m].slice(0, 3)} ${t.y}` : "";
|
|
457
|
+
}, ae = class extends HTMLElement {
|
|
446
458
|
static get observedAttributes() {
|
|
447
459
|
return [
|
|
448
460
|
"value",
|
|
@@ -453,7 +465,7 @@ var E = class extends HTMLElement {
|
|
|
453
465
|
];
|
|
454
466
|
}
|
|
455
467
|
constructor() {
|
|
456
|
-
super(), this.
|
|
468
|
+
super(), this._value = "";
|
|
457
469
|
let e = new Date(2e3, 0, 1);
|
|
458
470
|
this._viewY = e.getFullYear(), this._viewM = e.getMonth();
|
|
459
471
|
}
|
|
@@ -467,46 +479,46 @@ var E = class extends HTMLElement {
|
|
|
467
479
|
return this._value;
|
|
468
480
|
}
|
|
469
481
|
set value(e) {
|
|
470
|
-
this._value = e || "",
|
|
482
|
+
this._value = e || "", O(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
471
483
|
}
|
|
472
484
|
render() {
|
|
473
485
|
this._value = this.getAttribute("value") || this._value;
|
|
474
|
-
let e = this.getAttribute("placeholder") || "Enter Date", t =
|
|
486
|
+
let e = this.getAttribute("placeholder") || "Enter Date", t = F(this._value);
|
|
475
487
|
t && (this._viewY = t.y, this._viewM = t.m), this.innerHTML = `
|
|
476
488
|
<div class="datepicker">
|
|
477
489
|
<button type="button" class="input datepicker-trigger" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
478
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
490
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? ie(this._value) : e}</span>
|
|
479
491
|
<i class="bi bi-calendar3" aria-hidden="true"></i>
|
|
480
492
|
</button>
|
|
481
493
|
<div class="datepicker-pop" role="dialog" hidden></div>
|
|
482
|
-
</div>`, this._rendered = !0, this._wire();
|
|
494
|
+
</div>`, this._rendered = !0, O(this, this._value), this._wire();
|
|
483
495
|
}
|
|
484
|
-
|
|
485
|
-
|
|
496
|
+
_syncFormValue() {
|
|
497
|
+
O(this, this._value);
|
|
486
498
|
}
|
|
487
499
|
_syncTrigger() {
|
|
488
500
|
let e = this.querySelector("[data-trigger-label]");
|
|
489
501
|
if (!e) return;
|
|
490
|
-
let t =
|
|
491
|
-
e.textContent = t ?
|
|
502
|
+
let t = F(this._value);
|
|
503
|
+
e.textContent = t ? ie(this._value) : this.getAttribute("placeholder") || "Enter Date", e.classList.toggle("search-select-placeholder", !t);
|
|
492
504
|
}
|
|
493
505
|
_renderMonth() {
|
|
494
|
-
let e = this.querySelector(".datepicker-pop"), t = new Date(this._viewY, this._viewM, 1).getDay(), n = new Date(this._viewY, this._viewM + 1, 0).getDate(), r =
|
|
506
|
+
let e = this.querySelector(".datepicker-pop"), t = new Date(this._viewY, this._viewM, 1).getDay(), n = new Date(this._viewY, this._viewM + 1, 0).getDate(), r = F(this._value), i = F(this.getAttribute("min")), a = F(this.getAttribute("max")), o = (e, t, n) => {
|
|
495
507
|
let r = new Date(e, t, n).getTime();
|
|
496
508
|
return !!(i && r < new Date(i.y, i.m, i.d).getTime() || a && r > new Date(a.y, a.m, a.d).getTime());
|
|
497
509
|
}, s = "";
|
|
498
510
|
for (let e = 0; e < t; e++) s += "<span class=\"datepicker-day is-outside\"></span>";
|
|
499
511
|
for (let e = 1; e <= n; e++) {
|
|
500
|
-
let t =
|
|
512
|
+
let t = re(this._viewY, this._viewM, e), n = r && r.y === this._viewY && r.m === this._viewM && r.d === e, i = o(this._viewY, this._viewM, e);
|
|
501
513
|
s += `<button type="button" class="datepicker-day${n ? " selected" : ""}" data-iso="${t}"${i ? " disabled" : ""}>${e}</button>`;
|
|
502
514
|
}
|
|
503
515
|
e.innerHTML = `
|
|
504
516
|
<div class="datepicker-head">
|
|
505
517
|
<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>
|
|
506
|
-
<span class="datepicker-month">${
|
|
518
|
+
<span class="datepicker-month">${te[this._viewM]} ${this._viewY}</span>
|
|
507
519
|
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month"><i class="bi bi-chevron-right" aria-hidden="true"></i></button>
|
|
508
520
|
</div>
|
|
509
|
-
<div class="datepicker-weekdays">${
|
|
521
|
+
<div class="datepicker-weekdays">${ne.map((e) => `<span>${e}</span>`).join("")}</div>
|
|
510
522
|
<div class="datepicker-grid">${s}</div>
|
|
511
523
|
<div class="datepicker-foot"><button type="button" class="datepicker-link" data-clear>Clear</button></div>`;
|
|
512
524
|
}
|
|
@@ -532,25 +544,28 @@ var E = class extends HTMLElement {
|
|
|
532
544
|
n && !n.disabled && (this.value = n.dataset.iso, i());
|
|
533
545
|
}), this._onDocClick = (e) => {
|
|
534
546
|
n() && !this.contains(e.target) && i();
|
|
535
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
547
|
+
}, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
|
|
536
548
|
n() && e.key === "Escape" && i();
|
|
537
|
-
}), this.
|
|
549
|
+
}, document.addEventListener("keydown", this._onDocKey), this._syncFormValue();
|
|
538
550
|
}
|
|
539
551
|
disconnectedCallback() {
|
|
540
|
-
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
552
|
+
this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey);
|
|
553
|
+
}
|
|
554
|
+
}, oe = class extends HTMLElement {
|
|
555
|
+
_accessibleName() {
|
|
556
|
+
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
541
557
|
}
|
|
542
|
-
}, re = class extends HTMLElement {
|
|
543
|
-
static formAssociated = !0;
|
|
544
558
|
static get observedAttributes() {
|
|
545
559
|
return [
|
|
546
560
|
"placeholder",
|
|
547
561
|
"search-placeholder",
|
|
548
562
|
"searchable",
|
|
549
|
-
"disabled"
|
|
563
|
+
"disabled",
|
|
564
|
+
"aria-label"
|
|
550
565
|
];
|
|
551
566
|
}
|
|
552
567
|
constructor() {
|
|
553
|
-
super(), this.
|
|
568
|
+
super(), this._values = [], this._optionsProp = null, this._active = -1;
|
|
554
569
|
}
|
|
555
570
|
connectedCallback() {
|
|
556
571
|
if (!this._rendered) {
|
|
@@ -568,7 +583,7 @@ var E = class extends HTMLElement {
|
|
|
568
583
|
return this._values.slice();
|
|
569
584
|
}
|
|
570
585
|
set values(e) {
|
|
571
|
-
this._values = Array.isArray(e) ? e.map(String) : [],
|
|
586
|
+
this._values = Array.isArray(e) ? e.map(String) : [], O(this, this._values.join(",")), this._rendered && this._renderControl();
|
|
572
587
|
}
|
|
573
588
|
set options(e) {
|
|
574
589
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -582,6 +597,7 @@ var E = class extends HTMLElement {
|
|
|
582
597
|
e.length && (this._declared = e.map((e) => ({
|
|
583
598
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
584
599
|
label: e.innerHTML,
|
|
600
|
+
[k]: !0,
|
|
585
601
|
selected: e.hasAttribute("selected")
|
|
586
602
|
})));
|
|
587
603
|
}
|
|
@@ -592,39 +608,43 @@ var E = class extends HTMLElement {
|
|
|
592
608
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
593
609
|
return t ? t.label : e;
|
|
594
610
|
}
|
|
611
|
+
_labelHtmlFor(e) {
|
|
612
|
+
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
613
|
+
return t ? j(t) : A(e);
|
|
614
|
+
}
|
|
595
615
|
render() {
|
|
596
616
|
this._snapshotDeclared();
|
|
597
617
|
let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…";
|
|
598
|
-
|
|
618
|
+
O(this, this._values.join(",")), this.innerHTML = `
|
|
599
619
|
<div class="search-select">
|
|
600
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
620
|
+
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${I(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
601
621
|
<div class="ms-chips" data-chips></div>
|
|
602
622
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
603
623
|
</div>
|
|
604
624
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
|
|
605
|
-
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
625
|
+
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${I(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>` : ""}
|
|
606
626
|
<div class="search-select-options"></div>
|
|
607
627
|
<div class="search-select-empty" hidden>No matches</div>
|
|
608
628
|
</div>
|
|
609
|
-
</div>`, this._rendered = !0, this._renderControl(), this._renderOptions(), this._wire();
|
|
629
|
+
</div>`, this._rendered = !0, O(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
|
|
610
630
|
}
|
|
611
631
|
_renderControl() {
|
|
612
632
|
let e = this.querySelector("[data-chips]");
|
|
613
633
|
if (!e) return;
|
|
614
634
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
615
635
|
if (!this._values.length) {
|
|
616
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
636
|
+
e.innerHTML = `<span class="search-select-placeholder">${A(t)}</span>`;
|
|
617
637
|
return;
|
|
618
638
|
}
|
|
619
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this.
|
|
639
|
+
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="${I(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join("");
|
|
620
640
|
}
|
|
621
641
|
_renderOptions(e) {
|
|
622
642
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
623
643
|
if (!t) return;
|
|
624
644
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
625
|
-
r && (i = i.filter((e) =>
|
|
645
|
+
r && (i = i.filter((e) => se(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
|
|
626
646
|
let t = this._values.includes(String(e.value));
|
|
627
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
647
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${I(e.value)}" aria-selected="${t}"><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span><span class="ms-opt-label">${j(e)}</span></button>`;
|
|
628
648
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1;
|
|
629
649
|
}
|
|
630
650
|
_wire() {
|
|
@@ -643,7 +663,7 @@ var E = class extends HTMLElement {
|
|
|
643
663
|
}, f = () => {
|
|
644
664
|
t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
|
|
645
665
|
}, p = () => {
|
|
646
|
-
|
|
666
|
+
O(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
647
667
|
}, m = (e) => {
|
|
648
668
|
let t = String(e);
|
|
649
669
|
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();
|
|
@@ -665,13 +685,19 @@ var E = class extends HTMLElement {
|
|
|
665
685
|
t && l(c().indexOf(t));
|
|
666
686
|
}), n?.addEventListener("input", () => {
|
|
667
687
|
this._renderOptions(n.value), r && (r.hidden = !n.value), l(-1);
|
|
668
|
-
})
|
|
688
|
+
});
|
|
689
|
+
let g = (t) => {
|
|
669
690
|
let r = c();
|
|
670
691
|
t.key === "ArrowDown" ? (t.preventDefault(), l(Math.min(this._active + 1, r.length - 1))) : t.key === "ArrowUp" ? (t.preventDefault(), l(Math.max(this._active - 1, 0))) : t.key === "Enter" ? (t.preventDefault(), r[this._active] && m(r[this._active].dataset.value)) : t.key === "Escape" ? (f(), e.focus()) : t.key === "Backspace" && !n.value && this._values.length && h(this._values[this._values.length - 1]);
|
|
671
|
-
}
|
|
692
|
+
};
|
|
693
|
+
n?.addEventListener("keydown", g), r?.addEventListener("click", () => {
|
|
672
694
|
n.value = "", this._renderOptions(""), r.hidden = !0, n.focus();
|
|
673
695
|
}), e.addEventListener("keydown", (e) => {
|
|
674
|
-
|
|
696
|
+
if (u()) {
|
|
697
|
+
g(e);
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
|
|
675
701
|
}), this._onDocClick = (e) => {
|
|
676
702
|
u() && !this.contains(e.target) && f();
|
|
677
703
|
}, document.addEventListener("click", this._onDocClick), window.addEventListener("resize", () => {
|
|
@@ -681,7 +707,7 @@ var E = class extends HTMLElement {
|
|
|
681
707
|
disconnectedCallback() {
|
|
682
708
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
683
709
|
}
|
|
684
|
-
},
|
|
710
|
+
}, I = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), se = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), L = [
|
|
685
711
|
[
|
|
686
712
|
"AF",
|
|
687
713
|
"Afghanistan",
|
|
@@ -1907,12 +1933,11 @@ var E = class extends HTMLElement {
|
|
|
1907
1933
|
"Zimbabwe",
|
|
1908
1934
|
"263"
|
|
1909
1935
|
]
|
|
1910
|
-
],
|
|
1936
|
+
], R = (e) => (L.find((t) => t[0] === e) || [
|
|
1911
1937
|
"",
|
|
1912
1938
|
"",
|
|
1913
1939
|
""
|
|
1914
|
-
])[2],
|
|
1915
|
-
static formAssociated = !0;
|
|
1940
|
+
])[2], z = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, ce = class extends HTMLElement {
|
|
1916
1941
|
static get observedAttributes() {
|
|
1917
1942
|
return [
|
|
1918
1943
|
"value",
|
|
@@ -1922,7 +1947,7 @@ var E = class extends HTMLElement {
|
|
|
1922
1947
|
];
|
|
1923
1948
|
}
|
|
1924
1949
|
constructor() {
|
|
1925
|
-
super(), this.
|
|
1950
|
+
super(), this._country = "IN", this._national = "";
|
|
1926
1951
|
}
|
|
1927
1952
|
connectedCallback() {
|
|
1928
1953
|
this._rendered || this.render();
|
|
@@ -1931,33 +1956,33 @@ var E = class extends HTMLElement {
|
|
|
1931
1956
|
this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
|
|
1932
1957
|
}
|
|
1933
1958
|
get value() {
|
|
1934
|
-
return `+${
|
|
1959
|
+
return `+${R(this._country)}${this._national}`;
|
|
1935
1960
|
}
|
|
1936
1961
|
set value(e) {
|
|
1937
1962
|
this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
|
|
1938
1963
|
}
|
|
1939
1964
|
_commit() {
|
|
1940
|
-
|
|
1965
|
+
O(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1941
1966
|
}
|
|
1942
1967
|
render() {
|
|
1943
1968
|
let e = this.getAttribute("placeholder") || "Enter phone number";
|
|
1944
1969
|
this._country = this.getAttribute("country") || this._country;
|
|
1945
|
-
let t =
|
|
1970
|
+
let t = L.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${z(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
|
|
1946
1971
|
this.innerHTML = `
|
|
1947
1972
|
<div class="phone-input-wrap">
|
|
1948
1973
|
<div class="phone-country-adornment">
|
|
1949
1974
|
<button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
1950
|
-
<span class="${
|
|
1975
|
+
<span class="${z(this._country)}" data-flag aria-hidden="true"></span>
|
|
1951
1976
|
<i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
|
|
1952
|
-
<span class="phone-dial" data-dial>+${
|
|
1977
|
+
<span class="phone-dial" data-dial>+${R(this._country)}</span>
|
|
1953
1978
|
</button>
|
|
1954
1979
|
<div class="country-dropdown-menu" role="listbox" hidden>
|
|
1955
1980
|
<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>
|
|
1956
1981
|
<div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
|
|
1957
1982
|
</div>
|
|
1958
1983
|
</div>
|
|
1959
|
-
<input type="tel" class="input" placeholder="${
|
|
1960
|
-
</div>`, this._rendered = !0, this._wire();
|
|
1984
|
+
<input type="tel" class="input" placeholder="${le(e)}" value="${le(this._national)}"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
1985
|
+
</div>`, this._rendered = !0, O(this, this.value), this._wire();
|
|
1961
1986
|
}
|
|
1962
1987
|
_wire() {
|
|
1963
1988
|
let e = this.querySelector(".country-toggle"), t = this.querySelector(".country-dropdown-menu"), n = this.querySelector(".dropdown-search-input"), r = this.querySelector(".country-list-scroll"), i = this.querySelector(".country-empty"), a = this.querySelector("input[type=tel]"), o = this.querySelector("[data-flag]"), s = this.querySelector("[data-dial]");
|
|
@@ -1981,7 +2006,7 @@ var E = class extends HTMLElement {
|
|
|
1981
2006
|
}
|
|
1982
2007
|
i && (i.hidden = n > 0);
|
|
1983
2008
|
}, p = (e) => {
|
|
1984
|
-
this._country = e, this.setAttribute("country", e), o && (o.className =
|
|
2009
|
+
this._country = e, this.setAttribute("country", e), o && (o.className = z(e)), s && (s.textContent = `+${R(e)}`);
|
|
1985
2010
|
for (let t of r.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
|
|
1986
2011
|
d(), this._commit();
|
|
1987
2012
|
};
|
|
@@ -1992,13 +2017,12 @@ var E = class extends HTMLElement {
|
|
|
1992
2017
|
this._national = a.value.replace(/[^0-9]/g, ""), this._commit();
|
|
1993
2018
|
}), this._onDocClick = (e) => {
|
|
1994
2019
|
c() && !this.contains(e.target) && d();
|
|
1995
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
2020
|
+
}, document.addEventListener("click", this._onDocClick), O(this, this.value);
|
|
1996
2021
|
}
|
|
1997
2022
|
disconnectedCallback() {
|
|
1998
2023
|
this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
1999
2024
|
}
|
|
2000
|
-
},
|
|
2001
|
-
static formAssociated = !0;
|
|
2025
|
+
}, le = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), ue = class extends HTMLElement {
|
|
2002
2026
|
static get observedAttributes() {
|
|
2003
2027
|
return [
|
|
2004
2028
|
"value",
|
|
@@ -2006,11 +2030,15 @@ var E = class extends HTMLElement {
|
|
|
2006
2030
|
"search-placeholder",
|
|
2007
2031
|
"searchable",
|
|
2008
2032
|
"disabled",
|
|
2009
|
-
"compact"
|
|
2033
|
+
"compact",
|
|
2034
|
+
"aria-label"
|
|
2010
2035
|
];
|
|
2011
2036
|
}
|
|
2037
|
+
_accessibleName() {
|
|
2038
|
+
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
2039
|
+
}
|
|
2012
2040
|
constructor() {
|
|
2013
|
-
super(), this.
|
|
2041
|
+
super(), this._value = "", this._optionsProp = null, this._active = -1;
|
|
2014
2042
|
}
|
|
2015
2043
|
connectedCallback() {
|
|
2016
2044
|
this._rendered || this.render();
|
|
@@ -2022,7 +2050,7 @@ var E = class extends HTMLElement {
|
|
|
2022
2050
|
return this._value;
|
|
2023
2051
|
}
|
|
2024
2052
|
set value(e) {
|
|
2025
|
-
this._value = e == null ? "" : String(e),
|
|
2053
|
+
this._value = e == null ? "" : String(e), O(this, this._value), this._syncSelected();
|
|
2026
2054
|
}
|
|
2027
2055
|
set options(e) {
|
|
2028
2056
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -2036,6 +2064,7 @@ var E = class extends HTMLElement {
|
|
|
2036
2064
|
e.length && (this._declared = e.map((e) => ({
|
|
2037
2065
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
2038
2066
|
label: e.innerHTML,
|
|
2067
|
+
[k]: !0,
|
|
2039
2068
|
selected: e.hasAttribute("selected")
|
|
2040
2069
|
})));
|
|
2041
2070
|
}
|
|
@@ -2045,22 +2074,22 @@ var E = class extends HTMLElement {
|
|
|
2045
2074
|
render() {
|
|
2046
2075
|
this._snapshotDeclared();
|
|
2047
2076
|
let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.getAttribute("placeholder") || "Select...", r = this.getAttribute("search-placeholder") || "Search...", i = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
|
|
2048
|
-
i && (this._value = String(i.value)),
|
|
2077
|
+
i && (this._value = String(i.value)), O(this, this._value);
|
|
2049
2078
|
let a = e.map((e) => {
|
|
2050
2079
|
let t = String(e.value) === String(this._value);
|
|
2051
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
2080
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${B(e.value)}" aria-selected="${t}">${j(e)}</button>`;
|
|
2052
2081
|
}).join("");
|
|
2053
2082
|
this.innerHTML = `
|
|
2054
2083
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}">
|
|
2055
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2056
|
-
<span class="${i ? "" : "search-select-placeholder"}" data-label>${i ? i
|
|
2084
|
+
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${B(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2085
|
+
<span class="${i ? "" : "search-select-placeholder"}" data-label>${i ? j(i) : A(n)}</span>
|
|
2057
2086
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
2058
2087
|
</button>
|
|
2059
2088
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
|
|
2060
|
-
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
2089
|
+
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${B(r)}" 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>` : ""}
|
|
2061
2090
|
<div class="search-select-options">${a}<div class="search-select-empty" hidden>No matches</div></div>
|
|
2062
2091
|
</div>
|
|
2063
|
-
</div>`, this._rendered = !0, this._wire();
|
|
2092
|
+
</div>`, this._rendered = !0, O(this, this._value), this._wire();
|
|
2064
2093
|
}
|
|
2065
2094
|
_refs() {
|
|
2066
2095
|
return {
|
|
@@ -2085,7 +2114,7 @@ var E = class extends HTMLElement {
|
|
|
2085
2114
|
let t = e.dataset.value === String(this._value);
|
|
2086
2115
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
2087
2116
|
}
|
|
2088
|
-
e && (e.innerHTML = t ? t
|
|
2117
|
+
e && (e.innerHTML = t ? j(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
|
|
2089
2118
|
}
|
|
2090
2119
|
_wire() {
|
|
2091
2120
|
let e = this._refs();
|
|
@@ -2116,7 +2145,11 @@ var E = class extends HTMLElement {
|
|
|
2116
2145
|
t.key === "ArrowDown" ? (t.preventDefault(), n(Math.min(this._active + 1, r.length - 1))) : t.key === "ArrowUp" ? (t.preventDefault(), n(Math.max(this._active - 1, 0))) : t.key === "Enter" ? (t.preventDefault(), r[this._active] && s(r[this._active])) : t.key === "Escape" && (o(), e.control.focus());
|
|
2117
2146
|
};
|
|
2118
2147
|
e.control.addEventListener("click", () => i() ? o() : a()), e.control.addEventListener("keydown", (e) => {
|
|
2119
|
-
|
|
2148
|
+
if (i()) {
|
|
2149
|
+
c(e);
|
|
2150
|
+
return;
|
|
2151
|
+
}
|
|
2152
|
+
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
2120
2153
|
}), e.optionsWrap.addEventListener("click", (e) => {
|
|
2121
2154
|
let t = e.target.closest(".search-select-option");
|
|
2122
2155
|
t && s(t);
|
|
@@ -2136,14 +2169,14 @@ var E = class extends HTMLElement {
|
|
|
2136
2169
|
disconnectedCallback() {
|
|
2137
2170
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2138
2171
|
}
|
|
2139
|
-
},
|
|
2172
|
+
}, B = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), V = "image/png,image/jpeg,image/webp", de = {
|
|
2140
2173
|
"image/png": [".png"],
|
|
2141
2174
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
2142
2175
|
"image/webp": [".webp"],
|
|
2143
2176
|
"image/gif": [".gif"],
|
|
2144
2177
|
"image/svg+xml": [".svg"],
|
|
2145
2178
|
"application/pdf": [".pdf"]
|
|
2146
|
-
},
|
|
2179
|
+
}, fe = {
|
|
2147
2180
|
"image/png": "PNG",
|
|
2148
2181
|
"image/jpeg": "JPG",
|
|
2149
2182
|
"image/webp": "WEBP",
|
|
@@ -2157,36 +2190,36 @@ var E = class extends HTMLElement {
|
|
|
2157
2190
|
".gif": "GIF",
|
|
2158
2191
|
".svg": "SVG",
|
|
2159
2192
|
".pdf": "PDF"
|
|
2160
|
-
},
|
|
2161
|
-
function
|
|
2193
|
+
}, H = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
2194
|
+
function pe(e) {
|
|
2162
2195
|
let t = [];
|
|
2163
|
-
for (let n of
|
|
2164
|
-
let e =
|
|
2196
|
+
for (let n of H(e)) {
|
|
2197
|
+
let e = fe[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
2165
2198
|
t.includes(e) || t.push(e);
|
|
2166
2199
|
}
|
|
2167
2200
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
2168
2201
|
}
|
|
2169
|
-
function
|
|
2170
|
-
let n =
|
|
2202
|
+
function me(e, t) {
|
|
2203
|
+
let n = H(t);
|
|
2171
2204
|
if (!n.length) return !0;
|
|
2172
2205
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
2173
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
2206
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (de[e] || []).some((e) => i.endsWith(e)));
|
|
2174
2207
|
}
|
|
2175
|
-
function
|
|
2208
|
+
function U(e, t = {}) {
|
|
2176
2209
|
if (!e) return null;
|
|
2177
|
-
let n = t.accept === void 0 ?
|
|
2178
|
-
return
|
|
2210
|
+
let n = t.accept === void 0 ? V : t.accept, r = t.maxSizeMb || 5;
|
|
2211
|
+
return me(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${pe(n)} file.`;
|
|
2179
2212
|
}
|
|
2180
|
-
var
|
|
2213
|
+
var W = (e, t) => {
|
|
2181
2214
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
2182
2215
|
};
|
|
2183
|
-
function
|
|
2184
|
-
|
|
2216
|
+
function he() {
|
|
2217
|
+
W("wui-select", ue), W("wui-phone", ce), W("wui-datepicker", ae), W("wui-autocomplete", ee), W("wui-multiselect", oe), W("wui-status-icon", E);
|
|
2185
2218
|
}
|
|
2186
|
-
|
|
2219
|
+
he();
|
|
2187
2220
|
//#endregion
|
|
2188
2221
|
//#region src/components/RequiredMark.jsx
|
|
2189
|
-
function
|
|
2222
|
+
function G() {
|
|
2190
2223
|
return /* @__PURE__ */ t("span", {
|
|
2191
2224
|
className: "required",
|
|
2192
2225
|
"aria-hidden": "true",
|
|
@@ -2195,7 +2228,7 @@ function W() {
|
|
|
2195
2228
|
}
|
|
2196
2229
|
//#endregion
|
|
2197
2230
|
//#region src/components/AppAutocomplete.jsx
|
|
2198
|
-
function
|
|
2231
|
+
function ge({ value: e, onChange: r, options: a, loadOptions: o, placeholder: c = "Search…", minChars: l, debounce: u, disabled: d = !1, name: f, label: p, error: m, hint: h, required: g = !1, fieldClassName: _ = "" }) {
|
|
2199
2232
|
let v = s(null), y = typeof o == "function";
|
|
2200
2233
|
return i(() => {
|
|
2201
2234
|
let e = v.current;
|
|
@@ -2229,9 +2262,10 @@ function pe({ value: e, onChange: r, options: a, loadOptions: o, placeholder: c
|
|
|
2229
2262
|
p && /* @__PURE__ */ n("label", {
|
|
2230
2263
|
className: "label",
|
|
2231
2264
|
htmlFor: f,
|
|
2232
|
-
children: [p, g && /* @__PURE__ */ t(
|
|
2265
|
+
children: [p, g && /* @__PURE__ */ t(G, {})]
|
|
2233
2266
|
}),
|
|
2234
2267
|
/* @__PURE__ */ t("wui-autocomplete", {
|
|
2268
|
+
"aria-label": typeof p == "string" ? p : void 0,
|
|
2235
2269
|
id: f,
|
|
2236
2270
|
ref: v,
|
|
2237
2271
|
name: f,
|
|
@@ -2253,13 +2287,13 @@ function pe({ value: e, onChange: r, options: a, loadOptions: o, placeholder: c
|
|
|
2253
2287
|
}
|
|
2254
2288
|
//#endregion
|
|
2255
2289
|
//#region src/components/AppAvatar.jsx
|
|
2256
|
-
function
|
|
2290
|
+
function _e(e) {
|
|
2257
2291
|
let t = (e || "").trim();
|
|
2258
2292
|
if (!t) return "?";
|
|
2259
2293
|
let n = t.split(/\s+/).filter(Boolean);
|
|
2260
2294
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
2261
2295
|
}
|
|
2262
|
-
function
|
|
2296
|
+
function ve({ name: e, src: n, className: r = "" }) {
|
|
2263
2297
|
let i = ["avatar", r].filter(Boolean).join(" ");
|
|
2264
2298
|
return n ? /* @__PURE__ */ t("span", {
|
|
2265
2299
|
className: i,
|
|
@@ -2272,12 +2306,12 @@ function he({ name: e, src: n, className: r = "" }) {
|
|
|
2272
2306
|
className: i,
|
|
2273
2307
|
role: "img",
|
|
2274
2308
|
"aria-label": e,
|
|
2275
|
-
children:
|
|
2309
|
+
children: _e(e)
|
|
2276
2310
|
});
|
|
2277
2311
|
}
|
|
2278
2312
|
//#endregion
|
|
2279
2313
|
//#region src/components/AppBadge.jsx
|
|
2280
|
-
function
|
|
2314
|
+
function ye({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
2281
2315
|
return /* @__PURE__ */ t(u, {
|
|
2282
2316
|
bg: !1,
|
|
2283
2317
|
className: [
|
|
@@ -2291,25 +2325,25 @@ function ge({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
|
2291
2325
|
}
|
|
2292
2326
|
//#endregion
|
|
2293
2327
|
//#region src/components/AppButton.jsx
|
|
2294
|
-
var
|
|
2328
|
+
var be = {
|
|
2295
2329
|
primary: "primary",
|
|
2296
2330
|
secondary: "secondary",
|
|
2297
2331
|
outline: "outline-primary",
|
|
2298
2332
|
ghost: "link",
|
|
2299
2333
|
danger: "danger"
|
|
2300
2334
|
};
|
|
2301
|
-
function
|
|
2335
|
+
function K(e, n) {
|
|
2302
2336
|
return e ? typeof e == "string" ? /* @__PURE__ */ t(x, {
|
|
2303
2337
|
name: e,
|
|
2304
2338
|
size: 16,
|
|
2305
2339
|
className: n === "left" ? "me-2" : "ms-2"
|
|
2306
2340
|
}) : e : null;
|
|
2307
2341
|
}
|
|
2308
|
-
function
|
|
2342
|
+
function q({ children: e, variant: r = "primary", size: i = "md", type: a = "button", loading: o = !1, disabled: s = !1, block: c = !1, leftIcon: l = null, rightIcon: u = null, className: f = "", ...p }) {
|
|
2309
2343
|
let m = [c ? "w-100" : "", f].filter(Boolean).join(" ");
|
|
2310
2344
|
return /* @__PURE__ */ n(d, {
|
|
2311
2345
|
type: a,
|
|
2312
|
-
variant:
|
|
2346
|
+
variant: be[r] ?? "primary",
|
|
2313
2347
|
size: i === "md" ? void 0 : i,
|
|
2314
2348
|
disabled: s || o,
|
|
2315
2349
|
className: m || void 0,
|
|
@@ -2319,15 +2353,15 @@ function K({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2319
2353
|
className: "spinner-border spinner-border-sm me-2",
|
|
2320
2354
|
"aria-hidden": "true"
|
|
2321
2355
|
}),
|
|
2322
|
-
!o &&
|
|
2356
|
+
!o && K(l, "left"),
|
|
2323
2357
|
e,
|
|
2324
|
-
!o &&
|
|
2358
|
+
!o && K(u, "right")
|
|
2325
2359
|
]
|
|
2326
2360
|
});
|
|
2327
2361
|
}
|
|
2328
2362
|
//#endregion
|
|
2329
2363
|
//#region src/components/AppCallout.jsx
|
|
2330
|
-
function
|
|
2364
|
+
function xe({ children: e, icon: r = "info", className: i = "" }) {
|
|
2331
2365
|
return /* @__PURE__ */ n("div", {
|
|
2332
2366
|
className: `info-callout${i ? ` ${i}` : ""}`,
|
|
2333
2367
|
children: [r && /* @__PURE__ */ t("span", {
|
|
@@ -2341,7 +2375,7 @@ function ve({ children: e, icon: r = "info", className: i = "" }) {
|
|
|
2341
2375
|
}
|
|
2342
2376
|
//#endregion
|
|
2343
2377
|
//#region src/components/AppCard.jsx
|
|
2344
|
-
function
|
|
2378
|
+
function Se({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: p = !0, lifted: m = !1, ...h }) {
|
|
2345
2379
|
let g = a != null || r != null || o != null || s != null;
|
|
2346
2380
|
return /* @__PURE__ */ n(f, {
|
|
2347
2381
|
className: [m ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
|
|
@@ -2365,7 +2399,7 @@ function ye({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2365
2399
|
}
|
|
2366
2400
|
//#endregion
|
|
2367
2401
|
//#region src/components/AppCheckbox.jsx
|
|
2368
|
-
var
|
|
2402
|
+
var Ce = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
2369
2403
|
let l = a(), u = r || i || l;
|
|
2370
2404
|
return /* @__PURE__ */ n("div", {
|
|
2371
2405
|
className: `form-check${o ? ` ${o}` : ""}`,
|
|
@@ -2385,7 +2419,7 @@ var be = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
|
2385
2419
|
});
|
|
2386
2420
|
//#endregion
|
|
2387
2421
|
//#region src/components/AppChip.jsx
|
|
2388
|
-
function
|
|
2422
|
+
function we({ 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 = "" }) {
|
|
2389
2423
|
let m = r ?? i, h = [
|
|
2390
2424
|
"chip",
|
|
2391
2425
|
a && a !== "neutral" ? a : "",
|
|
@@ -2436,7 +2470,7 @@ function xe({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2436
2470
|
}
|
|
2437
2471
|
//#endregion
|
|
2438
2472
|
//#region src/components/AppChoiceCard.jsx
|
|
2439
|
-
function
|
|
2473
|
+
function Te({ 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 = "" }) {
|
|
2440
2474
|
return /* @__PURE__ */ n("label", {
|
|
2441
2475
|
className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
2442
2476
|
children: [
|
|
@@ -2484,7 +2518,7 @@ function Se({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2484
2518
|
}
|
|
2485
2519
|
//#endregion
|
|
2486
2520
|
//#region src/components/AppChoiceChip.jsx
|
|
2487
|
-
function
|
|
2521
|
+
function Ee({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "" }) {
|
|
2488
2522
|
return /* @__PURE__ */ n("label", {
|
|
2489
2523
|
className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
|
|
2490
2524
|
children: [
|
|
@@ -2505,7 +2539,7 @@ function Ce({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
|
|
|
2505
2539
|
}
|
|
2506
2540
|
//#endregion
|
|
2507
2541
|
//#region src/components/AppColorField.jsx
|
|
2508
|
-
function
|
|
2542
|
+
function De({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: o, hint: s, name: c, id: l, disabled: u = !1, className: d = "" }) {
|
|
2509
2543
|
let f = l || c;
|
|
2510
2544
|
return /* @__PURE__ */ n("div", {
|
|
2511
2545
|
className: `field${d ? ` ${d}` : ""}`,
|
|
@@ -2513,7 +2547,7 @@ function we({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
2513
2547
|
i && /* @__PURE__ */ n("label", {
|
|
2514
2548
|
className: "label",
|
|
2515
2549
|
htmlFor: f,
|
|
2516
|
-
children: [i, a && /* @__PURE__ */ t(
|
|
2550
|
+
children: [i, a && /* @__PURE__ */ t(G, {})]
|
|
2517
2551
|
}),
|
|
2518
2552
|
/* @__PURE__ */ n("div", {
|
|
2519
2553
|
className: "color-field",
|
|
@@ -2552,7 +2586,7 @@ function we({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
2552
2586
|
}
|
|
2553
2587
|
//#endregion
|
|
2554
2588
|
//#region src/components/AppCompareTable.jsx
|
|
2555
|
-
function
|
|
2589
|
+
function Oe({ columns: e = [], rows: r = [], caption: i, className: a = "" }) {
|
|
2556
2590
|
let o = (e) => e === !0 ? /* @__PURE__ */ t("span", {
|
|
2557
2591
|
className: "compare-yes",
|
|
2558
2592
|
children: /* @__PURE__ */ t(x, {
|
|
@@ -2587,7 +2621,7 @@ function Te({ columns: e = [], rows: r = [], caption: i, className: a = "" }) {
|
|
|
2587
2621
|
}
|
|
2588
2622
|
//#endregion
|
|
2589
2623
|
//#region src/components/AppInfoTip.jsx
|
|
2590
|
-
function
|
|
2624
|
+
function J({ label: e, children: r }) {
|
|
2591
2625
|
let [i, l] = c(!1), [u, d] = c(null), f = s(null), p = s(null), h = a();
|
|
2592
2626
|
return o(() => {
|
|
2593
2627
|
if (!i || !f.current || !p.current) return;
|
|
@@ -2633,7 +2667,7 @@ function q({ label: e, children: r }) {
|
|
|
2633
2667
|
}
|
|
2634
2668
|
//#endregion
|
|
2635
2669
|
//#region src/components/AppInput.jsx
|
|
2636
|
-
var
|
|
2670
|
+
var Y = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: l = "text", leftIcon: u, rightIcon: d, onRightIconClick: f, unit: m, id: h, name: g, className: _ = "", fieldClassName: v = "", disabled: y = !1, ...b }, S) {
|
|
2637
2671
|
let [C, w] = c(!1), T = h || g, E = l === "password", D = E && C ? "text" : l, O = [
|
|
2638
2672
|
"input",
|
|
2639
2673
|
i ? "error" : "",
|
|
@@ -2700,11 +2734,11 @@ var J = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, hel
|
|
|
2700
2734
|
htmlFor: T,
|
|
2701
2735
|
children: [
|
|
2702
2736
|
e,
|
|
2703
|
-
o && /* @__PURE__ */ t(
|
|
2737
|
+
o && /* @__PURE__ */ t(J, {
|
|
2704
2738
|
label: s,
|
|
2705
2739
|
children: o
|
|
2706
2740
|
}),
|
|
2707
|
-
r && /* @__PURE__ */ t(
|
|
2741
|
+
r && /* @__PURE__ */ t(G, {})
|
|
2708
2742
|
]
|
|
2709
2743
|
}),
|
|
2710
2744
|
A,
|
|
@@ -2717,14 +2751,14 @@ var J = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, hel
|
|
|
2717
2751
|
}) : null
|
|
2718
2752
|
]
|
|
2719
2753
|
});
|
|
2720
|
-
}),
|
|
2721
|
-
function
|
|
2754
|
+
}), ke = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
|
|
2755
|
+
function X({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer: l, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, className: g = "", children: _ }) {
|
|
2722
2756
|
let v = s(null);
|
|
2723
2757
|
i(() => {
|
|
2724
2758
|
if (!e) return;
|
|
2725
2759
|
let t = v.current?.closest(".modal-content");
|
|
2726
2760
|
if (!t) return;
|
|
2727
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
2761
|
+
let n = () => Array.from(t.querySelectorAll(ke));
|
|
2728
2762
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
|
|
2729
2763
|
}, [e]);
|
|
2730
2764
|
let y = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), b = [
|
|
@@ -2804,27 +2838,27 @@ function Y({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2804
2838
|
}
|
|
2805
2839
|
//#endregion
|
|
2806
2840
|
//#region src/components/ModalIcons.jsx
|
|
2807
|
-
var
|
|
2841
|
+
var Z = (e) => function({ size: n = 72 }) {
|
|
2808
2842
|
return /* @__PURE__ */ t("wui-status-icon", {
|
|
2809
2843
|
tone: e,
|
|
2810
2844
|
size: n
|
|
2811
2845
|
});
|
|
2812
|
-
},
|
|
2813
|
-
success:
|
|
2814
|
-
error:
|
|
2815
|
-
warning:
|
|
2816
|
-
info:
|
|
2817
|
-
delete:
|
|
2846
|
+
}, Ae = {
|
|
2847
|
+
success: Z("success"),
|
|
2848
|
+
error: Z("error"),
|
|
2849
|
+
warning: Z("warning"),
|
|
2850
|
+
info: Z("info"),
|
|
2851
|
+
delete: Z("delete")
|
|
2818
2852
|
};
|
|
2819
2853
|
//#endregion
|
|
2820
2854
|
//#region src/components/AppConfirmDialog.jsx
|
|
2821
|
-
function
|
|
2855
|
+
function je({ open: r, title: a, message: o, confirmLabel: s = "Confirm", cancelLabel: l = "Cancel", danger: u = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m }) {
|
|
2822
2856
|
let [h, g] = c("");
|
|
2823
2857
|
if (i(() => {
|
|
2824
2858
|
r || g("");
|
|
2825
2859
|
}, [r]), !r) return null;
|
|
2826
|
-
let _ = !!f && h.trim() !== f, v =
|
|
2827
|
-
return /* @__PURE__ */ t(
|
|
2860
|
+
let _ = !!f && h.trim() !== f, v = Ae[d || (u ? "delete" : "info")];
|
|
2861
|
+
return /* @__PURE__ */ t(X, {
|
|
2828
2862
|
open: r,
|
|
2829
2863
|
hideHeader: !0,
|
|
2830
2864
|
title: a,
|
|
@@ -2832,11 +2866,11 @@ function De({ open: r, title: a, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
2832
2866
|
className: "lx-confirm",
|
|
2833
2867
|
footer: /* @__PURE__ */ n("div", {
|
|
2834
2868
|
className: "lx-confirm-actions",
|
|
2835
|
-
children: [/* @__PURE__ */ t(
|
|
2869
|
+
children: [/* @__PURE__ */ t(q, {
|
|
2836
2870
|
variant: "secondary",
|
|
2837
2871
|
onClick: m,
|
|
2838
2872
|
children: l
|
|
2839
|
-
}), /* @__PURE__ */ t(
|
|
2873
|
+
}), /* @__PURE__ */ t(q, {
|
|
2840
2874
|
variant: u ? "danger" : "primary",
|
|
2841
2875
|
disabled: _,
|
|
2842
2876
|
onClick: p,
|
|
@@ -2858,7 +2892,7 @@ function De({ open: r, title: a, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
2858
2892
|
className: "lx-confirm-msg",
|
|
2859
2893
|
children: o
|
|
2860
2894
|
}),
|
|
2861
|
-
f && /* @__PURE__ */ t(
|
|
2895
|
+
f && /* @__PURE__ */ t(Y, {
|
|
2862
2896
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
2863
2897
|
label: /* @__PURE__ */ n(e, { children: [
|
|
2864
2898
|
"Type ",
|
|
@@ -2875,7 +2909,7 @@ function De({ open: r, title: a, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
2875
2909
|
}
|
|
2876
2910
|
//#endregion
|
|
2877
2911
|
//#region src/components/AppSkeleton.jsx
|
|
2878
|
-
function
|
|
2912
|
+
function Me({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a }) {
|
|
2879
2913
|
return /* @__PURE__ */ t("span", {
|
|
2880
2914
|
className: `skeleton${i ? ` ${i}` : ""}`,
|
|
2881
2915
|
"aria-hidden": "true",
|
|
@@ -2887,7 +2921,7 @@ function Q({ width: e = "100%", height: n = 14, radius: r = 6, className: i = ""
|
|
|
2887
2921
|
}
|
|
2888
2922
|
});
|
|
2889
2923
|
}
|
|
2890
|
-
var
|
|
2924
|
+
var Ne = [
|
|
2891
2925
|
"r0",
|
|
2892
2926
|
"r1",
|
|
2893
2927
|
"r2",
|
|
@@ -2896,7 +2930,7 @@ var Oe = [
|
|
|
2896
2930
|
"r5",
|
|
2897
2931
|
"r6",
|
|
2898
2932
|
"r7"
|
|
2899
|
-
],
|
|
2933
|
+
], Pe = [
|
|
2900
2934
|
"c0",
|
|
2901
2935
|
"c1",
|
|
2902
2936
|
"c2",
|
|
@@ -2906,54 +2940,55 @@ var Oe = [
|
|
|
2906
2940
|
"c6",
|
|
2907
2941
|
"c7"
|
|
2908
2942
|
];
|
|
2909
|
-
function
|
|
2910
|
-
return
|
|
2943
|
+
function Q({ rows: e = 4, cols: n = 5 }) {
|
|
2944
|
+
return Ne.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: Pe.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(Me, {
|
|
2911
2945
|
width: n === 0 ? "70%" : "50%",
|
|
2912
2946
|
height: 12
|
|
2913
2947
|
}) }, e)) }, e));
|
|
2914
2948
|
}
|
|
2915
2949
|
//#endregion
|
|
2916
2950
|
//#region src/components/AppSelectMini.jsx
|
|
2917
|
-
function
|
|
2918
|
-
let
|
|
2951
|
+
function Fe({ value: e, onChange: n, options: r = [], placeholder: a = "Select...", name: o, ariaLabel: c, id: l, disabled: u, className: d }) {
|
|
2952
|
+
let f = s(null);
|
|
2919
2953
|
return i(() => {
|
|
2920
|
-
|
|
2954
|
+
f.current && (f.current.options = r.map((e) => ({
|
|
2921
2955
|
value: e.value,
|
|
2922
2956
|
label: e.label ?? e.text ?? ""
|
|
2923
2957
|
})));
|
|
2924
2958
|
}, [r]), i(() => {
|
|
2925
|
-
let t =
|
|
2959
|
+
let t = f.current;
|
|
2926
2960
|
t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
|
|
2927
2961
|
}, [e]), i(() => {
|
|
2928
|
-
let e =
|
|
2962
|
+
let e = f.current;
|
|
2929
2963
|
if (!e) return;
|
|
2930
2964
|
let t = () => n?.(e.value);
|
|
2931
2965
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
2932
2966
|
}, [n]), /* @__PURE__ */ t("wui-select", {
|
|
2933
|
-
ref:
|
|
2967
|
+
ref: f,
|
|
2934
2968
|
name: o,
|
|
2935
2969
|
compact: "",
|
|
2936
2970
|
id: l,
|
|
2937
2971
|
placeholder: a,
|
|
2938
2972
|
"aria-label": c,
|
|
2939
|
-
disabled: u ? "" : void 0
|
|
2973
|
+
disabled: u ? "" : void 0,
|
|
2974
|
+
className: d
|
|
2940
2975
|
});
|
|
2941
2976
|
}
|
|
2942
2977
|
//#endregion
|
|
2943
2978
|
//#region src/components/AppTablePagination.jsx
|
|
2944
|
-
var
|
|
2979
|
+
var Ie = [
|
|
2945
2980
|
5,
|
|
2946
2981
|
10,
|
|
2947
2982
|
25,
|
|
2948
2983
|
50
|
|
2949
2984
|
];
|
|
2950
|
-
function
|
|
2985
|
+
function Le({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = Ie }) {
|
|
2951
2986
|
return /* @__PURE__ */ n("div", {
|
|
2952
2987
|
className: "table-pagination",
|
|
2953
2988
|
children: [
|
|
2954
2989
|
/* @__PURE__ */ n("span", {
|
|
2955
2990
|
className: "tpg-rows",
|
|
2956
|
-
children: ["Rows per page:", /* @__PURE__ */ t(
|
|
2991
|
+
children: ["Rows per page:", /* @__PURE__ */ t(Fe, {
|
|
2957
2992
|
compact: !0,
|
|
2958
2993
|
value: i,
|
|
2959
2994
|
onChange: (e) => l(Number(e)),
|
|
@@ -2979,8 +3014,8 @@ function Ne({ page: e, pageCount: r, pageSize: i, total: a, firstRow: o, lastRow
|
|
|
2979
3014
|
children: [/* @__PURE__ */ t("button", {
|
|
2980
3015
|
type: "button",
|
|
2981
3016
|
className: "tpg-arrow",
|
|
2982
|
-
onClick: () => c(Math.max(
|
|
2983
|
-
disabled: e
|
|
3017
|
+
onClick: () => c(Math.max(1, e - 1)),
|
|
3018
|
+
disabled: e <= 1,
|
|
2984
3019
|
"aria-label": "Previous page",
|
|
2985
3020
|
children: /* @__PURE__ */ t(x, {
|
|
2986
3021
|
name: "arrow-left",
|
|
@@ -2989,8 +3024,8 @@ function Ne({ page: e, pageCount: r, pageSize: i, total: a, firstRow: o, lastRow
|
|
|
2989
3024
|
}), /* @__PURE__ */ t("button", {
|
|
2990
3025
|
type: "button",
|
|
2991
3026
|
className: "tpg-arrow",
|
|
2992
|
-
onClick: () => c(Math.min(r
|
|
2993
|
-
disabled: e >= r
|
|
3027
|
+
onClick: () => c(Math.min(r, e + 1)),
|
|
3028
|
+
disabled: e >= r,
|
|
2994
3029
|
"aria-label": "Next page",
|
|
2995
3030
|
children: /* @__PURE__ */ t(x, {
|
|
2996
3031
|
name: "arrow-right",
|
|
@@ -3003,13 +3038,13 @@ function Ne({ page: e, pageCount: r, pageSize: i, total: a, firstRow: o, lastRow
|
|
|
3003
3038
|
}
|
|
3004
3039
|
//#endregion
|
|
3005
3040
|
//#region src/components/AppDataTable.jsx
|
|
3006
|
-
function
|
|
3041
|
+
function Re(e) {
|
|
3007
3042
|
return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
3008
3043
|
}
|
|
3009
|
-
function
|
|
3044
|
+
function ze(e) {
|
|
3010
3045
|
return e == null || e === "" ? "—" : e;
|
|
3011
3046
|
}
|
|
3012
|
-
function
|
|
3047
|
+
function Be({ 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: S }) {
|
|
3013
3048
|
let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t) => e + +!!y?.has(a(t)), 0) : 0, T = v && i && i.length > 0 && w === i.length, E = w > 0 && !T, D = (e) => {
|
|
3014
3049
|
e && (e.indeterminate = E);
|
|
3015
3050
|
}, O = d !== void 0 && f > 0 ? d : u;
|
|
@@ -3033,7 +3068,7 @@ function Ie({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3033
3068
|
r.map((e) => {
|
|
3034
3069
|
let r = !!(e.sortable && s), i = o && o.key === e.key;
|
|
3035
3070
|
return /* @__PURE__ */ n("th", {
|
|
3036
|
-
className: (r ? "sortable " : "") +
|
|
3071
|
+
className: (r ? "sortable " : "") + Re(e.align),
|
|
3037
3072
|
style: e.width ? { width: e.width } : void 0,
|
|
3038
3073
|
tabIndex: r ? 0 : void 0,
|
|
3039
3074
|
"aria-sort": i ? o.dir === "asc" ? "ascending" : "descending" : r ? "none" : void 0,
|
|
@@ -3060,7 +3095,7 @@ function Ie({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3060
3095
|
children: "Actions"
|
|
3061
3096
|
})
|
|
3062
3097
|
}))
|
|
3063
|
-
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(
|
|
3098
|
+
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(Q, {
|
|
3064
3099
|
rows: l,
|
|
3065
3100
|
cols: C
|
|
3066
3101
|
}) : i?.length ? i.map((e) => {
|
|
@@ -3079,8 +3114,8 @@ function Ie({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3079
3114
|
})
|
|
3080
3115
|
}),
|
|
3081
3116
|
r.map((n) => /* @__PURE__ */ t("td", {
|
|
3082
|
-
className:
|
|
3083
|
-
children: n.render ? n.render(e) :
|
|
3117
|
+
className: Re(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
|
|
3118
|
+
children: n.render ? n.render(e) : ze(e[n.key])
|
|
3084
3119
|
}, n.key)),
|
|
3085
3120
|
p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
|
|
3086
3121
|
className: "u-row-actions",
|
|
@@ -3094,9 +3129,9 @@ function Ie({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3094
3129
|
children: O
|
|
3095
3130
|
}) }) })]
|
|
3096
3131
|
})
|
|
3097
|
-
}), h && !c && h.total > 0 && /* @__PURE__ */ t(
|
|
3132
|
+
}), h && !c && h.total > 0 && /* @__PURE__ */ t(Le, {
|
|
3098
3133
|
page: h.page,
|
|
3099
|
-
|
|
3134
|
+
totalPages: h.totalPages,
|
|
3100
3135
|
pageSize: h.pageSize,
|
|
3101
3136
|
total: h.total,
|
|
3102
3137
|
firstRow: h.firstRow,
|
|
@@ -3107,7 +3142,7 @@ function Ie({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3107
3142
|
}
|
|
3108
3143
|
//#endregion
|
|
3109
3144
|
//#region src/components/AppDatePicker.jsx
|
|
3110
|
-
function
|
|
3145
|
+
function Ve({ value: e, onChange: r, label: o, required: c = !1, hint: l, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, id: g, ariaLabel: _, className: v = "" }) {
|
|
3111
3146
|
let y = s(null), b = a(), x = g || d || b;
|
|
3112
3147
|
i(() => {
|
|
3113
3148
|
let t = y.current;
|
|
@@ -3155,7 +3190,7 @@ function Le({ value: e, onChange: r, label: o, required: c = !1, hint: l, error:
|
|
|
3155
3190
|
}
|
|
3156
3191
|
//#endregion
|
|
3157
3192
|
//#region src/components/AppDropdown.jsx
|
|
3158
|
-
var
|
|
3193
|
+
var He = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
|
|
3159
3194
|
return /* @__PURE__ */ t("button", {
|
|
3160
3195
|
ref: l,
|
|
3161
3196
|
type: "button",
|
|
@@ -3169,11 +3204,11 @@ var Re = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
|
|
|
3169
3204
|
})
|
|
3170
3205
|
});
|
|
3171
3206
|
});
|
|
3172
|
-
function
|
|
3207
|
+
function Ue({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u }) {
|
|
3173
3208
|
return /* @__PURE__ */ n(g, {
|
|
3174
3209
|
align: s,
|
|
3175
3210
|
children: [/* @__PURE__ */ t(g.Toggle, {
|
|
3176
|
-
as:
|
|
3211
|
+
as: He,
|
|
3177
3212
|
icon: e,
|
|
3178
3213
|
iconSize: r,
|
|
3179
3214
|
btnClassName: i,
|
|
@@ -3209,7 +3244,7 @@ function ze({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3209
3244
|
}
|
|
3210
3245
|
//#endregion
|
|
3211
3246
|
//#region src/components/AppEmptyState.jsx
|
|
3212
|
-
function
|
|
3247
|
+
function We({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l }) {
|
|
3213
3248
|
return /* @__PURE__ */ n("div", {
|
|
3214
3249
|
className: [
|
|
3215
3250
|
"empty-state",
|
|
@@ -3218,13 +3253,13 @@ function Be({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
3218
3253
|
].filter(Boolean).join(" "),
|
|
3219
3254
|
style: l,
|
|
3220
3255
|
children: [
|
|
3221
|
-
/* @__PURE__ */ t("div", {
|
|
3256
|
+
e ? /* @__PURE__ */ t("div", {
|
|
3222
3257
|
className: "empty-state-icon",
|
|
3223
3258
|
children: /* @__PURE__ */ t(x, {
|
|
3224
3259
|
name: e,
|
|
3225
3260
|
size: r
|
|
3226
3261
|
})
|
|
3227
|
-
}),
|
|
3262
|
+
}) : null,
|
|
3228
3263
|
a != null && /* @__PURE__ */ t("div", {
|
|
3229
3264
|
className: "empty-state-title",
|
|
3230
3265
|
children: a
|
|
@@ -3242,7 +3277,7 @@ function Be({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
3242
3277
|
}
|
|
3243
3278
|
//#endregion
|
|
3244
3279
|
//#region src/components/AppFileAttachment.jsx
|
|
3245
|
-
function
|
|
3280
|
+
function Ge({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u = V, maxSizeMb: d = 5, optional: f = !1, error: p, id: m }) {
|
|
3246
3281
|
let h = a(), g = m || s || h, [_, v] = c(null), [y, b] = c("");
|
|
3247
3282
|
i(() => {
|
|
3248
3283
|
if (o instanceof File) {
|
|
@@ -3254,7 +3289,7 @@ function Ve({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u
|
|
|
3254
3289
|
function S(e) {
|
|
3255
3290
|
let t = e.target.files?.[0];
|
|
3256
3291
|
if (e.target.value = "", !t) return;
|
|
3257
|
-
let n =
|
|
3292
|
+
let n = U(t, {
|
|
3258
3293
|
accept: u,
|
|
3259
3294
|
maxSizeMb: d
|
|
3260
3295
|
});
|
|
@@ -3353,22 +3388,22 @@ function Ve({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u
|
|
|
3353
3388
|
}
|
|
3354
3389
|
//#endregion
|
|
3355
3390
|
//#region src/components/toast.js
|
|
3356
|
-
var
|
|
3391
|
+
var Ke = /* @__PURE__ */ new Set([
|
|
3357
3392
|
"success",
|
|
3358
3393
|
"info",
|
|
3359
3394
|
"warning",
|
|
3360
3395
|
"error"
|
|
3361
3396
|
]);
|
|
3362
3397
|
function $(e, t = "success") {
|
|
3363
|
-
let n =
|
|
3398
|
+
let n = Ke.has(t) ? t : "success";
|
|
3364
3399
|
_[n](e, { toastId: `${n}:${e}` });
|
|
3365
3400
|
}
|
|
3366
|
-
function
|
|
3401
|
+
function qe(e) {
|
|
3367
3402
|
_.error(e, { toastId: `error:${e}` });
|
|
3368
3403
|
}
|
|
3369
3404
|
//#endregion
|
|
3370
3405
|
//#region src/components/AppFilePicker.jsx
|
|
3371
|
-
function
|
|
3406
|
+
function Je({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p }) {
|
|
3372
3407
|
let [m, h] = c(null), [g, _] = c(!1), v = s(null), y = a(), b = o || y;
|
|
3373
3408
|
i(() => {
|
|
3374
3409
|
if (r instanceof File) {
|
|
@@ -3378,7 +3413,7 @@ function We({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3378
3413
|
h(null);
|
|
3379
3414
|
}, [r]);
|
|
3380
3415
|
let S = r?.url || m, C = (e) => {
|
|
3381
|
-
let t =
|
|
3416
|
+
let t = U(e, {
|
|
3382
3417
|
accept: u,
|
|
3383
3418
|
maxSizeMb: d
|
|
3384
3419
|
});
|
|
@@ -3408,7 +3443,7 @@ function We({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3408
3443
|
/* @__PURE__ */ n("label", {
|
|
3409
3444
|
className: "label",
|
|
3410
3445
|
htmlFor: b,
|
|
3411
|
-
children: [e, f && /* @__PURE__ */ t(
|
|
3446
|
+
children: [e, f && /* @__PURE__ */ t(G, {})]
|
|
3412
3447
|
}),
|
|
3413
3448
|
S ? /* @__PURE__ */ n("div", {
|
|
3414
3449
|
className: `file-preview${p ? " error" : ""}`,
|
|
@@ -3493,7 +3528,7 @@ function We({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3493
3528
|
}
|
|
3494
3529
|
//#endregion
|
|
3495
3530
|
//#region src/components/AppInfoList.jsx
|
|
3496
|
-
function
|
|
3531
|
+
function Ye({ items: r = [], className: i = "" }) {
|
|
3497
3532
|
return /* @__PURE__ */ t("div", {
|
|
3498
3533
|
className: `info-list${i ? ` ${i}` : ""}`,
|
|
3499
3534
|
children: r.map((r, i) => {
|
|
@@ -3526,7 +3561,7 @@ function Ge({ items: r = [], className: i = "" }) {
|
|
|
3526
3561
|
}
|
|
3527
3562
|
//#endregion
|
|
3528
3563
|
//#region src/components/AppKpiTile.jsx
|
|
3529
|
-
function
|
|
3564
|
+
function Xe({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "" }) {
|
|
3530
3565
|
let l = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, u = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
|
|
3531
3566
|
return /* @__PURE__ */ n("div", {
|
|
3532
3567
|
className: l,
|
|
@@ -3558,7 +3593,7 @@ function Ke({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
|
|
|
3558
3593
|
}
|
|
3559
3594
|
//#endregion
|
|
3560
3595
|
//#region src/components/AppLogoPicker.jsx
|
|
3561
|
-
function
|
|
3596
|
+
function Ze({ value: r, fallback: i, name: a, onPick: o, loading: c = !1, accept: l = "image/png,image/jpeg", maxSizeMb: u = 5, overlayIcon: d = "image", overlayLabel: f = "Update photo", ariaLabel: p = "Upload photo" }) {
|
|
3562
3597
|
let m = s(null);
|
|
3563
3598
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
|
|
3564
3599
|
type: "button",
|
|
@@ -3603,7 +3638,7 @@ function qe({ value: r, fallback: i, name: a, onPick: o, loading: c = !1, accept
|
|
|
3603
3638
|
onChange: (e) => {
|
|
3604
3639
|
let t = e.target.files?.[0];
|
|
3605
3640
|
if (e.target.value = "", !t) return;
|
|
3606
|
-
let n =
|
|
3641
|
+
let n = U(t, {
|
|
3607
3642
|
accept: l,
|
|
3608
3643
|
maxSizeMb: u
|
|
3609
3644
|
});
|
|
@@ -3618,7 +3653,7 @@ function qe({ value: r, fallback: i, name: a, onPick: o, loading: c = !1, accept
|
|
|
3618
3653
|
}
|
|
3619
3654
|
//#endregion
|
|
3620
3655
|
//#region src/components/AppMultiSelect.jsx
|
|
3621
|
-
function
|
|
3656
|
+
function Qe({ values: e, onChange: r, options: a, placeholder: o = "Select…", searchPlaceholder: c = "Search…", searchable: l = !0, disabled: u = !1, name: d, label: f, error: p, hint: m, required: h = !1, fieldClassName: g = "" }) {
|
|
3622
3657
|
let _ = s(null);
|
|
3623
3658
|
return i(() => {
|
|
3624
3659
|
let e = _.current;
|
|
@@ -3639,9 +3674,10 @@ function Je({ values: e, onChange: r, options: a, placeholder: o = "Select…",
|
|
|
3639
3674
|
f && /* @__PURE__ */ n("label", {
|
|
3640
3675
|
className: "label",
|
|
3641
3676
|
htmlFor: d,
|
|
3642
|
-
children: [f, h && /* @__PURE__ */ t(
|
|
3677
|
+
children: [f, h && /* @__PURE__ */ t(G, {})]
|
|
3643
3678
|
}),
|
|
3644
3679
|
/* @__PURE__ */ t("wui-multiselect", {
|
|
3680
|
+
"aria-label": typeof f == "string" ? f : void 0,
|
|
3645
3681
|
id: d,
|
|
3646
3682
|
ref: _,
|
|
3647
3683
|
name: d,
|
|
@@ -3662,7 +3698,7 @@ function Je({ values: e, onChange: r, options: a, placeholder: o = "Select…",
|
|
|
3662
3698
|
}
|
|
3663
3699
|
//#endregion
|
|
3664
3700
|
//#region src/components/AppPageHeader.jsx
|
|
3665
|
-
function
|
|
3701
|
+
function $e({ title: e, subtitle: r, actions: i, className: a = "" }) {
|
|
3666
3702
|
return /* @__PURE__ */ n("div", {
|
|
3667
3703
|
className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
|
|
3668
3704
|
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
|
|
@@ -3679,7 +3715,7 @@ function Ye({ title: e, subtitle: r, actions: i, className: a = "" }) {
|
|
|
3679
3715
|
}
|
|
3680
3716
|
//#endregion
|
|
3681
3717
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
3682
|
-
function
|
|
3718
|
+
function et({ value: e, onChange: r, country: a, disabled: o = !1, name: c, label: l = "Phone number", placeholder: u = "Enter phone number", required: d = !1, error: f, fieldClassName: p = "" }) {
|
|
3683
3719
|
let m = s(null);
|
|
3684
3720
|
return i(() => {
|
|
3685
3721
|
let t = m.current;
|
|
@@ -3695,7 +3731,7 @@ function Xe({ value: e, onChange: r, country: a, disabled: o = !1, name: c, labe
|
|
|
3695
3731
|
l && /* @__PURE__ */ n("label", {
|
|
3696
3732
|
className: "label",
|
|
3697
3733
|
htmlFor: c,
|
|
3698
|
-
children: [l, d && /* @__PURE__ */ t(
|
|
3734
|
+
children: [l, d && /* @__PURE__ */ t(G, {})]
|
|
3699
3735
|
}),
|
|
3700
3736
|
/* @__PURE__ */ t("wui-phone", {
|
|
3701
3737
|
ref: m,
|
|
@@ -3713,7 +3749,7 @@ function Xe({ value: e, onChange: r, country: a, disabled: o = !1, name: c, labe
|
|
|
3713
3749
|
}
|
|
3714
3750
|
//#endregion
|
|
3715
3751
|
//#region src/components/AppPricingCard.jsx
|
|
3716
|
-
function
|
|
3752
|
+
function tt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "" }) {
|
|
3717
3753
|
return /* @__PURE__ */ n("div", {
|
|
3718
3754
|
className: [
|
|
3719
3755
|
"plan-card",
|
|
@@ -3766,7 +3802,7 @@ function Ze({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
|
|
|
3766
3802
|
}
|
|
3767
3803
|
//#endregion
|
|
3768
3804
|
//#region src/components/AppRadio.jsx
|
|
3769
|
-
var
|
|
3805
|
+
var nt = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
3770
3806
|
let l = a(), u = r || i || l;
|
|
3771
3807
|
return /* @__PURE__ */ n("div", {
|
|
3772
3808
|
className: `form-check${o ? ` ${o}` : ""}`,
|
|
@@ -3786,7 +3822,7 @@ var Qe = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
|
3786
3822
|
});
|
|
3787
3823
|
//#endregion
|
|
3788
3824
|
//#region src/components/AppRepeater.jsx
|
|
3789
|
-
function
|
|
3825
|
+
function rt({ 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 = "" }) {
|
|
3790
3826
|
let p = typeof u == "number" && e.length >= u, m = !!a && e.length > l;
|
|
3791
3827
|
return /* @__PURE__ */ n("div", {
|
|
3792
3828
|
className: `repeater${f ? ` ${f}` : ""}`,
|
|
@@ -3815,7 +3851,7 @@ function $e({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
3815
3851
|
})
|
|
3816
3852
|
]
|
|
3817
3853
|
}, e.id ?? i)),
|
|
3818
|
-
/* @__PURE__ */ t(
|
|
3854
|
+
/* @__PURE__ */ t(q, {
|
|
3819
3855
|
variant: "secondary",
|
|
3820
3856
|
size: "sm",
|
|
3821
3857
|
leftIcon: /* @__PURE__ */ t(x, {
|
|
@@ -3833,7 +3869,7 @@ function $e({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
3833
3869
|
}
|
|
3834
3870
|
//#endregion
|
|
3835
3871
|
//#region src/components/AppResourceCard.jsx
|
|
3836
|
-
function
|
|
3872
|
+
function it({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "" }) {
|
|
3837
3873
|
let u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
3838
3874
|
className: "res-card-icon",
|
|
3839
3875
|
children: /* @__PURE__ */ t(x, {
|
|
@@ -3864,7 +3900,7 @@ function et({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
|
|
|
3864
3900
|
}
|
|
3865
3901
|
//#endregion
|
|
3866
3902
|
//#region src/components/AppSearch.jsx
|
|
3867
|
-
function
|
|
3903
|
+
function at({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize: o = 18, className: s = "", ...c }) {
|
|
3868
3904
|
return /* @__PURE__ */ n("div", {
|
|
3869
3905
|
className: [
|
|
3870
3906
|
"search-wrap",
|
|
@@ -3901,7 +3937,7 @@ function tt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
3901
3937
|
}
|
|
3902
3938
|
//#endregion
|
|
3903
3939
|
//#region src/components/AppSegmented.jsx
|
|
3904
|
-
function
|
|
3940
|
+
function ot({ options: e = [], value: r, onChange: i, label: o, name: s, size: c = "md", className: l = "" }) {
|
|
3905
3941
|
let u = a(), d = s || u;
|
|
3906
3942
|
return /* @__PURE__ */ t("div", {
|
|
3907
3943
|
className: `segmented${c === "sm" ? " segmented-sm" : ""}${l ? ` ${l}` : ""}`,
|
|
@@ -3929,13 +3965,13 @@ function nt({ options: e = [], value: r, onChange: i, label: o, name: s, size: c
|
|
|
3929
3965
|
}
|
|
3930
3966
|
//#endregion
|
|
3931
3967
|
//#region src/components/AppSelect.jsx
|
|
3932
|
-
var
|
|
3933
|
-
function
|
|
3968
|
+
var st = (e) => e == null ? "" : e.label ?? e.text ?? "";
|
|
3969
|
+
function ct({ value: e, onChange: r, options: a = [], placeholder: o = "Select...", searchPlaceholder: c = "Search...", searchable: l = !1, disabled: u, label: d, required: f = !1, error: p, hint: m, help: h, helpLabel: g = "More information", id: _, name: v, fieldClassName: y = "" }) {
|
|
3934
3970
|
let b = s(null);
|
|
3935
3971
|
i(() => {
|
|
3936
3972
|
b.current && (b.current.options = a.map((e) => ({
|
|
3937
3973
|
value: e.value,
|
|
3938
|
-
label:
|
|
3974
|
+
label: st(e)
|
|
3939
3975
|
})));
|
|
3940
3976
|
}, [a]), i(() => {
|
|
3941
3977
|
let t = b.current;
|
|
@@ -3947,6 +3983,7 @@ function it({ value: e, onChange: r, options: a = [], placeholder: o = "Select..
|
|
|
3947
3983
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
3948
3984
|
}, [r]);
|
|
3949
3985
|
let x = /* @__PURE__ */ t("wui-select", {
|
|
3986
|
+
"aria-label": typeof d == "string" ? d : void 0,
|
|
3950
3987
|
ref: b,
|
|
3951
3988
|
id: _ || v,
|
|
3952
3989
|
name: v,
|
|
@@ -3965,11 +4002,11 @@ function it({ value: e, onChange: r, options: a = [], placeholder: o = "Select..
|
|
|
3965
4002
|
htmlFor: S,
|
|
3966
4003
|
children: [
|
|
3967
4004
|
d,
|
|
3968
|
-
h && /* @__PURE__ */ t(
|
|
4005
|
+
h && /* @__PURE__ */ t(J, {
|
|
3969
4006
|
label: g,
|
|
3970
4007
|
children: h
|
|
3971
4008
|
}),
|
|
3972
|
-
f && /* @__PURE__ */ t(
|
|
4009
|
+
f && /* @__PURE__ */ t(G, {})
|
|
3973
4010
|
]
|
|
3974
4011
|
}),
|
|
3975
4012
|
x,
|
|
@@ -3985,7 +4022,7 @@ function it({ value: e, onChange: r, options: a = [], placeholder: o = "Select..
|
|
|
3985
4022
|
}
|
|
3986
4023
|
//#endregion
|
|
3987
4024
|
//#region src/components/AppShell.jsx
|
|
3988
|
-
function
|
|
4025
|
+
function lt({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbarEnd: s, footer: l, children: u, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "" }) {
|
|
3989
4026
|
let [_, v] = c(!1), [y, b] = c(!1), [S, C] = c(!1), w = d ?? _;
|
|
3990
4027
|
return i(() => {
|
|
3991
4028
|
let e = () => C(window.scrollY > 4);
|
|
@@ -4020,7 +4057,7 @@ function at({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4020
4057
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
4021
4058
|
className: "app-nav-group-label",
|
|
4022
4059
|
children: e.label
|
|
4023
|
-
}), e.items.map((e) => /* @__PURE__ */ t(
|
|
4060
|
+
}), e.items.map((e) => /* @__PURE__ */ t(ut, {
|
|
4024
4061
|
item: e,
|
|
4025
4062
|
linkComponent: h,
|
|
4026
4063
|
onNavigate: () => b(!1)
|
|
@@ -4090,7 +4127,7 @@ function at({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4090
4127
|
]
|
|
4091
4128
|
});
|
|
4092
4129
|
}
|
|
4093
|
-
function
|
|
4130
|
+
function ut({ item: r, linkComponent: i, onNavigate: a }) {
|
|
4094
4131
|
let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
|
|
4095
4132
|
r.icon && /* @__PURE__ */ t("span", {
|
|
4096
4133
|
className: "app-nav-icon",
|
|
@@ -4124,7 +4161,7 @@ function ot({ item: r, linkComponent: i, onNavigate: a }) {
|
|
|
4124
4161
|
}
|
|
4125
4162
|
//#endregion
|
|
4126
4163
|
//#region src/components/AppSidebarMenu.jsx
|
|
4127
|
-
var
|
|
4164
|
+
var dt = {
|
|
4128
4165
|
left: "start",
|
|
4129
4166
|
right: "end",
|
|
4130
4167
|
start: "start",
|
|
@@ -4132,11 +4169,11 @@ var st = {
|
|
|
4132
4169
|
top: "top",
|
|
4133
4170
|
bottom: "bottom"
|
|
4134
4171
|
};
|
|
4135
|
-
function
|
|
4172
|
+
function ft({ 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: y }) {
|
|
4136
4173
|
return /* @__PURE__ */ n(v, {
|
|
4137
4174
|
show: e,
|
|
4138
4175
|
onHide: r,
|
|
4139
|
-
placement:
|
|
4176
|
+
placement: dt[i] || "end",
|
|
4140
4177
|
backdrop: d,
|
|
4141
4178
|
scroll: f,
|
|
4142
4179
|
keyboard: p,
|
|
@@ -4156,7 +4193,7 @@ function ct({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
4156
4193
|
size: 18
|
|
4157
4194
|
})
|
|
4158
4195
|
}), a]
|
|
4159
|
-
}), m && /* @__PURE__ */ t(
|
|
4196
|
+
}), m && /* @__PURE__ */ t(q, {
|
|
4160
4197
|
variant: "ghost",
|
|
4161
4198
|
className: "btn-icon",
|
|
4162
4199
|
onClick: r,
|
|
@@ -4180,7 +4217,7 @@ function ct({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
4180
4217
|
}
|
|
4181
4218
|
//#endregion
|
|
4182
4219
|
//#region src/components/AppSpinner.jsx
|
|
4183
|
-
function
|
|
4220
|
+
function pt({ size: e = "md", label: n = "Loading", className: r = "" }) {
|
|
4184
4221
|
return /* @__PURE__ */ t("span", {
|
|
4185
4222
|
className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
|
|
4186
4223
|
role: "status",
|
|
@@ -4189,7 +4226,7 @@ function lt({ size: e = "md", label: n = "Loading", className: r = "" }) {
|
|
|
4189
4226
|
}
|
|
4190
4227
|
//#endregion
|
|
4191
4228
|
//#region src/components/AppSplash.jsx
|
|
4192
|
-
function
|
|
4229
|
+
function mt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "" }) {
|
|
4193
4230
|
return /* @__PURE__ */ t("div", {
|
|
4194
4231
|
className: `splash${o ? ` ${o}` : ""}`,
|
|
4195
4232
|
role: "status",
|
|
@@ -4216,7 +4253,7 @@ function ut({ logo: e, initials: r, text: i, label: a = "Loading", className: o
|
|
|
4216
4253
|
}
|
|
4217
4254
|
//#endregion
|
|
4218
4255
|
//#region src/components/AppStatusBadge.jsx
|
|
4219
|
-
function
|
|
4256
|
+
function ht({ label: e, tone: n = "neutral", className: r = "" }) {
|
|
4220
4257
|
return e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
|
|
4221
4258
|
className: `status-label ${n}${r ? ` ${r}` : ""}`,
|
|
4222
4259
|
children: e
|
|
@@ -4224,7 +4261,7 @@ function dt({ label: e, tone: n = "neutral", className: r = "" }) {
|
|
|
4224
4261
|
}
|
|
4225
4262
|
//#endregion
|
|
4226
4263
|
//#region src/components/AppStepper.jsx
|
|
4227
|
-
function
|
|
4264
|
+
function gt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "" }) {
|
|
4228
4265
|
return /* @__PURE__ */ t("nav", {
|
|
4229
4266
|
className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
|
|
4230
4267
|
"aria-label": a,
|
|
@@ -4271,7 +4308,7 @@ function ft({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
|
|
|
4271
4308
|
}
|
|
4272
4309
|
//#endregion
|
|
4273
4310
|
//#region src/components/AppSwitch.jsx
|
|
4274
|
-
var
|
|
4311
|
+
var _t = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
4275
4312
|
let l = a(), u = r || i || l;
|
|
4276
4313
|
return /* @__PURE__ */ n("div", {
|
|
4277
4314
|
className: `form-check form-switch${o ? ` ${o}` : ""}`,
|
|
@@ -4291,7 +4328,7 @@ var pt = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
|
4291
4328
|
});
|
|
4292
4329
|
//#endregion
|
|
4293
4330
|
//#region src/components/AppTableEmptyState.jsx
|
|
4294
|
-
function
|
|
4331
|
+
function vt({ icon: e, title: r, text: i, action: a }) {
|
|
4295
4332
|
return /* @__PURE__ */ n("div", {
|
|
4296
4333
|
className: "tbl-empty",
|
|
4297
4334
|
children: [
|
|
@@ -4319,7 +4356,7 @@ function mt({ icon: e, title: r, text: i, action: a }) {
|
|
|
4319
4356
|
}
|
|
4320
4357
|
//#endregion
|
|
4321
4358
|
//#region src/components/AppTabs.jsx
|
|
4322
|
-
function
|
|
4359
|
+
function yt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: c = "" }) {
|
|
4323
4360
|
let l = s(null);
|
|
4324
4361
|
function u(t) {
|
|
4325
4362
|
let n = e.findIndex((e) => e.key === r);
|
|
@@ -4339,11 +4376,8 @@ function ht({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4339
4376
|
e != null && i(e);
|
|
4340
4377
|
},
|
|
4341
4378
|
onKeyDown: u,
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
a === "pills" ? "app-tabs-pills" : "",
|
|
4345
|
-
c
|
|
4346
|
-
].filter(Boolean).join(" "),
|
|
4379
|
+
bsPrefix: "app-tabs",
|
|
4380
|
+
className: [a === "pills" ? "app-tabs-pills" : "", c].filter(Boolean).join(" "),
|
|
4347
4381
|
"aria-label": o,
|
|
4348
4382
|
children: e.map((e) => /* @__PURE__ */ n(y.Link, {
|
|
4349
4383
|
as: "button",
|
|
@@ -4365,7 +4399,7 @@ function ht({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4365
4399
|
}
|
|
4366
4400
|
//#endregion
|
|
4367
4401
|
//#region src/components/AppTextarea.jsx
|
|
4368
|
-
var
|
|
4402
|
+
var bt = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", id: c, name: l, rows: u = 4, className: d = "", fieldClassName: f = "", ...m }, h) {
|
|
4369
4403
|
let g = c || l, _ = [
|
|
4370
4404
|
"textarea",
|
|
4371
4405
|
i ? "error" : "",
|
|
@@ -4379,11 +4413,11 @@ var gt = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
4379
4413
|
htmlFor: g,
|
|
4380
4414
|
children: [
|
|
4381
4415
|
e,
|
|
4382
|
-
o && /* @__PURE__ */ t(
|
|
4416
|
+
o && /* @__PURE__ */ t(J, {
|
|
4383
4417
|
label: s,
|
|
4384
4418
|
children: o
|
|
4385
4419
|
}),
|
|
4386
|
-
r && /* @__PURE__ */ t(
|
|
4420
|
+
r && /* @__PURE__ */ t(G, {})
|
|
4387
4421
|
]
|
|
4388
4422
|
}),
|
|
4389
4423
|
/* @__PURE__ */ t(p.Control, {
|
|
@@ -4408,7 +4442,7 @@ var gt = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
4408
4442
|
});
|
|
4409
4443
|
//#endregion
|
|
4410
4444
|
//#region src/components/AppTimeline.jsx
|
|
4411
|
-
function
|
|
4445
|
+
function xt({ items: e = [], className: r = "" }) {
|
|
4412
4446
|
return /* @__PURE__ */ t("ol", {
|
|
4413
4447
|
className: `timeline${r ? ` ${r}` : ""}`,
|
|
4414
4448
|
children: e.map((e, r) => /* @__PURE__ */ n("li", {
|
|
@@ -4446,4 +4480,4 @@ function _t({ items: e = [], className: r = "" }) {
|
|
|
4446
4480
|
});
|
|
4447
4481
|
}
|
|
4448
4482
|
//#endregion
|
|
4449
|
-
export { S as ActionIcon, C as AppAccordion, w as AppAlert,
|
|
4483
|
+
export { S as ActionIcon, C as AppAccordion, w as AppAlert, ge as AppAutocomplete, ve as AppAvatar, ye as AppBadge, q as AppButton, xe as AppCallout, Se as AppCard, Ce as AppCheckbox, we as AppChip, Te as AppChoiceCard, Ee as AppChoiceChip, De as AppColorField, Oe as AppCompareTable, je as AppConfirmDialog, Be as AppDataTable, Ve as AppDatePicker, Ue as AppDropdown, We as AppEmptyState, Ge as AppFileAttachment, Je as AppFilePicker, Ye as AppInfoList, J as AppInfoTip, Y as AppInput, Xe as AppKpiTile, Ze as AppLogoPicker, X as AppModal, Qe as AppMultiSelect, $e as AppPageHeader, et as AppPhoneNumberInput, tt as AppPricingCard, nt as AppRadio, rt as AppRepeater, it as AppResourceCard, at as AppSearch, ot as AppSegmented, ct as AppSelect, Fe as AppSelectMini, lt as AppShell, ft as AppSidebarMenu, Me as AppSkeleton, Q as AppSkeletonRows, pt as AppSpinner, mt as AppSplash, ht as AppStatusBadge, gt as AppStepper, _t as AppSwitch, vt as AppTableEmptyState, Le as AppTablePagination, yt as AppTabs, bt as AppTextarea, xt as AppTimeline, x as Icon, Ae as MODAL_ICONS, G as RequiredMark, qe as errorToast, $ as toast };
|