tango-ui-cw 1.0.4 → 1.0.6

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.js CHANGED
@@ -1,17 +1,17 @@
1
1
  'use client';
2
- import { jsx as s, jsxs as L, Fragment as Ne } from "react/jsx-runtime";
3
- import te, { useState as Z, useRef as $e, useEffect as ae, useContext as Ue, createContext as He, forwardRef as kt, useCallback as oe, useMemo as Se, useId as Kt } from "react";
2
+ import { jsx as s, jsxs as P, Fragment as Ne } from "react/jsx-runtime";
3
+ import te, { useState as Z, useRef as ke, useEffect as se, useContext as Ue, createContext as He, forwardRef as Lt, useCallback as oe, useMemo as Se, useId as Wt } from "react";
4
4
  import { createPortal as Ut } from "react-dom";
5
5
  import t from "prop-types";
6
6
  import { twMerge as Ht } from "tailwind-merge";
7
- const Qe = "tango:theme", et = "tango:themeTokens", Wt = "light", Zt = [
7
+ const et = "tango:theme", tt = "tango:themeTokens", De = "light", Zt = [
8
8
  "primary",
9
9
  "input-accent",
10
10
  "modal-ok-bg",
11
11
  "drawer-ok-bg",
12
12
  "datepicker-confirm-bg"
13
- ], Lt = He(null), Pt = () => typeof window < "u", tt = (e, o) => {
14
- if (!Pt())
13
+ ], Pt = He(null), Ot = () => typeof window < "u", ot = (e, o) => {
14
+ if (!Ot())
15
15
  return o;
16
16
  try {
17
17
  const r = window.localStorage.getItem(e);
@@ -19,69 +19,74 @@ const Qe = "tango:theme", et = "tango:themeTokens", Wt = "light", Zt = [
19
19
  } catch {
20
20
  return o;
21
21
  }
22
- }, ot = (e, o) => {
23
- if (Pt())
22
+ }, rt = (e, o) => {
23
+ if (Ot())
24
24
  try {
25
25
  window.localStorage.setItem(e, JSON.stringify(o));
26
26
  } catch {
27
27
  }
28
28
  };
29
29
  function Jr({ children: e }) {
30
- const [o, r] = Z(() => tt(Qe, Wt) === "dark" ? "dark" : "light"), [n, c] = Z(
31
- () => tt(et, {})
32
- ), l = $e(/* @__PURE__ */ new Set());
33
- ae(() => {
30
+ const [o, r] = Z(De), n = ke(!1);
31
+ se(() => {
32
+ const d = ot(et, De);
33
+ d !== De && r(d === "dark" ? "dark" : "light"), n.current = !0;
34
+ }, []);
35
+ const [c, l] = Z(
36
+ () => ot(tt, {})
37
+ ), a = ke(/* @__PURE__ */ new Set());
38
+ se(() => {
34
39
  typeof document > "u" || (document.documentElement.dataset.theme = o);
35
- }, [o]), ae(() => {
36
- ot(Qe, o);
37
- }, [o]), ae(() => {
40
+ }, [o]), se(() => {
41
+ n.current && rt(et, o);
42
+ }, [o]), se(() => {
38
43
  if (typeof document > "u")
39
44
  return;
40
- const d = document.documentElement, p = new Set(Object.keys(n));
41
- l.current.forEach((f) => {
42
- p.has(f) || d.style.removeProperty(`--${f}`);
43
- }), Object.entries(n).forEach(([f, w]) => {
44
- w == null || w === "" ? d.style.removeProperty(`--${f}`) : d.style.setProperty(`--${f}`, String(w));
45
- }), l.current = p, ot(et, n);
46
- }, [n]);
47
- const a = (d) => {
48
- c((p) => {
49
- const f = typeof d == "function" ? d(p) : d;
45
+ const d = document.documentElement, g = new Set(Object.keys(c));
46
+ a.current.forEach((v) => {
47
+ g.has(v) || d.style.removeProperty(`--${v}`);
48
+ }), Object.entries(c).forEach(([v, w]) => {
49
+ w == null || w === "" ? d.style.removeProperty(`--${v}`) : d.style.setProperty(`--${v}`, String(w));
50
+ }), a.current = g, rt(tt, c);
51
+ }, [c]);
52
+ const i = (d) => {
53
+ l((g) => {
54
+ const v = typeof d == "function" ? d(g) : d;
50
55
  return {
51
- ...p,
52
- ...f || {}
56
+ ...g,
57
+ ...v || {}
53
58
  };
54
59
  });
55
- }, i = (d, p = Zt) => {
56
- a((f) => {
57
- const w = { ...f };
58
- return p.forEach((P) => {
59
- w[P] = d;
60
+ }, u = (d, g = Zt) => {
61
+ i((v) => {
62
+ const w = { ...v };
63
+ return g.forEach((C) => {
64
+ w[C] = d;
60
65
  }), w;
61
66
  });
62
- }, u = () => {
63
- c({});
64
67
  }, h = () => {
68
+ l({});
69
+ }, m = () => {
65
70
  r((d) => d === "dark" ? "light" : "dark");
66
71
  };
67
72
  return /* @__PURE__ */ s(
68
- Lt.Provider,
73
+ Pt.Provider,
69
74
  {
70
75
  value: {
71
76
  theme: o,
72
77
  setTheme: r,
73
- toggleTheme: h,
74
- themeTokens: n,
75
- setThemeTokens: a,
76
- setThemeColor: i,
77
- resetThemeTokens: u
78
+ toggleTheme: m,
79
+ themeTokens: c,
80
+ setThemeTokens: i,
81
+ setThemeColor: u,
82
+ resetThemeTokens: h
78
83
  },
79
84
  children: e
80
85
  }
81
86
  );
82
87
  }
83
88
  function Qr() {
84
- return Ue(Lt);
89
+ return Ue(Pt);
85
90
  }
86
91
  const Gt = /* @__PURE__ */ new Set([
87
92
  "root",
@@ -90,7 +95,7 @@ const Gt = /* @__PURE__ */ new Set([
90
95
  "className",
91
96
  "css",
92
97
  "style"
93
- ]), Ee = {
98
+ ]), $e = {
94
99
  tw: "",
95
100
  css: {}
96
101
  }, ye = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Y = (e, o = "px") => typeof e == "number" ? `${e}${o}` : e, he = (e) => typeof e == "string" && e.startsWith("$") ? `var(--${e.slice(1)})` : e, Xt = (e) => e.includes("-") ? e.replace(/-([a-z])/g, (o, r) => r.toUpperCase()) : e, qt = (e) => /(color|background|border|fill|stroke|shadow)$/i.test(e), Jt = {
@@ -364,7 +369,7 @@ const Gt = /* @__PURE__ */ new Set([
364
369
  shown: (e) => {
365
370
  e.visibility = "visible";
366
371
  }
367
- }, Me = (e = {}) => ye(e) ? Object.entries(e).reduce((o, [r, n]) => {
372
+ }, ze = (e = {}) => ye(e) ? Object.entries(e).reduce((o, [r, n]) => {
368
373
  if (Gt.has(r))
369
374
  return o;
370
375
  const c = Jt[r];
@@ -372,20 +377,20 @@ const Gt = /* @__PURE__ */ new Set([
372
377
  return c(o, n), o;
373
378
  const l = Xt(r), a = typeof n == "string" && (n.startsWith("$") || qt(l)) ? he(n) : n;
374
379
  return o[l] = a, o;
375
- }, {}) : {}, E = (...e) => {
380
+ }, {}) : {}, I = (...e) => {
376
381
  const o = e.filter(Boolean).join(" ").trim();
377
382
  return o ? Ht(o) : "";
378
- }, Pe = (e) => {
383
+ }, Oe = (e) => {
379
384
  if (typeof e == "string")
380
385
  return { tw: e, css: {} };
381
386
  if (!ye(e))
382
- return { ...Ee };
387
+ return { ...$e };
383
388
  if (!("tw" in e || "className" in e || "css" in e || "style" in e))
384
389
  return {
385
390
  tw: "",
386
- css: Me(e)
391
+ css: ze(e)
387
392
  };
388
- const r = [e.className, e.tw].filter(Boolean).join(" "), n = ye(e.css) ? Me(e.css) : {}, c = ye(e.style) ? Me(e.style) : {};
393
+ const r = [e.className, e.tw].filter(Boolean).join(" "), n = ye(e.css) ? ze(e.css) : {}, c = ye(e.style) ? ze(e.style) : {};
389
394
  return {
390
395
  tw: r,
391
396
  css: {
@@ -396,23 +401,23 @@ const Gt = /* @__PURE__ */ new Set([
396
401
  }, Qt = (e, o) => ye(e) ? "root" in e || "slots" in e || "tw" in e || "className" in e || "css" in e || "style" in e ? !0 : o.some((r) => r !== "root" && r in e) : !1, eo = (e) => {
397
402
  const o = {};
398
403
  return e.forEach((r) => {
399
- o[r] = { ...Ee };
400
- }), o.root || (o.root = { ...Ee }), o;
401
- }, W = (e, o = ["root"]) => {
404
+ o[r] = { ...$e };
405
+ }), o.root || (o.root = { ...$e }), o;
406
+ }, H = (e, o = ["root"]) => {
402
407
  const r = eo(o);
403
408
  if (typeof e == "string")
404
409
  return r.root.tw = e, r;
405
410
  if (!ye(e))
406
411
  return r;
407
412
  if (!Qt(e, o))
408
- return r.root.css = Me(e), r;
409
- const n = Pe({
413
+ return r.root.css = ze(e), r;
414
+ const n = Oe({
410
415
  tw: [e.className, e.tw].filter(Boolean).join(" "),
411
416
  css: e.css,
412
417
  style: e.style
413
- }), c = Pe(e.root);
418
+ }), c = Oe(e.root);
414
419
  r.root = {
415
- tw: E(n.tw, c.tw),
420
+ tw: I(n.tw, c.tw),
416
421
  css: {
417
422
  ...n.css,
418
423
  ...c.css
@@ -422,9 +427,9 @@ const Gt = /* @__PURE__ */ new Set([
422
427
  return Object.keys(r).forEach((a) => {
423
428
  if (a === "root")
424
429
  return;
425
- const i = Pe(e[a]), u = Pe(l[a]);
430
+ const i = Oe(e[a]), u = Oe(l[a]);
426
431
  r[a] = {
427
- tw: E(i.tw, u.tw),
432
+ tw: I(i.tw, u.tw),
428
433
  css: {
429
434
  ...i.css,
430
435
  ...u.css
@@ -436,19 +441,19 @@ const Gt = /* @__PURE__ */ new Set([
436
441
  className: o = "",
437
442
  baseStyle: r = {},
438
443
  style: n = {},
439
- sxSlot: c = Ee
444
+ sxSlot: c = $e
440
445
  } = {}) => ({
441
- className: E(e, o, c.tw),
446
+ className: I(e, o, c.tw),
442
447
  style: {
443
448
  ...r || {},
444
449
  ...c.css || {},
445
450
  ...n || {}
446
451
  }
447
- }), to = ["root", "icon", "content"], rt = {
452
+ }), to = ["root", "icon", "content"], st = {
448
453
  success: "text-[var(--notice-success-text)]",
449
454
  fail: "text-[var(--notice-fail-text)]",
450
455
  caution: "text-[var(--notice-caution-text)]"
451
- }, st = {
456
+ }, at = {
452
457
  default: {
453
458
  base: "fixed top-5 left-1/2 -translate-x-1/2",
454
459
  enter: "animate-[noticeSlideDown_0.3s_cubic-bezier(0.22,1,0.36,1)_forwards]"
@@ -468,47 +473,47 @@ function oo(e, o) {
468
473
  onClose: i,
469
474
  sx: u = {},
470
475
  style: h = {},
471
- className: d = "",
472
- ...p
473
- } = e, [f, w] = Z(!1), P = rt[r] ? r : "success", O = st[l] ? l : "default", D = W(u, to), S = oe(() => {
474
- w(!0);
475
- const z = setTimeout(() => i == null ? void 0 : i(), 300);
476
- return () => clearTimeout(z);
476
+ className: m = "",
477
+ ...d
478
+ } = e, [g, v] = Z(!1), w = st[r] ? r : "success", C = at[l] ? l : "default", F = H(u, to), O = oe(() => {
479
+ v(!0);
480
+ const _ = setTimeout(() => i == null ? void 0 : i(), 300);
481
+ return () => clearTimeout(_);
477
482
  }, [i]);
478
- ae(() => {
483
+ se(() => {
479
484
  if (!i || a <= 0) return;
480
- const z = setTimeout(S, a);
481
- return () => clearTimeout(z);
482
- }, [i, a, S]);
483
- const v = st[O], x = O === "default" ? "animate-[noticeSlideUpFade_0.3s_ease-in_forwards]" : "animate-[noticeSlideToBottom_0.3s_ease-in_forwards]", C = b({
484
- baseClassName: E(
485
+ const _ = setTimeout(O, a);
486
+ return () => clearTimeout(_);
487
+ }, [i, a, O]);
488
+ const y = at[C], x = C === "default" ? "animate-[noticeSlideUpFade_0.3s_ease-in_forwards]" : "animate-[noticeSlideToBottom_0.3s_ease-in_forwards]", T = b({
489
+ baseClassName: I(
485
490
  "inline-flex items-center gap-2 px-3 py-2 text-sm z-[999]",
486
491
  "rounded-[var(--notice-radius)]",
487
492
  "bg-[var(--notice-bg)] text-[var(--notice-foreground)]",
488
493
  "shadow-[var(--notice-shadow)]",
489
- v.base,
490
- f ? x : v.enter,
491
- O === "md" && rt[P]
494
+ y.base,
495
+ g ? x : y.enter,
496
+ C === "md" && st[w]
492
497
  ),
493
- className: d,
494
- sxSlot: D.root,
498
+ className: m,
499
+ sxSlot: F.root,
495
500
  baseStyle: { borderRadius: "var(--notice-radius)" },
496
501
  style: h
497
- }), m = b({
502
+ }), p = b({
498
503
  baseClassName: "flex-shrink-0 text-[var(--notice-foreground)]",
499
- sxSlot: D.icon
500
- }), y = b({
504
+ sxSlot: F.icon
505
+ }), S = b({
501
506
  baseClassName: "inline-block",
502
- sxSlot: D.content
507
+ sxSlot: F.content
503
508
  });
504
- return /* @__PURE__ */ L("div", { ref: o, role: "alert", className: C.className, style: C.style, ...p, children: [
505
- O !== "md" && n && /* @__PURE__ */ s("span", { className: m.className, style: m.style, children: n }),
506
- /* @__PURE__ */ s("span", { className: y.className, style: y.style, children: c })
509
+ return /* @__PURE__ */ P("div", { ref: o, role: "alert", className: T.className, style: T.style, ...d, children: [
510
+ C !== "md" && n && /* @__PURE__ */ s("span", { className: p.className, style: p.style, children: n }),
511
+ /* @__PURE__ */ s("span", { className: S.className, style: S.style, children: c })
507
512
  ] });
508
513
  }
509
- const We = kt(oo);
510
- We.displayName = "Notice";
511
- We.propTypes = {
514
+ const Ze = Lt(oo);
515
+ Ze.displayName = "Notice";
516
+ Ze.propTypes = {
512
517
  type: t.oneOf(["success", "fail", "caution"]),
513
518
  icon: t.node,
514
519
  message: t.node,
@@ -519,7 +524,7 @@ We.propTypes = {
519
524
  style: t.object,
520
525
  className: t.string
521
526
  };
522
- const Ot = He(null), ro = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: /* @__PURE__ */ s(
527
+ const _t = He(null), ro = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: /* @__PURE__ */ s(
523
528
  "path",
524
529
  {
525
530
  d: "M874.119618 149.859922A510.816461 510.816461 0 0 0 511.997 0.00208a509.910462 509.910462 0 0 0-362.119618 149.857842c-199.817789 199.679789-199.817789 524.581447 0 724.260236a509.969462 509.969462 0 0 0 362.119618 149.857842A508.872463 508.872463 0 0 0 874.119618 874.120158c199.836789-199.679789 199.836789-524.581447 0-724.260236zM814.94268 378.210681L470.999043 744.132295a15.359984 15.359984 0 0 1-5.887994 4.095996c-1.751998 1.180999-2.913997 2.362998-5.276994 2.913997a34.499964 34.499964 0 0 1-13.469986 2.914997 45.547952 45.547952 0 0 1-12.897986-2.303998l-4.095996-2.363997a45.291952 45.291952 0 0 1-7.009992-4.095996l-196.902793-193.789796a34.126964 34.126964 0 0 1-10.555989-25.186973c0-9.37399 3.583996-18.74698 9.98399-25.186974a36.429962 36.429962 0 0 1 50.372947 0l169.98382 167.423824L763.389735 330.220732a37.059961 37.059961 0 0 1 50.371947-1.732998 33.647965 33.647965 0 0 1 11.165988 25.186973 35.544963 35.544963 0 0 1-9.98399 24.575974v-0.04z m0 0",
@@ -531,7 +536,7 @@ const Ot = He(null), ro = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", w
531
536
  d: "M549.044706 512l166.189176-166.249412a26.383059 26.383059 0 0 0 0-36.98447 26.383059 26.383059 0 0 0-37.044706 0L512 475.015529l-166.249412-166.249411a26.383059 26.383059 0 0 0-36.98447 0 26.383059 26.383059 0 0 0 0 37.044706L475.015529 512l-166.249411 166.249412a26.383059 26.383059 0 0 0 0 36.98447 26.383059 26.383059 0 0 0 37.044706 0L512 548.984471l166.249412 166.249411a26.383059 26.383059 0 0 0 36.98447 0 26.383059 26.383059 0 0 0 0-37.044706L548.984471 512zM512 1024a512 512 0 1 1 0-1024 512 512 0 0 1 0 1024z",
532
537
  fill: "var(--notice-fail-text)"
533
538
  }
534
- ) }), ao = /* @__PURE__ */ L("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: [
539
+ ) }), ao = /* @__PURE__ */ P("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: [
535
540
  /* @__PURE__ */ s(
536
541
  "path",
537
542
  {
@@ -556,28 +561,28 @@ const Ot = He(null), ro = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", w
556
561
  ] }), no = { success: ro, fail: so, caution: ao };
557
562
  function es({ children: e }) {
558
563
  const [o, r] = Z([]), [n, c] = Z(!1);
559
- ae(() => {
564
+ se(() => {
560
565
  c(!0);
561
566
  }, []);
562
567
  const l = oe((i) => {
563
568
  r((u) => u.filter((h) => h.id !== i));
564
569
  }, []), a = oe((i, u, h = "default") => {
565
- const d = Date.now() + Math.random();
566
- r((p) => [
567
- ...p,
568
- { id: d, type: i, message: u, variant: h, icon: no[i] }
570
+ const m = Date.now() + Math.random();
571
+ r((d) => [
572
+ ...d,
573
+ { id: m, type: i, message: u, variant: h, icon: no[i] }
569
574
  ]);
570
575
  }, []);
571
- return /* @__PURE__ */ L(Ot.Provider, { value: { add: a, remove: l }, children: [
576
+ return /* @__PURE__ */ P(_t.Provider, { value: { add: a, remove: l }, children: [
572
577
  e,
573
578
  n && Ut(
574
- /* @__PURE__ */ s("div", { id: "notification-container", className: "flex flex-col items-center gap-2", children: o.map((i) => /* @__PURE__ */ s(We, { ...i, onClose: () => l(i.id) }, i.id)) }),
579
+ /* @__PURE__ */ s("div", { id: "notification-container", className: "flex flex-col items-center gap-2", children: o.map((i) => /* @__PURE__ */ s(Ze, { ...i, onClose: () => l(i.id) }, i.id)) }),
575
580
  document.body
576
581
  )
577
582
  ] });
578
583
  }
579
584
  function lo() {
580
- const e = Ue(Ot);
585
+ const e = Ue(_t);
581
586
  if (!e)
582
587
  throw new Error("useNotice must be used inside <NoticeProvider />");
583
588
  return e;
@@ -595,7 +600,7 @@ function ts() {
595
600
  }
596
601
  };
597
602
  }
598
- const _t = "tango:locale", xe = "zh-CN", co = {
603
+ const At = "tango:locale", xe = "zh-CN", co = {
599
604
  zh: "zh-CN",
600
605
  ZH: "zh-CN",
601
606
  "zh-CN": "zh-CN",
@@ -608,7 +613,7 @@ const _t = "tango:locale", xe = "zh-CN", co = {
608
613
  "en-us": "en-US",
609
614
  us: "en-US",
610
615
  US: "en-US"
611
- }, At = {
616
+ }, Mt = {
612
617
  "zh-CN": {
613
618
  button: {
614
619
  default: "按钮",
@@ -775,27 +780,27 @@ const _t = "tango:locale", xe = "zh-CN", co = {
775
780
  perPage: "/ page"
776
781
  }
777
782
  }
778
- }, Ke = () => {
779
- }, Mt = He({
783
+ }, We = () => {
784
+ }, zt = He({
780
785
  locale: xe,
781
- setLocale: Ke,
782
- toggleLocale: Ke,
783
- messages: At,
786
+ setLocale: We,
787
+ toggleLocale: We,
788
+ messages: Mt,
784
789
  t: (e, o = "") => o
785
- }), at = (e) => typeof e == "object" && e !== null && !Array.isArray(e), zt = (e, o) => {
790
+ }), nt = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Et = (e, o) => {
786
791
  const r = { ...e };
787
792
  return Object.entries(o || {}).forEach(([n, c]) => {
788
- at(c) && at(r[n]) ? r[n] = zt(r[n], c) : r[n] = c;
793
+ nt(c) && nt(r[n]) ? r[n] = Et(r[n], c) : r[n] = c;
789
794
  }), r;
790
795
  }, io = (e, o) => o.split(".").reduce((r, n) => {
791
796
  if (r && Object.prototype.hasOwnProperty.call(r, n))
792
797
  return r[n];
793
- }, e), ze = (e) => typeof e != "string" || !e.trim() ? xe : co[e] || e, uo = () => {
798
+ }, e), Ee = (e) => typeof e != "string" || !e.trim() ? xe : co[e] || e, uo = () => {
794
799
  if (typeof window > "u")
795
800
  return xe;
796
801
  try {
797
- const e = window.localStorage.getItem(_t);
798
- return ze(e || xe);
802
+ const e = window.localStorage.getItem(At);
803
+ return Ee(e || xe);
799
804
  } catch {
800
805
  return xe;
801
806
  }
@@ -804,49 +809,49 @@ function os({
804
809
  children: e,
805
810
  locale: o,
806
811
  defaultLocale: r = xe,
807
- onLocaleChange: n = Ke,
812
+ onLocaleChange: n = We,
808
813
  messages: c = {}
809
814
  }) {
810
- const l = ze(r), a = o == null ? null : ze(o), [i, u] = Z(
815
+ const l = Ee(r), a = o == null ? null : Ee(o), [i, u] = Z(
811
816
  () => uo() || l
812
- ), h = a || i, d = (P) => {
813
- const O = ze(P);
814
- a == null && u(O), n(O);
817
+ ), h = a || i, m = (w) => {
818
+ const C = Ee(w);
819
+ a == null && u(C), n(C);
815
820
  };
816
- ae(() => {
821
+ se(() => {
817
822
  if (!(typeof window > "u"))
818
823
  try {
819
- window.localStorage.setItem(_t, h);
824
+ window.localStorage.setItem(At, h);
820
825
  } catch {
821
826
  }
822
827
  }, [h]);
823
- const p = Se(
824
- () => zt(At, c),
828
+ const d = Se(
829
+ () => Et(Mt, c),
825
830
  [c]
826
- ), f = () => {
827
- d(h === "zh-CN" ? "en-US" : "zh-CN");
828
- }, w = (P, O = "") => {
829
- const D = p[h] || p[xe] || {}, S = io(D, P);
830
- return S == null || S === "" ? O : String(S);
831
+ ), g = () => {
832
+ m(h === "zh-CN" ? "en-US" : "zh-CN");
833
+ }, v = (w, C = "") => {
834
+ const F = d[h] || d[xe] || {}, O = io(F, w);
835
+ return O == null || O === "" ? C : String(O);
831
836
  };
832
837
  return /* @__PURE__ */ s(
833
- Mt.Provider,
838
+ zt.Provider,
834
839
  {
835
840
  value: {
836
841
  locale: h,
837
- setLocale: d,
838
- toggleLocale: f,
839
- messages: p,
840
- t: w
842
+ setLocale: m,
843
+ toggleLocale: g,
844
+ messages: d,
845
+ t: v
841
846
  },
842
847
  children: e
843
848
  }
844
849
  );
845
850
  }
846
851
  function de() {
847
- return Ue(Mt);
852
+ return Ue(zt);
848
853
  }
849
- const po = "_materialBtn_wlueu_4", mo = "_materialBtnSmall_wlueu_26", bo = "_materialBtnMedium_wlueu_32", go = "_materialBtnLarge_wlueu_38", fo = "_materialBtnHuge_wlueu_44", ho = "_materialBtnDisabled_wlueu_51", yo = "_ripple_wlueu_59", Ce = {
854
+ const po = "_materialBtn_y97j8_8", mo = "_materialBtnSmall_y97j8_27", bo = "_materialBtnMedium_y97j8_33", go = "_materialBtnLarge_y97j8_39", fo = "_materialBtnHuge_y97j8_45", ho = "_materialBtnDisabled_y97j8_52", yo = "_ripple_y97j8_60", Ce = {
850
855
  materialBtn: po,
851
856
  materialBtnSmall: mo,
852
857
  materialBtnMedium: bo,
@@ -854,59 +859,77 @@ const po = "_materialBtn_wlueu_4", mo = "_materialBtnSmall_wlueu_26", bo = "_mat
854
859
  materialBtnHuge: fo,
855
860
  materialBtnDisabled: ho,
856
861
  ripple: yo
857
- }, nt = ["root", "content", "icon", "loading"], xo = { small: "small", medium: "medium", large: "large", huge: "huge" }, vo = { small: 12, medium: 14, large: 16, huge: 20 }, lt = {
862
+ }, lt = ["root", "content", "icon", "loading"], xo = { small: "small", medium: "medium", large: "large", huge: "huge" }, vo = { small: 12, medium: 14, large: 16, huge: 20 }, ct = {
858
863
  default: {
859
864
  backgroundColor: "var(--primary)",
860
865
  color: "var(--primary-foreground)",
861
- borderColor: "var(--border)"
866
+ borderColor: "var(--border)",
867
+ borderWidth: "1px",
868
+ borderStyle: "solid"
862
869
  },
863
870
  transparent: {
864
871
  backgroundColor: "var(--transparent)",
865
872
  color: "var(--primary-foreground)",
866
- borderColor: "var(--button-transparent-border)"
873
+ borderColor: "var(--button-transparent-border)",
874
+ borderWidth: "1px",
875
+ borderStyle: "solid"
867
876
  },
868
877
  danger: {
869
878
  backgroundColor: "var(--destructive)",
870
879
  color: "var(--destructive-foreground)",
871
- borderColor: "transparent"
880
+ borderColor: "transparent",
881
+ borderWidth: "1px",
882
+ borderStyle: "solid"
872
883
  },
873
884
  success: {
874
885
  backgroundColor: "var(--success)",
875
886
  color: "var(--success-foreground)",
876
- borderColor: "transparent"
887
+ borderColor: "transparent",
888
+ borderWidth: "1px",
889
+ borderStyle: "solid"
877
890
  }
878
891
  }, So = {
879
892
  default: {
880
893
  backgroundColor: "var(--transparent)",
881
894
  color: "var(--button-outline-foreground)",
882
- borderColor: "var(--border)"
895
+ borderColor: "var(--border)",
896
+ borderWidth: "1px",
897
+ borderStyle: "solid"
883
898
  },
884
899
  transparent: {
885
900
  backgroundColor: "var(--transparent)",
886
901
  color: "var(--button-outline-foreground)",
887
- borderColor: "var(--button-transparent-border)"
902
+ borderColor: "var(--button-transparent-border)",
903
+ borderWidth: "1px",
904
+ borderStyle: "solid"
888
905
  },
889
906
  danger: {
890
907
  backgroundColor: "var(--transparent)",
891
908
  color: "var(--destructive)",
892
- borderColor: "var(--destructive)"
909
+ borderColor: "var(--destructive)",
910
+ borderWidth: "1px",
911
+ borderStyle: "solid"
893
912
  },
894
913
  success: {
895
914
  backgroundColor: "var(--transparent)",
896
915
  color: "var(--success)",
897
- borderColor: "var(--success)"
916
+ borderColor: "var(--success)",
917
+ borderWidth: "1px",
918
+ borderStyle: "solid"
898
919
  }
899
920
  }, No = {
900
921
  backgroundColor: "var(--muted)",
901
922
  color: "var(--muted-foreground)",
902
923
  borderColor: "transparent",
924
+ borderWidth: "1px",
925
+ borderStyle: "solid",
903
926
  cursor: "not-allowed"
904
- }, De = {
927
+ }, Re = {
905
928
  default: "按钮",
906
929
  loading: "加载中",
907
930
  iconAlt: "图标"
908
- }, wo = (e) => e.charAt(0).toUpperCase() + e.slice(1), Co = (e) => e === !0 || e === "light" || e === "dark" ? !0 : Array.isArray(e) && e.length > 0 ? e[0] === !0 || e[0] === "light" || e[0] === "dark" : !1, To = (e) => e === "light" ? "light" : e === "dark" || e === !0 || Array.isArray(e) && e.length >= 2 && e[1] === "dark" ? "dark" : "light", ct = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
909
- function Ze(e) {
931
+ }, wo = (e) => e.charAt(0).toUpperCase() + e.slice(1), Co = (e) => e === !0 || e === "light" || e === "dark" ? !0 : Array.isArray(e) && e.length > 0 ? e[0] === !0 || e[0] === "light" || e[0] === "dark" : !1, To = (e) => e === "light" ? "light" : e === "dark" || e === !0 || Array.isArray(e) && e.length >= 2 && e[1] === "dark" ? "dark" : "light", it = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
932
+ function Ge(e) {
910
933
  const {
911
934
  type: o = "default",
912
935
  size: r = "medium",
@@ -918,83 +941,83 @@ function Ze(e) {
918
941
  children: i,
919
942
  disabled: u = !1,
920
943
  outline: h = !1,
921
- icon: d = null,
922
- iconPosition: p = null,
923
- loading: f = !1,
924
- i18nKey: w = null,
925
- localeText: P = {},
926
- rippleColor: O,
927
- "aria-label": D,
928
- ...S
929
- } = e, { t: v } = de(), x = $e(null), C = ct(r, "medium", xo), m = ct(o, "default", lt), y = Co(f), z = To(f), A = u || y, $ = vo[C], _ = p === "right" ? "right" : d || y ? "left" : null, T = O ?? "var(--material-button-ripple)", N = {
930
- default: v("materialButton.default", De.default),
931
- loading: v("materialButton.loading", De.loading),
932
- iconAlt: v("materialButton.iconAlt", De.iconAlt),
933
- ...P
934
- }, U = (w && typeof N[w] == "string" ? N[w] : null) || (w ? v(`materialButton.${w}`, N.default) : N.default), j = y ? N.loading : U, B = i ?? j, M = D || (i == null ? String(B || N.default) : void 0), F = W(n, nt), H = A ? No : h ? So[m] : lt[m], K = Ce[`materialBtn${wo(C)}`], G = F.root.css || {}, R = typeof n == "string" ? n : "", Q = /* @__PURE__ */ new Set([...nt, "root", "slots", "tw", "className", "css", "style"]), ue = typeof n == "object" ? Object.fromEntries(Object.entries(n).filter(([re]) => !Q.has(re))) : {}, be = [
944
+ icon: m = null,
945
+ iconPosition: d = null,
946
+ loading: g = !1,
947
+ i18nKey: v = null,
948
+ localeText: w = {},
949
+ rippleColor: C,
950
+ "aria-label": F,
951
+ ...O
952
+ } = e, { t: y } = de(), x = ke(null), T = it(r, "medium", xo), p = it(o, "default", ct), S = Co(g), _ = To(g), M = u || S, B = vo[T], A = d === "right" ? "right" : m || S ? "left" : null, k = C ?? "var(--material-button-ripple)", N = {
953
+ default: y("materialButton.default", Re.default),
954
+ loading: y("materialButton.loading", Re.loading),
955
+ iconAlt: y("materialButton.iconAlt", Re.iconAlt),
956
+ ...w
957
+ }, W = (v && typeof N[v] == "string" ? N[v] : null) || (v ? y(`materialButton.${v}`, N.default) : N.default), D = S ? N.loading : W, E = i ?? D, $ = F || (i == null ? String(E || N.default) : void 0), z = H(n, lt), U = M ? No : h ? So[p] : ct[p], K = Ce[`materialBtn${wo(T)}`], G = z.root.css || {}, R = typeof n == "string" ? n : "", Q = /* @__PURE__ */ new Set([...lt, "root", "slots", "tw", "className", "css", "style"]), ue = typeof n == "object" ? Object.fromEntries(Object.entries(n).filter(([re]) => !Q.has(re))) : {}, be = [
935
958
  Ce.materialBtn,
936
959
  K,
937
- A && Ce.materialBtnDisabled,
938
- F.root.tw,
960
+ M && Ce.materialBtnDisabled,
961
+ z.root.tw,
939
962
  R,
940
963
  l
941
964
  ].filter(Boolean).join(" "), ge = {
942
- ...H,
965
+ ...U,
943
966
  ...ue,
944
967
  ...G,
945
968
  ...c
946
969
  }, fe = b({
947
970
  baseClassName: "inline-flex items-center relative z-[1]",
948
- sxSlot: F.content
971
+ sxSlot: z.content
949
972
  }), X = b({
950
973
  baseClassName: "inline-flex items-center justify-center shrink-0 transition-all duration-300 relative z-[1]",
951
- baseStyle: { width: `${$}px`, height: `${$}px` },
952
- sxSlot: F.icon
974
+ baseStyle: { width: `${B}px`, height: `${B}px` },
975
+ sxSlot: z.icon
953
976
  }), J = b({
954
977
  baseClassName: "inline-flex items-center justify-center shrink-0 animate-spin relative z-[1]",
955
978
  baseStyle: {
956
- width: `${$}px`,
957
- height: `${$}px`,
958
- color: z === "light" ? "var(--button-loading-light)" : "var(--button-loading-dark)"
979
+ width: `${B}px`,
980
+ height: `${B}px`,
981
+ color: _ === "light" ? "var(--button-loading-light)" : "var(--button-loading-dark)"
959
982
  },
960
- sxSlot: F.loading
961
- }), I = oe(
983
+ sxSlot: z.loading
984
+ }), j = oe(
962
985
  (re) => {
963
- if (A) return;
964
- const se = x.current;
965
- if (!se) return;
966
- const g = document.createElement("span"), V = Math.max(se.clientWidth, se.clientHeight), ee = V / 2;
967
- Object.assign(g.style, {
986
+ if (M) return;
987
+ const ae = x.current;
988
+ if (!ae) return;
989
+ const f = document.createElement("span"), V = Math.max(ae.clientWidth, ae.clientHeight), ee = V / 2;
990
+ Object.assign(f.style, {
968
991
  width: `${V}px`,
969
992
  height: `${V}px`,
970
- left: `${re.clientX - se.getBoundingClientRect().left - ee}px`,
971
- top: `${re.clientY - se.getBoundingClientRect().top - ee}px`
972
- }), g.className = Ce.ripple, g.style.background = T;
973
- const ce = se.querySelector(`.${Ce.ripple}`);
974
- ce && ce.remove(), se.appendChild(g);
993
+ left: `${re.clientX - ae.getBoundingClientRect().left - ee}px`,
994
+ top: `${re.clientY - ae.getBoundingClientRect().top - ee}px`
995
+ }), f.className = Ce.ripple, f.style.background = k;
996
+ const ce = ae.querySelector(`.${Ce.ripple}`);
997
+ ce && ce.remove(), ae.appendChild(f);
975
998
  },
976
- [A, T]
977
- ), q = () => d ? typeof d == "string" ? /* @__PURE__ */ s(
999
+ [M, k]
1000
+ ), q = () => m ? typeof m == "string" ? /* @__PURE__ */ s(
978
1001
  "img",
979
1002
  {
980
- src: d,
1003
+ src: m,
981
1004
  alt: N.iconAlt,
982
1005
  className: X.className,
983
1006
  style: X.style,
984
1007
  "aria-hidden": "true"
985
1008
  }
986
- ) : te.isValidElement(d) ? te.cloneElement(d, {
987
- className: E(X.className, d.props.className),
988
- style: { ...X.style, ...d.props.style },
1009
+ ) : te.isValidElement(m) ? te.cloneElement(m, {
1010
+ className: I(X.className, m.props.className),
1011
+ style: { ...X.style, ...m.props.style },
989
1012
  "aria-hidden": !0
990
- }) : typeof d == "function" ? /* @__PURE__ */ s(
991
- d,
1013
+ }) : typeof m == "function" ? /* @__PURE__ */ s(
1014
+ m,
992
1015
  {
993
1016
  className: X.className,
994
1017
  style: X.style,
995
1018
  "aria-hidden": "true"
996
1019
  }
997
- ) : /* @__PURE__ */ s("span", { className: X.className, style: X.style, "aria-hidden": "true", children: d }) : null, le = () => /* @__PURE__ */ s(
1020
+ ) : /* @__PURE__ */ s("span", { className: X.className, style: X.style, "aria-hidden": "true", children: m }) : null, le = () => /* @__PURE__ */ s(
998
1021
  "svg",
999
1022
  {
1000
1023
  viewBox: "0 0 1024 1024",
@@ -1011,36 +1034,36 @@ function Ze(e) {
1011
1034
  )
1012
1035
  }
1013
1036
  );
1014
- return /* @__PURE__ */ L(
1037
+ return /* @__PURE__ */ P(
1015
1038
  "button",
1016
1039
  {
1017
1040
  ref: x,
1018
1041
  className: be,
1019
1042
  style: ge,
1020
1043
  onClick: (re) => {
1021
- I(re), a == null || a(re);
1044
+ j(re), a == null || a(re);
1022
1045
  },
1023
- disabled: A,
1024
- "aria-label": M,
1025
- "data-variant": m,
1026
- "data-size": C,
1027
- "data-icon-position": _ || void 0,
1028
- ...S,
1046
+ disabled: M,
1047
+ "aria-label": $,
1048
+ "data-variant": p,
1049
+ "data-size": T,
1050
+ "data-icon-position": A || void 0,
1051
+ ...O,
1029
1052
  children: [
1030
- _ === "left" && /* @__PURE__ */ L(Ne, { children: [
1031
- y && le(),
1032
- !y && d && q()
1053
+ A === "left" && /* @__PURE__ */ P(Ne, { children: [
1054
+ S && le(),
1055
+ !S && m && q()
1033
1056
  ] }),
1034
- /* @__PURE__ */ s("span", { className: fe.className, style: fe.style, children: B }),
1035
- _ === "right" && /* @__PURE__ */ L(Ne, { children: [
1036
- y && le(),
1037
- !y && d && q()
1057
+ /* @__PURE__ */ s("span", { className: fe.className, style: fe.style, children: E }),
1058
+ A === "right" && /* @__PURE__ */ P(Ne, { children: [
1059
+ S && le(),
1060
+ !S && m && q()
1038
1061
  ] })
1039
1062
  ]
1040
1063
  }
1041
1064
  );
1042
1065
  }
1043
- Ze.propTypes = {
1066
+ Ge.propTypes = {
1044
1067
  type: t.oneOf(["default", "transparent", "danger", "success"]),
1045
1068
  size: t.oneOf(["small", "medium", "large", "huge"]),
1046
1069
  sx: t.oneOfType([t.object, t.string]),
@@ -1065,11 +1088,11 @@ Ze.propTypes = {
1065
1088
  localeText: t.object,
1066
1089
  rippleColor: t.string
1067
1090
  };
1068
- const ko = ["root", "content", "icon", "loading"], Re = {
1091
+ const ko = ["root", "content", "icon", "loading"], Ve = {
1069
1092
  default: "按钮",
1070
1093
  loading: "加载中",
1071
1094
  iconAlt: "图标"
1072
- }, Lo = "inline-flex select-none items-center justify-center whitespace-nowrap rounded-[var(--radius)] border align-middle font-medium tracking-[0.5px] transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--input-accent)] focus-visible:ring-offset-2", Ve = {
1095
+ }, Lo = "inline-flex select-none items-center justify-center whitespace-nowrap rounded-[var(--radius)] border align-middle font-medium tracking-[0.5px] transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--input-accent)] focus-visible:ring-offset-2", Ye = {
1073
1096
  small: {
1074
1097
  iconSize: 12,
1075
1098
  className: "text-xs px-2 py-1 gap-1"
@@ -1086,7 +1109,7 @@ const ko = ["root", "content", "icon", "loading"], Re = {
1086
1109
  iconSize: 20,
1087
1110
  className: "text-[25px] px-[45px] py-[18px] gap-3"
1088
1111
  }
1089
- }, it = {
1112
+ }, dt = {
1090
1113
  default: "bg-[var(--primary)] text-[var(--primary-foreground)] border-[var(--border)] hover:shadow-[0_0_0.4em_0_var(--button-shadow-default)]",
1091
1114
  transparent: "bg-[var(--transparent)] text-[var(--primary-foreground)] border-[var(--button-transparent-border)] hover:shadow-[0_0_0.4em_0_var(--button-shadow-default)]",
1092
1115
  danger: "bg-[var(--destructive)] text-[var(--destructive-foreground)] border-transparent hover:shadow-[0_0_0.4em_0_var(--destructive)]",
@@ -1101,7 +1124,7 @@ const ko = ["root", "content", "icon", "loading"], Re = {
1101
1124
  transparent: "bg-[var(--transparent)] text-[var(--button-enu-fg)] border-[var(--button-transparent-border)]",
1102
1125
  danger: "bg-[var(--destructive)] text-[var(--destructive-foreground)] border-transparent",
1103
1126
  success: "bg-[var(--success)] text-[var(--success-foreground)] border-transparent"
1104
- }, Mo = "bg-[var(--muted)] text-[var(--muted-foreground)] border-transparent cursor-not-allowed shadow-none hover:shadow-none", zo = (e) => e === !0 || e === "light" || e === "dark" ? !0 : Array.isArray(e) && e.length > 0 ? e[0] === !0 || e[0] === "light" || e[0] === "dark" : !1, Eo = (e) => e === "light" ? "light" : e === "dark" || e === !0 || Array.isArray(e) && e.length >= 2 && e[1] === "dark" ? "dark" : "light", dt = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
1127
+ }, Mo = "bg-[var(--muted)] text-[var(--muted-foreground)] border-transparent cursor-not-allowed shadow-none hover:shadow-none", zo = (e) => e === !0 || e === "light" || e === "dark" ? !0 : Array.isArray(e) && e.length > 0 ? e[0] === !0 || e[0] === "light" || e[0] === "dark" : !1, Eo = (e) => e === "light" ? "light" : e === "dark" || e === !0 || Array.isArray(e) && e.length >= 2 && e[1] === "dark" ? "dark" : "light", ut = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
1105
1128
  function ie(e) {
1106
1129
  const {
1107
1130
  type: o = "default",
@@ -1114,84 +1137,84 @@ function ie(e) {
1114
1137
  children: i,
1115
1138
  disabled: u = !1,
1116
1139
  outline: h = !1,
1117
- enu: d = !1,
1118
- icon: p = null,
1119
- iconPosition: f = null,
1120
- loading: w = !1,
1121
- i18nKey: P = null,
1122
- localeText: O = {},
1123
- "aria-label": D,
1124
- ...S
1125
- } = e, { t: v } = de(), x = dt(r, "medium", Ve), C = dt(o, "default", it), m = zo(w), y = Eo(w), z = u || m, A = Ve[x].iconSize, $ = f === "right" ? "right" : p || m ? "left" : null, _ = W(n, ko), T = {
1126
- default: v("button.default", Re.default),
1127
- loading: v("button.loading", Re.loading),
1128
- iconAlt: v("button.iconAlt", Re.iconAlt),
1140
+ enu: m = !1,
1141
+ icon: d = null,
1142
+ iconPosition: g = null,
1143
+ loading: v = !1,
1144
+ i18nKey: w = null,
1145
+ localeText: C = {},
1146
+ "aria-label": F,
1129
1147
  ...O
1130
- }, k = (P && typeof T[P] == "string" ? T[P] : null) || (P ? v(`button.${P}`, T.default) : T.default), U = m ? T.loading : k, j = i ?? U, B = D || (i == null ? String(j || T.default) : void 0);
1131
- let M = it[C];
1132
- h && (M = E(
1133
- M,
1148
+ } = e, { t: y } = de(), x = ut(r, "medium", Ye), T = ut(o, "default", dt), p = zo(v), S = Eo(v), _ = u || p, M = Ye[x].iconSize, B = g === "right" ? "right" : d || p ? "left" : null, A = H(n, ko), k = {
1149
+ default: y("button.default", Ve.default),
1150
+ loading: y("button.loading", Ve.loading),
1151
+ iconAlt: y("button.iconAlt", Ve.iconAlt),
1152
+ ...C
1153
+ }, L = (w && typeof k[w] == "string" ? k[w] : null) || (w ? y(`button.${w}`, k.default) : k.default), W = p ? k.loading : L, D = i ?? W, E = F || (i == null ? String(D || k.default) : void 0);
1154
+ let $ = dt[T];
1155
+ h && ($ = I(
1156
+ $,
1134
1157
  Po,
1135
- Oo[C]
1136
- )), d && (M = E(
1137
- M,
1158
+ Oo[T]
1159
+ )), m && ($ = I(
1160
+ $,
1138
1161
  _o,
1139
- Ao[C]
1162
+ Ao[T]
1140
1163
  ));
1141
- const F = b({
1164
+ const z = b({
1142
1165
  // 顺序固定为:baseTw -> className -> sx.tw,sx 能稳定覆盖普通 Tailwind。
1143
- baseClassName: E(
1166
+ baseClassName: I(
1144
1167
  Lo,
1145
- Ve[x].className,
1146
- M,
1147
- z && Mo,
1148
- m && "cursor-wait"
1168
+ Ye[x].className,
1169
+ $,
1170
+ _ && Mo,
1171
+ p && "cursor-wait"
1149
1172
  ),
1150
1173
  className: l,
1151
1174
  style: c,
1152
- sxSlot: _.root
1153
- }), H = b({
1175
+ sxSlot: A.root
1176
+ }), U = b({
1154
1177
  baseClassName: "inline-flex items-center",
1155
- sxSlot: _.content
1178
+ sxSlot: A.content
1156
1179
  }), K = b({
1157
1180
  baseClassName: "inline-flex items-center justify-center shrink-0 transition-all duration-300",
1158
1181
  baseStyle: {
1159
- width: `${A}px`,
1160
- height: `${A}px`
1182
+ width: `${M}px`,
1183
+ height: `${M}px`
1161
1184
  },
1162
- sxSlot: _.icon
1185
+ sxSlot: A.icon
1163
1186
  }), G = b({
1164
1187
  baseClassName: "inline-flex items-center justify-center shrink-0 animate-spin",
1165
1188
  baseStyle: {
1166
- width: `${A}px`,
1167
- height: `${A}px`,
1168
- color: y === "light" ? "var(--button-loading-light)" : "var(--button-loading-dark)"
1189
+ width: `${M}px`,
1190
+ height: `${M}px`,
1191
+ color: S === "light" ? "var(--button-loading-light)" : "var(--button-loading-dark)"
1169
1192
  },
1170
- sxSlot: _.loading
1171
- }), R = () => p ? typeof p == "string" ? /* @__PURE__ */ s(
1193
+ sxSlot: A.loading
1194
+ }), R = () => d ? typeof d == "string" ? /* @__PURE__ */ s(
1172
1195
  "img",
1173
1196
  {
1174
- src: p,
1175
- alt: T.iconAlt,
1197
+ src: d,
1198
+ alt: k.iconAlt,
1176
1199
  className: K.className,
1177
1200
  style: K.style,
1178
1201
  "aria-hidden": "true"
1179
1202
  }
1180
- ) : te.isValidElement(p) ? te.cloneElement(p, {
1181
- className: E(K.className, p.props.className),
1203
+ ) : te.isValidElement(d) ? te.cloneElement(d, {
1204
+ className: I(K.className, d.props.className),
1182
1205
  style: {
1183
1206
  ...K.style,
1184
- ...p.props.style
1207
+ ...d.props.style
1185
1208
  },
1186
1209
  "aria-hidden": !0
1187
- }) : typeof p == "function" ? /* @__PURE__ */ s(
1188
- p,
1210
+ }) : typeof d == "function" ? /* @__PURE__ */ s(
1211
+ d,
1189
1212
  {
1190
1213
  className: K.className,
1191
1214
  style: K.style,
1192
1215
  "aria-hidden": "true"
1193
1216
  }
1194
- ) : /* @__PURE__ */ s("span", { className: K.className, style: K.style, "aria-hidden": "true", children: p }) : null, Q = () => /* @__PURE__ */ s(
1217
+ ) : /* @__PURE__ */ s("span", { className: K.className, style: K.style, "aria-hidden": "true", children: d }) : null, Q = () => /* @__PURE__ */ s(
1195
1218
  "svg",
1196
1219
  {
1197
1220
  viewBox: "0 0 1024 1024",
@@ -1208,27 +1231,27 @@ function ie(e) {
1208
1231
  )
1209
1232
  }
1210
1233
  );
1211
- return /* @__PURE__ */ L(
1234
+ return /* @__PURE__ */ P(
1212
1235
  "button",
1213
1236
  {
1214
- className: F.className,
1215
- style: F.style,
1237
+ className: z.className,
1238
+ style: z.style,
1216
1239
  onClick: a,
1217
- disabled: z,
1218
- "aria-label": B,
1219
- "data-variant": C,
1240
+ disabled: _,
1241
+ "aria-label": E,
1242
+ "data-variant": T,
1220
1243
  "data-size": x,
1221
- "data-icon-position": $ || void 0,
1222
- ...S,
1244
+ "data-icon-position": B || void 0,
1245
+ ...O,
1223
1246
  children: [
1224
- $ === "left" && /* @__PURE__ */ L(Ne, { children: [
1225
- m && Q(),
1226
- !m && p && R()
1247
+ B === "left" && /* @__PURE__ */ P(Ne, { children: [
1248
+ p && Q(),
1249
+ !p && d && R()
1227
1250
  ] }),
1228
- /* @__PURE__ */ s("span", { className: H.className, style: H.style, children: j }),
1229
- $ === "right" && /* @__PURE__ */ L(Ne, { children: [
1230
- m && Q(),
1231
- !m && p && R()
1251
+ /* @__PURE__ */ s("span", { className: U.className, style: U.style, children: D }),
1252
+ B === "right" && /* @__PURE__ */ P(Ne, { children: [
1253
+ p && Q(),
1254
+ !p && d && R()
1232
1255
  ] })
1233
1256
  ]
1234
1257
  }
@@ -1259,7 +1282,7 @@ ie.propTypes = {
1259
1282
  i18nKey: t.string,
1260
1283
  localeText: t.object
1261
1284
  };
1262
- ie.MaterialButton = Ze;
1285
+ ie.MaterialButton = Ge;
1263
1286
  const $o = ["root", "input", "label"], Bo = {
1264
1287
  small: "small",
1265
1288
  medium: "medium",
@@ -1273,7 +1296,7 @@ const $o = ["root", "input", "label"], Bo = {
1273
1296
  }, jo = {
1274
1297
  label: ""
1275
1298
  }, Fo = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
1276
- function Ge(e) {
1299
+ function Xe(e) {
1277
1300
  const {
1278
1301
  size: o = "medium",
1279
1302
  sx: r = {},
@@ -1284,64 +1307,64 @@ function Ge(e) {
1284
1307
  defaultValue: i,
1285
1308
  disabled: u = !1,
1286
1309
  label: h,
1287
- localeText: d,
1288
- type: p = "text",
1289
- ...f
1290
- } = e, { t: w } = de(), P = Fo(o, "medium", Bo), O = a !== void 0, [D, S] = Z(i ?? ""), [v, x] = Z(!1), C = O ? a : D, m = v || String(C).length > 0, y = h ?? (d == null ? void 0 : d.label) ?? w("materialInput.label", jo.label), z = W(r, $o), A = {
1291
- tw: E(z.root.tw, z.input.tw),
1292
- css: { ...z.root.css, ...z.input.css }
1293
- }, $ = E("relative inline-flex", z.root.tw), _ = Io[P], T = E(
1310
+ localeText: m,
1311
+ type: d = "text",
1312
+ ...g
1313
+ } = e, { t: v } = de(), w = Fo(o, "medium", Bo), C = a !== void 0, [F, O] = Z(i ?? ""), [y, x] = Z(!1), T = C ? a : F, p = y || String(T).length > 0, S = h ?? (m == null ? void 0 : m.label) ?? v("materialInput.label", jo.label), _ = H(r, $o), M = {
1314
+ tw: I(_.root.tw, _.input.tw),
1315
+ css: { ..._.root.css, ..._.input.css }
1316
+ }, B = I("relative inline-flex", _.root.tw), A = Io[w], k = I(
1294
1317
  "w-[300px] bg-transparent text-[var(--foreground)] outline-none transition-all duration-200 ease-in-out",
1295
1318
  "border-b border-b-[var(--border)]",
1296
1319
  "hover:border-b-[var(--input-accent)]",
1297
1320
  "focus:border-b-[var(--input-accent)]",
1298
1321
  u && "text-[var(--muted-foreground)] border-b-[var(--muted)] cursor-not-allowed hover:border-b-[var(--muted)]",
1299
- _.wrapper,
1300
- _.pt
1322
+ A.wrapper,
1323
+ A.pt
1301
1324
  ), N = b({
1302
- baseClassName: T,
1325
+ baseClassName: k,
1303
1326
  className: c,
1304
1327
  style: n,
1305
- sxSlot: A
1306
- }), k = E(
1328
+ sxSlot: M
1329
+ }), L = I(
1307
1330
  "absolute left-0 transition-all duration-200 ease-in-out pointer-events-none",
1308
- m ? `top-1 ${_.labelFloat} text-[var(--input-accent)]` : `top-1/2 -translate-y-1/2 ${_.label} text-[var(--muted-foreground)]`,
1309
- v && m && "text-[var(--input-accent)]",
1331
+ p ? `top-1 ${A.labelFloat} text-[var(--input-accent)]` : `top-1/2 -translate-y-1/2 ${A.label} text-[var(--muted-foreground)]`,
1332
+ y && p && "text-[var(--input-accent)]",
1310
1333
  u && "text-[var(--muted-foreground)]",
1311
- z.label.tw
1312
- ), U = b({
1313
- baseClassName: k,
1314
- sxSlot: { tw: "", css: z.label.css }
1315
- }), j = oe((G) => {
1334
+ _.label.tw
1335
+ ), W = b({
1336
+ baseClassName: L,
1337
+ sxSlot: { tw: "", css: _.label.css }
1338
+ }), D = oe((G) => {
1316
1339
  const R = G.target.value;
1317
- O || S(R), l == null || l(R);
1318
- }, [O, l]), B = oe((G) => {
1340
+ C || O(R), l == null || l(R);
1341
+ }, [C, l]), E = oe((G) => {
1319
1342
  var R;
1320
- x(!0), (R = f.onFocus) == null || R.call(f, G);
1321
- }, [f.onFocus]), M = oe((G) => {
1343
+ x(!0), (R = g.onFocus) == null || R.call(g, G);
1344
+ }, [g.onFocus]), $ = oe((G) => {
1322
1345
  var R;
1323
- x(!1), (R = f.onBlur) == null || R.call(f, G);
1324
- }, [f.onBlur]), { onFocus: F, onBlur: H, ...K } = f;
1325
- return /* @__PURE__ */ L("div", { className: $, children: [
1346
+ x(!1), (R = g.onBlur) == null || R.call(g, G);
1347
+ }, [g.onBlur]), { onFocus: z, onBlur: U, ...K } = g;
1348
+ return /* @__PURE__ */ P("div", { className: B, children: [
1326
1349
  /* @__PURE__ */ s(
1327
1350
  "input",
1328
1351
  {
1329
1352
  ...K,
1330
- type: p,
1353
+ type: d,
1331
1354
  className: N.className,
1332
1355
  style: N.style,
1333
- value: C,
1356
+ value: T,
1334
1357
  disabled: u || void 0,
1335
- onChange: j,
1336
- onFocus: B,
1337
- onBlur: M,
1338
- "aria-label": y || void 0
1358
+ onChange: D,
1359
+ onFocus: E,
1360
+ onBlur: $,
1361
+ "aria-label": S || void 0
1339
1362
  }
1340
1363
  ),
1341
- y && /* @__PURE__ */ s("label", { className: U.className, style: U.style, children: y })
1364
+ S && /* @__PURE__ */ s("label", { className: W.className, style: W.style, children: S })
1342
1365
  ] });
1343
1366
  }
1344
- Ge.propTypes = {
1367
+ Xe.propTypes = {
1345
1368
  size: t.oneOf(["small", "medium", "large", "huge"]),
1346
1369
  sx: t.oneOfType([t.object, t.string]),
1347
1370
  style: t.object,
@@ -1367,7 +1390,7 @@ const Do = ["root", "input"], Ro = {
1367
1390
  large: "h-12 text-base px-3.5",
1368
1391
  huge: "h-14 text-lg px-4"
1369
1392
  }, Yo = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
1370
- function Xe(e) {
1393
+ function qe(e) {
1371
1394
  const {
1372
1395
  type: o = "default",
1373
1396
  size: r = "medium",
@@ -1378,60 +1401,75 @@ function Xe(e) {
1378
1401
  onChange: i,
1379
1402
  value: u,
1380
1403
  defaultValue: h,
1381
- disabled: d = !1,
1382
- placeholder: p = "",
1383
- maxlength: f = 524288,
1384
- status: w,
1385
- ...P
1386
- } = e, O = Yo(r, "medium", Ro), D = o === "textarea", S = o === "password", v = w === "error", x = W(n, Do), C = {
1387
- tw: E(x.root.tw, x.input.tw),
1404
+ disabled: m = !1,
1405
+ placeholder: d = "",
1406
+ maxlength: g = 524288,
1407
+ status: v,
1408
+ ...w
1409
+ } = e, C = Yo(r, "medium", Ro), F = o === "textarea", O = o === "password", y = v === "error", x = H(n, Do), T = {
1410
+ tw: I(x.root.tw, x.input.tw),
1388
1411
  css: { ...x.root.css, ...x.input.css }
1389
- }, m = E("inline-flex", x.root.tw), y = E(
1412
+ }, p = I("inline-flex", x.root.tw), S = I(
1390
1413
  "w-[300px] rounded-[var(--radius)] border bg-[var(--input-bg)] text-[var(--foreground)] outline-none transition-all duration-200 ease-in-out",
1391
1414
  "border-[var(--border)] shadow-[var(--input-shadow)]",
1392
1415
  "hover:border-[var(--input-accent)]",
1393
1416
  "focus:border-[var(--input-accent)] focus:shadow-[var(--input-focus-shadow)]",
1394
- v && "border-[var(--input-error-border)] bg-[var(--input-error-bg)] text-[var(--input-error-fg)] hover:border-[var(--input-error-border)] focus:shadow-[var(--input-error-focus-shadow)]",
1395
- d && "bg-[var(--muted)] text-[var(--muted-foreground)] border-[var(--muted)] cursor-not-allowed shadow-none hover:border-[var(--muted)] focus:shadow-none",
1396
- Vo[O]
1397
- ), z = b({
1398
- baseClassName: y,
1417
+ y && "border-[var(--input-error-border)] bg-[var(--input-error-bg)] text-[var(--input-error-fg)] hover:border-[var(--input-error-border)] focus:shadow-[var(--input-error-focus-shadow)]",
1418
+ m && "bg-[var(--muted)] text-[var(--muted-foreground)] border-[var(--muted)] cursor-not-allowed shadow-none hover:border-[var(--muted)] focus:shadow-none",
1419
+ Vo[C]
1420
+ ), _ = b({
1421
+ baseClassName: S,
1399
1422
  className: l,
1400
1423
  style: c,
1401
- sxSlot: C
1402
- }), A = u !== void 0, $ = {
1403
- className: z.className,
1404
- style: z.style,
1424
+ sxSlot: T
1425
+ }), M = u !== void 0, B = {
1426
+ className: _.className,
1427
+ style: _.style,
1405
1428
  onClick: a,
1406
- onChange: i ? (_) => i(_.target.value) : void 0,
1407
- value: A ? u : void 0,
1408
- defaultValue: A ? void 0 : h ?? "",
1409
- disabled: d || void 0,
1410
- placeholder: p,
1411
- maxLength: f,
1412
- "aria-invalid": v || void 0,
1429
+ onChange: i ? (A) => i(A.target.value) : void 0,
1430
+ value: M ? u : void 0,
1431
+ defaultValue: M ? void 0 : h ?? "",
1432
+ disabled: m || void 0,
1433
+ placeholder: d,
1434
+ maxLength: g,
1435
+ "aria-invalid": y || void 0,
1436
+ ...w
1437
+ };
1438
+ return (
1413
1439
  // 原因:password input 不在 form 内,浏览器会发出 [DOM] Password field is not contained in a form 警告
1414
- // 导致的问题:控制台持续出现 DOM 警告
1415
- // 解决办法:为 password 类型添加 autoComplete 属性抑制浏览器警告
1440
+ // 导致的问题:控制台持续出现 DOM 警告,autoComplete 属性无法完全抑制
1441
+ // 解决办法:password 类型用 <form> 包裹 input,阻止默认提交行为,满足浏览器规范
1416
1442
  // fixed by clayw on 20260523 night
1417
- ...S ? { autoComplete: "current-password" } : {},
1418
- ...P
1419
- };
1420
- return /* @__PURE__ */ s("div", { className: m, children: D ? /* @__PURE__ */ s(
1421
- "textarea",
1422
- {
1423
- ...$,
1424
- className: `${$.className} min-h-[80px] py-2 resize-y`
1425
- }
1426
- ) : /* @__PURE__ */ s(
1427
- "input",
1428
- {
1429
- ...$,
1430
- type: S ? "password" : "text"
1431
- }
1432
- ) });
1443
+ /* @__PURE__ */ s("div", { className: p, children: O ? /* @__PURE__ */ s(
1444
+ "form",
1445
+ {
1446
+ onSubmit: (A) => A.preventDefault(),
1447
+ style: { display: "inline-flex" },
1448
+ autoComplete: "off",
1449
+ children: /* @__PURE__ */ s(
1450
+ "input",
1451
+ {
1452
+ ...B,
1453
+ type: "password"
1454
+ }
1455
+ )
1456
+ }
1457
+ ) : F ? /* @__PURE__ */ s(
1458
+ "textarea",
1459
+ {
1460
+ ...B,
1461
+ className: `${B.className} min-h-[80px] py-2 resize-y`
1462
+ }
1463
+ ) : /* @__PURE__ */ s(
1464
+ "input",
1465
+ {
1466
+ ...B,
1467
+ type: "text"
1468
+ }
1469
+ ) })
1470
+ );
1433
1471
  }
1434
- Xe.propTypes = {
1472
+ qe.propTypes = {
1435
1473
  type: t.oneOf(["default", "textarea", "password"]),
1436
1474
  size: t.oneOf(["small", "medium", "large", "huge"]),
1437
1475
  sx: t.oneOfType([t.object, t.string]),
@@ -1446,7 +1484,7 @@ Xe.propTypes = {
1446
1484
  maxlength: t.number,
1447
1485
  status: t.oneOf(["default", "error"])
1448
1486
  };
1449
- Xe.MaterialInput = Ge;
1487
+ qe.MaterialInput = Xe;
1450
1488
  const we = ["root"];
1451
1489
  function Ko(e, o) {
1452
1490
  const {
@@ -1455,7 +1493,7 @@ function Ko(e, o) {
1455
1493
  className: c = "",
1456
1494
  children: l,
1457
1495
  ...a
1458
- } = e, i = W(r, we), u = b({
1496
+ } = e, i = H(r, we), u = b({
1459
1497
  baseClassName: "flex items-center px-4 bg-[var(--layout-header-bg)] text-[var(--layout-header-color)]",
1460
1498
  className: c,
1461
1499
  sxSlot: i.root,
@@ -1484,14 +1522,14 @@ Be.propTypes = {
1484
1522
  className: t.string,
1485
1523
  children: t.node
1486
1524
  };
1487
- function Uo(e, o) {
1525
+ function Wo(e, o) {
1488
1526
  const {
1489
1527
  sx: r = {},
1490
1528
  style: n = {},
1491
1529
  className: c = "",
1492
1530
  children: l,
1493
1531
  ...a
1494
- } = e, i = W(r, we), u = b({
1532
+ } = e, i = H(r, we), u = b({
1495
1533
  baseClassName: "flex items-center px-4 bg-[var(--layout-footer-bg)] text-[var(--layout-footer-color)]",
1496
1534
  className: c,
1497
1535
  sxSlot: i.root,
@@ -1512,7 +1550,7 @@ function Uo(e, o) {
1512
1550
  }
1513
1551
  );
1514
1552
  }
1515
- const Ie = te.forwardRef(Uo);
1553
+ const Ie = te.forwardRef(Wo);
1516
1554
  Ie.displayName = "LayoutFooter";
1517
1555
  Ie.propTypes = {
1518
1556
  sx: t.oneOfType([t.string, t.object]),
@@ -1520,7 +1558,7 @@ Ie.propTypes = {
1520
1558
  className: t.string,
1521
1559
  children: t.node
1522
1560
  };
1523
- function Ho(e, o) {
1561
+ function Uo(e, o) {
1524
1562
  const {
1525
1563
  sx: r = {},
1526
1564
  style: n = {},
@@ -1528,7 +1566,7 @@ function Ho(e, o) {
1528
1566
  width: l,
1529
1567
  children: a,
1530
1568
  ...i
1531
- } = e, u = W(r, we), h = l ?? "var(--layout-sider-width)", d = b({
1569
+ } = e, u = H(r, we), h = l ?? "var(--layout-sider-width)", m = b({
1532
1570
  baseClassName: "overflow-auto flex flex-col bg-[var(--layout-sider-bg)] text-[var(--layout-sider-color)]",
1533
1571
  className: c,
1534
1572
  sxSlot: u.root,
@@ -1544,23 +1582,23 @@ function Ho(e, o) {
1544
1582
  "aside",
1545
1583
  {
1546
1584
  ref: o,
1547
- className: d.className,
1548
- style: d.style,
1585
+ className: m.className,
1586
+ style: m.style,
1549
1587
  ...i,
1550
1588
  children: a
1551
1589
  }
1552
1590
  );
1553
1591
  }
1554
- const ke = te.forwardRef(Ho);
1555
- ke.displayName = "LayoutSider";
1556
- ke.propTypes = {
1592
+ const Le = te.forwardRef(Uo);
1593
+ Le.displayName = "LayoutSider";
1594
+ Le.propTypes = {
1557
1595
  width: t.oneOfType([t.string, t.number]),
1558
1596
  sx: t.oneOfType([t.string, t.object]),
1559
1597
  style: t.object,
1560
1598
  className: t.string,
1561
1599
  children: t.node
1562
1600
  };
1563
- function Wo(e, o) {
1601
+ function Ho(e, o) {
1564
1602
  const {
1565
1603
  sx: r = {},
1566
1604
  style: n = {},
@@ -1568,7 +1606,7 @@ function Wo(e, o) {
1568
1606
  width: l,
1569
1607
  children: a,
1570
1608
  ...i
1571
- } = e, u = W(r, we), h = l ?? "var(--layout-toc-width)", d = b({
1609
+ } = e, u = H(r, we), h = l ?? "var(--layout-toc-width)", m = b({
1572
1610
  baseClassName: "overflow-auto flex flex-col bg-[var(--layout-toc-bg)] text-[var(--layout-toc-color)]",
1573
1611
  className: c,
1574
1612
  sxSlot: u.root,
@@ -1584,16 +1622,16 @@ function Wo(e, o) {
1584
1622
  "nav",
1585
1623
  {
1586
1624
  ref: o,
1587
- className: d.className,
1588
- style: d.style,
1625
+ className: m.className,
1626
+ style: m.style,
1589
1627
  ...i,
1590
1628
  children: a
1591
1629
  }
1592
1630
  );
1593
1631
  }
1594
- const Le = te.forwardRef(Wo);
1595
- Le.displayName = "LayoutToc";
1596
- Le.propTypes = {
1632
+ const Pe = te.forwardRef(Ho);
1633
+ Pe.displayName = "LayoutToc";
1634
+ Pe.propTypes = {
1597
1635
  width: t.oneOfType([t.string, t.number]),
1598
1636
  sx: t.oneOfType([t.string, t.object]),
1599
1637
  style: t.object,
@@ -1607,7 +1645,7 @@ function Zo(e, o) {
1607
1645
  className: c = "",
1608
1646
  children: l,
1609
1647
  ...a
1610
- } = e, i = W(r, we), u = b({
1648
+ } = e, i = H(r, we), u = b({
1611
1649
  /**
1612
1650
  *
1613
1651
  * 这里记录了一次问题:backgroundColor、color 等写在 baseStyle(inline style)里,
@@ -1660,13 +1698,13 @@ function Go(e, o) {
1660
1698
  hasSider: l,
1661
1699
  children: a,
1662
1700
  ...i
1663
- } = e, u = W(r, we), h = l ?? te.Children.toArray(a).some(
1664
- (p) => {
1665
- var f, w;
1666
- return te.isValidElement(p) && (p.type === ke || p.type === Le || ((f = p.type) == null ? void 0 : f.displayName) === "LayoutSider" || ((w = p.type) == null ? void 0 : w.displayName) === "LayoutToc");
1701
+ } = e, u = H(r, we), h = l ?? te.Children.toArray(a).some(
1702
+ (d) => {
1703
+ var g, v;
1704
+ return te.isValidElement(d) && (d.type === Le || d.type === Pe || ((g = d.type) == null ? void 0 : g.displayName) === "LayoutSider" || ((v = d.type) == null ? void 0 : v.displayName) === "LayoutToc");
1667
1705
  }
1668
- ), d = b({
1669
- baseClassName: E(
1706
+ ), m = b({
1707
+ baseClassName: I(
1670
1708
  "flex flex-1 flex-col min-h-0",
1671
1709
  h ? "md:flex-row" : ""
1672
1710
  ),
@@ -1678,8 +1716,8 @@ function Go(e, o) {
1678
1716
  "section",
1679
1717
  {
1680
1718
  ref: o,
1681
- className: d.className,
1682
- style: d.style,
1719
+ className: m.className,
1720
+ style: m.style,
1683
1721
  ...i,
1684
1722
  children: a
1685
1723
  }
@@ -1689,9 +1727,9 @@ const ne = te.forwardRef(Go);
1689
1727
  ne.displayName = "Layout";
1690
1728
  ne.Header = Be;
1691
1729
  ne.Footer = Ie;
1692
- ne.Sider = ke;
1730
+ ne.Sider = Le;
1693
1731
  ne.Content = je;
1694
- ne.Toc = Le;
1732
+ ne.Toc = Pe;
1695
1733
  ne.propTypes = {
1696
1734
  hasSider: t.bool,
1697
1735
  sx: t.oneOfType([t.string, t.object]),
@@ -1699,10 +1737,10 @@ ne.propTypes = {
1699
1737
  className: t.string,
1700
1738
  children: t.node
1701
1739
  };
1702
- const Xo = Be, qo = Ie, Jo = ke, Qo = je, er = Le, tr = ["root", "button", "list", "item"], Et = Symbol("LIST_IGNORE"), ut = /* @__PURE__ */ L("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
1740
+ const Xo = Be, qo = Ie, Jo = Le, Qo = je, er = Pe, tr = ["root", "button", "list", "item"], $t = Symbol("LIST_IGNORE"), pt = /* @__PURE__ */ P("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
1703
1741
  /* @__PURE__ */ s("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
1704
1742
  /* @__PURE__ */ s("path", { d: "M14 2v6h6" })
1705
- ] }), pt = /* @__PURE__ */ s("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ s("path", { d: "M18 6 6 18M6 6l12 12" }) });
1743
+ ] }), mt = /* @__PURE__ */ s("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ s("path", { d: "M18 6 6 18M6 6l12 12" }) });
1706
1744
  function or(e, o) {
1707
1745
  const {
1708
1746
  sx: r = {},
@@ -1715,77 +1753,77 @@ function or(e, o) {
1715
1753
  beforeUpload: u = () => {
1716
1754
  },
1717
1755
  files: h = [],
1718
- showUploadList: d = !0,
1719
- maxCount: p = 20,
1720
- maxSize: f = 100,
1721
- btnText: w = "选择文件",
1722
- btnStyle: P,
1723
- showSize: O = !0,
1724
- disabled: D = !1,
1725
- ...S
1726
- } = e, v = Kt(), x = h || [], C = W(r, tr), m = oe(async (T, N) => {
1756
+ showUploadList: m = !0,
1757
+ maxCount: d = 20,
1758
+ maxSize: g = 100,
1759
+ btnText: v = "选择文件",
1760
+ btnStyle: w,
1761
+ showSize: C = !0,
1762
+ disabled: F = !1,
1763
+ ...O
1764
+ } = e, y = Wt(), x = h || [], T = H(r, tr), p = oe(async (k, N) => {
1727
1765
  if (!u) return !0;
1728
1766
  try {
1729
- const k = await u(T, N);
1730
- return k === void 0 ? !0 : k;
1767
+ const L = await u(k, N);
1768
+ return L === void 0 ? !0 : L;
1731
1769
  } catch {
1732
1770
  return !1;
1733
1771
  }
1734
- }, [u]), y = oe(async (T) => {
1735
- const k = Array.from(T.target.files || []).filter((B) => B.size / 1024 / 1024 > f ? (console.warn(`[Tango Upload] ${B.name} 超过 ${f}MB,已被过滤`), !1) : !0), U = a ? k.slice(0, p) : k.slice(0, 1), j = [];
1736
- for (const B of U) {
1737
- const M = await m(B, U);
1738
- if (M === !1) {
1739
- console.warn(`[Tango Upload] ${B.name} 被 beforeUpload 拦截`);
1772
+ }, [u]), S = oe(async (k) => {
1773
+ const L = Array.from(k.target.files || []).filter((E) => E.size / 1024 / 1024 > g ? (console.warn(`[Tango Upload] ${E.name} 超过 ${g}MB,已被过滤`), !1) : !0), W = a ? L.slice(0, d) : L.slice(0, 1), D = [];
1774
+ for (const E of W) {
1775
+ const $ = await p(E, W);
1776
+ if ($ === !1) {
1777
+ console.warn(`[Tango Upload] ${E.name} 被 beforeUpload 拦截`);
1740
1778
  continue;
1741
1779
  }
1742
- if (M === Et) {
1743
- console.warn(`[Tango Upload] ${B.name} 被 LIST_IGNORE 忽略`);
1780
+ if ($ === $t) {
1781
+ console.warn(`[Tango Upload] ${E.name} 被 LIST_IGNORE 忽略`);
1744
1782
  continue;
1745
1783
  }
1746
- if (M instanceof Blob) {
1747
- const F = M instanceof File ? M : new File([M], B.name, { type: B.type });
1748
- j.push(F);
1784
+ if ($ instanceof Blob) {
1785
+ const z = $ instanceof File ? $ : new File([$], E.name, { type: E.type });
1786
+ D.push(z);
1749
1787
  } else
1750
- j.push(B);
1788
+ D.push(E);
1751
1789
  }
1752
- T.target.value = "", i(j);
1753
- }, [a, p, f, m, i]), z = oe((T, N) => {
1754
- const k = x.filter((U, j) => j !== N);
1755
- i(k);
1756
- }, [x, i]), A = b({
1790
+ k.target.value = "", i(D);
1791
+ }, [a, d, g, p, i]), _ = oe((k, N) => {
1792
+ const L = x.filter((W, D) => D !== N);
1793
+ i(L);
1794
+ }, [x, i]), M = b({
1757
1795
  baseClassName: "inline-flex flex-col gap-3",
1758
1796
  className: c,
1759
- sxSlot: C.root,
1797
+ sxSlot: T.root,
1760
1798
  style: n
1761
- }), $ = b({
1762
- baseClassName: E(
1799
+ }), B = b({
1800
+ baseClassName: I(
1763
1801
  "list-none p-0 m-0 max-h-[150px] max-w-[400px] overflow-y-auto",
1764
1802
  "border border-[var(--upload-border)] rounded-[var(--upload-radius)]",
1765
1803
  "bg-[var(--upload-list-bg)]",
1766
1804
  x.length === 0 && "border-transparent"
1767
1805
  ),
1768
1806
  baseStyle: { borderRadius: "var(--upload-radius)" },
1769
- sxSlot: C.list
1770
- }), _ = b({
1771
- baseClassName: E(
1807
+ sxSlot: T.list
1808
+ }), A = b({
1809
+ baseClassName: I(
1772
1810
  "flex items-center gap-2 px-3 py-1.5 text-sm",
1773
1811
  "text-[var(--upload-item-text)] hover:bg-[var(--upload-item-hover-bg)]",
1774
1812
  "transition-colors"
1775
1813
  ),
1776
- sxSlot: C.item
1814
+ sxSlot: T.item
1777
1815
  });
1778
- return /* @__PURE__ */ L("div", { ref: o, className: A.className, style: A.style, ...S, children: [
1816
+ return /* @__PURE__ */ P("div", { ref: o, className: M.className, style: M.style, ...O, children: [
1779
1817
  /* @__PURE__ */ s(
1780
1818
  "input",
1781
1819
  {
1782
- id: v,
1820
+ id: y,
1783
1821
  type: "file",
1784
1822
  accept: l,
1785
1823
  multiple: a,
1786
1824
  className: "hidden",
1787
- onChange: y,
1788
- disabled: D,
1825
+ onChange: S,
1826
+ disabled: F,
1789
1827
  "aria-hidden": "true",
1790
1828
  tabIndex: -1
1791
1829
  }
@@ -1793,23 +1831,23 @@ function or(e, o) {
1793
1831
  /* @__PURE__ */ s(
1794
1832
  ie,
1795
1833
  {
1796
- disabled: D,
1797
- style: P,
1798
- sx: C.button,
1834
+ disabled: F,
1835
+ style: w,
1836
+ sx: T.button,
1799
1837
  onClick: () => {
1800
- var T;
1801
- return (T = document.getElementById(v)) == null ? void 0 : T.click();
1838
+ var k;
1839
+ return (k = document.getElementById(y)) == null ? void 0 : k.click();
1802
1840
  },
1803
- children: w
1841
+ children: v
1804
1842
  }
1805
1843
  ),
1806
- d && x.length > 0 && /* @__PURE__ */ s("ul", { className: $.className, style: $.style, children: a ? x.map((T, N) => /* @__PURE__ */ L("li", { className: _.className, style: _.style, children: [
1807
- /* @__PURE__ */ s("span", { className: "flex-shrink-0 text-[var(--upload-icon-color)]", children: ut }),
1808
- /* @__PURE__ */ L("span", { className: "flex-1 truncate", children: [
1809
- T.name,
1810
- O && /* @__PURE__ */ L("span", { className: "ml-1 text-xs text-[var(--muted-foreground)]", children: [
1844
+ m && x.length > 0 && /* @__PURE__ */ s("ul", { className: B.className, style: B.style, children: a ? x.map((k, N) => /* @__PURE__ */ P("li", { className: A.className, style: A.style, children: [
1845
+ /* @__PURE__ */ s("span", { className: "flex-shrink-0 text-[var(--upload-icon-color)]", children: pt }),
1846
+ /* @__PURE__ */ P("span", { className: "flex-1 truncate", children: [
1847
+ k.name,
1848
+ C && /* @__PURE__ */ P("span", { className: "ml-1 text-xs text-[var(--muted-foreground)]", children: [
1811
1849
  "(",
1812
- (T.size / 1024).toFixed(2),
1850
+ (k.size / 1024).toFixed(2),
1813
1851
  " KB)"
1814
1852
  ] })
1815
1853
  ] }),
@@ -1818,16 +1856,16 @@ function or(e, o) {
1818
1856
  {
1819
1857
  type: "button",
1820
1858
  className: "flex-shrink-0 p-0.5 rounded hover:bg-[var(--upload-del-hover-bg)] text-[var(--upload-del-color)] transition-colors",
1821
- onClick: () => z(T, N),
1822
- "aria-label": `删除 ${T.name}`,
1823
- children: pt
1859
+ onClick: () => _(k, N),
1860
+ "aria-label": `删除 ${k.name}`,
1861
+ children: mt
1824
1862
  }
1825
1863
  )
1826
- ] }, N)) : /* @__PURE__ */ L("li", { className: _.className, style: _.style, children: [
1827
- /* @__PURE__ */ s("span", { className: "flex-shrink-0 text-[var(--upload-icon-color)]", children: ut }),
1828
- /* @__PURE__ */ L("span", { className: "flex-1 truncate", children: [
1864
+ ] }, N)) : /* @__PURE__ */ P("li", { className: A.className, style: A.style, children: [
1865
+ /* @__PURE__ */ s("span", { className: "flex-shrink-0 text-[var(--upload-icon-color)]", children: pt }),
1866
+ /* @__PURE__ */ P("span", { className: "flex-1 truncate", children: [
1829
1867
  x[0].name,
1830
- O && /* @__PURE__ */ L("span", { className: "ml-1 text-xs text-[var(--muted-foreground)]", children: [
1868
+ C && /* @__PURE__ */ P("span", { className: "ml-1 text-xs text-[var(--muted-foreground)]", children: [
1831
1869
  "(",
1832
1870
  (x[0].size / 1024).toFixed(2),
1833
1871
  " KB)"
@@ -1838,18 +1876,18 @@ function or(e, o) {
1838
1876
  {
1839
1877
  type: "button",
1840
1878
  className: "flex-shrink-0 p-0.5 rounded hover:bg-[var(--upload-del-hover-bg)] text-[var(--upload-del-color)] transition-colors",
1841
- onClick: () => z(x[0], 0),
1879
+ onClick: () => _(x[0], 0),
1842
1880
  "aria-label": `删除 ${x[0].name}`,
1843
- children: pt
1881
+ children: mt
1844
1882
  }
1845
1883
  )
1846
1884
  ] }) })
1847
1885
  ] });
1848
1886
  }
1849
- const qe = kt(or);
1850
- qe.displayName = "Upload";
1851
- qe.LIST_IGNORE = Et;
1852
- qe.propTypes = {
1887
+ const Je = Lt(or);
1888
+ Je.displayName = "Upload";
1889
+ Je.LIST_IGNORE = $t;
1890
+ Je.propTypes = {
1853
1891
  sx: t.oneOfType([t.string, t.object]),
1854
1892
  style: t.object,
1855
1893
  className: t.string,
@@ -1866,10 +1904,10 @@ qe.propTypes = {
1866
1904
  showSize: t.bool,
1867
1905
  disabled: t.bool
1868
1906
  };
1869
- const rr = ["root", "icon", "content", "actions", "closeIcon"], mt = {
1907
+ const rr = ["root", "icon", "content", "actions", "closeIcon"], bt = {
1870
1908
  cancel: "取消",
1871
1909
  action: "操作"
1872
- }, bt = {
1910
+ }, gt = {
1873
1911
  small: {
1874
1912
  rootClass: "px-[15px] py-[8px] h-[45px] rounded-[6px] gap-[8px] border",
1875
1913
  iconSize: 20,
@@ -1897,7 +1935,7 @@ const rr = ["root", "icon", "content", "actions", "closeIcon"], mt = {
1897
1935
  buttonGap: "12px",
1898
1936
  buttonFontSize: "15px"
1899
1937
  }
1900
- }, gt = {
1938
+ }, ft = {
1901
1939
  info: {
1902
1940
  bgVar: "--banner-info-bg",
1903
1941
  borderVar: "--banner-info-border",
@@ -1922,7 +1960,7 @@ const rr = ["root", "icon", "content", "actions", "closeIcon"], mt = {
1922
1960
  iconVar: "--banner-error-icon",
1923
1961
  textVar: "--banner-error-text"
1924
1962
  }
1925
- }, ft = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
1963
+ }, ht = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
1926
1964
  function sr(e) {
1927
1965
  const {
1928
1966
  children: o,
@@ -1936,68 +1974,68 @@ function sr(e) {
1936
1974
  level: i = "info",
1937
1975
  transparent: u = !1,
1938
1976
  bannerBgColor: h,
1939
- bannerBorderColor: d,
1940
- bannerIconColor: p,
1941
- sx: f = {},
1942
- style: w = {},
1943
- className: P = "",
1944
- i18nKey: O,
1945
- localeText: D = {},
1946
- ...S
1947
- } = e, { t: v } = de(), x = ft(c, "normal", bt), C = ft(i, "info", gt), m = bt[x], y = gt[C], z = W(f, rr), A = {
1948
- cancel: v("banner.cancel", mt.cancel),
1949
- action: v("banner.action", mt.action),
1950
- ...D
1951
- }, $ = l ?? (O === "cancel" ? v("banner.cancel", A.cancel) : A.cancel), _ = a ?? (O === "action" ? v("banner.action", A.action) : A.action), T = o ?? $, N = h || (u === !0 ? "transparent" : `var(${y.bgVar})`), k = d || `var(${y.borderVar})`, U = p || `var(${y.iconVar})`, j = `var(${y.textVar})`, B = b({
1952
- baseClassName: E(
1977
+ bannerBorderColor: m,
1978
+ bannerIconColor: d,
1979
+ sx: g = {},
1980
+ style: v = {},
1981
+ className: w = "",
1982
+ i18nKey: C,
1983
+ localeText: F = {},
1984
+ ...O
1985
+ } = e, { t: y } = de(), x = ht(c, "normal", gt), T = ht(i, "info", ft), p = gt[x], S = ft[T], _ = H(g, rr), M = {
1986
+ cancel: y("banner.cancel", bt.cancel),
1987
+ action: y("banner.action", bt.action),
1988
+ ...F
1989
+ }, B = l ?? (C === "cancel" ? y("banner.cancel", M.cancel) : M.cancel), A = a ?? (C === "action" ? y("banner.action", M.action) : M.action), k = o ?? B, N = h || (u === !0 ? "transparent" : `var(${S.bgVar})`), L = m || `var(${S.borderVar})`, W = d || `var(${S.iconVar})`, D = `var(${S.textVar})`, E = b({
1990
+ baseClassName: I(
1953
1991
  "flex w-full items-center justify-start transition-colors duration-200",
1954
- m.rootClass
1992
+ p.rootClass
1955
1993
  ),
1956
- className: P,
1994
+ className: w,
1957
1995
  style: {
1958
1996
  backgroundColor: N,
1959
- borderColor: k,
1960
- color: u === !0 ? "var(--muted-foreground)" : j,
1961
- ...w
1997
+ borderColor: L,
1998
+ color: u === !0 ? "var(--muted-foreground)" : D,
1999
+ ...v
1962
2000
  },
1963
- sxSlot: z.root
1964
- }), M = b({
2001
+ sxSlot: _.root
2002
+ }), $ = b({
1965
2003
  baseClassName: "shrink-0",
1966
2004
  baseStyle: {
1967
- width: `${m.iconSize}px`,
1968
- height: `${m.iconSize}px`,
1969
- color: U
2005
+ width: `${p.iconSize}px`,
2006
+ height: `${p.iconSize}px`,
2007
+ color: W
1970
2008
  },
1971
- sxSlot: z.icon
1972
- }), F = b({
1973
- baseClassName: E(
2009
+ sxSlot: _.icon
2010
+ }), z = b({
2011
+ baseClassName: I(
1974
2012
  "flex-grow text-left",
1975
- m.contentClass
2013
+ p.contentClass
1976
2014
  ),
1977
- sxSlot: z.content
1978
- }), H = b({
2015
+ sxSlot: _.content
2016
+ }), U = b({
1979
2017
  baseClassName: "flex items-center justify-end flex-1",
1980
2018
  baseStyle: {
1981
- gap: m.buttonGap
2019
+ gap: p.buttonGap
1982
2020
  },
1983
- sxSlot: z.actions
2021
+ sxSlot: _.actions
1984
2022
  }), K = b({
1985
2023
  baseClassName: "shrink-0 cursor-pointer",
1986
2024
  baseStyle: {
1987
- width: `${m.closeIconSize}px`,
1988
- height: `${m.closeIconSize}px`,
2025
+ width: `${p.closeIconSize}px`,
2026
+ height: `${p.closeIconSize}px`,
1989
2027
  color: "var(--banner-close-icon)"
1990
2028
  },
1991
- sxSlot: z.closeIcon
1992
- }), G = /* @__PURE__ */ L("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
2029
+ sxSlot: _.closeIcon
2030
+ }), G = /* @__PURE__ */ P("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
1993
2031
  /* @__PURE__ */ s("path", { d: "M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z" }),
1994
2032
  /* @__PURE__ */ s("path", { d: "M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z" }),
1995
2033
  /* @__PURE__ */ s("path", { d: "M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z" })
1996
- ] }), R = /* @__PURE__ */ L("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
2034
+ ] }), R = /* @__PURE__ */ P("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
1997
2035
  /* @__PURE__ */ s("path", { d: "M869.472578 920.128281 154.906046 920.128281c-31.943526 0-60.545958-16.517185-76.514651-44.181245-15.968693-27.666106-15.96153-60.696384 0.016373-88.355327l357.283266-618.47194c15.971763-27.647687 44.568055-44.152593 76.496232-44.152593 31.930223-0.001023 60.527538 16.504906 76.499301 44.151569l357.283266 618.472963c15.977903 27.659967 15.984043 60.689221 0.017396 88.355327C930.018535 903.611096 901.416104 920.128281 869.472578 920.128281zM512.187265 169.139212c-15.962553 0-30.261211 8.251941-38.247092 22.075785l0 0L116.65793 809.686936c-7.989975 13.829983-7.993045 30.345122-0.008186 44.179199 7.983835 13.83203 22.285562 22.090111 38.257326 22.090111l714.566532 0c15.971763 0 30.273491-8.258081 38.256302-22.090111 7.984858-13.83203 7.980765-30.349215-0.008186-44.179199L550.437427 191.213973C542.452569 177.391153 528.152888 169.138188 512.187265 169.139212z" }),
1998
2036
  /* @__PURE__ */ s("path", { d: "M513.732457 621.119233c-18.296715 0-33.257451-14.832823-33.257451-33.129538L480.475006 331.789639c0-18.296715 14.960737-33.129538 33.257451-33.129538 18.296715 0 33.257451 14.832823 33.257451 33.129538l0 256.200056C546.989909 606.28641 532.029172 621.119233 513.732457 621.119233z" }),
1999
2037
  /* @__PURE__ */ s("path", { d: "M513.686409 737.619574m-49.991578 0a48.853 48.853 0 1 0 99.983155 0 48.853 48.853 0 1 0-99.983155 0Z" })
2000
- ] }), Q = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: /* @__PURE__ */ s("path", { d: "M85.333333 512C85.333333 276.352 276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512z m683.093334-256.426667a358.954667 358.954667 0 0 0-122.922667-80.768A359.466667 359.466667 0 0 0 512 149.333333c-46.08 0-90.624 8.490667-133.504 25.472A358.954667 358.954667 0 0 0 255.573333 255.573333c-35.413333 35.413333-62.336 76.373333-80.768 122.922667A359.466667 359.466667 0 0 0 149.333333 512c0 46.08 8.490667 90.624 25.472 133.504A358.954667 358.954667 0 0 0 255.573333 768.426667c35.413333 35.413333 76.373333 62.336 122.922667 80.768A359.466667 359.466667 0 0 0 512 874.666667c46.08 0 90.624-8.490667 133.504-25.472a358.954667 358.954667 0 0 0 122.922667-80.768c35.413333-35.413333 62.336-76.373333 80.768-122.922667A359.466667 359.466667 0 0 0 874.666667 512c0-46.08-8.490667-90.624-25.472-133.504A358.912 358.912 0 0 0 768.426667 255.573333zM338.517333 640.213333L466.773333 512 338.517333 383.786667l45.226667-45.226667L512 466.688l128.213333-128.213333 45.226667 45.226666L557.312 512l128.213333 128.213333-45.226666 45.226667L512 557.312l-128.213333 128.213333-45.226667-45.226666z" }) }), ue = /* @__PURE__ */ L("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
2038
+ ] }), Q = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: /* @__PURE__ */ s("path", { d: "M85.333333 512C85.333333 276.352 276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512z m683.093334-256.426667a358.954667 358.954667 0 0 0-122.922667-80.768A359.466667 359.466667 0 0 0 512 149.333333c-46.08 0-90.624 8.490667-133.504 25.472A358.954667 358.954667 0 0 0 255.573333 255.573333c-35.413333 35.413333-62.336 76.373333-80.768 122.922667A359.466667 359.466667 0 0 0 149.333333 512c0 46.08 8.490667 90.624 25.472 133.504A358.954667 358.954667 0 0 0 255.573333 768.426667c35.413333 35.413333 76.373333 62.336 122.922667 80.768A359.466667 359.466667 0 0 0 512 874.666667c46.08 0 90.624-8.490667 133.504-25.472a358.954667 358.954667 0 0 0 122.922667-80.768c35.413333-35.413333 62.336-76.373333 80.768-122.922667A359.466667 359.466667 0 0 0 874.666667 512c0-46.08-8.490667-90.624-25.472-133.504A358.912 358.912 0 0 0 768.426667 255.573333zM338.517333 640.213333L466.773333 512 338.517333 383.786667l45.226667-45.226667L512 466.688l128.213333-128.213333 45.226667 45.226666L557.312 512l128.213333 128.213333-45.226666 45.226667L512 557.312l-128.213333 128.213333-45.226667-45.226666z" }) }), ue = /* @__PURE__ */ P("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
2001
2039
  /* @__PURE__ */ s("path", { d: "M512.3 961.3c-247.1 0-448.1-201-448.1-448.1s201-448.1 448.1-448.1 448.1 201 448.1 448.1-201 448.1-448.1 448.1z m0-849.7c-221.4 0-401.6 180.2-401.6 401.6s180.2 401.6 401.6 401.6 401.6-180.2 401.6-401.6-180.2-401.6-401.6-401.6z" }),
2002
2040
  /* @__PURE__ */ s("path", { d: "M441.2 676c-16.4 0-32.7-5.8-45.5-17.4l-151.3-138c-9.5-8.6-10.2-23.3-1.5-32.8 8.6-9.5 23.3-10.2 32.8-1.5L427 624.2c7.6 6.9 20.8 6.9 28.4 0l293.5-267.5c9.5-8.6 24.2-8 32.8 1.5 8.6 9.5 8 24.2-1.5 32.8L486.7 658.5c-12.8 11.7-29.1 17.5-45.5 17.5z" })
2003
2041
  ] }), be = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: /* @__PURE__ */ s("path", { d: "M558.8 509.2l302.8-302.8c3.1-3.1 3.1-8.1 0-11.2l-30.8-30.8c-3.1-3.1-8.1-3.1-11.2 0L516.8 467.2c-1.5 1.5-4.1 1.5-5.6 0L208.3 164.3c-3.1-3.1-8.1-3.1-11.2 0l-30.8 30.8c-3.1 3.1-3.1 8.1 0 11.2l302.8 302.8c1.5 1.5 1.5 4.1 0 5.6l-302.8 303c-3.1 3.1-3.1 8.1 0 11.2l30.8 30.8c3.1 3.1 8.1 3.1 11.2 0l302.8-302.8c1.5-1.5 4.1-1.5 5.6 0l302.8 302.8c3.1 3.1 8.1 3.1 11.2 0l30.8-30.8c3.1-3.1 3.1-8.1 0-11.2L558.8 514.8c-1.5-1.5-1.5-4.1 0-5.6z" }) }), ge = {
@@ -2006,31 +2044,31 @@ function sr(e) {
2006
2044
  error: Q,
2007
2045
  info: G
2008
2046
  };
2009
- return /* @__PURE__ */ L(
2047
+ return /* @__PURE__ */ P(
2010
2048
  "div",
2011
2049
  {
2012
- className: B.className,
2013
- style: B.style,
2014
- "data-level": C,
2050
+ className: E.className,
2051
+ style: E.style,
2052
+ "data-level": T,
2015
2053
  "data-size": x,
2016
- ...S,
2054
+ ...O,
2017
2055
  children: [
2018
- /* @__PURE__ */ s("div", { className: M.className, style: M.style, children: ge[C] }),
2019
- /* @__PURE__ */ s("div", { className: F.className, style: F.style, children: T }),
2020
- /* @__PURE__ */ L("div", { className: H.className, style: H.style, children: [
2056
+ /* @__PURE__ */ s("div", { className: $.className, style: $.style, children: ge[T] }),
2057
+ /* @__PURE__ */ s("div", { className: z.className, style: z.style, children: k }),
2058
+ /* @__PURE__ */ P("div", { className: U.className, style: U.style, children: [
2021
2059
  /* @__PURE__ */ s(
2022
2060
  ie,
2023
2061
  {
2024
2062
  type: "transparent",
2025
2063
  sx: {
2026
2064
  c: "var(--banner-btn-text)",
2027
- br: m.buttonBorderRadius,
2065
+ br: p.buttonBorderRadius,
2028
2066
  bColor: "transparent",
2029
- s: m.buttonFontSize
2067
+ s: p.buttonFontSize
2030
2068
  },
2031
2069
  onClick: r,
2032
2070
  size: x === "normal" ? "medium" : x,
2033
- children: $
2071
+ children: B
2034
2072
  }
2035
2073
  ),
2036
2074
  /* @__PURE__ */ s(
@@ -2039,14 +2077,14 @@ function sr(e) {
2039
2077
  type: "transparent",
2040
2078
  sx: {
2041
2079
  c: "var(--banner-btn-text)",
2042
- br: m.buttonBorderRadius,
2080
+ br: p.buttonBorderRadius,
2043
2081
  b: 1,
2044
2082
  bColor: "var(--banner-btn-border)",
2045
- s: m.buttonFontSize
2083
+ s: p.buttonFontSize
2046
2084
  },
2047
2085
  onClick: n,
2048
2086
  size: x === "normal" ? "medium" : x,
2049
- children: _
2087
+ children: A
2050
2088
  }
2051
2089
  ),
2052
2090
  /* @__PURE__ */ s(
@@ -2081,11 +2119,11 @@ sr.propTypes = {
2081
2119
  i18nKey: t.string,
2082
2120
  localeText: t.object
2083
2121
  };
2084
- const ar = ["root", "input", "text"], Ye = {
2122
+ const ar = ["root", "input", "text"], Ke = {
2085
2123
  hex: "HEX",
2086
2124
  rgb: "RGB",
2087
2125
  hsl: "HSL"
2088
- }, ht = {
2126
+ }, yt = {
2089
2127
  small: { inputSize: 20, fontSize: "11px", gap: "6px" },
2090
2128
  medium: { inputSize: 28, fontSize: "12px", gap: "10px" },
2091
2129
  large: { inputSize: 36, fontSize: "14px", gap: "14px" }
@@ -2093,7 +2131,7 @@ const ar = ["root", "input", "text"], Ye = {
2093
2131
  hex: "hex",
2094
2132
  rgb: "rgb",
2095
2133
  hsl: "hsl"
2096
- }, yt = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o, lr = (e) => {
2134
+ }, xt = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o, lr = (e) => {
2097
2135
  const o = parseInt(e.slice(1, 3), 16), r = parseInt(e.slice(3, 5), 16), n = parseInt(e.slice(5, 7), 16);
2098
2136
  return `rgb(${o}, ${r}, ${n})`;
2099
2137
  }, cr = (e) => {
@@ -2127,75 +2165,75 @@ function dr(e) {
2127
2165
  size: i = "medium",
2128
2166
  sx: u = {},
2129
2167
  style: h = {},
2130
- className: d = "",
2131
- i18nKey: p,
2132
- localeText: f = {},
2133
- ...w
2134
- } = e, { t: P } = de(), O = yt(i, "medium", ht), D = yt(a, "hex", nr), S = ht[O], [v, x] = Z(r), C = o ?? v, m = W(u, ar), y = {
2135
- hex: P("colorpicker.hex", Ye.hex),
2136
- rgb: P("colorpicker.rgb", Ye.rgb),
2137
- hsl: P("colorpicker.hsl", Ye.hsl),
2138
- ...f
2139
- }, z = (k) => {
2140
- const U = k.target.value;
2141
- o === void 0 && x(U), n(U);
2142
- }, A = [];
2168
+ className: m = "",
2169
+ i18nKey: d,
2170
+ localeText: g = {},
2171
+ ...v
2172
+ } = e, { t: w } = de(), C = xt(i, "medium", yt), F = xt(a, "hex", nr), O = yt[C], [y, x] = Z(r), T = o ?? y, p = H(u, ar), S = {
2173
+ hex: w("colorpicker.hex", Ke.hex),
2174
+ rgb: w("colorpicker.rgb", Ke.rgb),
2175
+ hsl: w("colorpicker.hsl", Ke.hsl),
2176
+ ...g
2177
+ }, _ = (L) => {
2178
+ const W = L.target.value;
2179
+ o === void 0 && x(W), n(W);
2180
+ }, M = [];
2143
2181
  if (l) {
2144
- const k = p || (typeof l == "string" ? l : null) || D;
2145
- A.push({
2146
- label: y[k],
2147
- value: ir(C, k)
2182
+ const L = d || (typeof l == "string" ? l : null) || F;
2183
+ M.push({
2184
+ label: S[L],
2185
+ value: ir(T, L)
2148
2186
  });
2149
2187
  }
2150
- const $ = b({
2151
- baseClassName: E(
2188
+ const B = b({
2189
+ baseClassName: I(
2152
2190
  "inline-flex items-center",
2153
2191
  c && "cursor-not-allowed opacity-60"
2154
2192
  ),
2155
- className: d,
2156
- baseStyle: { gap: S.gap },
2193
+ className: m,
2194
+ baseStyle: { gap: O.gap },
2157
2195
  style: h,
2158
- sxSlot: m.root
2159
- }), _ = b({
2160
- baseClassName: E(
2196
+ sxSlot: p.root
2197
+ }), A = b({
2198
+ baseClassName: I(
2161
2199
  "shrink-0 cursor-pointer border-2 border-[var(--border)] rounded-full bg-transparent overflow-hidden transition-colors duration-200",
2162
2200
  c && "cursor-not-allowed"
2163
2201
  ),
2164
2202
  baseStyle: {
2165
- width: `${S.inputSize}px`,
2166
- height: `${S.inputSize}px`,
2203
+ width: `${O.inputSize}px`,
2204
+ height: `${O.inputSize}px`,
2167
2205
  padding: 0
2168
2206
  },
2169
- sxSlot: m.input
2170
- }), T = b({
2207
+ sxSlot: p.input
2208
+ }), k = b({
2171
2209
  baseClassName: "flex flex-col text-[var(--muted-foreground)]",
2172
- baseStyle: { fontSize: S.fontSize },
2173
- sxSlot: m.text
2210
+ baseStyle: { fontSize: O.fontSize },
2211
+ sxSlot: p.text
2174
2212
  });
2175
- return /* @__PURE__ */ L(Ne, { children: [
2213
+ return /* @__PURE__ */ P(Ne, { children: [
2176
2214
  /* @__PURE__ */ s("style", { children: `
2177
2215
  .tango-cp-input::-webkit-color-swatch-wrapper { padding: 0; }
2178
2216
  .tango-cp-input::-webkit-color-swatch { border: 0; border-radius: 9999px; }
2179
2217
  .tango-cp-input::-moz-color-swatch { border: 0; border-radius: 9999px; }
2180
2218
  ` }),
2181
- /* @__PURE__ */ L("div", { className: $.className, style: $.style, ...w, children: [
2219
+ /* @__PURE__ */ P("div", { className: B.className, style: B.style, ...v, children: [
2182
2220
  /* @__PURE__ */ s(
2183
2221
  "input",
2184
2222
  {
2185
2223
  type: "color",
2186
- value: C,
2187
- onChange: z,
2224
+ value: T,
2225
+ onChange: _,
2188
2226
  disabled: c,
2189
- className: `tango-cp-input ${_.className}`,
2190
- style: _.style,
2191
- "aria-label": w["aria-label"] || `颜色选择器: ${C}`
2227
+ className: `tango-cp-input ${A.className}`,
2228
+ style: A.style,
2229
+ "aria-label": v["aria-label"] || `颜色选择器: ${T}`
2192
2230
  }
2193
2231
  ),
2194
- l && A.length > 0 && /* @__PURE__ */ s("div", { className: T.className, style: T.style, children: A.map(({ label: k, value: U }) => /* @__PURE__ */ L("span", { children: [
2195
- k,
2232
+ l && M.length > 0 && /* @__PURE__ */ s("div", { className: k.className, style: k.style, children: M.map(({ label: L, value: W }) => /* @__PURE__ */ P("span", { children: [
2233
+ L,
2196
2234
  ": ",
2197
- U
2198
- ] }, k)) })
2235
+ W
2236
+ ] }, L)) })
2199
2237
  ] })
2200
2238
  ] });
2201
2239
  }
@@ -2213,10 +2251,10 @@ dr.propTypes = {
2213
2251
  i18nKey: t.string,
2214
2252
  localeText: t.object
2215
2253
  };
2216
- const ur = ["root", "date", "weekday", "time"], xt = {
2254
+ const ur = ["root", "date", "weekday", "time"], vt = {
2217
2255
  weekdayPrefix: "星期",
2218
2256
  weekdayShortPrefix: "周"
2219
- }, vt = {
2257
+ }, St = {
2220
2258
  default: "default",
2221
2259
  line: "line",
2222
2260
  full: "full",
@@ -2297,47 +2335,47 @@ function fr(e) {
2297
2335
  i18nKey: a,
2298
2336
  localeText: i = {},
2299
2337
  ...u
2300
- } = e || {}, { t: h, locale: d } = de(), [p, f] = Z(!1);
2301
- ae(() => {
2302
- f(!0);
2338
+ } = e || {}, { t: h, locale: m } = de(), [d, g] = Z(!1);
2339
+ se(() => {
2340
+ g(!0);
2303
2341
  }, []);
2304
- const w = pr(o, "default", vt), P = d === "en-US" ? "en-US" : "zh-CN";
2342
+ const v = pr(o, "default", St), w = m === "en-US" ? "en-US" : "zh-CN";
2305
2343
  ({
2306
- weekdayPrefix: h("date.weekdayPrefix", xt.weekdayPrefix),
2307
- weekdayShortPrefix: h("date.weekdayShortPrefix", xt.weekdayShortPrefix),
2344
+ weekdayPrefix: h("date.weekdayPrefix", vt.weekdayPrefix),
2345
+ weekdayShortPrefix: h("date.weekdayShortPrefix", vt.weekdayShortPrefix),
2308
2346
  ...i
2309
2347
  });
2310
- const O = W(n, ur), D = a && vt[a] ? a : w, S = p ? gr(D, P, r) : [], v = b({
2311
- baseClassName: E("inline-flex items-center gap-1 text-[var(--foreground)]"),
2348
+ const C = H(n, ur), F = a && St[a] ? a : v, O = d ? gr(F, w, r) : [], y = b({
2349
+ baseClassName: I("inline-flex items-center gap-1 text-[var(--foreground)]"),
2312
2350
  className: l,
2313
2351
  baseStyle: {},
2314
2352
  style: c,
2315
- sxSlot: O.root
2353
+ sxSlot: C.root
2316
2354
  }), x = {
2317
2355
  date: b({
2318
2356
  baseClassName: "",
2319
- sxSlot: O.date
2357
+ sxSlot: C.date
2320
2358
  }),
2321
2359
  weekday: b({
2322
2360
  baseClassName: "text-[var(--muted-foreground)]",
2323
- sxSlot: O.weekday
2361
+ sxSlot: C.weekday
2324
2362
  }),
2325
2363
  time: b({
2326
2364
  baseClassName: "",
2327
- sxSlot: O.time
2365
+ sxSlot: C.time
2328
2366
  })
2329
2367
  };
2330
2368
  return /* @__PURE__ */ s(
2331
2369
  "div",
2332
2370
  {
2333
- className: v.className,
2334
- style: v.style,
2371
+ className: y.className,
2372
+ style: y.style,
2335
2373
  role: "timer",
2336
2374
  "aria-live": "polite",
2337
2375
  ...u,
2338
- children: S.map((C) => {
2339
- const m = x[C.key] || { className: "", style: {} };
2340
- return /* @__PURE__ */ s("span", { className: m.className, style: m.style, children: C.text }, C.key);
2376
+ children: O.map((T) => {
2377
+ const p = x[T.key] || { className: "", style: {} };
2378
+ return /* @__PURE__ */ s("span", { className: p.className, style: p.style, children: T.text }, T.key);
2341
2379
  })
2342
2380
  }
2343
2381
  );
@@ -2371,7 +2409,7 @@ const hr = ["root", "input", "panel", "header", "body", "footer"], me = {
2371
2409
  nextMonth: "下一月",
2372
2410
  weekDays: ["日", "一", "二", "三", "四", "五", "六"],
2373
2411
  monthFormat: "${year} 年 ${month} 月"
2374
- }, St = {
2412
+ }, Nt = {
2375
2413
  small: { inputPx: "px-2 py-1", textSm: "text-xs", minW: "min-w-[140px]", panelW: "w-[260px]" },
2376
2414
  medium: { inputPx: "px-3 py-2", textSm: "text-sm", minW: "min-w-[180px]", panelW: "w-[300px]" },
2377
2415
  large: { inputPx: "px-4 py-3", textSm: "text-base", minW: "min-w-[220px]", panelW: "w-[340px]" }
@@ -2388,91 +2426,91 @@ function xr(e) {
2388
2426
  sx: i = {},
2389
2427
  style: u = {},
2390
2428
  className: h = "",
2391
- i18nKey: d,
2392
- localeText: p = {},
2393
- placeholder: f,
2394
- ...w
2395
- } = e, { t: P, locale: O } = de(), D = yr(a, "medium", St), S = St[D], v = O === "en-US", [x, C] = Z(r || ""), m = o !== void 0 ? o : x, [y, z] = Z("00"), [A, $] = Z("00"), [_, T] = Z(!1), [N, k] = Z(() => {
2396
- const g = /* @__PURE__ */ new Date();
2397
- return new Date(g.getFullYear(), g.getMonth(), 1);
2398
- }), U = $e(null), j = {
2399
- placeholder: P("datepicker.placeholder", me.placeholder),
2400
- placeholderTime: P("datepicker.placeholderTime", me.placeholderTime),
2401
- timeLabel: P("datepicker.timeLabel", me.timeLabel),
2402
- confirm: P("datepicker.confirm", me.confirm),
2403
- cancel: P("datepicker.cancel", me.cancel),
2404
- prevMonth: P("datepicker.prevMonth", me.prevMonth),
2405
- nextMonth: P("datepicker.nextMonth", me.nextMonth),
2406
- weekDays: v ? ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] : me.weekDays,
2407
- monthFormat: v ? "${month}/${year}" : me.monthFormat,
2408
- ...p
2429
+ i18nKey: m,
2430
+ localeText: d = {},
2431
+ placeholder: g,
2432
+ ...v
2433
+ } = e, { t: w, locale: C } = de(), F = yr(a, "medium", Nt), O = Nt[F], y = C === "en-US", [x, T] = Z(r || ""), p = o !== void 0 ? o : x, [S, _] = Z("00"), [M, B] = Z("00"), [A, k] = Z(!1), [N, L] = Z(() => {
2434
+ const f = /* @__PURE__ */ new Date();
2435
+ return new Date(f.getFullYear(), f.getMonth(), 1);
2436
+ }), W = ke(null), D = {
2437
+ placeholder: w("datepicker.placeholder", me.placeholder),
2438
+ placeholderTime: w("datepicker.placeholderTime", me.placeholderTime),
2439
+ timeLabel: w("datepicker.timeLabel", me.timeLabel),
2440
+ confirm: w("datepicker.confirm", me.confirm),
2441
+ cancel: w("datepicker.cancel", me.cancel),
2442
+ prevMonth: w("datepicker.prevMonth", me.prevMonth),
2443
+ nextMonth: w("datepicker.nextMonth", me.nextMonth),
2444
+ weekDays: y ? ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] : me.weekDays,
2445
+ monthFormat: y ? "${month}/${year}" : me.monthFormat,
2446
+ ...d
2409
2447
  };
2410
- ae(() => {
2411
- const g = (V) => {
2412
- U.current && !U.current.contains(V.target) && T(!1);
2448
+ se(() => {
2449
+ const f = (V) => {
2450
+ W.current && !W.current.contains(V.target) && k(!1);
2413
2451
  };
2414
- return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
2452
+ return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
2415
2453
  }, []);
2416
- const B = (g) => {
2417
- const V = g.getFullYear(), ee = (g.getMonth() + 1).toString().padStart(2, "0"), ce = g.getDate().toString().padStart(2, "0");
2454
+ const E = (f) => {
2455
+ const V = f.getFullYear(), ee = (f.getMonth() + 1).toString().padStart(2, "0"), ce = f.getDate().toString().padStart(2, "0");
2418
2456
  return `${V}-${ee}-${ce}`;
2419
- }, M = Se(() => {
2420
- const g = N.getFullYear(), V = N.getMonth() + 1;
2421
- return j.monthFormat.replace("${year}", String(g)).replace("${month}", String(V));
2422
- }, [N, j.monthFormat]), F = Se(() => {
2423
- const g = N.getFullYear(), V = N.getMonth(), ee = new Date(g, V, 1).getDay(), ce = new Date(g, V + 1, 0).getDate(), pe = Array.from({ length: ce }, (Je, Fe) => Fe + 1);
2457
+ }, $ = Se(() => {
2458
+ const f = N.getFullYear(), V = N.getMonth() + 1;
2459
+ return D.monthFormat.replace("${year}", String(f)).replace("${month}", String(V));
2460
+ }, [N, D.monthFormat]), z = Se(() => {
2461
+ const f = N.getFullYear(), V = N.getMonth(), ee = new Date(f, V, 1).getDay(), ce = new Date(f, V + 1, 0).getDate(), pe = Array.from({ length: ce }, (Qe, Fe) => Fe + 1);
2424
2462
  return [...Array(ee).fill(null), ...pe];
2425
- }, [N]), H = Se(() => m ? l ? `${m} ${y}:${A}` : m : "", [m, y, A, l]), K = (g) => {
2426
- const V = new Date(N.getFullYear(), N.getMonth(), g);
2427
- return m === B(V);
2428
- }, G = (g, V, ee) => {
2429
- if (g) {
2463
+ }, [N]), U = Se(() => p ? l ? `${p} ${S}:${M}` : p : "", [p, S, M, l]), K = (f) => {
2464
+ const V = new Date(N.getFullYear(), N.getMonth(), f);
2465
+ return p === E(V);
2466
+ }, G = (f, V, ee) => {
2467
+ if (f) {
2430
2468
  if (l) {
2431
- const ce = `${g}T${V}:${ee}`, pe = new Date(ce), Je = pe.getFullYear(), Fe = (pe.getMonth() + 1).toString().padStart(2, "0"), Rt = pe.getDate().toString().padStart(2, "0"), Vt = pe.getHours().toString().padStart(2, "0"), Yt = pe.getMinutes().toString().padStart(2, "0");
2432
- n(`${Je}-${Fe}-${Rt} ${Vt}:${Yt}`, ce);
2469
+ const ce = `${f}T${V}:${ee}`, pe = new Date(ce), Qe = pe.getFullYear(), Fe = (pe.getMonth() + 1).toString().padStart(2, "0"), Vt = pe.getDate().toString().padStart(2, "0"), Yt = pe.getHours().toString().padStart(2, "0"), Kt = pe.getMinutes().toString().padStart(2, "0");
2470
+ n(`${Qe}-${Fe}-${Vt} ${Yt}:${Kt}`, ce);
2433
2471
  return;
2434
2472
  }
2435
- n(g, g);
2473
+ n(f, f);
2436
2474
  }
2437
- }, R = (g) => {
2438
- const V = new Date(N.getFullYear(), N.getMonth(), g), ee = B(V);
2439
- o === void 0 && C(ee), G(ee, y, A), l || T(!1);
2440
- }, Q = (g) => {
2441
- const V = g.target.value;
2442
- z(V), G(m, V, A);
2443
- }, ue = (g) => {
2444
- const V = g.target.value;
2445
- $(V), G(m, y, V);
2475
+ }, R = (f) => {
2476
+ const V = new Date(N.getFullYear(), N.getMonth(), f), ee = E(V);
2477
+ o === void 0 && T(ee), G(ee, S, M), l || k(!1);
2478
+ }, Q = (f) => {
2479
+ const V = f.target.value;
2480
+ _(V), G(p, V, M);
2481
+ }, ue = (f) => {
2482
+ const V = f.target.value;
2483
+ B(V), G(p, S, V);
2446
2484
  }, be = () => {
2447
2485
  if (!c) {
2448
- if (m) {
2449
- const [g, V] = m.split("-").map(Number);
2450
- k(new Date(g, V - 1, 1));
2486
+ if (p) {
2487
+ const [f, V] = p.split("-").map(Number);
2488
+ L(new Date(f, V - 1, 1));
2451
2489
  }
2452
- T(!0);
2490
+ k(!0);
2453
2491
  }
2454
- }, ge = Array.from({ length: 24 }, (g, V) => String(V).padStart(2, "0")), fe = Array.from({ length: 60 }, (g, V) => String(V).padStart(2, "0")), X = W(i, hr);
2455
- typeof i == "string" && (X.input.tw = E(X.input.tw, X.root.tw), X.root.tw = "");
2492
+ }, ge = Array.from({ length: 24 }, (f, V) => String(V).padStart(2, "0")), fe = Array.from({ length: 60 }, (f, V) => String(V).padStart(2, "0")), X = H(i, hr);
2493
+ typeof i == "string" && (X.input.tw = I(X.input.tw, X.root.tw), X.root.tw = "");
2456
2494
  const J = b({
2457
2495
  baseClassName: "relative inline-block",
2458
2496
  sxSlot: X.root
2459
- }), I = b({
2460
- baseClassName: E(
2497
+ }), j = b({
2498
+ baseClassName: I(
2461
2499
  "border border-[var(--border)] rounded-[var(--radius)] bg-[var(--card)] text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] outline-none transition-all duration-200 cursor-pointer",
2462
2500
  "focus:border-[var(--primary)] focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--primary)_18%,transparent)]",
2463
2501
  "hover:border-[var(--primary)]",
2464
- S.inputPx,
2465
- S.textSm,
2466
- S.minW,
2502
+ O.inputPx,
2503
+ O.textSm,
2504
+ O.minW,
2467
2505
  c && "bg-[var(--muted)] text-[var(--muted-foreground)] cursor-not-allowed"
2468
2506
  ),
2469
2507
  className: h,
2470
2508
  style: u,
2471
2509
  sxSlot: X.input
2472
2510
  }), q = b({
2473
- baseClassName: E(
2511
+ baseClassName: I(
2474
2512
  "absolute top-[calc(100%+8px)] left-0 z-20 p-3 border border-[var(--border)] bg-[var(--card)] rounded-xl shadow-[0_8px_28px_rgba(0,0,0,0.12)]",
2475
- S.panelW
2513
+ O.panelW
2476
2514
  ),
2477
2515
  sxSlot: X.panel
2478
2516
  }), le = b({
@@ -2481,84 +2519,84 @@ function xr(e) {
2481
2519
  }), re = b({
2482
2520
  baseClassName: "flex flex-wrap",
2483
2521
  sxSlot: X.body
2484
- }), se = b({
2522
+ }), ae = b({
2485
2523
  baseClassName: "mt-2.5 pt-2.5 border-t border-[var(--border)]",
2486
2524
  sxSlot: X.footer
2487
2525
  });
2488
- return /* @__PURE__ */ L("div", { className: J.className, style: J.style, ref: U, ...w, children: [
2526
+ return /* @__PURE__ */ P("div", { className: J.className, style: J.style, ref: W, ...v, children: [
2489
2527
  /* @__PURE__ */ s(
2490
2528
  "input",
2491
2529
  {
2492
2530
  type: "text",
2493
- value: H,
2531
+ value: U,
2494
2532
  readOnly: !0,
2495
2533
  onClick: be,
2496
- className: I.className,
2497
- style: I.style,
2534
+ className: j.className,
2535
+ style: j.style,
2498
2536
  disabled: c,
2499
- placeholder: f || (l ? j.placeholderTime : j.placeholder),
2500
- "aria-label": w["aria-label"] || f || (l ? j.placeholderTime : j.placeholder),
2537
+ placeholder: g || (l ? D.placeholderTime : D.placeholder),
2538
+ "aria-label": v["aria-label"] || g || (l ? D.placeholderTime : D.placeholder),
2501
2539
  "aria-haspopup": "dialog",
2502
- "aria-expanded": _
2540
+ "aria-expanded": A
2503
2541
  }
2504
2542
  ),
2505
- _ && !c && /* @__PURE__ */ L("div", { className: q.className, style: q.style, role: "dialog", "aria-label": "日期选择面板", children: [
2506
- /* @__PURE__ */ L("div", { className: le.className, style: le.style, children: [
2543
+ A && !c && /* @__PURE__ */ P("div", { className: q.className, style: q.style, role: "dialog", "aria-label": "日期选择面板", children: [
2544
+ /* @__PURE__ */ P("div", { className: le.className, style: le.style, children: [
2507
2545
  /* @__PURE__ */ s(
2508
2546
  "button",
2509
2547
  {
2510
2548
  type: "button",
2511
2549
  className: "w-7 h-7 border border-[var(--border)] bg-[var(--card)] text-sm cursor-pointer rounded hover:border-[var(--primary)] hover:bg-[color-mix(in_srgb,var(--primary)_14%,var(--card))]",
2512
- onClick: () => k(new Date(N.getFullYear(), N.getMonth() - 1, 1)),
2513
- "aria-label": j.prevMonth,
2550
+ onClick: () => L(new Date(N.getFullYear(), N.getMonth() - 1, 1)),
2551
+ "aria-label": D.prevMonth,
2514
2552
  children: "<"
2515
2553
  }
2516
2554
  ),
2517
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold text-[var(--foreground)]", children: M }),
2555
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold text-[var(--foreground)]", children: $ }),
2518
2556
  /* @__PURE__ */ s(
2519
2557
  "button",
2520
2558
  {
2521
2559
  type: "button",
2522
2560
  className: "w-7 h-7 border border-[var(--border)] bg-[var(--card)] text-sm cursor-pointer rounded hover:border-[var(--primary)] hover:bg-[color-mix(in_srgb,var(--primary)_14%,var(--card))]",
2523
- onClick: () => k(new Date(N.getFullYear(), N.getMonth() + 1, 1)),
2524
- "aria-label": j.nextMonth,
2561
+ onClick: () => L(new Date(N.getFullYear(), N.getMonth() + 1, 1)),
2562
+ "aria-label": D.nextMonth,
2525
2563
  children: ">"
2526
2564
  }
2527
2565
  )
2528
2566
  ] }),
2529
- /* @__PURE__ */ L("div", { className: re.className, style: re.style, children: [
2530
- j.weekDays.map((g) => /* @__PURE__ */ s("div", { className: "w-[calc(100%/7)] text-center leading-[30px] text-xs text-[var(--muted-foreground)]", children: g }, g)),
2531
- F.map((g, V) => {
2532
- if (!g)
2567
+ /* @__PURE__ */ P("div", { className: re.className, style: re.style, children: [
2568
+ D.weekDays.map((f) => /* @__PURE__ */ s("div", { className: "w-[calc(100%/7)] text-center leading-[30px] text-xs text-[var(--muted-foreground)]", children: f }, f)),
2569
+ z.map((f, V) => {
2570
+ if (!f)
2533
2571
  return /* @__PURE__ */ s("div", { className: "w-[calc(100%/7)] text-center leading-[30px]" }, `empty-${V}`);
2534
- const ee = K(g);
2572
+ const ee = K(f);
2535
2573
  return /* @__PURE__ */ s(
2536
2574
  "button",
2537
2575
  {
2538
2576
  type: "button",
2539
- className: E(
2577
+ className: I(
2540
2578
  "w-[calc(100%/7)] text-center leading-[30px] border-none bg-transparent cursor-pointer rounded-md text-[13px] text-[var(--foreground)] hover:bg-[var(--muted)]",
2541
2579
  ee && "bg-[var(--primary)] text-[var(--primary-foreground)] hover:bg-[var(--primary)]"
2542
2580
  ),
2543
- onClick: () => R(g),
2544
- "aria-label": `${N.getFullYear()}-${(N.getMonth() + 1).toString().padStart(2, "0")}-${g.toString().padStart(2, "0")}`,
2545
- children: g
2581
+ onClick: () => R(f),
2582
+ "aria-label": `${N.getFullYear()}-${(N.getMonth() + 1).toString().padStart(2, "0")}-${f.toString().padStart(2, "0")}`,
2583
+ children: f
2546
2584
  },
2547
- `${N.getFullYear()}-${N.getMonth()}-${g}`
2585
+ `${N.getFullYear()}-${N.getMonth()}-${f}`
2548
2586
  );
2549
2587
  })
2550
2588
  ] }),
2551
- l && /* @__PURE__ */ L("div", { className: se.className, style: se.style, children: [
2552
- /* @__PURE__ */ s("div", { className: "text-xs text-[var(--muted-foreground)] mb-2", children: j.timeLabel }),
2553
- /* @__PURE__ */ L("div", { className: "flex items-center gap-2", children: [
2589
+ l && /* @__PURE__ */ P("div", { className: ae.className, style: ae.style, children: [
2590
+ /* @__PURE__ */ s("div", { className: "text-xs text-[var(--muted-foreground)] mb-2", children: D.timeLabel }),
2591
+ /* @__PURE__ */ P("div", { className: "flex items-center gap-2", children: [
2554
2592
  /* @__PURE__ */ s(
2555
2593
  "select",
2556
2594
  {
2557
2595
  className: "w-20 h-8 border border-[var(--border)] rounded-md px-2 text-[13px] outline-none bg-[var(--card)] text-[var(--foreground)] focus:border-[var(--primary)]",
2558
- value: y,
2596
+ value: S,
2559
2597
  onChange: Q,
2560
2598
  "aria-label": "小时",
2561
- children: ge.map((g) => /* @__PURE__ */ s("option", { value: g, children: g }, g))
2599
+ children: ge.map((f) => /* @__PURE__ */ s("option", { value: f, children: f }, f))
2562
2600
  }
2563
2601
  ),
2564
2602
  /* @__PURE__ */ s("span", { className: "font-semibold text-[var(--muted-foreground)]", children: ":" }),
@@ -2566,18 +2604,18 @@ function xr(e) {
2566
2604
  "select",
2567
2605
  {
2568
2606
  className: "w-20 h-8 border border-[var(--border)] rounded-md px-2 text-[13px] outline-none bg-[var(--card)] text-[var(--foreground)] focus:border-[var(--primary)]",
2569
- value: A,
2607
+ value: M,
2570
2608
  onChange: ue,
2571
2609
  "aria-label": "分钟",
2572
- children: fe.map((g) => /* @__PURE__ */ s("option", { value: g, children: g }, g))
2610
+ children: fe.map((f) => /* @__PURE__ */ s("option", { value: f, children: f }, f))
2573
2611
  }
2574
2612
  )
2575
2613
  ] }),
2576
- /* @__PURE__ */ L("div", { className: "mt-2.5 flex justify-end gap-2", children: [
2614
+ /* @__PURE__ */ P("div", { className: "mt-2.5 flex justify-end gap-2", children: [
2577
2615
  /* @__PURE__ */ s(
2578
2616
  ie,
2579
2617
  {
2580
- onClick: () => T(!1),
2618
+ onClick: () => k(!1),
2581
2619
  size: "small",
2582
2620
  type: "transparent",
2583
2621
  outline: !0,
@@ -2585,20 +2623,20 @@ function xr(e) {
2585
2623
  backgroundColor: "var(--datepicker-cancel-bg)",
2586
2624
  color: "var(--datepicker-cancel-fg)"
2587
2625
  },
2588
- children: j.cancel
2626
+ children: D.cancel
2589
2627
  }
2590
2628
  ),
2591
2629
  /* @__PURE__ */ s(
2592
2630
  ie,
2593
2631
  {
2594
- onClick: () => T(!1),
2632
+ onClick: () => k(!1),
2595
2633
  size: "small",
2596
2634
  style: {
2597
2635
  backgroundColor: "var(--datepicker-confirm-bg)",
2598
2636
  color: "var(--datepicker-confirm-fg)",
2599
2637
  borderColor: "var(--datepicker-confirm-bg)"
2600
2638
  },
2601
- children: j.confirm
2639
+ children: D.confirm
2602
2640
  }
2603
2641
  )
2604
2642
  ] })
@@ -2619,7 +2657,7 @@ xr.propTypes = {
2619
2657
  i18nKey: t.string,
2620
2658
  localeText: t.object
2621
2659
  };
2622
- const vr = ["overlay", "container", "header", "title", "closeBtn", "content", "footer"], Oe = {
2660
+ const vr = ["overlay", "container", "header", "title", "closeBtn", "content", "footer"], _e = {
2623
2661
  title: "基础标题",
2624
2662
  okText: "确定",
2625
2663
  cancelText: "取消",
@@ -2647,109 +2685,109 @@ function Tr(e) {
2647
2685
  onOk: i,
2648
2686
  type: u = "right",
2649
2687
  width: h,
2650
- height: d,
2651
- sx: p = {},
2652
- style: f = {},
2653
- className: w = "",
2654
- maskClosable: P = !0,
2655
- footerButtons: O,
2656
- localeText: D = {},
2657
- ...S
2658
- } = e, { t: v } = de(), x = Cr(u, "right", Sr), [C, m] = Z(!1), [y, z] = Z(!1);
2659
- ae(() => {
2688
+ height: m,
2689
+ sx: d = {},
2690
+ style: g = {},
2691
+ className: v = "",
2692
+ maskClosable: w = !0,
2693
+ footerButtons: C,
2694
+ localeText: F = {},
2695
+ ...O
2696
+ } = e, { t: y } = de(), x = Cr(u, "right", Sr), [T, p] = Z(!1), [S, _] = Z(!1);
2697
+ se(() => {
2660
2698
  if (l) {
2661
- m(!0);
2662
- const R = setTimeout(() => z(!0), 30);
2699
+ p(!0);
2700
+ const R = setTimeout(() => _(!0), 30);
2663
2701
  return () => clearTimeout(R);
2664
2702
  }
2665
- if (C) {
2666
- z(!1);
2667
- const R = setTimeout(() => m(!1), 300);
2703
+ if (T) {
2704
+ _(!1);
2705
+ const R = setTimeout(() => p(!1), 300);
2668
2706
  return () => clearTimeout(R);
2669
2707
  }
2670
- }, [l]), ae(() => {
2671
- if (C) {
2708
+ }, [l]), se(() => {
2709
+ if (T) {
2672
2710
  const R = parseInt(document.body.dataset.tangoScrollLock || "0", 10);
2673
2711
  return R === 0 && (document.body.dataset.tangoOriginalOverflow = document.body.style.overflow), document.body.dataset.tangoScrollLock = String(R + 1), document.body.style.overflow = "hidden", () => {
2674
2712
  const Q = parseInt(document.body.dataset.tangoScrollLock || "0", 10);
2675
2713
  Q <= 1 ? (document.body.style.overflow = document.body.dataset.tangoOriginalOverflow || "", delete document.body.dataset.tangoOriginalOverflow, delete document.body.dataset.tangoScrollLock) : document.body.dataset.tangoScrollLock = String(Q - 1);
2676
2714
  };
2677
2715
  }
2678
- }, [C]);
2679
- const A = {};
2680
- x === "left" || x === "right" ? A.width = h || "320px" : A.height = d || "300px";
2681
- const $ = {
2682
- title: r ?? v("drawer.title", Oe.title),
2683
- okText: n ?? v("drawer.okText", Oe.okText),
2684
- cancelText: c ?? v("drawer.cancelText", Oe.cancelText),
2685
- closeAriaLabel: v("drawer.closeAriaLabel", Oe.closeAriaLabel),
2686
- ...D
2687
- }, _ = W(p, vr), T = b({
2716
+ }, [T]);
2717
+ const M = {};
2718
+ x === "left" || x === "right" ? M.width = h || "320px" : M.height = m || "300px";
2719
+ const B = {
2720
+ title: r ?? y("drawer.title", _e.title),
2721
+ okText: n ?? y("drawer.okText", _e.okText),
2722
+ cancelText: c ?? y("drawer.cancelText", _e.cancelText),
2723
+ closeAriaLabel: y("drawer.closeAriaLabel", _e.closeAriaLabel),
2724
+ ...F
2725
+ }, A = H(d, vr), k = b({
2688
2726
  baseClassName: "fixed inset-0 z-[999] flex",
2689
- sxSlot: _.overlay
2727
+ sxSlot: A.overlay
2690
2728
  }), N = {
2691
- tw: E(_.root.tw, _.container.tw),
2692
- css: { ..._.root.css, ..._.container.css }
2693
- }, k = b({
2694
- baseClassName: E(
2729
+ tw: I(A.root.tw, A.container.tw),
2730
+ css: { ...A.root.css, ...A.container.css }
2731
+ }, L = b({
2732
+ baseClassName: I(
2695
2733
  "fixed bg-[var(--card)] text-[var(--foreground)] flex flex-col transition-all duration-300 ease-in-out",
2696
2734
  Nr[x]
2697
2735
  ),
2698
- className: w,
2736
+ className: v,
2699
2737
  style: {
2700
- ...A,
2701
- transform: y ? "translate(0, 0)" : wr[x],
2702
- ...f
2738
+ ...M,
2739
+ transform: S ? "translate(0, 0)" : wr[x],
2740
+ ...g
2703
2741
  },
2704
2742
  sxSlot: N
2705
- }), U = b({
2743
+ }), W = b({
2706
2744
  baseClassName: "flex items-center justify-between px-5 pt-5 pb-3 shrink-0",
2707
- sxSlot: _.header
2708
- }), j = b({
2745
+ sxSlot: A.header
2746
+ }), D = b({
2709
2747
  baseClassName: "text-lg font-bold text-[var(--foreground)]",
2710
- sxSlot: _.title
2711
- }), B = b({
2748
+ sxSlot: A.title
2749
+ }), E = b({
2712
2750
  baseClassName: "cursor-pointer p-1 rounded-md hover:bg-[var(--muted)] transition-colors text-[var(--muted-foreground)]",
2713
- sxSlot: _.closeBtn
2714
- }), M = b({
2751
+ sxSlot: A.closeBtn
2752
+ }), $ = b({
2715
2753
  baseClassName: "flex-1 overflow-auto overscroll-contain px-5 py-2 text-[var(--foreground)]",
2716
- sxSlot: _.content
2717
- }), F = b({
2754
+ sxSlot: A.content
2755
+ }), z = b({
2718
2756
  baseClassName: "flex justify-end gap-2 px-5 py-4 border-t border-[var(--border)] shrink-0",
2719
- sxSlot: _.footer
2720
- }), H = (R) => {
2721
- P && R.target === R.currentTarget && a();
2722
- }, K = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "20", height: "20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ s("path", { d: "M512 466.944l233.472-233.472a31.744 31.744 0 0 1 45.056 45.056L557.056 512l233.472 233.472a31.744 31.744 0 0 1-45.056 45.056L512 557.056l-233.472 233.472a31.744 31.744 0 0 1-45.056-45.056L466.944 512 233.472 278.528a31.744 31.744 0 0 1 45.056-45.056z" }) }), G = O != null && O.length ? O : [
2723
- { key: "cancel", text: $.cancelText, onClick: a },
2724
- { key: "ok", text: $.okText, onClick: i || a }
2757
+ sxSlot: A.footer
2758
+ }), U = (R) => {
2759
+ w && R.target === R.currentTarget && a();
2760
+ }, K = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "20", height: "20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ s("path", { d: "M512 466.944l233.472-233.472a31.744 31.744 0 0 1 45.056 45.056L557.056 512l233.472 233.472a31.744 31.744 0 0 1-45.056 45.056L512 557.056l-233.472 233.472a31.744 31.744 0 0 1-45.056-45.056L466.944 512 233.472 278.528a31.744 31.744 0 0 1 45.056-45.056z" }) }), G = C != null && C.length ? C : [
2761
+ { key: "cancel", text: B.cancelText, onClick: a },
2762
+ { key: "ok", text: B.okText, onClick: i || a }
2725
2763
  ];
2726
- return C ? /* @__PURE__ */ s(
2764
+ return T ? /* @__PURE__ */ s(
2727
2765
  "div",
2728
2766
  {
2729
- className: T.className,
2767
+ className: k.className,
2730
2768
  style: {
2731
- ...T.style,
2769
+ ...k.style,
2732
2770
  backgroundColor: "rgba(0, 0, 0, 0.5)",
2733
- opacity: y ? 1 : 0,
2771
+ opacity: S ? 1 : 0,
2734
2772
  transition: "opacity 300ms ease-in-out"
2735
2773
  },
2736
- onClick: H,
2774
+ onClick: U,
2737
2775
  role: "dialog",
2738
2776
  "aria-modal": "true",
2739
- "aria-label": $.title,
2740
- ...S,
2741
- children: /* @__PURE__ */ L("div", { className: k.className, style: k.style, children: [
2742
- /* @__PURE__ */ L("div", { className: U.className, style: U.style, children: [
2743
- /* @__PURE__ */ s("h3", { className: j.className, style: j.style, children: $.title }),
2777
+ "aria-label": B.title,
2778
+ ...O,
2779
+ children: /* @__PURE__ */ P("div", { className: L.className, style: L.style, children: [
2780
+ /* @__PURE__ */ P("div", { className: W.className, style: W.style, children: [
2781
+ /* @__PURE__ */ s("h3", { className: D.className, style: D.style, children: B.title }),
2744
2782
  /* @__PURE__ */ s(
2745
2783
  "div",
2746
2784
  {
2747
- className: B.className,
2748
- style: B.style,
2785
+ className: E.className,
2786
+ style: E.style,
2749
2787
  onClick: a,
2750
2788
  role: "button",
2751
2789
  tabIndex: 0,
2752
- "aria-label": $.closeAriaLabel,
2790
+ "aria-label": B.closeAriaLabel,
2753
2791
  onKeyDown: (R) => {
2754
2792
  (R.key === "Enter" || R.key === " ") && a();
2755
2793
  },
@@ -2757,8 +2795,8 @@ function Tr(e) {
2757
2795
  }
2758
2796
  )
2759
2797
  ] }),
2760
- /* @__PURE__ */ s("div", { className: M.className, style: M.style, children: o }),
2761
- /* @__PURE__ */ s("div", { className: F.className, style: F.style, children: G.map((R) => {
2798
+ /* @__PURE__ */ s("div", { className: $.className, style: $.style, children: o }),
2799
+ /* @__PURE__ */ s("div", { className: z.className, style: z.style, children: G.map((R) => {
2762
2800
  const Q = R.key === "ok";
2763
2801
  return /* @__PURE__ */ s(
2764
2802
  ie,
@@ -2808,7 +2846,7 @@ Tr.propTypes = {
2808
2846
  ),
2809
2847
  localeText: t.object
2810
2848
  };
2811
- const kr = ["root", "text"], Nt = {
2849
+ const kr = ["root", "text"], wt = {
2812
2850
  small: "my-0.5",
2813
2851
  medium: "my-1.5",
2814
2852
  large: "my-2.5",
@@ -2822,8 +2860,8 @@ function Lr(e, o) {
2822
2860
  size: l = "medium",
2823
2861
  children: a,
2824
2862
  ...i
2825
- } = e, u = W(r, kr), h = Nt[l] || Nt.medium, d = !!a, p = b({
2826
- baseClassName: E(
2863
+ } = e, u = H(r, kr), h = wt[l] || wt.medium, m = !!a, d = b({
2864
+ baseClassName: I(
2827
2865
  "flex items-center justify-center relative w-full",
2828
2866
  h
2829
2867
  ),
@@ -2831,7 +2869,7 @@ function Lr(e, o) {
2831
2869
  sxSlot: u.root,
2832
2870
  baseStyle: {},
2833
2871
  style: n
2834
- }), f = b({
2872
+ }), g = b({
2835
2873
  baseClassName: "px-2 whitespace-nowrap z-[1]",
2836
2874
  sxSlot: u.text
2837
2875
  });
@@ -2840,25 +2878,25 @@ function Lr(e, o) {
2840
2878
  // 导致的问题:universal 页面出现 "<p> 标签内部不能嵌套 <div> 标签" 的 HTML 嵌套错误
2841
2879
  // 解决办法:将外层容器从 <div> 改为 <span>(phrasing content),内部用 flex 布局保持视觉效果
2842
2880
  // fixed by clayw on 20260523 night
2843
- /* @__PURE__ */ L(
2881
+ /* @__PURE__ */ P(
2844
2882
  "span",
2845
2883
  {
2846
2884
  ref: o,
2847
- className: p.className,
2848
- style: { ...p.style, display: "flex", alignItems: "center", justifyContent: "center" },
2885
+ className: d.className,
2886
+ style: { ...d.style, display: "flex", alignItems: "center", justifyContent: "center" },
2849
2887
  ...i,
2850
2888
  children: [
2851
2889
  /* @__PURE__ */ s(
2852
2890
  "span",
2853
2891
  {
2854
- className: `flex-1 h-px bg-[var(--line-color)] ${d ? "mr-2.5" : ""}`
2892
+ className: `flex-1 h-px bg-[var(--line-color)] ${m ? "mr-2.5" : ""}`
2855
2893
  }
2856
2894
  ),
2857
- d && /* @__PURE__ */ s("span", { className: f.className, style: f.style, children: a }),
2895
+ m && /* @__PURE__ */ s("span", { className: g.className, style: g.style, children: a }),
2858
2896
  /* @__PURE__ */ s(
2859
2897
  "span",
2860
2898
  {
2861
- className: `flex-1 h-px bg-[var(--line-color)] ${d ? "ml-2.5" : ""}`
2899
+ className: `flex-1 h-px bg-[var(--line-color)] ${m ? "ml-2.5" : ""}`
2862
2900
  }
2863
2901
  )
2864
2902
  ]
@@ -2866,16 +2904,16 @@ function Lr(e, o) {
2866
2904
  )
2867
2905
  );
2868
2906
  }
2869
- const $t = te.forwardRef(Lr);
2870
- $t.displayName = "Line";
2871
- $t.propTypes = {
2907
+ const Bt = te.forwardRef(Lr);
2908
+ Bt.displayName = "Line";
2909
+ Bt.propTypes = {
2872
2910
  size: t.oneOf(["small", "medium", "large", "huge"]),
2873
2911
  sx: t.oneOfType([t.string, t.object]),
2874
2912
  style: t.object,
2875
2913
  className: t.string,
2876
2914
  children: t.node
2877
2915
  };
2878
- const Pr = ["root"], wt = {
2916
+ const Pr = ["root"], Ct = {
2879
2917
  default: "bg-[var(--mark-default-bg)]",
2880
2918
  primary: "bg-[var(--mark-primary-bg)]",
2881
2919
  success: "bg-[var(--mark-success-bg)]",
@@ -2891,10 +2929,10 @@ function Or(e, o) {
2891
2929
  beauty: a = !1,
2892
2930
  children: i,
2893
2931
  ...u
2894
- } = e, h = W(r, Pr), d = wt[l] || wt.default, p = b({
2895
- baseClassName: E(
2932
+ } = e, h = H(r, Pr), m = Ct[l] || Ct.default, d = b({
2933
+ baseClassName: I(
2896
2934
  "inline-block",
2897
- d,
2935
+ m,
2898
2936
  a ? "px-2 py-1 rounded" : ""
2899
2937
  ),
2900
2938
  className: c,
@@ -2906,16 +2944,16 @@ function Or(e, o) {
2906
2944
  "mark",
2907
2945
  {
2908
2946
  ref: o,
2909
- className: p.className,
2910
- style: p.style,
2947
+ className: d.className,
2948
+ style: d.style,
2911
2949
  ...u,
2912
2950
  children: i
2913
2951
  }
2914
2952
  );
2915
2953
  }
2916
- const Bt = te.forwardRef(Or);
2917
- Bt.displayName = "Mark";
2918
- Bt.propTypes = {
2954
+ const It = te.forwardRef(Or);
2955
+ It.displayName = "Mark";
2956
+ It.propTypes = {
2919
2957
  color: t.oneOf(["default", "primary", "success", "warning", "danger"]),
2920
2958
  beauty: t.bool,
2921
2959
  sx: t.oneOfType([t.string, t.object]),
@@ -2923,7 +2961,7 @@ Bt.propTypes = {
2923
2961
  className: t.string,
2924
2962
  children: t.node
2925
2963
  };
2926
- const _r = ["overlay", "container", "header", "title", "closeBtn", "content", "footer"], _e = {
2964
+ const _r = ["overlay", "container", "header", "title", "closeBtn", "content", "footer"], Ae = {
2927
2965
  title: "基础标题",
2928
2966
  okText: "确定",
2929
2967
  cancelText: "取消",
@@ -2941,48 +2979,48 @@ function Ar(e) {
2941
2979
  onOk: i,
2942
2980
  width: u,
2943
2981
  sx: h = {},
2944
- style: d = {},
2945
- className: p = "",
2946
- maskClosable: f = !0,
2947
- footerButtons: w,
2948
- localeText: P = {},
2949
- ...O
2950
- } = e, { t: D } = de(), [S, v] = Z(!1), [x, C] = Z(!1);
2951
- ae(() => {
2982
+ style: m = {},
2983
+ className: d = "",
2984
+ maskClosable: g = !0,
2985
+ footerButtons: v,
2986
+ localeText: w = {},
2987
+ ...C
2988
+ } = e, { t: F } = de(), [O, y] = Z(!1), [x, T] = Z(!1);
2989
+ se(() => {
2952
2990
  if (l) {
2953
- v(!0);
2954
- const F = setTimeout(() => C(!0), 30);
2955
- return () => clearTimeout(F);
2991
+ y(!0);
2992
+ const z = setTimeout(() => T(!0), 30);
2993
+ return () => clearTimeout(z);
2956
2994
  }
2957
- if (S) {
2958
- C(!1);
2959
- const F = setTimeout(() => v(!1), 300);
2960
- return () => clearTimeout(F);
2995
+ if (O) {
2996
+ T(!1);
2997
+ const z = setTimeout(() => y(!1), 300);
2998
+ return () => clearTimeout(z);
2961
2999
  }
2962
- }, [l]), ae(() => {
2963
- if (S) {
2964
- const F = parseInt(document.body.dataset.tangoScrollLock || "0", 10);
2965
- return F === 0 && (document.body.dataset.tangoOriginalOverflow = document.body.style.overflow), document.body.dataset.tangoScrollLock = String(F + 1), document.body.style.overflow = "hidden", () => {
2966
- const H = parseInt(document.body.dataset.tangoScrollLock || "0", 10);
2967
- H <= 1 ? (document.body.style.overflow = document.body.dataset.tangoOriginalOverflow || "", delete document.body.dataset.tangoOriginalOverflow, delete document.body.dataset.tangoScrollLock) : document.body.dataset.tangoScrollLock = String(H - 1);
3000
+ }, [l]), se(() => {
3001
+ if (O) {
3002
+ const z = parseInt(document.body.dataset.tangoScrollLock || "0", 10);
3003
+ return z === 0 && (document.body.dataset.tangoOriginalOverflow = document.body.style.overflow), document.body.dataset.tangoScrollLock = String(z + 1), document.body.style.overflow = "hidden", () => {
3004
+ const U = parseInt(document.body.dataset.tangoScrollLock || "0", 10);
3005
+ U <= 1 ? (document.body.style.overflow = document.body.dataset.tangoOriginalOverflow || "", delete document.body.dataset.tangoOriginalOverflow, delete document.body.dataset.tangoScrollLock) : document.body.dataset.tangoScrollLock = String(U - 1);
2968
3006
  };
2969
3007
  }
2970
- }, [S]);
2971
- const m = {
2972
- title: r ?? D("modal.title", _e.title),
2973
- okText: n ?? D("modal.okText", _e.okText),
2974
- cancelText: c ?? D("modal.cancelText", _e.cancelText),
2975
- closeAriaLabel: D("modal.closeAriaLabel", _e.closeAriaLabel),
2976
- ...P
2977
- }, y = W(h, _r), z = b({
3008
+ }, [O]);
3009
+ const p = {
3010
+ title: r ?? F("modal.title", Ae.title),
3011
+ okText: n ?? F("modal.okText", Ae.okText),
3012
+ cancelText: c ?? F("modal.cancelText", Ae.cancelText),
3013
+ closeAriaLabel: F("modal.closeAriaLabel", Ae.closeAriaLabel),
3014
+ ...w
3015
+ }, S = H(h, _r), _ = b({
2978
3016
  baseClassName: "fixed inset-0 z-[999] flex justify-center items-center",
2979
- sxSlot: y.overlay
2980
- }), A = {
2981
- tw: E(y.root.tw, y.container.tw),
2982
- css: { ...y.root.css, ...y.container.css }
2983
- }, $ = b({
3017
+ sxSlot: S.overlay
3018
+ }), M = {
3019
+ tw: I(S.root.tw, S.container.tw),
3020
+ css: { ...S.root.css, ...S.container.css }
3021
+ }, B = b({
2984
3022
  baseClassName: "bg-[var(--modal-bg)] text-[var(--foreground)] flex flex-col rounded-[var(--radius)] shadow-[var(--modal-shadow)] transition-all duration-300 ease-in-out",
2985
- className: p,
3023
+ className: d,
2986
3024
  style: {
2987
3025
  width: u || "520px",
2988
3026
  maxWidth: "90vw",
@@ -2990,48 +3028,48 @@ function Ar(e) {
2990
3028
  maxHeight: "80vh",
2991
3029
  transform: x ? "scale(1)" : "scale(0.8)",
2992
3030
  opacity: x ? 1 : 0,
2993
- ...d
3031
+ ...m
2994
3032
  },
2995
- sxSlot: A
2996
- }), _ = b({
3033
+ sxSlot: M
3034
+ }), A = b({
2997
3035
  baseClassName: "flex items-center justify-between px-5 pt-5 pb-3 shrink-0",
2998
- sxSlot: y.header
2999
- }), T = b({
3036
+ sxSlot: S.header
3037
+ }), k = b({
3000
3038
  baseClassName: "text-lg font-bold text-[var(--foreground)]",
3001
- sxSlot: y.title
3039
+ sxSlot: S.title
3002
3040
  }), N = b({
3003
3041
  baseClassName: "cursor-pointer p-1 rounded-md hover:bg-[var(--muted)] transition-colors text-[var(--muted-foreground)]",
3004
- sxSlot: y.closeBtn
3005
- }), k = b({
3042
+ sxSlot: S.closeBtn
3043
+ }), L = b({
3006
3044
  baseClassName: "flex-1 overflow-auto overscroll-contain px-6 py-5 text-[var(--foreground)]",
3007
- sxSlot: y.content
3008
- }), U = b({
3045
+ sxSlot: S.content
3046
+ }), W = b({
3009
3047
  baseClassName: "flex justify-end gap-2 px-5 py-4 border-t border-[var(--border)] shrink-0",
3010
- sxSlot: y.footer
3011
- }), j = (F) => {
3012
- f && F.target === F.currentTarget && a();
3013
- }, B = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "20", height: "20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ s("path", { d: "M512 466.944l233.472-233.472a31.744 31.744 0 0 1 45.056 45.056L557.056 512l233.472 233.472a31.744 31.744 0 0 1-45.056 45.056L512 557.056l-233.472 233.472a31.744 31.744 0 0 1-45.056-45.056L466.944 512 233.472 278.528a31.744 31.744 0 0 1 45.056-45.056z" }) }), M = w != null && w.length ? w : [
3014
- { key: "cancel", text: m.cancelText, onClick: a },
3015
- { key: "ok", text: m.okText, onClick: i || a }
3048
+ sxSlot: S.footer
3049
+ }), D = (z) => {
3050
+ g && z.target === z.currentTarget && a();
3051
+ }, E = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "20", height: "20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ s("path", { d: "M512 466.944l233.472-233.472a31.744 31.744 0 0 1 45.056 45.056L557.056 512l233.472 233.472a31.744 31.744 0 0 1-45.056 45.056L512 557.056l-233.472 233.472a31.744 31.744 0 0 1-45.056-45.056L466.944 512 233.472 278.528a31.744 31.744 0 0 1 45.056-45.056z" }) }), $ = v != null && v.length ? v : [
3052
+ { key: "cancel", text: p.cancelText, onClick: a },
3053
+ { key: "ok", text: p.okText, onClick: i || a }
3016
3054
  ];
3017
- return S ? /* @__PURE__ */ s(
3055
+ return O ? /* @__PURE__ */ s(
3018
3056
  "div",
3019
3057
  {
3020
- className: z.className,
3058
+ className: _.className,
3021
3059
  style: {
3022
- ...z.style,
3060
+ ..._.style,
3023
3061
  backgroundColor: "rgba(0, 0, 0, 0.5)",
3024
3062
  opacity: x ? 1 : 0,
3025
3063
  transition: "opacity 300ms ease-in-out"
3026
3064
  },
3027
- onClick: j,
3065
+ onClick: D,
3028
3066
  role: "dialog",
3029
3067
  "aria-modal": "true",
3030
- "aria-label": m.title,
3031
- ...O,
3032
- children: /* @__PURE__ */ L("div", { className: $.className, style: $.style, children: [
3033
- /* @__PURE__ */ L("div", { className: _.className, style: _.style, children: [
3034
- /* @__PURE__ */ s("h3", { className: T.className, style: T.style, children: m.title }),
3068
+ "aria-label": p.title,
3069
+ ...C,
3070
+ children: /* @__PURE__ */ P("div", { className: B.className, style: B.style, children: [
3071
+ /* @__PURE__ */ P("div", { className: A.className, style: A.style, children: [
3072
+ /* @__PURE__ */ s("h3", { className: k.className, style: k.style, children: p.title }),
3035
3073
  /* @__PURE__ */ s(
3036
3074
  "div",
3037
3075
  {
@@ -3040,25 +3078,25 @@ function Ar(e) {
3040
3078
  onClick: a,
3041
3079
  role: "button",
3042
3080
  tabIndex: 0,
3043
- "aria-label": m.closeAriaLabel,
3044
- onKeyDown: (F) => {
3045
- (F.key === "Enter" || F.key === " ") && a();
3081
+ "aria-label": p.closeAriaLabel,
3082
+ onKeyDown: (z) => {
3083
+ (z.key === "Enter" || z.key === " ") && a();
3046
3084
  },
3047
- children: B
3085
+ children: E
3048
3086
  }
3049
3087
  )
3050
3088
  ] }),
3051
- /* @__PURE__ */ s("div", { className: k.className, style: k.style, children: o }),
3052
- /* @__PURE__ */ s("div", { className: U.className, style: U.style, children: M.map((F) => {
3053
- const H = F.key === "ok";
3089
+ /* @__PURE__ */ s("div", { className: L.className, style: L.style, children: o }),
3090
+ /* @__PURE__ */ s("div", { className: W.className, style: W.style, children: $.map((z) => {
3091
+ const U = z.key === "ok";
3054
3092
  return /* @__PURE__ */ s(
3055
3093
  ie,
3056
3094
  {
3057
- onClick: F.onClick,
3095
+ onClick: z.onClick,
3058
3096
  type: "default",
3059
- outline: !H,
3097
+ outline: !U,
3060
3098
  size: "medium",
3061
- style: H ? {
3099
+ style: U ? {
3062
3100
  backgroundColor: "var(--modal-ok-bg)",
3063
3101
  color: "var(--modal-ok-fg)",
3064
3102
  borderColor: "var(--modal-ok-bg)"
@@ -3066,9 +3104,9 @@ function Ar(e) {
3066
3104
  backgroundColor: "var(--modal-cancel-bg)",
3067
3105
  color: "var(--modal-cancel-fg)"
3068
3106
  },
3069
- children: F.text
3107
+ children: z.text
3070
3108
  },
3071
- F.key
3109
+ z.key
3072
3110
  );
3073
3111
  }) })
3074
3112
  ] })
@@ -3112,7 +3150,7 @@ const Mr = ["root", "input", "button"], zr = {
3112
3150
  medium: "small",
3113
3151
  large: "medium",
3114
3152
  huge: "medium"
3115
- }, Ct = {
3153
+ }, Tt = {
3116
3154
  placeholder: "请输入内容",
3117
3155
  btnText: "搜索"
3118
3156
  }, Br = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
@@ -3123,79 +3161,81 @@ function Ir(e) {
3123
3161
  style: n = {},
3124
3162
  className: c = "",
3125
3163
  onSearch: l,
3126
- value: a,
3127
- defaultValue: i,
3128
- disabled: u = !1,
3129
- placeholder: h,
3164
+ onChange: a,
3165
+ value: i,
3166
+ defaultValue: u,
3167
+ disabled: h = !1,
3168
+ placeholder: m,
3130
3169
  btnText: d,
3131
- localeText: p,
3132
- path: f = "",
3170
+ localeText: g,
3171
+ path: v = "",
3133
3172
  ...w
3134
- } = e, { t: P } = de(), O = $e(null), D = Br(o, "medium", zr), S = a !== void 0, v = P("search.placeholder", Ct.placeholder), x = P("search.btnText", Ct.btnText), C = h ?? (p == null ? void 0 : p.placeholder) ?? v, m = d ?? (p == null ? void 0 : p.btnText) ?? x, y = W(r, Mr), z = {
3135
- tw: E(y.root.tw, y.input.tw),
3136
- css: { ...y.root.css, ...y.input.css }
3137
- }, A = E("relative inline-flex", y.root.tw), $ = E(
3173
+ } = e, { t: C } = de(), F = ke(null), O = Br(o, "medium", zr), y = i !== void 0, x = C("search.placeholder", Tt.placeholder), T = C("search.btnText", Tt.btnText), p = m ?? (g == null ? void 0 : g.placeholder) ?? x, S = d ?? (g == null ? void 0 : g.btnText) ?? T, _ = H(r, Mr), M = {
3174
+ tw: I(_.root.tw, _.input.tw),
3175
+ css: { ..._.root.css, ..._.input.css }
3176
+ }, B = I("relative inline-flex", _.root.tw), A = I(
3138
3177
  "w-[300px] rounded-[var(--radius)] border bg-[var(--input-bg)] text-[var(--foreground)] outline-none transition-all duration-200 ease-in-out",
3139
3178
  "border-[var(--border)] shadow-[var(--input-shadow)]",
3140
3179
  "hover:border-[var(--input-accent)]",
3141
3180
  "focus:border-[var(--input-accent)] focus:shadow-[var(--input-focus-shadow)]",
3142
- u && "bg-[var(--muted)] text-[var(--muted-foreground)] border-[var(--muted)] cursor-not-allowed shadow-none hover:border-[var(--muted)] focus:shadow-none",
3143
- Er[D]
3144
- ), _ = b({
3145
- baseClassName: $,
3181
+ h && "bg-[var(--muted)] text-[var(--muted-foreground)] border-[var(--muted)] cursor-not-allowed shadow-none hover:border-[var(--muted)] focus:shadow-none",
3182
+ Er[O]
3183
+ ), k = b({
3184
+ baseClassName: A,
3146
3185
  className: c,
3147
3186
  style: n,
3148
- sxSlot: z
3149
- }), T = b({
3187
+ sxSlot: M
3188
+ }), N = b({
3150
3189
  baseClassName: "absolute top-1/2 -translate-y-1/2",
3151
- sxSlot: y.button,
3190
+ sxSlot: _.button,
3152
3191
  style: { right: "calc(var(--spacing) * 2)" }
3153
- }), N = {
3154
- right: T.style.right
3155
- }, k = { ...T.style };
3156
- delete k.right;
3157
- const U = oe(() => {
3158
- var M;
3159
- return S ? a : ((M = O.current) == null ? void 0 : M.value) ?? "";
3160
- }, [S, a]), j = oe(() => {
3161
- l == null || l(U());
3162
- }, [l, U]), B = oe((M) => {
3163
- M.key === "Enter" && j();
3164
- }, [j]);
3165
- return /* @__PURE__ */ L("div", { className: A, children: [
3192
+ }), L = {
3193
+ right: N.style.right
3194
+ }, W = { ...N.style };
3195
+ delete W.right;
3196
+ const D = oe(() => {
3197
+ var z;
3198
+ return y ? i : ((z = F.current) == null ? void 0 : z.value) ?? "";
3199
+ }, [y, i]), E = oe(() => {
3200
+ l == null || l(D());
3201
+ }, [l, D]), $ = oe((z) => {
3202
+ z.key === "Enter" && E();
3203
+ }, [E]);
3204
+ return /* @__PURE__ */ P("div", { className: B, children: [
3166
3205
  /* @__PURE__ */ s(
3167
3206
  "input",
3168
3207
  {
3169
- ref: S ? void 0 : O,
3170
- className: _.className,
3171
- style: _.style,
3172
- onKeyDown: B,
3173
- value: S ? a : void 0,
3174
- defaultValue: S ? void 0 : i ?? "",
3175
- disabled: u || void 0,
3176
- placeholder: C,
3208
+ ref: y ? void 0 : F,
3209
+ className: k.className,
3210
+ style: k.style,
3211
+ onKeyDown: $,
3212
+ onChange: a,
3213
+ value: y ? i : void 0,
3214
+ defaultValue: y ? void 0 : u ?? "",
3215
+ disabled: h || void 0,
3216
+ placeholder: p,
3177
3217
  type: "text",
3178
3218
  role: "searchbox",
3179
- "aria-label": C,
3219
+ "aria-label": p,
3180
3220
  ...w
3181
3221
  }
3182
3222
  ),
3183
- /* @__PURE__ */ s("div", { className: T.className, style: N, children: /* @__PURE__ */ s(
3223
+ /* @__PURE__ */ s("div", { className: N.className, style: L, children: /* @__PURE__ */ s(
3184
3224
  ie,
3185
3225
  {
3186
- onClick: j,
3187
- size: $r[D],
3188
- disabled: u,
3189
- "aria-label": m,
3190
- style: k,
3191
- children: f ? /* @__PURE__ */ s(
3226
+ onClick: E,
3227
+ size: $r[O],
3228
+ disabled: h,
3229
+ "aria-label": S,
3230
+ style: W,
3231
+ children: v ? /* @__PURE__ */ s(
3192
3232
  "img",
3193
3233
  {
3194
- src: f,
3234
+ src: v,
3195
3235
  alt: "search-icon",
3196
3236
  style: { width: 16, height: 16, marginTop: 2, marginBottom: -3 }
3197
3237
  }
3198
- ) : m
3238
+ ) : S
3199
3239
  }
3200
3240
  ) })
3201
3241
  ] });
@@ -3206,6 +3246,7 @@ Ir.propTypes = {
3206
3246
  style: t.object,
3207
3247
  className: t.string,
3208
3248
  onSearch: t.func,
3249
+ onChange: t.func,
3209
3250
  value: t.string,
3210
3251
  defaultValue: t.string,
3211
3252
  disabled: t.bool,
@@ -3217,7 +3258,7 @@ Ir.propTypes = {
3217
3258
  }),
3218
3259
  path: t.string
3219
3260
  };
3220
- const It = {
3261
+ const jt = {
3221
3262
  default: "",
3222
3263
  inline: "inline-block",
3223
3264
  circle: "rounded-full",
@@ -3226,7 +3267,7 @@ const It = {
3226
3267
  fixed: "fixed",
3227
3268
  absolute: "absolute",
3228
3269
  relative: "relative"
3229
- }, jt = Object.keys(It), jr = ["root"];
3270
+ }, Ft = Object.keys(jt), jr = ["root"];
3230
3271
  function Fr(e, o) {
3231
3272
  const {
3232
3273
  sx: r = {},
@@ -3245,34 +3286,34 @@ function Fr(e, o) {
3245
3286
  *
3246
3287
  */
3247
3288
  ...i
3248
- } = e, u = jt.includes(l) ? l : "default", h = W(r, jr), d = b({
3249
- baseClassName: It[u],
3289
+ } = e, u = Ft.includes(l) ? l : "default", h = H(r, jr), m = b({
3290
+ baseClassName: jt[u],
3250
3291
  className: c,
3251
3292
  sxSlot: h.root
3252
- }), p = u === "halfCircle" ? { width: "var(--space-half-circle-w)", height: "var(--space-half-circle-h)", background: "var(--space-half-circle-color)" } : {};
3293
+ }), d = u === "halfCircle" ? { width: "var(--space-half-circle-w)", height: "var(--space-half-circle-h)", background: "var(--space-half-circle-color)" } : {};
3253
3294
  return (
3254
3295
  // 这里直接透传给原生div,用户用起来就像使用普通 div 一样,dom也是div
3255
3296
  /* @__PURE__ */ s(
3256
3297
  "div",
3257
3298
  {
3258
3299
  ref: o,
3259
- className: d.className,
3260
- style: { ...p, ...d.style, ...n },
3300
+ className: m.className,
3301
+ style: { ...d, ...m.style, ...n },
3261
3302
  ...i,
3262
3303
  children: a
3263
3304
  }
3264
3305
  )
3265
3306
  );
3266
3307
  }
3267
- const Ft = te.forwardRef(Fr);
3268
- Ft.propTypes = {
3269
- type: t.oneOf(jt),
3308
+ const Dt = te.forwardRef(Fr);
3309
+ Dt.propTypes = {
3310
+ type: t.oneOf(Ft),
3270
3311
  sx: t.oneOfType([t.string, t.object]),
3271
3312
  style: t.object,
3272
3313
  className: t.string,
3273
3314
  children: t.node
3274
3315
  };
3275
- Ft.displayName = "Space";
3316
+ Dt.displayName = "Space";
3276
3317
  const Dr = ["root", "wrapper", "thead", "headerCell", "body", "row", "cell", "empty", "pagination"], ve = {
3277
3318
  empty: "暂无数据",
3278
3319
  prev: "上一页",
@@ -3280,7 +3321,7 @@ const Dr = ["root", "wrapper", "thead", "headerCell", "body", "row", "cell", "em
3280
3321
  page: "页",
3281
3322
  total: "共 {total} 条",
3282
3323
  perPage: "条/页"
3283
- }, Rr = 10, Vr = [10, 20, 50, 100], Ae = (e, ...o) => typeof e == "function" ? e(...o) : e ?? {};
3324
+ }, Rr = 10, Vr = [10, 20, 50, 100], Me = (e, ...o) => typeof e == "function" ? e(...o) : e ?? {};
3284
3325
  function Yr(e) {
3285
3326
  const {
3286
3327
  dataSource: o = [],
@@ -3297,45 +3338,45 @@ function Yr(e) {
3297
3338
  rowClassName: u,
3298
3339
  rowStyle: h,
3299
3340
  /* 单元格回调 */
3300
- cellClassName: d,
3301
- cellStyle: p,
3341
+ cellClassName: m,
3342
+ cellStyle: d,
3302
3343
  /* hover */
3303
- hoverColor: f = "",
3344
+ hoverColor: g = "",
3304
3345
  /* i18n */
3305
- i18nKey: w = null,
3306
- localeText: P = {},
3346
+ i18nKey: v = null,
3347
+ localeText: w = {},
3307
3348
  /* 无障碍 */
3308
- "aria-label": O,
3309
- ...D
3310
- } = e, { t: S } = de();
3349
+ "aria-label": C,
3350
+ ...F
3351
+ } = e, { t: O } = de();
3311
3352
  o.length === 0 && r.length === 0 && console.warn("[Tango Table] dataSource 和 columns 不能同时为空,请至少提供一项。");
3312
- const v = {
3313
- empty: S("table.empty", ve.empty),
3314
- prev: S("table.prev", ve.prev),
3315
- next: S("table.next", ve.next),
3316
- page: S("table.page", ve.page),
3317
- total: S("table.total", ve.total),
3318
- perPage: S("table.perPage", ve.perPage),
3319
- ...P
3320
- }, x = Array.isArray(i) ? i : typeof i == "string" ? [i] : [], C = Se(
3353
+ const y = {
3354
+ empty: O("table.empty", ve.empty),
3355
+ prev: O("table.prev", ve.prev),
3356
+ next: O("table.next", ve.next),
3357
+ page: O("table.page", ve.page),
3358
+ total: O("table.total", ve.total),
3359
+ perPage: O("table.perPage", ve.perPage),
3360
+ ...w
3361
+ }, x = Array.isArray(i) ? i : typeof i == "string" ? [i] : [], T = Se(
3321
3362
  () => r.filter((J) => !J.hide && !x.includes(J.dataIndex)),
3322
3363
  [r, x]
3323
- ), m = a !== null && a !== !1, y = a && a.placement || "bottom", z = a && a.pageSize || Rr, A = a && a.pageSizeOptions || Vr, $ = (a == null ? void 0 : a.showTotal) !== !1, _ = (a == null ? void 0 : a.showSizeChanger) !== !1, [T, N] = Z(1), [k, U] = Z(z), j = o.length, B = Math.max(1, Math.ceil(j / k)), M = Math.min(T, B), F = Se(() => {
3324
- if (!m) return o;
3325
- const J = (M - 1) * k;
3326
- return o.slice(J, J + k);
3327
- }, [o, M, k, m]), H = oe(
3328
- (J) => N(Math.max(1, Math.min(J, B))),
3329
- [B]
3330
- ), K = W(n, Dr), G = b({
3331
- baseClassName: E(
3364
+ ), p = a !== null && a !== !1, S = a && a.placement || "bottom", _ = a && a.pageSize || Rr, M = a && a.pageSizeOptions || Vr, B = (a == null ? void 0 : a.showTotal) !== !1, A = (a == null ? void 0 : a.showSizeChanger) !== !1, [k, N] = Z(1), [L, W] = Z(_), D = o.length, E = Math.max(1, Math.ceil(D / L)), $ = Math.min(k, E), z = Se(() => {
3365
+ if (!p) return o;
3366
+ const J = ($ - 1) * L;
3367
+ return o.slice(J, J + L);
3368
+ }, [o, $, L, p]), U = oe(
3369
+ (J) => N(Math.max(1, Math.min(J, E))),
3370
+ [E]
3371
+ ), K = H(n, Dr), G = b({
3372
+ baseClassName: I(
3332
3373
  "w-full overflow-x-auto rounded-xl border border-[var(--border)]",
3333
3374
  "shadow-[0_0_20px_color-mix(in_oklch,var(--foreground)_8%,transparent)]"
3334
3375
  ),
3335
3376
  className: l,
3336
3377
  style: c,
3337
3378
  sxSlot: {
3338
- tw: E(K.root.tw, K.wrapper.tw),
3379
+ tw: I(K.root.tw, K.wrapper.tw),
3339
3380
  css: { ...K.root.css, ...K.wrapper.css }
3340
3381
  }
3341
3382
  }), R = b({
@@ -3350,88 +3391,88 @@ function Yr(e) {
3350
3391
  }), be = b({
3351
3392
  baseClassName: "flex items-center justify-between px-4 py-3 text-sm text-[var(--muted-foreground)] border-t border-[var(--border)]",
3352
3393
  sxSlot: K.pagination
3353
- }), ge = f ? /* @__PURE__ */ s("style", { children: `
3394
+ }), ge = g ? /* @__PURE__ */ s("style", { children: `
3354
3395
  [data-tango-table-body] tr:hover {
3355
- background-color: ${f} !important;
3396
+ background-color: ${g} !important;
3356
3397
  transform: translateY(-1px);
3357
3398
  box-shadow: 0 2px 8px color-mix(in oklch, var(--foreground) 5%, transparent);
3358
3399
  }
3359
3400
  ` }) : null, fe = () => {
3360
- if (!m) return null;
3361
- const J = Array.from({ length: B }, (I, q) => q + 1);
3362
- return /* @__PURE__ */ L("div", { className: be.className, style: be.style, children: [
3363
- /* @__PURE__ */ L("div", { className: "flex items-center gap-3", children: [
3364
- $ && /* @__PURE__ */ s("span", { children: v.total.replace("{total}", String(j)) }),
3365
- _ && /* @__PURE__ */ s(
3401
+ if (!p) return null;
3402
+ const J = Array.from({ length: E }, (j, q) => q + 1);
3403
+ return /* @__PURE__ */ P("div", { className: be.className, style: be.style, children: [
3404
+ /* @__PURE__ */ P("div", { className: "flex items-center gap-3", children: [
3405
+ B && /* @__PURE__ */ s("span", { children: y.total.replace("{total}", String(D)) }),
3406
+ A && /* @__PURE__ */ s(
3366
3407
  "select",
3367
3408
  {
3368
- value: k,
3369
- onChange: (I) => {
3370
- U(Number(I.target.value)), N(1);
3409
+ value: L,
3410
+ onChange: (j) => {
3411
+ W(Number(j.target.value)), N(1);
3371
3412
  },
3372
3413
  className: "rounded border border-[var(--border)] bg-[var(--background)] px-2 py-1 text-sm cursor-pointer",
3373
- "aria-label": v.perPage,
3374
- children: A.map((I) => /* @__PURE__ */ L("option", { value: I, children: [
3375
- I,
3414
+ "aria-label": y.perPage,
3415
+ children: M.map((j) => /* @__PURE__ */ P("option", { value: j, children: [
3416
+ j,
3376
3417
  " ",
3377
- v.perPage
3378
- ] }, I))
3418
+ y.perPage
3419
+ ] }, j))
3379
3420
  }
3380
3421
  )
3381
3422
  ] }),
3382
- /* @__PURE__ */ L("div", { className: "flex items-center gap-1", children: [
3423
+ /* @__PURE__ */ P("div", { className: "flex items-center gap-1", children: [
3383
3424
  /* @__PURE__ */ s(
3384
3425
  "button",
3385
3426
  {
3386
3427
  type: "button",
3387
- onClick: () => H(M - 1),
3388
- disabled: M <= 1,
3428
+ onClick: () => U($ - 1),
3429
+ disabled: $ <= 1,
3389
3430
  className: "px-2 py-1 rounded border border-[var(--border)] text-xs disabled:opacity-40 disabled:cursor-not-allowed hover:bg-[var(--accent)] transition-colors",
3390
- "aria-label": v.prev,
3391
- children: v.prev
3431
+ "aria-label": y.prev,
3432
+ children: y.prev
3392
3433
  }
3393
3434
  ),
3394
- J.length <= 7 ? J.map((I) => /* @__PURE__ */ s(
3435
+ J.length <= 7 ? J.map((j) => /* @__PURE__ */ s(
3395
3436
  "button",
3396
3437
  {
3397
3438
  type: "button",
3398
- onClick: () => H(I),
3399
- className: `min-w-[28px] px-2 py-1 rounded text-xs transition-colors ${I === M ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"}`,
3400
- children: I
3439
+ onClick: () => U(j),
3440
+ className: `min-w-[28px] px-2 py-1 rounded text-xs transition-colors ${j === $ ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"}`,
3441
+ children: j
3401
3442
  },
3402
- I
3403
- )) : /* @__PURE__ */ L(Ne, { children: [
3443
+ j
3444
+ )) : /* @__PURE__ */ P(Ne, { children: [
3404
3445
  /* @__PURE__ */ s(
3405
3446
  "button",
3406
3447
  {
3407
3448
  type: "button",
3408
- onClick: () => H(1),
3409
- className: `min-w-[28px] px-2 py-1 rounded text-xs ${M === 1 ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"} transition-colors`,
3449
+ onClick: () => U(1),
3450
+ className: `min-w-[28px] px-2 py-1 rounded text-xs ${$ === 1 ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"} transition-colors`,
3410
3451
  children: "1"
3411
3452
  }
3412
3453
  ),
3413
- M > 3 && /* @__PURE__ */ s("span", { className: "px-1 text-xs", children: "…" }),
3454
+ $ > 3 && /* @__PURE__ */ s("span", { className: "px-1 text-xs", children: "…" }),
3414
3455
  Array.from(
3415
- { length: B },
3416
- (I, q) => q + 1
3417
- ).filter((I) => I > 1 && I < B && Math.abs(I - M) <= 1).map((I) => /* @__PURE__ */ s(
3456
+ { length: E },
3457
+ (j, q) => q + 1
3458
+ ).filter((j) => j > 1 && j < E && Math.abs(j - $) <= 1).map((j) => /* @__PURE__ */ s(
3418
3459
  "button",
3419
3460
  {
3420
3461
  type: "button",
3421
- onClick: () => H(I),
3422
- className: `min-w-[28px] px-2 py-1 rounded text-xs ${I === M ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"} transition-colors`,
3423
- children: I
3462
+ onClick: () => U(j),
3463
+ className: `min-w-[28px] px-2 py-1 rounded text-xs ${j === $ ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"} transition-colors`,
3464
+ children: j
3424
3465
  },
3425
- I
3466
+ j
3426
3467
  )),
3427
- M < B - 2 && /* @__PURE__ */ s("span", { className: "px-1 text-xs", children: "…" }),
3468
+ $ < E - 2 && /* @__PURE__ */ s("span", { className: "px-1 text-xs", children: "…" }),
3428
3469
  /* @__PURE__ */ s(
3429
3470
  "button",
3430
3471
  {
3431
3472
  type: "button",
3432
- onClick: () => H(B),
3433
- className: `min-w-[28px] px-2 py-1 rounded text-xs ${M === B ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"} transition-colors`,
3434
- children: B
3473
+ onClick: () => U(E),
3474
+ className: `min-w-[28px] px-2 py-1 rounded text-xs ${$ === E ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"} transition-colors`,
3475
+ children: E
3435
3476
  }
3436
3477
  )
3437
3478
  ] }),
@@ -3439,66 +3480,66 @@ function Yr(e) {
3439
3480
  "button",
3440
3481
  {
3441
3482
  type: "button",
3442
- onClick: () => H(M + 1),
3443
- disabled: M >= B,
3483
+ onClick: () => U($ + 1),
3484
+ disabled: $ >= E,
3444
3485
  className: "px-2 py-1 rounded border border-[var(--border)] text-xs disabled:opacity-40 disabled:cursor-not-allowed hover:bg-[var(--accent)] transition-colors",
3445
- "aria-label": v.next,
3446
- children: v.next
3486
+ "aria-label": y.next,
3487
+ children: y.next
3447
3488
  }
3448
3489
  )
3449
3490
  ] })
3450
3491
  ] });
3451
- }, X = (J) => /* @__PURE__ */ L("div", { className: G.className, style: G.style, children: [
3492
+ }, X = (J) => /* @__PURE__ */ P("div", { className: G.className, style: G.style, children: [
3452
3493
  ge,
3453
- /* @__PURE__ */ L("table", { className: "w-full border-collapse separate border-spacing-0 text-sm", role: "table", children: [
3454
- /* @__PURE__ */ s("thead", { className: R.className, style: R.style, children: /* @__PURE__ */ s("tr", { children: C.map((I) => {
3494
+ /* @__PURE__ */ P("table", { className: "w-full border-collapse separate border-spacing-0 text-sm", role: "table", children: [
3495
+ /* @__PURE__ */ s("thead", { className: R.className, style: R.style, children: /* @__PURE__ */ s("tr", { children: T.map((j) => {
3455
3496
  const q = b({
3456
- baseClassName: E(
3497
+ baseClassName: I(
3457
3498
  "px-5 py-4 text-left font-semibold tracking-wide relative",
3458
3499
  K.headerCell.tw
3459
3500
  ),
3460
- baseStyle: I.width ? { width: I.width } : {},
3501
+ baseStyle: j.width ? { width: j.width } : {},
3461
3502
  sxSlot: { tw: "", css: K.headerCell.css }
3462
3503
  });
3463
- return /* @__PURE__ */ L("th", { className: q.className, style: q.style, children: [
3464
- I.title,
3504
+ return /* @__PURE__ */ P("th", { className: q.className, style: q.style, children: [
3505
+ j.title,
3465
3506
  /* @__PURE__ */ s("span", { className: "absolute right-0 top-[20%] h-[60%] w-px bg-[var(--primary-foreground)]/15 last:hidden" })
3466
- ] }, I.key || I.dataIndex);
3507
+ ] }, j.key || j.dataIndex);
3467
3508
  }) }) }),
3468
- /* @__PURE__ */ s("tbody", { className: Q.className, style: Q.style, "data-tango-table-body": !0, children: J.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: C.length, className: ue.className, style: ue.style, children: v.empty }) }) : J.map((I, q) => {
3469
- const le = q % 2 === 0 ? "even" : "odd", re = E(
3509
+ /* @__PURE__ */ s("tbody", { className: Q.className, style: Q.style, "data-tango-table-body": !0, children: J.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: T.length, className: ue.className, style: ue.style, children: y.empty }) }) : J.map((j, q) => {
3510
+ const le = q % 2 === 0 ? "even" : "odd", re = I(
3470
3511
  "transition-all duration-200",
3471
3512
  le === "even" ? "bg-[color-mix(in_oklch,var(--table-hover)_6%,transparent)]" : "",
3472
3513
  "hover:bg-[color-mix(in_oklch,var(--table-hover)_20%,transparent)]",
3473
3514
  K.row.tw,
3474
- Ae(u, I, q, le)
3475
- ), se = {
3476
- ...Ae(h, I, q, le),
3515
+ Me(u, j, q, le)
3516
+ ), ae = {
3517
+ ...Me(h, j, q, le),
3477
3518
  ...K.row.css
3478
3519
  };
3479
- return /* @__PURE__ */ s("tr", { className: re, style: se, children: C.map((g, V) => {
3480
- const ee = V % 2 === 0 ? "even" : "odd", ce = E(
3520
+ return /* @__PURE__ */ s("tr", { className: re, style: ae, children: T.map((f, V) => {
3521
+ const ee = V % 2 === 0 ? "even" : "odd", ce = I(
3481
3522
  "px-5 py-3.5 text-left relative",
3482
3523
  "border-b border-[color-mix(in_oklch,var(--foreground)_5%,transparent)]",
3483
3524
  K.cell.tw,
3484
- Ae(d, I, g, q, V, le, ee)
3525
+ Me(m, j, f, q, V, le, ee)
3485
3526
  ), pe = {
3486
- ...g.width ? { width: g.width } : {},
3487
- ...Ae(p, I, g, q, V, le, ee),
3527
+ ...f.width ? { width: f.width } : {},
3528
+ ...Me(d, j, f, q, V, le, ee),
3488
3529
  ...K.cell.css
3489
3530
  };
3490
- return /* @__PURE__ */ L("td", { className: ce, style: pe, children: [
3491
- /* @__PURE__ */ s("div", { className: "flex items-center min-h-5", children: g.render ? g.render(I[g.dataIndex], I, q) : I[g.dataIndex] }),
3531
+ return /* @__PURE__ */ P("td", { className: ce, style: pe, children: [
3532
+ /* @__PURE__ */ s("div", { className: "flex items-center min-h-5", children: f.render ? f.render(j[f.dataIndex], j, q) : j[f.dataIndex] }),
3492
3533
  /* @__PURE__ */ s("span", { className: "absolute right-0 top-[20%] h-[60%] w-px bg-[color-mix(in_oklch,var(--foreground)_4%,transparent)] last:hidden" })
3493
- ] }, g.key || g.dataIndex || V);
3494
- }) }, I.key || q);
3534
+ ] }, f.key || f.dataIndex || V);
3535
+ }) }, j.key || q);
3495
3536
  }) })
3496
3537
  ] })
3497
3538
  ] });
3498
- return /* @__PURE__ */ L("div", { role: "region", "aria-label": O || "Table", ...D, children: [
3499
- m && y === "top" && fe(),
3500
- X(F),
3501
- m && y === "bottom" && fe()
3539
+ return /* @__PURE__ */ P("div", { role: "region", "aria-label": C || "Table", ...F, children: [
3540
+ p && S === "top" && fe(),
3541
+ X(z),
3542
+ p && S === "bottom" && fe()
3502
3543
  ] });
3503
3544
  }
3504
3545
  Yr.propTypes = {
@@ -3538,18 +3579,18 @@ Yr.propTypes = {
3538
3579
  i18nKey: t.string,
3539
3580
  localeText: t.object
3540
3581
  };
3541
- const Kr = ["root", "tooltip"], Tt = {
3582
+ const Kr = ["root", "tooltip"], kt = {
3542
3583
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
3543
3584
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
3544
3585
  left: "right-full top-1/2 -translate-y-1/2 mr-2",
3545
3586
  right: "left-full top-1/2 -translate-y-1/2 ml-2"
3546
- }, Ur = {
3587
+ }, Wr = {
3547
3588
  top: { bottom: "-5px", left: "50%", marginLeft: "-5px", transform: "rotate(45deg)" },
3548
3589
  bottom: { top: "-5px", left: "50%", marginLeft: "-5px", transform: "rotate(45deg)" },
3549
3590
  left: { right: "-5px", top: "50%", marginTop: "-5px", transform: "rotate(45deg)" },
3550
3591
  right: { left: "-5px", top: "50%", marginTop: "-5px", transform: "rotate(45deg)" }
3551
3592
  };
3552
- function Hr(e, o) {
3593
+ function Ur(e, o) {
3553
3594
  const {
3554
3595
  children: r,
3555
3596
  title: n,
@@ -3559,68 +3600,68 @@ function Hr(e, o) {
3559
3600
  onOpenChange: i,
3560
3601
  disabled: u = !1,
3561
3602
  sx: h = {},
3562
- style: d = {},
3563
- className: p = "",
3564
- onMouseEnter: f,
3565
- onMouseLeave: w,
3566
- onFocus: P,
3567
- onBlur: O,
3568
- ...D
3569
- } = e, [S, v] = Z(a), x = l !== void 0, C = x ? l : S, m = oe((k) => {
3570
- x || v(k), i == null || i(k);
3571
- }, [x, i]), y = Tt[c] ? c : "top", z = W(h, Kr), A = b({
3603
+ style: m = {},
3604
+ className: d = "",
3605
+ onMouseEnter: g,
3606
+ onMouseLeave: v,
3607
+ onFocus: w,
3608
+ onBlur: C,
3609
+ ...F
3610
+ } = e, [O, y] = Z(a), x = l !== void 0, T = x ? l : O, p = oe((L) => {
3611
+ x || y(L), i == null || i(L);
3612
+ }, [x, i]), S = kt[c] ? c : "top", _ = H(h, Kr), M = b({
3572
3613
  baseClassName: "relative inline-flex",
3573
- sxSlot: z.root
3574
- }), $ = b({
3575
- baseClassName: E(
3614
+ sxSlot: _.root
3615
+ }), B = b({
3616
+ baseClassName: I(
3576
3617
  "absolute z-50 whitespace-nowrap px-3 py-1.5 text-sm",
3577
3618
  "bg-[var(--tooltip-background)] text-[var(--tooltip-foreground)]",
3578
3619
  "shadow-[var(--tooltip-shadow)]",
3579
- Tt[y]
3620
+ kt[S]
3580
3621
  ),
3581
- className: p,
3622
+ className: d,
3582
3623
  baseStyle: { borderRadius: "var(--tooltip-radius)" },
3583
- sxSlot: z.tooltip,
3584
- style: d
3585
- }), _ = {
3624
+ sxSlot: _.tooltip,
3625
+ style: m
3626
+ }), A = {
3586
3627
  position: "absolute",
3587
3628
  width: "10px",
3588
3629
  height: "10px",
3589
3630
  backgroundColor: "inherit",
3590
- ...Ur[y]
3591
- }, T = () => !u && m(!0), N = () => !u && m(!1);
3592
- return /* @__PURE__ */ L(
3631
+ ...Wr[S]
3632
+ }, k = () => !u && p(!0), N = () => !u && p(!1);
3633
+ return /* @__PURE__ */ P(
3593
3634
  "div",
3594
3635
  {
3595
3636
  ref: o,
3596
- className: A.className,
3597
- style: A.style,
3598
- onMouseEnter: (k) => {
3599
- T(), f == null || f(k);
3637
+ className: M.className,
3638
+ style: M.style,
3639
+ onMouseEnter: (L) => {
3640
+ k(), g == null || g(L);
3600
3641
  },
3601
- onMouseLeave: (k) => {
3602
- N(), w == null || w(k);
3642
+ onMouseLeave: (L) => {
3643
+ N(), v == null || v(L);
3603
3644
  },
3604
- onFocus: (k) => {
3605
- T(), P == null || P(k);
3645
+ onFocus: (L) => {
3646
+ k(), w == null || w(L);
3606
3647
  },
3607
- onBlur: (k) => {
3608
- N(), O == null || O(k);
3648
+ onBlur: (L) => {
3649
+ N(), C == null || C(L);
3609
3650
  },
3610
- ...D,
3651
+ ...F,
3611
3652
  children: [
3612
3653
  r,
3613
- C && n && /* @__PURE__ */ L("div", { role: "tooltip", className: $.className, style: $.style, children: [
3654
+ T && n && /* @__PURE__ */ P("div", { role: "tooltip", className: B.className, style: B.style, children: [
3614
3655
  /* @__PURE__ */ s("span", { style: { position: "relative", zIndex: 1 }, children: n }),
3615
- /* @__PURE__ */ s("span", { style: _ })
3656
+ /* @__PURE__ */ s("span", { style: A })
3616
3657
  ] })
3617
3658
  ]
3618
3659
  }
3619
3660
  );
3620
3661
  }
3621
- const Dt = te.forwardRef(Hr);
3622
- Dt.displayName = "Tooltip";
3623
- Dt.propTypes = {
3662
+ const Rt = te.forwardRef(Ur);
3663
+ Rt.displayName = "Tooltip";
3664
+ Rt.propTypes = {
3624
3665
  children: t.node,
3625
3666
  title: t.node,
3626
3667
  placement: t.oneOf(["top", "bottom", "left", "right"]),
@@ -3636,8 +3677,8 @@ Dt.propTypes = {
3636
3677
  onFocus: t.func,
3637
3678
  onBlur: t.func
3638
3679
  };
3639
- ie.MaterialButton = Ze;
3640
- Xe.MaterialInput = Ge;
3680
+ ie.MaterialButton = Ge;
3681
+ qe.MaterialInput = Xe;
3641
3682
  ne.Header = Xo;
3642
3683
  ne.Footer = qo;
3643
3684
  ne.Sider = Jo;
@@ -3653,18 +3694,18 @@ export {
3653
3694
  Tr as Drawer,
3654
3695
  qo as Footer,
3655
3696
  Xo as Header,
3656
- Xe as Input,
3697
+ qe as Input,
3657
3698
  ne as Layout,
3658
- $t as Line,
3659
- Bt as Mark,
3660
- Ze as MaterialButton,
3661
- Ge as MaterialInput,
3699
+ Bt as Line,
3700
+ It as Mark,
3701
+ Ge as MaterialButton,
3702
+ Xe as MaterialInput,
3662
3703
  Ar as Modal,
3663
- We as Notice,
3704
+ Ze as Notice,
3664
3705
  es as NoticeProvider,
3665
3706
  Ir as Search,
3666
3707
  Jo as Sider,
3667
- Ft as Space,
3708
+ Dt as Space,
3668
3709
  Yr as Table,
3669
3710
  sr as TangoBanner,
3670
3711
  dr as TangoColorPicker,
@@ -3673,19 +3714,19 @@ export {
3673
3714
  Tr as TangoDrawer,
3674
3715
  os as TangoI18nProvider,
3675
3716
  Ar as TangoModal,
3676
- We as TangoNotice,
3717
+ Ze as TangoNotice,
3677
3718
  Ir as TangoSearch,
3678
- Dt as TangoTooltip,
3719
+ Rt as TangoTooltip,
3679
3720
  Jr as ThemeProvider,
3680
3721
  er as Toc,
3681
- Dt as Tooltip,
3682
- qe as Upload,
3722
+ Rt as Tooltip,
3723
+ Je as Upload,
3683
3724
  b as createSlotProps,
3684
- E as mergeTwClassNames,
3685
- W as normalizeSxSlots,
3686
- ze as normalizeTangoLocale,
3725
+ I as mergeTwClassNames,
3726
+ H as normalizeSxSlots,
3727
+ Ee as normalizeTangoLocale,
3687
3728
  ts as useNotice,
3688
3729
  de as useTangoI18n,
3689
- Me as useTangoStyle,
3730
+ ze as useTangoStyle,
3690
3731
  Qr as useTheme
3691
3732
  };