@webority/ui-react 0.8.9 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/{ActionIcon.d.ts → AppActionIcon.d.ts} +1 -1
- package/dist/types/components/AppBadge.d.ts +1 -1
- package/dist/types/components/AppCopyButton.d.ts +1 -1
- package/dist/types/components/AppPopover.d.ts +1 -1
- package/dist/types/components/{RequiredMark.d.ts → AppRequiredMark.d.ts} +1 -1
- package/dist/types/components/AppTooltip.d.ts +1 -1
- package/dist/types/components/warnUnknownProps.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/ui-react.js +306 -314
- package/package.json +3 -3
- package/dist/types/components/normalizeTone.d.ts +0 -1
package/dist/ui-react.js
CHANGED
|
@@ -250,47 +250,8 @@ function H({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
|
|
|
250
250
|
})) : null;
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
|
-
//#region src/components/renderIconProp.js
|
|
254
|
-
function U(e, { size: t = 16, className: n } = {}) {
|
|
255
|
-
return e == null || e === !1 ? null : typeof e == "string" ? r(H, {
|
|
256
|
-
name: e,
|
|
257
|
-
size: t,
|
|
258
|
-
className: n
|
|
259
|
-
}) : e;
|
|
260
|
-
}
|
|
261
|
-
//#endregion
|
|
262
|
-
//#region src/components/ActionIcon.jsx
|
|
263
|
-
function ae({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20, onClick: a, className: o = "", as: s, href: c, ...l }) {
|
|
264
|
-
N("ActionIcon", l);
|
|
265
|
-
let u = [
|
|
266
|
-
"u-action",
|
|
267
|
-
n ? "danger" : "",
|
|
268
|
-
o
|
|
269
|
-
].filter(Boolean).join(" "), d = s ?? (c ? "a" : "button"), f = d === "button";
|
|
270
|
-
return /* @__PURE__ */ p(d, {
|
|
271
|
-
type: f ? "button" : void 0,
|
|
272
|
-
href: f || r ? void 0 : c,
|
|
273
|
-
className: u,
|
|
274
|
-
"aria-label": t,
|
|
275
|
-
title: t,
|
|
276
|
-
disabled: f ? r : void 0,
|
|
277
|
-
"aria-disabled": !f && r ? "true" : void 0,
|
|
278
|
-
role: !f && r ? "link" : void 0,
|
|
279
|
-
tabIndex: !f && r ? -1 : void 0,
|
|
280
|
-
onClick: (e) => {
|
|
281
|
-
if (r) {
|
|
282
|
-
e.preventDefault(), e.stopPropagation();
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
a?.(e);
|
|
286
|
-
},
|
|
287
|
-
...l,
|
|
288
|
-
children: U(e, { size: i })
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
//#endregion
|
|
292
253
|
//#region src/components/AppAccordion.jsx
|
|
293
|
-
function
|
|
254
|
+
function ae({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i }) {
|
|
294
255
|
N("AppAccordion", i);
|
|
295
256
|
let a = s(), o = n || a, [c, l] = d(() => {
|
|
296
257
|
let n = e.map((e, t) => ({
|
|
@@ -341,6 +302,45 @@ function oe({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i })
|
|
|
341
302
|
});
|
|
342
303
|
}
|
|
343
304
|
//#endregion
|
|
305
|
+
//#region src/components/renderIconProp.js
|
|
306
|
+
function U(e, { size: t = 16, className: n } = {}) {
|
|
307
|
+
return e == null || e === !1 ? null : typeof e == "string" ? r(H, {
|
|
308
|
+
name: e,
|
|
309
|
+
size: t,
|
|
310
|
+
className: n
|
|
311
|
+
}) : e;
|
|
312
|
+
}
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/components/AppActionIcon.jsx
|
|
315
|
+
function oe({ icon: e, label: t, danger: n = !1, disabled: r = !1, size: i = 20, onClick: a, className: o = "", as: s, href: c, ...l }) {
|
|
316
|
+
N("AppActionIcon", l);
|
|
317
|
+
let u = [
|
|
318
|
+
"u-action",
|
|
319
|
+
n ? "danger" : "",
|
|
320
|
+
o
|
|
321
|
+
].filter(Boolean).join(" "), d = s ?? (c ? "a" : "button"), f = d === "button";
|
|
322
|
+
return /* @__PURE__ */ p(d, {
|
|
323
|
+
type: f ? "button" : void 0,
|
|
324
|
+
href: f || r ? void 0 : c,
|
|
325
|
+
className: u,
|
|
326
|
+
"aria-label": t,
|
|
327
|
+
title: t,
|
|
328
|
+
disabled: f ? r : void 0,
|
|
329
|
+
"aria-disabled": !f && r ? "true" : void 0,
|
|
330
|
+
role: !f && r ? "link" : void 0,
|
|
331
|
+
tabIndex: !f && r ? -1 : void 0,
|
|
332
|
+
onClick: (e) => {
|
|
333
|
+
if (r) {
|
|
334
|
+
e.preventDefault(), e.stopPropagation();
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
a?.(e);
|
|
338
|
+
},
|
|
339
|
+
...l,
|
|
340
|
+
children: U(e, { size: i })
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
//#endregion
|
|
344
344
|
//#region src/components/AppAlert.jsx
|
|
345
345
|
var se = {
|
|
346
346
|
info: "info",
|
|
@@ -4551,7 +4551,7 @@ function Ft({ label: e, children: t, placement: n = "auto", className: r = "", .
|
|
|
4551
4551
|
});
|
|
4552
4552
|
}
|
|
4553
4553
|
//#endregion
|
|
4554
|
-
//#region src/components/
|
|
4554
|
+
//#region src/components/AppRequiredMark.jsx
|
|
4555
4555
|
function Z() {
|
|
4556
4556
|
return /* @__PURE__ */ p("span", {
|
|
4557
4557
|
className: "required",
|
|
@@ -4859,20 +4859,12 @@ function $t({ children: e, size: t, spacing: n = "normal", overflow: r, classNam
|
|
|
4859
4859
|
});
|
|
4860
4860
|
}
|
|
4861
4861
|
//#endregion
|
|
4862
|
-
//#region src/components/normalizeTone.js
|
|
4863
|
-
var en = { warn: "warning" };
|
|
4864
|
-
function tn(e) {
|
|
4865
|
-
return e && (en[e] || e);
|
|
4866
|
-
}
|
|
4867
|
-
//#endregion
|
|
4868
4862
|
//#region src/components/AppBadge.jsx
|
|
4869
|
-
function
|
|
4870
|
-
N("AppBadge", i)
|
|
4871
|
-
let a = tn(t);
|
|
4872
|
-
return /* @__PURE__ */ p(g, {
|
|
4863
|
+
function en({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
4864
|
+
return N("AppBadge", i), /* @__PURE__ */ p(g, {
|
|
4873
4865
|
bg: !1,
|
|
4874
4866
|
className: [
|
|
4875
|
-
|
|
4867
|
+
t && t !== "neutral" ? `badge-${t}` : "",
|
|
4876
4868
|
n ? "badge-dot" : "",
|
|
4877
4869
|
r
|
|
4878
4870
|
].filter(Boolean).join(" ") || void 0,
|
|
@@ -4882,22 +4874,22 @@ function nn({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
|
4882
4874
|
}
|
|
4883
4875
|
//#endregion
|
|
4884
4876
|
//#region src/components/AppBanner.jsx
|
|
4885
|
-
var
|
|
4877
|
+
var tn = [
|
|
4886
4878
|
"info",
|
|
4887
4879
|
"success",
|
|
4888
4880
|
"warning",
|
|
4889
4881
|
"danger",
|
|
4890
4882
|
"neutral"
|
|
4891
4883
|
];
|
|
4892
|
-
function
|
|
4884
|
+
function nn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDismiss: i, className: a = "", ...o }) {
|
|
4893
4885
|
N("AppBanner", o);
|
|
4894
4886
|
let [s, c] = d(!0);
|
|
4895
4887
|
if (!s) return null;
|
|
4896
|
-
let l = tn
|
|
4888
|
+
let l = tn.includes(e) ? e : "info", u = () => {
|
|
4897
4889
|
c(!1), i?.();
|
|
4898
4890
|
};
|
|
4899
4891
|
return /* @__PURE__ */ m("div", {
|
|
4900
|
-
className: `wui-banner wui-banner-${
|
|
4892
|
+
className: `wui-banner wui-banner-${l}${a ? ` ${a}` : ""}`,
|
|
4901
4893
|
role: "status",
|
|
4902
4894
|
...o,
|
|
4903
4895
|
children: [
|
|
@@ -4913,7 +4905,7 @@ function an({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4913
4905
|
type: "button",
|
|
4914
4906
|
className: "wui-banner-dismiss",
|
|
4915
4907
|
"aria-label": "Dismiss",
|
|
4916
|
-
onClick:
|
|
4908
|
+
onClick: u,
|
|
4917
4909
|
children: /* @__PURE__ */ p(H, {
|
|
4918
4910
|
name: "x",
|
|
4919
4911
|
size: 18
|
|
@@ -4924,7 +4916,7 @@ function an({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4924
4916
|
}
|
|
4925
4917
|
//#endregion
|
|
4926
4918
|
//#region src/components/AppBreadcrumbs.jsx
|
|
4927
|
-
function
|
|
4919
|
+
function rn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
4928
4920
|
return N("AppBreadcrumbs", r), /* @__PURE__ */ p(_, {
|
|
4929
4921
|
className: n || void 0,
|
|
4930
4922
|
...r,
|
|
@@ -4943,17 +4935,17 @@ function on({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
4943
4935
|
}
|
|
4944
4936
|
//#endregion
|
|
4945
4937
|
//#region src/components/AppCallout.jsx
|
|
4946
|
-
var
|
|
4938
|
+
var an = {
|
|
4947
4939
|
info: "info",
|
|
4948
4940
|
success: "check",
|
|
4949
4941
|
warning: "alert-triangle",
|
|
4950
4942
|
danger: "x"
|
|
4951
4943
|
};
|
|
4952
|
-
function
|
|
4944
|
+
function on({ 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 }) {
|
|
4953
4945
|
N("AppCallout", h);
|
|
4954
4946
|
let [g, _] = d(!0);
|
|
4955
4947
|
if (!g) return null;
|
|
4956
|
-
let v = r === void 0 ?
|
|
4948
|
+
let v = r === void 0 ? an[t] : r === "none" ? null : r, y = !!i, b = y || !!v, x = b && !!n && e != null && e !== !1 && e !== "", S = x ? 13 : 11;
|
|
4957
4949
|
return /* @__PURE__ */ m("div", {
|
|
4958
4950
|
className: [
|
|
4959
4951
|
"info-callout",
|
|
@@ -5003,13 +4995,13 @@ function cn({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
5003
4995
|
}
|
|
5004
4996
|
//#endregion
|
|
5005
4997
|
//#region src/components/AppCard.jsx
|
|
5006
|
-
var
|
|
4998
|
+
var sn = {
|
|
5007
4999
|
xs: 320,
|
|
5008
5000
|
sm: 420,
|
|
5009
5001
|
md: 560,
|
|
5010
5002
|
lg: 720
|
|
5011
5003
|
};
|
|
5012
|
-
function
|
|
5004
|
+
function cn({ 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 }) {
|
|
5013
5005
|
N("AppCard", E);
|
|
5014
5006
|
let { style: D, ...O } = E, k = C != null || w != null, A = [
|
|
5015
5007
|
u && u !== "default" ? `card-${u}` : "",
|
|
@@ -5019,7 +5011,7 @@ function un({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5019
5011
|
g == null ? "" : "card-constrained",
|
|
5020
5012
|
k ? "card-clickable" : "",
|
|
5021
5013
|
_
|
|
5022
|
-
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 :
|
|
5014
|
+
].filter(Boolean).join(" ") || void 0, j = g == null ? void 0 : sn[g] == null ? typeof g == "number" ? `${g}px` : g : `${sn[g]}px`, M = j ? {
|
|
5023
5015
|
"--card-max-width": j,
|
|
5024
5016
|
...D
|
|
5025
5017
|
} : D, P = {};
|
|
@@ -5090,7 +5082,7 @@ function un({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5090
5082
|
}
|
|
5091
5083
|
//#endregion
|
|
5092
5084
|
//#region src/lib/CheckField.jsx
|
|
5093
|
-
var
|
|
5085
|
+
var ln = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", rest: o = {}, inputType: c, wrapperClass: l }, u) {
|
|
5094
5086
|
let d = s(), f = t || d;
|
|
5095
5087
|
return /* @__PURE__ */ m("div", {
|
|
5096
5088
|
className: `${l}${a ? ` ${a}` : ""}`,
|
|
@@ -5118,8 +5110,8 @@ var dn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5118
5110
|
}) : null
|
|
5119
5111
|
]
|
|
5120
5112
|
});
|
|
5121
|
-
}),
|
|
5122
|
-
return N("AppCheckbox", o), /* @__PURE__ */ p(
|
|
5113
|
+
}), un = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
5114
|
+
return N("AppCheckbox", o), /* @__PURE__ */ p(ln, {
|
|
5123
5115
|
ref: s,
|
|
5124
5116
|
label: e,
|
|
5125
5117
|
id: t,
|
|
@@ -5134,18 +5126,18 @@ var dn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5134
5126
|
});
|
|
5135
5127
|
//#endregion
|
|
5136
5128
|
//#region src/components/AppChip.jsx
|
|
5137
|
-
function
|
|
5129
|
+
function dn({ 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 }) {
|
|
5138
5130
|
N("AppChip", h);
|
|
5139
|
-
let g = e ?? t, _ =
|
|
5131
|
+
let g = e ?? t, _ = [
|
|
5140
5132
|
"chip",
|
|
5141
|
-
|
|
5133
|
+
n && n !== "neutral" ? n : "",
|
|
5142
5134
|
r === "outline" ? "chip-outline" : r === "solid" ? "chip-solid" : "",
|
|
5143
5135
|
i === "sm" ? "chip-sm" : "",
|
|
5144
5136
|
c ? "chip-clickable" : "",
|
|
5145
5137
|
s ? "chip-removable" : "",
|
|
5146
5138
|
l ? "is-disabled" : "",
|
|
5147
5139
|
d
|
|
5148
|
-
].filter(Boolean).join(" "),
|
|
5140
|
+
].filter(Boolean).join(" "), v = o ? /* @__PURE__ */ p("span", {
|
|
5149
5141
|
className: "chip-avatar",
|
|
5150
5142
|
children: typeof o == "string" ? /* @__PURE__ */ p("img", {
|
|
5151
5143
|
src: o,
|
|
@@ -5157,23 +5149,23 @@ function pn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5157
5149
|
name: a,
|
|
5158
5150
|
size: i === "sm" ? 12 : 14
|
|
5159
5151
|
})
|
|
5160
|
-
}) : null,
|
|
5152
|
+
}) : null, y = c ? /* @__PURE__ */ m("button", {
|
|
5161
5153
|
type: "button",
|
|
5162
5154
|
className: "chip-body",
|
|
5163
5155
|
onClick: c,
|
|
5164
5156
|
disabled: l,
|
|
5165
|
-
children: [
|
|
5157
|
+
children: [v, /* @__PURE__ */ p("span", {
|
|
5166
5158
|
className: "chip-label",
|
|
5167
5159
|
children: g
|
|
5168
5160
|
})]
|
|
5169
|
-
}) : /* @__PURE__ */ m(f, { children: [
|
|
5161
|
+
}) : /* @__PURE__ */ m(f, { children: [v, /* @__PURE__ */ p("span", {
|
|
5170
5162
|
className: "chip-label",
|
|
5171
5163
|
children: g
|
|
5172
5164
|
})] });
|
|
5173
5165
|
return /* @__PURE__ */ m("span", {
|
|
5174
|
-
className:
|
|
5166
|
+
className: _,
|
|
5175
5167
|
...h,
|
|
5176
|
-
children: [
|
|
5168
|
+
children: [y, s && /* @__PURE__ */ p("button", {
|
|
5177
5169
|
type: "button",
|
|
5178
5170
|
className: "chip-remove",
|
|
5179
5171
|
onClick: s,
|
|
@@ -5188,7 +5180,7 @@ function pn({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
5188
5180
|
}
|
|
5189
5181
|
//#endregion
|
|
5190
5182
|
//#region src/components/AppChoiceCard.jsx
|
|
5191
|
-
function
|
|
5183
|
+
function fn({ 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: _ = 12, className: v = "", ...y }) {
|
|
5192
5184
|
return N("AppChoiceCard", y), /* @__PURE__ */ m("label", {
|
|
5193
5185
|
className: `struct-card${c ? " struct-card-img-card" : ""}${r ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
5194
5186
|
...y,
|
|
@@ -5237,7 +5229,7 @@ function mn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5237
5229
|
}
|
|
5238
5230
|
//#endregion
|
|
5239
5231
|
//#region src/components/AppChoiceChip.jsx
|
|
5240
|
-
function
|
|
5232
|
+
function pn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChange: a, children: o, count: s, size: c = "md", className: l = "", ...u }) {
|
|
5241
5233
|
return N("AppChoiceChip", u), /* @__PURE__ */ m("label", {
|
|
5242
5234
|
className: `choice-chip${i ? " checked" : ""}${c === "sm" ? " choice-chip-sm" : c === "lg" ? " choice-chip-lg" : ""}${l ? ` ${l}` : ""}`,
|
|
5243
5235
|
...u,
|
|
@@ -5259,7 +5251,7 @@ function hn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChang
|
|
|
5259
5251
|
}
|
|
5260
5252
|
//#endregion
|
|
5261
5253
|
//#region src/components/AppColorField.jsx
|
|
5262
|
-
function
|
|
5254
|
+
function mn({ 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 = "", ...f }) {
|
|
5263
5255
|
N("AppColorField", f);
|
|
5264
5256
|
let h = s(), g = c || h, _ = (e) => /^#[0-9a-f]{6}$/i.test(e), v = u === "sm" ? " color-field-sm" : u === "lg" ? " color-field-lg" : "", y = u === "sm" ? " input-sm" : u === "lg" ? " input-lg" : "";
|
|
5265
5257
|
return /* @__PURE__ */ m("div", {
|
|
@@ -5308,7 +5300,7 @@ function gn({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
5308
5300
|
}
|
|
5309
5301
|
//#endregion
|
|
5310
5302
|
//#region src/components/AppCompareTable.jsx
|
|
5311
|
-
function
|
|
5303
|
+
function hn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i }) {
|
|
5312
5304
|
N("AppCompareTable", i);
|
|
5313
5305
|
let a = (e) => e === !0 ? /* @__PURE__ */ p("span", {
|
|
5314
5306
|
className: "compare-yes",
|
|
@@ -5345,19 +5337,19 @@ function _n({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5345
5337
|
}
|
|
5346
5338
|
//#endregion
|
|
5347
5339
|
//#region src/components/AppInput.jsx
|
|
5348
|
-
var
|
|
5340
|
+
var gn = 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, floatingLabel: A = !1, variant: j, ...M }, P) {
|
|
5349
5341
|
N("AppInput", M);
|
|
5350
5342
|
let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c, B = u(null), V = (e) => {
|
|
5351
5343
|
B.current = e, typeof P == "function" ? P(e) : P && (P.current = e);
|
|
5352
|
-
}, te = String(M.value ?? M.defaultValue ?? ""), [ne, re] = d(() => !!te), [ie,
|
|
5344
|
+
}, te = String(M.value ?? M.defaultValue ?? ""), [ne, re] = d(() => !!te), [ie, ae] = d(() => te.length), U = T && !w, oe = T || E;
|
|
5353
5345
|
o(() => {
|
|
5354
5346
|
if (!oe || M.value === void 0) return;
|
|
5355
5347
|
let e = String(M.value ?? "");
|
|
5356
|
-
re(!!e),
|
|
5348
|
+
re(!!e), ae(e.length);
|
|
5357
5349
|
}, [M.value, oe]);
|
|
5358
5350
|
let se = (e) => {
|
|
5359
|
-
re(!!e.target.value),
|
|
5360
|
-
}, ce =
|
|
5351
|
+
re(!!e.target.value), ae(e.target.value.length), M.onInput?.(e);
|
|
5352
|
+
}, ce = U ? /* @__PURE__ */ p("button", {
|
|
5361
5353
|
type: "button",
|
|
5362
5354
|
className: "input-clear",
|
|
5363
5355
|
onClick: () => {
|
|
@@ -5380,7 +5372,7 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5380
5372
|
n ? "error" : "",
|
|
5381
5373
|
z ? "pw" : "",
|
|
5382
5374
|
v ? "num-input" : "",
|
|
5383
|
-
!(A && e || O || k || v || z || h) && T &&
|
|
5375
|
+
!(A && e || O || k || v || z || h) && T && U ? "has-clear" : "",
|
|
5384
5376
|
j === "bare" ? "input-bare" : "",
|
|
5385
5377
|
S
|
|
5386
5378
|
].filter(Boolean).join(" "), W = /* @__PURE__ */ p(x.Control, {
|
|
@@ -5514,34 +5506,34 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5514
5506
|
})
|
|
5515
5507
|
]
|
|
5516
5508
|
});
|
|
5517
|
-
}),
|
|
5509
|
+
}), _n = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", vn = {
|
|
5518
5510
|
sm: 380,
|
|
5519
5511
|
md: 440,
|
|
5520
5512
|
lg: 640,
|
|
5521
5513
|
xl: 880
|
|
5522
|
-
},
|
|
5523
|
-
function
|
|
5514
|
+
}, yn = !1;
|
|
5515
|
+
function bn() {
|
|
5524
5516
|
let e = !0;
|
|
5525
5517
|
try {
|
|
5526
5518
|
e = process.env.NODE_ENV !== "production";
|
|
5527
5519
|
} catch {
|
|
5528
5520
|
e = !0;
|
|
5529
5521
|
}
|
|
5530
|
-
!e ||
|
|
5522
|
+
!e || yn || (yn = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
5531
5523
|
}
|
|
5532
|
-
function
|
|
5524
|
+
function xn({ 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 }) {
|
|
5533
5525
|
N("AppModal", b);
|
|
5534
5526
|
let { style: x, ...C } = b;
|
|
5535
|
-
h && !_ && typeof n != "string" &&
|
|
5527
|
+
h && !_ && typeof n != "string" && bn();
|
|
5536
5528
|
let w = u(null);
|
|
5537
5529
|
o(() => {
|
|
5538
5530
|
if (!e) return;
|
|
5539
5531
|
let t = w.current?.closest(".modal-content");
|
|
5540
5532
|
if (!t) return;
|
|
5541
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
5533
|
+
let n = () => Array.from(t.querySelectorAll(_n));
|
|
5542
5534
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
5543
5535
|
}, [e]);
|
|
5544
|
-
let T = typeof d == "number" ? d :
|
|
5536
|
+
let T = typeof d == "number" ? d : vn[d] ?? vn.md, E = [
|
|
5545
5537
|
"wui-modal",
|
|
5546
5538
|
a === "default" ? "" : `tone-${a}`,
|
|
5547
5539
|
v
|
|
@@ -5626,30 +5618,30 @@ function Cn({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
5626
5618
|
}
|
|
5627
5619
|
//#endregion
|
|
5628
5620
|
//#region src/components/ModalIcons.jsx
|
|
5629
|
-
var
|
|
5621
|
+
var Sn = (e) => function({ size: t = 72 }) {
|
|
5630
5622
|
return /* @__PURE__ */ p("wui-status-icon", {
|
|
5631
5623
|
tone: e,
|
|
5632
5624
|
size: t
|
|
5633
5625
|
});
|
|
5634
|
-
},
|
|
5635
|
-
success:
|
|
5636
|
-
error:
|
|
5637
|
-
warning:
|
|
5638
|
-
info:
|
|
5639
|
-
delete:
|
|
5626
|
+
}, Cn = {
|
|
5627
|
+
success: Sn("success"),
|
|
5628
|
+
error: Sn("error"),
|
|
5629
|
+
warning: Sn("warning"),
|
|
5630
|
+
info: Sn("info"),
|
|
5631
|
+
delete: Sn("delete")
|
|
5640
5632
|
};
|
|
5641
5633
|
//#endregion
|
|
5642
5634
|
//#region src/components/AppConfirmDialog.jsx
|
|
5643
|
-
function
|
|
5635
|
+
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 }) {
|
|
5644
5636
|
N("AppConfirmDialog", y);
|
|
5645
5637
|
let [b, x] = d("");
|
|
5646
5638
|
if (o(() => {
|
|
5647
5639
|
e || x("");
|
|
5648
5640
|
}, [e]), !e) return null;
|
|
5649
|
-
let S = !!c && b.trim() !== c, C =
|
|
5641
|
+
let S = !!c && b.trim() !== c, C = Cn[s || (a ? "delete" : "info")], w = () => {
|
|
5650
5642
|
h || u?.();
|
|
5651
5643
|
};
|
|
5652
|
-
return /* @__PURE__ */ p(
|
|
5644
|
+
return /* @__PURE__ */ p(xn, {
|
|
5653
5645
|
...y,
|
|
5654
5646
|
open: e,
|
|
5655
5647
|
hideHeader: !0,
|
|
@@ -5690,7 +5682,7 @@ function En({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5690
5682
|
className: "wui-confirm-msg",
|
|
5691
5683
|
children: n
|
|
5692
5684
|
}),
|
|
5693
|
-
c && /* @__PURE__ */ p(
|
|
5685
|
+
c && /* @__PURE__ */ p(gn, {
|
|
5694
5686
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
5695
5687
|
label: /* @__PURE__ */ m(f, { children: [
|
|
5696
5688
|
"Type ",
|
|
@@ -5708,12 +5700,12 @@ function En({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5708
5700
|
}
|
|
5709
5701
|
//#endregion
|
|
5710
5702
|
//#region src/components/AppCopyButton.jsx
|
|
5711
|
-
var
|
|
5703
|
+
var Tn = {
|
|
5712
5704
|
sm: 14,
|
|
5713
5705
|
md: 16,
|
|
5714
5706
|
lg: 20
|
|
5715
5707
|
};
|
|
5716
|
-
function
|
|
5708
|
+
function En({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r = !1, size: i = "md", variant: o = "ghost", onCopied: s, className: c = "", ...l }) {
|
|
5717
5709
|
N("AppCopyButton", l);
|
|
5718
5710
|
let [u, f] = d(!1), m = a(async () => {
|
|
5719
5711
|
try {
|
|
@@ -5729,10 +5721,10 @@ function On({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5729
5721
|
document.body.removeChild(t), n && (f(!0), s?.(), setTimeout(() => f(!1), 2e3));
|
|
5730
5722
|
} catch {}
|
|
5731
5723
|
}, [e, s]), h = u ? n : t, g = u ? "check" : "files";
|
|
5732
|
-
return r ? /* @__PURE__ */ p(
|
|
5724
|
+
return r ? /* @__PURE__ */ p(oe, {
|
|
5733
5725
|
icon: g,
|
|
5734
5726
|
label: h,
|
|
5735
|
-
size:
|
|
5727
|
+
size: Tn[i] ?? Tn.md,
|
|
5736
5728
|
onClick: m,
|
|
5737
5729
|
className: c,
|
|
5738
5730
|
...l
|
|
@@ -5749,7 +5741,7 @@ function On({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5749
5741
|
}
|
|
5750
5742
|
//#endregion
|
|
5751
5743
|
//#region src/components/AppSkeleton.jsx
|
|
5752
|
-
function
|
|
5744
|
+
function Dn({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "", style: i, ...a }) {
|
|
5753
5745
|
return N("AppSkeleton", a), /* @__PURE__ */ p("span", {
|
|
5754
5746
|
className: `skeleton${r ? ` ${r}` : ""}`,
|
|
5755
5747
|
"aria-hidden": "true",
|
|
@@ -5762,28 +5754,28 @@ function kn({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "
|
|
|
5762
5754
|
...a
|
|
5763
5755
|
});
|
|
5764
5756
|
}
|
|
5765
|
-
function
|
|
5766
|
-
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(
|
|
5757
|
+
function On({ rows: e = 4, cols: t = 5 }) {
|
|
5758
|
+
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(Dn, {
|
|
5767
5759
|
width: t === 0 ? "70%" : "50%",
|
|
5768
5760
|
height: 12
|
|
5769
5761
|
}) }, `col-${t}`)) }, `row-${n}`));
|
|
5770
5762
|
}
|
|
5771
5763
|
//#endregion
|
|
5772
5764
|
//#region src/lib/pageWindow.js
|
|
5773
|
-
var
|
|
5765
|
+
var kn = (e, t) => {
|
|
5774
5766
|
let n = [];
|
|
5775
5767
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
5776
5768
|
return n;
|
|
5777
5769
|
};
|
|
5778
|
-
function
|
|
5770
|
+
function An(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
5779
5771
|
let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
|
|
5780
|
-
if (i <= n * 2 + 3 + r * 2) return
|
|
5781
|
-
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 =
|
|
5782
|
-
return u.push(...c ? ["ellipsis-left"] :
|
|
5772
|
+
if (i <= n * 2 + 3 + r * 2) return kn(1, i);
|
|
5773
|
+
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 = kn(1, r);
|
|
5774
|
+
return u.push(...c ? ["ellipsis-left"] : kn(r + 1, o - 1)), u.push(...kn(o, s)), u.push(...l ? ["ellipsis-right"] : kn(s + 1, i - r)), u.push(...kn(i - r + 1, i)), u;
|
|
5783
5775
|
}
|
|
5784
5776
|
//#endregion
|
|
5785
5777
|
//#region src/components/AppSelectMini.jsx
|
|
5786
|
-
function
|
|
5778
|
+
function jn({ 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 }) {
|
|
5787
5779
|
N("AppSelectMini", m);
|
|
5788
5780
|
let { setRef: h, innerRef: g } = Q({
|
|
5789
5781
|
value: e ?? "",
|
|
@@ -5820,22 +5812,22 @@ function Nn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5820
5812
|
}
|
|
5821
5813
|
//#endregion
|
|
5822
5814
|
//#region src/components/AppTablePagination.jsx
|
|
5823
|
-
var
|
|
5815
|
+
var Mn = [
|
|
5824
5816
|
5,
|
|
5825
5817
|
10,
|
|
5826
5818
|
25,
|
|
5827
5819
|
50
|
|
5828
5820
|
];
|
|
5829
|
-
function
|
|
5821
|
+
function Nn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRow: a, onPageChange: o, onPageSizeChange: s, pageSizes: c = Mn, mode: l = "prev-next", showPageSize: u = !0, className: d = "", ...f }) {
|
|
5830
5822
|
N("AppTablePagination", f);
|
|
5831
|
-
let h = l === "numbered", g = h ?
|
|
5823
|
+
let h = l === "numbered", g = h ? An(e, t) : null;
|
|
5832
5824
|
return /* @__PURE__ */ m("div", {
|
|
5833
5825
|
className: `table-pagination${d ? ` ${d}` : ""}`,
|
|
5834
5826
|
...f,
|
|
5835
5827
|
children: [
|
|
5836
5828
|
u && /* @__PURE__ */ m("span", {
|
|
5837
5829
|
className: "tpg-rows",
|
|
5838
|
-
children: ["Rows per page:", /* @__PURE__ */ p(
|
|
5830
|
+
children: ["Rows per page:", /* @__PURE__ */ p(jn, {
|
|
5839
5831
|
value: n,
|
|
5840
5832
|
onChange: (e) => s(Number(e)),
|
|
5841
5833
|
ariaLabel: "Rows per page",
|
|
@@ -5899,13 +5891,13 @@ function Fn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
5899
5891
|
}
|
|
5900
5892
|
//#endregion
|
|
5901
5893
|
//#region src/components/AppDataTable.jsx
|
|
5902
|
-
function
|
|
5894
|
+
function Pn(e) {
|
|
5903
5895
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
5904
5896
|
}
|
|
5905
|
-
function
|
|
5897
|
+
function Fn(e) {
|
|
5906
5898
|
return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
|
|
5907
5899
|
}
|
|
5908
|
-
function
|
|
5900
|
+
function In({ 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 }) {
|
|
5909
5901
|
N("AppDataTable", E);
|
|
5910
5902
|
let D = typeof T == "function", [O, k] = d(() => /* @__PURE__ */ new Set()), A = (e) => k((t) => {
|
|
5911
5903
|
let n = new Set(t);
|
|
@@ -5941,7 +5933,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5941
5933
|
e.map((e, t) => {
|
|
5942
5934
|
let n = !!(e.sortable && a), r = i && i.key === e.key;
|
|
5943
5935
|
return /* @__PURE__ */ m("th", {
|
|
5944
|
-
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") +
|
|
5936
|
+
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") + Pn(e.align),
|
|
5945
5937
|
style: e.width ? { width: e.width } : void 0,
|
|
5946
5938
|
tabIndex: n ? 0 : void 0,
|
|
5947
5939
|
"aria-sort": r ? i.dir === "asc" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
@@ -5968,7 +5960,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5968
5960
|
children: "Actions"
|
|
5969
5961
|
})
|
|
5970
5962
|
}))
|
|
5971
|
-
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(
|
|
5963
|
+
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(On, {
|
|
5972
5964
|
rows: s,
|
|
5973
5965
|
cols: j
|
|
5974
5966
|
}) : n?.length ? n.map((n, i) => {
|
|
@@ -6002,9 +5994,9 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6002
5994
|
})
|
|
6003
5995
|
}),
|
|
6004
5996
|
e.map((e, t) => /* @__PURE__ */ p("td", {
|
|
6005
|
-
className: (t === 0 ? "wui-name-cell " : "") +
|
|
5997
|
+
className: (t === 0 ? "wui-name-cell " : "") + Pn(e.align) + (e.cellClassName ? ` ${e.cellClassName}` : ""),
|
|
6006
5998
|
style: e.cellStyle,
|
|
6007
|
-
children: e.render ? e.render(n) :
|
|
5999
|
+
children: e.render ? e.render(n) : Fn(n[e.key])
|
|
6008
6000
|
}, e.key)),
|
|
6009
6001
|
h && /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p("div", {
|
|
6010
6002
|
className: "u-row-actions",
|
|
@@ -6025,7 +6017,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6025
6017
|
children: L
|
|
6026
6018
|
}) }) })]
|
|
6027
6019
|
})
|
|
6028
|
-
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(
|
|
6020
|
+
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(Nn, {
|
|
6029
6021
|
page: _.page,
|
|
6030
6022
|
totalPages: _.totalPages,
|
|
6031
6023
|
pageSize: _.pageSize,
|
|
@@ -6038,7 +6030,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6038
6030
|
}
|
|
6039
6031
|
//#endregion
|
|
6040
6032
|
//#region src/components/AppDatePicker.jsx
|
|
6041
|
-
var
|
|
6033
|
+
var Ln = 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 = "", ...y }, b) {
|
|
6042
6034
|
N("AppDatePicker", y);
|
|
6043
6035
|
let x = s(), S = g || o || x, { setRef: C } = Q({
|
|
6044
6036
|
ref: b,
|
|
@@ -6082,7 +6074,7 @@ var zn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6082
6074
|
})
|
|
6083
6075
|
]
|
|
6084
6076
|
});
|
|
6085
|
-
}),
|
|
6077
|
+
}), Rn = 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 = "", ...S }, C) {
|
|
6086
6078
|
N("AppDateRangePicker", S);
|
|
6087
6079
|
let w = s(), T = y || l || w, { setRef: E, innerRef: D } = Q({
|
|
6088
6080
|
ref: C,
|
|
@@ -6143,12 +6135,12 @@ var zn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6143
6135
|
});
|
|
6144
6136
|
//#endregion
|
|
6145
6137
|
//#region src/lib/emptyValue.js
|
|
6146
|
-
function
|
|
6138
|
+
function zn(e) {
|
|
6147
6139
|
return e == null || e === "";
|
|
6148
6140
|
}
|
|
6149
6141
|
//#endregion
|
|
6150
6142
|
//#region src/components/AppDescriptions.jsx
|
|
6151
|
-
function
|
|
6143
|
+
function Bn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
6152
6144
|
return N("AppDescriptions", o), /* @__PURE__ */ m("div", {
|
|
6153
6145
|
className: [
|
|
6154
6146
|
"descs",
|
|
@@ -6164,7 +6156,7 @@ function Hn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6164
6156
|
}), /* @__PURE__ */ p("dl", {
|
|
6165
6157
|
className: "descs-list",
|
|
6166
6158
|
children: e.map((e, t) => {
|
|
6167
|
-
let n =
|
|
6159
|
+
let n = zn(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
6168
6160
|
return /* @__PURE__ */ m("div", {
|
|
6169
6161
|
className: "descs-item",
|
|
6170
6162
|
style: { "--descs-span": r },
|
|
@@ -6182,24 +6174,24 @@ function Hn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6182
6174
|
}
|
|
6183
6175
|
//#endregion
|
|
6184
6176
|
//#region src/components/AppDropdown.jsx
|
|
6185
|
-
var
|
|
6186
|
-
function
|
|
6177
|
+
var Vn = !1;
|
|
6178
|
+
function Hn() {
|
|
6187
6179
|
let e = !0;
|
|
6188
6180
|
try {
|
|
6189
6181
|
e = process.env.NODE_ENV !== "production";
|
|
6190
6182
|
} catch {
|
|
6191
6183
|
e = !0;
|
|
6192
6184
|
}
|
|
6193
|
-
!e ||
|
|
6185
|
+
!e || Vn || (Vn = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
6194
6186
|
}
|
|
6195
|
-
function
|
|
6196
|
-
N("AppDropdown", d), !u && !i && !r &&
|
|
6187
|
+
function Un({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i, align: a = "end", items: o = [], menuClassName: s = "", linkComponent: c, children: l, trigger: u, ...d }) {
|
|
6188
|
+
N("AppDropdown", d), !u && !i && !r && Hn();
|
|
6197
6189
|
let f = n ?? (u ? "wui-dropdown-trigger" : "topbar-icon-btn");
|
|
6198
6190
|
return /* @__PURE__ */ m(b, {
|
|
6199
6191
|
align: a,
|
|
6200
6192
|
...d,
|
|
6201
6193
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
6202
|
-
as:
|
|
6194
|
+
as: Wn,
|
|
6203
6195
|
icon: e,
|
|
6204
6196
|
iconSize: t,
|
|
6205
6197
|
btnClassName: f,
|
|
@@ -6234,7 +6226,7 @@ function Gn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6234
6226
|
})]
|
|
6235
6227
|
});
|
|
6236
6228
|
}
|
|
6237
|
-
var
|
|
6229
|
+
var Wn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-btn", trigger: r, "aria-label": i, className: a, ...o }, s) {
|
|
6238
6230
|
return /* @__PURE__ */ p("button", {
|
|
6239
6231
|
ref: s,
|
|
6240
6232
|
type: "button",
|
|
@@ -6249,16 +6241,16 @@ var Kn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
6249
6241
|
});
|
|
6250
6242
|
//#endregion
|
|
6251
6243
|
//#region src/lib/fileItem.js
|
|
6252
|
-
function
|
|
6244
|
+
function Gn(e) {
|
|
6253
6245
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
6254
6246
|
}
|
|
6255
|
-
function
|
|
6247
|
+
function Kn(e) {
|
|
6256
6248
|
return e instanceof File ? e.name : e?.name;
|
|
6257
6249
|
}
|
|
6258
|
-
function
|
|
6250
|
+
function qn(e) {
|
|
6259
6251
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
6260
6252
|
}
|
|
6261
|
-
function
|
|
6253
|
+
function Jn(e, t) {
|
|
6262
6254
|
let [n, r] = d(null);
|
|
6263
6255
|
return o(() => {
|
|
6264
6256
|
if (!t) {
|
|
@@ -6274,8 +6266,8 @@ function Xn(e, t) {
|
|
|
6274
6266
|
}
|
|
6275
6267
|
//#endregion
|
|
6276
6268
|
//#region src/lib/FileItemRow.jsx
|
|
6277
|
-
function
|
|
6278
|
-
let i =
|
|
6269
|
+
function Yn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
6270
|
+
let i = Jn(e, t), a = Kn(e), o = qn(e);
|
|
6279
6271
|
return /* @__PURE__ */ m("div", {
|
|
6280
6272
|
className: "attach-item",
|
|
6281
6273
|
children: [
|
|
@@ -6314,7 +6306,7 @@ function Zn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6314
6306
|
}
|
|
6315
6307
|
//#endregion
|
|
6316
6308
|
//#region src/components/AppFileAttachment.jsx
|
|
6317
|
-
function
|
|
6309
|
+
function Xn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = Ct, maxSizeMb: o = 5, optional: c = !1, error: l, id: u, ...h }) {
|
|
6318
6310
|
N("AppFileAttachment", h);
|
|
6319
6311
|
let g = s(), _ = u || n || g, [v, y] = d(""), b = i && Array.isArray(t) ? t : t ? [t] : [], x = kt(a), S = (e) => e instanceof File ? Ot(e) : x || Ot(e), C = !i && b.length === 1 && S(b[0]);
|
|
6320
6312
|
function w(e) {
|
|
@@ -6333,8 +6325,8 @@ function Qn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6333
6325
|
s.push(e);
|
|
6334
6326
|
}
|
|
6335
6327
|
if (y(c), s.length) if (i) {
|
|
6336
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
6337
|
-
r(e.concat(s.filter((e) => !n.has(
|
|
6328
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(Gn));
|
|
6329
|
+
r(e.concat(s.filter((e) => !n.has(Gn(e)))));
|
|
6338
6330
|
} else r(s[0]);
|
|
6339
6331
|
}
|
|
6340
6332
|
function T(e) {
|
|
@@ -6393,17 +6385,17 @@ function Qn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6393
6385
|
onChange: w,
|
|
6394
6386
|
...h
|
|
6395
6387
|
})] }),
|
|
6396
|
-
C ? /* @__PURE__ */ p(
|
|
6388
|
+
C ? /* @__PURE__ */ p(Zn, {
|
|
6397
6389
|
item: b[0],
|
|
6398
6390
|
isImage: !0,
|
|
6399
6391
|
onRemove: () => T(0)
|
|
6400
6392
|
}) : b.length > 0 && /* @__PURE__ */ p("div", {
|
|
6401
6393
|
className: "attach-list",
|
|
6402
|
-
children: b.map((e, t) => /* @__PURE__ */ p(
|
|
6394
|
+
children: b.map((e, t) => /* @__PURE__ */ p(Yn, {
|
|
6403
6395
|
item: e,
|
|
6404
6396
|
isImage: S(e),
|
|
6405
6397
|
onRemove: () => T(t)
|
|
6406
|
-
},
|
|
6398
|
+
}, Gn(e)))
|
|
6407
6399
|
}),
|
|
6408
6400
|
E && /* @__PURE__ */ p("div", {
|
|
6409
6401
|
className: "field-error",
|
|
@@ -6412,8 +6404,8 @@ function Qn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6412
6404
|
]
|
|
6413
6405
|
});
|
|
6414
6406
|
}
|
|
6415
|
-
function
|
|
6416
|
-
let r =
|
|
6407
|
+
function Zn({ item: e, isImage: t, onRemove: n }) {
|
|
6408
|
+
let r = Jn(e, t), i = Kn(e), a = qn(e);
|
|
6417
6409
|
return /* @__PURE__ */ m("div", {
|
|
6418
6410
|
className: "attach-preview",
|
|
6419
6411
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -6445,7 +6437,7 @@ function $n({ item: e, isImage: t, onRemove: n }) {
|
|
|
6445
6437
|
}
|
|
6446
6438
|
//#endregion
|
|
6447
6439
|
//#region src/components/AppFilePicker.jsx
|
|
6448
|
-
function
|
|
6440
|
+
function Qn({ 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 = "", ..._ }) {
|
|
6449
6441
|
N("AppFilePicker", _);
|
|
6450
6442
|
let [v, y] = d(null), [b, x] = d(!1), [S, C] = d(""), w = u(null), T = s(), E = n || T;
|
|
6451
6443
|
o(() => {
|
|
@@ -6464,7 +6456,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6464
6456
|
}, I = (e) => {
|
|
6465
6457
|
let n = Array.from(e || []);
|
|
6466
6458
|
if (!n.length) return;
|
|
6467
|
-
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(
|
|
6459
|
+
let i = Array.isArray(t) ? t : t ? [t] : [], o = new Set(i.map(Gn)), s = "", u = [];
|
|
6468
6460
|
for (let e of n) {
|
|
6469
6461
|
let t = Mt(e, {
|
|
6470
6462
|
accept: c,
|
|
@@ -6474,7 +6466,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6474
6466
|
s ||= t;
|
|
6475
6467
|
continue;
|
|
6476
6468
|
}
|
|
6477
|
-
o.has(
|
|
6469
|
+
o.has(Gn(e)) || (o.add(Gn(e)), u.push(e));
|
|
6478
6470
|
}
|
|
6479
6471
|
let d = i.concat(u);
|
|
6480
6472
|
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`), C(s), r(d);
|
|
@@ -6607,12 +6599,12 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6607
6599
|
B,
|
|
6608
6600
|
i && D.length > 0 && /* @__PURE__ */ p("div", {
|
|
6609
6601
|
className: "attach-list",
|
|
6610
|
-
children: D.map((e, t) => /* @__PURE__ */ p(
|
|
6602
|
+
children: D.map((e, t) => /* @__PURE__ */ p(Yn, {
|
|
6611
6603
|
item: e,
|
|
6612
6604
|
isImage: e instanceof File ? Ot(e) : k || Ot(e),
|
|
6613
6605
|
noun: "file",
|
|
6614
6606
|
onRemove: () => z(t)
|
|
6615
|
-
},
|
|
6607
|
+
}, Gn(e)))
|
|
6616
6608
|
})
|
|
6617
6609
|
]
|
|
6618
6610
|
}),
|
|
@@ -6625,7 +6617,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6625
6617
|
}
|
|
6626
6618
|
//#endregion
|
|
6627
6619
|
//#region src/components/AppFloatingDock.jsx
|
|
6628
|
-
function
|
|
6620
|
+
function $n({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
6629
6621
|
return N("AppFloatingDock", s), /* @__PURE__ */ p("wui-dock", {
|
|
6630
6622
|
role: "navigation",
|
|
6631
6623
|
"aria-label": n,
|
|
@@ -6667,7 +6659,7 @@ function tr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6667
6659
|
}
|
|
6668
6660
|
//#endregion
|
|
6669
6661
|
//#region src/components/AppFormActions.jsx
|
|
6670
|
-
function
|
|
6662
|
+
function er({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
6671
6663
|
return N("AppFormActions", i), /* @__PURE__ */ p("div", {
|
|
6672
6664
|
className: [
|
|
6673
6665
|
"form-actions",
|
|
@@ -6681,7 +6673,7 @@ function nr({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
6681
6673
|
}
|
|
6682
6674
|
//#endregion
|
|
6683
6675
|
//#region src/components/AppFormRow.jsx
|
|
6684
|
-
function
|
|
6676
|
+
function tr({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
6685
6677
|
N("AppFormRow", r);
|
|
6686
6678
|
let { style: i, ...a } = r;
|
|
6687
6679
|
return /* @__PURE__ */ p("div", {
|
|
@@ -6696,7 +6688,7 @@ function rr({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
6696
6688
|
}
|
|
6697
6689
|
//#endregion
|
|
6698
6690
|
//#region src/components/AppFormSection.jsx
|
|
6699
|
-
function
|
|
6691
|
+
function nr({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
6700
6692
|
return N("AppFormSection", i), /* @__PURE__ */ m("section", {
|
|
6701
6693
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
6702
6694
|
...i,
|
|
@@ -6717,12 +6709,12 @@ function ir({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
6717
6709
|
}
|
|
6718
6710
|
//#endregion
|
|
6719
6711
|
//#region src/components/AppInfoList.jsx
|
|
6720
|
-
function
|
|
6712
|
+
function rr({ items: e = [], className: t = "", ...n }) {
|
|
6721
6713
|
return N("AppInfoList", n), /* @__PURE__ */ p("div", {
|
|
6722
6714
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
6723
6715
|
...n,
|
|
6724
6716
|
children: e.map((e, t) => {
|
|
6725
|
-
let n =
|
|
6717
|
+
let n = zn(e.value), r = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
6726
6718
|
className: "info-icon",
|
|
6727
6719
|
children: U(e.icon, { size: 16 })
|
|
6728
6720
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -6748,23 +6740,23 @@ function ar({ items: e = [], className: t = "", ...n }) {
|
|
|
6748
6740
|
}
|
|
6749
6741
|
//#endregion
|
|
6750
6742
|
//#region src/components/AppKpiTile.jsx
|
|
6751
|
-
var
|
|
6752
|
-
function
|
|
6753
|
-
if (!e || e.length < 2) return `0,${
|
|
6754
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
6755
|
-
return e.map((e, i) => `${i * r},${n === 0 ?
|
|
6743
|
+
var ir = 48, ar = 16;
|
|
6744
|
+
function or(e) {
|
|
6745
|
+
if (!e || e.length < 2) return `0,${ar / 2} ${ir},${ar / 2}`;
|
|
6746
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = ir / (e.length - 1);
|
|
6747
|
+
return e.map((e, i) => `${i * r},${n === 0 ? ar / 2 : ar - (e - t) / n * ar}`).join(" ");
|
|
6756
6748
|
}
|
|
6757
|
-
function
|
|
6749
|
+
function sr(e) {
|
|
6758
6750
|
if (typeof e != "string") return "flat";
|
|
6759
6751
|
let t = e.trim();
|
|
6760
6752
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
6761
6753
|
}
|
|
6762
|
-
function
|
|
6754
|
+
function cr({ 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 }) {
|
|
6763
6755
|
N("AppKpiTile", T);
|
|
6764
6756
|
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 ? {
|
|
6765
6757
|
...v,
|
|
6766
6758
|
"--wui-kpi-value-size": `${u}px`
|
|
6767
|
-
} : v, O = o ??
|
|
6759
|
+
} : v, O = o ?? sr(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
6768
6760
|
return h != null && (A = g ? {
|
|
6769
6761
|
as: g,
|
|
6770
6762
|
to: h
|
|
@@ -6802,12 +6794,12 @@ function ur({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6802
6794
|
}),
|
|
6803
6795
|
s && s.length > 0 && /* @__PURE__ */ p("svg", {
|
|
6804
6796
|
className: `kpi-sparkline${w ? ` ${w}` : ""}`,
|
|
6805
|
-
width:
|
|
6806
|
-
height:
|
|
6807
|
-
viewBox: `0 0 ${
|
|
6797
|
+
width: ir,
|
|
6798
|
+
height: ar,
|
|
6799
|
+
viewBox: `0 0 ${ir} ${ar}`,
|
|
6808
6800
|
"aria-hidden": "true",
|
|
6809
6801
|
children: /* @__PURE__ */ p("polyline", {
|
|
6810
|
-
points:
|
|
6802
|
+
points: or(s),
|
|
6811
6803
|
stroke: "currentColor",
|
|
6812
6804
|
fill: "none"
|
|
6813
6805
|
})
|
|
@@ -6817,12 +6809,12 @@ function ur({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6817
6809
|
}
|
|
6818
6810
|
//#endregion
|
|
6819
6811
|
//#region src/components/AppLogoPicker.jsx
|
|
6820
|
-
var
|
|
6812
|
+
var lr = {
|
|
6821
6813
|
sm: 72,
|
|
6822
6814
|
md: 120,
|
|
6823
6815
|
lg: 160
|
|
6824
6816
|
};
|
|
6825
|
-
function
|
|
6817
|
+
function ur({ 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 }) {
|
|
6826
6818
|
N("AppLogoPicker", k);
|
|
6827
6819
|
let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee, B] = d(!1);
|
|
6828
6820
|
o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
|
|
@@ -6830,7 +6822,7 @@ function fr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6830
6822
|
}, [e]);
|
|
6831
6823
|
let V = a || c, te = P || (e && !R ? e : null), ne = b || I, re = !V && (!!P || !!te && !!i), ie = () => {
|
|
6832
6824
|
V || A.current?.click();
|
|
6833
|
-
},
|
|
6825
|
+
}, ae = (e) => {
|
|
6834
6826
|
let t = Mt(e, {
|
|
6835
6827
|
accept: l,
|
|
6836
6828
|
maxSizeMb: f
|
|
@@ -6840,16 +6832,16 @@ function fr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6840
6832
|
return;
|
|
6841
6833
|
}
|
|
6842
6834
|
L(""), z(!1), F(URL.createObjectURL(e)), r(e);
|
|
6843
|
-
},
|
|
6835
|
+
}, U = (e) => {
|
|
6844
6836
|
let t = e.target.files?.[0];
|
|
6845
|
-
e.target.value = "", t &&
|
|
6837
|
+
e.target.value = "", t && ae(t);
|
|
6846
6838
|
}, oe = (e) => {
|
|
6847
6839
|
if (e.preventDefault(), B(!1), V) return;
|
|
6848
6840
|
let t = e.dataTransfer.files?.[0];
|
|
6849
|
-
t &&
|
|
6841
|
+
t && ae(t);
|
|
6850
6842
|
}, se = () => {
|
|
6851
6843
|
F(null), L(""), z(!1), A.current && (A.current.value = ""), i?.();
|
|
6852
|
-
}, ce = typeof E == "number" ? E :
|
|
6844
|
+
}, ce = typeof E == "number" ? E : lr[E] ?? lr.md, le = Math.max(14, Math.round(ce * .18)), ue = Math.round(ce * .5), de = [
|
|
6853
6845
|
"set-uploader",
|
|
6854
6846
|
T === "avatar" ? "set-uploader--avatar" : "",
|
|
6855
6847
|
D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
|
|
@@ -6922,7 +6914,7 @@ function fr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6922
6914
|
name: n,
|
|
6923
6915
|
hidden: !0,
|
|
6924
6916
|
accept: l,
|
|
6925
|
-
onChange:
|
|
6917
|
+
onChange: U,
|
|
6926
6918
|
disabled: V
|
|
6927
6919
|
})
|
|
6928
6920
|
]
|
|
@@ -6976,27 +6968,27 @@ function fr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6976
6968
|
}
|
|
6977
6969
|
//#endregion
|
|
6978
6970
|
//#region src/components/AppMeter.jsx
|
|
6979
|
-
var
|
|
6971
|
+
var dr = [
|
|
6980
6972
|
"info",
|
|
6981
6973
|
"success",
|
|
6982
6974
|
"warning",
|
|
6983
6975
|
"danger",
|
|
6984
6976
|
"neutral"
|
|
6985
6977
|
];
|
|
6986
|
-
function
|
|
6978
|
+
function fr(e, t, n) {
|
|
6987
6979
|
let r = n - t;
|
|
6988
6980
|
if (!(r > 0)) return 0;
|
|
6989
6981
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
6990
6982
|
return Number(i.toFixed(2));
|
|
6991
6983
|
}
|
|
6992
|
-
function
|
|
6984
|
+
function pr(e, t, n, r, i) {
|
|
6993
6985
|
if (t == null && n == null) return i;
|
|
6994
6986
|
let a = "mid";
|
|
6995
6987
|
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";
|
|
6996
6988
|
}
|
|
6997
|
-
function
|
|
6989
|
+
function mr({ 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 }) {
|
|
6998
6990
|
N("AppMeter", d);
|
|
6999
|
-
let f =
|
|
6991
|
+
let f = pr(e, a, o, i, dr.includes(r) ? r : "info"), m = fr(e, t, n);
|
|
7000
6992
|
return /* @__PURE__ */ p("div", {
|
|
7001
6993
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
7002
6994
|
role: "meter",
|
|
@@ -7006,15 +6998,15 @@ function gr({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
7006
6998
|
"aria-label": c || void 0,
|
|
7007
6999
|
...d,
|
|
7008
7000
|
children: /* @__PURE__ */ p("div", {
|
|
7009
|
-
className: `progress-bar wui-progress-${
|
|
7010
|
-
style: { width: `${
|
|
7001
|
+
className: `progress-bar wui-progress-${f}`,
|
|
7002
|
+
style: { width: `${m}%` },
|
|
7011
7003
|
children: l && c
|
|
7012
7004
|
})
|
|
7013
7005
|
});
|
|
7014
7006
|
}
|
|
7015
7007
|
//#endregion
|
|
7016
7008
|
//#region src/components/AppMultiSelect.jsx
|
|
7017
|
-
var
|
|
7009
|
+
var hr = 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) {
|
|
7018
7010
|
N("AppMultiSelect", S);
|
|
7019
7011
|
let w = s(), T = f || w, { setRef: E, innerRef: D } = Q({
|
|
7020
7012
|
ref: C,
|
|
@@ -7071,7 +7063,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7071
7063
|
}) : null
|
|
7072
7064
|
]
|
|
7073
7065
|
});
|
|
7074
|
-
}),
|
|
7066
|
+
}), gr = 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) {
|
|
7075
7067
|
N("AppNumberInput", T);
|
|
7076
7068
|
let D = s(), O = y || D, k = (e) => {
|
|
7077
7069
|
if (g === 0) return Math.round(e);
|
|
@@ -7129,7 +7121,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7129
7121
|
onChange: te,
|
|
7130
7122
|
onBlur: ne,
|
|
7131
7123
|
onKeyDown: re
|
|
7132
|
-
}),
|
|
7124
|
+
}), ae = /* @__PURE__ */ m("div", {
|
|
7133
7125
|
className: [
|
|
7134
7126
|
"num-wrap",
|
|
7135
7127
|
v === "sm" ? "num-wrap-sm" : "",
|
|
@@ -7182,7 +7174,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7182
7174
|
})
|
|
7183
7175
|
]
|
|
7184
7176
|
}),
|
|
7185
|
-
|
|
7177
|
+
ae,
|
|
7186
7178
|
n ? /* @__PURE__ */ p("div", {
|
|
7187
7179
|
className: "field-error",
|
|
7188
7180
|
id: z,
|
|
@@ -7194,7 +7186,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7194
7186
|
}) : null
|
|
7195
7187
|
]
|
|
7196
7188
|
});
|
|
7197
|
-
}),
|
|
7189
|
+
}), _r = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: c = !1, hint: l, error: u, disabled: d = !1, name: f, id: h, className: g = "", ..._ }, v) {
|
|
7198
7190
|
N("AppOtpInput", _);
|
|
7199
7191
|
let y = s(), b = h || y, { setRef: x, innerRef: S } = Q({
|
|
7200
7192
|
ref: v,
|
|
@@ -7241,7 +7233,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7241
7233
|
});
|
|
7242
7234
|
//#endregion
|
|
7243
7235
|
//#region src/components/AppPageHeader.jsx
|
|
7244
|
-
function
|
|
7236
|
+
function vr({ 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 }) {
|
|
7245
7237
|
N("AppPageHeader", h);
|
|
7246
7238
|
let g = [
|
|
7247
7239
|
"page-header",
|
|
@@ -7300,9 +7292,9 @@ function br({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7300
7292
|
}
|
|
7301
7293
|
//#endregion
|
|
7302
7294
|
//#region src/components/AppPagination.jsx
|
|
7303
|
-
function
|
|
7295
|
+
function yr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
7304
7296
|
if (N("AppPagination", s), t <= 1) return null;
|
|
7305
|
-
let c =
|
|
7297
|
+
let c = An(e, t, { siblingCount: r });
|
|
7306
7298
|
return /* @__PURE__ */ p("nav", {
|
|
7307
7299
|
className: [
|
|
7308
7300
|
"pagination-nav",
|
|
@@ -7360,7 +7352,7 @@ function xr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
7360
7352
|
}
|
|
7361
7353
|
//#endregion
|
|
7362
7354
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
7363
|
-
var
|
|
7355
|
+
var br = 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 }, _) {
|
|
7364
7356
|
N("AppPhoneNumberInput", g);
|
|
7365
7357
|
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } = Q({
|
|
7366
7358
|
ref: _,
|
|
@@ -7400,7 +7392,7 @@ var Sr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7400
7392
|
});
|
|
7401
7393
|
//#endregion
|
|
7402
7394
|
//#region src/components/AppPricingCard.jsx
|
|
7403
|
-
function
|
|
7395
|
+
function xr({ 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 }) {
|
|
7404
7396
|
return N("AppPricingCard", u), /* @__PURE__ */ m("div", {
|
|
7405
7397
|
className: [
|
|
7406
7398
|
"plan-card",
|
|
@@ -7454,29 +7446,29 @@ function Cr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7454
7446
|
}
|
|
7455
7447
|
//#endregion
|
|
7456
7448
|
//#region src/components/AppProgress.jsx
|
|
7457
|
-
var
|
|
7449
|
+
var Sr = [
|
|
7458
7450
|
"info",
|
|
7459
7451
|
"success",
|
|
7460
7452
|
"warning",
|
|
7461
7453
|
"danger",
|
|
7462
7454
|
"neutral"
|
|
7463
7455
|
];
|
|
7464
|
-
function
|
|
7456
|
+
function Cr(e, t) {
|
|
7465
7457
|
if (!(t > 0)) return 0;
|
|
7466
7458
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
7467
7459
|
return Number(n.toFixed(2));
|
|
7468
7460
|
}
|
|
7469
|
-
function
|
|
7461
|
+
function wr({ 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 }) {
|
|
7470
7462
|
N("AppProgress", u);
|
|
7471
|
-
let d =
|
|
7463
|
+
let d = Sr.includes(n) ? n : "info", f = Cr(e, t), m = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, h = [
|
|
7472
7464
|
"progress-bar",
|
|
7473
|
-
`wui-progress-${
|
|
7465
|
+
`wui-progress-${d}`,
|
|
7474
7466
|
o || s ? "progress-bar-striped" : "",
|
|
7475
7467
|
s ? "progress-bar-animated" : "",
|
|
7476
7468
|
c ? "wui-progress-indeterminate" : ""
|
|
7477
7469
|
].filter(Boolean).join(" ");
|
|
7478
7470
|
return /* @__PURE__ */ p("div", {
|
|
7479
|
-
className:
|
|
7471
|
+
className: m,
|
|
7480
7472
|
role: "progressbar",
|
|
7481
7473
|
"aria-valuemin": 0,
|
|
7482
7474
|
"aria-valuemax": t,
|
|
@@ -7484,16 +7476,16 @@ function Er({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
7484
7476
|
"aria-label": i || void 0,
|
|
7485
7477
|
...u,
|
|
7486
7478
|
children: /* @__PURE__ */ p("div", {
|
|
7487
|
-
className:
|
|
7488
|
-
style: c ? void 0 : { width: `${
|
|
7479
|
+
className: h,
|
|
7480
|
+
style: c ? void 0 : { width: `${f}%` },
|
|
7489
7481
|
children: !c && a && i
|
|
7490
7482
|
})
|
|
7491
7483
|
});
|
|
7492
7484
|
}
|
|
7493
7485
|
//#endregion
|
|
7494
7486
|
//#region src/components/AppRadio.jsx
|
|
7495
|
-
var
|
|
7496
|
-
return N("AppRadio", o), /* @__PURE__ */ p(
|
|
7487
|
+
var Tr = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
7488
|
+
return N("AppRadio", o), /* @__PURE__ */ p(ln, {
|
|
7497
7489
|
ref: s,
|
|
7498
7490
|
label: e,
|
|
7499
7491
|
id: t,
|
|
@@ -7508,7 +7500,7 @@ var Dr = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
7508
7500
|
});
|
|
7509
7501
|
//#endregion
|
|
7510
7502
|
//#region src/components/AppRepeater.jsx
|
|
7511
|
-
function
|
|
7503
|
+
function Er({ 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 }) {
|
|
7512
7504
|
N("AppRepeater", d);
|
|
7513
7505
|
let f = typeof c == "number" && e.length >= c, h = !!r && e.length > s;
|
|
7514
7506
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7530,7 +7522,7 @@ function Or({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7530
7522
|
className: "repeater-body",
|
|
7531
7523
|
children: t(e, n)
|
|
7532
7524
|
}),
|
|
7533
|
-
h && /* @__PURE__ */ p(
|
|
7525
|
+
h && /* @__PURE__ */ p(oe, {
|
|
7534
7526
|
icon: "trash-2",
|
|
7535
7527
|
label: `${a} ${n + 1}`,
|
|
7536
7528
|
danger: !0,
|
|
@@ -7553,7 +7545,7 @@ function Or({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7553
7545
|
}
|
|
7554
7546
|
//#endregion
|
|
7555
7547
|
//#region src/components/AppResourceCard.jsx
|
|
7556
|
-
function
|
|
7548
|
+
function Dr({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
7557
7549
|
N("AppResourceCard", s);
|
|
7558
7550
|
let c = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
7559
7551
|
className: "res-card-icon",
|
|
@@ -7587,7 +7579,7 @@ function kr({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
7587
7579
|
}
|
|
7588
7580
|
//#endregion
|
|
7589
7581
|
//#region src/components/AppResult.jsx
|
|
7590
|
-
var
|
|
7582
|
+
var Or = {
|
|
7591
7583
|
success: {
|
|
7592
7584
|
icon: "check-circle",
|
|
7593
7585
|
tone: "success"
|
|
@@ -7608,9 +7600,9 @@ var Ar = {
|
|
|
7608
7600
|
404: { tone: "muted" },
|
|
7609
7601
|
500: { tone: "muted" }
|
|
7610
7602
|
};
|
|
7611
|
-
function
|
|
7603
|
+
function kr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
7612
7604
|
N("AppResult", s);
|
|
7613
|
-
let c =
|
|
7605
|
+
let c = Or[e] || Or.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
7614
7606
|
return /* @__PURE__ */ m("div", {
|
|
7615
7607
|
className: [
|
|
7616
7608
|
"result",
|
|
@@ -7648,7 +7640,7 @@ function jr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7648
7640
|
}
|
|
7649
7641
|
//#endregion
|
|
7650
7642
|
//#region src/components/AppScrollbar.jsx
|
|
7651
|
-
function
|
|
7643
|
+
function Ar({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
7652
7644
|
return N("AppScrollbar", i), /* @__PURE__ */ p("div", {
|
|
7653
7645
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
7654
7646
|
style: n == null ? r : {
|
|
@@ -7661,7 +7653,7 @@ function Mr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
7661
7653
|
}
|
|
7662
7654
|
//#endregion
|
|
7663
7655
|
//#region src/components/AppSearch.jsx
|
|
7664
|
-
function
|
|
7656
|
+
function jr({ 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 }) {
|
|
7665
7657
|
N("AppSearch", u);
|
|
7666
7658
|
let d = t || n;
|
|
7667
7659
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7708,7 +7700,7 @@ function Nr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7708
7700
|
}
|
|
7709
7701
|
//#endregion
|
|
7710
7702
|
//#region src/components/AppSegmented.jsx
|
|
7711
|
-
function
|
|
7703
|
+
function Mr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: l = !1, disabled: d = !1, className: f = "", ...h }) {
|
|
7712
7704
|
N("AppSegmented", h);
|
|
7713
7705
|
let g = s(), _ = i || g, v = u(null), y = u(null), b = [
|
|
7714
7706
|
"segmented",
|
|
@@ -7783,7 +7775,7 @@ function Pr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7783
7775
|
}
|
|
7784
7776
|
//#endregion
|
|
7785
7777
|
//#region src/components/AppSelect.jsx
|
|
7786
|
-
var
|
|
7778
|
+
var Nr = (e) => e == null ? "" : e.label ?? e.text ?? "", Pr = 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) {
|
|
7787
7779
|
N("AppSelect", O);
|
|
7788
7780
|
let A = s(), { setRef: j, innerRef: M } = Q({
|
|
7789
7781
|
ref: k,
|
|
@@ -7795,7 +7787,7 @@ var Fr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ir = i(function({ valu
|
|
|
7795
7787
|
if (!e) return;
|
|
7796
7788
|
let t = n.map((e) => ({
|
|
7797
7789
|
value: e.value,
|
|
7798
|
-
label:
|
|
7790
|
+
label: Nr(e),
|
|
7799
7791
|
icon: e.icon
|
|
7800
7792
|
}));
|
|
7801
7793
|
zt(t, e.options) || (e.options = t);
|
|
@@ -7859,7 +7851,7 @@ var Fr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ir = i(function({ valu
|
|
|
7859
7851
|
});
|
|
7860
7852
|
//#endregion
|
|
7861
7853
|
//#region src/components/AppShell.jsx
|
|
7862
|
-
function
|
|
7854
|
+
function Fr({ 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 }) {
|
|
7863
7855
|
N("AppShell", y);
|
|
7864
7856
|
let [b, x] = d(!1), [S, C] = d(!1), [w, T] = d(!1), E = u ?? b, D = () => {
|
|
7865
7857
|
let e = !E;
|
|
@@ -7907,7 +7899,7 @@ function Lr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7907
7899
|
children: [e.label && /* @__PURE__ */ p("div", {
|
|
7908
7900
|
className: "app-nav-group-label",
|
|
7909
7901
|
children: e.label
|
|
7910
|
-
}), e.items.map((e) => /* @__PURE__ */ p(
|
|
7902
|
+
}), e.items.map((e) => /* @__PURE__ */ p(Ir, {
|
|
7911
7903
|
item: e,
|
|
7912
7904
|
linkComponent: _,
|
|
7913
7905
|
onNavigate: () => C(!1)
|
|
@@ -7974,7 +7966,7 @@ function Lr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7974
7966
|
]
|
|
7975
7967
|
});
|
|
7976
7968
|
}
|
|
7977
|
-
function
|
|
7969
|
+
function Ir({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
7978
7970
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = d(a);
|
|
7979
7971
|
o(() => {
|
|
7980
7972
|
a && !s && c(!0);
|
|
@@ -8014,7 +8006,7 @@ function Rr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8014
8006
|
className: `app-nav-sub${s ? " expanded" : ""}`,
|
|
8015
8007
|
children: /* @__PURE__ */ p("div", {
|
|
8016
8008
|
className: "app-nav-sub-inner",
|
|
8017
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
8009
|
+
children: e.children.map((e) => /* @__PURE__ */ p(Ir, {
|
|
8018
8010
|
item: e,
|
|
8019
8011
|
linkComponent: t,
|
|
8020
8012
|
onNavigate: n,
|
|
@@ -8055,7 +8047,7 @@ function Rr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8055
8047
|
}
|
|
8056
8048
|
//#endregion
|
|
8057
8049
|
//#region src/components/AppSidebarMenu.jsx
|
|
8058
|
-
var
|
|
8050
|
+
var Lr = {
|
|
8059
8051
|
left: "start",
|
|
8060
8052
|
right: "end",
|
|
8061
8053
|
start: "start",
|
|
@@ -8063,9 +8055,9 @@ var zr = {
|
|
|
8063
8055
|
top: "top",
|
|
8064
8056
|
bottom: "bottom"
|
|
8065
8057
|
};
|
|
8066
|
-
function
|
|
8058
|
+
function Rr({ 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 }) {
|
|
8067
8059
|
N("AppSidebarMenu", b);
|
|
8068
|
-
let { style: x, ...S } = b, w =
|
|
8060
|
+
let { style: x, ...S } = b, w = Lr[n] || "end", T = c || l || x ? {
|
|
8069
8061
|
...c && { "--asm-width": c },
|
|
8070
8062
|
...l && { "--asm-max-width": l },
|
|
8071
8063
|
...x
|
|
@@ -8118,7 +8110,7 @@ function Br({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8118
8110
|
}
|
|
8119
8111
|
//#endregion
|
|
8120
8112
|
//#region src/components/AppSlider.jsx
|
|
8121
|
-
var
|
|
8113
|
+
var zr = 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 = "", ...E }, D) {
|
|
8122
8114
|
N("AppSlider", E);
|
|
8123
8115
|
let O = s(), k = C || d || r && f || O, A = r, { setRef: j, innerRef: M } = Q({
|
|
8124
8116
|
ref: D,
|
|
@@ -8179,14 +8171,14 @@ var Vr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
8179
8171
|
})
|
|
8180
8172
|
]
|
|
8181
8173
|
});
|
|
8182
|
-
}),
|
|
8174
|
+
}), Br = {
|
|
8183
8175
|
sm: 44,
|
|
8184
8176
|
md: 56,
|
|
8185
8177
|
lg: 72
|
|
8186
8178
|
};
|
|
8187
|
-
function
|
|
8179
|
+
function Vr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
8188
8180
|
N("AppSplash", c);
|
|
8189
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
8181
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : Br[a] ?? Br.md, f = i === "ring" ? /* @__PURE__ */ p("span", {
|
|
8190
8182
|
className: "splash-ring",
|
|
8191
8183
|
"aria-hidden": "true"
|
|
8192
8184
|
}) : i === "dots" ? /* @__PURE__ */ m("span", {
|
|
@@ -8233,16 +8225,16 @@ function Ur({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
8233
8225
|
}
|
|
8234
8226
|
//#endregion
|
|
8235
8227
|
//#region src/components/AppStatusBadge.jsx
|
|
8236
|
-
function
|
|
8228
|
+
function Hr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
8237
8229
|
return N("AppStatusBadge", r), e == null || e === "" ? "—" : /* @__PURE__ */ p("span", {
|
|
8238
|
-
className: `status-label ${
|
|
8230
|
+
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
8239
8231
|
...r,
|
|
8240
8232
|
children: e
|
|
8241
8233
|
});
|
|
8242
8234
|
}
|
|
8243
8235
|
//#endregion
|
|
8244
8236
|
//#region src/components/AppStepper.jsx
|
|
8245
|
-
function
|
|
8237
|
+
function Ur({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
8246
8238
|
N("AppStepper", c);
|
|
8247
8239
|
let l = t === "journey";
|
|
8248
8240
|
return /* @__PURE__ */ p("nav", {
|
|
@@ -8255,7 +8247,7 @@ function Gr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8255
8247
|
"aria-label": a,
|
|
8256
8248
|
...c,
|
|
8257
8249
|
children: e.map((t, n) => {
|
|
8258
|
-
let a = t.status ||
|
|
8250
|
+
let a = t.status || Wr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
8259
8251
|
c = a === "done" ? /* @__PURE__ */ p(H, {
|
|
8260
8252
|
name: "check",
|
|
8261
8253
|
size: 14
|
|
@@ -8319,13 +8311,13 @@ function Gr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8319
8311
|
})
|
|
8320
8312
|
});
|
|
8321
8313
|
}
|
|
8322
|
-
function
|
|
8314
|
+
function Wr(e, t) {
|
|
8323
8315
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
8324
8316
|
}
|
|
8325
8317
|
//#endregion
|
|
8326
8318
|
//#region src/components/AppSwitch.jsx
|
|
8327
|
-
var
|
|
8328
|
-
return N("AppSwitch", s), /* @__PURE__ */ p(
|
|
8319
|
+
var Gr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
8320
|
+
return N("AppSwitch", s), /* @__PURE__ */ p(ln, {
|
|
8329
8321
|
ref: c,
|
|
8330
8322
|
label: e,
|
|
8331
8323
|
id: t,
|
|
@@ -8340,7 +8332,7 @@ var qr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
8340
8332
|
});
|
|
8341
8333
|
//#endregion
|
|
8342
8334
|
//#region src/components/AppTableEmptyState.jsx
|
|
8343
|
-
function
|
|
8335
|
+
function Kr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
8344
8336
|
return N("AppTableEmptyState", i), /* @__PURE__ */ m("div", {
|
|
8345
8337
|
className: "tbl-empty",
|
|
8346
8338
|
...i,
|
|
@@ -8366,13 +8358,13 @@ function Jr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
8366
8358
|
}
|
|
8367
8359
|
//#endregion
|
|
8368
8360
|
//#region src/components/AppTooltip.jsx
|
|
8369
|
-
var
|
|
8361
|
+
var qr = {
|
|
8370
8362
|
start: "left",
|
|
8371
8363
|
end: "right",
|
|
8372
8364
|
top: "top",
|
|
8373
8365
|
bottom: "bottom"
|
|
8374
8366
|
};
|
|
8375
|
-
function
|
|
8367
|
+
function Jr({ content: e, children: t, placement: r = "top", tone: i = "default", size: a = "md", className: o = "", ...c }) {
|
|
8376
8368
|
N("AppTooltip", c);
|
|
8377
8369
|
let l = /* @__PURE__ */ p(E, {
|
|
8378
8370
|
id: s(),
|
|
@@ -8386,14 +8378,14 @@ function Xr({ content: e, children: t, placement: r = "top", tone: i = "default"
|
|
|
8386
8378
|
});
|
|
8387
8379
|
return /* @__PURE__ */ p(w, {
|
|
8388
8380
|
trigger: ["hover", "focus"],
|
|
8389
|
-
placement:
|
|
8381
|
+
placement: qr[r] || r,
|
|
8390
8382
|
overlay: l,
|
|
8391
8383
|
children: n(t, c)
|
|
8392
8384
|
});
|
|
8393
8385
|
}
|
|
8394
8386
|
//#endregion
|
|
8395
8387
|
//#region src/components/AppTabs.jsx
|
|
8396
|
-
function
|
|
8388
|
+
function Yr({ 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 }) {
|
|
8397
8389
|
N("AppTabs", v);
|
|
8398
8390
|
let y = u(null), b = u(null), x = i === "vertical", [S, C] = d(t);
|
|
8399
8391
|
o(() => {
|
|
@@ -8500,7 +8492,7 @@ function Zr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8500
8492
|
})
|
|
8501
8493
|
]
|
|
8502
8494
|
}, e.key);
|
|
8503
|
-
return e.tooltip ? /* @__PURE__ */ p(
|
|
8495
|
+
return e.tooltip ? /* @__PURE__ */ p(Jr, {
|
|
8504
8496
|
content: e.tooltip,
|
|
8505
8497
|
children: i
|
|
8506
8498
|
}, e.key) : i;
|
|
@@ -8542,7 +8534,7 @@ function Zr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8542
8534
|
}
|
|
8543
8535
|
//#endregion
|
|
8544
8536
|
//#region src/components/AppTagInput.jsx
|
|
8545
|
-
var
|
|
8537
|
+
var Xr = 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) {
|
|
8546
8538
|
N("AppTagInput", x);
|
|
8547
8539
|
let C = s(), w = h || r || C, { setRef: T } = Q({
|
|
8548
8540
|
ref: S,
|
|
@@ -8593,7 +8585,7 @@ var Qr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8593
8585
|
}) : null
|
|
8594
8586
|
]
|
|
8595
8587
|
});
|
|
8596
|
-
}),
|
|
8588
|
+
}), Zr = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: o = "More information", id: l, name: d, rows: f = 4, autoGrow: h = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
|
|
8597
8589
|
N("AppTextarea", v);
|
|
8598
8590
|
let b = s(), S = l || b, C = [
|
|
8599
8591
|
"textarea",
|
|
@@ -8655,7 +8647,7 @@ var Qr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8655
8647
|
}) : null
|
|
8656
8648
|
]
|
|
8657
8649
|
});
|
|
8658
|
-
}),
|
|
8650
|
+
}), Qr = {
|
|
8659
8651
|
done: "check",
|
|
8660
8652
|
current: "clock",
|
|
8661
8653
|
"on-hold": "lock",
|
|
@@ -8664,7 +8656,7 @@ var Qr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8664
8656
|
skipped: "arrow-right",
|
|
8665
8657
|
upcoming: null
|
|
8666
8658
|
};
|
|
8667
|
-
function
|
|
8659
|
+
function $r({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
8668
8660
|
N("AppTimeline", o);
|
|
8669
8661
|
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;
|
|
8670
8662
|
return /* @__PURE__ */ p("ol", {
|
|
@@ -8675,7 +8667,7 @@ function ti({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8675
8667
|
} : a,
|
|
8676
8668
|
...o,
|
|
8677
8669
|
children: e.map((e, t) => {
|
|
8678
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
8670
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? Qr[n] : void 0) : e.icon || "circle";
|
|
8679
8671
|
return /* @__PURE__ */ m("li", {
|
|
8680
8672
|
className: `timeline-item${r}${i}`,
|
|
8681
8673
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -8733,7 +8725,7 @@ function ti({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8733
8725
|
}
|
|
8734
8726
|
//#endregion
|
|
8735
8727
|
//#region src/components/AppTimePicker.jsx
|
|
8736
|
-
var
|
|
8728
|
+
var ei = 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 = "", ...b }, x) {
|
|
8737
8729
|
N("AppTimePicker", b);
|
|
8738
8730
|
let S = s(), C = _ || o || S, { setRef: w } = Q({
|
|
8739
8731
|
ref: x,
|
|
@@ -8778,32 +8770,32 @@ var ni = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
8778
8770
|
})
|
|
8779
8771
|
]
|
|
8780
8772
|
});
|
|
8781
|
-
}),
|
|
8782
|
-
function
|
|
8783
|
-
for (let e of
|
|
8773
|
+
}), ti = 6, $ = [], ni = /* @__PURE__ */ new Set(), ri = /* @__PURE__ */ new Map(), ii = 0;
|
|
8774
|
+
function ai() {
|
|
8775
|
+
for (let e of ni) e($);
|
|
8784
8776
|
}
|
|
8785
|
-
function
|
|
8786
|
-
let t =
|
|
8787
|
-
t !== void 0 && (clearTimeout(t),
|
|
8777
|
+
function oi(e) {
|
|
8778
|
+
let t = ri.get(e);
|
|
8779
|
+
t !== void 0 && (clearTimeout(t), ri.delete(e));
|
|
8788
8780
|
}
|
|
8789
|
-
function
|
|
8790
|
-
if (e.length <=
|
|
8781
|
+
function si(e) {
|
|
8782
|
+
if (e.length <= ti) return e;
|
|
8791
8783
|
let t = [...e];
|
|
8792
|
-
for (; t.length >
|
|
8784
|
+
for (; t.length > ti;) {
|
|
8793
8785
|
let e = t.findIndex((e) => e.duration !== 0);
|
|
8794
8786
|
t.splice(e === -1 ? 0 : e, 1);
|
|
8795
8787
|
}
|
|
8796
8788
|
return t;
|
|
8797
8789
|
}
|
|
8798
|
-
function
|
|
8799
|
-
return
|
|
8790
|
+
function ci(e) {
|
|
8791
|
+
return ni.add(e), e($), () => ni.delete(e);
|
|
8800
8792
|
}
|
|
8801
|
-
function
|
|
8793
|
+
function li(e, t, n = {}) {
|
|
8802
8794
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
8803
8795
|
if (r) {
|
|
8804
8796
|
let i = $.find((e) => e.externalId === r);
|
|
8805
8797
|
if (i) {
|
|
8806
|
-
|
|
8798
|
+
oi(i.id);
|
|
8807
8799
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
8808
8800
|
$ = $.map((a) => a.id === i.id ? {
|
|
8809
8801
|
...a,
|
|
@@ -8816,12 +8808,12 @@ function di(e, t, n = {}) {
|
|
|
8816
8808
|
shape: n.shape,
|
|
8817
8809
|
surface: n.surface,
|
|
8818
8810
|
progress: n.progress
|
|
8819
|
-
} : a),
|
|
8811
|
+
} : a), ai(), r > 0 && ri.set(i.id, setTimeout(() => ui(i.id), r));
|
|
8820
8812
|
return;
|
|
8821
8813
|
}
|
|
8822
8814
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
8823
|
-
let a = ++
|
|
8824
|
-
$ =
|
|
8815
|
+
let a = ++ii, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
8816
|
+
$ = si([...$, {
|
|
8825
8817
|
id: a,
|
|
8826
8818
|
externalId: r,
|
|
8827
8819
|
message: e,
|
|
@@ -8834,19 +8826,19 @@ function di(e, t, n = {}) {
|
|
|
8834
8826
|
surface: n.surface,
|
|
8835
8827
|
progress: n.progress,
|
|
8836
8828
|
key: i
|
|
8837
|
-
}]),
|
|
8829
|
+
}]), ai(), o > 0 && ri.set(a, setTimeout(() => ui(a), o));
|
|
8838
8830
|
}
|
|
8839
|
-
function
|
|
8840
|
-
|
|
8831
|
+
function ui(e) {
|
|
8832
|
+
oi(e);
|
|
8841
8833
|
let t = $.filter((t) => t.id !== e);
|
|
8842
|
-
t.length !== $.length && ($ = t,
|
|
8834
|
+
t.length !== $.length && ($ = t, ai());
|
|
8843
8835
|
}
|
|
8844
|
-
function
|
|
8845
|
-
$.length !== 0 && ($ = [],
|
|
8836
|
+
function di() {
|
|
8837
|
+
$.length !== 0 && ($ = [], ai());
|
|
8846
8838
|
}
|
|
8847
8839
|
//#endregion
|
|
8848
8840
|
//#region src/components/AppToast.jsx
|
|
8849
|
-
var
|
|
8841
|
+
var fi = {
|
|
8850
8842
|
success: {
|
|
8851
8843
|
icon: "check-circle",
|
|
8852
8844
|
assertive: !1
|
|
@@ -8863,7 +8855,7 @@ var mi = {
|
|
|
8863
8855
|
icon: "alert-circle",
|
|
8864
8856
|
assertive: !0
|
|
8865
8857
|
}
|
|
8866
|
-
},
|
|
8858
|
+
}, pi = {
|
|
8867
8859
|
"top-start": "top-0 start-0",
|
|
8868
8860
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
8869
8861
|
"top-end": "top-0 end-0",
|
|
@@ -8871,22 +8863,22 @@ var mi = {
|
|
|
8871
8863
|
"bottom-start": "bottom-0 start-0",
|
|
8872
8864
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
8873
8865
|
"bottom-end": "bottom-0 end-0"
|
|
8874
|
-
},
|
|
8866
|
+
}, mi = 64, hi = /* @__PURE__ */ new Set([
|
|
8875
8867
|
"rise",
|
|
8876
8868
|
"organic",
|
|
8877
8869
|
"jelly",
|
|
8878
8870
|
"spring"
|
|
8879
|
-
]),
|
|
8871
|
+
]), gi = /* @__PURE__ */ new Set([
|
|
8880
8872
|
"rounded",
|
|
8881
8873
|
"pill",
|
|
8882
8874
|
"sharp"
|
|
8883
|
-
]),
|
|
8884
|
-
function
|
|
8875
|
+
]), _i = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
8876
|
+
function vi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto" }) {
|
|
8885
8877
|
let [a, s] = d([]);
|
|
8886
|
-
o(() =>
|
|
8878
|
+
o(() => ci(s), []);
|
|
8887
8879
|
let c = Math.max(0, a.length - t), l = c ? a.slice(c) : a;
|
|
8888
8880
|
return /* @__PURE__ */ m("div", {
|
|
8889
|
-
className: `wui-toast-container toast-container position-fixed ${
|
|
8881
|
+
className: `wui-toast-container toast-container position-fixed ${pi[e] ?? pi["bottom-end"]} p-3`,
|
|
8890
8882
|
children: [c > 0 && /* @__PURE__ */ m("div", {
|
|
8891
8883
|
className: "wui-toast-more",
|
|
8892
8884
|
"aria-hidden": "true",
|
|
@@ -8895,7 +8887,7 @@ function bi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8895
8887
|
c,
|
|
8896
8888
|
" more"
|
|
8897
8889
|
]
|
|
8898
|
-
}), l.map((e) => /* @__PURE__ */ p(
|
|
8890
|
+
}), l.map((e) => /* @__PURE__ */ p(yi, {
|
|
8899
8891
|
toast: e,
|
|
8900
8892
|
defaultAnimation: n,
|
|
8901
8893
|
defaultShape: r,
|
|
@@ -8903,8 +8895,8 @@ function bi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8903
8895
|
}, e.id))]
|
|
8904
8896
|
});
|
|
8905
8897
|
}
|
|
8906
|
-
function
|
|
8907
|
-
let i =
|
|
8898
|
+
function yi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
8899
|
+
let i = fi[e.variant] ?? fi.success, a = hi.has(e.animation) ? e.animation : t, o = gi.has(e.shape) ? e.shape : n, s = _i.has(e.surface) ? e.surface : r, c = (a !== "rise" && hi.has(a) ? ` wui-toast--anim-${a}` : "") + (o !== "rounded" && gi.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 = () => ui(e.id), b = (e) => {
|
|
8908
8900
|
e.button !== 0 || e.target.closest("button") || (v.current = e.clientX, _(!0), e.currentTarget.setPointerCapture?.(e.pointerId));
|
|
8909
8901
|
}, x = (e) => {
|
|
8910
8902
|
v.current !== null && h(e.clientX - v.current);
|
|
@@ -8913,7 +8905,7 @@ function xi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8913
8905
|
}, C = (e) => {
|
|
8914
8906
|
if (v.current === null) return;
|
|
8915
8907
|
let t = e.clientX - v.current;
|
|
8916
|
-
if (Math.abs(t) >
|
|
8908
|
+
if (Math.abs(t) > mi) {
|
|
8917
8909
|
y();
|
|
8918
8910
|
return;
|
|
8919
8911
|
}
|
|
@@ -8996,7 +8988,7 @@ function xi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8996
8988
|
}
|
|
8997
8989
|
//#endregion
|
|
8998
8990
|
//#region src/components/AppToolbar.jsx
|
|
8999
|
-
function
|
|
8991
|
+
function bi({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
9000
8992
|
N("AppToolbar", u);
|
|
9001
8993
|
let f = s(), h = o || f, [g, _] = d(r), v = n === void 0 ? g : n;
|
|
9002
8994
|
return /* @__PURE__ */ m("div", {
|
|
@@ -9054,7 +9046,7 @@ function Si({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9054
9046
|
}
|
|
9055
9047
|
//#endregion
|
|
9056
9048
|
//#region src/components/AppWizard.jsx
|
|
9057
|
-
var
|
|
9049
|
+
var xi = 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) {
|
|
9058
9050
|
N("AppWizard", E);
|
|
9059
9051
|
let O = u(null), k = (e) => {
|
|
9060
9052
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -9109,7 +9101,7 @@ var Ci = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
9109
9101
|
});
|
|
9110
9102
|
//#endregion
|
|
9111
9103
|
//#region src/components/AppWorkspaceSwitcher.jsx
|
|
9112
|
-
function
|
|
9104
|
+
function Si({ 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 }) {
|
|
9113
9105
|
let { onToggle: x, ...S } = y;
|
|
9114
9106
|
N("AppWorkspaceSwitcher", S);
|
|
9115
9107
|
let [C, w] = d(""), [T, E] = d(!1), D = u(null), O = e.find((e) => e.id === t) ?? e[0], k = l(() => {
|
|
@@ -9137,7 +9129,7 @@ function wi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9137
9129
|
},
|
|
9138
9130
|
...S,
|
|
9139
9131
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
9140
|
-
as:
|
|
9132
|
+
as: Ei,
|
|
9141
9133
|
compact: g,
|
|
9142
9134
|
tenant: O,
|
|
9143
9135
|
"aria-label": j
|
|
@@ -9172,7 +9164,7 @@ function wi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9172
9164
|
className: `workspace-switcher-option${e.id === O?.id ? " is-active" : ""}`,
|
|
9173
9165
|
onClick: () => n?.(e),
|
|
9174
9166
|
children: [
|
|
9175
|
-
/* @__PURE__ */ p(
|
|
9167
|
+
/* @__PURE__ */ p(wi, { tenant: e }),
|
|
9176
9168
|
/* @__PURE__ */ p("span", {
|
|
9177
9169
|
className: "workspace-switcher-option-name",
|
|
9178
9170
|
children: e.name
|
|
@@ -9204,17 +9196,17 @@ function wi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9204
9196
|
}) : null,
|
|
9205
9197
|
i ? /* @__PURE__ */ p("div", {
|
|
9206
9198
|
className: "workspace-switcher-footer",
|
|
9207
|
-
children:
|
|
9199
|
+
children: Ti(i, a)
|
|
9208
9200
|
}) : null
|
|
9209
9201
|
]
|
|
9210
9202
|
})]
|
|
9211
9203
|
});
|
|
9212
9204
|
}
|
|
9213
|
-
function
|
|
9205
|
+
function Ci(e) {
|
|
9214
9206
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
9215
9207
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
9216
9208
|
}
|
|
9217
|
-
function
|
|
9209
|
+
function wi({ tenant: e }) {
|
|
9218
9210
|
return e?.logoUrl ? /* @__PURE__ */ p("img", {
|
|
9219
9211
|
className: "workspace-switcher-mark",
|
|
9220
9212
|
src: e.logoUrl,
|
|
@@ -9222,10 +9214,10 @@ function Ei({ tenant: e }) {
|
|
|
9222
9214
|
loading: "lazy"
|
|
9223
9215
|
}) : /* @__PURE__ */ p("span", {
|
|
9224
9216
|
className: "workspace-switcher-mark",
|
|
9225
|
-
children:
|
|
9217
|
+
children: Ci(e?.name)
|
|
9226
9218
|
});
|
|
9227
9219
|
}
|
|
9228
|
-
function
|
|
9220
|
+
function Ti(e, t) {
|
|
9229
9221
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
9230
9222
|
let { label: n, icon: r, href: i } = e;
|
|
9231
9223
|
return /* @__PURE__ */ m(i ? t ?? "a" : "button", {
|
|
@@ -9237,7 +9229,7 @@ function Di(e, t) {
|
|
|
9237
9229
|
}) : null, n]
|
|
9238
9230
|
});
|
|
9239
9231
|
}
|
|
9240
|
-
var
|
|
9232
|
+
var Ei = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
9241
9233
|
return /* @__PURE__ */ m("button", {
|
|
9242
9234
|
ref: a,
|
|
9243
9235
|
type: "button",
|
|
@@ -9245,7 +9237,7 @@ var Oi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9245
9237
|
"aria-haspopup": "true",
|
|
9246
9238
|
"aria-label": n,
|
|
9247
9239
|
...i,
|
|
9248
|
-
children: [/* @__PURE__ */ p(
|
|
9240
|
+
children: [/* @__PURE__ */ p(wi, { tenant: t }), e ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
9249
9241
|
className: "workspace-switcher-trigger-name",
|
|
9250
9242
|
children: t?.name
|
|
9251
9243
|
}), /* @__PURE__ */ p(H, {
|
|
@@ -9257,36 +9249,36 @@ var Oi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9257
9249
|
});
|
|
9258
9250
|
//#endregion
|
|
9259
9251
|
//#region src/components/toast.js
|
|
9260
|
-
function
|
|
9261
|
-
|
|
9252
|
+
function Di() {
|
|
9253
|
+
di();
|
|
9262
9254
|
}
|
|
9263
|
-
var
|
|
9255
|
+
var Oi = /* @__PURE__ */ new Set([
|
|
9264
9256
|
"success",
|
|
9265
9257
|
"info",
|
|
9266
9258
|
"warning",
|
|
9267
9259
|
"error"
|
|
9268
9260
|
]);
|
|
9269
|
-
function
|
|
9261
|
+
function ki(e, t = "info") {
|
|
9270
9262
|
let n = "info", r = {};
|
|
9271
|
-
typeof t == "string" ? n =
|
|
9263
|
+
typeof t == "string" ? n = Oi.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = Oi.has(r.variant) ? r.variant : "info"), li(e, n, r);
|
|
9272
9264
|
}
|
|
9273
|
-
function
|
|
9274
|
-
|
|
9265
|
+
function Ai(e, t = {}) {
|
|
9266
|
+
li(e, "error", t);
|
|
9275
9267
|
}
|
|
9276
|
-
|
|
9268
|
+
ki.promise = (e, t, n = {}) => {
|
|
9277
9269
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
9278
|
-
return
|
|
9270
|
+
return ki(t.loading || "Loading...", {
|
|
9279
9271
|
...n,
|
|
9280
9272
|
variant: "info",
|
|
9281
9273
|
id: r,
|
|
9282
9274
|
duration: 0
|
|
9283
|
-
}), e.then((e) => (
|
|
9275
|
+
}), e.then((e) => (ki((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
9284
9276
|
...n,
|
|
9285
9277
|
variant: "success",
|
|
9286
9278
|
id: r,
|
|
9287
9279
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
9288
9280
|
}), e)).catch((e) => {
|
|
9289
|
-
throw
|
|
9281
|
+
throw ki((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
9290
9282
|
...n,
|
|
9291
9283
|
variant: "error",
|
|
9292
9284
|
id: r,
|
|
@@ -9296,7 +9288,7 @@ ji.promise = (e, t, n = {}) => {
|
|
|
9296
9288
|
};
|
|
9297
9289
|
//#endregion
|
|
9298
9290
|
//#region src/lib/usePagination.js
|
|
9299
|
-
function
|
|
9291
|
+
function ji(e, t = 10) {
|
|
9300
9292
|
let [n, r] = d(1), [i, a] = d(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
9301
9293
|
o(() => {
|
|
9302
9294
|
n > c && r(c);
|
|
@@ -9322,4 +9314,4 @@ function Ni(e, t = 10) {
|
|
|
9322
9314
|
};
|
|
9323
9315
|
}
|
|
9324
9316
|
//#endregion
|
|
9325
|
-
export { ae as
|
|
9317
|
+
export { ae as AppAccordion, oe as AppActionIcon, le as AppAlert, he as AppAsyncBlock, Wt as AppAutocomplete, Xt as AppAvatar, $t as AppAvatarGroup, en as AppBadge, nn as AppBanner, rn as AppBreadcrumbs, W as AppButton, on as AppCallout, cn as AppCard, un as AppCheckbox, dn as AppChip, fn as AppChoiceCard, pn as AppChoiceChip, mn as AppColorField, hn as AppCompareTable, wn as AppConfirmDialog, En as AppCopyButton, In as AppDataTable, Ln as AppDatePicker, Rn as AppDateRangePicker, Bn as AppDescriptions, Un as AppDropdown, pe as AppEmptyState, Xn as AppFileAttachment, Qn as AppFilePicker, $n as AppFloatingDock, er as AppFormActions, tr as AppFormRow, nr as AppFormSection, H as AppIcon, rr as AppInfoList, Ft as AppInfoTip, gn as AppInput, cr as AppKpiTile, ur as AppLogoPicker, mr as AppMeter, xn as AppModal, hr as AppMultiSelect, gr as AppNumberInput, _r as AppOtpInput, vr as AppPageHeader, yr as AppPagination, br as AppPhoneNumberInput, Pt as AppPopover, xr as AppPricingCard, wr as AppProgress, Tr as AppRadio, Er as AppRepeater, Z as AppRequiredMark, Dr as AppResourceCard, kr as AppResult, Ar as AppScrollbar, jr as AppSearch, Mr as AppSegmented, Pr as AppSelect, jn as AppSelectMini, Fr as AppShell, Rr as AppSidebarMenu, Dn as AppSkeleton, On as AppSkeletonRows, zr as AppSlider, me as AppSpinner, Vr as AppSplash, Hr as AppStatusBadge, Ur as AppStepper, Gr as AppSwitch, Kr as AppTableEmptyState, Nn as AppTablePagination, Yr as AppTabs, Xr as AppTagInput, Zr as AppTextarea, ei as AppTimePicker, $r as AppTimeline, vi as AppToast, bi as AppToolbar, Jr as AppTooltip, xi as AppWizard, Si as AppWorkspaceSwitcher, Cn as MODAL_ICONS, Di as dismissAll, Ai as errorToast, ne as iconNames, ie as registerIcons, ki as toast, ji as usePagination };
|