@dinhn1202/ui-kit 0.1.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/README.md +129 -0
- package/dist/components/Button/Button.d.ts +6 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +6 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts +4 -0
- package/dist/components/Input/Input.d.ts.map +1 -0
- package/dist/components/Input/index.d.ts +3 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/InputNumber/InputNumber.d.ts +6 -0
- package/dist/components/InputNumber/InputNumber.d.ts.map +1 -0
- package/dist/components/InputNumber/index.d.ts +3 -0
- package/dist/components/InputNumber/index.d.ts.map +1 -0
- package/dist/components/Loading/Loading.d.ts +18 -0
- package/dist/components/Loading/Loading.d.ts.map +1 -0
- package/dist/components/Loading/index.d.ts +3 -0
- package/dist/components/Loading/index.d.ts.map +1 -0
- package/dist/components/Modal/Modal.d.ts +4 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Radio/Radio.d.ts +9 -0
- package/dist/components/Radio/Radio.d.ts.map +1 -0
- package/dist/components/Radio/index.d.ts +3 -0
- package/dist/components/Radio/index.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts +9 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Table/Table.d.ts +12 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/TimePicker/TimePicker.d.ts +6 -0
- package/dist/components/TimePicker/TimePicker.d.ts.map +1 -0
- package/dist/components/TimePicker/index.d.ts +2 -0
- package/dist/components/TimePicker/index.d.ts.map +1 -0
- package/dist/components/TreeSelect/TreeSelect.d.ts +6 -0
- package/dist/components/TreeSelect/TreeSelect.d.ts.map +1 -0
- package/dist/components/TreeSelect/index.d.ts +3 -0
- package/dist/components/TreeSelect/index.d.ts.map +1 -0
- package/dist/components/Upload/Upload.d.ts +6 -0
- package/dist/components/Upload/Upload.d.ts.map +1 -0
- package/dist/components/Upload/index.d.ts +3 -0
- package/dist/components/Upload/index.d.ts.map +1 -0
- package/dist/components/UserSelect/UserSelect.d.ts +30 -0
- package/dist/components/UserSelect/UserSelect.d.ts.map +1 -0
- package/dist/components/UserSelect/index.d.ts +2 -0
- package/dist/components/UserSelect/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/dto-ui-kit.cjs +22 -0
- package/dist/dto-ui-kit.css +1 -0
- package/dist/dto-ui-kit.js +919 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +8 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/components.d.ts +3 -0
- package/dist/theme/components.d.ts.map +1 -0
- package/dist/theme/index.d.ts +5 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/theme.d.ts +3 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/tokens.d.ts +3 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,919 @@
|
|
|
1
|
+
import we, { useState as R, useRef as Ne, useEffect as Re, useMemo as T } from "react";
|
|
2
|
+
import { Button as Ee, Input as Te, Select as ke, Spin as Ae, Avatar as Ie, Modal as Pe, Popover as me, Checkbox as Oe, Table as De, InputNumber as $e, DatePicker as Fe, TimePicker as ze, Radio as ue, TreeSelect as Ue, Upload as je, ConfigProvider as He, App as Me } from "antd";
|
|
3
|
+
import { SettingOutlined as Be, SearchOutlined as fe, HolderOutlined as Le, FilterOutlined as Ye } from "@ant-design/icons";
|
|
4
|
+
var se = { exports: {} }, K = {};
|
|
5
|
+
/**
|
|
6
|
+
* @license React
|
|
7
|
+
* react-jsx-runtime.production.js
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
var pe;
|
|
15
|
+
function qe() {
|
|
16
|
+
if (pe) return K;
|
|
17
|
+
pe = 1;
|
|
18
|
+
var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
19
|
+
function i(a, u, d) {
|
|
20
|
+
var _ = null;
|
|
21
|
+
if (d !== void 0 && (_ = "" + d), u.key !== void 0 && (_ = "" + u.key), "key" in u) {
|
|
22
|
+
d = {};
|
|
23
|
+
for (var S in u)
|
|
24
|
+
S !== "key" && (d[S] = u[S]);
|
|
25
|
+
} else d = u;
|
|
26
|
+
return u = d.ref, {
|
|
27
|
+
$$typeof: t,
|
|
28
|
+
type: a,
|
|
29
|
+
key: _,
|
|
30
|
+
ref: u !== void 0 ? u : null,
|
|
31
|
+
props: d
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return K.Fragment = r, K.jsx = i, K.jsxs = i, K;
|
|
35
|
+
}
|
|
36
|
+
var ee = {};
|
|
37
|
+
/**
|
|
38
|
+
* @license React
|
|
39
|
+
* react-jsx-runtime.development.js
|
|
40
|
+
*
|
|
41
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the MIT license found in the
|
|
44
|
+
* LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/
|
|
46
|
+
var _e;
|
|
47
|
+
function Ve() {
|
|
48
|
+
return _e || (_e = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
49
|
+
function t(e) {
|
|
50
|
+
if (e == null) return null;
|
|
51
|
+
if (typeof e == "function")
|
|
52
|
+
return e.$$typeof === B ? null : e.displayName || e.name || null;
|
|
53
|
+
if (typeof e == "string") return e;
|
|
54
|
+
switch (e) {
|
|
55
|
+
case O:
|
|
56
|
+
return "Fragment";
|
|
57
|
+
case z:
|
|
58
|
+
return "Profiler";
|
|
59
|
+
case M:
|
|
60
|
+
return "StrictMode";
|
|
61
|
+
case b:
|
|
62
|
+
return "Suspense";
|
|
63
|
+
case j:
|
|
64
|
+
return "SuspenseList";
|
|
65
|
+
case D:
|
|
66
|
+
return "Activity";
|
|
67
|
+
}
|
|
68
|
+
if (typeof e == "object")
|
|
69
|
+
switch (typeof e.tag == "number" && console.error(
|
|
70
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
71
|
+
), e.$$typeof) {
|
|
72
|
+
case H:
|
|
73
|
+
return "Portal";
|
|
74
|
+
case U:
|
|
75
|
+
return e.displayName || "Context";
|
|
76
|
+
case q:
|
|
77
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
78
|
+
case y:
|
|
79
|
+
var c = e.render;
|
|
80
|
+
return e = e.displayName, e || (e = c.displayName || c.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
81
|
+
case X:
|
|
82
|
+
return c = e.displayName || null, c !== null ? c : t(e.type) || "Memo";
|
|
83
|
+
case w:
|
|
84
|
+
c = e._payload, e = e._init;
|
|
85
|
+
try {
|
|
86
|
+
return t(e(c));
|
|
87
|
+
} catch {
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
function r(e) {
|
|
93
|
+
return "" + e;
|
|
94
|
+
}
|
|
95
|
+
function i(e) {
|
|
96
|
+
try {
|
|
97
|
+
r(e);
|
|
98
|
+
var c = !1;
|
|
99
|
+
} catch {
|
|
100
|
+
c = !0;
|
|
101
|
+
}
|
|
102
|
+
if (c) {
|
|
103
|
+
c = console;
|
|
104
|
+
var m = c.error, g = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
105
|
+
return m.call(
|
|
106
|
+
c,
|
|
107
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
|
+
g
|
|
109
|
+
), r(e);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function a(e) {
|
|
113
|
+
if (e === O) return "<>";
|
|
114
|
+
if (typeof e == "object" && e !== null && e.$$typeof === w)
|
|
115
|
+
return "<...>";
|
|
116
|
+
try {
|
|
117
|
+
var c = t(e);
|
|
118
|
+
return c ? "<" + c + ">" : "<...>";
|
|
119
|
+
} catch {
|
|
120
|
+
return "<...>";
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function u() {
|
|
124
|
+
var e = p.A;
|
|
125
|
+
return e === null ? null : e.getOwner();
|
|
126
|
+
}
|
|
127
|
+
function d() {
|
|
128
|
+
return Error("react-stack-top-frame");
|
|
129
|
+
}
|
|
130
|
+
function _(e) {
|
|
131
|
+
if (v.call(e, "key")) {
|
|
132
|
+
var c = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
133
|
+
if (c && c.isReactWarning) return !1;
|
|
134
|
+
}
|
|
135
|
+
return e.key !== void 0;
|
|
136
|
+
}
|
|
137
|
+
function S(e, c) {
|
|
138
|
+
function m() {
|
|
139
|
+
Z || (Z = !0, console.error(
|
|
140
|
+
"%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)",
|
|
141
|
+
c
|
|
142
|
+
));
|
|
143
|
+
}
|
|
144
|
+
m.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
145
|
+
get: m,
|
|
146
|
+
configurable: !0
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function A() {
|
|
150
|
+
var e = t(this.type);
|
|
151
|
+
return te[e] || (te[e] = !0, console.error(
|
|
152
|
+
"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."
|
|
153
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
154
|
+
}
|
|
155
|
+
function J(e, c, m, g, o, l) {
|
|
156
|
+
var s = m.ref;
|
|
157
|
+
return e = {
|
|
158
|
+
$$typeof: F,
|
|
159
|
+
type: e,
|
|
160
|
+
key: c,
|
|
161
|
+
props: m,
|
|
162
|
+
_owner: g
|
|
163
|
+
}, (s !== void 0 ? s : null) !== null ? Object.defineProperty(e, "ref", {
|
|
164
|
+
enumerable: !1,
|
|
165
|
+
get: A
|
|
166
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
167
|
+
configurable: !1,
|
|
168
|
+
enumerable: !1,
|
|
169
|
+
writable: !0,
|
|
170
|
+
value: 0
|
|
171
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
172
|
+
configurable: !1,
|
|
173
|
+
enumerable: !1,
|
|
174
|
+
writable: !0,
|
|
175
|
+
value: null
|
|
176
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
177
|
+
configurable: !1,
|
|
178
|
+
enumerable: !1,
|
|
179
|
+
writable: !0,
|
|
180
|
+
value: o
|
|
181
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
182
|
+
configurable: !1,
|
|
183
|
+
enumerable: !1,
|
|
184
|
+
writable: !0,
|
|
185
|
+
value: l
|
|
186
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
187
|
+
}
|
|
188
|
+
function $(e, c, m, g, o, l) {
|
|
189
|
+
var s = c.children;
|
|
190
|
+
if (s !== void 0)
|
|
191
|
+
if (g)
|
|
192
|
+
if (V(s)) {
|
|
193
|
+
for (g = 0; g < s.length; g++)
|
|
194
|
+
I(s[g]);
|
|
195
|
+
Object.freeze && Object.freeze(s);
|
|
196
|
+
} else
|
|
197
|
+
console.error(
|
|
198
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
199
|
+
);
|
|
200
|
+
else I(s);
|
|
201
|
+
if (v.call(c, "key")) {
|
|
202
|
+
s = t(e);
|
|
203
|
+
var f = Object.keys(c).filter(function(L) {
|
|
204
|
+
return L !== "key";
|
|
205
|
+
});
|
|
206
|
+
g = 0 < f.length ? "{key: someKey, " + f.join(": ..., ") + ": ...}" : "{key: someKey}", oe[s + g] || (f = 0 < f.length ? "{" + f.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
207
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
208
|
+
let props = %s;
|
|
209
|
+
<%s {...props} />
|
|
210
|
+
React keys must be passed directly to JSX without using spread:
|
|
211
|
+
let props = %s;
|
|
212
|
+
<%s key={someKey} {...props} />`,
|
|
213
|
+
g,
|
|
214
|
+
s,
|
|
215
|
+
f,
|
|
216
|
+
s
|
|
217
|
+
), oe[s + g] = !0);
|
|
218
|
+
}
|
|
219
|
+
if (s = null, m !== void 0 && (i(m), s = "" + m), _(c) && (i(c.key), s = "" + c.key), "key" in c) {
|
|
220
|
+
m = {};
|
|
221
|
+
for (var N in c)
|
|
222
|
+
N !== "key" && (m[N] = c[N]);
|
|
223
|
+
} else m = c;
|
|
224
|
+
return s && S(
|
|
225
|
+
m,
|
|
226
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
227
|
+
), J(
|
|
228
|
+
e,
|
|
229
|
+
s,
|
|
230
|
+
m,
|
|
231
|
+
u(),
|
|
232
|
+
o,
|
|
233
|
+
l
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
function I(e) {
|
|
237
|
+
Y(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === w && (e._payload.status === "fulfilled" ? Y(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
238
|
+
}
|
|
239
|
+
function Y(e) {
|
|
240
|
+
return typeof e == "object" && e !== null && e.$$typeof === F;
|
|
241
|
+
}
|
|
242
|
+
var P = we, F = Symbol.for("react.transitional.element"), H = Symbol.for("react.portal"), O = Symbol.for("react.fragment"), M = Symbol.for("react.strict_mode"), z = Symbol.for("react.profiler"), q = Symbol.for("react.consumer"), U = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), B = Symbol.for("react.client.reference"), p = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, v = Object.prototype.hasOwnProperty, V = Array.isArray, Q = console.createTask ? console.createTask : function() {
|
|
243
|
+
return null;
|
|
244
|
+
};
|
|
245
|
+
P = {
|
|
246
|
+
react_stack_bottom_frame: function(e) {
|
|
247
|
+
return e();
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
var Z, te = {}, re = P.react_stack_bottom_frame.bind(
|
|
251
|
+
P,
|
|
252
|
+
d
|
|
253
|
+
)(), ne = Q(a(d)), oe = {};
|
|
254
|
+
ee.Fragment = O, ee.jsx = function(e, c, m) {
|
|
255
|
+
var g = 1e4 > p.recentlyCreatedOwnerStacks++;
|
|
256
|
+
return $(
|
|
257
|
+
e,
|
|
258
|
+
c,
|
|
259
|
+
m,
|
|
260
|
+
!1,
|
|
261
|
+
g ? Error("react-stack-top-frame") : re,
|
|
262
|
+
g ? Q(a(e)) : ne
|
|
263
|
+
);
|
|
264
|
+
}, ee.jsxs = function(e, c, m) {
|
|
265
|
+
var g = 1e4 > p.recentlyCreatedOwnerStacks++;
|
|
266
|
+
return $(
|
|
267
|
+
e,
|
|
268
|
+
c,
|
|
269
|
+
m,
|
|
270
|
+
!0,
|
|
271
|
+
g ? Error("react-stack-top-frame") : re,
|
|
272
|
+
g ? Q(a(e)) : ne
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
})()), ee;
|
|
276
|
+
}
|
|
277
|
+
var ge;
|
|
278
|
+
function We() {
|
|
279
|
+
return ge || (ge = 1, process.env.NODE_ENV === "production" ? se.exports = qe() : se.exports = Ve()), se.exports;
|
|
280
|
+
}
|
|
281
|
+
var n = We();
|
|
282
|
+
function Ce(t) {
|
|
283
|
+
var r, i, a = "";
|
|
284
|
+
if (typeof t == "string" || typeof t == "number") a += t;
|
|
285
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
286
|
+
var u = t.length;
|
|
287
|
+
for (r = 0; r < u; r++) t[r] && (i = Ce(t[r])) && (a && (a += " "), a += i);
|
|
288
|
+
} else for (i in t) t[i] && (a && (a += " "), a += i);
|
|
289
|
+
return a;
|
|
290
|
+
}
|
|
291
|
+
function h() {
|
|
292
|
+
for (var t, r, i = 0, a = "", u = arguments.length; i < u; i++) (t = arguments[i]) && (r = Ce(t)) && (a && (a += " "), a += r);
|
|
293
|
+
return a;
|
|
294
|
+
}
|
|
295
|
+
const Ge = "_button_1wcp1_1", Je = "_secondary_1wcp1_31", Xe = "_danger_1wcp1_37", he = {
|
|
296
|
+
button: Ge,
|
|
297
|
+
secondary: Je,
|
|
298
|
+
danger: Xe
|
|
299
|
+
}, ae = ({
|
|
300
|
+
customVariant: t = "primary",
|
|
301
|
+
className: r,
|
|
302
|
+
children: i,
|
|
303
|
+
...a
|
|
304
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
305
|
+
Ee,
|
|
306
|
+
{
|
|
307
|
+
...a,
|
|
308
|
+
className: h(he.button, he[t], r),
|
|
309
|
+
children: i
|
|
310
|
+
}
|
|
311
|
+
), Qe = "_input_1tcmw_1", Ze = {
|
|
312
|
+
input: Qe
|
|
313
|
+
}, ie = ({ className: t, ...r }) => /* @__PURE__ */ n.jsx(Te, { ...r, className: h(Ze.input, t) }), Ke = "_select_e8rgx_1", et = "_popup_e8rgx_10", be = {
|
|
314
|
+
select: Ke,
|
|
315
|
+
popup: et
|
|
316
|
+
}, tt = ({
|
|
317
|
+
fullWidth: t,
|
|
318
|
+
className: r,
|
|
319
|
+
popupClassName: i,
|
|
320
|
+
style: a,
|
|
321
|
+
...u
|
|
322
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
323
|
+
ke,
|
|
324
|
+
{
|
|
325
|
+
...u,
|
|
326
|
+
className: h(be.select, r),
|
|
327
|
+
popupClassName: h(be.popup, i),
|
|
328
|
+
style: { ...t ? { width: "100%" } : {}, ...a }
|
|
329
|
+
}
|
|
330
|
+
), rt = "_userSelect_zu1fg_1", nt = "_identity_zu1fg_5", ot = "_identityCompact_zu1fg_12", st = "_avatar_zu1fg_16", at = "_userDetails_zu1fg_24", lt = "_displayName_zu1fg_30", it = "_email_zu1fg_31", ct = "_message_zu1fg_47", ut = "_popup_zu1fg_58", k = {
|
|
331
|
+
userSelect: rt,
|
|
332
|
+
identity: nt,
|
|
333
|
+
identityCompact: ot,
|
|
334
|
+
avatar: st,
|
|
335
|
+
userDetails: at,
|
|
336
|
+
displayName: lt,
|
|
337
|
+
email: it,
|
|
338
|
+
message: ct,
|
|
339
|
+
popup: ut
|
|
340
|
+
}, dt = (t) => t.split(" ").filter(Boolean).slice(0, 2).map((r) => r[0]).join("").toUpperCase(), ve = ({ compact: t = !1, user: r }) => /* @__PURE__ */ n.jsxs("span", { className: h(k.identity, { [k.identityCompact]: t }), children: [
|
|
341
|
+
/* @__PURE__ */ n.jsx(Ie, { alt: r.displayName, className: k.avatar, size: t ? 22 : 32, src: r.avatarUrl, children: dt(r.displayName) }),
|
|
342
|
+
/* @__PURE__ */ n.jsxs("span", { className: k.userDetails, children: [
|
|
343
|
+
/* @__PURE__ */ n.jsx("span", { className: k.displayName, children: r.displayName }),
|
|
344
|
+
!t && r.email ? /* @__PURE__ */ n.jsx("span", { className: k.email, children: r.email }) : null
|
|
345
|
+
] })
|
|
346
|
+
] }), cr = ({
|
|
347
|
+
className: t,
|
|
348
|
+
debounceMs: r = 300,
|
|
349
|
+
fullWidth: i,
|
|
350
|
+
minSearchLength: a = 2,
|
|
351
|
+
onChange: u,
|
|
352
|
+
popupClassName: d,
|
|
353
|
+
service: _,
|
|
354
|
+
...S
|
|
355
|
+
}) => {
|
|
356
|
+
const [A, J] = R(""), [$, I] = R([]), [Y, P] = R({}), [F, H] = R(!1), [O, M] = R(!1), z = Ne(0);
|
|
357
|
+
Re(() => {
|
|
358
|
+
const y = A.trim(), b = ++z.current;
|
|
359
|
+
if (y.length < a) {
|
|
360
|
+
I([]), M(!1), H(!1);
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
const j = new AbortController(), X = window.setTimeout(() => {
|
|
364
|
+
(async () => {
|
|
365
|
+
H(!0), M(!0);
|
|
366
|
+
try {
|
|
367
|
+
const D = await _.searchUsers(y, j.signal);
|
|
368
|
+
if (j.signal.aborted || b !== z.current || (I(D), P((p) => ({
|
|
369
|
+
...p,
|
|
370
|
+
...Object.fromEntries(D.map((v) => [v.id, v]))
|
|
371
|
+
})), !_.getUserAvatar))
|
|
372
|
+
return;
|
|
373
|
+
const B = await Promise.all(
|
|
374
|
+
D.map(async (p) => {
|
|
375
|
+
var v;
|
|
376
|
+
if (p.avatarUrl)
|
|
377
|
+
return p;
|
|
378
|
+
try {
|
|
379
|
+
const V = await ((v = _.getUserAvatar) == null ? void 0 : v.call(_, p, j.signal));
|
|
380
|
+
return V ? { ...p, avatarUrl: V } : p;
|
|
381
|
+
} catch {
|
|
382
|
+
return p;
|
|
383
|
+
}
|
|
384
|
+
})
|
|
385
|
+
);
|
|
386
|
+
if (j.signal.aborted || b !== z.current)
|
|
387
|
+
return;
|
|
388
|
+
I(B), P((p) => ({
|
|
389
|
+
...p,
|
|
390
|
+
...Object.fromEntries(B.map((v) => [v.id, v]))
|
|
391
|
+
}));
|
|
392
|
+
} catch {
|
|
393
|
+
!j.signal.aborted && b === z.current && I([]);
|
|
394
|
+
} finally {
|
|
395
|
+
!j.signal.aborted && b === z.current && H(!1);
|
|
396
|
+
}
|
|
397
|
+
})();
|
|
398
|
+
}, r);
|
|
399
|
+
return () => {
|
|
400
|
+
window.clearTimeout(X), j.abort();
|
|
401
|
+
};
|
|
402
|
+
}, [r, a, A, _]);
|
|
403
|
+
const q = T(
|
|
404
|
+
() => $.map((y) => ({ label: y.displayName, user: y, value: y.id })),
|
|
405
|
+
[$]
|
|
406
|
+
), U = F ? /* @__PURE__ */ n.jsxs("span", { className: k.message, children: [
|
|
407
|
+
/* @__PURE__ */ n.jsx(Ae, { size: "small" }),
|
|
408
|
+
" Searching users..."
|
|
409
|
+
] }) : A.trim().length < a ? /* @__PURE__ */ n.jsxs("span", { className: k.message, children: [
|
|
410
|
+
"Type at least ",
|
|
411
|
+
a,
|
|
412
|
+
" characters to search."
|
|
413
|
+
] }) : O ? /* @__PURE__ */ n.jsx("span", { className: k.message, children: "No users found." }) : null;
|
|
414
|
+
return /* @__PURE__ */ n.jsx(
|
|
415
|
+
tt,
|
|
416
|
+
{
|
|
417
|
+
...S,
|
|
418
|
+
className: h(k.userSelect, t),
|
|
419
|
+
filterOption: !1,
|
|
420
|
+
fullWidth: i,
|
|
421
|
+
labelRender: ({ value: y }) => {
|
|
422
|
+
const b = Y[String(y)];
|
|
423
|
+
return b ? /* @__PURE__ */ n.jsx(ve, { compact: !0, user: b }) : String(y);
|
|
424
|
+
},
|
|
425
|
+
loading: F,
|
|
426
|
+
notFoundContent: U,
|
|
427
|
+
options: q,
|
|
428
|
+
optionRender: ({ data: y }) => /* @__PURE__ */ n.jsx(ve, { user: y.user }),
|
|
429
|
+
popupClassName: h(k.popup, d),
|
|
430
|
+
showSearch: !0,
|
|
431
|
+
onChange: (y, b) => {
|
|
432
|
+
const j = Array.isArray(b) ? b[0] : b;
|
|
433
|
+
u == null || u(y, j == null ? void 0 : j.user);
|
|
434
|
+
},
|
|
435
|
+
onSearch: J
|
|
436
|
+
}
|
|
437
|
+
);
|
|
438
|
+
}, mt = {}, ur = ({ className: t, children: r, ...i }) => /* @__PURE__ */ n.jsx(Pe, { ...i, className: h(mt.modal, t), children: r }), ft = "_container_we3bi_1", pt = "_toolbar_we3bi_5", _t = "_toolbarActions_we3bi_13", gt = "_globalSearch_we3bi_19", ht = "_columnChooser_we3bi_23", bt = "_filterPanel_we3bi_24", vt = "_popoverHeader_we3bi_30", xt = "_popoverSearch_we3bi_52", yt = "_columnList_we3bi_56", jt = "_columnItem_we3bi_63", Ct = "_columnItemDragging_we3bi_79", St = "_columnItemDropTarget_we3bi_83", wt = "_columnItemContent_we3bi_88", Nt = "_dragHandle_we3bi_95", Rt = "_filterFields_we3bi_107", Et = "_filterField_we3bi_107", Tt = "_keywordHighlight_we3bi_122", kt = "_emptyState_we3bi_129", At = "_table_we3bi_136", x = {
|
|
439
|
+
container: ft,
|
|
440
|
+
toolbar: pt,
|
|
441
|
+
toolbarActions: _t,
|
|
442
|
+
globalSearch: gt,
|
|
443
|
+
columnChooser: ht,
|
|
444
|
+
filterPanel: bt,
|
|
445
|
+
popoverHeader: vt,
|
|
446
|
+
popoverSearch: xt,
|
|
447
|
+
columnList: yt,
|
|
448
|
+
columnItem: jt,
|
|
449
|
+
columnItemDragging: Ct,
|
|
450
|
+
columnItemDropTarget: St,
|
|
451
|
+
columnItemContent: wt,
|
|
452
|
+
dragHandle: Nt,
|
|
453
|
+
filterFields: Rt,
|
|
454
|
+
filterField: Et,
|
|
455
|
+
keywordHighlight: Tt,
|
|
456
|
+
emptyState: kt,
|
|
457
|
+
table: At
|
|
458
|
+
}, It = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Pt = (t, r, i) => !r || typeof t != "string" && typeof t != "number" ? t : String(t).split(r).map(
|
|
459
|
+
(a, u) => r.test(a) ? /* @__PURE__ */ n.jsx("mark", { className: i, children: a }, `${a}-${u}`) : a
|
|
460
|
+
), xe = (t) => "children" in t, Ot = (t, r) => t.key !== void 0 ? String(t.key) : t.dataIndex !== void 0 ? Array.isArray(t.dataIndex) ? t.dataIndex.join(".") : String(t.dataIndex) : `column-${r}`, ce = (t, r) => typeof t.title == "string" || typeof t.title == "number" ? String(t.title) : r, W = (t, r) => r === void 0 ? void 0 : (Array.isArray(r) ? r : [r]).reduce((a, u) => {
|
|
461
|
+
if (!(a === null || typeof a != "object") && !(typeof u != "string" && typeof u != "number" && typeof u != "symbol"))
|
|
462
|
+
return a[u];
|
|
463
|
+
}, t), G = (t) => String(t ?? "").toLocaleLowerCase(), Dt = (t, r) => typeof t == "number" && typeof r == "number" ? t - r : String(t ?? "").localeCompare(String(r ?? ""), void 0, {
|
|
464
|
+
numeric: !0,
|
|
465
|
+
sensitivity: "base"
|
|
466
|
+
}), dr = ({
|
|
467
|
+
fullWidth: t,
|
|
468
|
+
enableColumnFeatures: r = !0,
|
|
469
|
+
enableGlobalSearch: i = !0,
|
|
470
|
+
enableMultiColumnFiltering: a = !0,
|
|
471
|
+
className: u,
|
|
472
|
+
columns: d,
|
|
473
|
+
dataSource: _,
|
|
474
|
+
pagination: S,
|
|
475
|
+
style: A,
|
|
476
|
+
...J
|
|
477
|
+
}) => {
|
|
478
|
+
const [$, I] = R(
|
|
479
|
+
() => /* @__PURE__ */ new Set()
|
|
480
|
+
), [Y, P] = R([]), [F, H] = R(""), [O, M] = R(null), [z, q] = R(
|
|
481
|
+
null
|
|
482
|
+
), [U, y] = R(""), [b, j] = R(
|
|
483
|
+
{}
|
|
484
|
+
), X = T(() => S === !1 ? !1 : {
|
|
485
|
+
pageSize: 10,
|
|
486
|
+
showSizeChanger: !0,
|
|
487
|
+
showQuickJumper: !0,
|
|
488
|
+
hideOnSinglePage: !1,
|
|
489
|
+
showTotal: (o, l) => `${l[0]}-${l[1]} of ${o} items`,
|
|
490
|
+
...S
|
|
491
|
+
}, [S]), w = T(() => d ? d.flatMap(
|
|
492
|
+
(o, l) => xe(o) ? [] : [{ column: o, id: Ot(o, l) }]
|
|
493
|
+
) : [], [d]), D = T(
|
|
494
|
+
() => new Map(w.map((o) => [o.id, o])),
|
|
495
|
+
[w]
|
|
496
|
+
), B = T(
|
|
497
|
+
() => (d == null ? void 0 : d.some((o) => xe(o))) ?? !1,
|
|
498
|
+
[d]
|
|
499
|
+
), p = T(
|
|
500
|
+
() => w.filter((o) => o.column.dataIndex !== void 0),
|
|
501
|
+
[w]
|
|
502
|
+
), v = T(() => {
|
|
503
|
+
const o = w.map((s) => s.id), l = Y.filter((s) => o.includes(s));
|
|
504
|
+
return [...l, ...o.filter((s) => !l.includes(s))];
|
|
505
|
+
}, [w, Y]), V = T(() => {
|
|
506
|
+
const o = G(F).trim();
|
|
507
|
+
return v.flatMap((l) => {
|
|
508
|
+
const s = D.get(l);
|
|
509
|
+
if (!s)
|
|
510
|
+
return [];
|
|
511
|
+
const f = ce(s.column, l);
|
|
512
|
+
return o && !G(f).includes(o) ? [] : [s];
|
|
513
|
+
});
|
|
514
|
+
}, [D, F, v]), Q = T(() => {
|
|
515
|
+
if (!_ || p.length === 0)
|
|
516
|
+
return _;
|
|
517
|
+
const o = G(U).trim(), l = p.filter(
|
|
518
|
+
({ id: s }) => {
|
|
519
|
+
var f;
|
|
520
|
+
return !!((f = b[s]) != null && f.trim());
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
return !o && l.length === 0 ? _ : _.filter((s) => {
|
|
524
|
+
const f = !o || p.some(
|
|
525
|
+
({ column: L }) => G(W(s, L.dataIndex)).includes(
|
|
526
|
+
o
|
|
527
|
+
)
|
|
528
|
+
), N = l.every(
|
|
529
|
+
({ column: L, id: C }) => G(W(s, L.dataIndex)).includes(
|
|
530
|
+
G(b[C]).trim()
|
|
531
|
+
)
|
|
532
|
+
);
|
|
533
|
+
return f && N;
|
|
534
|
+
});
|
|
535
|
+
}, [_, p, U, b]), Z = T(() => {
|
|
536
|
+
const o = Array.from(
|
|
537
|
+
new Set(
|
|
538
|
+
[U, ...Object.values(b)].map((l) => l.trim()).filter(Boolean).sort((l, s) => s.length - l.length)
|
|
539
|
+
)
|
|
540
|
+
);
|
|
541
|
+
return o.length > 0 ? new RegExp(`(${o.map(It).join("|")})`, "i") : void 0;
|
|
542
|
+
}, [U, b]), te = T(() => !d || !r || B ? d : v.flatMap((o) => {
|
|
543
|
+
var L;
|
|
544
|
+
if ($.has(o))
|
|
545
|
+
return [];
|
|
546
|
+
const l = (L = D.get(o)) == null ? void 0 : L.column;
|
|
547
|
+
if (!l)
|
|
548
|
+
return [];
|
|
549
|
+
const s = l.dataIndex;
|
|
550
|
+
if (s === void 0)
|
|
551
|
+
return [l];
|
|
552
|
+
const N = Array.from(
|
|
553
|
+
new Set(
|
|
554
|
+
(_ ?? []).map((C) => W(C, s)).filter((C) => C != null)
|
|
555
|
+
)
|
|
556
|
+
).map((C) => ({
|
|
557
|
+
text: String(C),
|
|
558
|
+
value: String(C)
|
|
559
|
+
}));
|
|
560
|
+
return [
|
|
561
|
+
{
|
|
562
|
+
...l,
|
|
563
|
+
render: l.render ?? ((C) => Pt(
|
|
564
|
+
C,
|
|
565
|
+
Z,
|
|
566
|
+
x.keywordHighlight
|
|
567
|
+
)),
|
|
568
|
+
...l.sorter === void 0 ? {
|
|
569
|
+
sorter: (C, le) => Dt(
|
|
570
|
+
W(C, s),
|
|
571
|
+
W(le, s)
|
|
572
|
+
)
|
|
573
|
+
} : {},
|
|
574
|
+
...l.filters === void 0 && l.onFilter === void 0 && l.filterDropdown === void 0 && N.length > 0 ? {
|
|
575
|
+
filterSearch: !0,
|
|
576
|
+
filters: N,
|
|
577
|
+
onFilter: (C, le) => String(W(le, s)) === String(C)
|
|
578
|
+
} : {}
|
|
579
|
+
}
|
|
580
|
+
];
|
|
581
|
+
}), [
|
|
582
|
+
D,
|
|
583
|
+
d,
|
|
584
|
+
_,
|
|
585
|
+
r,
|
|
586
|
+
B,
|
|
587
|
+
$,
|
|
588
|
+
Z,
|
|
589
|
+
v
|
|
590
|
+
]), re = (o) => {
|
|
591
|
+
I((l) => {
|
|
592
|
+
const s = new Set(l);
|
|
593
|
+
return s.has(o) ? s.delete(o) : s.add(o), s;
|
|
594
|
+
});
|
|
595
|
+
}, ne = (o, l) => {
|
|
596
|
+
P(() => {
|
|
597
|
+
const s = v.indexOf(o), f = v.indexOf(l);
|
|
598
|
+
if (s < 0 || f < 0 || s === f)
|
|
599
|
+
return v;
|
|
600
|
+
const N = [...v];
|
|
601
|
+
return N.splice(s, 1), N.splice(
|
|
602
|
+
s < f ? f - 1 : f,
|
|
603
|
+
0,
|
|
604
|
+
o
|
|
605
|
+
), N;
|
|
606
|
+
});
|
|
607
|
+
}, oe = () => {
|
|
608
|
+
I(/* @__PURE__ */ new Set()), P([]), H("");
|
|
609
|
+
}, e = (o, l) => {
|
|
610
|
+
j((s) => ({
|
|
611
|
+
...s,
|
|
612
|
+
[o]: l
|
|
613
|
+
}));
|
|
614
|
+
}, c = r && w.length > 0 && !B ? /* @__PURE__ */ n.jsx(
|
|
615
|
+
me,
|
|
616
|
+
{
|
|
617
|
+
trigger: "click",
|
|
618
|
+
placement: "bottomRight",
|
|
619
|
+
content: /* @__PURE__ */ n.jsxs("div", { className: x.columnChooser, children: [
|
|
620
|
+
/* @__PURE__ */ n.jsxs("div", { className: x.popoverHeader, children: [
|
|
621
|
+
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
622
|
+
/* @__PURE__ */ n.jsx("strong", { children: "Manage columns" }),
|
|
623
|
+
/* @__PURE__ */ n.jsx("span", { children: "Choose visibility and order" })
|
|
624
|
+
] }),
|
|
625
|
+
/* @__PURE__ */ n.jsx(ae, { size: "small", type: "link", onClick: oe, children: "Reset" })
|
|
626
|
+
] }),
|
|
627
|
+
/* @__PURE__ */ n.jsx(
|
|
628
|
+
ie,
|
|
629
|
+
{
|
|
630
|
+
className: x.popoverSearch,
|
|
631
|
+
value: F,
|
|
632
|
+
allowClear: !0,
|
|
633
|
+
placeholder: "Search columns",
|
|
634
|
+
prefix: /* @__PURE__ */ n.jsx(fe, {}),
|
|
635
|
+
onChange: (o) => H(o.target.value)
|
|
636
|
+
}
|
|
637
|
+
),
|
|
638
|
+
/* @__PURE__ */ n.jsx("div", { className: x.columnList, role: "list", children: V.length > 0 ? V.map((o) => {
|
|
639
|
+
const l = ce(o.column, o.id);
|
|
640
|
+
return /* @__PURE__ */ n.jsx(
|
|
641
|
+
"div",
|
|
642
|
+
{
|
|
643
|
+
"aria-label": `Drag ${l} to change column order`,
|
|
644
|
+
className: h(x.columnItem, {
|
|
645
|
+
[x.columnItemDragging]: O === o.id,
|
|
646
|
+
[x.columnItemDropTarget]: z === o.id && O !== o.id
|
|
647
|
+
}),
|
|
648
|
+
draggable: !0,
|
|
649
|
+
role: "listitem",
|
|
650
|
+
onDragEnd: () => {
|
|
651
|
+
M(null), q(null);
|
|
652
|
+
},
|
|
653
|
+
onDragOver: (s) => {
|
|
654
|
+
s.preventDefault(), s.dataTransfer.dropEffect = "move", O !== o.id && q(o.id);
|
|
655
|
+
},
|
|
656
|
+
onDragStart: (s) => {
|
|
657
|
+
s.dataTransfer.effectAllowed = "move", s.dataTransfer.setData("text/plain", o.id), M(o.id);
|
|
658
|
+
},
|
|
659
|
+
onDrop: (s) => {
|
|
660
|
+
s.preventDefault();
|
|
661
|
+
const f = O ?? s.dataTransfer.getData("text/plain");
|
|
662
|
+
f && f !== o.id && ne(f, o.id), M(null), q(null);
|
|
663
|
+
},
|
|
664
|
+
children: /* @__PURE__ */ n.jsxs("div", { className: x.columnItemContent, children: [
|
|
665
|
+
/* @__PURE__ */ n.jsx("span", { className: x.dragHandle, "aria-hidden": "true", children: /* @__PURE__ */ n.jsx(Le, {}) }),
|
|
666
|
+
/* @__PURE__ */ n.jsx(
|
|
667
|
+
Oe,
|
|
668
|
+
{
|
|
669
|
+
checked: !$.has(o.id),
|
|
670
|
+
onChange: () => re(o.id),
|
|
671
|
+
children: l
|
|
672
|
+
}
|
|
673
|
+
)
|
|
674
|
+
] })
|
|
675
|
+
},
|
|
676
|
+
o.id
|
|
677
|
+
);
|
|
678
|
+
}) : /* @__PURE__ */ n.jsx("p", { className: x.emptyState, children: "No matching columns" }) })
|
|
679
|
+
] }),
|
|
680
|
+
children: /* @__PURE__ */ n.jsx(ae, { icon: /* @__PURE__ */ n.jsx(Be, {}), size: "small", type: "text", children: "Columns" })
|
|
681
|
+
}
|
|
682
|
+
) : null, m = a && p.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
683
|
+
me,
|
|
684
|
+
{
|
|
685
|
+
trigger: "click",
|
|
686
|
+
placement: "bottomRight",
|
|
687
|
+
content: /* @__PURE__ */ n.jsxs("div", { className: x.filterPanel, children: [
|
|
688
|
+
/* @__PURE__ */ n.jsxs("div", { className: x.popoverHeader, children: [
|
|
689
|
+
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
690
|
+
/* @__PURE__ */ n.jsx("strong", { children: "Filter rows" }),
|
|
691
|
+
/* @__PURE__ */ n.jsx("span", { children: "Match all conditions" })
|
|
692
|
+
] }),
|
|
693
|
+
/* @__PURE__ */ n.jsx(ae, { size: "small", type: "link", onClick: () => j({}), children: "Clear" })
|
|
694
|
+
] }),
|
|
695
|
+
/* @__PURE__ */ n.jsx("div", { className: x.filterFields, children: p.map((o) => {
|
|
696
|
+
const l = ce(o.column, o.id);
|
|
697
|
+
return /* @__PURE__ */ n.jsxs("label", { className: x.filterField, children: [
|
|
698
|
+
/* @__PURE__ */ n.jsx("span", { children: l }),
|
|
699
|
+
/* @__PURE__ */ n.jsx(
|
|
700
|
+
ie,
|
|
701
|
+
{
|
|
702
|
+
value: b[o.id] ?? "",
|
|
703
|
+
allowClear: !0,
|
|
704
|
+
placeholder: `Filter ${l}`,
|
|
705
|
+
onChange: (s) => e(o.id, s.target.value)
|
|
706
|
+
}
|
|
707
|
+
)
|
|
708
|
+
] }, o.id);
|
|
709
|
+
}) })
|
|
710
|
+
] }),
|
|
711
|
+
children: /* @__PURE__ */ n.jsx(ae, { icon: /* @__PURE__ */ n.jsx(Ye, {}), size: "small", type: "text", children: "Filters" })
|
|
712
|
+
}
|
|
713
|
+
) : null, g = i && p.length > 0 || m || c ? /* @__PURE__ */ n.jsxs("div", { className: x.toolbar, children: [
|
|
714
|
+
i && p.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
715
|
+
ie,
|
|
716
|
+
{
|
|
717
|
+
className: x.globalSearch,
|
|
718
|
+
value: U,
|
|
719
|
+
allowClear: !0,
|
|
720
|
+
placeholder: "Search all columns",
|
|
721
|
+
prefix: /* @__PURE__ */ n.jsx(fe, {}),
|
|
722
|
+
onChange: (o) => y(o.target.value)
|
|
723
|
+
}
|
|
724
|
+
) : /* @__PURE__ */ n.jsx("span", {}),
|
|
725
|
+
/* @__PURE__ */ n.jsxs("div", { className: x.toolbarActions, children: [
|
|
726
|
+
m,
|
|
727
|
+
c
|
|
728
|
+
] })
|
|
729
|
+
] }) : null;
|
|
730
|
+
return /* @__PURE__ */ n.jsxs("div", { className: x.container, children: [
|
|
731
|
+
g,
|
|
732
|
+
/* @__PURE__ */ n.jsx(
|
|
733
|
+
De,
|
|
734
|
+
{
|
|
735
|
+
...J,
|
|
736
|
+
columns: te,
|
|
737
|
+
dataSource: Q,
|
|
738
|
+
pagination: X,
|
|
739
|
+
className: h(x.table, u),
|
|
740
|
+
style: { ...t ? { width: "100%" } : {}, ...A }
|
|
741
|
+
}
|
|
742
|
+
)
|
|
743
|
+
] });
|
|
744
|
+
}, $t = "_loading_10h4y_1", Ft = "_fullScreen_10h4y_9", zt = "_overlayContainer_10h4y_16", Ut = "_overlay_10h4y_16", Ht = "_content_10h4y_27", Mt = "_logo_10h4y_33", Bt = "_dots_10h4y_39", Lt = "_dot_10h4y_39", E = {
|
|
745
|
+
loading: $t,
|
|
746
|
+
fullScreen: Ft,
|
|
747
|
+
overlayContainer: zt,
|
|
748
|
+
overlay: Ut,
|
|
749
|
+
content: Ht,
|
|
750
|
+
logo: Mt,
|
|
751
|
+
dots: Bt,
|
|
752
|
+
dot: Lt
|
|
753
|
+
}, mr = ({
|
|
754
|
+
fullScreen: t = !1,
|
|
755
|
+
overlay: r = !1,
|
|
756
|
+
children: i,
|
|
757
|
+
logoSrc: a,
|
|
758
|
+
logoAlt: u = "",
|
|
759
|
+
logoWidth: d = 160,
|
|
760
|
+
label: _ = "Loading",
|
|
761
|
+
className: S
|
|
762
|
+
}) => {
|
|
763
|
+
const A = /* @__PURE__ */ n.jsx(
|
|
764
|
+
"div",
|
|
765
|
+
{
|
|
766
|
+
"aria-label": _,
|
|
767
|
+
"aria-live": "polite",
|
|
768
|
+
className: h(
|
|
769
|
+
E.loading,
|
|
770
|
+
{ [E.fullScreen]: t && !r, [E.overlay]: r },
|
|
771
|
+
S
|
|
772
|
+
),
|
|
773
|
+
role: "status",
|
|
774
|
+
children: /* @__PURE__ */ n.jsxs("div", { className: E.content, style: { width: d }, children: [
|
|
775
|
+
a ? /* @__PURE__ */ n.jsx("img", { alt: u, className: E.logo, src: a }) : null,
|
|
776
|
+
/* @__PURE__ */ n.jsxs("div", { "aria-hidden": "true", className: E.dots, children: [
|
|
777
|
+
/* @__PURE__ */ n.jsx("span", { className: E.dot }),
|
|
778
|
+
/* @__PURE__ */ n.jsx("span", { className: E.dot }),
|
|
779
|
+
/* @__PURE__ */ n.jsx("span", { className: E.dot }),
|
|
780
|
+
/* @__PURE__ */ n.jsx("span", { className: E.dot })
|
|
781
|
+
] })
|
|
782
|
+
] })
|
|
783
|
+
}
|
|
784
|
+
);
|
|
785
|
+
return r ? /* @__PURE__ */ n.jsxs("div", { className: E.overlayContainer, children: [
|
|
786
|
+
i,
|
|
787
|
+
A
|
|
788
|
+
] }) : A;
|
|
789
|
+
}, Yt = "_inputNumber_121a8_1", qt = {
|
|
790
|
+
inputNumber: Yt
|
|
791
|
+
}, fr = ({
|
|
792
|
+
fullWidth: t,
|
|
793
|
+
className: r,
|
|
794
|
+
style: i,
|
|
795
|
+
...a
|
|
796
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
797
|
+
$e,
|
|
798
|
+
{
|
|
799
|
+
...a,
|
|
800
|
+
className: h(qt.inputNumber, r),
|
|
801
|
+
style: { ...t ? { width: "100%" } : {}, ...i }
|
|
802
|
+
}
|
|
803
|
+
), Vt = "_datePicker_zf87q_1", Wt = {
|
|
804
|
+
datePicker: Vt
|
|
805
|
+
}, pr = ({
|
|
806
|
+
fullWidth: t,
|
|
807
|
+
className: r,
|
|
808
|
+
style: i,
|
|
809
|
+
...a
|
|
810
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
811
|
+
Fe,
|
|
812
|
+
{
|
|
813
|
+
...a,
|
|
814
|
+
className: h(Wt.datePicker, r),
|
|
815
|
+
style: { ...t ? { width: "100%" } : {}, ...i }
|
|
816
|
+
}
|
|
817
|
+
), Gt = "_timePicker_1usbo_1", Jt = {
|
|
818
|
+
timePicker: Gt
|
|
819
|
+
}, _r = ({
|
|
820
|
+
fullWidth: t,
|
|
821
|
+
className: r,
|
|
822
|
+
style: i,
|
|
823
|
+
...a
|
|
824
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
825
|
+
ze,
|
|
826
|
+
{
|
|
827
|
+
...a,
|
|
828
|
+
className: h(Jt.timePicker, r),
|
|
829
|
+
style: { ...t ? { width: "100%" } : {}, ...i }
|
|
830
|
+
}
|
|
831
|
+
), Xt = "_radio_16nmm_1", Qt = "_radioButton_16nmm_2", Zt = "_group_16nmm_3", de = {
|
|
832
|
+
radio: Xt,
|
|
833
|
+
radioButton: Qt,
|
|
834
|
+
group: Zt
|
|
835
|
+
}, gr = ({ className: t, ...r }) => /* @__PURE__ */ n.jsx(ue, { ...r, className: h(de.radio, t) }), hr = ({ className: t, ...r }) => /* @__PURE__ */ n.jsx(ue.Button, { ...r, className: h(de.radioButton, t) }), br = ({
|
|
836
|
+
fullWidth: t,
|
|
837
|
+
className: r,
|
|
838
|
+
style: i,
|
|
839
|
+
...a
|
|
840
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
841
|
+
ue.Group,
|
|
842
|
+
{
|
|
843
|
+
...a,
|
|
844
|
+
className: h(de.group, r),
|
|
845
|
+
style: { ...t ? { width: "100%" } : {}, ...i }
|
|
846
|
+
}
|
|
847
|
+
), Kt = "_treeSelect_16xy2_1", er = "_popup_16xy2_10", ye = {
|
|
848
|
+
treeSelect: Kt,
|
|
849
|
+
popup: er
|
|
850
|
+
}, vr = ({
|
|
851
|
+
fullWidth: t,
|
|
852
|
+
className: r,
|
|
853
|
+
popupClassName: i,
|
|
854
|
+
style: a,
|
|
855
|
+
...u
|
|
856
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
857
|
+
Ue,
|
|
858
|
+
{
|
|
859
|
+
...u,
|
|
860
|
+
className: h(ye.treeSelect, r),
|
|
861
|
+
popupClassName: h(ye.popup, i),
|
|
862
|
+
style: { ...t ? { width: "100%" } : {}, ...a }
|
|
863
|
+
}
|
|
864
|
+
), tr = "_upload_wwgt2_1", rr = "_dragger_wwgt2_2", Se = {
|
|
865
|
+
upload: tr,
|
|
866
|
+
dragger: rr
|
|
867
|
+
}, xr = ({ className: t, ...r }) => /* @__PURE__ */ n.jsx(je, { ...r, className: h(Se.upload, t) }), yr = ({ className: t, ...r }) => /* @__PURE__ */ n.jsx(je.Dragger, { ...r, className: h(Se.dragger, t) }), nr = {
|
|
868
|
+
Button: {
|
|
869
|
+
borderRadius: 8,
|
|
870
|
+
controlHeight: 40
|
|
871
|
+
},
|
|
872
|
+
Input: {
|
|
873
|
+
borderRadius: 8,
|
|
874
|
+
controlHeight: 40,
|
|
875
|
+
hoverBorderColor: "#000000",
|
|
876
|
+
activeBorderColor: "#000000",
|
|
877
|
+
activeShadow: "0 0 0 2px rgb(0 0 0 / 12%)"
|
|
878
|
+
},
|
|
879
|
+
Select: {
|
|
880
|
+
borderRadius: 8,
|
|
881
|
+
controlHeight: 40,
|
|
882
|
+
hoverBorderColor: "#000000",
|
|
883
|
+
activeBorderColor: "#000000",
|
|
884
|
+
activeOutlineColor: "rgb(0 0 0 / 12%)",
|
|
885
|
+
optionSelectedBg: "#404040",
|
|
886
|
+
optionSelectedColor: "#ffffff"
|
|
887
|
+
},
|
|
888
|
+
Modal: {},
|
|
889
|
+
Table: {}
|
|
890
|
+
}, or = {
|
|
891
|
+
colorPrimary: "#1677ff",
|
|
892
|
+
borderRadius: 8,
|
|
893
|
+
controlHeight: 40
|
|
894
|
+
}, sr = {
|
|
895
|
+
token: or,
|
|
896
|
+
components: nr
|
|
897
|
+
}, jr = ({ children: t, theme: r }) => /* @__PURE__ */ n.jsx(He, { theme: r ?? sr, children: /* @__PURE__ */ n.jsx(Me, { children: t }) });
|
|
898
|
+
export {
|
|
899
|
+
ae as CustomButton,
|
|
900
|
+
pr as CustomDatePicker,
|
|
901
|
+
ie as CustomInput,
|
|
902
|
+
fr as CustomInputNumber,
|
|
903
|
+
mr as CustomLoading,
|
|
904
|
+
ur as CustomModal,
|
|
905
|
+
gr as CustomRadio,
|
|
906
|
+
hr as CustomRadioButton,
|
|
907
|
+
br as CustomRadioGroup,
|
|
908
|
+
tt as CustomSelect,
|
|
909
|
+
dr as CustomTable,
|
|
910
|
+
jr as CustomThemeProvider,
|
|
911
|
+
_r as CustomTimePicker,
|
|
912
|
+
vr as CustomTreeSelect,
|
|
913
|
+
xr as CustomUpload,
|
|
914
|
+
yr as CustomUploadDragger,
|
|
915
|
+
cr as CustomUserSelect,
|
|
916
|
+
or as baseTokens,
|
|
917
|
+
nr as componentTokens,
|
|
918
|
+
sr as dtoTheme
|
|
919
|
+
};
|