@webority/ui-react 0.8.8 → 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/AppChip.d.ts +5 -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/AppWorkspaceSwitcher.d.ts +3 -2
- package/dist/types/components/warnUnknownProps.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/ui-react.js +330 -332
- 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",
|
|
@@ -4515,6 +4515,10 @@ function Pt({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
4515
4515
|
placement: i,
|
|
4516
4516
|
overlay: _,
|
|
4517
4517
|
rootClose: a === "click",
|
|
4518
|
+
delay: a === "hover" || Array.isArray(a) && a.includes("hover") ? {
|
|
4519
|
+
show: 80,
|
|
4520
|
+
hide: 220
|
|
4521
|
+
} : void 0,
|
|
4518
4522
|
onToggle: g,
|
|
4519
4523
|
children: E
|
|
4520
4524
|
});
|
|
@@ -4547,7 +4551,7 @@ function Ft({ label: e, children: t, placement: n = "auto", className: r = "", .
|
|
|
4547
4551
|
});
|
|
4548
4552
|
}
|
|
4549
4553
|
//#endregion
|
|
4550
|
-
//#region src/components/
|
|
4554
|
+
//#region src/components/AppRequiredMark.jsx
|
|
4551
4555
|
function Z() {
|
|
4552
4556
|
return /* @__PURE__ */ p("span", {
|
|
4553
4557
|
className: "required",
|
|
@@ -4855,20 +4859,12 @@ function $t({ children: e, size: t, spacing: n = "normal", overflow: r, classNam
|
|
|
4855
4859
|
});
|
|
4856
4860
|
}
|
|
4857
4861
|
//#endregion
|
|
4858
|
-
//#region src/components/normalizeTone.js
|
|
4859
|
-
var en = { warn: "warning" };
|
|
4860
|
-
function tn(e) {
|
|
4861
|
-
return e && (en[e] || e);
|
|
4862
|
-
}
|
|
4863
|
-
//#endregion
|
|
4864
4862
|
//#region src/components/AppBadge.jsx
|
|
4865
|
-
function
|
|
4866
|
-
N("AppBadge", i)
|
|
4867
|
-
let a = tn(t);
|
|
4868
|
-
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, {
|
|
4869
4865
|
bg: !1,
|
|
4870
4866
|
className: [
|
|
4871
|
-
|
|
4867
|
+
t && t !== "neutral" ? `badge-${t}` : "",
|
|
4872
4868
|
n ? "badge-dot" : "",
|
|
4873
4869
|
r
|
|
4874
4870
|
].filter(Boolean).join(" ") || void 0,
|
|
@@ -4878,22 +4874,22 @@ function nn({ children: e, tone: t, dot: n = !1, className: r = "", ...i }) {
|
|
|
4878
4874
|
}
|
|
4879
4875
|
//#endregion
|
|
4880
4876
|
//#region src/components/AppBanner.jsx
|
|
4881
|
-
var
|
|
4877
|
+
var tn = [
|
|
4882
4878
|
"info",
|
|
4883
4879
|
"success",
|
|
4884
4880
|
"warning",
|
|
4885
4881
|
"danger",
|
|
4886
4882
|
"neutral"
|
|
4887
4883
|
];
|
|
4888
|
-
function
|
|
4884
|
+
function nn({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDismiss: i, className: a = "", ...o }) {
|
|
4889
4885
|
N("AppBanner", o);
|
|
4890
4886
|
let [s, c] = d(!0);
|
|
4891
4887
|
if (!s) return null;
|
|
4892
|
-
let l = tn
|
|
4888
|
+
let l = tn.includes(e) ? e : "info", u = () => {
|
|
4893
4889
|
c(!1), i?.();
|
|
4894
4890
|
};
|
|
4895
4891
|
return /* @__PURE__ */ m("div", {
|
|
4896
|
-
className: `wui-banner wui-banner-${
|
|
4892
|
+
className: `wui-banner wui-banner-${l}${a ? ` ${a}` : ""}`,
|
|
4897
4893
|
role: "status",
|
|
4898
4894
|
...o,
|
|
4899
4895
|
children: [
|
|
@@ -4909,7 +4905,7 @@ function an({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4909
4905
|
type: "button",
|
|
4910
4906
|
className: "wui-banner-dismiss",
|
|
4911
4907
|
"aria-label": "Dismiss",
|
|
4912
|
-
onClick:
|
|
4908
|
+
onClick: u,
|
|
4913
4909
|
children: /* @__PURE__ */ p(H, {
|
|
4914
4910
|
name: "x",
|
|
4915
4911
|
size: 18
|
|
@@ -4920,7 +4916,7 @@ function an({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
4920
4916
|
}
|
|
4921
4917
|
//#endregion
|
|
4922
4918
|
//#region src/components/AppBreadcrumbs.jsx
|
|
4923
|
-
function
|
|
4919
|
+
function rn({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
4924
4920
|
return N("AppBreadcrumbs", r), /* @__PURE__ */ p(_, {
|
|
4925
4921
|
className: n || void 0,
|
|
4926
4922
|
...r,
|
|
@@ -4939,17 +4935,17 @@ function on({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
4939
4935
|
}
|
|
4940
4936
|
//#endregion
|
|
4941
4937
|
//#region src/components/AppCallout.jsx
|
|
4942
|
-
var
|
|
4938
|
+
var an = {
|
|
4943
4939
|
info: "info",
|
|
4944
4940
|
success: "check",
|
|
4945
4941
|
warning: "alert-triangle",
|
|
4946
4942
|
danger: "x"
|
|
4947
4943
|
};
|
|
4948
|
-
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 }) {
|
|
4949
4945
|
N("AppCallout", h);
|
|
4950
4946
|
let [g, _] = d(!0);
|
|
4951
4947
|
if (!g) return null;
|
|
4952
|
-
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;
|
|
4953
4949
|
return /* @__PURE__ */ m("div", {
|
|
4954
4950
|
className: [
|
|
4955
4951
|
"info-callout",
|
|
@@ -4999,13 +4995,13 @@ function cn({ children: e, tone: t = "info", title: n, icon: r, image: i, imageA
|
|
|
4999
4995
|
}
|
|
5000
4996
|
//#endregion
|
|
5001
4997
|
//#region src/components/AppCard.jsx
|
|
5002
|
-
var
|
|
4998
|
+
var sn = {
|
|
5003
4999
|
xs: 320,
|
|
5004
5000
|
sm: 420,
|
|
5005
5001
|
md: 560,
|
|
5006
5002
|
lg: 720
|
|
5007
5003
|
};
|
|
5008
|
-
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 }) {
|
|
5009
5005
|
N("AppCard", E);
|
|
5010
5006
|
let { style: D, ...O } = E, k = C != null || w != null, A = [
|
|
5011
5007
|
u && u !== "default" ? `card-${u}` : "",
|
|
@@ -5015,7 +5011,7 @@ function un({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5015
5011
|
g == null ? "" : "card-constrained",
|
|
5016
5012
|
k ? "card-clickable" : "",
|
|
5017
5013
|
_
|
|
5018
|
-
].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 ? {
|
|
5019
5015
|
"--card-max-width": j,
|
|
5020
5016
|
...D
|
|
5021
5017
|
} : D, P = {};
|
|
@@ -5086,7 +5082,7 @@ function un({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
5086
5082
|
}
|
|
5087
5083
|
//#endregion
|
|
5088
5084
|
//#region src/lib/CheckField.jsx
|
|
5089
|
-
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) {
|
|
5090
5086
|
let d = s(), f = t || d;
|
|
5091
5087
|
return /* @__PURE__ */ m("div", {
|
|
5092
5088
|
className: `${l}${a ? ` ${a}` : ""}`,
|
|
@@ -5114,8 +5110,8 @@ var dn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5114
5110
|
}) : null
|
|
5115
5111
|
]
|
|
5116
5112
|
});
|
|
5117
|
-
}),
|
|
5118
|
-
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, {
|
|
5119
5115
|
ref: s,
|
|
5120
5116
|
label: e,
|
|
5121
5117
|
id: t,
|
|
@@ -5130,60 +5126,61 @@ var dn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
5130
5126
|
});
|
|
5131
5127
|
//#endregion
|
|
5132
5128
|
//#region src/components/AppChip.jsx
|
|
5133
|
-
function
|
|
5134
|
-
N("AppChip",
|
|
5135
|
-
let
|
|
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 }) {
|
|
5130
|
+
N("AppChip", h);
|
|
5131
|
+
let g = e ?? t, _ = [
|
|
5136
5132
|
"chip",
|
|
5137
|
-
|
|
5138
|
-
r === "
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5133
|
+
n && n !== "neutral" ? n : "",
|
|
5134
|
+
r === "outline" ? "chip-outline" : r === "solid" ? "chip-solid" : "",
|
|
5135
|
+
i === "sm" ? "chip-sm" : "",
|
|
5136
|
+
c ? "chip-clickable" : "",
|
|
5137
|
+
s ? "chip-removable" : "",
|
|
5138
|
+
l ? "is-disabled" : "",
|
|
5139
|
+
d
|
|
5140
|
+
].filter(Boolean).join(" "), v = o ? /* @__PURE__ */ p("span", {
|
|
5144
5141
|
className: "chip-avatar",
|
|
5145
|
-
children: typeof
|
|
5146
|
-
src:
|
|
5142
|
+
children: typeof o == "string" ? /* @__PURE__ */ p("img", {
|
|
5143
|
+
src: o,
|
|
5147
5144
|
alt: ""
|
|
5148
|
-
}) :
|
|
5149
|
-
}) :
|
|
5145
|
+
}) : o
|
|
5146
|
+
}) : a ? /* @__PURE__ */ p("span", {
|
|
5150
5147
|
className: "chip-ic",
|
|
5151
5148
|
children: /* @__PURE__ */ p(H, {
|
|
5152
|
-
name:
|
|
5153
|
-
size:
|
|
5149
|
+
name: a,
|
|
5150
|
+
size: i === "sm" ? 12 : 14
|
|
5154
5151
|
})
|
|
5155
|
-
}) : null, y =
|
|
5152
|
+
}) : null, y = c ? /* @__PURE__ */ m("button", {
|
|
5156
5153
|
type: "button",
|
|
5157
5154
|
className: "chip-body",
|
|
5158
|
-
onClick:
|
|
5159
|
-
disabled:
|
|
5155
|
+
onClick: c,
|
|
5156
|
+
disabled: l,
|
|
5160
5157
|
children: [v, /* @__PURE__ */ p("span", {
|
|
5161
5158
|
className: "chip-label",
|
|
5162
|
-
children:
|
|
5159
|
+
children: g
|
|
5163
5160
|
})]
|
|
5164
5161
|
}) : /* @__PURE__ */ m(f, { children: [v, /* @__PURE__ */ p("span", {
|
|
5165
5162
|
className: "chip-label",
|
|
5166
|
-
children:
|
|
5163
|
+
children: g
|
|
5167
5164
|
})] });
|
|
5168
5165
|
return /* @__PURE__ */ m("span", {
|
|
5169
5166
|
className: _,
|
|
5170
|
-
...
|
|
5171
|
-
children: [y,
|
|
5167
|
+
...h,
|
|
5168
|
+
children: [y, s && /* @__PURE__ */ p("button", {
|
|
5172
5169
|
type: "button",
|
|
5173
5170
|
className: "chip-remove",
|
|
5174
|
-
onClick:
|
|
5175
|
-
disabled:
|
|
5176
|
-
"aria-label":
|
|
5171
|
+
onClick: s,
|
|
5172
|
+
disabled: l,
|
|
5173
|
+
"aria-label": u || (typeof g == "string" ? `Remove ${g}` : "Remove"),
|
|
5177
5174
|
children: /* @__PURE__ */ p(H, {
|
|
5178
5175
|
name: "x",
|
|
5179
|
-
size:
|
|
5176
|
+
size: i === "sm" ? 12 : 14
|
|
5180
5177
|
})
|
|
5181
5178
|
})]
|
|
5182
5179
|
});
|
|
5183
5180
|
}
|
|
5184
5181
|
//#endregion
|
|
5185
5182
|
//#region src/components/AppChoiceCard.jsx
|
|
5186
|
-
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 }) {
|
|
5187
5184
|
return N("AppChoiceCard", y), /* @__PURE__ */ m("label", {
|
|
5188
5185
|
className: `struct-card${c ? " struct-card-img-card" : ""}${r ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
5189
5186
|
...y,
|
|
@@ -5232,7 +5229,7 @@ function mn({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
5232
5229
|
}
|
|
5233
5230
|
//#endregion
|
|
5234
5231
|
//#region src/components/AppChoiceChip.jsx
|
|
5235
|
-
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 }) {
|
|
5236
5233
|
return N("AppChoiceChip", u), /* @__PURE__ */ m("label", {
|
|
5237
5234
|
className: `choice-chip${i ? " checked" : ""}${c === "sm" ? " choice-chip-sm" : c === "lg" ? " choice-chip-lg" : ""}${l ? ` ${l}` : ""}`,
|
|
5238
5235
|
...u,
|
|
@@ -5254,7 +5251,7 @@ function hn({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChang
|
|
|
5254
5251
|
}
|
|
5255
5252
|
//#endregion
|
|
5256
5253
|
//#region src/components/AppColorField.jsx
|
|
5257
|
-
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 }) {
|
|
5258
5255
|
N("AppColorField", f);
|
|
5259
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" : "";
|
|
5260
5257
|
return /* @__PURE__ */ m("div", {
|
|
@@ -5303,7 +5300,7 @@ function gn({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
5303
5300
|
}
|
|
5304
5301
|
//#endregion
|
|
5305
5302
|
//#region src/components/AppCompareTable.jsx
|
|
5306
|
-
function
|
|
5303
|
+
function hn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i }) {
|
|
5307
5304
|
N("AppCompareTable", i);
|
|
5308
5305
|
let a = (e) => e === !0 ? /* @__PURE__ */ p("span", {
|
|
5309
5306
|
className: "compare-yes",
|
|
@@ -5340,19 +5337,19 @@ function _n({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
5340
5337
|
}
|
|
5341
5338
|
//#endregion
|
|
5342
5339
|
//#region src/components/AppInput.jsx
|
|
5343
|
-
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) {
|
|
5344
5341
|
N("AppInput", M);
|
|
5345
5342
|
let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c, B = u(null), V = (e) => {
|
|
5346
5343
|
B.current = e, typeof P == "function" ? P(e) : P && (P.current = e);
|
|
5347
|
-
}, 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;
|
|
5348
5345
|
o(() => {
|
|
5349
5346
|
if (!oe || M.value === void 0) return;
|
|
5350
5347
|
let e = String(M.value ?? "");
|
|
5351
|
-
re(!!e),
|
|
5348
|
+
re(!!e), ae(e.length);
|
|
5352
5349
|
}, [M.value, oe]);
|
|
5353
5350
|
let se = (e) => {
|
|
5354
|
-
re(!!e.target.value),
|
|
5355
|
-
}, ce =
|
|
5351
|
+
re(!!e.target.value), ae(e.target.value.length), M.onInput?.(e);
|
|
5352
|
+
}, ce = U ? /* @__PURE__ */ p("button", {
|
|
5356
5353
|
type: "button",
|
|
5357
5354
|
className: "input-clear",
|
|
5358
5355
|
onClick: () => {
|
|
@@ -5375,7 +5372,7 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5375
5372
|
n ? "error" : "",
|
|
5376
5373
|
z ? "pw" : "",
|
|
5377
5374
|
v ? "num-input" : "",
|
|
5378
|
-
!(A && e || O || k || v || z || h) && T &&
|
|
5375
|
+
!(A && e || O || k || v || z || h) && T && U ? "has-clear" : "",
|
|
5379
5376
|
j === "bare" ? "input-bare" : "",
|
|
5380
5377
|
S
|
|
5381
5378
|
].filter(Boolean).join(" "), W = /* @__PURE__ */ p(x.Control, {
|
|
@@ -5509,34 +5506,34 @@ var vn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
5509
5506
|
})
|
|
5510
5507
|
]
|
|
5511
5508
|
});
|
|
5512
|
-
}),
|
|
5509
|
+
}), _n = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", vn = {
|
|
5513
5510
|
sm: 380,
|
|
5514
5511
|
md: 440,
|
|
5515
5512
|
lg: 640,
|
|
5516
5513
|
xl: 880
|
|
5517
|
-
},
|
|
5518
|
-
function
|
|
5514
|
+
}, yn = !1;
|
|
5515
|
+
function bn() {
|
|
5519
5516
|
let e = !0;
|
|
5520
5517
|
try {
|
|
5521
5518
|
e = process.env.NODE_ENV !== "production";
|
|
5522
5519
|
} catch {
|
|
5523
5520
|
e = !0;
|
|
5524
5521
|
}
|
|
5525
|
-
!e ||
|
|
5522
|
+
!e || yn || (yn = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
5526
5523
|
}
|
|
5527
|
-
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 }) {
|
|
5528
5525
|
N("AppModal", b);
|
|
5529
5526
|
let { style: x, ...C } = b;
|
|
5530
|
-
h && !_ && typeof n != "string" &&
|
|
5527
|
+
h && !_ && typeof n != "string" && bn();
|
|
5531
5528
|
let w = u(null);
|
|
5532
5529
|
o(() => {
|
|
5533
5530
|
if (!e) return;
|
|
5534
5531
|
let t = w.current?.closest(".modal-content");
|
|
5535
5532
|
if (!t) return;
|
|
5536
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
5533
|
+
let n = () => Array.from(t.querySelectorAll(_n));
|
|
5537
5534
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
5538
5535
|
}, [e]);
|
|
5539
|
-
let T = typeof d == "number" ? d :
|
|
5536
|
+
let T = typeof d == "number" ? d : vn[d] ?? vn.md, E = [
|
|
5540
5537
|
"wui-modal",
|
|
5541
5538
|
a === "default" ? "" : `tone-${a}`,
|
|
5542
5539
|
v
|
|
@@ -5621,30 +5618,30 @@ function Cn({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
5621
5618
|
}
|
|
5622
5619
|
//#endregion
|
|
5623
5620
|
//#region src/components/ModalIcons.jsx
|
|
5624
|
-
var
|
|
5621
|
+
var Sn = (e) => function({ size: t = 72 }) {
|
|
5625
5622
|
return /* @__PURE__ */ p("wui-status-icon", {
|
|
5626
5623
|
tone: e,
|
|
5627
5624
|
size: t
|
|
5628
5625
|
});
|
|
5629
|
-
},
|
|
5630
|
-
success:
|
|
5631
|
-
error:
|
|
5632
|
-
warning:
|
|
5633
|
-
info:
|
|
5634
|
-
delete:
|
|
5626
|
+
}, Cn = {
|
|
5627
|
+
success: Sn("success"),
|
|
5628
|
+
error: Sn("error"),
|
|
5629
|
+
warning: Sn("warning"),
|
|
5630
|
+
info: Sn("info"),
|
|
5631
|
+
delete: Sn("delete")
|
|
5635
5632
|
};
|
|
5636
5633
|
//#endregion
|
|
5637
5634
|
//#region src/components/AppConfirmDialog.jsx
|
|
5638
|
-
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 }) {
|
|
5639
5636
|
N("AppConfirmDialog", y);
|
|
5640
5637
|
let [b, x] = d("");
|
|
5641
5638
|
if (o(() => {
|
|
5642
5639
|
e || x("");
|
|
5643
5640
|
}, [e]), !e) return null;
|
|
5644
|
-
let S = !!c && b.trim() !== c, C =
|
|
5641
|
+
let S = !!c && b.trim() !== c, C = Cn[s || (a ? "delete" : "info")], w = () => {
|
|
5645
5642
|
h || u?.();
|
|
5646
5643
|
};
|
|
5647
|
-
return /* @__PURE__ */ p(
|
|
5644
|
+
return /* @__PURE__ */ p(xn, {
|
|
5648
5645
|
...y,
|
|
5649
5646
|
open: e,
|
|
5650
5647
|
hideHeader: !0,
|
|
@@ -5685,7 +5682,7 @@ function En({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5685
5682
|
className: "wui-confirm-msg",
|
|
5686
5683
|
children: n
|
|
5687
5684
|
}),
|
|
5688
|
-
c && /* @__PURE__ */ p(
|
|
5685
|
+
c && /* @__PURE__ */ p(gn, {
|
|
5689
5686
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
5690
5687
|
label: /* @__PURE__ */ m(f, { children: [
|
|
5691
5688
|
"Type ",
|
|
@@ -5703,12 +5700,12 @@ function En({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
5703
5700
|
}
|
|
5704
5701
|
//#endregion
|
|
5705
5702
|
//#region src/components/AppCopyButton.jsx
|
|
5706
|
-
var
|
|
5703
|
+
var Tn = {
|
|
5707
5704
|
sm: 14,
|
|
5708
5705
|
md: 16,
|
|
5709
5706
|
lg: 20
|
|
5710
5707
|
};
|
|
5711
|
-
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 }) {
|
|
5712
5709
|
N("AppCopyButton", l);
|
|
5713
5710
|
let [u, f] = d(!1), m = a(async () => {
|
|
5714
5711
|
try {
|
|
@@ -5724,10 +5721,10 @@ function On({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5724
5721
|
document.body.removeChild(t), n && (f(!0), s?.(), setTimeout(() => f(!1), 2e3));
|
|
5725
5722
|
} catch {}
|
|
5726
5723
|
}, [e, s]), h = u ? n : t, g = u ? "check" : "files";
|
|
5727
|
-
return r ? /* @__PURE__ */ p(
|
|
5724
|
+
return r ? /* @__PURE__ */ p(oe, {
|
|
5728
5725
|
icon: g,
|
|
5729
5726
|
label: h,
|
|
5730
|
-
size:
|
|
5727
|
+
size: Tn[i] ?? Tn.md,
|
|
5731
5728
|
onClick: m,
|
|
5732
5729
|
className: c,
|
|
5733
5730
|
...l
|
|
@@ -5744,7 +5741,7 @@ function On({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
5744
5741
|
}
|
|
5745
5742
|
//#endregion
|
|
5746
5743
|
//#region src/components/AppSkeleton.jsx
|
|
5747
|
-
function
|
|
5744
|
+
function Dn({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "", style: i, ...a }) {
|
|
5748
5745
|
return N("AppSkeleton", a), /* @__PURE__ */ p("span", {
|
|
5749
5746
|
className: `skeleton${r ? ` ${r}` : ""}`,
|
|
5750
5747
|
"aria-hidden": "true",
|
|
@@ -5757,28 +5754,28 @@ function kn({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "
|
|
|
5757
5754
|
...a
|
|
5758
5755
|
});
|
|
5759
5756
|
}
|
|
5760
|
-
function
|
|
5761
|
-
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, {
|
|
5762
5759
|
width: t === 0 ? "70%" : "50%",
|
|
5763
5760
|
height: 12
|
|
5764
5761
|
}) }, `col-${t}`)) }, `row-${n}`));
|
|
5765
5762
|
}
|
|
5766
5763
|
//#endregion
|
|
5767
5764
|
//#region src/lib/pageWindow.js
|
|
5768
|
-
var
|
|
5765
|
+
var kn = (e, t) => {
|
|
5769
5766
|
let n = [];
|
|
5770
5767
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
5771
5768
|
return n;
|
|
5772
5769
|
};
|
|
5773
|
-
function
|
|
5770
|
+
function An(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
5774
5771
|
let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
|
|
5775
|
-
if (i <= n * 2 + 3 + r * 2) return
|
|
5776
|
-
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 =
|
|
5777
|
-
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;
|
|
5778
5775
|
}
|
|
5779
5776
|
//#endregion
|
|
5780
5777
|
//#region src/components/AppSelectMini.jsx
|
|
5781
|
-
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 }) {
|
|
5782
5779
|
N("AppSelectMini", m);
|
|
5783
5780
|
let { setRef: h, innerRef: g } = Q({
|
|
5784
5781
|
value: e ?? "",
|
|
@@ -5815,22 +5812,22 @@ function Nn({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
5815
5812
|
}
|
|
5816
5813
|
//#endregion
|
|
5817
5814
|
//#region src/components/AppTablePagination.jsx
|
|
5818
|
-
var
|
|
5815
|
+
var Mn = [
|
|
5819
5816
|
5,
|
|
5820
5817
|
10,
|
|
5821
5818
|
25,
|
|
5822
5819
|
50
|
|
5823
5820
|
];
|
|
5824
|
-
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 }) {
|
|
5825
5822
|
N("AppTablePagination", f);
|
|
5826
|
-
let h = l === "numbered", g = h ?
|
|
5823
|
+
let h = l === "numbered", g = h ? An(e, t) : null;
|
|
5827
5824
|
return /* @__PURE__ */ m("div", {
|
|
5828
5825
|
className: `table-pagination${d ? ` ${d}` : ""}`,
|
|
5829
5826
|
...f,
|
|
5830
5827
|
children: [
|
|
5831
5828
|
u && /* @__PURE__ */ m("span", {
|
|
5832
5829
|
className: "tpg-rows",
|
|
5833
|
-
children: ["Rows per page:", /* @__PURE__ */ p(
|
|
5830
|
+
children: ["Rows per page:", /* @__PURE__ */ p(jn, {
|
|
5834
5831
|
value: n,
|
|
5835
5832
|
onChange: (e) => s(Number(e)),
|
|
5836
5833
|
ariaLabel: "Rows per page",
|
|
@@ -5894,13 +5891,13 @@ function Fn({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
5894
5891
|
}
|
|
5895
5892
|
//#endregion
|
|
5896
5893
|
//#region src/components/AppDataTable.jsx
|
|
5897
|
-
function
|
|
5894
|
+
function Pn(e) {
|
|
5898
5895
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
5899
5896
|
}
|
|
5900
|
-
function
|
|
5897
|
+
function Fn(e) {
|
|
5901
5898
|
return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
|
|
5902
5899
|
}
|
|
5903
|
-
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 }) {
|
|
5904
5901
|
N("AppDataTable", E);
|
|
5905
5902
|
let D = typeof T == "function", [O, k] = d(() => /* @__PURE__ */ new Set()), A = (e) => k((t) => {
|
|
5906
5903
|
let n = new Set(t);
|
|
@@ -5936,7 +5933,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5936
5933
|
e.map((e, t) => {
|
|
5937
5934
|
let n = !!(e.sortable && a), r = i && i.key === e.key;
|
|
5938
5935
|
return /* @__PURE__ */ m("th", {
|
|
5939
|
-
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") +
|
|
5936
|
+
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") + Pn(e.align),
|
|
5940
5937
|
style: e.width ? { width: e.width } : void 0,
|
|
5941
5938
|
tabIndex: n ? 0 : void 0,
|
|
5942
5939
|
"aria-sort": r ? i.dir === "asc" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
@@ -5963,7 +5960,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5963
5960
|
children: "Actions"
|
|
5964
5961
|
})
|
|
5965
5962
|
}))
|
|
5966
|
-
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(
|
|
5963
|
+
] }) }), /* @__PURE__ */ p("tbody", { children: o ? /* @__PURE__ */ p(On, {
|
|
5967
5964
|
rows: s,
|
|
5968
5965
|
cols: j
|
|
5969
5966
|
}) : n?.length ? n.map((n, i) => {
|
|
@@ -5997,9 +5994,9 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
5997
5994
|
})
|
|
5998
5995
|
}),
|
|
5999
5996
|
e.map((e, t) => /* @__PURE__ */ p("td", {
|
|
6000
|
-
className: (t === 0 ? "wui-name-cell " : "") +
|
|
5997
|
+
className: (t === 0 ? "wui-name-cell " : "") + Pn(e.align) + (e.cellClassName ? ` ${e.cellClassName}` : ""),
|
|
6001
5998
|
style: e.cellStyle,
|
|
6002
|
-
children: e.render ? e.render(n) :
|
|
5999
|
+
children: e.render ? e.render(n) : Fn(n[e.key])
|
|
6003
6000
|
}, e.key)),
|
|
6004
6001
|
h && /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p("div", {
|
|
6005
6002
|
className: "u-row-actions",
|
|
@@ -6020,7 +6017,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6020
6017
|
children: L
|
|
6021
6018
|
}) }) })]
|
|
6022
6019
|
})
|
|
6023
|
-
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(
|
|
6020
|
+
}), _ && !o && _.total > 0 && /* @__PURE__ */ p(Nn, {
|
|
6024
6021
|
page: _.page,
|
|
6025
6022
|
totalPages: _.totalPages,
|
|
6026
6023
|
pageSize: _.pageSize,
|
|
@@ -6033,7 +6030,7 @@ function Rn({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6033
6030
|
}
|
|
6034
6031
|
//#endregion
|
|
6035
6032
|
//#region src/components/AppDatePicker.jsx
|
|
6036
|
-
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) {
|
|
6037
6034
|
N("AppDatePicker", y);
|
|
6038
6035
|
let x = s(), S = g || o || x, { setRef: C } = Q({
|
|
6039
6036
|
ref: b,
|
|
@@ -6077,7 +6074,7 @@ var zn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6077
6074
|
})
|
|
6078
6075
|
]
|
|
6079
6076
|
});
|
|
6080
|
-
}),
|
|
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) {
|
|
6081
6078
|
N("AppDateRangePicker", S);
|
|
6082
6079
|
let w = s(), T = y || l || w, { setRef: E, innerRef: D } = Q({
|
|
6083
6080
|
ref: C,
|
|
@@ -6138,12 +6135,12 @@ var zn = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
6138
6135
|
});
|
|
6139
6136
|
//#endregion
|
|
6140
6137
|
//#region src/lib/emptyValue.js
|
|
6141
|
-
function
|
|
6138
|
+
function zn(e) {
|
|
6142
6139
|
return e == null || e === "";
|
|
6143
6140
|
}
|
|
6144
6141
|
//#endregion
|
|
6145
6142
|
//#region src/components/AppDescriptions.jsx
|
|
6146
|
-
function
|
|
6143
|
+
function Bn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
6147
6144
|
return N("AppDescriptions", o), /* @__PURE__ */ m("div", {
|
|
6148
6145
|
className: [
|
|
6149
6146
|
"descs",
|
|
@@ -6159,7 +6156,7 @@ function Hn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6159
6156
|
}), /* @__PURE__ */ p("dl", {
|
|
6160
6157
|
className: "descs-list",
|
|
6161
6158
|
children: e.map((e, t) => {
|
|
6162
|
-
let n =
|
|
6159
|
+
let n = zn(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
6163
6160
|
return /* @__PURE__ */ m("div", {
|
|
6164
6161
|
className: "descs-item",
|
|
6165
6162
|
style: { "--descs-span": r },
|
|
@@ -6177,24 +6174,24 @@ function Hn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
6177
6174
|
}
|
|
6178
6175
|
//#endregion
|
|
6179
6176
|
//#region src/components/AppDropdown.jsx
|
|
6180
|
-
var
|
|
6181
|
-
function
|
|
6177
|
+
var Vn = !1;
|
|
6178
|
+
function Hn() {
|
|
6182
6179
|
let e = !0;
|
|
6183
6180
|
try {
|
|
6184
6181
|
e = process.env.NODE_ENV !== "production";
|
|
6185
6182
|
} catch {
|
|
6186
6183
|
e = !0;
|
|
6187
6184
|
}
|
|
6188
|
-
!e ||
|
|
6185
|
+
!e || Vn || (Vn = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
6189
6186
|
}
|
|
6190
|
-
function
|
|
6191
|
-
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();
|
|
6192
6189
|
let f = n ?? (u ? "wui-dropdown-trigger" : "topbar-icon-btn");
|
|
6193
6190
|
return /* @__PURE__ */ m(b, {
|
|
6194
6191
|
align: a,
|
|
6195
6192
|
...d,
|
|
6196
6193
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
6197
|
-
as:
|
|
6194
|
+
as: Wn,
|
|
6198
6195
|
icon: e,
|
|
6199
6196
|
iconSize: t,
|
|
6200
6197
|
btnClassName: f,
|
|
@@ -6229,7 +6226,7 @@ function Gn({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
6229
6226
|
})]
|
|
6230
6227
|
});
|
|
6231
6228
|
}
|
|
6232
|
-
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) {
|
|
6233
6230
|
return /* @__PURE__ */ p("button", {
|
|
6234
6231
|
ref: s,
|
|
6235
6232
|
type: "button",
|
|
@@ -6244,16 +6241,16 @@ var Kn = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
6244
6241
|
});
|
|
6245
6242
|
//#endregion
|
|
6246
6243
|
//#region src/lib/fileItem.js
|
|
6247
|
-
function
|
|
6244
|
+
function Gn(e) {
|
|
6248
6245
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
6249
6246
|
}
|
|
6250
|
-
function
|
|
6247
|
+
function Kn(e) {
|
|
6251
6248
|
return e instanceof File ? e.name : e?.name;
|
|
6252
6249
|
}
|
|
6253
|
-
function
|
|
6250
|
+
function qn(e) {
|
|
6254
6251
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
6255
6252
|
}
|
|
6256
|
-
function
|
|
6253
|
+
function Jn(e, t) {
|
|
6257
6254
|
let [n, r] = d(null);
|
|
6258
6255
|
return o(() => {
|
|
6259
6256
|
if (!t) {
|
|
@@ -6269,8 +6266,8 @@ function Xn(e, t) {
|
|
|
6269
6266
|
}
|
|
6270
6267
|
//#endregion
|
|
6271
6268
|
//#region src/lib/FileItemRow.jsx
|
|
6272
|
-
function
|
|
6273
|
-
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);
|
|
6274
6271
|
return /* @__PURE__ */ m("div", {
|
|
6275
6272
|
className: "attach-item",
|
|
6276
6273
|
children: [
|
|
@@ -6309,7 +6306,7 @@ function Zn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
6309
6306
|
}
|
|
6310
6307
|
//#endregion
|
|
6311
6308
|
//#region src/components/AppFileAttachment.jsx
|
|
6312
|
-
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 }) {
|
|
6313
6310
|
N("AppFileAttachment", h);
|
|
6314
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]);
|
|
6315
6312
|
function w(e) {
|
|
@@ -6328,8 +6325,8 @@ function Qn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6328
6325
|
s.push(e);
|
|
6329
6326
|
}
|
|
6330
6327
|
if (y(c), s.length) if (i) {
|
|
6331
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
6332
|
-
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)))));
|
|
6333
6330
|
} else r(s[0]);
|
|
6334
6331
|
}
|
|
6335
6332
|
function T(e) {
|
|
@@ -6388,17 +6385,17 @@ function Qn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6388
6385
|
onChange: w,
|
|
6389
6386
|
...h
|
|
6390
6387
|
})] }),
|
|
6391
|
-
C ? /* @__PURE__ */ p(
|
|
6388
|
+
C ? /* @__PURE__ */ p(Zn, {
|
|
6392
6389
|
item: b[0],
|
|
6393
6390
|
isImage: !0,
|
|
6394
6391
|
onRemove: () => T(0)
|
|
6395
6392
|
}) : b.length > 0 && /* @__PURE__ */ p("div", {
|
|
6396
6393
|
className: "attach-list",
|
|
6397
|
-
children: b.map((e, t) => /* @__PURE__ */ p(
|
|
6394
|
+
children: b.map((e, t) => /* @__PURE__ */ p(Yn, {
|
|
6398
6395
|
item: e,
|
|
6399
6396
|
isImage: S(e),
|
|
6400
6397
|
onRemove: () => T(t)
|
|
6401
|
-
},
|
|
6398
|
+
}, Gn(e)))
|
|
6402
6399
|
}),
|
|
6403
6400
|
E && /* @__PURE__ */ p("div", {
|
|
6404
6401
|
className: "field-error",
|
|
@@ -6407,8 +6404,8 @@ function Qn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
6407
6404
|
]
|
|
6408
6405
|
});
|
|
6409
6406
|
}
|
|
6410
|
-
function
|
|
6411
|
-
let r =
|
|
6407
|
+
function Zn({ item: e, isImage: t, onRemove: n }) {
|
|
6408
|
+
let r = Jn(e, t), i = Kn(e), a = qn(e);
|
|
6412
6409
|
return /* @__PURE__ */ m("div", {
|
|
6413
6410
|
className: "attach-preview",
|
|
6414
6411
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -6440,7 +6437,7 @@ function $n({ item: e, isImage: t, onRemove: n }) {
|
|
|
6440
6437
|
}
|
|
6441
6438
|
//#endregion
|
|
6442
6439
|
//#region src/components/AppFilePicker.jsx
|
|
6443
|
-
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 = "", ..._ }) {
|
|
6444
6441
|
N("AppFilePicker", _);
|
|
6445
6442
|
let [v, y] = d(null), [b, x] = d(!1), [S, C] = d(""), w = u(null), T = s(), E = n || T;
|
|
6446
6443
|
o(() => {
|
|
@@ -6459,7 +6456,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6459
6456
|
}, I = (e) => {
|
|
6460
6457
|
let n = Array.from(e || []);
|
|
6461
6458
|
if (!n.length) return;
|
|
6462
|
-
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 = [];
|
|
6463
6460
|
for (let e of n) {
|
|
6464
6461
|
let t = Mt(e, {
|
|
6465
6462
|
accept: c,
|
|
@@ -6469,7 +6466,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6469
6466
|
s ||= t;
|
|
6470
6467
|
continue;
|
|
6471
6468
|
}
|
|
6472
|
-
o.has(
|
|
6469
|
+
o.has(Gn(e)) || (o.add(Gn(e)), u.push(e));
|
|
6473
6470
|
}
|
|
6474
6471
|
let d = i.concat(u);
|
|
6475
6472
|
a && d.length > a && (d = d.slice(0, a), s ||= `Up to ${a} files.`), C(s), r(d);
|
|
@@ -6602,12 +6599,12 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6602
6599
|
B,
|
|
6603
6600
|
i && D.length > 0 && /* @__PURE__ */ p("div", {
|
|
6604
6601
|
className: "attach-list",
|
|
6605
|
-
children: D.map((e, t) => /* @__PURE__ */ p(
|
|
6602
|
+
children: D.map((e, t) => /* @__PURE__ */ p(Yn, {
|
|
6606
6603
|
item: e,
|
|
6607
6604
|
isImage: e instanceof File ? Ot(e) : k || Ot(e),
|
|
6608
6605
|
noun: "file",
|
|
6609
6606
|
onRemove: () => z(t)
|
|
6610
|
-
},
|
|
6607
|
+
}, Gn(e)))
|
|
6611
6608
|
})
|
|
6612
6609
|
]
|
|
6613
6610
|
}),
|
|
@@ -6620,7 +6617,7 @@ function er({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
|
|
|
6620
6617
|
}
|
|
6621
6618
|
//#endregion
|
|
6622
6619
|
//#region src/components/AppFloatingDock.jsx
|
|
6623
|
-
function
|
|
6620
|
+
function $n({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
6624
6621
|
return N("AppFloatingDock", s), /* @__PURE__ */ p("wui-dock", {
|
|
6625
6622
|
role: "navigation",
|
|
6626
6623
|
"aria-label": n,
|
|
@@ -6662,7 +6659,7 @@ function tr({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
6662
6659
|
}
|
|
6663
6660
|
//#endregion
|
|
6664
6661
|
//#region src/components/AppFormActions.jsx
|
|
6665
|
-
function
|
|
6662
|
+
function er({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
6666
6663
|
return N("AppFormActions", i), /* @__PURE__ */ p("div", {
|
|
6667
6664
|
className: [
|
|
6668
6665
|
"form-actions",
|
|
@@ -6676,7 +6673,7 @@ function nr({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
6676
6673
|
}
|
|
6677
6674
|
//#endregion
|
|
6678
6675
|
//#region src/components/AppFormRow.jsx
|
|
6679
|
-
function
|
|
6676
|
+
function tr({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
6680
6677
|
N("AppFormRow", r);
|
|
6681
6678
|
let { style: i, ...a } = r;
|
|
6682
6679
|
return /* @__PURE__ */ p("div", {
|
|
@@ -6691,7 +6688,7 @@ function rr({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
6691
6688
|
}
|
|
6692
6689
|
//#endregion
|
|
6693
6690
|
//#region src/components/AppFormSection.jsx
|
|
6694
|
-
function
|
|
6691
|
+
function nr({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
6695
6692
|
return N("AppFormSection", i), /* @__PURE__ */ m("section", {
|
|
6696
6693
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
6697
6694
|
...i,
|
|
@@ -6712,12 +6709,12 @@ function ir({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
6712
6709
|
}
|
|
6713
6710
|
//#endregion
|
|
6714
6711
|
//#region src/components/AppInfoList.jsx
|
|
6715
|
-
function
|
|
6712
|
+
function rr({ items: e = [], className: t = "", ...n }) {
|
|
6716
6713
|
return N("AppInfoList", n), /* @__PURE__ */ p("div", {
|
|
6717
6714
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
6718
6715
|
...n,
|
|
6719
6716
|
children: e.map((e, t) => {
|
|
6720
|
-
let n =
|
|
6717
|
+
let n = zn(e.value), r = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
6721
6718
|
className: "info-icon",
|
|
6722
6719
|
children: U(e.icon, { size: 16 })
|
|
6723
6720
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -6743,23 +6740,23 @@ function ar({ items: e = [], className: t = "", ...n }) {
|
|
|
6743
6740
|
}
|
|
6744
6741
|
//#endregion
|
|
6745
6742
|
//#region src/components/AppKpiTile.jsx
|
|
6746
|
-
var
|
|
6747
|
-
function
|
|
6748
|
-
if (!e || e.length < 2) return `0,${
|
|
6749
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
6750
|
-
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(" ");
|
|
6751
6748
|
}
|
|
6752
|
-
function
|
|
6749
|
+
function sr(e) {
|
|
6753
6750
|
if (typeof e != "string") return "flat";
|
|
6754
6751
|
let t = e.trim();
|
|
6755
6752
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
6756
6753
|
}
|
|
6757
|
-
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 }) {
|
|
6758
6755
|
N("AppKpiTile", T);
|
|
6759
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 ? {
|
|
6760
6757
|
...v,
|
|
6761
6758
|
"--wui-kpi-value-size": `${u}px`
|
|
6762
|
-
} : v, O = o ??
|
|
6759
|
+
} : v, O = o ?? sr(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
6763
6760
|
return h != null && (A = g ? {
|
|
6764
6761
|
as: g,
|
|
6765
6762
|
to: h
|
|
@@ -6797,12 +6794,12 @@ function ur({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6797
6794
|
}),
|
|
6798
6795
|
s && s.length > 0 && /* @__PURE__ */ p("svg", {
|
|
6799
6796
|
className: `kpi-sparkline${w ? ` ${w}` : ""}`,
|
|
6800
|
-
width:
|
|
6801
|
-
height:
|
|
6802
|
-
viewBox: `0 0 ${
|
|
6797
|
+
width: ir,
|
|
6798
|
+
height: ar,
|
|
6799
|
+
viewBox: `0 0 ${ir} ${ar}`,
|
|
6803
6800
|
"aria-hidden": "true",
|
|
6804
6801
|
children: /* @__PURE__ */ p("polyline", {
|
|
6805
|
-
points:
|
|
6802
|
+
points: or(s),
|
|
6806
6803
|
stroke: "currentColor",
|
|
6807
6804
|
fill: "none"
|
|
6808
6805
|
})
|
|
@@ -6812,12 +6809,12 @@ function ur({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
6812
6809
|
}
|
|
6813
6810
|
//#endregion
|
|
6814
6811
|
//#region src/components/AppLogoPicker.jsx
|
|
6815
|
-
var
|
|
6812
|
+
var lr = {
|
|
6816
6813
|
sm: 72,
|
|
6817
6814
|
md: 120,
|
|
6818
6815
|
lg: 160
|
|
6819
6816
|
};
|
|
6820
|
-
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 }) {
|
|
6821
6818
|
N("AppLogoPicker", k);
|
|
6822
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);
|
|
6823
6820
|
o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
|
|
@@ -6825,7 +6822,7 @@ function fr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6825
6822
|
}, [e]);
|
|
6826
6823
|
let V = a || c, te = P || (e && !R ? e : null), ne = b || I, re = !V && (!!P || !!te && !!i), ie = () => {
|
|
6827
6824
|
V || A.current?.click();
|
|
6828
|
-
},
|
|
6825
|
+
}, ae = (e) => {
|
|
6829
6826
|
let t = Mt(e, {
|
|
6830
6827
|
accept: l,
|
|
6831
6828
|
maxSizeMb: f
|
|
@@ -6835,16 +6832,16 @@ function fr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6835
6832
|
return;
|
|
6836
6833
|
}
|
|
6837
6834
|
L(""), z(!1), F(URL.createObjectURL(e)), r(e);
|
|
6838
|
-
},
|
|
6835
|
+
}, U = (e) => {
|
|
6839
6836
|
let t = e.target.files?.[0];
|
|
6840
|
-
e.target.value = "", t &&
|
|
6837
|
+
e.target.value = "", t && ae(t);
|
|
6841
6838
|
}, oe = (e) => {
|
|
6842
6839
|
if (e.preventDefault(), B(!1), V) return;
|
|
6843
6840
|
let t = e.dataTransfer.files?.[0];
|
|
6844
|
-
t &&
|
|
6841
|
+
t && ae(t);
|
|
6845
6842
|
}, se = () => {
|
|
6846
6843
|
F(null), L(""), z(!1), A.current && (A.current.value = ""), i?.();
|
|
6847
|
-
}, 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 = [
|
|
6848
6845
|
"set-uploader",
|
|
6849
6846
|
T === "avatar" ? "set-uploader--avatar" : "",
|
|
6850
6847
|
D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
|
|
@@ -6917,7 +6914,7 @@ function fr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6917
6914
|
name: n,
|
|
6918
6915
|
hidden: !0,
|
|
6919
6916
|
accept: l,
|
|
6920
|
-
onChange:
|
|
6917
|
+
onChange: U,
|
|
6921
6918
|
disabled: V
|
|
6922
6919
|
})
|
|
6923
6920
|
]
|
|
@@ -6971,27 +6968,27 @@ function fr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
6971
6968
|
}
|
|
6972
6969
|
//#endregion
|
|
6973
6970
|
//#region src/components/AppMeter.jsx
|
|
6974
|
-
var
|
|
6971
|
+
var dr = [
|
|
6975
6972
|
"info",
|
|
6976
6973
|
"success",
|
|
6977
6974
|
"warning",
|
|
6978
6975
|
"danger",
|
|
6979
6976
|
"neutral"
|
|
6980
6977
|
];
|
|
6981
|
-
function
|
|
6978
|
+
function fr(e, t, n) {
|
|
6982
6979
|
let r = n - t;
|
|
6983
6980
|
if (!(r > 0)) return 0;
|
|
6984
6981
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
6985
6982
|
return Number(i.toFixed(2));
|
|
6986
6983
|
}
|
|
6987
|
-
function
|
|
6984
|
+
function pr(e, t, n, r, i) {
|
|
6988
6985
|
if (t == null && n == null) return i;
|
|
6989
6986
|
let a = "mid";
|
|
6990
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";
|
|
6991
6988
|
}
|
|
6992
|
-
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 }) {
|
|
6993
6990
|
N("AppMeter", d);
|
|
6994
|
-
let f =
|
|
6991
|
+
let f = pr(e, a, o, i, dr.includes(r) ? r : "info"), m = fr(e, t, n);
|
|
6995
6992
|
return /* @__PURE__ */ p("div", {
|
|
6996
6993
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
6997
6994
|
role: "meter",
|
|
@@ -7001,15 +6998,15 @@ function gr({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
7001
6998
|
"aria-label": c || void 0,
|
|
7002
6999
|
...d,
|
|
7003
7000
|
children: /* @__PURE__ */ p("div", {
|
|
7004
|
-
className: `progress-bar wui-progress-${
|
|
7005
|
-
style: { width: `${
|
|
7001
|
+
className: `progress-bar wui-progress-${f}`,
|
|
7002
|
+
style: { width: `${m}%` },
|
|
7006
7003
|
children: l && c
|
|
7007
7004
|
})
|
|
7008
7005
|
});
|
|
7009
7006
|
}
|
|
7010
7007
|
//#endregion
|
|
7011
7008
|
//#region src/components/AppMultiSelect.jsx
|
|
7012
|
-
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) {
|
|
7013
7010
|
N("AppMultiSelect", S);
|
|
7014
7011
|
let w = s(), T = f || w, { setRef: E, innerRef: D } = Q({
|
|
7015
7012
|
ref: C,
|
|
@@ -7066,7 +7063,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7066
7063
|
}) : null
|
|
7067
7064
|
]
|
|
7068
7065
|
});
|
|
7069
|
-
}),
|
|
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) {
|
|
7070
7067
|
N("AppNumberInput", T);
|
|
7071
7068
|
let D = s(), O = y || D, k = (e) => {
|
|
7072
7069
|
if (g === 0) return Math.round(e);
|
|
@@ -7124,7 +7121,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7124
7121
|
onChange: te,
|
|
7125
7122
|
onBlur: ne,
|
|
7126
7123
|
onKeyDown: re
|
|
7127
|
-
}),
|
|
7124
|
+
}), ae = /* @__PURE__ */ m("div", {
|
|
7128
7125
|
className: [
|
|
7129
7126
|
"num-wrap",
|
|
7130
7127
|
v === "sm" ? "num-wrap-sm" : "",
|
|
@@ -7177,7 +7174,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7177
7174
|
})
|
|
7178
7175
|
]
|
|
7179
7176
|
}),
|
|
7180
|
-
|
|
7177
|
+
ae,
|
|
7181
7178
|
n ? /* @__PURE__ */ p("div", {
|
|
7182
7179
|
className: "field-error",
|
|
7183
7180
|
id: z,
|
|
@@ -7189,7 +7186,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7189
7186
|
}) : null
|
|
7190
7187
|
]
|
|
7191
7188
|
});
|
|
7192
|
-
}),
|
|
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) {
|
|
7193
7190
|
N("AppOtpInput", _);
|
|
7194
7191
|
let y = s(), b = h || y, { setRef: x, innerRef: S } = Q({
|
|
7195
7192
|
ref: v,
|
|
@@ -7236,7 +7233,7 @@ var _r = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
7236
7233
|
});
|
|
7237
7234
|
//#endregion
|
|
7238
7235
|
//#region src/components/AppPageHeader.jsx
|
|
7239
|
-
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 }) {
|
|
7240
7237
|
N("AppPageHeader", h);
|
|
7241
7238
|
let g = [
|
|
7242
7239
|
"page-header",
|
|
@@ -7295,9 +7292,9 @@ function br({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
7295
7292
|
}
|
|
7296
7293
|
//#endregion
|
|
7297
7294
|
//#region src/components/AppPagination.jsx
|
|
7298
|
-
function
|
|
7295
|
+
function yr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
7299
7296
|
if (N("AppPagination", s), t <= 1) return null;
|
|
7300
|
-
let c =
|
|
7297
|
+
let c = An(e, t, { siblingCount: r });
|
|
7301
7298
|
return /* @__PURE__ */ p("nav", {
|
|
7302
7299
|
className: [
|
|
7303
7300
|
"pagination-nav",
|
|
@@ -7355,7 +7352,7 @@ function xr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
7355
7352
|
}
|
|
7356
7353
|
//#endregion
|
|
7357
7354
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
7358
|
-
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 }, _) {
|
|
7359
7356
|
N("AppPhoneNumberInput", g);
|
|
7360
7357
|
let v = s(), y = i || v, b = l && y ? `${y}-error` : void 0, { setRef: x } = Q({
|
|
7361
7358
|
ref: _,
|
|
@@ -7374,6 +7371,7 @@ var Sr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7374
7371
|
/* @__PURE__ */ p("wui-phone", {
|
|
7375
7372
|
"aria-label": typeof a == "string" ? a : void 0,
|
|
7376
7373
|
"aria-describedby": b,
|
|
7374
|
+
"aria-invalid": l ? "true" : void 0,
|
|
7377
7375
|
ref: x,
|
|
7378
7376
|
name: i,
|
|
7379
7377
|
country: n,
|
|
@@ -7394,7 +7392,7 @@ var Sr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
7394
7392
|
});
|
|
7395
7393
|
//#endregion
|
|
7396
7394
|
//#region src/components/AppPricingCard.jsx
|
|
7397
|
-
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 }) {
|
|
7398
7396
|
return N("AppPricingCard", u), /* @__PURE__ */ m("div", {
|
|
7399
7397
|
className: [
|
|
7400
7398
|
"plan-card",
|
|
@@ -7448,29 +7446,29 @@ function Cr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
7448
7446
|
}
|
|
7449
7447
|
//#endregion
|
|
7450
7448
|
//#region src/components/AppProgress.jsx
|
|
7451
|
-
var
|
|
7449
|
+
var Sr = [
|
|
7452
7450
|
"info",
|
|
7453
7451
|
"success",
|
|
7454
7452
|
"warning",
|
|
7455
7453
|
"danger",
|
|
7456
7454
|
"neutral"
|
|
7457
7455
|
];
|
|
7458
|
-
function
|
|
7456
|
+
function Cr(e, t) {
|
|
7459
7457
|
if (!(t > 0)) return 0;
|
|
7460
7458
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
7461
7459
|
return Number(n.toFixed(2));
|
|
7462
7460
|
}
|
|
7463
|
-
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 }) {
|
|
7464
7462
|
N("AppProgress", u);
|
|
7465
|
-
let d =
|
|
7463
|
+
let d = Sr.includes(n) ? n : "info", f = Cr(e, t), m = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, h = [
|
|
7466
7464
|
"progress-bar",
|
|
7467
|
-
`wui-progress-${
|
|
7465
|
+
`wui-progress-${d}`,
|
|
7468
7466
|
o || s ? "progress-bar-striped" : "",
|
|
7469
7467
|
s ? "progress-bar-animated" : "",
|
|
7470
7468
|
c ? "wui-progress-indeterminate" : ""
|
|
7471
7469
|
].filter(Boolean).join(" ");
|
|
7472
7470
|
return /* @__PURE__ */ p("div", {
|
|
7473
|
-
className:
|
|
7471
|
+
className: m,
|
|
7474
7472
|
role: "progressbar",
|
|
7475
7473
|
"aria-valuemin": 0,
|
|
7476
7474
|
"aria-valuemax": t,
|
|
@@ -7478,16 +7476,16 @@ function Er({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
7478
7476
|
"aria-label": i || void 0,
|
|
7479
7477
|
...u,
|
|
7480
7478
|
children: /* @__PURE__ */ p("div", {
|
|
7481
|
-
className:
|
|
7482
|
-
style: c ? void 0 : { width: `${
|
|
7479
|
+
className: h,
|
|
7480
|
+
style: c ? void 0 : { width: `${f}%` },
|
|
7483
7481
|
children: !c && a && i
|
|
7484
7482
|
})
|
|
7485
7483
|
});
|
|
7486
7484
|
}
|
|
7487
7485
|
//#endregion
|
|
7488
7486
|
//#region src/components/AppRadio.jsx
|
|
7489
|
-
var
|
|
7490
|
-
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, {
|
|
7491
7489
|
ref: s,
|
|
7492
7490
|
label: e,
|
|
7493
7491
|
id: t,
|
|
@@ -7502,7 +7500,7 @@ var Dr = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
7502
7500
|
});
|
|
7503
7501
|
//#endregion
|
|
7504
7502
|
//#region src/components/AppRepeater.jsx
|
|
7505
|
-
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 }) {
|
|
7506
7504
|
N("AppRepeater", d);
|
|
7507
7505
|
let f = typeof c == "number" && e.length >= c, h = !!r && e.length > s;
|
|
7508
7506
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7524,7 +7522,7 @@ function Or({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7524
7522
|
className: "repeater-body",
|
|
7525
7523
|
children: t(e, n)
|
|
7526
7524
|
}),
|
|
7527
|
-
h && /* @__PURE__ */ p(
|
|
7525
|
+
h && /* @__PURE__ */ p(oe, {
|
|
7528
7526
|
icon: "trash-2",
|
|
7529
7527
|
label: `${a} ${n + 1}`,
|
|
7530
7528
|
danger: !0,
|
|
@@ -7547,7 +7545,7 @@ function Or({ rows: e = [], renderRow: t, onAdd: n, onRemove: r, addLabel: i = "
|
|
|
7547
7545
|
}
|
|
7548
7546
|
//#endregion
|
|
7549
7547
|
//#region src/components/AppResourceCard.jsx
|
|
7550
|
-
function
|
|
7548
|
+
function Dr({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
7551
7549
|
N("AppResourceCard", s);
|
|
7552
7550
|
let c = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
7553
7551
|
className: "res-card-icon",
|
|
@@ -7581,7 +7579,7 @@ function kr({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
7581
7579
|
}
|
|
7582
7580
|
//#endregion
|
|
7583
7581
|
//#region src/components/AppResult.jsx
|
|
7584
|
-
var
|
|
7582
|
+
var Or = {
|
|
7585
7583
|
success: {
|
|
7586
7584
|
icon: "check-circle",
|
|
7587
7585
|
tone: "success"
|
|
@@ -7602,9 +7600,9 @@ var Ar = {
|
|
|
7602
7600
|
404: { tone: "muted" },
|
|
7603
7601
|
500: { tone: "muted" }
|
|
7604
7602
|
};
|
|
7605
|
-
function
|
|
7603
|
+
function kr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
7606
7604
|
N("AppResult", s);
|
|
7607
|
-
let c =
|
|
7605
|
+
let c = Or[e] || Or.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
7608
7606
|
return /* @__PURE__ */ m("div", {
|
|
7609
7607
|
className: [
|
|
7610
7608
|
"result",
|
|
@@ -7642,7 +7640,7 @@ function jr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
7642
7640
|
}
|
|
7643
7641
|
//#endregion
|
|
7644
7642
|
//#region src/components/AppScrollbar.jsx
|
|
7645
|
-
function
|
|
7643
|
+
function Ar({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
7646
7644
|
return N("AppScrollbar", i), /* @__PURE__ */ p("div", {
|
|
7647
7645
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
7648
7646
|
style: n == null ? r : {
|
|
@@ -7655,7 +7653,7 @@ function Mr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
7655
7653
|
}
|
|
7656
7654
|
//#endregion
|
|
7657
7655
|
//#region src/components/AppSearch.jsx
|
|
7658
|
-
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 }) {
|
|
7659
7657
|
N("AppSearch", u);
|
|
7660
7658
|
let d = t || n;
|
|
7661
7659
|
return /* @__PURE__ */ m("div", {
|
|
@@ -7702,7 +7700,7 @@ function Nr({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
7702
7700
|
}
|
|
7703
7701
|
//#endregion
|
|
7704
7702
|
//#region src/components/AppSegmented.jsx
|
|
7705
|
-
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 }) {
|
|
7706
7704
|
N("AppSegmented", h);
|
|
7707
7705
|
let g = s(), _ = i || g, v = u(null), y = u(null), b = [
|
|
7708
7706
|
"segmented",
|
|
@@ -7777,7 +7775,7 @@ function Pr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
7777
7775
|
}
|
|
7778
7776
|
//#endregion
|
|
7779
7777
|
//#region src/components/AppSelect.jsx
|
|
7780
|
-
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) {
|
|
7781
7779
|
N("AppSelect", O);
|
|
7782
7780
|
let A = s(), { setRef: j, innerRef: M } = Q({
|
|
7783
7781
|
ref: k,
|
|
@@ -7789,7 +7787,7 @@ var Fr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ir = i(function({ valu
|
|
|
7789
7787
|
if (!e) return;
|
|
7790
7788
|
let t = n.map((e) => ({
|
|
7791
7789
|
value: e.value,
|
|
7792
|
-
label:
|
|
7790
|
+
label: Nr(e),
|
|
7793
7791
|
icon: e.icon
|
|
7794
7792
|
}));
|
|
7795
7793
|
zt(t, e.options) || (e.options = t);
|
|
@@ -7853,7 +7851,7 @@ var Fr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ir = i(function({ valu
|
|
|
7853
7851
|
});
|
|
7854
7852
|
//#endregion
|
|
7855
7853
|
//#region src/components/AppShell.jsx
|
|
7856
|
-
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 }) {
|
|
7857
7855
|
N("AppShell", y);
|
|
7858
7856
|
let [b, x] = d(!1), [S, C] = d(!1), [w, T] = d(!1), E = u ?? b, D = () => {
|
|
7859
7857
|
let e = !E;
|
|
@@ -7901,7 +7899,7 @@ function Lr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7901
7899
|
children: [e.label && /* @__PURE__ */ p("div", {
|
|
7902
7900
|
className: "app-nav-group-label",
|
|
7903
7901
|
children: e.label
|
|
7904
|
-
}), e.items.map((e) => /* @__PURE__ */ p(
|
|
7902
|
+
}), e.items.map((e) => /* @__PURE__ */ p(Ir, {
|
|
7905
7903
|
item: e,
|
|
7906
7904
|
linkComponent: _,
|
|
7907
7905
|
onNavigate: () => C(!1)
|
|
@@ -7968,7 +7966,7 @@ function Lr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
7968
7966
|
]
|
|
7969
7967
|
});
|
|
7970
7968
|
}
|
|
7971
|
-
function
|
|
7969
|
+
function Ir({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
7972
7970
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = d(a);
|
|
7973
7971
|
o(() => {
|
|
7974
7972
|
a && !s && c(!0);
|
|
@@ -8008,7 +8006,7 @@ function Rr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8008
8006
|
className: `app-nav-sub${s ? " expanded" : ""}`,
|
|
8009
8007
|
children: /* @__PURE__ */ p("div", {
|
|
8010
8008
|
className: "app-nav-sub-inner",
|
|
8011
|
-
children: e.children.map((e) => /* @__PURE__ */ p(
|
|
8009
|
+
children: e.children.map((e) => /* @__PURE__ */ p(Ir, {
|
|
8012
8010
|
item: e,
|
|
8013
8011
|
linkComponent: t,
|
|
8014
8012
|
onNavigate: n,
|
|
@@ -8049,7 +8047,7 @@ function Rr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
8049
8047
|
}
|
|
8050
8048
|
//#endregion
|
|
8051
8049
|
//#region src/components/AppSidebarMenu.jsx
|
|
8052
|
-
var
|
|
8050
|
+
var Lr = {
|
|
8053
8051
|
left: "start",
|
|
8054
8052
|
right: "end",
|
|
8055
8053
|
start: "start",
|
|
@@ -8057,9 +8055,9 @@ var zr = {
|
|
|
8057
8055
|
top: "top",
|
|
8058
8056
|
bottom: "bottom"
|
|
8059
8057
|
};
|
|
8060
|
-
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 }) {
|
|
8061
8059
|
N("AppSidebarMenu", b);
|
|
8062
|
-
let { style: x, ...S } = b, w =
|
|
8060
|
+
let { style: x, ...S } = b, w = Lr[n] || "end", T = c || l || x ? {
|
|
8063
8061
|
...c && { "--asm-width": c },
|
|
8064
8062
|
...l && { "--asm-max-width": l },
|
|
8065
8063
|
...x
|
|
@@ -8112,7 +8110,7 @@ function Br({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
8112
8110
|
}
|
|
8113
8111
|
//#endregion
|
|
8114
8112
|
//#region src/components/AppSlider.jsx
|
|
8115
|
-
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) {
|
|
8116
8114
|
N("AppSlider", E);
|
|
8117
8115
|
let O = s(), k = C || d || r && f || O, A = r, { setRef: j, innerRef: M } = Q({
|
|
8118
8116
|
ref: D,
|
|
@@ -8173,14 +8171,14 @@ var Vr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
8173
8171
|
})
|
|
8174
8172
|
]
|
|
8175
8173
|
});
|
|
8176
|
-
}),
|
|
8174
|
+
}), Br = {
|
|
8177
8175
|
sm: 44,
|
|
8178
8176
|
md: 56,
|
|
8179
8177
|
lg: 72
|
|
8180
8178
|
};
|
|
8181
|
-
function
|
|
8179
|
+
function Vr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
8182
8180
|
N("AppSplash", c);
|
|
8183
|
-
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", {
|
|
8184
8182
|
className: "splash-ring",
|
|
8185
8183
|
"aria-hidden": "true"
|
|
8186
8184
|
}) : i === "dots" ? /* @__PURE__ */ m("span", {
|
|
@@ -8227,16 +8225,16 @@ function Ur({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
8227
8225
|
}
|
|
8228
8226
|
//#endregion
|
|
8229
8227
|
//#region src/components/AppStatusBadge.jsx
|
|
8230
|
-
function
|
|
8228
|
+
function Hr({ label: e, tone: t = "neutral", className: n = "", ...r }) {
|
|
8231
8229
|
return N("AppStatusBadge", r), e == null || e === "" ? "—" : /* @__PURE__ */ p("span", {
|
|
8232
|
-
className: `status-label ${
|
|
8230
|
+
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
8233
8231
|
...r,
|
|
8234
8232
|
children: e
|
|
8235
8233
|
});
|
|
8236
8234
|
}
|
|
8237
8235
|
//#endregion
|
|
8238
8236
|
//#region src/components/AppStepper.jsx
|
|
8239
|
-
function
|
|
8237
|
+
function Ur({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
8240
8238
|
N("AppStepper", c);
|
|
8241
8239
|
let l = t === "journey";
|
|
8242
8240
|
return /* @__PURE__ */ p("nav", {
|
|
@@ -8249,7 +8247,7 @@ function Gr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8249
8247
|
"aria-label": a,
|
|
8250
8248
|
...c,
|
|
8251
8249
|
children: e.map((t, n) => {
|
|
8252
|
-
let a = t.status ||
|
|
8250
|
+
let a = t.status || Wr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
8253
8251
|
c = a === "done" ? /* @__PURE__ */ p(H, {
|
|
8254
8252
|
name: "check",
|
|
8255
8253
|
size: 14
|
|
@@ -8313,13 +8311,13 @@ function Gr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
8313
8311
|
})
|
|
8314
8312
|
});
|
|
8315
8313
|
}
|
|
8316
|
-
function
|
|
8314
|
+
function Wr(e, t) {
|
|
8317
8315
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
8318
8316
|
}
|
|
8319
8317
|
//#endregion
|
|
8320
8318
|
//#region src/components/AppSwitch.jsx
|
|
8321
|
-
var
|
|
8322
|
-
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, {
|
|
8323
8321
|
ref: c,
|
|
8324
8322
|
label: e,
|
|
8325
8323
|
id: t,
|
|
@@ -8334,7 +8332,7 @@ var qr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
8334
8332
|
});
|
|
8335
8333
|
//#endregion
|
|
8336
8334
|
//#region src/components/AppTableEmptyState.jsx
|
|
8337
|
-
function
|
|
8335
|
+
function Kr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
8338
8336
|
return N("AppTableEmptyState", i), /* @__PURE__ */ m("div", {
|
|
8339
8337
|
className: "tbl-empty",
|
|
8340
8338
|
...i,
|
|
@@ -8360,13 +8358,13 @@ function Jr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
8360
8358
|
}
|
|
8361
8359
|
//#endregion
|
|
8362
8360
|
//#region src/components/AppTooltip.jsx
|
|
8363
|
-
var
|
|
8361
|
+
var qr = {
|
|
8364
8362
|
start: "left",
|
|
8365
8363
|
end: "right",
|
|
8366
8364
|
top: "top",
|
|
8367
8365
|
bottom: "bottom"
|
|
8368
8366
|
};
|
|
8369
|
-
function
|
|
8367
|
+
function Jr({ content: e, children: t, placement: r = "top", tone: i = "default", size: a = "md", className: o = "", ...c }) {
|
|
8370
8368
|
N("AppTooltip", c);
|
|
8371
8369
|
let l = /* @__PURE__ */ p(E, {
|
|
8372
8370
|
id: s(),
|
|
@@ -8380,14 +8378,14 @@ function Xr({ content: e, children: t, placement: r = "top", tone: i = "default"
|
|
|
8380
8378
|
});
|
|
8381
8379
|
return /* @__PURE__ */ p(w, {
|
|
8382
8380
|
trigger: ["hover", "focus"],
|
|
8383
|
-
placement:
|
|
8381
|
+
placement: qr[r] || r,
|
|
8384
8382
|
overlay: l,
|
|
8385
8383
|
children: n(t, c)
|
|
8386
8384
|
});
|
|
8387
8385
|
}
|
|
8388
8386
|
//#endregion
|
|
8389
8387
|
//#region src/components/AppTabs.jsx
|
|
8390
|
-
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 }) {
|
|
8391
8389
|
N("AppTabs", v);
|
|
8392
8390
|
let y = u(null), b = u(null), x = i === "vertical", [S, C] = d(t);
|
|
8393
8391
|
o(() => {
|
|
@@ -8494,7 +8492,7 @@ function Zr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8494
8492
|
})
|
|
8495
8493
|
]
|
|
8496
8494
|
}, e.key);
|
|
8497
|
-
return e.tooltip ? /* @__PURE__ */ p(
|
|
8495
|
+
return e.tooltip ? /* @__PURE__ */ p(Jr, {
|
|
8498
8496
|
content: e.tooltip,
|
|
8499
8497
|
children: i
|
|
8500
8498
|
}, e.key) : i;
|
|
@@ -8536,7 +8534,7 @@ function Zr({ tabs: e, value: t, onChange: n, variant: r = "underline", orientat
|
|
|
8536
8534
|
}
|
|
8537
8535
|
//#endregion
|
|
8538
8536
|
//#region src/components/AppTagInput.jsx
|
|
8539
|
-
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) {
|
|
8540
8538
|
N("AppTagInput", x);
|
|
8541
8539
|
let C = s(), w = h || r || C, { setRef: T } = Q({
|
|
8542
8540
|
ref: S,
|
|
@@ -8587,7 +8585,7 @@ var Qr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8587
8585
|
}) : null
|
|
8588
8586
|
]
|
|
8589
8587
|
});
|
|
8590
|
-
}),
|
|
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) {
|
|
8591
8589
|
N("AppTextarea", v);
|
|
8592
8590
|
let b = s(), S = l || b, C = [
|
|
8593
8591
|
"textarea",
|
|
@@ -8649,7 +8647,7 @@ var Qr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8649
8647
|
}) : null
|
|
8650
8648
|
]
|
|
8651
8649
|
});
|
|
8652
|
-
}),
|
|
8650
|
+
}), Qr = {
|
|
8653
8651
|
done: "check",
|
|
8654
8652
|
current: "clock",
|
|
8655
8653
|
"on-hold": "lock",
|
|
@@ -8658,7 +8656,7 @@ var Qr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
8658
8656
|
skipped: "arrow-right",
|
|
8659
8657
|
upcoming: null
|
|
8660
8658
|
};
|
|
8661
|
-
function
|
|
8659
|
+
function $r({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
8662
8660
|
N("AppTimeline", o);
|
|
8663
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;
|
|
8664
8662
|
return /* @__PURE__ */ p("ol", {
|
|
@@ -8669,7 +8667,7 @@ function ti({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8669
8667
|
} : a,
|
|
8670
8668
|
...o,
|
|
8671
8669
|
children: e.map((e, t) => {
|
|
8672
|
-
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";
|
|
8673
8671
|
return /* @__PURE__ */ m("li", {
|
|
8674
8672
|
className: `timeline-item${r}${i}`,
|
|
8675
8673
|
children: [/* @__PURE__ */ p("span", {
|
|
@@ -8727,7 +8725,7 @@ function ti({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
8727
8725
|
}
|
|
8728
8726
|
//#endregion
|
|
8729
8727
|
//#region src/components/AppTimePicker.jsx
|
|
8730
|
-
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) {
|
|
8731
8729
|
N("AppTimePicker", b);
|
|
8732
8730
|
let S = s(), C = _ || o || S, { setRef: w } = Q({
|
|
8733
8731
|
ref: x,
|
|
@@ -8772,32 +8770,32 @@ var ni = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
8772
8770
|
})
|
|
8773
8771
|
]
|
|
8774
8772
|
});
|
|
8775
|
-
}),
|
|
8776
|
-
function
|
|
8777
|
-
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($);
|
|
8778
8776
|
}
|
|
8779
|
-
function
|
|
8780
|
-
let t =
|
|
8781
|
-
t !== void 0 && (clearTimeout(t),
|
|
8777
|
+
function oi(e) {
|
|
8778
|
+
let t = ri.get(e);
|
|
8779
|
+
t !== void 0 && (clearTimeout(t), ri.delete(e));
|
|
8782
8780
|
}
|
|
8783
|
-
function
|
|
8784
|
-
if (e.length <=
|
|
8781
|
+
function si(e) {
|
|
8782
|
+
if (e.length <= ti) return e;
|
|
8785
8783
|
let t = [...e];
|
|
8786
|
-
for (; t.length >
|
|
8784
|
+
for (; t.length > ti;) {
|
|
8787
8785
|
let e = t.findIndex((e) => e.duration !== 0);
|
|
8788
8786
|
t.splice(e === -1 ? 0 : e, 1);
|
|
8789
8787
|
}
|
|
8790
8788
|
return t;
|
|
8791
8789
|
}
|
|
8792
|
-
function
|
|
8793
|
-
return
|
|
8790
|
+
function ci(e) {
|
|
8791
|
+
return ni.add(e), e($), () => ni.delete(e);
|
|
8794
8792
|
}
|
|
8795
|
-
function
|
|
8793
|
+
function li(e, t, n = {}) {
|
|
8796
8794
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
8797
8795
|
if (r) {
|
|
8798
8796
|
let i = $.find((e) => e.externalId === r);
|
|
8799
8797
|
if (i) {
|
|
8800
|
-
|
|
8798
|
+
oi(i.id);
|
|
8801
8799
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
8802
8800
|
$ = $.map((a) => a.id === i.id ? {
|
|
8803
8801
|
...a,
|
|
@@ -8810,12 +8808,12 @@ function di(e, t, n = {}) {
|
|
|
8810
8808
|
shape: n.shape,
|
|
8811
8809
|
surface: n.surface,
|
|
8812
8810
|
progress: n.progress
|
|
8813
|
-
} : a),
|
|
8811
|
+
} : a), ai(), r > 0 && ri.set(i.id, setTimeout(() => ui(i.id), r));
|
|
8814
8812
|
return;
|
|
8815
8813
|
}
|
|
8816
8814
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
8817
|
-
let a = ++
|
|
8818
|
-
$ =
|
|
8815
|
+
let a = ++ii, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
8816
|
+
$ = si([...$, {
|
|
8819
8817
|
id: a,
|
|
8820
8818
|
externalId: r,
|
|
8821
8819
|
message: e,
|
|
@@ -8828,19 +8826,19 @@ function di(e, t, n = {}) {
|
|
|
8828
8826
|
surface: n.surface,
|
|
8829
8827
|
progress: n.progress,
|
|
8830
8828
|
key: i
|
|
8831
|
-
}]),
|
|
8829
|
+
}]), ai(), o > 0 && ri.set(a, setTimeout(() => ui(a), o));
|
|
8832
8830
|
}
|
|
8833
|
-
function
|
|
8834
|
-
|
|
8831
|
+
function ui(e) {
|
|
8832
|
+
oi(e);
|
|
8835
8833
|
let t = $.filter((t) => t.id !== e);
|
|
8836
|
-
t.length !== $.length && ($ = t,
|
|
8834
|
+
t.length !== $.length && ($ = t, ai());
|
|
8837
8835
|
}
|
|
8838
|
-
function
|
|
8839
|
-
$.length !== 0 && ($ = [],
|
|
8836
|
+
function di() {
|
|
8837
|
+
$.length !== 0 && ($ = [], ai());
|
|
8840
8838
|
}
|
|
8841
8839
|
//#endregion
|
|
8842
8840
|
//#region src/components/AppToast.jsx
|
|
8843
|
-
var
|
|
8841
|
+
var fi = {
|
|
8844
8842
|
success: {
|
|
8845
8843
|
icon: "check-circle",
|
|
8846
8844
|
assertive: !1
|
|
@@ -8857,7 +8855,7 @@ var mi = {
|
|
|
8857
8855
|
icon: "alert-circle",
|
|
8858
8856
|
assertive: !0
|
|
8859
8857
|
}
|
|
8860
|
-
},
|
|
8858
|
+
}, pi = {
|
|
8861
8859
|
"top-start": "top-0 start-0",
|
|
8862
8860
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
8863
8861
|
"top-end": "top-0 end-0",
|
|
@@ -8865,22 +8863,22 @@ var mi = {
|
|
|
8865
8863
|
"bottom-start": "bottom-0 start-0",
|
|
8866
8864
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
8867
8865
|
"bottom-end": "bottom-0 end-0"
|
|
8868
|
-
},
|
|
8866
|
+
}, mi = 64, hi = /* @__PURE__ */ new Set([
|
|
8869
8867
|
"rise",
|
|
8870
8868
|
"organic",
|
|
8871
8869
|
"jelly",
|
|
8872
8870
|
"spring"
|
|
8873
|
-
]),
|
|
8871
|
+
]), gi = /* @__PURE__ */ new Set([
|
|
8874
8872
|
"rounded",
|
|
8875
8873
|
"pill",
|
|
8876
8874
|
"sharp"
|
|
8877
|
-
]),
|
|
8878
|
-
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" }) {
|
|
8879
8877
|
let [a, s] = d([]);
|
|
8880
|
-
o(() =>
|
|
8878
|
+
o(() => ci(s), []);
|
|
8881
8879
|
let c = Math.max(0, a.length - t), l = c ? a.slice(c) : a;
|
|
8882
8880
|
return /* @__PURE__ */ m("div", {
|
|
8883
|
-
className: `wui-toast-container toast-container position-fixed ${
|
|
8881
|
+
className: `wui-toast-container toast-container position-fixed ${pi[e] ?? pi["bottom-end"]} p-3`,
|
|
8884
8882
|
children: [c > 0 && /* @__PURE__ */ m("div", {
|
|
8885
8883
|
className: "wui-toast-more",
|
|
8886
8884
|
"aria-hidden": "true",
|
|
@@ -8889,7 +8887,7 @@ function bi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8889
8887
|
c,
|
|
8890
8888
|
" more"
|
|
8891
8889
|
]
|
|
8892
|
-
}), l.map((e) => /* @__PURE__ */ p(
|
|
8890
|
+
}), l.map((e) => /* @__PURE__ */ p(yi, {
|
|
8893
8891
|
toast: e,
|
|
8894
8892
|
defaultAnimation: n,
|
|
8895
8893
|
defaultShape: r,
|
|
@@ -8897,8 +8895,8 @@ function bi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
8897
8895
|
}, e.id))]
|
|
8898
8896
|
});
|
|
8899
8897
|
}
|
|
8900
|
-
function
|
|
8901
|
-
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) => {
|
|
8902
8900
|
e.button !== 0 || e.target.closest("button") || (v.current = e.clientX, _(!0), e.currentTarget.setPointerCapture?.(e.pointerId));
|
|
8903
8901
|
}, x = (e) => {
|
|
8904
8902
|
v.current !== null && h(e.clientX - v.current);
|
|
@@ -8907,7 +8905,7 @@ function xi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8907
8905
|
}, C = (e) => {
|
|
8908
8906
|
if (v.current === null) return;
|
|
8909
8907
|
let t = e.clientX - v.current;
|
|
8910
|
-
if (Math.abs(t) >
|
|
8908
|
+
if (Math.abs(t) > mi) {
|
|
8911
8909
|
y();
|
|
8912
8910
|
return;
|
|
8913
8911
|
}
|
|
@@ -8990,7 +8988,7 @@ function xi({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
8990
8988
|
}
|
|
8991
8989
|
//#endregion
|
|
8992
8990
|
//#region src/components/AppToolbar.jsx
|
|
8993
|
-
function
|
|
8991
|
+
function bi({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
8994
8992
|
N("AppToolbar", u);
|
|
8995
8993
|
let f = s(), h = o || f, [g, _] = d(r), v = n === void 0 ? g : n;
|
|
8996
8994
|
return /* @__PURE__ */ m("div", {
|
|
@@ -9048,7 +9046,7 @@ function Si({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
9048
9046
|
}
|
|
9049
9047
|
//#endregion
|
|
9050
9048
|
//#region src/components/AppWizard.jsx
|
|
9051
|
-
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) {
|
|
9052
9050
|
N("AppWizard", E);
|
|
9053
9051
|
let O = u(null), k = (e) => {
|
|
9054
9052
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -9103,7 +9101,7 @@ var Ci = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
9103
9101
|
});
|
|
9104
9102
|
//#endregion
|
|
9105
9103
|
//#region src/components/AppWorkspaceSwitcher.jsx
|
|
9106
|
-
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 }) {
|
|
9107
9105
|
let { onToggle: x, ...S } = y;
|
|
9108
9106
|
N("AppWorkspaceSwitcher", S);
|
|
9109
9107
|
let [C, w] = d(""), [T, E] = d(!1), D = u(null), O = e.find((e) => e.id === t) ?? e[0], k = l(() => {
|
|
@@ -9131,7 +9129,7 @@ function wi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9131
9129
|
},
|
|
9132
9130
|
...S,
|
|
9133
9131
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
9134
|
-
as:
|
|
9132
|
+
as: Ei,
|
|
9135
9133
|
compact: g,
|
|
9136
9134
|
tenant: O,
|
|
9137
9135
|
"aria-label": j
|
|
@@ -9166,7 +9164,7 @@ function wi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9166
9164
|
className: `workspace-switcher-option${e.id === O?.id ? " is-active" : ""}`,
|
|
9167
9165
|
onClick: () => n?.(e),
|
|
9168
9166
|
children: [
|
|
9169
|
-
/* @__PURE__ */ p(
|
|
9167
|
+
/* @__PURE__ */ p(wi, { tenant: e }),
|
|
9170
9168
|
/* @__PURE__ */ p("span", {
|
|
9171
9169
|
className: "workspace-switcher-option-name",
|
|
9172
9170
|
children: e.name
|
|
@@ -9198,17 +9196,17 @@ function wi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
9198
9196
|
}) : null,
|
|
9199
9197
|
i ? /* @__PURE__ */ p("div", {
|
|
9200
9198
|
className: "workspace-switcher-footer",
|
|
9201
|
-
children:
|
|
9199
|
+
children: Ti(i, a)
|
|
9202
9200
|
}) : null
|
|
9203
9201
|
]
|
|
9204
9202
|
})]
|
|
9205
9203
|
});
|
|
9206
9204
|
}
|
|
9207
|
-
function
|
|
9205
|
+
function Ci(e) {
|
|
9208
9206
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
9209
9207
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
9210
9208
|
}
|
|
9211
|
-
function
|
|
9209
|
+
function wi({ tenant: e }) {
|
|
9212
9210
|
return e?.logoUrl ? /* @__PURE__ */ p("img", {
|
|
9213
9211
|
className: "workspace-switcher-mark",
|
|
9214
9212
|
src: e.logoUrl,
|
|
@@ -9216,10 +9214,10 @@ function Ei({ tenant: e }) {
|
|
|
9216
9214
|
loading: "lazy"
|
|
9217
9215
|
}) : /* @__PURE__ */ p("span", {
|
|
9218
9216
|
className: "workspace-switcher-mark",
|
|
9219
|
-
children:
|
|
9217
|
+
children: Ci(e?.name)
|
|
9220
9218
|
});
|
|
9221
9219
|
}
|
|
9222
|
-
function
|
|
9220
|
+
function Ti(e, t) {
|
|
9223
9221
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
9224
9222
|
let { label: n, icon: r, href: i } = e;
|
|
9225
9223
|
return /* @__PURE__ */ m(i ? t ?? "a" : "button", {
|
|
@@ -9231,7 +9229,7 @@ function Di(e, t) {
|
|
|
9231
9229
|
}) : null, n]
|
|
9232
9230
|
});
|
|
9233
9231
|
}
|
|
9234
|
-
var
|
|
9232
|
+
var Ei = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
9235
9233
|
return /* @__PURE__ */ m("button", {
|
|
9236
9234
|
ref: a,
|
|
9237
9235
|
type: "button",
|
|
@@ -9239,7 +9237,7 @@ var Oi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9239
9237
|
"aria-haspopup": "true",
|
|
9240
9238
|
"aria-label": n,
|
|
9241
9239
|
...i,
|
|
9242
|
-
children: [/* @__PURE__ */ p(
|
|
9240
|
+
children: [/* @__PURE__ */ p(wi, { tenant: t }), e ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
9243
9241
|
className: "workspace-switcher-trigger-name",
|
|
9244
9242
|
children: t?.name
|
|
9245
9243
|
}), /* @__PURE__ */ p(H, {
|
|
@@ -9251,36 +9249,36 @@ var Oi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
9251
9249
|
});
|
|
9252
9250
|
//#endregion
|
|
9253
9251
|
//#region src/components/toast.js
|
|
9254
|
-
function
|
|
9255
|
-
|
|
9252
|
+
function Di() {
|
|
9253
|
+
di();
|
|
9256
9254
|
}
|
|
9257
|
-
var
|
|
9255
|
+
var Oi = /* @__PURE__ */ new Set([
|
|
9258
9256
|
"success",
|
|
9259
9257
|
"info",
|
|
9260
9258
|
"warning",
|
|
9261
9259
|
"error"
|
|
9262
9260
|
]);
|
|
9263
|
-
function
|
|
9261
|
+
function ki(e, t = "info") {
|
|
9264
9262
|
let n = "info", r = {};
|
|
9265
|
-
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);
|
|
9266
9264
|
}
|
|
9267
|
-
function
|
|
9268
|
-
|
|
9265
|
+
function Ai(e, t = {}) {
|
|
9266
|
+
li(e, "error", t);
|
|
9269
9267
|
}
|
|
9270
|
-
|
|
9268
|
+
ki.promise = (e, t, n = {}) => {
|
|
9271
9269
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
9272
|
-
return
|
|
9270
|
+
return ki(t.loading || "Loading...", {
|
|
9273
9271
|
...n,
|
|
9274
9272
|
variant: "info",
|
|
9275
9273
|
id: r,
|
|
9276
9274
|
duration: 0
|
|
9277
|
-
}), e.then((e) => (
|
|
9275
|
+
}), e.then((e) => (ki((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
9278
9276
|
...n,
|
|
9279
9277
|
variant: "success",
|
|
9280
9278
|
id: r,
|
|
9281
9279
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
9282
9280
|
}), e)).catch((e) => {
|
|
9283
|
-
throw
|
|
9281
|
+
throw ki((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
9284
9282
|
...n,
|
|
9285
9283
|
variant: "error",
|
|
9286
9284
|
id: r,
|
|
@@ -9290,7 +9288,7 @@ ji.promise = (e, t, n = {}) => {
|
|
|
9290
9288
|
};
|
|
9291
9289
|
//#endregion
|
|
9292
9290
|
//#region src/lib/usePagination.js
|
|
9293
|
-
function
|
|
9291
|
+
function ji(e, t = 10) {
|
|
9294
9292
|
let [n, r] = d(1), [i, a] = d(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
9295
9293
|
o(() => {
|
|
9296
9294
|
n > c && r(c);
|
|
@@ -9316,4 +9314,4 @@ function Ni(e, t = 10) {
|
|
|
9316
9314
|
};
|
|
9317
9315
|
}
|
|
9318
9316
|
//#endregion
|
|
9319
|
-
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 };
|