denwa-react-shared 1.0.19 → 1.0.21
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/denwa-react-shared.cjs.js +1 -442
- package/dist/denwa-react-shared.css +1 -1
- package/dist/denwa-react-shared.es.js +56 -64032
- package/dist/denwa-react-shared.umd.js +1750 -175
- package/dist/index-C9_FuY9g.cjs +2017 -0
- package/dist/index-DiC1uMp3.js +237858 -0
- package/dist/shared/ui/index.d.ts +2 -0
- package/dist/table-head-BwYEg8qE-B-KDj-et-DM8pxHve.cjs +1 -0
- package/dist/table-head-BwYEg8qE-B-KDj-et-cNKgPHwr.js +669 -0
- package/dist/table-head-DRm_2s2D.cjs +1 -0
- package/dist/table-head-DhiARHac-B8sucMHE.cjs +1 -0
- package/dist/table-head-DhiARHac-DCJED23g.js +669 -0
- package/dist/table-head-KbqJOlmi.js +669 -0
- package/package.json +1 -1
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
import { _ as F, u as Ce, C as Re, a as G, c as X, b as de, d as je, e as Oe, o as Ne, f as ie, g as L, h as ue, i as Me, m as Ie, r as Ee, j as He, k as B, l as Pe, t as De, n as Ve, p as Be, q as Te, I as Ae, s as ze, z as _e, H as Fe, v as Ke, w as Le, x as v, F as U, y as W, S as Q, A as We, B as Xe, D as qe, Y as Ue, T as J, E as oe, R as Ge } from "./index-DiC1uMp3.js";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { useState as Ye, useMemo as Je, cloneElement as Qe } from "react";
|
|
4
|
+
var le = function(t, n) {
|
|
5
|
+
if (!t) return null;
|
|
6
|
+
var a = {
|
|
7
|
+
left: t.offsetLeft,
|
|
8
|
+
right: t.parentElement.clientWidth - t.clientWidth - t.offsetLeft,
|
|
9
|
+
width: t.clientWidth,
|
|
10
|
+
top: t.offsetTop,
|
|
11
|
+
bottom: t.parentElement.clientHeight - t.clientHeight - t.offsetTop,
|
|
12
|
+
height: t.clientHeight
|
|
13
|
+
};
|
|
14
|
+
return n ? {
|
|
15
|
+
left: 0,
|
|
16
|
+
right: 0,
|
|
17
|
+
width: 0,
|
|
18
|
+
top: a.top,
|
|
19
|
+
bottom: a.bottom,
|
|
20
|
+
height: a.height
|
|
21
|
+
} : {
|
|
22
|
+
left: a.left,
|
|
23
|
+
right: a.right,
|
|
24
|
+
width: a.width,
|
|
25
|
+
top: 0,
|
|
26
|
+
bottom: 0,
|
|
27
|
+
height: 0
|
|
28
|
+
};
|
|
29
|
+
}, D = function(t) {
|
|
30
|
+
return t !== void 0 ? "".concat(t, "px") : void 0;
|
|
31
|
+
};
|
|
32
|
+
function Ze(e) {
|
|
33
|
+
var t = e.prefixCls, n = e.containerRef, a = e.value, o = e.getValueIndex, r = e.motionName, p = e.onMotionStart, h = e.onMotionEnd, b = e.direction, x = e.vertical, d = x === void 0 ? !1 : x, w = i.useRef(null), C = i.useState(a), R = F(C, 2), f = R[0], I = R[1], j = function(H) {
|
|
34
|
+
var u, _ = o(H), P = (u = n.current) === null || u === void 0 ? void 0 : u.querySelectorAll(".".concat(t, "-item"))[_];
|
|
35
|
+
return (P == null ? void 0 : P.offsetParent) && P;
|
|
36
|
+
}, N = i.useState(null), m = F(N, 2), l = m[0], M = m[1], T = i.useState(null), S = F(T, 2), s = S[0], E = S[1];
|
|
37
|
+
Ce(function() {
|
|
38
|
+
if (f !== a) {
|
|
39
|
+
var c = j(f), H = j(a), u = le(c, d), _ = le(H, d);
|
|
40
|
+
I(a), M(u), E(_), c && H ? p() : h();
|
|
41
|
+
}
|
|
42
|
+
}, [a]);
|
|
43
|
+
var y = i.useMemo(function() {
|
|
44
|
+
if (d) {
|
|
45
|
+
var c;
|
|
46
|
+
return D((c = l == null ? void 0 : l.top) !== null && c !== void 0 ? c : 0);
|
|
47
|
+
}
|
|
48
|
+
return D(b === "rtl" ? -(l == null ? void 0 : l.right) : l == null ? void 0 : l.left);
|
|
49
|
+
}, [d, b, l]), O = i.useMemo(function() {
|
|
50
|
+
if (d) {
|
|
51
|
+
var c;
|
|
52
|
+
return D((c = s == null ? void 0 : s.top) !== null && c !== void 0 ? c : 0);
|
|
53
|
+
}
|
|
54
|
+
return D(b === "rtl" ? -(s == null ? void 0 : s.right) : s == null ? void 0 : s.left);
|
|
55
|
+
}, [d, b, s]), A = function() {
|
|
56
|
+
return d ? {
|
|
57
|
+
transform: "translateY(var(--thumb-start-top))",
|
|
58
|
+
height: "var(--thumb-start-height)"
|
|
59
|
+
} : {
|
|
60
|
+
transform: "translateX(var(--thumb-start-left))",
|
|
61
|
+
width: "var(--thumb-start-width)"
|
|
62
|
+
};
|
|
63
|
+
}, V = function() {
|
|
64
|
+
return d ? {
|
|
65
|
+
transform: "translateY(var(--thumb-active-top))",
|
|
66
|
+
height: "var(--thumb-active-height)"
|
|
67
|
+
} : {
|
|
68
|
+
transform: "translateX(var(--thumb-active-left))",
|
|
69
|
+
width: "var(--thumb-active-width)"
|
|
70
|
+
};
|
|
71
|
+
}, z = function() {
|
|
72
|
+
M(null), E(null), h();
|
|
73
|
+
};
|
|
74
|
+
return !l || !s ? null : /* @__PURE__ */ i.createElement(Re, {
|
|
75
|
+
visible: !0,
|
|
76
|
+
motionName: r,
|
|
77
|
+
motionAppear: !0,
|
|
78
|
+
onAppearStart: A,
|
|
79
|
+
onAppearActive: V,
|
|
80
|
+
onVisibleChanged: z
|
|
81
|
+
}, function(c, H) {
|
|
82
|
+
var u = c.className, _ = c.style, P = G(G({}, _), {}, {
|
|
83
|
+
"--thumb-start-left": y,
|
|
84
|
+
"--thumb-start-width": D(l == null ? void 0 : l.width),
|
|
85
|
+
"--thumb-active-left": O,
|
|
86
|
+
"--thumb-active-width": D(s == null ? void 0 : s.width),
|
|
87
|
+
"--thumb-start-top": y,
|
|
88
|
+
"--thumb-start-height": D(l == null ? void 0 : l.height),
|
|
89
|
+
"--thumb-active-top": O,
|
|
90
|
+
"--thumb-active-height": D(s == null ? void 0 : s.height)
|
|
91
|
+
}), q = {
|
|
92
|
+
ref: de(w, H),
|
|
93
|
+
style: P,
|
|
94
|
+
className: X("".concat(t, "-thumb"), u)
|
|
95
|
+
};
|
|
96
|
+
return process.env.NODE_ENV === "test" && (q["data-test-style"] = JSON.stringify(P)), /* @__PURE__ */ i.createElement("div", q);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
var ke = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "name", "onChange", "className", "motionName"];
|
|
100
|
+
function et(e) {
|
|
101
|
+
if (typeof e.title < "u")
|
|
102
|
+
return e.title;
|
|
103
|
+
if (ue(e.label) !== "object") {
|
|
104
|
+
var t;
|
|
105
|
+
return (t = e.label) === null || t === void 0 ? void 0 : t.toString();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function tt(e) {
|
|
109
|
+
return e.map(function(t) {
|
|
110
|
+
if (ue(t) === "object" && t !== null) {
|
|
111
|
+
var n = et(t);
|
|
112
|
+
return G(G({}, t), {}, {
|
|
113
|
+
title: n
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
label: t == null ? void 0 : t.toString(),
|
|
118
|
+
title: t == null ? void 0 : t.toString(),
|
|
119
|
+
value: t
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
var at = function(t) {
|
|
124
|
+
var n = t.prefixCls, a = t.className, o = t.disabled, r = t.checked, p = t.label, h = t.title, b = t.value, x = t.name, d = t.onChange, w = t.onFocus, C = t.onBlur, R = t.onKeyDown, f = t.onKeyUp, I = t.onMouseDown, j = function(m) {
|
|
125
|
+
o || d(m, b);
|
|
126
|
+
};
|
|
127
|
+
return /* @__PURE__ */ i.createElement("label", {
|
|
128
|
+
className: X(a, L({}, "".concat(n, "-item-disabled"), o)),
|
|
129
|
+
onMouseDown: I
|
|
130
|
+
}, /* @__PURE__ */ i.createElement("input", {
|
|
131
|
+
name: x,
|
|
132
|
+
className: "".concat(n, "-item-input"),
|
|
133
|
+
type: "radio",
|
|
134
|
+
disabled: o,
|
|
135
|
+
checked: r,
|
|
136
|
+
onChange: j,
|
|
137
|
+
onFocus: w,
|
|
138
|
+
onBlur: C,
|
|
139
|
+
onKeyDown: R,
|
|
140
|
+
onKeyUp: f
|
|
141
|
+
}), /* @__PURE__ */ i.createElement("div", {
|
|
142
|
+
className: "".concat(n, "-item-label"),
|
|
143
|
+
title: h,
|
|
144
|
+
"aria-selected": r
|
|
145
|
+
}, p));
|
|
146
|
+
}, me = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
147
|
+
var n, a, o = e.prefixCls, r = o === void 0 ? "rc-segmented" : o, p = e.direction, h = e.vertical, b = e.options, x = b === void 0 ? [] : b, d = e.disabled, w = e.defaultValue, C = e.value, R = e.name, f = e.onChange, I = e.className, j = I === void 0 ? "" : I, N = e.motionName, m = N === void 0 ? "thumb-motion" : N, l = je(e, ke), M = i.useRef(null), T = i.useMemo(function() {
|
|
148
|
+
return de(M, t);
|
|
149
|
+
}, [M, t]), S = i.useMemo(function() {
|
|
150
|
+
return tt(x);
|
|
151
|
+
}, [x]), s = Oe((n = S[0]) === null || n === void 0 ? void 0 : n.value, {
|
|
152
|
+
value: C,
|
|
153
|
+
defaultValue: w
|
|
154
|
+
}), E = F(s, 2), y = E[0], O = E[1], A = i.useState(!1), V = F(A, 2), z = V[0], c = V[1], H = function($, K) {
|
|
155
|
+
O(K), f == null || f(K);
|
|
156
|
+
}, u = Ne(l, ["children"]), _ = i.useState(!1), P = F(_, 2), q = P[0], k = P[1], ge = i.useState(!1), ee = F(ge, 2), he = ee[0], te = ee[1], be = function() {
|
|
157
|
+
te(!0);
|
|
158
|
+
}, pe = function() {
|
|
159
|
+
te(!1);
|
|
160
|
+
}, Se = function() {
|
|
161
|
+
k(!1);
|
|
162
|
+
}, xe = function($) {
|
|
163
|
+
$.key === "Tab" && k(!0);
|
|
164
|
+
}, ae = function($) {
|
|
165
|
+
var K = S.findIndex(function(we) {
|
|
166
|
+
return we.value === y;
|
|
167
|
+
}), ne = S.length, $e = (K + $ + ne) % ne, Y = S[$e];
|
|
168
|
+
Y && (O(Y.value), f == null || f(Y.value));
|
|
169
|
+
}, ye = function($) {
|
|
170
|
+
switch ($.key) {
|
|
171
|
+
case "ArrowLeft":
|
|
172
|
+
case "ArrowUp":
|
|
173
|
+
ae(-1);
|
|
174
|
+
break;
|
|
175
|
+
case "ArrowRight":
|
|
176
|
+
case "ArrowDown":
|
|
177
|
+
ae(1);
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
return /* @__PURE__ */ i.createElement("div", ie({
|
|
182
|
+
role: "radiogroup",
|
|
183
|
+
"aria-label": "segmented control",
|
|
184
|
+
tabIndex: d ? void 0 : 0
|
|
185
|
+
}, u, {
|
|
186
|
+
className: X(r, (a = {}, L(a, "".concat(r, "-rtl"), p === "rtl"), L(a, "".concat(r, "-disabled"), d), L(a, "".concat(r, "-vertical"), h), a), j),
|
|
187
|
+
ref: T
|
|
188
|
+
}), /* @__PURE__ */ i.createElement("div", {
|
|
189
|
+
className: "".concat(r, "-group")
|
|
190
|
+
}, /* @__PURE__ */ i.createElement(Ze, {
|
|
191
|
+
vertical: h,
|
|
192
|
+
prefixCls: r,
|
|
193
|
+
value: y,
|
|
194
|
+
containerRef: M,
|
|
195
|
+
motionName: "".concat(r, "-").concat(m),
|
|
196
|
+
direction: p,
|
|
197
|
+
getValueIndex: function($) {
|
|
198
|
+
return S.findIndex(function(K) {
|
|
199
|
+
return K.value === $;
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
onMotionStart: function() {
|
|
203
|
+
c(!0);
|
|
204
|
+
},
|
|
205
|
+
onMotionEnd: function() {
|
|
206
|
+
c(!1);
|
|
207
|
+
}
|
|
208
|
+
}), S.map(function(g) {
|
|
209
|
+
var $;
|
|
210
|
+
return /* @__PURE__ */ i.createElement(at, ie({}, g, {
|
|
211
|
+
name: R,
|
|
212
|
+
key: g.value,
|
|
213
|
+
prefixCls: r,
|
|
214
|
+
className: X(g.className, "".concat(r, "-item"), ($ = {}, L($, "".concat(r, "-item-selected"), g.value === y && !z), L($, "".concat(r, "-item-focused"), he && q && g.value === y), $)),
|
|
215
|
+
checked: g.value === y,
|
|
216
|
+
onChange: H,
|
|
217
|
+
onFocus: be,
|
|
218
|
+
onBlur: pe,
|
|
219
|
+
onKeyDown: ye,
|
|
220
|
+
onKeyUp: xe,
|
|
221
|
+
onMouseDown: Se,
|
|
222
|
+
disabled: !!d || !!g.disabled
|
|
223
|
+
}));
|
|
224
|
+
})));
|
|
225
|
+
});
|
|
226
|
+
process.env.NODE_ENV !== "production" && (me.displayName = "Segmented");
|
|
227
|
+
var nt = me;
|
|
228
|
+
function re(e, t) {
|
|
229
|
+
return {
|
|
230
|
+
[`${e}, ${e}:hover, ${e}:focus`]: {
|
|
231
|
+
color: t.colorTextDisabled,
|
|
232
|
+
cursor: "not-allowed"
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function se(e) {
|
|
237
|
+
return {
|
|
238
|
+
backgroundColor: e.itemSelectedBg,
|
|
239
|
+
boxShadow: e.boxShadowTertiary
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
const it = Object.assign({
|
|
243
|
+
overflow: "hidden"
|
|
244
|
+
}, De), ot = (e) => {
|
|
245
|
+
const {
|
|
246
|
+
componentCls: t
|
|
247
|
+
} = e, n = e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(), a = e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(), o = e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();
|
|
248
|
+
return {
|
|
249
|
+
[t]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Ee(e)), {
|
|
250
|
+
display: "inline-block",
|
|
251
|
+
padding: e.trackPadding,
|
|
252
|
+
color: e.itemColor,
|
|
253
|
+
background: e.trackBg,
|
|
254
|
+
borderRadius: e.borderRadius,
|
|
255
|
+
transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`
|
|
256
|
+
}), He(e)), {
|
|
257
|
+
[`${t}-group`]: {
|
|
258
|
+
position: "relative",
|
|
259
|
+
display: "flex",
|
|
260
|
+
alignItems: "stretch",
|
|
261
|
+
justifyItems: "flex-start",
|
|
262
|
+
flexDirection: "row",
|
|
263
|
+
width: "100%"
|
|
264
|
+
},
|
|
265
|
+
// RTL styles
|
|
266
|
+
[`&${t}-rtl`]: {
|
|
267
|
+
direction: "rtl"
|
|
268
|
+
},
|
|
269
|
+
[`&${t}-vertical`]: {
|
|
270
|
+
[`${t}-group`]: {
|
|
271
|
+
flexDirection: "column"
|
|
272
|
+
},
|
|
273
|
+
[`${t}-thumb`]: {
|
|
274
|
+
width: "100%",
|
|
275
|
+
height: 0,
|
|
276
|
+
padding: `0 ${B(e.paddingXXS)}`
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
// block styles
|
|
280
|
+
[`&${t}-block`]: {
|
|
281
|
+
display: "flex"
|
|
282
|
+
},
|
|
283
|
+
[`&${t}-block ${t}-item`]: {
|
|
284
|
+
flex: 1,
|
|
285
|
+
minWidth: 0
|
|
286
|
+
},
|
|
287
|
+
// item styles
|
|
288
|
+
[`${t}-item`]: {
|
|
289
|
+
position: "relative",
|
|
290
|
+
textAlign: "center",
|
|
291
|
+
cursor: "pointer",
|
|
292
|
+
transition: `color ${e.motionDurationMid} ${e.motionEaseInOut}`,
|
|
293
|
+
borderRadius: e.borderRadiusSM,
|
|
294
|
+
// Fix Safari render bug
|
|
295
|
+
// https://github.com/ant-design/ant-design/issues/45250
|
|
296
|
+
transform: "translateZ(0)",
|
|
297
|
+
"&-selected": Object.assign(Object.assign({}, se(e)), {
|
|
298
|
+
color: e.itemSelectedColor
|
|
299
|
+
}),
|
|
300
|
+
"&-focused": Object.assign({}, Pe(e)),
|
|
301
|
+
"&::after": {
|
|
302
|
+
content: '""',
|
|
303
|
+
position: "absolute",
|
|
304
|
+
zIndex: -1,
|
|
305
|
+
width: "100%",
|
|
306
|
+
height: "100%",
|
|
307
|
+
top: 0,
|
|
308
|
+
insetInlineStart: 0,
|
|
309
|
+
borderRadius: "inherit",
|
|
310
|
+
opacity: 0,
|
|
311
|
+
transition: `opacity ${e.motionDurationMid}`,
|
|
312
|
+
// This is mandatory to make it not clickable or hoverable
|
|
313
|
+
// Ref: https://github.com/ant-design/ant-design/issues/40888
|
|
314
|
+
pointerEvents: "none"
|
|
315
|
+
},
|
|
316
|
+
[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]: {
|
|
317
|
+
color: e.itemHoverColor,
|
|
318
|
+
"&::after": {
|
|
319
|
+
opacity: 1,
|
|
320
|
+
backgroundColor: e.itemHoverBg
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
[`&:active:not(${t}-item-selected):not(${t}-item-disabled)`]: {
|
|
324
|
+
color: e.itemHoverColor,
|
|
325
|
+
"&::after": {
|
|
326
|
+
opacity: 1,
|
|
327
|
+
backgroundColor: e.itemActiveBg
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"&-label": Object.assign({
|
|
331
|
+
minHeight: n,
|
|
332
|
+
lineHeight: B(n),
|
|
333
|
+
padding: `0 ${B(e.segmentedPaddingHorizontal)}`
|
|
334
|
+
}, it),
|
|
335
|
+
// syntactic sugar to add `icon` for Segmented Item
|
|
336
|
+
"&-icon + *": {
|
|
337
|
+
marginInlineStart: e.calc(e.marginSM).div(2).equal()
|
|
338
|
+
},
|
|
339
|
+
"&-input": {
|
|
340
|
+
position: "absolute",
|
|
341
|
+
insetBlockStart: 0,
|
|
342
|
+
insetInlineStart: 0,
|
|
343
|
+
width: 0,
|
|
344
|
+
height: 0,
|
|
345
|
+
opacity: 0,
|
|
346
|
+
pointerEvents: "none"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
// thumb styles
|
|
350
|
+
[`${t}-thumb`]: Object.assign(Object.assign({}, se(e)), {
|
|
351
|
+
position: "absolute",
|
|
352
|
+
insetBlockStart: 0,
|
|
353
|
+
insetInlineStart: 0,
|
|
354
|
+
width: 0,
|
|
355
|
+
height: "100%",
|
|
356
|
+
padding: `${B(e.paddingXXS)} 0`,
|
|
357
|
+
borderRadius: e.borderRadiusSM,
|
|
358
|
+
transition: `transform ${e.motionDurationSlow} ${e.motionEaseInOut}, height ${e.motionDurationSlow} ${e.motionEaseInOut}`,
|
|
359
|
+
[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]: {
|
|
360
|
+
backgroundColor: "transparent"
|
|
361
|
+
}
|
|
362
|
+
}),
|
|
363
|
+
// size styles
|
|
364
|
+
[`&${t}-lg`]: {
|
|
365
|
+
borderRadius: e.borderRadiusLG,
|
|
366
|
+
[`${t}-item-label`]: {
|
|
367
|
+
minHeight: a,
|
|
368
|
+
lineHeight: B(a),
|
|
369
|
+
padding: `0 ${B(e.segmentedPaddingHorizontal)}`,
|
|
370
|
+
fontSize: e.fontSizeLG
|
|
371
|
+
},
|
|
372
|
+
[`${t}-item, ${t}-thumb`]: {
|
|
373
|
+
borderRadius: e.borderRadius
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
[`&${t}-sm`]: {
|
|
377
|
+
borderRadius: e.borderRadiusSM,
|
|
378
|
+
[`${t}-item-label`]: {
|
|
379
|
+
minHeight: o,
|
|
380
|
+
lineHeight: B(o),
|
|
381
|
+
padding: `0 ${B(e.segmentedPaddingHorizontalSM)}`
|
|
382
|
+
},
|
|
383
|
+
[`${t}-item, ${t}-thumb`]: {
|
|
384
|
+
borderRadius: e.borderRadiusXS
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}), re(`&-disabled ${t}-item`, e)), re(`${t}-item-disabled`, e)), {
|
|
388
|
+
// transition effect when `appear-active`
|
|
389
|
+
[`${t}-thumb-motion-appear-active`]: {
|
|
390
|
+
transition: `transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,
|
|
391
|
+
willChange: "transform, width"
|
|
392
|
+
},
|
|
393
|
+
[`&${t}-shape-round`]: {
|
|
394
|
+
borderRadius: 9999,
|
|
395
|
+
[`${t}-item, ${t}-thumb`]: {
|
|
396
|
+
borderRadius: 9999
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
})
|
|
400
|
+
};
|
|
401
|
+
}, lt = (e) => {
|
|
402
|
+
const {
|
|
403
|
+
colorTextLabel: t,
|
|
404
|
+
colorText: n,
|
|
405
|
+
colorFillSecondary: a,
|
|
406
|
+
colorBgElevated: o,
|
|
407
|
+
colorFill: r,
|
|
408
|
+
lineWidthBold: p,
|
|
409
|
+
colorBgLayout: h
|
|
410
|
+
} = e;
|
|
411
|
+
return {
|
|
412
|
+
trackPadding: p,
|
|
413
|
+
trackBg: h,
|
|
414
|
+
itemColor: t,
|
|
415
|
+
itemHoverColor: n,
|
|
416
|
+
itemHoverBg: a,
|
|
417
|
+
itemSelectedBg: o,
|
|
418
|
+
itemActiveBg: r,
|
|
419
|
+
itemSelectedColor: n
|
|
420
|
+
};
|
|
421
|
+
}, rt = Me("Segmented", (e) => {
|
|
422
|
+
const {
|
|
423
|
+
lineWidth: t,
|
|
424
|
+
calc: n
|
|
425
|
+
} = e, a = Ie(e, {
|
|
426
|
+
segmentedPaddingHorizontal: n(e.controlPaddingHorizontal).sub(t).equal(),
|
|
427
|
+
segmentedPaddingHorizontalSM: n(e.controlPaddingHorizontalSM).sub(t).equal()
|
|
428
|
+
});
|
|
429
|
+
return [ot(a)];
|
|
430
|
+
}, lt);
|
|
431
|
+
var ce = function(e, t) {
|
|
432
|
+
var n = {};
|
|
433
|
+
for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
|
|
434
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, a = Object.getOwnPropertySymbols(e); o < a.length; o++)
|
|
435
|
+
t.indexOf(a[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[o]) && (n[a[o]] = e[a[o]]);
|
|
436
|
+
return n;
|
|
437
|
+
};
|
|
438
|
+
function st(e) {
|
|
439
|
+
return typeof e == "object" && !!(e != null && e.icon);
|
|
440
|
+
}
|
|
441
|
+
const ct = /* @__PURE__ */ i.forwardRef((e, t) => {
|
|
442
|
+
const n = Ve(), {
|
|
443
|
+
prefixCls: a,
|
|
444
|
+
className: o,
|
|
445
|
+
rootClassName: r,
|
|
446
|
+
block: p,
|
|
447
|
+
options: h = [],
|
|
448
|
+
size: b = "middle",
|
|
449
|
+
style: x,
|
|
450
|
+
vertical: d,
|
|
451
|
+
shape: w = "default",
|
|
452
|
+
name: C = n
|
|
453
|
+
} = e, R = ce(e, ["prefixCls", "className", "rootClassName", "block", "options", "size", "style", "vertical", "shape", "name"]), {
|
|
454
|
+
getPrefixCls: f,
|
|
455
|
+
direction: I,
|
|
456
|
+
className: j,
|
|
457
|
+
style: N
|
|
458
|
+
} = Be("segmented"), m = f("segmented", a), [l, M, T] = rt(m), S = Te(b), s = i.useMemo(() => h.map((O) => {
|
|
459
|
+
if (st(O)) {
|
|
460
|
+
const {
|
|
461
|
+
icon: A,
|
|
462
|
+
label: V
|
|
463
|
+
} = O, z = ce(O, ["icon", "label"]);
|
|
464
|
+
return Object.assign(Object.assign({}, z), {
|
|
465
|
+
label: /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("span", {
|
|
466
|
+
className: `${m}-item-icon`
|
|
467
|
+
}, A), V && /* @__PURE__ */ i.createElement("span", null, V))
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
return O;
|
|
471
|
+
}), [h, m]), E = X(o, r, j, {
|
|
472
|
+
[`${m}-block`]: p,
|
|
473
|
+
[`${m}-sm`]: S === "small",
|
|
474
|
+
[`${m}-lg`]: S === "large",
|
|
475
|
+
[`${m}-vertical`]: d,
|
|
476
|
+
[`${m}-shape-${w}`]: w === "round"
|
|
477
|
+
}, M, T), y = Object.assign(Object.assign({}, N), x);
|
|
478
|
+
return l(/* @__PURE__ */ i.createElement(nt, Object.assign({}, R, {
|
|
479
|
+
name: C,
|
|
480
|
+
className: E,
|
|
481
|
+
style: y,
|
|
482
|
+
options: s,
|
|
483
|
+
ref: t,
|
|
484
|
+
prefixCls: m,
|
|
485
|
+
direction: I,
|
|
486
|
+
vertical: d
|
|
487
|
+
})));
|
|
488
|
+
}), ve = ct;
|
|
489
|
+
process.env.NODE_ENV !== "production" && (ve.displayName = "Segmented");
|
|
490
|
+
var dt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z" } }] }, name: "redo", theme: "outlined" };
|
|
491
|
+
function Z() {
|
|
492
|
+
return Z = Object.assign ? Object.assign.bind() : function(e) {
|
|
493
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
494
|
+
var n = arguments[t];
|
|
495
|
+
for (var a in n)
|
|
496
|
+
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
497
|
+
}
|
|
498
|
+
return e;
|
|
499
|
+
}, Z.apply(this, arguments);
|
|
500
|
+
}
|
|
501
|
+
const ut = (e, t) => /* @__PURE__ */ i.createElement(Ae, Z({}, e, {
|
|
502
|
+
ref: t,
|
|
503
|
+
icon: dt
|
|
504
|
+
})), fe = /* @__PURE__ */ i.forwardRef(ut);
|
|
505
|
+
process.env.NODE_ENV !== "production" && (fe.displayName = "RedoOutlined");
|
|
506
|
+
const mt = ({
|
|
507
|
+
datePickerComponent: e,
|
|
508
|
+
searchText: t,
|
|
509
|
+
noDateText: n,
|
|
510
|
+
emptyText: a,
|
|
511
|
+
searchSelect: o,
|
|
512
|
+
radioOptions: r,
|
|
513
|
+
searchOptions: p,
|
|
514
|
+
searchType: h,
|
|
515
|
+
textSearchValue: b = "",
|
|
516
|
+
dateSearchValue: x,
|
|
517
|
+
numberSearchValue: d,
|
|
518
|
+
multiselectSearchValue: w,
|
|
519
|
+
multiselectOptions: C,
|
|
520
|
+
onChangeSearch: R,
|
|
521
|
+
onChangeTextSearch: f,
|
|
522
|
+
onChangeRadioSearch: I,
|
|
523
|
+
onChangeDateSearch: j,
|
|
524
|
+
onChangeNumberSearch: N,
|
|
525
|
+
onChangeMultiselectSearch: m
|
|
526
|
+
}) => {
|
|
527
|
+
const [l, M] = Ye(b), {
|
|
528
|
+
token: { borderRadius: T, colorBgBase: S, paddingXXS: s }
|
|
529
|
+
} = ze.useToken(), { isMobileMaxWidth: E } = _e(), { isSmallMaxWidth: y } = Fe(), O = Je(() => y ? 2 : E ? 5 : 15, [E, y]);
|
|
530
|
+
Ke(
|
|
531
|
+
() => {
|
|
532
|
+
f == null || f(l);
|
|
533
|
+
},
|
|
534
|
+
Le.milliseconds.milliseconds500,
|
|
535
|
+
[l]
|
|
536
|
+
);
|
|
537
|
+
const A = () => {
|
|
538
|
+
M("");
|
|
539
|
+
}, V = (u) => {
|
|
540
|
+
R(u), A();
|
|
541
|
+
}, z = (u) => {
|
|
542
|
+
M(u.target.value.replace(/"/g, ""));
|
|
543
|
+
}, c = (u) => {
|
|
544
|
+
j == null || j(u);
|
|
545
|
+
}, H = (u) => {
|
|
546
|
+
!u && u !== 0 || N == null || N(+u);
|
|
547
|
+
};
|
|
548
|
+
return /* @__PURE__ */ v.jsxs(
|
|
549
|
+
U,
|
|
550
|
+
{
|
|
551
|
+
className: W.flex,
|
|
552
|
+
gap: "small",
|
|
553
|
+
style: {
|
|
554
|
+
padding: s,
|
|
555
|
+
borderRadius: T,
|
|
556
|
+
background: S
|
|
557
|
+
},
|
|
558
|
+
children: [
|
|
559
|
+
/* @__PURE__ */ v.jsx(
|
|
560
|
+
Q,
|
|
561
|
+
{
|
|
562
|
+
defaultValue: o,
|
|
563
|
+
value: o,
|
|
564
|
+
style: { width: 120, minWidth: 120 },
|
|
565
|
+
options: p,
|
|
566
|
+
onChange: V
|
|
567
|
+
}
|
|
568
|
+
),
|
|
569
|
+
{
|
|
570
|
+
text: /* @__PURE__ */ v.jsx(qe, { placeholder: t, value: l, allowClear: !0, onChange: z }),
|
|
571
|
+
radio: /* @__PURE__ */ v.jsx(
|
|
572
|
+
ve,
|
|
573
|
+
{
|
|
574
|
+
options: r,
|
|
575
|
+
defaultValue: Xe,
|
|
576
|
+
onChange: I
|
|
577
|
+
}
|
|
578
|
+
),
|
|
579
|
+
date: Qe(e, {
|
|
580
|
+
noDateText: n,
|
|
581
|
+
currentValue: x ?? "",
|
|
582
|
+
onChangeDate: c
|
|
583
|
+
}),
|
|
584
|
+
number: /* @__PURE__ */ v.jsx(
|
|
585
|
+
We,
|
|
586
|
+
{
|
|
587
|
+
emptyText: a,
|
|
588
|
+
value: d,
|
|
589
|
+
placeholder: t,
|
|
590
|
+
min: 0,
|
|
591
|
+
max: 2147483647,
|
|
592
|
+
onChange: H
|
|
593
|
+
}
|
|
594
|
+
),
|
|
595
|
+
multiselect: /* @__PURE__ */ v.jsx(
|
|
596
|
+
Q,
|
|
597
|
+
{
|
|
598
|
+
className: W.select,
|
|
599
|
+
mode: "multiple",
|
|
600
|
+
placeholder: t,
|
|
601
|
+
maxTagCount: 1,
|
|
602
|
+
maxTagTextLength: O,
|
|
603
|
+
showSearch: !1,
|
|
604
|
+
allowClear: !0,
|
|
605
|
+
options: C,
|
|
606
|
+
value: w,
|
|
607
|
+
onChange: m
|
|
608
|
+
}
|
|
609
|
+
)
|
|
610
|
+
}[h]
|
|
611
|
+
]
|
|
612
|
+
}
|
|
613
|
+
);
|
|
614
|
+
}, gt = ({
|
|
615
|
+
sortTooltipText: e,
|
|
616
|
+
updateDataText: t,
|
|
617
|
+
refreshText: n,
|
|
618
|
+
createText: a,
|
|
619
|
+
createNewElementText: o,
|
|
620
|
+
order: r,
|
|
621
|
+
orderOptions: p,
|
|
622
|
+
createButtonTooltip: h,
|
|
623
|
+
searchProps: b,
|
|
624
|
+
isCanCreate: x,
|
|
625
|
+
isHiddenCreate: d,
|
|
626
|
+
onCreate: w,
|
|
627
|
+
onRefetch: C,
|
|
628
|
+
onChangeOrder: R
|
|
629
|
+
}) => /* @__PURE__ */ v.jsxs(
|
|
630
|
+
U,
|
|
631
|
+
{
|
|
632
|
+
gap: "middle",
|
|
633
|
+
justify: "space-between",
|
|
634
|
+
wrap: "wrap",
|
|
635
|
+
style: {
|
|
636
|
+
marginBottom: Ue.OFFSET[1]
|
|
637
|
+
},
|
|
638
|
+
children: [
|
|
639
|
+
/* @__PURE__ */ v.jsxs(U, { align: "center", gap: "middle", wrap: "wrap", children: [
|
|
640
|
+
/* @__PURE__ */ v.jsx(mt, { ...b }),
|
|
641
|
+
/* @__PURE__ */ v.jsx(J, { title: e, children: /* @__PURE__ */ v.jsx(
|
|
642
|
+
Q,
|
|
643
|
+
{
|
|
644
|
+
className: W.sort,
|
|
645
|
+
value: r,
|
|
646
|
+
options: p,
|
|
647
|
+
onChange: R
|
|
648
|
+
}
|
|
649
|
+
) })
|
|
650
|
+
] }),
|
|
651
|
+
/* @__PURE__ */ v.jsxs(U, { className: W.buttonsContainer, gap: "small", align: "center", children: [
|
|
652
|
+
C && /* @__PURE__ */ v.jsx(J, { title: t, children: /* @__PURE__ */ v.jsx(oe, { className: W.button, icon: /* @__PURE__ */ v.jsx(fe, {}), onClick: C, children: n }) }),
|
|
653
|
+
!d && x && /* @__PURE__ */ v.jsx(J, { title: h ?? o, children: /* @__PURE__ */ v.jsx(
|
|
654
|
+
oe,
|
|
655
|
+
{
|
|
656
|
+
className: W.button,
|
|
657
|
+
type: "primary",
|
|
658
|
+
icon: /* @__PURE__ */ v.jsx(Ge, {}),
|
|
659
|
+
onClick: w,
|
|
660
|
+
children: a
|
|
661
|
+
}
|
|
662
|
+
) })
|
|
663
|
+
] })
|
|
664
|
+
]
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
export {
|
|
668
|
+
gt as TableHead
|
|
669
|
+
};
|