@turinhub/atomix-common-ui 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/AuthPanel-CTKx618F.cjs +2 -0
  2. package/dist/AuthPanel-CTKx618F.cjs.map +1 -0
  3. package/dist/{AuthPanel-D2HFX8eN.js → AuthPanel-Cn_WwmjX.js} +259 -212
  4. package/dist/AuthPanel-Cn_WwmjX.js.map +1 -0
  5. package/dist/PDFSidebar-4DtXqqzN.cjs +2 -0
  6. package/dist/PDFSidebar-4DtXqqzN.cjs.map +1 -0
  7. package/dist/PDFSidebar-ClnrF4Br.js +239 -0
  8. package/dist/PDFSidebar-ClnrF4Br.js.map +1 -0
  9. package/dist/auth.cjs +1 -1
  10. package/dist/auth.js +1 -1
  11. package/dist/components/AuthLoginPanel.d.ts.map +1 -1
  12. package/dist/components/AuthRegisterPanel.d.ts.map +1 -1
  13. package/dist/components/AuthVisualCarousel.d.ts +2 -0
  14. package/dist/components/AuthVisualCarousel.d.ts.map +1 -1
  15. package/dist/components/DataTable.d.ts.map +1 -1
  16. package/dist/components/ImageReader.d.ts.map +1 -1
  17. package/dist/components/MarkdownReader.d.ts.map +1 -1
  18. package/dist/components/PDFReader.d.ts.map +1 -1
  19. package/dist/components/PDFSidebar.d.ts.map +1 -1
  20. package/dist/components/SimplePDFReader.d.ts.map +1 -1
  21. package/dist/components/TableHeader.d.ts.map +1 -1
  22. package/dist/components/TablePagination.d.ts +2 -1
  23. package/dist/components/TablePagination.d.ts.map +1 -1
  24. package/dist/components/VideoReader.d.ts.map +1 -1
  25. package/dist/components/ui/switch.d.ts +5 -0
  26. package/dist/components/ui/switch.d.ts.map +1 -0
  27. package/dist/data-table.cjs.map +1 -1
  28. package/dist/data-table.js.map +1 -1
  29. package/dist/file-upload.cjs +1 -1
  30. package/dist/file-upload.cjs.map +1 -1
  31. package/dist/file-upload.js +36 -36
  32. package/dist/file-upload.js.map +1 -1
  33. package/dist/image-reader.cjs +1 -1
  34. package/dist/image-reader.cjs.map +1 -1
  35. package/dist/image-reader.js +1 -0
  36. package/dist/image-reader.js.map +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/markdown-reader.cjs +1 -1
  40. package/dist/markdown-reader.cjs.map +1 -1
  41. package/dist/markdown-reader.js +28 -24
  42. package/dist/markdown-reader.js.map +1 -1
  43. package/dist/pdf-reader.cjs +1 -1
  44. package/dist/pdf-reader.cjs.map +1 -1
  45. package/dist/pdf-reader.js +169 -120
  46. package/dist/pdf-reader.js.map +1 -1
  47. package/dist/pdf-sidebar.cjs +1 -1
  48. package/dist/pdf-sidebar.js +1 -1
  49. package/dist/simple-pdf-reader.cjs +1 -1
  50. package/dist/simple-pdf-reader.cjs.map +1 -1
  51. package/dist/simple-pdf-reader.js +137 -104
  52. package/dist/simple-pdf-reader.js.map +1 -1
  53. package/dist/table-header.cjs +1 -1
  54. package/dist/table-header.cjs.map +1 -1
  55. package/dist/table-header.js +42 -34
  56. package/dist/table-header.js.map +1 -1
  57. package/dist/table-pagination.cjs +1 -1
  58. package/dist/table-pagination.cjs.map +1 -1
  59. package/dist/table-pagination.js +49 -43
  60. package/dist/table-pagination.js.map +1 -1
  61. package/dist/types/component-types.d.ts +1 -0
  62. package/dist/types/component-types.d.ts.map +1 -1
  63. package/dist/video-reader.cjs.map +1 -1
  64. package/dist/video-reader.js.map +1 -1
  65. package/package.json +2 -1
  66. package/dist/AuthPanel-C_2JBE7t.cjs +0 -2
  67. package/dist/AuthPanel-C_2JBE7t.cjs.map +0 -1
  68. package/dist/AuthPanel-D2HFX8eN.js.map +0 -1
  69. package/dist/PDFSidebar-BBtucLK6.js +0 -232
  70. package/dist/PDFSidebar-BBtucLK6.js.map +0 -1
  71. package/dist/PDFSidebar-Di0D-yPS.cjs +0 -2
  72. package/dist/PDFSidebar-Di0D-yPS.cjs.map +0 -1
@@ -1,97 +1,97 @@
1
1
  import { j as e } from "./jsx-runtime-B4hRZ52C.js";
