klun-ui 0.1.13 → 0.1.14
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/CHANGELOG.md +10 -0
- package/dist/{chunk-Y2R5PBYN.cjs → chunk-752UKCVU.cjs} +160 -60
- package/dist/chunk-752UKCVU.cjs.map +1 -0
- package/dist/{chunk-O2CR4NDQ.js → chunk-7L7FJQZ7.js} +159 -61
- package/dist/chunk-7L7FJQZ7.js.map +1 -0
- package/dist/index.cjs +157 -149
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +58 -0
- package/dist/templates/index.cjs +89 -89
- package/dist/templates/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-O2CR4NDQ.js.map +0 -1
- package/dist/chunk-Y2R5PBYN.cjs.map +0 -1
|
@@ -164,7 +164,7 @@ var Format = {
|
|
|
164
164
|
|
|
165
165
|
// src/components/config/locales.tsx
|
|
166
166
|
function fmt(template, vars) {
|
|
167
|
-
return template.replace(/\{(\w+)\}/g, (m,
|
|
167
|
+
return template.replace(/\{(\w+)\}/g, (m, k2) => k2 in vars ? String(vars[k2]) : m);
|
|
168
168
|
}
|
|
169
169
|
var enUS = {
|
|
170
170
|
locale: "en-US",
|
|
@@ -2932,6 +2932,104 @@ var ListItem = forwardRef(
|
|
|
2932
2932
|
}
|
|
2933
2933
|
);
|
|
2934
2934
|
ListItem.displayName = "ListItem";
|
|
2935
|
+
var k = 0;
|
|
2936
|
+
function inline(text) {
|
|
2937
|
+
const patterns = [
|
|
2938
|
+
{ re: /`([^`]+)`/, node: (m) => /* @__PURE__ */ jsx("code", { className: "klun-md-code", children: m[1] }, k++) },
|
|
2939
|
+
{ re: /\*\*([^*]+)\*\*/, node: (m) => /* @__PURE__ */ jsx("strong", { children: inline(m[1]) }, k++) },
|
|
2940
|
+
{ re: /~~([^~]+)~~/, node: (m) => /* @__PURE__ */ jsx("del", { children: inline(m[1]) }, k++) },
|
|
2941
|
+
{ re: /\*([^*]+)\*/, node: (m) => /* @__PURE__ */ jsx("em", { children: inline(m[1]) }, k++) },
|
|
2942
|
+
{ re: /<u>([\s\S]*?)<\/u>/, node: (m) => /* @__PURE__ */ jsx("u", { children: inline(m[1]) }, k++) },
|
|
2943
|
+
{
|
|
2944
|
+
re: /\[([^\]]+)\]\(([^)]+)\)/,
|
|
2945
|
+
node: (m) => /* @__PURE__ */ jsx("a", { href: m[2], target: "_blank", rel: "noreferrer", children: m[1] }, k++)
|
|
2946
|
+
}
|
|
2947
|
+
];
|
|
2948
|
+
const out = [];
|
|
2949
|
+
let rest = text;
|
|
2950
|
+
while (rest.length) {
|
|
2951
|
+
let best = null;
|
|
2952
|
+
for (const p of patterns) {
|
|
2953
|
+
const m = p.re.exec(rest);
|
|
2954
|
+
if (m && (best === null || m.index < best.idx)) best = { idx: m.index, len: m[0].length, p, m };
|
|
2955
|
+
}
|
|
2956
|
+
if (!best) {
|
|
2957
|
+
out.push(rest);
|
|
2958
|
+
break;
|
|
2959
|
+
}
|
|
2960
|
+
if (best.idx > 0) out.push(rest.slice(0, best.idx));
|
|
2961
|
+
out.push(best.p.node(best.m));
|
|
2962
|
+
rest = rest.slice(best.idx + best.len);
|
|
2963
|
+
}
|
|
2964
|
+
return out;
|
|
2965
|
+
}
|
|
2966
|
+
var SPECIAL = /^(#{1,6}\s|>\s?|[-*]\s+|\d+\.\s+|```)/;
|
|
2967
|
+
function renderMarkdown(src) {
|
|
2968
|
+
k = 0;
|
|
2969
|
+
const lines = src.replace(/\r\n/g, "\n").split("\n");
|
|
2970
|
+
const blocks = [];
|
|
2971
|
+
let i = 0;
|
|
2972
|
+
while (i < lines.length) {
|
|
2973
|
+
const line = lines[i];
|
|
2974
|
+
if (/^```/.test(line)) {
|
|
2975
|
+
const buf2 = [];
|
|
2976
|
+
i++;
|
|
2977
|
+
while (i < lines.length && !/^```/.test(lines[i])) buf2.push(lines[i++]);
|
|
2978
|
+
i++;
|
|
2979
|
+
blocks.push(
|
|
2980
|
+
/* @__PURE__ */ jsx("pre", { className: "klun-md-pre", children: /* @__PURE__ */ jsx("code", { children: buf2.join("\n") }) }, k++)
|
|
2981
|
+
);
|
|
2982
|
+
continue;
|
|
2983
|
+
}
|
|
2984
|
+
const h = /^(#{1,6})\s+(.*)$/.exec(line);
|
|
2985
|
+
if (h) {
|
|
2986
|
+
const tag = `h${Math.min(h[1].length + 2, 6)}`;
|
|
2987
|
+
blocks.push(createElement(tag, { key: k++, className: "klun-md-h" }, inline(h[2])));
|
|
2988
|
+
i++;
|
|
2989
|
+
continue;
|
|
2990
|
+
}
|
|
2991
|
+
if (/^>\s?/.test(line)) {
|
|
2992
|
+
const buf2 = [];
|
|
2993
|
+
while (i < lines.length && /^>\s?/.test(lines[i])) buf2.push(lines[i++].replace(/^>\s?/, ""));
|
|
2994
|
+
blocks.push(
|
|
2995
|
+
/* @__PURE__ */ jsx("blockquote", { className: "klun-md-quote", children: inline(buf2.join("\n")) }, k++)
|
|
2996
|
+
);
|
|
2997
|
+
continue;
|
|
2998
|
+
}
|
|
2999
|
+
if (/^[-*]\s+/.test(line)) {
|
|
3000
|
+
const items2 = [];
|
|
3001
|
+
while (i < lines.length && /^[-*]\s+/.test(lines[i])) items2.push(lines[i++].replace(/^[-*]\s+/, ""));
|
|
3002
|
+
blocks.push(
|
|
3003
|
+
/* @__PURE__ */ jsx("ul", { className: "klun-md-ul", children: items2.map((it, j) => /* @__PURE__ */ jsx("li", { children: inline(it) }, j)) }, k++)
|
|
3004
|
+
);
|
|
3005
|
+
continue;
|
|
3006
|
+
}
|
|
3007
|
+
if (/^\d+\.\s+/.test(line)) {
|
|
3008
|
+
const items2 = [];
|
|
3009
|
+
while (i < lines.length && /^\d+\.\s+/.test(lines[i])) items2.push(lines[i++].replace(/^\d+\.\s+/, ""));
|
|
3010
|
+
blocks.push(
|
|
3011
|
+
/* @__PURE__ */ jsx("ol", { className: "klun-md-ol", children: items2.map((it, j) => /* @__PURE__ */ jsx("li", { children: inline(it) }, j)) }, k++)
|
|
3012
|
+
);
|
|
3013
|
+
continue;
|
|
3014
|
+
}
|
|
3015
|
+
if (line.trim() === "") {
|
|
3016
|
+
i++;
|
|
3017
|
+
continue;
|
|
3018
|
+
}
|
|
3019
|
+
const buf = [line];
|
|
3020
|
+
i++;
|
|
3021
|
+
while (i < lines.length && lines[i].trim() !== "" && !SPECIAL.test(lines[i])) buf.push(lines[i++]);
|
|
3022
|
+
blocks.push(
|
|
3023
|
+
/* @__PURE__ */ jsx("p", { className: "klun-md-p", children: buf.flatMap((l, j) => j ? [/* @__PURE__ */ jsx("br", {}, `br${j}`), ...inline(l)] : inline(l)) }, k++)
|
|
3024
|
+
);
|
|
3025
|
+
}
|
|
3026
|
+
return /* @__PURE__ */ jsx(Fragment, { children: blocks });
|
|
3027
|
+
}
|
|
3028
|
+
var Markdown = forwardRef(function Markdown2({ children, source, className, ...props }, ref) {
|
|
3029
|
+
const src = source ?? (typeof children === "string" ? children : "") ?? "";
|
|
3030
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cx("klun-md", className), ...props, children: renderMarkdown(src) });
|
|
3031
|
+
});
|
|
3032
|
+
Markdown.displayName = "Markdown";
|
|
2935
3033
|
var Money = forwardRef(function Money2({
|
|
2936
3034
|
value,
|
|
2937
3035
|
cents = false,
|
|
@@ -3175,8 +3273,8 @@ function StatusBadge({
|
|
|
3175
3273
|
className,
|
|
3176
3274
|
...props
|
|
3177
3275
|
}) {
|
|
3178
|
-
const
|
|
3179
|
-
const resolvedTone = tone || map && map[
|
|
3276
|
+
const k2 = keyOf(status);
|
|
3277
|
+
const resolvedTone = tone || map && map[k2] || STATUS_TONE[k2] || "neutral";
|
|
3180
3278
|
const color = TONE_COLOR[resolvedTone] || "gray";
|
|
3181
3279
|
const text = label != null ? label : String(status == null ? "" : status).replace(/[-_]/g, " ");
|
|
3182
3280
|
const display = typeof text === "string" ? text.charAt(0).toUpperCase() + text.slice(1) : text;
|
|
@@ -3301,14 +3399,14 @@ function Pager({
|
|
|
3301
3399
|
const h = (e) => {
|
|
3302
3400
|
if (sizeRef.current && !sizeRef.current.contains(e.target)) setSizeOpen(false);
|
|
3303
3401
|
};
|
|
3304
|
-
const
|
|
3402
|
+
const k2 = (e) => {
|
|
3305
3403
|
if (e.key === "Escape") setSizeOpen(false);
|
|
3306
3404
|
};
|
|
3307
3405
|
document.addEventListener("mousedown", h);
|
|
3308
|
-
document.addEventListener("keydown",
|
|
3406
|
+
document.addEventListener("keydown", k2);
|
|
3309
3407
|
return () => {
|
|
3310
3408
|
document.removeEventListener("mousedown", h);
|
|
3311
|
-
document.removeEventListener("keydown",
|
|
3409
|
+
document.removeEventListener("keydown", k2);
|
|
3312
3410
|
};
|
|
3313
3411
|
}, [sizeOpen]);
|
|
3314
3412
|
const nums = [];
|
|
@@ -3426,16 +3524,16 @@ function ContextMenu({
|
|
|
3426
3524
|
}, [x, y]);
|
|
3427
3525
|
useEffect(() => {
|
|
3428
3526
|
const close = () => onClose();
|
|
3429
|
-
const
|
|
3527
|
+
const k2 = (e) => {
|
|
3430
3528
|
if (e.key === "Escape") onClose();
|
|
3431
3529
|
};
|
|
3432
3530
|
document.addEventListener("mousedown", close);
|
|
3433
|
-
document.addEventListener("keydown",
|
|
3531
|
+
document.addEventListener("keydown", k2);
|
|
3434
3532
|
window.addEventListener("scroll", close, true);
|
|
3435
3533
|
window.addEventListener("resize", close);
|
|
3436
3534
|
return () => {
|
|
3437
3535
|
document.removeEventListener("mousedown", close);
|
|
3438
|
-
document.removeEventListener("keydown",
|
|
3536
|
+
document.removeEventListener("keydown", k2);
|
|
3439
3537
|
window.removeEventListener("scroll", close, true);
|
|
3440
3538
|
window.removeEventListener("resize", close);
|
|
3441
3539
|
};
|
|
@@ -3487,14 +3585,14 @@ function ColumnSettings({
|
|
|
3487
3585
|
const h = (e) => {
|
|
3488
3586
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
3489
3587
|
};
|
|
3490
|
-
const
|
|
3588
|
+
const k2 = (e) => {
|
|
3491
3589
|
if (e.key === "Escape") setOpen(false);
|
|
3492
3590
|
};
|
|
3493
3591
|
document.addEventListener("mousedown", h);
|
|
3494
|
-
document.addEventListener("keydown",
|
|
3592
|
+
document.addEventListener("keydown", k2);
|
|
3495
3593
|
return () => {
|
|
3496
3594
|
document.removeEventListener("mousedown", h);
|
|
3497
|
-
document.removeEventListener("keydown",
|
|
3595
|
+
document.removeEventListener("keydown", k2);
|
|
3498
3596
|
};
|
|
3499
3597
|
}, [open]);
|
|
3500
3598
|
const toggleable = columns.filter((c) => c.header != null && c.header !== "");
|
|
@@ -3634,14 +3732,14 @@ function FilterMenu({
|
|
|
3634
3732
|
const h = (e) => {
|
|
3635
3733
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
3636
3734
|
};
|
|
3637
|
-
const
|
|
3735
|
+
const k2 = (e) => {
|
|
3638
3736
|
if (e.key === "Escape") setOpen(false);
|
|
3639
3737
|
};
|
|
3640
3738
|
document.addEventListener("mousedown", h);
|
|
3641
|
-
document.addEventListener("keydown",
|
|
3739
|
+
document.addEventListener("keydown", k2);
|
|
3642
3740
|
return () => {
|
|
3643
3741
|
document.removeEventListener("mousedown", h);
|
|
3644
|
-
document.removeEventListener("keydown",
|
|
3742
|
+
document.removeEventListener("keydown", k2);
|
|
3645
3743
|
};
|
|
3646
3744
|
}, [open]);
|
|
3647
3745
|
const toggle = (v) => {
|
|
@@ -4281,12 +4379,12 @@ function useTableFilters({
|
|
|
4281
4379
|
const keys = Object.keys(activeFilters);
|
|
4282
4380
|
if (keys.length === 0) return rows;
|
|
4283
4381
|
return rows.filter(
|
|
4284
|
-
(row) => keys.every((
|
|
4285
|
-
const col = columns.find((c) => c.key ===
|
|
4286
|
-
const vals = activeFilters[
|
|
4382
|
+
(row) => keys.every((k2) => {
|
|
4383
|
+
const col = columns.find((c) => c.key === k2);
|
|
4384
|
+
const vals = activeFilters[k2];
|
|
4287
4385
|
if (!vals || vals.length === 0) return true;
|
|
4288
4386
|
if (col && col.onFilter) return vals.some((v) => col.onFilter(v, row));
|
|
4289
|
-
return vals.includes(row[
|
|
4387
|
+
return vals.includes(row[k2]);
|
|
4290
4388
|
})
|
|
4291
4389
|
);
|
|
4292
4390
|
}, [rows, activeFilters, columns, filters]);
|
|
@@ -4885,10 +4983,10 @@ var Tree = forwardRef(function Tree2({
|
|
|
4885
4983
|
};
|
|
4886
4984
|
const rows = [];
|
|
4887
4985
|
flatten(treeData, 0, true, exp, rows);
|
|
4888
|
-
const toggle = (key) => setExp(exp.includes(key) ? exp.filter((
|
|
4986
|
+
const toggle = (key) => setExp(exp.includes(key) ? exp.filter((k2) => k2 !== key) : [...exp, key]);
|
|
4889
4987
|
const checkState = (node) => {
|
|
4890
4988
|
const all = descendantKeys(node, []);
|
|
4891
|
-
const checkedCount = all.filter((
|
|
4989
|
+
const checkedCount = all.filter((k2) => checkedKeys.includes(k2)).length;
|
|
4892
4990
|
if (checkedCount === 0) return "none";
|
|
4893
4991
|
if (checkedCount === all.length) return "all";
|
|
4894
4992
|
return "some";
|
|
@@ -4898,7 +4996,7 @@ var Tree = forwardRef(function Tree2({
|
|
|
4898
4996
|
const all = descendantKeys(node, []);
|
|
4899
4997
|
const state = checkState(node);
|
|
4900
4998
|
let next;
|
|
4901
|
-
if (state === "all") next = checkedKeys.filter((
|
|
4999
|
+
if (state === "all") next = checkedKeys.filter((k2) => !all.includes(k2));
|
|
4902
5000
|
else next = Array.from(/* @__PURE__ */ new Set([...checkedKeys, ...all]));
|
|
4903
5001
|
onCheck(next);
|
|
4904
5002
|
};
|
|
@@ -5868,14 +5966,14 @@ var Cascader = forwardRef(function Cascader2({
|
|
|
5868
5966
|
const h = (e) => {
|
|
5869
5967
|
if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
|
|
5870
5968
|
};
|
|
5871
|
-
const
|
|
5969
|
+
const k2 = (e) => {
|
|
5872
5970
|
if (e.key === "Escape") setOpen(false);
|
|
5873
5971
|
};
|
|
5874
5972
|
document.addEventListener("mousedown", h);
|
|
5875
|
-
document.addEventListener("keydown",
|
|
5973
|
+
document.addEventListener("keydown", k2);
|
|
5876
5974
|
return () => {
|
|
5877
5975
|
document.removeEventListener("mousedown", h);
|
|
5878
|
-
document.removeEventListener("keydown",
|
|
5976
|
+
document.removeEventListener("keydown", k2);
|
|
5879
5977
|
};
|
|
5880
5978
|
}, [open]);
|
|
5881
5979
|
const columns = [];
|
|
@@ -6941,8 +7039,8 @@ var Calendar = forwardRef(function Calendar2({ value, onPick, className, style }
|
|
|
6941
7039
|
] });
|
|
6942
7040
|
});
|
|
6943
7041
|
var DatePicker = forwardRef(
|
|
6944
|
-
function DatePicker2({ value, onChange, inline, placeholder, format = DEFAULT_FORMAT, align = "left", disabled, className, style, ...props }, ref) {
|
|
6945
|
-
if (
|
|
7042
|
+
function DatePicker2({ value, onChange, inline: inline2, placeholder, format = DEFAULT_FORMAT, align = "left", disabled, className, style, ...props }, ref) {
|
|
7043
|
+
if (inline2) {
|
|
6946
7044
|
return /* @__PURE__ */ jsx(Calendar, { ref, value, onPick: (d) => onChange?.(d), className, style });
|
|
6947
7045
|
}
|
|
6948
7046
|
const sel = value ? new Date(value) : null;
|
|
@@ -7207,9 +7305,9 @@ function DateTimePanel({ value, onChange }) {
|
|
|
7207
7305
|
] });
|
|
7208
7306
|
}
|
|
7209
7307
|
var DateTimePicker = forwardRef(
|
|
7210
|
-
function DateTimePicker2({ value, onChange, inline, placeholder, format = DEFAULT_FORMAT2, align = "left", disabled, className, style, ...props }, ref) {
|
|
7308
|
+
function DateTimePicker2({ value, onChange, inline: inline2, placeholder, format = DEFAULT_FORMAT2, align = "left", disabled, className, style, ...props }, ref) {
|
|
7211
7309
|
const date = value ? new Date(value) : null;
|
|
7212
|
-
if (
|
|
7310
|
+
if (inline2) {
|
|
7213
7311
|
return /* @__PURE__ */ jsx("div", { ref, className: cx("klun-date-time-picker", className), style, ...props, children: /* @__PURE__ */ jsx(DateTimePanel, { value: date, onChange: (d) => onChange?.(d) }) });
|
|
7214
7312
|
}
|
|
7215
7313
|
const label = date ? date.toLocaleString(void 0, format) : "";
|
|
@@ -7296,8 +7394,8 @@ var RangeCalendar = forwardRef(function RangeCalendar2({ start, end, onPick, cla
|
|
|
7296
7394
|
] });
|
|
7297
7395
|
});
|
|
7298
7396
|
var DateRangePicker = forwardRef(
|
|
7299
|
-
function DateRangePicker2({ start, end, onChange, inline, placeholder, format = DEFAULT_FORMAT3, align = "left", disabled, className, style, ...props }, ref) {
|
|
7300
|
-
if (
|
|
7397
|
+
function DateRangePicker2({ start, end, onChange, inline: inline2, placeholder, format = DEFAULT_FORMAT3, align = "left", disabled, className, style, ...props }, ref) {
|
|
7398
|
+
if (inline2) {
|
|
7301
7399
|
return /* @__PURE__ */ jsx(
|
|
7302
7400
|
RangeCalendar,
|
|
7303
7401
|
{
|
|
@@ -7454,9 +7552,9 @@ var toPath = (name) => Array.isArray(name) ? name : String(name).split(".").map(
|
|
|
7454
7552
|
var pathKey = (name) => toPath(name).join(".");
|
|
7455
7553
|
function getIn(obj, name) {
|
|
7456
7554
|
let cur = obj;
|
|
7457
|
-
for (const
|
|
7555
|
+
for (const k2 of toPath(name)) {
|
|
7458
7556
|
if (cur == null) return void 0;
|
|
7459
|
-
cur = cur[
|
|
7557
|
+
cur = cur[k2];
|
|
7460
7558
|
}
|
|
7461
7559
|
return cur;
|
|
7462
7560
|
}
|
|
@@ -7465,11 +7563,11 @@ function setIn(obj, name, value) {
|
|
|
7465
7563
|
const root = Array.isArray(obj) ? obj.slice() : { ...obj };
|
|
7466
7564
|
let cur = root;
|
|
7467
7565
|
for (let i = 0; i < path.length - 1; i++) {
|
|
7468
|
-
const
|
|
7566
|
+
const k2 = path[i];
|
|
7469
7567
|
const nextKeyIsIndex = typeof path[i + 1] === "number";
|
|
7470
|
-
const existing = cur[
|
|
7471
|
-
cur[
|
|
7472
|
-
cur = cur[
|
|
7568
|
+
const existing = cur[k2];
|
|
7569
|
+
cur[k2] = existing == null ? nextKeyIsIndex ? [] : {} : Array.isArray(existing) ? existing.slice() : { ...existing };
|
|
7570
|
+
cur = cur[k2];
|
|
7473
7571
|
}
|
|
7474
7572
|
cur[path[path.length - 1]] = value;
|
|
7475
7573
|
return root;
|
|
@@ -7576,15 +7674,15 @@ function useForm(opts = {}) {
|
|
|
7576
7674
|
const setFields = useCallback((map) => {
|
|
7577
7675
|
setErrors((e) => {
|
|
7578
7676
|
const n = { ...e };
|
|
7579
|
-
Object.entries(map).forEach(([
|
|
7580
|
-
n[pathKey(
|
|
7677
|
+
Object.entries(map).forEach(([k2, v]) => {
|
|
7678
|
+
n[pathKey(k2)] = v;
|
|
7581
7679
|
});
|
|
7582
7680
|
return n;
|
|
7583
7681
|
});
|
|
7584
7682
|
setTouched((t) => {
|
|
7585
7683
|
const n = { ...t };
|
|
7586
|
-
Object.keys(map).forEach((
|
|
7587
|
-
n[pathKey(
|
|
7684
|
+
Object.keys(map).forEach((k2) => {
|
|
7685
|
+
n[pathKey(k2)] = true;
|
|
7588
7686
|
});
|
|
7589
7687
|
return n;
|
|
7590
7688
|
});
|
|
@@ -7615,7 +7713,7 @@ function useForm(opts = {}) {
|
|
|
7615
7713
|
}
|
|
7616
7714
|
});
|
|
7617
7715
|
setErrors(errs);
|
|
7618
|
-
setTouched(entries.reduce((a, [
|
|
7716
|
+
setTouched(entries.reduce((a, [k2]) => (a[k2] = true, a), {}));
|
|
7619
7717
|
if (firstBad) scrollToField(firstBad);
|
|
7620
7718
|
return Object.keys(errs).length === 0;
|
|
7621
7719
|
}, [scrollToField]);
|
|
@@ -7772,11 +7870,11 @@ function FormList({ name, children }) {
|
|
|
7772
7870
|
},
|
|
7773
7871
|
move: (from, to) => {
|
|
7774
7872
|
const a = arr.slice();
|
|
7775
|
-
const
|
|
7873
|
+
const k2 = keysRef.current;
|
|
7776
7874
|
const [m] = a.splice(from, 1);
|
|
7777
7875
|
a.splice(to, 0, m);
|
|
7778
|
-
const [mk] =
|
|
7779
|
-
|
|
7876
|
+
const [mk] = k2.splice(from, 1);
|
|
7877
|
+
k2.splice(to, 0, mk);
|
|
7780
7878
|
setArr(a);
|
|
7781
7879
|
}
|
|
7782
7880
|
};
|
|
@@ -8382,14 +8480,14 @@ var SelectMenu = forwardRef(
|
|
|
8382
8480
|
if (rootRef.current && !rootRef.current.contains(e.target))
|
|
8383
8481
|
setOpen(false);
|
|
8384
8482
|
};
|
|
8385
|
-
const
|
|
8483
|
+
const k2 = (e) => {
|
|
8386
8484
|
if (e.key === "Escape") setOpen(false);
|
|
8387
8485
|
};
|
|
8388
8486
|
document.addEventListener("mousedown", h);
|
|
8389
|
-
document.addEventListener("keydown",
|
|
8487
|
+
document.addEventListener("keydown", k2);
|
|
8390
8488
|
return () => {
|
|
8391
8489
|
document.removeEventListener("mousedown", h);
|
|
8392
|
-
document.removeEventListener("keydown",
|
|
8490
|
+
document.removeEventListener("keydown", k2);
|
|
8393
8491
|
};
|
|
8394
8492
|
}, [open]);
|
|
8395
8493
|
const lead = leadingIcon || selected?.icon;
|
|
@@ -8952,7 +9050,7 @@ function Masonry({
|
|
|
8952
9050
|
colHeights[c] += (h > 0 ? h : 1) + gutterV;
|
|
8953
9051
|
}
|
|
8954
9052
|
setPlacement(
|
|
8955
|
-
(prev) => prev.length === next.length && prev.every((v,
|
|
9053
|
+
(prev) => prev.length === next.length && prev.every((v, k2) => v === next[k2]) ? prev : next
|
|
8956
9054
|
);
|
|
8957
9055
|
}, [cols, gutterV]);
|
|
8958
9056
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -9423,10 +9521,10 @@ function containsKey(children, key) {
|
|
|
9423
9521
|
}
|
|
9424
9522
|
var Menu = forwardRef(function Menu2({ items: items2 = [], selectedKey, onSelect, defaultOpenKeys = [], collapsed = false, className, ...props }, ref) {
|
|
9425
9523
|
const [openKeys, setOpenKeys] = useState(() => new Set(defaultOpenKeys));
|
|
9426
|
-
const toggleOpen = (
|
|
9524
|
+
const toggleOpen = (k2) => setOpenKeys((s) => {
|
|
9427
9525
|
const n = new Set(s);
|
|
9428
|
-
if (n.has(
|
|
9429
|
-
else n.add(
|
|
9526
|
+
if (n.has(k2)) n.delete(k2);
|
|
9527
|
+
else n.add(k2);
|
|
9430
9528
|
return n;
|
|
9431
9529
|
});
|
|
9432
9530
|
const Row3 = ({ item, depth }) => {
|
|
@@ -10211,14 +10309,14 @@ var Dropdown = forwardRef(function Dropdown2({ trigger, items: items2 = [], alig
|
|
|
10211
10309
|
const h = (e) => {
|
|
10212
10310
|
if (innerRef.current && !innerRef.current.contains(e.target)) setOpen(false);
|
|
10213
10311
|
};
|
|
10214
|
-
const
|
|
10312
|
+
const k2 = (e) => {
|
|
10215
10313
|
if (e.key === "Escape") setOpen(false);
|
|
10216
10314
|
};
|
|
10217
10315
|
document.addEventListener("mousedown", h);
|
|
10218
|
-
document.addEventListener("keydown",
|
|
10316
|
+
document.addEventListener("keydown", k2);
|
|
10219
10317
|
return () => {
|
|
10220
10318
|
document.removeEventListener("mousedown", h);
|
|
10221
|
-
document.removeEventListener("keydown",
|
|
10319
|
+
document.removeEventListener("keydown", k2);
|
|
10222
10320
|
};
|
|
10223
10321
|
}, [open]);
|
|
10224
10322
|
const setRefs = (node) => {
|
|
@@ -10579,14 +10677,14 @@ var Popconfirm = forwardRef(function Popconfirm2({
|
|
|
10579
10677
|
if (innerRef.current?.contains(t) || bubbleRef.current?.contains(t)) return;
|
|
10580
10678
|
setOpen(false);
|
|
10581
10679
|
};
|
|
10582
|
-
const
|
|
10680
|
+
const k2 = (e) => {
|
|
10583
10681
|
if (e.key === "Escape") setOpen(false);
|
|
10584
10682
|
};
|
|
10585
10683
|
document.addEventListener("mousedown", h);
|
|
10586
|
-
document.addEventListener("keydown",
|
|
10684
|
+
document.addEventListener("keydown", k2);
|
|
10587
10685
|
return () => {
|
|
10588
10686
|
document.removeEventListener("mousedown", h);
|
|
10589
|
-
document.removeEventListener("keydown",
|
|
10687
|
+
document.removeEventListener("keydown", k2);
|
|
10590
10688
|
};
|
|
10591
10689
|
}, [open]);
|
|
10592
10690
|
useLayoutEffect(() => {
|
|
@@ -10719,6 +10817,6 @@ var Popconfirm = forwardRef(function Popconfirm2({
|
|
|
10719
10817
|
});
|
|
10720
10818
|
Popconfirm.displayName = "Popconfirm";
|
|
10721
10819
|
|
|
10722
|
-
export { Accordion, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, BulkAction, BulkActionBar, Button, ButtonGroup, Card, Carousel, Cascader, CharacterCounter, ChartLegend, ChartTooltip, Checkbox, CheckboxCard, CheckboxGroup, Chip, CircularProgress, CodeViewer, Col, Collapse, ColorDot, ColorPicker, ColorSlider, CommandMenu, CompactSelect, CompactSelectForInput, ConfigProvider, Confirm, ContentLabel, ContextMenu2 as ContextMenu, CopyButton, CounterInput, DatePicker, DateRangePicker, DateTimePicker, Descriptions, DigitInput, Divider, Drawer, Dropdown, ExpiryCountdown, FileUpload, Flex, Form, FormItem, FormList, Format, GaugeBar, Grid, Hint, HorizontalFilter, ImageUpload, ImageViewer, InlineInput, InlineSelect, Input, Kbd, KeyIcon, Label, Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutSider, List, ListItem, LiveDot, LogViewer, Masonry, Menu, Message, Modal, Money, Notification, Pagination, PasswordStrength, Popconfirm, Popover, ProgressBar, Radio, RadioCard, RangeSlider, Rating, RelativeTime, RichEditorToolbar, Row, SegmentedControl, SegmentedProgress, Select, SelectMenu, Skeleton, Slider, Space, Spinner2 as Spinner, Splitter2 as Splitter, SplitterPanel, Statistic, StatusBadge, StatusDot, StepIndicator, Switch, Table, Tabs, Tag, Textarea, TimePicker, Timeline, Toast, Toaster, Tooltip, Tree, Wizard, arSA, deDE, enUS, esES, fmt, frFR, idID, itIT, jaJP, koKR, locales, nlNL, plPL, primaryColorVars, ptBR, ruRU, toast, trTR, useBreakpoint, useConfig, useContextMenu, useForm, useLocale, useMappedSize, useMessage, useNotification, useSize, viVN, zhCN, zhTW };
|
|
10723
|
-
//# sourceMappingURL=chunk-
|
|
10724
|
-
//# sourceMappingURL=chunk-
|
|
10820
|
+
export { Accordion, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, BulkAction, BulkActionBar, Button, ButtonGroup, Card, Carousel, Cascader, CharacterCounter, ChartLegend, ChartTooltip, Checkbox, CheckboxCard, CheckboxGroup, Chip, CircularProgress, CodeViewer, Col, Collapse, ColorDot, ColorPicker, ColorSlider, CommandMenu, CompactSelect, CompactSelectForInput, ConfigProvider, Confirm, ContentLabel, ContextMenu2 as ContextMenu, CopyButton, CounterInput, DatePicker, DateRangePicker, DateTimePicker, Descriptions, DigitInput, Divider, Drawer, Dropdown, ExpiryCountdown, FileUpload, Flex, Form, FormItem, FormList, Format, GaugeBar, Grid, Hint, HorizontalFilter, ImageUpload, ImageViewer, InlineInput, InlineSelect, Input, Kbd, KeyIcon, Label, Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutSider, List, ListItem, LiveDot, LogViewer, Markdown, Masonry, Menu, Message, Modal, Money, Notification, Pagination, PasswordStrength, Popconfirm, Popover, ProgressBar, Radio, RadioCard, RangeSlider, Rating, RelativeTime, RichEditorToolbar, Row, SegmentedControl, SegmentedProgress, Select, SelectMenu, Skeleton, Slider, Space, Spinner2 as Spinner, Splitter2 as Splitter, SplitterPanel, Statistic, StatusBadge, StatusDot, StepIndicator, Switch, Table, Tabs, Tag, Textarea, TimePicker, Timeline, Toast, Toaster, Tooltip, Tree, Wizard, arSA, deDE, enUS, esES, fmt, frFR, idID, itIT, jaJP, koKR, locales, nlNL, plPL, primaryColorVars, ptBR, renderMarkdown, ruRU, toast, trTR, useBreakpoint, useConfig, useContextMenu, useForm, useLocale, useMappedSize, useMessage, useNotification, useSize, viVN, zhCN, zhTW };
|
|
10821
|
+
//# sourceMappingURL=chunk-7L7FJQZ7.js.map
|
|
10822
|
+
//# sourceMappingURL=chunk-7L7FJQZ7.js.map
|