@webority/ui-react 0.9.9 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/AppColorField.d.ts +4 -2
- package/dist/types/components/AppDatePicker.d.ts +2 -1
- package/dist/types/components/AppDateRangePicker.d.ts +2 -1
- package/dist/types/components/AppFeedback.d.ts +61 -0
- package/dist/types/components/AppFilePicker.d.ts +6 -2
- package/dist/types/components/AppInput.d.ts +8 -0
- package/dist/types/components/AppOtpInput.d.ts +2 -1
- package/dist/types/components/AppSelect.d.ts +5 -0
- package/dist/types/components/AppSlider.d.ts +2 -1
- package/dist/types/components/AppTimePicker.d.ts +2 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/ui-react.js +977 -675
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -172,13 +172,13 @@ function L() {
|
|
|
172
172
|
I.clear();
|
|
173
173
|
}), F;
|
|
174
174
|
}
|
|
175
|
-
var
|
|
175
|
+
var R = new Set(D), ee = null, te = null, z = /* @__PURE__ */ new Set();
|
|
176
176
|
function B() {
|
|
177
|
-
return
|
|
178
|
-
|
|
179
|
-
for (let e of
|
|
180
|
-
|
|
181
|
-
}),
|
|
177
|
+
return te ||= import("./iconCatalogFull.g-BKUr0SVj.js").then((e) => {
|
|
178
|
+
ee = e.FULL_GLYPHS;
|
|
179
|
+
for (let e of z) e();
|
|
180
|
+
z.clear();
|
|
181
|
+
}), te;
|
|
182
182
|
}
|
|
183
183
|
var ne = {
|
|
184
184
|
outline: () => import("./iconCatalogFull.outline.g-AOnxJAAj.js"),
|
|
@@ -210,11 +210,11 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
210
210
|
role: "img",
|
|
211
211
|
"aria-label": r,
|
|
212
212
|
children: e
|
|
213
|
-
}) : e, h = O[e] !== void 0, g = !h &&
|
|
213
|
+
}) : e, h = O[e] !== void 0, g = !h && R.has(e), [, _] = d(0);
|
|
214
214
|
o(() => {
|
|
215
215
|
let e = () => _((e) => e + 1);
|
|
216
|
-
return l && h && !P && (I.add(e), L()), g && !
|
|
217
|
-
I.delete(e),
|
|
216
|
+
return l && h && !P && (I.add(e), L()), g && !ee && (z.add(e), B()), l && g && !re[n] && ((ae[n] ||= /* @__PURE__ */ new Set()).add(e), oe(n)), () => {
|
|
217
|
+
I.delete(e), z.delete(e), ae[n]?.delete(e);
|
|
218
218
|
};
|
|
219
219
|
}, [
|
|
220
220
|
l,
|
|
@@ -252,7 +252,7 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
252
252
|
}), /* @__PURE__ */ p("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
|
|
253
253
|
})
|
|
254
254
|
}));
|
|
255
|
-
let y = l && (P?.[n]?.[e] || re?.[n]?.[e]) || O[e] ||
|
|
255
|
+
let y = l && (P?.[n]?.[e] || re?.[n]?.[e]) || O[e] || ee?.[e];
|
|
256
256
|
return y ? f(/* @__PURE__ */ p("svg", {
|
|
257
257
|
width: t,
|
|
258
258
|
height: t,
|
|
@@ -414,23 +414,23 @@ function me({ variant: e = "info", children: t, title: n, icon: r, image: i, ima
|
|
|
414
414
|
}
|
|
415
415
|
//#endregion
|
|
416
416
|
//#region src/components/warnInvalidValue.js
|
|
417
|
-
var
|
|
417
|
+
var he = () => {
|
|
418
418
|
try {
|
|
419
419
|
return process.env.NODE_ENV !== "production";
|
|
420
420
|
} catch {
|
|
421
421
|
return !0;
|
|
422
422
|
}
|
|
423
|
-
},
|
|
424
|
-
function
|
|
425
|
-
if (!
|
|
423
|
+
}, ge = /* @__PURE__ */ new Set();
|
|
424
|
+
function U(e, t, n, r) {
|
|
425
|
+
if (!he() || n == null) return;
|
|
426
426
|
let i = r instanceof Set ? r : new Set(r);
|
|
427
427
|
if (i.has(n)) return;
|
|
428
428
|
let a = `${e}.${t}.${String(n)}`;
|
|
429
|
-
|
|
429
|
+
ge.has(a) || (ge.add(a), console.warn(`[@webority/ui-react] <${e}> received ${t}="${String(n)}", which is not one of ${[...i].map((e) => `"${e}"`).join(" | ")}. The component fell back to its default, so this renders something other than what the call site asks for — check the value against the component catalogue at https://ui-react.webority.dev.`));
|
|
430
430
|
}
|
|
431
431
|
//#endregion
|
|
432
432
|
//#region src/components/AppButton.jsx
|
|
433
|
-
var
|
|
433
|
+
var _e = {
|
|
434
434
|
primary: "primary",
|
|
435
435
|
secondary: "secondary",
|
|
436
436
|
outline: "outline-primary",
|
|
@@ -443,28 +443,28 @@ var ge = {
|
|
|
443
443
|
warning: "warning",
|
|
444
444
|
subtle: "subtle",
|
|
445
445
|
"outline-light": "outline-light"
|
|
446
|
-
},
|
|
446
|
+
}, ve = {
|
|
447
447
|
sm: 14,
|
|
448
448
|
md: 16,
|
|
449
449
|
lg: 20
|
|
450
450
|
};
|
|
451
|
-
function
|
|
451
|
+
function ye(e, t, n) {
|
|
452
452
|
if (!e) return null;
|
|
453
453
|
let r = t === "left" ? "me-2" : "ms-2";
|
|
454
454
|
return typeof e == "string" ? /* @__PURE__ */ p(V, {
|
|
455
455
|
name: e,
|
|
456
|
-
size:
|
|
456
|
+
size: ve[n] ?? ve.md,
|
|
457
457
|
className: r
|
|
458
458
|
}) : /* @__PURE__ */ p("span", {
|
|
459
459
|
className: `d-inline-flex ${r}`,
|
|
460
460
|
children: e
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
if (N("AppButton", f),
|
|
463
|
+
function W({ children: e, variant: t = "primary", size: n = "md", type: r = "button", loading: i = !1, disabled: a = !1, block: o = !1, leftIcon: s = null, rightIcon: c = null, href: l, static: u = !1, className: d = "", ...f }) {
|
|
464
|
+
if (N("AppButton", f), U("AppButton", "variant", t, Object.keys(_e)), U("AppButton", "size", n, Object.keys(ve)), u) return /* @__PURE__ */ m("span", {
|
|
465
465
|
className: [
|
|
466
466
|
"btn",
|
|
467
|
-
`btn-${
|
|
467
|
+
`btn-${_e[t] ?? "primary"}`,
|
|
468
468
|
n === "sm" ? "btn-sm" : n === "lg" ? "btn-lg" : "",
|
|
469
469
|
o ? "w-100" : "",
|
|
470
470
|
"btn-static",
|
|
@@ -472,9 +472,9 @@ function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
472
472
|
].filter(Boolean).join(" "),
|
|
473
473
|
...f,
|
|
474
474
|
children: [
|
|
475
|
-
|
|
475
|
+
ye(s, "left", n),
|
|
476
476
|
e,
|
|
477
|
-
|
|
477
|
+
ye(c, "right", n)
|
|
478
478
|
]
|
|
479
479
|
});
|
|
480
480
|
let h = [
|
|
@@ -485,7 +485,7 @@ function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
485
485
|
return /* @__PURE__ */ m(v, {
|
|
486
486
|
type: (f.as === void 0 || f.as === "button") && l === void 0 ? r : void 0,
|
|
487
487
|
href: l,
|
|
488
|
-
variant:
|
|
488
|
+
variant: _e[t] ?? "primary",
|
|
489
489
|
size: n === "md" ? void 0 : n,
|
|
490
490
|
disabled: a || i,
|
|
491
491
|
"aria-busy": i || void 0,
|
|
@@ -496,9 +496,9 @@ function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
496
496
|
className: "spinner-border spinner-border-sm me-2",
|
|
497
497
|
"aria-hidden": "true"
|
|
498
498
|
}),
|
|
499
|
-
!i &&
|
|
499
|
+
!i && ye(s, "left", n),
|
|
500
500
|
e,
|
|
501
|
-
!i &&
|
|
501
|
+
!i && ye(c, "right", n)
|
|
502
502
|
]
|
|
503
503
|
});
|
|
504
504
|
}
|
|
@@ -572,7 +572,7 @@ function Se({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
572
572
|
icon: "alert-circle",
|
|
573
573
|
title: "Something went wrong",
|
|
574
574
|
text: t,
|
|
575
|
-
action: i ? /* @__PURE__ */ p(
|
|
575
|
+
action: i ? /* @__PURE__ */ p(W, {
|
|
576
576
|
variant: "secondary",
|
|
577
577
|
onClick: i,
|
|
578
578
|
children: "Retry"
|
|
@@ -1713,7 +1713,193 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1713
1713
|
}, Xe = (e, t) => {
|
|
1714
1714
|
let n = Number.parseFloat(e);
|
|
1715
1715
|
return Number.isFinite(n) ? n : t;
|
|
1716
|
-
}, Ze =
|
|
1716
|
+
}, Ze = "wui-feedback-submit", Qe = {
|
|
1717
|
+
label: "Feedback",
|
|
1718
|
+
heading: "Share feedback",
|
|
1719
|
+
placeholder: "What's working, what isn't?",
|
|
1720
|
+
emailLabel: "Email (optional)",
|
|
1721
|
+
submitLabel: "Send feedback",
|
|
1722
|
+
sendingLabel: "Sending…",
|
|
1723
|
+
messageLabel: "Your message",
|
|
1724
|
+
emptyError: "Please write a message before sending.",
|
|
1725
|
+
failedError: "That didn't send. Please try again.",
|
|
1726
|
+
thanks: "Thanks — we've got it."
|
|
1727
|
+
}, $e = 1e4, et = 1600, tt = class extends HTMLElement {
|
|
1728
|
+
static get observedAttributes() {
|
|
1729
|
+
return [
|
|
1730
|
+
"position",
|
|
1731
|
+
"label",
|
|
1732
|
+
"heading",
|
|
1733
|
+
"placeholder",
|
|
1734
|
+
"collect-email",
|
|
1735
|
+
"surface",
|
|
1736
|
+
"screen"
|
|
1737
|
+
];
|
|
1738
|
+
}
|
|
1739
|
+
constructor() {
|
|
1740
|
+
super(), this._state = "idle", this._submitListeners = 0, this._timer = 0, this._thanksTimer = 0;
|
|
1741
|
+
}
|
|
1742
|
+
get position() {
|
|
1743
|
+
return this.getAttribute("position") === "bottom-left" ? "bottom-left" : "bottom-right";
|
|
1744
|
+
}
|
|
1745
|
+
set position(e) {
|
|
1746
|
+
this.setAttribute("position", String(e ?? "bottom-right"));
|
|
1747
|
+
}
|
|
1748
|
+
get label() {
|
|
1749
|
+
return this.getAttribute("label") || Qe.label;
|
|
1750
|
+
}
|
|
1751
|
+
set label(e) {
|
|
1752
|
+
this.setAttribute("label", String(e ?? ""));
|
|
1753
|
+
}
|
|
1754
|
+
get heading() {
|
|
1755
|
+
return this.getAttribute("heading") || Qe.heading;
|
|
1756
|
+
}
|
|
1757
|
+
set heading(e) {
|
|
1758
|
+
this.setAttribute("heading", String(e ?? ""));
|
|
1759
|
+
}
|
|
1760
|
+
get placeholder() {
|
|
1761
|
+
return this.getAttribute("placeholder") || Qe.placeholder;
|
|
1762
|
+
}
|
|
1763
|
+
set placeholder(e) {
|
|
1764
|
+
this.setAttribute("placeholder", String(e ?? ""));
|
|
1765
|
+
}
|
|
1766
|
+
get collectEmail() {
|
|
1767
|
+
return this.hasAttribute("collect-email");
|
|
1768
|
+
}
|
|
1769
|
+
set collectEmail(e) {
|
|
1770
|
+
e ? this.setAttribute("collect-email", "") : this.removeAttribute("collect-email");
|
|
1771
|
+
}
|
|
1772
|
+
get isOpen() {
|
|
1773
|
+
return this._open === !0;
|
|
1774
|
+
}
|
|
1775
|
+
addEventListener(e, t, n) {
|
|
1776
|
+
e === Ze && (this._submitListeners += 1), super.addEventListener(e, t, n);
|
|
1777
|
+
}
|
|
1778
|
+
removeEventListener(e, t, n) {
|
|
1779
|
+
e === Ze && this._submitListeners > 0 && --this._submitListeners, super.removeEventListener(e, t, n);
|
|
1780
|
+
}
|
|
1781
|
+
connectedCallback() {
|
|
1782
|
+
this._rendered || this.render();
|
|
1783
|
+
}
|
|
1784
|
+
disconnectedCallback() {
|
|
1785
|
+
this._clearTimers();
|
|
1786
|
+
}
|
|
1787
|
+
attributeChangedCallback(e, t, n) {
|
|
1788
|
+
this._rendered && e !== "position" && this.render();
|
|
1789
|
+
}
|
|
1790
|
+
render() {
|
|
1791
|
+
let e = this._open === !0, t = this._refs().message?.value ?? "", n = this._refs().email?.value ?? "";
|
|
1792
|
+
this.innerHTML = `
|
|
1793
|
+
<button type="button" class="feedback-trigger" aria-expanded="false" aria-haspopup="dialog">
|
|
1794
|
+
<span class="feedback-trigger-icon" aria-hidden="true">${K("message-square", { size: 18 })}</span>
|
|
1795
|
+
<span class="feedback-trigger-label">${nt(this.label)}</span>
|
|
1796
|
+
</button>
|
|
1797
|
+
<div class="feedback-panel" role="dialog" aria-label="${rt(this.heading)}" hidden>
|
|
1798
|
+
<div class="feedback-head">
|
|
1799
|
+
<h2 class="feedback-heading">${nt(this.heading)}</h2>
|
|
1800
|
+
<button type="button" class="feedback-close" aria-label="Close">${K("x", { size: 16 })}</button>
|
|
1801
|
+
</div>
|
|
1802
|
+
<div class="feedback-body">
|
|
1803
|
+
<label class="feedback-field">
|
|
1804
|
+
<span class="feedback-field-label">${Qe.messageLabel}</span>
|
|
1805
|
+
<textarea class="feedback-message" rows="4" required placeholder="${rt(this.placeholder)}"></textarea>
|
|
1806
|
+
</label>
|
|
1807
|
+
${this.collectEmail ? `<label class="feedback-field">
|
|
1808
|
+
<span class="feedback-field-label">${Qe.emailLabel}</span>
|
|
1809
|
+
<input type="email" class="feedback-email" autocomplete="email" placeholder="you@example.com" />
|
|
1810
|
+
</label>` : ""}
|
|
1811
|
+
<p class="feedback-error" role="alert" hidden></p>
|
|
1812
|
+
</div>
|
|
1813
|
+
<div class="feedback-actions">
|
|
1814
|
+
<button type="button" class="feedback-cancel">Cancel</button>
|
|
1815
|
+
<button type="button" class="feedback-submit">${Qe.submitLabel}</button>
|
|
1816
|
+
</div>
|
|
1817
|
+
<div class="feedback-thanks" hidden>
|
|
1818
|
+
<span class="feedback-thanks-icon" aria-hidden="true">${K("check-circle", { size: 20 })}</span>
|
|
1819
|
+
<span class="feedback-thanks-text">${Qe.thanks}</span>
|
|
1820
|
+
</div>
|
|
1821
|
+
</div>`, this._rendered = !0, this._wire();
|
|
1822
|
+
let r = this._refs();
|
|
1823
|
+
r.message && (r.message.value = t), r.email && (r.email.value = n), e && this.open({ focus: !1 });
|
|
1824
|
+
}
|
|
1825
|
+
_refs() {
|
|
1826
|
+
return {
|
|
1827
|
+
trigger: this.querySelector(".feedback-trigger"),
|
|
1828
|
+
panel: this.querySelector(".feedback-panel"),
|
|
1829
|
+
close: this.querySelector(".feedback-close"),
|
|
1830
|
+
cancel: this.querySelector(".feedback-cancel"),
|
|
1831
|
+
submit: this.querySelector(".feedback-submit"),
|
|
1832
|
+
message: this.querySelector(".feedback-message"),
|
|
1833
|
+
email: this.querySelector(".feedback-email"),
|
|
1834
|
+
error: this.querySelector(".feedback-error"),
|
|
1835
|
+
thanks: this.querySelector(".feedback-thanks")
|
|
1836
|
+
};
|
|
1837
|
+
}
|
|
1838
|
+
_wire() {
|
|
1839
|
+
let { trigger: e, close: t, cancel: n, submit: r } = this._refs();
|
|
1840
|
+
e?.addEventListener("click", () => this.isOpen ? this.close() : this.open()), t?.addEventListener("click", () => this.close()), n?.addEventListener("click", () => this.close()), r?.addEventListener("click", () => this._submit()), this._onKeyDown || (this._onKeyDown = (e) => {
|
|
1841
|
+
e.key === "Escape" && this.isOpen && (e.stopPropagation(), this.close());
|
|
1842
|
+
}, this.addEventListener("keydown", this._onKeyDown));
|
|
1843
|
+
}
|
|
1844
|
+
open({ focus: e = !0 } = {}) {
|
|
1845
|
+
let { panel: t, trigger: n, message: r } = this._refs();
|
|
1846
|
+
t && (this._open = !0, t.hidden = !1, this.setAttribute("open", ""), n?.setAttribute("aria-expanded", "true"), e && r?.focus());
|
|
1847
|
+
}
|
|
1848
|
+
close() {
|
|
1849
|
+
let { panel: e, trigger: t } = this._refs();
|
|
1850
|
+
e && (this._open = !1, e.hidden = !0, this.removeAttribute("open"), t?.setAttribute("aria-expanded", "false"), t?.focus());
|
|
1851
|
+
}
|
|
1852
|
+
submitted() {
|
|
1853
|
+
this._clearTimers(), this._state = "done";
|
|
1854
|
+
let { thanks: e, error: t, submit: n, message: r, email: i } = this._refs();
|
|
1855
|
+
this._setBusy(!1), t && (t.hidden = !0, t.textContent = ""), e && (e.hidden = !1), this.querySelector(".feedback-body")?.setAttribute("hidden", ""), this.querySelector(".feedback-actions")?.setAttribute("hidden", ""), n && (n.disabled = !0), this._thanksTimer = setTimeout(() => {
|
|
1856
|
+
r && (r.value = ""), i && (i.value = ""), this._reset(), this.close();
|
|
1857
|
+
}, et);
|
|
1858
|
+
}
|
|
1859
|
+
failed(e) {
|
|
1860
|
+
this._clearTimers(), this._state = "error", this._setBusy(!1);
|
|
1861
|
+
let { error: t, message: n } = this._refs();
|
|
1862
|
+
t && (t.textContent = e || Qe.failedError, t.hidden = !1), n?.focus();
|
|
1863
|
+
}
|
|
1864
|
+
_submit() {
|
|
1865
|
+
if (this._state === "submitting") return;
|
|
1866
|
+
let { message: e, email: t, error: n } = this._refs(), r = (e?.value ?? "").trim();
|
|
1867
|
+
if (!r) {
|
|
1868
|
+
n && (n.textContent = Qe.emptyError, n.hidden = !1), e?.focus();
|
|
1869
|
+
return;
|
|
1870
|
+
}
|
|
1871
|
+
n && (n.hidden = !0, n.textContent = ""), this._state = "submitting", this._setBusy(!0);
|
|
1872
|
+
let i = {
|
|
1873
|
+
message: r,
|
|
1874
|
+
email: (t?.value ?? "").trim(),
|
|
1875
|
+
surface: this.getAttribute("surface") || "",
|
|
1876
|
+
screen: this.getAttribute("screen") || ""
|
|
1877
|
+
};
|
|
1878
|
+
if (this.dispatchEvent(new CustomEvent(Ze, {
|
|
1879
|
+
bubbles: !0,
|
|
1880
|
+
composed: !0,
|
|
1881
|
+
detail: i
|
|
1882
|
+
})), this._submitListeners === 0) {
|
|
1883
|
+
this._reset();
|
|
1884
|
+
return;
|
|
1885
|
+
}
|
|
1886
|
+
this._timer = setTimeout(() => {
|
|
1887
|
+
this._state === "submitting" && this.failed();
|
|
1888
|
+
}, $e);
|
|
1889
|
+
}
|
|
1890
|
+
_setBusy(e) {
|
|
1891
|
+
let { submit: t } = this._refs();
|
|
1892
|
+
t && (t.disabled = e, t.textContent = e ? Qe.sendingLabel : Qe.submitLabel, this.toggleAttribute("busy", e));
|
|
1893
|
+
}
|
|
1894
|
+
_reset() {
|
|
1895
|
+
this._clearTimers(), this._state = "idle", this._setBusy(!1);
|
|
1896
|
+
let { thanks: e, submit: t } = this._refs();
|
|
1897
|
+
e && (e.hidden = !0), this.querySelector(".feedback-body")?.removeAttribute("hidden"), this.querySelector(".feedback-actions")?.removeAttribute("hidden"), t && (t.disabled = !1);
|
|
1898
|
+
}
|
|
1899
|
+
_clearTimers() {
|
|
1900
|
+
this._timer &&= (clearTimeout(this._timer), 0), this._thanksTimer &&= (clearTimeout(this._thanksTimer), 0);
|
|
1901
|
+
}
|
|
1902
|
+
}, nt = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), rt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), it = class extends HTMLElement {
|
|
1717
1903
|
static formAssociated = !0;
|
|
1718
1904
|
_accessibleName() {
|
|
1719
1905
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
@@ -1813,13 +1999,13 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1813
1999
|
let a = `${this.id}-listbox`;
|
|
1814
2000
|
this._listboxId = a, this.innerHTML = `
|
|
1815
2001
|
<div class="search-select${i}">
|
|
1816
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
2002
|
+
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${at(a)}" aria-label="${at(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
|
|
1817
2003
|
${n ? K(n, { className: "search-select-icon" }) : ""}
|
|
1818
2004
|
<div class="ms-chips" data-chips></div>
|
|
1819
2005
|
${K("chevron-down", { className: "search-select-caret" })}
|
|
1820
2006
|
</div>
|
|
1821
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
1822
|
-
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${
|
|
2007
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${at(a)}" aria-multiselectable="true" tabindex="-1" hidden>
|
|
2008
|
+
${e ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${at(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
1823
2009
|
<div class="search-select-options"></div>
|
|
1824
2010
|
<div class="search-select-empty" hidden>No matches</div>
|
|
1825
2011
|
</div>
|
|
@@ -1833,7 +2019,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1833
2019
|
e.innerHTML = `<span class="search-select-placeholder">${q(t)}</span>`;
|
|
1834
2020
|
return;
|
|
1835
2021
|
}
|
|
1836
|
-
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="${
|
|
2022
|
+
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="${at(e)}" aria-label="Remove ${at(ot(this._labelFor(e)))}">${K("x")}</button></span>`).join(""), this._collapseChips();
|
|
1837
2023
|
}
|
|
1838
2024
|
_collapseChips() {
|
|
1839
2025
|
let e = this.querySelector("[data-chips]");
|
|
@@ -1857,11 +2043,11 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1857
2043
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
1858
2044
|
if (!t) return;
|
|
1859
2045
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
1860
|
-
r && (i = i.filter((e) =>
|
|
2046
|
+
r && (i = i.filter((e) => ot(e.label).toLowerCase().includes(r)));
|
|
1861
2047
|
let a = this._listboxId || `${this.id || "wui-multiselect"}-listbox`;
|
|
1862
2048
|
t.innerHTML = i.map((e, t) => {
|
|
1863
2049
|
let n = this._values.includes(String(e.value));
|
|
1864
|
-
return `<button type="button" role="option" id="${
|
|
2050
|
+
return `<button type="button" role="option" id="${at(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${at(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${Ie(e)}</span><span class="ms-check">${K("check")}</span></button>`;
|
|
1865
2051
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant"), this._reanchor?.();
|
|
1866
2052
|
}
|
|
1867
2053
|
_wire() {
|
|
@@ -1941,7 +2127,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1941
2127
|
disconnectedCallback() {
|
|
1942
2128
|
this._teardown(), this._ro?.disconnect(), this._ro = null;
|
|
1943
2129
|
}
|
|
1944
|
-
},
|
|
2130
|
+
}, at = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), ot = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), st = /[^0-9]/g, ct = /[^0-9a-zA-Z]/g, lt = class extends HTMLElement {
|
|
1945
2131
|
static formAssociated = !0;
|
|
1946
2132
|
static get observedAttributes() {
|
|
1947
2133
|
return [
|
|
@@ -1972,7 +2158,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
1972
2158
|
this._value = this._clean(e), G(this, this._value), this._paint();
|
|
1973
2159
|
}
|
|
1974
2160
|
_clean(e) {
|
|
1975
|
-
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ?
|
|
2161
|
+
return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? ct : st, "").slice(0, this.length);
|
|
1976
2162
|
}
|
|
1977
2163
|
constructor() {
|
|
1978
2164
|
super();
|
|
@@ -2063,7 +2249,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
2063
2249
|
disconnectedCallback() {
|
|
2064
2250
|
this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
|
|
2065
2251
|
}
|
|
2066
|
-
},
|
|
2252
|
+
}, ut = [
|
|
2067
2253
|
[
|
|
2068
2254
|
"AF",
|
|
2069
2255
|
"Afghanistan",
|
|
@@ -3289,20 +3475,20 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
3289
3475
|
"Zimbabwe",
|
|
3290
3476
|
"263"
|
|
3291
3477
|
]
|
|
3292
|
-
],
|
|
3478
|
+
], dt = (e) => (ut.find((t) => t[0] === e) || [
|
|
3293
3479
|
"",
|
|
3294
3480
|
"",
|
|
3295
3481
|
""
|
|
3296
|
-
])[2],
|
|
3297
|
-
function
|
|
3298
|
-
return Y ? Promise.resolve(Y) : (
|
|
3482
|
+
])[2], ft = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, pt = null;
|
|
3483
|
+
function mt() {
|
|
3484
|
+
return Y ? Promise.resolve(Y) : (pt ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
|
|
3299
3485
|
AsYouType: e.AsYouType,
|
|
3300
3486
|
getExampleNumber: e.getExampleNumber,
|
|
3301
3487
|
isValidPhoneNumber: e.isValidPhoneNumber,
|
|
3302
3488
|
examples: t.default || t
|
|
3303
|
-
}, Y)).catch(() => null),
|
|
3489
|
+
}, Y)).catch(() => null), pt);
|
|
3304
3490
|
}
|
|
3305
|
-
function
|
|
3491
|
+
function ht(e, t) {
|
|
3306
3492
|
if (!Y || !t) return t;
|
|
3307
3493
|
try {
|
|
3308
3494
|
return new Y.AsYouType(e).input(t);
|
|
@@ -3310,7 +3496,7 @@ function ct(e, t) {
|
|
|
3310
3496
|
return t;
|
|
3311
3497
|
}
|
|
3312
3498
|
}
|
|
3313
|
-
function
|
|
3499
|
+
function gt(e) {
|
|
3314
3500
|
if (!Y) return null;
|
|
3315
3501
|
try {
|
|
3316
3502
|
return Y.getExampleNumber(e, Y.examples)?.formatNational() || null;
|
|
@@ -3318,7 +3504,7 @@ function lt(e) {
|
|
|
3318
3504
|
return null;
|
|
3319
3505
|
}
|
|
3320
3506
|
}
|
|
3321
|
-
function
|
|
3507
|
+
function _t(e) {
|
|
3322
3508
|
if (!Y || !e) return null;
|
|
3323
3509
|
try {
|
|
3324
3510
|
return Y.isValidPhoneNumber(e);
|
|
@@ -3326,7 +3512,7 @@ function ut(e) {
|
|
|
3326
3512
|
return null;
|
|
3327
3513
|
}
|
|
3328
3514
|
}
|
|
3329
|
-
function
|
|
3515
|
+
function vt(e) {
|
|
3330
3516
|
if (!Y) return null;
|
|
3331
3517
|
try {
|
|
3332
3518
|
let t = Y.getExampleNumber(e, Y.examples);
|
|
@@ -3335,7 +3521,7 @@ function dt(e) {
|
|
|
3335
3521
|
return null;
|
|
3336
3522
|
}
|
|
3337
3523
|
}
|
|
3338
|
-
function
|
|
3524
|
+
function yt(e) {
|
|
3339
3525
|
if (!Y || !e?.trim().startsWith("+")) return null;
|
|
3340
3526
|
try {
|
|
3341
3527
|
let t = new Y.AsYouType();
|
|
@@ -3349,7 +3535,7 @@ function ft(e) {
|
|
|
3349
3535
|
return null;
|
|
3350
3536
|
}
|
|
3351
3537
|
}
|
|
3352
|
-
var
|
|
3538
|
+
var bt = class extends HTMLElement {
|
|
3353
3539
|
static formAssociated = !0;
|
|
3354
3540
|
static get observedAttributes() {
|
|
3355
3541
|
return [
|
|
@@ -3396,13 +3582,13 @@ var pt = class extends HTMLElement {
|
|
|
3396
3582
|
this.value = this._defaultValue || "";
|
|
3397
3583
|
}
|
|
3398
3584
|
get value() {
|
|
3399
|
-
return this._national ? `+${
|
|
3585
|
+
return this._national ? `+${dt(this._country)}${this._national}` : "";
|
|
3400
3586
|
}
|
|
3401
3587
|
set value(e) {
|
|
3402
|
-
let t = String(e ?? "").trim(), n =
|
|
3588
|
+
let t = String(e ?? "").trim(), n = yt(t);
|
|
3403
3589
|
if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
|
|
3404
3590
|
else if (t.startsWith("+")) {
|
|
3405
|
-
let e = t.replace(/[^0-9]/g, ""), n = String(
|
|
3591
|
+
let e = t.replace(/[^0-9]/g, ""), n = String(dt(this._country));
|
|
3406
3592
|
n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
|
|
3407
3593
|
} else this._national = t.replace(/[^0-9]/g, "");
|
|
3408
3594
|
n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
|
|
@@ -3418,25 +3604,25 @@ var pt = class extends HTMLElement {
|
|
|
3418
3604
|
}
|
|
3419
3605
|
render() {
|
|
3420
3606
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
|
|
3421
|
-
let e = this.getAttribute("placeholder") ||
|
|
3607
|
+
let e = this.getAttribute("placeholder") || gt(this._country) || "Enter phone number";
|
|
3422
3608
|
this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
|
|
3423
3609
|
let t = `${this.id}-listbox`;
|
|
3424
3610
|
this._listboxId = t;
|
|
3425
|
-
let n =
|
|
3611
|
+
let n = ut.map(([e, n, r], i) => `<button type="button" role="option" id="${xt(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${ft(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
|
|
3426
3612
|
this.innerHTML = `
|
|
3427
3613
|
<div class="phone-input-wrap">
|
|
3428
3614
|
<div class="phone-country-adornment">
|
|
3429
|
-
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
3430
|
-
<span class="${
|
|
3615
|
+
<button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${xt(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3616
|
+
<span class="${ft(this._country)}" data-flag aria-hidden="true"></span>
|
|
3431
3617
|
${K("chevron-down", { className: "phone-chevron" })}
|
|
3432
|
-
<span class="phone-dial" data-dial>+${
|
|
3618
|
+
<span class="phone-dial" data-dial>+${dt(this._country)}</span>
|
|
3433
3619
|
</button>
|
|
3434
|
-
<div class="country-dropdown-menu" role="listbox" id="${
|
|
3435
|
-
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${K("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${
|
|
3620
|
+
<div class="country-dropdown-menu" role="listbox" id="${xt(t)}" tabindex="-1" hidden>
|
|
3621
|
+
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${K("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${xt(t)}" aria-autocomplete="list" /></div>
|
|
3436
3622
|
<div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
|
|
3437
3623
|
</div>
|
|
3438
3624
|
</div>
|
|
3439
|
-
<input type="tel" class="input" placeholder="${
|
|
3625
|
+
<input type="tel" class="input" placeholder="${xt(e)}" value="${xt(ht(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${xt(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${xt(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
3440
3626
|
</div>
|
|
3441
3627
|
<div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, G(this, this.value), this._wire();
|
|
3442
3628
|
}
|
|
@@ -3467,12 +3653,12 @@ var pt = class extends HTMLElement {
|
|
|
3467
3653
|
}
|
|
3468
3654
|
a && (a.hidden = n > 0);
|
|
3469
3655
|
}, h = (e) => {
|
|
3470
|
-
this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className =
|
|
3656
|
+
this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className = ft(e)), c && (c.textContent = `+${dt(e)}`);
|
|
3471
3657
|
for (let t of this._itemEls()) {
|
|
3472
3658
|
let n = t.dataset.iso === e;
|
|
3473
3659
|
t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
|
|
3474
3660
|
}
|
|
3475
|
-
!this.getAttribute("placeholder") && o && (o.placeholder =
|
|
3661
|
+
!this.getAttribute("placeholder") && o && (o.placeholder = gt(e) || "Enter phone number"), o && this._national && (o.value = ht(e, this._national)), p(), this._syncMirror(), this._emitChange(), o?.focus();
|
|
3476
3662
|
}, g = (t) => {
|
|
3477
3663
|
let n = this._visibleItems();
|
|
3478
3664
|
if (t.key === "ArrowDown") {
|
|
@@ -3506,7 +3692,7 @@ var pt = class extends HTMLElement {
|
|
|
3506
3692
|
let _ = this.querySelector("[data-phone-error]"), v = (e) => {
|
|
3507
3693
|
if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), _) {
|
|
3508
3694
|
if (e) {
|
|
3509
|
-
let e =
|
|
3695
|
+
let e = gt(this._country);
|
|
3510
3696
|
_.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
|
|
3511
3697
|
}
|
|
3512
3698
|
_.hidden = !e;
|
|
@@ -3514,15 +3700,15 @@ var pt = class extends HTMLElement {
|
|
|
3514
3700
|
};
|
|
3515
3701
|
o.addEventListener("input", (e) => {
|
|
3516
3702
|
e.stopPropagation();
|
|
3517
|
-
let t = o.value.replace(/[^0-9]/g, ""), n =
|
|
3703
|
+
let t = o.value.replace(/[^0-9]/g, ""), n = vt(this._country);
|
|
3518
3704
|
n && t.length > n && (t = t.slice(0, n)), this._national = t;
|
|
3519
|
-
let r =
|
|
3520
|
-
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national ||
|
|
3705
|
+
let r = ht(this._country, this._national);
|
|
3706
|
+
o.value !== r && (o.value = r), this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || _t(this.value) === !0) && v(!1);
|
|
3521
3707
|
}), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
|
|
3522
|
-
v(this._national.length > 0 &&
|
|
3708
|
+
v(this._national.length > 0 && _t(this.value) === !1), this.value !== this._committedValue && this._emitChange();
|
|
3523
3709
|
}), o.addEventListener("paste", (e) => {
|
|
3524
|
-
let t =
|
|
3525
|
-
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value =
|
|
3710
|
+
let t = yt(e.clipboardData?.getData("text"));
|
|
3711
|
+
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = ht(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
|
|
3526
3712
|
}), this._bindGlobal = () => {
|
|
3527
3713
|
this._teardownGlobals?.(), this._onDocClick = (e) => {
|
|
3528
3714
|
l() && !this.contains(e.target) && p();
|
|
@@ -3531,9 +3717,9 @@ var pt = class extends HTMLElement {
|
|
|
3531
3717
|
});
|
|
3532
3718
|
}, this._teardownGlobals = () => {
|
|
3533
3719
|
this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), Ae(this);
|
|
3534
|
-
}, this._bindGlobal(),
|
|
3535
|
-
if (!(!e || !o.isConnected) && (this._national && (o.value =
|
|
3536
|
-
let e =
|
|
3720
|
+
}, this._bindGlobal(), mt().then((e) => {
|
|
3721
|
+
if (!(!e || !o.isConnected) && (this._national && (o.value = ht(this._country, this._national)), !this.getAttribute("placeholder"))) {
|
|
3722
|
+
let e = gt(this._country);
|
|
3537
3723
|
e && (o.placeholder = e);
|
|
3538
3724
|
}
|
|
3539
3725
|
}), this._syncMirror();
|
|
@@ -3544,7 +3730,7 @@ var pt = class extends HTMLElement {
|
|
|
3544
3730
|
disconnectedCallback() {
|
|
3545
3731
|
this._teardown();
|
|
3546
3732
|
}
|
|
3547
|
-
},
|
|
3733
|
+
}, xt = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), St = class extends HTMLElement {
|
|
3548
3734
|
static formAssociated = !0;
|
|
3549
3735
|
static get observedAttributes() {
|
|
3550
3736
|
return [
|
|
@@ -3633,19 +3819,19 @@ var pt = class extends HTMLElement {
|
|
|
3633
3819
|
this._listboxId = u;
|
|
3634
3820
|
let d = e.map((e, t) => {
|
|
3635
3821
|
let n = String(e.value) === String(this._value);
|
|
3636
|
-
return `<button type="button" role="option" id="${
|
|
3822
|
+
return `<button type="button" role="option" id="${Ct(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${Ct(e.value)}" aria-selected="${n}">${Ie(e)}</button>`;
|
|
3637
3823
|
}).join("");
|
|
3638
3824
|
this.innerHTML = `
|
|
3639
3825
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
|
|
3640
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${
|
|
3826
|
+
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Ct(u)}" aria-label="${Ct(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
3641
3827
|
${a ? K(a, { className: "search-select-icon" }) : ""}
|
|
3642
3828
|
${o ? `<span class="search-select-prefix">${q(o)}</span>` : ""}
|
|
3643
3829
|
<span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? Ie(l) : q(s)}</span>
|
|
3644
3830
|
${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${K("x")}</span>` : ""}
|
|
3645
3831
|
${K("chevron-down", { className: "search-select-caret" })}
|
|
3646
3832
|
</button>
|
|
3647
|
-
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${
|
|
3648
|
-
${t ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${
|
|
3833
|
+
<div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Ct(u)}" tabindex="-1" hidden>
|
|
3834
|
+
${t ? `<div class="search-select-search">${K("search")}<input class="search-select-input" placeholder="${Ct(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${K("x")}</button></div>` : ""}
|
|
3649
3835
|
<div class="search-select-options">${d}<div class="search-select-empty" hidden>No matches</div></div>
|
|
3650
3836
|
</div>
|
|
3651
3837
|
</div>`, this._rendered = !0, G(this, this._value), this._wire(), this._syncReset();
|
|
@@ -3750,7 +3936,7 @@ var pt = class extends HTMLElement {
|
|
|
3750
3936
|
disconnectedCallback() {
|
|
3751
3937
|
this._teardown();
|
|
3752
3938
|
}
|
|
3753
|
-
},
|
|
3939
|
+
}, Ct = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), wt = class extends HTMLElement {
|
|
3754
3940
|
static formAssociated = !0;
|
|
3755
3941
|
static get observedAttributes() {
|
|
3756
3942
|
return [
|
|
@@ -3790,19 +3976,19 @@ var pt = class extends HTMLElement {
|
|
|
3790
3976
|
return this._value;
|
|
3791
3977
|
}
|
|
3792
3978
|
set value(e) {
|
|
3793
|
-
this._value = this._snapToStep(this._clamp(
|
|
3979
|
+
this._value = this._snapToStep(this._clamp(Tt(e, this._value))), this._syncValue(), this._syncMirrors();
|
|
3794
3980
|
}
|
|
3795
3981
|
get start() {
|
|
3796
3982
|
return this._start;
|
|
3797
3983
|
}
|
|
3798
3984
|
set start(e) {
|
|
3799
|
-
this._start = Math.min(this._snapToStep(this._clamp(
|
|
3985
|
+
this._start = Math.min(this._snapToStep(this._clamp(Tt(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
|
|
3800
3986
|
}
|
|
3801
3987
|
get end() {
|
|
3802
3988
|
return this._end;
|
|
3803
3989
|
}
|
|
3804
3990
|
set end(e) {
|
|
3805
|
-
this._end = Math.max(this._snapToStep(this._clamp(
|
|
3991
|
+
this._end = Math.max(this._snapToStep(this._clamp(Tt(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
|
|
3806
3992
|
}
|
|
3807
3993
|
attributeChangedCallback(e, t, n) {
|
|
3808
3994
|
if (e === "value" || e === "start" || e === "end" || e === "min" || e === "max" || e === "step") {
|
|
@@ -3815,19 +4001,19 @@ var pt = class extends HTMLElement {
|
|
|
3815
4001
|
this._isRange() ? this._resetRange() : this._resetSingle();
|
|
3816
4002
|
}
|
|
3817
4003
|
_updateFromAttribute(e) {
|
|
3818
|
-
e === "value" ? this._value = this._snapToStep(this._clamp(
|
|
4004
|
+
e === "value" ? this._value = this._snapToStep(this._clamp(Tt(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(Tt(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(Tt(this.getAttribute("end"), this._end))));
|
|
3819
4005
|
}
|
|
3820
4006
|
_isRange() {
|
|
3821
4007
|
return this.hasAttribute("range");
|
|
3822
4008
|
}
|
|
3823
4009
|
_min() {
|
|
3824
|
-
return
|
|
4010
|
+
return Tt(this.getAttribute("min"), 0);
|
|
3825
4011
|
}
|
|
3826
4012
|
_max() {
|
|
3827
|
-
return
|
|
4013
|
+
return Tt(this.getAttribute("max"), 100);
|
|
3828
4014
|
}
|
|
3829
4015
|
_step() {
|
|
3830
|
-
return
|
|
4016
|
+
return Tt(this.getAttribute("step"), 1);
|
|
3831
4017
|
}
|
|
3832
4018
|
_clamp(e) {
|
|
3833
4019
|
return Math.max(this._min(), Math.min(e, this._max()));
|
|
@@ -3892,7 +4078,7 @@ var pt = class extends HTMLElement {
|
|
|
3892
4078
|
aria-valuenow="${this._value}"
|
|
3893
4079
|
aria-valuetext="${this._formatValue(this._value)}"
|
|
3894
4080
|
${a ? "disabled" : ""}
|
|
3895
|
-
aria-label="${
|
|
4081
|
+
aria-label="${Et(this.getAttribute("aria-label") || "Value")}"
|
|
3896
4082
|
></button>
|
|
3897
4083
|
`}
|
|
3898
4084
|
${this.hasAttribute("show-value") ? n ? `<span class="slider-value">${this._formatValue(this._start)} – ${this._formatValue(this._end)}</span>` : `<span class="slider-value">${this._formatValue(this._value)}</span>` : ""}
|
|
@@ -3992,10 +4178,10 @@ var pt = class extends HTMLElement {
|
|
|
3992
4178
|
disconnectedCallback() {
|
|
3993
4179
|
this._teardown();
|
|
3994
4180
|
}
|
|
3995
|
-
},
|
|
4181
|
+
}, Tt = (e, t) => {
|
|
3996
4182
|
let n = Number.parseFloat(e);
|
|
3997
4183
|
return Number.isFinite(n) ? n : t;
|
|
3998
|
-
},
|
|
4184
|
+
}, Et = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Dt = class extends HTMLElement {
|
|
3999
4185
|
static formAssociated = !0;
|
|
4000
4186
|
_accessibleName() {
|
|
4001
4187
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
|
|
@@ -4068,7 +4254,7 @@ var pt = class extends HTMLElement {
|
|
|
4068
4254
|
G(this, this._values.join(",")), this.innerHTML = `
|
|
4069
4255
|
<div class="search-select${t}">
|
|
4070
4256
|
<div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
4071
|
-
<input type="text" class="ms-input" data-input aria-label="${
|
|
4257
|
+
<input type="text" class="ms-input" data-input aria-label="${kt(this._accessibleName())}" placeholder="${kt(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
|
|
4072
4258
|
<div class="ms-chips" data-chips></div>
|
|
4073
4259
|
</div>
|
|
4074
4260
|
</div>`, this._rendered = !0, G(this, this._values.join(",")), this._renderControl(), this._wire();
|
|
@@ -4080,7 +4266,7 @@ var pt = class extends HTMLElement {
|
|
|
4080
4266
|
e.innerHTML = "";
|
|
4081
4267
|
return;
|
|
4082
4268
|
}
|
|
4083
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${
|
|
4269
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${Ot(e)}</span><button type="button" class="chip-remove" data-remove="${kt(e)}" aria-label="Remove ${kt(e)}">${K("x")}</button></span>`).join("");
|
|
4084
4270
|
}
|
|
4085
4271
|
}
|
|
4086
4272
|
_wire() {
|
|
@@ -4151,18 +4337,18 @@ var pt = class extends HTMLElement {
|
|
|
4151
4337
|
disconnectedCallback() {
|
|
4152
4338
|
this._teardown();
|
|
4153
4339
|
}
|
|
4154
|
-
},
|
|
4340
|
+
}, Ot = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), kt = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), At = (e) => String(e).padStart(2, "0"), jt = (e, t) => `${At(e)}:${At(t)}`, Mt = (e) => {
|
|
4155
4341
|
let t = /^(\d{2}):(\d{2})$/.exec(e || "");
|
|
4156
4342
|
return t ? {
|
|
4157
4343
|
h: +t[1],
|
|
4158
4344
|
m: +t[2]
|
|
4159
4345
|
} : null;
|
|
4160
|
-
},
|
|
4346
|
+
}, Nt = (e, t = "24") => {
|
|
4161
4347
|
if (!e) return "";
|
|
4162
|
-
if (t === "24") return
|
|
4348
|
+
if (t === "24") return jt(e.h, e.m);
|
|
4163
4349
|
let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
|
|
4164
|
-
return `${n}:${
|
|
4165
|
-
},
|
|
4350
|
+
return `${n}:${At(e.m)} ${r}`;
|
|
4351
|
+
}, Pt = class extends HTMLElement {
|
|
4166
4352
|
static formAssociated = !0;
|
|
4167
4353
|
static get observedAttributes() {
|
|
4168
4354
|
return [
|
|
@@ -4209,11 +4395,11 @@ var pt = class extends HTMLElement {
|
|
|
4209
4395
|
}
|
|
4210
4396
|
render() {
|
|
4211
4397
|
this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
|
|
4212
|
-
let e = this.getAttribute("placeholder") || "Select time", t =
|
|
4398
|
+
let e = this.getAttribute("placeholder") || "Select time", t = Mt(this._value), n = this.getAttribute("format") || "24", r = this.getAttribute("size"), i = r === "sm" ? " input-sm" : r === "lg" ? " input-lg" : "", a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
|
|
4213
4399
|
this.innerHTML = `
|
|
4214
4400
|
<div class="timepicker">
|
|
4215
4401
|
<button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${q(a)}"` : ""}${o ? ` aria-describedby="${q(o)}"` : ""}>
|
|
4216
|
-
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ?
|
|
4402
|
+
<span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? Nt(t, n) : q(e)}</span>
|
|
4217
4403
|
${K("clock")}
|
|
4218
4404
|
</button>
|
|
4219
4405
|
<div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
|
|
@@ -4225,14 +4411,14 @@ var pt = class extends HTMLElement {
|
|
|
4225
4411
|
_syncTrigger() {
|
|
4226
4412
|
let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
|
|
4227
4413
|
if (!t) return;
|
|
4228
|
-
let n =
|
|
4229
|
-
t.textContent = n ?
|
|
4414
|
+
let n = Mt(this._value), r = this.getAttribute("format") || "24";
|
|
4415
|
+
t.textContent = n ? Nt(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
|
|
4230
4416
|
}
|
|
4231
4417
|
_buildTimes() {
|
|
4232
|
-
let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r =
|
|
4418
|
+
let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = Mt(t) || {
|
|
4233
4419
|
h: 0,
|
|
4234
4420
|
m: 0
|
|
4235
|
-
}, i =
|
|
4421
|
+
}, i = Mt(n) || {
|
|
4236
4422
|
h: 23,
|
|
4237
4423
|
m: 59
|
|
4238
4424
|
}, a = [], o = r.h, s = r.m;
|
|
@@ -4245,10 +4431,10 @@ var pt = class extends HTMLElement {
|
|
|
4245
4431
|
_renderOptions() {
|
|
4246
4432
|
let e = this.querySelector(".timepicker-pop");
|
|
4247
4433
|
if (!e) return;
|
|
4248
|
-
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r =
|
|
4434
|
+
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = Mt(this._value), i = this._focus, a = "";
|
|
4249
4435
|
for (let e = 0; e < n.length; e++) {
|
|
4250
|
-
let o = n[e], s =
|
|
4251
|
-
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${
|
|
4436
|
+
let o = n[e], s = jt(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
|
|
4437
|
+
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${Nt(o, t)}</button>`;
|
|
4252
4438
|
}
|
|
4253
4439
|
e.innerHTML = a, this._focusActive();
|
|
4254
4440
|
}
|
|
@@ -4346,7 +4532,7 @@ var pt = class extends HTMLElement {
|
|
|
4346
4532
|
disconnectedCallback() {
|
|
4347
4533
|
this._teardown();
|
|
4348
4534
|
}
|
|
4349
|
-
},
|
|
4535
|
+
}, Ft = "wui-wizard-step", It = class extends HTMLElement {
|
|
4350
4536
|
static get observedAttributes() {
|
|
4351
4537
|
return [
|
|
4352
4538
|
"active",
|
|
@@ -4380,7 +4566,7 @@ var pt = class extends HTMLElement {
|
|
|
4380
4566
|
this._beforeNext = typeof e == "function" ? e : null;
|
|
4381
4567
|
}
|
|
4382
4568
|
get _steps() {
|
|
4383
|
-
return [...this.querySelectorAll(`:scope > ${
|
|
4569
|
+
return [...this.querySelectorAll(`:scope > ${Ft}`)];
|
|
4384
4570
|
}
|
|
4385
4571
|
refresh() {
|
|
4386
4572
|
this._rendered && this._renderChrome();
|
|
@@ -4439,13 +4625,13 @@ var pt = class extends HTMLElement {
|
|
|
4439
4625
|
return e.map((e, r) => {
|
|
4440
4626
|
let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
|
|
4441
4627
|
u = a === "done" ? K("check") : a === "error" ? K("alert-triangle") : a === "skipped" ? K("minus") : c ? K(c) : String(l);
|
|
4442
|
-
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${
|
|
4443
|
-
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${
|
|
4628
|
+
let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, m = s ? `<span class="step-desc">${Lt(s)}</span>` : "", h;
|
|
4629
|
+
return h = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${Lt(o)}</span>${m}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${Lt(o)}</span>${m}` : `<span class="step-circle">${u}</span><span class="step-label">${Lt(o)}</span>${m}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${h}</button>` : `<div class="${d}"${f}>${h}</div>`;
|
|
4444
4630
|
}).join("");
|
|
4445
4631
|
}
|
|
4446
4632
|
_footerHtml(e) {
|
|
4447
4633
|
let t = this._active, n = e.length - 1, r = this.hasAttribute("disabled") ? " disabled" : "", i = e[t]?.hasAttribute("optional") || this.hasAttribute("skippable"), a = this.getAttribute("back-label") || "Back", o = this.getAttribute("next-label") || "Next", s = this.getAttribute("skip-label") || "Skip", c = this.getAttribute("finish-label") || "Finish";
|
|
4448
|
-
return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${K("arrow-left", { className: "me-2" })}${
|
|
4634
|
+
return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${K("arrow-left", { className: "me-2" })}${Lt(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Lt(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Lt(o)}${K("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Lt(c)}</button>`}</span>`;
|
|
4449
4635
|
}
|
|
4450
4636
|
_wire() {
|
|
4451
4637
|
this._teardown(), this._onHeaderClick = (e) => {
|
|
@@ -4513,7 +4699,7 @@ var pt = class extends HTMLElement {
|
|
|
4513
4699
|
_reflectActive(e) {
|
|
4514
4700
|
this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
|
|
4515
4701
|
}
|
|
4516
|
-
},
|
|
4702
|
+
}, Lt = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Rt = class extends HTMLElement {
|
|
4517
4703
|
static get observedAttributes() {
|
|
4518
4704
|
return [
|
|
4519
4705
|
"label",
|
|
@@ -4527,14 +4713,14 @@ var pt = class extends HTMLElement {
|
|
|
4527
4713
|
let e = this.closest("wui-wizard");
|
|
4528
4714
|
e && typeof e.refresh == "function" && e.refresh();
|
|
4529
4715
|
}
|
|
4530
|
-
},
|
|
4716
|
+
}, zt = "image/png,image/jpeg,image/webp", Bt = {
|
|
4531
4717
|
"image/png": [".png"],
|
|
4532
4718
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
4533
4719
|
"image/webp": [".webp"],
|
|
4534
4720
|
"image/gif": [".gif"],
|
|
4535
4721
|
"image/svg+xml": [".svg"],
|
|
4536
4722
|
"application/pdf": [".pdf"]
|
|
4537
|
-
},
|
|
4723
|
+
}, Vt = {
|
|
4538
4724
|
"image/png": "PNG",
|
|
4539
4725
|
"image/jpeg": "JPG",
|
|
4540
4726
|
"image/webp": "WEBP",
|
|
@@ -4548,7 +4734,7 @@ var pt = class extends HTMLElement {
|
|
|
4548
4734
|
".gif": "GIF",
|
|
4549
4735
|
".svg": "SVG",
|
|
4550
4736
|
".pdf": "PDF"
|
|
4551
|
-
},
|
|
4737
|
+
}, Ht = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Ut = [
|
|
4552
4738
|
".png",
|
|
4553
4739
|
".jpg",
|
|
4554
4740
|
".jpeg",
|
|
@@ -4559,46 +4745,100 @@ var pt = class extends HTMLElement {
|
|
|
4559
4745
|
".avif",
|
|
4560
4746
|
".heic"
|
|
4561
4747
|
];
|
|
4562
|
-
function
|
|
4748
|
+
function Wt(e) {
|
|
4563
4749
|
if (!e) return !1;
|
|
4564
4750
|
let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
|
|
4565
4751
|
if (t) return t.startsWith("image/");
|
|
4566
4752
|
let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
|
|
4567
|
-
return
|
|
4753
|
+
return Ut.some((e) => r.endsWith(e));
|
|
4568
4754
|
}
|
|
4569
|
-
function
|
|
4570
|
-
let t =
|
|
4571
|
-
return t.length ? t.every((e) => e.startsWith(".") ?
|
|
4755
|
+
function Gt(e) {
|
|
4756
|
+
let t = Ht(e);
|
|
4757
|
+
return t.length ? t.every((e) => e.startsWith(".") ? Ut.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
|
|
4572
4758
|
}
|
|
4573
|
-
function
|
|
4759
|
+
function Kt(e) {
|
|
4574
4760
|
let t = [];
|
|
4575
|
-
for (let n of
|
|
4576
|
-
let e =
|
|
4761
|
+
for (let n of Ht(e)) {
|
|
4762
|
+
let e = Vt[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
4577
4763
|
t.includes(e) || t.push(e);
|
|
4578
4764
|
}
|
|
4579
4765
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
4580
4766
|
}
|
|
4581
|
-
function
|
|
4582
|
-
let n =
|
|
4767
|
+
function qt(e, t) {
|
|
4768
|
+
let n = Ht(t);
|
|
4583
4769
|
if (!n.length) return !0;
|
|
4584
4770
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
4585
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
4771
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Bt[e] || []).some((e) => i.endsWith(e)));
|
|
4586
4772
|
}
|
|
4587
|
-
function
|
|
4773
|
+
function Jt(e, t = {}) {
|
|
4588
4774
|
if (!e) return null;
|
|
4589
|
-
let n = t.accept === void 0 ?
|
|
4590
|
-
return
|
|
4775
|
+
let n = t.accept === void 0 ? zt : t.accept, r = t.maxSizeMb || 5;
|
|
4776
|
+
return qt(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Kt(n)} file.`;
|
|
4777
|
+
}
|
|
4778
|
+
var Yt = {
|
|
4779
|
+
minLength: 8,
|
|
4780
|
+
uppercase: !0,
|
|
4781
|
+
lowercase: !0,
|
|
4782
|
+
digit: !0,
|
|
4783
|
+
special: !0,
|
|
4784
|
+
uniqueChars: 0
|
|
4785
|
+
};
|
|
4786
|
+
function Xt(e) {
|
|
4787
|
+
return e === !0 || e == null ? { ...Yt } : {
|
|
4788
|
+
...Yt,
|
|
4789
|
+
...e
|
|
4790
|
+
};
|
|
4791
|
+
}
|
|
4792
|
+
function Zt(e) {
|
|
4793
|
+
let t = Xt(e), n = [];
|
|
4794
|
+
if (t.minLength > 0 && n.push({
|
|
4795
|
+
key: "length",
|
|
4796
|
+
label: `At least ${t.minLength} characters long`,
|
|
4797
|
+
test: (e) => e.length >= t.minLength
|
|
4798
|
+
}), t.uppercase && n.push({
|
|
4799
|
+
key: "uppercase",
|
|
4800
|
+
label: "At least one uppercase letter",
|
|
4801
|
+
test: (e) => /[A-Z]/.test(e)
|
|
4802
|
+
}), t.lowercase && n.push({
|
|
4803
|
+
key: "lowercase",
|
|
4804
|
+
label: "At least one lowercase letter",
|
|
4805
|
+
test: (e) => /[a-z]/.test(e)
|
|
4806
|
+
}), t.digit && n.push({
|
|
4807
|
+
key: "digit",
|
|
4808
|
+
label: "At least one digit",
|
|
4809
|
+
test: (e) => /[0-9]/.test(e)
|
|
4810
|
+
}), t.special && n.push({
|
|
4811
|
+
key: "special",
|
|
4812
|
+
label: "At least one special character",
|
|
4813
|
+
test: (e) => /[^A-Za-z0-9]/.test(e)
|
|
4814
|
+
}), t.uniqueChars > 0) {
|
|
4815
|
+
let e = t.uniqueChars;
|
|
4816
|
+
n.push({
|
|
4817
|
+
key: "unique",
|
|
4818
|
+
label: `At least ${e} unique character${e > 1 ? "s" : ""}`,
|
|
4819
|
+
test: (t) => new Set(t).size >= e
|
|
4820
|
+
});
|
|
4821
|
+
}
|
|
4822
|
+
return n;
|
|
4823
|
+
}
|
|
4824
|
+
function Qt(e, t) {
|
|
4825
|
+
let n = e == null ? "" : String(e);
|
|
4826
|
+
return Zt(t).map((e) => ({
|
|
4827
|
+
key: e.key,
|
|
4828
|
+
label: e.label,
|
|
4829
|
+
met: e.test(n)
|
|
4830
|
+
}));
|
|
4591
4831
|
}
|
|
4592
4832
|
var X = (e, t) => {
|
|
4593
4833
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
4594
4834
|
};
|
|
4595
|
-
function
|
|
4596
|
-
X("wui-select",
|
|
4835
|
+
function $t() {
|
|
4836
|
+
X("wui-select", St), X("wui-phone", bt), X("wui-datepicker", qe), X("wui-date-range", Je), X("wui-dock", Ye), X("wui-feedback", tt), X("wui-slider", wt), X("wui-timepicker", Pt), X("wui-autocomplete", Le), X("wui-multiselect", it), X("wui-taginput", Dt), X("wui-otp", lt), X("wui-status-icon", we), X("wui-wizard-step", Rt), X("wui-wizard", It);
|
|
4597
4837
|
}
|
|
4598
|
-
|
|
4838
|
+
$t();
|
|
4599
4839
|
//#endregion
|
|
4600
4840
|
//#region src/components/AppPopover.jsx
|
|
4601
|
-
function
|
|
4841
|
+
function en({ trigger: e, children: t, title: r, placement: i = "bottom", triggerType: a = "click", onToggle: o, className: c = "", ...l }) {
|
|
4602
4842
|
N("AppPopover", l);
|
|
4603
4843
|
let u = s(), [f, h] = d(!1), g = (e) => {
|
|
4604
4844
|
h(e), o?.(e);
|
|
@@ -4633,13 +4873,13 @@ function Ut({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
4633
4873
|
}
|
|
4634
4874
|
//#endregion
|
|
4635
4875
|
//#region src/components/AppInfoTip.jsx
|
|
4636
|
-
function
|
|
4876
|
+
function tn({ label: e, children: t, placement: n = "auto", className: r = "", ...i }) {
|
|
4637
4877
|
N("AppInfoTip", i);
|
|
4638
4878
|
let [a, o] = d(!1), s = !!e;
|
|
4639
4879
|
return !s && !t ? null : /* @__PURE__ */ p("span", {
|
|
4640
4880
|
className: `infotip${r ? ` ${r}` : ""}`,
|
|
4641
4881
|
...i,
|
|
4642
|
-
children: /* @__PURE__ */ p(
|
|
4882
|
+
children: /* @__PURE__ */ p(en, {
|
|
4643
4883
|
trigger: /* @__PURE__ */ p("button", {
|
|
4644
4884
|
type: "button",
|
|
4645
4885
|
className: "infotip-btn",
|
|
@@ -4669,8 +4909,8 @@ function Z() {
|
|
|
4669
4909
|
}
|
|
4670
4910
|
//#endregion
|
|
4671
4911
|
//#region src/components/useWuiControl.js
|
|
4672
|
-
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: s =
|
|
4673
|
-
let d = u(null), f = r ??
|
|
4912
|
+
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: s = nn, on: c, syncDeps: l = [] } = {}) {
|
|
4913
|
+
let d = u(null), f = r ?? rn, p = i ?? an, m = (s || nn).join("\0"), h = Object.keys(c ?? {}).join("\0"), g = u({});
|
|
4674
4914
|
g.current = {
|
|
4675
4915
|
ref: e,
|
|
4676
4916
|
value: t,
|
|
@@ -4688,7 +4928,7 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
4688
4928
|
_.current = null;
|
|
4689
4929
|
}
|
|
4690
4930
|
}, []), y = a((e) => {
|
|
4691
|
-
let t = g.current.eventKey ? g.current.eventKey.split("\0") :
|
|
4931
|
+
let t = g.current.eventKey ? g.current.eventKey.split("\0") : nn, n = Object.keys(g.current.on ?? {}), r = {
|
|
4692
4932
|
el: e,
|
|
4693
4933
|
names: t,
|
|
4694
4934
|
extraNames: n,
|
|
@@ -4715,7 +4955,7 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
4715
4955
|
...l
|
|
4716
4956
|
]), o(() => {
|
|
4717
4957
|
let e = d.current, t = _.current;
|
|
4718
|
-
!e || !t || (t.names.join("\0") !== (m ||
|
|
4958
|
+
!e || !t || (t.names.join("\0") !== (m || nn.join("\0")) || t.extraNames.join("\0") !== h) && (v(), y(e));
|
|
4719
4959
|
}, [
|
|
4720
4960
|
m,
|
|
4721
4961
|
h,
|
|
@@ -4726,39 +4966,39 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
4726
4966
|
innerRef: d
|
|
4727
4967
|
};
|
|
4728
4968
|
}
|
|
4729
|
-
var
|
|
4730
|
-
function
|
|
4969
|
+
var nn = ["change"];
|
|
4970
|
+
function rn(e) {
|
|
4731
4971
|
return e.value;
|
|
4732
4972
|
}
|
|
4733
|
-
function
|
|
4973
|
+
function an(e, t) {
|
|
4734
4974
|
let n = t ?? "";
|
|
4735
4975
|
String(e.value ?? "") !== String(n) && (e.value = n);
|
|
4736
4976
|
}
|
|
4737
|
-
function
|
|
4977
|
+
function on(e, t) {
|
|
4738
4978
|
let n = e || [], r = t || [];
|
|
4739
4979
|
return n.length === r.length && n.every((e, t) => e?.value === r[t]?.value && e?.label === r[t]?.label);
|
|
4740
4980
|
}
|
|
4741
|
-
function
|
|
4981
|
+
function sn(e) {
|
|
4742
4982
|
return e.values;
|
|
4743
4983
|
}
|
|
4744
|
-
function
|
|
4984
|
+
function cn(e, t) {
|
|
4745
4985
|
let n = t || [], r = e.values || [];
|
|
4746
4986
|
(n.length !== r.length || !n.every((e, t) => e === r[t])) && (e.values = n);
|
|
4747
4987
|
}
|
|
4748
|
-
function
|
|
4988
|
+
function ln(e) {
|
|
4749
4989
|
return {
|
|
4750
4990
|
start: e.start,
|
|
4751
4991
|
end: e.end
|
|
4752
4992
|
};
|
|
4753
4993
|
}
|
|
4754
|
-
function
|
|
4994
|
+
function un(e, t) {
|
|
4755
4995
|
if (t === void 0) return;
|
|
4756
4996
|
let n = Number.parseFloat(t);
|
|
4757
4997
|
Number.isFinite(n) && e.value !== n && (e.value = n);
|
|
4758
4998
|
}
|
|
4759
4999
|
//#endregion
|
|
4760
5000
|
//#region src/components/AppAutocomplete.jsx
|
|
4761
|
-
var
|
|
5001
|
+
var dn = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeholder: i = "Search…", minChars: a, debounce: c, disabled: l = !1, size: u, allowCustom: d = !1, name: f, label: h, error: g, hint: _, required: v = !1, help: y, helpLabel: b = "More information", fieldClassName: x = "", ...S }, C) {
|
|
4762
5002
|
N("AppAutocomplete", S);
|
|
4763
5003
|
let w = typeof r == "function", T = s(), E = f || T, { setRef: D, innerRef: O } = Q({
|
|
4764
5004
|
ref: C,
|
|
@@ -4807,7 +5047,7 @@ var $t = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4807
5047
|
children: [
|
|
4808
5048
|
h,
|
|
4809
5049
|
v && /* @__PURE__ */ p(Z, {}),
|
|
4810
|
-
y && /* @__PURE__ */ p(
|
|
5050
|
+
y && /* @__PURE__ */ p(tn, {
|
|
4811
5051
|
label: b,
|
|
4812
5052
|
children: y
|
|
4813
5053
|
})
|
|
@@ -4841,14 +5081,14 @@ var $t = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4841
5081
|
}) : null
|
|
4842
5082
|
]
|
|
4843
5083
|
});
|
|
4844
|
-
}),
|
|
5084
|
+
}), fn = /* @__PURE__ */ new Set([
|
|
4845
5085
|
"xs",
|
|
4846
5086
|
"sm",
|
|
4847
5087
|
"md",
|
|
4848
5088
|
"lg",
|
|
4849
5089
|
"xl",
|
|
4850
5090
|
"2xl"
|
|
4851
|
-
]),
|
|
5091
|
+
]), pn = {
|
|
4852
5092
|
xs: 20,
|
|
4853
5093
|
sm: 24,
|
|
4854
5094
|
md: 32,
|
|
@@ -4856,30 +5096,30 @@ var $t = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
4856
5096
|
xl: 64,
|
|
4857
5097
|
"2xl": 96
|
|
4858
5098
|
};
|
|
4859
|
-
function
|
|
5099
|
+
function mn(e) {
|
|
4860
5100
|
let t = (e || "").trim();
|
|
4861
5101
|
if (!t) return "?";
|
|
4862
5102
|
let n = t.split(/\s+/).filter(Boolean);
|
|
4863
5103
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
4864
5104
|
}
|
|
4865
|
-
function
|
|
5105
|
+
function hn(e) {
|
|
4866
5106
|
let t = e || "", n = 0;
|
|
4867
5107
|
for (let e = 0; e < t.length; e += 1) n = Math.imul(n, 31) + t.charCodeAt(e) >>> 0;
|
|
4868
5108
|
return n % 360;
|
|
4869
5109
|
}
|
|
4870
|
-
function
|
|
5110
|
+
function gn(e) {
|
|
4871
5111
|
if (typeof e == "number") return e;
|
|
4872
|
-
if (
|
|
5112
|
+
if (pn[e] != null) return pn[e];
|
|
4873
5113
|
let t = Number.parseInt(e, 10);
|
|
4874
5114
|
return Number.isNaN(t) ? 32 : t;
|
|
4875
5115
|
}
|
|
4876
|
-
function
|
|
5116
|
+
function _n({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "primary", status: a = "none", ring: s = !1, label: c, icon: l, badge: u, href: h, onClick: g, linkComponent: _, className: v = "", ...y }) {
|
|
4877
5117
|
N("AppAvatar", y);
|
|
4878
5118
|
let { style: b, ...x } = y, [S, C] = d(!1);
|
|
4879
5119
|
o(() => {
|
|
4880
5120
|
C(!1);
|
|
4881
5121
|
}, [t]);
|
|
4882
|
-
let w = typeof n == "string" &&
|
|
5122
|
+
let w = typeof n == "string" && fn.has(n), T = w ? null : typeof n == "number" || /^\d+$/.test(n) ? `${n}px` : n, E = h != null || g != null, D = t != null && t !== "" && !S, O = [
|
|
4883
5123
|
"avatar",
|
|
4884
5124
|
w && n !== "md" ? `avatar-${n}` : "",
|
|
4885
5125
|
r === "circle" ? "" : `avatar-${r}`,
|
|
@@ -4888,16 +5128,16 @@ function on({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4888
5128
|
E ? "avatar-clickable" : "",
|
|
4889
5129
|
v
|
|
4890
5130
|
].filter(Boolean).join(" "), k = {};
|
|
4891
|
-
T && (k["--avatar-size"] = T), i === "auto" && (k["--avatar-hue"] =
|
|
5131
|
+
T && (k["--avatar-size"] = T), i === "auto" && (k["--avatar-hue"] = hn(e));
|
|
4892
5132
|
let A = Object.keys(k).length || b ? {
|
|
4893
5133
|
...k,
|
|
4894
5134
|
...b
|
|
4895
5135
|
} : void 0, j = /* @__PURE__ */ p("span", {
|
|
4896
5136
|
className: "avatar-face",
|
|
4897
5137
|
"aria-hidden": "true",
|
|
4898
|
-
children: l == null ?
|
|
5138
|
+
children: l == null ? mn(e) : /* @__PURE__ */ p(V, {
|
|
4899
5139
|
name: l,
|
|
4900
|
-
size: Math.round(
|
|
5140
|
+
size: Math.round(gn(n) * .55)
|
|
4901
5141
|
})
|
|
4902
5142
|
}), M = /* @__PURE__ */ m(f, { children: [
|
|
4903
5143
|
a !== "none" && /* @__PURE__ */ p("span", {
|
|
@@ -4959,7 +5199,7 @@ function on({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
4959
5199
|
}
|
|
4960
5200
|
//#endregion
|
|
4961
5201
|
//#region src/components/AppAvatarGroup.jsx
|
|
4962
|
-
var
|
|
5202
|
+
var vn = {
|
|
4963
5203
|
xs: 20,
|
|
4964
5204
|
sm: 24,
|
|
4965
5205
|
md: 32,
|
|
@@ -4967,16 +5207,16 @@ var sn = {
|
|
|
4967
5207
|
xl: 64,
|
|
4968
5208
|
"2xl": 96
|
|
4969
5209
|
};
|
|
4970
|
-
function
|
|
4971
|
-
return e == null ? null : typeof e == "number" ? `${e}px` :
|
|
5210
|
+
function yn(e) {
|
|
5211
|
+
return e == null ? null : typeof e == "number" ? `${e}px` : vn[e] == null ? /^\d+$/.test(e) ? `${e}px` : e : `${vn[e]}px`;
|
|
4972
5212
|
}
|
|
4973
|
-
function
|
|
5213
|
+
function bn({ children: e, size: t, spacing: n = "normal", overflow: r, className: i = "", ...a }) {
|
|
4974
5214
|
N("AppAvatarGroup", a);
|
|
4975
5215
|
let { style: o, ...s } = a, c = [
|
|
4976
5216
|
"avatar-group",
|
|
4977
5217
|
n === "normal" ? "" : `avatar-group-${n}`,
|
|
4978
5218
|
i
|
|
4979
|
-
].filter(Boolean).join(" "), l =
|
|
5219
|
+
].filter(Boolean).join(" "), l = yn(t), u = l ? {
|
|
4980
5220
|
"--avatar-size": l,
|
|
4981
5221
|
...o
|
|
4982
5222
|
} : o, d = typeof r == "string" ? Number.parseInt(r, 10) : r;
|
|
@@ -4994,7 +5234,7 @@ function ln({ children: e, size: t, spacing: n = "normal", overflow: r, classNam
|
|
|
4994
5234
|
}
|
|
4995
5235
|
//#endregion
|
|
4996
5236
|
//#region src/components/AppBadge.jsx
|
|
4997
|
-
function
|
|
5237
|
+
function xn({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
4998
5238
|
return N("AppBadge", i), /* @__PURE__ */ p(g, {
|
|
4999
5239
|
bg: !1,
|
|
5000
5240
|
className: [
|
|
@@ -5008,18 +5248,18 @@ function un({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
|
5008
5248
|
}
|
|
5009
5249
|
//#endregion
|
|
5010
5250
|
//#region src/components/AppBanner.jsx
|
|
5011
|
-
var
|
|
5251
|
+
var Sn = [
|
|
5012
5252
|
"info",
|
|
5013
5253
|
"success",
|
|
5014
5254
|
"warning",
|
|
5015
5255
|
"danger",
|
|
5016
5256
|
"neutral"
|
|
5017
5257
|
];
|
|
5018
|
-
function
|
|
5258
|
+
function Cn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDismiss: i, className: a = "", ...o }) {
|
|
5019
5259
|
N("AppBanner", o);
|
|
5020
5260
|
let [s, c] = d(!0);
|
|
5021
5261
|
if (!s) return null;
|
|
5022
|
-
let l =
|
|
5262
|
+
let l = Sn.includes(e) ? e : "info", u = () => {
|
|
5023
5263
|
c(!1), i?.();
|
|
5024
5264
|
};
|
|
5025
5265
|
return /* @__PURE__ */ m("div", {
|
|
@@ -5050,7 +5290,7 @@ function fn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
5050
5290
|
}
|
|
5051
5291
|
//#endregion
|
|
5052
5292
|
//#region src/components/AppBreadcrumbs.jsx
|
|
5053
|
-
function
|
|
5293
|
+
function wn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
5054
5294
|
return N("AppBreadcrumbs", r), /* @__PURE__ */ p(_, {
|
|
5055
5295
|
className: n || void 0,
|
|
5056
5296
|
...r,
|
|
@@ -5069,17 +5309,17 @@ function pn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
5069
5309
|
}
|
|
5070
5310
|
//#endregion
|
|
5071
5311
|
//#region src/components/AppCallout.jsx
|
|
5072
|
-
var
|
|
5312
|
+
var Tn = {
|
|
5073
5313
|
info: "info",
|
|
5074
5314
|
success: "check",
|
|
5075
5315
|
warning: "alert-triangle",
|
|
5076
5316
|
danger: "x"
|
|
5077
5317
|
};
|
|
5078
|
-
function
|
|
5318
|
+
function En({ children: e, tone: t = "info", title: n, icon: r, image: i, imageAlt: a = "", size: o = "md", bordered: s = !0, action: c, dismissible: l = !1, onDismiss: u, className: f = "", ...h }) {
|
|
5079
5319
|
N("AppCallout", h);
|
|
5080
5320
|
let [g, _] = d(!0);
|
|
5081
5321
|
if (!g) return null;
|
|
5082
|
-
let v = r === void 0 ?
|
|
5322
|
+
let v = r === void 0 ? Tn[t] : r === "none" ? null : r, y = !!i, b = y || !!v, x = b && !!n && e != null && e !== !1 && e !== "", S = x ? 13 : 11;
|
|
5083
5323
|
return /* @__PURE__ */ m("div", {
|
|
5084
5324
|
className: [
|
|
5085
5325
|
"info-callout",
|
|
@@ -5129,13 +5369,13 @@ function hn({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
5129
5369
|
}
|
|
5130
5370
|
//#endregion
|
|
5131
5371
|
//#region src/components/AppCard.jsx
|
|
5132
|
-
var
|
|
5372
|
+
var Dn = {
|
|
5133
5373
|
xs: 320,
|
|
5134
5374
|
sm: 420,
|
|
5135
5375
|
md: 560,
|
|
5136
5376
|
lg: 720
|
|
5137
5377
|
};
|
|
5138
|
-
function
|
|
5378
|
+
function On({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", header: i, headerExtra: a, headerActions: o, footer: s, media: c, children: l, variant: u = "default", tone: d = "primary", padding: h = "md", maxWidth: g, className: _ = "", bodyClassName: v = "", headerClassName: b = "", body: x = !0, lifted: S = !1, href: C, onClick: w, linkComponent: T, ...E }) {
|
|
5139
5379
|
N("AppCard", E);
|
|
5140
5380
|
let { style: D, ...O } = E, k = C != null || w != null, A = [
|
|
5141
5381
|
u && u !== "default" ? `card-${u}` : "",
|
|
@@ -5145,7 +5385,7 @@ function _n({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5145
5385
|
g == null ? "" : "card-constrained",
|
|
5146
5386
|
k ? "card-clickable" : "",
|
|
5147
5387
|
_
|
|
5148
|
-
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 :
|
|
5388
|
+
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 : Dn[g] == null ? typeof g == "number" ? `${g}px` : g : `${Dn[g]}px`, M = j ? {
|
|
5149
5389
|
"--card-max-width": j,
|
|
5150
5390
|
...D
|
|
5151
5391
|
} : D, P = {};
|
|
@@ -5216,7 +5456,7 @@ function _n({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5216
5456
|
}
|
|
5217
5457
|
//#endregion
|
|
5218
5458
|
//#region src/lib/CheckField.jsx
|
|
5219
|
-
var
|
|
5459
|
+
var kn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", rest: o = {}, inputType: c, wrapperClass: l }, u) {
|
|
5220
5460
|
let d = s(), f = t || d;
|
|
5221
5461
|
return /* @__PURE__ */ m("div", {
|
|
5222
5462
|
className: `${l}${a ? ` ${a}` : ""}`,
|
|
@@ -5244,8 +5484,8 @@ var vn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5244
5484
|
}) : null
|
|
5245
5485
|
]
|
|
5246
5486
|
});
|
|
5247
|
-
}),
|
|
5248
|
-
return N("AppCheckbox", o), /* @__PURE__ */ p(
|
|
5487
|
+
}), An = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
5488
|
+
return N("AppCheckbox", o), /* @__PURE__ */ p(kn, {
|
|
5249
5489
|
ref: s,
|
|
5250
5490
|
label: e,
|
|
5251
5491
|
id: t,
|
|
@@ -5260,7 +5500,7 @@ var vn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5260
5500
|
});
|
|
5261
5501
|
//#endregion
|
|
5262
5502
|
//#region src/components/AppChip.jsx
|
|
5263
|
-
function
|
|
5503
|
+
function jn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", size: i = "md", leadingIcon: a, avatar: o, onRemove: s, onClick: c, disabled: l = !1, removeLabel: u, className: d = "", ...h }) {
|
|
5264
5504
|
N("AppChip", h);
|
|
5265
5505
|
let g = e ?? t, _ = [
|
|
5266
5506
|
"chip",
|
|
@@ -5314,7 +5554,7 @@ function bn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5314
5554
|
}
|
|
5315
5555
|
//#endregion
|
|
5316
5556
|
//#region src/components/AppChoiceCard.jsx
|
|
5317
|
-
function
|
|
5557
|
+
function Mn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon: a, iconNode: o, iconSize: s = 18, image: c, imageAlt: l = "", children: u, title: d, description: h, checkIcon: g = "check", checkSize: _ = 18, className: v = "", ...y }) {
|
|
5318
5558
|
return N("AppChoiceCard", y), /* @__PURE__ */ m("label", {
|
|
5319
5559
|
className: `struct-card${c ? " struct-card-img-card" : ""}${r ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
5320
5560
|
...y,
|
|
@@ -5363,7 +5603,7 @@ function xn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5363
5603
|
}
|
|
5364
5604
|
//#endregion
|
|
5365
5605
|
//#region src/components/AppChoiceChip.jsx
|
|
5366
|
-
function
|
|
5606
|
+
function Nn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChange: a, children: o, count: s, size: c = "md", className: l = "", ...u }) {
|
|
5367
5607
|
return N("AppChoiceChip", u), /* @__PURE__ */ m("label", {
|
|
5368
5608
|
className: `choice-chip${i ? " checked" : ""}${c === "sm" ? " choice-chip-sm" : c === "lg" ? " choice-chip-lg" : ""}${l ? ` ${l}` : ""}`,
|
|
5369
5609
|
...u,
|
|
@@ -5385,31 +5625,31 @@ function Sn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChang
|
|
|
5385
5625
|
}
|
|
5386
5626
|
//#endregion
|
|
5387
5627
|
//#region src/components/AppColorField.jsx
|
|
5388
|
-
function
|
|
5389
|
-
N("AppColorField",
|
|
5390
|
-
let
|
|
5628
|
+
function Pn({ value: e = "#000000", onChange: t, label: n, required: r = !1, error: i, hint: a, name: o, id: c, disabled: l = !1, size: u = "md", className: d = "", fieldClassName: f = "", ...h }) {
|
|
5629
|
+
N("AppColorField", h);
|
|
5630
|
+
let g = s(), _ = c || g, v = (e) => /^#[0-9a-f]{6}$/i.test(e), y = u === "sm" ? " color-field-sm" : u === "lg" ? " color-field-lg" : "", b = u === "sm" ? " input-sm" : u === "lg" ? " input-lg" : "";
|
|
5391
5631
|
return /* @__PURE__ */ m("div", {
|
|
5392
|
-
className: `field${
|
|
5632
|
+
className: `field${f ? ` ${f}` : ""}`,
|
|
5393
5633
|
children: [
|
|
5394
5634
|
n && /* @__PURE__ */ m("label", {
|
|
5395
5635
|
className: "label",
|
|
5396
|
-
htmlFor:
|
|
5636
|
+
htmlFor: _,
|
|
5397
5637
|
children: [n, r && /* @__PURE__ */ p(Z, {})]
|
|
5398
5638
|
}),
|
|
5399
5639
|
/* @__PURE__ */ m("div", {
|
|
5400
|
-
className: `color-field${
|
|
5640
|
+
className: `color-field${y}`,
|
|
5401
5641
|
children: [/* @__PURE__ */ p("input", {
|
|
5402
5642
|
type: "color",
|
|
5403
5643
|
className: "color-field-swatch",
|
|
5404
|
-
value:
|
|
5644
|
+
value: v(e) ? e : "#000000",
|
|
5405
5645
|
onChange: (e) => t?.(e.target.value),
|
|
5406
5646
|
disabled: l,
|
|
5407
5647
|
"aria-label": `${n || "Colour"} — colour picker`,
|
|
5408
5648
|
tabIndex: -1
|
|
5409
5649
|
}), /* @__PURE__ */ p("input", {
|
|
5410
5650
|
type: "text",
|
|
5411
|
-
className: `input color-field-hex${
|
|
5412
|
-
id:
|
|
5651
|
+
className: `input color-field-hex${b}${i ? " error" : ""}${d ? ` ${d}` : ""}`,
|
|
5652
|
+
id: _,
|
|
5413
5653
|
name: o,
|
|
5414
5654
|
value: e,
|
|
5415
5655
|
onChange: (e) => t?.(e.target.value),
|
|
@@ -5419,7 +5659,7 @@ function Cn({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
5419
5659
|
required: r,
|
|
5420
5660
|
disabled: l,
|
|
5421
5661
|
"aria-invalid": i ? "true" : "false",
|
|
5422
|
-
...
|
|
5662
|
+
...h
|
|
5423
5663
|
})]
|
|
5424
5664
|
}),
|
|
5425
5665
|
i ? /* @__PURE__ */ p("div", {
|
|
@@ -5434,7 +5674,7 @@ function Cn({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
5434
5674
|
}
|
|
5435
5675
|
//#endregion
|
|
5436
5676
|
//#region src/components/AppCompareTable.jsx
|
|
5437
|
-
function
|
|
5677
|
+
function Fn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i }) {
|
|
5438
5678
|
N("AppCompareTable", i);
|
|
5439
5679
|
let a = (e) => e === !0 ? /* @__PURE__ */ p("span", {
|
|
5440
5680
|
className: "compare-yes",
|
|
@@ -5471,67 +5711,92 @@ function wn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5471
5711
|
}
|
|
5472
5712
|
//#endregion
|
|
5473
5713
|
//#region src/components/AppInput.jsx
|
|
5474
|
-
var
|
|
5475
|
-
N("AppInput",
|
|
5476
|
-
let [
|
|
5477
|
-
|
|
5478
|
-
},
|
|
5714
|
+
var In = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", type: c = "text", size: l = "md", leftIcon: f, rightIcon: h, onRightIconClick: g, rightIconLabel: _, unit: v, id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, clearable: T = !1, showCount: E = !1, maxLength: D, prefix: O, suffix: k, action: A, floatingLabel: j = !1, variant: M, passwordRequirements: P = !1, requirementsPlacement: F = "auto", ...I }, L) {
|
|
5715
|
+
N("AppInput", I);
|
|
5716
|
+
let [R, ee] = d(!1), te = s(), z = y || te, B = c === "password", ne = B && R ? "text" : c, re = u(null), ie = (e) => {
|
|
5717
|
+
re.current = e, typeof L == "function" ? L(e) : L && (L.current = e);
|
|
5718
|
+
}, ae = String(I.value ?? I.defaultValue ?? ""), [oe, se] = d(() => !!ae), [ce, le] = d(() => ae.length), ue = T && !w, H = T || E, de = B && !!P, [fe, pe] = d(ae);
|
|
5479
5719
|
o(() => {
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5720
|
+
!de || I.value === void 0 || pe(String(I.value ?? ""));
|
|
5721
|
+
}, [I.value, de]), o(() => {
|
|
5722
|
+
if (!H || I.value === void 0) return;
|
|
5723
|
+
let e = String(I.value ?? "");
|
|
5724
|
+
se(!!e), le(e.length);
|
|
5725
|
+
}, [I.value, H]);
|
|
5726
|
+
let me = (e) => {
|
|
5727
|
+
se(!!e.target.value), le(e.target.value.length), I.onInput?.(e);
|
|
5728
|
+
}, he = (e) => {
|
|
5729
|
+
de && pe(e.target.value), H ? me(e) : I.onInput?.(e);
|
|
5730
|
+
}, ge = ue ? /* @__PURE__ */ p("button", {
|
|
5487
5731
|
type: "button",
|
|
5488
5732
|
className: "input-clear",
|
|
5489
5733
|
onClick: () => {
|
|
5490
|
-
let e =
|
|
5734
|
+
let e = re.current;
|
|
5491
5735
|
if (!e) return;
|
|
5492
5736
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
5493
|
-
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })),
|
|
5737
|
+
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), se(!1), e.focus();
|
|
5494
5738
|
},
|
|
5495
5739
|
"aria-label": "Clear",
|
|
5496
5740
|
tabIndex: -1,
|
|
5497
|
-
hidden: !
|
|
5741
|
+
hidden: !oe,
|
|
5498
5742
|
children: /* @__PURE__ */ p(V, {
|
|
5499
5743
|
name: "x",
|
|
5500
5744
|
size: 16
|
|
5501
5745
|
})
|
|
5502
|
-
}) : null,
|
|
5746
|
+
}) : null, U = n && z ? `${z}-error` : void 0, _e = r && z ? `${z}-hint` : void 0, ve = U || _e, ye = [
|
|
5503
5747
|
"input",
|
|
5504
5748
|
l === "sm" ? "input-sm" : "",
|
|
5505
5749
|
l === "lg" ? "input-lg" : "",
|
|
5506
5750
|
n ? "error" : "",
|
|
5507
|
-
|
|
5751
|
+
B ? "pw" : "",
|
|
5508
5752
|
v ? "num-input" : "",
|
|
5509
|
-
!(j && e || O || k || v ||
|
|
5753
|
+
!(j && e || O || k || v || B || h) && T && ue ? "has-clear" : "",
|
|
5510
5754
|
M === "bare" ? "input-bare" : "",
|
|
5511
5755
|
S
|
|
5512
|
-
].filter(Boolean).join(" "),
|
|
5513
|
-
id:
|
|
5756
|
+
].filter(Boolean).join(" "), W = /* @__PURE__ */ p(x.Control, {
|
|
5757
|
+
id: z,
|
|
5514
5758
|
name: b,
|
|
5515
|
-
type:
|
|
5516
|
-
className:
|
|
5759
|
+
type: ne,
|
|
5760
|
+
className: ye,
|
|
5517
5761
|
disabled: w,
|
|
5518
5762
|
required: t,
|
|
5519
5763
|
"aria-invalid": n ? "true" : "false",
|
|
5520
|
-
"aria-describedby":
|
|
5764
|
+
"aria-describedby": ve,
|
|
5521
5765
|
maxLength: D,
|
|
5522
|
-
...
|
|
5523
|
-
placeholder: j ? " " :
|
|
5524
|
-
ref:
|
|
5525
|
-
onInput:
|
|
5526
|
-
}),
|
|
5527
|
-
|
|
5766
|
+
...I,
|
|
5767
|
+
placeholder: j ? " " : I.placeholder,
|
|
5768
|
+
ref: ie,
|
|
5769
|
+
onInput: H || de ? he : I.onInput
|
|
5770
|
+
}), be = P === !0 || P, xe = be && typeof be == "object" && be.title || "Password Requirements", Se = de ? Qt(fe, be) : null, Ce = de ? /* @__PURE__ */ p("ul", {
|
|
5771
|
+
className: "pw-criteria",
|
|
5772
|
+
"aria-live": "polite",
|
|
5773
|
+
children: Se.map((e) => /* @__PURE__ */ m("li", {
|
|
5774
|
+
className: `pw-rule ${e.met ? "met" : "unmet"}`,
|
|
5775
|
+
children: [
|
|
5776
|
+
/* @__PURE__ */ p("span", {
|
|
5777
|
+
className: "pw-mark",
|
|
5778
|
+
"aria-hidden": "true"
|
|
5779
|
+
}),
|
|
5780
|
+
/* @__PURE__ */ p("span", {
|
|
5781
|
+
className: "pw-rule-text",
|
|
5782
|
+
children: e.label
|
|
5783
|
+
}),
|
|
5784
|
+
/* @__PURE__ */ p("span", {
|
|
5785
|
+
className: "visually-hidden",
|
|
5786
|
+
children: e.met ? " — met" : " — not met"
|
|
5787
|
+
})
|
|
5788
|
+
]
|
|
5789
|
+
}, e.key))
|
|
5790
|
+
}) : null, we;
|
|
5791
|
+
if (j && e) we = /* @__PURE__ */ m("div", {
|
|
5528
5792
|
className: "field-float",
|
|
5529
|
-
children: [
|
|
5793
|
+
children: [W, /* @__PURE__ */ m("label", {
|
|
5530
5794
|
className: "float-label",
|
|
5531
|
-
htmlFor:
|
|
5795
|
+
htmlFor: z,
|
|
5532
5796
|
children: [e, t && /* @__PURE__ */ p(Z, {})]
|
|
5533
5797
|
})]
|
|
5534
|
-
})
|
|
5798
|
+
});
|
|
5799
|
+
else if (A) we = /* @__PURE__ */ m("div", {
|
|
5535
5800
|
className: "input-action-row",
|
|
5536
5801
|
children: [/* @__PURE__ */ m("div", {
|
|
5537
5802
|
className: f ? "input-icon" : "input-wrap",
|
|
@@ -5541,56 +5806,69 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5541
5806
|
name: f,
|
|
5542
5807
|
size: 16
|
|
5543
5808
|
})
|
|
5544
|
-
}),
|
|
5809
|
+
}), W]
|
|
5545
5810
|
}), /* @__PURE__ */ p("div", {
|
|
5546
5811
|
className: "input-action",
|
|
5547
5812
|
children: A
|
|
5548
5813
|
})]
|
|
5549
|
-
})
|
|
5814
|
+
});
|
|
5815
|
+
else if (O || k) we = /* @__PURE__ */ m("div", {
|
|
5550
5816
|
className: "input-affixed",
|
|
5551
5817
|
children: [
|
|
5552
5818
|
O != null && /* @__PURE__ */ p("span", {
|
|
5553
5819
|
className: "affix affix-pre",
|
|
5554
5820
|
children: O
|
|
5555
5821
|
}),
|
|
5556
|
-
|
|
5822
|
+
W,
|
|
5557
5823
|
k != null && /* @__PURE__ */ p("span", {
|
|
5558
5824
|
className: "affix affix-suf",
|
|
5559
5825
|
children: k
|
|
5560
5826
|
})
|
|
5561
5827
|
]
|
|
5562
|
-
})
|
|
5828
|
+
});
|
|
5829
|
+
else if (v) we = /* @__PURE__ */ m("div", {
|
|
5563
5830
|
className: "input-with-unit",
|
|
5564
|
-
children: [
|
|
5831
|
+
children: [W, /* @__PURE__ */ p("span", {
|
|
5565
5832
|
className: "unit",
|
|
5566
5833
|
children: v
|
|
5567
5834
|
})]
|
|
5568
|
-
})
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
f
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5835
|
+
});
|
|
5836
|
+
else if (B) {
|
|
5837
|
+
let e = /* @__PURE__ */ m("div", {
|
|
5838
|
+
className: f ? "input-icon" : "input-wrap",
|
|
5839
|
+
children: [
|
|
5840
|
+
f && /* @__PURE__ */ p("span", {
|
|
5841
|
+
className: "ic",
|
|
5842
|
+
children: /* @__PURE__ */ p(V, {
|
|
5843
|
+
name: f,
|
|
5844
|
+
size: 16
|
|
5845
|
+
})
|
|
5846
|
+
}),
|
|
5847
|
+
W,
|
|
5848
|
+
/* @__PURE__ */ p("button", {
|
|
5849
|
+
type: "button",
|
|
5850
|
+
className: "pw-toggle",
|
|
5851
|
+
onClick: () => ee((e) => !e),
|
|
5852
|
+
"aria-label": R ? "Hide password" : "Show password",
|
|
5853
|
+
tabIndex: -1,
|
|
5854
|
+
children: /* @__PURE__ */ p(V, {
|
|
5855
|
+
name: R ? "eye-off" : "eye",
|
|
5856
|
+
size: 18
|
|
5857
|
+
})
|
|
5588
5858
|
})
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5859
|
+
]
|
|
5860
|
+
});
|
|
5861
|
+
we = de ? /* @__PURE__ */ p(en, {
|
|
5862
|
+
trigger: e,
|
|
5863
|
+
triggerType: "focus",
|
|
5864
|
+
placement: F,
|
|
5865
|
+
title: xe,
|
|
5866
|
+
className: "pw-popover",
|
|
5867
|
+
children: Ce
|
|
5868
|
+
}) : e;
|
|
5869
|
+
} else we = h ? /* @__PURE__ */ m("div", {
|
|
5592
5870
|
className: "input-wrap",
|
|
5593
|
-
children: [
|
|
5871
|
+
children: [W, /* @__PURE__ */ p("button", {
|
|
5594
5872
|
type: "button",
|
|
5595
5873
|
className: "pw-toggle",
|
|
5596
5874
|
onClick: g,
|
|
@@ -5612,8 +5890,8 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5612
5890
|
size: 16
|
|
5613
5891
|
})
|
|
5614
5892
|
}),
|
|
5615
|
-
|
|
5616
|
-
|
|
5893
|
+
W,
|
|
5894
|
+
ge
|
|
5617
5895
|
]
|
|
5618
5896
|
}) : f ? /* @__PURE__ */ m("div", {
|
|
5619
5897
|
className: "input-icon",
|
|
@@ -5623,66 +5901,67 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5623
5901
|
name: f,
|
|
5624
5902
|
size: 16
|
|
5625
5903
|
})
|
|
5626
|
-
}),
|
|
5627
|
-
}) :
|
|
5904
|
+
}), W]
|
|
5905
|
+
}) : W;
|
|
5906
|
+
return /* @__PURE__ */ m(x.Group, {
|
|
5628
5907
|
className: `field${C ? ` ${C}` : ""}`,
|
|
5629
5908
|
children: [
|
|
5630
5909
|
e && !j && /* @__PURE__ */ m(x.Label, {
|
|
5631
5910
|
className: "label",
|
|
5632
|
-
htmlFor:
|
|
5911
|
+
htmlFor: z,
|
|
5633
5912
|
children: [
|
|
5634
5913
|
e,
|
|
5635
5914
|
t && /* @__PURE__ */ p(Z, {}),
|
|
5636
|
-
i && /* @__PURE__ */ p(
|
|
5915
|
+
i && /* @__PURE__ */ p(tn, {
|
|
5637
5916
|
label: a,
|
|
5638
5917
|
children: i
|
|
5639
5918
|
})
|
|
5640
5919
|
]
|
|
5641
5920
|
}),
|
|
5642
|
-
|
|
5921
|
+
we,
|
|
5643
5922
|
n ? /* @__PURE__ */ p("div", {
|
|
5644
5923
|
className: "field-error",
|
|
5645
|
-
id:
|
|
5924
|
+
id: U,
|
|
5646
5925
|
children: n
|
|
5647
5926
|
}) : r ? /* @__PURE__ */ p("div", {
|
|
5648
5927
|
className: "field-hint",
|
|
5649
|
-
id:
|
|
5928
|
+
id: _e,
|
|
5650
5929
|
children: r
|
|
5651
5930
|
}) : null,
|
|
5652
5931
|
E && /* @__PURE__ */ m("div", {
|
|
5653
|
-
className: `field-count${D &&
|
|
5654
|
-
children: [
|
|
5932
|
+
className: `field-count${D && ce >= D ? " at-limit" : ""}`,
|
|
5933
|
+
children: [ce, D ? ` / ${D}` : ""]
|
|
5655
5934
|
})
|
|
5656
5935
|
]
|
|
5657
5936
|
});
|
|
5658
|
-
}),
|
|
5937
|
+
}), Ln = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", Rn = {
|
|
5659
5938
|
sm: 380,
|
|
5660
5939
|
md: 440,
|
|
5661
5940
|
lg: 640,
|
|
5662
5941
|
xl: 880
|
|
5663
|
-
},
|
|
5664
|
-
function
|
|
5942
|
+
}, zn = !1;
|
|
5943
|
+
function Bn() {
|
|
5665
5944
|
let e = !0;
|
|
5666
5945
|
try {
|
|
5667
5946
|
e = process.env.NODE_ENV !== "production";
|
|
5668
5947
|
} catch {
|
|
5669
5948
|
e = !0;
|
|
5670
5949
|
}
|
|
5671
|
-
!e ||
|
|
5950
|
+
!e || zn || (zn = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
5672
5951
|
}
|
|
5673
|
-
function
|
|
5674
|
-
N("AppModal", b),
|
|
5952
|
+
function Vn({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a = "default", dismissible: s = !0, onClose: c, footer: l, size: d = "md", placement: f = "center", hideHeader: h = !1, staticBackdrop: g = !1, ariaLabel: _, className: v = "", children: y, ...b }) {
|
|
5953
|
+
N("AppModal", b), U("AppModal", "size", typeof d == "string" ? d : null, Object.keys(Rn));
|
|
5675
5954
|
let { style: x, ...C } = b;
|
|
5676
|
-
h && !_ && typeof n != "string" &&
|
|
5955
|
+
h && !_ && typeof n != "string" && Bn();
|
|
5677
5956
|
let w = u(null);
|
|
5678
5957
|
o(() => {
|
|
5679
5958
|
if (!e) return;
|
|
5680
5959
|
let t = w.current?.closest(".modal-content");
|
|
5681
5960
|
if (!t) return;
|
|
5682
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
5961
|
+
let n = () => Array.from(t.querySelectorAll(Ln));
|
|
5683
5962
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
5684
5963
|
}, [e]);
|
|
5685
|
-
let T = typeof d == "number" ? d :
|
|
5964
|
+
let T = typeof d == "number" ? d : Rn[d] ?? Rn.md, E = [
|
|
5686
5965
|
"wui-modal",
|
|
5687
5966
|
a === "default" ? "" : `tone-${a}`,
|
|
5688
5967
|
v
|
|
@@ -5767,30 +6046,30 @@ function An({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
5767
6046
|
}
|
|
5768
6047
|
//#endregion
|
|
5769
6048
|
//#region src/components/ModalIcons.jsx
|
|
5770
|
-
var
|
|
6049
|
+
var Hn = (e) => function({ size: t = 72 }) {
|
|
5771
6050
|
return /* @__PURE__ */ p("wui-status-icon", {
|
|
5772
6051
|
tone: e,
|
|
5773
6052
|
size: t
|
|
5774
6053
|
});
|
|
5775
|
-
},
|
|
5776
|
-
success:
|
|
5777
|
-
error:
|
|
5778
|
-
warning:
|
|
5779
|
-
info:
|
|
5780
|
-
delete:
|
|
6054
|
+
}, Un = {
|
|
6055
|
+
success: Hn("success"),
|
|
6056
|
+
error: Hn("error"),
|
|
6057
|
+
warning: Hn("warning"),
|
|
6058
|
+
info: Hn("info"),
|
|
6059
|
+
delete: Hn("delete")
|
|
5781
6060
|
};
|
|
5782
6061
|
//#endregion
|
|
5783
6062
|
//#region src/components/AppConfirmDialog.jsx
|
|
5784
|
-
function
|
|
6063
|
+
function Wn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", danger: a = !1, tone: s, confirmPhrase: c, onConfirm: l, onClose: u, loading: h = !1, staticBackdrop: g = !1, placement: _ = "center", className: v = "", ...y }) {
|
|
5785
6064
|
N("AppConfirmDialog", y);
|
|
5786
6065
|
let [b, x] = d("");
|
|
5787
6066
|
if (o(() => {
|
|
5788
6067
|
e || x("");
|
|
5789
6068
|
}, [e]), !e) return null;
|
|
5790
|
-
let S = !!c && b.trim() !== c, C =
|
|
6069
|
+
let S = !!c && b.trim() !== c, C = Un[s || (a ? "delete" : "info")], w = () => {
|
|
5791
6070
|
h || u?.();
|
|
5792
6071
|
};
|
|
5793
|
-
return /* @__PURE__ */ p(
|
|
6072
|
+
return /* @__PURE__ */ p(Vn, {
|
|
5794
6073
|
...y,
|
|
5795
6074
|
open: e,
|
|
5796
6075
|
hideHeader: !0,
|
|
@@ -5801,12 +6080,12 @@ function Nn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5801
6080
|
className: ["wui-confirm", v].filter(Boolean).join(" "),
|
|
5802
6081
|
footer: /* @__PURE__ */ m("div", {
|
|
5803
6082
|
className: "wui-confirm-actions",
|
|
5804
|
-
children: [/* @__PURE__ */ p(
|
|
6083
|
+
children: [/* @__PURE__ */ p(W, {
|
|
5805
6084
|
variant: "secondary",
|
|
5806
6085
|
disabled: h,
|
|
5807
6086
|
onClick: w,
|
|
5808
6087
|
children: i
|
|
5809
|
-
}), /* @__PURE__ */ p(
|
|
6088
|
+
}), /* @__PURE__ */ p(W, {
|
|
5810
6089
|
variant: a ? "danger" : "primary",
|
|
5811
6090
|
disabled: S,
|
|
5812
6091
|
loading: h,
|
|
@@ -5831,7 +6110,7 @@ function Nn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5831
6110
|
className: "wui-confirm-msg",
|
|
5832
6111
|
children: n
|
|
5833
6112
|
}),
|
|
5834
|
-
c && /* @__PURE__ */ p(
|
|
6113
|
+
c && /* @__PURE__ */ p(In, {
|
|
5835
6114
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
5836
6115
|
label: /* @__PURE__ */ m(f, { children: [
|
|
5837
6116
|
"Type ",
|
|
@@ -5849,13 +6128,13 @@ function Nn({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5849
6128
|
}
|
|
5850
6129
|
//#endregion
|
|
5851
6130
|
//#region src/components/AppCopyButton.jsx
|
|
5852
|
-
var
|
|
6131
|
+
var Gn = {
|
|
5853
6132
|
sm: 14,
|
|
5854
6133
|
md: 16,
|
|
5855
6134
|
lg: 20
|
|
5856
6135
|
};
|
|
5857
|
-
function
|
|
5858
|
-
N("AppCopyButton", l),
|
|
6136
|
+
function Kn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r = !1, size: i = "md", variant: o = "ghost", onCopied: s, className: c = "", ...l }) {
|
|
6137
|
+
N("AppCopyButton", l), U("AppCopyButton", "size", i, Object.keys(Gn));
|
|
5859
6138
|
let [u, f] = d(!1), m = a(async () => {
|
|
5860
6139
|
try {
|
|
5861
6140
|
if (navigator.clipboard?.writeText) {
|
|
@@ -5873,11 +6152,11 @@ function Fn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5873
6152
|
return r ? /* @__PURE__ */ p(de, {
|
|
5874
6153
|
icon: g,
|
|
5875
6154
|
label: h,
|
|
5876
|
-
size:
|
|
6155
|
+
size: Gn[i] ?? Gn.md,
|
|
5877
6156
|
onClick: m,
|
|
5878
6157
|
className: c,
|
|
5879
6158
|
...l
|
|
5880
|
-
}) : /* @__PURE__ */ p(
|
|
6159
|
+
}) : /* @__PURE__ */ p(W, {
|
|
5881
6160
|
leftIcon: g,
|
|
5882
6161
|
variant: o,
|
|
5883
6162
|
size: i,
|
|
@@ -5890,7 +6169,7 @@ function Fn({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5890
6169
|
}
|
|
5891
6170
|
//#endregion
|
|
5892
6171
|
//#region src/components/AppSkeleton.jsx
|
|
5893
|
-
function
|
|
6172
|
+
function qn({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "", style: i, ...a }) {
|
|
5894
6173
|
return N("AppSkeleton", a), /* @__PURE__ */ p("span", {
|
|
5895
6174
|
className: `skeleton${r ? ` ${r}` : ""}`,
|
|
5896
6175
|
"aria-hidden": "true",
|
|
@@ -5903,28 +6182,28 @@ function In({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "
|
|
|
5903
6182
|
...a
|
|
5904
6183
|
});
|
|
5905
6184
|
}
|
|
5906
|
-
function
|
|
5907
|
-
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ p("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p(
|
|
6185
|
+
function Jn({ rows: e = 4, cols: t = 5 }) {
|
|
6186
|
+
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ p("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p(qn, {
|
|
5908
6187
|
width: t === 0 ? "70%" : "50%",
|
|
5909
6188
|
height: 12
|
|
5910
6189
|
}) }, `col-${t}`)) }, `row-${n}`));
|
|
5911
6190
|
}
|
|
5912
6191
|
//#endregion
|
|
5913
6192
|
//#region src/lib/pageWindow.js
|
|
5914
|
-
var
|
|
6193
|
+
var Yn = (e, t) => {
|
|
5915
6194
|
let n = [];
|
|
5916
6195
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
5917
6196
|
return n;
|
|
5918
6197
|
};
|
|
5919
|
-
function
|
|
6198
|
+
function Xn(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
5920
6199
|
let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
|
|
5921
|
-
if (i <= n * 2 + 3 + r * 2) return
|
|
5922
|
-
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u =
|
|
5923
|
-
return u.push(...c ? ["ellipsis-left"] :
|
|
6200
|
+
if (i <= n * 2 + 3 + r * 2) return Yn(1, i);
|
|
6201
|
+
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u = Yn(1, r);
|
|
6202
|
+
return u.push(...c ? ["ellipsis-left"] : Yn(r + 1, o - 1)), u.push(...Yn(o, s)), u.push(...l ? ["ellipsis-right"] : Yn(s + 1, i - r)), u.push(...Yn(i - r + 1, i)), u;
|
|
5924
6203
|
}
|
|
5925
6204
|
//#endregion
|
|
5926
6205
|
//#region src/components/AppSelectMini.jsx
|
|
5927
|
-
function
|
|
6206
|
+
function Zn({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", name: i, ariaLabel: a, id: s, disabled: c, size: l, icon: u, prefix: d, className: f, ...m }) {
|
|
5928
6207
|
N("AppSelectMini", m);
|
|
5929
6208
|
let { setRef: h, innerRef: g } = Q({
|
|
5930
6209
|
value: e ?? "",
|
|
@@ -5938,7 +6217,7 @@ function Bn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5938
6217
|
label: e.label ?? e.text ?? "",
|
|
5939
6218
|
icon: e.icon
|
|
5940
6219
|
}));
|
|
5941
|
-
|
|
6220
|
+
on(t, e.options) || (e.options = t);
|
|
5942
6221
|
}, [n, g]), o(() => {
|
|
5943
6222
|
let e = g.current;
|
|
5944
6223
|
if (e) for (let [t, n] of [["icon", u], ["prefix", d]]) n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
@@ -5961,22 +6240,22 @@ function Bn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5961
6240
|
}
|
|
5962
6241
|
//#endregion
|
|
5963
6242
|
//#region src/components/AppTablePagination.jsx
|
|
5964
|
-
var
|
|
6243
|
+
var Qn = [
|
|
5965
6244
|
5,
|
|
5966
6245
|
10,
|
|
5967
6246
|
25,
|
|
5968
6247
|
50
|
|
5969
6248
|
];
|
|
5970
|
-
function
|
|
6249
|
+
function $n({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRow: a, onPageChange: o, onPageSizeChange: s, pageSizes: c = Qn, mode: l = "prev-next", showPageSize: u = !0, className: d = "", ...f }) {
|
|
5971
6250
|
N("AppTablePagination", f);
|
|
5972
|
-
let h = l === "numbered", g = h ?
|
|
6251
|
+
let h = l === "numbered", g = h ? Xn(e, t) : null;
|
|
5973
6252
|
return /* @__PURE__ */ m("div", {
|
|
5974
6253
|
className: `table-pagination${d ? ` ${d}` : ""}`,
|
|
5975
6254
|
...f,
|
|
5976
6255
|
children: [
|
|
5977
6256
|
u && /* @__PURE__ */ m("span", {
|
|
5978
6257
|
className: "tpg-rows",
|
|
5979
|
-
children: ["Rows per page:", /* @__PURE__ */ p(
|
|
6258
|
+
children: ["Rows per page:", /* @__PURE__ */ p(Zn, {
|
|
5980
6259
|
value: n,
|
|
5981
6260
|
onChange: (e) => s(Number(e)),
|
|
5982
6261
|
ariaLabel: "Rows per page",
|
|
@@ -6040,13 +6319,13 @@ function Hn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
6040
6319
|
}
|
|
6041
6320
|
//#endregion
|
|
6042
6321
|
//#region src/components/AppDataTable.jsx
|
|
6043
|
-
function
|
|
6322
|
+
function er(e) {
|
|
6044
6323
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
6045
6324
|
}
|
|
6046
|
-
function
|
|
6325
|
+
function tr(e) {
|
|
6047
6326
|
return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
|
|
6048
6327
|
}
|
|
6049
|
-
function
|
|
6328
|
+
function nr({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a, loading: o = !1, skeletonRows: s = 5, empty: c = "No records found.", emptyFiltered: l, sourceCount: u, rowActions: h, rowActionsLabel: g, pagination: _, ariaLabel: v, className: y = "", wrapperClassName: b = "", selectable: x = !1, selectedIds: S, onToggleRow: C, onToggleAll: w, renderExpanded: T, ...E }) {
|
|
6050
6329
|
N("AppDataTable", E);
|
|
6051
6330
|
let D = typeof T == "function", [O, k] = d(() => /* @__PURE__ */ new Set()), A = (e) => k((t) => {
|
|
6052
6331
|
let n = new Set(t);
|
|
@@ -6056,6 +6335,7 @@ function Gn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6056
6335
|
}, L = l !== void 0 && u > 0 ? l : c;
|
|
6057
6336
|
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
6058
6337
|
className: `table-wrap${b ? ` ${b}` : ""}`,
|
|
6338
|
+
tabIndex: 0,
|
|
6059
6339
|
...E,
|
|
6060
6340
|
children: /* @__PURE__ */ m("table", {
|
|
6061
6341
|
className: `table table-ledger${y ? ` ${y}` : ""}`,
|
|
@@ -6082,7 +6362,7 @@ function Gn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6082
6362
|
e.map((e, t) => {
|
|
6083
6363
|
let n = !!(e.sortable && a), r = i && i.key === e.key;
|
|
6084
6364
|
return /* @__PURE__ */ m("th", {
|
|
6085
|
-
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") +
|
|
6365
|
+
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") + er(e.align),
|
|
6086
6366
|
style: e.width ? { width: e.width } : void 0,
|
|
6087
6367
|
tabIndex: n ? 0 : void 0,
|
|
6088
6368
|
"aria-sort": r ? i.dir === "asc" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
@@ -6109,7 +6389,7 @@ function Gn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6109
6389
|
children: "Actions"
|
|
6110
6390
|
})
|
|
6111
6391
|
}))
|
|
6112
|
-
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(
|
|
6392
|
+
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(Jn, {
|
|
6113
6393
|
rows: s,
|
|
6114
6394
|
cols: j
|
|
6115
6395
|
}) : n?.length ? n.map((n, i) => {
|
|
@@ -6143,9 +6423,9 @@ function Gn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6143
6423
|
})
|
|
6144
6424
|
}),
|
|
6145
6425
|
e.map((e, t) => /* @__PURE__ */ p("td", {
|
|
6146
|
-
className: (t === 0 ? "wui-name-cell " : "") +
|
|
6426
|
+
className: (t === 0 ? "wui-name-cell " : "") + er(e.align) + (e.cellClassName ? ` ${e.cellClassName}` : ""),
|
|
6147
6427
|
style: e.cellStyle,
|
|
6148
|
-
children: e.render ? e.render(n) :
|
|
6428
|
+
children: e.render ? e.render(n) : tr(n[e.key])
|
|
6149
6429
|
}, e.key)),
|
|
6150
6430
|
h && /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p("div", {
|
|
6151
6431
|
className: "u-row-actions",
|
|
@@ -6169,7 +6449,7 @@ function Gn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6169
6449
|
}) : L
|
|
6170
6450
|
}) }) })]
|
|
6171
6451
|
})
|
|
6172
|
-
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(
|
|
6452
|
+
}), _ && !o && _.total > 0 && /* @__PURE__ */ p($n, {
|
|
6173
6453
|
page: _.page,
|
|
6174
6454
|
totalPages: _.totalPages,
|
|
6175
6455
|
pageSize: _.pageSize,
|
|
@@ -6182,15 +6462,15 @@ function Gn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6182
6462
|
}
|
|
6183
6463
|
//#endregion
|
|
6184
6464
|
//#region src/components/AppDatePicker.jsx
|
|
6185
|
-
var
|
|
6186
|
-
N("AppDatePicker",
|
|
6187
|
-
let
|
|
6188
|
-
ref:
|
|
6465
|
+
var rr = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, placeholder: u = "Enter Date", disabled: d, size: f, firstDay: h, id: g, ariaLabel: _, className: v = "", fieldClassName: y = "", ...b }, x) {
|
|
6466
|
+
N("AppDatePicker", b);
|
|
6467
|
+
let S = s(), C = g || o || S, { setRef: w } = Q({
|
|
6468
|
+
ref: x,
|
|
6189
6469
|
value: e ?? "",
|
|
6190
6470
|
onChange: t
|
|
6191
|
-
}),
|
|
6192
|
-
ref:
|
|
6193
|
-
id:
|
|
6471
|
+
}), T = !n && !a && !i, E = a ? `${C}-error` : void 0, D = i ? `${C}-hint` : void 0, O = /* @__PURE__ */ p("wui-datepicker", {
|
|
6472
|
+
ref: w,
|
|
6473
|
+
id: C,
|
|
6194
6474
|
name: o,
|
|
6195
6475
|
min: c,
|
|
6196
6476
|
max: l,
|
|
@@ -6198,42 +6478,42 @@ var Kn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6198
6478
|
size: f || void 0,
|
|
6199
6479
|
"first-day": h == null ? void 0 : String(h),
|
|
6200
6480
|
"aria-label": _ || (typeof n == "string" ? n : void 0),
|
|
6201
|
-
"aria-describedby":
|
|
6481
|
+
"aria-describedby": E || D,
|
|
6202
6482
|
"aria-invalid": a ? "true" : void 0,
|
|
6203
6483
|
disabled: d ? "" : void 0,
|
|
6204
6484
|
required: r ? "" : void 0,
|
|
6205
|
-
className:
|
|
6206
|
-
...
|
|
6485
|
+
className: v || void 0,
|
|
6486
|
+
...b
|
|
6207
6487
|
});
|
|
6208
|
-
return
|
|
6209
|
-
className: `field${
|
|
6488
|
+
return T ? O : /* @__PURE__ */ m("div", {
|
|
6489
|
+
className: `field${y ? ` ${y}` : ""}`,
|
|
6210
6490
|
children: [
|
|
6211
6491
|
n && /* @__PURE__ */ m("label", {
|
|
6212
6492
|
className: "label",
|
|
6213
|
-
htmlFor:
|
|
6493
|
+
htmlFor: C,
|
|
6214
6494
|
children: [n, r && /* @__PURE__ */ p(Z, {})]
|
|
6215
6495
|
}),
|
|
6216
|
-
|
|
6496
|
+
O,
|
|
6217
6497
|
a && /* @__PURE__ */ p("div", {
|
|
6218
6498
|
className: "field-error",
|
|
6219
|
-
id:
|
|
6499
|
+
id: E,
|
|
6220
6500
|
children: a
|
|
6221
6501
|
}),
|
|
6222
6502
|
!a && i && /* @__PURE__ */ p("div", {
|
|
6223
6503
|
className: "field-hint",
|
|
6224
|
-
id:
|
|
6504
|
+
id: D,
|
|
6225
6505
|
children: i
|
|
6226
6506
|
})
|
|
6227
6507
|
]
|
|
6228
6508
|
});
|
|
6229
|
-
}),
|
|
6230
|
-
N("AppDateRangePicker",
|
|
6231
|
-
let
|
|
6232
|
-
ref:
|
|
6509
|
+
}), ir = i(function({ start: e, end: t, onChange: n, label: r, required: i = !1, hint: a, error: c, startName: l, endName: u, min: d, max: f, placeholder: h = "Start – End", disabled: g, size: _, firstDay: v, id: y, ariaLabel: b, className: x = "", fieldClassName: S = "", ...C }, w) {
|
|
6510
|
+
N("AppDateRangePicker", C);
|
|
6511
|
+
let T = s(), E = y || l || T, { setRef: D, innerRef: O } = Q({
|
|
6512
|
+
ref: w,
|
|
6233
6513
|
onChange: n
|
|
6234
6514
|
});
|
|
6235
6515
|
o(() => {
|
|
6236
|
-
let n =
|
|
6516
|
+
let n = O.current;
|
|
6237
6517
|
if (!n) return;
|
|
6238
6518
|
let r = e === void 0 ? n.value.start : e, i = t === void 0 ? n.value.end : t;
|
|
6239
6519
|
(n.value.start !== r || n.value.end !== i) && (n.value = {
|
|
@@ -6243,11 +6523,11 @@ var Kn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6243
6523
|
}, [
|
|
6244
6524
|
e,
|
|
6245
6525
|
t,
|
|
6246
|
-
|
|
6526
|
+
O
|
|
6247
6527
|
]);
|
|
6248
|
-
let
|
|
6249
|
-
ref:
|
|
6250
|
-
id:
|
|
6528
|
+
let k = !r && !c && !a, A = c ? `${E}-error` : void 0, j = a ? `${E}-hint` : void 0, M = /* @__PURE__ */ p("wui-date-range", {
|
|
6529
|
+
ref: D,
|
|
6530
|
+
id: E,
|
|
6251
6531
|
"start-name": l,
|
|
6252
6532
|
"end-name": u,
|
|
6253
6533
|
min: d,
|
|
@@ -6256,30 +6536,30 @@ var Kn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6256
6536
|
size: _ || void 0,
|
|
6257
6537
|
"first-day": v == null ? void 0 : String(v),
|
|
6258
6538
|
"aria-label": b || (typeof r == "string" ? r : void 0),
|
|
6259
|
-
"aria-describedby":
|
|
6539
|
+
"aria-describedby": A || j,
|
|
6260
6540
|
"aria-invalid": c ? "true" : void 0,
|
|
6261
6541
|
disabled: g ? "" : void 0,
|
|
6262
6542
|
required: i ? "" : void 0,
|
|
6263
|
-
className:
|
|
6264
|
-
...
|
|
6543
|
+
className: x || void 0,
|
|
6544
|
+
...C
|
|
6265
6545
|
});
|
|
6266
|
-
return
|
|
6267
|
-
className: `field${
|
|
6546
|
+
return k ? M : /* @__PURE__ */ m("div", {
|
|
6547
|
+
className: `field${S ? ` ${S}` : ""}`,
|
|
6268
6548
|
children: [
|
|
6269
6549
|
r && /* @__PURE__ */ m("label", {
|
|
6270
6550
|
className: "label",
|
|
6271
|
-
htmlFor:
|
|
6551
|
+
htmlFor: E,
|
|
6272
6552
|
children: [r, i && /* @__PURE__ */ p(Z, {})]
|
|
6273
6553
|
}),
|
|
6274
|
-
|
|
6554
|
+
M,
|
|
6275
6555
|
c && /* @__PURE__ */ p("div", {
|
|
6276
6556
|
className: "field-error",
|
|
6277
|
-
id:
|
|
6557
|
+
id: A,
|
|
6278
6558
|
children: c
|
|
6279
6559
|
}),
|
|
6280
6560
|
!c && a && /* @__PURE__ */ p("div", {
|
|
6281
6561
|
className: "field-hint",
|
|
6282
|
-
id:
|
|
6562
|
+
id: j,
|
|
6283
6563
|
children: a
|
|
6284
6564
|
})
|
|
6285
6565
|
]
|
|
@@ -6287,12 +6567,12 @@ var Kn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6287
6567
|
});
|
|
6288
6568
|
//#endregion
|
|
6289
6569
|
//#region src/lib/emptyValue.js
|
|
6290
|
-
function
|
|
6570
|
+
function ar(e) {
|
|
6291
6571
|
return e == null || e === "";
|
|
6292
6572
|
}
|
|
6293
6573
|
//#endregion
|
|
6294
6574
|
//#region src/components/AppDescriptions.jsx
|
|
6295
|
-
function
|
|
6575
|
+
function or({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
6296
6576
|
return N("AppDescriptions", o), /* @__PURE__ */ m("div", {
|
|
6297
6577
|
className: [
|
|
6298
6578
|
"descs",
|
|
@@ -6308,7 +6588,7 @@ function Yn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6308
6588
|
}), /* @__PURE__ */ p("dl", {
|
|
6309
6589
|
className: "descs-list",
|
|
6310
6590
|
children: e.map((e, t) => {
|
|
6311
|
-
let n =
|
|
6591
|
+
let n = ar(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
6312
6592
|
return /* @__PURE__ */ m("div", {
|
|
6313
6593
|
className: "descs-item",
|
|
6314
6594
|
style: { "--descs-span": r },
|
|
@@ -6326,24 +6606,24 @@ function Yn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6326
6606
|
}
|
|
6327
6607
|
//#endregion
|
|
6328
6608
|
//#region src/components/AppDropdown.jsx
|
|
6329
|
-
var
|
|
6330
|
-
function
|
|
6609
|
+
var sr = !1;
|
|
6610
|
+
function cr() {
|
|
6331
6611
|
let e = !0;
|
|
6332
6612
|
try {
|
|
6333
6613
|
e = process.env.NODE_ENV !== "production";
|
|
6334
6614
|
} catch {
|
|
6335
6615
|
e = !0;
|
|
6336
6616
|
}
|
|
6337
|
-
!e ||
|
|
6617
|
+
!e || sr || (sr = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
6338
6618
|
}
|
|
6339
|
-
function
|
|
6340
|
-
N("AppDropdown", d), !u && !i && !r &&
|
|
6619
|
+
function lr({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i, align: a = "end", items: o = [], menuClassName: s = "", linkComponent: c, children: l, trigger: u, ...d }) {
|
|
6620
|
+
N("AppDropdown", d), !u && !i && !r && cr();
|
|
6341
6621
|
let f = n ?? (u ? "wui-dropdown-trigger" : "topbar-icon-btn");
|
|
6342
6622
|
return /* @__PURE__ */ m(b, {
|
|
6343
6623
|
align: a,
|
|
6344
6624
|
...d,
|
|
6345
6625
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
6346
|
-
as:
|
|
6626
|
+
as: ur,
|
|
6347
6627
|
icon: e,
|
|
6348
6628
|
iconSize: t,
|
|
6349
6629
|
btnClassName: f,
|
|
@@ -6379,7 +6659,7 @@ function Qn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6379
6659
|
})]
|
|
6380
6660
|
});
|
|
6381
6661
|
}
|
|
6382
|
-
var
|
|
6662
|
+
var ur = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-btn", trigger: r, "aria-label": i, className: a, ...o }, s) {
|
|
6383
6663
|
return /* @__PURE__ */ p("button", {
|
|
6384
6664
|
ref: s,
|
|
6385
6665
|
type: "button",
|
|
@@ -6393,17 +6673,39 @@ var $n = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
6393
6673
|
});
|
|
6394
6674
|
});
|
|
6395
6675
|
//#endregion
|
|
6676
|
+
//#region src/components/AppFeedback.jsx
|
|
6677
|
+
function dr({ onSubmit: e, surface: t, screen: n, heading: r = "Share feedback", label: i = "Feedback", placeholder: a, collectEmail: o = !1, position: s = "bottom-right", className: c = "", style: l, ...u }) {
|
|
6678
|
+
N("AppFeedback", u);
|
|
6679
|
+
let { setRef: d, innerRef: f } = Q({ on: { "wui-feedback-submit": (t) => {
|
|
6680
|
+
let n = f.current;
|
|
6681
|
+
n && Promise.resolve(e?.(t.detail)).then(() => n.submitted(), (e) => n.failed(typeof e?.userMessage == "string" ? e.userMessage : void 0));
|
|
6682
|
+
} } });
|
|
6683
|
+
return /* @__PURE__ */ p("wui-feedback", {
|
|
6684
|
+
ref: d,
|
|
6685
|
+
position: s,
|
|
6686
|
+
label: i,
|
|
6687
|
+
heading: r,
|
|
6688
|
+
placeholder: a || void 0,
|
|
6689
|
+
"collect-email": o ? "" : void 0,
|
|
6690
|
+
surface: t || void 0,
|
|
6691
|
+
screen: n || void 0,
|
|
6692
|
+
class: c || void 0,
|
|
6693
|
+
style: l,
|
|
6694
|
+
...u
|
|
6695
|
+
});
|
|
6696
|
+
}
|
|
6697
|
+
//#endregion
|
|
6396
6698
|
//#region src/lib/fileItem.js
|
|
6397
|
-
function
|
|
6699
|
+
function fr(e) {
|
|
6398
6700
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
6399
6701
|
}
|
|
6400
|
-
function
|
|
6702
|
+
function pr(e) {
|
|
6401
6703
|
return e instanceof File ? e.name : e?.name;
|
|
6402
6704
|
}
|
|
6403
|
-
function
|
|
6705
|
+
function mr(e) {
|
|
6404
6706
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
6405
6707
|
}
|
|
6406
|
-
function
|
|
6708
|
+
function hr(e, t) {
|
|
6407
6709
|
let [n, r] = d(null);
|
|
6408
6710
|
return o(() => {
|
|
6409
6711
|
if (!t) {
|
|
@@ -6419,8 +6721,8 @@ function rr(e, t) {
|
|
|
6419
6721
|
}
|
|
6420
6722
|
//#endregion
|
|
6421
6723
|
//#region src/lib/FileItemRow.jsx
|
|
6422
|
-
function
|
|
6423
|
-
let i =
|
|
6724
|
+
function gr({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
6725
|
+
let i = hr(e, t), a = pr(e), o = mr(e);
|
|
6424
6726
|
return /* @__PURE__ */ m("div", {
|
|
6425
6727
|
className: "attach-item",
|
|
6426
6728
|
children: [
|
|
@@ -6459,15 +6761,15 @@ function ir({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6459
6761
|
}
|
|
6460
6762
|
//#endregion
|
|
6461
6763
|
//#region src/components/AppFileAttachment.jsx
|
|
6462
|
-
function
|
|
6764
|
+
function _r({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = zt, maxSizeMb: o = 5, optional: c = !1, error: l, id: u, ...h }) {
|
|
6463
6765
|
N("AppFileAttachment", h);
|
|
6464
|
-
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x =
|
|
6766
|
+
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x = Gt(a), S = (e) => e instanceof File ? Wt(e) : x || Wt(e), C = !i && b.length === 1 && S(b[0]);
|
|
6465
6767
|
function w(e) {
|
|
6466
6768
|
let n = Array.from(e.target.files || []);
|
|
6467
6769
|
if (e.target.value = "", !n.length) return;
|
|
6468
6770
|
let s = [], c = "";
|
|
6469
6771
|
for (let e of n) {
|
|
6470
|
-
let t =
|
|
6772
|
+
let t = Jt(e, {
|
|
6471
6773
|
accept: a,
|
|
6472
6774
|
maxSizeMb: o
|
|
6473
6775
|
});
|
|
@@ -6478,8 +6780,8 @@ function ar({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6478
6780
|
s.push(e);
|
|
6479
6781
|
}
|
|
6480
6782
|
if (y(c), s.length) if (i) {
|
|
6481
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
6482
|
-
r(e.concat(s.filter((e) => !n.has(
|
|
6783
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(fr));
|
|
6784
|
+
r(e.concat(s.filter((e) => !n.has(fr(e)))));
|
|
6483
6785
|
} else r(s[0]);
|
|
6484
6786
|
}
|
|
6485
6787
|
function T(e) {
|
|
@@ -6516,7 +6818,7 @@ function ar({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6516
6818
|
}), /* @__PURE__ */ m("span", {
|
|
6517
6819
|
className: "attach-drop-hint",
|
|
6518
6820
|
children: [
|
|
6519
|
-
|
|
6821
|
+
Kt(a),
|
|
6520
6822
|
", up to ",
|
|
6521
6823
|
o,
|
|
6522
6824
|
" MB"
|
|
@@ -6538,17 +6840,17 @@ function ar({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6538
6840
|
onChange: w,
|
|
6539
6841
|
...h
|
|
6540
6842
|
})] }),
|
|
6541
|
-
C ? /* @__PURE__ */ p(
|
|
6843
|
+
C ? /* @__PURE__ */ p(vr, {
|
|
6542
6844
|
item: b[0],
|
|
6543
6845
|
isImage: !0,
|
|
6544
6846
|
onRemove: () => T(0)
|
|
6545
6847
|
}) : b.length > 0 && /* @__PURE__ */ p("div", {
|
|
6546
6848
|
className: "attach-list",
|
|
6547
|
-
children: b.map((e, t) => /* @__PURE__ */ p(
|
|
6849
|
+
children: b.map((e, t) => /* @__PURE__ */ p(gr, {
|
|
6548
6850
|
item: e,
|
|
6549
6851
|
isImage: S(e),
|
|
6550
6852
|
onRemove: () => T(t)
|
|
6551
|
-
},
|
|
6853
|
+
}, fr(e)))
|
|
6552
6854
|
}),
|
|
6553
6855
|
E && /* @__PURE__ */ p("div", {
|
|
6554
6856
|
className: "field-error",
|
|
@@ -6557,8 +6859,8 @@ function ar({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6557
6859
|
]
|
|
6558
6860
|
});
|
|
6559
6861
|
}
|
|
6560
|
-
function
|
|
6561
|
-
let r =
|
|
6862
|
+
function vr({ item: e, isImage: t, onRemove: n }) {
|
|
6863
|
+
let r = hr(e, t), i = pr(e), a = mr(e);
|
|
6562
6864
|
return /* @__PURE__ */ m("div", {
|
|
6563
6865
|
className: "attach-preview",
|
|
6564
6866
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -6590,28 +6892,28 @@ function or({ item: e, isImage: t, onRemove: n }) {
|
|
|
6590
6892
|
}
|
|
6591
6893
|
//#endregion
|
|
6592
6894
|
//#region src/components/AppFilePicker.jsx
|
|
6593
|
-
function
|
|
6594
|
-
N("AppFilePicker",
|
|
6595
|
-
let [
|
|
6895
|
+
function yr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles: a, accept: c = ".jpg,.jpeg,.png", maxSizeMb: l = 5, required: f, error: h, className: g = "", fieldClassName: _ = "", style: v, ...y }) {
|
|
6896
|
+
N("AppFilePicker", y);
|
|
6897
|
+
let [b, x] = d(null), [S, C] = d(!1), [w, T] = d(""), E = u(null), D = s(), O = n || D;
|
|
6596
6898
|
o(() => {
|
|
6597
|
-
if (!i && t instanceof File &&
|
|
6899
|
+
if (!i && t instanceof File && Wt(t)) {
|
|
6598
6900
|
let e = URL.createObjectURL(t);
|
|
6599
|
-
return
|
|
6901
|
+
return x(e), () => URL.revokeObjectURL(e);
|
|
6600
6902
|
}
|
|
6601
|
-
|
|
6903
|
+
x(null);
|
|
6602
6904
|
}, [t, i]);
|
|
6603
|
-
let
|
|
6604
|
-
let t =
|
|
6905
|
+
let k = i ? Array.isArray(t) ? t : t ? [t] : [] : [], A = h || w, j = Gt(c), M = !i && !!t, P = M && (t instanceof File ? Wt(t) : j || Wt(t)), F = t?.name, I = P ? t?.url || b : null, L = P ? "image" : "file", R = e ? `Change ${e}` : `Change ${L}`, ee = e ? `Remove ${e}` : `Remove ${L}`, te = e ? `${e} preview` : `Selected ${L} preview`, z = (e) => {
|
|
6906
|
+
let t = Jt(e, {
|
|
6605
6907
|
accept: c,
|
|
6606
6908
|
maxSizeMb: l
|
|
6607
6909
|
});
|
|
6608
|
-
return t ? (
|
|
6609
|
-
},
|
|
6910
|
+
return t ? (T(t), !1) : (T(""), r(e), !0);
|
|
6911
|
+
}, B = (e) => {
|
|
6610
6912
|
let n = Array.from(e || []);
|
|
6611
6913
|
if (!n.length) return;
|
|
6612
|
-
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(
|
|
6914
|
+
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(fr)), s = "", u = [];
|
|
6613
6915
|
for (let e of n) {
|
|
6614
|
-
let t =
|
|
6916
|
+
let t = Jt(e, {
|
|
6615
6917
|
accept: c,
|
|
6616
6918
|
maxSizeMb: l
|
|
6617
6919
|
});
|
|
@@ -6619,30 +6921,30 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6619
6921
|
s ||= t;
|
|
6620
6922
|
continue;
|
|
6621
6923
|
}
|
|
6622
|
-
o.has(
|
|
6924
|
+
o.has(fr(e)) || (o.add(fr(e)), u.push(e));
|
|
6623
6925
|
}
|
|
6624
6926
|
let d = i.concat(u);
|
|
6625
|
-
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`),
|
|
6626
|
-
},
|
|
6927
|
+
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`), T(s), r(d);
|
|
6928
|
+
}, ne = (e) => {
|
|
6627
6929
|
if (i) {
|
|
6628
|
-
|
|
6930
|
+
B(e.target.files);
|
|
6629
6931
|
return;
|
|
6630
6932
|
}
|
|
6631
6933
|
let t = e.target.files?.[0] || null;
|
|
6632
|
-
t && (
|
|
6633
|
-
},
|
|
6634
|
-
if (e.preventDefault(),
|
|
6635
|
-
|
|
6934
|
+
t && (z(t) || (e.target.value = ""));
|
|
6935
|
+
}, re = (e) => {
|
|
6936
|
+
if (e.preventDefault(), C(!1), i) {
|
|
6937
|
+
B(e.dataTransfer.files);
|
|
6636
6938
|
return;
|
|
6637
6939
|
}
|
|
6638
6940
|
let t = e.dataTransfer.files?.[0];
|
|
6639
|
-
t &&
|
|
6640
|
-
},
|
|
6641
|
-
|
|
6642
|
-
},
|
|
6643
|
-
id:
|
|
6941
|
+
t && z(t);
|
|
6942
|
+
}, ie = (e) => {
|
|
6943
|
+
T(""), r(k.filter((t, n) => n !== e));
|
|
6944
|
+
}, ae = () => E.current?.click(), oe = /* @__PURE__ */ p("input", {
|
|
6945
|
+
id: O,
|
|
6644
6946
|
name: n,
|
|
6645
|
-
ref:
|
|
6947
|
+
ref: E,
|
|
6646
6948
|
type: "file",
|
|
6647
6949
|
accept: c,
|
|
6648
6950
|
multiple: i || void 0,
|
|
@@ -6650,28 +6952,29 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6650
6952
|
onClick: (e) => {
|
|
6651
6953
|
e.currentTarget.value = "";
|
|
6652
6954
|
},
|
|
6653
|
-
onChange:
|
|
6654
|
-
...
|
|
6955
|
+
onChange: ne,
|
|
6956
|
+
...y
|
|
6655
6957
|
});
|
|
6656
6958
|
return /* @__PURE__ */ m("div", {
|
|
6657
|
-
className: `field${
|
|
6959
|
+
className: `field${_ ? ` ${_}` : ""}`,
|
|
6658
6960
|
children: [
|
|
6659
6961
|
/* @__PURE__ */ m("label", {
|
|
6660
6962
|
className: "label",
|
|
6661
|
-
htmlFor:
|
|
6963
|
+
htmlFor: O,
|
|
6662
6964
|
children: [e, f && /* @__PURE__ */ p(Z, {})]
|
|
6663
6965
|
}),
|
|
6664
|
-
|
|
6665
|
-
className: `file-preview${
|
|
6966
|
+
M ? /* @__PURE__ */ m("div", {
|
|
6967
|
+
className: `file-preview${A ? " error" : ""}${g ? ` ${g}` : ""}`,
|
|
6968
|
+
style: v,
|
|
6666
6969
|
children: [
|
|
6667
6970
|
/* @__PURE__ */ m("button", {
|
|
6668
6971
|
type: "button",
|
|
6669
6972
|
className: "file-preview-open",
|
|
6670
|
-
"aria-label":
|
|
6671
|
-
onClick:
|
|
6672
|
-
children: [
|
|
6673
|
-
src:
|
|
6674
|
-
alt:
|
|
6973
|
+
"aria-label": R,
|
|
6974
|
+
onClick: ae,
|
|
6975
|
+
children: [P && I ? /* @__PURE__ */ p("img", {
|
|
6976
|
+
src: I,
|
|
6977
|
+
alt: te,
|
|
6675
6978
|
className: "file-preview-img"
|
|
6676
6979
|
}) : /* @__PURE__ */ m("span", {
|
|
6677
6980
|
className: "file-preview-file",
|
|
@@ -6680,7 +6983,7 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6680
6983
|
size: 28
|
|
6681
6984
|
}), /* @__PURE__ */ p("span", {
|
|
6682
6985
|
className: "file-preview-file-name",
|
|
6683
|
-
children:
|
|
6986
|
+
children: F
|
|
6684
6987
|
})]
|
|
6685
6988
|
}), /* @__PURE__ */ p("span", {
|
|
6686
6989
|
className: "file-preview-overlay",
|
|
@@ -6688,11 +6991,11 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6688
6991
|
className: "file-preview-cta",
|
|
6689
6992
|
children: [
|
|
6690
6993
|
/* @__PURE__ */ p(V, {
|
|
6691
|
-
name:
|
|
6994
|
+
name: P ? "image" : "file-text",
|
|
6692
6995
|
size: 16
|
|
6693
6996
|
}),
|
|
6694
6997
|
" ",
|
|
6695
|
-
|
|
6998
|
+
P ? "Change image" : "Change file"
|
|
6696
6999
|
]
|
|
6697
7000
|
})
|
|
6698
7001
|
})]
|
|
@@ -6700,28 +7003,29 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6700
7003
|
/* @__PURE__ */ p("button", {
|
|
6701
7004
|
type: "button",
|
|
6702
7005
|
className: "file-preview-remove",
|
|
6703
|
-
"aria-label":
|
|
6704
|
-
title:
|
|
7006
|
+
"aria-label": ee,
|
|
7007
|
+
title: ee,
|
|
6705
7008
|
onClick: () => r(null),
|
|
6706
7009
|
children: /* @__PURE__ */ p(V, {
|
|
6707
7010
|
name: "x",
|
|
6708
7011
|
size: 16
|
|
6709
7012
|
})
|
|
6710
7013
|
}),
|
|
6711
|
-
|
|
7014
|
+
oe
|
|
6712
7015
|
]
|
|
6713
7016
|
}) : /* @__PURE__ */ m("div", {
|
|
6714
|
-
className: `file-input file-input-tall${
|
|
7017
|
+
className: `file-input file-input-tall${S ? " dragging" : ""}${A ? " error" : ""}${i && k.length > 0 ? " has-files" : ""}${g ? ` ${g}` : ""}`,
|
|
7018
|
+
style: v,
|
|
6715
7019
|
onDragOver: (e) => {
|
|
6716
|
-
e.preventDefault(),
|
|
7020
|
+
e.preventDefault(), S || C(!0);
|
|
6717
7021
|
},
|
|
6718
7022
|
onDragLeave: (e) => {
|
|
6719
|
-
e.preventDefault(),
|
|
7023
|
+
e.preventDefault(), C(!1);
|
|
6720
7024
|
},
|
|
6721
|
-
onDrop:
|
|
7025
|
+
onDrop: re,
|
|
6722
7026
|
children: [
|
|
6723
7027
|
/* @__PURE__ */ m("label", {
|
|
6724
|
-
htmlFor:
|
|
7028
|
+
htmlFor: O,
|
|
6725
7029
|
className: "file-input-zone-label",
|
|
6726
7030
|
children: [
|
|
6727
7031
|
/* @__PURE__ */ p("span", {
|
|
@@ -6741,7 +7045,7 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6741
7045
|
/* @__PURE__ */ m("span", {
|
|
6742
7046
|
className: "file-input-text",
|
|
6743
7047
|
children: [
|
|
6744
|
-
|
|
7048
|
+
Kt(c),
|
|
6745
7049
|
" · up to ",
|
|
6746
7050
|
l,
|
|
6747
7051
|
" MB"
|
|
@@ -6749,28 +7053,28 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6749
7053
|
})
|
|
6750
7054
|
]
|
|
6751
7055
|
}),
|
|
6752
|
-
|
|
6753
|
-
i &&
|
|
7056
|
+
oe,
|
|
7057
|
+
i && k.length > 0 && /* @__PURE__ */ p("div", {
|
|
6754
7058
|
className: "attach-list",
|
|
6755
|
-
children:
|
|
7059
|
+
children: k.map((e, t) => /* @__PURE__ */ p(gr, {
|
|
6756
7060
|
item: e,
|
|
6757
|
-
isImage: e instanceof File ?
|
|
7061
|
+
isImage: e instanceof File ? Wt(e) : j || Wt(e),
|
|
6758
7062
|
noun: "file",
|
|
6759
|
-
onRemove: () =>
|
|
6760
|
-
},
|
|
7063
|
+
onRemove: () => ie(t)
|
|
7064
|
+
}, fr(e)))
|
|
6761
7065
|
})
|
|
6762
7066
|
]
|
|
6763
7067
|
}),
|
|
6764
|
-
|
|
7068
|
+
A && /* @__PURE__ */ p("div", {
|
|
6765
7069
|
className: "field-error",
|
|
6766
|
-
children:
|
|
7070
|
+
children: A
|
|
6767
7071
|
})
|
|
6768
7072
|
]
|
|
6769
7073
|
});
|
|
6770
7074
|
}
|
|
6771
7075
|
//#endregion
|
|
6772
7076
|
//#region src/components/AppFloatingDock.jsx
|
|
6773
|
-
function
|
|
7077
|
+
function br({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
6774
7078
|
return N("AppFloatingDock", s), /* @__PURE__ */ p("wui-dock", {
|
|
6775
7079
|
role: "navigation",
|
|
6776
7080
|
"aria-label": n,
|
|
@@ -6812,7 +7116,7 @@ function cr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6812
7116
|
}
|
|
6813
7117
|
//#endregion
|
|
6814
7118
|
//#region src/components/AppFormActions.jsx
|
|
6815
|
-
function
|
|
7119
|
+
function xr({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
6816
7120
|
return N("AppFormActions", i), /* @__PURE__ */ p("div", {
|
|
6817
7121
|
className: [
|
|
6818
7122
|
"form-actions",
|
|
@@ -6826,7 +7130,7 @@ function lr({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
6826
7130
|
}
|
|
6827
7131
|
//#endregion
|
|
6828
7132
|
//#region src/components/AppFormRow.jsx
|
|
6829
|
-
function
|
|
7133
|
+
function Sr({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
6830
7134
|
N("AppFormRow", r);
|
|
6831
7135
|
let { style: i, ...a } = r;
|
|
6832
7136
|
return /* @__PURE__ */ p("div", {
|
|
@@ -6841,7 +7145,7 @@ function ur({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
6841
7145
|
}
|
|
6842
7146
|
//#endregion
|
|
6843
7147
|
//#region src/components/AppFormSection.jsx
|
|
6844
|
-
function
|
|
7148
|
+
function Cr({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
6845
7149
|
return N("AppFormSection", i), /* @__PURE__ */ m("section", {
|
|
6846
7150
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
6847
7151
|
...i,
|
|
@@ -6862,12 +7166,12 @@ function dr({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
6862
7166
|
}
|
|
6863
7167
|
//#endregion
|
|
6864
7168
|
//#region src/components/AppInfoList.jsx
|
|
6865
|
-
function
|
|
7169
|
+
function wr({ items: e = [], className: t = "", ...n }) {
|
|
6866
7170
|
return N("AppInfoList", n), /* @__PURE__ */ p("div", {
|
|
6867
7171
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
6868
7172
|
...n,
|
|
6869
7173
|
children: e.map((e, t) => {
|
|
6870
|
-
let n =
|
|
7174
|
+
let n = ar(e.value), r = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
6871
7175
|
className: "info-icon",
|
|
6872
7176
|
children: H(e.icon, { size: 16 })
|
|
6873
7177
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -6893,23 +7197,23 @@ function fr({ items: e = [], className: t = "", ...n }) {
|
|
|
6893
7197
|
}
|
|
6894
7198
|
//#endregion
|
|
6895
7199
|
//#region src/components/AppKpiTile.jsx
|
|
6896
|
-
var
|
|
6897
|
-
function
|
|
6898
|
-
if (!e || e.length < 2) return `0,${
|
|
6899
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
6900
|
-
return e.map((e, i) => `${i * r},${n === 0 ?
|
|
7200
|
+
var Tr = 48, Er = 16;
|
|
7201
|
+
function Dr(e) {
|
|
7202
|
+
if (!e || e.length < 2) return `0,${Er / 2} ${Tr},${Er / 2}`;
|
|
7203
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = Tr / (e.length - 1);
|
|
7204
|
+
return e.map((e, i) => `${i * r},${n === 0 ? Er / 2 : Er - (e - t) / n * Er}`).join(" ");
|
|
6901
7205
|
}
|
|
6902
|
-
function
|
|
7206
|
+
function Or(e) {
|
|
6903
7207
|
if (typeof e != "string") return "flat";
|
|
6904
7208
|
let t = e.trim();
|
|
6905
7209
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
6906
7210
|
}
|
|
6907
|
-
function
|
|
7211
|
+
function kr({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, deltaDirection: o, sparkline: s, variant: c = "plain", size: l = "md", valueSize: u, inline: d = !1, attention: f = !1, href: h, linkComponent: g, className: _ = "", style: v, iconClassName: y = "", labelClassName: b = "", valueClassName: x = "", captionClassName: S = "", deltaClassName: C = "", sparklineClassName: w = "", ...T }) {
|
|
6908
7212
|
N("AppKpiTile", T);
|
|
6909
7213
|
let E = `kpi${d ? " kpi-inline" : ""}${c === "filled" ? " kpi-filled" : c === "accent" ? " kpi-accent" : c === "spotlight" ? " kpi-spotlight" : ""}${l === "lg" ? " kpi-lg" : l === "sm" ? " kpi-sm" : ""}${f ? " kpi-attention" : ""}${_ ? ` ${_}` : ""}`, D = typeof u == "number" && u > 0 ? {
|
|
6910
7214
|
...v,
|
|
6911
7215
|
"--wui-kpi-value-size": `${u}px`
|
|
6912
|
-
} : v, O = o ??
|
|
7216
|
+
} : v, O = o ?? Or(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
6913
7217
|
return h != null && (A = g ? {
|
|
6914
7218
|
as: g,
|
|
6915
7219
|
to: h
|
|
@@ -6947,12 +7251,12 @@ function _r({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6947
7251
|
}),
|
|
6948
7252
|
s && s.length > 0 && /* @__PURE__ */ p("svg", {
|
|
6949
7253
|
className: `kpi-sparkline${w ? ` ${w}` : ""}`,
|
|
6950
|
-
width:
|
|
6951
|
-
height:
|
|
6952
|
-
viewBox: `0 0 ${
|
|
7254
|
+
width: Tr,
|
|
7255
|
+
height: Er,
|
|
7256
|
+
viewBox: `0 0 ${Tr} ${Er}`,
|
|
6953
7257
|
"aria-hidden": "true",
|
|
6954
7258
|
children: /* @__PURE__ */ p("polyline", {
|
|
6955
|
-
points:
|
|
7259
|
+
points: Dr(s),
|
|
6956
7260
|
stroke: "currentColor",
|
|
6957
7261
|
fill: "none"
|
|
6958
7262
|
})
|
|
@@ -6962,21 +7266,21 @@ function _r({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6962
7266
|
}
|
|
6963
7267
|
//#endregion
|
|
6964
7268
|
//#region src/components/AppLogoPicker.jsx
|
|
6965
|
-
var
|
|
7269
|
+
var Ar = {
|
|
6966
7270
|
sm: 72,
|
|
6967
7271
|
md: 120,
|
|
6968
7272
|
lg: 160
|
|
6969
7273
|
};
|
|
6970
|
-
function
|
|
6971
|
-
N("AppLogoPicker", k),
|
|
6972
|
-
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [
|
|
7274
|
+
function jr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a = !1, disabled: c = !1, accept: l = "image/png,image/jpeg,image/webp", maxSizeMb: f = 5, overlayIcon: h = "image", overlayLabel: g = "Update photo", ariaLabel: _ = "Upload photo", label: v, hint: y, error: b, layout: x = "stacked", title: S, subtitle: C, required: w = !1, variant: T = "initials", size: E = "md", shape: D = "circle", className: O = "", ...k }) {
|
|
7275
|
+
N("AppLogoPicker", k), U("AppLogoPicker", "size", typeof E == "string" ? E : null, Object.keys(Ar));
|
|
7276
|
+
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, ee] = d(!1), [te, z] = d(!1);
|
|
6973
7277
|
o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
|
|
6974
|
-
F(null),
|
|
7278
|
+
F(null), ee(!1);
|
|
6975
7279
|
}, [e]);
|
|
6976
|
-
let B = a || c, ne = P || (e && !
|
|
7280
|
+
let B = a || c, ne = P || (e && !R ? e : null), re = b || I, ie = !B && (!!P || !!ne && !!i), ae = () => {
|
|
6977
7281
|
B || A.current?.click();
|
|
6978
7282
|
}, oe = (e) => {
|
|
6979
|
-
let t =
|
|
7283
|
+
let t = Jt(e, {
|
|
6980
7284
|
accept: l,
|
|
6981
7285
|
maxSizeMb: f
|
|
6982
7286
|
});
|
|
@@ -6984,22 +7288,22 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6984
7288
|
L(t);
|
|
6985
7289
|
return;
|
|
6986
7290
|
}
|
|
6987
|
-
L(""),
|
|
7291
|
+
L(""), ee(!1), F(URL.createObjectURL(e)), r(e);
|
|
6988
7292
|
}, se = (e) => {
|
|
6989
7293
|
let t = e.target.files?.[0];
|
|
6990
7294
|
e.target.value = "", t && oe(t);
|
|
6991
7295
|
}, ce = (e) => {
|
|
6992
|
-
if (e.preventDefault(),
|
|
7296
|
+
if (e.preventDefault(), z(!1), B) return;
|
|
6993
7297
|
let t = e.dataTransfer.files?.[0];
|
|
6994
7298
|
t && oe(t);
|
|
6995
7299
|
}, le = () => {
|
|
6996
|
-
F(null), L(""),
|
|
6997
|
-
}, ue = typeof E == "number" ? E :
|
|
7300
|
+
F(null), L(""), ee(!1), A.current && (A.current.value = ""), i?.();
|
|
7301
|
+
}, ue = typeof E == "number" ? E : Ar[E] ?? Ar.md, H = Math.max(14, Math.round(ue * .18)), de = Math.round(ue * .5), fe = [
|
|
6998
7302
|
"set-uploader",
|
|
6999
7303
|
T === "avatar" ? "set-uploader--avatar" : "",
|
|
7000
7304
|
D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
|
|
7001
|
-
|
|
7002
|
-
].filter(Boolean).join(" "), pe = x === "inline", me = x === "profile",
|
|
7305
|
+
te && "is-dragging"
|
|
7306
|
+
].filter(Boolean).join(" "), pe = x === "inline", me = x === "profile", he = /* @__PURE__ */ m("div", {
|
|
7003
7307
|
className: "set-uploader-shell",
|
|
7004
7308
|
children: [
|
|
7005
7309
|
/* @__PURE__ */ p("button", {
|
|
@@ -7011,10 +7315,10 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7011
7315
|
onClick: ae,
|
|
7012
7316
|
"aria-label": _,
|
|
7013
7317
|
onDragOver: (e) => {
|
|
7014
|
-
e.preventDefault(), !B && !
|
|
7318
|
+
e.preventDefault(), !B && !te && z(!0);
|
|
7015
7319
|
},
|
|
7016
7320
|
onDragLeave: (e) => {
|
|
7017
|
-
e.preventDefault(),
|
|
7321
|
+
e.preventDefault(), z(!1);
|
|
7018
7322
|
},
|
|
7019
7323
|
onDrop: ce,
|
|
7020
7324
|
...k,
|
|
@@ -7025,7 +7329,7 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7025
7329
|
className: "set-uploader-img",
|
|
7026
7330
|
src: ne,
|
|
7027
7331
|
alt: "",
|
|
7028
|
-
onError: () =>
|
|
7332
|
+
onError: () => ee(!0)
|
|
7029
7333
|
}) : /* @__PURE__ */ p("span", {
|
|
7030
7334
|
className: "set-uploader-logo",
|
|
7031
7335
|
children: t || T === "avatar" && /* @__PURE__ */ p(V, {
|
|
@@ -7072,17 +7376,17 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7072
7376
|
disabled: B
|
|
7073
7377
|
})
|
|
7074
7378
|
]
|
|
7075
|
-
}),
|
|
7379
|
+
}), ge = y && !re && /* @__PURE__ */ p("div", {
|
|
7076
7380
|
className: "set-uploader-hint",
|
|
7077
7381
|
children: y
|
|
7078
|
-
}),
|
|
7382
|
+
}), _e = re && /* @__PURE__ */ p("div", {
|
|
7079
7383
|
className: "field-error",
|
|
7080
7384
|
children: re
|
|
7081
|
-
}),
|
|
7385
|
+
}), ve = v && /* @__PURE__ */ m("label", {
|
|
7082
7386
|
className: "label",
|
|
7083
7387
|
htmlFor: M,
|
|
7084
7388
|
children: [v, w && /* @__PURE__ */ p(Z, {})]
|
|
7085
|
-
}),
|
|
7389
|
+
}), ye = /* @__PURE__ */ m("div", {
|
|
7086
7390
|
className: "set-uploader-meta",
|
|
7087
7391
|
children: [
|
|
7088
7392
|
S && /* @__PURE__ */ p("div", {
|
|
@@ -7093,56 +7397,56 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
7093
7397
|
className: "set-uploader-subtitle",
|
|
7094
7398
|
children: C
|
|
7095
7399
|
}),
|
|
7096
|
-
|
|
7097
|
-
|
|
7400
|
+
ge,
|
|
7401
|
+
_e
|
|
7098
7402
|
]
|
|
7099
7403
|
});
|
|
7100
7404
|
return pe ? /* @__PURE__ */ m("div", {
|
|
7101
7405
|
className: `field set-uploader-field set-uploader-field--inline${O ? ` ${O}` : ""}`,
|
|
7102
|
-
children: [
|
|
7406
|
+
children: [ve, /* @__PURE__ */ m("div", {
|
|
7103
7407
|
className: "set-uploader-row",
|
|
7104
|
-
children: [
|
|
7408
|
+
children: [he, ye]
|
|
7105
7409
|
})]
|
|
7106
7410
|
}) : me ? /* @__PURE__ */ m("div", {
|
|
7107
7411
|
className: `field set-uploader-field set-uploader-field--profile${O ? ` ${O}` : ""}`,
|
|
7108
7412
|
children: [
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7413
|
+
ve,
|
|
7414
|
+
he,
|
|
7415
|
+
ye
|
|
7112
7416
|
]
|
|
7113
7417
|
}) : /* @__PURE__ */ m("div", {
|
|
7114
7418
|
className: `field set-uploader-field${O ? ` ${O}` : ""}`,
|
|
7115
7419
|
children: [
|
|
7116
|
-
|
|
7117
|
-
U,
|
|
7420
|
+
ve,
|
|
7118
7421
|
he,
|
|
7119
|
-
ge
|
|
7422
|
+
ge,
|
|
7423
|
+
_e
|
|
7120
7424
|
]
|
|
7121
7425
|
});
|
|
7122
7426
|
}
|
|
7123
7427
|
//#endregion
|
|
7124
7428
|
//#region src/components/AppMeter.jsx
|
|
7125
|
-
var
|
|
7429
|
+
var Mr = [
|
|
7126
7430
|
"info",
|
|
7127
7431
|
"success",
|
|
7128
7432
|
"warning",
|
|
7129
7433
|
"danger",
|
|
7130
7434
|
"neutral"
|
|
7131
7435
|
];
|
|
7132
|
-
function
|
|
7436
|
+
function Nr(e, t, n) {
|
|
7133
7437
|
let r = n - t;
|
|
7134
7438
|
if (!(r > 0)) return 0;
|
|
7135
7439
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
7136
7440
|
return Number(i.toFixed(2));
|
|
7137
7441
|
}
|
|
7138
|
-
function
|
|
7442
|
+
function Pr(e, t, n, r, i) {
|
|
7139
7443
|
if (t == null && n == null) return i;
|
|
7140
7444
|
let a = "mid";
|
|
7141
7445
|
return t != null && e <= t ? a = "low" : n != null && e >= n && (a = "high"), r === "low" ? a === "low" ? "success" : a === "high" ? "danger" : "warning" : a === "high" ? "success" : a === "low" ? "danger" : "warning";
|
|
7142
7446
|
}
|
|
7143
|
-
function
|
|
7447
|
+
function Fr({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum: i = "high", low: a, high: o, size: s = "md", label: c, showLabel: l = !1, className: u = "", ...d }) {
|
|
7144
7448
|
N("AppMeter", d);
|
|
7145
|
-
let f =
|
|
7449
|
+
let f = Pr(e, a, o, i, Mr.includes(r) ? r : "info"), m = Nr(e, t, n);
|
|
7146
7450
|
return /* @__PURE__ */ p("div", {
|
|
7147
7451
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
7148
7452
|
role: "meter",
|
|
@@ -7160,20 +7464,20 @@ function Cr({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
7160
7464
|
}
|
|
7161
7465
|
//#endregion
|
|
7162
7466
|
//#region src/components/AppMultiSelect.jsx
|
|
7163
|
-
var
|
|
7467
|
+
var Ir = i(function({ values: e, onChange: t, options: n, placeholder: r = "Select…", searchPlaceholder: i = "Search…", searchable: a = !0, disabled: c = !1, icon: l, size: u, collapseChips: d = !1, name: f, label: h, error: g, hint: _, required: v = !1, help: y, helpLabel: b = "More information", fieldClassName: x = "", ...S }, C) {
|
|
7164
7468
|
N("AppMultiSelect", S);
|
|
7165
7469
|
let w = s(), T = f || w, { setRef: E, innerRef: D } = Q({
|
|
7166
7470
|
ref: C,
|
|
7167
7471
|
value: e,
|
|
7168
7472
|
onChange: t,
|
|
7169
|
-
readValue:
|
|
7170
|
-
writeValue:
|
|
7473
|
+
readValue: sn,
|
|
7474
|
+
writeValue: cn
|
|
7171
7475
|
});
|
|
7172
7476
|
return o(() => {
|
|
7173
7477
|
let e = D.current;
|
|
7174
7478
|
if (!e) return;
|
|
7175
7479
|
let t = n || [];
|
|
7176
|
-
|
|
7480
|
+
on(t, e.options) || (e.options = t);
|
|
7177
7481
|
}, [n, D]), /* @__PURE__ */ m("div", {
|
|
7178
7482
|
className: `field${x ? ` ${x}` : ""}`,
|
|
7179
7483
|
children: [
|
|
@@ -7183,7 +7487,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7183
7487
|
children: [
|
|
7184
7488
|
h,
|
|
7185
7489
|
v && /* @__PURE__ */ p(Z, {}),
|
|
7186
|
-
y && /* @__PURE__ */ p(
|
|
7490
|
+
y && /* @__PURE__ */ p(tn, {
|
|
7187
7491
|
label: b,
|
|
7188
7492
|
children: y
|
|
7189
7493
|
})
|
|
@@ -7217,7 +7521,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7217
7521
|
}) : null
|
|
7218
7522
|
]
|
|
7219
7523
|
});
|
|
7220
|
-
}),
|
|
7524
|
+
}), Lr = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", value: c, onChange: l, min: u, max: f, step: h = 1, precision: g = 0, unit: _, size: v = "md", id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, ...T }, E) {
|
|
7221
7525
|
N("AppNumberInput", T);
|
|
7222
7526
|
let D = s(), O = y || D, k = (e) => {
|
|
7223
7527
|
if (g === 0) return Math.round(e);
|
|
@@ -7237,7 +7541,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7237
7541
|
let F = (e) => {
|
|
7238
7542
|
let t = (j(M) ?? A(0)) + e * h, n = A(k(t));
|
|
7239
7543
|
P(String(n)), l?.(n);
|
|
7240
|
-
}, I = j(M), L = w || I !== null && typeof u == "number" && I <= u,
|
|
7544
|
+
}, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, R = w || I !== null && typeof f == "number" && I >= f, ee = n && O ? `${O}-error` : void 0, te = r && O ? `${O}-hint` : void 0, z = ee || te, B = [
|
|
7241
7545
|
"input",
|
|
7242
7546
|
v === "sm" ? "input-sm" : "",
|
|
7243
7547
|
v === "lg" ? "input-lg" : "",
|
|
@@ -7269,7 +7573,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7269
7573
|
disabled: w,
|
|
7270
7574
|
required: t,
|
|
7271
7575
|
"aria-invalid": n ? "true" : "false",
|
|
7272
|
-
"aria-describedby":
|
|
7576
|
+
"aria-describedby": z,
|
|
7273
7577
|
value: M,
|
|
7274
7578
|
ref: E,
|
|
7275
7579
|
onChange: ne,
|
|
@@ -7304,7 +7608,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7304
7608
|
className: "num-btn",
|
|
7305
7609
|
"aria-label": "Increase",
|
|
7306
7610
|
tabIndex: -1,
|
|
7307
|
-
disabled:
|
|
7611
|
+
disabled: R,
|
|
7308
7612
|
onClick: () => F(1),
|
|
7309
7613
|
children: /* @__PURE__ */ p(V, {
|
|
7310
7614
|
name: "plus",
|
|
@@ -7322,7 +7626,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7322
7626
|
children: [
|
|
7323
7627
|
e,
|
|
7324
7628
|
t && /* @__PURE__ */ p(Z, {}),
|
|
7325
|
-
i && /* @__PURE__ */ p(
|
|
7629
|
+
i && /* @__PURE__ */ p(tn, {
|
|
7326
7630
|
label: a,
|
|
7327
7631
|
children: i
|
|
7328
7632
|
})
|
|
@@ -7331,43 +7635,44 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7331
7635
|
oe,
|
|
7332
7636
|
n ? /* @__PURE__ */ p("div", {
|
|
7333
7637
|
className: "field-error",
|
|
7334
|
-
id:
|
|
7638
|
+
id: ee,
|
|
7335
7639
|
children: n
|
|
7336
7640
|
}) : r ? /* @__PURE__ */ p("div", {
|
|
7337
7641
|
className: "field-hint",
|
|
7338
|
-
id:
|
|
7642
|
+
id: te,
|
|
7339
7643
|
children: r
|
|
7340
7644
|
}) : null
|
|
7341
7645
|
]
|
|
7342
7646
|
});
|
|
7343
|
-
}),
|
|
7344
|
-
N("AppOtpInput",
|
|
7345
|
-
let
|
|
7346
|
-
ref:
|
|
7647
|
+
}), Rr = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: o = !1, hint: c, error: l, disabled: u = !1, name: d, id: f, className: h = "", fieldClassName: g = "", ..._ }, v) {
|
|
7648
|
+
N("AppOtpInput", _);
|
|
7649
|
+
let y = s(), b = f || y, { setRef: x } = Q({
|
|
7650
|
+
ref: v,
|
|
7347
7651
|
value: e ?? "",
|
|
7348
7652
|
onChange: t,
|
|
7349
7653
|
on: { complete: (e) => n?.(e.detail) }
|
|
7350
|
-
}),
|
|
7654
|
+
}), S = /* @__PURE__ */ p("wui-otp", {
|
|
7351
7655
|
"aria-label": typeof a == "string" ? a : void 0,
|
|
7352
|
-
ref:
|
|
7353
|
-
id:
|
|
7656
|
+
ref: x,
|
|
7657
|
+
id: b,
|
|
7354
7658
|
name: d,
|
|
7355
7659
|
length: String(r),
|
|
7356
7660
|
mode: i,
|
|
7357
7661
|
"aria-invalid": l ? "true" : void 0,
|
|
7358
7662
|
disabled: u ? "" : void 0,
|
|
7359
7663
|
required: o ? "" : void 0,
|
|
7360
|
-
|
|
7664
|
+
className: h || void 0,
|
|
7665
|
+
..._
|
|
7361
7666
|
});
|
|
7362
|
-
return !a && !l && !c ?
|
|
7363
|
-
className: `field${
|
|
7667
|
+
return !a && !l && !c ? S : /* @__PURE__ */ m("div", {
|
|
7668
|
+
className: `field${g ? ` ${g}` : ""}`,
|
|
7364
7669
|
children: [
|
|
7365
7670
|
a && /* @__PURE__ */ m("label", {
|
|
7366
7671
|
className: "label",
|
|
7367
|
-
htmlFor:
|
|
7672
|
+
htmlFor: b,
|
|
7368
7673
|
children: [a, o && /* @__PURE__ */ p(Z, {})]
|
|
7369
7674
|
}),
|
|
7370
|
-
|
|
7675
|
+
S,
|
|
7371
7676
|
l && /* @__PURE__ */ p("div", {
|
|
7372
7677
|
className: "field-error",
|
|
7373
7678
|
children: l
|
|
@@ -7381,7 +7686,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7381
7686
|
});
|
|
7382
7687
|
//#endregion
|
|
7383
7688
|
//#region src/components/AppPageHeader.jsx
|
|
7384
|
-
function
|
|
7689
|
+
function zr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", status: a, breadcrumbs: o, actions: s, size: c = "md", align: l = "start", divider: u = !1, sticky: d = !1, className: f = "", ...h }) {
|
|
7385
7690
|
N("AppPageHeader", h);
|
|
7386
7691
|
let g = [
|
|
7387
7692
|
"page-header",
|
|
@@ -7440,9 +7745,9 @@ function Dr({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7440
7745
|
}
|
|
7441
7746
|
//#endregion
|
|
7442
7747
|
//#region src/components/AppPagination.jsx
|
|
7443
|
-
function
|
|
7748
|
+
function Br({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
7444
7749
|
if (N("AppPagination", s), t <= 1) return null;
|
|
7445
|
-
let c =
|
|
7750
|
+
let c = Xn(e, t, { siblingCount: r });
|
|
7446
7751
|
return /* @__PURE__ */ p("nav", {
|
|
7447
7752
|
className: [
|
|
7448
7753
|
"pagination-nav",
|
|
@@ -7500,7 +7805,7 @@ function Or({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
7500
7805
|
}
|
|
7501
7806
|
//#endregion
|
|
7502
7807
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
7503
|
-
var
|
|
7808
|
+
var Vr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name: i, label: a = "Phone number", placeholder: o, required: c = !1, error: l, showFlag: u = !0, showDialCode: d = !0, size: f = "md", fieldClassName: h = "", ...g }, _) {
|
|
7504
7809
|
N("AppPhoneNumberInput", g);
|
|
7505
7810
|
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } = Q({
|
|
7506
7811
|
ref: _,
|
|
@@ -7540,7 +7845,7 @@ var kr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7540
7845
|
});
|
|
7541
7846
|
//#endregion
|
|
7542
7847
|
//#region src/components/AppPricingCard.jsx
|
|
7543
|
-
function
|
|
7848
|
+
function Hr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a, featured: o = !1, current: s = !1, badge: c = "Most popular", className: l = "", ...u }) {
|
|
7544
7849
|
return N("AppPricingCard", u), /* @__PURE__ */ m("div", {
|
|
7545
7850
|
className: [
|
|
7546
7851
|
"plan-card",
|
|
@@ -7594,21 +7899,21 @@ function Ar({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7594
7899
|
}
|
|
7595
7900
|
//#endregion
|
|
7596
7901
|
//#region src/components/AppProgress.jsx
|
|
7597
|
-
var
|
|
7902
|
+
var Ur = [
|
|
7598
7903
|
"info",
|
|
7599
7904
|
"success",
|
|
7600
7905
|
"warning",
|
|
7601
7906
|
"danger",
|
|
7602
7907
|
"neutral"
|
|
7603
7908
|
];
|
|
7604
|
-
function
|
|
7909
|
+
function Wr(e, t) {
|
|
7605
7910
|
if (!(t > 0)) return 0;
|
|
7606
7911
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
7607
7912
|
return Number(n.toFixed(2));
|
|
7608
7913
|
}
|
|
7609
|
-
function
|
|
7914
|
+
function Gr({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", label: i, showLabel: a = !1, striped: o = !1, animated: s = !1, indeterminate: c = !1, className: l = "", ...u }) {
|
|
7610
7915
|
N("AppProgress", u);
|
|
7611
|
-
let d =
|
|
7916
|
+
let d = Ur.includes(n) ? n : "info", f = Wr(e, t), m = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, h = [
|
|
7612
7917
|
"progress-bar",
|
|
7613
7918
|
`wui-progress-${d}`,
|
|
7614
7919
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -7632,8 +7937,8 @@ function Nr({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
7632
7937
|
}
|
|
7633
7938
|
//#endregion
|
|
7634
7939
|
//#region src/components/AppRadio.jsx
|
|
7635
|
-
var
|
|
7636
|
-
return N("AppRadio", o), /* @__PURE__ */ p(
|
|
7940
|
+
var Kr = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
7941
|
+
return N("AppRadio", o), /* @__PURE__ */ p(kn, {
|
|
7637
7942
|
ref: s,
|
|
7638
7943
|
label: e,
|
|
7639
7944
|
id: t,
|
|
@@ -7648,7 +7953,7 @@ var Pr = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
7648
7953
|
});
|
|
7649
7954
|
//#endregion
|
|
7650
7955
|
//#region src/components/AppRepeater.jsx
|
|
7651
|
-
function
|
|
7956
|
+
function qr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "Add another", removeLabel: a = "Remove row", emptyText: o, min: s = 0, max: c, numbered: l = !0, className: u = "", ...d }) {
|
|
7652
7957
|
N("AppRepeater", d);
|
|
7653
7958
|
let f = typeof c == "number" && e.length >= c, h = !!r && e.length > s;
|
|
7654
7959
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7679,7 +7984,7 @@ function Fr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7679
7984
|
})
|
|
7680
7985
|
]
|
|
7681
7986
|
}, e.id ?? n)),
|
|
7682
|
-
/* @__PURE__ */ p(
|
|
7987
|
+
/* @__PURE__ */ p(W, {
|
|
7683
7988
|
variant: "secondary",
|
|
7684
7989
|
size: "sm",
|
|
7685
7990
|
leftIcon: "plus",
|
|
@@ -7693,7 +7998,7 @@ function Fr({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7693
7998
|
}
|
|
7694
7999
|
//#endregion
|
|
7695
8000
|
//#region src/components/AppResourceCard.jsx
|
|
7696
|
-
function
|
|
8001
|
+
function Jr({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
7697
8002
|
N("AppResourceCard", s);
|
|
7698
8003
|
let c = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
7699
8004
|
className: "res-card-icon",
|
|
@@ -7727,7 +8032,7 @@ function Ir({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
7727
8032
|
}
|
|
7728
8033
|
//#endregion
|
|
7729
8034
|
//#region src/components/AppResult.jsx
|
|
7730
|
-
var
|
|
8035
|
+
var Yr = {
|
|
7731
8036
|
success: {
|
|
7732
8037
|
icon: "check-circle",
|
|
7733
8038
|
tone: "success"
|
|
@@ -7748,9 +8053,9 @@ var Lr = {
|
|
|
7748
8053
|
404: { tone: "muted" },
|
|
7749
8054
|
500: { tone: "muted" }
|
|
7750
8055
|
};
|
|
7751
|
-
function
|
|
7752
|
-
N("AppResult", s),
|
|
7753
|
-
let c =
|
|
8056
|
+
function Xr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
8057
|
+
N("AppResult", s), U("AppResult", "status", e, Object.keys(Yr));
|
|
8058
|
+
let c = Yr[e] || Yr.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
7754
8059
|
return /* @__PURE__ */ m("div", {
|
|
7755
8060
|
className: [
|
|
7756
8061
|
"result",
|
|
@@ -7788,7 +8093,7 @@ function Rr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7788
8093
|
}
|
|
7789
8094
|
//#endregion
|
|
7790
8095
|
//#region src/components/AppScrollbar.jsx
|
|
7791
|
-
function
|
|
8096
|
+
function Zr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
7792
8097
|
return N("AppScrollbar", i), /* @__PURE__ */ p("div", {
|
|
7793
8098
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
7794
8099
|
style: n == null ? r : {
|
|
@@ -7801,7 +8106,7 @@ function zr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
7801
8106
|
}
|
|
7802
8107
|
//#endregion
|
|
7803
8108
|
//#region src/components/AppSearch.jsx
|
|
7804
|
-
function
|
|
8109
|
+
function Qr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search…", ariaLabel: i, iconSize: a = 18, size: o, loading: s = !1, disabled: c = !1, className: l = "", ...u }) {
|
|
7805
8110
|
N("AppSearch", u);
|
|
7806
8111
|
let d = t || n;
|
|
7807
8112
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7848,7 +8153,7 @@ function Br({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7848
8153
|
}
|
|
7849
8154
|
//#endregion
|
|
7850
8155
|
//#region src/components/AppSegmented.jsx
|
|
7851
|
-
function
|
|
8156
|
+
function $r({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: l = !1, disabled: d = !1, className: f = "", ...h }) {
|
|
7852
8157
|
N("AppSegmented", h);
|
|
7853
8158
|
let g = s(), _ = i || g, v = u(null), y = u(null), b = [
|
|
7854
8159
|
"segmented",
|
|
@@ -7923,7 +8228,7 @@ function Vr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7923
8228
|
}
|
|
7924
8229
|
//#endregion
|
|
7925
8230
|
//#region src/components/AppSelect.jsx
|
|
7926
|
-
var
|
|
8231
|
+
var ei = (e) => e == null ? "" : e.label ?? e.text ?? "", ti = i(function({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", searchPlaceholder: i = "Search...", searchable: a = !1, clearable: c = !1, size: l, icon: u, floatingLabel: d = !1, disabled: f, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": E, "aria-describedby": D, ...O }, k) {
|
|
7927
8232
|
N("AppSelect", O);
|
|
7928
8233
|
let A = s(), { setRef: j, innerRef: M } = Q({
|
|
7929
8234
|
ref: k,
|
|
@@ -7935,12 +8240,12 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
|
|
|
7935
8240
|
if (!e) return;
|
|
7936
8241
|
let t = n.map((e) => ({
|
|
7937
8242
|
value: e.value,
|
|
7938
|
-
label:
|
|
8243
|
+
label: ei(e),
|
|
7939
8244
|
icon: e.icon
|
|
7940
8245
|
}));
|
|
7941
|
-
|
|
8246
|
+
on(t, e.options) || (e.options = t);
|
|
7942
8247
|
}, [n, M]);
|
|
7943
|
-
let P = x || S || A, F = d && h, I = _ && P ? `${P}-error` : void 0, L = v && P ? `${P}-hint` : void 0,
|
|
8248
|
+
let P = x || S || A, F = d && h, I = _ && P ? `${P}-error` : void 0, L = v && P ? `${P}-hint` : void 0, R = /* @__PURE__ */ p("wui-select", {
|
|
7944
8249
|
"aria-label": T || (typeof h == "string" ? h : void 0),
|
|
7945
8250
|
"aria-labelledby": E || void 0,
|
|
7946
8251
|
"aria-describedby": I || L || D || void 0,
|
|
@@ -7956,14 +8261,11 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
|
|
|
7956
8261
|
icon: u || void 0,
|
|
7957
8262
|
disabled: f ? "" : void 0,
|
|
7958
8263
|
required: g ? "" : void 0,
|
|
8264
|
+
className: C || void 0,
|
|
7959
8265
|
...O
|
|
7960
8266
|
});
|
|
7961
|
-
return !h && !_ && !v ?
|
|
7962
|
-
className: [
|
|
7963
|
-
"field",
|
|
7964
|
-
C,
|
|
7965
|
-
w
|
|
7966
|
-
].filter(Boolean).join(" "),
|
|
8267
|
+
return !h && !_ && !v ? R : /* @__PURE__ */ m("div", {
|
|
8268
|
+
className: ["field", w].filter(Boolean).join(" "),
|
|
7967
8269
|
children: [
|
|
7968
8270
|
h && !F && /* @__PURE__ */ m("label", {
|
|
7969
8271
|
className: "label",
|
|
@@ -7971,7 +8273,7 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
|
|
|
7971
8273
|
children: [
|
|
7972
8274
|
h,
|
|
7973
8275
|
g && /* @__PURE__ */ p(Z, {}),
|
|
7974
|
-
y && /* @__PURE__ */ p(
|
|
8276
|
+
y && /* @__PURE__ */ p(tn, {
|
|
7975
8277
|
label: b,
|
|
7976
8278
|
children: y
|
|
7977
8279
|
})
|
|
@@ -7979,12 +8281,12 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
|
|
|
7979
8281
|
}),
|
|
7980
8282
|
F ? /* @__PURE__ */ m("div", {
|
|
7981
8283
|
className: "field-float",
|
|
7982
|
-
children: [
|
|
8284
|
+
children: [R, /* @__PURE__ */ m("label", {
|
|
7983
8285
|
className: "float-label",
|
|
7984
8286
|
htmlFor: P,
|
|
7985
8287
|
children: [h, g && /* @__PURE__ */ p(Z, {})]
|
|
7986
8288
|
})]
|
|
7987
|
-
}) :
|
|
8289
|
+
}) : R,
|
|
7988
8290
|
_ ? /* @__PURE__ */ p("div", {
|
|
7989
8291
|
className: "field-error",
|
|
7990
8292
|
id: I,
|
|
@@ -7999,7 +8301,7 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
|
|
|
7999
8301
|
});
|
|
8000
8302
|
//#endregion
|
|
8001
8303
|
//#region src/components/AppShell.jsx
|
|
8002
|
-
function
|
|
8304
|
+
function ni({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r, sidebarFooter: i, topbarStart: a, topbarEnd: s, footer: c, children: l, collapsed: u, onCollapsedChange: f, noSidebar: h = !1, navLabel: g = "Main navigation", linkComponent: _, className: v = "", ...y }) {
|
|
8003
8305
|
N("AppShell", y);
|
|
8004
8306
|
let [b, x] = d(!1), [S, C] = d(!1), [w, T] = d(!1), E = u ?? b, D = () => {
|
|
8005
8307
|
let e = !E;
|
|
@@ -8047,7 +8349,7 @@ function Wr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
8047
8349
|
children: [e.label && /* @__PURE__ */ p("div", {
|
|
8048
8350
|
className: "app-nav-group-label",
|
|
8049
8351
|
children: e.label
|
|
8050
|
-
}), e.items.map((e) => /* @__PURE__ */ p(
|
|
8352
|
+
}), e.items.map((e) => /* @__PURE__ */ p(ri, {
|
|
8051
8353
|
item: e,
|
|
8052
8354
|
linkComponent: _,
|
|
8053
8355
|
onNavigate: () => C(!1)
|
|
@@ -8114,7 +8416,7 @@ function Wr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
8114
8416
|
]
|
|
8115
8417
|
});
|
|
8116
8418
|
}
|
|
8117
|
-
function
|
|
8419
|
+
function ri({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
8118
8420
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = d(a);
|
|
8119
8421
|
o(() => {
|
|
8120
8422
|
a && !s && c(!0);
|
|
@@ -8154,7 +8456,7 @@ function Gr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8154
8456
|
className: `app-nav-sub${s ? " expanded" : ""}`,
|
|
8155
8457
|
children: /* @__PURE__ */ p("div", {
|
|
8156
8458
|
className: "app-nav-sub-inner",
|
|
8157
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
8459
|
+
children: e.children.map((e) => /* @__PURE__ */ p(ri, {
|
|
8158
8460
|
item: e,
|
|
8159
8461
|
linkComponent: t,
|
|
8160
8462
|
onNavigate: n,
|
|
@@ -8195,7 +8497,7 @@ function Gr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8195
8497
|
}
|
|
8196
8498
|
//#endregion
|
|
8197
8499
|
//#region src/components/AppSidebarMenu.jsx
|
|
8198
|
-
var
|
|
8500
|
+
var ii = {
|
|
8199
8501
|
left: "start",
|
|
8200
8502
|
right: "end",
|
|
8201
8503
|
start: "start",
|
|
@@ -8203,9 +8505,9 @@ var Kr = {
|
|
|
8203
8505
|
top: "top",
|
|
8204
8506
|
bottom: "bottom"
|
|
8205
8507
|
};
|
|
8206
|
-
function
|
|
8207
|
-
N("AppSidebarMenu", b),
|
|
8208
|
-
let { style: x, ...S } = b, w =
|
|
8508
|
+
function ai({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, header: a, children: o, footer: s, width: c, maxWidth: l, backdrop: u = !0, scroll: d = !1, keyboard: f = !0, closeButton: h = !0, responsive: g, className: _ = "", bodyClassName: v = "", ariaLabel: y, ...b }) {
|
|
8509
|
+
N("AppSidebarMenu", b), U("AppSidebarMenu", "side", n, Object.keys(ii));
|
|
8510
|
+
let { style: x, ...S } = b, w = ii[n] || "end", T = c || l || x ? {
|
|
8209
8511
|
...c && { "--asm-width": c },
|
|
8210
8512
|
...l && { "--asm-max-width": l },
|
|
8211
8513
|
...x
|
|
@@ -8234,7 +8536,7 @@ function qr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8234
8536
|
size: 18
|
|
8235
8537
|
})
|
|
8236
8538
|
}), r]
|
|
8237
|
-
}), h && /* @__PURE__ */ p(
|
|
8539
|
+
}), h && /* @__PURE__ */ p(W, {
|
|
8238
8540
|
variant: "ghost",
|
|
8239
8541
|
className: "btn-icon",
|
|
8240
8542
|
onClick: t,
|
|
@@ -8258,28 +8560,28 @@ function qr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8258
8560
|
}
|
|
8259
8561
|
//#endregion
|
|
8260
8562
|
//#region src/components/AppSlider.jsx
|
|
8261
|
-
var
|
|
8262
|
-
N("AppSlider",
|
|
8263
|
-
let
|
|
8264
|
-
ref:
|
|
8265
|
-
value:
|
|
8563
|
+
var oi = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, label: a, required: c = !1, hint: l, error: u, name: d, startName: f, endName: h, min: g = 0, max: _ = 100, step: v = 1, disabled: y, size: b, showValue: x, unit: S, id: C, ariaLabel: w, className: T = "", fieldClassName: E = "", ...D }, O) {
|
|
8564
|
+
N("AppSlider", D);
|
|
8565
|
+
let k = s(), A = C || d || r && f || k, j = r, { setRef: M, innerRef: P } = Q({
|
|
8566
|
+
ref: O,
|
|
8567
|
+
value: j ? void 0 : e,
|
|
8266
8568
|
onChange: i,
|
|
8267
|
-
readValue:
|
|
8268
|
-
writeValue:
|
|
8569
|
+
readValue: j ? ln : void 0,
|
|
8570
|
+
writeValue: j ? void 0 : un
|
|
8269
8571
|
});
|
|
8270
8572
|
o(() => {
|
|
8271
|
-
if (!
|
|
8272
|
-
let e =
|
|
8573
|
+
if (!j) return;
|
|
8574
|
+
let e = P.current;
|
|
8273
8575
|
e && (t !== void 0 && t > e.end ? (n !== void 0 && e.end !== n && (e.end = n), t !== void 0 && e.start !== t && (e.start = t)) : (t !== void 0 && e.start !== t && (e.start = t), n !== void 0 && e.end !== n && (e.end = n)));
|
|
8274
8576
|
}, [
|
|
8275
8577
|
t,
|
|
8276
8578
|
n,
|
|
8277
|
-
|
|
8278
|
-
|
|
8579
|
+
j,
|
|
8580
|
+
P
|
|
8279
8581
|
]);
|
|
8280
|
-
let
|
|
8281
|
-
ref:
|
|
8282
|
-
id:
|
|
8582
|
+
let F = !a && !u && !l, I = u ? `${A}-error` : void 0, L = l ? `${A}-hint` : void 0, R = /* @__PURE__ */ p("wui-slider", {
|
|
8583
|
+
ref: M,
|
|
8584
|
+
id: A,
|
|
8283
8585
|
name: d || void 0,
|
|
8284
8586
|
"start-name": f || void 0,
|
|
8285
8587
|
"end-name": h || void 0,
|
|
@@ -8288,45 +8590,45 @@ var Jr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
8288
8590
|
step: v,
|
|
8289
8591
|
size: b || void 0,
|
|
8290
8592
|
"aria-label": w || (typeof a == "string" ? a : void 0),
|
|
8291
|
-
"aria-describedby":
|
|
8593
|
+
"aria-describedby": I || L,
|
|
8292
8594
|
"aria-invalid": u ? "true" : void 0,
|
|
8293
8595
|
disabled: y ? "" : void 0,
|
|
8294
8596
|
required: c ? "" : void 0,
|
|
8295
|
-
range:
|
|
8597
|
+
range: j ? "" : void 0,
|
|
8296
8598
|
"show-value": x ? "" : void 0,
|
|
8297
8599
|
unit: S || void 0,
|
|
8298
|
-
className:
|
|
8299
|
-
...
|
|
8600
|
+
className: T || void 0,
|
|
8601
|
+
...D
|
|
8300
8602
|
});
|
|
8301
|
-
return
|
|
8302
|
-
className: `field${
|
|
8603
|
+
return F ? R : /* @__PURE__ */ m("div", {
|
|
8604
|
+
className: `field${E ? ` ${E}` : ""}`,
|
|
8303
8605
|
children: [
|
|
8304
8606
|
a && /* @__PURE__ */ m("label", {
|
|
8305
8607
|
className: "label",
|
|
8306
|
-
htmlFor:
|
|
8608
|
+
htmlFor: A,
|
|
8307
8609
|
children: [a, c && /* @__PURE__ */ p(Z, {})]
|
|
8308
8610
|
}),
|
|
8309
|
-
|
|
8611
|
+
R,
|
|
8310
8612
|
u && /* @__PURE__ */ p("div", {
|
|
8311
8613
|
className: "field-error",
|
|
8312
|
-
id:
|
|
8614
|
+
id: I,
|
|
8313
8615
|
children: u
|
|
8314
8616
|
}),
|
|
8315
8617
|
!u && l && /* @__PURE__ */ p("div", {
|
|
8316
8618
|
className: "field-hint",
|
|
8317
|
-
id:
|
|
8619
|
+
id: L,
|
|
8318
8620
|
children: l
|
|
8319
8621
|
})
|
|
8320
8622
|
]
|
|
8321
8623
|
});
|
|
8322
|
-
}),
|
|
8624
|
+
}), si = {
|
|
8323
8625
|
sm: 44,
|
|
8324
8626
|
md: 56,
|
|
8325
8627
|
lg: 72
|
|
8326
8628
|
};
|
|
8327
|
-
function
|
|
8328
|
-
N("AppSplash", c),
|
|
8329
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
8629
|
+
function ci({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
8630
|
+
N("AppSplash", c), U("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(si));
|
|
8631
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : si[a] ?? si.md, f = i === "ring" ? /* @__PURE__ */ p("span", {
|
|
8330
8632
|
className: "splash-ring",
|
|
8331
8633
|
"aria-hidden": "true"
|
|
8332
8634
|
}) : i === "dots" ? /* @__PURE__ */ m("span", {
|
|
@@ -8373,7 +8675,7 @@ function Xr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
8373
8675
|
}
|
|
8374
8676
|
//#endregion
|
|
8375
8677
|
//#region src/components/AppStatusBadge.jsx
|
|
8376
|
-
function
|
|
8678
|
+
function li({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
8377
8679
|
return N("AppStatusBadge", r), e == null || e === "" ? "—" : /* @__PURE__ */ p("span", {
|
|
8378
8680
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
8379
8681
|
...r,
|
|
@@ -8382,7 +8684,7 @@ function Zr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
|
8382
8684
|
}
|
|
8383
8685
|
//#endregion
|
|
8384
8686
|
//#region src/components/AppStepper.jsx
|
|
8385
|
-
function
|
|
8687
|
+
function ui({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
8386
8688
|
N("AppStepper", c);
|
|
8387
8689
|
let l = t === "journey";
|
|
8388
8690
|
return /* @__PURE__ */ p("nav", {
|
|
@@ -8395,7 +8697,7 @@ function Qr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8395
8697
|
"aria-label": a,
|
|
8396
8698
|
...c,
|
|
8397
8699
|
children: e.map((t, n) => {
|
|
8398
|
-
let a = t.status ||
|
|
8700
|
+
let a = t.status || di(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
8399
8701
|
c = a === "done" ? /* @__PURE__ */ p(V, {
|
|
8400
8702
|
name: "check",
|
|
8401
8703
|
size: 14
|
|
@@ -8459,13 +8761,13 @@ function Qr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8459
8761
|
})
|
|
8460
8762
|
});
|
|
8461
8763
|
}
|
|
8462
|
-
function
|
|
8764
|
+
function di(e, t) {
|
|
8463
8765
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
8464
8766
|
}
|
|
8465
8767
|
//#endregion
|
|
8466
8768
|
//#region src/components/AppSwitch.jsx
|
|
8467
|
-
var
|
|
8468
|
-
return N("AppSwitch", s), /* @__PURE__ */ p(
|
|
8769
|
+
var fi = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
8770
|
+
return N("AppSwitch", s), /* @__PURE__ */ p(kn, {
|
|
8469
8771
|
ref: c,
|
|
8470
8772
|
label: e,
|
|
8471
8773
|
id: t,
|
|
@@ -8480,7 +8782,7 @@ var ei = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
8480
8782
|
});
|
|
8481
8783
|
//#endregion
|
|
8482
8784
|
//#region src/components/AppTableEmptyState.jsx
|
|
8483
|
-
function
|
|
8785
|
+
function pi({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
8484
8786
|
return N("AppTableEmptyState", i), /* @__PURE__ */ m("div", {
|
|
8485
8787
|
className: "tbl-empty",
|
|
8486
8788
|
...i,
|
|
@@ -8506,13 +8808,13 @@ function ti({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
8506
8808
|
}
|
|
8507
8809
|
//#endregion
|
|
8508
8810
|
//#region src/components/AppTooltip.jsx
|
|
8509
|
-
var
|
|
8811
|
+
var mi = {
|
|
8510
8812
|
start: "left",
|
|
8511
8813
|
end: "right",
|
|
8512
8814
|
top: "top",
|
|
8513
8815
|
bottom: "bottom"
|
|
8514
8816
|
};
|
|
8515
|
-
function
|
|
8817
|
+
function hi({ content: e, children: t, placement: r = "top", tone: i = "default", size: a = "md", className: o = "", ...c }) {
|
|
8516
8818
|
N("AppTooltip", c);
|
|
8517
8819
|
let l = /* @__PURE__ */ p(E, {
|
|
8518
8820
|
id: s(),
|
|
@@ -8526,14 +8828,14 @@ function ri({ content: e, children: t, placement: r = "top", tone: i = "default"
|
|
|
8526
8828
|
});
|
|
8527
8829
|
return /* @__PURE__ */ p(w, {
|
|
8528
8830
|
trigger: ["hover", "focus"],
|
|
8529
|
-
placement:
|
|
8831
|
+
placement: mi[r] || r,
|
|
8530
8832
|
overlay: l,
|
|
8531
8833
|
children: n(t, c)
|
|
8532
8834
|
});
|
|
8533
8835
|
}
|
|
8534
8836
|
//#endregion
|
|
8535
8837
|
//#region src/components/AppTabs.jsx
|
|
8536
|
-
function
|
|
8838
|
+
function gi({ tabs: e, value: t, onChange: n, variant: r = "underline", orientation: i = "horizontal", size: s = "md", fitted: l = !1, activation: f = "automatic", ariaLabel: h, className: g = "", style: _, ...v }) {
|
|
8537
8839
|
N("AppTabs", v);
|
|
8538
8840
|
let y = u(null), b = u(null), x = i === "vertical", [S, C] = d(t);
|
|
8539
8841
|
o(() => {
|
|
@@ -8640,7 +8942,7 @@ function ii({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8640
8942
|
})
|
|
8641
8943
|
]
|
|
8642
8944
|
}, e.key);
|
|
8643
|
-
return e.tooltip ? /* @__PURE__ */ p(
|
|
8945
|
+
return e.tooltip ? /* @__PURE__ */ p(hi, {
|
|
8644
8946
|
content: e.tooltip,
|
|
8645
8947
|
children: i
|
|
8646
8948
|
}, e.key) : i;
|
|
@@ -8682,14 +8984,14 @@ function ii({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8682
8984
|
}
|
|
8683
8985
|
//#endregion
|
|
8684
8986
|
//#region src/components/AppTagInput.jsx
|
|
8685
|
-
var
|
|
8987
|
+
var _i = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r, label: i, error: a, hint: o, required: c = !1, size: l, maxTags: u, allowDuplicates: d = !1, disabled: f = !1, id: h, ariaLabel: g, className: _ = "", fieldClassName: v = "", help: y, helpLabel: b = "More information", ...x }, S) {
|
|
8686
8988
|
N("AppTagInput", x);
|
|
8687
8989
|
let C = s(), w = h || r || C, { setRef: T } = Q({
|
|
8688
8990
|
ref: S,
|
|
8689
8991
|
value: e,
|
|
8690
8992
|
onChange: t,
|
|
8691
|
-
readValue:
|
|
8692
|
-
writeValue:
|
|
8993
|
+
readValue: sn,
|
|
8994
|
+
writeValue: cn
|
|
8693
8995
|
});
|
|
8694
8996
|
return /* @__PURE__ */ m("div", {
|
|
8695
8997
|
className: `field${v ? ` ${v}` : ""}`,
|
|
@@ -8700,7 +9002,7 @@ var ai = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8700
9002
|
children: [
|
|
8701
9003
|
i,
|
|
8702
9004
|
c && /* @__PURE__ */ p(Z, {}),
|
|
8703
|
-
y && /* @__PURE__ */ p(
|
|
9005
|
+
y && /* @__PURE__ */ p(tn, {
|
|
8704
9006
|
label: b,
|
|
8705
9007
|
children: y
|
|
8706
9008
|
})
|
|
@@ -8733,7 +9035,7 @@ var ai = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8733
9035
|
}) : null
|
|
8734
9036
|
]
|
|
8735
9037
|
});
|
|
8736
|
-
}),
|
|
9038
|
+
}), vi = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: l = "More information", id: f, name: h, rows: g = 4, autoGrow: _ = !1, showCount: v = !1, maxLength: y, className: b = "", fieldClassName: S = "", ...C }, w) {
|
|
8737
9039
|
N("AppTextarea", C);
|
|
8738
9040
|
let T = s(), E = f || T, D = [
|
|
8739
9041
|
"textarea",
|
|
@@ -8769,7 +9071,7 @@ var ai = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8769
9071
|
children: [
|
|
8770
9072
|
e,
|
|
8771
9073
|
t && /* @__PURE__ */ p(Z, {}),
|
|
8772
|
-
i && /* @__PURE__ */ p(
|
|
9074
|
+
i && /* @__PURE__ */ p(tn, {
|
|
8773
9075
|
label: l,
|
|
8774
9076
|
children: i
|
|
8775
9077
|
})
|
|
@@ -8804,7 +9106,7 @@ var ai = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8804
9106
|
})
|
|
8805
9107
|
]
|
|
8806
9108
|
});
|
|
8807
|
-
}),
|
|
9109
|
+
}), yi = {
|
|
8808
9110
|
done: "check",
|
|
8809
9111
|
current: "clock",
|
|
8810
9112
|
"on-hold": "lock",
|
|
@@ -8813,7 +9115,7 @@ var ai = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8813
9115
|
skipped: "arrow-right",
|
|
8814
9116
|
upcoming: null
|
|
8815
9117
|
};
|
|
8816
|
-
function
|
|
9118
|
+
function bi({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
8817
9119
|
N("AppTimeline", o);
|
|
8818
9120
|
let s = t === "progress", c = `timeline${s ? " timeline--progress" : ""}${n === "horizontal" ? " timeline--horizontal" : ""}${i ? ` ${i}` : ""}`, l = typeof r == "number" && r > 0 ? r : void 0, u = l ? Math.round(l * .54) : s ? 13 : 12;
|
|
8819
9121
|
return /* @__PURE__ */ p("ol", {
|
|
@@ -8824,7 +9126,7 @@ function ci({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8824
9126
|
} : a,
|
|
8825
9127
|
...o,
|
|
8826
9128
|
children: e.map((e, t) => {
|
|
8827
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
9129
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? yi[n] : void 0) : e.icon || "circle";
|
|
8828
9130
|
return /* @__PURE__ */ m("li", {
|
|
8829
9131
|
className: `timeline-item${r}${i}`,
|
|
8830
9132
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -8882,15 +9184,15 @@ function ci({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8882
9184
|
}
|
|
8883
9185
|
//#endregion
|
|
8884
9186
|
//#region src/components/AppTimePicker.jsx
|
|
8885
|
-
var
|
|
8886
|
-
N("AppTimePicker",
|
|
8887
|
-
let
|
|
8888
|
-
ref:
|
|
9187
|
+
var xi = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, step: u, format: d = "24", placeholder: f = "Select time", disabled: h, size: g, id: _, ariaLabel: v, className: y = "", fieldClassName: b = "", ...x }, S) {
|
|
9188
|
+
N("AppTimePicker", x);
|
|
9189
|
+
let C = s(), w = _ || o || C, { setRef: T } = Q({
|
|
9190
|
+
ref: S,
|
|
8889
9191
|
value: e ?? "",
|
|
8890
9192
|
onChange: t
|
|
8891
|
-
}),
|
|
8892
|
-
ref:
|
|
8893
|
-
id:
|
|
9193
|
+
}), E = !n && !a && !i, D = a ? `${w}-error` : void 0, O = i ? `${w}-hint` : void 0, k = /* @__PURE__ */ p("wui-timepicker", {
|
|
9194
|
+
ref: T,
|
|
9195
|
+
id: w,
|
|
8894
9196
|
name: o,
|
|
8895
9197
|
min: c,
|
|
8896
9198
|
max: l,
|
|
@@ -8899,60 +9201,60 @@ var li = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
8899
9201
|
placeholder: f,
|
|
8900
9202
|
size: g || void 0,
|
|
8901
9203
|
"aria-label": v || (typeof n == "string" ? n : void 0),
|
|
8902
|
-
"aria-describedby":
|
|
9204
|
+
"aria-describedby": D || O,
|
|
8903
9205
|
"aria-invalid": a ? "true" : void 0,
|
|
8904
9206
|
disabled: h ? "" : void 0,
|
|
8905
9207
|
required: r ? "" : void 0,
|
|
8906
|
-
className:
|
|
8907
|
-
...
|
|
9208
|
+
className: y || void 0,
|
|
9209
|
+
...x
|
|
8908
9210
|
});
|
|
8909
|
-
return
|
|
8910
|
-
className: `field${
|
|
9211
|
+
return E ? k : /* @__PURE__ */ m("div", {
|
|
9212
|
+
className: `field${b ? ` ${b}` : ""}`,
|
|
8911
9213
|
children: [
|
|
8912
9214
|
n && /* @__PURE__ */ m("label", {
|
|
8913
9215
|
className: "label",
|
|
8914
|
-
htmlFor:
|
|
9216
|
+
htmlFor: w,
|
|
8915
9217
|
children: [n, r && /* @__PURE__ */ p(Z, {})]
|
|
8916
9218
|
}),
|
|
8917
|
-
|
|
9219
|
+
k,
|
|
8918
9220
|
a && /* @__PURE__ */ p("div", {
|
|
8919
9221
|
className: "field-error",
|
|
8920
|
-
id:
|
|
9222
|
+
id: D,
|
|
8921
9223
|
children: a
|
|
8922
9224
|
}),
|
|
8923
9225
|
!a && i && /* @__PURE__ */ p("div", {
|
|
8924
9226
|
className: "field-hint",
|
|
8925
|
-
id:
|
|
9227
|
+
id: O,
|
|
8926
9228
|
children: i
|
|
8927
9229
|
})
|
|
8928
9230
|
]
|
|
8929
9231
|
});
|
|
8930
|
-
}),
|
|
8931
|
-
function
|
|
8932
|
-
for (let e of
|
|
9232
|
+
}), Si = 6, $ = [], Ci = /* @__PURE__ */ new Set(), wi = /* @__PURE__ */ new Map(), Ti = 0;
|
|
9233
|
+
function Ei() {
|
|
9234
|
+
for (let e of Ci) e($);
|
|
8933
9235
|
}
|
|
8934
|
-
function
|
|
8935
|
-
let t =
|
|
8936
|
-
t !== void 0 && (clearTimeout(t),
|
|
9236
|
+
function Di(e) {
|
|
9237
|
+
let t = wi.get(e);
|
|
9238
|
+
t !== void 0 && (clearTimeout(t), wi.delete(e));
|
|
8937
9239
|
}
|
|
8938
|
-
function
|
|
8939
|
-
if (e.length <=
|
|
9240
|
+
function Oi(e) {
|
|
9241
|
+
if (e.length <= Si) return e;
|
|
8940
9242
|
let t = [...e];
|
|
8941
|
-
for (; t.length >
|
|
9243
|
+
for (; t.length > Si;) {
|
|
8942
9244
|
let e = t.findIndex((e) => e.duration !== 0);
|
|
8943
9245
|
t.splice(e === -1 ? 0 : e, 1);
|
|
8944
9246
|
}
|
|
8945
9247
|
return t;
|
|
8946
9248
|
}
|
|
8947
|
-
function
|
|
8948
|
-
return
|
|
9249
|
+
function ki(e) {
|
|
9250
|
+
return Ci.add(e), e($), () => Ci.delete(e);
|
|
8949
9251
|
}
|
|
8950
|
-
function
|
|
9252
|
+
function Ai(e, t, n = {}) {
|
|
8951
9253
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
8952
9254
|
if (r) {
|
|
8953
9255
|
let i = $.find((e) => e.externalId === r);
|
|
8954
9256
|
if (i) {
|
|
8955
|
-
|
|
9257
|
+
Di(i.id);
|
|
8956
9258
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
8957
9259
|
$ = $.map((a) => a.id === i.id ? {
|
|
8958
9260
|
...a,
|
|
@@ -8965,12 +9267,12 @@ function vi(e, t, n = {}) {
|
|
|
8965
9267
|
shape: n.shape,
|
|
8966
9268
|
surface: n.surface,
|
|
8967
9269
|
progress: n.progress
|
|
8968
|
-
} : a),
|
|
9270
|
+
} : a), Ei(), r > 0 && wi.set(i.id, setTimeout(() => ji(i.id), r));
|
|
8969
9271
|
return;
|
|
8970
9272
|
}
|
|
8971
9273
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
8972
|
-
let a = ++
|
|
8973
|
-
$ =
|
|
9274
|
+
let a = ++Ti, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
9275
|
+
$ = Oi([...$, {
|
|
8974
9276
|
id: a,
|
|
8975
9277
|
externalId: r,
|
|
8976
9278
|
message: e,
|
|
@@ -8983,19 +9285,19 @@ function vi(e, t, n = {}) {
|
|
|
8983
9285
|
surface: n.surface,
|
|
8984
9286
|
progress: n.progress,
|
|
8985
9287
|
key: i
|
|
8986
|
-
}]),
|
|
9288
|
+
}]), Ei(), o > 0 && wi.set(a, setTimeout(() => ji(a), o));
|
|
8987
9289
|
}
|
|
8988
|
-
function
|
|
8989
|
-
|
|
9290
|
+
function ji(e) {
|
|
9291
|
+
Di(e);
|
|
8990
9292
|
let t = $.filter((t) => t.id !== e);
|
|
8991
|
-
t.length !== $.length && ($ = t,
|
|
9293
|
+
t.length !== $.length && ($ = t, Ei());
|
|
8992
9294
|
}
|
|
8993
|
-
function
|
|
8994
|
-
$.length !== 0 && ($ = [],
|
|
9295
|
+
function Mi() {
|
|
9296
|
+
$.length !== 0 && ($ = [], Ei());
|
|
8995
9297
|
}
|
|
8996
9298
|
//#endregion
|
|
8997
9299
|
//#region src/components/AppToast.jsx
|
|
8998
|
-
var
|
|
9300
|
+
var Ni = {
|
|
8999
9301
|
success: {
|
|
9000
9302
|
icon: "check-circle",
|
|
9001
9303
|
assertive: !1
|
|
@@ -9012,7 +9314,7 @@ var xi = {
|
|
|
9012
9314
|
icon: "alert-circle",
|
|
9013
9315
|
assertive: !0
|
|
9014
9316
|
}
|
|
9015
|
-
},
|
|
9317
|
+
}, Pi = {
|
|
9016
9318
|
"top-start": "top-0 start-0",
|
|
9017
9319
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
9018
9320
|
"top-end": "top-0 end-0",
|
|
@@ -9020,21 +9322,21 @@ var xi = {
|
|
|
9020
9322
|
"bottom-start": "bottom-0 start-0",
|
|
9021
9323
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
9022
9324
|
"bottom-end": "bottom-0 end-0"
|
|
9023
|
-
},
|
|
9325
|
+
}, Fi = 64, Ii = /* @__PURE__ */ new Set([
|
|
9024
9326
|
"rise",
|
|
9025
9327
|
"organic",
|
|
9026
9328
|
"jelly",
|
|
9027
9329
|
"spring"
|
|
9028
|
-
]),
|
|
9330
|
+
]), Li = /* @__PURE__ */ new Set([
|
|
9029
9331
|
"rounded",
|
|
9030
9332
|
"pill",
|
|
9031
9333
|
"sharp"
|
|
9032
|
-
]),
|
|
9033
|
-
function
|
|
9034
|
-
N("AppToast", s),
|
|
9334
|
+
]), Ri = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
9335
|
+
function zi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
9336
|
+
N("AppToast", s), U("AppToast", "position", e, Object.keys(Pi)), U("AppToast", "animation", n, Ii), U("AppToast", "shape", r, Li), U("AppToast", "surface", i, Ri);
|
|
9035
9337
|
let [c, l] = d([]);
|
|
9036
|
-
o(() =>
|
|
9037
|
-
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h =
|
|
9338
|
+
o(() => ki(l), []);
|
|
9339
|
+
let u = Math.max(0, c.length - t), f = u ? c.slice(u) : c, h = Pi[e] ?? Pi["bottom-end"];
|
|
9038
9340
|
return /* @__PURE__ */ m("div", {
|
|
9039
9341
|
...s,
|
|
9040
9342
|
className: `wui-toast-container toast-container position-fixed ${h} p-3 ${a}`.trim(),
|
|
@@ -9046,7 +9348,7 @@ function Di({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
9046
9348
|
u,
|
|
9047
9349
|
" more"
|
|
9048
9350
|
]
|
|
9049
|
-
}), f.map((e) => /* @__PURE__ */ p(
|
|
9351
|
+
}), f.map((e) => /* @__PURE__ */ p(Bi, {
|
|
9050
9352
|
toast: e,
|
|
9051
9353
|
defaultAnimation: n,
|
|
9052
9354
|
defaultShape: r,
|
|
@@ -9054,8 +9356,8 @@ function Di({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
9054
9356
|
}, e.id))]
|
|
9055
9357
|
});
|
|
9056
9358
|
}
|
|
9057
|
-
function
|
|
9058
|
-
let i =
|
|
9359
|
+
function Bi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
9360
|
+
let i = Ni[e.variant] ?? Ni.success, a = Ii.has(e.animation) ? e.animation : t, o = Li.has(e.shape) ? e.shape : n, s = Ri.has(e.surface) ? e.surface : r, c = (a !== "rise" && Ii.has(a) ? ` wui-toast--anim-${a}` : "") + (o !== "rounded" && Li.has(o) ? ` wui-toast--shape-${o}` : "") + (s === "inverse" ? " wui-toast--surface-inverse" : ""), l = e.duration === 0, [f, h] = d(0), [g, _] = d(!1), v = u(null), y = () => ji(e.id), b = (e) => {
|
|
9059
9361
|
e.button !== 0 || e.target.closest("button") || (v.current = e.clientX, _(!0), e.currentTarget.setPointerCapture?.(e.pointerId));
|
|
9060
9362
|
}, x = (e) => {
|
|
9061
9363
|
v.current !== null && h(e.clientX - v.current);
|
|
@@ -9064,7 +9366,7 @@ function Oi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
9064
9366
|
}, C = (e) => {
|
|
9065
9367
|
if (v.current === null) return;
|
|
9066
9368
|
let t = e.clientX - v.current;
|
|
9067
|
-
if (Math.abs(t) >
|
|
9369
|
+
if (Math.abs(t) > Fi) {
|
|
9068
9370
|
y();
|
|
9069
9371
|
return;
|
|
9070
9372
|
}
|
|
@@ -9147,7 +9449,7 @@ function Oi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
9147
9449
|
}
|
|
9148
9450
|
//#endregion
|
|
9149
9451
|
//#region src/components/AppToolbar.jsx
|
|
9150
|
-
function
|
|
9452
|
+
function Vi({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
9151
9453
|
N("AppToolbar", u);
|
|
9152
9454
|
let f = s(), h = o || f, [g, _] = d(r), v = n === void 0 ? g : n;
|
|
9153
9455
|
return /* @__PURE__ */ m("div", {
|
|
@@ -9205,7 +9507,7 @@ function ki({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9205
9507
|
}
|
|
9206
9508
|
//#endregion
|
|
9207
9509
|
//#region src/components/AppWizard.jsx
|
|
9208
|
-
var
|
|
9510
|
+
var Hi = i(function({ steps: t = [], children: n, active: r, defaultActive: i = 0, onStepChange: a, onFinish: s, onSkip: c, beforeNext: l, onInvalid: d, variant: f = "steps", tone: m, orientation: h = "horizontal", skippable: g = !1, nonLinear: _ = !1, hideStepper: v = !1, disabled: y = !1, label: b = "Progress", backLabel: x = "Back", nextLabel: S = "Next", skipLabel: C = "Skip", finishLabel: w = "Finish", className: T = "", ...E }, D) {
|
|
9209
9511
|
N("AppWizard", E);
|
|
9210
9512
|
let O = u(null), k = (e) => {
|
|
9211
9513
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -9260,7 +9562,7 @@ var Ai = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
9260
9562
|
});
|
|
9261
9563
|
//#endregion
|
|
9262
9564
|
//#region src/components/AppWorkspaceSwitcher.jsx
|
|
9263
|
-
function
|
|
9565
|
+
function Ui({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAction: i, linkComponent: a, searchable: s = !1, onCreate: c, canCreate: f = !1, createLabel: h = "Create workspace", compact: g = !1, size: _ = "md", ariaLabel: v, ...y }) {
|
|
9264
9566
|
let { onToggle: x, ...S } = y;
|
|
9265
9567
|
N("AppWorkspaceSwitcher", S);
|
|
9266
9568
|
let [C, w] = d(""), [T, E] = d(!1), D = u(null), O = e.find((e) => e.id === t) ?? e[0], k = l(() => {
|
|
@@ -9288,7 +9590,7 @@ function ji({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9288
9590
|
},
|
|
9289
9591
|
...S,
|
|
9290
9592
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
9291
|
-
as:
|
|
9593
|
+
as: qi,
|
|
9292
9594
|
compact: g,
|
|
9293
9595
|
tenant: O,
|
|
9294
9596
|
"aria-label": j
|
|
@@ -9323,7 +9625,7 @@ function ji({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9323
9625
|
className: `workspace-switcher-option${e.id === O?.id ? " is-active" : ""}`,
|
|
9324
9626
|
onClick: () => n?.(e),
|
|
9325
9627
|
children: [
|
|
9326
|
-
/* @__PURE__ */ p(
|
|
9628
|
+
/* @__PURE__ */ p(Gi, { tenant: e }),
|
|
9327
9629
|
/* @__PURE__ */ p("span", {
|
|
9328
9630
|
className: "workspace-switcher-option-name",
|
|
9329
9631
|
children: e.name
|
|
@@ -9355,17 +9657,17 @@ function ji({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9355
9657
|
}) : null,
|
|
9356
9658
|
i ? /* @__PURE__ */ p("div", {
|
|
9357
9659
|
className: "workspace-switcher-footer",
|
|
9358
|
-
children:
|
|
9660
|
+
children: Ki(i, a)
|
|
9359
9661
|
}) : null
|
|
9360
9662
|
]
|
|
9361
9663
|
})]
|
|
9362
9664
|
});
|
|
9363
9665
|
}
|
|
9364
|
-
function
|
|
9666
|
+
function Wi(e) {
|
|
9365
9667
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
9366
9668
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
9367
9669
|
}
|
|
9368
|
-
function
|
|
9670
|
+
function Gi({ tenant: e }) {
|
|
9369
9671
|
return e?.logoUrl ? /* @__PURE__ */ p("img", {
|
|
9370
9672
|
className: "workspace-switcher-mark",
|
|
9371
9673
|
src: e.logoUrl,
|
|
@@ -9373,10 +9675,10 @@ function Ni({ tenant: e }) {
|
|
|
9373
9675
|
loading: "lazy"
|
|
9374
9676
|
}) : /* @__PURE__ */ p("span", {
|
|
9375
9677
|
className: "workspace-switcher-mark",
|
|
9376
|
-
children:
|
|
9678
|
+
children: Wi(e?.name)
|
|
9377
9679
|
});
|
|
9378
9680
|
}
|
|
9379
|
-
function
|
|
9681
|
+
function Ki(e, t) {
|
|
9380
9682
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
9381
9683
|
let { label: n, icon: r, href: i } = e;
|
|
9382
9684
|
return /* @__PURE__ */ m(i ? t ?? "a" : "button", {
|
|
@@ -9388,7 +9690,7 @@ function Pi(e, t) {
|
|
|
9388
9690
|
}) : null, n]
|
|
9389
9691
|
});
|
|
9390
9692
|
}
|
|
9391
|
-
var
|
|
9693
|
+
var qi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
9392
9694
|
return /* @__PURE__ */ m("button", {
|
|
9393
9695
|
ref: a,
|
|
9394
9696
|
type: "button",
|
|
@@ -9396,7 +9698,7 @@ var Fi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9396
9698
|
"aria-haspopup": "true",
|
|
9397
9699
|
"aria-label": n,
|
|
9398
9700
|
...i,
|
|
9399
|
-
children: [/* @__PURE__ */ p(
|
|
9701
|
+
children: [/* @__PURE__ */ p(Gi, { tenant: t }), e ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
9400
9702
|
className: "workspace-switcher-trigger-name",
|
|
9401
9703
|
children: t?.name
|
|
9402
9704
|
}), /* @__PURE__ */ p(V, {
|
|
@@ -9408,36 +9710,36 @@ var Fi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9408
9710
|
});
|
|
9409
9711
|
//#endregion
|
|
9410
9712
|
//#region src/components/toast.js
|
|
9411
|
-
function
|
|
9412
|
-
|
|
9713
|
+
function Ji() {
|
|
9714
|
+
Mi();
|
|
9413
9715
|
}
|
|
9414
|
-
var
|
|
9716
|
+
var Yi = /* @__PURE__ */ new Set([
|
|
9415
9717
|
"success",
|
|
9416
9718
|
"info",
|
|
9417
9719
|
"warning",
|
|
9418
9720
|
"error"
|
|
9419
9721
|
]);
|
|
9420
|
-
function
|
|
9722
|
+
function Xi(e, t = "info") {
|
|
9421
9723
|
let n = "info", r = {};
|
|
9422
|
-
typeof t == "string" ? n =
|
|
9724
|
+
typeof t == "string" ? n = Yi.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = Yi.has(r.variant) ? r.variant : "info"), Ai(e, n, r);
|
|
9423
9725
|
}
|
|
9424
|
-
function
|
|
9425
|
-
|
|
9726
|
+
function Zi(e, t = {}) {
|
|
9727
|
+
Ai(e, "error", t);
|
|
9426
9728
|
}
|
|
9427
|
-
|
|
9729
|
+
Xi.promise = (e, t, n = {}) => {
|
|
9428
9730
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
9429
|
-
return
|
|
9731
|
+
return Xi(t.loading || "Loading...", {
|
|
9430
9732
|
...n,
|
|
9431
9733
|
variant: "info",
|
|
9432
9734
|
id: r,
|
|
9433
9735
|
duration: 0
|
|
9434
|
-
}), e.then((e) => (
|
|
9736
|
+
}), e.then((e) => (Xi((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
9435
9737
|
...n,
|
|
9436
9738
|
variant: "success",
|
|
9437
9739
|
id: r,
|
|
9438
9740
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
9439
9741
|
}), e)).catch((e) => {
|
|
9440
|
-
throw
|
|
9742
|
+
throw Xi((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
9441
9743
|
...n,
|
|
9442
9744
|
variant: "error",
|
|
9443
9745
|
id: r,
|
|
@@ -9447,7 +9749,7 @@ Ri.promise = (e, t, n = {}) => {
|
|
|
9447
9749
|
};
|
|
9448
9750
|
//#endregion
|
|
9449
9751
|
//#region src/lib/usePagination.js
|
|
9450
|
-
function
|
|
9752
|
+
function Qi(e, t = 10) {
|
|
9451
9753
|
let [n, r] = d(1), [i, a] = d(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
9452
9754
|
o(() => {
|
|
9453
9755
|
n > c && r(c);
|
|
@@ -9473,4 +9775,4 @@ function Bi(e, t = 10) {
|
|
|
9473
9775
|
};
|
|
9474
9776
|
}
|
|
9475
9777
|
//#endregion
|
|
9476
|
-
export { ue as AppAccordion, de as AppActionIcon, me as AppAlert, Se as AppAsyncBlock,
|
|
9778
|
+
export { ue as AppAccordion, de as AppActionIcon, me as AppAlert, Se as AppAsyncBlock, dn as AppAutocomplete, _n as AppAvatar, bn as AppAvatarGroup, xn as AppBadge, Cn as AppBanner, wn as AppBreadcrumbs, W as AppButton, En as AppCallout, On as AppCard, An as AppCheckbox, jn as AppChip, Mn as AppChoiceCard, Nn as AppChoiceChip, Pn as AppColorField, Fn as AppCompareTable, Wn as AppConfirmDialog, Kn as AppCopyButton, nr as AppDataTable, rr as AppDatePicker, ir as AppDateRangePicker, or as AppDescriptions, lr as AppDropdown, be as AppEmptyState, dr as AppFeedback, _r as AppFileAttachment, yr as AppFilePicker, br as AppFloatingDock, xr as AppFormActions, Sr as AppFormRow, Cr as AppFormSection, V as AppIcon, wr as AppInfoList, tn as AppInfoTip, In as AppInput, kr as AppKpiTile, jr as AppLogoPicker, Fr as AppMeter, Vn as AppModal, Ir as AppMultiSelect, Lr as AppNumberInput, Rr as AppOtpInput, zr as AppPageHeader, Br as AppPagination, Vr as AppPhoneNumberInput, en as AppPopover, Hr as AppPricingCard, Gr as AppProgress, Kr as AppRadio, qr as AppRepeater, Z as AppRequiredMark, Jr as AppResourceCard, Xr as AppResult, Zr as AppScrollbar, Qr as AppSearch, $r as AppSegmented, ti as AppSelect, Zn as AppSelectMini, ni as AppShell, ai as AppSidebarMenu, qn as AppSkeleton, Jn as AppSkeletonRows, oi as AppSlider, xe as AppSpinner, ci as AppSplash, li as AppStatusBadge, ui as AppStepper, fi as AppSwitch, pi as AppTableEmptyState, $n as AppTablePagination, gi as AppTabs, _i as AppTagInput, vi as AppTextarea, xi as AppTimePicker, bi as AppTimeline, zi as AppToast, Vi as AppToolbar, hi as AppTooltip, Hi as AppWizard, Ui as AppWorkspaceSwitcher, Un as MODAL_ICONS, Ji as dismissAll, Zi as errorToast, se as iconNames, le as registerIcons, Xi as toast, Qi as usePagination };
|