dishui 0.0.2 → 0.0.4
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/dishui.es.js +97 -97
- package/dist/dishui.umd.js +3 -3
- package/dist/types/src/App.d.ts +3 -0
- package/dist/types/src/components/Badge/index.d.ts +10 -0
- package/dist/types/src/components/Button/index.d.ts +42 -0
- package/dist/types/src/components/Card/index.d.ts +38 -0
- package/dist/types/src/components/DataTable/DataTable.d.ts +78 -0
- package/dist/types/src/components/DataTable/Filters.d.ts +59 -0
- package/dist/types/src/components/DataTable/index.d.ts +16 -0
- package/dist/types/src/components/DataTable/utils.d.ts +56 -0
- package/dist/types/src/components/Demo/index.d.ts +10 -0
- package/dist/types/src/components/Input/index.d.ts +24 -0
- package/dist/types/src/components/Label/index.d.ts +36 -0
- package/dist/types/src/components/List/index.d.ts +38 -0
- package/dist/types/src/components/Select/index.d.ts +17 -0
- package/dist/types/src/components/Table/index.d.ts +56 -0
- package/dist/types/src/contexts/AppContext.d.ts +14 -0
- package/dist/types/src/index.d.ts +9 -0
- package/dist/types/src/index.routes.d.ts +7 -0
- package/dist/types/src/layouts/MainLayout.d.ts +6 -0
- package/dist/types/src/layouts/Navbar.d.ts +6 -0
- package/dist/types/src/layouts/Sidebar.d.ts +10 -0
- package/dist/types/src/main.d.ts +1 -0
- package/dist/types/src/pages/Home.d.ts +3 -0
- package/dist/types/src/pages/Home.en.d.ts +3 -0
- package/dist/types/src/pages/Home.zh.d.ts +3 -0
- package/dist/types/src/pages/components/Badge/index.d.ts +3 -0
- package/dist/types/src/pages/components/Badge/index.en.d.ts +3 -0
- package/dist/types/src/pages/components/Badge/index.zh.d.ts +3 -0
- package/dist/types/src/pages/components/Button/index.d.ts +3 -0
- package/dist/types/src/pages/components/Button/index.en.d.ts +3 -0
- package/dist/types/src/pages/components/Button/index.zh.d.ts +3 -0
- package/dist/types/src/pages/components/Card/index.d.ts +3 -0
- package/dist/types/src/pages/components/Card/index.en.d.ts +3 -0
- package/dist/types/src/pages/components/Card/index.zh.d.ts +3 -0
- package/dist/types/src/pages/components/DataTable/advanced.d.ts +3 -0
- package/dist/types/src/pages/components/DataTable/advanced.en.d.ts +3 -0
- package/dist/types/src/pages/components/DataTable/advanced.zh.d.ts +3 -0
- package/dist/types/src/pages/components/DataTable/advancedTreeTable.d.ts +3 -0
- package/dist/types/src/pages/components/DataTable/advancedTreeTable.en.d.ts +3 -0
- package/dist/types/src/pages/components/DataTable/advancedTreeTable.zh.d.ts +3 -0
- package/dist/types/src/pages/components/DataTable/index.d.ts +3 -0
- package/dist/types/src/pages/components/DataTable/index.en.d.ts +3 -0
- package/dist/types/src/pages/components/DataTable/index.zh.d.ts +3 -0
- package/dist/types/src/pages/components/Input/index.d.ts +3 -0
- package/dist/types/src/pages/components/Input/index.en.d.ts +3 -0
- package/dist/types/src/pages/components/Input/index.zh.d.ts +3 -0
- package/dist/types/src/pages/components/Label/index.d.ts +3 -0
- package/dist/types/src/pages/components/Label/index.en.d.ts +3 -0
- package/dist/types/src/pages/components/Label/index.zh.d.ts +3 -0
- package/dist/types/src/pages/components/List/index.d.ts +3 -0
- package/dist/types/src/pages/components/List/index.en.d.ts +3 -0
- package/dist/types/src/pages/components/List/index.zh.d.ts +3 -0
- package/dist/types/src/pages/components/Select/SelectExampleContent.d.ts +3 -0
- package/dist/types/src/pages/components/Select/index.d.ts +2 -0
- package/dist/types/src/pages/components/Select/index.en.d.ts +3 -0
- package/dist/types/src/pages/components/Select/index.zh.d.ts +3 -0
- package/dist/types/src/pages/components/Table/en.d.ts +3 -0
- package/dist/types/src/pages/components/Table/index.d.ts +3 -0
- package/dist/types/src/pages/components/Table/zh.d.ts +3 -0
- package/dist/types/src/pages/layouts/Sidebar/index.d.ts +3 -0
- package/dist/types/src/types/menu.d.ts +8 -0
- package/dist/types/src/utils/i18n.d.ts +25 -0
- package/dist/types/vite.config.d.mts +2 -0
- package/package.json +7 -3
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(
|
|
17
|
+
function p(s, u, r) {
|
|
18
18
|
var C = null;
|
|
19
|
-
if (
|
|
20
|
-
|
|
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" && (
|
|
23
|
-
} else
|
|
24
|
-
return u =
|
|
22
|
+
i !== "key" && (r[i] = u[i]);
|
|
23
|
+
} else r = u;
|
|
24
|
+
return u = r.ref, {
|
|
25
25
|
$$typeof: f,
|
|
26
|
-
type:
|
|
26
|
+
type: s,
|
|
27
27
|
key: C,
|
|
28
28
|
ref: u !== void 0 ? u : null,
|
|
29
|
-
props:
|
|
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
|
|
78
|
-
return e = e.displayName, e || (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
|
|
80
|
+
return t = e.displayName || null, t !== null ? t : f(e.type) || "Memo";
|
|
81
81
|
case S:
|
|
82
|
-
|
|
82
|
+
t = e._payload, e = e._init;
|
|
83
83
|
try {
|
|
84
|
-
return f(e(
|
|
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
|
|
96
|
+
var t = !1;
|
|
97
97
|
} catch {
|
|
98
|
-
|
|
98
|
+
t = !0;
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
var l =
|
|
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
|
-
|
|
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
|
|
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
|
|
116
|
-
return
|
|
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
|
|
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
|
|
131
|
-
if (
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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:
|
|
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,
|
|
186
|
-
var m =
|
|
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(
|
|
198
|
+
if (k.call(t, "key")) {
|
|
199
199
|
m = f(e);
|
|
200
|
-
var B = Object.keys(
|
|
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(
|
|
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
|
|
219
|
-
X !== "key" && (l[X] =
|
|
220
|
-
} else l =
|
|
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
|
-
|
|
249
|
-
)(), q = V(
|
|
250
|
-
Q.Fragment = R, Q.jsx = function(e,
|
|
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
|
-
|
|
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(
|
|
260
|
+
h ? V(s(e)) : q
|
|
261
261
|
);
|
|
262
|
-
}, Q.jsxs = function(e,
|
|
262
|
+
}, Q.jsxs = function(e, t, l, b, N) {
|
|
263
263
|
var h = 1e4 > E.recentlyCreatedOwnerStacks++;
|
|
264
264
|
return g(
|
|
265
265
|
e,
|
|
266
|
-
|
|
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(
|
|
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
|
|
281
|
+
var n = be();
|
|
282
282
|
const he = ({
|
|
283
283
|
children: f,
|
|
284
284
|
variant: c = "primary",
|
|
285
285
|
size: p = "md",
|
|
286
|
-
outline:
|
|
286
|
+
outline: s = !1,
|
|
287
287
|
dash: u = !1,
|
|
288
|
-
soft:
|
|
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
|
-
|
|
304
|
+
s ? "btn-outline" : "",
|
|
305
305
|
u ? "btn-dash" : "",
|
|
306
|
-
|
|
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__ */
|
|
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__ */
|
|
321
|
+
d && /* @__PURE__ */ n.jsx("span", { className: "mr-2", children: d }),
|
|
322
322
|
f,
|
|
323
|
-
o && /* @__PURE__ */
|
|
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:
|
|
331
|
+
rounded: s = "none",
|
|
332
332
|
radius: u = "full",
|
|
333
|
-
roundedStyle:
|
|
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 =
|
|
340
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
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__ */
|
|
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:
|
|
372
|
+
outline: s = !1,
|
|
373
373
|
className: u = ""
|
|
374
374
|
}) => {
|
|
375
|
-
const
|
|
376
|
-
|
|
375
|
+
const r = "badge", C = c ? `badge-${c}` : "", i = p ? `badge-${p}` : "", v = [
|
|
376
|
+
r,
|
|
377
377
|
C,
|
|
378
378
|
i,
|
|
379
|
-
|
|
379
|
+
s ? "badge-outline" : "",
|
|
380
380
|
u
|
|
381
381
|
].filter(Boolean).join(" ");
|
|
382
|
-
return /* @__PURE__ */
|
|
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:
|
|
387
|
+
type: s = "text",
|
|
388
388
|
variant: u,
|
|
389
|
-
size:
|
|
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 =
|
|
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 (
|
|
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 =
|
|
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 =
|
|
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__ */
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
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__ */
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
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__ */
|
|
454
|
-
return j || v || g ||
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
v && /* @__PURE__ */
|
|
457
|
-
j && /* @__PURE__ */
|
|
458
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
473
|
-
|
|
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__ */
|
|
476
|
-
y && o && !O && /* @__PURE__ */
|
|
477
|
-
] }) : /* @__PURE__ */
|
|
478
|
-
/* @__PURE__ */
|
|
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__ */
|
|
493
|
-
y && o && !O && /* @__PURE__ */
|
|
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:
|
|
499
|
+
outline: s = !1,
|
|
500
500
|
dash: u = !1,
|
|
501
|
-
soft:
|
|
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
|
-
|
|
543
|
+
s ? "border border-current px-2 py-1 rounded" : "",
|
|
544
544
|
u ? "border border-dashed border-current px-2 py-1 rounded" : "",
|
|
545
|
-
|
|
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__ */
|
|
569
|
+
return /* @__PURE__ */ n.jsx(
|
|
570
570
|
"span",
|
|
571
571
|
{
|
|
572
572
|
className: fe,
|
package/dist/dishui.umd.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var te;function le(){if(te)return J;te=1;var f=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function p(
|
|
9
|
+
*/var te;function le(){if(te)return J;te=1;var f=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function p(s,u,r){var v=null;if(r!==void 0&&(v=""+r),u.key!==void 0&&(v=""+u.key),"key"in u){r={};for(var c in u)c!=="key"&&(r[c]=u[c])}else r=u;return u=r.ref,{$$typeof:f,type:s,key:v,ref:u!==void 0?u:null,props:r}}return J.Fragment=i,J.jsx=p,J.jsxs=p,J}var X={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var re;function ie(){return re||(re=1,process.env.NODE_ENV!=="production"&&function(){function f(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case I:return"Profiler";case $:return"StrictMode";case q:return"Suspense";case M:return"SuspenseList";case z:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case a:return"Portal";case Y:return(e.displayName||"Context")+".Provider";case S:return(e._context.displayName||"Context")+".Consumer";case A:var
|
|
17
|
+
*/var re;function ie(){return re||(re=1,process.env.NODE_ENV!=="production"&&function(){function f(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case I:return"Profiler";case $:return"StrictMode";case q:return"Suspense";case M:return"SuspenseList";case z:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case a:return"Portal";case Y:return(e.displayName||"Context")+".Provider";case S:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:f(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return f(e(t))}catch{}}return null}function i(e){return""+e}function p(e){try{i(e);var t=!1}catch{t=!0}if(t){t=console;var l=t.error,b=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return l.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),i(e)}}function s(e){if(e===R)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===L)return"<...>";try{var t=f(e);return t?"<"+t+">":"<...>"}catch{return"<...>"}}function u(){var e=j.A;return e===null?null:e.getOwner()}function r(){return Error("react-stack-top-frame")}function v(e){if(N.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function l(){U||(U=!0,console.error("%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)",t))}l.isReactWarning=!0,Object.defineProperty(e,"key",{get:l,configurable:!0})}function g(){var e=f(this.type);return B[e]||(B[e]=!0,console.error("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.")),e=this.props.ref,e!==void 0?e:null}function E(e,t,l,b,O,h,k,P){return l=h.ref,e={$$typeof:o,type:e,key:t,props:h,_owner:O},(l!==void 0?l:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:g}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function w(e,t,l,b,O,h,k,P){var m=t.children;if(m!==void 0)if(b)if(G(m)){for(b=0;b<m.length;b++)T(m[b]);Object.freeze&&Object.freeze(m)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else T(m);if(N.call(t,"key")){m=f(e);var F=Object.keys(t).filter(function(se){return se!=="key"});b=0<F.length?"{key: someKey, "+F.join(": ..., ")+": ...}":"{key: someKey}",Q[m+b]||(F=0<F.length?"{"+F.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,b,m,F,m),Q[m+b]=!0)}if(m=null,l!==void 0&&(p(l),m=""+l),v(
|
|
22
|
+
<%s key={someKey} {...props} />`,b,m,F,m),Q[m+b]=!0)}if(m=null,l!==void 0&&(p(l),m=""+l),v(t)&&(p(t.key),m=""+t.key),"key"in t){l={};for(var H in t)H!=="key"&&(l[H]=t[H])}else l=t;return m&&c(l,typeof e=="function"?e.displayName||e.name||"Unknown":e),E(e,m,h,O,u(),l,k,P)}function T(e){typeof e=="object"&&e!==null&&e.$$typeof===o&&e._store&&(e._store.validated=1)}var d=x,o=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),j=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,G=Array.isArray,W=console.createTask?console.createTask:function(){return null};d={"react-stack-bottom-frame":function(e){return e()}};var U,B={},D=d["react-stack-bottom-frame"].bind(d,r)(),Z=W(s(r)),Q={};X.Fragment=R,X.jsx=function(e,t,l,b,O){var h=1e4>j.recentlyCreatedOwnerStacks++;return w(e,t,l,!1,b,O,h?Error("react-stack-top-frame"):D,h?W(s(e)):Z)},X.jsxs=function(e,t,l,b,O){var h=1e4>j.recentlyCreatedOwnerStacks++;return w(e,t,l,!0,b,O,h?Error("react-stack-top-frame"):D,h?W(s(e)):Z)}}()),X}var ne;function ce(){return ne||(ne=1,process.env.NODE_ENV==="production"?K.exports=le():K.exports=ie()),K.exports}var n=ce();const ue=({children:f,variant:i="primary",size:p="md",outline:s=!1,dash:u=!1,soft:r=!1,active:v=!1,disabled:c=!1,wide:g=!1,block:E=!1,square:w=!1,circle:T=!1,leftSection:d,rightSection:o,onClick:a,className:R=""})=>{const $="btn",I=i?`btn-${i}`:"",S=p?`btn-${p}`:"",j=[$,I,S,s?"btn-outline":"",u?"btn-dash":"",r?"btn-soft":"",v?"btn-active":"",g?"btn-wide":"",E?"btn-block":"",w?"btn-square":"",T?"btn-circle":"",R].filter(Boolean).join(" ");return n.jsxs("button",{className:j,disabled:c,onClick:a,children:[d&&n.jsx("span",{className:"mr-2",children:d}),f,o&&n.jsx("span",{className:"ml-2",children:o})]})},fe=({children:f,vertical:i=!1,className:p="",rounded:s="none",radius:u="full",roundedStyle:r})=>{const v=["join",i?"join-vertical":"join-horizontal",p].filter(Boolean).join(" "),c=s!=="none"?"full":u;return n.jsx("div",{className:v,children:x.Children.map(f,(g,E)=>{if(!x.isValidElement(g))return g;const w=g,T=w.props.className||"",d=E===0,o=E===x.Children.count(f)-1;let a="";r?i?(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)):i?s==="left"||s==="top"?d&&(a=`rounded-t-${c}`):s==="right"||s==="bottom"?o&&(a=`rounded-b-${c}`):s==="both"&&(d&&(a=`rounded-t-${c}`),o&&(a=`rounded-b-${c}`)):s==="left"||s==="top"?d&&(a=`rounded-l-${c}`):s==="right"||s==="bottom"?o&&(a=`rounded-r-${c}`):s==="both"&&(d&&(a=`rounded-l-${c}`),o&&(a=`rounded-r-${c}`));const R=`${T} join-item ${a}`.trim();return x.cloneElement(w,{className:R})})})},de=({children:f,className:i=""})=>{const p=["join-item","flex","items-center","px-4","bg-base-200","border","border-base-300",i].filter(Boolean).join(" ");return n.jsx("div",{className:p,children:f})},ee=ue;ee.Group=fe,ee.GroupSection=de;const me=({children:f,variant:i="primary",size:p="md",outline:s=!1,className:u=""})=>{const r="badge",v=i?`badge-${i}`:"",c=p?`badge-${p}`:"",E=[r,v,c,s?"badge-outline":"",u].filter(Boolean).join(" ");return n.jsx("div",{className:E,children:f})},pe=({placeholder:f,value:i,onChange:p,type:s="text",variant:u,size:r="md",disabled:v=!1,required:c=!1,label:g,leftSection:E,rightSection:w,pattern:T,className:d="",validator:o=!1,validatorHint:a,validationRules:R=[]})=>{const[$,I]=x.useState(!1),[S,Y]=x.useState(""),[A,q]=x.useState(null),[M,V]=x.useState(!1),[L,z]=x.useState([]),_=x.useRef(null),j=s==="password"&&$?"text":s,N=h=>{const k=h.target.value;if(s==="password"&&k.length>(i||"").length){const P=k.slice((i||"").length);Y(P),setTimeout(()=>{Y("")},1e3)}o&&_.current&&G(k),p&&p(h)},G=h=>{if(!_.current)return;const k=_.current.checkValidity(),P=[];R.length>0&&R.forEach(m=>{m.pattern.test(h)||P.push(m.message)}),z(P),q(k&&P.length===0)},W=()=>{I(!$)},U=()=>{o&&!A&&V(!0)},B=()=>{V(!1)};let D="";o&&A!==null&&(D=A?"input-success":"input-error");const Z="input",Q=u&&!D?`input-${u}`:"",e=r?`input-${r}`:"",l=[Z,Q,e,o?"validator":"",D,d].filter(Boolean).join(" "),b=s==="password"&&n.jsx("span",{className:"cursor-pointer opacity-70 hover:opacity-100",onClick:W,children:$?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:[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"}),n.jsx("path",{d:"M14.12 14.12a3 3 0 1 1-4.24-4.24"}),n.jsx("path",{d:"M1 1l22 22"}),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"})]}):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:[n.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),n.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),O=n.jsx("div",{className:"validation-tooltip",children:L.length>0?n.jsx("ul",{className:"text-xs list-disc pl-4 py-1",children:L.map((h,k)=>n.jsx("li",{children:h},k))}):a?n.jsx("p",{className:"text-xs py-1",children:a}):null});return g||E||w||s==="password"?n.jsxs("div",{className:"relative",onMouseEnter:U,onMouseLeave:B,children:[n.jsxs("label",{className:l,children:[E&&n.jsx("span",{children:E}),g&&n.jsx("span",{children:g}),n.jsx("input",{ref:_,type:j,placeholder:f,value:i,onChange:N,disabled:v,required:c,className:"grow",pattern:T}),s==="password"&&S&&n.jsx("span",{className:"password-recent absolute right-10 font-mono",children:S}),s==="password"?n.jsx("span",{children:b}):w?n.jsx("span",{children:w}):null]}),o&&a&&!M&&n.jsx("p",{className:"validator-hint text-xs mt-1 opacity-70",children:a}),M&&o&&!A&&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:O})]}):n.jsxs("div",{className:"relative",onMouseEnter:U,onMouseLeave:B,children:[n.jsx("input",{ref:_,type:j,placeholder:f,value:i,onChange:N,disabled:v,required:c,className:l,pattern:T}),o&&a&&!M&&n.jsx("p",{className:"validator-hint text-xs mt-1 opacity-70",children:a}),M&&o&&!A&&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:O})]})},be=({children:f,variant:i="neutral",size:p="md",outline:s=!1,dash:u=!1,soft:r=!1,bold:v=!1,italic:c=!1,underline:g=!1,ellipsis:E=!1,maxWidth:w,stateTimeout:T,styleConfig:d={},state:o,onStateChange:a,onClick:R,onDoubleClick:$,onMouseEnter:I,onMouseLeave:S,onDragStart:Y,onDragEnd:A,draggable:q=!1,className:M="",style:V={}})=>{var ae,oe;const[L,z]=x.useState("default"),_=o!==void 0?o:L,j=x.useRef(null),N=C=>{o===void 0&&z(C),a&&a(C),G(C)},G=(C=_)=>{j.current&&(clearTimeout(j.current),j.current=null),T&&C!=="default"&&o===void 0&&(j.current=setTimeout(()=>{z("default"),a&&a("default")},T))};x.useEffect(()=>(G(),()=>{j.current&&clearTimeout(j.current)}),[_,T,o]);const W="label",U=i?`text-${i}`:"",B={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},D=B[p]||B.md,h=[W,U,D,s?"border border-current px-2 py-1 rounded":"",u?"border border-dashed border-current px-2 py-1 rounded":"",r?"bg-opacity-10 bg-current px-2 py-1 rounded":"",v?"font-bold":"",c?"italic":"",g?"underline":"",E?"truncate":"",M].filter(Boolean).join(" "),k=C=>{N("clicked"),R&&R(C)},P=C=>{N("doubleClicked"),$&&$(C)},m=C=>{N("hover"),I&&I(C)},F=C=>{N("default"),S&&S(C)},H=C=>{N("dragging"),Y&&Y(C)},se=C=>{N("default"),A&&A(C)},he=((ae=d[_])==null?void 0:ae.style)||{},xe=((oe=d[_])==null?void 0:oe.className)||"",Ce={...V,...he,...w?{maxWidth:w}:{},...E?{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{}},ve=`${h} ${xe}`.trim();return n.jsx("span",{className:ve,style:Ce,onClick:k,onDoubleClick:P,onMouseEnter:m,onMouseLeave:F,onDragStart:H,onDragEnd:se,draggable:q,children:f})};y.Badge=me,y.Button=ee,y.Input=pe,y.Label=be,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type BadgeProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'ghost';
|
|
5
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
6
|
+
outline?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Badge: React.FC<BadgeProps>;
|
|
10
|
+
export default Badge;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ButtonProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
variant?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'ghost' | 'link';
|
|
5
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
outline?: boolean;
|
|
7
|
+
dash?: boolean;
|
|
8
|
+
soft?: boolean;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
wide?: boolean;
|
|
12
|
+
block?: boolean;
|
|
13
|
+
square?: boolean;
|
|
14
|
+
circle?: boolean;
|
|
15
|
+
leftSection?: React.ReactNode;
|
|
16
|
+
rightSection?: React.ReactNode;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
export type ButtonGroupProps = {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
vertical?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
rounded?: 'left' | 'right' | 'both' | 'none' | 'top' | 'bottom';
|
|
25
|
+
radius?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
26
|
+
roundedStyle?: {
|
|
27
|
+
left?: string;
|
|
28
|
+
right?: string;
|
|
29
|
+
top?: string;
|
|
30
|
+
bottom?: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type ButtonGroupSectionProps = {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
className?: string;
|
|
36
|
+
};
|
|
37
|
+
interface ButtonCompound extends React.FC<ButtonProps> {
|
|
38
|
+
Group: React.FC<ButtonGroupProps>;
|
|
39
|
+
GroupSection: React.FC<ButtonGroupSectionProps>;
|
|
40
|
+
}
|
|
41
|
+
declare const ButtonWithCompounds: ButtonCompound;
|
|
42
|
+
export default ButtonWithCompounds;
|