@chain-ui/core 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1052 -277
- package/dist/src/components/checkbox/checkbox.d.ts +40 -0
- package/dist/src/components/checkbox/checkbox.stories.d.ts +29 -0
- package/dist/src/components/checkbox/checkbox.test.d.ts +1 -0
- package/dist/src/components/checkbox/index.d.ts +2 -0
- package/dist/src/components/index.d.ts +7 -0
- package/dist/src/components/message/index.d.ts +2 -0
- package/dist/src/components/message/message.d.ts +16 -0
- package/dist/src/components/message/message.stories.d.ts +18 -0
- package/dist/src/components/message/message.test.d.ts +1 -0
- package/dist/src/components/notification/index.d.ts +2 -0
- package/dist/src/components/notification/notification.d.ts +18 -0
- package/dist/src/components/notification/notification.stories.d.ts +18 -0
- package/dist/src/components/notification/notification.test.d.ts +1 -0
- package/dist/src/components/popover/index.d.ts +2 -0
- package/dist/src/components/popover/popover.d.ts +23 -0
- package/dist/src/components/popover/popover.stories.d.ts +18 -0
- package/dist/src/components/popover/popover.test.d.ts +1 -0
- package/dist/src/components/radio/index.d.ts +2 -0
- package/dist/src/components/radio/radio.d.ts +37 -0
- package/dist/src/components/radio/radio.stories.d.ts +28 -0
- package/dist/src/components/radio/radio.test.d.ts +1 -0
- package/dist/src/components/space/space.d.ts +2 -1
- package/dist/src/components/switch/index.d.ts +2 -0
- package/dist/src/components/switch/switch.d.ts +14 -0
- package/dist/src/components/switch/switch.stories.d.ts +24 -0
- package/dist/src/components/switch/switch.test.d.ts +1 -0
- package/dist/src/components/tooltip/index.d.ts +2 -0
- package/dist/src/components/tooltip/tooltip.d.ts +20 -0
- package/dist/src/components/tooltip/tooltip.stories.d.ts +19 -0
- package/dist/src/components/tooltip/tooltip.test.d.ts +1 -0
- package/dist/src/utils/icons.d.ts +1 -0
- package/dist/src/utils/index.d.ts +5 -1
- package/dist/src/utils/portal.d.ts +13 -0
- package/dist/src/utils/position.d.ts +7 -0
- package/package.json +6 -2
- package/dist/index.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -68,8 +68,7 @@ var f = t(function({ variant: e = "solid", color: t = "primary", size: n = "md",
|
|
|
68
68
|
/* @__PURE__ */ l("input", {
|
|
69
69
|
ref: b,
|
|
70
70
|
className: "chain-input__field",
|
|
71
|
-
value: w,
|
|
72
|
-
defaultValue: C ? void 0 : t,
|
|
71
|
+
...C ? { value: w } : { defaultValue: t },
|
|
73
72
|
onChange: T,
|
|
74
73
|
disabled: o,
|
|
75
74
|
readOnly: c,
|
|
@@ -160,157 +159,157 @@ function g(e, t) {
|
|
|
160
159
|
return e === t.value;
|
|
161
160
|
}
|
|
162
161
|
var _ = t(function({ value: e, defaultValue: t, onChange: i, options: a = [], variant: c = "outline", size: f = "md", status: p = "default", disabled: m = !1, loading: h = !1, allowClear: _ = !1, placeholder: v = "Please select", mode: y = "single", showSearch: b = !1, prefix: x, suffix: S, emptyText: C = "暂无数据", clearAriaLabel: w = "Clear selection", searchPlaceholder: T = "Search", expandAriaLabel: E = "Expand", collapseAriaLabel: D = "Collapse", removeAriaLabel: O = "Remove", dropdownClassName: k, dropdownStyle: A, getPopupContainer: j, className: M, style: N, ...P }, F) {
|
|
163
|
-
let I = e !== void 0, [
|
|
162
|
+
let I = e !== void 0, [L, R] = s(t ?? (y === "multiple" ? [] : "")), z = I ? e : L, [B, V] = s(!1), [H, U] = s(-1), [W, G] = s(""), [K, ee] = s({
|
|
164
163
|
top: 0,
|
|
165
164
|
left: 0,
|
|
166
165
|
width: 0
|
|
167
|
-
}),
|
|
168
|
-
I ||
|
|
169
|
-
}, [I, i]),
|
|
170
|
-
if (!
|
|
171
|
-
let e =
|
|
172
|
-
|
|
166
|
+
}), q = o(null), te = o(null), J = o(null), Y = o(null), X = m || h, Z = n((e, t) => {
|
|
167
|
+
I || R(e), i?.(e, t);
|
|
168
|
+
}, [I, i]), ne = a.filter((e) => y === "multiple" && Array.isArray(z) ? z.some((t) => g(t, e)) : g(z, e)), re = b && W ? a.filter((e) => String(e.label).toLowerCase().includes(W.toLowerCase())) : a, Q = re.filter((e) => !e.disabled), ie = n(() => {
|
|
169
|
+
if (!q.current) return;
|
|
170
|
+
let e = q.current.getBoundingClientRect();
|
|
171
|
+
ee({
|
|
173
172
|
top: e.bottom + 4,
|
|
174
173
|
left: e.left,
|
|
175
174
|
width: e.width
|
|
176
175
|
});
|
|
177
|
-
}, []),
|
|
178
|
-
|
|
179
|
-
}, [
|
|
180
|
-
|
|
181
|
-
}, []),
|
|
176
|
+
}, []), ae = n(() => {
|
|
177
|
+
X || (ie(), V(!0), U(-1), G(""));
|
|
178
|
+
}, [X, ie]), $ = n(() => {
|
|
179
|
+
V(!1), U(-1), G("");
|
|
180
|
+
}, []), oe = n((e, t) => {
|
|
182
181
|
if (!e.disabled) if (y === "multiple") {
|
|
183
|
-
let n = Array.isArray(
|
|
184
|
-
|
|
185
|
-
} else
|
|
182
|
+
let n = Array.isArray(z) ? z : [];
|
|
183
|
+
Z(n.some((t) => g(t, e)) ? n.filter((t) => !g(t, e)) : [...n, e.value], t);
|
|
184
|
+
} else Z(e.value, t), $();
|
|
186
185
|
}, [
|
|
187
186
|
y,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
z,
|
|
188
|
+
Z,
|
|
189
|
+
$
|
|
191
190
|
]), se = n((e) => {
|
|
192
|
-
e.stopPropagation(),
|
|
193
|
-
}, [y,
|
|
194
|
-
t.stopPropagation(), y === "multiple" && Array.isArray(
|
|
191
|
+
e.stopPropagation(), Z(y === "multiple" ? [] : "", e);
|
|
192
|
+
}, [y, Z]), ce = n((e, t) => {
|
|
193
|
+
t.stopPropagation(), y === "multiple" && Array.isArray(z) && Z(z.filter((t) => !g(t, e)), t);
|
|
195
194
|
}, [
|
|
196
195
|
y,
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
z,
|
|
197
|
+
Z
|
|
199
198
|
]), le = () => {
|
|
200
|
-
if (y === "multiple" && Array.isArray(
|
|
201
|
-
if (y === "single" &&
|
|
202
|
-
let e = a.find((e) => g(
|
|
203
|
-
return e ? e.label : String(
|
|
199
|
+
if (y === "multiple" && Array.isArray(z) && z.length > 0) return null;
|
|
200
|
+
if (y === "single" && z !== "" && z !== void 0) {
|
|
201
|
+
let e = a.find((e) => g(z, e));
|
|
202
|
+
return e ? e.label : String(z);
|
|
204
203
|
}
|
|
205
204
|
return null;
|
|
206
205
|
}, ue = n(() => {
|
|
207
|
-
|
|
206
|
+
X || (B ? $() : ae());
|
|
208
207
|
}, [
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
X,
|
|
209
|
+
B,
|
|
210
|
+
ae,
|
|
211
|
+
$
|
|
213
212
|
]), de = n((e) => {
|
|
214
|
-
if (!
|
|
213
|
+
if (!X) switch (e.key) {
|
|
215
214
|
case "Enter":
|
|
216
215
|
case " ":
|
|
217
|
-
e.preventDefault(),
|
|
216
|
+
e.preventDefault(), B ? H >= 0 && H < Q.length && oe(Q[H], e) : ae();
|
|
218
217
|
break;
|
|
219
218
|
case "ArrowDown":
|
|
220
|
-
e.preventDefault(),
|
|
219
|
+
e.preventDefault(), B ? U((e) => e < Q.length - 1 ? e + 1 : 0) : (ae(), U(0));
|
|
221
220
|
break;
|
|
222
221
|
case "ArrowUp":
|
|
223
|
-
e.preventDefault(),
|
|
222
|
+
e.preventDefault(), B && U((e) => e > 0 ? e - 1 : Q.length - 1);
|
|
224
223
|
break;
|
|
225
224
|
case "Escape":
|
|
226
|
-
e.preventDefault(),
|
|
225
|
+
e.preventDefault(), $(), q.current?.focus();
|
|
227
226
|
break;
|
|
228
227
|
case "Tab":
|
|
229
|
-
|
|
228
|
+
B && $();
|
|
230
229
|
break;
|
|
231
230
|
}
|
|
232
231
|
}, [
|
|
233
|
-
|
|
234
|
-
R,
|
|
232
|
+
X,
|
|
235
233
|
B,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
234
|
+
H,
|
|
235
|
+
Q,
|
|
236
|
+
oe,
|
|
237
|
+
ae,
|
|
238
|
+
$
|
|
240
239
|
]), fe = n((e, t) => {
|
|
241
|
-
|
|
242
|
-
}, [
|
|
240
|
+
oe(e, t);
|
|
241
|
+
}, [oe]), pe = n((e) => {
|
|
243
242
|
se(e);
|
|
244
243
|
}, [se]), me = n((e) => {
|
|
245
|
-
|
|
244
|
+
G(e.target.value), U(-1);
|
|
246
245
|
}, []);
|
|
247
246
|
r(() => {
|
|
248
|
-
if (!
|
|
247
|
+
if (!B) return;
|
|
249
248
|
let e = (e) => {
|
|
250
249
|
let t = e.target;
|
|
251
|
-
|
|
250
|
+
te.current?.contains(t) || q.current?.contains(t) || $();
|
|
252
251
|
};
|
|
253
252
|
return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
|
|
254
|
-
}, [
|
|
255
|
-
if (!
|
|
256
|
-
let e = () =>
|
|
253
|
+
}, [B, $]), r(() => {
|
|
254
|
+
if (!B) return;
|
|
255
|
+
let e = () => ie();
|
|
257
256
|
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
258
257
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
259
258
|
};
|
|
260
|
-
}, [
|
|
261
|
-
|
|
262
|
-
}, [
|
|
263
|
-
if (
|
|
264
|
-
let e =
|
|
259
|
+
}, [B, ie]), r(() => {
|
|
260
|
+
B && b && requestAnimationFrame(() => J.current?.focus());
|
|
261
|
+
}, [B, b]), r(() => {
|
|
262
|
+
if (H < 0 || !Y.current) return;
|
|
263
|
+
let e = Y.current.querySelectorAll(".chain-select__item")[H];
|
|
265
264
|
e && typeof e.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
|
|
266
|
-
}, [
|
|
267
|
-
let he = _ && !
|
|
265
|
+
}, [H]);
|
|
266
|
+
let he = _ && !X && (y === "multiple" ? Array.isArray(z) && z.length > 0 : z !== "" && z !== void 0), ge = [
|
|
268
267
|
"chain-select",
|
|
269
268
|
`chain-select--${c}`,
|
|
270
269
|
`chain-select--${f}`,
|
|
271
270
|
p !== "default" && `chain-select--${p}`,
|
|
272
|
-
|
|
271
|
+
X && "chain-select--disabled",
|
|
273
272
|
h && "chain-select--loading",
|
|
274
273
|
y === "multiple" && "chain-select--multiple",
|
|
275
|
-
|
|
274
|
+
B && "chain-select--open",
|
|
276
275
|
M
|
|
277
276
|
].filter(Boolean).join(" "), _e = le(), ve = () => {
|
|
278
|
-
if (!
|
|
277
|
+
if (!B) return null;
|
|
279
278
|
let e = j?.() ?? document.body;
|
|
280
279
|
return d(/* @__PURE__ */ u("div", {
|
|
281
|
-
ref:
|
|
280
|
+
ref: te,
|
|
282
281
|
className: ["chain-select__dropdown", k].filter(Boolean).join(" "),
|
|
283
282
|
style: {
|
|
284
|
-
top:
|
|
285
|
-
left:
|
|
286
|
-
width:
|
|
283
|
+
top: K.top,
|
|
284
|
+
left: K.left,
|
|
285
|
+
width: K.width,
|
|
287
286
|
...A
|
|
288
287
|
},
|
|
289
288
|
children: [b && /* @__PURE__ */ l("div", {
|
|
290
289
|
className: "chain-select__search",
|
|
291
290
|
children: /* @__PURE__ */ l("input", {
|
|
292
|
-
ref:
|
|
291
|
+
ref: J,
|
|
293
292
|
className: "chain-select__search-input",
|
|
294
293
|
placeholder: T,
|
|
295
|
-
value:
|
|
294
|
+
value: W,
|
|
296
295
|
onChange: me,
|
|
297
296
|
role: "searchbox",
|
|
298
297
|
onClick: (e) => e.stopPropagation()
|
|
299
298
|
})
|
|
300
|
-
}),
|
|
299
|
+
}), re.length === 0 ? /* @__PURE__ */ l("div", {
|
|
301
300
|
className: "chain-select__empty",
|
|
302
301
|
children: C
|
|
303
302
|
}) : /* @__PURE__ */ l("ul", {
|
|
304
|
-
ref:
|
|
303
|
+
ref: Y,
|
|
305
304
|
className: "chain-select__list",
|
|
306
305
|
role: "listbox",
|
|
307
|
-
children:
|
|
308
|
-
let n = y === "multiple" && Array.isArray(
|
|
306
|
+
children: re.map((e, t) => {
|
|
307
|
+
let n = y === "multiple" && Array.isArray(z) ? z.some((t) => g(t, e)) : g(z, e);
|
|
309
308
|
return /* @__PURE__ */ u("li", {
|
|
310
309
|
className: [
|
|
311
310
|
"chain-select__item",
|
|
312
311
|
n && "chain-select__item--selected",
|
|
313
|
-
t ===
|
|
312
|
+
t === H && "chain-select__item--highlighted",
|
|
314
313
|
e.disabled && "chain-select__item--disabled"
|
|
315
314
|
].filter(Boolean).join(" "),
|
|
316
315
|
role: "option",
|
|
@@ -320,7 +319,7 @@ var _ = t(function({ value: e, defaultValue: t, onChange: i, options: a = [], va
|
|
|
320
319
|
e.disabled || fe(e, t);
|
|
321
320
|
},
|
|
322
321
|
onMouseEnter: () => {
|
|
323
|
-
e.disabled ||
|
|
322
|
+
e.disabled || U(t);
|
|
324
323
|
},
|
|
325
324
|
children: [/* @__PURE__ */ l("span", { children: e.label }), n && /* @__PURE__ */ l("span", {
|
|
326
325
|
className: "chain-select__item-check",
|
|
@@ -338,13 +337,13 @@ var _ = t(function({ value: e, defaultValue: t, onChange: i, options: a = [], va
|
|
|
338
337
|
style: N,
|
|
339
338
|
...P,
|
|
340
339
|
children: [/* @__PURE__ */ u("div", {
|
|
341
|
-
ref:
|
|
340
|
+
ref: q,
|
|
342
341
|
className: "chain-select__trigger",
|
|
343
342
|
role: "combobox",
|
|
344
|
-
"aria-expanded":
|
|
343
|
+
"aria-expanded": B,
|
|
345
344
|
"aria-haspopup": "listbox",
|
|
346
|
-
"aria-disabled":
|
|
347
|
-
tabIndex:
|
|
345
|
+
"aria-disabled": X || void 0,
|
|
346
|
+
tabIndex: X ? -1 : 0,
|
|
348
347
|
onClick: ue,
|
|
349
348
|
onKeyDown: de,
|
|
350
349
|
children: [
|
|
@@ -354,9 +353,9 @@ var _ = t(function({ value: e, defaultValue: t, onChange: i, options: a = [], va
|
|
|
354
353
|
}),
|
|
355
354
|
/* @__PURE__ */ l("div", {
|
|
356
355
|
className: "chain-select__trigger-inner",
|
|
357
|
-
children: y === "multiple" && Array.isArray(
|
|
356
|
+
children: y === "multiple" && Array.isArray(z) && z.length > 0 ? /* @__PURE__ */ l("div", {
|
|
358
357
|
className: "chain-select__tags",
|
|
359
|
-
children:
|
|
358
|
+
children: ne.map((e) => /* @__PURE__ */ u("span", {
|
|
360
359
|
className: "chain-select__tag",
|
|
361
360
|
children: [/* @__PURE__ */ l("span", { children: e.label }), /* @__PURE__ */ l("button", {
|
|
362
361
|
type: "button",
|
|
@@ -386,7 +385,7 @@ var _ = t(function({ value: e, defaultValue: t, onChange: i, options: a = [], va
|
|
|
386
385
|
"aria-hidden": "true"
|
|
387
386
|
}) : /* @__PURE__ */ l("span", {
|
|
388
387
|
className: "chain-select__arrow",
|
|
389
|
-
"aria-label":
|
|
388
|
+
"aria-label": B ? D : E,
|
|
390
389
|
children: "▼"
|
|
391
390
|
}),
|
|
392
391
|
S && /* @__PURE__ */ l("span", {
|
|
@@ -396,193 +395,310 @@ var _ = t(function({ value: e, defaultValue: t, onChange: i, options: a = [], va
|
|
|
396
395
|
]
|
|
397
396
|
}), ve()]
|
|
398
397
|
});
|
|
399
|
-
})
|
|
398
|
+
});
|
|
399
|
+
function v(e, t, n) {
|
|
400
|
+
let r = window.scrollX ?? window.pageXOffset, i = window.scrollY ?? window.pageYOffset, a = e.left + r, o = e.top + i, s = e.width, c = e.height, l = t.width, u = t.height, [d, f] = n.split("-"), p = 0, m = 0;
|
|
401
|
+
switch (d) {
|
|
402
|
+
case "top":
|
|
403
|
+
p = o - u - 10;
|
|
404
|
+
break;
|
|
405
|
+
case "bottom":
|
|
406
|
+
p = o + c + 10;
|
|
407
|
+
break;
|
|
408
|
+
case "left":
|
|
409
|
+
m = a - l - 10;
|
|
410
|
+
break;
|
|
411
|
+
case "right":
|
|
412
|
+
m = a + s + 10;
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
return (d === "top" || d === "bottom") && (m = f === "start" ? a : f === "end" ? a + s - l : a + s / 2 - l / 2), (d === "left" || d === "right") && (p = f === "start" ? o : f === "end" ? o + c - u : o + c / 2 - u / 2), {
|
|
416
|
+
top: p,
|
|
417
|
+
left: m
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/utils/icons.ts
|
|
422
|
+
var y = {
|
|
423
|
+
success: "✓",
|
|
424
|
+
error: "✗",
|
|
425
|
+
warning: "!",
|
|
426
|
+
info: "ℹ"
|
|
427
|
+
};
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region src/utils/portal.tsx
|
|
430
|
+
function b(e, t = {}) {
|
|
431
|
+
let { duration: n = 200, onExited: i } = t, [a, c] = s(e), [l, u] = s(e), [d, f] = s(!1), p = o(void 0), m = o(i);
|
|
432
|
+
return m.current = i, r(() => {
|
|
433
|
+
if (e) c(!0), f(!1), requestAnimationFrame(() => u(!0));
|
|
434
|
+
else if (a) return u(!1), f(!0), p.current = setTimeout(() => {
|
|
435
|
+
f(!1), c(!1), m.current?.();
|
|
436
|
+
}, n), () => clearTimeout(p.current);
|
|
437
|
+
}, [e]), r(() => () => clearTimeout(p.current), []), {
|
|
438
|
+
mounted: a,
|
|
439
|
+
animating: l,
|
|
440
|
+
closing: d
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
function x({ getContainer: e, children: t }) {
|
|
444
|
+
return d(t, e?.() ?? document.body);
|
|
445
|
+
}
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region ../hooks/dist/index.js
|
|
448
|
+
function S({ mounted: e, animating: t, closing: n }, r = {}) {
|
|
449
|
+
let { duration: i = 200, easing: a = "ease", from: o = 0, to: s = 1 } = r;
|
|
450
|
+
return e ? {
|
|
451
|
+
opacity: t && !n ? s : o,
|
|
452
|
+
transition: `opacity ${i}ms ${a}`
|
|
453
|
+
} : { opacity: o };
|
|
454
|
+
}
|
|
455
|
+
function C({ mounted: e, animating: t, closing: n }, r = {}) {
|
|
456
|
+
let { duration: i = 200, easing: a = "ease", from: o = .9, to: s = 1 } = r;
|
|
457
|
+
return e ? {
|
|
458
|
+
transform: t && !n ? `scale(${s})` : `scale(${o})`,
|
|
459
|
+
transition: `transform ${i}ms ${a}`
|
|
460
|
+
} : { transform: `scale(${o})` };
|
|
461
|
+
}
|
|
462
|
+
function w(e) {
|
|
463
|
+
return typeof e == "number" ? `${e}px` : e;
|
|
464
|
+
}
|
|
465
|
+
function T(e, t) {
|
|
466
|
+
switch (e) {
|
|
467
|
+
case "up": return {
|
|
468
|
+
x: 0,
|
|
469
|
+
y: t
|
|
470
|
+
};
|
|
471
|
+
case "down": return {
|
|
472
|
+
x: 0,
|
|
473
|
+
y: -t
|
|
474
|
+
};
|
|
475
|
+
case "left": return {
|
|
476
|
+
x: t,
|
|
477
|
+
y: 0
|
|
478
|
+
};
|
|
479
|
+
case "right": return {
|
|
480
|
+
x: -t,
|
|
481
|
+
y: 0
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
function E({ mounted: e, animating: t, closing: n }, r = {}) {
|
|
486
|
+
let { duration: i = 250, easing: a = "ease", direction: o = "down", distance: s = 16 } = r, c = r.from ?? T(o, s), l = r.to ?? {
|
|
487
|
+
x: 0,
|
|
488
|
+
y: 0
|
|
489
|
+
};
|
|
490
|
+
if (!e) return { transform: `translate(${w(c.x)}, ${w(c.y)})` };
|
|
491
|
+
let u = t && !n ? l : c;
|
|
492
|
+
return {
|
|
493
|
+
transform: `translate(${w(u.x)}, ${w(u.y)})`,
|
|
494
|
+
transition: `transform ${i}ms ${a}`
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
function D(...e) {
|
|
498
|
+
let t = {}, n = [];
|
|
499
|
+
for (let r of e) for (let e of Object.keys(r)) if (e === "transition") {
|
|
500
|
+
let t = r[e];
|
|
501
|
+
typeof t == "string" && t && n.push(t);
|
|
502
|
+
} else t[e] = r[e];
|
|
503
|
+
return n.length > 0 && (t.transition = n.join(", ")), t;
|
|
504
|
+
}
|
|
505
|
+
//#endregion
|
|
506
|
+
//#region src/components/modal/modal.tsx
|
|
507
|
+
var O = {
|
|
400
508
|
sm: "400px",
|
|
401
509
|
md: "520px",
|
|
402
510
|
lg: "720px"
|
|
403
|
-
},
|
|
404
|
-
let
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
if (e) H.current = document.activeElement, requestAnimationFrame(() => {
|
|
409
|
-
ee(!0);
|
|
410
|
-
});
|
|
411
|
-
else {
|
|
412
|
-
L(!0);
|
|
413
|
-
let e = setTimeout(() => {
|
|
414
|
-
L(!1), ee(!1);
|
|
415
|
-
}, 250);
|
|
416
|
-
return () => clearTimeout(e);
|
|
511
|
+
}, k = "a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", A = t(function({ open: e = !1, onCancel: t, title: a, children: c, footer: d, onOk: p, okText: m = "确定", okButtonProps: h, cancelText: g = "取消", cancelButtonProps: _, confirmLoading: v = !1, closable: y = !0, closeAriaLabel: w = "Close", maskClosable: T = !0, keyboard: E = !0, destroyOnClose: A = !1, size: j = "md", width: M, centered: N = !1, getContainer: P, className: F, style: I, ...L }, R) {
|
|
512
|
+
let z = i(), B = b(e, {
|
|
513
|
+
duration: 250,
|
|
514
|
+
onExited: () => {
|
|
515
|
+
J.current &&= (J.current.focus(), null);
|
|
417
516
|
}
|
|
517
|
+
}), { mounted: V, animating: H, closing: U } = B, W = S(B, { duration: 250 }), G = D(S(B, { duration: 250 }), C(B, {
|
|
518
|
+
from: .95,
|
|
519
|
+
duration: 250
|
|
520
|
+
})), [K, ee] = s(!1), q = o(null), te = o(null), J = o(null), Y = o(0), X = V, Z = n((e) => {
|
|
521
|
+
q.current = e, typeof R == "function" ? R(e) : R && (R.current = e);
|
|
522
|
+
}, [R]);
|
|
523
|
+
r(() => {
|
|
524
|
+
e && (J.current = document.activeElement);
|
|
418
525
|
}, [e]), r(() => {
|
|
419
|
-
if (!
|
|
526
|
+
if (!X) return;
|
|
420
527
|
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
421
|
-
|
|
528
|
+
Y.current = e;
|
|
422
529
|
let t = document.body.style.overflow, n = document.body.style.paddingRight;
|
|
423
530
|
return document.body.style.overflow = "hidden", e > 0 && (document.body.style.paddingRight = `${e}px`), () => {
|
|
424
531
|
document.body.style.overflow = t, document.body.style.paddingRight = n;
|
|
425
532
|
};
|
|
426
|
-
}, [
|
|
427
|
-
if (!
|
|
533
|
+
}, [X]), r(() => {
|
|
534
|
+
if (!X) return;
|
|
428
535
|
let e = setTimeout(() => {
|
|
429
|
-
|
|
536
|
+
te.current?.focus();
|
|
430
537
|
}, 50);
|
|
431
538
|
return () => clearTimeout(e);
|
|
432
|
-
}, [
|
|
433
|
-
!
|
|
434
|
-
}, [W]), r(() => {
|
|
435
|
-
if (!W || !T) return;
|
|
539
|
+
}, [X]), r(() => {
|
|
540
|
+
if (!X || !E) return;
|
|
436
541
|
let e = (e) => {
|
|
437
542
|
e.key === "Escape" && t?.();
|
|
438
543
|
};
|
|
439
544
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
440
545
|
}, [
|
|
441
|
-
|
|
442
|
-
|
|
546
|
+
X,
|
|
547
|
+
E,
|
|
443
548
|
t
|
|
444
549
|
]);
|
|
445
|
-
let
|
|
446
|
-
|
|
447
|
-
}, [
|
|
448
|
-
if (!
|
|
449
|
-
let e =
|
|
550
|
+
let ne = n((e) => {
|
|
551
|
+
T && e.target === e.currentTarget && t?.();
|
|
552
|
+
}, [T, t]), re = n(async () => {
|
|
553
|
+
if (!p) return;
|
|
554
|
+
let e = p();
|
|
450
555
|
if (e instanceof Promise) {
|
|
451
|
-
|
|
556
|
+
ee(!0);
|
|
452
557
|
try {
|
|
453
|
-
await e,
|
|
558
|
+
await e, ee(!1), t?.();
|
|
454
559
|
} catch {
|
|
455
|
-
|
|
560
|
+
ee(!1);
|
|
456
561
|
}
|
|
457
562
|
}
|
|
458
|
-
}, [
|
|
563
|
+
}, [p, t]), Q = n((e) => {
|
|
459
564
|
if (e.key !== "Tab") return;
|
|
460
|
-
let t =
|
|
565
|
+
let t = te.current;
|
|
461
566
|
if (!t) return;
|
|
462
|
-
let n = t.querySelectorAll(
|
|
567
|
+
let n = t.querySelectorAll(k);
|
|
463
568
|
if (n.length === 0) {
|
|
464
569
|
e.preventDefault();
|
|
465
570
|
return;
|
|
466
571
|
}
|
|
467
572
|
let r = n[0], i = n[n.length - 1];
|
|
468
573
|
e.shiftKey ? document.activeElement === r && (e.preventDefault(), i.focus()) : document.activeElement === i && (e.preventDefault(), r.focus());
|
|
469
|
-
}, []),
|
|
574
|
+
}, []), ie = M ?? O[j] ?? O.md, ae = v || K, $ = [
|
|
470
575
|
"chain-modal",
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
k && "chain-modal--centered",
|
|
474
|
-
j
|
|
576
|
+
N && "chain-modal--centered",
|
|
577
|
+
F
|
|
475
578
|
].filter(Boolean).join(" ");
|
|
476
|
-
return !
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
children: /* @__PURE__ */
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
579
|
+
return !X && A ? null : /* @__PURE__ */ l(x, {
|
|
580
|
+
getContainer: P,
|
|
581
|
+
children: /* @__PURE__ */ u("div", {
|
|
582
|
+
ref: Z,
|
|
583
|
+
className: $,
|
|
584
|
+
style: {
|
|
585
|
+
pointerEvents: X ? "auto" : "none",
|
|
586
|
+
...I
|
|
587
|
+
},
|
|
588
|
+
role: "dialog",
|
|
589
|
+
"aria-modal": "true",
|
|
590
|
+
"aria-labelledby": a ? z : void 0,
|
|
591
|
+
...L,
|
|
592
|
+
children: [/* @__PURE__ */ l("div", {
|
|
593
|
+
className: "chain-modal__mask",
|
|
594
|
+
style: {
|
|
595
|
+
...W,
|
|
596
|
+
pointerEvents: H && !U ? "auto" : "none"
|
|
597
|
+
},
|
|
598
|
+
onMouseDown: ne
|
|
599
|
+
}), /* @__PURE__ */ l("div", {
|
|
600
|
+
className: "chain-modal__wrap",
|
|
601
|
+
children: /* @__PURE__ */ u("div", {
|
|
602
|
+
ref: te,
|
|
603
|
+
className: "chain-modal__content",
|
|
604
|
+
tabIndex: -1,
|
|
605
|
+
style: {
|
|
606
|
+
...G,
|
|
607
|
+
width: typeof ie == "number" ? `${ie}px` : ie
|
|
608
|
+
},
|
|
609
|
+
onKeyDown: Q,
|
|
610
|
+
children: [
|
|
611
|
+
a !== void 0 || y ? /* @__PURE__ */ u("div", {
|
|
612
|
+
className: "chain-modal__header",
|
|
613
|
+
children: [a && /* @__PURE__ */ l("h2", {
|
|
614
|
+
id: z,
|
|
615
|
+
className: "chain-modal__title",
|
|
616
|
+
children: a
|
|
617
|
+
}), y && /* @__PURE__ */ l("button", {
|
|
618
|
+
type: "button",
|
|
619
|
+
className: "chain-modal__close",
|
|
620
|
+
"aria-label": w,
|
|
621
|
+
onClick: t,
|
|
622
|
+
children: "×"
|
|
623
|
+
})]
|
|
624
|
+
}) : null,
|
|
625
|
+
c && /* @__PURE__ */ l("div", {
|
|
626
|
+
className: "chain-modal__body",
|
|
627
|
+
children: c
|
|
628
|
+
}),
|
|
629
|
+
d === void 0 ? d === null ? null : /* @__PURE__ */ u("div", {
|
|
630
|
+
className: "chain-modal__footer",
|
|
631
|
+
children: [/* @__PURE__ */ l(f, {
|
|
632
|
+
..._,
|
|
633
|
+
onClick: t,
|
|
634
|
+
children: g
|
|
635
|
+
}), /* @__PURE__ */ l(f, {
|
|
636
|
+
variant: "solid",
|
|
637
|
+
color: "primary",
|
|
638
|
+
...h,
|
|
639
|
+
loading: ae,
|
|
640
|
+
onClick: re,
|
|
641
|
+
children: m
|
|
642
|
+
})]
|
|
643
|
+
}) : d
|
|
644
|
+
]
|
|
645
|
+
})
|
|
646
|
+
})]
|
|
647
|
+
})
|
|
648
|
+
});
|
|
533
649
|
});
|
|
534
650
|
//#endregion
|
|
535
651
|
//#region src/components/table/table.tsx
|
|
536
|
-
function
|
|
652
|
+
function j(e, t, n) {
|
|
537
653
|
if (typeof n == "function") return n(e);
|
|
538
654
|
let r = e[n];
|
|
539
655
|
return String(r ?? t);
|
|
540
656
|
}
|
|
541
|
-
function
|
|
657
|
+
function M(e, t) {
|
|
542
658
|
if (t != null) return Array.isArray(t) ? t.reduce((e, t) => {
|
|
543
659
|
if (typeof e == "object" && e) return e[t];
|
|
544
660
|
}, e) : e[t];
|
|
545
661
|
}
|
|
546
|
-
var
|
|
547
|
-
let
|
|
662
|
+
var N = t(function({ dataSource: e, columns: t, rowKey: r = "key", rowSelection: i, loading: o = !1, emptyText: s = "暂无数据", pagination: c, bordered: d = !0, size: p = "md", locale: m, scroll: h, onRow: g, className: _, style: v, ...y }, b) {
|
|
663
|
+
let x = {
|
|
548
664
|
total: m?.total ?? "共",
|
|
549
665
|
items: m?.items ?? "条",
|
|
550
666
|
prevPage: m?.prevPage ?? "上一页",
|
|
551
667
|
nextPage: m?.nextPage ?? "下一页"
|
|
552
|
-
},
|
|
668
|
+
}, S = i?.type === "radio", C = i != null, w = a(() => i?.selectedRowKeys ?? [], [i?.selectedRowKeys]), T = n(() => {
|
|
553
669
|
if (!i) return;
|
|
554
|
-
let t = e.filter((e) => !i.getCheckboxProps?.(e)?.disabled).map((e, t) =>
|
|
555
|
-
if (
|
|
556
|
-
let n = t.every((e) =>
|
|
557
|
-
if (n) a =
|
|
670
|
+
let t = e.filter((e) => !i.getCheckboxProps?.(e)?.disabled).map((e, t) => j(e, t, r));
|
|
671
|
+
if (S) return;
|
|
672
|
+
let n = t.every((e) => w.includes(e)), a;
|
|
673
|
+
if (n) a = w.filter((e) => !t.includes(e));
|
|
558
674
|
else {
|
|
559
|
-
let e = new Set(
|
|
675
|
+
let e = new Set(w);
|
|
560
676
|
t.forEach((t) => e.add(t)), a = Array.from(e);
|
|
561
677
|
}
|
|
562
|
-
let o = e.filter((e, t) => a.includes(
|
|
678
|
+
let o = e.filter((e, t) => a.includes(j(e, t, r)));
|
|
563
679
|
i.onChange?.(a, o), i.onSelect?.(e[0], !n, o);
|
|
564
680
|
}, [
|
|
565
681
|
i,
|
|
566
682
|
e,
|
|
567
|
-
E,
|
|
568
683
|
w,
|
|
684
|
+
S,
|
|
569
685
|
r
|
|
570
|
-
]),
|
|
686
|
+
]), E = n((t, n) => {
|
|
571
687
|
if (!i) return;
|
|
572
|
-
let a =
|
|
573
|
-
if (
|
|
688
|
+
let a = j(t, n, r), o, s = w.includes(a);
|
|
689
|
+
if (S) {
|
|
574
690
|
if (s) return;
|
|
575
691
|
o = [a];
|
|
576
|
-
} else o = s ?
|
|
577
|
-
let c = e.filter((e, t) => o.includes(
|
|
692
|
+
} else o = s ? w.filter((e) => e !== a) : [...w, a];
|
|
693
|
+
let c = e.filter((e, t) => o.includes(j(e, t, r)));
|
|
578
694
|
i.onChange?.(o, c), i.onSelect?.(t, !s, c);
|
|
579
695
|
}, [
|
|
580
696
|
i,
|
|
581
697
|
e,
|
|
582
|
-
E,
|
|
583
698
|
w,
|
|
699
|
+
S,
|
|
584
700
|
r
|
|
585
|
-
]),
|
|
701
|
+
]), D = e.map((e, t) => i?.getCheckboxProps?.(e)?.disabled ? null : j(e, t, r)).filter(Boolean), O = D.length > 0 && D.every((e) => w.includes(e)), k = w.some((e) => D.includes(e)) && !O, A = c ? c.current ?? 1 : 1, N = c ? c.pageSize ?? 10 : 10, P = c ? c.total ?? e.length : e.length, F = Math.max(1, Math.ceil(P / N)), I = n((e) => {
|
|
586
702
|
c && c.onChange?.(e, N);
|
|
587
703
|
}, [c, N]);
|
|
588
704
|
return /* @__PURE__ */ u("div", {
|
|
@@ -607,23 +723,23 @@ var C = t(function({ dataSource: e, columns: t, rowKey: r = "key", rowSelection:
|
|
|
607
723
|
children: /* @__PURE__ */ u("table", {
|
|
608
724
|
className: "chain-table__table",
|
|
609
725
|
children: [
|
|
610
|
-
/* @__PURE__ */ u("colgroup", { children: [
|
|
726
|
+
/* @__PURE__ */ u("colgroup", { children: [C && /* @__PURE__ */ l("col", { style: { width: 48 } }), t.map((e) => /* @__PURE__ */ l("col", { style: { width: e.width } }, e.key))] }),
|
|
611
727
|
/* @__PURE__ */ l("thead", {
|
|
612
728
|
className: "chain-table__header",
|
|
613
729
|
children: /* @__PURE__ */ u("tr", {
|
|
614
730
|
className: "chain-table__header-row",
|
|
615
|
-
children: [
|
|
731
|
+
children: [C && /* @__PURE__ */ l("th", {
|
|
616
732
|
className: "chain-table__selection chain-table__header-cell",
|
|
617
733
|
role: "columnheader",
|
|
618
|
-
children: !
|
|
734
|
+
children: !S && /* @__PURE__ */ l("span", {
|
|
619
735
|
className: "chain-table__checkbox",
|
|
620
736
|
children: /* @__PURE__ */ l("input", {
|
|
621
737
|
type: "checkbox",
|
|
622
|
-
checked:
|
|
738
|
+
checked: O,
|
|
623
739
|
ref: (e) => {
|
|
624
|
-
e && (e.indeterminate =
|
|
740
|
+
e && (e.indeterminate = k);
|
|
625
741
|
},
|
|
626
|
-
onChange:
|
|
742
|
+
onChange: T,
|
|
627
743
|
"aria-label": "Select all"
|
|
628
744
|
})
|
|
629
745
|
})
|
|
@@ -640,13 +756,13 @@ var C = t(function({ dataSource: e, columns: t, rowKey: r = "key", rowSelection:
|
|
|
640
756
|
className: "chain-table__row",
|
|
641
757
|
children: /* @__PURE__ */ l("td", {
|
|
642
758
|
className: "chain-table__cell chain-table__empty",
|
|
643
|
-
colSpan: t.length + +!!
|
|
759
|
+
colSpan: t.length + +!!C,
|
|
644
760
|
role: "status",
|
|
645
761
|
"aria-live": "polite",
|
|
646
762
|
children: s
|
|
647
763
|
})
|
|
648
764
|
}) : e.map((e, n) => {
|
|
649
|
-
let a =
|
|
765
|
+
let a = j(e, n, r), o = w.includes(a), s = i?.getCheckboxProps?.(e)?.disabled ?? !1, c = g?.(e, n);
|
|
650
766
|
return /* @__PURE__ */ u("tr", {
|
|
651
767
|
className: [
|
|
652
768
|
"chain-table__row",
|
|
@@ -656,22 +772,22 @@ var C = t(function({ dataSource: e, columns: t, rowKey: r = "key", rowSelection:
|
|
|
656
772
|
role: "row",
|
|
657
773
|
onClick: c?.onClick,
|
|
658
774
|
onDoubleClick: c?.onDoubleClick,
|
|
659
|
-
children: [
|
|
775
|
+
children: [C && /* @__PURE__ */ l("td", {
|
|
660
776
|
className: "chain-table__selection chain-table__cell",
|
|
661
777
|
role: "cell",
|
|
662
778
|
children: /* @__PURE__ */ l("span", {
|
|
663
779
|
className: "chain-table__checkbox",
|
|
664
780
|
children: /* @__PURE__ */ l("input", {
|
|
665
|
-
type:
|
|
666
|
-
name:
|
|
781
|
+
type: S ? "radio" : "checkbox",
|
|
782
|
+
name: S ? "chain-table-radio" : void 0,
|
|
667
783
|
checked: o,
|
|
668
784
|
disabled: s,
|
|
669
|
-
onChange: () =>
|
|
785
|
+
onChange: () => E(e, n),
|
|
670
786
|
"aria-label": i.selectAriaLabel ?? "Select row"
|
|
671
787
|
})
|
|
672
788
|
})
|
|
673
789
|
}), t.map((t) => {
|
|
674
|
-
let r =
|
|
790
|
+
let r = M(e, t.dataIndex), i = t.render ? t.render(r, e, n) : r == null ? "-" : String(r);
|
|
675
791
|
return /* @__PURE__ */ l("td", {
|
|
676
792
|
className: [
|
|
677
793
|
"chain-table__cell",
|
|
@@ -698,38 +814,38 @@ var C = t(function({ dataSource: e, columns: t, rowKey: r = "key", rowSelection:
|
|
|
698
814
|
children: [/* @__PURE__ */ u("span", {
|
|
699
815
|
className: "chain-table__pagination-total",
|
|
700
816
|
children: [
|
|
701
|
-
|
|
817
|
+
x.total,
|
|
702
818
|
" ",
|
|
703
819
|
P,
|
|
704
820
|
" ",
|
|
705
|
-
|
|
821
|
+
x.items
|
|
706
822
|
]
|
|
707
823
|
}), /* @__PURE__ */ u("div", {
|
|
708
824
|
className: "chain-table__pagination-nav",
|
|
709
825
|
children: [
|
|
710
826
|
/* @__PURE__ */ l(f, {
|
|
711
827
|
size: "sm",
|
|
712
|
-
disabled:
|
|
713
|
-
onClick: () => I(
|
|
714
|
-
children:
|
|
828
|
+
disabled: A <= 1,
|
|
829
|
+
onClick: () => I(A - 1),
|
|
830
|
+
children: x.prevPage
|
|
715
831
|
}),
|
|
716
832
|
/* @__PURE__ */ u("span", { children: [
|
|
717
|
-
|
|
833
|
+
A,
|
|
718
834
|
" / ",
|
|
719
835
|
F
|
|
720
836
|
] }),
|
|
721
837
|
/* @__PURE__ */ l(f, {
|
|
722
838
|
size: "sm",
|
|
723
|
-
disabled:
|
|
724
|
-
onClick: () => I(
|
|
725
|
-
children:
|
|
839
|
+
disabled: A >= F,
|
|
840
|
+
onClick: () => I(A + 1),
|
|
841
|
+
children: x.nextPage
|
|
726
842
|
})
|
|
727
843
|
]
|
|
728
844
|
})]
|
|
729
845
|
})
|
|
730
846
|
]
|
|
731
847
|
});
|
|
732
|
-
}),
|
|
848
|
+
}), P = t(function({ color: e = "default", variant: t = "light", size: n = "md", closable: r = !1, onClose: i, children: a, className: o, ...s }, c) {
|
|
733
849
|
return /* @__PURE__ */ u("span", {
|
|
734
850
|
ref: c,
|
|
735
851
|
className: [
|
|
@@ -756,7 +872,7 @@ var C = t(function({ dataSource: e, columns: t, rowKey: r = "key", rowSelection:
|
|
|
756
872
|
children: "×"
|
|
757
873
|
})]
|
|
758
874
|
});
|
|
759
|
-
}),
|
|
875
|
+
}), F = t(function({ count: e, dot: t = !1, color: n = "error", size: r = "md", overflowCount: i = 99, showZero: a = !1, offset: o, children: s, className: d, style: f, ...p }, m) {
|
|
760
876
|
let h = !t && e !== void 0 && !a && e === 0, g = e === void 0 && !t, _ = (() => {
|
|
761
877
|
if (t || e === void 0) return null;
|
|
762
878
|
let n = typeof e == "number" ? e : void 0;
|
|
@@ -795,7 +911,7 @@ var C = t(function({ dataSource: e, columns: t, rowKey: r = "key", rowSelection:
|
|
|
795
911
|
});
|
|
796
912
|
//#endregion
|
|
797
913
|
//#region src/components/pagination/pagination.tsx
|
|
798
|
-
function
|
|
914
|
+
function I(e, t) {
|
|
799
915
|
if (t <= 7) return Array.from({ length: t }, (e, t) => t + 1);
|
|
800
916
|
let n = [];
|
|
801
917
|
n.push(1), e > 3 && n.push("ellipsis");
|
|
@@ -803,43 +919,43 @@ function E(e, t) {
|
|
|
803
919
|
for (let e = r; e <= i; e++) n.push(e);
|
|
804
920
|
return e < t - 2 && n.push("ellipsis"), n.push(t), n;
|
|
805
921
|
}
|
|
806
|
-
var
|
|
922
|
+
var L = t(function({ value: e, defaultValue: t = 1, pageSize: r = 10, total: i = 0, onChange: o, showSizeChanger: c = !1, pageSizeOptions: d = [
|
|
807
923
|
10,
|
|
808
924
|
20,
|
|
809
925
|
50,
|
|
810
926
|
100
|
|
811
927
|
], showQuickJumper: f = !1, showTotal: p = !0, size: m = "md", disabled: h = !1, locale: g, className: _, ...v }, y) {
|
|
812
|
-
let [b, x] = s(t), S = e !== void 0, C = S ? e : b, [w, T] = s(""), [
|
|
928
|
+
let [b, x] = s(t), S = e !== void 0, C = S ? e : b, [w, T] = s(""), [E, D] = s(r), O = S ? r : E, k = {
|
|
813
929
|
total: g?.total ?? "共",
|
|
814
930
|
items: g?.items ?? "条",
|
|
815
931
|
prevPage: g?.prevPage ?? "上一页",
|
|
816
932
|
nextPage: g?.nextPage ?? "下一页",
|
|
817
933
|
jumpTo: g?.jumpTo ?? "前往"
|
|
818
|
-
},
|
|
934
|
+
}, A = Math.max(1, Math.ceil(i / O)), j = Math.max(1, Math.min(C, A)), M = a(() => I(j, A), [j, A]), N = n((e) => {
|
|
819
935
|
if (h) return;
|
|
820
|
-
let t = Math.max(1, Math.min(e,
|
|
821
|
-
S || x(t), o?.(t,
|
|
936
|
+
let t = Math.max(1, Math.min(e, A));
|
|
937
|
+
S || x(t), o?.(t, O);
|
|
822
938
|
}, [
|
|
823
939
|
h,
|
|
824
|
-
|
|
940
|
+
A,
|
|
825
941
|
S,
|
|
826
942
|
o,
|
|
827
|
-
|
|
828
|
-
]),
|
|
943
|
+
O
|
|
944
|
+
]), P = n((e) => {
|
|
829
945
|
if (h) return;
|
|
830
|
-
|
|
831
|
-
let t = Math.ceil(i / e), n = Math.min(
|
|
832
|
-
S || (x(n),
|
|
946
|
+
D(e);
|
|
947
|
+
let t = Math.ceil(i / e), n = Math.min(j, t);
|
|
948
|
+
S || (x(n), D(e)), o?.(n, e);
|
|
833
949
|
}, [
|
|
834
950
|
h,
|
|
835
951
|
i,
|
|
836
|
-
|
|
952
|
+
j,
|
|
837
953
|
S,
|
|
838
954
|
o
|
|
839
|
-
]),
|
|
955
|
+
]), F = n(() => {
|
|
840
956
|
let e = parseInt(w, 10);
|
|
841
|
-
isNaN(e) || (
|
|
842
|
-
}, [w,
|
|
957
|
+
isNaN(e) || (N(e), T(""));
|
|
958
|
+
}, [w, N]);
|
|
843
959
|
return /* @__PURE__ */ u("div", {
|
|
844
960
|
ref: y,
|
|
845
961
|
className: [
|
|
@@ -853,59 +969,59 @@ var D = t(function({ value: e, defaultValue: t = 1, pageSize: r = 10, total: i =
|
|
|
853
969
|
p && /* @__PURE__ */ u("span", {
|
|
854
970
|
className: "chain-pagination__total",
|
|
855
971
|
children: [
|
|
856
|
-
|
|
972
|
+
k.total,
|
|
857
973
|
" ",
|
|
858
974
|
i,
|
|
859
975
|
" ",
|
|
860
|
-
|
|
976
|
+
k.items
|
|
861
977
|
]
|
|
862
978
|
}),
|
|
863
979
|
/* @__PURE__ */ u("ul", {
|
|
864
980
|
className: "chain-pagination__list",
|
|
865
981
|
children: [
|
|
866
982
|
/* @__PURE__ */ l("li", {
|
|
867
|
-
className: ["chain-pagination__prev", (h ||
|
|
983
|
+
className: ["chain-pagination__prev", (h || j <= 1) && "chain-pagination__item--disabled"].filter(Boolean).join(" "),
|
|
868
984
|
children: /* @__PURE__ */ l("button", {
|
|
869
985
|
type: "button",
|
|
870
|
-
disabled: h ||
|
|
871
|
-
onClick: () =>
|
|
872
|
-
children:
|
|
986
|
+
disabled: h || j <= 1,
|
|
987
|
+
onClick: () => N(j - 1),
|
|
988
|
+
children: k.prevPage
|
|
873
989
|
})
|
|
874
990
|
}),
|
|
875
|
-
|
|
991
|
+
M.map((e, t) => e === "ellipsis" ? /* @__PURE__ */ l("li", {
|
|
876
992
|
className: "chain-pagination__item chain-pagination__item--disabled",
|
|
877
993
|
children: /* @__PURE__ */ l("span", { children: "..." })
|
|
878
994
|
}, `ellipsis-${t}`) : /* @__PURE__ */ l("li", {
|
|
879
|
-
className: ["chain-pagination__item", e ===
|
|
995
|
+
className: ["chain-pagination__item", e === j && "chain-pagination__item--active"].filter(Boolean).join(" "),
|
|
880
996
|
children: /* @__PURE__ */ l("button", {
|
|
881
997
|
type: "button",
|
|
882
998
|
disabled: h,
|
|
883
|
-
onClick: () =>
|
|
999
|
+
onClick: () => N(e),
|
|
884
1000
|
children: e
|
|
885
1001
|
})
|
|
886
1002
|
}, e)),
|
|
887
1003
|
/* @__PURE__ */ l("li", {
|
|
888
|
-
className: ["chain-pagination__next", (h ||
|
|
1004
|
+
className: ["chain-pagination__next", (h || j >= A) && "chain-pagination__item--disabled"].filter(Boolean).join(" "),
|
|
889
1005
|
children: /* @__PURE__ */ l("button", {
|
|
890
1006
|
type: "button",
|
|
891
|
-
disabled: h ||
|
|
892
|
-
onClick: () =>
|
|
893
|
-
children:
|
|
1007
|
+
disabled: h || j >= A,
|
|
1008
|
+
onClick: () => N(j + 1),
|
|
1009
|
+
children: k.nextPage
|
|
894
1010
|
})
|
|
895
1011
|
})
|
|
896
1012
|
]
|
|
897
1013
|
}),
|
|
898
1014
|
c && /* @__PURE__ */ l("select", {
|
|
899
1015
|
className: "chain-pagination__size-changer",
|
|
900
|
-
value:
|
|
1016
|
+
value: O,
|
|
901
1017
|
disabled: h,
|
|
902
|
-
onChange: (e) =>
|
|
1018
|
+
onChange: (e) => P(Number(e.target.value)),
|
|
903
1019
|
children: d.map((e) => /* @__PURE__ */ u("option", {
|
|
904
1020
|
value: e,
|
|
905
1021
|
children: [
|
|
906
1022
|
e,
|
|
907
1023
|
" ",
|
|
908
|
-
|
|
1024
|
+
k.items
|
|
909
1025
|
]
|
|
910
1026
|
}, e))
|
|
911
1027
|
}),
|
|
@@ -917,24 +1033,24 @@ var D = t(function({ value: e, defaultValue: t = 1, pageSize: r = 10, total: i =
|
|
|
917
1033
|
disabled: h,
|
|
918
1034
|
onChange: (e) => T(e.target.value),
|
|
919
1035
|
onKeyDown: (e) => {
|
|
920
|
-
e.key === "Enter" &&
|
|
1036
|
+
e.key === "Enter" && F();
|
|
921
1037
|
},
|
|
922
1038
|
placeholder: ""
|
|
923
1039
|
}), /* @__PURE__ */ l("button", {
|
|
924
1040
|
type: "button",
|
|
925
1041
|
disabled: h,
|
|
926
|
-
onClick:
|
|
927
|
-
children:
|
|
1042
|
+
onClick: F,
|
|
1043
|
+
children: k.jumpTo
|
|
928
1044
|
})]
|
|
929
1045
|
})
|
|
930
1046
|
]
|
|
931
1047
|
});
|
|
932
|
-
}),
|
|
1048
|
+
}), R = {
|
|
933
1049
|
success: "✓",
|
|
934
1050
|
warning: "!",
|
|
935
1051
|
error: "✗",
|
|
936
1052
|
info: "ℹ"
|
|
937
|
-
},
|
|
1053
|
+
}, z = t(function({ color: e = "info", size: t = "md", message: n, description: r, showIcon: i = !0, closable: a = !1, closeAriaLabel: o = "Close", onClose: s, open: c = !0, action: d, children: f, className: p, ...m }, h) {
|
|
938
1054
|
return c ? /* @__PURE__ */ u("div", {
|
|
939
1055
|
ref: h,
|
|
940
1056
|
className: [
|
|
@@ -950,7 +1066,7 @@ var D = t(function({ value: e, defaultValue: t = 1, pageSize: r = 10, total: i =
|
|
|
950
1066
|
i && /* @__PURE__ */ l("span", {
|
|
951
1067
|
className: "chain-alert__icon",
|
|
952
1068
|
"aria-hidden": "true",
|
|
953
|
-
children:
|
|
1069
|
+
children: R[e]
|
|
954
1070
|
}),
|
|
955
1071
|
/* @__PURE__ */ u("div", {
|
|
956
1072
|
className: "chain-alert__content",
|
|
@@ -979,29 +1095,29 @@ var D = t(function({ value: e, defaultValue: t = 1, pageSize: r = 10, total: i =
|
|
|
979
1095
|
})
|
|
980
1096
|
]
|
|
981
1097
|
}) : null;
|
|
982
|
-
}),
|
|
1098
|
+
}), B = {
|
|
983
1099
|
sm: "var(--space-1)",
|
|
984
1100
|
md: "var(--space-2)",
|
|
985
1101
|
lg: "var(--space-4)"
|
|
986
|
-
},
|
|
987
|
-
let
|
|
1102
|
+
}, V = t(function({ size: e = "md", gap: t, direction: n = "horizontal", align: r = "center", wrap: i = !1, children: a, className: o, style: s, ...c }, u) {
|
|
1103
|
+
let d = t == null ? typeof e == "number" ? `${e}px` : B[e] ?? B.md : typeof t == "number" ? `${t}px` : t;
|
|
988
1104
|
return /* @__PURE__ */ l("div", {
|
|
989
|
-
ref:
|
|
1105
|
+
ref: u,
|
|
990
1106
|
className: [
|
|
991
1107
|
"chain-space",
|
|
992
|
-
`chain-space--${
|
|
993
|
-
`chain-space--align-${
|
|
994
|
-
|
|
995
|
-
|
|
1108
|
+
`chain-space--${n}`,
|
|
1109
|
+
`chain-space--align-${r}`,
|
|
1110
|
+
i && "chain-space--wrap",
|
|
1111
|
+
o
|
|
996
1112
|
].filter(Boolean).join(" "),
|
|
997
1113
|
style: {
|
|
998
|
-
gap:
|
|
999
|
-
...
|
|
1114
|
+
gap: d,
|
|
1115
|
+
...s
|
|
1000
1116
|
},
|
|
1001
|
-
...
|
|
1002
|
-
children:
|
|
1117
|
+
...c,
|
|
1118
|
+
children: a
|
|
1003
1119
|
});
|
|
1004
|
-
}),
|
|
1120
|
+
}), H = t(function({ orientation: e = "horizontal", type: t = "solid", size: n = "md", children: r, className: i, ...a }, o) {
|
|
1005
1121
|
return e === "vertical" ? /* @__PURE__ */ l("hr", {
|
|
1006
1122
|
ref: o,
|
|
1007
1123
|
className: [
|
|
@@ -1046,6 +1162,665 @@ var D = t(function({ value: e, defaultValue: t = 1, pageSize: r = 10, total: i =
|
|
|
1046
1162
|
role: "separator",
|
|
1047
1163
|
...a
|
|
1048
1164
|
});
|
|
1165
|
+
}), U = t(function({ checked: e, defaultChecked: t = !1, onChange: i, indeterminate: a = !1, disabled: c = !1, size: d = "md", color: f = "primary", status: p = "default", shape: m = "square", label: h, ariaLabel: g = "Checkbox", inputRef: _, value: v, className: y, style: b, children: x, id: S, name: C, ...w }, T) {
|
|
1166
|
+
let E = e !== void 0, [D, O] = s(t), k = E ? e : D, A = o(null);
|
|
1167
|
+
r(() => {
|
|
1168
|
+
let e = A.current;
|
|
1169
|
+
e && (e.indeterminate = a);
|
|
1170
|
+
}, [a]);
|
|
1171
|
+
let j = n((e) => {
|
|
1172
|
+
if (c) return;
|
|
1173
|
+
let t = a ? !0 : !k;
|
|
1174
|
+
E || O(t), i?.(t, e);
|
|
1175
|
+
}, [
|
|
1176
|
+
c,
|
|
1177
|
+
a,
|
|
1178
|
+
k,
|
|
1179
|
+
E,
|
|
1180
|
+
i
|
|
1181
|
+
]);
|
|
1182
|
+
r(() => {
|
|
1183
|
+
typeof _ == "function" ? _(A.current) : _ && "current" in _ && (_.current = A.current);
|
|
1184
|
+
}, [_]);
|
|
1185
|
+
let M = h !== void 0 || x !== void 0;
|
|
1186
|
+
return /* @__PURE__ */ u("label", {
|
|
1187
|
+
ref: T,
|
|
1188
|
+
className: [
|
|
1189
|
+
"chain-checkbox",
|
|
1190
|
+
`chain-checkbox--${d}`,
|
|
1191
|
+
`chain-checkbox--${f}`,
|
|
1192
|
+
m !== "square" && `chain-checkbox--${m}`,
|
|
1193
|
+
k && !a && "chain-checkbox--checked",
|
|
1194
|
+
a && "chain-checkbox--indeterminate",
|
|
1195
|
+
c && "chain-checkbox--disabled",
|
|
1196
|
+
p !== "default" && `chain-checkbox--${p}`,
|
|
1197
|
+
y
|
|
1198
|
+
].filter(Boolean).join(" "),
|
|
1199
|
+
style: b,
|
|
1200
|
+
children: [
|
|
1201
|
+
/* @__PURE__ */ l("input", {
|
|
1202
|
+
ref: A,
|
|
1203
|
+
type: "checkbox",
|
|
1204
|
+
className: "chain-checkbox__input",
|
|
1205
|
+
checked: k,
|
|
1206
|
+
disabled: c,
|
|
1207
|
+
onChange: j,
|
|
1208
|
+
id: S,
|
|
1209
|
+
name: C,
|
|
1210
|
+
value: v,
|
|
1211
|
+
"aria-checked": a ? "mixed" : k,
|
|
1212
|
+
"aria-label": M ? void 0 : g,
|
|
1213
|
+
...w
|
|
1214
|
+
}),
|
|
1215
|
+
/* @__PURE__ */ l("span", {
|
|
1216
|
+
className: "chain-checkbox__box",
|
|
1217
|
+
"aria-hidden": "true",
|
|
1218
|
+
children: a ? /* @__PURE__ */ l("span", { className: "chain-checkbox__indeterminate" }) : k ? /* @__PURE__ */ l("span", {
|
|
1219
|
+
className: "chain-checkbox__check",
|
|
1220
|
+
children: "✓"
|
|
1221
|
+
}) : null
|
|
1222
|
+
}),
|
|
1223
|
+
M && /* @__PURE__ */ l("span", {
|
|
1224
|
+
className: "chain-checkbox__label",
|
|
1225
|
+
children: h ?? x
|
|
1226
|
+
})
|
|
1227
|
+
]
|
|
1228
|
+
});
|
|
1229
|
+
}), W = t(function({ value: t, defaultValue: i = [], onChange: a, options: o, disabled: c = !1, size: u = "md", color: d = "primary", direction: f = "vertical", className: p, style: m, children: h }, g) {
|
|
1230
|
+
let _ = t !== void 0, [v, y] = s(i), b = _ ? t : v, x = n((e, t) => {
|
|
1231
|
+
let n = b.includes(e) ? b.filter((t) => t !== e) : [...b, e];
|
|
1232
|
+
_ || y(n), a?.(n, t);
|
|
1233
|
+
}, [
|
|
1234
|
+
b,
|
|
1235
|
+
_,
|
|
1236
|
+
a
|
|
1237
|
+
]);
|
|
1238
|
+
r(() => {
|
|
1239
|
+
o && h && console.warn("[CheckboxGroup] Both `options` and `children` provided — `children` takes precedence.");
|
|
1240
|
+
}, [o, h]);
|
|
1241
|
+
let S = [
|
|
1242
|
+
"chain-checkbox-group",
|
|
1243
|
+
`chain-checkbox-group--${f}`,
|
|
1244
|
+
p
|
|
1245
|
+
].filter(Boolean).join(" "), C = (e) => /* @__PURE__ */ l(U, {
|
|
1246
|
+
value: e.value,
|
|
1247
|
+
label: e.label,
|
|
1248
|
+
disabled: c || e.disabled,
|
|
1249
|
+
size: u,
|
|
1250
|
+
color: d,
|
|
1251
|
+
indeterminate: e.indeterminate,
|
|
1252
|
+
checked: b.includes(e.value),
|
|
1253
|
+
onChange: (t, n) => x(e.value, n)
|
|
1254
|
+
}, e.value), w;
|
|
1255
|
+
return h ? w = e.Children.map(h, (t) => {
|
|
1256
|
+
if (!e.isValidElement(t)) return t;
|
|
1257
|
+
let n = t.props.value;
|
|
1258
|
+
return n === void 0 ? t : e.cloneElement(t, {
|
|
1259
|
+
checked: b.includes(n),
|
|
1260
|
+
onChange: (e, r) => {
|
|
1261
|
+
x(n, r), t.props.onChange?.(e, r);
|
|
1262
|
+
},
|
|
1263
|
+
disabled: t.props.disabled || c,
|
|
1264
|
+
size: t.props.size || u,
|
|
1265
|
+
color: t.props.color || d
|
|
1266
|
+
});
|
|
1267
|
+
}) : o && (w = o.map(C)), /* @__PURE__ */ l("div", {
|
|
1268
|
+
ref: g,
|
|
1269
|
+
className: S,
|
|
1270
|
+
style: m,
|
|
1271
|
+
role: "group",
|
|
1272
|
+
children: w
|
|
1273
|
+
});
|
|
1274
|
+
}), G = t(function({ checked: e, defaultChecked: t = !1, onChange: r, disabled: i = !1, size: a = "md", color: o = "primary", status: c = "default", label: d, ariaLabel: f = "Radio", inputRef: p, value: m, className: h, style: g, children: _, id: v, name: y, ...b }, x) {
|
|
1275
|
+
let S = e !== void 0, [C, w] = s(t), T = S ? e : C, E = n((e) => {
|
|
1276
|
+
i || T || (S || w(!0), r?.(!0, e));
|
|
1277
|
+
}, [
|
|
1278
|
+
i,
|
|
1279
|
+
T,
|
|
1280
|
+
S,
|
|
1281
|
+
r
|
|
1282
|
+
]), D = d !== void 0 || _ !== void 0;
|
|
1283
|
+
return /* @__PURE__ */ u("label", {
|
|
1284
|
+
ref: x,
|
|
1285
|
+
className: [
|
|
1286
|
+
"chain-radio",
|
|
1287
|
+
`chain-radio--${a}`,
|
|
1288
|
+
`chain-radio--${o}`,
|
|
1289
|
+
T && "chain-radio--checked",
|
|
1290
|
+
i && "chain-radio--disabled",
|
|
1291
|
+
c !== "default" && !T && `chain-radio--${c}`,
|
|
1292
|
+
h
|
|
1293
|
+
].filter(Boolean).join(" "),
|
|
1294
|
+
style: g,
|
|
1295
|
+
children: [
|
|
1296
|
+
/* @__PURE__ */ l("input", {
|
|
1297
|
+
ref: p,
|
|
1298
|
+
type: "radio",
|
|
1299
|
+
className: "chain-radio__input",
|
|
1300
|
+
checked: T,
|
|
1301
|
+
disabled: i,
|
|
1302
|
+
onChange: E,
|
|
1303
|
+
id: v,
|
|
1304
|
+
name: y,
|
|
1305
|
+
value: m,
|
|
1306
|
+
"aria-checked": T,
|
|
1307
|
+
"aria-label": D ? void 0 : f,
|
|
1308
|
+
...b
|
|
1309
|
+
}),
|
|
1310
|
+
/* @__PURE__ */ l("span", {
|
|
1311
|
+
className: "chain-radio__box",
|
|
1312
|
+
"aria-hidden": "true",
|
|
1313
|
+
children: T && /* @__PURE__ */ l("span", { className: "chain-radio__dot" })
|
|
1314
|
+
}),
|
|
1315
|
+
D && /* @__PURE__ */ l("span", {
|
|
1316
|
+
className: "chain-radio__label",
|
|
1317
|
+
children: d ?? _
|
|
1318
|
+
})
|
|
1319
|
+
]
|
|
1320
|
+
});
|
|
1321
|
+
}), K = t(function({ value: t, defaultValue: i, onChange: a, options: o, disabled: c = !1, size: u = "md", color: d = "primary", direction: f = "vertical", className: p, style: m, children: h }, g) {
|
|
1322
|
+
let _ = t !== void 0, [v, y] = s(i), b = _ ? t : v, x = n((e, t) => {
|
|
1323
|
+
e !== b && (_ || y(e), a?.(e, t));
|
|
1324
|
+
}, [
|
|
1325
|
+
b,
|
|
1326
|
+
_,
|
|
1327
|
+
a
|
|
1328
|
+
]);
|
|
1329
|
+
r(() => {
|
|
1330
|
+
o && h && console.warn("[RadioGroup] Both `options` and `children` provided — `children` takes precedence.");
|
|
1331
|
+
}, [o, h]);
|
|
1332
|
+
let S = [
|
|
1333
|
+
"chain-radio-group",
|
|
1334
|
+
`chain-radio-group--${f}`,
|
|
1335
|
+
p
|
|
1336
|
+
].filter(Boolean).join(" "), C = (e) => /* @__PURE__ */ l(G, {
|
|
1337
|
+
value: e.value,
|
|
1338
|
+
label: e.label,
|
|
1339
|
+
disabled: c || e.disabled,
|
|
1340
|
+
size: u,
|
|
1341
|
+
color: d,
|
|
1342
|
+
checked: b === e.value,
|
|
1343
|
+
onChange: (t, n) => x(e.value, n)
|
|
1344
|
+
}, e.value), w;
|
|
1345
|
+
return h ? w = e.Children.map(h, (t) => {
|
|
1346
|
+
if (!e.isValidElement(t)) return t;
|
|
1347
|
+
let n = t.props.value;
|
|
1348
|
+
return n === void 0 ? t : e.cloneElement(t, {
|
|
1349
|
+
checked: b === n,
|
|
1350
|
+
onChange: (e, r) => {
|
|
1351
|
+
x(n, r), t.props.onChange?.(!0, r);
|
|
1352
|
+
},
|
|
1353
|
+
disabled: t.props.disabled || c,
|
|
1354
|
+
size: t.props.size || u,
|
|
1355
|
+
color: t.props.color || d
|
|
1356
|
+
});
|
|
1357
|
+
}) : o && (w = o.map(C)), /* @__PURE__ */ l("div", {
|
|
1358
|
+
ref: g,
|
|
1359
|
+
className: S,
|
|
1360
|
+
style: m,
|
|
1361
|
+
role: "radiogroup",
|
|
1362
|
+
children: w
|
|
1363
|
+
});
|
|
1364
|
+
}), ee = t(function({ checked: e, defaultChecked: t = !1, onChange: r, disabled: i = !1, loading: a = !1, size: o = "md", color: c = "primary", checkedChildren: d, unCheckedChildren: f, ariaLabel: p = "Switch", className: m, style: h, onClick: g, onKeyDown: _, ...v }, y) {
|
|
1365
|
+
let b = e !== void 0, [x, S] = s(t), C = b ? e : x, w = i || a, T = n((e) => {
|
|
1366
|
+
if (w) return;
|
|
1367
|
+
let t = !C;
|
|
1368
|
+
b || S(t), r?.(t, e), g?.(e);
|
|
1369
|
+
}, [
|
|
1370
|
+
w,
|
|
1371
|
+
C,
|
|
1372
|
+
b,
|
|
1373
|
+
r,
|
|
1374
|
+
g
|
|
1375
|
+
]), E = n((e) => {
|
|
1376
|
+
if ((e.key === " " || e.key === "Enter") && (e.preventDefault(), !w)) {
|
|
1377
|
+
let e = !C;
|
|
1378
|
+
b || S(e), r?.(e);
|
|
1379
|
+
}
|
|
1380
|
+
_?.(e);
|
|
1381
|
+
}, [
|
|
1382
|
+
w,
|
|
1383
|
+
C,
|
|
1384
|
+
b,
|
|
1385
|
+
r,
|
|
1386
|
+
_
|
|
1387
|
+
]), D = o !== "sm";
|
|
1388
|
+
return /* @__PURE__ */ l("button", {
|
|
1389
|
+
ref: y,
|
|
1390
|
+
type: "button",
|
|
1391
|
+
role: "switch",
|
|
1392
|
+
className: [
|
|
1393
|
+
"chain-switch",
|
|
1394
|
+
`chain-switch--${o}`,
|
|
1395
|
+
`chain-switch--${c}`,
|
|
1396
|
+
C && "chain-switch--checked",
|
|
1397
|
+
w && "chain-switch--disabled",
|
|
1398
|
+
a && "chain-switch--loading",
|
|
1399
|
+
m
|
|
1400
|
+
].filter(Boolean).join(" "),
|
|
1401
|
+
style: h,
|
|
1402
|
+
"aria-checked": C,
|
|
1403
|
+
"aria-busy": a || void 0,
|
|
1404
|
+
"aria-label": p,
|
|
1405
|
+
disabled: i,
|
|
1406
|
+
onClick: T,
|
|
1407
|
+
onKeyDown: E,
|
|
1408
|
+
...v,
|
|
1409
|
+
children: /* @__PURE__ */ u("span", {
|
|
1410
|
+
className: "chain-switch__track",
|
|
1411
|
+
children: [
|
|
1412
|
+
D && /* @__PURE__ */ l("span", {
|
|
1413
|
+
className: "chain-switch__text chain-switch__text--off",
|
|
1414
|
+
children: f
|
|
1415
|
+
}),
|
|
1416
|
+
/* @__PURE__ */ l("span", {
|
|
1417
|
+
className: "chain-switch__thumb",
|
|
1418
|
+
children: a && /* @__PURE__ */ l("span", {
|
|
1419
|
+
className: "chain-switch__spinner",
|
|
1420
|
+
"aria-hidden": "true"
|
|
1421
|
+
})
|
|
1422
|
+
}),
|
|
1423
|
+
D && /* @__PURE__ */ l("span", {
|
|
1424
|
+
className: "chain-switch__text chain-switch__text--on",
|
|
1425
|
+
children: d
|
|
1426
|
+
})
|
|
1427
|
+
]
|
|
1428
|
+
})
|
|
1429
|
+
});
|
|
1430
|
+
}), q = t(function({ title: e, content: t, placement: a = "top", trigger: d = "hover", visible: f, defaultVisible: p = !1, onVisibleChange: m, color: h = "dark", arrow: g = !0, mouseEnterDelay: _ = 100, mouseLeaveDelay: y = 100, zIndex: w = 1060, getPopupContainer: T, destroyOnClose: E = !0, className: O, style: k, children: A, ...j }, M) {
|
|
1431
|
+
let N = i(), P = f !== void 0, [F, I] = s(p), L = P ? f : F, R = b(L, { duration: 200 }), { mounted: z, animating: B, closing: V } = R, H = D(S(R), C(R)), [U, W] = s({
|
|
1432
|
+
top: 0,
|
|
1433
|
+
left: 0
|
|
1434
|
+
}), G = o(null), K = o(null), ee = o(void 0), q = o(void 0), te = n((e) => {
|
|
1435
|
+
K.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
|
|
1436
|
+
}, [M]), J = n((e) => {
|
|
1437
|
+
e !== L && (P || I(e), m?.(e));
|
|
1438
|
+
}, [
|
|
1439
|
+
L,
|
|
1440
|
+
P,
|
|
1441
|
+
m
|
|
1442
|
+
]), Y = n(() => {
|
|
1443
|
+
clearTimeout(q.current), !L && (ee.current = setTimeout(() => {
|
|
1444
|
+
J(!0);
|
|
1445
|
+
}, _));
|
|
1446
|
+
}, [
|
|
1447
|
+
L,
|
|
1448
|
+
_,
|
|
1449
|
+
J
|
|
1450
|
+
]), X = n(() => {
|
|
1451
|
+
clearTimeout(ee.current), q.current = setTimeout(() => {
|
|
1452
|
+
J(!1);
|
|
1453
|
+
}, y);
|
|
1454
|
+
}, [y, J]);
|
|
1455
|
+
r(() => {
|
|
1456
|
+
B && !V && requestAnimationFrame(() => {
|
|
1457
|
+
G.current && K.current && W(v(G.current.getBoundingClientRect(), K.current.getBoundingClientRect(), a));
|
|
1458
|
+
});
|
|
1459
|
+
}, [
|
|
1460
|
+
B,
|
|
1461
|
+
V,
|
|
1462
|
+
a
|
|
1463
|
+
]), r(() => {
|
|
1464
|
+
if (!z || V) return;
|
|
1465
|
+
let e = () => {
|
|
1466
|
+
G.current && K.current && W(v(G.current.getBoundingClientRect(), K.current.getBoundingClientRect(), a));
|
|
1467
|
+
};
|
|
1468
|
+
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
1469
|
+
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
1470
|
+
};
|
|
1471
|
+
}, [
|
|
1472
|
+
z,
|
|
1473
|
+
V,
|
|
1474
|
+
a
|
|
1475
|
+
]), r(() => {
|
|
1476
|
+
if (d !== "click" || !z || V) return;
|
|
1477
|
+
let e = (e) => {
|
|
1478
|
+
let t = e.target;
|
|
1479
|
+
K.current?.contains(t) || G.current?.contains(t) || J(!1);
|
|
1480
|
+
};
|
|
1481
|
+
return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
|
|
1482
|
+
}, [
|
|
1483
|
+
d,
|
|
1484
|
+
z,
|
|
1485
|
+
V,
|
|
1486
|
+
J
|
|
1487
|
+
]), r(() => {
|
|
1488
|
+
if (d !== "click" || !z || V) return;
|
|
1489
|
+
let e = (e) => {
|
|
1490
|
+
e.key === "Escape" && J(!1);
|
|
1491
|
+
};
|
|
1492
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1493
|
+
}, [
|
|
1494
|
+
d,
|
|
1495
|
+
z,
|
|
1496
|
+
V,
|
|
1497
|
+
J
|
|
1498
|
+
]), r(() => () => {
|
|
1499
|
+
clearTimeout(ee.current), clearTimeout(q.current);
|
|
1500
|
+
}, []);
|
|
1501
|
+
let Z = {};
|
|
1502
|
+
d === "hover" && (Z.onMouseEnter = Y, Z.onMouseLeave = X), d === "focus" && (Z.onFocusCapture = Y, Z.onBlurCapture = X), d === "click" && (Z.onClick = (e) => {
|
|
1503
|
+
e.stopPropagation(), L ? X() : Y();
|
|
1504
|
+
});
|
|
1505
|
+
let ne = [
|
|
1506
|
+
"chain-tooltip",
|
|
1507
|
+
`chain-tooltip--${h}`,
|
|
1508
|
+
`chain-tooltip--${a.split("-")[0]}`,
|
|
1509
|
+
a.includes("-start") && "chain-tooltip--start",
|
|
1510
|
+
a.includes("-end") && "chain-tooltip--end",
|
|
1511
|
+
!g && "chain-tooltip--no-arrow",
|
|
1512
|
+
O
|
|
1513
|
+
].filter(Boolean).join(" "), re = t ?? e;
|
|
1514
|
+
return !z && E ? /* @__PURE__ */ l("span", {
|
|
1515
|
+
ref: G,
|
|
1516
|
+
className: "chain-tooltip__wrapper",
|
|
1517
|
+
...Z,
|
|
1518
|
+
children: A
|
|
1519
|
+
}) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("span", {
|
|
1520
|
+
ref: G,
|
|
1521
|
+
className: "chain-tooltip__wrapper",
|
|
1522
|
+
"aria-describedby": B ? N : void 0,
|
|
1523
|
+
...Z,
|
|
1524
|
+
children: A
|
|
1525
|
+
}), /* @__PURE__ */ l(x, {
|
|
1526
|
+
getContainer: T,
|
|
1527
|
+
children: /* @__PURE__ */ u("div", {
|
|
1528
|
+
ref: te,
|
|
1529
|
+
id: N,
|
|
1530
|
+
className: ne,
|
|
1531
|
+
role: "tooltip",
|
|
1532
|
+
style: {
|
|
1533
|
+
...H,
|
|
1534
|
+
pointerEvents: B && !V ? "auto" : "none",
|
|
1535
|
+
...k,
|
|
1536
|
+
top: U.top,
|
|
1537
|
+
left: U.left,
|
|
1538
|
+
zIndex: w
|
|
1539
|
+
},
|
|
1540
|
+
onMouseEnter: d === "hover" ? Y : void 0,
|
|
1541
|
+
onMouseLeave: d === "hover" ? X : void 0,
|
|
1542
|
+
...j,
|
|
1543
|
+
children: [/* @__PURE__ */ l("div", {
|
|
1544
|
+
className: "chain-tooltip__content",
|
|
1545
|
+
children: re
|
|
1546
|
+
}), g && /* @__PURE__ */ l("div", { className: "chain-tooltip__arrow" })]
|
|
1547
|
+
})
|
|
1548
|
+
})] });
|
|
1549
|
+
}), te = "a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", J = t(function({ title: e, content: t, footer: a, placement: d = "top", trigger: f = "click", visible: p, defaultVisible: m = !1, onVisibleChange: h, closable: g = !1, closeAriaLabel: _ = "Close", arrow: y = !0, width: w = 320, mouseEnterDelay: T = 100, mouseLeaveDelay: E = 100, zIndex: O = 1060, getPopupContainer: k, destroyOnClose: A = !0, className: j, style: M, children: N, ...P }, F) {
|
|
1550
|
+
let I = i(), L = i(), R = p !== void 0, [z, B] = s(m), V = R ? p : z, H = b(V, { duration: 200 }), { mounted: U, animating: W, closing: G } = H, K = D(S(H), C(H)), [ee, q] = s({
|
|
1551
|
+
top: 0,
|
|
1552
|
+
left: 0
|
|
1553
|
+
}), J = o(null), Y = o(null), X = o(void 0), Z = o(void 0), ne = o(null), re = n((e) => {
|
|
1554
|
+
Y.current = e, typeof F == "function" ? F(e) : F && (F.current = e);
|
|
1555
|
+
}, [F]), Q = n((e) => {
|
|
1556
|
+
e !== V && (R || B(e), h?.(e));
|
|
1557
|
+
}, [
|
|
1558
|
+
V,
|
|
1559
|
+
R,
|
|
1560
|
+
h
|
|
1561
|
+
]), ie = n(() => {
|
|
1562
|
+
clearTimeout(Z.current), !V && (ne.current = document.activeElement, X.current = setTimeout(() => {
|
|
1563
|
+
Q(!0);
|
|
1564
|
+
}, T));
|
|
1565
|
+
}, [
|
|
1566
|
+
V,
|
|
1567
|
+
T,
|
|
1568
|
+
Q
|
|
1569
|
+
]), ae = n(() => {
|
|
1570
|
+
clearTimeout(X.current), Z.current = setTimeout(() => {
|
|
1571
|
+
Q(!1);
|
|
1572
|
+
}, E);
|
|
1573
|
+
}, [E, Q]);
|
|
1574
|
+
r(() => {
|
|
1575
|
+
W && !G && requestAnimationFrame(() => {
|
|
1576
|
+
Y.current && Y.current.querySelector(te)?.focus(), J.current && Y.current && q(v(J.current.getBoundingClientRect(), Y.current.getBoundingClientRect(), d));
|
|
1577
|
+
});
|
|
1578
|
+
}, [
|
|
1579
|
+
W,
|
|
1580
|
+
G,
|
|
1581
|
+
d
|
|
1582
|
+
]), r(() => {
|
|
1583
|
+
G && (ne.current?.focus(), ne.current = null);
|
|
1584
|
+
}, [G]), r(() => {
|
|
1585
|
+
if (!U || G) return;
|
|
1586
|
+
let e = () => {
|
|
1587
|
+
J.current && Y.current && q(v(J.current.getBoundingClientRect(), Y.current.getBoundingClientRect(), d));
|
|
1588
|
+
};
|
|
1589
|
+
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
1590
|
+
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
1591
|
+
};
|
|
1592
|
+
}, [
|
|
1593
|
+
U,
|
|
1594
|
+
G,
|
|
1595
|
+
d
|
|
1596
|
+
]), r(() => {
|
|
1597
|
+
if (!U || G) return;
|
|
1598
|
+
let e = (e) => {
|
|
1599
|
+
let t = e.target;
|
|
1600
|
+
Y.current?.contains(t) || J.current?.contains(t) || Q(!1);
|
|
1601
|
+
};
|
|
1602
|
+
return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
|
|
1603
|
+
}, [
|
|
1604
|
+
U,
|
|
1605
|
+
G,
|
|
1606
|
+
Q
|
|
1607
|
+
]), r(() => {
|
|
1608
|
+
if (!U || G) return;
|
|
1609
|
+
let e = (e) => {
|
|
1610
|
+
e.key === "Escape" && Q(!1);
|
|
1611
|
+
};
|
|
1612
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1613
|
+
}, [
|
|
1614
|
+
U,
|
|
1615
|
+
G,
|
|
1616
|
+
Q
|
|
1617
|
+
]), r(() => () => {
|
|
1618
|
+
clearTimeout(X.current), clearTimeout(Z.current);
|
|
1619
|
+
}, []);
|
|
1620
|
+
let $ = {};
|
|
1621
|
+
f === "hover" && ($.onMouseEnter = ie, $.onMouseLeave = ae), f === "focus" && ($.onFocusCapture = ie, $.onBlurCapture = ae), f === "click" && ($.onClick = (e) => {
|
|
1622
|
+
e.stopPropagation(), V ? ae() : ie();
|
|
1623
|
+
});
|
|
1624
|
+
let oe = n(() => {
|
|
1625
|
+
Q(!1);
|
|
1626
|
+
}, [Q]), se = e !== void 0 || g, ce = [
|
|
1627
|
+
"chain-popover",
|
|
1628
|
+
`chain-popover--${d.split("-")[0]}`,
|
|
1629
|
+
d.includes("-start") && "chain-popover--start",
|
|
1630
|
+
d.includes("-end") && "chain-popover--end",
|
|
1631
|
+
!y && "chain-popover--no-arrow",
|
|
1632
|
+
j
|
|
1633
|
+
].filter(Boolean).join(" ");
|
|
1634
|
+
return !U && A ? /* @__PURE__ */ l("span", {
|
|
1635
|
+
ref: J,
|
|
1636
|
+
className: "chain-popover__wrapper",
|
|
1637
|
+
...$,
|
|
1638
|
+
children: N
|
|
1639
|
+
}) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("span", {
|
|
1640
|
+
ref: J,
|
|
1641
|
+
className: "chain-popover__wrapper",
|
|
1642
|
+
"aria-describedby": W ? I : void 0,
|
|
1643
|
+
...$,
|
|
1644
|
+
children: N
|
|
1645
|
+
}), /* @__PURE__ */ l(x, {
|
|
1646
|
+
getContainer: k,
|
|
1647
|
+
children: /* @__PURE__ */ u("div", {
|
|
1648
|
+
ref: re,
|
|
1649
|
+
id: I,
|
|
1650
|
+
className: ce,
|
|
1651
|
+
role: "dialog",
|
|
1652
|
+
"aria-labelledby": e ? L : void 0,
|
|
1653
|
+
style: {
|
|
1654
|
+
...K,
|
|
1655
|
+
pointerEvents: W && !G ? "auto" : "none",
|
|
1656
|
+
...M,
|
|
1657
|
+
top: ee.top,
|
|
1658
|
+
left: ee.left,
|
|
1659
|
+
width: typeof w == "number" ? `${w}px` : w,
|
|
1660
|
+
zIndex: O
|
|
1661
|
+
},
|
|
1662
|
+
...P,
|
|
1663
|
+
children: [
|
|
1664
|
+
se && /* @__PURE__ */ u("div", {
|
|
1665
|
+
className: "chain-popover__header",
|
|
1666
|
+
children: [e && /* @__PURE__ */ l("h3", {
|
|
1667
|
+
id: L,
|
|
1668
|
+
className: "chain-popover__title",
|
|
1669
|
+
children: e
|
|
1670
|
+
}), g && /* @__PURE__ */ l("button", {
|
|
1671
|
+
type: "button",
|
|
1672
|
+
className: "chain-popover__close",
|
|
1673
|
+
"aria-label": _,
|
|
1674
|
+
onClick: oe,
|
|
1675
|
+
children: "×"
|
|
1676
|
+
})]
|
|
1677
|
+
}),
|
|
1678
|
+
t && /* @__PURE__ */ l("div", {
|
|
1679
|
+
className: "chain-popover__body",
|
|
1680
|
+
children: t
|
|
1681
|
+
}),
|
|
1682
|
+
a && /* @__PURE__ */ l("div", {
|
|
1683
|
+
className: "chain-popover__footer",
|
|
1684
|
+
children: a
|
|
1685
|
+
}),
|
|
1686
|
+
y && /* @__PURE__ */ l("div", { className: "chain-popover__arrow" })
|
|
1687
|
+
]
|
|
1688
|
+
})
|
|
1689
|
+
})] });
|
|
1690
|
+
}), Y = t(function({ type: e = "info", content: t, open: i, defaultOpen: a = !0, onClose: c, duration: d = 3e3, closable: f = !1, closeAriaLabel: p = "Close", icon: m, placement: h = "top", getContainer: g, destroyOnClose: _ = !0, className: v, style: C, ...w }, T) {
|
|
1691
|
+
let O = i !== void 0, [k, A] = s(a), j = O ? i : k, M = b(j, { duration: 250 }), { mounted: N, animating: P, closing: F } = M, I = h === "top" ? {
|
|
1692
|
+
x: "-50%",
|
|
1693
|
+
y: -16
|
|
1694
|
+
} : {
|
|
1695
|
+
x: 0,
|
|
1696
|
+
y: -16
|
|
1697
|
+
}, L = h === "top" ? {
|
|
1698
|
+
x: "-50%",
|
|
1699
|
+
y: 0
|
|
1700
|
+
} : {
|
|
1701
|
+
x: 0,
|
|
1702
|
+
y: 0
|
|
1703
|
+
}, R = D(S(M), E(M, {
|
|
1704
|
+
from: I,
|
|
1705
|
+
to: L,
|
|
1706
|
+
duration: 250
|
|
1707
|
+
})), z = o(void 0), B = n(() => {
|
|
1708
|
+
clearTimeout(z.current), O || A(!1), c?.();
|
|
1709
|
+
}, [O, c]);
|
|
1710
|
+
r(() => (j && d > 0 && !O && (z.current = setTimeout(B, d)), () => clearTimeout(z.current)), [
|
|
1711
|
+
j,
|
|
1712
|
+
d,
|
|
1713
|
+
O,
|
|
1714
|
+
B
|
|
1715
|
+
]);
|
|
1716
|
+
let V = n(() => {
|
|
1717
|
+
B();
|
|
1718
|
+
}, [B]), H = m === !1 ? null : m === void 0 ? y[e] : m, U = [
|
|
1719
|
+
"chain-message",
|
|
1720
|
+
`chain-message--${e}`,
|
|
1721
|
+
`chain-message--${h}`,
|
|
1722
|
+
v
|
|
1723
|
+
].filter(Boolean).join(" ");
|
|
1724
|
+
return !N && _ ? null : /* @__PURE__ */ l(x, {
|
|
1725
|
+
getContainer: g,
|
|
1726
|
+
children: /* @__PURE__ */ u("div", {
|
|
1727
|
+
ref: T,
|
|
1728
|
+
className: U,
|
|
1729
|
+
role: e === "error" ? "alert" : "status",
|
|
1730
|
+
"aria-live": e === "error" ? "assertive" : "polite",
|
|
1731
|
+
style: {
|
|
1732
|
+
...R,
|
|
1733
|
+
pointerEvents: P && !F ? "auto" : "none",
|
|
1734
|
+
...C
|
|
1735
|
+
},
|
|
1736
|
+
...w,
|
|
1737
|
+
children: [
|
|
1738
|
+
H && /* @__PURE__ */ l("span", {
|
|
1739
|
+
className: "chain-message__icon",
|
|
1740
|
+
"aria-hidden": "true",
|
|
1741
|
+
children: H
|
|
1742
|
+
}),
|
|
1743
|
+
/* @__PURE__ */ l("span", {
|
|
1744
|
+
className: "chain-message__content",
|
|
1745
|
+
children: t
|
|
1746
|
+
}),
|
|
1747
|
+
f && /* @__PURE__ */ l("button", {
|
|
1748
|
+
type: "button",
|
|
1749
|
+
className: "chain-message__close",
|
|
1750
|
+
"aria-label": p,
|
|
1751
|
+
onClick: V,
|
|
1752
|
+
children: "×"
|
|
1753
|
+
})
|
|
1754
|
+
]
|
|
1755
|
+
})
|
|
1756
|
+
});
|
|
1757
|
+
}), X = t(function({ type: e = "info", title: t, description: i, open: a, defaultOpen: c = !0, onClose: d, duration: f = 0, closable: p = !0, closeAriaLabel: m = "Close", icon: h, placement: g = "top-right", action: _, getContainer: v, destroyOnClose: C = !0, className: w, style: T, ...O }, k) {
|
|
1758
|
+
let A = a !== void 0, [j, M] = s(c), N = A ? a : j, P = b(N, { duration: 250 }), { mounted: F, animating: I, closing: L } = P, R = g === "top-left" ? "left" : "right", z = D(S(P), E(P, {
|
|
1759
|
+
direction: R,
|
|
1760
|
+
distance: 120,
|
|
1761
|
+
duration: 300
|
|
1762
|
+
})), B = o(void 0), V = n(() => {
|
|
1763
|
+
clearTimeout(B.current), A || M(!1), d?.();
|
|
1764
|
+
}, [A, d]);
|
|
1765
|
+
r(() => (N && f > 0 && !A && (B.current = setTimeout(V, f)), () => clearTimeout(B.current)), [
|
|
1766
|
+
N,
|
|
1767
|
+
f,
|
|
1768
|
+
A,
|
|
1769
|
+
V
|
|
1770
|
+
]);
|
|
1771
|
+
let H = n(() => {
|
|
1772
|
+
V();
|
|
1773
|
+
}, [V]), U = h === !1 ? null : h === void 0 ? y[e] : h, W = [
|
|
1774
|
+
"chain-notification",
|
|
1775
|
+
`chain-notification--${e}`,
|
|
1776
|
+
`chain-notification--${g}`,
|
|
1777
|
+
w
|
|
1778
|
+
].filter(Boolean).join(" ");
|
|
1779
|
+
return !F && C ? null : /* @__PURE__ */ l(x, {
|
|
1780
|
+
getContainer: v,
|
|
1781
|
+
children: /* @__PURE__ */ u("div", {
|
|
1782
|
+
ref: k,
|
|
1783
|
+
className: W,
|
|
1784
|
+
role: "status",
|
|
1785
|
+
"aria-live": "polite",
|
|
1786
|
+
style: {
|
|
1787
|
+
...z,
|
|
1788
|
+
pointerEvents: I && !L ? "auto" : "none",
|
|
1789
|
+
...T
|
|
1790
|
+
},
|
|
1791
|
+
...O,
|
|
1792
|
+
children: [/* @__PURE__ */ u("div", {
|
|
1793
|
+
className: "chain-notification__body",
|
|
1794
|
+
children: [
|
|
1795
|
+
U && /* @__PURE__ */ l("span", {
|
|
1796
|
+
className: "chain-notification__icon",
|
|
1797
|
+
"aria-hidden": "true",
|
|
1798
|
+
children: U
|
|
1799
|
+
}),
|
|
1800
|
+
/* @__PURE__ */ u("div", {
|
|
1801
|
+
className: "chain-notification__text",
|
|
1802
|
+
children: [t && /* @__PURE__ */ l("div", {
|
|
1803
|
+
className: "chain-notification__title",
|
|
1804
|
+
children: t
|
|
1805
|
+
}), i && /* @__PURE__ */ l("div", {
|
|
1806
|
+
className: "chain-notification__description",
|
|
1807
|
+
children: i
|
|
1808
|
+
})]
|
|
1809
|
+
}),
|
|
1810
|
+
p && /* @__PURE__ */ l("button", {
|
|
1811
|
+
type: "button",
|
|
1812
|
+
className: "chain-notification__close",
|
|
1813
|
+
"aria-label": m,
|
|
1814
|
+
onClick: H,
|
|
1815
|
+
children: "×"
|
|
1816
|
+
})
|
|
1817
|
+
]
|
|
1818
|
+
}), _ && /* @__PURE__ */ l("div", {
|
|
1819
|
+
className: "chain-notification__action",
|
|
1820
|
+
children: _
|
|
1821
|
+
})]
|
|
1822
|
+
})
|
|
1823
|
+
});
|
|
1049
1824
|
});
|
|
1050
1825
|
//#endregion
|
|
1051
|
-
export {
|
|
1826
|
+
export { z as Alert, F as Badge, f as Button, U as Checkbox, W as CheckboxGroup, H as Divider, h as FormItem, p as Input, Y as Message, A as Modal, X as Notification, L as Pagination, J as Popover, G as Radio, K as RadioGroup, _ as Select, V as Space, ee as Switch, N as Table, P as Tag, q as Tooltip };
|