2
- import { c as v } from "./utils-B6yFEsav.js";
3
- import { useState as n, useMemo as fe, useEffect as re } from "react";
4
- import { Layers3 as ie, MessageCircle as oe, Loader2 as W, ArrowRight as te, UserRound as de, LockKeyhole as ae } from "lucide-react";
5
- const be = (s) => /^1[3-9]\d{9}$/.test(s) ? void 0 : "请输入正确的手机号", se = (s, c) => s instanceof Error && s.message ? s.message : typeof s == "string" && s ? s : c, ge = (s) => s.replace(/\D/g, "").slice(0, 11), je = (s) => s.length <= 3 ? s : s.length <= 7 ? `${s.slice(0, 3)} ${s.slice(3)}` : `${s.slice(0, 3)} ${s.slice(3, 7)} ${s.slice(7)}`;
2
+ import { c as y } from "./utils-B6yFEsav.js";
3
+ import { useState as l, useMemo as ge, useEffect as re } from "react";
4
+ import { Layers3 as ce, MessageCircle as oe, Loader2 as Q, ArrowRight as te, UserRound as de, LockKeyhole as ae } from "lucide-react";
5
+ const fe = (s) => /^1[3-9]\d{9}$/.test(s) ? void 0 : "请输入正确的手机号", se = (s, i) => s instanceof Error && s.message ? s.message : typeof s == "string" && s ? s : i, be = (s) => s.replace(/\D/g, "").slice(0, 11), je = (s) => s.length <= 3 ? s : s.length <= 7 ? `${s.slice(0, 3)} ${s.slice(3)}` : `${s.slice(0, 3)} ${s.slice(3, 7)} ${s.slice(7)}`;
6
6
  function we({
7
7
  components: s,
8
- title: c = "欢迎登录",
8
+ title: i = "欢迎登录",
9
9
  description: p = "使用账号密码或手机号验证码进入系统",
10
- brandIcon: f,
11
- defaultMethod: d = "password",
10
+ brandIcon: g,
11
+ defaultMethod: u = "password",
12
12
  enabledMethods: m = ["password", "sms"],
13
13
  error: A,
14
14
  extraActions: k,
15
- footer: u,
16
- socialProviders: b,
15
+ footer: c,
16
+ socialProviders: f,
17
17
  className: j,
18
18
  smsCountdownSeconds: w = 60,
19
- validatePhone: x = be,
19
+ validatePhone: x = fe,
20
20
  validatePassword: h,
21
- onPasswordLogin: N,
22
- onSendSmsCode: F,
23
- onSmsLogin: $
21
+ onPasswordLogin: v,
22
+ onSendSmsCode: C,
23
+ onSmsLogin: F
24
24
  }) {
25
- const [q, t] = n(
26
- m.includes(d) ? d : m[0]
27
- ), [r, X] = n(""), [Y, Z] = n(), [_, K] = n(), [R, g] = n(), [T, U] = n(!1), [V, H] = n(!1), [O, E] = n(!1), [D, G] = n(0), I = fe(
25
+ const [z, t] = l(
26
+ m.includes(u) ? u : m[0]
27
+ ), [r, W] = l(""), [X, Y] = l(), [Z, B] = l(), [R, b] = l(), [$, K] = l(!1), [U, V] = l(!1), [H, E] = l(!1), [D, O] = l(0), I = ge(
28
28
  () => m.filter(
29
- (a, o, C) => C.indexOf(a) === o
29
+ (a, d, T) => T.indexOf(a) === d
30
30
  ),
31
31
  [m]
32
- ), z = I.length > 1, S = R || A;
32
+ ), _ = I.length > 1, S = R || A;
33
33
  if (re(() => {
34
34
  if (D <= 0) return;
35
- const a = setTimeout(() => G((o) => o - 1), 1e3);
35
+ const a = setTimeout(() => O((d) => d - 1), 1e3);
36
36
  return () => clearTimeout(a);
37
37
  }, [D]), !s)
38
38
  return /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center text-destructive", children: "错误:请通过 components prop 注入 UI 组件" });
39
- const { Button: M, Input: L, Label: B, Tabs: l, TabsList: i, TabsTrigger: y, TabsContent: J } = s, P = async (a) => {
39
+ const { Button: q, Input: M, Label: L, Tabs: n, TabsList: o, TabsTrigger: N, TabsContent: G } = s, P = async (a) => {
40
40
  a.preventDefault();
41
- const o = new FormData(a.currentTarget), C = {
42
- username: String(o.get("username") || "").trim(),
43
- password: String(o.get("password") || "")
44
- }, Q = !C.username || !C.password ? "请输入账号和密码" : h == null ? void 0 : h(C);
45
- if (Q) {
46
- g(Q);
41
+ const d = new FormData(a.currentTarget), T = {
42
+ username: String(d.get("username") || "").trim(),
43
+ password: String(d.get("password") || "")
44
+ }, J = !T.username || !T.password ? "请输入账号和密码" : h == null ? void 0 : h(T);
45
+ if (J) {
46
+ b(J);
47
47
  return;
48
48
  }
49
49
  try {
50
- U(!0), g(void 0), await (N == null ? void 0 : N(C));
50
+ K(!0), b(void 0), await (v == null ? void 0 : v(T));
51
51
  } catch (ee) {
52
- g(se(ee, "登录失败,请稍后重试"));
52
+ b(se(ee, "登录失败,请稍后重试"));
53
53
  } finally {
54
- U(!1);
54
+ K(!1);
55
55
  }
56
- }, me = async () => {
56
+ }, ue = async () => {
57
57
  const a = x(r);
58
58
  if (a) {
59
- g(a);
59
+ b(a);
60
60
  return;
61
61
  }
62
62
  try {
63
- E(!0), g(void 0);
64
- const o = await (F == null ? void 0 : F(r));
65
- Z(o == null ? void 0 : o.smsId), K(o == null ? void 0 : o.smsType), G(w);
66
- } catch (o) {
67
- g(se(o, "发送验证码失败,请稍后重试"));
63
+ E(!0), b(void 0);
64
+ const d = await (C == null ? void 0 : C(r));
65
+ Y(d == null ? void 0 : d.smsId), B(d == null ? void 0 : d.smsType), O(w);
66
+ } catch (d) {
67
+ b(se(d, "发送验证码失败,请稍后重试"));
68
68
  } finally {
69
69
  E(!1);
70
70
  }
71
- }, ue = async (a) => {
71
+ }, me = async (a) => {
72
72
  a.preventDefault();
73
- const o = new FormData(a.currentTarget), C = String(o.get("code") || "").trim(), Q = x(r);
74
- if (Q) {
75
- g(Q);
73
+ const d = new FormData(a.currentTarget), T = String(d.get("code") || "").trim(), J = x(r);
74
+ if (J) {
75
+ b(J);
76
76
  return;
77
77
  }
78
- if (!C) {
79
- g("请输入验证码");
78
+ if (!T) {
79
+ b("请输入验证码");
80
80
  return;
81
81
  }
82
82
  try {
83
- H(!0), g(void 0), await ($ == null ? void 0 : $({ phone: r, code: C, smsId: Y, smsType: _ }));
83
+ V(!0), b(void 0), await (F == null ? void 0 : F({ phone: r, code: T, smsId: X, smsType: Z }));
84
84
  } catch (ee) {
85
- g(se(ee, "验证码错误或已过期"));
85
+ b(se(ee, "验证码错误或已过期"));
86
86
  } finally {
87
- H(!1);
87
+ V(!1);
88
88
  }
89
89
  }, he = () => /* @__PURE__ */ e.jsxs("div", { className: "mb-7", children: [
90
- /* @__PURE__ */ e.jsx("div", { className: "mb-4 flex h-11 w-11 items-center justify-center rounded-lg bg-primary text-primary-foreground shadow-sm", children: f || /* @__PURE__ */ e.jsx(ie, { className: "h-5 w-5" }) }),
91
- /* @__PURE__ */ e.jsx("h1", { className: "text-2xl font-semibold", children: c }),
92
- p && /* @__PURE__ */ e.jsx("p", { className: "mt-2 text-sm leading-6 text-muted-foreground", children: p })
93
- ] }), xe = () => b != null && b.length ? /* @__PURE__ */ e.jsx("div", { className: "mb-6 grid gap-2", children: b.map((a) => /* @__PURE__ */ e.jsxs(
94
- M,
90
+ /* @__PURE__ */ e.jsx("div", { className: "mb-4 flex h-11 w-11 items-center justify-center rounded-lg bg-primary text-primary-foreground shadow-sm ring-1 ring-primary/10", children: g || /* @__PURE__ */ e.jsx(ce, { className: "h-5 w-5" }) }),
91
+ /* @__PURE__ */ e.jsx("h1", { className: "text-balance text-2xl font-semibold leading-tight", children: i }),
92
+ p && /* @__PURE__ */ e.jsx("p", { className: "mt-2 text-pretty text-sm leading-6 text-muted-foreground", children: p })
93
+ ] }), xe = () => f != null && f.length ? /* @__PURE__ */ e.jsx("div", { className: "mb-6 grid gap-2", children: f.map((a) => /* @__PURE__ */ e.jsxs(
94
+ q,
95
95
  {
96
96
  type: "button",
97
97
  variant: "outline",
@@ -104,30 +104,31 @@ function we({
104
104
  ]
105
105
  },
106
106
  a.id
107
- )) }) : null, le = () => /* @__PURE__ */ e.jsx("form", { className: "flex flex-col", onSubmit: P, children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
107
+ )) }) : null, ne = () => /* @__PURE__ */ e.jsx("form", { className: "flex flex-col", onSubmit: P, children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
108
108
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
109
- /* @__PURE__ */ e.jsx(B, { htmlFor: "auth-username", children: "用户名" }),
109
+ /* @__PURE__ */ e.jsx(L, { htmlFor: "auth-username", children: "用户名" }),
110
110
  /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
111
111
  /* @__PURE__ */ e.jsx(de, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
112
112
  /* @__PURE__ */ e.jsx(
113
- L,
113
+ M,
114
114
  {
115
115
  id: "auth-username",
116
116
  name: "username",
117
117
  className: "bg-background/80 pl-9 backdrop-blur",
118
118
  placeholder: "请输入用户名",
119
119
  autoComplete: "username",
120
+ spellCheck: !1,
120
121
  required: !0
121
122
  }
122
123
  )
123
124
  ] })
124
125
  ] }),
125
126
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
126
- /* @__PURE__ */ e.jsx(B, { htmlFor: "auth-password", children: "密码" }),
127
+ /* @__PURE__ */ e.jsx(L, { htmlFor: "auth-password", children: "密码" }),
127
128
  /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
128
129
  /* @__PURE__ */ e.jsx(ae, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
129
130
  /* @__PURE__ */ e.jsx(
130
- L,
131
+ M,
131
132
  {
132
133
  id: "auth-password",
133
134
  name: "password",
@@ -141,13 +142,13 @@ function we({
141
142
  ] })
142
143
  ] }),
143
144
  /* @__PURE__ */ e.jsx(
144
- M,
145
+ q,
145
146
  {
146
147
  type: "submit",
147
148
  className: "mt-4 h-11 w-full",
148
- disabled: T,
149
- children: T ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
150
- /* @__PURE__ */ e.jsx(W, { className: "mr-2 h-4 w-4 animate-spin" }),
149
+ disabled: $,
150
+ children: $ ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
151
+ /* @__PURE__ */ e.jsx(Q, { className: "mr-2 h-4 w-4 animate-spin" }),
151
152
  "登录中..."
152
153
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
153
154
  "登录",
@@ -155,44 +156,46 @@ function we({
155
156
  ] })
156
157
  }
157
158
  )
