@webority/ui-react 0.13.1 → 0.13.3
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/ui-react.js
CHANGED
|
@@ -2741,39 +2741,17 @@ var Qt = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
2741
2741
|
});
|
|
2742
2742
|
});
|
|
2743
2743
|
//#endregion
|
|
2744
|
-
//#region src/components/AppFeedback.jsx
|
|
2745
|
-
function $t({ onSubmit: e, surface: t, screen: n, heading: r = "Share feedback", label: i = "Feedback", placeholder: a, collectEmail: o = !1, position: s = "bottom-right", className: c = "", style: l, ...u }) {
|
|
2746
|
-
U("AppFeedback", u);
|
|
2747
|
-
let { setRef: d, innerRef: f } = Q({ on: { "wui-feedback-submit": (t) => {
|
|
2748
|
-
let n = f.current;
|
|
2749
|
-
n && Promise.resolve(e?.(t.detail)).then(() => n.submitted(), (e) => n.failed(typeof e?.userMessage == "string" ? e.userMessage : void 0));
|
|
2750
|
-
} } });
|
|
2751
|
-
return /* @__PURE__ */ E("wui-feedback", {
|
|
2752
|
-
ref: d,
|
|
2753
|
-
position: s,
|
|
2754
|
-
label: i,
|
|
2755
|
-
heading: r,
|
|
2756
|
-
placeholder: a || void 0,
|
|
2757
|
-
"collect-email": o ? "" : void 0,
|
|
2758
|
-
surface: t || void 0,
|
|
2759
|
-
screen: n || void 0,
|
|
2760
|
-
class: c || void 0,
|
|
2761
|
-
style: l,
|
|
2762
|
-
...u
|
|
2763
|
-
});
|
|
2764
|
-
}
|
|
2765
|
-
//#endregion
|
|
2766
2744
|
//#region src/lib/fileItem.js
|
|
2767
|
-
function
|
|
2745
|
+
function $t(e) {
|
|
2768
2746
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
2769
2747
|
}
|
|
2770
|
-
function
|
|
2748
|
+
function en(e) {
|
|
2771
2749
|
return e instanceof File ? e.name : e?.name;
|
|
2772
2750
|
}
|
|
2773
|
-
function
|
|
2751
|
+
function tn(e) {
|
|
2774
2752
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
2775
2753
|
}
|
|
2776
|
-
function
|
|
2754
|
+
function nn(e, t) {
|
|
2777
2755
|
let [n, r] = f(null);
|
|
2778
2756
|
return o(() => {
|
|
2779
2757
|
if (!t) {
|
|
@@ -2789,8 +2767,8 @@ function rn(e, t) {
|
|
|
2789
2767
|
}
|
|
2790
2768
|
//#endregion
|
|
2791
2769
|
//#region src/lib/FileItemRow.jsx
|
|
2792
|
-
function
|
|
2793
|
-
let i =
|
|
2770
|
+
function rn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
2771
|
+
let i = nn(e, t), a = en(e), o = tn(e);
|
|
2794
2772
|
return /* @__PURE__ */ D("div", {
|
|
2795
2773
|
className: "attach-item",
|
|
2796
2774
|
children: [
|
|
@@ -2829,52 +2807,52 @@ function an({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
2829
2807
|
}
|
|
2830
2808
|
//#endregion
|
|
2831
2809
|
//#region src/components/AppFileAttachment.jsx
|
|
2832
|
-
function
|
|
2833
|
-
U("AppFileAttachment",
|
|
2834
|
-
let
|
|
2835
|
-
function
|
|
2810
|
+
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
|
+
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 S(e) {
|
|
2836
2814
|
let n = Array.from(e.target.files || []);
|
|
2837
2815
|
if (e.target.value = "", !n.length) return;
|
|
2838
2816
|
let s = [], c = "";
|
|
2839
2817
|
for (let e of n) {
|
|
2840
|
-
let t = I(e, {
|
|
2818
|
+
let t = l ? I(e, {
|
|
2841
2819
|
accept: a,
|
|
2842
2820
|
maxSizeMb: o
|
|
2843
|
-
});
|
|
2821
|
+
}) : null;
|
|
2844
2822
|
if (t) {
|
|
2845
2823
|
c ||= t;
|
|
2846
2824
|
continue;
|
|
2847
2825
|
}
|
|
2848
2826
|
s.push(e);
|
|
2849
2827
|
}
|
|
2850
|
-
if (
|
|
2851
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
2852
|
-
r(e.concat(s.filter((e) => !n.has(
|
|
2828
|
+
if (_(c), s.length) if (i) {
|
|
2829
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map($t));
|
|
2830
|
+
r(e.concat(s.filter((e) => !n.has($t(e)))));
|
|
2853
2831
|
} else r(s[0]);
|
|
2854
2832
|
}
|
|
2855
|
-
function
|
|
2856
|
-
|
|
2833
|
+
function C(e) {
|
|
2834
|
+
_(""), r(i ? v.filter((t, n) => n !== e) : null);
|
|
2857
2835
|
}
|
|
2858
|
-
let
|
|
2836
|
+
let w = u || g, O = w ? `${h}-error` : void 0, M = i || v.length === 0, N = y ? "image" : "file", L = i ? `Add ${N}s` : `Add ${y ? "an" : "a"} ${N}`;
|
|
2859
2837
|
return /* @__PURE__ */ D("div", {
|
|
2860
2838
|
className: "field",
|
|
2861
2839
|
children: [
|
|
2862
2840
|
/* @__PURE__ */ D("label", {
|
|
2863
2841
|
className: "label",
|
|
2864
|
-
htmlFor:
|
|
2842
|
+
htmlFor: h,
|
|
2865
2843
|
children: [e, c && /* @__PURE__ */ E("span", {
|
|
2866
2844
|
className: "label-optional",
|
|
2867
2845
|
children: " (optional)"
|
|
2868
2846
|
})]
|
|
2869
2847
|
}),
|
|
2870
|
-
|
|
2848
|
+
M && /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ D("label", {
|
|
2871
2849
|
className: "attach-drop",
|
|
2872
|
-
htmlFor:
|
|
2850
|
+
htmlFor: h,
|
|
2873
2851
|
children: [
|
|
2874
2852
|
/* @__PURE__ */ E("span", {
|
|
2875
2853
|
className: "attach-drop-icon",
|
|
2876
2854
|
children: /* @__PURE__ */ E(Y, {
|
|
2877
|
-
name:
|
|
2855
|
+
name: y ? "image" : "file-text",
|
|
2878
2856
|
size: 18
|
|
2879
2857
|
})
|
|
2880
2858
|
}),
|
|
@@ -2882,7 +2860,7 @@ function on({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2882
2860
|
className: "attach-drop-copy",
|
|
2883
2861
|
children: [/* @__PURE__ */ E("span", {
|
|
2884
2862
|
className: "attach-drop-title",
|
|
2885
|
-
children:
|
|
2863
|
+
children: L
|
|
2886
2864
|
}), /* @__PURE__ */ D("span", {
|
|
2887
2865
|
className: "attach-drop-hint",
|
|
2888
2866
|
children: [
|
|
@@ -2899,38 +2877,38 @@ function on({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2899
2877
|
})
|
|
2900
2878
|
]
|
|
2901
2879
|
}), /* @__PURE__ */ E("input", {
|
|
2902
|
-
id:
|
|
2880
|
+
id: h,
|
|
2903
2881
|
type: "file",
|
|
2904
2882
|
className: "visually-hidden",
|
|
2905
2883
|
name: n,
|
|
2906
2884
|
accept: a,
|
|
2907
2885
|
multiple: i || void 0,
|
|
2908
|
-
"aria-describedby":
|
|
2909
|
-
onChange:
|
|
2910
|
-
...
|
|
2886
|
+
"aria-describedby": O,
|
|
2887
|
+
onChange: S,
|
|
2888
|
+
...p
|
|
2911
2889
|
})] }),
|
|
2912
|
-
|
|
2913
|
-
item:
|
|
2890
|
+
x ? /* @__PURE__ */ E(on, {
|
|
2891
|
+
item: v[0],
|
|
2914
2892
|
isImage: !0,
|
|
2915
|
-
onRemove: () =>
|
|
2916
|
-
}) :
|
|
2893
|
+
onRemove: () => C(0)
|
|
2894
|
+
}) : v.length > 0 && /* @__PURE__ */ E("div", {
|
|
2917
2895
|
className: "attach-list",
|
|
2918
|
-
children:
|
|
2896
|
+
children: v.map((e, t) => /* @__PURE__ */ E(rn, {
|
|
2919
2897
|
item: e,
|
|
2920
|
-
isImage:
|
|
2921
|
-
onRemove: () =>
|
|
2922
|
-
},
|
|
2898
|
+
isImage: b(e),
|
|
2899
|
+
onRemove: () => C(t)
|
|
2900
|
+
}, $t(e)))
|
|
2923
2901
|
}),
|
|
2924
|
-
|
|
2902
|
+
w && /* @__PURE__ */ E("div", {
|
|
2925
2903
|
className: "field-error",
|
|
2926
|
-
id: `${
|
|
2927
|
-
children:
|
|
2904
|
+
id: `${h}-error`,
|
|
2905
|
+
children: w
|
|
2928
2906
|
})
|
|
2929
2907
|
]
|
|
2930
2908
|
});
|
|
2931
2909
|
}
|
|
2932
|
-
function
|
|
2933
|
-
let r =
|
|
2910
|
+
function on({ item: e, isImage: t, onRemove: n }) {
|
|
2911
|
+
let r = nn(e, t), i = en(e), a = tn(e);
|
|
2934
2912
|
return /* @__PURE__ */ D("div", {
|
|
2935
2913
|
className: "attach-preview",
|
|
2936
2914
|
children: [/* @__PURE__ */ D("div", {
|
|
@@ -2962,7 +2940,7 @@ function sn({ item: e, isImage: t, onRemove: n }) {
|
|
|
2962
2940
|
}
|
|
2963
2941
|
//#endregion
|
|
2964
2942
|
//#region src/components/AppFilePicker.jsx
|
|
2965
|
-
function
|
|
2943
|
+
function sn({ 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 }) {
|
|
2966
2944
|
U("AppFilePicker", b);
|
|
2967
2945
|
let [x, S] = f(null), [C, w] = f(!1), [T, O] = f(""), k = d(null), M = s(), N = r || M;
|
|
2968
2946
|
o(() => {
|
|
@@ -2981,7 +2959,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
2981
2959
|
}, ce = (e) => {
|
|
2982
2960
|
let n = Array.from(e || []);
|
|
2983
2961
|
if (!n.length) return;
|
|
2984
|
-
let r = Array.isArray(t) ? t : t ? [t] : [], a = new Set(r.map(
|
|
2962
|
+
let r = Array.isArray(t) ? t : t ? [t] : [], a = new Set(r.map($t)), o = "", s = [];
|
|
2985
2963
|
for (let e of n) {
|
|
2986
2964
|
let t = I(e, {
|
|
2987
2965
|
accept: l,
|
|
@@ -2991,7 +2969,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
2991
2969
|
o ||= t;
|
|
2992
2970
|
continue;
|
|
2993
2971
|
}
|
|
2994
|
-
a.has(
|
|
2972
|
+
a.has($t(e)) || (a.add($t(e)), s.push(e));
|
|
2995
2973
|
}
|
|
2996
2974
|
let d = r.concat(s);
|
|
2997
2975
|
c && d.length > c && (d = d.slice(0, c), o ||= `Up to ${c} files.`), O(o), i(d);
|
|
@@ -3141,12 +3119,12 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3141
3119
|
fe,
|
|
3142
3120
|
a && L.length > 0 && /* @__PURE__ */ E("div", {
|
|
3143
3121
|
className: "attach-list",
|
|
3144
|
-
children: L.map((e, t) => /* @__PURE__ */ E(
|
|
3122
|
+
children: L.map((e, t) => /* @__PURE__ */ E(rn, {
|
|
3145
3123
|
item: e,
|
|
3146
3124
|
isImage: e instanceof File ? P(e) : V || P(e),
|
|
3147
3125
|
noun: "file",
|
|
3148
3126
|
onRemove: () => ue(t)
|
|
3149
|
-
},
|
|
3127
|
+
}, $t(e)))
|
|
3150
3128
|
})
|
|
3151
3129
|
]
|
|
3152
3130
|
}),
|
|
@@ -3164,7 +3142,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3164
3142
|
}
|
|
3165
3143
|
//#endregion
|
|
3166
3144
|
//#region src/components/AppFloatingDock.jsx
|
|
3167
|
-
function
|
|
3145
|
+
function cn({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
3168
3146
|
return U("AppFloatingDock", s), /* @__PURE__ */ E("wui-dock", {
|
|
3169
3147
|
role: "navigation",
|
|
3170
3148
|
"aria-label": n,
|
|
@@ -3206,7 +3184,7 @@ function ln({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
3206
3184
|
}
|
|
3207
3185
|
//#endregion
|
|
3208
3186
|
//#region src/components/AppFormActions.jsx
|
|
3209
|
-
function
|
|
3187
|
+
function ln({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
3210
3188
|
return U("AppFormActions", i), /* @__PURE__ */ E("div", {
|
|
3211
3189
|
className: [
|
|
3212
3190
|
"form-actions",
|
|
@@ -3220,7 +3198,7 @@ function un({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
3220
3198
|
}
|
|
3221
3199
|
//#endregion
|
|
3222
3200
|
//#region src/components/AppFormRow.jsx
|
|
3223
|
-
function
|
|
3201
|
+
function un({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
3224
3202
|
U("AppFormRow", r);
|
|
3225
3203
|
let { style: i, ...a } = r;
|
|
3226
3204
|
return /* @__PURE__ */ E("div", {
|
|
@@ -3235,7 +3213,7 @@ function dn({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
3235
3213
|
}
|
|
3236
3214
|
//#endregion
|
|
3237
3215
|
//#region src/components/AppFormSection.jsx
|
|
3238
|
-
function
|
|
3216
|
+
function dn({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
3239
3217
|
return U("AppFormSection", i), /* @__PURE__ */ D("section", {
|
|
3240
3218
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
3241
3219
|
...i,
|
|
@@ -3256,7 +3234,7 @@ function fn({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
3256
3234
|
}
|
|
3257
3235
|
//#endregion
|
|
3258
3236
|
//#region src/components/AppInfoList.jsx
|
|
3259
|
-
function
|
|
3237
|
+
function fn({ items: e = [], className: t = "", ...n }) {
|
|
3260
3238
|
return U("AppInfoList", n), /* @__PURE__ */ E("div", {
|
|
3261
3239
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
3262
3240
|
...n,
|
|
@@ -3287,23 +3265,23 @@ function pn({ items: e = [], className: t = "", ...n }) {
|
|
|
3287
3265
|
}
|
|
3288
3266
|
//#endregion
|
|
3289
3267
|
//#region src/components/AppKpiTile.jsx
|
|
3290
|
-
var
|
|
3291
|
-
function
|
|
3292
|
-
if (!e || e.length < 2) return `0,${
|
|
3293
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
3294
|
-
return e.map((e, i) => `${i * r},${n === 0 ?
|
|
3268
|
+
var pn = 48, mn = 16;
|
|
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(" ");
|
|
3295
3273
|
}
|
|
3296
|
-
function
|
|
3274
|
+
function gn(e) {
|
|
3297
3275
|
if (typeof e != "string") return "flat";
|
|
3298
3276
|
let t = e.trim();
|
|
3299
3277
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
3300
3278
|
}
|
|
3301
|
-
function
|
|
3279
|
+
function _n({ 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 }) {
|
|
3302
3280
|
U("AppKpiTile", C);
|
|
3303
3281
|
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 ? {
|
|
3304
3282
|
...g,
|
|
3305
3283
|
"--wui-kpi-value-size": `${u}px`
|
|
3306
|
-
} : g, O = o ??
|
|
3284
|
+
} : g, O = o ?? gn(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
3307
3285
|
return p != null && (A = m ? {
|
|
3308
3286
|
as: m,
|
|
3309
3287
|
to: p
|
|
@@ -3341,12 +3319,12 @@ function vn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3341
3319
|
}),
|
|
3342
3320
|
s && s.length > 0 && /* @__PURE__ */ E("svg", {
|
|
3343
3321
|
className: `kpi-sparkline${S ? ` ${S}` : ""}`,
|
|
3344
|
-
width:
|
|
3345
|
-
height:
|
|
3346
|
-
viewBox: `0 0 ${
|
|
3322
|
+
width: pn,
|
|
3323
|
+
height: mn,
|
|
3324
|
+
viewBox: `0 0 ${pn} ${mn}`,
|
|
3347
3325
|
"aria-hidden": "true",
|
|
3348
3326
|
children: /* @__PURE__ */ E("polyline", {
|
|
3349
|
-
points:
|
|
3327
|
+
points: hn(s),
|
|
3350
3328
|
stroke: "currentColor",
|
|
3351
3329
|
fill: "none"
|
|
3352
3330
|
})
|
|
@@ -3356,11 +3334,11 @@ function vn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3356
3334
|
}
|
|
3357
3335
|
//#endregion
|
|
3358
3336
|
//#region src/components/AppLink.jsx
|
|
3359
|
-
var
|
|
3337
|
+
var vn = {
|
|
3360
3338
|
sm: 13,
|
|
3361
3339
|
md: 15,
|
|
3362
3340
|
lg: 18
|
|
3363
|
-
},
|
|
3341
|
+
}, yn = [
|
|
3364
3342
|
"underline",
|
|
3365
3343
|
"underline-center",
|
|
3366
3344
|
"static",
|
|
@@ -3374,35 +3352,35 @@ var yn = {
|
|
|
3374
3352
|
"shine",
|
|
3375
3353
|
"none"
|
|
3376
3354
|
];
|
|
3377
|
-
function
|
|
3355
|
+
function bn(e, t, n) {
|
|
3378
3356
|
if (!e) return null;
|
|
3379
3357
|
let r = `wui-link__ic wui-link__ic--${t}`;
|
|
3380
3358
|
return typeof e == "string" ? /* @__PURE__ */ E("span", {
|
|
3381
3359
|
className: r,
|
|
3382
3360
|
children: /* @__PURE__ */ E(Y, {
|
|
3383
3361
|
name: e,
|
|
3384
|
-
size:
|
|
3362
|
+
size: vn[n] ?? vn.md
|
|
3385
3363
|
})
|
|
3386
3364
|
}) : /* @__PURE__ */ E("span", {
|
|
3387
3365
|
className: r,
|
|
3388
3366
|
children: e
|
|
3389
3367
|
});
|
|
3390
3368
|
}
|
|
3391
|
-
function
|
|
3392
|
-
U("AppLink", d), W("AppLink", "animation", r,
|
|
3393
|
-
let f =
|
|
3369
|
+
function xn({ 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 }) {
|
|
3370
|
+
U("AppLink", d), W("AppLink", "animation", r, yn), W("AppLink", "size", o, Object.keys(vn));
|
|
3371
|
+
let f = yn.includes(r) ? r : "underline", p = f === "icon" && !a && !i ? "arrow-right" : a, m = [
|
|
3394
3372
|
"wui-link",
|
|
3395
3373
|
`wui-link--${f}`,
|
|
3396
3374
|
o === "md" ? "" : `wui-link--${o}`,
|
|
3397
3375
|
c ? "is-disabled" : "",
|
|
3398
3376
|
u
|
|
3399
3377
|
].filter(Boolean).join(" "), h = /* @__PURE__ */ D(T, { children: [
|
|
3400
|
-
|
|
3378
|
+
bn(i, "left", o),
|
|
3401
3379
|
/* @__PURE__ */ E("span", {
|
|
3402
3380
|
className: "wui-link__label",
|
|
3403
3381
|
children: e ?? t
|
|
3404
3382
|
}),
|
|
3405
|
-
|
|
3383
|
+
bn(p, "right", o)
|
|
3406
3384
|
] });
|
|
3407
3385
|
return c ? /* @__PURE__ */ E("span", {
|
|
3408
3386
|
className: m,
|
|
@@ -3425,13 +3403,13 @@ function Sn({ children: e, label: t, href: n, animation: r = "underline", leftIc
|
|
|
3425
3403
|
}
|
|
3426
3404
|
//#endregion
|
|
3427
3405
|
//#region src/components/AppLogoPicker.jsx
|
|
3428
|
-
var
|
|
3406
|
+
var Sn = {
|
|
3429
3407
|
sm: 72,
|
|
3430
3408
|
md: 120,
|
|
3431
3409
|
lg: 160
|
|
3432
3410
|
};
|
|
3433
|
-
function
|
|
3434
|
-
U("AppLogoPicker", k), W("AppLogoPicker", "size", typeof w == "string" ? w : null, Object.keys(
|
|
3411
|
+
function Cn({ 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 }) {
|
|
3412
|
+
U("AppLogoPicker", k), W("AppLogoPicker", "size", typeof w == "string" ? w : null, Object.keys(Sn));
|
|
3435
3413
|
let j = d(null), M = s(), [N, P] = f(null), [F, L] = f(""), [R, z] = f(!1), [ee, B] = f(!1);
|
|
3436
3414
|
o(() => () => N && URL.revokeObjectURL(N), [N]), o(() => {
|
|
3437
3415
|
P(null), z(!1);
|
|
@@ -3457,7 +3435,7 @@ function wn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3457
3435
|
t && oe(t);
|
|
3458
3436
|
}, G = () => {
|
|
3459
3437
|
P(null), L(""), z(!1), j.current && (j.current.value = ""), i?.();
|
|
3460
|
-
}, le = typeof w == "number" ? w :
|
|
3438
|
+
}, le = typeof w == "number" ? w : Sn[w] ?? Sn.md, ue = Math.max(14, Math.round(le * .18)), de = Math.round(le * .5), fe = [
|
|
3461
3439
|
"set-uploader",
|
|
3462
3440
|
C === "avatar" ? "set-uploader--avatar" : "",
|
|
3463
3441
|
T === "rounded" ? "set-uploader--rounded" : T === "square" ? "set-uploader--square" : "",
|
|
@@ -3587,27 +3565,27 @@ function wn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3587
3565
|
}
|
|
3588
3566
|
//#endregion
|
|
3589
3567
|
//#region src/components/AppMeter.jsx
|
|
3590
|
-
var
|
|
3568
|
+
var wn = [
|
|
3591
3569
|
"info",
|
|
3592
3570
|
"success",
|
|
3593
3571
|
"warning",
|
|
3594
3572
|
"danger",
|
|
3595
3573
|
"neutral"
|
|
3596
3574
|
];
|
|
3597
|
-
function
|
|
3575
|
+
function Tn(e, t, n) {
|
|
3598
3576
|
let r = n - t;
|
|
3599
3577
|
if (!(r > 0)) return 0;
|
|
3600
3578
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
3601
3579
|
return Number(i.toFixed(2));
|
|
3602
3580
|
}
|
|
3603
|
-
function
|
|
3581
|
+
function En(e, t, n, r, i) {
|
|
3604
3582
|
if (t == null && n == null) return i;
|
|
3605
3583
|
let a = "mid";
|
|
3606
3584
|
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";
|
|
3607
3585
|
}
|
|
3608
|
-
function
|
|
3586
|
+
function Dn({ 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 }) {
|
|
3609
3587
|
U("AppMeter", d);
|
|
3610
|
-
let f =
|
|
3588
|
+
let f = En(e, a, o, i, wn.includes(r) ? r : "info"), p = Tn(e, t, n);
|
|
3611
3589
|
return /* @__PURE__ */ E("div", {
|
|
3612
3590
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
3613
3591
|
role: "meter",
|
|
@@ -3625,7 +3603,7 @@ function On({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
3625
3603
|
}
|
|
3626
3604
|
//#endregion
|
|
3627
3605
|
//#region src/components/AppMultiSelect.jsx
|
|
3628
|
-
var
|
|
3606
|
+
var On = 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) {
|
|
3629
3607
|
U("AppMultiSelect", T);
|
|
3630
3608
|
let k = s(), A = _ || k, { setRef: j, innerRef: M } = Q({
|
|
3631
3609
|
ref: O,
|
|
@@ -3688,7 +3666,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3688
3666
|
}) : null
|
|
3689
3667
|
]
|
|
3690
3668
|
});
|
|
3691
|
-
}),
|
|
3669
|
+
}), kn = 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) {
|
|
3692
3670
|
U("AppNumberInput", C);
|
|
3693
3671
|
let T = s(), O = _ || T, k = (e) => {
|
|
3694
3672
|
if (m === 0) return Math.round(e);
|
|
@@ -3811,7 +3789,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3811
3789
|
}) : null
|
|
3812
3790
|
]
|
|
3813
3791
|
});
|
|
3814
|
-
}),
|
|
3792
|
+
}), An = 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) {
|
|
3815
3793
|
U("AppOtpInput", h);
|
|
3816
3794
|
let _ = s(), v = f || _, y = l ? `${v}-error` : void 0, b = c ? `${v}-hint` : void 0, x = y || b, { setRef: S } = Q({
|
|
3817
3795
|
ref: g,
|
|
@@ -3856,7 +3834,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3856
3834
|
});
|
|
3857
3835
|
//#endregion
|
|
3858
3836
|
//#region src/components/AppPageHeader.jsx
|
|
3859
|
-
function
|
|
3837
|
+
function jn({ 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 }) {
|
|
3860
3838
|
U("AppPageHeader", p);
|
|
3861
3839
|
let m = [
|
|
3862
3840
|
"page-header",
|
|
@@ -3915,7 +3893,7 @@ function Mn({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
3915
3893
|
}
|
|
3916
3894
|
//#endregion
|
|
3917
3895
|
//#region src/components/AppPagination.jsx
|
|
3918
|
-
function
|
|
3896
|
+
function Mn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
3919
3897
|
if (U("AppPagination", s), t <= 1) return null;
|
|
3920
3898
|
let c = zt(e, t, { siblingCount: r });
|
|
3921
3899
|
return /* @__PURE__ */ E("nav", {
|
|
@@ -3975,7 +3953,7 @@ function Nn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
3975
3953
|
}
|
|
3976
3954
|
//#endregion
|
|
3977
3955
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
3978
|
-
var
|
|
3956
|
+
var Nn = 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) {
|
|
3979
3957
|
U("AppPhoneNumberInput", h);
|
|
3980
3958
|
let _ = s(), v = a || _, y = u && v ? `${v}-error` : void 0, { setRef: b } = Q({
|
|
3981
3959
|
ref: g,
|
|
@@ -4016,7 +3994,7 @@ var Pn = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
4016
3994
|
});
|
|
4017
3995
|
//#endregion
|
|
4018
3996
|
//#region src/components/AppPricingCard.jsx
|
|
4019
|
-
function
|
|
3997
|
+
function Pn({ 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 }) {
|
|
4020
3998
|
return U("AppPricingCard", u), /* @__PURE__ */ D("div", {
|
|
4021
3999
|
className: [
|
|
4022
4000
|
"plan-card",
|
|
@@ -4070,21 +4048,21 @@ function Fn({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
4070
4048
|
}
|
|
4071
4049
|
//#endregion
|
|
4072
4050
|
//#region src/components/AppProgress.jsx
|
|
4073
|
-
var
|
|
4051
|
+
var Fn = [
|
|
4074
4052
|
"info",
|
|
4075
4053
|
"success",
|
|
4076
4054
|
"warning",
|
|
4077
4055
|
"danger",
|
|
4078
4056
|
"neutral"
|
|
4079
4057
|
];
|
|
4080
|
-
function
|
|
4058
|
+
function In(e, t) {
|
|
4081
4059
|
if (!(t > 0)) return 0;
|
|
4082
4060
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
4083
4061
|
return Number(n.toFixed(2));
|
|
4084
4062
|
}
|
|
4085
|
-
function
|
|
4063
|
+
function Ln({ 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 }) {
|
|
4086
4064
|
U("AppProgress", u);
|
|
4087
|
-
let d =
|
|
4065
|
+
let d = Fn.includes(n) ? n : "info", f = In(e, t), p = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, m = [
|
|
4088
4066
|
"progress-bar",
|
|
4089
4067
|
`wui-progress-${d}`,
|
|
4090
4068
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -4108,7 +4086,7 @@ function Rn({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
4108
4086
|
}
|
|
4109
4087
|
//#endregion
|
|
4110
4088
|
//#region src/components/AppRadio.jsx
|
|
4111
|
-
var
|
|
4089
|
+
var Rn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
4112
4090
|
return U("AppRadio", o), /* @__PURE__ */ E(ht, {
|
|
4113
4091
|
ref: s,
|
|
4114
4092
|
label: e,
|
|
@@ -4124,7 +4102,7 @@ var zn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
4124
4102
|
});
|
|
4125
4103
|
//#endregion
|
|
4126
4104
|
//#region src/components/AppRepeater.jsx
|
|
4127
|
-
function
|
|
4105
|
+
function zn({ 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 }) {
|
|
4128
4106
|
U("AppRepeater", f);
|
|
4129
4107
|
let p = typeof l == "number" && e.length >= l, m = !!i && e.length > c;
|
|
4130
4108
|
return /* @__PURE__ */ D("div", {
|
|
@@ -4176,7 +4154,7 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4176
4154
|
}
|
|
4177
4155
|
//#endregion
|
|
4178
4156
|
//#region src/components/AppResourceCard.jsx
|
|
4179
|
-
function
|
|
4157
|
+
function Bn({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
4180
4158
|
U("AppResourceCard", s);
|
|
4181
4159
|
let c = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
4182
4160
|
className: "res-card-icon",
|
|
@@ -4210,7 +4188,7 @@ function Vn({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
4210
4188
|
}
|
|
4211
4189
|
//#endregion
|
|
4212
4190
|
//#region src/components/AppResult.jsx
|
|
4213
|
-
var
|
|
4191
|
+
var Vn = {
|
|
4214
4192
|
success: {
|
|
4215
4193
|
icon: "check-circle",
|
|
4216
4194
|
tone: "success"
|
|
@@ -4231,9 +4209,9 @@ var Hn = {
|
|
|
4231
4209
|
404: { tone: "muted" },
|
|
4232
4210
|
500: { tone: "muted" }
|
|
4233
4211
|
};
|
|
4234
|
-
function
|
|
4235
|
-
U("AppResult", s), W("AppResult", "status", e, Object.keys(
|
|
4236
|
-
let c =
|
|
4212
|
+
function Hn({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
4213
|
+
U("AppResult", s), W("AppResult", "status", e, Object.keys(Vn));
|
|
4214
|
+
let c = Vn[e] || Vn.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
4237
4215
|
return /* @__PURE__ */ D("div", {
|
|
4238
4216
|
className: [
|
|
4239
4217
|
"result",
|
|
@@ -4271,7 +4249,7 @@ function Un({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
4271
4249
|
}
|
|
4272
4250
|
//#endregion
|
|
4273
4251
|
//#region src/components/AppScrollbar.jsx
|
|
4274
|
-
function
|
|
4252
|
+
function Un({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
4275
4253
|
return U("AppScrollbar", i), /* @__PURE__ */ E("div", {
|
|
4276
4254
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
4277
4255
|
style: n == null ? r : {
|
|
@@ -4284,7 +4262,7 @@ function Wn({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
4284
4262
|
}
|
|
4285
4263
|
//#endregion
|
|
4286
4264
|
//#region src/components/AppSearch.jsx
|
|
4287
|
-
function
|
|
4265
|
+
function Wn({ 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 }) {
|
|
4288
4266
|
U("AppSearch", u);
|
|
4289
4267
|
let d = t || n;
|
|
4290
4268
|
return /* @__PURE__ */ D("div", {
|
|
@@ -4331,7 +4309,7 @@ function Gn({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
4331
4309
|
}
|
|
4332
4310
|
//#endregion
|
|
4333
4311
|
//#region src/components/AppSegmented.jsx
|
|
4334
|
-
function
|
|
4312
|
+
function Gn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: c = !1, disabled: u = !1, className: f = "", ...p }) {
|
|
4335
4313
|
U("AppSegmented", p);
|
|
4336
4314
|
let m = s(), h = i || m, g = d(null), _ = d(null), v = [
|
|
4337
4315
|
"segmented",
|
|
@@ -4405,7 +4383,7 @@ function Kn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
4405
4383
|
}
|
|
4406
4384
|
//#endregion
|
|
4407
4385
|
//#region src/components/AppSelect.jsx
|
|
4408
|
-
var
|
|
4386
|
+
var Kn = (e) => e == null ? "" : e.label ?? e.text ?? "", qn = 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) {
|
|
4409
4387
|
U("AppSelect", O);
|
|
4410
4388
|
let A = s(), { setRef: j, innerRef: M } = Q({
|
|
4411
4389
|
ref: k,
|
|
@@ -4417,7 +4395,7 @@ var qn = (e) => e == null ? "" : e.label ?? e.text ?? "", Jn = i(function({ valu
|
|
|
4417
4395
|
if (!e) return;
|
|
4418
4396
|
let t = n.map((e) => ({
|
|
4419
4397
|
value: e.value,
|
|
4420
|
-
label:
|
|
4398
|
+
label: Kn(e),
|
|
4421
4399
|
icon: e.icon
|
|
4422
4400
|
}));
|
|
4423
4401
|
Ke(t, e.options) || (e.options = t);
|
|
@@ -4478,7 +4456,7 @@ var qn = (e) => e == null ? "" : e.label ?? e.text ?? "", Jn = i(function({ valu
|
|
|
4478
4456
|
});
|
|
4479
4457
|
//#endregion
|
|
4480
4458
|
//#region src/components/AppShell.jsx
|
|
4481
|
-
function
|
|
4459
|
+
function Jn({ 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 = "", ..._ }) {
|
|
4482
4460
|
U("AppShell", _);
|
|
4483
4461
|
let [v, y] = f(!1), [b, x] = f(!1), [S, C] = f(!1), w = u ?? v, T = () => {
|
|
4484
4462
|
let e = !w;
|
|
@@ -4526,7 +4504,7 @@ function Yn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4526
4504
|
children: [e.label && /* @__PURE__ */ E("div", {
|
|
4527
4505
|
className: "app-nav-group-label",
|
|
4528
4506
|
children: e.label
|
|
4529
|
-
}), e.items.map((e) => /* @__PURE__ */ E(
|
|
4507
|
+
}), e.items.map((e) => /* @__PURE__ */ E(Yn, {
|
|
4530
4508
|
item: e,
|
|
4531
4509
|
linkComponent: h,
|
|
4532
4510
|
onNavigate: () => x(!1)
|
|
@@ -4593,7 +4571,7 @@ function Yn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4593
4571
|
]
|
|
4594
4572
|
});
|
|
4595
4573
|
}
|
|
4596
|
-
function
|
|
4574
|
+
function Yn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
4597
4575
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = f(a);
|
|
4598
4576
|
o(() => {
|
|
4599
4577
|
a && !s && c(!0);
|
|
@@ -4635,7 +4613,7 @@ function Xn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4635
4613
|
"aria-hidden": !s || void 0,
|
|
4636
4614
|
children: /* @__PURE__ */ E("div", {
|
|
4637
4615
|
className: "app-nav-sub-inner",
|
|
4638
|
-
children: e.children.map((e) => /* @__PURE__ */ E(
|
|
4616
|
+
children: e.children.map((e) => /* @__PURE__ */ E(Yn, {
|
|
4639
4617
|
item: e,
|
|
4640
4618
|
linkComponent: t,
|
|
4641
4619
|
onNavigate: n,
|
|
@@ -4676,7 +4654,7 @@ function Xn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4676
4654
|
}
|
|
4677
4655
|
//#endregion
|
|
4678
4656
|
//#region src/components/AppSidebarMenu.jsx
|
|
4679
|
-
var
|
|
4657
|
+
var Xn = {
|
|
4680
4658
|
left: "start",
|
|
4681
4659
|
right: "end",
|
|
4682
4660
|
start: "start",
|
|
@@ -4684,9 +4662,9 @@ var Zn = {
|
|
|
4684
4662
|
top: "top",
|
|
4685
4663
|
bottom: "bottom"
|
|
4686
4664
|
};
|
|
4687
|
-
function
|
|
4688
|
-
U("AppSidebarMenu", v), W("AppSidebarMenu", "side", n, Object.keys(
|
|
4689
|
-
let { style: y, ...b } = v, S =
|
|
4665
|
+
function Zn({ 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 }) {
|
|
4666
|
+
U("AppSidebarMenu", v), W("AppSidebarMenu", "side", n, Object.keys(Xn));
|
|
4667
|
+
let { style: y, ...b } = v, S = Xn[n] || "end", C = c || l || y ? {
|
|
4690
4668
|
...c && { "--asm-width": c },
|
|
4691
4669
|
...l && { "--asm-max-width": l },
|
|
4692
4670
|
...y
|
|
@@ -4739,7 +4717,7 @@ function Qn({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
4739
4717
|
}
|
|
4740
4718
|
//#endregion
|
|
4741
4719
|
//#region src/components/AppSlider.jsx
|
|
4742
|
-
var
|
|
4720
|
+
var Qn = 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) {
|
|
4743
4721
|
U("AppSlider", T);
|
|
4744
4722
|
let k = s(), A = x || k, j = r, { setRef: M, innerRef: N } = Q({
|
|
4745
4723
|
ref: O,
|
|
@@ -4800,14 +4778,14 @@ var $n = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
4800
4778
|
})
|
|
4801
4779
|
]
|
|
4802
4780
|
});
|
|
4803
|
-
}),
|
|
4781
|
+
}), $n = {
|
|
4804
4782
|
sm: 44,
|
|
4805
4783
|
md: 56,
|
|
4806
4784
|
lg: 72
|
|
4807
4785
|
};
|
|
4808
|
-
function
|
|
4809
|
-
U("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(
|
|
4810
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
4786
|
+
function er({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
4787
|
+
U("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys($n));
|
|
4788
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : $n[a] ?? $n.md, f = i === "ring" ? /* @__PURE__ */ E("span", {
|
|
4811
4789
|
className: "splash-ring",
|
|
4812
4790
|
"aria-hidden": "true"
|
|
4813
4791
|
}) : i === "dots" ? /* @__PURE__ */ D("span", {
|
|
@@ -4854,7 +4832,7 @@ function tr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
4854
4832
|
}
|
|
4855
4833
|
//#endregion
|
|
4856
4834
|
//#region src/components/AppStatusBadge.jsx
|
|
4857
|
-
function
|
|
4835
|
+
function tr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tooltipPlacement: i, ...a }) {
|
|
4858
4836
|
return U("AppStatusBadge", a), e == null || e === "" ? "-" : K(/* @__PURE__ */ E("span", {
|
|
4859
4837
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
4860
4838
|
...a,
|
|
@@ -4863,7 +4841,7 @@ function nr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tool
|
|
|
4863
4841
|
}
|
|
4864
4842
|
//#endregion
|
|
4865
4843
|
//#region src/components/AppStepper.jsx
|
|
4866
|
-
function
|
|
4844
|
+
function nr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
4867
4845
|
U("AppStepper", c);
|
|
4868
4846
|
let l = t === "journey";
|
|
4869
4847
|
return /* @__PURE__ */ E("nav", {
|
|
@@ -4876,7 +4854,7 @@ function rr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4876
4854
|
"aria-label": a,
|
|
4877
4855
|
...c,
|
|
4878
4856
|
children: e.map((t, n) => {
|
|
4879
|
-
let a = t.status ||
|
|
4857
|
+
let a = t.status || rr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
4880
4858
|
c = a === "done" ? /* @__PURE__ */ E(Y, {
|
|
4881
4859
|
name: "check",
|
|
4882
4860
|
size: 14
|
|
@@ -4940,12 +4918,12 @@ function rr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4940
4918
|
})
|
|
4941
4919
|
});
|
|
4942
4920
|
}
|
|
4943
|
-
function
|
|
4921
|
+
function rr(e, t) {
|
|
4944
4922
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
4945
4923
|
}
|
|
4946
4924
|
//#endregion
|
|
4947
4925
|
//#region src/components/AppSwitch.jsx
|
|
4948
|
-
var
|
|
4926
|
+
var ir = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
4949
4927
|
return U("AppSwitch", s), /* @__PURE__ */ E(ht, {
|
|
4950
4928
|
ref: c,
|
|
4951
4929
|
label: e,
|
|
@@ -4961,7 +4939,7 @@ var ar = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
4961
4939
|
});
|
|
4962
4940
|
//#endregion
|
|
4963
4941
|
//#region src/components/AppTableEmptyState.jsx
|
|
4964
|
-
function
|
|
4942
|
+
function ar({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
4965
4943
|
return U("AppTableEmptyState", i), /* @__PURE__ */ D("div", {
|
|
4966
4944
|
className: "tbl-empty",
|
|
4967
4945
|
...i,
|
|
@@ -4987,8 +4965,8 @@ function or({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
4987
4965
|
}
|
|
4988
4966
|
//#endregion
|
|
4989
4967
|
//#region src/components/AppTabs.jsx
|
|
4990
|
-
var
|
|
4991
|
-
function
|
|
4968
|
+
var or = 1, sr = 28, cr = .7;
|
|
4969
|
+
function lr({ 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, ..._ }) {
|
|
4992
4970
|
U("AppTabs", _);
|
|
4993
4971
|
let v = d(null), y = d(null), b = s === "vertical", [x, S] = f(t);
|
|
4994
4972
|
o(() => {
|
|
@@ -5000,7 +4978,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5000
4978
|
let e = v.current, t = y.current;
|
|
5001
4979
|
if (!e || !t || b) return;
|
|
5002
4980
|
let n = e.scrollWidth - e.clientWidth;
|
|
5003
|
-
t.classList.toggle("is-overflow-start", e.scrollLeft >
|
|
4981
|
+
t.classList.toggle("is-overflow-start", e.scrollLeft > or), t.classList.toggle("is-overflow-end", n > or && e.scrollLeft < n - or);
|
|
5004
4982
|
}, [b]), M = a(() => {
|
|
5005
4983
|
let n = v.current;
|
|
5006
4984
|
if (!n) return;
|
|
@@ -5016,7 +4994,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5016
4994
|
if (!e || b) return;
|
|
5017
4995
|
let t = e.querySelector(".app-tab.active");
|
|
5018
4996
|
if (!t) return;
|
|
5019
|
-
let n =
|
|
4997
|
+
let n = sr, r = t.offsetLeft, i = r + t.offsetWidth;
|
|
5020
4998
|
r - n < e.scrollLeft ? e.scrollLeft = Math.max(0, r - n) : i + n > e.scrollLeft + e.clientWidth && (e.scrollLeft = i + n - e.clientWidth);
|
|
5021
4999
|
}, [b]);
|
|
5022
5000
|
l(() => {
|
|
@@ -5051,7 +5029,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5051
5029
|
}
|
|
5052
5030
|
let I = (e) => {
|
|
5053
5031
|
let t = v.current;
|
|
5054
|
-
t && t.scrollBy({ left: e * t.clientWidth *
|
|
5032
|
+
t && t.scrollBy({ left: e * t.clientWidth * cr });
|
|
5055
5033
|
}, L = [
|
|
5056
5034
|
"app-tabs",
|
|
5057
5035
|
i === "pills" ? "app-tabs-pills" : "",
|
|
@@ -5164,7 +5142,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5164
5142
|
}
|
|
5165
5143
|
//#endregion
|
|
5166
5144
|
//#region src/components/AppTagInput.jsx
|
|
5167
|
-
var
|
|
5145
|
+
var ur = 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) {
|
|
5168
5146
|
U("AppTagInput", y);
|
|
5169
5147
|
let x = s(), S = p || x, { setRef: C } = Q({
|
|
5170
5148
|
ref: b,
|
|
@@ -5215,7 +5193,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5215
5193
|
}) : null
|
|
5216
5194
|
]
|
|
5217
5195
|
});
|
|
5218
|
-
}),
|
|
5196
|
+
}), dr = 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) {
|
|
5219
5197
|
U("AppTextarea", x);
|
|
5220
5198
|
let C = s(), w = u || C, T = [
|
|
5221
5199
|
"textarea",
|
|
@@ -5286,7 +5264,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5286
5264
|
})
|
|
5287
5265
|
]
|
|
5288
5266
|
});
|
|
5289
|
-
}),
|
|
5267
|
+
}), fr = {
|
|
5290
5268
|
done: "check",
|
|
5291
5269
|
current: "clock",
|
|
5292
5270
|
"on-hold": "lock",
|
|
@@ -5295,7 +5273,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5295
5273
|
skipped: "arrow-right",
|
|
5296
5274
|
upcoming: null
|
|
5297
5275
|
};
|
|
5298
|
-
function
|
|
5276
|
+
function pr({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
5299
5277
|
U("AppTimeline", o);
|
|
5300
5278
|
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;
|
|
5301
5279
|
return /* @__PURE__ */ E("ol", {
|
|
@@ -5306,7 +5284,7 @@ function mr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5306
5284
|
} : a,
|
|
5307
5285
|
...o,
|
|
5308
5286
|
children: e.map((e, t) => {
|
|
5309
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
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 ? fr[n] : void 0) : e.icon || "circle";
|
|
5310
5288
|
return /* @__PURE__ */ D("li", {
|
|
5311
5289
|
className: `timeline-item${r}${i}`,
|
|
5312
5290
|
children: [/* @__PURE__ */ E("span", {
|
|
@@ -5376,7 +5354,7 @@ function mr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5376
5354
|
}
|
|
5377
5355
|
//#endregion
|
|
5378
5356
|
//#region src/components/AppTimePicker.jsx
|
|
5379
|
-
var
|
|
5357
|
+
var mr = 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) {
|
|
5380
5358
|
U("AppTimePicker", y);
|
|
5381
5359
|
let x = s(), S = h || o || x, { setRef: C } = Q({
|
|
5382
5360
|
ref: b,
|
|
@@ -5421,35 +5399,35 @@ var hr = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
5421
5399
|
})
|
|
5422
5400
|
]
|
|
5423
5401
|
});
|
|
5424
|
-
}),
|
|
5425
|
-
function
|
|
5426
|
-
for (let e of
|
|
5402
|
+
}), hr = 6, $ = [], gr = /* @__PURE__ */ new Set(), _r = /* @__PURE__ */ new Map(), vr = /* @__PURE__ */ new Set(), yr = 0;
|
|
5403
|
+
function br() {
|
|
5404
|
+
for (let e of gr) e($);
|
|
5427
5405
|
}
|
|
5428
|
-
function
|
|
5429
|
-
let t =
|
|
5430
|
-
t !== void 0 && (clearTimeout(t),
|
|
5406
|
+
function xr(e) {
|
|
5407
|
+
let t = _r.get(e);
|
|
5408
|
+
t !== void 0 && (clearTimeout(t), _r.delete(e));
|
|
5431
5409
|
}
|
|
5432
|
-
function
|
|
5433
|
-
if (e.length <=
|
|
5410
|
+
function Sr(e, t) {
|
|
5411
|
+
if (e.length <= hr) return e;
|
|
5434
5412
|
let n = [...e], r = [];
|
|
5435
|
-
for (; n.length >
|
|
5413
|
+
for (; n.length > hr;) {
|
|
5436
5414
|
let e = n.findIndex((e) => e.id !== t && e.duration !== 0);
|
|
5437
5415
|
r.push(n.splice(e === -1 ? n.findIndex((e) => e.id !== t) : e, 1)[0]);
|
|
5438
5416
|
}
|
|
5439
|
-
for (let e of r)
|
|
5417
|
+
for (let e of r) xr(e.id), vr.delete(e.id);
|
|
5440
5418
|
return n;
|
|
5441
5419
|
}
|
|
5442
|
-
function
|
|
5443
|
-
return
|
|
5444
|
-
if (
|
|
5420
|
+
function Cr(e) {
|
|
5421
|
+
return gr.add(e), e($), () => {
|
|
5422
|
+
if (gr.delete(e), gr.size === 0) for (let e of $) e.duration > 0 && !_r.has(e.id) && (vr.delete(e.id), _r.set(e.id, setTimeout(() => Er(e.id), e.duration)));
|
|
5445
5423
|
};
|
|
5446
5424
|
}
|
|
5447
|
-
function
|
|
5425
|
+
function wr(e, t, n = {}) {
|
|
5448
5426
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
5449
5427
|
if (r) {
|
|
5450
5428
|
let i = $.find((e) => e.externalId === r);
|
|
5451
5429
|
if (i) {
|
|
5452
|
-
|
|
5430
|
+
xr(i.id);
|
|
5453
5431
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
5454
5432
|
$ = $.map((a) => a.id === i.id ? {
|
|
5455
5433
|
...a,
|
|
@@ -5462,12 +5440,12 @@ function Tr(e, t, n = {}) {
|
|
|
5462
5440
|
shape: n.shape,
|
|
5463
5441
|
surface: n.surface,
|
|
5464
5442
|
progress: n.progress
|
|
5465
|
-
} : a),
|
|
5443
|
+
} : a), br(), r > 0 && !vr.has(i.id) && _r.set(i.id, setTimeout(() => Er(i.id), r));
|
|
5466
5444
|
return;
|
|
5467
5445
|
}
|
|
5468
5446
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
5469
|
-
let a = ++
|
|
5470
|
-
$ =
|
|
5447
|
+
let a = ++yr, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
5448
|
+
$ = Sr([...$, {
|
|
5471
5449
|
id: a,
|
|
5472
5450
|
externalId: r,
|
|
5473
5451
|
message: e,
|
|
@@ -5480,25 +5458,25 @@ function Tr(e, t, n = {}) {
|
|
|
5480
5458
|
surface: n.surface,
|
|
5481
5459
|
progress: n.progress,
|
|
5482
5460
|
key: i
|
|
5483
|
-
}], a),
|
|
5461
|
+
}], a), br(), o > 0 && _r.set(a, setTimeout(() => Er(a), o));
|
|
5484
5462
|
}
|
|
5485
|
-
function
|
|
5486
|
-
|
|
5463
|
+
function Tr(e) {
|
|
5464
|
+
xr(e), vr.add(e);
|
|
5487
5465
|
}
|
|
5488
|
-
function
|
|
5489
|
-
|
|
5466
|
+
function Er(e) {
|
|
5467
|
+
xr(e), vr.delete(e);
|
|
5490
5468
|
let t = $.filter((t) => t.id !== e);
|
|
5491
|
-
t.length !== $.length && ($ = t,
|
|
5469
|
+
t.length !== $.length && ($ = t, br());
|
|
5492
5470
|
}
|
|
5493
|
-
function
|
|
5494
|
-
if (!($.length === 0 &&
|
|
5495
|
-
for (let e of
|
|
5496
|
-
|
|
5471
|
+
function Dr() {
|
|
5472
|
+
if (!($.length === 0 && _r.size === 0 && vr.size === 0)) {
|
|
5473
|
+
for (let e of _r.values()) clearTimeout(e);
|
|
5474
|
+
_r.clear(), vr.clear(), $.length !== 0 && ($ = [], br());
|
|
5497
5475
|
}
|
|
5498
5476
|
}
|
|
5499
5477
|
//#endregion
|
|
5500
5478
|
//#region src/components/AppToast.jsx
|
|
5501
|
-
var
|
|
5479
|
+
var Or = {
|
|
5502
5480
|
success: {
|
|
5503
5481
|
icon: "check-circle",
|
|
5504
5482
|
assertive: !1
|
|
@@ -5515,7 +5493,7 @@ var kr = {
|
|
|
5515
5493
|
icon: "alert-circle",
|
|
5516
5494
|
assertive: !0
|
|
5517
5495
|
}
|
|
5518
|
-
},
|
|
5496
|
+
}, kr = {
|
|
5519
5497
|
"top-start": "top-0 start-0",
|
|
5520
5498
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
5521
5499
|
"top-end": "top-0 end-0",
|
|
@@ -5523,21 +5501,21 @@ var kr = {
|
|
|
5523
5501
|
"bottom-start": "bottom-0 start-0",
|
|
5524
5502
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
5525
5503
|
"bottom-end": "bottom-0 end-0"
|
|
5526
|
-
},
|
|
5504
|
+
}, Ar = 64, jr = /* @__PURE__ */ new Set([
|
|
5527
5505
|
"rise",
|
|
5528
5506
|
"organic",
|
|
5529
5507
|
"jelly",
|
|
5530
5508
|
"spring"
|
|
5531
|
-
]),
|
|
5509
|
+
]), Mr = /* @__PURE__ */ new Set([
|
|
5532
5510
|
"rounded",
|
|
5533
5511
|
"pill",
|
|
5534
5512
|
"sharp"
|
|
5535
|
-
]),
|
|
5536
|
-
function
|
|
5537
|
-
U("AppToast", s), W("AppToast", "position", e, Object.keys(
|
|
5513
|
+
]), Nr = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
5514
|
+
function Pr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
5515
|
+
U("AppToast", s), W("AppToast", "position", e, Object.keys(kr)), W("AppToast", "animation", n, jr), W("AppToast", "shape", r, Mr), W("AppToast", "surface", i, Nr);
|
|
5538
5516
|
let [c, l] = f([]);
|
|
5539
|
-
o(() =>
|
|
5540
|
-
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p =
|
|
5517
|
+
o(() => Cr(l), []);
|
|
5518
|
+
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p = kr[e] ?? kr["bottom-end"];
|
|
5541
5519
|
return /* @__PURE__ */ D("div", {
|
|
5542
5520
|
...s,
|
|
5543
5521
|
className: `wui-toast-container toast-container position-fixed ${p} p-3 ${a}`.trim(),
|
|
@@ -5549,7 +5527,7 @@ function Fr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5549
5527
|
u,
|
|
5550
5528
|
" more"
|
|
5551
5529
|
]
|
|
5552
|
-
}), d.map((e) => /* @__PURE__ */ E(
|
|
5530
|
+
}), d.map((e) => /* @__PURE__ */ E(Fr, {
|
|
5553
5531
|
toast: e,
|
|
5554
5532
|
defaultAnimation: n,
|
|
5555
5533
|
defaultShape: r,
|
|
@@ -5557,14 +5535,14 @@ function Fr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5557
5535
|
}, e.id))]
|
|
5558
5536
|
});
|
|
5559
5537
|
}
|
|
5560
|
-
function
|
|
5561
|
-
let i =
|
|
5538
|
+
function Fr({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
5539
|
+
let i = Or[e.variant] ?? Or.success, a = jr.has(e.animation) ? e.animation : t, s = Mr.has(e.shape) ? e.shape : n, c = Nr.has(e.surface) ? e.surface : r, l = (a !== "rise" && jr.has(a) ? ` wui-toast--anim-${a}` : "") + (s !== "rounded" && Mr.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 = () => Er(e.id), y = d(null);
|
|
5562
5540
|
o(() => {
|
|
5563
5541
|
if (e.duration === 0) return;
|
|
5564
|
-
|
|
5542
|
+
Tr(e.id);
|
|
5565
5543
|
let t = y.current, n = t == null ? "" : getComputedStyle(t).animationName;
|
|
5566
5544
|
if (t != null && (typeof t.getAnimations == "function" ? t.getAnimations().length > 0 : n !== "" && n !== "none")) return;
|
|
5567
|
-
let r = setTimeout(() =>
|
|
5545
|
+
let r = setTimeout(() => Er(e.id), e.duration);
|
|
5568
5546
|
return () => clearTimeout(r);
|
|
5569
5547
|
}, [e.id, e.duration]);
|
|
5570
5548
|
let b = (e) => {
|
|
@@ -5576,7 +5554,7 @@ function Ir({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5576
5554
|
}, C = (e) => {
|
|
5577
5555
|
if (_.current === null) return;
|
|
5578
5556
|
let t = e.clientX - _.current;
|
|
5579
|
-
if (Math.abs(t) >
|
|
5557
|
+
if (Math.abs(t) > Ar) {
|
|
5580
5558
|
v();
|
|
5581
5559
|
return;
|
|
5582
5560
|
}
|
|
@@ -5660,7 +5638,7 @@ function Ir({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5660
5638
|
}
|
|
5661
5639
|
//#endregion
|
|
5662
5640
|
//#region src/components/AppToolbar.jsx
|
|
5663
|
-
function
|
|
5641
|
+
function Ir({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
5664
5642
|
U("AppToolbar", u);
|
|
5665
5643
|
let d = s(), p = o || d, [m, h] = f(r), g = n === void 0 ? m : n;
|
|
5666
5644
|
return /* @__PURE__ */ D("div", {
|
|
@@ -5718,7 +5696,7 @@ function Lr({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
5718
5696
|
}
|
|
5719
5697
|
//#endregion
|
|
5720
5698
|
//#region src/components/AppWizard.jsx
|
|
5721
|
-
var
|
|
5699
|
+
var Lr = 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) {
|
|
5722
5700
|
U("AppWizard", T);
|
|
5723
5701
|
let O = d(null), k = (e) => {
|
|
5724
5702
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -5770,13 +5748,13 @@ var Rr = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
5770
5748
|
children: A[t]
|
|
5771
5749
|
}, e.key ?? `${e.label}-${t}`))
|
|
5772
5750
|
});
|
|
5773
|
-
}),
|
|
5751
|
+
}), Rr = /* @__PURE__ */ new Set([
|
|
5774
5752
|
"ArrowUp",
|
|
5775
5753
|
"ArrowDown",
|
|
5776
5754
|
"ArrowLeft",
|
|
5777
5755
|
"ArrowRight"
|
|
5778
5756
|
]);
|
|
5779
|
-
function
|
|
5757
|
+
function zr({ 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, ..._ }) {
|
|
5780
5758
|
let { onToggle: y, ...b } = _;
|
|
5781
5759
|
U("AppWorkspaceSwitcher", b);
|
|
5782
5760
|
let [x, S] = f(""), [C, w] = f(!1), T = d(null), O = (e, t) => {
|
|
@@ -5796,7 +5774,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5796
5774
|
let e = T.current;
|
|
5797
5775
|
if (!e) return;
|
|
5798
5776
|
let t = (e) => {
|
|
5799
|
-
if (
|
|
5777
|
+
if (Rr.has(e.key)) {
|
|
5800
5778
|
e.stopPropagation();
|
|
5801
5779
|
return;
|
|
5802
5780
|
}
|
|
@@ -5814,7 +5792,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5814
5792
|
onToggle: O,
|
|
5815
5793
|
...b,
|
|
5816
5794
|
children: [/* @__PURE__ */ E(v.Toggle, {
|
|
5817
|
-
as:
|
|
5795
|
+
as: Ur,
|
|
5818
5796
|
compact: m,
|
|
5819
5797
|
tenant: k,
|
|
5820
5798
|
"aria-label": M
|
|
@@ -5849,7 +5827,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5849
5827
|
className: `workspace-switcher-option${e.id === k?.id ? " is-active" : ""}`,
|
|
5850
5828
|
onClick: () => n?.(e),
|
|
5851
5829
|
children: [
|
|
5852
|
-
/* @__PURE__ */ E(
|
|
5830
|
+
/* @__PURE__ */ E(Vr, { tenant: e }),
|
|
5853
5831
|
/* @__PURE__ */ E("span", {
|
|
5854
5832
|
className: "workspace-switcher-option-name",
|
|
5855
5833
|
children: e.name
|
|
@@ -5881,17 +5859,17 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5881
5859
|
}) : null,
|
|
5882
5860
|
i ? /* @__PURE__ */ E("div", {
|
|
5883
5861
|
className: "workspace-switcher-footer",
|
|
5884
|
-
children:
|
|
5862
|
+
children: Hr(i, a)
|
|
5885
5863
|
}) : null
|
|
5886
5864
|
]
|
|
5887
5865
|
})]
|
|
5888
5866
|
});
|
|
5889
5867
|
}
|
|
5890
|
-
function
|
|
5868
|
+
function Br(e) {
|
|
5891
5869
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
5892
5870
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
5893
5871
|
}
|
|
5894
|
-
function
|
|
5872
|
+
function Vr({ tenant: e }) {
|
|
5895
5873
|
return e?.logoUrl ? /* @__PURE__ */ E("img", {
|
|
5896
5874
|
className: "workspace-switcher-mark",
|
|
5897
5875
|
src: e.logoUrl,
|
|
@@ -5899,10 +5877,10 @@ function Hr({ tenant: e }) {
|
|
|
5899
5877
|
loading: "lazy"
|
|
5900
5878
|
}) : /* @__PURE__ */ E("span", {
|
|
5901
5879
|
className: "workspace-switcher-mark",
|
|
5902
|
-
children:
|
|
5880
|
+
children: Br(e?.name)
|
|
5903
5881
|
});
|
|
5904
5882
|
}
|
|
5905
|
-
function
|
|
5883
|
+
function Hr(e, t) {
|
|
5906
5884
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
5907
5885
|
let { label: n, icon: r, href: i } = e;
|
|
5908
5886
|
return /* @__PURE__ */ D(i ? t ?? "a" : "button", {
|
|
@@ -5914,7 +5892,7 @@ function Ur(e, t) {
|
|
|
5914
5892
|
}) : null, n]
|
|
5915
5893
|
});
|
|
5916
5894
|
}
|
|
5917
|
-
var
|
|
5895
|
+
var Ur = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
5918
5896
|
return /* @__PURE__ */ D("button", {
|
|
5919
5897
|
ref: a,
|
|
5920
5898
|
type: "button",
|
|
@@ -5922,7 +5900,7 @@ var Wr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5922
5900
|
"aria-haspopup": "true",
|
|
5923
5901
|
"aria-label": n,
|
|
5924
5902
|
...i,
|
|
5925
|
-
children: [/* @__PURE__ */ E(
|
|
5903
|
+
children: [/* @__PURE__ */ E(Vr, { tenant: t }), e ? null : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
5926
5904
|
className: "workspace-switcher-trigger-name",
|
|
5927
5905
|
children: t?.name
|
|
5928
5906
|
}), /* @__PURE__ */ E(Y, {
|
|
@@ -5934,36 +5912,36 @@ var Wr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5934
5912
|
});
|
|
5935
5913
|
//#endregion
|
|
5936
5914
|
//#region src/components/toast.js
|
|
5937
|
-
function
|
|
5938
|
-
|
|
5915
|
+
function Wr() {
|
|
5916
|
+
Dr();
|
|
5939
5917
|
}
|
|
5940
|
-
var
|
|
5918
|
+
var Gr = /* @__PURE__ */ new Set([
|
|
5941
5919
|
"success",
|
|
5942
5920
|
"info",
|
|
5943
5921
|
"warning",
|
|
5944
5922
|
"danger"
|
|
5945
5923
|
]);
|
|
5946
|
-
function
|
|
5924
|
+
function Kr(e, t = "info") {
|
|
5947
5925
|
let n = "info", r = {};
|
|
5948
|
-
typeof t == "string" ? n =
|
|
5926
|
+
typeof t == "string" ? n = Gr.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = Gr.has(r.variant) ? r.variant : "info"), wr(e, n, r);
|
|
5949
5927
|
}
|
|
5950
|
-
function
|
|
5951
|
-
|
|
5928
|
+
function qr(e, t = {}) {
|
|
5929
|
+
wr(e, "danger", t);
|
|
5952
5930
|
}
|
|
5953
|
-
|
|
5931
|
+
Kr.promise = (e, t, n = {}) => {
|
|
5954
5932
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
5955
|
-
return
|
|
5933
|
+
return Kr(t.loading || "Loading...", {
|
|
5956
5934
|
...n,
|
|
5957
5935
|
variant: "info",
|
|
5958
5936
|
id: r,
|
|
5959
5937
|
duration: 0
|
|
5960
|
-
}), e.then((e) => (
|
|
5938
|
+
}), e.then((e) => (Kr((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
5961
5939
|
...n,
|
|
5962
5940
|
variant: "success",
|
|
5963
5941
|
id: r,
|
|
5964
5942
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
5965
5943
|
}), e)).catch((e) => {
|
|
5966
|
-
throw
|
|
5944
|
+
throw Kr((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
5967
5945
|
...n,
|
|
5968
5946
|
variant: "danger",
|
|
5969
5947
|
id: r,
|
|
@@ -5973,7 +5951,7 @@ qr.promise = (e, t, n = {}) => {
|
|
|
5973
5951
|
};
|
|
5974
5952
|
//#endregion
|
|
5975
5953
|
//#region src/lib/usePagination.js
|
|
5976
|
-
function
|
|
5954
|
+
function Jr(e, t = 10) {
|
|
5977
5955
|
let [n, r] = f(1), [i, a] = f(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
5978
5956
|
o(() => {
|
|
5979
5957
|
n > c && r(c);
|
|
@@ -5999,4 +5977,4 @@ function Yr(e, t = 10) {
|
|
|
5999
5977
|
};
|
|
6000
5978
|
}
|
|
6001
5979
|
//#endregion
|
|
6002
|
-
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,
|
|
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, sn as AppFilePicker, cn as AppFloatingDock, ln as AppFormActions, un as AppFormRow, dn as AppFormSection, Y as AppIcon, fn as AppInfoList, He as AppInfoTip, Ct as AppInput, _n as AppKpiTile, xn as AppLink, Cn as AppLogoPicker, Dn as AppMeter, Ot as AppModal, On as AppMultiSelect, kn as AppNumberInput, An as AppOtpInput, jn as AppPageHeader, Mn as AppPagination, Nn as AppPhoneNumberInput, Ve as AppPopover, Pn as AppPricingCard, Ln as AppProgress, Rn as AppRadio, zn as AppRepeater, Z as AppRequiredMark, Bn as AppResourceCard, Hn as AppResult, Un as AppScrollbar, Wn as AppSearch, Gn as AppSegmented, qn as AppSelect, Bt as AppSelectMini, Jn as AppShell, Zn as AppSidebarMenu, It as AppSkeleton, Lt as AppSkeletonRows, Qn as AppSlider, Re as AppSpinner, er as AppSplash, tr as AppStatusBadge, nr as AppStepper, ir as AppSwitch, ar as AppTableEmptyState, Ht as AppTablePagination, lr as AppTabs, ur as AppTagInput, dr as AppTextarea, mr as AppTimePicker, pr as AppTimeline, Pr as AppToast, Ir as AppToolbar, G as AppTooltip, Lr as AppWizard, zr as AppWorkspaceSwitcher, At as MODAL_ICONS, Wr as dismissAll, qr as errorToast, Te as iconNames, De as registerIcons, Kr as toast, Jr as usePagination };
|