gemini-uis 0.6.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +251 -0
- package/dist/index.js +894 -319
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cloneElement, forwardRef, isValidElement, startTransition, useCallback, useEffect, useMemo, useState } from "react";
|
|
1
|
+
import { cloneElement, forwardRef, isValidElement, startTransition, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
const getVariantStyles = (e) => {
|
|
4
|
-
let
|
|
4
|
+
let t = {
|
|
5
5
|
primary: "bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",
|
|
6
6
|
default: "bg-white text-gray-700 hover:bg-gray-50 focus:ring-gray-500 border border-gray-300",
|
|
7
7
|
secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200 focus:ring-gray-500 border border-gray-300",
|
|
@@ -10,36 +10,36 @@ const getVariantStyles = (e) => {
|
|
|
10
10
|
text: "bg-transparent text-gray-700 focus:ring-gray-500",
|
|
11
11
|
danger: "bg-red-600 text-white hover:bg-red-700 focus:ring-red-500"
|
|
12
12
|
};
|
|
13
|
-
return
|
|
13
|
+
return t[e] || t.primary;
|
|
14
14
|
}, getSizeStyles = (e) => {
|
|
15
|
-
let
|
|
15
|
+
let t = {
|
|
16
16
|
xs: "px-2 py-1 text-xs min-h-[1.5rem]",
|
|
17
17
|
sm: "px-3 py-1.5 text-sm min-h-[2rem]",
|
|
18
18
|
md: "px-4 py-2 text-sm min-h-[2.5rem]",
|
|
19
19
|
lg: "px-6 py-3 text-base min-h-[3rem]",
|
|
20
20
|
xl: "px-8 py-4 text-lg min-h-[3.5rem]"
|
|
21
21
|
};
|
|
22
|
-
return
|
|
23
|
-
}, getRoundedStyles$2 = (e) => e ? "rounded-lg" : "rounded-none", getButtonStyles = (e = "primary",
|
|
22
|
+
return t[e] || t.md;
|
|
23
|
+
}, getRoundedStyles$2 = (e) => e ? "rounded-lg" : "rounded-none", getButtonStyles = (e = "primary", t = "md", n = !1, r = !1, i = !1, a) => [
|
|
24
24
|
"inline-flex gap-1 items-center justify-center font-medium text-center transition-all duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
|
|
25
25
|
getVariantStyles(e),
|
|
26
|
-
getSizeStyles(
|
|
27
|
-
getRoundedStyles$2(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
getSizeStyles(t),
|
|
27
|
+
getRoundedStyles$2(n),
|
|
28
|
+
r ? "opacity-50 cursor-not-allowed" : "",
|
|
29
|
+
i ? "cursor-wait" : "",
|
|
30
|
+
a
|
|
31
31
|
].filter(Boolean).join(" ").replace(/\s+/g, " ").trim();
|
|
32
32
|
function cn(...e) {
|
|
33
33
|
return e.filter(Boolean).join(" ");
|
|
34
34
|
}
|
|
35
|
-
var cn_default = cn, LoadingIcon_default = ({ width: e = 16, height:
|
|
35
|
+
var cn_default = cn, LoadingIcon_default = ({ width: e = 16, height: t = 16, className: n = "animate-spin", ...r }) => /* @__PURE__ */ jsxs("svg", {
|
|
36
36
|
width: e,
|
|
37
|
-
height:
|
|
37
|
+
height: t,
|
|
38
38
|
xmlns: "http://www.w3.org/2000/svg",
|
|
39
39
|
fill: "none",
|
|
40
40
|
viewBox: "0 0 24 24",
|
|
41
|
-
className:
|
|
42
|
-
...
|
|
41
|
+
className: n,
|
|
42
|
+
...r,
|
|
43
43
|
children: [/* @__PURE__ */ jsx("circle", {
|
|
44
44
|
className: "opacity-25",
|
|
45
45
|
cx: "12",
|
|
@@ -52,54 +52,54 @@ var cn_default = cn, LoadingIcon_default = ({ width: e = 16, height: b = 16, cla
|
|
|
52
52
|
fill: "currentColor",
|
|
53
53
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
54
54
|
})]
|
|
55
|
-
}), CloseIcon_default = ({ width: e = 6, height:
|
|
55
|
+
}), CloseIcon_default = ({ width: e = 6, height: t = 6, fill: n = "none", strokeWidth: r = 2, stroke: i = "currentColor", ...a }) => /* @__PURE__ */ jsx("svg", {
|
|
56
56
|
width: e,
|
|
57
|
-
height:
|
|
58
|
-
fill:
|
|
59
|
-
stroke:
|
|
57
|
+
height: t,
|
|
58
|
+
fill: n,
|
|
59
|
+
stroke: i,
|
|
60
60
|
viewBox: "0 0 24 24",
|
|
61
|
-
...
|
|
61
|
+
...a,
|
|
62
62
|
children: /* @__PURE__ */ jsx("path", {
|
|
63
63
|
strokeLinecap: "round",
|
|
64
64
|
strokeLinejoin: "round",
|
|
65
|
-
strokeWidth:
|
|
65
|
+
strokeWidth: r,
|
|
66
66
|
d: "M6 18L18 6M6 6l12 12"
|
|
67
67
|
})
|
|
68
|
-
}), ArrowIcon_default = ({ viewBox: e = "0 0 24 24", fill:
|
|
69
|
-
fill:
|
|
70
|
-
stroke:
|
|
68
|
+
}), ArrowIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", ...r }) => /* @__PURE__ */ jsx("svg", {
|
|
69
|
+
fill: t,
|
|
70
|
+
stroke: n,
|
|
71
71
|
viewBox: e,
|
|
72
|
-
...
|
|
72
|
+
...r,
|
|
73
73
|
children: /* @__PURE__ */ jsx("path", {
|
|
74
74
|
strokeLinecap: "round",
|
|
75
75
|
strokeLinejoin: "round",
|
|
76
76
|
strokeWidth: 2,
|
|
77
77
|
d: "M19 9l-7 7-7-7"
|
|
78
78
|
})
|
|
79
|
-
}), SearchIcon_default = ({ viewBox: e = "0 0 24 24", fill:
|
|
79
|
+
}), SearchIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", strokeWidth: r = "1.5", ...i }) => /* @__PURE__ */ jsxs("svg", {
|
|
80
80
|
viewBox: e,
|
|
81
|
-
fill:
|
|
82
|
-
stroke:
|
|
83
|
-
strokeWidth:
|
|
84
|
-
...
|
|
81
|
+
fill: t,
|
|
82
|
+
stroke: n,
|
|
83
|
+
strokeWidth: r,
|
|
84
|
+
...i,
|
|
85
85
|
children: [/* @__PURE__ */ jsx("circle", {
|
|
86
86
|
cx: "11",
|
|
87
87
|
cy: "11",
|
|
88
88
|
r: "8"
|
|
89
89
|
}), /* @__PURE__ */ jsx("path", { d: "m21 21-4.35-4.35" })]
|
|
90
|
-
}), FolderIcon_default = ({ viewBox: e = "0 0 24 24", fill:
|
|
90
|
+
}), FolderIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", strokeWidth: r = "1.5", ...i }) => /* @__PURE__ */ jsx("svg", {
|
|
91
91
|
viewBox: e,
|
|
92
|
-
fill:
|
|
93
|
-
stroke:
|
|
94
|
-
strokeWidth:
|
|
95
|
-
...
|
|
92
|
+
fill: t,
|
|
93
|
+
stroke: n,
|
|
94
|
+
strokeWidth: r,
|
|
95
|
+
...i,
|
|
96
96
|
children: /* @__PURE__ */ jsx("path", { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" })
|
|
97
|
-
}), DocumentIcon_default = ({ viewBox: e = "0 0 24 24", fill:
|
|
97
|
+
}), DocumentIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", strokeWidth: r = "1.5", ...i }) => /* @__PURE__ */ jsxs("svg", {
|
|
98
98
|
viewBox: e,
|
|
99
|
-
fill:
|
|
100
|
-
stroke:
|
|
101
|
-
strokeWidth:
|
|
102
|
-
...
|
|
99
|
+
fill: t,
|
|
100
|
+
stroke: n,
|
|
101
|
+
strokeWidth: r,
|
|
102
|
+
...i,
|
|
103
103
|
children: [
|
|
104
104
|
/* @__PURE__ */ jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
105
105
|
/* @__PURE__ */ jsx("polyline", { points: "14,2 14,8 20,8" }),
|
|
@@ -117,12 +117,12 @@ var cn_default = cn, LoadingIcon_default = ({ width: e = 16, height: b = 16, cla
|
|
|
117
117
|
}),
|
|
118
118
|
/* @__PURE__ */ jsx("polyline", { points: "10,9 9,9 8,9" })
|
|
119
119
|
]
|
|
120
|
-
}), UsersIcon_default = ({ viewBox: e = "0 0 24 24", fill:
|
|
120
|
+
}), UsersIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", strokeWidth: r = "1.5", ...i }) => /* @__PURE__ */ jsxs("svg", {
|
|
121
121
|
viewBox: e,
|
|
122
|
-
fill:
|
|
123
|
-
stroke:
|
|
124
|
-
strokeWidth:
|
|
125
|
-
...
|
|
122
|
+
fill: t,
|
|
123
|
+
stroke: n,
|
|
124
|
+
strokeWidth: r,
|
|
125
|
+
...i,
|
|
126
126
|
children: [
|
|
127
127
|
/* @__PURE__ */ jsx("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
128
128
|
/* @__PURE__ */ jsx("circle", {
|
|
@@ -133,34 +133,34 @@ var cn_default = cn, LoadingIcon_default = ({ width: e = 16, height: b = 16, cla
|
|
|
133
133
|
/* @__PURE__ */ jsx("path", { d: "m22 21-2-2" }),
|
|
134
134
|
/* @__PURE__ */ jsx("path", { d: "m16 16 2 2" })
|
|
135
135
|
]
|
|
136
|
-
}), SettingsIcon_default = ({ viewBox: e = "0 0 24 24", fill:
|
|
136
|
+
}), SettingsIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", strokeWidth: r = "1.5", ...i }) => /* @__PURE__ */ jsxs("svg", {
|
|
137
137
|
viewBox: e,
|
|
138
|
-
fill:
|
|
139
|
-
stroke:
|
|
140
|
-
strokeWidth:
|
|
141
|
-
...
|
|
138
|
+
fill: t,
|
|
139
|
+
stroke: n,
|
|
140
|
+
strokeWidth: r,
|
|
141
|
+
...i,
|
|
142
142
|
children: [/* @__PURE__ */ jsx("circle", {
|
|
143
143
|
cx: "12",
|
|
144
144
|
cy: "12",
|
|
145
145
|
r: "3"
|
|
146
146
|
}), /* @__PURE__ */ jsx("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })]
|
|
147
|
-
}), WarningIcon_default = ({ viewBox: e = "0 0 24 24", fill:
|
|
147
|
+
}), WarningIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", strokeWidth: r = "1.5", ...i }) => /* @__PURE__ */ jsxs("svg", {
|
|
148
148
|
viewBox: e,
|
|
149
|
-
fill:
|
|
150
|
-
stroke:
|
|
151
|
-
strokeWidth:
|
|
152
|
-
...
|
|
149
|
+
fill: t,
|
|
150
|
+
stroke: n,
|
|
151
|
+
strokeWidth: r,
|
|
152
|
+
...i,
|
|
153
153
|
children: [/* @__PURE__ */ jsx("circle", {
|
|
154
154
|
cx: "12",
|
|
155
155
|
cy: "12",
|
|
156
156
|
r: "3"
|
|
157
157
|
}), /* @__PURE__ */ jsx("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })]
|
|
158
|
-
}), InfoIcon_default = ({ viewBox: e = "0 0 24 24", fill:
|
|
158
|
+
}), InfoIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", strokeWidth: r = "1.5", ...i }) => /* @__PURE__ */ jsxs("svg", {
|
|
159
159
|
viewBox: e,
|
|
160
|
-
fill:
|
|
161
|
-
stroke:
|
|
162
|
-
strokeWidth:
|
|
163
|
-
...
|
|
160
|
+
fill: t,
|
|
161
|
+
stroke: n,
|
|
162
|
+
strokeWidth: r,
|
|
163
|
+
...i,
|
|
164
164
|
children: [
|
|
165
165
|
/* @__PURE__ */ jsx("circle", {
|
|
166
166
|
cx: "12",
|
|
@@ -180,33 +180,168 @@ var cn_default = cn, LoadingIcon_default = ({ width: e = 16, height: b = 16, cla
|
|
|
180
180
|
y2: "8"
|
|
181
181
|
})
|
|
182
182
|
]
|
|
183
|
-
}), SuccessIcon_default = ({ viewBox: e = "0 0 24 24", fill:
|
|
183
|
+
}), SuccessIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", strokeWidth: r = "1.5", ...i }) => /* @__PURE__ */ jsxs("svg", {
|
|
184
184
|
viewBox: e,
|
|
185
|
-
fill:
|
|
186
|
-
stroke:
|
|
187
|
-
strokeWidth:
|
|
188
|
-
...
|
|
185
|
+
fill: t,
|
|
186
|
+
stroke: n,
|
|
187
|
+
strokeWidth: r,
|
|
188
|
+
...i,
|
|
189
189
|
children: [/* @__PURE__ */ jsx("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }), /* @__PURE__ */ jsx("polyline", { points: "22,4 12,14.01 9,11.01" })]
|
|
190
|
-
}),
|
|
191
|
-
|
|
190
|
+
}), ErrorIcon_default = ({ viewBox: e = "0 0 24 24", fill: t = "none", stroke: n = "currentColor", strokeWidth: r = "1.5", ...i }) => /* @__PURE__ */ jsxs("svg", {
|
|
191
|
+
viewBox: e,
|
|
192
|
+
fill: t,
|
|
193
|
+
stroke: n,
|
|
194
|
+
strokeWidth: r,
|
|
195
|
+
...i,
|
|
196
|
+
children: [
|
|
197
|
+
/* @__PURE__ */ jsx("circle", {
|
|
198
|
+
cx: "12",
|
|
199
|
+
cy: "12",
|
|
200
|
+
r: "10"
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ jsx("line", {
|
|
203
|
+
x1: "15",
|
|
204
|
+
y1: "9",
|
|
205
|
+
x2: "9",
|
|
206
|
+
y2: "15"
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ jsx("line", {
|
|
209
|
+
x1: "9",
|
|
210
|
+
y1: "9",
|
|
211
|
+
x2: "15",
|
|
212
|
+
y2: "15"
|
|
213
|
+
})
|
|
214
|
+
]
|
|
215
|
+
}), PrevIcon_default = ({ width: e = 12, height: t = 12, viewBox: n = "0 0 12 12", fill: r = "currentColor", ...i }) => /* @__PURE__ */ jsx("svg", {
|
|
216
|
+
width: e,
|
|
217
|
+
height: t,
|
|
218
|
+
viewBox: n,
|
|
219
|
+
fill: r,
|
|
220
|
+
...i,
|
|
221
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
222
|
+
d: "M7.5 9L4.5 6L7.5 3",
|
|
223
|
+
stroke: "currentColor",
|
|
224
|
+
strokeWidth: "1.5",
|
|
225
|
+
strokeLinecap: "round",
|
|
226
|
+
strokeLinejoin: "round",
|
|
227
|
+
fill: "none"
|
|
228
|
+
})
|
|
229
|
+
}), NextIcon_default = ({ width: e = 12, height: t = 12, viewBox: n = "0 0 12 12", fill: r = "currentColor", ...i }) => /* @__PURE__ */ jsx("svg", {
|
|
230
|
+
width: e,
|
|
231
|
+
height: t,
|
|
232
|
+
viewBox: n,
|
|
233
|
+
fill: r,
|
|
234
|
+
...i,
|
|
235
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
236
|
+
d: "M4.5 3L7.5 6L4.5 9",
|
|
237
|
+
stroke: "currentColor",
|
|
238
|
+
strokeWidth: "1.5",
|
|
239
|
+
strokeLinecap: "round",
|
|
240
|
+
strokeLinejoin: "round",
|
|
241
|
+
fill: "none"
|
|
242
|
+
})
|
|
243
|
+
}), FirstIcon_default = ({ viewBox: e = "0 0 12 12", fill: t = "currentColor", width: n = 12, height: r = 12, ...i }) => /* @__PURE__ */ jsx("svg", {
|
|
244
|
+
width: n,
|
|
245
|
+
height: r,
|
|
246
|
+
viewBox: e,
|
|
247
|
+
fill: t,
|
|
248
|
+
...i,
|
|
249
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
250
|
+
d: "M3 3L3 9M6 3L6 9M9 3L9 9",
|
|
251
|
+
stroke: "currentColor",
|
|
252
|
+
strokeWidth: "1.5",
|
|
253
|
+
strokeLinecap: "round",
|
|
254
|
+
strokeLinejoin: "round",
|
|
255
|
+
fill: "none"
|
|
256
|
+
})
|
|
257
|
+
}), LastIcon_default = ({ viewBox: e = "0 0 12 12", fill: t = "currentColor", width: n = 12, height: r = 12, ...i }) => /* @__PURE__ */ jsx("svg", {
|
|
258
|
+
width: n,
|
|
259
|
+
height: r,
|
|
260
|
+
viewBox: e,
|
|
261
|
+
fill: t,
|
|
262
|
+
...i,
|
|
263
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
264
|
+
d: "M3 3L3 9M6 3L6 9M9 3L9 9",
|
|
265
|
+
stroke: "currentColor",
|
|
266
|
+
strokeWidth: "1.5",
|
|
267
|
+
strokeLinecap: "round",
|
|
268
|
+
strokeLinejoin: "round",
|
|
269
|
+
fill: "none"
|
|
270
|
+
})
|
|
271
|
+
}), JumpPrevIcon_default = ({ viewBox: e = "0 0 12 12", fill: t = "currentColor", width: n = 12, height: r = 12, ...i }) => /* @__PURE__ */ jsx("svg", {
|
|
272
|
+
width: n,
|
|
273
|
+
height: r,
|
|
274
|
+
viewBox: e,
|
|
275
|
+
fill: t,
|
|
276
|
+
...i,
|
|
277
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
278
|
+
d: "M3 3L3 9M6 3L6 9M9 3L9 9",
|
|
279
|
+
stroke: "currentColor",
|
|
280
|
+
strokeWidth: "1.5",
|
|
281
|
+
strokeLinecap: "round",
|
|
282
|
+
strokeLinejoin: "round",
|
|
283
|
+
fill: "none"
|
|
284
|
+
})
|
|
285
|
+
}), JumpNextIcon_default = ({ viewBox: e = "0 0 12 12", fill: t = "currentColor", width: n = 12, height: r = 12, ...i }) => /* @__PURE__ */ jsx("svg", {
|
|
286
|
+
width: n,
|
|
287
|
+
height: r,
|
|
288
|
+
viewBox: e,
|
|
289
|
+
fill: t,
|
|
290
|
+
...i,
|
|
291
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
292
|
+
d: "M3 3L3 9M6 3L6 9M9 3L9 9",
|
|
293
|
+
stroke: "currentColor",
|
|
294
|
+
strokeWidth: "1.5",
|
|
295
|
+
strokeLinecap: "round",
|
|
296
|
+
strokeLinejoin: "round",
|
|
297
|
+
fill: "none"
|
|
298
|
+
})
|
|
299
|
+
}), ChevronLeftIcon_default = ({ width: e = 20, height: t = 20, viewBox: n = "0 0 24 24", fill: r = "none", stroke: i = "currentColor", ...a }) => /* @__PURE__ */ jsx("svg", {
|
|
300
|
+
width: e,
|
|
301
|
+
height: t,
|
|
302
|
+
fill: r,
|
|
303
|
+
stroke: i,
|
|
304
|
+
viewBox: n,
|
|
305
|
+
...a,
|
|
306
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
307
|
+
strokeLinecap: "round",
|
|
308
|
+
strokeLinejoin: "round",
|
|
309
|
+
strokeWidth: 2,
|
|
310
|
+
d: "M15 19l-7-7 7-7"
|
|
311
|
+
})
|
|
312
|
+
}), ChevronRightIcon_default = ({ width: e = 20, height: t = 20, viewBox: n = "0 0 24 24", fill: r = "none", stroke: i = "currentColor", ...a }) => /* @__PURE__ */ jsx("svg", {
|
|
313
|
+
width: e,
|
|
314
|
+
height: t,
|
|
315
|
+
fill: r,
|
|
316
|
+
stroke: i,
|
|
317
|
+
viewBox: n,
|
|
318
|
+
...a,
|
|
319
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
320
|
+
strokeLinecap: "round",
|
|
321
|
+
strokeLinejoin: "round",
|
|
322
|
+
strokeWidth: 2,
|
|
323
|
+
d: "M9 5l7 7-7 7"
|
|
324
|
+
})
|
|
325
|
+
}), Button_default = forwardRef(({ type: e = "primary", size: t = "md", rounded: n = !1, disabled: r = !1, loading: i = !1, className: a, children: o, htmlType: s = "button", onClick: c, ...l }, u) => {
|
|
326
|
+
let d = r || i;
|
|
192
327
|
return /* @__PURE__ */ jsxs("button", {
|
|
193
|
-
ref:
|
|
194
|
-
type:
|
|
195
|
-
disabled:
|
|
328
|
+
ref: u,
|
|
329
|
+
type: s,
|
|
330
|
+
disabled: d,
|
|
196
331
|
onClick: (e) => {
|
|
197
|
-
if (
|
|
332
|
+
if (d) {
|
|
198
333
|
e.preventDefault();
|
|
199
334
|
return;
|
|
200
335
|
}
|
|
201
|
-
|
|
336
|
+
c?.(e);
|
|
202
337
|
},
|
|
203
|
-
className: cn_default(getButtonStyles(e,
|
|
204
|
-
...
|
|
205
|
-
children: [
|
|
338
|
+
className: cn_default(getButtonStyles(e, t, n, d, i, a)),
|
|
339
|
+
...l,
|
|
340
|
+
children: [i && /* @__PURE__ */ jsx(LoadingIcon_default, { className: "animate-spin" }), o]
|
|
206
341
|
});
|
|
207
342
|
});
|
|
208
343
|
const getShadowStyles = (e) => {
|
|
209
|
-
let
|
|
344
|
+
let t = {
|
|
210
345
|
none: "",
|
|
211
346
|
sm: "shadow-sm",
|
|
212
347
|
md: "shadow-md",
|
|
@@ -214,9 +349,9 @@ const getShadowStyles = (e) => {
|
|
|
214
349
|
xl: "shadow-xl",
|
|
215
350
|
"2xl": "shadow-2xl"
|
|
216
351
|
};
|
|
217
|
-
return
|
|
352
|
+
return t[e] || t.none;
|
|
218
353
|
}, getBorderStyles = (e) => {
|
|
219
|
-
let
|
|
354
|
+
let t = {
|
|
220
355
|
none: "",
|
|
221
356
|
sm: "border border-gray-200",
|
|
222
357
|
md: "border-2 border-gray-200",
|
|
@@ -224,113 +359,113 @@ const getShadowStyles = (e) => {
|
|
|
224
359
|
xl: "border-8 border-gray-200",
|
|
225
360
|
"2xl": "border-16 border-gray-200"
|
|
226
361
|
};
|
|
227
|
-
return
|
|
228
|
-
}, getRoundedStyles$1 = (e) => e ? "rounded-lg" : "rounded-none", getHoverStyles = (e = !1) => e ? "" : "hover:shadow-xl hover:scale-101 hover:-translate-y-1 hover:translate-x-1 origin-bottom-left", getCardStyles = (e = "none",
|
|
229
|
-
let
|
|
362
|
+
return t[e] || t.none;
|
|
363
|
+
}, getRoundedStyles$1 = (e) => e ? "rounded-lg" : "rounded-none", getHoverStyles = (e = !1) => e ? "" : "hover:shadow-xl hover:scale-101 hover:-translate-y-1 hover:translate-x-1 origin-bottom-left", getCardStyles = (e = "none", t = "none", n = !1, r = !1, i) => {
|
|
364
|
+
let a = getShadowStyles(e), o = getBorderStyles(t), s = getRoundedStyles$1(n), c = getHoverStyles(r);
|
|
230
365
|
return [
|
|
231
366
|
"block p-4 bg-white transition-all duration-300 ease-in-out cursor-pointer",
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
367
|
+
i && /\bw-\w+/.test(i) ? "" : "w-full",
|
|
368
|
+
a,
|
|
369
|
+
o,
|
|
370
|
+
s,
|
|
371
|
+
c,
|
|
372
|
+
i
|
|
238
373
|
].filter(Boolean).join(" ").replace(/\s+/g, " ").trim();
|
|
239
374
|
};
|
|
240
|
-
var Card_default = forwardRef(({ shadow: e = "md", border:
|
|
241
|
-
ref:
|
|
242
|
-
className: cn_default(getCardStyles(e,
|
|
243
|
-
...
|
|
244
|
-
children:
|
|
375
|
+
var Card_default = forwardRef(({ shadow: e = "md", border: t = "sm", rounded: n = !1, disabledHover: r = !1, className: i, children: a, ...o }, s) => /* @__PURE__ */ jsx("div", {
|
|
376
|
+
ref: s,
|
|
377
|
+
className: cn_default(getCardStyles(e, t, n, r, i)),
|
|
378
|
+
...o,
|
|
379
|
+
children: a
|
|
245
380
|
}));
|
|
246
381
|
const getCollapseSizeStyles = (e) => {
|
|
247
|
-
let
|
|
382
|
+
let t = {
|
|
248
383
|
sm: "text-sm",
|
|
249
384
|
md: "text-base",
|
|
250
385
|
lg: "text-lg"
|
|
251
386
|
};
|
|
252
|
-
return
|
|
253
|
-
}, getCollapseVariantStyles = (e,
|
|
387
|
+
return t[e] || t.md;
|
|
388
|
+
}, getCollapseVariantStyles = (e, t, n) => n ? "bg-transparent" : t || e === "bordered" ? "border border-gray-200 rounded-lg overflow-hidden" : "bg-white rounded-lg", getCollapseStyles = (e = "md", t = "default", n = !1, r = !1, i) => [
|
|
254
389
|
"w-full",
|
|
255
390
|
getCollapseSizeStyles(e),
|
|
256
|
-
getCollapseVariantStyles(
|
|
257
|
-
|
|
391
|
+
getCollapseVariantStyles(t, n, r),
|
|
392
|
+
i
|
|
258
393
|
].filter(Boolean).join(" ").replace(/\s+/g, " ").trim();
|
|
259
|
-
var DefaultArrowIcon = ({ isActive: e, disabled:
|
|
260
|
-
let [
|
|
261
|
-
let e =
|
|
394
|
+
var DefaultArrowIcon = ({ isActive: e, disabled: t }) => /* @__PURE__ */ jsx(ArrowIcon_default, { className: cn_default("shrink-0 size-4 transition-transform duration-200 ease-in-out", e ? "rotate-180" : "rotate-0", t ? "opacity-50" : "") }), CollapseCore = forwardRef(({ activeKey: t, defaultActiveKey: r, collapsible: a = "header", accordion: o = !1, bordered: c = !1, ghost: u = !1, size: Le = "md", variant: d = "default", className: f, children: p, onChange: m, onExpand: h, onCollapse: _, ...v }, y) => {
|
|
395
|
+
let [b, x] = useState(() => {
|
|
396
|
+
let e = t || r;
|
|
262
397
|
return Array.isArray(e) ? e : e ? [e] : [];
|
|
263
|
-
}),
|
|
264
|
-
if (
|
|
265
|
-
let
|
|
266
|
-
|
|
398
|
+
}), S = useMemo(() => t === void 0 ? b : Array.isArray(t) ? t : [t], [t, b]), C = useCallback((e) => {
|
|
399
|
+
if (a === "disabled") return;
|
|
400
|
+
let n;
|
|
401
|
+
n = o ? S.includes(e) ? [] : [e] : S.includes(e) ? S.filter((t) => t !== e) : [...S, e], t === void 0 && x(n), m?.(o ? n[0] || "" : n), n.includes(e) ? h?.(e) : _?.(e);
|
|
267
402
|
}, [
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
]),
|
|
276
|
-
if (!isValidElement(
|
|
277
|
-
let { ...
|
|
278
|
-
return cloneElement(
|
|
279
|
-
...
|
|
280
|
-
isActive:
|
|
281
|
-
onToggle: () =>
|
|
282
|
-
collapsible:
|
|
403
|
+
t,
|
|
404
|
+
S,
|
|
405
|
+
o,
|
|
406
|
+
a,
|
|
407
|
+
m,
|
|
408
|
+
h,
|
|
409
|
+
_
|
|
410
|
+
]), w = getCollapseStyles(Le, d, c, u, f), T = useMemo(() => p ? Array.isArray(p) ? p.map((t, r) => {
|
|
411
|
+
if (!isValidElement(t)) return t;
|
|
412
|
+
let { ...i } = t.props, o = t.key || String(r), s = S.includes(o);
|
|
413
|
+
return cloneElement(t, {
|
|
414
|
+
...i,
|
|
415
|
+
isActive: s,
|
|
416
|
+
onToggle: () => C(o),
|
|
417
|
+
collapsible: a
|
|
283
418
|
});
|
|
284
|
-
}) : isValidElement(
|
|
285
|
-
...
|
|
286
|
-
isActive:
|
|
287
|
-
onToggle: () =>
|
|
288
|
-
collapsible:
|
|
289
|
-
}) :
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
419
|
+
}) : isValidElement(p) ? cloneElement(p, {
|
|
420
|
+
...p.props,
|
|
421
|
+
isActive: S.includes(p.key || "filter"),
|
|
422
|
+
onToggle: () => C(p.key || "filter"),
|
|
423
|
+
collapsible: a
|
|
424
|
+
}) : p : null, [
|
|
425
|
+
p,
|
|
426
|
+
S,
|
|
427
|
+
C,
|
|
428
|
+
a
|
|
294
429
|
]);
|
|
295
430
|
return /* @__PURE__ */ jsx("div", {
|
|
296
|
-
ref:
|
|
297
|
-
className: cn_default(
|
|
298
|
-
...
|
|
299
|
-
children:
|
|
431
|
+
ref: y,
|
|
432
|
+
className: cn_default(w),
|
|
433
|
+
...v,
|
|
434
|
+
children: T
|
|
300
435
|
});
|
|
301
|
-
}), CollapsePanel = forwardRef(({ key: e, header:
|
|
302
|
-
let
|
|
303
|
-
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
},
|
|
307
|
-
className: cn_default("shrink-0 transition-transform duration-200 ease-in-out",
|
|
308
|
-
onClick:
|
|
309
|
-
children:
|
|
436
|
+
}), CollapsePanel = forwardRef(({ key: e, header: t, children: n, disabled: r = !1, showArrow: i = !0, arrow: a, className: o, headerContainerClassName: s, headerContentClassName: c, contentClassName: l, onHeaderClick: u, isActive: d = !1, onToggle: f, collapsible: p = "header", ...m }, h) => {
|
|
437
|
+
let _ = () => {
|
|
438
|
+
r || p === "disabled" || (u?.(e), f?.());
|
|
439
|
+
}, v = (e) => {
|
|
440
|
+
p !== "header" && (e.stopPropagation(), r || f?.());
|
|
441
|
+
}, y = () => i ? a ? /* @__PURE__ */ jsx("span", {
|
|
442
|
+
className: cn_default("shrink-0 transition-transform duration-200 ease-in-out", d ? "rotate-180" : "rotate-0", r ? "opacity-50" : "", p === "icon" ? "cursor-pointer" : ""),
|
|
443
|
+
onClick: v,
|
|
444
|
+
children: a
|
|
310
445
|
}) : /* @__PURE__ */ jsx(DefaultArrowIcon, {
|
|
311
|
-
isActive:
|
|
312
|
-
disabled:
|
|
446
|
+
isActive: d,
|
|
447
|
+
disabled: r
|
|
313
448
|
}) : null;
|
|
314
449
|
return /* @__PURE__ */ jsxs("div", {
|
|
315
|
-
ref:
|
|
316
|
-
className: cn_default("border-b border-gray-200 last:border-b-0",
|
|
317
|
-
...
|
|
450
|
+
ref: h,
|
|
451
|
+
className: cn_default("border-b border-gray-200 last:border-b-0", o),
|
|
452
|
+
...m,
|
|
318
453
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
319
|
-
className: cn_default("flex items-center justify-between w-full text-left font-medium transition-colors duration-200", "px-4 py-3",
|
|
320
|
-
onClick:
|
|
321
|
-
tabIndex:
|
|
454
|
+
className: cn_default("flex items-center justify-between w-full text-left font-medium transition-colors duration-200", "px-4 py-3", r ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:bg-gray-50", "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset", s),
|
|
455
|
+
onClick: _,
|
|
456
|
+
tabIndex: r ? -1 : 0,
|
|
322
457
|
role: "button",
|
|
323
|
-
"aria-expanded":
|
|
324
|
-
"aria-disabled":
|
|
458
|
+
"aria-expanded": d,
|
|
459
|
+
"aria-disabled": r,
|
|
325
460
|
children: [/* @__PURE__ */ jsx("div", {
|
|
326
|
-
className: cn_default("flex-1 pr-2",
|
|
327
|
-
children:
|
|
328
|
-
}),
|
|
461
|
+
className: cn_default("flex-1 pr-2", c),
|
|
462
|
+
children: t
|
|
463
|
+
}), y()]
|
|
329
464
|
}), /* @__PURE__ */ jsx("div", {
|
|
330
|
-
className: cn_default("overflow-hidden transition-all duration-300 ease-in-out",
|
|
465
|
+
className: cn_default("overflow-hidden transition-all duration-300 ease-in-out", d ? "max-h-none opacity-100" : "max-h-0 opacity-0"),
|
|
331
466
|
children: /* @__PURE__ */ jsx("div", {
|
|
332
|
-
className: cn_default("px-4 pb-4 text-gray-700",
|
|
333
|
-
children:
|
|
467
|
+
className: cn_default("px-4 pb-4 text-gray-700", l),
|
|
468
|
+
children: n
|
|
334
469
|
})
|
|
335
470
|
})]
|
|
336
471
|
});
|
|
@@ -340,144 +475,144 @@ var Collapse_default = Object.assign(CollapseCore, { Panel: CollapsePanel });
|
|
|
340
475
|
const getOrientationStyles = (e) => ({
|
|
341
476
|
horizontal: "w-full h-0",
|
|
342
477
|
vertical: "h-full w-0"
|
|
343
|
-
})[e], getThicknessStyles = (e,
|
|
344
|
-
thin:
|
|
345
|
-
medium:
|
|
346
|
-
thick:
|
|
347
|
-
"extra-thick":
|
|
348
|
-
})[e], getRoundedStyles = (e) => e ? "rounded-full" : "rounded-none", getColorStyles = (e) => e ? `bg-[${e}]` : "bg-gray-200", getDashedStyles = (e) => e ? "border-dashed" : "border-solid", getLengthStyles = (e,
|
|
478
|
+
})[e], getThicknessStyles = (e, t) => ({
|
|
479
|
+
thin: t === "horizontal" ? "h-px" : "w-px",
|
|
480
|
+
medium: t === "horizontal" ? "h-0.5" : "w-0.5",
|
|
481
|
+
thick: t === "horizontal" ? "h-1" : "w-1",
|
|
482
|
+
"extra-thick": t === "horizontal" ? "h-1.5" : "w-1.5"
|
|
483
|
+
})[e], getRoundedStyles = (e) => e ? "rounded-full" : "rounded-none", getColorStyles = (e) => e ? `bg-[${e}]` : "bg-gray-200", getDashedStyles = (e) => e ? "border-dashed" : "border-solid", getLengthStyles = (e, t = "horizontal") => e && t === "horizontal" ? `w-[${e}%]` : "", getDividerStyles = (e = "horizontal", t = "medium", n = !1, r, i = !1, a, o) => o ? ["block", o].filter(Boolean).join(" ").trim() : [
|
|
349
484
|
e === "vertical" ? "bg-gray-200" : "border-0",
|
|
350
485
|
getOrientationStyles(e),
|
|
351
|
-
getThicknessStyles(
|
|
352
|
-
getRoundedStyles(
|
|
353
|
-
getColorStyles(
|
|
354
|
-
getDashedStyles(
|
|
355
|
-
getLengthStyles(
|
|
486
|
+
getThicknessStyles(t, e),
|
|
487
|
+
getRoundedStyles(n),
|
|
488
|
+
getColorStyles(r),
|
|
489
|
+
getDashedStyles(i),
|
|
490
|
+
getLengthStyles(a, e)
|
|
356
491
|
].filter(Boolean).join(" ").replace(/\s+/g, " ").trim();
|
|
357
|
-
var Divider_default = forwardRef(({ orientation: e = "horizontal", thickness:
|
|
358
|
-
ref:
|
|
359
|
-
className: cn_default(getDividerStyles(e,
|
|
360
|
-
...
|
|
492
|
+
var Divider_default = forwardRef(({ orientation: e = "horizontal", thickness: t = "medium", rounded: n = !1, color: r, dashed: i = !1, length: a, className: o, ...s }, c) => /* @__PURE__ */ jsx("div", {
|
|
493
|
+
ref: c,
|
|
494
|
+
className: cn_default(getDividerStyles(e, t, n ?? !1, r, i, a, o), o),
|
|
495
|
+
...s
|
|
361
496
|
}));
|
|
362
497
|
const getDrawerPlacementStyles = (e) => {
|
|
363
|
-
let
|
|
498
|
+
let t = {
|
|
364
499
|
top: "top-0 left-0 right-0",
|
|
365
500
|
right: "top-0 right-0 bottom-0",
|
|
366
501
|
bottom: "bottom-0 left-0 right-0",
|
|
367
502
|
left: "top-0 left-0 bottom-0"
|
|
368
503
|
};
|
|
369
|
-
return
|
|
370
|
-
}, getDrawerSizeStyles = (e,
|
|
371
|
-
let
|
|
504
|
+
return t[e] || t.right;
|
|
505
|
+
}, getDrawerSizeStyles = (e, t) => {
|
|
506
|
+
let n = t === "left" || t === "right";
|
|
372
507
|
if (e === "full") return "w-screen h-screen";
|
|
373
|
-
let
|
|
374
|
-
sm:
|
|
375
|
-
md:
|
|
376
|
-
lg:
|
|
508
|
+
let r = {
|
|
509
|
+
sm: n ? "w-64" : "h-64",
|
|
510
|
+
md: n ? "w-96" : "h-96",
|
|
511
|
+
lg: n ? "w-[46rem]" : "h-[46rem]"
|
|
377
512
|
};
|
|
378
|
-
return
|
|
379
|
-
}, getDrawerTransformStyles = (e,
|
|
380
|
-
if (
|
|
381
|
-
let
|
|
513
|
+
return r[e] || r.md;
|
|
514
|
+
}, getDrawerTransformStyles = (e, t) => {
|
|
515
|
+
if (t) return "translate-x-0 translate-y-0";
|
|
516
|
+
let n = {
|
|
382
517
|
top: "-translate-y-full",
|
|
383
518
|
right: "translate-x-full",
|
|
384
519
|
bottom: "translate-y-full",
|
|
385
520
|
left: "-translate-x-full"
|
|
386
521
|
};
|
|
387
|
-
return
|
|
388
|
-
}, getDrawerStyles = (e,
|
|
522
|
+
return n[e] || n.right;
|
|
523
|
+
}, getDrawerStyles = (e, t, n, r) => [
|
|
389
524
|
"fixed bg-white shadow-xl transition-transform duration-300 ease-out z-50 flex flex-col will-change-transform",
|
|
390
525
|
getDrawerPlacementStyles(e),
|
|
391
|
-
getDrawerSizeStyles(
|
|
392
|
-
getDrawerTransformStyles(e,
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
].filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), getMaskStyles = (e,
|
|
526
|
+
getDrawerSizeStyles(t, e),
|
|
527
|
+
getDrawerTransformStyles(e, n),
|
|
528
|
+
n ? "pointer-events-auto" : "pointer-events-none",
|
|
529
|
+
r
|
|
530
|
+
].filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), getMaskStyles = (e, t) => [
|
|
396
531
|
"fixed inset-0 h-screen bg-black/50 transition-opacity duration-300 ease-out z-40",
|
|
397
532
|
e ? "opacity-100" : "opacity-0",
|
|
398
533
|
e ? "pointer-events-auto" : "pointer-events-none",
|
|
399
|
-
|
|
534
|
+
t
|
|
400
535
|
].filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), getHeaderStyles = (e) => ["flex items-center justify-between px-6 py-4 border-b border-gray-200 flex-shrink-0", e].filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), getBodyStyles = (e) => ["min-h-0 flex-1 overflow-y-auto", e].filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), getFooterStyles = (e) => ["flex items-center justify-end px-6 py-4 border-t border-gray-200 flex-shrink-0 gap-2", e].filter(Boolean).join(" ").replace(/\s+/g, " ").trim();
|
|
401
|
-
var DefaultCloseIcon = () => /* @__PURE__ */ jsx(CloseIcon_default, { className: "w-5 h-5" }), Drawer_default = forwardRef(({ open: e = !1, title:
|
|
402
|
-
let [
|
|
536
|
+
var DefaultCloseIcon = () => /* @__PURE__ */ jsx(CloseIcon_default, { className: "w-5 h-5" }), Drawer_default = forwardRef(({ open: e = !1, title: t, placement: n = "right", size: o = "md", mask: s = !0, maskClosable: c = !0, closable: d = !0, closeIcon: f, destroyOnClose: p = !1, className: m, maskClassName: h, bodyClassName: _, headerClassName: v, footerClassName: y, children: b, footer: x, extra: S, onClose: C, afterOpenChange: w, zIndex: T = 1e3, ...E }, D) => {
|
|
537
|
+
let [O, k] = useState(e), [A, j] = useState(!1);
|
|
403
538
|
useEffect(() => {
|
|
404
539
|
if (e) startTransition(() => {
|
|
405
|
-
|
|
540
|
+
k(!0);
|
|
406
541
|
}), requestAnimationFrame(() => {
|
|
407
542
|
requestAnimationFrame(() => {
|
|
408
|
-
|
|
543
|
+
j(!0);
|
|
409
544
|
});
|
|
410
545
|
});
|
|
411
546
|
else {
|
|
412
547
|
startTransition(() => {
|
|
413
|
-
|
|
548
|
+
j(!1);
|
|
414
549
|
});
|
|
415
550
|
let e = setTimeout(() => {
|
|
416
|
-
|
|
551
|
+
k(!1);
|
|
417
552
|
}, 300);
|
|
418
553
|
return () => clearTimeout(e);
|
|
419
554
|
}
|
|
420
555
|
}, [e]), useEffect(() => {
|
|
421
556
|
if (!e) return;
|
|
422
|
-
let
|
|
423
|
-
e.key === "Escape" &&
|
|
557
|
+
let t = (e) => {
|
|
558
|
+
e.key === "Escape" && C && C();
|
|
424
559
|
};
|
|
425
|
-
return document.addEventListener("keydown",
|
|
426
|
-
}, [e,
|
|
427
|
-
let
|
|
428
|
-
|
|
429
|
-
}, [
|
|
430
|
-
|
|
431
|
-
}, [
|
|
560
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
561
|
+
}, [e, C]);
|
|
562
|
+
let M = useCallback(() => {
|
|
563
|
+
c && C && C();
|
|
564
|
+
}, [c, C]), N = useCallback(() => {
|
|
565
|
+
C && C();
|
|
566
|
+
}, [C]);
|
|
432
567
|
return useEffect(() => {
|
|
433
|
-
|
|
434
|
-
}, [e,
|
|
568
|
+
w && w(e);
|
|
569
|
+
}, [e, w]), useEffect(() => {
|
|
435
570
|
if (!e) return;
|
|
436
|
-
let
|
|
437
|
-
|
|
438
|
-
let
|
|
439
|
-
return window.addEventListener("touchmove",
|
|
440
|
-
window.removeEventListener("touchmove",
|
|
571
|
+
let t = window.scrollY || 0, { style: n } = document.body, { style: r } = document.documentElement;
|
|
572
|
+
n.position = "fixed", n.top = `-${t}px`, n.left = "0", n.right = "0", n.width = "100%", n.overflow = "hidden", r.overflow = "hidden", r.overscrollBehavior = "none";
|
|
573
|
+
let i = (e) => e.preventDefault();
|
|
574
|
+
return window.addEventListener("touchmove", i, { passive: !1 }), window.addEventListener("wheel", i, { passive: !1 }), () => {
|
|
575
|
+
window.removeEventListener("touchmove", i), window.removeEventListener("wheel", i), n.position = "", n.top = "", n.left = "", n.right = "", n.width = "", n.overflow = "", r.overflow = "", r.overscrollBehavior = "", window.scrollTo(0, t);
|
|
441
576
|
};
|
|
442
|
-
}, [e]), !
|
|
443
|
-
className: cn_default(getMaskStyles(
|
|
444
|
-
style: { zIndex:
|
|
445
|
-
onClick:
|
|
577
|
+
}, [e]), !O && p || !O ? null : /* @__PURE__ */ jsxs(Fragment, { children: [s && /* @__PURE__ */ jsx("div", {
|
|
578
|
+
className: cn_default(getMaskStyles(A, h)),
|
|
579
|
+
style: { zIndex: T - 1 },
|
|
580
|
+
onClick: M,
|
|
446
581
|
"aria-hidden": "true"
|
|
447
582
|
}), /* @__PURE__ */ jsxs("div", {
|
|
448
|
-
ref:
|
|
449
|
-
className: cn_default(getDrawerStyles(
|
|
583
|
+
ref: D,
|
|
584
|
+
className: cn_default(getDrawerStyles(n, o, A, m)),
|
|
450
585
|
style: {
|
|
451
|
-
zIndex:
|
|
452
|
-
height:
|
|
586
|
+
zIndex: T,
|
|
587
|
+
height: o === "full" && (n === "left" || n === "right") ? "100vh" : void 0
|
|
453
588
|
},
|
|
454
589
|
role: "dialog",
|
|
455
590
|
"aria-modal": "true",
|
|
456
|
-
"aria-labelledby":
|
|
457
|
-
...
|
|
591
|
+
"aria-labelledby": t ? "drawer-title" : void 0,
|
|
592
|
+
...E,
|
|
458
593
|
children: [
|
|
459
|
-
(
|
|
460
|
-
className: cn_default(getHeaderStyles(
|
|
594
|
+
(t || d || S) && /* @__PURE__ */ jsxs("div", {
|
|
595
|
+
className: cn_default(getHeaderStyles(v)),
|
|
461
596
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
462
597
|
className: "flex items-center gap-4 flex-1",
|
|
463
|
-
children: [
|
|
598
|
+
children: [t && /* @__PURE__ */ jsx("h2", {
|
|
464
599
|
id: "drawer-title",
|
|
465
600
|
className: "text-lg font-semibold text-gray-900 flex-1",
|
|
466
|
-
children:
|
|
467
|
-
}),
|
|
601
|
+
children: t
|
|
602
|
+
}), S && /* @__PURE__ */ jsx("div", {
|
|
468
603
|
className: "flex items-center gap-2",
|
|
469
|
-
children:
|
|
604
|
+
children: S
|
|
470
605
|
})]
|
|
471
|
-
}),
|
|
606
|
+
}), d && /* @__PURE__ */ jsx("button", {
|
|
472
607
|
type: "button",
|
|
473
|
-
onClick:
|
|
608
|
+
onClick: N,
|
|
474
609
|
className: "p-2 rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2",
|
|
475
610
|
"aria-label": "关闭抽屉",
|
|
476
|
-
children:
|
|
611
|
+
children: f || /* @__PURE__ */ jsx(DefaultCloseIcon, {})
|
|
477
612
|
})]
|
|
478
613
|
}),
|
|
479
614
|
/* @__PURE__ */ jsx("div", {
|
|
480
|
-
className: cn_default(getBodyStyles(
|
|
615
|
+
className: cn_default(getBodyStyles(_), "min-h-0 flex-1 overflow-y-auto"),
|
|
481
616
|
style: { overscrollBehavior: "contain" },
|
|
482
617
|
onWheel: (e) => {
|
|
483
618
|
e.stopPropagation();
|
|
@@ -485,16 +620,16 @@ var DefaultCloseIcon = () => /* @__PURE__ */ jsx(CloseIcon_default, { className:
|
|
|
485
620
|
onTouchMove: (e) => {
|
|
486
621
|
e.stopPropagation();
|
|
487
622
|
},
|
|
488
|
-
children:
|
|
623
|
+
children: b
|
|
489
624
|
}),
|
|
490
|
-
|
|
491
|
-
className: cn_default(getFooterStyles(
|
|
492
|
-
children:
|
|
625
|
+
x && /* @__PURE__ */ jsx("div", {
|
|
626
|
+
className: cn_default(getFooterStyles(y)),
|
|
627
|
+
children: x
|
|
493
628
|
})
|
|
494
629
|
]
|
|
495
630
|
})] });
|
|
496
631
|
});
|
|
497
|
-
function getEmptyStateStyles(e = "md",
|
|
632
|
+
function getEmptyStateStyles(e = "md", t = "default", n) {
|
|
498
633
|
return cn_default("flex flex-col items-center justify-center text-center", {
|
|
499
634
|
sm: "py-8 px-4",
|
|
500
635
|
md: "py-12 px-6",
|
|
@@ -503,7 +638,7 @@ function getEmptyStateStyles(e = "md", b = "default", x) {
|
|
|
503
638
|
default: "bg-gray-50 rounded-lg",
|
|
504
639
|
minimal: "bg-transparent",
|
|
505
640
|
card: "bg-white border border-gray-200 rounded-lg shadow-sm"
|
|
506
|
-
}[
|
|
641
|
+
}[t], n);
|
|
507
642
|
}
|
|
508
643
|
function getIconContainerStyles(e = "md") {
|
|
509
644
|
return cn_default("flex items-center justify-center text-gray-400", {
|
|
@@ -529,75 +664,49 @@ function getDescriptionStyles(e = "md") {
|
|
|
529
664
|
function getActionStyles() {
|
|
530
665
|
return "mt-2";
|
|
531
666
|
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
/* @__PURE__ */ jsx(
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}),
|
|
544
|
-
/* @__PURE__ */ jsx("line", {
|
|
545
|
-
x1: "15",
|
|
546
|
-
y1: "9",
|
|
547
|
-
x2: "9",
|
|
548
|
-
y2: "15"
|
|
549
|
-
}),
|
|
550
|
-
/* @__PURE__ */ jsx("line", {
|
|
551
|
-
x1: "9",
|
|
552
|
-
y1: "9",
|
|
553
|
-
x2: "15",
|
|
554
|
-
y2: "15"
|
|
555
|
-
})
|
|
556
|
-
]
|
|
557
|
-
});
|
|
558
|
-
function EmptyStateIcon({ type: e, className: b }) {
|
|
559
|
-
let x = {
|
|
560
|
-
search: /* @__PURE__ */ jsx(SearchIcon_default, { className: b }),
|
|
561
|
-
folder: /* @__PURE__ */ jsx(FolderIcon_default, { className: b }),
|
|
562
|
-
document: /* @__PURE__ */ jsx(DocumentIcon_default, { className: b }),
|
|
563
|
-
users: /* @__PURE__ */ jsx(UsersIcon_default, { className: b }),
|
|
564
|
-
settings: /* @__PURE__ */ jsx(SettingsIcon_default, { className: b }),
|
|
565
|
-
warning: /* @__PURE__ */ jsx(WarningIcon_default, { className: b }),
|
|
566
|
-
info: /* @__PURE__ */ jsx(InfoIcon_default, { className: b }),
|
|
567
|
-
success: /* @__PURE__ */ jsx(SuccessIcon_default, { className: b }),
|
|
568
|
-
error: /* @__PURE__ */ jsx(ErrorIcon_default, { className: b })
|
|
667
|
+
function EmptyStateIcon({ type: e, className: t }) {
|
|
668
|
+
let n = {
|
|
669
|
+
search: /* @__PURE__ */ jsx(SearchIcon_default, { className: t }),
|
|
670
|
+
folder: /* @__PURE__ */ jsx(FolderIcon_default, { className: t }),
|
|
671
|
+
document: /* @__PURE__ */ jsx(DocumentIcon_default, { className: t }),
|
|
672
|
+
users: /* @__PURE__ */ jsx(UsersIcon_default, { className: t }),
|
|
673
|
+
settings: /* @__PURE__ */ jsx(SettingsIcon_default, { className: t }),
|
|
674
|
+
warning: /* @__PURE__ */ jsx(WarningIcon_default, { className: t }),
|
|
675
|
+
info: /* @__PURE__ */ jsx(InfoIcon_default, { className: t }),
|
|
676
|
+
success: /* @__PURE__ */ jsx(SuccessIcon_default, { className: t }),
|
|
677
|
+
error: /* @__PURE__ */ jsx(ErrorIcon_default, { className: t })
|
|
569
678
|
};
|
|
570
|
-
return
|
|
679
|
+
return n[e] || n.search;
|
|
571
680
|
}
|
|
572
|
-
var EmptyState_default = forwardRef(({ icon: e = "search", title:
|
|
573
|
-
let
|
|
574
|
-
className:
|
|
681
|
+
var EmptyState_default = forwardRef(({ icon: e = "search", title: t, description: n, action: r, size: i = "md", variant: a = "default", className: o, showIcon: s = !0, style: c, ...l }, u) => {
|
|
682
|
+
let d = getEmptyStateStyles(i, a, o), f = getIconContainerStyles(i), p = getTitleStyles(i), m = getDescriptionStyles(i), h = getActionStyles(), g = () => s ? typeof e == "string" ? /* @__PURE__ */ jsx("div", {
|
|
683
|
+
className: f,
|
|
575
684
|
children: /* @__PURE__ */ jsx(EmptyStateIcon, {
|
|
576
685
|
type: e,
|
|
577
686
|
className: "w-full h-full"
|
|
578
687
|
})
|
|
579
688
|
}) : /* @__PURE__ */ jsx("div", {
|
|
580
|
-
className:
|
|
689
|
+
className: f,
|
|
581
690
|
children: e
|
|
582
691
|
}) : null;
|
|
583
692
|
return /* @__PURE__ */ jsxs("div", {
|
|
584
|
-
ref:
|
|
585
|
-
className:
|
|
586
|
-
style:
|
|
587
|
-
...
|
|
693
|
+
ref: u,
|
|
694
|
+
className: d,
|
|
695
|
+
style: c,
|
|
696
|
+
...l,
|
|
588
697
|
children: [
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
className:
|
|
592
|
-
children:
|
|
698
|
+
g(),
|
|
699
|
+
t && /* @__PURE__ */ jsx("h3", {
|
|
700
|
+
className: p,
|
|
701
|
+
children: t
|
|
593
702
|
}),
|
|
594
|
-
|
|
595
|
-
className:
|
|
596
|
-
children:
|
|
703
|
+
n && /* @__PURE__ */ jsx("p", {
|
|
704
|
+
className: m,
|
|
705
|
+
children: n
|
|
597
706
|
}),
|
|
598
|
-
|
|
599
|
-
className:
|
|
600
|
-
children:
|
|
707
|
+
r && /* @__PURE__ */ jsx("div", {
|
|
708
|
+
className: h,
|
|
709
|
+
children: r
|
|
601
710
|
})
|
|
602
711
|
]
|
|
603
712
|
});
|
|
@@ -621,23 +730,23 @@ function getLoaderSize(e) {
|
|
|
621
730
|
function getTextSize(e) {
|
|
622
731
|
return TEXT_SIZE_MAP[e];
|
|
623
732
|
}
|
|
624
|
-
var Loading_default = ({ size: e = "md", variant:
|
|
733
|
+
var Loading_default = ({ size: e = "md", variant: t = "spinner", text: n, showText: r = !1, fullscreen: i = !1, className: o }) => {
|
|
625
734
|
useEffect(() => {
|
|
626
|
-
if (!
|
|
627
|
-
let e = document.body.style.overflow,
|
|
628
|
-
return document.body.style.overflow = "hidden",
|
|
629
|
-
document.body.style.overflow = e, document.body.style.paddingRight =
|
|
735
|
+
if (!i) return;
|
|
736
|
+
let e = document.body.style.overflow, t = document.body.style.paddingRight, n = window.innerWidth - document.documentElement.clientWidth;
|
|
737
|
+
return document.body.style.overflow = "hidden", n > 0 && (document.body.style.paddingRight = `${n}px`), () => {
|
|
738
|
+
document.body.style.overflow = e, document.body.style.paddingRight = t;
|
|
630
739
|
};
|
|
631
|
-
}, [
|
|
632
|
-
let
|
|
633
|
-
className: cn_default("flex flex-col items-center justify-center gap-4",
|
|
740
|
+
}, [i]);
|
|
741
|
+
let s = /* @__PURE__ */ jsxs("div", {
|
|
742
|
+
className: cn_default("flex flex-col items-center justify-center gap-4", i ? "min-h-screen" : "py-8", o),
|
|
634
743
|
children: [(() => {
|
|
635
|
-
let
|
|
636
|
-
switch (
|
|
744
|
+
let n = getLoaderSize(e);
|
|
745
|
+
switch (t) {
|
|
637
746
|
case "spinner": return /* @__PURE__ */ jsxs("div", {
|
|
638
747
|
className: "relative",
|
|
639
|
-
children: [/* @__PURE__ */ jsx("div", { className: cn_default("rounded-full border-4 border-gray-200",
|
|
640
|
-
className: cn_default("absolute inset-0 rounded-full border-4 border-transparent border-t-blue-600 animate-spin",
|
|
748
|
+
children: [/* @__PURE__ */ jsx("div", { className: cn_default("rounded-full border-4 border-gray-200", n) }), /* @__PURE__ */ jsx("div", {
|
|
749
|
+
className: cn_default("absolute inset-0 rounded-full border-4 border-transparent border-t-blue-600 animate-spin", n),
|
|
641
750
|
style: { animationDuration: "0.8s" }
|
|
642
751
|
})]
|
|
643
752
|
});
|
|
@@ -645,21 +754,21 @@ var Loading_default = ({ size: e = "md", variant: b = "spinner", text: x, showTe
|
|
|
645
754
|
className: "flex items-center gap-2",
|
|
646
755
|
children: [
|
|
647
756
|
/* @__PURE__ */ jsx("span", {
|
|
648
|
-
className: cn_default("rounded-full bg-blue-600 animate-bounce",
|
|
757
|
+
className: cn_default("rounded-full bg-blue-600 animate-bounce", n),
|
|
649
758
|
style: {
|
|
650
759
|
animationDelay: "0ms",
|
|
651
760
|
animationDuration: "1s"
|
|
652
761
|
}
|
|
653
762
|
}),
|
|
654
763
|
/* @__PURE__ */ jsx("span", {
|
|
655
|
-
className: cn_default("rounded-full bg-blue-600 animate-bounce",
|
|
764
|
+
className: cn_default("rounded-full bg-blue-600 animate-bounce", n),
|
|
656
765
|
style: {
|
|
657
766
|
animationDelay: "150ms",
|
|
658
767
|
animationDuration: "1s"
|
|
659
768
|
}
|
|
660
769
|
}),
|
|
661
770
|
/* @__PURE__ */ jsx("span", {
|
|
662
|
-
className: cn_default("rounded-full bg-blue-600 animate-bounce",
|
|
771
|
+
className: cn_default("rounded-full bg-blue-600 animate-bounce", n),
|
|
663
772
|
style: {
|
|
664
773
|
animationDelay: "300ms",
|
|
665
774
|
animationDuration: "1s"
|
|
@@ -667,7 +776,7 @@ var Loading_default = ({ size: e = "md", variant: b = "spinner", text: x, showTe
|
|
|
667
776
|
})
|
|
668
777
|
]
|
|
669
778
|
});
|
|
670
|
-
case "pulse": return /* @__PURE__ */ jsx("div", { className: cn_default("rounded-full bg-blue-600 animate-pulse",
|
|
779
|
+
case "pulse": return /* @__PURE__ */ jsx("div", { className: cn_default("rounded-full bg-blue-600 animate-pulse", n) });
|
|
671
780
|
case "skeleton": return /* @__PURE__ */ jsxs("div", {
|
|
672
781
|
className: "space-y-3 w-full",
|
|
673
782
|
children: [
|
|
@@ -678,14 +787,480 @@ var Loading_default = ({ size: e = "md", variant: b = "spinner", text: x, showTe
|
|
|
678
787
|
});
|
|
679
788
|
default: return null;
|
|
680
789
|
}
|
|
681
|
-
})(),
|
|
790
|
+
})(), r && n && /* @__PURE__ */ jsx("p", {
|
|
682
791
|
className: cn_default("text-gray-700 font-medium", getTextSize(e)),
|
|
683
|
-
children:
|
|
792
|
+
children: n
|
|
684
793
|
})]
|
|
685
794
|
});
|
|
686
|
-
return
|
|
795
|
+
return i ? /* @__PURE__ */ jsx("div", {
|
|
687
796
|
className: "fixed inset-0 bg-white/70 backdrop-blur-[2px] z-50 flex items-center justify-center transition-all duration-300",
|
|
688
|
-
children:
|
|
689
|
-
}) :
|
|
797
|
+
children: s
|
|
798
|
+
}) : s;
|
|
799
|
+
};
|
|
800
|
+
const paginationStyles = {
|
|
801
|
+
base: "flex items-center gap-1 text-sm",
|
|
802
|
+
sizes: {
|
|
803
|
+
small: "text-xs",
|
|
804
|
+
middle: "text-sm",
|
|
805
|
+
large: "text-base"
|
|
806
|
+
},
|
|
807
|
+
alignments: {
|
|
808
|
+
left: "justify-start",
|
|
809
|
+
center: "justify-center",
|
|
810
|
+
right: "justify-end"
|
|
811
|
+
},
|
|
812
|
+
item: {
|
|
813
|
+
base: "inline-flex items-center justify-center min-w-[32px] h-8 px-3 rounded-md border border-gray-300 text-gray-700 cursor-pointer transition-all duration-200 hover:border-blue-500 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50",
|
|
814
|
+
active: "bg-blue-500 text-white border-blue-500 hover:bg-blue-600 hover:border-blue-600",
|
|
815
|
+
disabled: "opacity-50 cursor-not-allowed hover:border-gray-300 hover:text-gray-700 hover:bg-white",
|
|
816
|
+
ellipsis: "cursor-default hover:border-gray-300 hover:text-gray-700 hover:bg-white"
|
|
817
|
+
},
|
|
818
|
+
jump: {
|
|
819
|
+
base: "inline-flex items-center justify-center w-8 h-8 rounded-md border border-gray-300 bg-white text-gray-700 cursor-pointer transition-all duration-200 hover:border-blue-500 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50",
|
|
820
|
+
disabled: "opacity-50 cursor-not-allowed hover:border-gray-300 hover:text-gray-700 hover:bg-white"
|
|
821
|
+
},
|
|
822
|
+
sizeChanger: {
|
|
823
|
+
base: "flex items-center gap-2 text-sm",
|
|
824
|
+
select: "px-2 py-1 border border-gray-300 rounded-md bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 focus:border-blue-500",
|
|
825
|
+
label: "text-gray-600"
|
|
826
|
+
},
|
|
827
|
+
quickJumper: {
|
|
828
|
+
base: "flex items-center gap-2 text-sm",
|
|
829
|
+
input: "w-16 px-2 py-1 border border-gray-300 rounded-md bg-white text-gray-700 text-center focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 focus:border-blue-500",
|
|
830
|
+
label: "text-gray-600"
|
|
831
|
+
},
|
|
832
|
+
total: { base: "text-sm text-gray-600 mr-4" },
|
|
833
|
+
simple: {
|
|
834
|
+
base: "flex items-center gap-2 text-sm",
|
|
835
|
+
input: "w-12 px-2 py-1 border border-gray-300 rounded-md bg-white text-gray-700 text-center focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 focus:border-blue-500",
|
|
836
|
+
separator: "text-gray-500"
|
|
837
|
+
}
|
|
838
|
+
};
|
|
839
|
+
function getPaginationStyles(e = "middle", t = "left", n) {
|
|
840
|
+
let r = [
|
|
841
|
+
paginationStyles.base,
|
|
842
|
+
paginationStyles.sizes[e],
|
|
843
|
+
paginationStyles.alignments[t]
|
|
844
|
+
].filter(Boolean).join(" ");
|
|
845
|
+
return n ? `${r} ${n}` : r;
|
|
846
|
+
}
|
|
847
|
+
function getPaginationItemStyles(e, t, n, r) {
|
|
848
|
+
let i = [
|
|
849
|
+
paginationStyles.item.base,
|
|
850
|
+
e && paginationStyles.item.active,
|
|
851
|
+
t && paginationStyles.item.disabled,
|
|
852
|
+
n && paginationStyles.item.ellipsis
|
|
853
|
+
].filter(Boolean).join(" ");
|
|
854
|
+
return r ? `${i} ${r}` : i;
|
|
855
|
+
}
|
|
856
|
+
function getPaginationJumpStyles(e, t) {
|
|
857
|
+
let n = [paginationStyles.jump.base, e && paginationStyles.jump.disabled].filter(Boolean).join(" ");
|
|
858
|
+
return t ? `${n} ${t}` : n;
|
|
859
|
+
}
|
|
860
|
+
function getPaginationSizeChangerStyles(e) {
|
|
861
|
+
return e ? `${paginationStyles.sizeChanger.base} ${e}` : paginationStyles.sizeChanger.base;
|
|
862
|
+
}
|
|
863
|
+
function getPaginationQuickJumperStyles(e) {
|
|
864
|
+
return e ? `${paginationStyles.quickJumper.base} ${e}` : paginationStyles.quickJumper.base;
|
|
865
|
+
}
|
|
866
|
+
function getPaginationTotalStyles(e) {
|
|
867
|
+
return e ? `${paginationStyles.total.base} ${e}` : paginationStyles.total.base;
|
|
868
|
+
}
|
|
869
|
+
function getPaginationSimpleStyles(e) {
|
|
870
|
+
return e ? `${paginationStyles.simple.base} ${e}` : paginationStyles.simple.base;
|
|
871
|
+
}
|
|
872
|
+
var PaginationItem = ({ page: e, active: t = !1, disabled: n = !1, onClick: r, className: i, ellipsis: a = !1, children: o }) => /* @__PURE__ */ jsx("button", {
|
|
873
|
+
className: getPaginationItemStyles(t, n, a, i),
|
|
874
|
+
onClick: () => {
|
|
875
|
+
!n && !a && r && r(e);
|
|
876
|
+
},
|
|
877
|
+
disabled: n,
|
|
878
|
+
type: "button",
|
|
879
|
+
children: o || e
|
|
880
|
+
}), PaginationJump = ({ onClick: e, disabled: t = !1, className: n, icon: r, title: i }) => /* @__PURE__ */ jsx("button", {
|
|
881
|
+
className: getPaginationJumpStyles(t, n),
|
|
882
|
+
onClick: () => {
|
|
883
|
+
!t && e && e();
|
|
884
|
+
},
|
|
885
|
+
disabled: t,
|
|
886
|
+
type: "button",
|
|
887
|
+
title: i,
|
|
888
|
+
children: r
|
|
889
|
+
}), PaginationSizeChanger = ({ current: e, pageSize: t, pageSizeOptions: n, onChange: r, disabled: i = !1, className: a, itemsPerPageText: o = "每页条数" }) => /* @__PURE__ */ jsxs("div", {
|
|
890
|
+
className: getPaginationSizeChangerStyles(a),
|
|
891
|
+
children: [
|
|
892
|
+
/* @__PURE__ */ jsx("span", {
|
|
893
|
+
className: "text-gray-600",
|
|
894
|
+
children: o
|
|
895
|
+
}),
|
|
896
|
+
/* @__PURE__ */ jsx("select", {
|
|
897
|
+
value: t,
|
|
898
|
+
onChange: (t) => {
|
|
899
|
+
r(e, parseInt(t.target.value));
|
|
900
|
+
},
|
|
901
|
+
disabled: i,
|
|
902
|
+
className: "px-2 py-1 border border-gray-300 rounded-md bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 focus:border-blue-500",
|
|
903
|
+
children: n.map((e) => /* @__PURE__ */ jsx("option", {
|
|
904
|
+
value: e,
|
|
905
|
+
children: e
|
|
906
|
+
}, e))
|
|
907
|
+
}),
|
|
908
|
+
/* @__PURE__ */ jsx("span", {
|
|
909
|
+
className: "text-gray-600",
|
|
910
|
+
children: o
|
|
911
|
+
})
|
|
912
|
+
]
|
|
913
|
+
}), PaginationQuickJumper = ({ totalPages: e, onJump: t, disabled: n = !1, className: r, jumpToText: i = "跳转到", pageText: a = "页" }) => {
|
|
914
|
+
let [o, s] = useState(""), c = () => {
|
|
915
|
+
let n = parseInt(o);
|
|
916
|
+
n >= 1 && n <= e && (t(n), s(""));
|
|
917
|
+
};
|
|
918
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
919
|
+
className: getPaginationQuickJumperStyles(r),
|
|
920
|
+
children: [
|
|
921
|
+
/* @__PURE__ */ jsx("span", {
|
|
922
|
+
className: "text-gray-600",
|
|
923
|
+
children: i
|
|
924
|
+
}),
|
|
925
|
+
/* @__PURE__ */ jsx("input", {
|
|
926
|
+
type: "number",
|
|
927
|
+
value: o,
|
|
928
|
+
onChange: (e) => s(e.target.value),
|
|
929
|
+
onKeyUp: (e) => {
|
|
930
|
+
e.key === "Enter" && c();
|
|
931
|
+
},
|
|
932
|
+
disabled: n,
|
|
933
|
+
className: "w-16 px-2 py-1 border border-gray-300 rounded-md bg-white text-gray-700 text-center focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 focus:border-blue-500",
|
|
934
|
+
placeholder: a,
|
|
935
|
+
min: "1",
|
|
936
|
+
max: e
|
|
937
|
+
}),
|
|
938
|
+
/* @__PURE__ */ jsx("span", {
|
|
939
|
+
className: "text-gray-600",
|
|
940
|
+
children: a
|
|
941
|
+
})
|
|
942
|
+
]
|
|
943
|
+
});
|
|
944
|
+
}, Pagination_default = ({ current: e, defaultCurrent: t = 1, pageSize: n, defaultPageSize: i = 10, total: o = 0, onChange: c, onShowSizeChange: u, showQuickJumper: d = !1, showSizeChanger: f = !1, pageSizeOptions: p = [
|
|
945
|
+
"10",
|
|
946
|
+
"20",
|
|
947
|
+
"50",
|
|
948
|
+
"100"
|
|
949
|
+
], showTotal: m = !1, showPrevNextJumpers: h = !0, showFirstLastJumpers: g = !1, disabled: _ = !1, hideOnSinglePage: v = !1, size: y = "middle", align: b = "left", className: x, style: S, simple: C = !1, prevIcon: w, nextIcon: T, firstIcon: E, lastIcon: D, jumpPrevIcon: O, jumpNextIcon: Re, texts: ze = {} }) => {
|
|
950
|
+
let F = {
|
|
951
|
+
itemsPerPage: "每页条数",
|
|
952
|
+
items: "条",
|
|
953
|
+
jumpTo: "跳转到",
|
|
954
|
+
page: "页",
|
|
955
|
+
total: "共 {total} 条",
|
|
956
|
+
first: "首页",
|
|
957
|
+
previous: "上一页",
|
|
958
|
+
next: "下一页",
|
|
959
|
+
last: "末页",
|
|
960
|
+
jumpPrev: "向前5页",
|
|
961
|
+
jumpNext: "向后5页",
|
|
962
|
+
...ze
|
|
963
|
+
}, [I, L] = useState(e ?? t), [R, z] = useState(n ?? i), B = useMemo(() => Math.ceil(o / R), [o, R]);
|
|
964
|
+
if (useEffect(() => {
|
|
965
|
+
e !== void 0 && startTransition(() => {
|
|
966
|
+
L(e);
|
|
967
|
+
});
|
|
968
|
+
}, [e]), useEffect(() => {
|
|
969
|
+
n !== void 0 && startTransition(() => {
|
|
970
|
+
z(n);
|
|
971
|
+
});
|
|
972
|
+
}, [n]), v && B <= 1) return null;
|
|
973
|
+
if (C) return /* @__PURE__ */ jsxs("div", {
|
|
974
|
+
className: getPaginationSimpleStyles(x),
|
|
975
|
+
style: S,
|
|
976
|
+
children: [
|
|
977
|
+
/* @__PURE__ */ jsx("input", {
|
|
978
|
+
type: "number",
|
|
979
|
+
value: I,
|
|
980
|
+
onChange: (e) => {
|
|
981
|
+
let t = parseInt(e.target.value);
|
|
982
|
+
t >= 1 && t <= B && (L(t), c?.(t, R));
|
|
983
|
+
},
|
|
984
|
+
disabled: _,
|
|
985
|
+
className: "w-12 px-2 py-1 border border-gray-300 rounded-md bg-white text-gray-700 text-center focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 focus:border-blue-500",
|
|
986
|
+
min: "1",
|
|
987
|
+
max: B
|
|
988
|
+
}),
|
|
989
|
+
/* @__PURE__ */ jsx("span", {
|
|
990
|
+
className: "text-gray-500",
|
|
991
|
+
children: "/"
|
|
992
|
+
}),
|
|
993
|
+
/* @__PURE__ */ jsx("span", {
|
|
994
|
+
className: "text-gray-600",
|
|
995
|
+
children: B
|
|
996
|
+
})
|
|
997
|
+
]
|
|
998
|
+
});
|
|
999
|
+
let V = () => {
|
|
1000
|
+
let e = [], t = I > 4, n = I < B - 3;
|
|
1001
|
+
t && (e.push(1), I > 5 && e.push("prev-ellipsis"));
|
|
1002
|
+
let r = Math.max(1, I - 2), i = Math.min(B, I + 2);
|
|
1003
|
+
for (let t = r; t <= i; t++) e.push(t);
|
|
1004
|
+
return n && (I < B - 4 && e.push("next-ellipsis"), e.push(B)), e;
|
|
1005
|
+
}, H = (e) => {
|
|
1006
|
+
e !== I && e >= 1 && e <= B && (L(e), c?.(e, R));
|
|
1007
|
+
}, U = (e) => {
|
|
1008
|
+
let t = Math.ceil(o / e), n = Math.min(I, t);
|
|
1009
|
+
z(e), L(n), u?.(n, e), c?.(n, e);
|
|
1010
|
+
}, W = () => {
|
|
1011
|
+
H(Math.max(1, I - 5));
|
|
1012
|
+
}, G = () => {
|
|
1013
|
+
H(Math.min(B, I + 5));
|
|
1014
|
+
}, Be = (e) => {
|
|
1015
|
+
H(e);
|
|
1016
|
+
}, K = V();
|
|
1017
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1018
|
+
className: getPaginationStyles(y, b, x),
|
|
1019
|
+
style: S,
|
|
1020
|
+
children: [
|
|
1021
|
+
m && /* @__PURE__ */ jsx("div", {
|
|
1022
|
+
className: getPaginationTotalStyles(),
|
|
1023
|
+
children: typeof m == "function" ? m(o, [(I - 1) * R + 1, Math.min(I * R, o)]) : F.total.replace("{total}", o.toString())
|
|
1024
|
+
}),
|
|
1025
|
+
g && I > 1 && /* @__PURE__ */ jsx("button", {
|
|
1026
|
+
className: getPaginationJumpStyles(_),
|
|
1027
|
+
onClick: () => H(1),
|
|
1028
|
+
disabled: _,
|
|
1029
|
+
type: "button",
|
|
1030
|
+
title: F.first,
|
|
1031
|
+
children: E || /* @__PURE__ */ jsx(FirstIcon_default, {})
|
|
1032
|
+
}),
|
|
1033
|
+
I > 1 && /* @__PURE__ */ jsx("button", {
|
|
1034
|
+
className: getPaginationJumpStyles(_),
|
|
1035
|
+
onClick: () => H(I - 1),
|
|
1036
|
+
disabled: _,
|
|
1037
|
+
type: "button",
|
|
1038
|
+
title: F.previous,
|
|
1039
|
+
children: w || /* @__PURE__ */ jsx(PrevIcon_default, {})
|
|
1040
|
+
}),
|
|
1041
|
+
h && I > 4 && /* @__PURE__ */ jsx(PaginationJump, {
|
|
1042
|
+
direction: "prev",
|
|
1043
|
+
onClick: W,
|
|
1044
|
+
disabled: _,
|
|
1045
|
+
icon: O || /* @__PURE__ */ jsx(JumpPrevIcon_default, {}),
|
|
1046
|
+
title: F.jumpPrev
|
|
1047
|
+
}),
|
|
1048
|
+
K.map((e, t) => typeof e == "string" ? /* @__PURE__ */ jsx(PaginationItem, {
|
|
1049
|
+
page: 0,
|
|
1050
|
+
ellipsis: !0,
|
|
1051
|
+
className: "cursor-default",
|
|
1052
|
+
children: "..."
|
|
1053
|
+
}, `${e}-${t}`) : /* @__PURE__ */ jsx(PaginationItem, {
|
|
1054
|
+
page: e,
|
|
1055
|
+
active: e === I,
|
|
1056
|
+
disabled: _,
|
|
1057
|
+
onClick: H
|
|
1058
|
+
}, e)),
|
|
1059
|
+
h && I < B - 3 && /* @__PURE__ */ jsx(PaginationJump, {
|
|
1060
|
+
direction: "next",
|
|
1061
|
+
onClick: G,
|
|
1062
|
+
disabled: _,
|
|
1063
|
+
icon: Re || /* @__PURE__ */ jsx(JumpNextIcon_default, {}),
|
|
1064
|
+
title: F.jumpNext
|
|
1065
|
+
}),
|
|
1066
|
+
I < B && /* @__PURE__ */ jsx("button", {
|
|
1067
|
+
className: getPaginationJumpStyles(_),
|
|
1068
|
+
onClick: () => H(I + 1),
|
|
1069
|
+
disabled: _,
|
|
1070
|
+
type: "button",
|
|
1071
|
+
title: F.next,
|
|
1072
|
+
children: T || /* @__PURE__ */ jsx(NextIcon_default, {})
|
|
1073
|
+
}),
|
|
1074
|
+
g && I < B && /* @__PURE__ */ jsx("button", {
|
|
1075
|
+
className: getPaginationJumpStyles(_),
|
|
1076
|
+
onClick: () => H(B),
|
|
1077
|
+
disabled: _,
|
|
1078
|
+
type: "button",
|
|
1079
|
+
title: F.last,
|
|
1080
|
+
children: D || /* @__PURE__ */ jsx(LastIcon_default, {})
|
|
1081
|
+
}),
|
|
1082
|
+
f && /* @__PURE__ */ jsx(PaginationSizeChanger, {
|
|
1083
|
+
current: I,
|
|
1084
|
+
pageSize: R,
|
|
1085
|
+
pageSizeOptions: p,
|
|
1086
|
+
onChange: U,
|
|
1087
|
+
disabled: _,
|
|
1088
|
+
itemsPerPageText: F.itemsPerPage
|
|
1089
|
+
}),
|
|
1090
|
+
d && /* @__PURE__ */ jsx(PaginationQuickJumper, {
|
|
1091
|
+
current: I,
|
|
1092
|
+
totalPages: B,
|
|
1093
|
+
onJump: Be,
|
|
1094
|
+
disabled: _,
|
|
1095
|
+
jumpToText: F.jumpTo,
|
|
1096
|
+
pageText: F.page
|
|
1097
|
+
})
|
|
1098
|
+
]
|
|
1099
|
+
});
|
|
690
1100
|
};
|
|
691
|
-
|
|
1101
|
+
const getSliderStyles = (e) => cn_default("relative w-full overflow-hidden", e), getSliderTrackStyles = (e) => cn_default("flex transition-transform duration-300 ease-in-out", e), getSliderItemStyles = (e) => cn_default("flex-shrink-0", e), getNavigationButtonStyles = (e, t = "default", n = !1, r) => cn_default(cn_default("absolute top-1/2 -translate-y-1/2 z-10", "w-10 h-10 rounded-full", "flex items-center justify-center", "transition-all duration-200", "focus:outline-none focus:ring-2 focus:ring-offset-2", n && "hidden", !n && "cursor-pointer hover:scale-110 active:scale-95"), e === "left" ? "left-4" : "right-4", {
|
|
1102
|
+
default: cn_default("bg-white text-gray-800 shadow-lg", "hover:bg-gray-50", "focus:ring-gray-300"),
|
|
1103
|
+
outline: cn_default("bg-transparent border-2 border-white text-white", "hover:bg-white hover:text-gray-800", "focus:ring-white"),
|
|
1104
|
+
ghost: cn_default("bg-transparent text-white", "hover:bg-white/20", "focus:ring-white")
|
|
1105
|
+
}[t], r), getIndicatorStyles = (e = "dot", t = !1, n) => cn_default(cn_default("transition-all duration-200 cursor-pointer", "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-300"), {
|
|
1106
|
+
dot: cn_default("w-2 h-2 rounded-full", t ? "bg-white scale-125" : "bg-white/50 hover:bg-white/75"),
|
|
1107
|
+
number: cn_default("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium", t ? "bg-white text-gray-800" : "bg-white/50 text-white hover:bg-white/75"),
|
|
1108
|
+
line: cn_default("h-1 rounded-full", t ? "bg-white" : "bg-white/50 hover:bg-white/75")
|
|
1109
|
+
}[e], n), getIndicatorContainerStyles = (e = "dot", t) => cn_default("flex items-center justify-center gap-2 mt-4", e === "line" && "w-full", t);
|
|
1110
|
+
var Slider_default = forwardRef(({ items: e, itemsPerPage: t, slidePerPage: n, draggable: r = !1, paddingLeft: s = 0, gap: d = 0, showNavigation: f = !0, leftArrowClassName: p, rightArrowClassName: m, showIndicators: h = !1, autoPlay: _ = !1, autoPlayInterval: v = 3e3, loop: y = !1, className: b, itemContainerClassName: x, style: S, onSlideChange: C, previousPageLabel: w = "Previous page", nextPageLabel: T = "Next page", goToPageLabel: E = "Go to page {page}", ...D }, O) => {
|
|
1111
|
+
let [k, A] = useState(0), [j, M] = useState(!1), [N, P] = useState(!1), [F, I] = useState(0), [L, R] = useState(!1), z = useRef(null), B = useRef(null), V = useRef(null), H = t ?? 4, U = n ?? 1, W = Math.ceil(e.length / U), G = Math.max(0, W - 1), Be = H >= e.length, K = useCallback((e) => {
|
|
1112
|
+
if (j) return;
|
|
1113
|
+
let t = Math.max(0, Math.min(e, G));
|
|
1114
|
+
t !== k && (M(!0), A(t), C?.(t), setTimeout(() => {
|
|
1115
|
+
M(!1);
|
|
1116
|
+
}, 300));
|
|
1117
|
+
}, [
|
|
1118
|
+
k,
|
|
1119
|
+
G,
|
|
1120
|
+
j,
|
|
1121
|
+
C
|
|
1122
|
+
]), q = useCallback(() => {
|
|
1123
|
+
k < G ? K(k + 1) : y && K(0);
|
|
1124
|
+
}, [
|
|
1125
|
+
k,
|
|
1126
|
+
G,
|
|
1127
|
+
y,
|
|
1128
|
+
K
|
|
1129
|
+
]), J = useCallback(() => {
|
|
1130
|
+
k > 0 ? K(k - 1) : y && K(G);
|
|
1131
|
+
}, [
|
|
1132
|
+
k,
|
|
1133
|
+
y,
|
|
1134
|
+
G,
|
|
1135
|
+
K
|
|
1136
|
+
]), Y = useCallback(() => k, [k]), X = useCallback(() => W, [W]);
|
|
1137
|
+
useImperativeHandle(O, () => ({
|
|
1138
|
+
slideTo: K,
|
|
1139
|
+
slideNext: q,
|
|
1140
|
+
slidePrev: J,
|
|
1141
|
+
getCurrentIndex: Y,
|
|
1142
|
+
getTotalPages: X
|
|
1143
|
+
}), [
|
|
1144
|
+
K,
|
|
1145
|
+
q,
|
|
1146
|
+
J,
|
|
1147
|
+
Y,
|
|
1148
|
+
X
|
|
1149
|
+
]), useEffect(() => {
|
|
1150
|
+
if (_ && W > 1) return z.current = setInterval(() => {
|
|
1151
|
+
q();
|
|
1152
|
+
}, v), () => {
|
|
1153
|
+
z.current && clearInterval(z.current);
|
|
1154
|
+
};
|
|
1155
|
+
}, [
|
|
1156
|
+
_,
|
|
1157
|
+
v,
|
|
1158
|
+
q,
|
|
1159
|
+
W
|
|
1160
|
+
]);
|
|
1161
|
+
let Ve = {
|
|
1162
|
+
transform: (() => `translateX(${-(k * U * (100 / H))}%)`)(),
|
|
1163
|
+
paddingLeft: `${s}px`,
|
|
1164
|
+
gap: `${d}px`,
|
|
1165
|
+
cursor: r ? N ? "grabbing" : "grab" : "default",
|
|
1166
|
+
userSelect: r ? "none" : "auto",
|
|
1167
|
+
...S
|
|
1168
|
+
}, He = {
|
|
1169
|
+
width: (() => d === 0 ? `${100 / H}%` : `calc((100% - ${d * (H - 1)}px) / ${H})`)(),
|
|
1170
|
+
flexShrink: 0
|
|
1171
|
+
}, Z = (e) => {
|
|
1172
|
+
e === "left" ? J() : q();
|
|
1173
|
+
}, Ue = (e) => {
|
|
1174
|
+
K(e);
|
|
1175
|
+
}, We = (e) => {
|
|
1176
|
+
r && (e.preventDefault(), P(!0), R(!1), I(e.clientX));
|
|
1177
|
+
}, Q = useCallback((e) => {
|
|
1178
|
+
if (!N || !r) return;
|
|
1179
|
+
P(!1);
|
|
1180
|
+
let t = e.clientX - F;
|
|
1181
|
+
Math.abs(t) > 50 && (t > 0 ? J() : q(), R(!0)), setTimeout(() => {
|
|
1182
|
+
R(!1);
|
|
1183
|
+
}, 100);
|
|
1184
|
+
}, [
|
|
1185
|
+
N,
|
|
1186
|
+
r,
|
|
1187
|
+
F,
|
|
1188
|
+
J,
|
|
1189
|
+
q
|
|
1190
|
+
]), Ge = (e) => {
|
|
1191
|
+
if (!r) return;
|
|
1192
|
+
let t = e.touches[0];
|
|
1193
|
+
P(!0), R(!1), I(t.clientX);
|
|
1194
|
+
}, $ = useCallback((e) => {
|
|
1195
|
+
if (!N || !r) return;
|
|
1196
|
+
P(!1);
|
|
1197
|
+
let t = e.changedTouches[0].clientX - F;
|
|
1198
|
+
Math.abs(t) > 50 && (t > 0 ? J() : q(), R(!0)), setTimeout(() => {
|
|
1199
|
+
R(!1);
|
|
1200
|
+
}, 100);
|
|
1201
|
+
}, [
|
|
1202
|
+
N,
|
|
1203
|
+
r,
|
|
1204
|
+
F,
|
|
1205
|
+
J,
|
|
1206
|
+
q
|
|
1207
|
+
]);
|
|
1208
|
+
useEffect(() => (N && (document.addEventListener("mouseup", Q), document.addEventListener("touchend", $)), () => {
|
|
1209
|
+
document.removeEventListener("mouseup", Q), document.removeEventListener("touchend", $);
|
|
1210
|
+
}), [
|
|
1211
|
+
N,
|
|
1212
|
+
Q,
|
|
1213
|
+
$
|
|
1214
|
+
]);
|
|
1215
|
+
let Ke = (e) => {
|
|
1216
|
+
L && (e.preventDefault(), e.stopPropagation());
|
|
1217
|
+
}, qe = y || k > 0, Je = y || k < G;
|
|
1218
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1219
|
+
ref: B,
|
|
1220
|
+
className: getSliderStyles(b),
|
|
1221
|
+
...D,
|
|
1222
|
+
children: [
|
|
1223
|
+
/* @__PURE__ */ jsx("div", {
|
|
1224
|
+
ref: V,
|
|
1225
|
+
className: getSliderTrackStyles(),
|
|
1226
|
+
style: Ve,
|
|
1227
|
+
onMouseDown: We,
|
|
1228
|
+
onTouchStart: Ge,
|
|
1229
|
+
onClick: Ke,
|
|
1230
|
+
draggable: !1,
|
|
1231
|
+
children: e.map((e, t) => /* @__PURE__ */ jsx("div", {
|
|
1232
|
+
className: cn_default(getSliderItemStyles(), x),
|
|
1233
|
+
style: He,
|
|
1234
|
+
onClick: Ke,
|
|
1235
|
+
draggable: !1,
|
|
1236
|
+
children: e
|
|
1237
|
+
}, t))
|
|
1238
|
+
}),
|
|
1239
|
+
f && W > 1 && !Be && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("button", {
|
|
1240
|
+
type: "button",
|
|
1241
|
+
className: cn_default(getNavigationButtonStyles("left", "default", !qe), p),
|
|
1242
|
+
onClick: () => Z("left"),
|
|
1243
|
+
disabled: !qe,
|
|
1244
|
+
"aria-label": w,
|
|
1245
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon_default, { className: "w-5 h-5" })
|
|
1246
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
1247
|
+
type: "button",
|
|
1248
|
+
className: cn_default(getNavigationButtonStyles("right", "default", !Je), m),
|
|
1249
|
+
onClick: () => Z("right"),
|
|
1250
|
+
disabled: !Je,
|
|
1251
|
+
"aria-label": T,
|
|
1252
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon_default, { className: "w-5 h-5" })
|
|
1253
|
+
})] }),
|
|
1254
|
+
h && W > 1 && /* @__PURE__ */ jsx("div", {
|
|
1255
|
+
className: getIndicatorContainerStyles(),
|
|
1256
|
+
children: Array.from({ length: W }, (e, t) => /* @__PURE__ */ jsx("button", {
|
|
1257
|
+
type: "button",
|
|
1258
|
+
className: getIndicatorStyles("dot", t === k),
|
|
1259
|
+
onClick: () => Ue(t),
|
|
1260
|
+
"aria-label": E.replace("{page}", (t + 1).toString())
|
|
1261
|
+
}, t))
|
|
1262
|
+
})
|
|
1263
|
+
]
|
|
1264
|
+
});
|
|
1265
|
+
});
|
|
1266
|
+
export { ArrowIcon_default as ArrowIcon, Button_default as Button, Card_default as Card, ChevronLeftIcon_default as ChevronLeftIcon, ChevronRightIcon_default as ChevronRightIcon, CloseIcon_default as CloseIcon, Collapse_default as Collapse, Divider_default as Divider, DocumentIcon_default as DocumentIcon, Drawer_default as Drawer, EmptyState_default as EmptyState, EmptyStateIcon, ErrorIcon_default as ErrorIcon, FirstIcon_default as FirstIcon, FolderIcon_default as FolderIcon, InfoIcon_default as InfoIcon, JumpNextIcon_default as JumpNextIcon, JumpPrevIcon_default as JumpPrevIcon, LastIcon_default as LastIcon, Loading_default as Loading, LoadingIcon_default as LoadingIcon, NextIcon_default as NextIcon, Pagination_default as Pagination, PrevIcon_default as PrevIcon, SearchIcon_default as SearchIcon, SettingsIcon_default as SettingsIcon, Slider_default as Slider, SuccessIcon_default as SuccessIcon, UsersIcon_default as UsersIcon, WarningIcon_default as WarningIcon, cn_default as cn };
|