158
- ] }) }), ne = () => /* @__PURE__ */ e.jsx("form", { className: "flex flex-col", onSubmit: ue, children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
159
+ ] }) }), le = () => /* @__PURE__ */ e.jsx("form", { className: "flex flex-col", onSubmit: me, children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
159
160
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
160
- /* @__PURE__ */ e.jsx(B, { htmlFor: "auth-phone", children: "手机号" }),
161
+ /* @__PURE__ */ e.jsx(L, { htmlFor: "auth-phone", children: "手机号" }),
161
162
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
162
163
  /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
163
164
  /* @__PURE__ */ e.jsx(oe, { className: "pointer-events-none absolute left-3 top-1/2 z-10 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
164
165
  /* @__PURE__ */ e.jsx(
165
- L,
166
+ M,
166
167
  {
167
168
  id: "auth-phone",
168
169
  name: "phone",
169
170
  className: "bg-background/80 pl-9 backdrop-blur",
170
171
  placeholder: "请输入手机号",
171
172
  value: je(r),
172
- onChange: (a) => X(ge(a.target.value)),
173
+ onChange: (a) => W(be(a.target.value)),
173
174
  required: !0,
174
175
  maxLength: 13,
175
- inputMode: "numeric"
176
+ inputMode: "numeric",
177
+ autoComplete: "tel",
178
+ spellCheck: !1
176
179
  }
177
180
  )
178
181
  ] }),
179
182
  /* @__PURE__ */ e.jsx(
180
- M,
183
+ q,
181
184
  {
182
185
  type: "button",
183
186
  variant: "outline",
184
187
  className: "h-10 w-28 shrink-0 bg-background/70 backdrop-blur hover:bg-background/90",
185
- onClick: me,
186
- disabled: !r || O || D > 0,
187
- children: O ? /* @__PURE__ */ e.jsx(W, { className: "h-4 w-4 animate-spin" }) : D > 0 ? `${D}秒` : "发送验证码"
188
+ onClick: ue,
189
+ disabled: !r || H || D > 0,
190
+ children: H ? /* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 animate-spin" }) : D > 0 ? `${D}秒` : "发送验证码"
188
191
  }
189
192
  )
190
193
  ] })
191
194
  ] }),
192
195
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
193
- /* @__PURE__ */ e.jsx(B, { htmlFor: "auth-code", children: "验证码" }),
196
+ /* @__PURE__ */ e.jsx(L, { htmlFor: "auth-code", children: "验证码" }),
194
197
  /* @__PURE__ */ e.jsx(
195
- L,
198
+ M,
196
199
  {
197
200
  id: "auth-code",
198
201
  name: "code",
@@ -204,34 +207,42 @@ function we({
204
207
  }
205
208
  )
206
209
  ] }),
207
- /* @__PURE__ */ e.jsx(M, { type: "submit", className: "mt-4 h-11 w-full", disabled: V, children: V ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
208
- /* @__PURE__ */ e.jsx(W, { className: "mr-2 h-4 w-4 animate-spin" }),
209
- "验证中..."
210
- ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
211
- "验证并登录",
212
- /* @__PURE__ */ e.jsx(te, { className: "ml-2 h-4 w-4" })
213
- ] }) })
214
- ] }) }), pe = () => z ? /* @__PURE__ */ e.jsxs(
215
- l,
210
+ /* @__PURE__ */ e.jsx(
211
+ q,
212
+ {
213
+ type: "submit",
214
+ className: "mt-4 h-11 w-full",
215
+ disabled: U,
216
+ children: U ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
217
+ /* @__PURE__ */ e.jsx(Q, { className: "mr-2 h-4 w-4 animate-spin" }),
218
+ "验证中..."
219
+ ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
220
+ "验证并登录",
221
+ /* @__PURE__ */ e.jsx(te, { className: "ml-2 h-4 w-4" })
222
+ ] })
223
+ }
224
+ )
225
+ ] }) }), pe = () => _ ? /* @__PURE__ */ e.jsxs(
226
+ n,
216
227
  {
217
- value: q,
228
+ value: z,
218
229
  onValueChange: (a) => t(a),
219
230
  className: "w-full",
220
231
  children: [
221
- /* @__PURE__ */ e.jsxs(i, { className: "mb-6 grid h-11 w-full grid-cols-2 bg-background/60 backdrop-blur", children: [
222
- I.includes("password") && /* @__PURE__ */ e.jsx(y, { value: "password", children: "账号密码登录" }),
223
- I.includes("sms") && /* @__PURE__ */ e.jsx(y, { value: "sms", children: "手机号登录" })
232
+ /* @__PURE__ */ e.jsxs(o, { className: "mb-6 grid h-11 w-full grid-cols-2 bg-background/60 backdrop-blur", children: [
233
+ I.includes("password") && /* @__PURE__ */ e.jsx(N, { value: "password", children: "账号密码登录" }),
234
+ I.includes("sms") && /* @__PURE__ */ e.jsx(N, { value: "sms", children: "手机号登录" })
224
235
  ] }),
225
- /* @__PURE__ */ e.jsx(J, { value: "password", children: le() }),
226
- /* @__PURE__ */ e.jsx(J, { value: "sms", children: ne() })
236
+ /* @__PURE__ */ e.jsx(G, { value: "password", children: ne() }),
237
+ /* @__PURE__ */ e.jsx(G, { value: "sms", children: le() })
227
238
  ]
228
239
  }
229
- ) : I[0] === "sms" ? ne() : le();
240
+ ) : I[0] === "sms" ? le() : ne();
230
241
  return /* @__PURE__ */ e.jsxs(
231
242
  "div",
232
243
  {
233
- className: v(
234
- "w-full max-w-[calc(100vw-2rem)] rounded-lg border border-white/45 bg-background/60 p-5 shadow-2xl shadow-slate-950/25 backdrop-blur-md supports-[backdrop-filter]:bg-background/50 md:p-8",
244
+ className: y(
245
+ "w-full max-w-[calc(100vw-2rem)] rounded-lg border border-white/45 bg-background/70 p-5 shadow-2xl shadow-slate-950/25 backdrop-blur-md supports-[backdrop-filter]:bg-background/55 md:p-8",
235
246
  j
236
247
  ),
237
248
  children: [
@@ -239,120 +250,128 @@ function we({
239
250
  xe(),
240
251
  pe(),
241
252
  k && /* @__PURE__ */ e.jsx("div", { className: "mt-5", children: k }),
242
- S && /* @__PURE__ */ e.jsx("div", { className: "mt-4 border-l-2 border-red-600 px-4 text-sm text-red-600 dark:border-red-400 dark:text-red-400", children: S }),
243
- u && /* @__PURE__ */ e.jsx("div", { className: "mt-6 text-sm text-muted-foreground", children: u })
253
+ S && /* @__PURE__ */ e.jsx(
254
+ "div",
255
+ {
256
+ className: "mt-4 border-l-2 border-destructive bg-destructive/5 px-4 py-3 text-sm text-destructive",
257
+ "aria-live": "polite",
258
+ children: S
259
+ }
260
+ ),
261
+ c && /* @__PURE__ */ e.jsx("div", { className: "mt-6 text-sm text-muted-foreground", children: c })
244
262
  ]
245
263
  }
246
264
  );
247
265
  }
248
- const Ne = (s) => /^1[3-9]\d{9}$/.test(s) ? void 0 : "请输入正确的手机号", ce = (s, c) => s instanceof Error && s.message ? s.message : typeof s == "string" && s ? s : c, ye = (s) => s.replace(/\D/g, "").slice(0, 11), ve = (s) => s.length <= 3 ? s : s.length <= 7 ? `${s.slice(0, 3)} ${s.slice(3)}` : `${s.slice(0, 3)} ${s.slice(3, 7)} ${s.slice(7)}`;
266
+ const ve = (s) => /^1[3-9]\d{9}$/.test(s) ? void 0 : "请输入正确的手机号", ie = (s, i) => s instanceof Error && s.message ? s.message : typeof s == "string" && s ? s : i, Ne = (s) => s.replace(/\D/g, "").slice(0, 11), ye = (s) => s.length <= 3 ? s : s.length <= 7 ? `${s.slice(0, 3)} ${s.slice(3)}` : `${s.slice(0, 3)} ${s.slice(3, 7)} ${s.slice(7)}`;
249
267
  function ke({
250
268
  components: s,
251
- title: c = "创建账号",
269
+ title: i = "创建账号",
252
270
  description: p = "填写账号信息并完成手机号验证",
253
- brandIcon: f,
254
- requirePhoneVerification: d = !0,
271
+ brandIcon: g,
272
+ requirePhoneVerification: u = !0,
255
273
  requireTermsAccepted: m = !1,
256
274
  termsLabel: A = "我已阅读并同意服务条款",
257
275
  error: k,
258
- extraActions: u,
259
- footer: b,
276
+ extraActions: c,
277
+ footer: f,
260
278
  socialProviders: j,
261
279
  className: w,
262
280
  smsCountdownSeconds: x = 60,
263
- validatePhone: h = Ne,
264
- validatePassword: N,
265
- validateRegister: F,
266
- onSendSmsCode: $,
267
- onRegister: q
281
+ validatePhone: h = ve,
282
+ validatePassword: v,
283
+ validateRegister: C,
284
+ onSendSmsCode: F,
285
+ onRegister: z
268
286
  }) {
269
- const [t, r] = n(""), [X, Y] = n(), [Z, _] = n(), [K, R] = n(!1), [g, T] = n(), [U, V] = n(!1), [H, O] = n(!1), [E, D] = n(0), G = g || k;
287
+ const [t, r] = l(""), [W, X] = l(), [Y, Z] = l(), [B, R] = l(!1), [b, $] = l(), [K, U] = l(!1), [V, H] = l(!1), [E, D] = l(0), O = b || k;
270
288
  if (re(() => {
271
289
  if (E <= 0) return;
272
- const l = setTimeout(() => D((i) => i - 1), 1e3);
273
- return () => clearTimeout(l);
290
+ const n = setTimeout(() => D((o) => o - 1), 1e3);
291
+ return () => clearTimeout(n);
274
292
  }, [E]), !s)
275
293
  return /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center text-destructive", children: "错误:请通过 components prop 注入 UI 组件" });
276
- const { Button: I, Input: z, Label: S } = s, M = async () => {
277
- const l = h(t);
278
- if (l) {
279
- T(l);
294
+ const { Button: I, Input: _, Label: S } = s, q = async () => {
295
+ const n = h(t);
296
+ if (n) {
297
+ $(n);
280
298
  return;
281
299
  }
282
300
  try {
283
- O(!0), T(void 0);
284
- const i = await ($ == null ? void 0 : $(t));
285
- Y(i == null ? void 0 : i.smsId), _(i == null ? void 0 : i.smsType), D(x);
286
- } catch (i) {
287
- T(ce(i, "发送验证码失败,请稍后重试"));
301
+ H(!0), $(void 0);
302
+ const o = await (F == null ? void 0 : F(t));
303
+ X(o == null ? void 0 : o.smsId), Z(o == null ? void 0 : o.smsType), D(x);
304
+ } catch (o) {
305
+ $(ie(o, "发送验证码失败,请稍后重试"));
288
306
  } finally {
289
- O(!1);
307
+ H(!1);
290
308
  }
291
- }, L = async (l) => {
292
- l.preventDefault();
293
- const i = new FormData(l.currentTarget), y = {
294
- username: String(i.get("username") || "").trim(),
295
- password: String(i.get("password") || ""),
296
- confirmPassword: String(i.get("confirmPassword") || ""),
309
+ }, M = async (n) => {
310
+ n.preventDefault();
311
+ const o = new FormData(n.currentTarget), N = {
312
+ username: String(o.get("username") || "").trim(),
313
+ password: String(o.get("password") || ""),
314
+ confirmPassword: String(o.get("confirmPassword") || ""),
297
315
  phone: t,
298
- code: String(i.get("code") || "").trim(),
299
- smsId: X,
300
- smsType: Z,
301
- termsAccepted: K
302
- }, J = !y.username && "请输入用户名" || !y.password && "请输入密码" || y.password !== y.confirmPassword && "两次输入的密码不一致" || d && h(t) || d && !y.code && "请输入验证码" || m && !K && "请先同意服务条款" || (N == null ? void 0 : N(y)) || (F == null ? void 0 : F(y));
303
- if (J) {
304
- T(J);
316
+ code: String(o.get("code") || "").trim(),
317
+ smsId: W,
318
+ smsType: Y,
319
+ termsAccepted: B
320
+ }, G = !N.username && "请输入用户名" || !N.password && "请输入密码" || N.password !== N.confirmPassword && "两次输入的密码不一致" || u && h(t) || u && !N.code && "请输入验证码" || m && !B && "请先同意服务条款" || (v == null ? void 0 : v(N)) || (C == null ? void 0 : C(N));
321
+ if (G) {
322
+ $(G);
305
323
  return;
306
324
  }
307
325
  try {
308
- V(!0), T(void 0), await (q == null ? void 0 : q(y));
326
+ U(!0), $(void 0), await (z == null ? void 0 : z(N));
309
327
  } catch (P) {
310
- T(ce(P, "注册失败,请稍后重试"));
328
+ $(ie(P, "注册失败,请稍后重试"));
311
329
  } finally {
312
- V(!1);
330
+ U(!1);
313
331
  }
314
- }, B = () => j != null && j.length ? /* @__PURE__ */ e.jsx("div", { className: "mb-6 grid gap-2", children: j.map((l) => /* @__PURE__ */ e.jsxs(
332
+ }, L = () => j != null && j.length ? /* @__PURE__ */ e.jsx("div", { className: "mb-6 grid gap-2", children: j.map((n) => /* @__PURE__ */ e.jsxs(
315
333
  I,
316
334
  {
317
335
  type: "button",
318
336
  variant: "outline",
319
337
  className: "h-10 w-full",
320
- disabled: l.disabled,
321
- onClick: l.onClick,
338
+ disabled: n.disabled,
339
+ onClick: n.onClick,
322
340
  children: [
323
- l.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex h-4 w-4 items-center justify-center", children: l.icon }),
324
- l.label
341
+ n.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex h-4 w-4 items-center justify-center", children: n.icon }),
342
+ n.label
325
343
  ]
326
344
  },
327
- l.id
345
+ n.id
328
346
  )) }) : null;
329
347
  return /* @__PURE__ */ e.jsxs(
330
348
  "div",
331
349
  {
332
- className: v(
333
- "w-full max-w-[calc(100vw-2rem)] rounded-lg border border-white/45 bg-background/60 p-5 shadow-2xl shadow-slate-950/25 backdrop-blur-md supports-[backdrop-filter]:bg-background/50 md:p-8",
350
+ className: y(
351
+ "w-full max-w-[calc(100vw-2rem)] rounded-lg border border-white/45 bg-background/70 p-5 shadow-2xl shadow-slate-950/25 backdrop-blur-md supports-[backdrop-filter]:bg-background/55 md:p-8",
334
352
  w
335
353
  ),
336
354
  children: [
337
355
  /* @__PURE__ */ e.jsxs("div", { className: "mb-7", children: [
338
- /* @__PURE__ */ e.jsx("div", { className: "mb-4 flex h-11 w-11 items-center justify-center rounded-lg bg-primary text-primary-foreground shadow-sm", children: f || /* @__PURE__ */ e.jsx(ie, { className: "h-5 w-5" }) }),
339
- /* @__PURE__ */ e.jsx("h1", { className: "text-2xl font-semibold", children: c }),
340
- p && /* @__PURE__ */ e.jsx("p", { className: "mt-2 text-sm leading-6 text-muted-foreground", children: p })
356
+ /* @__PURE__ */ e.jsx("div", { className: "mb-4 flex h-11 w-11 items-center justify-center rounded-lg bg-primary text-primary-foreground shadow-sm ring-1 ring-primary/10", children: g || /* @__PURE__ */ e.jsx(ce, { className: "h-5 w-5" }) }),
357
+ /* @__PURE__ */ e.jsx("h1", { className: "text-balance text-2xl font-semibold leading-tight", children: i }),
358
+ p && /* @__PURE__ */ e.jsx("p", { className: "mt-2 text-pretty text-sm leading-6 text-muted-foreground", children: p })
341
359
  ] }),
342
- B(),
343
- /* @__PURE__ */ e.jsx("form", { className: "flex flex-col", onSubmit: L, children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
360
+ L(),
361
+ /* @__PURE__ */ e.jsx("form", { className: "flex flex-col", onSubmit: M, children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
344
362
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
345
363
  /* @__PURE__ */ e.jsx(S, { htmlFor: "auth-register-username", children: "用户名" }),
346
364
  /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
347
365
  /* @__PURE__ */ e.jsx(de, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
348
366
  /* @__PURE__ */ e.jsx(
349
- z,
367
+ _,
350
368
  {
351
369
  id: "auth-register-username",
352
370
  name: "username",
353
371
  className: "bg-background/80 pl-9 backdrop-blur",
354
372
  placeholder: "请输入用户名",
355
373
  autoComplete: "username",
374
+ spellCheck: !1,
356
375
  required: !0
357
376
  }
358
377
  )
@@ -363,7 +382,7 @@ function ke({
363
382
  /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
364
383
  /* @__PURE__ */ e.jsx(ae, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
365
384
  /* @__PURE__ */ e.jsx(
366
- z,
385
+ _,
367
386
  {
368
387
  id: "auth-register-password",
369
388
  name: "password",
@@ -381,7 +400,7 @@ function ke({
381
400
  /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
382
401
  /* @__PURE__ */ e.jsx(ae, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
383
402
  /* @__PURE__ */ e.jsx(
384
- z,
403
+ _,
385
404
  {
386
405
  id: "auth-register-confirm-password",
387
406
  name: "confirmPassword",
@@ -394,24 +413,26 @@ function ke({
394
413
  )
395
414
  ] })
396
415
  ] }),
397
- d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
416
+ u && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
398
417
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
399
418
  /* @__PURE__ */ e.jsx(S, { htmlFor: "auth-register-phone", children: "手机号" }),
400
419
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
401
420
  /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
402
421
  /* @__PURE__ */ e.jsx(oe, { className: "pointer-events-none absolute left-3 top-1/2 z-10 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
403
422
  /* @__PURE__ */ e.jsx(
404
- z,
423
+ _,
405
424
  {
406
425
  id: "auth-register-phone",
407
426
  name: "phone",
408
427
  className: "bg-background/80 pl-9 backdrop-blur",
409
428
  placeholder: "请输入手机号",
410
- value: ve(t),
411
- onChange: (l) => r(ye(l.target.value)),
429
+ value: ye(t),
430
+ onChange: (n) => r(Ne(n.target.value)),
412
431
  required: !0,
413
432
  maxLength: 13,
414
- inputMode: "numeric"
433
+ inputMode: "numeric",
434
+ autoComplete: "tel",
435
+ spellCheck: !1
415
436
  }
416
437
  )
417
438
  ] }),
@@ -421,9 +442,9 @@ function ke({
421
442
  type: "button",
422
443
  variant: "outline",
423
444
  className: "h-10 w-28 shrink-0 bg-background/70 backdrop-blur hover:bg-background/90",
424
- onClick: M,
425
- disabled: !t || H || E > 0,
426
- children: H ? /* @__PURE__ */ e.jsx(W, { className: "h-4 w-4 animate-spin" }) : E > 0 ? `${E}秒` : "发送验证码"
445
+ onClick: q,
446
+ disabled: !t || V || E > 0,
447
+ children: V ? /* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 animate-spin" }) : E > 0 ? `${E}秒` : "发送验证码"
427
448
  }
428
449
  )
429
450
  ] })
@@ -431,7 +452,7 @@ function ke({
431
452
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
432
453
  /* @__PURE__ */ e.jsx(S, { htmlFor: "auth-register-code", children: "验证码" }),
433
454
  /* @__PURE__ */ e.jsx(
434
- z,
455
+ _,
435
456
  {
436
457
  id: "auth-register-code",
437
458
  name: "code",
@@ -449,9 +470,9 @@ function ke({
449
470
  "input",
450
471
  {
451
472
  type: "checkbox",
452
- className: "mt-0.5 h-4 w-4 rounded border-input",
453
- checked: K,
454
- onChange: (l) => R(l.target.checked)
473
+ className: "mt-0.5 h-4 w-4 rounded border-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
474
+ checked: B,
475
+ onChange: (n) => R(n.target.checked)
455
476
  }
456
477
  ),
457
478
  /* @__PURE__ */ e.jsx("span", { children: A })
@@ -461,9 +482,9 @@ function ke({
461
482
  {
462
483
  type: "submit",
463
484
  className: "mt-4 h-11 w-full",
464
- disabled: U,
465
- children: U ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
466
- /* @__PURE__ */ e.jsx(W, { className: "mr-2 h-4 w-4 animate-spin" }),
485
+ disabled: K,
486
+ children: K ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
487
+ /* @__PURE__ */ e.jsx(Q, { className: "mr-2 h-4 w-4 animate-spin" }),
467
488
  "注册中..."
468
489
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
469
490
  "创建账号",
@@ -472,70 +493,77 @@ function ke({
472
493
  }
473
494
  )
474
495
  ] }) }),
475
- u && /* @__PURE__ */ e.jsx("div", { className: "mt-5", children: u }),
476
- G && /* @__PURE__ */ e.jsx("div", { className: "mt-4 border-l-2 border-red-600 px-4 text-sm text-red-600 dark:border-red-400 dark:text-red-400", children: G }),
477
- b && /* @__PURE__ */ e.jsx("div", { className: "mt-6 text-sm text-muted-foreground", children: b })
496
+ c && /* @__PURE__ */ e.jsx("div", { className: "mt-5", children: c }),
497
+ O && /* @__PURE__ */ e.jsx(
498
+ "div",
499
+ {
500
+ className: "mt-4 border-l-2 border-destructive bg-destructive/5 px-4 py-3 text-sm text-destructive",
501
+ "aria-live": "polite",
502
+ children: O
503
+ }
504
+ ),
505
+ f && /* @__PURE__ */ e.jsx("div", { className: "mt-6 text-sm text-muted-foreground", children: f })
478
506
  ]
479
507
  }
480
508
  );
481
509
  }
482
510
  function Ee({
483
511
  children: s,
484
- visual: c,
512
+ visual: i,
485
513
  overlay: p,
486
- className: f,
487
- contentClassName: d,
514
+ className: g,
515
+ contentClassName: u,
488
516
  panelClassName: m
489
517
  }) {
490
- return /* @__PURE__ */ e.jsx("div", { className: v("min-h-screen", f), children: /* @__PURE__ */ e.jsxs("main", { className: "relative flex min-h-screen w-full overflow-hidden", children: [
491
- c && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0", children: c }),
518
+ return /* @__PURE__ */ e.jsx("div", { className: y("min-h-screen", g), children: /* @__PURE__ */ e.jsxs("main", { className: "relative flex min-h-screen w-full overflow-hidden", children: [
519
+ i && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0", children: i }),
492
520
  p ?? /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 z-10 bg-black/35" }),
493
521
  /* @__PURE__ */ e.jsx(
494
522
  "div",
495
523
  {
496
- className: v(
524
+ className: y(
497
525
  "relative z-20 flex min-h-screen w-full items-center justify-center px-4 py-6 sm:px-6 lg:p-12 xl:p-16",
498
- d
526
+ u
499
527
  ),
500
- children: /* @__PURE__ */ e.jsx("div", { className: v("w-full min-w-0 max-w-[420px]", m), children: s })
528
+ children: /* @__PURE__ */ e.jsx("div", { className: y("w-full min-w-0 max-w-[420px]", m), children: s })
501
529
  }
502
530
  )
503
531
  ] }) });
504
532
  }
505
533
  function De({
506
534
  items: s,
507
- intervalMs: c = 5e3,
535
+ intervalMs: i = 5e3,
508
536
  showIndicators: p = !0,
509
- showText: f = !0,
510
- className: d,
537
+ showText: g = !0,
538
+ className: u,
511
539
  imageClassName: m,
512
540
  contentClassName: A,
513
541
  ariaLabel: k = "认证页视觉轮播"
514
542
  }) {
515
- const [u, b] = n(0), [j, w] = n(!1), x = s.length > 0, h = x ? s[u] : void 0, N = (t) => {
516
- x && b((t + s.length) % s.length);
517
- }, F = () => N(u + 1), $ = () => N(u - 1);
543
+ const [c, f] = l(0), [j, w] = l(!1), x = s.length > 0, h = x ? s[c] : void 0, v = (t) => {
544
+ x && f((t + s.length) % s.length);
545
+ }, C = () => v(c + 1), F = () => v(c - 1);
518
546
  re(() => {
519
- if (!x || j || c <= 0 || s.length < 2) return;
547
+ if (!x || j || i <= 0 || s.length < 2) return;
520
548
  const t = setTimeout(() => {
521
- b((r) => (r + 1) % s.length);
522
- }, c);
549
+ f((r) => (r + 1) % s.length);
550
+ }, i);
523
551
  return () => clearTimeout(t);
524
- }, [x, c, j, s.length, u]);
525
- const q = (t) => {
526
- t.key === "ArrowLeft" && (t.preventDefault(), $()), t.key === "ArrowRight" && (t.preventDefault(), F());
552
+ }, [x, i, j, s.length, c]);
553
+ const z = (t) => {
554
+ t.key === "ArrowLeft" && (t.preventDefault(), F()), t.key === "ArrowRight" && (t.preventDefault(), C());
527
555
  };
528
556
  return x ? /* @__PURE__ */ e.jsxs(
529
557
  "div",
530
558
  {
531
- className: v(
532
- "relative h-full min-h-[360px] w-full overflow-hidden bg-slate-950 outline-none",
533
- d
559
+ className: y(
560
+ "relative h-full min-h-[360px] w-full overflow-hidden bg-slate-950 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950",
561
+ u
534
562
  ),
535
563
  tabIndex: 0,
536
564
  "aria-label": k,
537
565
  role: "region",
538
- onKeyDown: q,
566
+ onKeyDown: z,
539
567
  onMouseEnter: () => w(!0),
540
568
  onMouseLeave: () => w(!1),
541
569
  onFocus: () => w(!0),
@@ -546,41 +574,60 @@ function De({
546
574
  {
547
575
  src: t.image,
548
576
  alt: t.alt,
549
- className: v(
550
- "absolute inset-0 h-full w-full object-cover transition-opacity duration-700 ease-out",
551
- r === u ? "opacity-100" : "opacity-0",
577
+ width: t.width ?? 1600,
578
+ height: t.height ?? 900,
579
+ fetchPriority: r === c ? "high" : "auto",
580
+ loading: r === 0 ? "eager" : "lazy",
581
+ decoding: "async",
582
+ className: y(
583
+ "absolute inset-0 h-full w-full object-cover transition-opacity duration-700 ease-out motion-reduce:transition-none",
584
+ r === c ? "opacity-100" : "opacity-0",
552
585
  m
553
586
  ),
554
- "aria-hidden": r !== u
587
+ "aria-hidden": r !== c
555
588
  },
556
589
  `${t.image}-${r}`
557
590
  )),
558
591
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-slate-950/80 via-slate-950/30 to-slate-950/10" }),
559
- /* @__PURE__ */ e.jsx("div", { className: "absolute inset-x-0 bottom-0 bg-gradient-to-t from-slate-950/78 via-slate-950/30 to-transparent pb-16 pt-24" }),
560
- (f || p) && /* @__PURE__ */ e.jsxs(
592
+ /* @__PURE__ */ e.jsx("div", { className: "absolute inset-x-0 bottom-0 bg-gradient-to-t from-slate-950/80 via-slate-950/30 to-transparent pb-16 pt-24" }),
593
+ /* @__PURE__ */ e.jsx(
594
+ "div",
595
+ {
596
+ className: "pointer-events-none absolute inset-0 opacity-[0.18] [background-image:linear-gradient(to_right,rgba(255,255,255,0.32)_1px,transparent_1px),linear-gradient(to_bottom,rgba(255,255,255,0.26)_1px,transparent_1px)] [background-size:44px_44px]",
597
+ "aria-hidden": "true"
598
+ }
599
+ ),
600
+ /* @__PURE__ */ e.jsx(
601
+ "div",
602
+ {
603
+ className: "pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-white/60 to-transparent",
604
+ "aria-hidden": "true"
605
+ }
606
+ ),
607
+ (g || p) && /* @__PURE__ */ e.jsxs(
561
608
  "div",
562
609
  {
563
- className: v(
610
+ className: y(
564
611
  "absolute inset-x-5 bottom-6 text-white sm:inset-x-8 sm:bottom-8 lg:inset-x-12 lg:bottom-10",
565
612
  A
566
613
  ),
567
614
  children: [
568
- f && h && /* @__PURE__ */ e.jsxs("div", { className: "max-w-[min(28rem,calc(100vw-2.5rem))]", children: [
615
+ g && h && /* @__PURE__ */ e.jsxs("div", { className: "max-w-[min(28rem,calc(100vw-2.5rem))]", children: [
569
616
  h.eyebrow && /* @__PURE__ */ e.jsx("p", { className: "mb-2 text-[0.68rem] font-medium uppercase tracking-normal text-cyan-100/80 sm:text-xs", children: h.eyebrow }),
570
- h.title && /* @__PURE__ */ e.jsx("h2", { className: "text-xl font-semibold leading-tight sm:text-2xl lg:text-3xl", children: h.title }),
617
+ h.title && /* @__PURE__ */ e.jsx("h2", { className: "text-balance text-xl font-semibold leading-tight sm:text-2xl lg:text-3xl", children: h.title }),
571
618
  h.description && /* @__PURE__ */ e.jsx("p", { className: "mt-2 line-clamp-3 text-sm leading-6 text-slate-100/80 sm:text-base", children: h.description })
572
619
  ] }),
573
620
  p && s.length > 1 && /* @__PURE__ */ e.jsx("div", { className: "mt-5 flex items-center gap-2", children: s.map((t, r) => /* @__PURE__ */ e.jsx(
574
621
  "button",
575
622
  {
576
623
  type: "button",
577
- className: v(
578
- "h-1.5 rounded-full transition-all",
579
- r === u ? "w-8 bg-white" : "w-3 bg-white/40 hover:bg-white/70"
624
+ className: y(
625
+ "h-1.5 rounded-full transition-[background-color,width] duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950 motion-reduce:transition-none",
626
+ r === c ? "w-8 bg-white" : "w-3 bg-white/40 hover:bg-white/70"
580
627
  ),
581
628
  "aria-label": `切换到第 ${r + 1} 张轮播图`,
582
- "aria-current": r === u,
583
- onClick: () => N(r)
629
+ "aria-current": r === c,
630
+ onClick: () => v(r)
584
631
  },
585
632
  `${t.image}-indicator-${r}`
586
633
  )) })
@@ -592,9 +639,9 @@ function De({
592
639
  ) : /* @__PURE__ */ e.jsx(
593
640
  "div",
594
641
  {
595
- className: v(
642
+ className: y(
596
643
  "relative h-full min-h-[360px] w-full overflow-hidden bg-slate-950",
597
- d
644
+ u
598
645
  ),
599
646
  "aria-label": k,
600
647
  role: "region"
@@ -603,16 +650,16 @@ function De({
603
650
  }
604
651
  function Ie({
605
652
  components: s,
606
- mode: c,
653
+ mode: i,
607
654
  defaultMode: p = "login",
608
- onModeChange: f,
609
- loginProps: d,
655
+ onModeChange: g,
656
+ loginProps: u,
610
657
  registerProps: m,
611
658
  loginLabel: A = "已有账号?登录",
612
659
  registerLabel: k = "没有账号?注册"
613
660
  }) {
614
- const [u, b] = n(p), j = c ?? u, w = (x) => {
615
- c || b(x), f == null || f(x);
661
+ const [c, f] = l(p), j = i ?? c, w = (x) => {
662
+ i || f(x), g == null || g(x);
616
663
  };
617
664
  return j === "register" ? /* @__PURE__ */ e.jsx(
618
665
  ke,
@@ -632,9 +679,9 @@ function Ie({
632
679
  ) : /* @__PURE__ */ e.jsx(
633
680
  we,
634
681
  {
635
- ...d,
682
+ ...u,
636
683
  components: s,
637
- footer: (d == null ? void 0 : d.footer) ?? /* @__PURE__ */ e.jsx(
684
+ footer: (u == null ? void 0 : u.footer) ?? /* @__PURE__ */ e.jsx(
638
685
  "button",
639
686
  {
640
687
  type: "button",
@@ -653,4 +700,4 @@ export {
653
700
  ke as c,
654
701
  De as d
655
702
  };
656
- //# sourceMappingURL=AuthPanel-D2HFX8eN.js.map
703
+ //# sourceMappingURL=AuthPanel-Cn_WwmjX.js.map