dishui 0.0.3 → 0.0.5

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 (68) hide show
  1. package/README.md +44 -74
  2. package/dist/dishui.es.js +97 -97
  3. package/dist/dishui.umd.js +3 -3
  4. package/dist/index.d.ts +1 -0
  5. package/dist/types/src/App.d.ts +3 -0
  6. package/dist/types/src/components/Badge/index.d.ts +10 -0
  7. package/dist/types/src/components/Button/index.d.ts +42 -0
  8. package/dist/types/src/components/Card/index.d.ts +38 -0
  9. package/dist/types/src/components/DataTable/DataTable.d.ts +78 -0
  10. package/dist/types/src/components/DataTable/Filters.d.ts +59 -0
  11. package/dist/types/src/components/DataTable/index.d.ts +16 -0
  12. package/dist/types/src/components/DataTable/utils.d.ts +56 -0
  13. package/dist/types/src/components/Demo/index.d.ts +10 -0
  14. package/dist/types/src/components/Input/index.d.ts +24 -0
  15. package/dist/types/src/components/Label/index.d.ts +36 -0
  16. package/dist/types/src/components/List/index.d.ts +38 -0
  17. package/dist/types/src/components/Select/index.d.ts +17 -0
  18. package/dist/types/src/components/Table/index.d.ts +56 -0
  19. package/dist/types/src/contexts/AppContext.d.ts +14 -0
  20. package/dist/types/src/index.d.ts +9 -0
  21. package/dist/types/src/index.routes.d.ts +7 -0
  22. package/dist/types/src/layouts/MainLayout.d.ts +6 -0
  23. package/dist/types/src/layouts/Navbar.d.ts +6 -0
  24. package/dist/types/src/layouts/Sidebar.d.ts +10 -0
  25. package/dist/types/src/main.d.ts +1 -0
  26. package/dist/types/src/pages/Home.d.ts +3 -0
  27. package/dist/types/src/pages/Home.en.d.ts +3 -0
  28. package/dist/types/src/pages/Home.zh.d.ts +3 -0
  29. package/dist/types/src/pages/components/Badge/index.d.ts +3 -0
  30. package/dist/types/src/pages/components/Badge/index.en.d.ts +3 -0
  31. package/dist/types/src/pages/components/Badge/index.zh.d.ts +3 -0
  32. package/dist/types/src/pages/components/Button/index.d.ts +3 -0
  33. package/dist/types/src/pages/components/Button/index.en.d.ts +3 -0
  34. package/dist/types/src/pages/components/Button/index.zh.d.ts +3 -0
  35. package/dist/types/src/pages/components/Card/index.d.ts +3 -0
  36. package/dist/types/src/pages/components/Card/index.en.d.ts +3 -0
  37. package/dist/types/src/pages/components/Card/index.zh.d.ts +3 -0
  38. package/dist/types/src/pages/components/DataTable/advanced.d.ts +3 -0
  39. package/dist/types/src/pages/components/DataTable/advanced.en.d.ts +3 -0
  40. package/dist/types/src/pages/components/DataTable/advanced.zh.d.ts +3 -0
  41. package/dist/types/src/pages/components/DataTable/advancedTreeTable.d.ts +3 -0
  42. package/dist/types/src/pages/components/DataTable/advancedTreeTable.en.d.ts +3 -0
  43. package/dist/types/src/pages/components/DataTable/advancedTreeTable.zh.d.ts +3 -0
  44. package/dist/types/src/pages/components/DataTable/index.d.ts +3 -0
  45. package/dist/types/src/pages/components/DataTable/index.en.d.ts +3 -0
  46. package/dist/types/src/pages/components/DataTable/index.zh.d.ts +3 -0
  47. package/dist/types/src/pages/components/Input/index.d.ts +3 -0
  48. package/dist/types/src/pages/components/Input/index.en.d.ts +3 -0
  49. package/dist/types/src/pages/components/Input/index.zh.d.ts +3 -0
  50. package/dist/types/src/pages/components/Label/index.d.ts +3 -0
  51. package/dist/types/src/pages/components/Label/index.en.d.ts +3 -0
  52. package/dist/types/src/pages/components/Label/index.zh.d.ts +3 -0
  53. package/dist/types/src/pages/components/List/index.d.ts +3 -0
  54. package/dist/types/src/pages/components/List/index.en.d.ts +3 -0
  55. package/dist/types/src/pages/components/List/index.zh.d.ts +3 -0
  56. package/dist/types/src/pages/components/Select/SelectExampleContent.d.ts +3 -0
  57. package/dist/types/src/pages/components/Select/index.d.ts +2 -0
  58. package/dist/types/src/pages/components/Select/index.en.d.ts +3 -0
  59. package/dist/types/src/pages/components/Select/index.zh.d.ts +3 -0
  60. package/dist/types/src/pages/components/Table/en.d.ts +3 -0
  61. package/dist/types/src/pages/components/Table/index.d.ts +3 -0
  62. package/dist/types/src/pages/components/Table/zh.d.ts +3 -0
  63. package/dist/types/src/pages/layouts/Sidebar/index.d.ts +3 -0
  64. package/dist/types/src/types/menu.d.ts +8 -0
  65. package/dist/types/src/utils/i18n.d.ts +25 -0
  66. package/dist/types/vite.config.d.mts +2 -0
  67. package/index.d.ts +3 -0
  68. package/package.json +15 -4
