@webority/ui-react 0.12.5 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/lib/emptyValue.d.ts +3 -1
- package/dist/ui-react.js +66 -66
- package/package.json +3 -3
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** The house placeholder for an empty value: a plain hyphen, never a dash. */
|
|
2
|
+
export declare const EMPTY_PLACEHOLDER = "-";
|
|
1
3
|
/**
|
|
2
4
|
* Check if a value is considered empty (null, undefined, or empty string).
|
|
3
5
|
* @param {*} value
|
|
@@ -6,7 +8,7 @@
|
|
|
6
8
|
export declare function isEmpty(value: any): boolean;
|
|
7
9
|
/**
|
|
8
10
|
* Get the display value for a potentially empty field.
|
|
9
|
-
* Returns
|
|
11
|
+
* Returns the plain-hyphen placeholder for empty values, otherwise returns the value as-is.
|
|
10
12
|
* @param {*} value
|
|
11
13
|
* @returns {string|*}
|
|
12
14
|
*/
|
package/dist/ui-react.js
CHANGED
|
@@ -1698,8 +1698,13 @@ function bt({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
//#endregion
|
|
1701
|
+
//#region src/lib/emptyValue.js
|
|
1702
|
+
function xt(e) {
|
|
1703
|
+
return e == null || e === "";
|
|
1704
|
+
}
|
|
1705
|
+
//#endregion
|
|
1701
1706
|
//#region src/components/AppCompareTable.jsx
|
|
1702
|
-
function
|
|
1707
|
+
function St({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i }) {
|
|
1703
1708
|
U("AppCompareTable", i);
|
|
1704
1709
|
let a = (e) => e === !0 ? /* @__PURE__ */ E("span", {
|
|
1705
1710
|
className: "compare-yes",
|
|
@@ -1709,7 +1714,7 @@ function xt({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
1709
1714
|
})
|
|
1710
1715
|
}) : e === !1 ? /* @__PURE__ */ E("span", {
|
|
1711
1716
|
className: "compare-no",
|
|
1712
|
-
children: "
|
|
1717
|
+
children: "-"
|
|
1713
1718
|
}) : e;
|
|
1714
1719
|
return /* @__PURE__ */ E("div", {
|
|
1715
1720
|
className: `compare-table${r ? ` ${r}` : ""}`,
|
|
@@ -1736,7 +1741,7 @@ function xt({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
1736
1741
|
}
|
|
1737
1742
|
//#endregion
|
|
1738
1743
|
//#region src/components/AppInput.jsx
|
|
1739
|
-
var
|
|
1744
|
+
var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", type: c = "text", size: l = "md", leftIcon: u, rightIcon: p, onRightIconClick: m, rightIconLabel: h, unit: g, id: _, name: v, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: T, prefix: O, suffix: k, action: A, floatingLabel: j = !1, variant: M, passwordRequirements: P = !1, requirementsPlacement: F = "auto", ...I }, L) {
|
|
1740
1745
|
U("AppInput", I);
|
|
1741
1746
|
let [R, z] = f(!1), ee = s(), B = _ || ee, V = c === "password", te = V && R ? "text" : c, H = d(null), ne = (e) => {
|
|
1742
1747
|
H.current = e, typeof L == "function" ? L(e) : L && (L.current = e);
|
|
@@ -1964,34 +1969,34 @@ var St = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1964
1969
|
})
|
|
1965
1970
|
]
|
|
1966
1971
|
});
|
|
1967
|
-
}),
|
|
1972
|
+
}), wt = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", Tt = {
|
|
1968
1973
|
sm: 380,
|
|
1969
1974
|
md: 440,
|
|
1970
1975
|
lg: 640,
|
|
1971
1976
|
xl: 880
|
|
1972
|
-
},
|
|
1973
|
-
function
|
|
1977
|
+
}, Et = !1;
|
|
1978
|
+
function Dt() {
|
|
1974
1979
|
let e = !0;
|
|
1975
1980
|
try {
|
|
1976
1981
|
e = process.env.NODE_ENV !== "production";
|
|
1977
1982
|
} catch {
|
|
1978
1983
|
e = !0;
|
|
1979
1984
|
}
|
|
1980
|
-
!e ||
|
|
1985
|
+
!e || Et || (Et = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
1981
1986
|
}
|
|
1982
|
-
function
|
|
1983
|
-
U("AppModal", v), W("AppModal", "size", typeof u == "string" ? u : null, Object.keys(
|
|
1987
|
+
function Ot({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a = "default", dismissible: s = !0, onClose: c, footer: l, size: u = "md", placement: f = "center", hideHeader: p = !1, staticBackdrop: m = !1, ariaLabel: h, className: g = "", children: _, ...v }) {
|
|
1988
|
+
U("AppModal", v), W("AppModal", "size", typeof u == "string" ? u : null, Object.keys(Tt));
|
|
1984
1989
|
let { style: y, ...x } = v;
|
|
1985
|
-
p && !h && typeof n != "string" &&
|
|
1990
|
+
p && !h && typeof n != "string" && Dt();
|
|
1986
1991
|
let S = d(null);
|
|
1987
1992
|
o(() => {
|
|
1988
1993
|
if (!e) return;
|
|
1989
1994
|
let t = S.current?.closest(".modal-content");
|
|
1990
1995
|
if (!t) return;
|
|
1991
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
1996
|
+
let n = () => Array.from(t.querySelectorAll(wt));
|
|
1992
1997
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
1993
1998
|
}, [e]);
|
|
1994
|
-
let C = typeof u == "number" ? u :
|
|
1999
|
+
let C = typeof u == "number" ? u : Tt[u] ?? Tt.md, w = [
|
|
1995
2000
|
"wui-modal",
|
|
1996
2001
|
a === "default" ? "" : `tone-${a}`,
|
|
1997
2002
|
g
|
|
@@ -2076,30 +2081,30 @@ function Dt({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
2076
2081
|
}
|
|
2077
2082
|
//#endregion
|
|
2078
2083
|
//#region src/components/ModalIcons.jsx
|
|
2079
|
-
var
|
|
2084
|
+
var kt = (e) => function({ size: t = 72 }) {
|
|
2080
2085
|
return /* @__PURE__ */ E("wui-status-icon", {
|
|
2081
2086
|
tone: e,
|
|
2082
2087
|
size: t
|
|
2083
2088
|
});
|
|
2084
|
-
},
|
|
2085
|
-
success:
|
|
2086
|
-
error:
|
|
2087
|
-
warning:
|
|
2088
|
-
info:
|
|
2089
|
-
delete:
|
|
2089
|
+
}, At = {
|
|
2090
|
+
success: kt("success"),
|
|
2091
|
+
error: kt("error"),
|
|
2092
|
+
warning: kt("warning"),
|
|
2093
|
+
info: kt("info"),
|
|
2094
|
+
delete: kt("delete")
|
|
2090
2095
|
};
|
|
2091
2096
|
//#endregion
|
|
2092
2097
|
//#region src/components/AppConfirmDialog.jsx
|
|
2093
|
-
function
|
|
2098
|
+
function jt({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", danger: a = !1, tone: s, image: c, confirmPhrase: l, onConfirm: u, onClose: d, loading: p = !1, staticBackdrop: m = !1, placement: h = "center", size: g = "md", className: _ = "", ...v }) {
|
|
2094
2099
|
U("AppConfirmDialog", v);
|
|
2095
2100
|
let [y, b] = f("");
|
|
2096
2101
|
if (o(() => {
|
|
2097
2102
|
e || b("");
|
|
2098
2103
|
}, [e]), !e) return null;
|
|
2099
|
-
let x = !!l && y.trim() !== l, S = c ? null :
|
|
2104
|
+
let x = !!l && y.trim() !== l, S = c ? null : At[s || (a ? "delete" : "info")], C = () => {
|
|
2100
2105
|
p || d?.();
|
|
2101
2106
|
};
|
|
2102
|
-
return /* @__PURE__ */ E(
|
|
2107
|
+
return /* @__PURE__ */ E(Ot, {
|
|
2103
2108
|
...v,
|
|
2104
2109
|
open: e,
|
|
2105
2110
|
hideHeader: !0,
|
|
@@ -2148,7 +2153,7 @@ function At({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
2148
2153
|
className: "wui-confirm-msg",
|
|
2149
2154
|
children: n
|
|
2150
2155
|
}),
|
|
2151
|
-
l && /* @__PURE__ */ E(
|
|
2156
|
+
l && /* @__PURE__ */ E(Ct, {
|
|
2152
2157
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
2153
2158
|
label: /* @__PURE__ */ D(T, { children: [
|
|
2154
2159
|
"Type ",
|
|
@@ -2166,9 +2171,9 @@ function At({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
2166
2171
|
}
|
|
2167
2172
|
//#endregion
|
|
2168
2173
|
//#region src/components/AppConsentBanner.jsx
|
|
2169
|
-
var
|
|
2170
|
-
function
|
|
2171
|
-
U("AppConsentBanner", f), W("AppConsentBanner", "position", c,
|
|
2174
|
+
var Mt = ["bottom-left", "bottom-right"];
|
|
2175
|
+
function Nt({ heading: e, description: t, policyHref: n, policyLabel: r, analyticsDescription: i, functionalDescription: a, marketingDescription: s, position: c = "bottom-left", standalone: l = !1, className: u = "", style: d, ...f }) {
|
|
2176
|
+
U("AppConsentBanner", f), W("AppConsentBanner", "position", c, Mt);
|
|
2172
2177
|
let { setRef: p, innerRef: m } = Q({ on: { "wui-consent-save": (e) => {
|
|
2173
2178
|
R(e.detail), m.current && (m.current.preferences = L());
|
|
2174
2179
|
} } });
|
|
@@ -2195,13 +2200,13 @@ function Mt({ heading: e, description: t, policyHref: n, policyLabel: r, analyti
|
|
|
2195
2200
|
}
|
|
2196
2201
|
//#endregion
|
|
2197
2202
|
//#region src/components/AppCopyButton.jsx
|
|
2198
|
-
var
|
|
2203
|
+
var Pt = {
|
|
2199
2204
|
sm: 14,
|
|
2200
2205
|
md: 16,
|
|
2201
2206
|
lg: 20
|
|
2202
2207
|
};
|
|
2203
|
-
function
|
|
2204
|
-
U("AppCopyButton", m), W("AppCopyButton", "size", i, Object.keys(
|
|
2208
|
+
function Ft({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r = !1, size: i = "md", variant: s = "ghost", onCopied: c, className: l = "", tooltip: u, tooltipPlacement: p, ...m }) {
|
|
2209
|
+
U("AppCopyButton", m), W("AppCopyButton", "size", i, Object.keys(Pt));
|
|
2205
2210
|
let [h, g] = f(!1), _ = d(null);
|
|
2206
2211
|
o(() => () => clearTimeout(_.current), []);
|
|
2207
2212
|
let v = a(async () => {
|
|
@@ -2210,7 +2215,7 @@ function Pt({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
2210
2215
|
return K(r ? /* @__PURE__ */ E(ke, {
|
|
2211
2216
|
icon: b,
|
|
2212
2217
|
label: y,
|
|
2213
|
-
size:
|
|
2218
|
+
size: Pt[i] ?? Pt.md,
|
|
2214
2219
|
onClick: v,
|
|
2215
2220
|
className: l,
|
|
2216
2221
|
...m
|
|
@@ -2227,7 +2232,7 @@ function Pt({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
2227
2232
|
}
|
|
2228
2233
|
//#endregion
|
|
2229
2234
|
//#region src/components/AppSkeleton.jsx
|
|
2230
|
-
function
|
|
2235
|
+
function It({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "", style: i, ...a }) {
|
|
2231
2236
|
return U("AppSkeleton", a), /* @__PURE__ */ E("span", {
|
|
2232
2237
|
className: `skeleton${r ? ` ${r}` : ""}`,
|
|
2233
2238
|
"aria-hidden": "true",
|
|
@@ -2240,28 +2245,28 @@ function Ft({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "
|
|
|
2240
2245
|
...a
|
|
2241
2246
|
});
|
|
2242
2247
|
}
|
|
2243
|
-
function
|
|
2244
|
-
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ E("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E(
|
|
2248
|
+
function Lt({ rows: e = 4, cols: t = 5 }) {
|
|
2249
|
+
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ E("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E(It, {
|
|
2245
2250
|
width: t === 0 ? "70%" : "50%",
|
|
2246
2251
|
height: 12
|
|
2247
2252
|
}) }, `col-${t}`)) }, `row-${n}`));
|
|
2248
2253
|
}
|
|
2249
2254
|
//#endregion
|
|
2250
2255
|
//#region src/lib/pageWindow.js
|
|
2251
|
-
var
|
|
2256
|
+
var Rt = (e, t) => {
|
|
2252
2257
|
let n = [];
|
|
2253
2258
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
2254
2259
|
return n;
|
|
2255
2260
|
};
|
|
2256
|
-
function
|
|
2261
|
+
function zt(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
2257
2262
|
let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
|
|
2258
|
-
if (i <= n * 2 + 3 + r * 2) return
|
|
2259
|
-
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u =
|
|
2260
|
-
return u.push(...c ? ["ellipsis-left"] :
|
|
2263
|
+
if (i <= n * 2 + 3 + r * 2) return Rt(1, i);
|
|
2264
|
+
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u = Rt(1, r);
|
|
2265
|
+
return u.push(...c ? ["ellipsis-left"] : Rt(r + 1, o - 1)), u.push(...Rt(o, s)), u.push(...l ? ["ellipsis-right"] : Rt(s + 1, i - r)), u.push(...Rt(i - r + 1, i)), u;
|
|
2261
2266
|
}
|
|
2262
2267
|
//#endregion
|
|
2263
2268
|
//#region src/components/AppSelectMini.jsx
|
|
2264
|
-
function
|
|
2269
|
+
function Bt({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", name: i, ariaLabel: a, id: s, disabled: c, size: l, icon: u, prefix: d, className: f, ...p }) {
|
|
2265
2270
|
U("AppSelectMini", p);
|
|
2266
2271
|
let { setRef: m, innerRef: h } = Q({
|
|
2267
2272
|
value: e ?? "",
|
|
@@ -2298,22 +2303,22 @@ function zt({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
2298
2303
|
}
|
|
2299
2304
|
//#endregion
|
|
2300
2305
|
//#region src/components/AppTablePagination.jsx
|
|
2301
|
-
var
|
|
2306
|
+
var Vt = [
|
|
2302
2307
|
5,
|
|
2303
2308
|
10,
|
|
2304
2309
|
25,
|
|
2305
2310
|
50
|
|
2306
2311
|
];
|
|
2307
|
-
function
|
|
2312
|
+
function Ht({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRow: a, onPageChange: o, onPageSizeChange: s, pageSizes: c = Vt, mode: l = "prev-next", showPageSize: u = !0, className: d = "", ...f }) {
|
|
2308
2313
|
U("AppTablePagination", f);
|
|
2309
|
-
let p = l === "numbered", m = p ?
|
|
2314
|
+
let p = l === "numbered", m = p ? zt(e, t) : null;
|
|
2310
2315
|
return /* @__PURE__ */ D("div", {
|
|
2311
2316
|
className: `table-pagination${d ? ` ${d}` : ""}`,
|
|
2312
2317
|
...f,
|
|
2313
2318
|
children: [
|
|
2314
2319
|
u && /* @__PURE__ */ D("span", {
|
|
2315
2320
|
className: "tpg-rows",
|
|
2316
|
-
children: ["Rows per page:", /* @__PURE__ */ E(
|
|
2321
|
+
children: ["Rows per page:", /* @__PURE__ */ E(Bt, {
|
|
2317
2322
|
value: n,
|
|
2318
2323
|
onChange: (e) => s(Number(e)),
|
|
2319
2324
|
ariaLabel: "Rows per page",
|
|
@@ -2377,13 +2382,13 @@ function Vt({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
2377
2382
|
}
|
|
2378
2383
|
//#endregion
|
|
2379
2384
|
//#region src/components/AppDataTable.jsx
|
|
2380
|
-
function
|
|
2385
|
+
function Ut(e) {
|
|
2381
2386
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
2382
2387
|
}
|
|
2383
|
-
function
|
|
2384
|
-
return e == null || e === "" ? "
|
|
2388
|
+
function Wt(e) {
|
|
2389
|
+
return e == null || e === "" ? "-" : typeof e == "boolean" ? String(e) : e;
|
|
2385
2390
|
}
|
|
2386
|
-
function
|
|
2391
|
+
function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a, loading: o = !1, skeletonRows: s = 5, empty: c = "No records found.", emptyFiltered: l, sourceCount: u, rowActions: d, rowActionsLabel: p, pagination: m, ariaLabel: h, className: g = "", wrapperClassName: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, renderExpanded: S, ...C }) {
|
|
2387
2392
|
U("AppDataTable", C);
|
|
2388
2393
|
let w = typeof S == "function", [O, k] = f(() => /* @__PURE__ */ new Set()), A = (e) => k((t) => {
|
|
2389
2394
|
let n = new Set(t);
|
|
@@ -2420,7 +2425,7 @@ function Wt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2420
2425
|
e.map((e, t) => {
|
|
2421
2426
|
let n = !!(e.sortable && a), r = i && i.key === e.key;
|
|
2422
2427
|
return /* @__PURE__ */ D("th", {
|
|
2423
|
-
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") +
|
|
2428
|
+
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") + Ut(e.align),
|
|
2424
2429
|
style: e.width ? { width: e.width } : void 0,
|
|
2425
2430
|
tabIndex: n ? 0 : void 0,
|
|
2426
2431
|
"aria-sort": r ? i.dir === "asc" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
@@ -2447,7 +2452,7 @@ function Wt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2447
2452
|
children: "Actions"
|
|
2448
2453
|
})
|
|
2449
2454
|
}))
|
|
2450
|
-
] }) }), /* @__PURE__ */ E("tbody", { children: o ? /* @__PURE__ */ E(
|
|
2455
|
+
] }) }), /* @__PURE__ */ E("tbody", { children: o ? /* @__PURE__ */ E(Lt, {
|
|
2451
2456
|
rows: s,
|
|
2452
2457
|
cols: j
|
|
2453
2458
|
}) : n?.length ? n.map((n, i) => {
|
|
@@ -2481,9 +2486,9 @@ function Wt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2481
2486
|
})
|
|
2482
2487
|
}),
|
|
2483
2488
|
e.map((e, t) => /* @__PURE__ */ E("td", {
|
|
2484
|
-
className: (t === 0 ? "wui-name-cell " : "") +
|
|
2489
|
+
className: (t === 0 ? "wui-name-cell " : "") + Ut(e.align) + (e.cellClassName ? ` ${e.cellClassName}` : ""),
|
|
2485
2490
|
style: e.cellStyle,
|
|
2486
|
-
children: e.render ? e.render(n) :
|
|
2491
|
+
children: e.render ? e.render(n) : Wt(n[e.key])
|
|
2487
2492
|
}, e.key)),
|
|
2488
2493
|
d && /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E("div", {
|
|
2489
2494
|
className: "u-row-actions",
|
|
@@ -2506,7 +2511,7 @@ function Wt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2506
2511
|
children: I
|
|
2507
2512
|
}) : I
|
|
2508
2513
|
})]
|
|
2509
|
-
}), m && !o && m.total > 0 && /* @__PURE__ */ E(
|
|
2514
|
+
}), m && !o && m.total > 0 && /* @__PURE__ */ E(Ht, {
|
|
2510
2515
|
page: m.page,
|
|
2511
2516
|
totalPages: m.totalPages,
|
|
2512
2517
|
pageSize: m.pageSize,
|
|
@@ -2519,7 +2524,7 @@ function Wt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2519
2524
|
}
|
|
2520
2525
|
//#endregion
|
|
2521
2526
|
//#region src/components/AppDatePicker.jsx
|
|
2522
|
-
var
|
|
2527
|
+
var Kt = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, placeholder: u = "Enter Date", disabled: d, size: f, firstDay: p, id: m, ariaLabel: h, className: g = "", fieldClassName: _ = "", ...v }, y) {
|
|
2523
2528
|
U("AppDatePicker", v);
|
|
2524
2529
|
let b = s(), x = m || b, { setRef: S } = Q({
|
|
2525
2530
|
ref: y,
|
|
@@ -2563,7 +2568,7 @@ var Gt = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
2563
2568
|
})
|
|
2564
2569
|
]
|
|
2565
2570
|
});
|
|
2566
|
-
}),
|
|
2571
|
+
}), qt = i(function({ start: e, end: t, onChange: n, label: r, required: i = !1, hint: a, error: c, startName: l, endName: u, min: d, max: f, placeholder: p = "Start – End", disabled: m, size: h, firstDay: g, id: _, ariaLabel: v, className: y = "", fieldClassName: b = "", ...x }, S) {
|
|
2567
2572
|
U("AppDateRangePicker", x);
|
|
2568
2573
|
let C = s(), w = _ || C, { setRef: T, innerRef: O } = Q({
|
|
2569
2574
|
ref: S,
|
|
@@ -2623,11 +2628,6 @@ var Gt = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
2623
2628
|
});
|
|
2624
2629
|
});
|
|
2625
2630
|
//#endregion
|
|
2626
|
-
//#region src/lib/emptyValue.js
|
|
2627
|
-
function qt(e) {
|
|
2628
|
-
return e == null || e === "";
|
|
2629
|
-
}
|
|
2630
|
-
//#endregion
|
|
2631
2631
|
//#region src/components/AppDescriptions.jsx
|
|
2632
2632
|
function Jt({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
2633
2633
|
return U("AppDescriptions", o), /* @__PURE__ */ D("div", {
|
|
@@ -2645,7 +2645,7 @@ function Jt({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
2645
2645
|
}), /* @__PURE__ */ E("dl", {
|
|
2646
2646
|
className: "descs-list",
|
|
2647
2647
|
children: e.map((e, t) => {
|
|
2648
|
-
let n =
|
|
2648
|
+
let n = xt(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
2649
2649
|
return /* @__PURE__ */ D("div", {
|
|
2650
2650
|
className: "descs-item",
|
|
2651
2651
|
style: { "--descs-span": r },
|
|
@@ -2654,7 +2654,7 @@ function Jt({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
2654
2654
|
children: e.label
|
|
2655
2655
|
}), /* @__PURE__ */ E("dd", {
|
|
2656
2656
|
className: `descs-value${n ? " is-empty" : ""}`,
|
|
2657
|
-
children: n ? "
|
|
2657
|
+
children: n ? "-" : e.value
|
|
2658
2658
|
})]
|
|
2659
2659
|
}, i);
|
|
2660
2660
|
})
|
|
@@ -3261,7 +3261,7 @@ function pn({ items: e = [], className: t = "", ...n }) {
|
|
|
3261
3261
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
3262
3262
|
...n,
|
|
3263
3263
|
children: e.map((e, t) => {
|
|
3264
|
-
let n =
|
|
3264
|
+
let n = xt(e.value), r = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
3265
3265
|
className: "info-icon",
|
|
3266
3266
|
children: X(e.icon, { size: 16 })
|
|
3267
3267
|
}), /* @__PURE__ */ D("span", {
|
|
@@ -3271,7 +3271,7 @@ function pn({ items: e = [], className: t = "", ...n }) {
|
|
|
3271
3271
|
children: e.label
|
|
3272
3272
|
}), /* @__PURE__ */ E("span", {
|
|
3273
3273
|
className: `info-value${n ? " is-empty" : ""}`,
|
|
3274
|
-
children: n ? "
|
|
3274
|
+
children: n ? "-" : e.value
|
|
3275
3275
|
})]
|
|
3276
3276
|
})] }), i = e.key ?? `${e.label}-${t}`;
|
|
3277
3277
|
return e.href ? /* @__PURE__ */ E("a", {
|
|
@@ -3917,7 +3917,7 @@ function Mn({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
3917
3917
|
//#region src/components/AppPagination.jsx
|
|
3918
3918
|
function Nn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
3919
3919
|
if (U("AppPagination", s), t <= 1) return null;
|
|
3920
|
-
let c =
|
|
3920
|
+
let c = zt(e, t, { siblingCount: r });
|
|
3921
3921
|
return /* @__PURE__ */ E("nav", {
|
|
3922
3922
|
className: [
|
|
3923
3923
|
"pagination-nav",
|
|
@@ -4855,7 +4855,7 @@ function tr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
4855
4855
|
//#endregion
|
|
4856
4856
|
//#region src/components/AppStatusBadge.jsx
|
|
4857
4857
|
function nr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tooltipPlacement: i, ...a }) {
|
|
4858
|
-
return U("AppStatusBadge", a), e == null || e === "" ? "
|
|
4858
|
+
return U("AppStatusBadge", a), e == null || e === "" ? "-" : K(/* @__PURE__ */ E("span", {
|
|
4859
4859
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
4860
4860
|
...a,
|
|
4861
4861
|
children: e
|
|
@@ -5999,4 +5999,4 @@ function Yr(e, t = 10) {
|
|
|
5999
5999
|
};
|
|
6000
6000
|
}
|
|
6001
6001
|
//#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,
|
|
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, $t as AppFeedback, on 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.
|
|
3
|
+
"version": "0.13.1",
|
|
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.
|
|
32
|
-
"@webority/ui-elements": "0.
|
|
31
|
+
"@webority/theme": "0.13.1",
|
|
32
|
+
"@webority/ui-elements": "0.13.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@webority/analytics": "^0.5.2",
|