tango-ui-cw 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  'use client';
2
- import { jsx as s, jsxs as k, Fragment as Ne } from "react/jsx-runtime";
3
- import Q, { useState as G, useRef as $e, useEffect as le, useContext as Ue, createContext as He, forwardRef as Tt, useCallback as oe, useMemo as Se, useId as Yt } from "react";
4
- import { createPortal as Kt } from "react-dom";
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";
4
+ import { createPortal as Ut } from "react-dom";
5
5
  import t from "prop-types";
6
- import { twMerge as Ut } from "tailwind-merge";
7
- const Qe = "tango:theme", et = "tango:themeTokens", Ht = "light", Wt = [
6
+ import { twMerge as Ht } from "tailwind-merge";
7
+ const Qe = "tango:theme", et = "tango:themeTokens", Wt = "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
- ], kt = He(null), Lt = () => typeof window < "u", tt = (e, o) => {
14
- if (!Lt())
13
+ ], Lt = He(null), Pt = () => typeof window < "u", tt = (e, o) => {
14
+ if (!Pt())
15
15
  return o;
16
16
  try {
17
17
  const r = window.localStorage.getItem(e);
@@ -20,44 +20,44 @@ const Qe = "tango:theme", et = "tango:themeTokens", Ht = "light", Wt = [
20
20
  return o;
21
21
  }
22
22
  }, ot = (e, o) => {
23
- if (Lt())
23
+ if (Pt())
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] = G(() => tt(Qe, Ht) === "dark" ? "dark" : "light"), [n, c] = G(
30
+ const [o, r] = Z(() => tt(Qe, Wt) === "dark" ? "dark" : "light"), [n, c] = Z(
31
31
  () => tt(et, {})
32
32
  ), l = $e(/* @__PURE__ */ new Set());
33
- le(() => {
33
+ ae(() => {
34
34
  typeof document > "u" || (document.documentElement.dataset.theme = o);
35
- }, [o]), le(() => {
35
+ }, [o]), ae(() => {
36
36
  ot(Qe, o);
37
- }, [o]), le(() => {
37
+ }, [o]), ae(() => {
38
38
  if (typeof document > "u")
39
39
  return;
40
40
  const d = document.documentElement, p = new Set(Object.keys(n));
41
- l.current.forEach((g) => {
42
- p.has(g) || d.style.removeProperty(`--${g}`);
43
- }), Object.entries(n).forEach(([g, v]) => {
44
- v == null || v === "" ? d.style.removeProperty(`--${g}`) : d.style.setProperty(`--${g}`, String(v));
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
45
  }), l.current = p, ot(et, n);
46
46
  }, [n]);
47
47
  const a = (d) => {
48
48
  c((p) => {
49
- const g = typeof d == "function" ? d(p) : d;
49
+ const f = typeof d == "function" ? d(p) : d;
50
50
  return {
51
51
  ...p,
52
- ...g || {}
52
+ ...f || {}
53
53
  };
54
54
  });
55
- }, i = (d, p = Wt) => {
56
- a((g) => {
57
- const v = { ...g };
58
- return p.forEach((L) => {
59
- v[L] = d;
60
- }), v;
55
+ }, i = (d, p = Zt) => {
56
+ a((f) => {
57
+ const w = { ...f };
58
+ return p.forEach((P) => {
59
+ w[P] = d;
60
+ }), w;
61
61
  });
62
62
  }, u = () => {
63
63
  c({});
@@ -65,7 +65,7 @@ function Jr({ children: e }) {
65
65
  r((d) => d === "dark" ? "light" : "dark");
66
66
  };
67
67
  return /* @__PURE__ */ s(
68
- kt.Provider,
68
+ Lt.Provider,
69
69
  {
70
70
  value: {
71
71
  theme: o,
@@ -81,9 +81,9 @@ function Jr({ children: e }) {
81
81
  );
82
82
  }
83
83
  function Qr() {
84
- return Ue(kt);
84
+ return Ue(Lt);
85
85
  }
86
- const Zt = /* @__PURE__ */ new Set([
86
+ const Gt = /* @__PURE__ */ new Set([
87
87
  "root",
88
88
  "slots",
89
89
  "tw",
@@ -93,75 +93,75 @@ const Zt = /* @__PURE__ */ new Set([
93
93
  ]), Ee = {
94
94
  tw: "",
95
95
  css: {}
96
- }, ye = (e) => typeof e == "object" && e !== null && !Array.isArray(e), V = (e, o = "px") => typeof e == "number" ? `${e}${o}` : e, he = (e) => typeof e == "string" && e.startsWith("$") ? `var(--${e.slice(1)})` : e, Gt = (e) => e.includes("-") ? e.replace(/-([a-z])/g, (o, r) => r.toUpperCase()) : e, Xt = (e) => /(color|background|border|fill|stroke|shadow)$/i.test(e), qt = {
96
+ }, 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 = {
97
97
  mt: (e, o) => {
98
- e.marginTop = V(o);
98
+ e.marginTop = Y(o);
99
99
  },
100
100
  mr: (e, o) => {
101
- e.marginRight = V(o);
101
+ e.marginRight = Y(o);
102
102
  },
103
103
  mb: (e, o) => {
104
- e.marginBottom = V(o);
104
+ e.marginBottom = Y(o);
105
105
  },
106
106
  ml: (e, o) => {
107
- e.marginLeft = V(o);
107
+ e.marginLeft = Y(o);
108
108
  },
109
109
  mx: (e, o) => {
110
- e.marginLeft = V(o), e.marginRight = V(o);
110
+ e.marginLeft = Y(o), e.marginRight = Y(o);
111
111
  },
112
112
  my: (e, o) => {
113
- e.marginTop = V(o), e.marginBottom = V(o);
113
+ e.marginTop = Y(o), e.marginBottom = Y(o);
114
114
  },
115
115
  m: (e, o) => {
116
- e.margin = V(o);
116
+ e.margin = Y(o);
117
117
  },
118
118
  pt: (e, o) => {
119
- e.paddingTop = V(o);
119
+ e.paddingTop = Y(o);
120
120
  },
121
121
  pr: (e, o) => {
122
- e.paddingRight = V(o);
122
+ e.paddingRight = Y(o);
123
123
  },
124
124
  pb: (e, o) => {
125
- e.paddingBottom = V(o);
125
+ e.paddingBottom = Y(o);
126
126
  },
127
127
  pl: (e, o) => {
128
- e.paddingLeft = V(o);
128
+ e.paddingLeft = Y(o);
129
129
  },
130
130
  px: (e, o) => {
131
- e.paddingLeft = V(o), e.paddingRight = V(o);
131
+ e.paddingLeft = Y(o), e.paddingRight = Y(o);
132
132
  },
133
133
  py: (e, o) => {
134
- e.paddingTop = V(o), e.paddingBottom = V(o);
134
+ e.paddingTop = Y(o), e.paddingBottom = Y(o);
135
135
  },
136
136
  p: (e, o) => {
137
- e.padding = V(o);
137
+ e.padding = Y(o);
138
138
  },
139
139
  g: (e, o) => {
140
- e.gap = V(o);
140
+ e.gap = Y(o);
141
141
  },
142
142
  rg: (e, o) => {
143
- e.rowGap = V(o);
143
+ e.rowGap = Y(o);
144
144
  },
145
145
  cg: (e, o) => {
146
- e.columnGap = V(o);
146
+ e.columnGap = Y(o);
147
147
  },
148
148
  w: (e, o) => {
149
- e.width = V(o);
149
+ e.width = Y(o);
150
150
  },
151
151
  h: (e, o) => {
152
- e.height = V(o);
152
+ e.height = Y(o);
153
153
  },
154
154
  mw: (e, o) => {
155
- e.minWidth = V(o);
155
+ e.minWidth = Y(o);
156
156
  },
157
157
  mh: (e, o) => {
158
- e.minHeight = V(o);
158
+ e.minHeight = Y(o);
159
159
  },
160
160
  maxw: (e, o) => {
161
- e.maxWidth = V(o);
161
+ e.maxWidth = Y(o);
162
162
  },
163
163
  maxh: (e, o) => {
164
- e.maxHeight = V(o);
164
+ e.maxHeight = Y(o);
165
165
  },
166
166
  vw: (e, o) => {
167
167
  e.width = typeof o == "number" ? `${o}vw` : o;
@@ -176,7 +176,7 @@ const Zt = /* @__PURE__ */ new Set([
176
176
  e.height = typeof o == "number" ? `${o}%` : o;
177
177
  },
178
178
  size: (e, o) => {
179
- e.fontSize = V(o);
179
+ e.fontSize = Y(o);
180
180
  },
181
181
  fw: (e, o) => {
182
182
  e.fontWeight = o;
@@ -197,10 +197,10 @@ const Zt = /* @__PURE__ */ new Set([
197
197
  e.textAlign = "left";
198
198
  },
199
199
  lh: (e, o) => {
200
- e.lineHeight = V(o);
200
+ e.lineHeight = Y(o);
201
201
  },
202
202
  ls: (e, o) => {
203
- e.letterSpacing = V(o);
203
+ e.letterSpacing = Y(o);
204
204
  },
205
205
  c: (e, o) => {
206
206
  e.color = he(o);
@@ -215,10 +215,10 @@ const Zt = /* @__PURE__ */ new Set([
215
215
  e.border = o === 1 ? "1px solid var(--border)" : he(o);
216
216
  },
217
217
  br: (e, o) => {
218
- e.borderRadius = V(o);
218
+ e.borderRadius = Y(o);
219
219
  },
220
220
  bw: (e, o) => {
221
- e.borderWidth = V(o);
221
+ e.borderWidth = Y(o);
222
222
  },
223
223
  bs: (e, o) => {
224
224
  e.borderStyle = o;
@@ -254,19 +254,19 @@ const Zt = /* @__PURE__ */ new Set([
254
254
  e.position = "absolute", e.inset = 0, e.margin = "auto";
255
255
  },
256
256
  inset: (e, o) => {
257
- e.inset = V(o);
257
+ e.inset = Y(o);
258
258
  },
259
259
  top: (e, o) => {
260
- e.top = V(o);
260
+ e.top = Y(o);
261
261
  },
262
262
  right: (e, o) => {
263
- e.right = V(o);
263
+ e.right = Y(o);
264
264
  },
265
265
  bottom: (e, o) => {
266
- e.bottom = V(o);
266
+ e.bottom = Y(o);
267
267
  },
268
268
  left: (e, o) => {
269
- e.left = V(o);
269
+ e.left = Y(o);
270
270
  },
271
271
  z: (e, o) => {
272
272
  e.zIndex = o;
@@ -365,16 +365,16 @@ const Zt = /* @__PURE__ */ new Set([
365
365
  e.visibility = "visible";
366
366
  }
367
367
  }, Me = (e = {}) => ye(e) ? Object.entries(e).reduce((o, [r, n]) => {
368
- if (Zt.has(r))
368
+ if (Gt.has(r))
369
369
  return o;
370
- const c = qt[r];
370
+ const c = Jt[r];
371
371
  if (c)
372
372
  return c(o, n), o;
373
- const l = Gt(r), a = typeof n == "string" && (n.startsWith("$") || Xt(l)) ? he(n) : n;
373
+ const l = Xt(r), a = typeof n == "string" && (n.startsWith("$") || qt(l)) ? he(n) : n;
374
374
  return o[l] = a, o;
375
375
  }, {}) : {}, E = (...e) => {
376
376
  const o = e.filter(Boolean).join(" ").trim();
377
- return o ? Ut(o) : "";
377
+ return o ? Ht(o) : "";
378
378
  }, Pe = (e) => {
379
379
  if (typeof e == "string")
380
380
  return { tw: e, css: {} };
@@ -393,18 +393,18 @@ const Zt = /* @__PURE__ */ new Set([
393
393
  ...c
394
394
  }
395
395
  };
396
- }, Jt = (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, Qt = (e) => {
396
+ }, 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
397
  const o = {};
398
398
  return e.forEach((r) => {
399
399
  o[r] = { ...Ee };
400
400
  }), o.root || (o.root = { ...Ee }), o;
401
- }, H = (e, o = ["root"]) => {
402
- const r = Qt(o);
401
+ }, W = (e, o = ["root"]) => {
402
+ const r = eo(o);
403
403
  if (typeof e == "string")
404
404
  return r.root.tw = e, r;
405
405
  if (!ye(e))
406
406
  return r;
407
- if (!Jt(e, o))
407
+ if (!Qt(e, o))
408
408
  return r.root.css = Me(e), r;
409
409
  const n = Pe({
410
410
  tw: [e.className, e.tw].filter(Boolean).join(" "),
@@ -444,7 +444,7 @@ const Zt = /* @__PURE__ */ new Set([
444
444
  ...c.css || {},
445
445
  ...n || {}
446
446
  }
447
- }), eo = ["root", "icon", "content"], rt = {
447
+ }), to = ["root", "icon", "content"], rt = {
448
448
  success: "text-[var(--notice-success-text)]",
449
449
  fail: "text-[var(--notice-fail-text)]",
450
450
  caution: "text-[var(--notice-caution-text)]"
@@ -458,7 +458,7 @@ const Zt = /* @__PURE__ */ new Set([
458
458
  enter: "animate-[noticeSlideFromBottom_0.3s_ease-out_forwards]"
459
459
  }
460
460
  };
461
- function to(e, o) {
461
+ function oo(e, o) {
462
462
  const {
463
463
  type: r = "success",
464
464
  icon: n,
@@ -470,43 +470,43 @@ function to(e, o) {
470
470
  style: h = {},
471
471
  className: d = "",
472
472
  ...p
473
- } = e, [g, v] = G(!1), L = rt[r] ? r : "success", O = st[l] ? l : "default", j = H(u, eo), w = oe(() => {
474
- v(!0);
475
- const M = setTimeout(() => i == null ? void 0 : i(), 300);
476
- return () => clearTimeout(M);
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);
477
477
  }, [i]);
478
- le(() => {
478
+ ae(() => {
479
479
  if (!i || a <= 0) return;
480
- const M = setTimeout(w, a);
481
- return () => clearTimeout(M);
482
- }, [i, a, w]);
483
- const S = st[O], x = O === "default" ? "animate-[noticeSlideUpFade_0.3s_ease-in_forwards]" : "animate-[noticeSlideToBottom_0.3s_ease-in_forwards]", _ = b({
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
484
  baseClassName: E(
485
485
  "inline-flex items-center gap-2 px-3 py-2 text-sm z-[999]",
486
486
  "rounded-[var(--notice-radius)]",
487
487
  "bg-[var(--notice-bg)] text-[var(--notice-foreground)]",
488
488
  "shadow-[var(--notice-shadow)]",
489
- S.base,
490
- g ? x : S.enter,
491
- O === "md" && rt[L]
489
+ v.base,
490
+ f ? x : v.enter,
491
+ O === "md" && rt[P]
492
492
  ),
493
493
  className: d,
494
- sxSlot: j.root,
494
+ sxSlot: D.root,
495
495
  baseStyle: { borderRadius: "var(--notice-radius)" },
496
496
  style: h
497
497
  }), m = b({
498
498
  baseClassName: "flex-shrink-0 text-[var(--notice-foreground)]",
499
- sxSlot: j.icon
499
+ sxSlot: D.icon
500
500
  }), y = b({
501
501
  baseClassName: "inline-block",
502
- sxSlot: j.content
502
+ sxSlot: D.content
503
503
  });
504
- return /* @__PURE__ */ k("div", { ref: o, role: "alert", className: _.className, style: _.style, ...p, children: [
504
+ return /* @__PURE__ */ L("div", { ref: o, role: "alert", className: C.className, style: C.style, ...p, children: [
505
505
  O !== "md" && n && /* @__PURE__ */ s("span", { className: m.className, style: m.style, children: n }),
506
506
  /* @__PURE__ */ s("span", { className: y.className, style: y.style, children: c })
507
507
  ] });
508
508
  }
509
- const We = Tt(to);
509
+ const We = kt(oo);
510
510
  We.displayName = "Notice";
511
511
  We.propTypes = {
512
512
  type: t.oneOf(["success", "fail", "caution"]),
@@ -519,19 +519,19 @@ We.propTypes = {
519
519
  style: t.object,
520
520
  className: t.string
521
521
  };
522
- const Pt = He(null), oo = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: /* @__PURE__ */ s(
522
+ const Ot = He(null), ro = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: /* @__PURE__ */ s(
523
523
  "path",
524
524
  {
525
525
  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",
526
526
  fill: "var(--notice-success-text)"
527
527
  }
528
- ) }), ro = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: /* @__PURE__ */ s(
528
+ ) }), so = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: /* @__PURE__ */ s(
529
529
  "path",
530
530
  {
531
531
  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
532
  fill: "var(--notice-fail-text)"
533
533
  }
534
- ) }), so = /* @__PURE__ */ k("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: [
534
+ ) }), ao = /* @__PURE__ */ L("svg", { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em", children: [
535
535
  /* @__PURE__ */ s(
536
536
  "path",
537
537
  {
@@ -553,10 +553,10 @@ const Pt = He(null), oo = /* @__PURE__ */ s("svg", { viewBox: "0 0 1024 1024", w
553
553
  fill: "var(--notice-fail-text)"
554
554
  }
555
555
  )
556
- ] }), ao = { success: oo, fail: ro, caution: so };
556
+ ] }), no = { success: ro, fail: so, caution: ao };
557
557
  function es({ children: e }) {
558
- const [o, r] = G([]), [n, c] = G(!1);
559
- le(() => {
558
+ const [o, r] = Z([]), [n, c] = Z(!1);
559
+ ae(() => {
560
560
  c(!0);
561
561
  }, []);
562
562
  const l = oe((i) => {
@@ -565,25 +565,25 @@ function es({ children: e }) {
565
565
  const d = Date.now() + Math.random();
566
566
  r((p) => [
567
567
  ...p,
568
- { id: d, type: i, message: u, variant: h, icon: ao[i] }
568
+ { id: d, type: i, message: u, variant: h, icon: no[i] }
569
569
  ]);
570
570
  }, []);
571
- return /* @__PURE__ */ k(Pt.Provider, { value: { add: a, remove: l }, children: [
571
+ return /* @__PURE__ */ L(Ot.Provider, { value: { add: a, remove: l }, children: [
572
572
  e,
573
- n && Kt(
573
+ n && Ut(
574
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)) }),
575
575
  document.body
576
576
  )
577
577
  ] });
578
578
  }
579
- function no() {
580
- const e = Ue(Pt);
579
+ function lo() {
580
+ const e = Ue(Ot);
581
581
  if (!e)
582
582
  throw new Error("useNotice must be used inside <NoticeProvider />");
583
583
  return e;
584
584
  }
585
585
  function ts() {
586
- const { add: e } = no();
586
+ const { add: e } = lo();
587
587
  return {
588
588
  success: (o) => e("success", o),
589
589
  fail: (o) => e("fail", o),
@@ -595,7 +595,7 @@ function ts() {
595
595
  }
596
596
  };
597
597
  }
598
- const _t = "tango:locale", xe = "zh-CN", lo = {
598
+ const _t = "tango:locale", xe = "zh-CN", co = {
599
599
  zh: "zh-CN",
600
600
  ZH: "zh-CN",
601
601
  "zh-CN": "zh-CN",
@@ -608,7 +608,7 @@ const _t = "tango:locale", xe = "zh-CN", lo = {
608
608
  "en-us": "en-US",
609
609
  us: "en-US",
610
610
  US: "en-US"
611
- }, Ot = {
611
+ }, At = {
612
612
  "zh-CN": {
613
613
  button: {
614
614
  default: "按钮",
@@ -776,21 +776,21 @@ const _t = "tango:locale", xe = "zh-CN", lo = {
776
776
  }
777
777
  }
778
778
  }, Ke = () => {
779
- }, At = He({
779
+ }, Mt = He({
780
780
  locale: xe,
781
781
  setLocale: Ke,
782
782
  toggleLocale: Ke,
783
- messages: Ot,
783
+ messages: At,
784
784
  t: (e, o = "") => o
785
- }), at = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Mt = (e, o) => {
785
+ }), at = (e) => typeof e == "object" && e !== null && !Array.isArray(e), zt = (e, o) => {
786
786
  const r = { ...e };
787
787
  return Object.entries(o || {}).forEach(([n, c]) => {
788
- at(c) && at(r[n]) ? r[n] = Mt(r[n], c) : r[n] = c;
788
+ at(c) && at(r[n]) ? r[n] = zt(r[n], c) : r[n] = c;
789
789
  }), r;
790
- }, co = (e, o) => o.split(".").reduce((r, n) => {
790
+ }, io = (e, o) => o.split(".").reduce((r, n) => {
791
791
  if (r && Object.prototype.hasOwnProperty.call(r, n))
792
792
  return r[n];
793
- }, e), ze = (e) => typeof e != "string" || !e.trim() ? xe : lo[e] || e, io = () => {
793
+ }, e), ze = (e) => typeof e != "string" || !e.trim() ? xe : co[e] || e, uo = () => {
794
794
  if (typeof window > "u")
795
795
  return xe;
796
796
  try {
@@ -807,13 +807,13 @@ function os({
807
807
  onLocaleChange: n = Ke,
808
808
  messages: c = {}
809
809
  }) {
810
- const l = ze(r), a = o == null ? null : ze(o), [i, u] = G(
811
- () => io() || l
812
- ), h = a || i, d = (L) => {
813
- const O = ze(L);
810
+ const l = ze(r), a = o == null ? null : ze(o), [i, u] = Z(
811
+ () => uo() || l
812
+ ), h = a || i, d = (P) => {
813
+ const O = ze(P);
814
814
  a == null && u(O), n(O);
815
815
  };
816
- le(() => {
816
+ ae(() => {
817
817
  if (!(typeof window > "u"))
818
818
  try {
819
819
  window.localStorage.setItem(_t, h);
@@ -821,40 +821,40 @@ function os({
821
821
  }
822
822
  }, [h]);
823
823
  const p = Se(
824
- () => Mt(Ot, c),
824
+ () => zt(At, c),
825
825
  [c]
826
- ), g = () => {
826
+ ), f = () => {
827
827
  d(h === "zh-CN" ? "en-US" : "zh-CN");
828
- }, v = (L, O = "") => {
829
- const j = p[h] || p[xe] || {}, w = co(j, L);
830
- return w == null || w === "" ? O : String(w);
828
+ }, w = (P, O = "") => {
829
+ const D = p[h] || p[xe] || {}, S = io(D, P);
830
+ return S == null || S === "" ? O : String(S);
831
831
  };
832
832
  return /* @__PURE__ */ s(
833
- At.Provider,
833
+ Mt.Provider,
834
834
  {
835
835
  value: {
836
836
  locale: h,
837
837
  setLocale: d,
838
- toggleLocale: g,
838
+ toggleLocale: f,
839
839
  messages: p,
840
- t: v
840
+ t: w
841
841
  },
842
842
  children: e
843
843
  }
844
844
  );
845
845
  }
846
- function ie() {
847
- return Ue(At);
846
+ function de() {
847
+ return Ue(Mt);
848
848
  }
849
- const uo = "_materialBtn_wlueu_4", po = "_materialBtnSmall_wlueu_26", mo = "_materialBtnMedium_wlueu_32", bo = "_materialBtnLarge_wlueu_38", fo = "_materialBtnHuge_wlueu_44", go = "_materialBtnDisabled_wlueu_51", ho = "_ripple_wlueu_59", Ce = {
850
- materialBtn: uo,
851
- materialBtnSmall: po,
852
- materialBtnMedium: mo,
853
- materialBtnLarge: bo,
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 = {
850
+ materialBtn: po,
851
+ materialBtnSmall: mo,
852
+ materialBtnMedium: bo,
853
+ materialBtnLarge: go,
854
854
  materialBtnHuge: fo,
855
- materialBtnDisabled: go,
856
- ripple: ho
857
- }, yo = ["root", "content", "icon", "loading"], xo = { small: "small", medium: "medium", large: "large", huge: "huge" }, vo = { small: 12, medium: 14, large: 16, huge: 20 }, nt = {
855
+ materialBtnDisabled: ho,
856
+ 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 = {
858
858
  default: {
859
859
  backgroundColor: "var(--primary)",
860
860
  color: "var(--primary-foreground)",
@@ -905,7 +905,7 @@ const uo = "_materialBtn_wlueu_4", po = "_materialBtnSmall_wlueu_26", mo = "_mat
905
905
  default: "按钮",
906
906
  loading: "加载中",
907
907
  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", lt = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
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
909
  function Ze(e) {
910
910
  const {
911
911
  type: o = "default",
@@ -920,87 +920,87 @@ function Ze(e) {
920
920
  outline: h = !1,
921
921
  icon: d = null,
922
922
  iconPosition: p = null,
923
- loading: g = !1,
924
- i18nKey: v = null,
925
- localeText: L = {},
923
+ loading: f = !1,
924
+ i18nKey: w = null,
925
+ localeText: P = {},
926
926
  rippleColor: O,
927
- "aria-label": j,
928
- ...w
929
- } = e, { t: S } = ie(), x = $e(null), _ = lt(r, "medium", xo), m = lt(o, "default", nt), y = Co(g), M = To(g), A = u || y, $ = vo[_], P = p === "right" ? "right" : d || y ? "left" : null, T = O ?? "var(--material-button-ripple)", N = {
930
- default: S("materialButton.default", De.default),
931
- loading: S("materialButton.loading", De.loading),
932
- iconAlt: S("materialButton.iconAlt", De.iconAlt),
933
- ...L
934
- }, U = (v && typeof N[v] == "string" ? N[v] : null) || (v ? S(`materialButton.${v}`, N.default) : N.default), I = y ? N.loading : U, F = i ?? I, B = j || (i == null ? String(F || N.default) : void 0), D = H(n, yo), W = A ? No : h ? So[m] : nt[m], K = Ce[`materialBtn${wo(_)}`], Z = typeof n == "object" ? n : {}, R = D.root.css || {}, re = typeof n == "string" ? n : "", de = [
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 = [
935
935
  Ce.materialBtn,
936
936
  K,
937
937
  A && Ce.materialBtnDisabled,
938
- D.root.tw,
939
- re,
938
+ F.root.tw,
939
+ R,
940
940
  l
941
- ].filter(Boolean).join(" "), be = {
942
- ...W,
943
- ...Z,
944
- ...R,
941
+ ].filter(Boolean).join(" "), ge = {
942
+ ...H,
943
+ ...ue,
944
+ ...G,
945
945
  ...c
946
946
  }, fe = b({
947
947
  baseClassName: "inline-flex items-center relative z-[1]",
948
- sxSlot: D.content
949
- }), se = b({
948
+ sxSlot: F.content
949
+ }), X = b({
950
950
  baseClassName: "inline-flex items-center justify-center shrink-0 transition-all duration-300 relative z-[1]",
951
951
  baseStyle: { width: `${$}px`, height: `${$}px` },
952
- sxSlot: D.icon
953
- }), ee = b({
952
+ sxSlot: F.icon
953
+ }), J = b({
954
954
  baseClassName: "inline-flex items-center justify-center shrink-0 animate-spin relative z-[1]",
955
955
  baseStyle: {
956
956
  width: `${$}px`,
957
957
  height: `${$}px`,
958
- color: M === "light" ? "var(--button-loading-light)" : "var(--button-loading-dark)"
958
+ color: z === "light" ? "var(--button-loading-light)" : "var(--button-loading-dark)"
959
959
  },
960
- sxSlot: D.loading
961
- }), q = oe(
962
- (te) => {
960
+ sxSlot: F.loading
961
+ }), I = oe(
962
+ (re) => {
963
963
  if (A) return;
964
- const ae = x.current;
965
- if (!ae) return;
966
- const ue = document.createElement("span"), f = Math.max(ae.clientWidth, ae.clientHeight), Y = f / 2;
967
- Object.assign(ue.style, {
968
- width: `${f}px`,
969
- height: `${f}px`,
970
- left: `${te.clientX - ae.getBoundingClientRect().left - Y}px`,
971
- top: `${te.clientY - ae.getBoundingClientRect().top - Y}px`
972
- }), ue.className = Ce.ripple, ue.style.background = T;
973
- const J = ae.querySelector(`.${Ce.ripple}`);
974
- J && J.remove(), ae.appendChild(ue);
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, {
968
+ width: `${V}px`,
969
+ 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);
975
975
  },
976
976
  [A, T]
977
- ), z = () => d ? typeof d == "string" ? /* @__PURE__ */ s(
977
+ ), q = () => d ? typeof d == "string" ? /* @__PURE__ */ s(
978
978
  "img",
979
979
  {
980
980
  src: d,
981
981
  alt: N.iconAlt,
982
- className: se.className,
983
- style: se.style,
982
+ className: X.className,
983
+ style: X.style,
984
984
  "aria-hidden": "true"
985
985
  }
986
- ) : Q.isValidElement(d) ? Q.cloneElement(d, {
987
- className: E(se.className, d.props.className),
988
- style: { ...se.style, ...d.props.style },
986
+ ) : te.isValidElement(d) ? te.cloneElement(d, {
987
+ className: E(X.className, d.props.className),
988
+ style: { ...X.style, ...d.props.style },
989
989
  "aria-hidden": !0
990
990
  }) : typeof d == "function" ? /* @__PURE__ */ s(
991
991
  d,
992
992
  {
993
- className: se.className,
994
- style: se.style,
993
+ className: X.className,
994
+ style: X.style,
995
995
  "aria-hidden": "true"
996
996
  }
997
- ) : /* @__PURE__ */ s("span", { className: se.className, style: se.style, "aria-hidden": "true", children: d }) : null, X = () => /* @__PURE__ */ s(
997
+ ) : /* @__PURE__ */ s("span", { className: X.className, style: X.style, "aria-hidden": "true", children: d }) : null, le = () => /* @__PURE__ */ s(
998
998
  "svg",
999
999
  {
1000
1000
  viewBox: "0 0 1024 1024",
1001
1001
  role: "presentation",
1002
- className: ee.className,
1003
- style: ee.style,
1002
+ className: J.className,
1003
+ style: J.style,
1004
1004
  "aria-hidden": "true",
1005
1005
  children: /* @__PURE__ */ s(
1006
1006
  "path",
@@ -1011,30 +1011,30 @@ function Ze(e) {
1011
1011
  )
1012
1012
  }
1013
1013
  );
1014
- return /* @__PURE__ */ k(
1014
+ return /* @__PURE__ */ L(
1015
1015
  "button",
1016
1016
  {
1017
1017
  ref: x,
1018
- className: de,
1019
- style: be,
1020
- onClick: (te) => {
1021
- q(te), a == null || a(te);
1018
+ className: be,
1019
+ style: ge,
1020
+ onClick: (re) => {
1021
+ I(re), a == null || a(re);
1022
1022
  },
1023
1023
  disabled: A,
1024
- "aria-label": B,
1024
+ "aria-label": M,
1025
1025
  "data-variant": m,
1026
- "data-size": _,
1027
- "data-icon-position": P || void 0,
1028
- ...w,
1026
+ "data-size": C,
1027
+ "data-icon-position": _ || void 0,
1028
+ ...S,
1029
1029
  children: [
1030
- P === "left" && /* @__PURE__ */ k(Ne, { children: [
1031
- y && X(),
1032
- !y && d && z()
1030
+ _ === "left" && /* @__PURE__ */ L(Ne, { children: [
1031
+ y && le(),
1032
+ !y && d && q()
1033
1033
  ] }),
1034
- /* @__PURE__ */ s("span", { className: fe.className, style: fe.style, children: F }),
1035
- P === "right" && /* @__PURE__ */ k(Ne, { children: [
1036
- y && X(),
1037
- !y && d && z()
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()
1038
1038
  ] })
1039
1039
  ]
1040
1040
  }
@@ -1086,23 +1086,23 @@ const ko = ["root", "content", "icon", "loading"], Re = {
1086
1086
  iconSize: 20,
1087
1087
  className: "text-[25px] px-[45px] py-[18px] gap-3"
1088
1088
  }
1089
- }, ct = {
1089
+ }, it = {
1090
1090
  default: "bg-[var(--primary)] text-[var(--primary-foreground)] border-[var(--border)] hover:shadow-[0_0_0.4em_0_var(--button-shadow-default)]",
1091
1091
  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
1092
  danger: "bg-[var(--destructive)] text-[var(--destructive-foreground)] border-transparent hover:shadow-[0_0_0.4em_0_var(--destructive)]",
1093
1093
  success: "bg-[var(--success)] text-[var(--success-foreground)] border-transparent hover:shadow-[0_0_0.4em_0_var(--success)]"
1094
- }, Po = "bg-[var(--transparent)]", _o = {
1094
+ }, Po = "bg-[var(--transparent)]", Oo = {
1095
1095
  default: "text-[var(--button-outline-foreground)] border-[var(--border)]",
1096
1096
  transparent: "text-[var(--button-outline-foreground)] border-[var(--button-transparent-border)]",
1097
1097
  danger: "text-[var(--destructive)] border-[var(--destructive)]",
1098
1098
  success: "text-[var(--success)] border-[var(--success)]"
1099
- }, Oo = "shadow-[var(--button-enu-shadow)] hover:shadow-[var(--button-enu-hover-shadow)] active:translate-y-px active:shadow-[var(--button-enu-active-shadow)]", Ao = {
1099
+ }, _o = "shadow-[var(--button-enu-shadow)] hover:shadow-[var(--button-enu-hover-shadow)] active:translate-y-px active:shadow-[var(--button-enu-active-shadow)]", Ao = {
1100
1100
  default: "bg-[var(--button-enu-bg)] text-[var(--button-enu-fg)] border-transparent",
1101
1101
  transparent: "bg-[var(--transparent)] text-[var(--button-enu-fg)] border-[var(--button-transparent-border)]",
1102
1102
  danger: "bg-[var(--destructive)] text-[var(--destructive-foreground)] border-transparent",
1103
1103
  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", it = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
1105
- function ce(e) {
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;
1105
+ function ie(e) {
1106
1106
  const {
1107
1107
  type: o = "default",
1108
1108
  size: r = "medium",
@@ -1116,58 +1116,58 @@ function ce(e) {
1116
1116
  outline: h = !1,
1117
1117
  enu: d = !1,
1118
1118
  icon: p = null,
1119
- iconPosition: g = null,
1120
- loading: v = !1,
1121
- i18nKey: L = null,
1119
+ iconPosition: f = null,
1120
+ loading: w = !1,
1121
+ i18nKey: P = null,
1122
1122
  localeText: O = {},
1123
- "aria-label": j,
1124
- ...w
1125
- } = e, { t: S } = ie(), x = it(r, "medium", Ve), _ = it(o, "default", ct), m = zo(v), y = Eo(v), M = u || m, A = Ve[x].iconSize, $ = g === "right" ? "right" : p || m ? "left" : null, P = H(n, ko), T = {
1126
- default: S("button.default", Re.default),
1127
- loading: S("button.loading", Re.loading),
1128
- iconAlt: S("button.iconAlt", Re.iconAlt),
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),
1129
1129
  ...O
1130
- }, C = (L && typeof T[L] == "string" ? T[L] : null) || (L ? S(`button.${L}`, T.default) : T.default), U = m ? T.loading : C, I = i ?? U, F = j || (i == null ? String(I || T.default) : void 0);
1131
- let B = ct[_];
1132
- h && (B = E(
1133
- B,
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,
1134
1134
  Po,
1135
- _o[_]
1136
- )), d && (B = E(
1137
- B,
1138
- Oo,
1139
- Ao[_]
1135
+ Oo[C]
1136
+ )), d && (M = E(
1137
+ M,
1138
+ _o,
1139
+ Ao[C]
1140
1140
  ));
1141
- const D = b({
1141
+ const F = b({
1142
1142
  // 顺序固定为:baseTw -> className -> sx.tw,sx 能稳定覆盖普通 Tailwind。
1143
1143
  baseClassName: E(
1144
1144
  Lo,
1145
1145
  Ve[x].className,
1146
- B,
1147
- M && Mo,
1146
+ M,
1147
+ z && Mo,
1148
1148
  m && "cursor-wait"
1149
1149
  ),
1150
1150
  className: l,
1151
1151
  style: c,
1152
- sxSlot: P.root
1153
- }), W = b({
1152
+ sxSlot: _.root
1153
+ }), H = b({
1154
1154
  baseClassName: "inline-flex items-center",
1155
- sxSlot: P.content
1155
+ sxSlot: _.content
1156
1156
  }), K = b({
1157
1157
  baseClassName: "inline-flex items-center justify-center shrink-0 transition-all duration-300",
1158
1158
  baseStyle: {
1159
1159
  width: `${A}px`,
1160
1160
  height: `${A}px`
1161
1161
  },
1162
- sxSlot: P.icon
1163
- }), Z = b({
1162
+ sxSlot: _.icon
1163
+ }), G = b({
1164
1164
  baseClassName: "inline-flex items-center justify-center shrink-0 animate-spin",
1165
1165
  baseStyle: {
1166
1166
  width: `${A}px`,
1167
1167
  height: `${A}px`,
1168
1168
  color: y === "light" ? "var(--button-loading-light)" : "var(--button-loading-dark)"
1169
1169
  },
1170
- sxSlot: P.loading
1170
+ sxSlot: _.loading
1171
1171
  }), R = () => p ? typeof p == "string" ? /* @__PURE__ */ s(
1172
1172
  "img",
1173
1173
  {
@@ -1177,7 +1177,7 @@ function ce(e) {
1177
1177
  style: K.style,
1178
1178
  "aria-hidden": "true"
1179
1179
  }
1180
- ) : Q.isValidElement(p) ? Q.cloneElement(p, {
1180
+ ) : te.isValidElement(p) ? te.cloneElement(p, {
1181
1181
  className: E(K.className, p.props.className),
1182
1182
  style: {
1183
1183
  ...K.style,
@@ -1191,13 +1191,13 @@ function ce(e) {
1191
1191
  style: K.style,
1192
1192
  "aria-hidden": "true"
1193
1193
  }
1194
- ) : /* @__PURE__ */ s("span", { className: K.className, style: K.style, "aria-hidden": "true", children: p }) : null, re = () => /* @__PURE__ */ s(
1194
+ ) : /* @__PURE__ */ s("span", { className: K.className, style: K.style, "aria-hidden": "true", children: p }) : null, Q = () => /* @__PURE__ */ s(
1195
1195
  "svg",
1196
1196
  {
1197
1197
  viewBox: "0 0 1024 1024",
1198
1198
  role: "presentation",
1199
- className: Z.className,
1200
- style: Z.style,
1199
+ className: G.className,
1200
+ style: G.style,
1201
1201
  "aria-hidden": "true",
1202
1202
  children: /* @__PURE__ */ s(
1203
1203
  "path",
@@ -1208,33 +1208,33 @@ function ce(e) {
1208
1208
  )
1209
1209
  }
1210
1210
  );
1211
- return /* @__PURE__ */ k(
1211
+ return /* @__PURE__ */ L(
1212
1212
  "button",
1213
1213
  {
1214
- className: D.className,
1215
- style: D.style,
1214
+ className: F.className,
1215
+ style: F.style,
1216
1216
  onClick: a,
1217
- disabled: M,
1218
- "aria-label": F,
1219
- "data-variant": _,
1217
+ disabled: z,
1218
+ "aria-label": B,
1219
+ "data-variant": C,
1220
1220
  "data-size": x,
1221
1221
  "data-icon-position": $ || void 0,
1222
- ...w,
1222
+ ...S,
1223
1223
  children: [
1224
- $ === "left" && /* @__PURE__ */ k(Ne, { children: [
1225
- m && re(),
1224
+ $ === "left" && /* @__PURE__ */ L(Ne, { children: [
1225
+ m && Q(),
1226
1226
  !m && p && R()
1227
1227
  ] }),
1228
- /* @__PURE__ */ s("span", { className: W.className, style: W.style, children: I }),
1229
- $ === "right" && /* @__PURE__ */ k(Ne, { children: [
1230
- m && re(),
1228
+ /* @__PURE__ */ s("span", { className: H.className, style: H.style, children: j }),
1229
+ $ === "right" && /* @__PURE__ */ L(Ne, { children: [
1230
+ m && Q(),
1231
1231
  !m && p && R()
1232
1232
  ] })
1233
1233
  ]
1234
1234
  }
1235
1235
  );
1236
1236
  }
1237
- ce.propTypes = {
1237
+ ie.propTypes = {
1238
1238
  type: t.oneOf(["default", "transparent", "danger", "success"]),
1239
1239
  size: t.oneOf(["small", "medium", "large", "huge"]),
1240
1240
  sx: t.oneOfType([t.object, t.string]),
@@ -1259,7 +1259,7 @@ ce.propTypes = {
1259
1259
  i18nKey: t.string,
1260
1260
  localeText: t.object
1261
1261
  };
1262
- ce.MaterialButton = Ze;
1262
+ ie.MaterialButton = Ze;
1263
1263
  const $o = ["root", "input", "label"], Bo = {
1264
1264
  small: "small",
1265
1265
  medium: "medium",
@@ -1286,43 +1286,43 @@ function Ge(e) {
1286
1286
  label: h,
1287
1287
  localeText: d,
1288
1288
  type: p = "text",
1289
- ...g
1290
- } = e, { t: v } = ie(), L = Fo(o, "medium", Bo), O = a !== void 0, [j, w] = G(i ?? ""), [S, x] = G(!1), _ = O ? a : j, m = S || String(_).length > 0, y = h ?? (d == null ? void 0 : d.label) ?? v("materialInput.label", jo.label), M = H(r, $o), A = {
1291
- tw: E(M.root.tw, M.input.tw),
1292
- css: { ...M.root.css, ...M.input.css }
1293
- }, $ = E("relative inline-flex", M.root.tw), P = Io[L], T = E(
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(
1294
1294
  "w-[300px] bg-transparent text-[var(--foreground)] outline-none transition-all duration-200 ease-in-out",
1295
1295
  "border-b border-b-[var(--border)]",
1296
1296
  "hover:border-b-[var(--input-accent)]",
1297
1297
  "focus:border-b-[var(--input-accent)]",
1298
1298
  u && "text-[var(--muted-foreground)] border-b-[var(--muted)] cursor-not-allowed hover:border-b-[var(--muted)]",
1299
- P.wrapper,
1300
- P.pt
1299
+ _.wrapper,
1300
+ _.pt
1301
1301
  ), N = b({
1302
1302
  baseClassName: T,
1303
1303
  className: c,
1304
1304
  style: n,
1305
1305
  sxSlot: A
1306
- }), C = E(
1306
+ }), k = E(
1307
1307
  "absolute left-0 transition-all duration-200 ease-in-out pointer-events-none",
1308
- m ? `top-1 ${P.labelFloat} text-[var(--input-accent)]` : `top-1/2 -translate-y-1/2 ${P.label} text-[var(--muted-foreground)]`,
1309
- S && m && "text-[var(--input-accent)]",
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)]",
1310
1310
  u && "text-[var(--muted-foreground)]",
1311
- M.label.tw
1311
+ z.label.tw
1312
1312
  ), U = b({
1313
- baseClassName: C,
1314
- sxSlot: { tw: "", css: M.label.css }
1315
- }), I = oe((Z) => {
1316
- const R = Z.target.value;
1317
- O || w(R), l == null || l(R);
1318
- }, [O, l]), F = oe((Z) => {
1313
+ baseClassName: k,
1314
+ sxSlot: { tw: "", css: z.label.css }
1315
+ }), j = oe((G) => {
1316
+ const R = G.target.value;
1317
+ O || S(R), l == null || l(R);
1318
+ }, [O, l]), B = oe((G) => {
1319
1319
  var R;
1320
- x(!0), (R = g.onFocus) == null || R.call(g, Z);
1321
- }, [g.onFocus]), B = oe((Z) => {
1320
+ x(!0), (R = f.onFocus) == null || R.call(f, G);
1321
+ }, [f.onFocus]), M = oe((G) => {
1322
1322
  var R;
1323
- x(!1), (R = g.onBlur) == null || R.call(g, Z);
1324
- }, [g.onBlur]), { onFocus: D, onBlur: W, ...K } = g;
1325
- return /* @__PURE__ */ k("div", { className: $, children: [
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: [
1326
1326
  /* @__PURE__ */ s(
1327
1327
  "input",
1328
1328
  {
@@ -1330,11 +1330,11 @@ function Ge(e) {
1330
1330
  type: p,
1331
1331
  className: N.className,
1332
1332
  style: N.style,
1333
- value: _,
1333
+ value: C,
1334
1334
  disabled: u || void 0,
1335
- onChange: I,
1336
- onFocus: F,
1337
- onBlur: B,
1335
+ onChange: j,
1336
+ onFocus: B,
1337
+ onBlur: M,
1338
1338
  "aria-label": y || void 0
1339
1339
  }
1340
1340
  ),
@@ -1380,10 +1380,10 @@ function Xe(e) {
1380
1380
  defaultValue: h,
1381
1381
  disabled: d = !1,
1382
1382
  placeholder: p = "",
1383
- maxlength: g = 524288,
1384
- status: v,
1385
- ...L
1386
- } = e, O = Yo(r, "medium", Ro), j = o === "textarea", w = o === "password", S = v === "error", x = H(n, Do), _ = {
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
1387
  tw: E(x.root.tw, x.input.tw),
1388
1388
  css: { ...x.root.css, ...x.input.css }
1389
1389
  }, m = E("inline-flex", x.root.tw), y = E(
@@ -1391,28 +1391,33 @@ function Xe(e) {
1391
1391
  "border-[var(--border)] shadow-[var(--input-shadow)]",
1392
1392
  "hover:border-[var(--input-accent)]",
1393
1393
  "focus:border-[var(--input-accent)] focus:shadow-[var(--input-focus-shadow)]",
1394
- S && "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)]",
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
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
1396
  Vo[O]
1397
- ), M = b({
1397
+ ), z = b({
1398
1398
  baseClassName: y,
1399
1399
  className: l,
1400
1400
  style: c,
1401
- sxSlot: _
1401
+ sxSlot: C
1402
1402
  }), A = u !== void 0, $ = {
1403
- className: M.className,
1404
- style: M.style,
1403
+ className: z.className,
1404
+ style: z.style,
1405
1405
  onClick: a,
1406
- onChange: i ? (P) => i(P.target.value) : void 0,
1406
+ onChange: i ? (_) => i(_.target.value) : void 0,
1407
1407
  value: A ? u : void 0,
1408
1408
  defaultValue: A ? void 0 : h ?? "",
1409
1409
  disabled: d || void 0,
1410
1410
  placeholder: p,
1411
- maxLength: g,
1412
- "aria-invalid": S || void 0,
1413
- ...L
1411
+ maxLength: f,
1412
+ "aria-invalid": v || void 0,
1413
+ // 原因:password input 不在 form 内,浏览器会发出 [DOM] Password field is not contained in a form 警告
1414
+ // 导致的问题:控制台持续出现 DOM 警告
1415
+ // 解决办法:为 password 类型添加 autoComplete 属性抑制浏览器警告
1416
+ // fixed by clayw on 20260523 night
1417
+ ...S ? { autoComplete: "current-password" } : {},
1418
+ ...P
1414
1419
  };
1415
- return /* @__PURE__ */ s("div", { className: m, children: j ? /* @__PURE__ */ s(
1420
+ return /* @__PURE__ */ s("div", { className: m, children: D ? /* @__PURE__ */ s(
1416
1421
  "textarea",
1417
1422
  {
1418
1423
  ...$,
@@ -1422,7 +1427,7 @@ function Xe(e) {
1422
1427
  "input",
1423
1428
  {
1424
1429
  ...$,
1425
- type: w ? "password" : "text"
1430
+ type: S ? "password" : "text"
1426
1431
  }
1427
1432
  ) });
1428
1433
  }
@@ -1450,8 +1455,8 @@ function Ko(e, o) {
1450
1455
  className: c = "",
1451
1456
  children: l,
1452
1457
  ...a
1453
- } = e, i = H(r, we), u = b({
1454
- baseClassName: "flex items-center justify-center px-4 bg-[var(--layout-header-bg)] text-[var(--layout-header-color)]",
1458
+ } = e, i = W(r, we), u = b({
1459
+ baseClassName: "flex items-center px-4 bg-[var(--layout-header-bg)] text-[var(--layout-header-color)]",
1455
1460
  className: c,
1456
1461
  sxSlot: i.root,
1457
1462
  baseStyle: {
@@ -1471,7 +1476,7 @@ function Ko(e, o) {
1471
1476
  }
1472
1477
  );
1473
1478
  }
1474
- const Be = Q.forwardRef(Ko);
1479
+ const Be = te.forwardRef(Ko);
1475
1480
  Be.displayName = "LayoutHeader";
1476
1481
  Be.propTypes = {
1477
1482
  sx: t.oneOfType([t.string, t.object]),
@@ -1486,8 +1491,8 @@ function Uo(e, o) {
1486
1491
  className: c = "",
1487
1492
  children: l,
1488
1493
  ...a
1489
- } = e, i = H(r, we), u = b({
1490
- baseClassName: "flex items-center justify-center px-4 bg-[var(--layout-footer-bg)] text-[var(--layout-footer-color)]",
1494
+ } = e, i = W(r, we), u = b({
1495
+ baseClassName: "flex items-center px-4 bg-[var(--layout-footer-bg)] text-[var(--layout-footer-color)]",
1491
1496
  className: c,
1492
1497
  sxSlot: i.root,
1493
1498
  baseStyle: {
@@ -1507,7 +1512,7 @@ function Uo(e, o) {
1507
1512
  }
1508
1513
  );
1509
1514
  }
1510
- const Ie = Q.forwardRef(Uo);
1515
+ const Ie = te.forwardRef(Uo);
1511
1516
  Ie.displayName = "LayoutFooter";
1512
1517
  Ie.propTypes = {
1513
1518
  sx: t.oneOfType([t.string, t.object]),
@@ -1523,13 +1528,13 @@ function Ho(e, o) {
1523
1528
  width: l,
1524
1529
  children: a,
1525
1530
  ...i
1526
- } = e, u = H(r, we), h = l ?? "var(--layout-sider-width)", d = b({
1527
- baseClassName: "overflow-auto flex items-center justify-center bg-[var(--layout-sider-bg)] text-[var(--layout-sider-color)]",
1531
+ } = e, u = W(r, we), h = b({
1532
+ baseClassName: "overflow-auto flex flex-col bg-[var(--layout-sider-bg)] text-[var(--layout-sider-color)]",
1528
1533
  className: c,
1529
1534
  sxSlot: u.root,
1530
1535
  baseStyle: {
1531
- width: h,
1532
- minWidth: h,
1536
+ width: siderWidth,
1537
+ minWidth: siderWidth,
1533
1538
  maxWidth: "100%",
1534
1539
  borderRight: "1px solid var(--layout-border)"
1535
1540
  },
@@ -1539,14 +1544,14 @@ function Ho(e, o) {
1539
1544
  "aside",
1540
1545
  {
1541
1546
  ref: o,
1542
- className: d.className,
1543
- style: d.style,
1547
+ className: h.className,
1548
+ style: h.style,
1544
1549
  ...i,
1545
1550
  children: a
1546
1551
  }
1547
1552
  );
1548
1553
  }
1549
- const ke = Q.forwardRef(Ho);
1554
+ const ke = te.forwardRef(Ho);
1550
1555
  ke.displayName = "LayoutSider";
1551
1556
  ke.propTypes = {
1552
1557
  width: t.oneOfType([t.string, t.number]),
@@ -1563,8 +1568,8 @@ function Wo(e, o) {
1563
1568
  width: l,
1564
1569
  children: a,
1565
1570
  ...i
1566
- } = e, u = H(r, we), h = l ?? "var(--layout-toc-width)", d = b({
1567
- baseClassName: "overflow-auto flex items-center justify-center bg-[var(--layout-toc-bg)] text-[var(--layout-toc-color)]",
1571
+ } = e, u = W(r, we), h = l ?? "var(--layout-toc-width)", d = b({
1572
+ baseClassName: "overflow-auto flex flex-col bg-[var(--layout-toc-bg)] text-[var(--layout-toc-color)]",
1568
1573
  className: c,
1569
1574
  sxSlot: u.root,
1570
1575
  baseStyle: {
@@ -1586,7 +1591,7 @@ function Wo(e, o) {
1586
1591
  }
1587
1592
  );
1588
1593
  }
1589
- const Le = Q.forwardRef(Wo);
1594
+ const Le = te.forwardRef(Wo);
1590
1595
  Le.displayName = "LayoutToc";
1591
1596
  Le.propTypes = {
1592
1597
  width: t.oneOfType([t.string, t.number]),
@@ -1602,7 +1607,7 @@ function Zo(e, o) {
1602
1607
  className: c = "",
1603
1608
  children: l,
1604
1609
  ...a
1605
- } = e, i = H(r, we), u = b({
1610
+ } = e, i = W(r, we), u = b({
1606
1611
  /**
1607
1612
  *
1608
1613
  * 这里记录了一次问题:backgroundColor、color 等写在 baseStyle(inline style)里,
@@ -1616,7 +1621,13 @@ function Zo(e, o) {
1616
1621
  * noted by clayw on 20260523 night
1617
1622
  *
1618
1623
  */
1619
- baseClassName: "flex-1 flex items-center justify-center bg-[var(--layout-content-bg)] text-[var(--layout-content-color)]",
1624
+ baseClassName: (
1625
+ // 原因:Content 默认 items-center justify-center 会导致内容垂直+水平居中,长页面内容显示异常
1626
+ // 导致的问题:Content 区域内容始终居中,而非自然流动布局;窄屏时表格文字出现竖排
1627
+ // 解决办法:移除 items-center justify-center,改为 flex-col 让内容自然从上往下流动
1628
+ // fixed by clayw on 20260523 night
1629
+ "flex-1 flex flex-col bg-[var(--layout-content-bg)] text-[var(--layout-content-color)]"
1630
+ ),
1620
1631
  className: c,
1621
1632
  sxSlot: i.root,
1622
1633
  baseStyle: {},
@@ -1633,7 +1644,7 @@ function Zo(e, o) {
1633
1644
  }
1634
1645
  );
1635
1646
  }
1636
- const je = Q.forwardRef(Zo);
1647
+ const je = te.forwardRef(Zo);
1637
1648
  je.displayName = "LayoutContent";
1638
1649
  je.propTypes = {
1639
1650
  sx: t.oneOfType([t.string, t.object]),
@@ -1649,10 +1660,10 @@ function Go(e, o) {
1649
1660
  hasSider: l,
1650
1661
  children: a,
1651
1662
  ...i
1652
- } = e, u = H(r, we), h = l ?? Q.Children.toArray(a).some(
1663
+ } = e, u = W(r, we), h = l ?? te.Children.toArray(a).some(
1653
1664
  (p) => {
1654
- var g, v;
1655
- return Q.isValidElement(p) && (p.type === ke || p.type === Le || ((g = p.type) == null ? void 0 : g.displayName) === "LayoutSider" || ((v = p.type) == null ? void 0 : v.displayName) === "LayoutToc");
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");
1656
1667
  }
1657
1668
  ), d = b({
1658
1669
  baseClassName: E(
@@ -1674,7 +1685,7 @@ function Go(e, o) {
1674
1685
  }
1675
1686
  );
1676
1687
  }
1677
- const ne = Q.forwardRef(Go);
1688
+ const ne = te.forwardRef(Go);
1678
1689
  ne.displayName = "Layout";
1679
1690
  ne.Header = Be;
1680
1691
  ne.Footer = Ie;
@@ -1688,10 +1699,10 @@ ne.propTypes = {
1688
1699
  className: t.string,
1689
1700
  children: t.node
1690
1701
  };
1691
- const Xo = Be, qo = Ie, Jo = ke, Qo = je, er = Le, tr = ["root", "button", "list", "item"], zt = Symbol("LIST_IGNORE"), dt = /* @__PURE__ */ k("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
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: [
1692
1703
  /* @__PURE__ */ s("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
1693
1704
  /* @__PURE__ */ s("path", { d: "M14 2v6h6" })
1694
- ] }), ut = /* @__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" }) });
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" }) });
1695
1706
  function or(e, o) {
1696
1707
  const {
1697
1708
  sx: r = {},
@@ -1706,46 +1717,46 @@ function or(e, o) {
1706
1717
  files: h = [],
1707
1718
  showUploadList: d = !0,
1708
1719
  maxCount: p = 20,
1709
- maxSize: g = 100,
1710
- btnText: v = "选择文件",
1711
- btnStyle: L,
1720
+ maxSize: f = 100,
1721
+ btnText: w = "选择文件",
1722
+ btnStyle: P,
1712
1723
  showSize: O = !0,
1713
- disabled: j = !1,
1714
- ...w
1715
- } = e, S = Yt(), x = h || [], _ = H(r, tr), m = oe(async (T, N) => {
1724
+ disabled: D = !1,
1725
+ ...S
1726
+ } = e, v = Kt(), x = h || [], C = W(r, tr), m = oe(async (T, N) => {
1716
1727
  if (!u) return !0;
1717
1728
  try {
1718
- const C = await u(T, N);
1719
- return C === void 0 ? !0 : C;
1729
+ const k = await u(T, N);
1730
+ return k === void 0 ? !0 : k;
1720
1731
  } catch {
1721
1732
  return !1;
1722
1733
  }
1723
1734
  }, [u]), y = oe(async (T) => {
1724
- const C = Array.from(T.target.files || []).filter((F) => F.size / 1024 / 1024 > g ? (console.warn(`[Tango Upload] ${F.name} 超过 ${g}MB,已被过滤`), !1) : !0), U = a ? C.slice(0, p) : C.slice(0, 1), I = [];
1725
- for (const F of U) {
1726
- const B = await m(F, U);
1727
- if (B === !1) {
1728
- console.warn(`[Tango Upload] ${F.name} 被 beforeUpload 拦截`);
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 拦截`);
1729
1740
  continue;
1730
1741
  }
1731
- if (B === zt) {
1732
- console.warn(`[Tango Upload] ${F.name} 被 LIST_IGNORE 忽略`);
1742
+ if (M === Et) {
1743
+ console.warn(`[Tango Upload] ${B.name} 被 LIST_IGNORE 忽略`);
1733
1744
  continue;
1734
1745
  }
1735
- if (B instanceof Blob) {
1736
- const D = B instanceof File ? B : new File([B], F.name, { type: F.type });
1737
- I.push(D);
1746
+ if (M instanceof Blob) {
1747
+ const F = M instanceof File ? M : new File([M], B.name, { type: B.type });
1748
+ j.push(F);
1738
1749
  } else
1739
- I.push(F);
1750
+ j.push(B);
1740
1751
  }
1741
- T.target.value = "", i(I);
1742
- }, [a, p, g, m, i]), M = oe((T, N) => {
1743
- const C = x.filter((U, I) => I !== N);
1744
- i(C);
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);
1745
1756
  }, [x, i]), A = b({
1746
1757
  baseClassName: "inline-flex flex-col gap-3",
1747
1758
  className: c,
1748
- sxSlot: _.root,
1759
+ sxSlot: C.root,
1749
1760
  style: n
1750
1761
  }), $ = b({
1751
1762
  baseClassName: E(
@@ -1755,48 +1766,48 @@ function or(e, o) {
1755
1766
  x.length === 0 && "border-transparent"
1756
1767
  ),
1757
1768
  baseStyle: { borderRadius: "var(--upload-radius)" },
1758
- sxSlot: _.list
1759
- }), P = b({
1769
+ sxSlot: C.list
1770
+ }), _ = b({
1760
1771
  baseClassName: E(
1761
1772
  "flex items-center gap-2 px-3 py-1.5 text-sm",
1762
1773
  "text-[var(--upload-item-text)] hover:bg-[var(--upload-item-hover-bg)]",
1763
1774
  "transition-colors"
1764
1775
  ),
1765
- sxSlot: _.item
1776
+ sxSlot: C.item
1766
1777
  });
1767
- return /* @__PURE__ */ k("div", { ref: o, className: A.className, style: A.style, ...w, children: [
1778
+ return /* @__PURE__ */ L("div", { ref: o, className: A.className, style: A.style, ...S, children: [
1768
1779
  /* @__PURE__ */ s(
1769
1780
  "input",
1770
1781
  {
1771
- id: S,
1782
+ id: v,
1772
1783
  type: "file",
1773
1784
  accept: l,
1774
1785
  multiple: a,
1775
1786
  className: "hidden",
1776
1787
  onChange: y,
1777
- disabled: j,
1788
+ disabled: D,
1778
1789
  "aria-hidden": "true",
1779
1790
  tabIndex: -1
1780
1791
  }
1781
1792
  ),
1782
1793
  /* @__PURE__ */ s(
1783
- ce,
1794
+ ie,
1784
1795
  {
1785
- disabled: j,
1786
- style: L,
1787
- sx: _.button,
1796
+ disabled: D,
1797
+ style: P,
1798
+ sx: C.button,
1788
1799
  onClick: () => {
1789
1800
  var T;
1790
- return (T = document.getElementById(S)) == null ? void 0 : T.click();
1801
+ return (T = document.getElementById(v)) == null ? void 0 : T.click();
1791
1802
  },
1792
- children: v
1803
+ children: w
1793
1804
  }
1794
1805
  ),
1795
- d && x.length > 0 && /* @__PURE__ */ s("ul", { className: $.className, style: $.style, children: a ? x.map((T, N) => /* @__PURE__ */ k("li", { className: P.className, style: P.style, children: [
1796
- /* @__PURE__ */ s("span", { className: "flex-shrink-0 text-[var(--upload-icon-color)]", children: dt }),
1797
- /* @__PURE__ */ k("span", { className: "flex-1 truncate", children: [
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: [
1798
1809
  T.name,
1799
- O && /* @__PURE__ */ k("span", { className: "ml-1 text-xs text-[var(--muted-foreground)]", children: [
1810
+ O && /* @__PURE__ */ L("span", { className: "ml-1 text-xs text-[var(--muted-foreground)]", children: [
1800
1811
  "(",
1801
1812
  (T.size / 1024).toFixed(2),
1802
1813
  " KB)"
@@ -1807,16 +1818,16 @@ function or(e, o) {
1807
1818
  {
1808
1819
  type: "button",
1809
1820
  className: "flex-shrink-0 p-0.5 rounded hover:bg-[var(--upload-del-hover-bg)] text-[var(--upload-del-color)] transition-colors",
1810
- onClick: () => M(T, N),
1821
+ onClick: () => z(T, N),
1811
1822
  "aria-label": `删除 ${T.name}`,
1812
- children: ut
1823
+ children: pt
1813
1824
  }
1814
1825
  )
1815
- ] }, N)) : /* @__PURE__ */ k("li", { className: P.className, style: P.style, children: [
1816
- /* @__PURE__ */ s("span", { className: "flex-shrink-0 text-[var(--upload-icon-color)]", children: dt }),
1817
- /* @__PURE__ */ k("span", { className: "flex-1 truncate", children: [
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: [
1818
1829
  x[0].name,
1819
- O && /* @__PURE__ */ k("span", { className: "ml-1 text-xs text-[var(--muted-foreground)]", children: [
1830
+ O && /* @__PURE__ */ L("span", { className: "ml-1 text-xs text-[var(--muted-foreground)]", children: [
1820
1831
  "(",
1821
1832
  (x[0].size / 1024).toFixed(2),
1822
1833
  " KB)"
@@ -1827,17 +1838,17 @@ function or(e, o) {
1827
1838
  {
1828
1839
  type: "button",
1829
1840
  className: "flex-shrink-0 p-0.5 rounded hover:bg-[var(--upload-del-hover-bg)] text-[var(--upload-del-color)] transition-colors",
1830
- onClick: () => M(x[0], 0),
1841
+ onClick: () => z(x[0], 0),
1831
1842
  "aria-label": `删除 ${x[0].name}`,
1832
- children: ut
1843
+ children: pt
1833
1844
  }
1834
1845
  )
1835
1846
  ] }) })
1836
1847
  ] });
1837
1848
  }
1838
- const qe = Tt(or);
1849
+ const qe = kt(or);
1839
1850
  qe.displayName = "Upload";
1840
- qe.LIST_IGNORE = zt;
1851
+ qe.LIST_IGNORE = Et;
1841
1852
  qe.propTypes = {
1842
1853
  sx: t.oneOfType([t.string, t.object]),
1843
1854
  style: t.object,
@@ -1855,10 +1866,10 @@ qe.propTypes = {
1855
1866
  showSize: t.bool,
1856
1867
  disabled: t.bool
1857
1868
  };
1858
- const rr = ["root", "icon", "content", "actions", "closeIcon"], pt = {
1869
+ const rr = ["root", "icon", "content", "actions", "closeIcon"], mt = {
1859
1870
  cancel: "取消",
1860
1871
  action: "操作"
1861
- }, mt = {
1872
+ }, bt = {
1862
1873
  small: {
1863
1874
  rootClass: "px-[15px] py-[8px] h-[45px] rounded-[6px] gap-[8px] border",
1864
1875
  iconSize: 20,
@@ -1886,7 +1897,7 @@ const rr = ["root", "icon", "content", "actions", "closeIcon"], pt = {
1886
1897
  buttonGap: "12px",
1887
1898
  buttonFontSize: "15px"
1888
1899
  }
1889
- }, bt = {
1900
+ }, gt = {
1890
1901
  info: {
1891
1902
  bgVar: "--banner-info-bg",
1892
1903
  borderVar: "--banner-info-border",
@@ -1927,49 +1938,49 @@ function sr(e) {
1927
1938
  bannerBgColor: h,
1928
1939
  bannerBorderColor: d,
1929
1940
  bannerIconColor: p,
1930
- sx: g = {},
1931
- style: v = {},
1932
- className: L = "",
1941
+ sx: f = {},
1942
+ style: w = {},
1943
+ className: P = "",
1933
1944
  i18nKey: O,
1934
- localeText: j = {},
1935
- ...w
1936
- } = e, { t: S } = ie(), x = ft(c, "normal", mt), _ = ft(i, "info", bt), m = mt[x], y = bt[_], M = H(g, rr), A = {
1937
- cancel: S("banner.cancel", pt.cancel),
1938
- action: S("banner.action", pt.action),
1939
- ...j
1940
- }, $ = l ?? (O === "cancel" ? S("banner.cancel", A.cancel) : A.cancel), P = a ?? (O === "action" ? S("banner.action", A.action) : A.action), T = o ?? $, N = h || (u === !0 ? "transparent" : `var(${y.bgVar})`), C = d || `var(${y.borderVar})`, U = p || `var(${y.iconVar})`, I = `var(${y.textVar})`, F = b({
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({
1941
1952
  baseClassName: E(
1942
1953
  "flex w-full items-center justify-start transition-colors duration-200",
1943
1954
  m.rootClass
1944
1955
  ),
1945
- className: L,
1956
+ className: P,
1946
1957
  style: {
1947
1958
  backgroundColor: N,
1948
- borderColor: C,
1949
- color: u === !0 ? "var(--muted-foreground)" : I,
1950
- ...v
1959
+ borderColor: k,
1960
+ color: u === !0 ? "var(--muted-foreground)" : j,
1961
+ ...w
1951
1962
  },
1952
- sxSlot: M.root
1953
- }), B = b({
1963
+ sxSlot: z.root
1964
+ }), M = b({
1954
1965
  baseClassName: "shrink-0",
1955
1966
  baseStyle: {
1956
1967
  width: `${m.iconSize}px`,
1957
1968
  height: `${m.iconSize}px`,
1958
1969
  color: U
1959
1970
  },
1960
- sxSlot: M.icon
1961
- }), D = b({
1971
+ sxSlot: z.icon
1972
+ }), F = b({
1962
1973
  baseClassName: E(
1963
1974
  "flex-grow text-left",
1964
1975
  m.contentClass
1965
1976
  ),
1966
- sxSlot: M.content
1967
- }), W = b({
1977
+ sxSlot: z.content
1978
+ }), H = b({
1968
1979
  baseClassName: "flex items-center justify-end flex-1",
1969
1980
  baseStyle: {
1970
1981
  gap: m.buttonGap
1971
1982
  },
1972
- sxSlot: M.actions
1983
+ sxSlot: z.actions
1973
1984
  }), K = b({
1974
1985
  baseClassName: "shrink-0 cursor-pointer",
1975
1986
  baseStyle: {
@@ -1977,38 +1988,38 @@ function sr(e) {
1977
1988
  height: `${m.closeIconSize}px`,
1978
1989
  color: "var(--banner-close-icon)"
1979
1990
  },
1980
- sxSlot: M.closeIcon
1981
- }), Z = /* @__PURE__ */ k("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
1991
+ sxSlot: z.closeIcon
1992
+ }), G = /* @__PURE__ */ L("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
1982
1993
  /* @__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" }),
1983
1994
  /* @__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" }),
1984
1995
  /* @__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" })
1985
- ] }), R = /* @__PURE__ */ k("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
1996
+ ] }), R = /* @__PURE__ */ L("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
1986
1997
  /* @__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" }),
1987
1998
  /* @__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" }),
1988
1999
  /* @__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" })
1989
- ] }), re = /* @__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" }) }), de = /* @__PURE__ */ k("svg", { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: [
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: [
1990
2001
  /* @__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" }),
1991
2002
  /* @__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" })
1992
- ] }), 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" }) }), fe = {
1993
- success: de,
2003
+ ] }), 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 = {
2004
+ success: ue,
1994
2005
  warning: R,
1995
- error: re,
1996
- info: Z
2006
+ error: Q,
2007
+ info: G
1997
2008
  };
1998
- return /* @__PURE__ */ k(
2009
+ return /* @__PURE__ */ L(
1999
2010
  "div",
2000
2011
  {
2001
- className: F.className,
2002
- style: F.style,
2003
- "data-level": _,
2012
+ className: B.className,
2013
+ style: B.style,
2014
+ "data-level": C,
2004
2015
  "data-size": x,
2005
- ...w,
2016
+ ...S,
2006
2017
  children: [
2007
- /* @__PURE__ */ s("div", { className: B.className, style: B.style, children: fe[_] }),
2008
- /* @__PURE__ */ s("div", { className: D.className, style: D.style, children: T }),
2009
- /* @__PURE__ */ k("div", { className: W.className, style: W.style, 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: [
2010
2021
  /* @__PURE__ */ s(
2011
- ce,
2022
+ ie,
2012
2023
  {
2013
2024
  type: "transparent",
2014
2025
  sx: {
@@ -2023,7 +2034,7 @@ function sr(e) {
2023
2034
  }
2024
2035
  ),
2025
2036
  /* @__PURE__ */ s(
2026
- ce,
2037
+ ie,
2027
2038
  {
2028
2039
  type: "transparent",
2029
2040
  sx: {
@@ -2035,7 +2046,7 @@ function sr(e) {
2035
2046
  },
2036
2047
  onClick: n,
2037
2048
  size: x === "normal" ? "medium" : x,
2038
- children: P
2049
+ children: _
2039
2050
  }
2040
2051
  ),
2041
2052
  /* @__PURE__ */ s(
@@ -2074,7 +2085,7 @@ const ar = ["root", "input", "text"], Ye = {
2074
2085
  hex: "HEX",
2075
2086
  rgb: "RGB",
2076
2087
  hsl: "HSL"
2077
- }, gt = {
2088
+ }, ht = {
2078
2089
  small: { inputSize: 20, fontSize: "11px", gap: "6px" },
2079
2090
  medium: { inputSize: 28, fontSize: "12px", gap: "10px" },
2080
2091
  large: { inputSize: 36, fontSize: "14px", gap: "14px" }
@@ -2082,7 +2093,7 @@ const ar = ["root", "input", "text"], Ye = {
2082
2093
  hex: "hex",
2083
2094
  rgb: "rgb",
2084
2095
  hsl: "hsl"
2085
- }, ht = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o, lr = (e) => {
2096
+ }, yt = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o, lr = (e) => {
2086
2097
  const o = parseInt(e.slice(1, 3), 16), r = parseInt(e.slice(3, 5), 16), n = parseInt(e.slice(5, 7), 16);
2087
2098
  return `rgb(${o}, ${r}, ${n})`;
2088
2099
  }, cr = (e) => {
@@ -2118,22 +2129,22 @@ function dr(e) {
2118
2129
  style: h = {},
2119
2130
  className: d = "",
2120
2131
  i18nKey: p,
2121
- localeText: g = {},
2122
- ...v
2123
- } = e, { t: L } = ie(), O = ht(i, "medium", gt), j = ht(a, "hex", nr), w = gt[O], [S, x] = G(r), _ = o ?? S, m = H(u, ar), y = {
2124
- hex: L("colorpicker.hex", Ye.hex),
2125
- rgb: L("colorpicker.rgb", Ye.rgb),
2126
- hsl: L("colorpicker.hsl", Ye.hsl),
2127
- ...g
2128
- }, M = (C) => {
2129
- const U = C.target.value;
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;
2130
2141
  o === void 0 && x(U), n(U);
2131
2142
  }, A = [];
2132
2143
  if (l) {
2133
- const C = p || (typeof l == "string" ? l : null) || j;
2144
+ const k = p || (typeof l == "string" ? l : null) || D;
2134
2145
  A.push({
2135
- label: y[C],
2136
- value: ir(_, C)
2146
+ label: y[k],
2147
+ value: ir(C, k)
2137
2148
  });
2138
2149
  }
2139
2150
  const $ = b({
@@ -2142,49 +2153,49 @@ function dr(e) {
2142
2153
  c && "cursor-not-allowed opacity-60"
2143
2154
  ),
2144
2155
  className: d,
2145
- baseStyle: { gap: w.gap },
2156
+ baseStyle: { gap: S.gap },
2146
2157
  style: h,
2147
2158
  sxSlot: m.root
2148
- }), P = b({
2159
+ }), _ = b({
2149
2160
  baseClassName: E(
2150
2161
  "shrink-0 cursor-pointer border-2 border-[var(--border)] rounded-full bg-transparent overflow-hidden transition-colors duration-200",
2151
2162
  c && "cursor-not-allowed"
2152
2163
  ),
2153
2164
  baseStyle: {
2154
- width: `${w.inputSize}px`,
2155
- height: `${w.inputSize}px`,
2165
+ width: `${S.inputSize}px`,
2166
+ height: `${S.inputSize}px`,
2156
2167
  padding: 0
2157
2168
  },
2158
2169
  sxSlot: m.input
2159
2170
  }), T = b({
2160
2171
  baseClassName: "flex flex-col text-[var(--muted-foreground)]",
2161
- baseStyle: { fontSize: w.fontSize },
2172
+ baseStyle: { fontSize: S.fontSize },
2162
2173
  sxSlot: m.text
2163
2174
  });
2164
- return /* @__PURE__ */ k(Ne, { children: [
2175
+ return /* @__PURE__ */ L(Ne, { children: [
2165
2176
  /* @__PURE__ */ s("style", { children: `
2166
2177
  .tango-cp-input::-webkit-color-swatch-wrapper { padding: 0; }
2167
2178
  .tango-cp-input::-webkit-color-swatch { border: 0; border-radius: 9999px; }
2168
2179
  .tango-cp-input::-moz-color-swatch { border: 0; border-radius: 9999px; }
2169
2180
  ` }),
2170
- /* @__PURE__ */ k("div", { className: $.className, style: $.style, ...v, children: [
2181
+ /* @__PURE__ */ L("div", { className: $.className, style: $.style, ...w, children: [
2171
2182
  /* @__PURE__ */ s(
2172
2183
  "input",
2173
2184
  {
2174
2185
  type: "color",
2175
- value: _,
2176
- onChange: M,
2186
+ value: C,
2187
+ onChange: z,
2177
2188
  disabled: c,
2178
- className: `tango-cp-input ${P.className}`,
2179
- style: P.style,
2180
- "aria-label": v["aria-label"] || `颜色选择器: ${_}`
2189
+ className: `tango-cp-input ${_.className}`,
2190
+ style: _.style,
2191
+ "aria-label": w["aria-label"] || `颜色选择器: ${C}`
2181
2192
  }
2182
2193
  ),
2183
- l && A.length > 0 && /* @__PURE__ */ s("div", { className: T.className, style: T.style, children: A.map(({ label: C, value: U }) => /* @__PURE__ */ k("span", { children: [
2184
- C,
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,
2185
2196
  ": ",
2186
2197
  U
2187
- ] }, C)) })
2198
+ ] }, k)) })
2188
2199
  ] })
2189
2200
  ] });
2190
2201
  }
@@ -2202,10 +2213,10 @@ dr.propTypes = {
2202
2213
  i18nKey: t.string,
2203
2214
  localeText: t.object
2204
2215
  };
2205
- const ur = ["root", "date", "weekday", "time"], yt = {
2216
+ const ur = ["root", "date", "weekday", "time"], xt = {
2206
2217
  weekdayPrefix: "星期",
2207
2218
  weekdayShortPrefix: "周"
2208
- }, xt = {
2219
+ }, vt = {
2209
2220
  default: "default",
2210
2221
  line: "line",
2211
2222
  full: "full",
@@ -2228,7 +2239,7 @@ const ur = ["root", "date", "weekday", "time"], yt = {
2228
2239
  }, Te = (e, o) => {
2229
2240
  const r = /* @__PURE__ */ new Date(), n = { hour: "2-digit", minute: "2-digit" };
2230
2241
  return o && (n.second = "2-digit"), r.toLocaleTimeString(e, n);
2231
- }, fr = (e, o, r, n) => {
2242
+ }, gr = (e, o, r, n) => {
2232
2243
  const c = e.endsWith("-line"), l = mr(o, c), a = br(o, r);
2233
2244
  switch (e) {
2234
2245
  case "line":
@@ -2276,7 +2287,7 @@ const ur = ["root", "date", "weekday", "time"], yt = {
2276
2287
  return [{ key: "date", text: l }];
2277
2288
  }
2278
2289
  };
2279
- function gr(e) {
2290
+ function fr(e) {
2280
2291
  const {
2281
2292
  type: o = "default",
2282
2293
  single: r = !1,
@@ -2286,48 +2297,52 @@ function gr(e) {
2286
2297
  i18nKey: a,
2287
2298
  localeText: i = {},
2288
2299
  ...u
2289
- } = e || {}, { t: h, locale: d } = ie(), p = pr(o, "default", xt), g = d === "en-US" ? "en-US" : "zh-CN";
2300
+ } = e || {}, { t: h, locale: d } = de(), [p, f] = Z(!1);
2301
+ ae(() => {
2302
+ f(!0);
2303
+ }, []);
2304
+ const w = pr(o, "default", vt), P = d === "en-US" ? "en-US" : "zh-CN";
2290
2305
  ({
2291
- weekdayPrefix: h("date.weekdayPrefix", yt.weekdayPrefix),
2292
- weekdayShortPrefix: h("date.weekdayShortPrefix", yt.weekdayShortPrefix),
2306
+ weekdayPrefix: h("date.weekdayPrefix", xt.weekdayPrefix),
2307
+ weekdayShortPrefix: h("date.weekdayShortPrefix", xt.weekdayShortPrefix),
2293
2308
  ...i
2294
2309
  });
2295
- const v = H(n, ur), L = a && xt[a] ? a : p, O = fr(L, g, r), j = b({
2310
+ const O = W(n, ur), D = a && vt[a] ? a : w, S = p ? gr(D, P, r) : [], v = b({
2296
2311
  baseClassName: E("inline-flex items-center gap-1 text-[var(--foreground)]"),
2297
2312
  className: l,
2298
2313
  baseStyle: {},
2299
2314
  style: c,
2300
- sxSlot: v.root
2301
- }), w = {
2315
+ sxSlot: O.root
2316
+ }), x = {
2302
2317
  date: b({
2303
2318
  baseClassName: "",
2304
- sxSlot: v.date
2319
+ sxSlot: O.date
2305
2320
  }),
2306
2321
  weekday: b({
2307
2322
  baseClassName: "text-[var(--muted-foreground)]",
2308
- sxSlot: v.weekday
2323
+ sxSlot: O.weekday
2309
2324
  }),
2310
2325
  time: b({
2311
2326
  baseClassName: "",
2312
- sxSlot: v.time
2327
+ sxSlot: O.time
2313
2328
  })
2314
2329
  };
2315
2330
  return /* @__PURE__ */ s(
2316
2331
  "div",
2317
2332
  {
2318
- className: j.className,
2319
- style: j.style,
2333
+ className: v.className,
2334
+ style: v.style,
2320
2335
  role: "timer",
2321
2336
  "aria-live": "polite",
2322
2337
  ...u,
2323
- children: O.map((S) => {
2324
- const x = w[S.key] || { className: "", style: {} };
2325
- return /* @__PURE__ */ s("span", { className: x.className, style: x.style, children: S.text }, S.key);
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);
2326
2341
  })
2327
2342
  }
2328
2343
  );
2329
2344
  }
2330
- gr.propTypes = {
2345
+ fr.propTypes = {
2331
2346
  type: t.oneOf([
2332
2347
  "default",
2333
2348
  "line",
@@ -2356,7 +2371,7 @@ const hr = ["root", "input", "panel", "header", "body", "footer"], me = {
2356
2371
  nextMonth: "下一月",
2357
2372
  weekDays: ["日", "一", "二", "三", "四", "五", "六"],
2358
2373
  monthFormat: "${year} 年 ${month} 月"
2359
- }, vt = {
2374
+ }, St = {
2360
2375
  small: { inputPx: "px-2 py-1", textSm: "text-xs", minW: "min-w-[140px]", panelW: "w-[260px]" },
2361
2376
  medium: { inputPx: "px-3 py-2", textSm: "text-sm", minW: "min-w-[180px]", panelW: "w-[300px]" },
2362
2377
  large: { inputPx: "px-4 py-3", textSm: "text-base", minW: "min-w-[220px]", panelW: "w-[340px]" }
@@ -2375,175 +2390,175 @@ function xr(e) {
2375
2390
  className: h = "",
2376
2391
  i18nKey: d,
2377
2392
  localeText: p = {},
2378
- placeholder: g,
2379
- ...v
2380
- } = e, { t: L, locale: O } = ie(), j = yr(a, "medium", vt), w = vt[j], S = O === "en-US", [x, _] = G(r || ""), m = o !== void 0 ? o : x, [y, M] = G("00"), [A, $] = G("00"), [P, T] = G(!1), [N, C] = G(() => {
2381
- const f = /* @__PURE__ */ new Date();
2382
- return new Date(f.getFullYear(), f.getMonth(), 1);
2383
- }), U = $e(null), I = {
2384
- placeholder: L("datepicker.placeholder", me.placeholder),
2385
- placeholderTime: L("datepicker.placeholderTime", me.placeholderTime),
2386
- timeLabel: L("datepicker.timeLabel", me.timeLabel),
2387
- confirm: L("datepicker.confirm", me.confirm),
2388
- cancel: L("datepicker.cancel", me.cancel),
2389
- prevMonth: L("datepicker.prevMonth", me.prevMonth),
2390
- nextMonth: L("datepicker.nextMonth", me.nextMonth),
2391
- weekDays: S ? ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] : me.weekDays,
2392
- monthFormat: S ? "${month}/${year}" : me.monthFormat,
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,
2393
2408
  ...p
2394
2409
  };
2395
- le(() => {
2396
- const f = (Y) => {
2397
- U.current && !U.current.contains(Y.target) && T(!1);
2410
+ ae(() => {
2411
+ const g = (V) => {
2412
+ U.current && !U.current.contains(V.target) && T(!1);
2398
2413
  };
2399
- return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
2414
+ return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
2400
2415
  }, []);
2401
- const F = (f) => {
2402
- const Y = f.getFullYear(), J = (f.getMonth() + 1).toString().padStart(2, "0"), ge = f.getDate().toString().padStart(2, "0");
2403
- return `${Y}-${J}-${ge}`;
2404
- }, B = Se(() => {
2405
- const f = N.getFullYear(), Y = N.getMonth() + 1;
2406
- return I.monthFormat.replace("${year}", String(f)).replace("${month}", String(Y));
2407
- }, [N, I.monthFormat]), D = Se(() => {
2408
- const f = N.getFullYear(), Y = N.getMonth(), J = new Date(f, Y, 1).getDay(), ge = new Date(f, Y + 1, 0).getDate(), pe = Array.from({ length: ge }, (Je, Fe) => Fe + 1);
2409
- return [...Array(J).fill(null), ...pe];
2410
- }, [N]), W = Se(() => m ? l ? `${m} ${y}:${A}` : m : "", [m, y, A, l]), K = (f) => {
2411
- const Y = new Date(N.getFullYear(), N.getMonth(), f);
2412
- return m === F(Y);
2413
- }, Z = (f, Y, J) => {
2414
- if (f) {
2416
+ const B = (g) => {
2417
+ const V = g.getFullYear(), ee = (g.getMonth() + 1).toString().padStart(2, "0"), ce = g.getDate().toString().padStart(2, "0");
2418
+ 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);
2424
+ 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) {
2415
2430
  if (l) {
2416
- const ge = `${f}T${Y}:${J}`, pe = new Date(ge), Je = pe.getFullYear(), Fe = (pe.getMonth() + 1).toString().padStart(2, "0"), Dt = pe.getDate().toString().padStart(2, "0"), Rt = pe.getHours().toString().padStart(2, "0"), Vt = pe.getMinutes().toString().padStart(2, "0");
2417
- n(`${Je}-${Fe}-${Dt} ${Rt}:${Vt}`, ge);
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);
2418
2433
  return;
2419
2434
  }
2420
- n(f, f);
2435
+ n(g, g);
2421
2436
  }
2422
- }, R = (f) => {
2423
- const Y = new Date(N.getFullYear(), N.getMonth(), f), J = F(Y);
2424
- o === void 0 && _(J), Z(J, y, A), l || T(!1);
2425
- }, re = (f) => {
2426
- const Y = f.target.value;
2427
- M(Y), Z(m, Y, A);
2428
- }, de = (f) => {
2429
- const Y = f.target.value;
2430
- $(Y), Z(m, y, Y);
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);
2431
2446
  }, be = () => {
2432
2447
  if (!c) {
2433
2448
  if (m) {
2434
- const [f, Y] = m.split("-").map(Number);
2435
- C(new Date(f, Y - 1, 1));
2449
+ const [g, V] = m.split("-").map(Number);
2450
+ k(new Date(g, V - 1, 1));
2436
2451
  }
2437
2452
  T(!0);
2438
2453
  }
2439
- }, fe = Array.from({ length: 24 }, (f, Y) => String(Y).padStart(2, "0")), se = Array.from({ length: 60 }, (f, Y) => String(Y).padStart(2, "0")), ee = H(i, hr);
2440
- typeof i == "string" && (ee.input.tw = E(ee.input.tw, ee.root.tw), ee.root.tw = "");
2441
- const q = b({
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 = "");
2456
+ const J = b({
2442
2457
  baseClassName: "relative inline-block",
2443
- sxSlot: ee.root
2444
- }), z = b({
2458
+ sxSlot: X.root
2459
+ }), I = b({
2445
2460
  baseClassName: E(
2446
2461
  "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",
2447
2462
  "focus:border-[var(--primary)] focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--primary)_18%,transparent)]",
2448
2463
  "hover:border-[var(--primary)]",
2449
- w.inputPx,
2450
- w.textSm,
2451
- w.minW,
2464
+ S.inputPx,
2465
+ S.textSm,
2466
+ S.minW,
2452
2467
  c && "bg-[var(--muted)] text-[var(--muted-foreground)] cursor-not-allowed"
2453
2468
  ),
2454
2469
  className: h,
2455
2470
  style: u,
2456
- sxSlot: ee.input
2457
- }), X = b({
2471
+ sxSlot: X.input
2472
+ }), q = b({
2458
2473
  baseClassName: E(
2459
2474
  "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)]",
2460
- w.panelW
2475
+ S.panelW
2461
2476
  ),
2462
- sxSlot: ee.panel
2463
- }), te = b({
2477
+ sxSlot: X.panel
2478
+ }), le = b({
2464
2479
  baseClassName: "flex items-center justify-between h-10 mb-2",
2465
- sxSlot: ee.header
2466
- }), ae = b({
2480
+ sxSlot: X.header
2481
+ }), re = b({
2467
2482
  baseClassName: "flex flex-wrap",
2468
- sxSlot: ee.body
2469
- }), ue = b({
2483
+ sxSlot: X.body
2484
+ }), se = b({
2470
2485
  baseClassName: "mt-2.5 pt-2.5 border-t border-[var(--border)]",
2471
- sxSlot: ee.footer
2486
+ sxSlot: X.footer
2472
2487
  });
2473
- return /* @__PURE__ */ k("div", { className: q.className, style: q.style, ref: U, ...v, children: [
2488
+ return /* @__PURE__ */ L("div", { className: J.className, style: J.style, ref: U, ...w, children: [
2474
2489
  /* @__PURE__ */ s(
2475
2490
  "input",
2476
2491
  {
2477
2492
  type: "text",
2478
- value: W,
2493
+ value: H,
2479
2494
  readOnly: !0,
2480
2495
  onClick: be,
2481
- className: z.className,
2482
- style: z.style,
2496
+ className: I.className,
2497
+ style: I.style,
2483
2498
  disabled: c,
2484
- placeholder: g || (l ? I.placeholderTime : I.placeholder),
2485
- "aria-label": v["aria-label"] || g || (l ? I.placeholderTime : I.placeholder),
2499
+ placeholder: f || (l ? j.placeholderTime : j.placeholder),
2500
+ "aria-label": w["aria-label"] || f || (l ? j.placeholderTime : j.placeholder),
2486
2501
  "aria-haspopup": "dialog",
2487
- "aria-expanded": P
2502
+ "aria-expanded": _
2488
2503
  }
2489
2504
  ),
2490
- P && !c && /* @__PURE__ */ k("div", { className: X.className, style: X.style, role: "dialog", "aria-label": "日期选择面板", children: [
2491
- /* @__PURE__ */ k("div", { className: te.className, style: te.style, children: [
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: [
2492
2507
  /* @__PURE__ */ s(
2493
2508
  "button",
2494
2509
  {
2495
2510
  type: "button",
2496
2511
  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))]",
2497
- onClick: () => C(new Date(N.getFullYear(), N.getMonth() - 1, 1)),
2498
- "aria-label": I.prevMonth,
2512
+ onClick: () => k(new Date(N.getFullYear(), N.getMonth() - 1, 1)),
2513
+ "aria-label": j.prevMonth,
2499
2514
  children: "<"
2500
2515
  }
2501
2516
  ),
2502
- /* @__PURE__ */ s("div", { className: "text-sm font-semibold text-[var(--foreground)]", children: B }),
2517
+ /* @__PURE__ */ s("div", { className: "text-sm font-semibold text-[var(--foreground)]", children: M }),
2503
2518
  /* @__PURE__ */ s(
2504
2519
  "button",
2505
2520
  {
2506
2521
  type: "button",
2507
2522
  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))]",
2508
- onClick: () => C(new Date(N.getFullYear(), N.getMonth() + 1, 1)),
2509
- "aria-label": I.nextMonth,
2523
+ onClick: () => k(new Date(N.getFullYear(), N.getMonth() + 1, 1)),
2524
+ "aria-label": j.nextMonth,
2510
2525
  children: ">"
2511
2526
  }
2512
2527
  )
2513
2528
  ] }),
2514
- /* @__PURE__ */ k("div", { className: ae.className, style: ae.style, children: [
2515
- I.weekDays.map((f) => /* @__PURE__ */ s("div", { className: "w-[calc(100%/7)] text-center leading-[30px] text-xs text-[var(--muted-foreground)]", children: f }, f)),
2516
- D.map((f, Y) => {
2517
- if (!f)
2518
- return /* @__PURE__ */ s("div", { className: "w-[calc(100%/7)] text-center leading-[30px]" }, `empty-${Y}`);
2519
- const J = K(f);
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)
2533
+ return /* @__PURE__ */ s("div", { className: "w-[calc(100%/7)] text-center leading-[30px]" }, `empty-${V}`);
2534
+ const ee = K(g);
2520
2535
  return /* @__PURE__ */ s(
2521
2536
  "button",
2522
2537
  {
2523
2538
  type: "button",
2524
2539
  className: E(
2525
2540
  "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)]",
2526
- J && "bg-[var(--primary)] text-[var(--primary-foreground)] hover:bg-[var(--primary)]"
2541
+ ee && "bg-[var(--primary)] text-[var(--primary-foreground)] hover:bg-[var(--primary)]"
2527
2542
  ),
2528
- onClick: () => R(f),
2529
- "aria-label": `${N.getFullYear()}-${(N.getMonth() + 1).toString().padStart(2, "0")}-${f.toString().padStart(2, "0")}`,
2530
- children: f
2543
+ onClick: () => R(g),
2544
+ "aria-label": `${N.getFullYear()}-${(N.getMonth() + 1).toString().padStart(2, "0")}-${g.toString().padStart(2, "0")}`,
2545
+ children: g
2531
2546
  },
2532
- `${N.getFullYear()}-${N.getMonth()}-${f}`
2547
+ `${N.getFullYear()}-${N.getMonth()}-${g}`
2533
2548
  );
2534
2549
  })
2535
2550
  ] }),
2536
- l && /* @__PURE__ */ k("div", { className: ue.className, style: ue.style, children: [
2537
- /* @__PURE__ */ s("div", { className: "text-xs text-[var(--muted-foreground)] mb-2", children: I.timeLabel }),
2538
- /* @__PURE__ */ k("div", { className: "flex items-center gap-2", children: [
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: [
2539
2554
  /* @__PURE__ */ s(
2540
2555
  "select",
2541
2556
  {
2542
2557
  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)]",
2543
2558
  value: y,
2544
- onChange: re,
2559
+ onChange: Q,
2545
2560
  "aria-label": "小时",
2546
- children: fe.map((f) => /* @__PURE__ */ s("option", { value: f, children: f }, f))
2561
+ children: ge.map((g) => /* @__PURE__ */ s("option", { value: g, children: g }, g))
2547
2562
  }
2548
2563
  ),
2549
2564
  /* @__PURE__ */ s("span", { className: "font-semibold text-[var(--muted-foreground)]", children: ":" }),
@@ -2552,29 +2567,38 @@ function xr(e) {
2552
2567
  {
2553
2568
  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)]",
2554
2569
  value: A,
2555
- onChange: de,
2570
+ onChange: ue,
2556
2571
  "aria-label": "分钟",
2557
- children: se.map((f) => /* @__PURE__ */ s("option", { value: f, children: f }, f))
2572
+ children: fe.map((g) => /* @__PURE__ */ s("option", { value: g, children: g }, g))
2558
2573
  }
2559
2574
  )
2560
2575
  ] }),
2561
- /* @__PURE__ */ k("div", { className: "mt-2.5 flex justify-end gap-2", children: [
2576
+ /* @__PURE__ */ L("div", { className: "mt-2.5 flex justify-end gap-2", children: [
2562
2577
  /* @__PURE__ */ s(
2563
- ce,
2578
+ ie,
2564
2579
  {
2565
2580
  onClick: () => T(!1),
2566
2581
  size: "small",
2567
2582
  type: "transparent",
2568
2583
  outline: !0,
2569
- children: I.cancel
2584
+ style: {
2585
+ backgroundColor: "var(--datepicker-cancel-bg)",
2586
+ color: "var(--datepicker-cancel-fg)"
2587
+ },
2588
+ children: j.cancel
2570
2589
  }
2571
2590
  ),
2572
2591
  /* @__PURE__ */ s(
2573
- ce,
2592
+ ie,
2574
2593
  {
2575
2594
  onClick: () => T(!1),
2576
2595
  size: "small",
2577
- children: I.confirm
2596
+ style: {
2597
+ backgroundColor: "var(--datepicker-confirm-bg)",
2598
+ color: "var(--datepicker-confirm-fg)",
2599
+ borderColor: "var(--datepicker-confirm-bg)"
2600
+ },
2601
+ children: j.confirm
2578
2602
  }
2579
2603
  )
2580
2604
  ] })
@@ -2595,7 +2619,7 @@ xr.propTypes = {
2595
2619
  i18nKey: t.string,
2596
2620
  localeText: t.object
2597
2621
  };
2598
- const vr = ["overlay", "container", "header", "title", "closeBtn", "content", "footer"], _e = {
2622
+ const vr = ["overlay", "container", "header", "title", "closeBtn", "content", "footer"], Oe = {
2599
2623
  title: "基础标题",
2600
2624
  okText: "确定",
2601
2625
  cancelText: "取消",
@@ -2625,80 +2649,81 @@ function Tr(e) {
2625
2649
  width: h,
2626
2650
  height: d,
2627
2651
  sx: p = {},
2628
- style: g = {},
2629
- className: v = "",
2630
- maskClosable: L = !0,
2652
+ style: f = {},
2653
+ className: w = "",
2654
+ maskClosable: P = !0,
2631
2655
  footerButtons: O,
2632
- localeText: j = {},
2633
- ...w
2634
- } = e, { t: S } = ie(), x = Cr(u, "right", Sr), [_, m] = G(!1), [y, M] = G(!1);
2635
- le(() => {
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(() => {
2636
2660
  if (l) {
2637
2661
  m(!0);
2638
- const R = setTimeout(() => M(!0), 30);
2662
+ const R = setTimeout(() => z(!0), 30);
2639
2663
  return () => clearTimeout(R);
2640
2664
  }
2641
- if (_) {
2642
- M(!1);
2665
+ if (C) {
2666
+ z(!1);
2643
2667
  const R = setTimeout(() => m(!1), 300);
2644
2668
  return () => clearTimeout(R);
2645
2669
  }
2646
- }, [l]), le(() => {
2647
- if (_) {
2648
- const R = document.body.style.overflow;
2649
- return document.body.style.overflow = "hidden", () => {
2650
- document.body.style.overflow = R;
2670
+ }, [l]), ae(() => {
2671
+ if (C) {
2672
+ const R = parseInt(document.body.dataset.tangoScrollLock || "0", 10);
2673
+ return R === 0 && (document.body.dataset.tangoOriginalOverflow = document.body.style.overflow), document.body.dataset.tangoScrollLock = String(R + 1), document.body.style.overflow = "hidden", () => {
2674
+ const Q = parseInt(document.body.dataset.tangoScrollLock || "0", 10);
2675
+ 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);
2651
2676
  };
2652
2677
  }
2653
- }, [_]);
2678
+ }, [C]);
2654
2679
  const A = {};
2655
2680
  x === "left" || x === "right" ? A.width = h || "320px" : A.height = d || "300px";
2656
2681
  const $ = {
2657
- title: r ?? S("drawer.title", _e.title),
2658
- okText: n ?? S("drawer.okText", _e.okText),
2659
- cancelText: c ?? S("drawer.cancelText", _e.cancelText),
2660
- closeAriaLabel: S("drawer.closeAriaLabel", _e.closeAriaLabel),
2661
- ...j
2662
- }, P = H(p, vr), T = b({
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({
2663
2688
  baseClassName: "fixed inset-0 z-[999] flex",
2664
- sxSlot: P.overlay
2689
+ sxSlot: _.overlay
2665
2690
  }), N = {
2666
- tw: E(P.root.tw, P.container.tw),
2667
- css: { ...P.root.css, ...P.container.css }
2668
- }, C = b({
2691
+ tw: E(_.root.tw, _.container.tw),
2692
+ css: { ..._.root.css, ..._.container.css }
2693
+ }, k = b({
2669
2694
  baseClassName: E(
2670
2695
  "fixed bg-[var(--card)] text-[var(--foreground)] flex flex-col transition-all duration-300 ease-in-out",
2671
2696
  Nr[x]
2672
2697
  ),
2673
- className: v,
2698
+ className: w,
2674
2699
  style: {
2675
2700
  ...A,
2676
2701
  transform: y ? "translate(0, 0)" : wr[x],
2677
- ...g
2702
+ ...f
2678
2703
  },
2679
2704
  sxSlot: N
2680
2705
  }), U = b({
2681
2706
  baseClassName: "flex items-center justify-between px-5 pt-5 pb-3 shrink-0",
2682
- sxSlot: P.header
2683
- }), I = b({
2707
+ sxSlot: _.header
2708
+ }), j = b({
2684
2709
  baseClassName: "text-lg font-bold text-[var(--foreground)]",
2685
- sxSlot: P.title
2686
- }), F = b({
2687
- baseClassName: "cursor-pointer p-1 rounded-md hover:bg-[var(--muted)] transition-colors text-[var(--muted-foreground)]",
2688
- sxSlot: P.closeBtn
2710
+ sxSlot: _.title
2689
2711
  }), B = b({
2712
+ baseClassName: "cursor-pointer p-1 rounded-md hover:bg-[var(--muted)] transition-colors text-[var(--muted-foreground)]",
2713
+ sxSlot: _.closeBtn
2714
+ }), M = b({
2690
2715
  baseClassName: "flex-1 overflow-auto overscroll-contain px-5 py-2 text-[var(--foreground)]",
2691
- sxSlot: P.content
2692
- }), D = b({
2716
+ sxSlot: _.content
2717
+ }), F = b({
2693
2718
  baseClassName: "flex justify-end gap-2 px-5 py-4 border-t border-[var(--border)] shrink-0",
2694
- sxSlot: P.footer
2695
- }), W = (R) => {
2696
- L && R.target === R.currentTarget && a();
2697
- }, 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" }) }), Z = O != null && O.length ? O : [
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 : [
2698
2723
  { key: "cancel", text: $.cancelText, onClick: a },
2699
2724
  { key: "ok", text: $.okText, onClick: i || a }
2700
2725
  ];
2701
- return _ ? /* @__PURE__ */ s(
2726
+ return C ? /* @__PURE__ */ s(
2702
2727
  "div",
2703
2728
  {
2704
2729
  className: T.className,
@@ -2708,19 +2733,19 @@ function Tr(e) {
2708
2733
  opacity: y ? 1 : 0,
2709
2734
  transition: "opacity 300ms ease-in-out"
2710
2735
  },
2711
- onClick: W,
2736
+ onClick: H,
2712
2737
  role: "dialog",
2713
2738
  "aria-modal": "true",
2714
2739
  "aria-label": $.title,
2715
- ...w,
2716
- children: /* @__PURE__ */ k("div", { className: C.className, style: C.style, children: [
2717
- /* @__PURE__ */ k("div", { className: U.className, style: U.style, children: [
2718
- /* @__PURE__ */ s("h3", { className: I.className, style: I.style, children: $.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 }),
2719
2744
  /* @__PURE__ */ s(
2720
2745
  "div",
2721
2746
  {
2722
- className: F.className,
2723
- style: F.style,
2747
+ className: B.className,
2748
+ style: B.style,
2724
2749
  onClick: a,
2725
2750
  role: "button",
2726
2751
  tabIndex: 0,
@@ -2732,17 +2757,17 @@ function Tr(e) {
2732
2757
  }
2733
2758
  )
2734
2759
  ] }),
2735
- /* @__PURE__ */ s("div", { className: B.className, style: B.style, children: o }),
2736
- /* @__PURE__ */ s("div", { className: D.className, style: D.style, children: Z.map((R) => {
2737
- const re = R.key === "ok";
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) => {
2762
+ const Q = R.key === "ok";
2738
2763
  return /* @__PURE__ */ s(
2739
- ce,
2764
+ ie,
2740
2765
  {
2741
2766
  onClick: R.onClick,
2742
2767
  type: "default",
2743
- outline: !re,
2768
+ outline: !Q,
2744
2769
  size: "medium",
2745
- style: re ? {
2770
+ style: Q ? {
2746
2771
  backgroundColor: "var(--drawer-ok-bg)",
2747
2772
  color: "var(--drawer-ok-fg)",
2748
2773
  borderColor: "var(--drawer-ok-bg)"
@@ -2783,7 +2808,7 @@ Tr.propTypes = {
2783
2808
  ),
2784
2809
  localeText: t.object
2785
2810
  };
2786
- const kr = ["root", "text"], St = {
2811
+ const kr = ["root", "text"], Nt = {
2787
2812
  small: "my-0.5",
2788
2813
  medium: "my-1.5",
2789
2814
  large: "my-2.5",
@@ -2797,7 +2822,7 @@ function Lr(e, o) {
2797
2822
  size: l = "medium",
2798
2823
  children: a,
2799
2824
  ...i
2800
- } = e, u = H(r, kr), h = St[l] || St.medium, d = !!a, p = b({
2825
+ } = e, u = W(r, kr), h = Nt[l] || Nt.medium, d = !!a, p = b({
2801
2826
  baseClassName: E(
2802
2827
  "flex items-center justify-center relative w-full",
2803
2828
  h
@@ -2806,52 +2831,58 @@ function Lr(e, o) {
2806
2831
  sxSlot: u.root,
2807
2832
  baseStyle: {},
2808
2833
  style: n
2809
- }), g = b({
2834
+ }), f = b({
2810
2835
  baseClassName: "px-2 whitespace-nowrap z-[1]",
2811
2836
  sxSlot: u.text
2812
2837
  });
2813
- return /* @__PURE__ */ k(
2814
- "div",
2815
- {
2816
- ref: o,
2817
- className: p.className,
2818
- style: p.style,
2819
- ...i,
2820
- children: [
2821
- /* @__PURE__ */ s(
2822
- "span",
2823
- {
2824
- className: `flex-1 h-px bg-[var(--line-color)] ${d ? "mr-2.5" : ""}`
2825
- }
2826
- ),
2827
- d && /* @__PURE__ */ s("span", { className: g.className, style: g.style, children: a }),
2828
- /* @__PURE__ */ s(
2829
- "span",
2830
- {
2831
- className: `flex-1 h-px bg-[var(--line-color)] ${d ? "ml-2.5" : ""}`
2832
- }
2833
- )
2834
- ]
2835
- }
2838
+ return (
2839
+ // 原因:Line 渲染为 <div>,在 <p> 标签内使用会导致 HTML 嵌套错误(浏览器会自动关闭 <p>)
2840
+ // 导致的问题:universal 页面出现 "<p> 标签内部不能嵌套 <div> 标签" 的 HTML 嵌套错误
2841
+ // 解决办法:将外层容器从 <div> 改为 <span>(phrasing content),内部用 flex 布局保持视觉效果
2842
+ // fixed by clayw on 20260523 night
2843
+ /* @__PURE__ */ L(
2844
+ "span",
2845
+ {
2846
+ ref: o,
2847
+ className: p.className,
2848
+ style: { ...p.style, display: "flex", alignItems: "center", justifyContent: "center" },
2849
+ ...i,
2850
+ children: [
2851
+ /* @__PURE__ */ s(
2852
+ "span",
2853
+ {
2854
+ className: `flex-1 h-px bg-[var(--line-color)] ${d ? "mr-2.5" : ""}`
2855
+ }
2856
+ ),
2857
+ d && /* @__PURE__ */ s("span", { className: f.className, style: f.style, children: a }),
2858
+ /* @__PURE__ */ s(
2859
+ "span",
2860
+ {
2861
+ className: `flex-1 h-px bg-[var(--line-color)] ${d ? "ml-2.5" : ""}`
2862
+ }
2863
+ )
2864
+ ]
2865
+ }
2866
+ )
2836
2867
  );
2837
2868
  }
2838
- const Et = Q.forwardRef(Lr);
2839
- Et.displayName = "Line";
2840
- Et.propTypes = {
2869
+ const $t = te.forwardRef(Lr);
2870
+ $t.displayName = "Line";
2871
+ $t.propTypes = {
2841
2872
  size: t.oneOf(["small", "medium", "large", "huge"]),
2842
2873
  sx: t.oneOfType([t.string, t.object]),
2843
2874
  style: t.object,
2844
2875
  className: t.string,
2845
2876
  children: t.node
2846
2877
  };
2847
- const Pr = ["root"], Nt = {
2878
+ const Pr = ["root"], wt = {
2848
2879
  default: "bg-[var(--mark-default-bg)]",
2849
2880
  primary: "bg-[var(--mark-primary-bg)]",
2850
2881
  success: "bg-[var(--mark-success-bg)]",
2851
2882
  warning: "bg-[var(--mark-warning-bg)]",
2852
2883
  danger: "bg-[var(--mark-danger-bg)]"
2853
2884
  };
2854
- function _r(e, o) {
2885
+ function Or(e, o) {
2855
2886
  const {
2856
2887
  sx: r = {},
2857
2888
  style: n = {},
@@ -2860,7 +2891,7 @@ function _r(e, o) {
2860
2891
  beauty: a = !1,
2861
2892
  children: i,
2862
2893
  ...u
2863
- } = e, h = H(r, Pr), d = Nt[l] || Nt.default, p = b({
2894
+ } = e, h = W(r, Pr), d = wt[l] || wt.default, p = b({
2864
2895
  baseClassName: E(
2865
2896
  "inline-block",
2866
2897
  d,
@@ -2882,9 +2913,9 @@ function _r(e, o) {
2882
2913
  }
2883
2914
  );
2884
2915
  }
2885
- const $t = Q.forwardRef(_r);
2886
- $t.displayName = "Mark";
2887
- $t.propTypes = {
2916
+ const Bt = te.forwardRef(Or);
2917
+ Bt.displayName = "Mark";
2918
+ Bt.propTypes = {
2888
2919
  color: t.oneOf(["default", "primary", "success", "warning", "danger"]),
2889
2920
  beauty: t.bool,
2890
2921
  sx: t.oneOfType([t.string, t.object]),
@@ -2892,7 +2923,7 @@ $t.propTypes = {
2892
2923
  className: t.string,
2893
2924
  children: t.node
2894
2925
  };
2895
- const Or = ["overlay", "container", "header", "title", "closeBtn", "content", "footer"], Oe = {
2926
+ const _r = ["overlay", "container", "header", "title", "closeBtn", "content", "footer"], _e = {
2896
2927
  title: "基础标题",
2897
2928
  okText: "确定",
2898
2929
  cancelText: "取消",
@@ -2912,37 +2943,38 @@ function Ar(e) {
2912
2943
  sx: h = {},
2913
2944
  style: d = {},
2914
2945
  className: p = "",
2915
- maskClosable: g = !0,
2916
- footerButtons: v,
2917
- localeText: L = {},
2946
+ maskClosable: f = !0,
2947
+ footerButtons: w,
2948
+ localeText: P = {},
2918
2949
  ...O
2919
- } = e, { t: j } = ie(), [w, S] = G(!1), [x, _] = G(!1);
2920
- le(() => {
2950
+ } = e, { t: D } = de(), [S, v] = Z(!1), [x, C] = Z(!1);
2951
+ ae(() => {
2921
2952
  if (l) {
2922
- S(!0);
2923
- const D = setTimeout(() => _(!0), 30);
2924
- return () => clearTimeout(D);
2953
+ v(!0);
2954
+ const F = setTimeout(() => C(!0), 30);
2955
+ return () => clearTimeout(F);
2925
2956
  }
2926
- if (w) {
2927
- _(!1);
2928
- const D = setTimeout(() => S(!1), 300);
2929
- return () => clearTimeout(D);
2957
+ if (S) {
2958
+ C(!1);
2959
+ const F = setTimeout(() => v(!1), 300);
2960
+ return () => clearTimeout(F);
2930
2961
  }
2931
- }, [l]), le(() => {
2932
- if (w) {
2933
- const D = document.body.style.overflow;
2934
- return document.body.style.overflow = "hidden", () => {
2935
- document.body.style.overflow = D;
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);
2936
2968
  };
2937
2969
  }
2938
- }, [w]);
2970
+ }, [S]);
2939
2971
  const m = {
2940
- title: r ?? j("modal.title", Oe.title),
2941
- okText: n ?? j("modal.okText", Oe.okText),
2942
- cancelText: c ?? j("modal.cancelText", Oe.cancelText),
2943
- closeAriaLabel: j("modal.closeAriaLabel", Oe.closeAriaLabel),
2944
- ...L
2945
- }, y = H(h, Or), M = b({
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({
2946
2978
  baseClassName: "fixed inset-0 z-[999] flex justify-center items-center",
2947
2979
  sxSlot: y.overlay
2948
2980
  }), A = {
@@ -2961,7 +2993,7 @@ function Ar(e) {
2961
2993
  ...d
2962
2994
  },
2963
2995
  sxSlot: A
2964
- }), P = b({
2996
+ }), _ = b({
2965
2997
  baseClassName: "flex items-center justify-between px-5 pt-5 pb-3 shrink-0",
2966
2998
  sxSlot: y.header
2967
2999
  }), T = b({
@@ -2970,35 +3002,35 @@ function Ar(e) {
2970
3002
  }), N = b({
2971
3003
  baseClassName: "cursor-pointer p-1 rounded-md hover:bg-[var(--muted)] transition-colors text-[var(--muted-foreground)]",
2972
3004
  sxSlot: y.closeBtn
2973
- }), C = b({
3005
+ }), k = b({
2974
3006
  baseClassName: "flex-1 overflow-auto overscroll-contain px-6 py-5 text-[var(--foreground)]",
2975
3007
  sxSlot: y.content
2976
3008
  }), U = b({
2977
3009
  baseClassName: "flex justify-end gap-2 px-5 py-4 border-t border-[var(--border)] shrink-0",
2978
3010
  sxSlot: y.footer
2979
- }), I = (D) => {
2980
- g && D.target === D.currentTarget && a();
2981
- }, F = /* @__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" }) }), B = v != null && v.length ? v : [
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 : [
2982
3014
  { key: "cancel", text: m.cancelText, onClick: a },
2983
3015
  { key: "ok", text: m.okText, onClick: i || a }
2984
3016
  ];
2985
- return w ? /* @__PURE__ */ s(
3017
+ return S ? /* @__PURE__ */ s(
2986
3018
  "div",
2987
3019
  {
2988
- className: M.className,
3020
+ className: z.className,
2989
3021
  style: {
2990
- ...M.style,
3022
+ ...z.style,
2991
3023
  backgroundColor: "rgba(0, 0, 0, 0.5)",
2992
3024
  opacity: x ? 1 : 0,
2993
3025
  transition: "opacity 300ms ease-in-out"
2994
3026
  },
2995
- onClick: I,
3027
+ onClick: j,
2996
3028
  role: "dialog",
2997
3029
  "aria-modal": "true",
2998
3030
  "aria-label": m.title,
2999
3031
  ...O,
3000
- children: /* @__PURE__ */ k("div", { className: $.className, style: $.style, children: [
3001
- /* @__PURE__ */ k("div", { className: P.className, style: P.style, children: [
3032
+ children: /* @__PURE__ */ L("div", { className: $.className, style: $.style, children: [
3033
+ /* @__PURE__ */ L("div", { className: _.className, style: _.style, children: [
3002
3034
  /* @__PURE__ */ s("h3", { className: T.className, style: T.style, children: m.title }),
3003
3035
  /* @__PURE__ */ s(
3004
3036
  "div",
@@ -3009,24 +3041,24 @@ function Ar(e) {
3009
3041
  role: "button",
3010
3042
  tabIndex: 0,
3011
3043
  "aria-label": m.closeAriaLabel,
3012
- onKeyDown: (D) => {
3013
- (D.key === "Enter" || D.key === " ") && a();
3044
+ onKeyDown: (F) => {
3045
+ (F.key === "Enter" || F.key === " ") && a();
3014
3046
  },
3015
- children: F
3047
+ children: B
3016
3048
  }
3017
3049
  )
3018
3050
  ] }),
3019
- /* @__PURE__ */ s("div", { className: C.className, style: C.style, children: o }),
3020
- /* @__PURE__ */ s("div", { className: U.className, style: U.style, children: B.map((D) => {
3021
- const W = D.key === "ok";
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";
3022
3054
  return /* @__PURE__ */ s(
3023
- ce,
3055
+ ie,
3024
3056
  {
3025
- onClick: D.onClick,
3057
+ onClick: F.onClick,
3026
3058
  type: "default",
3027
- outline: !W,
3059
+ outline: !H,
3028
3060
  size: "medium",
3029
- style: W ? {
3061
+ style: H ? {
3030
3062
  backgroundColor: "var(--modal-ok-bg)",
3031
3063
  color: "var(--modal-ok-fg)",
3032
3064
  borderColor: "var(--modal-ok-bg)"
@@ -3034,9 +3066,9 @@ function Ar(e) {
3034
3066
  backgroundColor: "var(--modal-cancel-bg)",
3035
3067
  color: "var(--modal-cancel-fg)"
3036
3068
  },
3037
- children: D.text
3069
+ children: F.text
3038
3070
  },
3039
- D.key
3071
+ F.key
3040
3072
  );
3041
3073
  }) })
3042
3074
  ] })
@@ -3080,7 +3112,7 @@ const Mr = ["root", "input", "button"], zr = {
3080
3112
  medium: "small",
3081
3113
  large: "medium",
3082
3114
  huge: "medium"
3083
- }, wt = {
3115
+ }, Ct = {
3084
3116
  placeholder: "请输入内容",
3085
3117
  btnText: "搜索"
3086
3118
  }, Br = (e, o, r) => Object.prototype.hasOwnProperty.call(r, e) ? e : o;
@@ -3097,9 +3129,9 @@ function Ir(e) {
3097
3129
  placeholder: h,
3098
3130
  btnText: d,
3099
3131
  localeText: p,
3100
- path: g = "",
3101
- ...v
3102
- } = e, { t: L } = ie(), O = $e(null), j = Br(o, "medium", zr), w = a !== void 0, S = L("search.placeholder", wt.placeholder), x = L("search.btnText", wt.btnText), _ = h ?? (p == null ? void 0 : p.placeholder) ?? S, m = d ?? (p == null ? void 0 : p.btnText) ?? x, y = H(r, Mr), M = {
3132
+ path: f = "",
3133
+ ...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 = {
3103
3135
  tw: E(y.root.tw, y.input.tw),
3104
3136
  css: { ...y.root.css, ...y.input.css }
3105
3137
  }, A = E("relative inline-flex", y.root.tw), $ = E(
@@ -3108,53 +3140,58 @@ function Ir(e) {
3108
3140
  "hover:border-[var(--input-accent)]",
3109
3141
  "focus:border-[var(--input-accent)] focus:shadow-[var(--input-focus-shadow)]",
3110
3142
  u && "bg-[var(--muted)] text-[var(--muted-foreground)] border-[var(--muted)] cursor-not-allowed shadow-none hover:border-[var(--muted)] focus:shadow-none",
3111
- Er[j]
3112
- ), P = b({
3143
+ Er[D]
3144
+ ), _ = b({
3113
3145
  baseClassName: $,
3114
3146
  className: c,
3115
3147
  style: n,
3116
- sxSlot: M
3148
+ sxSlot: z
3117
3149
  }), T = b({
3118
3150
  baseClassName: "absolute top-1/2 -translate-y-1/2",
3119
3151
  sxSlot: y.button,
3120
3152
  style: { right: "calc(var(--spacing) * 2)" }
3121
- }), N = oe(() => {
3122
- var I;
3123
- return w ? a : ((I = O.current) == null ? void 0 : I.value) ?? "";
3124
- }, [w, a]), C = oe(() => {
3125
- l == null || l(N());
3126
- }, [l, N]), U = oe((I) => {
3127
- I.key === "Enter" && C();
3128
- }, [C]);
3129
- return /* @__PURE__ */ k("div", { className: A, children: [
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: [
3130
3166
  /* @__PURE__ */ s(
3131
3167
  "input",
3132
3168
  {
3133
- ref: w ? void 0 : O,
3134
- className: P.className,
3135
- style: P.style,
3136
- onKeyDown: U,
3137
- value: w ? a : void 0,
3138
- defaultValue: w ? void 0 : i ?? "",
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 ?? "",
3139
3175
  disabled: u || void 0,
3140
- placeholder: _,
3176
+ placeholder: C,
3141
3177
  type: "text",
3142
3178
  role: "searchbox",
3143
- "aria-label": _,
3144
- ...v
3179
+ "aria-label": C,
3180
+ ...w
3145
3181
  }
3146
3182
  ),
3147
- /* @__PURE__ */ s("div", { className: T.className, style: T.style, children: /* @__PURE__ */ s(
3148
- ce,
3183
+ /* @__PURE__ */ s("div", { className: T.className, style: N, children: /* @__PURE__ */ s(
3184
+ ie,
3149
3185
  {
3150
- onClick: C,
3151
- size: $r[j],
3186
+ onClick: j,
3187
+ size: $r[D],
3152
3188
  disabled: u,
3153
3189
  "aria-label": m,
3154
- children: g ? /* @__PURE__ */ s(
3190
+ style: k,
3191
+ children: f ? /* @__PURE__ */ s(
3155
3192
  "img",
3156
3193
  {
3157
- src: g,
3194
+ src: f,
3158
3195
  alt: "search-icon",
3159
3196
  style: { width: 16, height: 16, marginTop: 2, marginBottom: -3 }
3160
3197
  }
@@ -3180,7 +3217,7 @@ Ir.propTypes = {
3180
3217
  }),
3181
3218
  path: t.string
3182
3219
  };
3183
- const Bt = {
3220
+ const It = {
3184
3221
  default: "",
3185
3222
  inline: "inline-block",
3186
3223
  circle: "rounded-full",
@@ -3189,7 +3226,7 @@ const Bt = {
3189
3226
  fixed: "fixed",
3190
3227
  absolute: "absolute",
3191
3228
  relative: "relative"
3192
- }, It = Object.keys(Bt), jr = ["root"];
3229
+ }, jt = Object.keys(It), jr = ["root"];
3193
3230
  function Fr(e, o) {
3194
3231
  const {
3195
3232
  sx: r = {},
@@ -3208,8 +3245,8 @@ function Fr(e, o) {
3208
3245
  *
3209
3246
  */
3210
3247
  ...i
3211
- } = e, u = It.includes(l) ? l : "default", h = H(r, jr), d = b({
3212
- baseClassName: Bt[u],
3248
+ } = e, u = jt.includes(l) ? l : "default", h = W(r, jr), d = b({
3249
+ baseClassName: It[u],
3213
3250
  className: c,
3214
3251
  sxSlot: h.root
3215
3252
  }), p = u === "halfCircle" ? { width: "var(--space-half-circle-w)", height: "var(--space-half-circle-h)", background: "var(--space-half-circle-color)" } : {};
@@ -3227,15 +3264,15 @@ function Fr(e, o) {
3227
3264
  )
3228
3265
  );
3229
3266
  }
3230
- const jt = Q.forwardRef(Fr);
3231
- jt.propTypes = {
3232
- type: t.oneOf(It),
3267
+ const Ft = te.forwardRef(Fr);
3268
+ Ft.propTypes = {
3269
+ type: t.oneOf(jt),
3233
3270
  sx: t.oneOfType([t.string, t.object]),
3234
3271
  style: t.object,
3235
3272
  className: t.string,
3236
3273
  children: t.node
3237
3274
  };
3238
- jt.displayName = "Space";
3275
+ Ft.displayName = "Space";
3239
3276
  const Dr = ["root", "wrapper", "thead", "headerCell", "body", "row", "cell", "empty", "pagination"], ve = {
3240
3277
  empty: "暂无数据",
3241
3278
  prev: "上一页",
@@ -3263,34 +3300,34 @@ function Yr(e) {
3263
3300
  cellClassName: d,
3264
3301
  cellStyle: p,
3265
3302
  /* hover */
3266
- hoverColor: g = "",
3303
+ hoverColor: f = "",
3267
3304
  /* i18n */
3268
- i18nKey: v = null,
3269
- localeText: L = {},
3305
+ i18nKey: w = null,
3306
+ localeText: P = {},
3270
3307
  /* 无障碍 */
3271
3308
  "aria-label": O,
3272
- ...j
3273
- } = e, { t: w } = ie();
3309
+ ...D
3310
+ } = e, { t: S } = de();
3274
3311
  o.length === 0 && r.length === 0 && console.warn("[Tango Table] dataSource 和 columns 不能同时为空,请至少提供一项。");
3275
- const S = {
3276
- empty: w("table.empty", ve.empty),
3277
- prev: w("table.prev", ve.prev),
3278
- next: w("table.next", ve.next),
3279
- page: w("table.page", ve.page),
3280
- total: w("table.total", ve.total),
3281
- perPage: w("table.perPage", ve.perPage),
3282
- ...L
3283
- }, x = Array.isArray(i) ? i : typeof i == "string" ? [i] : [], _ = Se(
3284
- () => r.filter((q) => !q.hide && !x.includes(q.dataIndex)),
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(
3321
+ () => r.filter((J) => !J.hide && !x.includes(J.dataIndex)),
3285
3322
  [r, x]
3286
- ), m = a !== null && a !== !1, y = a && a.placement || "bottom", M = a && a.pageSize || Rr, A = a && a.pageSizeOptions || Vr, $ = (a == null ? void 0 : a.showTotal) !== !1, P = (a == null ? void 0 : a.showSizeChanger) !== !1, [T, N] = G(1), [C, U] = G(M), I = o.length, F = Math.max(1, Math.ceil(I / C)), B = Math.min(T, F), D = Se(() => {
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(() => {
3287
3324
  if (!m) return o;
3288
- const q = (B - 1) * C;
3289
- return o.slice(q, q + C);
3290
- }, [o, B, C, m]), W = oe(
3291
- (q) => N(Math.max(1, Math.min(q, F))),
3292
- [F]
3293
- ), K = H(n, Dr), Z = b({
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({
3294
3331
  baseClassName: E(
3295
3332
  "w-full overflow-x-auto rounded-xl border border-[var(--border)]",
3296
3333
  "shadow-[0_0_20px_color-mix(in_oklch,var(--foreground)_8%,transparent)]"
@@ -3304,158 +3341,164 @@ function Yr(e) {
3304
3341
  }), R = b({
3305
3342
  baseClassName: "bg-[var(--primary)] text-[var(--primary-foreground)] sticky top-0 z-10",
3306
3343
  sxSlot: K.thead
3307
- }), re = b({
3344
+ }), Q = b({
3308
3345
  baseClassName: "text-[var(--foreground)]",
3309
3346
  sxSlot: K.body
3310
- }), de = b({
3347
+ }), ue = b({
3311
3348
  baseClassName: "text-[var(--muted-foreground)] py-16 text-center",
3312
3349
  sxSlot: K.empty
3313
3350
  }), be = b({
3314
3351
  baseClassName: "flex items-center justify-between px-4 py-3 text-sm text-[var(--muted-foreground)] border-t border-[var(--border)]",
3315
3352
  sxSlot: K.pagination
3316
- }), fe = g ? /* @__PURE__ */ s("style", { children: `
3353
+ }), ge = f ? /* @__PURE__ */ s("style", { children: `
3317
3354
  [data-tango-table-body] tr:hover {
3318
- background-color: ${g} !important;
3355
+ background-color: ${f} !important;
3319
3356
  transform: translateY(-1px);
3320
3357
  box-shadow: 0 2px 8px color-mix(in oklch, var(--foreground) 5%, transparent);
3321
3358
  }
3322
- ` }) : null, se = () => {
3359
+ ` }) : null, fe = () => {
3323
3360
  if (!m) return null;
3324
- const q = Array.from({ length: F }, (z, X) => X + 1);
3325
- return /* @__PURE__ */ k("div", { className: be.className, style: be.style, children: [
3326
- /* @__PURE__ */ k("div", { className: "flex items-center gap-3", children: [
3327
- $ && /* @__PURE__ */ s("span", { children: S.total.replace("{total}", String(I)) }),
3328
- P && /* @__PURE__ */ s(
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(
3329
3366
  "select",
3330
3367
  {
3331
- value: C,
3332
- onChange: (z) => {
3333
- U(Number(z.target.value)), N(1);
3368
+ value: k,
3369
+ onChange: (I) => {
3370
+ U(Number(I.target.value)), N(1);
3334
3371
  },
3335
3372
  className: "rounded border border-[var(--border)] bg-[var(--background)] px-2 py-1 text-sm cursor-pointer",
3336
- "aria-label": S.perPage,
3337
- children: A.map((z) => /* @__PURE__ */ k("option", { value: z, children: [
3338
- z,
3373
+ "aria-label": v.perPage,
3374
+ children: A.map((I) => /* @__PURE__ */ L("option", { value: I, children: [
3375
+ I,
3339
3376
  " ",
3340
- S.perPage
3341
- ] }, z))
3377
+ v.perPage
3378
+ ] }, I))
3342
3379
  }
3343
3380
  )
3344
3381
  ] }),
3345
- /* @__PURE__ */ k("div", { className: "flex items-center gap-1", children: [
3382
+ /* @__PURE__ */ L("div", { className: "flex items-center gap-1", children: [
3346
3383
  /* @__PURE__ */ s(
3347
3384
  "button",
3348
3385
  {
3349
- onClick: () => W(B - 1),
3350
- disabled: B <= 1,
3386
+ type: "button",
3387
+ onClick: () => H(M - 1),
3388
+ disabled: M <= 1,
3351
3389
  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",
3352
- "aria-label": S.prev,
3353
- children: S.prev
3390
+ "aria-label": v.prev,
3391
+ children: v.prev
3354
3392
  }
3355
3393
  ),
3356
- q.length <= 7 ? q.map((z) => /* @__PURE__ */ s(
3394
+ J.length <= 7 ? J.map((I) => /* @__PURE__ */ s(
3357
3395
  "button",
3358
3396
  {
3359
- onClick: () => W(z),
3360
- className: `min-w-[28px] px-2 py-1 rounded text-xs transition-colors ${z === B ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"}`,
3361
- children: z
3397
+ 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
3362
3401
  },
3363
- z
3364
- )) : /* @__PURE__ */ k(Ne, { children: [
3402
+ I
3403
+ )) : /* @__PURE__ */ L(Ne, { children: [
3365
3404
  /* @__PURE__ */ s(
3366
3405
  "button",
3367
3406
  {
3368
- onClick: () => W(1),
3369
- className: `min-w-[28px] px-2 py-1 rounded text-xs ${B === 1 ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"} transition-colors`,
3407
+ 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`,
3370
3410
  children: "1"
3371
3411
  }
3372
3412
  ),
3373
- B > 3 && /* @__PURE__ */ s("span", { className: "px-1 text-xs", children: "…" }),
3413
+ M > 3 && /* @__PURE__ */ s("span", { className: "px-1 text-xs", children: "…" }),
3374
3414
  Array.from(
3375
- { length: F },
3376
- (z, X) => X + 1
3377
- ).filter((z) => z > 1 && z < F && Math.abs(z - B) <= 1).map((z) => /* @__PURE__ */ s(
3415
+ { length: B },
3416
+ (I, q) => q + 1
3417
+ ).filter((I) => I > 1 && I < B && Math.abs(I - M) <= 1).map((I) => /* @__PURE__ */ s(
3378
3418
  "button",
3379
3419
  {
3380
- onClick: () => W(z),
3381
- className: `min-w-[28px] px-2 py-1 rounded text-xs ${z === B ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"} transition-colors`,
3382
- children: z
3420
+ 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
3383
3424
  },
3384
- z
3425
+ I
3385
3426
  )),
3386
- B < F - 2 && /* @__PURE__ */ s("span", { className: "px-1 text-xs", children: "…" }),
3427
+ M < B - 2 && /* @__PURE__ */ s("span", { className: "px-1 text-xs", children: "…" }),
3387
3428
  /* @__PURE__ */ s(
3388
3429
  "button",
3389
3430
  {
3390
- onClick: () => W(F),
3391
- className: `min-w-[28px] px-2 py-1 rounded text-xs ${B === F ? "bg-[var(--primary)] text-[var(--primary-foreground)] font-medium" : "border border-[var(--border)] hover:bg-[var(--accent)]"} transition-colors`,
3392
- children: F
3431
+ 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
3393
3435
  }
3394
3436
  )
3395
3437
  ] }),
3396
3438
  /* @__PURE__ */ s(
3397
3439
  "button",
3398
3440
  {
3399
- onClick: () => W(B + 1),
3400
- disabled: B >= F,
3441
+ type: "button",
3442
+ onClick: () => H(M + 1),
3443
+ disabled: M >= B,
3401
3444
  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",
3402
- "aria-label": S.next,
3403
- children: S.next
3445
+ "aria-label": v.next,
3446
+ children: v.next
3404
3447
  }
3405
3448
  )
3406
3449
  ] })
3407
3450
  ] });
3408
- }, ee = (q) => /* @__PURE__ */ k("div", { className: Z.className, style: Z.style, children: [
3409
- fe,
3410
- /* @__PURE__ */ k("table", { className: "w-full border-collapse separate border-spacing-0 text-sm", role: "table", children: [
3411
- /* @__PURE__ */ s("thead", { className: R.className, style: R.style, children: /* @__PURE__ */ s("tr", { children: _.map((z) => {
3412
- const X = b({
3451
+ }, X = (J) => /* @__PURE__ */ L("div", { className: G.className, style: G.style, children: [
3452
+ 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) => {
3455
+ const q = b({
3413
3456
  baseClassName: E(
3414
3457
  "px-5 py-4 text-left font-semibold tracking-wide relative",
3415
3458
  K.headerCell.tw
3416
3459
  ),
3417
- baseStyle: z.width ? { width: z.width } : {},
3460
+ baseStyle: I.width ? { width: I.width } : {},
3418
3461
  sxSlot: { tw: "", css: K.headerCell.css }
3419
3462
  });
3420
- return /* @__PURE__ */ k("th", { className: X.className, style: X.style, children: [
3421
- z.title,
3463
+ return /* @__PURE__ */ L("th", { className: q.className, style: q.style, children: [
3464
+ I.title,
3422
3465
  /* @__PURE__ */ s("span", { className: "absolute right-0 top-[20%] h-[60%] w-px bg-[var(--primary-foreground)]/15 last:hidden" })
3423
- ] }, z.key || z.dataIndex);
3466
+ ] }, I.key || I.dataIndex);
3424
3467
  }) }) }),
3425
- /* @__PURE__ */ s("tbody", { className: re.className, style: re.style, "data-tango-table-body": !0, children: q.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: _.length, className: de.className, style: de.style, children: S.empty }) }) : q.map((z, X) => {
3426
- const te = X % 2 === 0 ? "even" : "odd", ae = E(
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(
3427
3470
  "transition-all duration-200",
3428
- te === "even" ? "bg-[color-mix(in_oklch,var(--table-hover)_6%,transparent)]" : "",
3471
+ le === "even" ? "bg-[color-mix(in_oklch,var(--table-hover)_6%,transparent)]" : "",
3429
3472
  "hover:bg-[color-mix(in_oklch,var(--table-hover)_20%,transparent)]",
3430
3473
  K.row.tw,
3431
- Ae(u, z, X, te)
3432
- ), ue = {
3433
- ...Ae(h, z, X, te),
3474
+ Ae(u, I, q, le)
3475
+ ), se = {
3476
+ ...Ae(h, I, q, le),
3434
3477
  ...K.row.css
3435
3478
  };
3436
- return /* @__PURE__ */ s("tr", { className: ae, style: ue, children: _.map((f, Y) => {
3437
- const J = Y % 2 === 0 ? "even" : "odd", ge = E(
3479
+ return /* @__PURE__ */ s("tr", { className: re, style: se, children: C.map((g, V) => {
3480
+ const ee = V % 2 === 0 ? "even" : "odd", ce = E(
3438
3481
  "px-5 py-3.5 text-left relative",
3439
3482
  "border-b border-[color-mix(in_oklch,var(--foreground)_5%,transparent)]",
3440
3483
  K.cell.tw,
3441
- Ae(d, z, f, X, Y, te, J)
3484
+ Ae(d, I, g, q, V, le, ee)
3442
3485
  ), pe = {
3443
- ...f.width ? { width: f.width } : {},
3444
- ...Ae(p, z, f, X, Y, te, J),
3486
+ ...g.width ? { width: g.width } : {},
3487
+ ...Ae(p, I, g, q, V, le, ee),
3445
3488
  ...K.cell.css
3446
3489
  };
3447
- return /* @__PURE__ */ k("td", { className: ge, style: pe, children: [
3448
- /* @__PURE__ */ s("div", { className: "flex items-center min-h-5", children: f.render ? f.render(z[f.dataIndex], z, X) : z[f.dataIndex] }),
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] }),
3449
3492
  /* @__PURE__ */ s("span", { className: "absolute right-0 top-[20%] h-[60%] w-px bg-[color-mix(in_oklch,var(--foreground)_4%,transparent)] last:hidden" })
3450
- ] }, f.key || f.dataIndex || Y);
3451
- }) }, z.key || X);
3493
+ ] }, g.key || g.dataIndex || V);
3494
+ }) }, I.key || q);
3452
3495
  }) })
3453
3496
  ] })
3454
3497
  ] });
3455
- return /* @__PURE__ */ k("div", { role: "region", "aria-label": O || "Table", ...j, children: [
3456
- m && y === "top" && se(),
3457
- ee(D),
3458
- m && y === "bottom" && se()
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()
3459
3502
  ] });
3460
3503
  }
3461
3504
  Yr.propTypes = {
@@ -3495,7 +3538,7 @@ Yr.propTypes = {
3495
3538
  i18nKey: t.string,
3496
3539
  localeText: t.object
3497
3540
  };
3498
- const Kr = ["root", "tooltip"], Ct = {
3541
+ const Kr = ["root", "tooltip"], Tt = {
3499
3542
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
3500
3543
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
3501
3544
  left: "right-full top-1/2 -translate-y-1/2 mr-2",
@@ -3518,66 +3561,66 @@ function Hr(e, o) {
3518
3561
  sx: h = {},
3519
3562
  style: d = {},
3520
3563
  className: p = "",
3521
- onMouseEnter: g,
3522
- onMouseLeave: v,
3523
- onFocus: L,
3564
+ onMouseEnter: f,
3565
+ onMouseLeave: w,
3566
+ onFocus: P,
3524
3567
  onBlur: O,
3525
- ...j
3526
- } = e, [w, S] = G(a), x = l !== void 0, _ = x ? l : w, m = oe((C) => {
3527
- x || S(C), i == null || i(C);
3528
- }, [x, i]), y = Ct[c] ? c : "top", M = H(h, Kr), A = b({
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({
3529
3572
  baseClassName: "relative inline-flex",
3530
- sxSlot: M.root
3573
+ sxSlot: z.root
3531
3574
  }), $ = b({
3532
3575
  baseClassName: E(
3533
3576
  "absolute z-50 whitespace-nowrap px-3 py-1.5 text-sm",
3534
3577
  "bg-[var(--tooltip-background)] text-[var(--tooltip-foreground)]",
3535
3578
  "shadow-[var(--tooltip-shadow)]",
3536
- Ct[y]
3579
+ Tt[y]
3537
3580
  ),
3538
3581
  className: p,
3539
3582
  baseStyle: { borderRadius: "var(--tooltip-radius)" },
3540
- sxSlot: M.tooltip,
3583
+ sxSlot: z.tooltip,
3541
3584
  style: d
3542
- }), P = {
3585
+ }), _ = {
3543
3586
  position: "absolute",
3544
3587
  width: "10px",
3545
3588
  height: "10px",
3546
3589
  backgroundColor: "inherit",
3547
3590
  ...Ur[y]
3548
3591
  }, T = () => !u && m(!0), N = () => !u && m(!1);
3549
- return /* @__PURE__ */ k(
3592
+ return /* @__PURE__ */ L(
3550
3593
  "div",
3551
3594
  {
3552
3595
  ref: o,
3553
3596
  className: A.className,
3554
3597
  style: A.style,
3555
- onMouseEnter: (C) => {
3556
- T(), g == null || g(C);
3598
+ onMouseEnter: (k) => {
3599
+ T(), f == null || f(k);
3557
3600
  },
3558
- onMouseLeave: (C) => {
3559
- N(), v == null || v(C);
3601
+ onMouseLeave: (k) => {
3602
+ N(), w == null || w(k);
3560
3603
  },
3561
- onFocus: (C) => {
3562
- T(), L == null || L(C);
3604
+ onFocus: (k) => {
3605
+ T(), P == null || P(k);
3563
3606
  },
3564
- onBlur: (C) => {
3565
- N(), O == null || O(C);
3607
+ onBlur: (k) => {
3608
+ N(), O == null || O(k);
3566
3609
  },
3567
- ...j,
3610
+ ...D,
3568
3611
  children: [
3569
3612
  r,
3570
- _ && n && /* @__PURE__ */ k("div", { role: "tooltip", className: $.className, style: $.style, children: [
3613
+ C && n && /* @__PURE__ */ L("div", { role: "tooltip", className: $.className, style: $.style, children: [
3571
3614
  /* @__PURE__ */ s("span", { style: { position: "relative", zIndex: 1 }, children: n }),
3572
- /* @__PURE__ */ s("span", { style: P })
3615
+ /* @__PURE__ */ s("span", { style: _ })
3573
3616
  ] })
3574
3617
  ]
3575
3618
  }
3576
3619
  );
3577
3620
  }
3578
- const Ft = Q.forwardRef(Hr);
3579
- Ft.displayName = "Tooltip";
3580
- Ft.propTypes = {
3621
+ const Dt = te.forwardRef(Hr);
3622
+ Dt.displayName = "Tooltip";
3623
+ Dt.propTypes = {
3581
3624
  children: t.node,
3582
3625
  title: t.node,
3583
3626
  placement: t.oneOf(["top", "bottom", "left", "right"]),
@@ -3593,7 +3636,7 @@ Ft.propTypes = {
3593
3636
  onFocus: t.func,
3594
3637
  onBlur: t.func
3595
3638
  };
3596
- ce.MaterialButton = Ze;
3639
+ ie.MaterialButton = Ze;
3597
3640
  Xe.MaterialInput = Ge;
3598
3641
  ne.Header = Xo;
3599
3642
  ne.Footer = qo;
@@ -3602,18 +3645,18 @@ ne.Content = Qo;
3602
3645
  ne.Toc = er;
3603
3646
  export {
3604
3647
  sr as Banner,
3605
- ce as Button,
3648
+ ie as Button,
3606
3649
  dr as ColorPicker,
3607
3650
  Qo as Content,
3608
- gr as DateDisplay,
3651
+ fr as DateDisplay,
3609
3652
  xr as DatePicker,
3610
3653
  Tr as Drawer,
3611
3654
  qo as Footer,
3612
3655
  Xo as Header,
3613
3656
  Xe as Input,
3614
3657
  ne as Layout,
3615
- Et as Line,
3616
- $t as Mark,
3658
+ $t as Line,
3659
+ Bt as Mark,
3617
3660
  Ze as MaterialButton,
3618
3661
  Ge as MaterialInput,
3619
3662
  Ar as Modal,
@@ -3621,28 +3664,28 @@ export {
3621
3664
  es as NoticeProvider,
3622
3665
  Ir as Search,
3623
3666
  Jo as Sider,
3624
- jt as Space,
3667
+ Ft as Space,
3625
3668
  Yr as Table,
3626
3669
  sr as TangoBanner,
3627
3670
  dr as TangoColorPicker,
3628
- gr as TangoDate,
3671
+ fr as TangoDate,
3629
3672
  xr as TangoDatePicker,
3630
3673
  Tr as TangoDrawer,
3631
3674
  os as TangoI18nProvider,
3632
3675
  Ar as TangoModal,
3633
3676
  We as TangoNotice,
3634
3677
  Ir as TangoSearch,
3635
- Ft as TangoTooltip,
3678
+ Dt as TangoTooltip,
3636
3679
  Jr as ThemeProvider,
3637
3680
  er as Toc,
3638
- Ft as Tooltip,
3681
+ Dt as Tooltip,
3639
3682
  qe as Upload,
3640
3683
  b as createSlotProps,
3641
3684
  E as mergeTwClassNames,
3642
- H as normalizeSxSlots,
3685
+ W as normalizeSxSlots,
3643
3686
  ze as normalizeTangoLocale,
3644
3687
  ts as useNotice,
3645
- ie as useTangoI18n,
3688
+ de as useTangoI18n,
3646
3689
  Me as useTangoStyle,
3647
3690
  Qr as useTheme
3648
3691
  };