package/README.md CHANGED
@@ -1,103 +1,73 @@
1
- # DiShUI
1
+ # DiShui UI 组件库
2
2
 
3
- 一个基于React的组件库。
4
-
5
- ## 特性
6
-
7
- - 基于React和TypeScript开发
8
- - 使用Vite构建
9
- - 支持按需导入
3
+ 一个基于React的vibe coding出来的UI组件库。
10
4
 
11
5
  ## 安装
12
6
 
13
- ### 在线安装 (通过 npm)
14
-
15
- 推荐使用包管理器进行在线安装:
16
-
17
7
  ```bash
18
- # 使用 pnpm
19
- pnpm add dishui
20
-
21
- # 使用 npm
22
8
  npm install dishui
23
-
24
- # 使用 yarn
9
+ # 或
25
10
  yarn add dishui
26
11
  ```
27
12
 
28
- ### 离线安装 (手动安装)
29
-
30
- 如果您无法访问 npm 仓库或者需要在离线环境中使用,可以进行手动安装:
31
-
32
- 1. **获取打包文件:**
33
- 在 `dishui` 项目根目录下执行打包命令:
34
- ```bash
35
- pnpm build
36
- ```
37
- 这将在项目根目录下生成一个 `dist` 文件夹,其中包含了打包后的 JavaScript 文件、CSS 样式文件以及 TypeScript 类型声明文件。
38
-
39
- 2. **复制文件:**
40
- 将整个 `dist` 文件夹复制到您需要使用该组件库的项目中,例如放到项目的 `src/libs/dishui` 目录下。
41
-
42
- 3. **在项目中使用:**
43
- 根据您复制的路径,在您的代码中直接引入组件和样式。
44
-
45
- ```jsx
46
- import React from 'react';
47
- // 假设您将 dist 文件夹复制到了 src/libs/dishui
48
- import { Button, Badge } from './libs/dishui/dishui.es.js'; // 或 .umd.js
49
- import './libs/dishui/style.css';
50
-
51
- function App() {
52
- return (
53
- <div>
54
- <Button variant="primary">点击我</Button>
55
- <Badge variant="success">新功能</Badge>
56
- </div>
57
- );
58
- }
59
- ```
13
+ ## 使用方法
60
14
 
61
- **注意:** 手动安装时,您需要自行处理 `react` 和 `react-dom` 这两个外部依赖。请确保您的项目中已经安装了兼容版本的 React。
15
+ ### 导入组件和样式
62
16
 
63
- ## 使用
64
-
65
- 确保在使用组件前引入必要的 CSS 样式:
66
-
67
- ```jsx
68
- import React from 'react';
69
- import { Button, Badge } from 'dishui';
70
- import 'dishui/dist/style.css'; // 引入样式文件
17
+ ```tsx
18
+ import React from "react";
19
+ import { Button, Badge } from "dishui";
20
+ import "dishui/dist/dishui.css"; // 导入样式文件
71
21
 
