@webority/ui-react 0.13.3 → 0.13.5
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.
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
* @param {number} [props.sourceCount]
|
|
15
15
|
* @param {(row: object) => import('react').ReactNode} [props.rowActions]
|
|
16
16
|
* @param {string} [props.rowActionsLabel]
|
|
17
|
-
* @param {object} [props.pagination]
|
|
17
|
+
* @param {object} [props.pagination] The footer's state, usually straight from usePagination:
|
|
18
|
+
* `{ page, totalPages, pageSize, total, firstRow, lastRow, setPage, setPageSize }`, plus the
|
|
19
|
+
* optional `pageSizes` and `mode` that AppTablePagination takes. The footer shows once `total`
|
|
20
|
+
* is above 0 and stays in place while `loading`, so the table does not jump between pages.
|
|
18
21
|
* @param {string} [props.ariaLabel]
|
|
19
22
|
* @param {string} [props.className] Extra classes on the <table> (column/table styling).
|
|
20
23
|
* @param {string} [props.wrapperClassName] Extra classes on the `.table-wrap` outer div — the
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
* @param {(file: File|null) => void | (files: File[]) => void} props.onChange single-mode → File|null; multiple → File[]
|
|
18
18
|
* @param {boolean} [props.multiple=false]
|
|
19
19
|
* @param {string} [props.accept] Defaults to images; pass e.g. "image/*,application/pdf" for mixed.
|
|
20
|
-
*
|
|
20
|
+
* An empty string accepts any file type, and the hint then names no types.
|
|
21
|
+
* @param {number} [props.maxSizeMb] Defaults to the shared DEFAULT_MAX_SIZE_MB. 0 means no size
|
|
22
|
+
* limit: nothing is rejected for its size, and the hint names no size.
|
|
21
23
|
* @param {boolean} [props.optional=false]
|
|
22
24
|
* @param {boolean} [props.validate=true] Check each pick against `accept` and `maxSizeMb` and show
|
|
23
25
|
* the field's own message for a rejected file. Set false when the caller validates the files
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
* @param {boolean} [props.multiple=false]
|
|
18
18
|
* @param {number} [props.maxFiles] Cap on total files in multiple mode.
|
|
19
19
|
* @param {string} [props.accept=".jpg,.jpeg,.png"] Accepted file types (the `accept` attribute).
|
|
20
|
-
* @param {number} [props.maxSizeMb] Defaults to the shared DEFAULT_MAX_SIZE_MB.
|
|
20
|
+
* @param {number} [props.maxSizeMb] Defaults to the shared DEFAULT_MAX_SIZE_MB. 0 means no size
|
|
21
|
+
* limit: nothing is rejected for its size, and the hint names no size.
|
|
21
22
|
* @param {boolean} [props.required]
|
|
22
23
|
* @param {string} [props.error]
|
|
23
24
|
* @param {string} [props.hint] Helper text below the control; an error (the caller's or a rejected
|
package/dist/ui-react.js
CHANGED
|
@@ -2511,7 +2511,7 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2511
2511
|
children: I
|
|
2512
2512
|
}) : I
|
|
2513
2513
|
})]
|
|
2514
|
-
}), m &&
|
|
2514
|
+
}), m && m.total > 0 && /* @__PURE__ */ E(Ht, {
|
|
2515
2515
|
page: m.page,
|
|
2516
2516
|
totalPages: m.totalPages,
|
|
2517
2517
|
pageSize: m.pageSize,
|
|
@@ -2519,7 +2519,9 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2519
2519
|
firstRow: m.firstRow,
|
|
2520
2520
|
lastRow: m.lastRow,
|
|
2521
2521
|
onPageChange: m.setPage,
|
|
2522
|
-
onPageSizeChange: m.setPageSize
|
|
2522
|
+
onPageSizeChange: m.setPageSize,
|
|
2523
|
+
pageSizes: m.pageSizes,
|
|
2524
|
+
mode: m.mode
|
|
2523
2525
|
})] });
|
|
2524
2526
|
}
|
|
2525
2527
|
//#endregion
|
|
@@ -2809,8 +2811,8 @@ function rn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
2809
2811
|
//#region src/components/AppFileAttachment.jsx
|
|
2810
2812
|
function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = k, maxSizeMb: o = A, optional: c = !1, validate: l = !0, error: u, id: d, ...p }) {
|
|
2811
2813
|
U("AppFileAttachment", p);
|
|
2812
|
-
let m = s(), h = d || m, [g, _] = f(""), v = i && Array.isArray(t) ? t : t ? [t] : [], y = F(a), b = (e) => e instanceof File ? P(e) : y || P(e), x = !i && v.length === 1 && b(v[0]);
|
|
2813
|
-
function
|
|
2814
|
+
let m = s(), h = d || m, [g, _] = f(""), v = i && Array.isArray(t) ? t : t ? [t] : [], y = F(a), b = (e) => e instanceof File ? P(e) : y || P(e), x = !i && v.length === 1 && b(v[0]), S = on(a, o);
|
|
2815
|
+
function C(e) {
|
|
2814
2816
|
let n = Array.from(e.target.files || []);
|
|
2815
2817
|
if (e.target.value = "", !n.length) return;
|
|
2816
2818
|
let s = [], c = "";
|
|
@@ -2830,10 +2832,10 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2830
2832
|
r(e.concat(s.filter((e) => !n.has($t(e)))));
|
|
2831
2833
|
} else r(s[0]);
|
|
2832
2834
|
}
|
|
2833
|
-
function
|
|
2835
|
+
function w(e) {
|
|
2834
2836
|
_(""), r(i ? v.filter((t, n) => n !== e) : null);
|
|
2835
2837
|
}
|
|
2836
|
-
let
|
|
2838
|
+
let O = u || g, j = O ? `${h}-error` : void 0, M = i || v.length === 0, N = y ? "image" : "file", L = i ? `Add ${N}s` : `Add ${y ? "an" : "a"} ${N}`;
|
|
2837
2839
|
return /* @__PURE__ */ D("div", {
|
|
2838
2840
|
className: "field",
|
|
2839
2841
|
children: [
|
|
@@ -2861,14 +2863,9 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2861
2863
|
children: [/* @__PURE__ */ E("span", {
|
|
2862
2864
|
className: "attach-drop-title",
|
|
2863
2865
|
children: L
|
|
2864
|
-
}), /* @__PURE__ */
|
|
2866
|
+
}), S && /* @__PURE__ */ E("span", {
|
|
2865
2867
|
className: "attach-drop-hint",
|
|
2866
|
-
children:
|
|
2867
|
-
j(a),
|
|
2868
|
-
", up to ",
|
|
2869
|
-
o,
|
|
2870
|
-
" MB"
|
|
2871
|
-
]
|
|
2868
|
+
children: S
|
|
2872
2869
|
})]
|
|
2873
2870
|
}),
|
|
2874
2871
|
/* @__PURE__ */ E("span", {
|
|
@@ -2881,33 +2878,37 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2881
2878
|
type: "file",
|
|
2882
2879
|
className: "visually-hidden",
|
|
2883
2880
|
name: n,
|
|
2884
|
-
accept: a,
|
|
2881
|
+
accept: a || void 0,
|
|
2885
2882
|
multiple: i || void 0,
|
|
2886
|
-
"aria-describedby":
|
|
2887
|
-
onChange:
|
|
2883
|
+
"aria-describedby": j,
|
|
2884
|
+
onChange: C,
|
|
2888
2885
|
...p
|
|
2889
2886
|
})] }),
|
|
2890
|
-
x ? /* @__PURE__ */ E(
|
|
2887
|
+
x ? /* @__PURE__ */ E(sn, {
|
|
2891
2888
|
item: v[0],
|
|
2892
2889
|
isImage: !0,
|
|
2893
|
-
onRemove: () =>
|
|
2890
|
+
onRemove: () => w(0)
|
|
2894
2891
|
}) : v.length > 0 && /* @__PURE__ */ E("div", {
|
|
2895
2892
|
className: "attach-list",
|
|
2896
2893
|
children: v.map((e, t) => /* @__PURE__ */ E(rn, {
|
|
2897
2894
|
item: e,
|
|
2898
2895
|
isImage: b(e),
|
|
2899
|
-
onRemove: () =>
|
|
2896
|
+
onRemove: () => w(t)
|
|
2900
2897
|
}, $t(e)))
|
|
2901
2898
|
}),
|
|
2902
|
-
|
|
2899
|
+
O && /* @__PURE__ */ E("div", {
|
|
2903
2900
|
className: "field-error",
|
|
2904
2901
|
id: `${h}-error`,
|
|
2905
|
-
children:
|
|
2902
|
+
children: O
|
|
2906
2903
|
})
|
|
2907
2904
|
]
|
|
2908
2905
|
});
|
|
2909
2906
|
}
|
|
2910
|
-
function on(
|
|
2907
|
+
function on(e, t) {
|
|
2908
|
+
let n = e?.trim() ? j(e) : "", r = t > 0 ? `up to ${t} MB` : "";
|
|
2909
|
+
return n && r ? `${n}, ${r}` : r ? `Up to ${t} MB` : n;
|
|
2910
|
+
}
|
|
2911
|
+
function sn({ item: e, isImage: t, onRemove: n }) {
|
|
2911
2912
|
let r = nn(e, t), i = en(e), a = tn(e);
|
|
2912
2913
|
return /* @__PURE__ */ D("div", {
|
|
2913
2914
|
className: "attach-preview",
|
|
@@ -2940,7 +2941,7 @@ function on({ item: e, isImage: t, onRemove: n }) {
|
|
|
2940
2941
|
}
|
|
2941
2942
|
//#endregion
|
|
2942
2943
|
//#region src/components/AppFilePicker.jsx
|
|
2943
|
-
function
|
|
2944
|
+
function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, maxFiles: c, accept: l = ".jpg,.jpeg,.png", maxSizeMb: u = A, required: p, error: m, hint: h, loading: g = !1, className: _ = "", fieldClassName: v = "", style: y, ...b }) {
|
|
2944
2945
|
U("AppFilePicker", b);
|
|
2945
2946
|
let [x, S] = f(null), [C, w] = f(!1), [T, O] = f(""), k = d(null), M = s(), N = r || M;
|
|
2946
2947
|
o(() => {
|
|
@@ -3104,14 +3105,9 @@ function sn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3104
3105
|
children: "Click to upload"
|
|
3105
3106
|
}), " or drag & drop"]
|
|
3106
3107
|
}),
|
|
3107
|
-
/* @__PURE__ */
|
|
3108
|
+
/* @__PURE__ */ E("span", {
|
|
3108
3109
|
className: "file-input-text",
|
|
3109
|
-
children:
|
|
3110
|
-
j(l),
|
|
3111
|
-
" · up to ",
|
|
3112
|
-
u,
|
|
3113
|
-
" MB"
|
|
3114
|
-
]
|
|
3110
|
+
children: u > 0 ? `${j(l)} · up to ${u} MB` : j(l)
|
|
3115
3111
|
})
|
|
3116
3112
|
]
|
|
3117
3113
|
}),
|
|
@@ -3142,7 +3138,7 @@ function sn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3142
3138
|
}
|
|
3143
3139
|
//#endregion
|
|
3144
3140
|
//#region src/components/AppFloatingDock.jsx
|
|
3145
|
-
function
|
|
3141
|
+
function ln({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
3146
3142
|
return U("AppFloatingDock", s), /* @__PURE__ */ E("wui-dock", {
|
|
3147
3143
|
role: "navigation",
|
|
3148
3144
|
"aria-label": n,
|
|
@@ -3184,7 +3180,7 @@ function cn({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
3184
3180
|
}
|
|
3185
3181
|
//#endregion
|
|
3186
3182
|
//#region src/components/AppFormActions.jsx
|
|
3187
|
-
function
|
|
3183
|
+
function un({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
3188
3184
|
return U("AppFormActions", i), /* @__PURE__ */ E("div", {
|
|
3189
3185
|
className: [
|
|
3190
3186
|
"form-actions",
|
|
@@ -3198,7 +3194,7 @@ function ln({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
3198
3194
|
}
|
|
3199
3195
|
//#endregion
|
|
3200
3196
|
//#region src/components/AppFormRow.jsx
|
|
3201
|
-
function
|
|
3197
|
+
function dn({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
3202
3198
|
U("AppFormRow", r);
|
|
3203
3199
|
let { style: i, ...a } = r;
|
|
3204
3200
|
return /* @__PURE__ */ E("div", {
|
|
@@ -3213,7 +3209,7 @@ function un({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
3213
3209
|
}
|
|
3214
3210
|
//#endregion
|
|
3215
3211
|
//#region src/components/AppFormSection.jsx
|
|
3216
|
-
function
|
|
3212
|
+
function fn({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
3217
3213
|
return U("AppFormSection", i), /* @__PURE__ */ D("section", {
|
|
3218
3214
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
3219
3215
|
...i,
|
|
@@ -3234,7 +3230,7 @@ function dn({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
3234
3230
|
}
|
|
3235
3231
|
//#endregion
|
|
3236
3232
|
//#region src/components/AppInfoList.jsx
|
|
3237
|
-
function
|
|
3233
|
+
function pn({ items: e = [], className: t = "", ...n }) {
|
|
3238
3234
|
return U("AppInfoList", n), /* @__PURE__ */ E("div", {
|
|
3239
3235
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
3240
3236
|
...n,
|
|
@@ -3265,23 +3261,23 @@ function fn({ items: e = [], className: t = "", ...n }) {
|
|
|
3265
3261
|
}
|
|
3266
3262
|
//#endregion
|
|
3267
3263
|
//#region src/components/AppKpiTile.jsx
|
|
3268
|
-
var
|
|
3269
|
-
function hn(e) {
|
|
3270
|
-
if (!e || e.length < 2) return `0,${mn / 2} ${pn},${mn / 2}`;
|
|
3271
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r = pn / (e.length - 1);
|
|
3272
|
-
return e.map((e, i) => `${i * r},${n === 0 ? mn / 2 : mn - (e - t) / n * mn}`).join(" ");
|
|
3273
|
-
}
|
|
3264
|
+
var mn = 48, hn = 16;
|
|
3274
3265
|
function gn(e) {
|
|
3266
|
+
if (!e || e.length < 2) return `0,${hn / 2} ${mn},${hn / 2}`;
|
|
3267
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = mn / (e.length - 1);
|
|
3268
|
+
return e.map((e, i) => `${i * r},${n === 0 ? hn / 2 : hn - (e - t) / n * hn}`).join(" ");
|
|
3269
|
+
}
|
|
3270
|
+
function _n(e) {
|
|
3275
3271
|
if (typeof e != "string") return "flat";
|
|
3276
3272
|
let t = e.trim();
|
|
3277
3273
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
3278
3274
|
}
|
|
3279
|
-
function
|
|
3275
|
+
function vn({ 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: p, linkComponent: m, className: h = "", style: g, iconClassName: _ = "", labelClassName: v = "", valueClassName: y = "", captionClassName: b = "", deltaClassName: x = "", sparklineClassName: S = "", ...C }) {
|
|
3280
3276
|
U("AppKpiTile", C);
|
|
3281
3277
|
let w = `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" : ""}${h ? ` ${h}` : ""}`, T = typeof u == "number" && u > 0 ? {
|
|
3282
3278
|
...g,
|
|
3283
3279
|
"--wui-kpi-value-size": `${u}px`
|
|
3284
|
-
} : g, O = o ??
|
|
3280
|
+
} : g, O = o ?? _n(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
3285
3281
|
return p != null && (A = m ? {
|
|
3286
3282
|
as: m,
|
|
3287
3283
|
to: p
|
|
@@ -3319,12 +3315,12 @@ function _n({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3319
3315
|
}),
|
|
3320
3316
|
s && s.length > 0 && /* @__PURE__ */ E("svg", {
|
|
3321
3317
|
className: `kpi-sparkline${S ? ` ${S}` : ""}`,
|
|
3322
|
-
width:
|
|
3323
|
-
height:
|
|
3324
|
-
viewBox: `0 0 ${
|
|
3318
|
+
width: mn,
|
|
3319
|
+
height: hn,
|
|
3320
|
+
viewBox: `0 0 ${mn} ${hn}`,
|
|
3325
3321
|
"aria-hidden": "true",
|
|
3326
3322
|
children: /* @__PURE__ */ E("polyline", {
|
|
3327
|
-
points:
|
|
3323
|
+
points: gn(s),
|
|
3328
3324
|
stroke: "currentColor",
|
|
3329
3325
|
fill: "none"
|
|
3330
3326
|
})
|
|
@@ -3334,11 +3330,11 @@ function _n({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3334
3330
|
}
|
|
3335
3331
|
//#endregion
|
|
3336
3332
|
//#region src/components/AppLink.jsx
|
|
3337
|
-
var
|
|
3333
|
+
var yn = {
|
|
3338
3334
|
sm: 13,
|
|
3339
3335
|
md: 15,
|
|
3340
3336
|
lg: 18
|
|
3341
|
-
},
|
|
3337
|
+
}, bn = [
|
|
3342
3338
|
"underline",
|
|
3343
3339
|
"underline-center",
|
|
3344
3340
|
"static",
|
|
@@ -3352,35 +3348,35 @@ var vn = {
|
|
|
3352
3348
|
"shine",
|
|
3353
3349
|
"none"
|
|
3354
3350
|
];
|
|
3355
|
-
function
|
|
3351
|
+
function xn(e, t, n) {
|
|
3356
3352
|
if (!e) return null;
|
|
3357
3353
|
let r = `wui-link__ic wui-link__ic--${t}`;
|
|
3358
3354
|
return typeof e == "string" ? /* @__PURE__ */ E("span", {
|
|
3359
3355
|
className: r,
|
|
3360
3356
|
children: /* @__PURE__ */ E(Y, {
|
|
3361
3357
|
name: e,
|
|
3362
|
-
size:
|
|
3358
|
+
size: yn[n] ?? yn.md
|
|
3363
3359
|
})
|
|
3364
3360
|
}) : /* @__PURE__ */ E("span", {
|
|
3365
3361
|
className: r,
|
|
3366
3362
|
children: e
|
|
3367
3363
|
});
|
|
3368
3364
|
}
|
|
3369
|
-
function
|
|
3370
|
-
U("AppLink", d), W("AppLink", "animation", r,
|
|
3371
|
-
let f =
|
|
3365
|
+
function Sn({ children: e, label: t, href: n, animation: r = "underline", leftIcon: i = null, rightIcon: a = null, size: o = "md", external: s = !1, disabled: c = !1, linkComponent: l, className: u = "", ...d }) {
|
|
3366
|
+
U("AppLink", d), W("AppLink", "animation", r, bn), W("AppLink", "size", o, Object.keys(yn));
|
|
3367
|
+
let f = bn.includes(r) ? r : "underline", p = f === "icon" && !a && !i ? "arrow-right" : a, m = [
|
|
3372
3368
|
"wui-link",
|
|
3373
3369
|
`wui-link--${f}`,
|
|
3374
3370
|
o === "md" ? "" : `wui-link--${o}`,
|
|
3375
3371
|
c ? "is-disabled" : "",
|
|
3376
3372
|
u
|
|
3377
3373
|
].filter(Boolean).join(" "), h = /* @__PURE__ */ D(T, { children: [
|
|
3378
|
-
|
|
3374
|
+
xn(i, "left", o),
|
|
3379
3375
|
/* @__PURE__ */ E("span", {
|
|
3380
3376
|
className: "wui-link__label",
|
|
3381
3377
|
children: e ?? t
|
|
3382
3378
|
}),
|
|
3383
|
-
|
|
3379
|
+
xn(p, "right", o)
|
|
3384
3380
|
] });
|
|
3385
3381
|
return c ? /* @__PURE__ */ E("span", {
|
|
3386
3382
|
className: m,
|
|
@@ -3403,13 +3399,13 @@ function xn({ children: e, label: t, href: n, animation: r = "underline", leftIc
|
|
|
3403
3399
|
}
|
|
3404
3400
|
//#endregion
|
|
3405
3401
|
//#region src/components/AppLogoPicker.jsx
|
|
3406
|
-
var
|
|
3402
|
+
var Cn = {
|
|
3407
3403
|
sm: 72,
|
|
3408
3404
|
md: 120,
|
|
3409
3405
|
lg: 160
|
|
3410
3406
|
};
|
|
3411
|
-
function
|
|
3412
|
-
U("AppLogoPicker", k), W("AppLogoPicker", "size", typeof w == "string" ? w : null, Object.keys(
|
|
3407
|
+
function wn({ 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: u = A, overlayIcon: p = "image", overlayLabel: m = "Update photo", ariaLabel: h = "Upload photo", label: g, hint: _, error: v, layout: y = "stacked", title: b, subtitle: x, required: S = !1, variant: C = "initials", size: w = "md", shape: T = "circle", className: O = "", ...k }) {
|
|
3408
|
+
U("AppLogoPicker", k), W("AppLogoPicker", "size", typeof w == "string" ? w : null, Object.keys(Cn));
|
|
3413
3409
|
let j = d(null), M = s(), [N, P] = f(null), [F, L] = f(""), [R, z] = f(!1), [ee, B] = f(!1);
|
|
3414
3410
|
o(() => () => N && URL.revokeObjectURL(N), [N]), o(() => {
|
|
3415
3411
|
P(null), z(!1);
|
|
@@ -3435,7 +3431,7 @@ function Cn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3435
3431
|
t && oe(t);
|
|
3436
3432
|
}, G = () => {
|
|
3437
3433
|
P(null), L(""), z(!1), j.current && (j.current.value = ""), i?.();
|
|
3438
|
-
}, le = typeof w == "number" ? w :
|
|
3434
|
+
}, le = typeof w == "number" ? w : Cn[w] ?? Cn.md, ue = Math.max(14, Math.round(le * .18)), de = Math.round(le * .5), fe = [
|
|
3439
3435
|
"set-uploader",
|
|
3440
3436
|
C === "avatar" ? "set-uploader--avatar" : "",
|
|
3441
3437
|
T === "rounded" ? "set-uploader--rounded" : T === "square" ? "set-uploader--square" : "",
|
|
@@ -3565,27 +3561,27 @@ function Cn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3565
3561
|
}
|
|
3566
3562
|
//#endregion
|
|
3567
3563
|
//#region src/components/AppMeter.jsx
|
|
3568
|
-
var
|
|
3564
|
+
var Tn = [
|
|
3569
3565
|
"info",
|
|
3570
3566
|
"success",
|
|
3571
3567
|
"warning",
|
|
3572
3568
|
"danger",
|
|
3573
3569
|
"neutral"
|
|
3574
3570
|
];
|
|
3575
|
-
function
|
|
3571
|
+
function En(e, t, n) {
|
|
3576
3572
|
let r = n - t;
|
|
3577
3573
|
if (!(r > 0)) return 0;
|
|
3578
3574
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
3579
3575
|
return Number(i.toFixed(2));
|
|
3580
3576
|
}
|
|
3581
|
-
function
|
|
3577
|
+
function Dn(e, t, n, r, i) {
|
|
3582
3578
|
if (t == null && n == null) return i;
|
|
3583
3579
|
let a = "mid";
|
|
3584
3580
|
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";
|
|
3585
3581
|
}
|
|
3586
|
-
function
|
|
3582
|
+
function On({ 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 }) {
|
|
3587
3583
|
U("AppMeter", d);
|
|
3588
|
-
let f =
|
|
3584
|
+
let f = Dn(e, a, o, i, Tn.includes(r) ? r : "info"), p = En(e, t, n);
|
|
3589
3585
|
return /* @__PURE__ */ E("div", {
|
|
3590
3586
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
3591
3587
|
role: "meter",
|
|
@@ -3603,7 +3599,7 @@ function Dn({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
3603
3599
|
}
|
|
3604
3600
|
//#endregion
|
|
3605
3601
|
//#region src/components/AppMultiSelect.jsx
|
|
3606
|
-
var
|
|
3602
|
+
var kn = 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, allowCustom: f = !1, validateCustom: p, customPattern: m, customInvalidMessage: h, name: g, id: _, label: v, error: y, hint: b, required: x = !1, help: S, helpLabel: C = "More information", fieldClassName: w = "", ...T }, O) {
|
|
3607
3603
|
U("AppMultiSelect", T);
|
|
3608
3604
|
let k = s(), A = _ || k, { setRef: j, innerRef: M } = Q({
|
|
3609
3605
|
ref: O,
|
|
@@ -3666,7 +3662,7 @@ var On = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3666
3662
|
}) : null
|
|
3667
3663
|
]
|
|
3668
3664
|
});
|
|
3669
|
-
}),
|
|
3665
|
+
}), An = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", value: c, onChange: l, min: u, max: d, step: p = 1, precision: m = 0, unit: h, size: g = "md", id: _, name: v, className: b = "", fieldClassName: x = "", disabled: S = !1, ...C }, w) {
|
|
3670
3666
|
U("AppNumberInput", C);
|
|
3671
3667
|
let T = s(), O = _ || T, k = (e) => {
|
|
3672
3668
|
if (m === 0) return Math.round(e);
|
|
@@ -3789,7 +3785,7 @@ var On = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3789
3785
|
}) : null
|
|
3790
3786
|
]
|
|
3791
3787
|
});
|
|
3792
|
-
}),
|
|
3788
|
+
}), jn = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: o = !1, hint: c, error: l, disabled: u = !1, name: d, id: f, className: p = "", fieldClassName: m = "", ...h }, g) {
|
|
3793
3789
|
U("AppOtpInput", h);
|
|
3794
3790
|
let _ = s(), v = f || _, y = l ? `${v}-error` : void 0, b = c ? `${v}-hint` : void 0, x = y || b, { setRef: S } = Q({
|
|
3795
3791
|
ref: g,
|
|
@@ -3834,7 +3830,7 @@ var On = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3834
3830
|
});
|
|
3835
3831
|
//#endregion
|
|
3836
3832
|
//#region src/components/AppPageHeader.jsx
|
|
3837
|
-
function
|
|
3833
|
+
function Mn({ 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 = "", ...p }) {
|
|
3838
3834
|
U("AppPageHeader", p);
|
|
3839
3835
|
let m = [
|
|
3840
3836
|
"page-header",
|
|
@@ -3893,7 +3889,7 @@ function jn({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
3893
3889
|
}
|
|
3894
3890
|
//#endregion
|
|
3895
3891
|
//#region src/components/AppPagination.jsx
|
|
3896
|
-
function
|
|
3892
|
+
function Nn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
3897
3893
|
if (U("AppPagination", s), t <= 1) return null;
|
|
3898
3894
|
let c = zt(e, t, { siblingCount: r });
|
|
3899
3895
|
return /* @__PURE__ */ E("nav", {
|
|
@@ -3953,7 +3949,7 @@ function Mn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
3953
3949
|
}
|
|
3954
3950
|
//#endregion
|
|
3955
3951
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
3956
|
-
var
|
|
3952
|
+
var Pn = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name: i, id: a, label: o = "Phone number", placeholder: c, required: l = !1, error: u, showFlag: d = !0, showDialCode: f = !0, size: p = "md", fieldClassName: m = "", ...h }, g) {
|
|
3957
3953
|
U("AppPhoneNumberInput", h);
|
|
3958
3954
|
let _ = s(), v = a || _, y = u && v ? `${v}-error` : void 0, { setRef: b } = Q({
|
|
3959
3955
|
ref: g,
|
|
@@ -3994,7 +3990,7 @@ var Nn = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
3994
3990
|
});
|
|
3995
3991
|
//#endregion
|
|
3996
3992
|
//#region src/components/AppPricingCard.jsx
|
|
3997
|
-
function
|
|
3993
|
+
function Fn({ 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 }) {
|
|
3998
3994
|
return U("AppPricingCard", u), /* @__PURE__ */ D("div", {
|
|
3999
3995
|
className: [
|
|
4000
3996
|
"plan-card",
|
|
@@ -4048,21 +4044,21 @@ function Pn({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
4048
4044
|
}
|
|
4049
4045
|
//#endregion
|
|
4050
4046
|
//#region src/components/AppProgress.jsx
|
|
4051
|
-
var
|
|
4047
|
+
var In = [
|
|
4052
4048
|
"info",
|
|
4053
4049
|
"success",
|
|
4054
4050
|
"warning",
|
|
4055
4051
|
"danger",
|
|
4056
4052
|
"neutral"
|
|
4057
4053
|
];
|
|
4058
|
-
function
|
|
4054
|
+
function Ln(e, t) {
|
|
4059
4055
|
if (!(t > 0)) return 0;
|
|
4060
4056
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
4061
4057
|
return Number(n.toFixed(2));
|
|
4062
4058
|
}
|
|
4063
|
-
function
|
|
4059
|
+
function Rn({ 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 }) {
|
|
4064
4060
|
U("AppProgress", u);
|
|
4065
|
-
let d =
|
|
4061
|
+
let d = In.includes(n) ? n : "info", f = Ln(e, t), p = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, m = [
|
|
4066
4062
|
"progress-bar",
|
|
4067
4063
|
`wui-progress-${d}`,
|
|
4068
4064
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -4086,7 +4082,7 @@ function Ln({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
4086
4082
|
}
|
|
4087
4083
|
//#endregion
|
|
4088
4084
|
//#region src/components/AppRadio.jsx
|
|
4089
|
-
var
|
|
4085
|
+
var zn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
4090
4086
|
return U("AppRadio", o), /* @__PURE__ */ E(ht, {
|
|
4091
4087
|
ref: s,
|
|
4092
4088
|
label: e,
|
|
@@ -4102,7 +4098,7 @@ var Rn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
4102
4098
|
});
|
|
4103
4099
|
//#endregion
|
|
4104
4100
|
//#region src/components/AppRepeater.jsx
|
|
4105
|
-
function
|
|
4101
|
+
function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, addLabel: a = "Add another", removeLabel: o = "Remove row", emptyText: s, min: c = 0, max: l, numbered: u = !0, className: d = "", ...f }) {
|
|
4106
4102
|
U("AppRepeater", f);
|
|
4107
4103
|
let p = typeof l == "number" && e.length >= l, m = !!i && e.length > c;
|
|
4108
4104
|
return /* @__PURE__ */ D("div", {
|
|
@@ -4154,7 +4150,7 @@ function zn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4154
4150
|
}
|
|
4155
4151
|
//#endregion
|
|
4156
4152
|
//#region src/components/AppResourceCard.jsx
|
|
4157
|
-
function
|
|
4153
|
+
function Vn({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
4158
4154
|
U("AppResourceCard", s);
|
|
4159
4155
|
let c = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
4160
4156
|
className: "res-card-icon",
|
|
@@ -4188,7 +4184,7 @@ function Bn({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
4188
4184
|
}
|
|
4189
4185
|
//#endregion
|
|
4190
4186
|
//#region src/components/AppResult.jsx
|
|
4191
|
-
var
|
|
4187
|
+
var Hn = {
|
|
4192
4188
|
success: {
|
|
4193
4189
|
icon: "check-circle",
|
|
4194
4190
|
tone: "success"
|
|
@@ -4209,9 +4205,9 @@ var Vn = {
|
|
|
4209
4205
|
404: { tone: "muted" },
|
|
4210
4206
|
500: { tone: "muted" }
|
|
4211
4207
|
};
|
|
4212
|
-
function
|
|
4213
|
-
U("AppResult", s), W("AppResult", "status", e, Object.keys(
|
|
4214
|
-
let c =
|
|
4208
|
+
function Un({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
4209
|
+
U("AppResult", s), W("AppResult", "status", e, Object.keys(Hn));
|
|
4210
|
+
let c = Hn[e] || Hn.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
4215
4211
|
return /* @__PURE__ */ D("div", {
|
|
4216
4212
|
className: [
|
|
4217
4213
|
"result",
|
|
@@ -4249,7 +4245,7 @@ function Hn({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
4249
4245
|
}
|
|
4250
4246
|
//#endregion
|
|
4251
4247
|
//#region src/components/AppScrollbar.jsx
|
|
4252
|
-
function
|
|
4248
|
+
function Wn({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
4253
4249
|
return U("AppScrollbar", i), /* @__PURE__ */ E("div", {
|
|
4254
4250
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
4255
4251
|
style: n == null ? r : {
|
|
@@ -4262,7 +4258,7 @@ function Un({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
4262
4258
|
}
|
|
4263
4259
|
//#endregion
|
|
4264
4260
|
//#region src/components/AppSearch.jsx
|
|
4265
|
-
function
|
|
4261
|
+
function Gn({ 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 }) {
|
|
4266
4262
|
U("AppSearch", u);
|
|
4267
4263
|
let d = t || n;
|
|
4268
4264
|
return /* @__PURE__ */ D("div", {
|
|
@@ -4309,7 +4305,7 @@ function Wn({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
4309
4305
|
}
|
|
4310
4306
|
//#endregion
|
|
4311
4307
|
//#region src/components/AppSegmented.jsx
|
|
4312
|
-
function
|
|
4308
|
+
function Kn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: c = !1, disabled: u = !1, className: f = "", ...p }) {
|
|
4313
4309
|
U("AppSegmented", p);
|
|
4314
4310
|
let m = s(), h = i || m, g = d(null), _ = d(null), v = [
|
|
4315
4311
|
"segmented",
|
|
@@ -4383,7 +4379,7 @@ function Gn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
4383
4379
|
}
|
|
4384
4380
|
//#endregion
|
|
4385
4381
|
//#region src/components/AppSelect.jsx
|
|
4386
|
-
var
|
|
4382
|
+
var qn = (e) => e == null ? "" : e.label ?? e.text ?? "", Jn = 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: p, required: m = !1, error: h, hint: g, help: _, helpLabel: v = "More information", id: y, name: b, className: x = "", fieldClassName: S = "", "aria-label": C, "aria-labelledby": w, "aria-describedby": T, ...O }, k) {
|
|
4387
4383
|
U("AppSelect", O);
|
|
4388
4384
|
let A = s(), { setRef: j, innerRef: M } = Q({
|
|
4389
4385
|
ref: k,
|
|
@@ -4395,7 +4391,7 @@ var Kn = (e) => e == null ? "" : e.label ?? e.text ?? "", qn = i(function({ valu
|
|
|
4395
4391
|
if (!e) return;
|
|
4396
4392
|
let t = n.map((e) => ({
|
|
4397
4393
|
value: e.value,
|
|
4398
|
-
label:
|
|
4394
|
+
label: qn(e),
|
|
4399
4395
|
icon: e.icon
|
|
4400
4396
|
}));
|
|
4401
4397
|
Ke(t, e.options) || (e.options = t);
|
|
@@ -4456,7 +4452,7 @@ var Kn = (e) => e == null ? "" : e.label ?? e.text ?? "", qn = i(function({ valu
|
|
|
4456
4452
|
});
|
|
4457
4453
|
//#endregion
|
|
4458
4454
|
//#region src/components/AppShell.jsx
|
|
4459
|
-
function
|
|
4455
|
+
function Yn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r, sidebarFooter: i, topbarStart: a, topbarEnd: s, footer: c, children: l, collapsed: u, onCollapsedChange: d, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
|
|
4460
4456
|
U("AppShell", _);
|
|
4461
4457
|
let [v, y] = f(!1), [b, x] = f(!1), [S, C] = f(!1), w = u ?? v, T = () => {
|
|
4462
4458
|
let e = !w;
|
|
@@ -4504,7 +4500,7 @@ function Jn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4504
4500
|
children: [e.label && /* @__PURE__ */ E("div", {
|
|
4505
4501
|
className: "app-nav-group-label",
|
|
4506
4502
|
children: e.label
|
|
4507
|
-
}), e.items.map((e) => /* @__PURE__ */ E(
|
|
4503
|
+
}), e.items.map((e) => /* @__PURE__ */ E(Xn, {
|
|
4508
4504
|
item: e,
|
|
4509
4505
|
linkComponent: h,
|
|
4510
4506
|
onNavigate: () => x(!1)
|
|
@@ -4571,7 +4567,7 @@ function Jn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4571
4567
|
]
|
|
4572
4568
|
});
|
|
4573
4569
|
}
|
|
4574
|
-
function
|
|
4570
|
+
function Xn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
4575
4571
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = f(a);
|
|
4576
4572
|
o(() => {
|
|
4577
4573
|
a && !s && c(!0);
|
|
@@ -4613,7 +4609,7 @@ function Yn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4613
4609
|
"aria-hidden": !s || void 0,
|
|
4614
4610
|
children: /* @__PURE__ */ E("div", {
|
|
4615
4611
|
className: "app-nav-sub-inner",
|
|
4616
|
-
children: e.children.map((e) => /* @__PURE__ */ E(
|
|
4612
|
+
children: e.children.map((e) => /* @__PURE__ */ E(Xn, {
|
|
4617
4613
|
item: e,
|
|
4618
4614
|
linkComponent: t,
|
|
4619
4615
|
onNavigate: n,
|
|
@@ -4654,7 +4650,7 @@ function Yn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4654
4650
|
}
|
|
4655
4651
|
//#endregion
|
|
4656
4652
|
//#region src/components/AppSidebarMenu.jsx
|
|
4657
|
-
var
|
|
4653
|
+
var Zn = {
|
|
4658
4654
|
left: "start",
|
|
4659
4655
|
right: "end",
|
|
4660
4656
|
start: "start",
|
|
@@ -4662,9 +4658,9 @@ var Xn = {
|
|
|
4662
4658
|
top: "top",
|
|
4663
4659
|
bottom: "bottom"
|
|
4664
4660
|
};
|
|
4665
|
-
function
|
|
4666
|
-
U("AppSidebarMenu", v), W("AppSidebarMenu", "side", n, Object.keys(
|
|
4667
|
-
let { style: y, ...b } = v, S =
|
|
4661
|
+
function Qn({ 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: p = !0, responsive: m, className: h = "", bodyClassName: g = "", ariaLabel: _, ...v }) {
|
|
4662
|
+
U("AppSidebarMenu", v), W("AppSidebarMenu", "side", n, Object.keys(Zn));
|
|
4663
|
+
let { style: y, ...b } = v, S = Zn[n] || "end", C = c || l || y ? {
|
|
4668
4664
|
...c && { "--asm-width": c },
|
|
4669
4665
|
...l && { "--asm-max-width": l },
|
|
4670
4666
|
...y
|
|
@@ -4717,7 +4713,7 @@ function Zn({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
4717
4713
|
}
|
|
4718
4714
|
//#endregion
|
|
4719
4715
|
//#region src/components/AppSlider.jsx
|
|
4720
|
-
var
|
|
4716
|
+
var $n = 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: p, min: m = 0, max: h = 100, step: g = 1, disabled: _, size: v, showValue: y, unit: b, id: x, ariaLabel: S, className: C = "", fieldClassName: w = "", ...T }, O) {
|
|
4721
4717
|
U("AppSlider", T);
|
|
4722
4718
|
let k = s(), A = x || k, j = r, { setRef: M, innerRef: N } = Q({
|
|
4723
4719
|
ref: O,
|
|
@@ -4778,14 +4774,14 @@ var Qn = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
4778
4774
|
})
|
|
4779
4775
|
]
|
|
4780
4776
|
});
|
|
4781
|
-
}),
|
|
4777
|
+
}), er = {
|
|
4782
4778
|
sm: 44,
|
|
4783
4779
|
md: 56,
|
|
4784
4780
|
lg: 72
|
|
4785
4781
|
};
|
|
4786
|
-
function
|
|
4787
|
-
U("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(
|
|
4788
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
4782
|
+
function tr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
4783
|
+
U("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(er));
|
|
4784
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : er[a] ?? er.md, f = i === "ring" ? /* @__PURE__ */ E("span", {
|
|
4789
4785
|
className: "splash-ring",
|
|
4790
4786
|
"aria-hidden": "true"
|
|
4791
4787
|
}) : i === "dots" ? /* @__PURE__ */ D("span", {
|
|
@@ -4832,7 +4828,7 @@ function er({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
4832
4828
|
}
|
|
4833
4829
|
//#endregion
|
|
4834
4830
|
//#region src/components/AppStatusBadge.jsx
|
|
4835
|
-
function
|
|
4831
|
+
function nr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tooltipPlacement: i, ...a }) {
|
|
4836
4832
|
return U("AppStatusBadge", a), e == null || e === "" ? "-" : K(/* @__PURE__ */ E("span", {
|
|
4837
4833
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
4838
4834
|
...a,
|
|
@@ -4841,7 +4837,7 @@ function tr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tool
|
|
|
4841
4837
|
}
|
|
4842
4838
|
//#endregion
|
|
4843
4839
|
//#region src/components/AppStepper.jsx
|
|
4844
|
-
function
|
|
4840
|
+
function rr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
4845
4841
|
U("AppStepper", c);
|
|
4846
4842
|
let l = t === "journey";
|
|
4847
4843
|
return /* @__PURE__ */ E("nav", {
|
|
@@ -4854,7 +4850,7 @@ function nr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4854
4850
|
"aria-label": a,
|
|
4855
4851
|
...c,
|
|
4856
4852
|
children: e.map((t, n) => {
|
|
4857
|
-
let a = t.status ||
|
|
4853
|
+
let a = t.status || ir(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
4858
4854
|
c = a === "done" ? /* @__PURE__ */ E(Y, {
|
|
4859
4855
|
name: "check",
|
|
4860
4856
|
size: 14
|
|
@@ -4918,12 +4914,12 @@ function nr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4918
4914
|
})
|
|
4919
4915
|
});
|
|
4920
4916
|
}
|
|
4921
|
-
function
|
|
4917
|
+
function ir(e, t) {
|
|
4922
4918
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
4923
4919
|
}
|
|
4924
4920
|
//#endregion
|
|
4925
4921
|
//#region src/components/AppSwitch.jsx
|
|
4926
|
-
var
|
|
4922
|
+
var ar = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
4927
4923
|
return U("AppSwitch", s), /* @__PURE__ */ E(ht, {
|
|
4928
4924
|
ref: c,
|
|
4929
4925
|
label: e,
|
|
@@ -4939,7 +4935,7 @@ var ir = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
4939
4935
|
});
|
|
4940
4936
|
//#endregion
|
|
4941
4937
|
//#region src/components/AppTableEmptyState.jsx
|
|
4942
|
-
function
|
|
4938
|
+
function or({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
4943
4939
|
return U("AppTableEmptyState", i), /* @__PURE__ */ D("div", {
|
|
4944
4940
|
className: "tbl-empty",
|
|
4945
4941
|
...i,
|
|
@@ -4965,8 +4961,8 @@ function ar({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
4965
4961
|
}
|
|
4966
4962
|
//#endregion
|
|
4967
4963
|
//#region src/components/AppTabs.jsx
|
|
4968
|
-
var
|
|
4969
|
-
function
|
|
4964
|
+
var sr = 1, cr = 28, lr = .7;
|
|
4965
|
+
function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "underline", orientation: s = "horizontal", size: c = "md", fitted: u = !1, activation: p = "automatic", ariaLabel: m, className: h = "", style: g, ..._ }) {
|
|
4970
4966
|
U("AppTabs", _);
|
|
4971
4967
|
let v = d(null), y = d(null), b = s === "vertical", [x, S] = f(t);
|
|
4972
4968
|
o(() => {
|
|
@@ -4978,7 +4974,7 @@ function lr({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
4978
4974
|
let e = v.current, t = y.current;
|
|
4979
4975
|
if (!e || !t || b) return;
|
|
4980
4976
|
let n = e.scrollWidth - e.clientWidth;
|
|
4981
|
-
t.classList.toggle("is-overflow-start", e.scrollLeft >
|
|
4977
|
+
t.classList.toggle("is-overflow-start", e.scrollLeft > sr), t.classList.toggle("is-overflow-end", n > sr && e.scrollLeft < n - sr);
|
|
4982
4978
|
}, [b]), M = a(() => {
|
|
4983
4979
|
let n = v.current;
|
|
4984
4980
|
if (!n) return;
|
|
@@ -4994,7 +4990,7 @@ function lr({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
4994
4990
|
if (!e || b) return;
|
|
4995
4991
|
let t = e.querySelector(".app-tab.active");
|
|
4996
4992
|
if (!t) return;
|
|
4997
|
-
let n =
|
|
4993
|
+
let n = cr, r = t.offsetLeft, i = r + t.offsetWidth;
|
|
4998
4994
|
r - n < e.scrollLeft ? e.scrollLeft = Math.max(0, r - n) : i + n > e.scrollLeft + e.clientWidth && (e.scrollLeft = i + n - e.clientWidth);
|
|
4999
4995
|
}, [b]);
|
|
5000
4996
|
l(() => {
|
|
@@ -5029,7 +5025,7 @@ function lr({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5029
5025
|
}
|
|
5030
5026
|
let I = (e) => {
|
|
5031
5027
|
let t = v.current;
|
|
5032
|
-
t && t.scrollBy({ left: e * t.clientWidth *
|
|
5028
|
+
t && t.scrollBy({ left: e * t.clientWidth * lr });
|
|
5033
5029
|
}, L = [
|
|
5034
5030
|
"app-tabs",
|
|
5035
5031
|
i === "pills" ? "app-tabs-pills" : "",
|
|
@@ -5142,7 +5138,7 @@ function lr({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5142
5138
|
}
|
|
5143
5139
|
//#endregion
|
|
5144
5140
|
//#region src/components/AppTagInput.jsx
|
|
5145
|
-
var
|
|
5141
|
+
var dr = 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: p, ariaLabel: m, className: h = "", fieldClassName: g = "", help: _, helpLabel: v = "More information", ...y }, b) {
|
|
5146
5142
|
U("AppTagInput", y);
|
|
5147
5143
|
let x = s(), S = p || x, { setRef: C } = Q({
|
|
5148
5144
|
ref: b,
|
|
@@ -5193,7 +5189,7 @@ var ur = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5193
5189
|
}) : null
|
|
5194
5190
|
]
|
|
5195
5191
|
});
|
|
5196
|
-
}),
|
|
5192
|
+
}), fr = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: c = "More information", id: u, name: p, rows: m = 4, autoGrow: h = !1, showCount: g = !1, maxLength: _, className: v = "", fieldClassName: b = "", ...x }, S) {
|
|
5197
5193
|
U("AppTextarea", x);
|
|
5198
5194
|
let C = s(), w = u || C, T = [
|
|
5199
5195
|
"textarea",
|
|
@@ -5264,7 +5260,7 @@ var ur = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5264
5260
|
})
|
|
5265
5261
|
]
|
|
5266
5262
|
});
|
|
5267
|
-
}),
|
|
5263
|
+
}), pr = {
|
|
5268
5264
|
done: "check",
|
|
5269
5265
|
current: "clock",
|
|
5270
5266
|
"on-hold": "lock",
|
|
@@ -5273,7 +5269,7 @@ var ur = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5273
5269
|
skipped: "arrow-right",
|
|
5274
5270
|
upcoming: null
|
|
5275
5271
|
};
|
|
5276
|
-
function
|
|
5272
|
+
function mr({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
5277
5273
|
U("AppTimeline", o);
|
|
5278
5274
|
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;
|
|
5279
5275
|
return /* @__PURE__ */ E("ol", {
|
|
@@ -5284,7 +5280,7 @@ function pr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5284
5280
|
} : a,
|
|
5285
5281
|
...o,
|
|
5286
5282
|
children: e.map((e, t) => {
|
|
5287
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
5283
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? pr[n] : void 0) : e.icon || "circle";
|
|
5288
5284
|
return /* @__PURE__ */ D("li", {
|
|
5289
5285
|
className: `timeline-item${r}${i}`,
|
|
5290
5286
|
children: [/* @__PURE__ */ E("span", {
|
|
@@ -5354,7 +5350,7 @@ function pr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5354
5350
|
}
|
|
5355
5351
|
//#endregion
|
|
5356
5352
|
//#region src/components/AppTimePicker.jsx
|
|
5357
|
-
var
|
|
5353
|
+
var hr = 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: p, size: m, id: h, ariaLabel: g, className: _ = "", fieldClassName: v = "", ...y }, b) {
|
|
5358
5354
|
U("AppTimePicker", y);
|
|
5359
5355
|
let x = s(), S = h || o || x, { setRef: C } = Q({
|
|
5360
5356
|
ref: b,
|
|
@@ -5399,35 +5395,35 @@ var mr = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
5399
5395
|
})
|
|
5400
5396
|
]
|
|
5401
5397
|
});
|
|
5402
|
-
}),
|
|
5403
|
-
function
|
|
5404
|
-
for (let e of
|
|
5398
|
+
}), gr = 6, $ = [], _r = /* @__PURE__ */ new Set(), vr = /* @__PURE__ */ new Map(), yr = /* @__PURE__ */ new Set(), br = 0;
|
|
5399
|
+
function xr() {
|
|
5400
|
+
for (let e of _r) e($);
|
|
5405
5401
|
}
|
|
5406
|
-
function
|
|
5407
|
-
let t =
|
|
5408
|
-
t !== void 0 && (clearTimeout(t),
|
|
5402
|
+
function Sr(e) {
|
|
5403
|
+
let t = vr.get(e);
|
|
5404
|
+
t !== void 0 && (clearTimeout(t), vr.delete(e));
|
|
5409
5405
|
}
|
|
5410
|
-
function
|
|
5411
|
-
if (e.length <=
|
|
5406
|
+
function Cr(e, t) {
|
|
5407
|
+
if (e.length <= gr) return e;
|
|
5412
5408
|
let n = [...e], r = [];
|
|
5413
|
-
for (; n.length >
|
|
5409
|
+
for (; n.length > gr;) {
|
|
5414
5410
|
let e = n.findIndex((e) => e.id !== t && e.duration !== 0);
|
|
5415
5411
|
r.push(n.splice(e === -1 ? n.findIndex((e) => e.id !== t) : e, 1)[0]);
|
|
5416
5412
|
}
|
|
5417
|
-
for (let e of r)
|
|
5413
|
+
for (let e of r) Sr(e.id), yr.delete(e.id);
|
|
5418
5414
|
return n;
|
|
5419
5415
|
}
|
|
5420
|
-
function
|
|
5421
|
-
return
|
|
5422
|
-
if (
|
|
5416
|
+
function wr(e) {
|
|
5417
|
+
return _r.add(e), e($), () => {
|
|
5418
|
+
if (_r.delete(e), _r.size === 0) for (let e of $) e.duration > 0 && !vr.has(e.id) && (yr.delete(e.id), vr.set(e.id, setTimeout(() => Dr(e.id), e.duration)));
|
|
5423
5419
|
};
|
|
5424
5420
|
}
|
|
5425
|
-
function
|
|
5421
|
+
function Tr(e, t, n = {}) {
|
|
5426
5422
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
5427
5423
|
if (r) {
|
|
5428
5424
|
let i = $.find((e) => e.externalId === r);
|
|
5429
5425
|
if (i) {
|
|
5430
|
-
|
|
5426
|
+
Sr(i.id);
|
|
5431
5427
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
5432
5428
|
$ = $.map((a) => a.id === i.id ? {
|
|
5433
5429
|
...a,
|
|
@@ -5440,12 +5436,12 @@ function wr(e, t, n = {}) {
|
|
|
5440
5436
|
shape: n.shape,
|
|
5441
5437
|
surface: n.surface,
|
|
5442
5438
|
progress: n.progress
|
|
5443
|
-
} : a),
|
|
5439
|
+
} : a), xr(), r > 0 && !yr.has(i.id) && vr.set(i.id, setTimeout(() => Dr(i.id), r));
|
|
5444
5440
|
return;
|
|
5445
5441
|
}
|
|
5446
5442
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
5447
|
-
let a = ++
|
|
5448
|
-
$ =
|
|
5443
|
+
let a = ++br, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
5444
|
+
$ = Cr([...$, {
|
|
5449
5445
|
id: a,
|
|
5450
5446
|
externalId: r,
|
|
5451
5447
|
message: e,
|
|
@@ -5458,25 +5454,25 @@ function wr(e, t, n = {}) {
|
|
|
5458
5454
|
surface: n.surface,
|
|
5459
5455
|
progress: n.progress,
|
|
5460
5456
|
key: i
|
|
5461
|
-
}], a),
|
|
5462
|
-
}
|
|
5463
|
-
function Tr(e) {
|
|
5464
|
-
xr(e), vr.add(e);
|
|
5457
|
+
}], a), xr(), o > 0 && vr.set(a, setTimeout(() => Dr(a), o));
|
|
5465
5458
|
}
|
|
5466
5459
|
function Er(e) {
|
|
5467
|
-
|
|
5460
|
+
Sr(e), yr.add(e);
|
|
5461
|
+
}
|
|
5462
|
+
function Dr(e) {
|
|
5463
|
+
Sr(e), yr.delete(e);
|
|
5468
5464
|
let t = $.filter((t) => t.id !== e);
|
|
5469
|
-
t.length !== $.length && ($ = t,
|
|
5465
|
+
t.length !== $.length && ($ = t, xr());
|
|
5470
5466
|
}
|
|
5471
|
-
function
|
|
5472
|
-
if (!($.length === 0 &&
|
|
5473
|
-
for (let e of
|
|
5474
|
-
|
|
5467
|
+
function Or() {
|
|
5468
|
+
if (!($.length === 0 && vr.size === 0 && yr.size === 0)) {
|
|
5469
|
+
for (let e of vr.values()) clearTimeout(e);
|
|
5470
|
+
vr.clear(), yr.clear(), $.length !== 0 && ($ = [], xr());
|
|
5475
5471
|
}
|
|
5476
5472
|
}
|
|
5477
5473
|
//#endregion
|
|
5478
5474
|
//#region src/components/AppToast.jsx
|
|
5479
|
-
var
|
|
5475
|
+
var kr = {
|
|
5480
5476
|
success: {
|
|
5481
5477
|
icon: "check-circle",
|
|
5482
5478
|
assertive: !1
|
|
@@ -5493,7 +5489,7 @@ var Or = {
|
|
|
5493
5489
|
icon: "alert-circle",
|
|
5494
5490
|
assertive: !0
|
|
5495
5491
|
}
|
|
5496
|
-
},
|
|
5492
|
+
}, Ar = {
|
|
5497
5493
|
"top-start": "top-0 start-0",
|
|
5498
5494
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
5499
5495
|
"top-end": "top-0 end-0",
|
|
@@ -5501,21 +5497,21 @@ var Or = {
|
|
|
5501
5497
|
"bottom-start": "bottom-0 start-0",
|
|
5502
5498
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
5503
5499
|
"bottom-end": "bottom-0 end-0"
|
|
5504
|
-
},
|
|
5500
|
+
}, jr = 64, Mr = /* @__PURE__ */ new Set([
|
|
5505
5501
|
"rise",
|
|
5506
5502
|
"organic",
|
|
5507
5503
|
"jelly",
|
|
5508
5504
|
"spring"
|
|
5509
|
-
]),
|
|
5505
|
+
]), Nr = /* @__PURE__ */ new Set([
|
|
5510
5506
|
"rounded",
|
|
5511
5507
|
"pill",
|
|
5512
5508
|
"sharp"
|
|
5513
|
-
]),
|
|
5514
|
-
function
|
|
5515
|
-
U("AppToast", s), W("AppToast", "position", e, Object.keys(
|
|
5509
|
+
]), Pr = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
5510
|
+
function Fr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
5511
|
+
U("AppToast", s), W("AppToast", "position", e, Object.keys(Ar)), W("AppToast", "animation", n, Mr), W("AppToast", "shape", r, Nr), W("AppToast", "surface", i, Pr);
|
|
5516
5512
|
let [c, l] = f([]);
|
|
5517
|
-
o(() =>
|
|
5518
|
-
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p =
|
|
5513
|
+
o(() => wr(l), []);
|
|
5514
|
+
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p = Ar[e] ?? Ar["bottom-end"];
|
|
5519
5515
|
return /* @__PURE__ */ D("div", {
|
|
5520
5516
|
...s,
|
|
5521
5517
|
className: `wui-toast-container toast-container position-fixed ${p} p-3 ${a}`.trim(),
|
|
@@ -5527,7 +5523,7 @@ function Pr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5527
5523
|
u,
|
|
5528
5524
|
" more"
|
|
5529
5525
|
]
|
|
5530
|
-
}), d.map((e) => /* @__PURE__ */ E(
|
|
5526
|
+
}), d.map((e) => /* @__PURE__ */ E(Ir, {
|
|
5531
5527
|
toast: e,
|
|
5532
5528
|
defaultAnimation: n,
|
|
5533
5529
|
defaultShape: r,
|
|
@@ -5535,14 +5531,14 @@ function Pr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5535
5531
|
}, e.id))]
|
|
5536
5532
|
});
|
|
5537
5533
|
}
|
|
5538
|
-
function
|
|
5539
|
-
let i =
|
|
5534
|
+
function Ir({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
5535
|
+
let i = kr[e.variant] ?? kr.success, a = Mr.has(e.animation) ? e.animation : t, s = Nr.has(e.shape) ? e.shape : n, c = Pr.has(e.surface) ? e.surface : r, l = (a !== "rise" && Mr.has(a) ? ` wui-toast--anim-${a}` : "") + (s !== "rounded" && Nr.has(s) ? ` wui-toast--shape-${s}` : "") + (c === "inverse" ? " wui-toast--surface-inverse" : ""), u = e.duration === 0, [p, m] = f(0), [h, g] = f(!1), _ = d(null), v = () => Dr(e.id), y = d(null);
|
|
5540
5536
|
o(() => {
|
|
5541
5537
|
if (e.duration === 0) return;
|
|
5542
|
-
|
|
5538
|
+
Er(e.id);
|
|
5543
5539
|
let t = y.current, n = t == null ? "" : getComputedStyle(t).animationName;
|
|
5544
5540
|
if (t != null && (typeof t.getAnimations == "function" ? t.getAnimations().length > 0 : n !== "" && n !== "none")) return;
|
|
5545
|
-
let r = setTimeout(() =>
|
|
5541
|
+
let r = setTimeout(() => Dr(e.id), e.duration);
|
|
5546
5542
|
return () => clearTimeout(r);
|
|
5547
5543
|
}, [e.id, e.duration]);
|
|
5548
5544
|
let b = (e) => {
|
|
@@ -5554,7 +5550,7 @@ function Fr({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5554
5550
|
}, C = (e) => {
|
|
5555
5551
|
if (_.current === null) return;
|
|
5556
5552
|
let t = e.clientX - _.current;
|
|
5557
|
-
if (Math.abs(t) >
|
|
5553
|
+
if (Math.abs(t) > jr) {
|
|
5558
5554
|
v();
|
|
5559
5555
|
return;
|
|
5560
5556
|
}
|
|
@@ -5638,7 +5634,7 @@ function Fr({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5638
5634
|
}
|
|
5639
5635
|
//#endregion
|
|
5640
5636
|
//#region src/components/AppToolbar.jsx
|
|
5641
|
-
function
|
|
5637
|
+
function Lr({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
5642
5638
|
U("AppToolbar", u);
|
|
5643
5639
|
let d = s(), p = o || d, [m, h] = f(r), g = n === void 0 ? m : n;
|
|
5644
5640
|
return /* @__PURE__ */ D("div", {
|
|
@@ -5696,7 +5692,7 @@ function Ir({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
5696
5692
|
}
|
|
5697
5693
|
//#endregion
|
|
5698
5694
|
//#region src/components/AppWizard.jsx
|
|
5699
|
-
var
|
|
5695
|
+
var Rr = i(function({ steps: t = [], children: n, active: r, defaultActive: i = 0, onStepChange: a, onFinish: s, onSkip: c, beforeNext: l, onInvalid: u, variant: f = "steps", tone: p, orientation: m = "horizontal", skippable: h = !1, nonLinear: g = !1, hideStepper: _ = !1, disabled: v = !1, label: y = "Progress", backLabel: b = "Back", nextLabel: x = "Next", skipLabel: S = "Skip", finishLabel: C = "Finish", className: w = "", ...T }, D) {
|
|
5700
5696
|
U("AppWizard", T);
|
|
5701
5697
|
let O = d(null), k = (e) => {
|
|
5702
5698
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -5748,13 +5744,13 @@ var Lr = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
5748
5744
|
children: A[t]
|
|
5749
5745
|
}, e.key ?? `${e.label}-${t}`))
|
|
5750
5746
|
});
|
|
5751
|
-
}),
|
|
5747
|
+
}), zr = /* @__PURE__ */ new Set([
|
|
5752
5748
|
"ArrowUp",
|
|
5753
5749
|
"ArrowDown",
|
|
5754
5750
|
"ArrowLeft",
|
|
5755
5751
|
"ArrowRight"
|
|
5756
5752
|
]);
|
|
5757
|
-
function
|
|
5753
|
+
function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAction: i, linkComponent: a, searchable: s = !1, onCreate: c, canCreate: l = !1, createLabel: p = "Create workspace", compact: m = !1, size: h = "md", ariaLabel: g, ..._ }) {
|
|
5758
5754
|
let { onToggle: y, ...b } = _;
|
|
5759
5755
|
U("AppWorkspaceSwitcher", b);
|
|
5760
5756
|
let [x, S] = f(""), [C, w] = f(!1), T = d(null), O = (e, t) => {
|
|
@@ -5774,7 +5770,7 @@ function zr({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5774
5770
|
let e = T.current;
|
|
5775
5771
|
if (!e) return;
|
|
5776
5772
|
let t = (e) => {
|
|
5777
|
-
if (
|
|
5773
|
+
if (zr.has(e.key)) {
|
|
5778
5774
|
e.stopPropagation();
|
|
5779
5775
|
return;
|
|
5780
5776
|
}
|
|
@@ -5792,7 +5788,7 @@ function zr({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5792
5788
|
onToggle: O,
|
|
5793
5789
|
...b,
|
|
5794
5790
|
children: [/* @__PURE__ */ E(v.Toggle, {
|
|
5795
|
-
as:
|
|
5791
|
+
as: Wr,
|
|
5796
5792
|
compact: m,
|
|
5797
5793
|
tenant: k,
|
|
5798
5794
|
"aria-label": M
|
|
@@ -5827,7 +5823,7 @@ function zr({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5827
5823
|
className: `workspace-switcher-option${e.id === k?.id ? " is-active" : ""}`,
|
|
5828
5824
|
onClick: () => n?.(e),
|
|
5829
5825
|
children: [
|
|
5830
|
-
/* @__PURE__ */ E(
|
|
5826
|
+
/* @__PURE__ */ E(Hr, { tenant: e }),
|
|
5831
5827
|
/* @__PURE__ */ E("span", {
|
|
5832
5828
|
className: "workspace-switcher-option-name",
|
|
5833
5829
|
children: e.name
|
|
@@ -5859,17 +5855,17 @@ function zr({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5859
5855
|
}) : null,
|
|
5860
5856
|
i ? /* @__PURE__ */ E("div", {
|
|
5861
5857
|
className: "workspace-switcher-footer",
|
|
5862
|
-
children:
|
|
5858
|
+
children: Ur(i, a)
|
|
5863
5859
|
}) : null
|
|
5864
5860
|
]
|
|
5865
5861
|
})]
|
|
5866
5862
|
});
|
|
5867
5863
|
}
|
|
5868
|
-
function
|
|
5864
|
+
function Vr(e) {
|
|
5869
5865
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
5870
5866
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
5871
5867
|
}
|
|
5872
|
-
function
|
|
5868
|
+
function Hr({ tenant: e }) {
|
|
5873
5869
|
return e?.logoUrl ? /* @__PURE__ */ E("img", {
|
|
5874
5870
|
className: "workspace-switcher-mark",
|
|
5875
5871
|
src: e.logoUrl,
|
|
@@ -5877,10 +5873,10 @@ function Vr({ tenant: e }) {
|
|
|
5877
5873
|
loading: "lazy"
|
|
5878
5874
|
}) : /* @__PURE__ */ E("span", {
|
|
5879
5875
|
className: "workspace-switcher-mark",
|
|
5880
|
-
children:
|
|
5876
|
+
children: Vr(e?.name)
|
|
5881
5877
|
});
|
|
5882
5878
|
}
|
|
5883
|
-
function
|
|
5879
|
+
function Ur(e, t) {
|
|
5884
5880
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
5885
5881
|
let { label: n, icon: r, href: i } = e;
|
|
5886
5882
|
return /* @__PURE__ */ D(i ? t ?? "a" : "button", {
|
|
@@ -5892,7 +5888,7 @@ function Hr(e, t) {
|
|
|
5892
5888
|
}) : null, n]
|
|
5893
5889
|
});
|
|
5894
5890
|
}
|
|
5895
|
-
var
|
|
5891
|
+
var Wr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
5896
5892
|
return /* @__PURE__ */ D("button", {
|
|
5897
5893
|
ref: a,
|
|
5898
5894
|
type: "button",
|
|
@@ -5900,7 +5896,7 @@ var Ur = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5900
5896
|
"aria-haspopup": "true",
|
|
5901
5897
|
"aria-label": n,
|
|
5902
5898
|
...i,
|
|
5903
|
-
children: [/* @__PURE__ */ E(
|
|
5899
|
+
children: [/* @__PURE__ */ E(Hr, { tenant: t }), e ? null : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
5904
5900
|
className: "workspace-switcher-trigger-name",
|
|
5905
5901
|
children: t?.name
|
|
5906
5902
|
}), /* @__PURE__ */ E(Y, {
|
|
@@ -5912,36 +5908,36 @@ var Ur = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5912
5908
|
});
|
|
5913
5909
|
//#endregion
|
|
5914
5910
|
//#region src/components/toast.js
|
|
5915
|
-
function
|
|
5916
|
-
|
|
5911
|
+
function Gr() {
|
|
5912
|
+
Or();
|
|
5917
5913
|
}
|
|
5918
|
-
var
|
|
5914
|
+
var Kr = /* @__PURE__ */ new Set([
|
|
5919
5915
|
"success",
|
|
5920
5916
|
"info",
|
|
5921
5917
|
"warning",
|
|
5922
5918
|
"danger"
|
|
5923
5919
|
]);
|
|
5924
|
-
function
|
|
5920
|
+
function qr(e, t = "info") {
|
|
5925
5921
|
let n = "info", r = {};
|
|
5926
|
-
typeof t == "string" ? n =
|
|
5922
|
+
typeof t == "string" ? n = Kr.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = Kr.has(r.variant) ? r.variant : "info"), Tr(e, n, r);
|
|
5927
5923
|
}
|
|
5928
|
-
function
|
|
5929
|
-
|
|
5924
|
+
function Jr(e, t = {}) {
|
|
5925
|
+
Tr(e, "danger", t);
|
|
5930
5926
|
}
|
|
5931
|
-
|
|
5927
|
+
qr.promise = (e, t, n = {}) => {
|
|
5932
5928
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
5933
|
-
return
|
|
5929
|
+
return qr(t.loading || "Loading...", {
|
|
5934
5930
|
...n,
|
|
5935
5931
|
variant: "info",
|
|
5936
5932
|
id: r,
|
|
5937
5933
|
duration: 0
|
|
5938
|
-
}), e.then((e) => (
|
|
5934
|
+
}), e.then((e) => (qr((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
5939
5935
|
...n,
|
|
5940
5936
|
variant: "success",
|
|
5941
5937
|
id: r,
|
|
5942
5938
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
5943
5939
|
}), e)).catch((e) => {
|
|
5944
|
-
throw
|
|
5940
|
+
throw qr((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
5945
5941
|
...n,
|
|
5946
5942
|
variant: "danger",
|
|
5947
5943
|
id: r,
|
|
@@ -5951,7 +5947,7 @@ Kr.promise = (e, t, n = {}) => {
|
|
|
5951
5947
|
};
|
|
5952
5948
|
//#endregion
|
|
5953
5949
|
//#region src/lib/usePagination.js
|
|
5954
|
-
function
|
|
5950
|
+
function Yr(e, t = 10) {
|
|
5955
5951
|
let [n, r] = f(1), [i, a] = f(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
5956
5952
|
o(() => {
|
|
5957
5953
|
n > c && r(c);
|
|
@@ -5977,4 +5973,4 @@ function Jr(e, t = 10) {
|
|
|
5977
5973
|
};
|
|
5978
5974
|
}
|
|
5979
5975
|
//#endregion
|
|
5980
|
-
export { Oe as AppAccordion, ke as AppActionIcon, Me as AppAlert, ze as AppAsyncBlock, Ze as AppAutocomplete, rt as AppAvatar, ot as AppAvatarGroup, st as AppBadge, lt as AppBanner, ut as AppBreadcrumbs, Ie as AppButton, ft as AppCallout, mt as AppCard, gt as AppCheckbox, _t as AppChip, vt as AppChoiceCard, yt as AppChoiceChip, bt as AppColorField, St as AppCompareTable, jt as AppConfirmDialog, Nt as AppConsentBanner, Ft as AppCopyButton, Gt as AppDataTable, Kt as AppDatePicker, qt as AppDateRangePicker, Jt as AppDescriptions, Zt as AppDropdown, Le as AppEmptyState, an as AppFileAttachment,
|
|
5976
|
+
export { Oe as AppAccordion, ke as AppActionIcon, Me as AppAlert, ze as AppAsyncBlock, Ze as AppAutocomplete, rt as AppAvatar, ot as AppAvatarGroup, st as AppBadge, lt as AppBanner, ut as AppBreadcrumbs, Ie as AppButton, ft as AppCallout, mt as AppCard, gt as AppCheckbox, _t as AppChip, vt as AppChoiceCard, yt as AppChoiceChip, bt as AppColorField, St as AppCompareTable, jt as AppConfirmDialog, Nt as AppConsentBanner, Ft as AppCopyButton, Gt as AppDataTable, Kt as AppDatePicker, qt as AppDateRangePicker, Jt as AppDescriptions, Zt as AppDropdown, Le as AppEmptyState, an as AppFileAttachment, cn as AppFilePicker, ln as AppFloatingDock, un as AppFormActions, dn as AppFormRow, fn as AppFormSection, Y as AppIcon, pn as AppInfoList, He as AppInfoTip, Ct as AppInput, vn as AppKpiTile, Sn as AppLink, wn as AppLogoPicker, On as AppMeter, Ot as AppModal, kn as AppMultiSelect, An as AppNumberInput, jn as AppOtpInput, Mn as AppPageHeader, Nn as AppPagination, Pn as AppPhoneNumberInput, Ve as AppPopover, Fn as AppPricingCard, Rn as AppProgress, zn as AppRadio, Bn as AppRepeater, Z as AppRequiredMark, Vn as AppResourceCard, Un as AppResult, Wn as AppScrollbar, Gn as AppSearch, Kn as AppSegmented, Jn as AppSelect, Bt as AppSelectMini, Yn as AppShell, Qn as AppSidebarMenu, It as AppSkeleton, Lt as AppSkeletonRows, $n as AppSlider, Re as AppSpinner, tr as AppSplash, nr as AppStatusBadge, rr as AppStepper, ar as AppSwitch, or as AppTableEmptyState, Ht as AppTablePagination, ur as AppTabs, dr as AppTagInput, fr as AppTextarea, hr as AppTimePicker, mr as AppTimeline, Fr as AppToast, Lr as AppToolbar, G as AppTooltip, Rr as AppWizard, Br as AppWorkspaceSwitcher, At as MODAL_ICONS, Gr as dismissAll, Jr as errorToast, Te as iconNames, De as registerIcons, qr as toast, Yr as usePagination };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
4
4
|
"description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@webority/theme": "0.13.
|
|
32
|
-
"@webority/ui-elements": "0.13.
|
|
31
|
+
"@webority/theme": "0.13.5",
|
|
32
|
+
"@webority/ui-elements": "0.13.5"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@webority/analytics": "^0.5.2",
|