72
22
  function App() {
73
23
  return (
74
- <div>
75
- <Button variant="primary">点击我</Button>
76
- <Badge variant="success">新功能</Badge>
24
+ <div className="p-4">
25
+ <h1 className="text-2xl font-bold mb-4">DiShui UI 示例</h1>
26
+
27
+ <div className="flex gap-2 mb-4">
28
+ <Button>默认按钮</Button>
29
+ <Button variant="primary">主要按钮</Button>
30
+ <Button variant="secondary">次要按钮</Button>
31
+ <Button variant="accent">强调按钮</Button>
32
+ </div>
33
+
34
+ <div className="flex gap-2">
35
+ <Badge>默认</Badge>
36
+ <Badge variant="primary">主要</Badge>
37
+ <Badge variant="secondary">次要</Badge>
38
+ <Badge variant="accent">强调</Badge>
39
+ </div>
77
40
  </div>
78
41
  );
79
42
  }
43
+
44
+ export default App;
80
45
  ```
81
46
 
82
- ## 本地开发
47
+ ### 可用组件
48
+
49
+ - Button - 按钮组件
50
+ - Badge - 徽章组件
51
+ - Input - 输入框组件
52
+ - Label - 标签组件
53
+ - 更多组件持续添加中...
54
+
55
+ ## 开发
83
56
 
84
57
  ```bash
85
58
  # 安装依赖
86
- pnpm install
59
+ npm install
87
60
 
88
61
  # 启动开发服务器
89
- pnpm dev
90
-
91
- # 构建组件库
92
- pnpm build
93
- ```
62
+ npm run dev
94
63
 
95
- ## 组件列表
64
+ # 构建库
65
+ npm run build
96
66
 
97
- - Button - 按钮组件
98
- - Badge - 徽章组件
99
- - 更多组件开发中...
67
+ # 发布到npm
68
+ npm run publish:npm
69
+ ```
100
70
 
101
71
  ## 许可证
102
72
 
103
- MIT
73
+ ISC
package/dist/dishui.es.js CHANGED
@@ -14,19 +14,19 @@ function me() {
14
14
  if (re) return Z;
15
15
  re = 1;
16
16
  var f = Symbol.for("react.transitional.element"), c = Symbol.for("react.fragment");
17
- function p(n, u, t) {
17
+ function p(s, u, r) {
18
18
  var C = null;
19
- if (t !== void 0 && (C = "" + t), u.key !== void 0 && (C = "" + u.key), "key" in u) {
20
- t = {};
19
+ if (r !== void 0 && (C = "" + r), u.key !== void 0 && (C = "" + u.key), "key" in u) {
20
+ r = {};
21
21
  for (var i in u)
22
- i !== "key" && (t[i] = u[i]);
23
- } else t = u;
24
- return u = t.ref, {
22
+ i !== "key" && (r[i] = u[i]);
23
+ } else r = u;
24
+ return u = r.ref, {
25
25
  $$typeof: f,
26
- type: n,
26
+ type: s,
27
27
  key: C,
28
28
  ref: u !== void 0 ? u : null,
29
- props: t
29
+ props: r
30
30
  };
31
31
  }
32
32
  return Z.Fragment = c, Z.jsx = p, Z.jsxs = p, Z;
@@ -74,14 +74,14 @@ function pe() {
74
74
  case $:
75
75
  return (e._context.displayName || "Context") + ".Consumer";
76
76
  case O:
77
- var s = e.render;
78
- return e = e.displayName, e || (e = s.displayName || s.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
77
+ var t = e.render;
78
+ return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
79
  case D:
80
- return s = e.displayName || null, s !== null ? s : f(e.type) || "Memo";
80
+ return t = e.displayName || null, t !== null ? t : f(e.type) || "Memo";
81
81
  case S:
82
- s = e._payload, e = e._init;
82
+ t = e._payload, e = e._init;
83
83
  try {
84
- return f(e(s));
84
+ return f(e(t));
85
85
  } catch {
86
86
  }
87
87
  }
@@ -93,27 +93,27 @@ function pe() {
93
93
  function p(e) {
94
94
  try {
95
95
  c(e);
96
- var s = !1;
96
+ var t = !1;
97
97
  } catch {
98
- s = !0;
98
+ t = !0;
99
99
  }
100
- if (s) {
101
- s = console;
102
- var l = s.error, b = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
100
+ if (t) {
101
+ t = console;
102
+ var l = t.error, b = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
103
  return l.call(
104
- s,
104
+ t,
105
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
106
  b
107
107
  ), c(e);
108
108
  }
109
109
  }
110
- function n(e) {
110
+ function s(e) {
111
111
  if (e === R) return "<>";
112
112
  if (typeof e == "object" && e !== null && e.$$typeof === S)
113
113
  return "<...>";
114
114
  try {
115
- var s = f(e);
116
- return s ? "<" + s + ">" : "<...>";
115
+ var t = f(e);
116
+ return t ? "<" + t + ">" : "<...>";
117
117
  } catch {
118
118
  return "<...>";
119
119
  }
@@ -122,21 +122,21 @@ function pe() {
122
122
  var e = E.A;
123
123
  return e === null ? null : e.getOwner();
124
124
  }
125
- function t() {
125
+ function r() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
128
  function C(e) {
129
129
  if (k.call(e, "key")) {
130
- var s = Object.getOwnPropertyDescriptor(e, "key").get;
131
- if (s && s.isReactWarning) return !1;
130
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
131
+ if (t && t.isReactWarning) return !1;
132
132
  }
133
133
  return e.key !== void 0;
134
134
  }
135
- function i(e, s) {
135
+ function i(e, t) {
136
136
  function l() {
137
137
  z || (z = !0, console.error(
138
138
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
- s
139
+ t
140
140
  ));
141
141
  }
142
142
  l.isReactWarning = !0, Object.defineProperty(e, "key", {
@@ -150,11 +150,11 @@ function pe() {
150
150
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
151
  )), e = this.props.ref, e !== void 0 ? e : null;
152
152
  }
153
- function v(e, s, l, b, N, h, _, A) {
153
+ function v(e, t, l, b, N, h, _, A) {
154
154
  return l = h.ref, e = {
155
155
  $$typeof: o,
156
156
  type: e,
157
- key: s,
157
+ key: t,
158
158
  props: h,
159
159
  _owner: N
160
160
  }, (l !== void 0 ? l : null) !== null ? Object.defineProperty(e, "ref", {
@@ -182,8 +182,8 @@ function pe() {
182
182
  value: A
183
183
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
184
184
  }
185
- function g(e, s, l, b, N, h, _, A) {
186
- var m = s.children;
185
+ function g(e, t, l, b, N, h, _, A) {
186
+ var m = t.children;
187
187
  if (m !== void 0)
188
188
  if (b)
189
189
  if (G(m)) {
@@ -195,9 +195,9 @@ function pe() {
195
195
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
196
196
  );
197
197
  else w(m);
198
- if (k.call(s, "key")) {
198
+ if (k.call(t, "key")) {
199
199
  m = f(e);
200
- var B = Object.keys(s).filter(function(ee) {
200
+ var B = Object.keys(t).filter(function(ee) {
201
201
  return ee !== "key";
202
202
  });
203
203
  b = 0 < B.length ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}", J[m + b] || (B = 0 < B.length ? "{" + B.join(": ..., ") + ": ...}" : "{}", console.error(
@@ -213,11 +213,11 @@ React keys must be passed directly to JSX without using spread:
213
213
  m
214
214
  ), J[m + b] = !0);
215
215
  }
216
- if (m = null, l !== void 0 && (p(l), m = "" + l), C(s) && (p(s.key), m = "" + s.key), "key" in s) {
216
+ if (m = null, l !== void 0 && (p(l), m = "" + l), C(t) && (p(t.key), m = "" + t.key), "key" in t) {
217
217
  l = {};
218
- for (var X in s)
219
- X !== "key" && (l[X] = s[X]);
220
- } else l = s;
218
+ for (var X in t)
219
+ X !== "key" && (l[X] = t[X]);
220
+ } else l = t;
221
221
  return m && i(
222
222
  l,
223
223
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
@@ -245,31 +245,31 @@ React keys must be passed directly to JSX without using spread:
245
245
  };
246
246
  var z, Y = {}, L = d["react-stack-bottom-frame"].bind(
247
247
  d,
248
- t
249
- )(), q = V(n(t)), J = {};
250
- Q.Fragment = R, Q.jsx = function(e, s, l, b, N) {
248
+ r
249
+ )(), q = V(s(r)), J = {};
250
+ Q.Fragment = R, Q.jsx = function(e, t, l, b, N) {
251
251
  var h = 1e4 > E.recentlyCreatedOwnerStacks++;
252
252
  return g(
253
253
  e,
254
- s,
254
+ t,
255
255
  l,
256
256
  !1,
257
257
  b,
258
258
  N,
259
259
  h ? Error("react-stack-top-frame") : L,
260
- h ? V(n(e)) : q
260
+ h ? V(s(e)) : q
261
261
  );
262
- }, Q.jsxs = function(e, s, l, b, N) {
262
+ }, Q.jsxs = function(e, t, l, b, N) {
263
263
  var h = 1e4 > E.recentlyCreatedOwnerStacks++;
264
264
  return g(
265
265
  e,
266
- s,
266
+ t,
267
267
  l,
268
268
  !0,
269
269
  b,
270
270
  N,
271
271
  h ? Error("react-stack-top-frame") : L,
272
- h ? V(n(e)) : q
272
+ h ? V(s(e)) : q
273
273
  );
274
274
  };
275
275
  }()), Q;
@@ -278,14 +278,14 @@ var ae;
278
278
  function be() {
279
279
  return ae || (ae = 1, process.env.NODE_ENV === "production" ? K.exports = me() : K.exports = pe()), K.exports;
280
280
  }
281
- var r = be();
281
+ var n = be();
282
282
  const he = ({
283
283
  children: f,
284
284
  variant: c = "primary",
285
285
  size: p = "md",
286
- outline: n = !1,
286
+ outline: s = !1,
287
287
  dash: u = !1,
288
- soft: t = !1,
288
+ soft: r = !1,
289
289
  active: C = !1,
290
290
  disabled: i = !1,
291
291
  wide: j = !1,
@@ -301,9 +301,9 @@ const he = ({
301
301
  P,
302
302
  M,
303
303
  $,
304
- n ? "btn-outline" : "",
304
+ s ? "btn-outline" : "",
305
305
  u ? "btn-dash" : "",
306
- t ? "btn-soft" : "",
306
+ r ? "btn-soft" : "",
307
307
  C ? "btn-active" : "",
308
308
  j ? "btn-wide" : "",
309
309
  v ? "btn-block" : "",
@@ -311,16 +311,16 @@ const he = ({
311
311
  w ? "btn-circle" : "",
312
312
  R
313
313
  ].filter(Boolean).join(" ");
314
- return /* @__PURE__ */ r.jsxs(
314
+ return /* @__PURE__ */ n.jsxs(
315
315
  "button",
316
316
  {
317
317
  className: E,
318
318
  disabled: i,
319
319
  onClick: a,
320
320
  children: [
321
- d && /* @__PURE__ */ r.jsx("span", { className: "mr-2", children: d }),
321
+ d && /* @__PURE__ */ n.jsx("span", { className: "mr-2", children: d }),
322
322
  f,
323
- o && /* @__PURE__ */ r.jsx("span", { className: "ml-2", children: o })
323
+ o && /* @__PURE__ */ n.jsx("span", { className: "ml-2", children: o })
324
324
  ]
325
325
  }
326
326
  );
@@ -328,20 +328,20 @@ const he = ({
328
328
  children: f,
329
329
  vertical: c = !1,
330
330
  className: p = "",
331
- rounded: n = "none",
331
+ rounded: s = "none",
332
332
  radius: u = "full",
333
- roundedStyle: t
333
+ roundedStyle: r
334
334
  }) => {
335
335
  const C = [
336
336
  "join",
337
337
  c ? "join-vertical" : "join-horizontal",
338
338
  p
339
- ].filter(Boolean).join(" "), i = n !== "none" ? "full" : u;
340
- return /* @__PURE__ */ r.jsx("div", { className: C, children: H.Children.map(f, (j, v) => {
339
+ ].filter(Boolean).join(" "), i = s !== "none" ? "full" : u;
340
+ return /* @__PURE__ */ n.jsx("div", { className: C, children: H.Children.map(f, (j, v) => {
341
341
  if (!H.isValidElement(j)) return j;
342
342
  const g = j, w = g.props.className || "", d = v === 0, o = v === H.Children.count(f) - 1;
343
343
  let a = "";
344
- t ? c ? n === "left" && d && t.top ? a = t.top : n === "right" && o && t.bottom ? a = t.bottom : n === "both" && (d && t.top && (a = t.top), o && t.bottom && (a = t.bottom)) : n === "left" && d && t.left ? a = t.left : n === "right" && o && t.right ? a = t.right : n === "both" && (d && t.left && (a = t.left), o && t.right && (a = t.right)) : c ? n === "left" && d ? a = `rounded-t-${i}` : n === "right" && o ? a = `rounded-b-${i}` : n === "both" && (d && (a = `rounded-t-${i}`), o && (a = `rounded-b-${i}`)) : n === "left" && d ? a = `rounded-l-${i}` : n === "right" && o ? a = `rounded-r-${i}` : n === "both" && (d && (a = `rounded-l-${i}`), o && (a = `rounded-r-${i}`));
344
+ r ? c ? (s === "left" || s === "top") && d && r.top ? a = r.top : (s === "right" || s === "bottom") && o && r.bottom ? a = r.bottom : s === "both" && (d && r.top && (a = r.top), o && r.bottom && (a = r.bottom)) : (s === "left" || s === "top") && d && r.left ? a = r.left : (s === "right" || s === "bottom") && o && r.right ? a = r.right : s === "both" && (d && r.left && (a = r.left), o && r.right && (a = r.right)) : c ? s === "left" || s === "top" ? d && (a = `rounded-t-${i}`) : s === "right" || s === "bottom" ? o && (a = `rounded-b-${i}`) : s === "both" && (d && (a = `rounded-t-${i}`), o && (a = `rounded-b-${i}`)) : s === "left" || s === "top" ? d && (a = `rounded-l-${i}`) : s === "right" || s === "bottom" ? o && (a = `rounded-r-${i}`) : s === "both" && (d && (a = `rounded-l-${i}`), o && (a = `rounded-r-${i}`));
345
345
  const R = `${w} join-item ${a}`.trim();
346
346
  return H.cloneElement(g, {
347
347
  className: R
@@ -361,7 +361,7 @@ const he = ({
361
361
  "border-base-300",
362
362
  c
363
363
  ].filter(Boolean).join(" ");
364
- return /* @__PURE__ */ r.jsx("div", { className: p, children: f });
364
+ return /* @__PURE__ */ n.jsx("div", { className: p, children: f });
365
365
  }, le = he;
366
366
  le.Group = xe;
367
367
  le.GroupSection = Ce;
@@ -369,24 +369,24 @@ const Ee = ({
369
369
  children: f,
370
370
  variant: c = "primary",
371
371
  size: p = "md",
372
- outline: n = !1,
372
+ outline: s = !1,
373
373
  className: u = ""
374
374
  }) => {
375
- const t = "badge", C = c ? `badge-${c}` : "", i = p ? `badge-${p}` : "", v = [
376
- t,
375
+ const r = "badge", C = c ? `badge-${c}` : "", i = p ? `badge-${p}` : "", v = [
376
+ r,
377
377
  C,
378
378
  i,
379
- n ? "badge-outline" : "",
379
+ s ? "badge-outline" : "",
380
380
  u
381
381
  ].filter(Boolean).join(" ");
382
- return /* @__PURE__ */ r.jsx("div", { className: v, children: f });
382
+ return /* @__PURE__ */ n.jsx("div", { className: v, children: f });
383
383
  }, je = ({
384
384
  placeholder: f,
385
385
  value: c,
386
386
  onChange: p,
387
- type: n = "text",
387
+ type: s = "text",
388
388
  variant: u,
389
- size: t = "md",
389
+ size: r = "md",
390
390
  disabled: C = !1,
391
391
  required: i = !1,
392
392
  label: j,
@@ -398,9 +398,9 @@ const Ee = ({
398
398
  validatorHint: a,
399
399
  validationRules: R = []
400
400
  }) => {
401
- const [P, M] = U(!1), [$, I] = U(""), [O, W] = U(null), [y, D] = U(!1), [S, F] = U([]), T = oe(null), E = n === "password" && P ? "text" : n, k = (h) => {
401
+ const [P, M] = U(!1), [$, I] = U(""), [O, W] = U(null), [y, D] = U(!1), [S, F] = U([]), T = oe(null), E = s === "password" && P ? "text" : s, k = (h) => {
402
402
  const _ = h.target.value;
403
- if (n === "password" && _.length > (c || "").length) {
403
+ if (s === "password" && _.length > (c || "").length) {
404
404
  const A = _.slice((c || "").length);
405
405
  I(A), setTimeout(() => {
406
406
  I("");
@@ -422,40 +422,40 @@ const Ee = ({
422
422
  };
423
423
  let L = "";
424
424
  o && O !== null && (L = O ? "input-success" : "input-error");
425
- const q = "input", J = u && !L ? `input-${u}` : "", e = t ? `input-${t}` : "", l = [
425
+ const q = "input", J = u && !L ? `input-${u}` : "", e = r ? `input-${r}` : "", l = [
426
426
  q,
427
427
  J,
428
428
  e,
429
429
  o ? "validator" : "",
430
430
  L,
431
431
  d
432
- ].filter(Boolean).join(" "), b = n === "password" && /* @__PURE__ */ r.jsx(
432
+ ].filter(Boolean).join(" "), b = s === "password" && /* @__PURE__ */ n.jsx(
433
433
  "span",
434
434
  {
435
435
  className: "cursor-pointer opacity-70 hover:opacity-100",
436
436
  onClick: V,
437
437
  children: P ? (
438
438
  // 眼睛关闭图标
439
- /* @__PURE__ */ r.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
440
- /* @__PURE__ */ r.jsx("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94" }),
441
- /* @__PURE__ */ r.jsx("path", { d: "M14.12 14.12a3 3 0 1 1-4.24-4.24" }),
442
- /* @__PURE__ */ r.jsx("path", { d: "M1 1l22 22" }),
443
- /* @__PURE__ */ r.jsx("path", { d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19" })
439
+ /* @__PURE__ */ n.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
440
+ /* @__PURE__ */ n.jsx("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94" }),
441
+ /* @__PURE__ */ n.jsx("path", { d: "M14.12 14.12a3 3 0 1 1-4.24-4.24" }),
442
+ /* @__PURE__ */ n.jsx("path", { d: "M1 1l22 22" }),
443
+ /* @__PURE__ */ n.jsx("path", { d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19" })
444
444
  ] })
445
445
  ) : (
446
446
  // 眼睛打开图标
447
- /* @__PURE__ */ r.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
448
- /* @__PURE__ */ r.jsx("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
449
- /* @__PURE__ */ r.jsx("circle", { cx: "12", cy: "12", r: "3" })
447
+ /* @__PURE__ */ n.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
448
+ /* @__PURE__ */ n.jsx("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
449
+ /* @__PURE__ */ n.jsx("circle", { cx: "12", cy: "12", r: "3" })
450
450
  ] })
451
451
  )
452
452
  }
453
- ), N = /* @__PURE__ */ r.jsx("div", { className: "validation-tooltip", children: S.length > 0 ? /* @__PURE__ */ r.jsx("ul", { className: "text-xs list-disc pl-4 py-1", children: S.map((h, _) => /* @__PURE__ */ r.jsx("li", { children: h }, _)) }) : a ? /* @__PURE__ */ r.jsx("p", { className: "text-xs py-1", children: a }) : null });
454
- return j || v || g || n === "password" ? /* @__PURE__ */ r.jsxs("div", { className: "relative", onMouseEnter: z, onMouseLeave: Y, children: [
455
- /* @__PURE__ */ r.jsxs("label", { className: l, children: [
456
- v && /* @__PURE__ */ r.jsx("span", { children: v }),
457
- j && /* @__PURE__ */ r.jsx("span", { children: j }),
458
- /* @__PURE__ */ r.jsx(
453
+ ), N = /* @__PURE__ */ n.jsx("div", { className: "validation-tooltip", children: S.length > 0 ? /* @__PURE__ */ n.jsx("ul", { className: "text-xs list-disc pl-4 py-1", children: S.map((h, _) => /* @__PURE__ */ n.jsx("li", { children: h }, _)) }) : a ? /* @__PURE__ */ n.jsx("p", { className: "text-xs py-1", children: a }) : null });
454
+ return j || v || g || s === "password" ? /* @__PURE__ */ n.jsxs("div", { className: "relative", onMouseEnter: z, onMouseLeave: Y, children: [
455
+ /* @__PURE__ */ n.jsxs("label", { className: l, children: [
456
+ v && /* @__PURE__ */ n.jsx("span", { children: v }),
457
+ j && /* @__PURE__ */ n.jsx("span", { children: j }),
458
+ /* @__PURE__ */ n.jsx(
459
459
  "input",
460
460
  {
461
461
  ref: T,
@@ -469,13 +469,13 @@ const Ee = ({
469
469
  pattern: w
470
470
  }
471
471
  ),
472
- n === "password" && $ && /* @__PURE__ */ r.jsx("span", { className: "password-recent absolute right-10 font-mono", children: $ }),
473
- n === "password" ? /* @__PURE__ */ r.jsx("span", { children: b }) : g ? /* @__PURE__ */ r.jsx("span", { children: g }) : null
472
+ s === "password" && $ && /* @__PURE__ */ n.jsx("span", { className: "password-recent absolute right-10 font-mono", children: $ }),
473
+ s === "password" ? /* @__PURE__ */ n.jsx("span", { children: b }) : g ? /* @__PURE__ */ n.jsx("span", { children: g }) : null
474
474
  ] }),
475
- o && a && !y && /* @__PURE__ */ r.jsx("p", { className: "validator-hint text-xs mt-1 opacity-70", children: a }),
476
- y && o && !O && /* @__PURE__ */ r.jsx("div", { className: "absolute z-10 mt-1 bg-base-200 border border-error rounded shadow-lg text-error px-3 py-1", children: N })
477
- ] }) : /* @__PURE__ */ r.jsxs("div", { className: "relative", onMouseEnter: z, onMouseLeave: Y, children: [
478
- /* @__PURE__ */ r.jsx(
475
+ o && a && !y && /* @__PURE__ */ n.jsx("p", { className: "validator-hint text-xs mt-1 opacity-70", children: a }),
476
+ y && o && !O && /* @__PURE__ */ n.jsx("div", { className: "absolute z-10 mt-1 bg-base-200 border border-error rounded shadow-lg text-error px-3 py-1", children: N })
477
+ ] }) : /* @__PURE__ */ n.jsxs("div", { className: "relative", onMouseEnter: z, onMouseLeave: Y, children: [
478
+ /* @__PURE__ */ n.jsx(
479
479
  "input",
480
480
  {
481
481
  ref: T,
@@ -489,16 +489,16 @@ const Ee = ({
489
489
  pattern: w
490
490
  }
491
491
  ),
492
- o && a && !y && /* @__PURE__ */ r.jsx("p", { className: "validator-hint text-xs mt-1 opacity-70", children: a }),
493
- y && o && !O && /* @__PURE__ */ r.jsx("div", { className: "absolute z-10 mt-1 bg-base-200 border border-error rounded shadow-lg text-error px-3 py-1", children: N })
492
+ o && a && !y && /* @__PURE__ */ n.jsx("p", { className: "validator-hint text-xs mt-1 opacity-70", children: a }),
493
+ y && o && !O && /* @__PURE__ */ n.jsx("div", { className: "absolute z-10 mt-1 bg-base-200 border border-error rounded shadow-lg text-error px-3 py-1", children: N })
494
494
  ] });
495
495
  }, ge = ({
496
496
  children: f,
497
497
  variant: c = "neutral",
498
498
  size: p = "md",
499
- outline: n = !1,
499
+ outline: s = !1,
500
500
  dash: u = !1,
501
- soft: t = !1,
501
+ soft: r = !1,
502
502
  bold: C = !1,
503
503
  italic: i = !1,
504
504
  underline: j = !1,
@@ -540,9 +540,9 @@ const Ee = ({
540
540
  V,
541
541
  z,
542
542
  L,
543
- n ? "border border-current px-2 py-1 rounded" : "",
543
+ s ? "border border-current px-2 py-1 rounded" : "",
544
544
  u ? "border border-dashed border-current px-2 py-1 rounded" : "",
545
- t ? "bg-opacity-10 bg-current px-2 py-1 rounded" : "",
545
+ r ? "bg-opacity-10 bg-current px-2 py-1 rounded" : "",
546
546
  C ? "font-bold" : "",
547
547
  i ? "italic" : "",
548
548
  j ? "underline" : "",
@@ -566,7 +566,7 @@ const Ee = ({
566
566
  ...g ? { maxWidth: g } : {},
567
567
  ...v ? { display: "inline-block", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } : {}
568
568
  }, fe = `${h} ${ie}`.trim();
569
- return /* @__PURE__ */ r.jsx(
569
+ return /* @__PURE__ */ n.jsx(
570
570
  "span",
571
571
  {
572
572
  className: fe,