@amateescu/portal-ui-components 0.0.33 → 0.0.35-beta0
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/{Box-D-aleOLf.js → Box-C-zPAMZN.js} +1 -1
- package/dist/{Button-xgiLW4_3.js → Button-DG4uye8X.js} +3 -3
- package/dist/{ButtonBase-DUKuDCWw.js → ButtonBase-DrxMtoTW.js} +1 -1
- package/dist/{CircularProgress-Dq_bUtxt.js → CircularProgress-DpvktFBW.js} +1 -1
- package/dist/{EllipsisOutlined-CmR4hXJ_.js → EllipsisOutlined-DfCu6q_b.js} +816 -816
- package/dist/{PurePanel-CykVuv66.js → PurePanel-DvQTygSo.js} +487 -491
- package/dist/{Skeleton-BBwDqRB3.js → Skeleton-Bh0A9xju.js} +15 -18
- package/dist/{UserInfoDropdown-GTCkmg6H.js → UserInfoDropdown-CWTcdnqL.js} +1186 -1221
- package/dist/components/ConfirmationModal/ConfirmationModal.js +1 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +1 -1
- package/dist/components/CustomButton/CustomButton.js +1 -1
- package/dist/components/CustomButton/CustomButton.stories.js +1 -1
- package/dist/components/CustomPagination/CustomPagination.js +4 -4
- package/dist/components/ErrorModal/ErrorModal.js +1 -1
- package/dist/components/ErrorModal/ErrorModal.stories.js +1 -1
- package/dist/components/InfoModal/InfoModal.js +1 -1
- package/dist/components/InfoModal/InfoModal.stories.js +1 -1
- package/dist/components/KpiCard/KpiCard.js +715 -682
- package/dist/components/LoadingAnimation/LoadingAnimation.js +2 -2
- package/dist/components/Login/Login.js +775 -760
- package/dist/components/Login/Login.stories.js +4 -1
- package/dist/components/SideMenu/SideMenu.js +9 -9
- package/dist/components/UserInfoDropdown/UserInfoDropdown.js +1 -1
- package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/context-dCWAMvX5.js +7320 -0
- package/dist/createSimplePaletteValueFilter-CwLqlaaZ.js +3457 -0
- package/dist/{createSvgIcon-CgFXfzFk.js → createSvgIcon-DNSRtm3a.js} +1 -1
- package/dist/index-B00P9-H3.js +1681 -0
- package/dist/main.js +1 -1
- package/dist/{useSlot-Baxtq84W.js → useSlot-B4sbbhYz.js} +2 -2
- package/package.json +28 -28
- package/dist/context-4ttylmIf.js +0 -7356
- package/dist/createSimplePaletteValueFilter-evt-Xthj.js +0 -3444
- package/dist/index-Dz00OoV7.js +0 -1687
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
import { jsx as ze, jsxs as Et } from "react/jsx-runtime";
|
|
2
2
|
import { LoadingAnimation as ga } from "../LoadingAnimation/LoadingAnimation.js";
|
|
3
|
-
import { cn as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import { a as Me, V as ya, d as Sa, I as _a, _ as L, w as Pt, e as se, f as Ca, h as nt, i as
|
|
7
|
-
import { R as
|
|
8
|
-
import { E as Ma, M as La, D as Da, R as et, i as Ba, a as Ot, b as
|
|
9
|
-
import { _ as
|
|
10
|
-
import '../../assets/KpiCard.css';const
|
|
11
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;
|
|
3
|
+
import { cn as ha } from "../../portal-utils/cn.js";
|
|
4
|
+
import * as c from "react";
|
|
5
|
+
import pa, { createContext as $a, useState as J, useRef as te, useEffect as be, useMemo as At } from "react";
|
|
6
|
+
import { a as Me, V as ya, d as Sa, I as _a, _ as L, w as Pt, e as se, f as Ca, h as nt, i as ae, c as G, j as Ce, k as xa, l as Tt, n as wa, p as Ge, q as Ea, r as Pa, s as Nt, t as Ta, v as rt, x as Na, g as Gt, m as Wt, u, y as it, z as ot, A as Vt, B as tt, D as Oa, E as Kt, F as We, o as Ia } from "../../context-dCWAMvX5.js";
|
|
7
|
+
import { R as Ra, S as za } from "../../Skeleton-Bh0A9xju.js";
|
|
8
|
+
import { E as Ma, M as La, D as Da, R as et, i as Ba, a as Ot, b as Ha } from "../../EllipsisOutlined-DfCu6q_b.js";
|
|
9
|
+
import { _ as he } from "../../objectWithoutPropertiesLoose-BTau6TOn.js";
|
|
10
|
+
import '../../assets/KpiCard.css';const ja = (e, t, n = void 0) => {
|
|
12
11
|
var a, r;
|
|
13
12
|
const {
|
|
14
|
-
variant:
|
|
15
|
-
[e]:
|
|
16
|
-
} =
|
|
13
|
+
variant: i,
|
|
14
|
+
[e]: l
|
|
15
|
+
} = c.useContext(Me), o = c.useContext(ya), d = l == null ? void 0 : l.variant;
|
|
17
16
|
let s;
|
|
18
|
-
typeof t < "u" ? s = t : n === !1 ? s = "borderless" : s = (r = (a =
|
|
17
|
+
typeof t < "u" ? s = t : n === !1 ? s = "borderless" : s = (r = (a = o ?? d) !== null && a !== void 0 ? a : i) !== null && r !== void 0 ? r : "outlined";
|
|
19
18
|
const m = Sa.includes(s);
|
|
20
19
|
return [s, m];
|
|
21
20
|
};
|
|
22
|
-
var
|
|
23
|
-
return /* @__PURE__ */
|
|
21
|
+
var Aa = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" }, Ga = function(t, n) {
|
|
22
|
+
return /* @__PURE__ */ c.createElement(_a, he({}, t, {
|
|
24
23
|
ref: n,
|
|
25
|
-
icon:
|
|
24
|
+
icon: Aa
|
|
26
25
|
}));
|
|
27
|
-
},
|
|
28
|
-
process.env.NODE_ENV !== "production" && (
|
|
26
|
+
}, qt = /* @__PURE__ */ c.forwardRef(Ga);
|
|
27
|
+
process.env.NODE_ENV !== "production" && (qt.displayName = "PlusOutlined");
|
|
29
28
|
const Ve = /* @__PURE__ */ $a(null);
|
|
30
29
|
var Wa = function(t) {
|
|
31
|
-
var n = t.activeTabOffset, a = t.horizontal, r = t.rtl,
|
|
32
|
-
return typeof
|
|
33
|
-
}, [
|
|
34
|
-
function
|
|
35
|
-
Pt.cancel(
|
|
30
|
+
var n = t.activeTabOffset, a = t.horizontal, r = t.rtl, i = t.indicator, l = i === void 0 ? {} : i, o = l.size, d = l.align, s = d === void 0 ? "center" : d, m = J(), p = L(m, 2), y = p[0], T = p[1], H = te(), x = pa.useCallback(function(g) {
|
|
31
|
+
return typeof o == "function" ? o(g) : typeof o == "number" ? o : g;
|
|
32
|
+
}, [o]);
|
|
33
|
+
function O() {
|
|
34
|
+
Pt.cancel(H.current);
|
|
36
35
|
}
|
|
37
|
-
return
|
|
36
|
+
return be(function() {
|
|
38
37
|
var g = {};
|
|
39
38
|
if (n)
|
|
40
39
|
if (a) {
|
|
@@ -43,143 +42,143 @@ var Wa = function(t) {
|
|
|
43
42
|
s === "start" && (g[$] = n[$]), s === "center" && (g[$] = n[$] + n.width / 2, g.transform = r ? "translateX(50%)" : "translateX(-50%)"), s === "end" && (g[$] = n[$] + n.width, g.transform = "translateX(-100%)");
|
|
44
43
|
} else
|
|
45
44
|
g.height = x(n.height), s === "start" && (g.top = n.top), s === "center" && (g.top = n.top + n.height / 2, g.transform = "translateY(-50%)"), s === "end" && (g.top = n.top + n.height, g.transform = "translateY(-100%)");
|
|
46
|
-
return
|
|
47
|
-
var w = y && g && Object.keys(g).every(function(
|
|
48
|
-
var D = g[
|
|
49
|
-
return typeof D == "number" && typeof
|
|
45
|
+
return O(), H.current = Pt(function() {
|
|
46
|
+
var w = y && g && Object.keys(g).every(function(z) {
|
|
47
|
+
var D = g[z], j = y[z];
|
|
48
|
+
return typeof D == "number" && typeof j == "number" ? Math.round(D) === Math.round(j) : D === j;
|
|
50
49
|
});
|
|
51
|
-
w ||
|
|
52
|
-
}),
|
|
50
|
+
w || T(g);
|
|
51
|
+
}), O;
|
|
53
52
|
}, [JSON.stringify(n), a, r, s, x]), {
|
|
54
53
|
style: y
|
|
55
54
|
};
|
|
56
|
-
},
|
|
55
|
+
}, It = {
|
|
57
56
|
width: 0,
|
|
58
57
|
height: 0,
|
|
59
58
|
left: 0,
|
|
60
59
|
top: 0
|
|
61
60
|
};
|
|
62
61
|
function Va(e, t, n) {
|
|
63
|
-
return
|
|
64
|
-
for (var a, r = /* @__PURE__ */ new Map(),
|
|
65
|
-
var d = e[
|
|
62
|
+
return At(function() {
|
|
63
|
+
for (var a, r = /* @__PURE__ */ new Map(), i = t.get((a = e[0]) === null || a === void 0 ? void 0 : a.key) || It, l = i.left + i.width, o = 0; o < e.length; o += 1) {
|
|
64
|
+
var d = e[o].key, s = t.get(d);
|
|
66
65
|
if (!s) {
|
|
67
66
|
var m;
|
|
68
|
-
s = t.get((m = e[
|
|
67
|
+
s = t.get((m = e[o - 1]) === null || m === void 0 ? void 0 : m.key) || It;
|
|
69
68
|
}
|
|
70
|
-
var
|
|
71
|
-
|
|
69
|
+
var p = r.get(d) || se({}, s);
|
|
70
|
+
p.right = l - p.left - p.width, r.set(d, p);
|
|
72
71
|
}
|
|
73
72
|
return r;
|
|
74
73
|
}, [e.map(function(a) {
|
|
75
74
|
return a.key;
|
|
76
75
|
}).join("_"), t, n]);
|
|
77
76
|
}
|
|
78
|
-
function
|
|
79
|
-
var n =
|
|
80
|
-
function
|
|
81
|
-
var d = typeof
|
|
82
|
-
d !== n.current && t(d, n.current), n.current = d,
|
|
77
|
+
function Rt(e, t) {
|
|
78
|
+
var n = c.useRef(e), a = c.useState({}), r = L(a, 2), i = r[1];
|
|
79
|
+
function l(o) {
|
|
80
|
+
var d = typeof o == "function" ? o(n.current) : o;
|
|
81
|
+
d !== n.current && t(d, n.current), n.current = d, i({});
|
|
83
82
|
}
|
|
84
|
-
return [n.current,
|
|
83
|
+
return [n.current, l];
|
|
85
84
|
}
|
|
86
|
-
var Ka = 0.1, zt = 0.01,
|
|
87
|
-
function
|
|
88
|
-
var n =
|
|
89
|
-
function w(
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
x:
|
|
93
|
-
y:
|
|
85
|
+
var Ka = 0.1, zt = 0.01, Ae = 20, Mt = Math.pow(0.995, Ae);
|
|
86
|
+
function qa(e, t) {
|
|
87
|
+
var n = J(), a = L(n, 2), r = a[0], i = a[1], l = J(0), o = L(l, 2), d = o[0], s = o[1], m = J(0), p = L(m, 2), y = p[0], T = p[1], H = J(), x = L(H, 2), O = x[0], g = x[1], $ = te();
|
|
88
|
+
function w(S) {
|
|
89
|
+
var N = S.touches[0], h = N.screenX, _ = N.screenY;
|
|
90
|
+
i({
|
|
91
|
+
x: h,
|
|
92
|
+
y: _
|
|
94
93
|
}), window.clearInterval($.current);
|
|
95
94
|
}
|
|
96
|
-
function
|
|
95
|
+
function z(S) {
|
|
97
96
|
if (r) {
|
|
98
|
-
var
|
|
99
|
-
|
|
100
|
-
x:
|
|
101
|
-
y:
|
|
97
|
+
var N = S.touches[0], h = N.screenX, _ = N.screenY;
|
|
98
|
+
i({
|
|
99
|
+
x: h,
|
|
100
|
+
y: _
|
|
102
101
|
});
|
|
103
|
-
var f =
|
|
104
|
-
t(f,
|
|
105
|
-
var
|
|
106
|
-
s(
|
|
102
|
+
var f = h - r.x, C = _ - r.y;
|
|
103
|
+
t(f, C);
|
|
104
|
+
var X = Date.now();
|
|
105
|
+
s(X), T(X - d), g({
|
|
107
106
|
x: f,
|
|
108
|
-
y:
|
|
107
|
+
y: C
|
|
109
108
|
});
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
111
|
function D() {
|
|
113
|
-
if (r && (
|
|
114
|
-
var
|
|
115
|
-
if (Math.max(
|
|
116
|
-
var f =
|
|
112
|
+
if (r && (i(null), g(null), O)) {
|
|
113
|
+
var S = O.x / y, N = O.y / y, h = Math.abs(S), _ = Math.abs(N);
|
|
114
|
+
if (Math.max(h, _) < Ka) return;
|
|
115
|
+
var f = S, C = N;
|
|
117
116
|
$.current = window.setInterval(function() {
|
|
118
|
-
if (Math.abs(f) < zt && Math.abs(
|
|
117
|
+
if (Math.abs(f) < zt && Math.abs(C) < zt) {
|
|
119
118
|
window.clearInterval($.current);
|
|
120
119
|
return;
|
|
121
120
|
}
|
|
122
|
-
f *= Mt,
|
|
123
|
-
},
|
|
121
|
+
f *= Mt, C *= Mt, t(f * Ae, C * Ae);
|
|
122
|
+
}, Ae);
|
|
124
123
|
}
|
|
125
124
|
}
|
|
126
|
-
var
|
|
127
|
-
function
|
|
128
|
-
var
|
|
129
|
-
f ===
|
|
125
|
+
var j = te();
|
|
126
|
+
function F(S) {
|
|
127
|
+
var N = S.deltaX, h = S.deltaY, _ = 0, f = Math.abs(N), C = Math.abs(h);
|
|
128
|
+
f === C ? _ = j.current === "x" ? N : h : f > C ? (_ = N, j.current = "x") : (_ = h, j.current = "y"), t(-_, -_) && S.preventDefault();
|
|
130
129
|
}
|
|
131
|
-
var
|
|
132
|
-
|
|
130
|
+
var I = te(null);
|
|
131
|
+
I.current = {
|
|
133
132
|
onTouchStart: w,
|
|
134
|
-
onTouchMove:
|
|
133
|
+
onTouchMove: z,
|
|
135
134
|
onTouchEnd: D,
|
|
136
|
-
onWheel:
|
|
137
|
-
},
|
|
138
|
-
function
|
|
139
|
-
|
|
135
|
+
onWheel: F
|
|
136
|
+
}, c.useEffect(function() {
|
|
137
|
+
function S(f) {
|
|
138
|
+
I.current.onTouchStart(f);
|
|
140
139
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
140
|
+
function N(f) {
|
|
141
|
+
I.current.onTouchMove(f);
|
|
143
142
|
}
|
|
144
|
-
function
|
|
145
|
-
|
|
143
|
+
function h(f) {
|
|
144
|
+
I.current.onTouchEnd(f);
|
|
146
145
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
146
|
+
function _(f) {
|
|
147
|
+
I.current.onWheel(f);
|
|
149
148
|
}
|
|
150
|
-
return document.addEventListener("touchmove",
|
|
149
|
+
return document.addEventListener("touchmove", N, {
|
|
151
150
|
passive: !1
|
|
152
|
-
}), document.addEventListener("touchend",
|
|
151
|
+
}), document.addEventListener("touchend", h, {
|
|
153
152
|
passive: !0
|
|
154
|
-
}), e.current.addEventListener("touchstart",
|
|
153
|
+
}), e.current.addEventListener("touchstart", S, {
|
|
155
154
|
passive: !0
|
|
156
|
-
}), e.current.addEventListener("wheel",
|
|
155
|
+
}), e.current.addEventListener("wheel", _, {
|
|
157
156
|
passive: !1
|
|
158
157
|
}), function() {
|
|
159
|
-
document.removeEventListener("touchmove",
|
|
158
|
+
document.removeEventListener("touchmove", N), document.removeEventListener("touchend", h);
|
|
160
159
|
};
|
|
161
160
|
}, []);
|
|
162
161
|
}
|
|
163
|
-
function
|
|
164
|
-
var t =
|
|
165
|
-
return
|
|
166
|
-
var
|
|
167
|
-
(
|
|
162
|
+
function Ft(e) {
|
|
163
|
+
var t = J(0), n = L(t, 2), a = n[0], r = n[1], i = te(0), l = te();
|
|
164
|
+
return l.current = e, Ca(function() {
|
|
165
|
+
var o;
|
|
166
|
+
(o = l.current) === null || o === void 0 || o.call(l);
|
|
168
167
|
}, [a]), function() {
|
|
169
|
-
|
|
168
|
+
i.current === a && (i.current += 1, r(i.current));
|
|
170
169
|
};
|
|
171
170
|
}
|
|
172
|
-
function
|
|
173
|
-
var t = te([]), n =
|
|
174
|
-
var d =
|
|
171
|
+
function Fa(e) {
|
|
172
|
+
var t = te([]), n = J({}), a = L(n, 2), r = a[1], i = te(typeof e == "function" ? e() : e), l = Ft(function() {
|
|
173
|
+
var d = i.current;
|
|
175
174
|
t.current.forEach(function(s) {
|
|
176
175
|
d = s(d);
|
|
177
|
-
}), t.current = [],
|
|
176
|
+
}), t.current = [], i.current = d, r({});
|
|
178
177
|
});
|
|
179
|
-
function
|
|
180
|
-
t.current.push(d),
|
|
178
|
+
function o(d) {
|
|
179
|
+
t.current.push(d), l();
|
|
181
180
|
}
|
|
182
|
-
return [
|
|
181
|
+
return [i.current, o];
|
|
183
182
|
}
|
|
184
183
|
var Lt = {
|
|
185
184
|
width: 0,
|
|
@@ -188,28 +187,28 @@ var Lt = {
|
|
|
188
187
|
top: 0,
|
|
189
188
|
right: 0
|
|
190
189
|
};
|
|
191
|
-
function
|
|
192
|
-
var
|
|
193
|
-
return ["top", "bottom"].includes(d) ? (m = "width",
|
|
194
|
-
if (!
|
|
190
|
+
function Xa(e, t, n, a, r, i, l) {
|
|
191
|
+
var o = l.tabs, d = l.tabPosition, s = l.rtl, m, p, y;
|
|
192
|
+
return ["top", "bottom"].includes(d) ? (m = "width", p = s ? "right" : "left", y = Math.abs(n)) : (m = "height", p = "top", y = -n), At(function() {
|
|
193
|
+
if (!o.length)
|
|
195
194
|
return [0, 0];
|
|
196
|
-
for (var
|
|
197
|
-
var
|
|
198
|
-
if (Math.floor(
|
|
199
|
-
|
|
195
|
+
for (var T = o.length, H = T, x = 0; x < T; x += 1) {
|
|
196
|
+
var O = e.get(o[x].key) || Lt;
|
|
197
|
+
if (Math.floor(O[p] + O[m]) > Math.floor(y + t)) {
|
|
198
|
+
H = x - 1;
|
|
200
199
|
break;
|
|
201
200
|
}
|
|
202
201
|
}
|
|
203
|
-
for (var g = 0, $ =
|
|
204
|
-
var w = e.get(
|
|
205
|
-
if (w[
|
|
202
|
+
for (var g = 0, $ = T - 1; $ >= 0; $ -= 1) {
|
|
203
|
+
var w = e.get(o[$].key) || Lt;
|
|
204
|
+
if (w[p] < y) {
|
|
206
205
|
g = $ + 1;
|
|
207
206
|
break;
|
|
208
207
|
}
|
|
209
208
|
}
|
|
210
|
-
return g >=
|
|
211
|
-
}, [e, t, a, r,
|
|
212
|
-
return
|
|
209
|
+
return g >= H ? [0, 0] : [g, H];
|
|
210
|
+
}, [e, t, a, r, i, y, d, o.map(function(T) {
|
|
211
|
+
return T.key;
|
|
213
212
|
}).join("_"), s]);
|
|
214
213
|
}
|
|
215
214
|
function Dt(e) {
|
|
@@ -219,7 +218,7 @@ function Dt(e) {
|
|
|
219
218
|
})) : t = e, JSON.stringify(t);
|
|
220
219
|
}
|
|
221
220
|
var Ua = "TABS_DQ";
|
|
222
|
-
function
|
|
221
|
+
function Xt(e) {
|
|
223
222
|
return String(e).replace(/"/g, Ua);
|
|
224
223
|
}
|
|
225
224
|
function lt(e, t, n, a) {
|
|
@@ -231,143 +230,143 @@ function lt(e, t, n, a) {
|
|
|
231
230
|
e === void 0 && (t === !1 || t === null))
|
|
232
231
|
);
|
|
233
232
|
}
|
|
234
|
-
var Ut = /* @__PURE__ */
|
|
235
|
-
var n = e.prefixCls, a = e.editable, r = e.locale,
|
|
236
|
-
return !a || a.showAdd === !1 ? null : /* @__PURE__ */
|
|
233
|
+
var Ut = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
234
|
+
var n = e.prefixCls, a = e.editable, r = e.locale, i = e.style;
|
|
235
|
+
return !a || a.showAdd === !1 ? null : /* @__PURE__ */ c.createElement("button", {
|
|
237
236
|
ref: t,
|
|
238
237
|
type: "button",
|
|
239
238
|
className: "".concat(n, "-nav-add"),
|
|
240
|
-
style:
|
|
239
|
+
style: i,
|
|
241
240
|
"aria-label": (r == null ? void 0 : r.addAriaLabel) || "Add tab",
|
|
242
|
-
onClick: function(
|
|
241
|
+
onClick: function(o) {
|
|
243
242
|
a.onEdit("add", {
|
|
244
|
-
event:
|
|
243
|
+
event: o
|
|
245
244
|
});
|
|
246
245
|
}
|
|
247
246
|
}, a.addIcon || "+");
|
|
248
|
-
}), at = /* @__PURE__ */
|
|
247
|
+
}), at = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
249
248
|
var n = e.position, a = e.prefixCls, r = e.extra;
|
|
250
249
|
if (!r)
|
|
251
250
|
return null;
|
|
252
|
-
var
|
|
253
|
-
return nt(r) === "object" && !/* @__PURE__ */
|
|
251
|
+
var i, l = {};
|
|
252
|
+
return nt(r) === "object" && !/* @__PURE__ */ c.isValidElement(r) ? l = r : l.right = r, n === "right" && (i = l.right), n === "left" && (i = l.left), i ? /* @__PURE__ */ c.createElement("div", {
|
|
254
253
|
className: "".concat(a, "-extra-content"),
|
|
255
254
|
ref: t
|
|
256
|
-
},
|
|
255
|
+
}, i) : null;
|
|
257
256
|
});
|
|
258
257
|
process.env.NODE_ENV !== "production" && (at.displayName = "ExtraContent");
|
|
259
|
-
var Ya = /* @__PURE__ */
|
|
260
|
-
var n = e.prefixCls, a = e.id, r = e.tabs,
|
|
261
|
-
function
|
|
262
|
-
E.preventDefault(), E.stopPropagation(),
|
|
263
|
-
key:
|
|
258
|
+
var Ya = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
259
|
+
var n = e.prefixCls, a = e.id, r = e.tabs, i = e.locale, l = e.mobile, o = e.more, d = o === void 0 ? {} : o, s = e.style, m = e.className, p = e.editable, y = e.tabBarGutter, T = e.rtl, H = e.removeAriaLabel, x = e.onTabClick, O = e.getPopupContainer, g = e.popupClassName, $ = J(!1), w = L($, 2), z = w[0], D = w[1], j = J(null), F = L(j, 2), I = F[0], S = F[1], N = d.icon, h = N === void 0 ? "More" : N, _ = "".concat(a, "-more-popup"), f = "".concat(n, "-dropdown"), C = I !== null ? "".concat(_, "-").concat(I) : null, X = i == null ? void 0 : i.dropdownAriaLabel;
|
|
260
|
+
function A(E, W) {
|
|
261
|
+
E.preventDefault(), E.stopPropagation(), p.onEdit("remove", {
|
|
262
|
+
key: W,
|
|
264
263
|
event: E
|
|
265
264
|
});
|
|
266
265
|
}
|
|
267
|
-
var
|
|
268
|
-
onClick: function(
|
|
269
|
-
var Y =
|
|
270
|
-
x(Y,
|
|
266
|
+
var V = /* @__PURE__ */ c.createElement(Ma, {
|
|
267
|
+
onClick: function(W) {
|
|
268
|
+
var Y = W.key, k = W.domEvent;
|
|
269
|
+
x(Y, k), D(!1);
|
|
271
270
|
},
|
|
272
271
|
prefixCls: "".concat(f, "-menu"),
|
|
273
|
-
id:
|
|
272
|
+
id: _,
|
|
274
273
|
tabIndex: -1,
|
|
275
274
|
role: "listbox",
|
|
276
|
-
"aria-activedescendant":
|
|
277
|
-
selectedKeys: [
|
|
278
|
-
"aria-label":
|
|
275
|
+
"aria-activedescendant": C,
|
|
276
|
+
selectedKeys: [I],
|
|
277
|
+
"aria-label": X !== void 0 ? X : "expanded dropdown"
|
|
279
278
|
}, r.map(function(E) {
|
|
280
|
-
var
|
|
281
|
-
return /* @__PURE__ */
|
|
282
|
-
key:
|
|
283
|
-
id: "".concat(
|
|
279
|
+
var W = E.closable, Y = E.disabled, k = E.closeIcon, U = E.key, ie = E.label, ee = lt(W, k, p, Y);
|
|
280
|
+
return /* @__PURE__ */ c.createElement(La, {
|
|
281
|
+
key: U,
|
|
282
|
+
id: "".concat(_, "-").concat(U),
|
|
284
283
|
role: "option",
|
|
285
|
-
"aria-controls": a && "".concat(a, "-panel-").concat(
|
|
284
|
+
"aria-controls": a && "".concat(a, "-panel-").concat(U),
|
|
286
285
|
disabled: Y
|
|
287
|
-
}, /* @__PURE__ */
|
|
286
|
+
}, /* @__PURE__ */ c.createElement("span", null, ie), ee && /* @__PURE__ */ c.createElement("button", {
|
|
288
287
|
type: "button",
|
|
289
|
-
"aria-label":
|
|
288
|
+
"aria-label": H || "remove",
|
|
290
289
|
tabIndex: 0,
|
|
291
290
|
className: "".concat(f, "-menu-item-remove"),
|
|
292
|
-
onClick: function(
|
|
293
|
-
|
|
291
|
+
onClick: function(ve) {
|
|
292
|
+
ve.stopPropagation(), A(ve, U);
|
|
294
293
|
}
|
|
295
|
-
},
|
|
294
|
+
}, k || p.removeIcon || "×"));
|
|
296
295
|
}));
|
|
297
296
|
function Z(E) {
|
|
298
|
-
for (var
|
|
299
|
-
return !
|
|
300
|
-
}), Y =
|
|
301
|
-
return
|
|
302
|
-
}) || 0,
|
|
303
|
-
Y = (Y + E +
|
|
304
|
-
var
|
|
305
|
-
if (!
|
|
306
|
-
|
|
297
|
+
for (var W = r.filter(function(ee) {
|
|
298
|
+
return !ee.disabled;
|
|
299
|
+
}), Y = W.findIndex(function(ee) {
|
|
300
|
+
return ee.key === I;
|
|
301
|
+
}) || 0, k = W.length, U = 0; U < k; U += 1) {
|
|
302
|
+
Y = (Y + E + k) % k;
|
|
303
|
+
var ie = W[Y];
|
|
304
|
+
if (!ie.disabled) {
|
|
305
|
+
S(ie.key);
|
|
307
306
|
return;
|
|
308
307
|
}
|
|
309
308
|
}
|
|
310
309
|
}
|
|
311
|
-
function
|
|
312
|
-
var
|
|
313
|
-
if (!
|
|
314
|
-
[
|
|
310
|
+
function v(E) {
|
|
311
|
+
var W = E.which;
|
|
312
|
+
if (!z) {
|
|
313
|
+
[Ce.DOWN, Ce.SPACE, Ce.ENTER].includes(W) && (D(!0), E.preventDefault());
|
|
315
314
|
return;
|
|
316
315
|
}
|
|
317
|
-
switch (
|
|
318
|
-
case
|
|
316
|
+
switch (W) {
|
|
317
|
+
case Ce.UP:
|
|
319
318
|
Z(-1), E.preventDefault();
|
|
320
319
|
break;
|
|
321
|
-
case
|
|
320
|
+
case Ce.DOWN:
|
|
322
321
|
Z(1), E.preventDefault();
|
|
323
322
|
break;
|
|
324
|
-
case
|
|
323
|
+
case Ce.ESC:
|
|
325
324
|
D(!1);
|
|
326
325
|
break;
|
|
327
|
-
case
|
|
328
|
-
case
|
|
329
|
-
|
|
326
|
+
case Ce.SPACE:
|
|
327
|
+
case Ce.ENTER:
|
|
328
|
+
I !== null && x(I, E);
|
|
330
329
|
break;
|
|
331
330
|
}
|
|
332
331
|
}
|
|
333
|
-
|
|
334
|
-
var E = document.getElementById(
|
|
332
|
+
be(function() {
|
|
333
|
+
var E = document.getElementById(C);
|
|
335
334
|
E && E.scrollIntoView && E.scrollIntoView(!1);
|
|
336
|
-
}, [
|
|
337
|
-
|
|
338
|
-
}, [
|
|
339
|
-
var
|
|
340
|
-
r.length || (
|
|
341
|
-
var
|
|
335
|
+
}, [I]), be(function() {
|
|
336
|
+
z || S(null);
|
|
337
|
+
}, [z]);
|
|
338
|
+
var re = ae({}, T ? "marginRight" : "marginLeft", y);
|
|
339
|
+
r.length || (re.visibility = "hidden", re.order = 1);
|
|
340
|
+
var ne = G(ae({}, "".concat(f, "-rtl"), T)), Q = l ? null : /* @__PURE__ */ c.createElement(Da, he({
|
|
342
341
|
prefixCls: f,
|
|
343
|
-
overlay:
|
|
344
|
-
visible: r.length ?
|
|
342
|
+
overlay: V,
|
|
343
|
+
visible: r.length ? z : !1,
|
|
345
344
|
onVisibleChange: D,
|
|
346
|
-
overlayClassName:
|
|
345
|
+
overlayClassName: G(ne, g),
|
|
347
346
|
mouseEnterDelay: 0.1,
|
|
348
347
|
mouseLeaveDelay: 0.1,
|
|
349
|
-
getPopupContainer:
|
|
350
|
-
}, d), /* @__PURE__ */
|
|
348
|
+
getPopupContainer: O
|
|
349
|
+
}, d), /* @__PURE__ */ c.createElement("button", {
|
|
351
350
|
type: "button",
|
|
352
351
|
className: "".concat(n, "-nav-more"),
|
|
353
|
-
style:
|
|
352
|
+
style: re,
|
|
354
353
|
"aria-haspopup": "listbox",
|
|
355
|
-
"aria-controls":
|
|
354
|
+
"aria-controls": _,
|
|
356
355
|
id: "".concat(a, "-more"),
|
|
357
|
-
"aria-expanded":
|
|
358
|
-
onKeyDown:
|
|
359
|
-
},
|
|
360
|
-
return /* @__PURE__ */
|
|
361
|
-
className:
|
|
356
|
+
"aria-expanded": z,
|
|
357
|
+
onKeyDown: v
|
|
358
|
+
}, h));
|
|
359
|
+
return /* @__PURE__ */ c.createElement("div", {
|
|
360
|
+
className: G("".concat(n, "-nav-operations"), m),
|
|
362
361
|
style: s,
|
|
363
362
|
ref: t
|
|
364
|
-
},
|
|
363
|
+
}, Q, /* @__PURE__ */ c.createElement(Ut, {
|
|
365
364
|
prefixCls: n,
|
|
366
|
-
locale:
|
|
367
|
-
editable:
|
|
365
|
+
locale: i,
|
|
366
|
+
editable: p
|
|
368
367
|
}));
|
|
369
368
|
});
|
|
370
|
-
const ka = /* @__PURE__ */
|
|
369
|
+
const ka = /* @__PURE__ */ c.memo(Ya, function(e, t) {
|
|
371
370
|
return (
|
|
372
371
|
// https://github.com/ant-design/ant-design/issues/32544
|
|
373
372
|
// We'd better remove syntactic sugar in `rc-menu` since this has perf issue
|
|
@@ -375,46 +374,46 @@ const ka = /* @__PURE__ */ l.memo(Ya, function(e, t) {
|
|
|
375
374
|
);
|
|
376
375
|
});
|
|
377
376
|
var Ja = function(t) {
|
|
378
|
-
var n = t.prefixCls, a = t.id, r = t.active,
|
|
379
|
-
function
|
|
380
|
-
s ||
|
|
377
|
+
var n = t.prefixCls, a = t.id, r = t.active, i = t.focus, l = t.tab, o = l.key, d = l.label, s = l.disabled, m = l.closeIcon, p = l.icon, y = t.closable, T = t.renderWrapper, H = t.removeAriaLabel, x = t.editable, O = t.onClick, g = t.onFocus, $ = t.onBlur, w = t.onKeyDown, z = t.onMouseDown, D = t.onMouseUp, j = t.style, F = t.tabCount, I = t.currentPosition, S = "".concat(n, "-tab"), N = lt(y, m, x, s);
|
|
378
|
+
function h(A) {
|
|
379
|
+
s || O(A);
|
|
381
380
|
}
|
|
382
|
-
function
|
|
383
|
-
|
|
384
|
-
key:
|
|
385
|
-
event:
|
|
381
|
+
function _(A) {
|
|
382
|
+
A.preventDefault(), A.stopPropagation(), x.onEdit("remove", {
|
|
383
|
+
key: o,
|
|
384
|
+
event: A
|
|
386
385
|
});
|
|
387
386
|
}
|
|
388
|
-
var f =
|
|
389
|
-
return
|
|
390
|
-
}, [d,
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}, [
|
|
394
|
-
var
|
|
395
|
-
key:
|
|
396
|
-
"data-node-key":
|
|
397
|
-
className:
|
|
398
|
-
style:
|
|
399
|
-
onClick:
|
|
400
|
-
}, /* @__PURE__ */
|
|
401
|
-
ref:
|
|
387
|
+
var f = c.useMemo(function() {
|
|
388
|
+
return p && typeof d == "string" ? /* @__PURE__ */ c.createElement("span", null, d) : d;
|
|
389
|
+
}, [d, p]), C = c.useRef(null);
|
|
390
|
+
c.useEffect(function() {
|
|
391
|
+
i && C.current && C.current.focus();
|
|
392
|
+
}, [i]);
|
|
393
|
+
var X = /* @__PURE__ */ c.createElement("div", {
|
|
394
|
+
key: o,
|
|
395
|
+
"data-node-key": Xt(o),
|
|
396
|
+
className: G(S, ae(ae(ae(ae({}, "".concat(S, "-with-remove"), N), "".concat(S, "-active"), r), "".concat(S, "-disabled"), s), "".concat(S, "-focus"), i)),
|
|
397
|
+
style: j,
|
|
398
|
+
onClick: h
|
|
399
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
400
|
+
ref: C,
|
|
402
401
|
role: "tab",
|
|
403
402
|
"aria-selected": r,
|
|
404
|
-
id: a && "".concat(a, "-tab-").concat(
|
|
405
|
-
className: "".concat(
|
|
406
|
-
"aria-controls": a && "".concat(a, "-panel-").concat(
|
|
403
|
+
id: a && "".concat(a, "-tab-").concat(o),
|
|
404
|
+
className: "".concat(S, "-btn"),
|
|
405
|
+
"aria-controls": a && "".concat(a, "-panel-").concat(o),
|
|
407
406
|
"aria-disabled": s,
|
|
408
407
|
tabIndex: s ? null : r ? 0 : -1,
|
|
409
|
-
onClick: function(
|
|
410
|
-
|
|
408
|
+
onClick: function(V) {
|
|
409
|
+
V.stopPropagation(), h(V);
|
|
411
410
|
},
|
|
412
411
|
onKeyDown: w,
|
|
413
|
-
onMouseDown:
|
|
412
|
+
onMouseDown: z,
|
|
414
413
|
onMouseUp: D,
|
|
415
414
|
onFocus: g,
|
|
416
415
|
onBlur: $
|
|
417
|
-
},
|
|
416
|
+
}, i && /* @__PURE__ */ c.createElement("div", {
|
|
418
417
|
"aria-live": "polite",
|
|
419
418
|
style: {
|
|
420
419
|
width: 0,
|
|
@@ -423,344 +422,344 @@ var Ja = function(t) {
|
|
|
423
422
|
overflow: "hidden",
|
|
424
423
|
opacity: 0
|
|
425
424
|
}
|
|
426
|
-
}, "Tab ".concat(
|
|
427
|
-
className: "".concat(
|
|
428
|
-
},
|
|
425
|
+
}, "Tab ".concat(I, " of ").concat(F)), p && /* @__PURE__ */ c.createElement("span", {
|
|
426
|
+
className: "".concat(S, "-icon")
|
|
427
|
+
}, p), d && f), N && /* @__PURE__ */ c.createElement("button", {
|
|
429
428
|
type: "button",
|
|
430
429
|
role: "tab",
|
|
431
|
-
"aria-label":
|
|
430
|
+
"aria-label": H || "remove",
|
|
432
431
|
tabIndex: r ? 0 : -1,
|
|
433
|
-
className: "".concat(
|
|
434
|
-
onClick: function(
|
|
435
|
-
|
|
432
|
+
className: "".concat(S, "-remove"),
|
|
433
|
+
onClick: function(V) {
|
|
434
|
+
V.stopPropagation(), _(V);
|
|
436
435
|
}
|
|
437
436
|
}, m || x.removeIcon || "×"));
|
|
438
|
-
return
|
|
437
|
+
return T ? T(X) : X;
|
|
439
438
|
}, Qa = function(t, n) {
|
|
440
|
-
var a = t.offsetWidth, r = t.offsetHeight,
|
|
441
|
-
return Math.abs(d - a) < 1 ? [d, s, m - n.left,
|
|
442
|
-
},
|
|
443
|
-
var n = t.current || {}, a = n.offsetWidth, r = a === void 0 ? 0 : a,
|
|
439
|
+
var a = t.offsetWidth, r = t.offsetHeight, i = t.offsetTop, l = t.offsetLeft, o = t.getBoundingClientRect(), d = o.width, s = o.height, m = o.left, p = o.top;
|
|
440
|
+
return Math.abs(d - a) < 1 ? [d, s, m - n.left, p - n.top] : [a, r, l, i];
|
|
441
|
+
}, Ne = function(t) {
|
|
442
|
+
var n = t.current || {}, a = n.offsetWidth, r = a === void 0 ? 0 : a, i = n.offsetHeight, l = i === void 0 ? 0 : i;
|
|
444
443
|
if (t.current) {
|
|
445
|
-
var
|
|
444
|
+
var o = t.current.getBoundingClientRect(), d = o.width, s = o.height;
|
|
446
445
|
if (Math.abs(d - r) < 1)
|
|
447
446
|
return [d, s];
|
|
448
447
|
}
|
|
449
|
-
return [r,
|
|
450
|
-
},
|
|
448
|
+
return [r, l];
|
|
449
|
+
}, je = function(t, n) {
|
|
451
450
|
return t[n ? 0 : 1];
|
|
452
|
-
}, Bt = /* @__PURE__ */
|
|
453
|
-
var n = e.className, a = e.style, r = e.id,
|
|
454
|
-
|
|
455
|
-
direction:
|
|
451
|
+
}, Bt = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
452
|
+
var n = e.className, a = e.style, r = e.id, i = e.animated, l = e.activeKey, o = e.rtl, d = e.extra, s = e.editable, m = e.locale, p = e.tabPosition, y = e.tabBarGutter, T = e.children, H = e.onTabClick, x = e.onTabScroll, O = e.indicator, g = c.useContext(Ve), $ = g.prefixCls, w = g.tabs, z = te(null), D = te(null), j = te(null), F = te(null), I = te(null), S = te(null), N = te(null), h = p === "top" || p === "bottom", _ = Rt(0, function(R, b) {
|
|
453
|
+
h && x && x({
|
|
454
|
+
direction: R > b ? "left" : "right"
|
|
456
455
|
});
|
|
457
|
-
}), f = L(
|
|
458
|
-
!
|
|
459
|
-
direction:
|
|
456
|
+
}), f = L(_, 2), C = f[0], X = f[1], A = Rt(0, function(R, b) {
|
|
457
|
+
!h && x && x({
|
|
458
|
+
direction: R > b ? "top" : "bottom"
|
|
460
459
|
});
|
|
461
|
-
}),
|
|
462
|
-
|
|
463
|
-
function
|
|
464
|
-
return
|
|
460
|
+
}), V = L(A, 2), Z = V[0], v = V[1], re = J([0, 0]), ne = L(re, 2), Q = ne[0], E = ne[1], W = J([0, 0]), Y = L(W, 2), k = Y[0], U = Y[1], ie = J([0, 0]), ee = L(ie, 2), pe = ee[0], ve = ee[1], $e = J([0, 0]), ye = L($e, 2), P = ye[0], oe = ye[1], me = Fa(/* @__PURE__ */ new Map()), Le = L(me, 2), qe = Le[0], Fe = Le[1], K = Va(w, qe, k[0]), M = je(Q, h), de = je(k, h), Oe = je(pe, h), dt = je(P, h), ut = Math.floor(M) < Math.floor(de + Oe), fe = ut ? M - dt : M - Oe, Zt = "".concat($, "-nav-operations-hidden"), Se = 0, we = 0;
|
|
461
|
+
h && o ? (Se = 0, we = Math.max(0, de - fe)) : (Se = Math.min(0, fe - de), we = 0);
|
|
462
|
+
function Xe(R) {
|
|
463
|
+
return R < Se ? Se : R > we ? we : R;
|
|
465
464
|
}
|
|
466
|
-
var Ue = te(null), ea =
|
|
465
|
+
var Ue = te(null), ea = J(), vt = L(ea, 2), De = vt[0], ft = vt[1];
|
|
467
466
|
function Ye() {
|
|
468
467
|
ft(Date.now());
|
|
469
468
|
}
|
|
470
469
|
function ke() {
|
|
471
470
|
Ue.current && clearTimeout(Ue.current);
|
|
472
471
|
}
|
|
473
|
-
|
|
474
|
-
function
|
|
475
|
-
|
|
476
|
-
var
|
|
477
|
-
return
|
|
472
|
+
qa(F, function(R, b) {
|
|
473
|
+
function B(q, ue) {
|
|
474
|
+
q(function(le) {
|
|
475
|
+
var Pe = Xe(le + ue);
|
|
476
|
+
return Pe;
|
|
478
477
|
});
|
|
479
478
|
}
|
|
480
|
-
return ut ? (
|
|
481
|
-
}),
|
|
479
|
+
return ut ? (h ? B(X, R) : B(v, b), ke(), Ye(), !0) : !1;
|
|
480
|
+
}), be(function() {
|
|
482
481
|
return ke(), De && (Ue.current = setTimeout(function() {
|
|
483
482
|
ft(0);
|
|
484
483
|
}, 100)), ke;
|
|
485
484
|
}, [De]);
|
|
486
|
-
var ta =
|
|
485
|
+
var ta = Xa(
|
|
487
486
|
K,
|
|
488
487
|
// Container
|
|
489
|
-
|
|
488
|
+
fe,
|
|
490
489
|
// Transform
|
|
491
|
-
|
|
490
|
+
h ? C : Z,
|
|
492
491
|
// Tabs
|
|
493
|
-
|
|
492
|
+
de,
|
|
494
493
|
// Add
|
|
495
|
-
|
|
494
|
+
Oe,
|
|
496
495
|
// Operation
|
|
497
496
|
dt,
|
|
498
497
|
se(se({}, e), {}, {
|
|
499
498
|
tabs: w
|
|
500
499
|
})
|
|
501
500
|
), bt = L(ta, 2), aa = bt[0], na = bt[1], mt = xa(function() {
|
|
502
|
-
var
|
|
501
|
+
var R = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : l, b = K.get(R) || {
|
|
503
502
|
width: 0,
|
|
504
503
|
height: 0,
|
|
505
504
|
left: 0,
|
|
506
505
|
right: 0,
|
|
507
506
|
top: 0
|
|
508
507
|
};
|
|
509
|
-
if (
|
|
510
|
-
var
|
|
511
|
-
|
|
508
|
+
if (h) {
|
|
509
|
+
var B = C;
|
|
510
|
+
o ? b.right < C ? B = b.right : b.right + b.width > C + fe && (B = b.right + b.width - fe) : b.left < -C ? B = -b.left : b.left + b.width > -C + fe && (B = -(b.left + b.width - fe)), v(0), X(Xe(B));
|
|
512
511
|
} else {
|
|
513
|
-
var
|
|
514
|
-
b.top < -Z ?
|
|
512
|
+
var q = Z;
|
|
513
|
+
b.top < -Z ? q = -b.top : b.top + b.height > -Z + fe && (q = -(b.top + b.height - fe)), X(0), v(Xe(q));
|
|
515
514
|
}
|
|
516
|
-
}), ra =
|
|
517
|
-
return !
|
|
518
|
-
}).map(function(
|
|
519
|
-
return
|
|
520
|
-
}),
|
|
521
|
-
var
|
|
522
|
-
|
|
515
|
+
}), ra = J(), gt = L(ra, 2), _e = gt[0], Ie = gt[1], ia = J(!1), ht = L(ia, 2), oa = ht[0], pt = ht[1], ge = w.filter(function(R) {
|
|
516
|
+
return !R.disabled;
|
|
517
|
+
}).map(function(R) {
|
|
518
|
+
return R.key;
|
|
519
|
+
}), Ee = function(b) {
|
|
520
|
+
var B = ge.indexOf(_e || l), q = ge.length, ue = (B + b + q) % q, le = ge[ue];
|
|
521
|
+
Ie(le);
|
|
523
522
|
}, la = function(b) {
|
|
524
|
-
var
|
|
525
|
-
switch (
|
|
523
|
+
var B = b.code, q = o && h, ue = ge[0], le = ge[ge.length - 1];
|
|
524
|
+
switch (B) {
|
|
526
525
|
// LEFT
|
|
527
526
|
case "ArrowLeft": {
|
|
528
|
-
|
|
527
|
+
h && Ee(q ? 1 : -1);
|
|
529
528
|
break;
|
|
530
529
|
}
|
|
531
530
|
// RIGHT
|
|
532
531
|
case "ArrowRight": {
|
|
533
|
-
|
|
532
|
+
h && Ee(q ? -1 : 1);
|
|
534
533
|
break;
|
|
535
534
|
}
|
|
536
535
|
// UP
|
|
537
536
|
case "ArrowUp": {
|
|
538
|
-
b.preventDefault(),
|
|
537
|
+
b.preventDefault(), h || Ee(-1);
|
|
539
538
|
break;
|
|
540
539
|
}
|
|
541
540
|
// DOWN
|
|
542
541
|
case "ArrowDown": {
|
|
543
|
-
b.preventDefault(),
|
|
542
|
+
b.preventDefault(), h || Ee(1);
|
|
544
543
|
break;
|
|
545
544
|
}
|
|
546
545
|
// HOME
|
|
547
546
|
case "Home": {
|
|
548
|
-
b.preventDefault(),
|
|
547
|
+
b.preventDefault(), Ie(ue);
|
|
549
548
|
break;
|
|
550
549
|
}
|
|
551
550
|
// END
|
|
552
551
|
case "End": {
|
|
553
|
-
b.preventDefault(),
|
|
552
|
+
b.preventDefault(), Ie(le);
|
|
554
553
|
break;
|
|
555
554
|
}
|
|
556
555
|
// Enter & Space
|
|
557
556
|
case "Enter":
|
|
558
557
|
case "Space": {
|
|
559
|
-
b.preventDefault(),
|
|
558
|
+
b.preventDefault(), H(_e ?? l, b);
|
|
560
559
|
break;
|
|
561
560
|
}
|
|
562
561
|
// Backspace
|
|
563
562
|
case "Backspace":
|
|
564
563
|
case "Delete": {
|
|
565
|
-
var
|
|
566
|
-
return
|
|
564
|
+
var Pe = ge.indexOf(_e), ce = w.find(function(Te) {
|
|
565
|
+
return Te.key === _e;
|
|
567
566
|
}), Ze = lt(ce == null ? void 0 : ce.closable, ce == null ? void 0 : ce.closeIcon, s, ce == null ? void 0 : ce.disabled);
|
|
568
567
|
Ze && (b.preventDefault(), b.stopPropagation(), s.onEdit("remove", {
|
|
569
|
-
key:
|
|
568
|
+
key: _e,
|
|
570
569
|
event: b
|
|
571
|
-
}),
|
|
570
|
+
}), Pe === ge.length - 1 ? Ee(-1) : Ee(1));
|
|
572
571
|
break;
|
|
573
572
|
}
|
|
574
573
|
}
|
|
575
574
|
}, Be = {};
|
|
576
|
-
|
|
577
|
-
var $t = w.map(function(
|
|
578
|
-
var
|
|
579
|
-
return /* @__PURE__ */
|
|
575
|
+
h ? Be[o ? "marginRight" : "marginLeft"] = y : Be.marginTop = y;
|
|
576
|
+
var $t = w.map(function(R, b) {
|
|
577
|
+
var B = R.key;
|
|
578
|
+
return /* @__PURE__ */ c.createElement(Ja, {
|
|
580
579
|
id: r,
|
|
581
580
|
prefixCls: $,
|
|
582
|
-
key:
|
|
583
|
-
tab:
|
|
581
|
+
key: B,
|
|
582
|
+
tab: R,
|
|
584
583
|
style: b === 0 ? void 0 : Be,
|
|
585
|
-
closable:
|
|
584
|
+
closable: R.closable,
|
|
586
585
|
editable: s,
|
|
587
|
-
active:
|
|
588
|
-
focus:
|
|
589
|
-
renderWrapper:
|
|
586
|
+
active: B === l,
|
|
587
|
+
focus: B === _e,
|
|
588
|
+
renderWrapper: T,
|
|
590
589
|
removeAriaLabel: m == null ? void 0 : m.removeAriaLabel,
|
|
591
590
|
tabCount: ge.length,
|
|
592
591
|
currentPosition: b + 1,
|
|
593
592
|
onClick: function(ue) {
|
|
594
|
-
|
|
593
|
+
H(B, ue);
|
|
595
594
|
},
|
|
596
595
|
onKeyDown: la,
|
|
597
596
|
onFocus: function() {
|
|
598
|
-
oa ||
|
|
597
|
+
oa || Ie(B), mt(B), Ye(), F.current && (o || (F.current.scrollLeft = 0), F.current.scrollTop = 0);
|
|
599
598
|
},
|
|
600
599
|
onBlur: function() {
|
|
601
|
-
|
|
600
|
+
Ie(void 0);
|
|
602
601
|
},
|
|
603
602
|
onMouseDown: function() {
|
|
604
|
-
|
|
603
|
+
pt(!0);
|
|
605
604
|
},
|
|
606
605
|
onMouseUp: function() {
|
|
607
|
-
|
|
606
|
+
pt(!1);
|
|
608
607
|
}
|
|
609
608
|
});
|
|
610
609
|
}), yt = function() {
|
|
611
|
-
return
|
|
612
|
-
var b,
|
|
610
|
+
return Fe(function() {
|
|
611
|
+
var b, B = /* @__PURE__ */ new Map(), q = (b = I.current) === null || b === void 0 ? void 0 : b.getBoundingClientRect();
|
|
613
612
|
return w.forEach(function(ue) {
|
|
614
|
-
var le,
|
|
613
|
+
var le, Pe = ue.key, ce = (le = I.current) === null || le === void 0 ? void 0 : le.querySelector('[data-node-key="'.concat(Xt(Pe), '"]'));
|
|
615
614
|
if (ce) {
|
|
616
|
-
var Ze = Qa(ce,
|
|
617
|
-
|
|
615
|
+
var Ze = Qa(ce, q), Te = L(Ze, 4), va = Te[0], fa = Te[1], ba = Te[2], ma = Te[3];
|
|
616
|
+
B.set(Pe, {
|
|
618
617
|
width: va,
|
|
619
618
|
height: fa,
|
|
620
619
|
left: ba,
|
|
621
620
|
top: ma
|
|
622
621
|
});
|
|
623
622
|
}
|
|
624
|
-
}),
|
|
623
|
+
}), B;
|
|
625
624
|
});
|
|
626
625
|
};
|
|
627
|
-
|
|
626
|
+
be(function() {
|
|
628
627
|
yt();
|
|
629
|
-
}, [w.map(function(
|
|
630
|
-
return
|
|
628
|
+
}, [w.map(function(R) {
|
|
629
|
+
return R.key;
|
|
631
630
|
}).join("_")]);
|
|
632
|
-
var
|
|
633
|
-
var
|
|
634
|
-
E([
|
|
635
|
-
var
|
|
636
|
-
|
|
637
|
-
var ue =
|
|
638
|
-
|
|
639
|
-
var le =
|
|
640
|
-
|
|
641
|
-
}), ca = w.slice(0, aa), sa = w.slice(na + 1), St = [].concat(Tt(ca), Tt(sa)), _t = K.get(
|
|
631
|
+
var He = Ft(function() {
|
|
632
|
+
var R = Ne(z), b = Ne(D), B = Ne(j);
|
|
633
|
+
E([R[0] - b[0] - B[0], R[1] - b[1] - B[1]]);
|
|
634
|
+
var q = Ne(N);
|
|
635
|
+
ve(q);
|
|
636
|
+
var ue = Ne(S);
|
|
637
|
+
oe(ue);
|
|
638
|
+
var le = Ne(I);
|
|
639
|
+
U([le[0] - q[0], le[1] - q[1]]), yt();
|
|
640
|
+
}), ca = w.slice(0, aa), sa = w.slice(na + 1), St = [].concat(Tt(ca), Tt(sa)), _t = K.get(l), da = Wa({
|
|
642
641
|
activeTabOffset: _t,
|
|
643
|
-
horizontal:
|
|
644
|
-
indicator:
|
|
645
|
-
rtl:
|
|
642
|
+
horizontal: h,
|
|
643
|
+
indicator: O,
|
|
644
|
+
rtl: o
|
|
646
645
|
}), ua = da.style;
|
|
647
|
-
|
|
646
|
+
be(function() {
|
|
648
647
|
mt();
|
|
649
|
-
}, [
|
|
650
|
-
|
|
651
|
-
}, [
|
|
652
|
-
var Ct = !!St.length,
|
|
653
|
-
return
|
|
654
|
-
onResize:
|
|
655
|
-
}, /* @__PURE__ */
|
|
656
|
-
ref: wa(t,
|
|
648
|
+
}, [l, Se, we, Dt(_t), Dt(K), h]), be(function() {
|
|
649
|
+
He();
|
|
650
|
+
}, [o]);
|
|
651
|
+
var Ct = !!St.length, Re = "".concat($, "-nav-wrap"), Je, Qe, xt, wt;
|
|
652
|
+
return h ? o ? (Qe = C > 0, Je = C !== we) : (Je = C < 0, Qe = C !== Se) : (xt = Z < 0, wt = Z !== Se), /* @__PURE__ */ c.createElement(et, {
|
|
653
|
+
onResize: He
|
|
654
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
655
|
+
ref: wa(t, z),
|
|
657
656
|
role: "tablist",
|
|
658
|
-
"aria-orientation":
|
|
659
|
-
className:
|
|
657
|
+
"aria-orientation": h ? "horizontal" : "vertical",
|
|
658
|
+
className: G("".concat($, "-nav"), n),
|
|
660
659
|
style: a,
|
|
661
660
|
onKeyDown: function() {
|
|
662
661
|
Ye();
|
|
663
662
|
}
|
|
664
|
-
}, /* @__PURE__ */
|
|
663
|
+
}, /* @__PURE__ */ c.createElement(at, {
|
|
665
664
|
ref: D,
|
|
666
665
|
position: "left",
|
|
667
666
|
extra: d,
|
|
668
667
|
prefixCls: $
|
|
669
|
-
}), /* @__PURE__ */
|
|
670
|
-
onResize:
|
|
671
|
-
}, /* @__PURE__ */
|
|
672
|
-
className:
|
|
673
|
-
ref:
|
|
674
|
-
}, /* @__PURE__ */
|
|
675
|
-
onResize:
|
|
676
|
-
}, /* @__PURE__ */
|
|
677
|
-
ref:
|
|
668
|
+
}), /* @__PURE__ */ c.createElement(et, {
|
|
669
|
+
onResize: He
|
|
670
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
671
|
+
className: G(Re, ae(ae(ae(ae({}, "".concat(Re, "-ping-left"), Je), "".concat(Re, "-ping-right"), Qe), "".concat(Re, "-ping-top"), xt), "".concat(Re, "-ping-bottom"), wt)),
|
|
672
|
+
ref: F
|
|
673
|
+
}, /* @__PURE__ */ c.createElement(et, {
|
|
674
|
+
onResize: He
|
|
675
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
676
|
+
ref: I,
|
|
678
677
|
className: "".concat($, "-nav-list"),
|
|
679
678
|
style: {
|
|
680
|
-
transform: "translate(".concat(
|
|
679
|
+
transform: "translate(".concat(C, "px, ").concat(Z, "px)"),
|
|
681
680
|
transition: De ? "none" : void 0
|
|
682
681
|
}
|
|
683
|
-
}, $t, /* @__PURE__ */
|
|
684
|
-
ref:
|
|
682
|
+
}, $t, /* @__PURE__ */ c.createElement(Ut, {
|
|
683
|
+
ref: N,
|
|
685
684
|
prefixCls: $,
|
|
686
685
|
locale: m,
|
|
687
686
|
editable: s,
|
|
688
687
|
style: se(se({}, $t.length === 0 ? void 0 : Be), {}, {
|
|
689
688
|
visibility: Ct ? "hidden" : null
|
|
690
689
|
})
|
|
691
|
-
}), /* @__PURE__ */
|
|
692
|
-
className:
|
|
690
|
+
}), /* @__PURE__ */ c.createElement("div", {
|
|
691
|
+
className: G("".concat($, "-ink-bar"), ae({}, "".concat($, "-ink-bar-animated"), i.inkBar)),
|
|
693
692
|
style: ua
|
|
694
|
-
}))))), /* @__PURE__ */
|
|
693
|
+
}))))), /* @__PURE__ */ c.createElement(ka, he({}, e, {
|
|
695
694
|
removeAriaLabel: m == null ? void 0 : m.removeAriaLabel,
|
|
696
|
-
ref:
|
|
695
|
+
ref: S,
|
|
697
696
|
prefixCls: $,
|
|
698
697
|
tabs: St,
|
|
699
698
|
className: !Ct && Zt,
|
|
700
699
|
tabMoving: !!De
|
|
701
|
-
})), /* @__PURE__ */
|
|
702
|
-
ref:
|
|
700
|
+
})), /* @__PURE__ */ c.createElement(at, {
|
|
701
|
+
ref: j,
|
|
703
702
|
position: "right",
|
|
704
703
|
extra: d,
|
|
705
704
|
prefixCls: $
|
|
706
705
|
})));
|
|
707
|
-
}), ct = /* @__PURE__ */
|
|
708
|
-
var n = e.prefixCls, a = e.className, r = e.style,
|
|
709
|
-
return /* @__PURE__ */
|
|
710
|
-
id:
|
|
706
|
+
}), ct = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
707
|
+
var n = e.prefixCls, a = e.className, r = e.style, i = e.id, l = e.active, o = e.tabKey, d = e.children;
|
|
708
|
+
return /* @__PURE__ */ c.createElement("div", {
|
|
709
|
+
id: i && "".concat(i, "-panel-").concat(o),
|
|
711
710
|
role: "tabpanel",
|
|
712
|
-
tabIndex:
|
|
713
|
-
"aria-labelledby":
|
|
714
|
-
"aria-hidden": !
|
|
711
|
+
tabIndex: l ? 0 : -1,
|
|
712
|
+
"aria-labelledby": i && "".concat(i, "-tab-").concat(o),
|
|
713
|
+
"aria-hidden": !l,
|
|
715
714
|
style: r,
|
|
716
|
-
className:
|
|
715
|
+
className: G(n, l && "".concat(n, "-active"), a),
|
|
717
716
|
ref: t
|
|
718
717
|
}, d);
|
|
719
718
|
});
|
|
720
719
|
process.env.NODE_ENV !== "production" && (ct.displayName = "TabPane");
|
|
721
720
|
var Za = ["renderTabBar"], en = ["label", "key"], Yt = function(t) {
|
|
722
|
-
var n = t.renderTabBar, a =
|
|
721
|
+
var n = t.renderTabBar, a = Ge(t, Za), r = c.useContext(Ve), i = r.tabs;
|
|
723
722
|
if (n) {
|
|
724
|
-
var
|
|
723
|
+
var l = se(se({}, a), {}, {
|
|
725
724
|
// Legacy support. We do not use this actually
|
|
726
|
-
panes:
|
|
727
|
-
var d =
|
|
728
|
-
return /* @__PURE__ */
|
|
725
|
+
panes: i.map(function(o) {
|
|
726
|
+
var d = o.label, s = o.key, m = Ge(o, en);
|
|
727
|
+
return /* @__PURE__ */ c.createElement(ct, he({
|
|
729
728
|
tab: d,
|
|
730
729
|
key: s,
|
|
731
730
|
tabKey: s
|
|
732
731
|
}, m));
|
|
733
732
|
})
|
|
734
733
|
});
|
|
735
|
-
return n(
|
|
734
|
+
return n(l, Bt);
|
|
736
735
|
}
|
|
737
|
-
return /* @__PURE__ */
|
|
736
|
+
return /* @__PURE__ */ c.createElement(Bt, a);
|
|
738
737
|
};
|
|
739
738
|
process.env.NODE_ENV !== "production" && (Yt.displayName = "TabNavListWrapper");
|
|
740
739
|
var tn = ["key", "forceRender", "style", "className", "destroyInactiveTabPane"], an = function(t) {
|
|
741
|
-
var n = t.id, a = t.activeKey, r = t.animated,
|
|
742
|
-
return /* @__PURE__ */
|
|
743
|
-
className:
|
|
744
|
-
}, /* @__PURE__ */
|
|
745
|
-
className:
|
|
740
|
+
var n = t.id, a = t.activeKey, r = t.animated, i = t.tabPosition, l = t.destroyInactiveTabPane, o = c.useContext(Ve), d = o.prefixCls, s = o.tabs, m = r.tabPane, p = "".concat(d, "-tabpane");
|
|
741
|
+
return /* @__PURE__ */ c.createElement("div", {
|
|
742
|
+
className: G("".concat(d, "-content-holder"))
|
|
743
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
744
|
+
className: G("".concat(d, "-content"), "".concat(d, "-content-").concat(i), ae({}, "".concat(d, "-content-animated"), m))
|
|
746
745
|
}, s.map(function(y) {
|
|
747
|
-
var
|
|
748
|
-
return /* @__PURE__ */
|
|
749
|
-
key:
|
|
746
|
+
var T = y.key, H = y.forceRender, x = y.style, O = y.className, g = y.destroyInactiveTabPane, $ = Ge(y, tn), w = T === a;
|
|
747
|
+
return /* @__PURE__ */ c.createElement(Ea, he({
|
|
748
|
+
key: T,
|
|
750
749
|
visible: w,
|
|
751
|
-
forceRender:
|
|
752
|
-
removeOnLeave: !!(
|
|
753
|
-
leavedClassName: "".concat(
|
|
754
|
-
}, r.tabPaneMotion), function(
|
|
755
|
-
var
|
|
756
|
-
return /* @__PURE__ */
|
|
757
|
-
prefixCls:
|
|
750
|
+
forceRender: H,
|
|
751
|
+
removeOnLeave: !!(l || g),
|
|
752
|
+
leavedClassName: "".concat(p, "-hidden")
|
|
753
|
+
}, r.tabPaneMotion), function(z, D) {
|
|
754
|
+
var j = z.style, F = z.className;
|
|
755
|
+
return /* @__PURE__ */ c.createElement(ct, he({}, $, {
|
|
756
|
+
prefixCls: p,
|
|
758
757
|
id: n,
|
|
759
|
-
tabKey:
|
|
758
|
+
tabKey: T,
|
|
760
759
|
animated: m,
|
|
761
760
|
active: w,
|
|
762
|
-
style: se(se({}, x),
|
|
763
|
-
className:
|
|
761
|
+
style: se(se({}, x), j),
|
|
762
|
+
className: G(O, F),
|
|
764
763
|
ref: D
|
|
765
764
|
}));
|
|
766
765
|
});
|
|
@@ -781,85 +780,85 @@ function nn() {
|
|
|
781
780
|
inkBar: !0
|
|
782
781
|
}, nt(e) === "object" ? e : {}), t.tabPaneMotion && t.tabPane === void 0 && (t.tabPane = !0), !t.tabPaneMotion && t.tabPane && (process.env.NODE_ENV !== "production" && Pa(!1, "`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work."), t.tabPane = !1), t;
|
|
783
782
|
}
|
|
784
|
-
var rn = ["id", "prefixCls", "className", "items", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "more", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll", "getPopupContainer", "popupClassName", "indicator"],
|
|
785
|
-
var n = e.id, a = e.prefixCls, r = a === void 0 ? "rc-tabs" : a,
|
|
786
|
-
return (
|
|
787
|
-
return
|
|
783
|
+
var rn = ["id", "prefixCls", "className", "items", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "more", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll", "getPopupContainer", "popupClassName", "indicator"], Ht = 0, kt = /* @__PURE__ */ c.forwardRef(function(e, t) {
|
|
784
|
+
var n = e.id, a = e.prefixCls, r = a === void 0 ? "rc-tabs" : a, i = e.className, l = e.items, o = e.direction, d = e.activeKey, s = e.defaultActiveKey, m = e.editable, p = e.animated, y = e.tabPosition, T = y === void 0 ? "top" : y, H = e.tabBarGutter, x = e.tabBarStyle, O = e.tabBarExtraContent, g = e.locale, $ = e.more, w = e.destroyInactiveTabPane, z = e.renderTabBar, D = e.onChange, j = e.onTabClick, F = e.onTabScroll, I = e.getPopupContainer, S = e.popupClassName, N = e.indicator, h = Ge(e, rn), _ = c.useMemo(function() {
|
|
785
|
+
return (l || []).filter(function(P) {
|
|
786
|
+
return P && nt(P) === "object" && "key" in P;
|
|
788
787
|
});
|
|
789
|
-
}, [
|
|
790
|
-
|
|
788
|
+
}, [l]), f = o === "rtl", C = nn(p), X = J(!1), A = L(X, 2), V = A[0], Z = A[1];
|
|
789
|
+
be(function() {
|
|
791
790
|
Z(Ba());
|
|
792
791
|
}, []);
|
|
793
|
-
var
|
|
794
|
-
var
|
|
795
|
-
return (
|
|
792
|
+
var v = Nt(function() {
|
|
793
|
+
var P;
|
|
794
|
+
return (P = _[0]) === null || P === void 0 ? void 0 : P.key;
|
|
796
795
|
}, {
|
|
797
796
|
value: d,
|
|
798
797
|
defaultValue: s
|
|
799
|
-
}),
|
|
800
|
-
return
|
|
801
|
-
return
|
|
798
|
+
}), re = L(v, 2), ne = re[0], Q = re[1], E = J(function() {
|
|
799
|
+
return _.findIndex(function(P) {
|
|
800
|
+
return P.key === ne;
|
|
802
801
|
});
|
|
803
|
-
}),
|
|
804
|
-
|
|
805
|
-
var
|
|
806
|
-
return
|
|
802
|
+
}), W = L(E, 2), Y = W[0], k = W[1];
|
|
803
|
+
be(function() {
|
|
804
|
+
var P = _.findIndex(function(me) {
|
|
805
|
+
return me.key === ne;
|
|
807
806
|
});
|
|
808
|
-
if (
|
|
809
|
-
var
|
|
810
|
-
|
|
807
|
+
if (P === -1) {
|
|
808
|
+
var oe;
|
|
809
|
+
P = Math.max(0, Math.min(Y, _.length - 1)), Q((oe = _[P]) === null || oe === void 0 ? void 0 : oe.key);
|
|
811
810
|
}
|
|
812
|
-
|
|
813
|
-
}, [
|
|
814
|
-
return
|
|
815
|
-
}).join("_"),
|
|
816
|
-
var
|
|
811
|
+
k(P);
|
|
812
|
+
}, [_.map(function(P) {
|
|
813
|
+
return P.key;
|
|
814
|
+
}).join("_"), ne, Y]);
|
|
815
|
+
var U = Nt(null, {
|
|
817
816
|
value: n
|
|
818
|
-
}),
|
|
819
|
-
|
|
820
|
-
n || (
|
|
817
|
+
}), ie = L(U, 2), ee = ie[0], pe = ie[1];
|
|
818
|
+
be(function() {
|
|
819
|
+
n || (pe("rc-tabs-".concat(process.env.NODE_ENV === "test" ? "test" : Ht)), Ht += 1);
|
|
821
820
|
}, []);
|
|
822
|
-
function
|
|
823
|
-
|
|
824
|
-
var
|
|
825
|
-
|
|
821
|
+
function ve(P, oe) {
|
|
822
|
+
j == null || j(P, oe);
|
|
823
|
+
var me = P !== ne;
|
|
824
|
+
Q(P), me && (D == null || D(P));
|
|
826
825
|
}
|
|
827
|
-
var
|
|
828
|
-
id:
|
|
829
|
-
activeKey:
|
|
830
|
-
animated:
|
|
831
|
-
tabPosition:
|
|
826
|
+
var $e = {
|
|
827
|
+
id: ee,
|
|
828
|
+
activeKey: ne,
|
|
829
|
+
animated: C,
|
|
830
|
+
tabPosition: T,
|
|
832
831
|
rtl: f,
|
|
833
|
-
mobile:
|
|
834
|
-
},
|
|
832
|
+
mobile: V
|
|
833
|
+
}, ye = se(se({}, $e), {}, {
|
|
835
834
|
editable: m,
|
|
836
835
|
locale: g,
|
|
837
836
|
more: $,
|
|
838
|
-
tabBarGutter:
|
|
839
|
-
onTabClick:
|
|
840
|
-
onTabScroll:
|
|
841
|
-
extra:
|
|
837
|
+
tabBarGutter: H,
|
|
838
|
+
onTabClick: ve,
|
|
839
|
+
onTabScroll: F,
|
|
840
|
+
extra: O,
|
|
842
841
|
style: x,
|
|
843
842
|
panes: null,
|
|
844
|
-
getPopupContainer:
|
|
845
|
-
popupClassName:
|
|
846
|
-
indicator:
|
|
843
|
+
getPopupContainer: I,
|
|
844
|
+
popupClassName: S,
|
|
845
|
+
indicator: N
|
|
847
846
|
});
|
|
848
|
-
return /* @__PURE__ */
|
|
847
|
+
return /* @__PURE__ */ c.createElement(Ve.Provider, {
|
|
849
848
|
value: {
|
|
850
|
-
tabs:
|
|
849
|
+
tabs: _,
|
|
851
850
|
prefixCls: r
|
|
852
851
|
}
|
|
853
|
-
}, /* @__PURE__ */
|
|
852
|
+
}, /* @__PURE__ */ c.createElement("div", he({
|
|
854
853
|
ref: t,
|
|
855
854
|
id: n,
|
|
856
|
-
className:
|
|
857
|
-
},
|
|
858
|
-
renderTabBar:
|
|
859
|
-
})), /* @__PURE__ */
|
|
855
|
+
className: G(r, "".concat(r, "-").concat(T), ae(ae(ae({}, "".concat(r, "-mobile"), V), "".concat(r, "-editable"), m), "".concat(r, "-rtl"), f), i)
|
|
856
|
+
}, h), /* @__PURE__ */ c.createElement(Yt, he({}, ye, {
|
|
857
|
+
renderTabBar: z
|
|
858
|
+
})), /* @__PURE__ */ c.createElement(an, he({
|
|
860
859
|
destroyInactiveTabPane: w
|
|
861
|
-
},
|
|
862
|
-
animated:
|
|
860
|
+
}, $e, {
|
|
861
|
+
animated: C
|
|
863
862
|
}))));
|
|
864
863
|
});
|
|
865
864
|
process.env.NODE_ENV !== "production" && (kt.displayName = "Tabs");
|
|
@@ -868,11 +867,11 @@ const on = {
|
|
|
868
867
|
motionEnter: !0,
|
|
869
868
|
motionLeave: !0
|
|
870
869
|
};
|
|
871
|
-
function ln(e
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
870
|
+
function ln(e, t = {
|
|
871
|
+
inkBar: !0,
|
|
872
|
+
tabPane: !1
|
|
873
|
+
}) {
|
|
874
|
+
let n;
|
|
876
875
|
return t === !1 ? n = {
|
|
877
876
|
inkBar: !1,
|
|
878
877
|
tabPane: !1
|
|
@@ -897,19 +896,26 @@ function sn(e) {
|
|
|
897
896
|
}
|
|
898
897
|
function dn(e, t) {
|
|
899
898
|
if (process.env.NODE_ENV !== "production" && rt("Tabs").deprecated(!t, "Tabs.TabPane", "items"), e)
|
|
900
|
-
return e
|
|
899
|
+
return e.map((a) => {
|
|
900
|
+
var r;
|
|
901
|
+
const i = (r = a.destroyOnHidden) !== null && r !== void 0 ? r : a.destroyInactiveTabPane;
|
|
902
|
+
return Object.assign(Object.assign({}, a), {
|
|
903
|
+
// TODO: In the future, destroyInactiveTabPane in rc-tabs needs to be upgrade to destroyOnHidden
|
|
904
|
+
destroyInactiveTabPane: i
|
|
905
|
+
});
|
|
906
|
+
});
|
|
901
907
|
const n = Na(t).map((a) => {
|
|
902
|
-
if (/* @__PURE__ */
|
|
908
|
+
if (/* @__PURE__ */ c.isValidElement(a)) {
|
|
903
909
|
const {
|
|
904
910
|
key: r,
|
|
905
|
-
props:
|
|
906
|
-
} = a,
|
|
907
|
-
tab:
|
|
908
|
-
} =
|
|
911
|
+
props: i
|
|
912
|
+
} = a, l = i || {}, {
|
|
913
|
+
tab: o
|
|
914
|
+
} = l, d = cn(l, ["tab"]);
|
|
909
915
|
return Object.assign(Object.assign({
|
|
910
916
|
key: String(r)
|
|
911
917
|
}, d), {
|
|
912
|
-
label:
|
|
918
|
+
label: o
|
|
913
919
|
});
|
|
914
920
|
}
|
|
915
921
|
return null;
|
|
@@ -959,8 +965,8 @@ const un = (e) => {
|
|
|
959
965
|
tabsCardPadding: n,
|
|
960
966
|
cardBg: a,
|
|
961
967
|
cardGutter: r,
|
|
962
|
-
colorBorderSecondary:
|
|
963
|
-
itemSelectedColor:
|
|
968
|
+
colorBorderSecondary: i,
|
|
969
|
+
itemSelectedColor: l
|
|
964
970
|
} = e;
|
|
965
971
|
return {
|
|
966
972
|
[`${t}-card`]: {
|
|
@@ -969,19 +975,19 @@ const un = (e) => {
|
|
|
969
975
|
margin: 0,
|
|
970
976
|
padding: n,
|
|
971
977
|
background: a,
|
|
972
|
-
border: `${u(e.lineWidth)} ${e.lineType} ${
|
|
978
|
+
border: `${u(e.lineWidth)} ${e.lineType} ${i}`,
|
|
973
979
|
transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`
|
|
974
980
|
},
|
|
975
981
|
[`${t}-tab-active`]: {
|
|
976
|
-
color:
|
|
982
|
+
color: l,
|
|
977
983
|
background: e.colorBgContainer
|
|
978
984
|
},
|
|
979
|
-
[`${t}-tab-focus
|
|
985
|
+
[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]: Vt(e, -3),
|
|
986
|
+
[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]: {
|
|
987
|
+
outline: "none"
|
|
988
|
+
},
|
|
980
989
|
[`${t}-ink-bar`]: {
|
|
981
990
|
visibility: "hidden"
|
|
982
|
-
},
|
|
983
|
-
[`& ${t}-tab${t}-tab-focus ${t}-tab-btn`]: {
|
|
984
|
-
outline: "none"
|
|
985
991
|
}
|
|
986
992
|
},
|
|
987
993
|
// ========================== Top & Bottom ==========================
|
|
@@ -1143,9 +1149,9 @@ const un = (e) => {
|
|
|
1143
1149
|
margin: n,
|
|
1144
1150
|
colorBorderSecondary: a,
|
|
1145
1151
|
horizontalMargin: r,
|
|
1146
|
-
verticalItemPadding:
|
|
1147
|
-
verticalItemMargin:
|
|
1148
|
-
calc:
|
|
1152
|
+
verticalItemPadding: i,
|
|
1153
|
+
verticalItemMargin: l,
|
|
1154
|
+
calc: o
|
|
1149
1155
|
} = e;
|
|
1150
1156
|
return {
|
|
1151
1157
|
// ========================== Top & Bottom ==========================
|
|
@@ -1233,14 +1239,14 @@ const un = (e) => {
|
|
|
1233
1239
|
[`${t}-left, ${t}-right`]: {
|
|
1234
1240
|
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1235
1241
|
flexDirection: "column",
|
|
1236
|
-
minWidth:
|
|
1242
|
+
minWidth: o(e.controlHeight).mul(1.25).equal(),
|
|
1237
1243
|
// >>>>>>>>>>> Tab
|
|
1238
1244
|
[`${t}-tab`]: {
|
|
1239
|
-
padding:
|
|
1245
|
+
padding: i,
|
|
1240
1246
|
textAlign: "center"
|
|
1241
1247
|
},
|
|
1242
1248
|
[`${t}-tab + ${t}-tab`]: {
|
|
1243
|
-
margin:
|
|
1249
|
+
margin: l
|
|
1244
1250
|
},
|
|
1245
1251
|
// >>>>>>>>>>> Nav
|
|
1246
1252
|
[`${t}-nav-wrap`]: {
|
|
@@ -1297,7 +1303,7 @@ const un = (e) => {
|
|
|
1297
1303
|
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
1298
1304
|
marginLeft: {
|
|
1299
1305
|
_skip_check_: !0,
|
|
1300
|
-
value: u(
|
|
1306
|
+
value: u(o(e.lineWidth).mul(-1).equal())
|
|
1301
1307
|
},
|
|
1302
1308
|
borderLeft: {
|
|
1303
1309
|
_skip_check_: !0,
|
|
@@ -1325,7 +1331,7 @@ const un = (e) => {
|
|
|
1325
1331
|
order: 0,
|
|
1326
1332
|
marginRight: {
|
|
1327
1333
|
_skip_check_: !0,
|
|
1328
|
-
value:
|
|
1334
|
+
value: o(e.lineWidth).mul(-1).equal()
|
|
1329
1335
|
},
|
|
1330
1336
|
borderRight: {
|
|
1331
1337
|
_skip_check_: !0,
|
|
@@ -1345,15 +1351,18 @@ const un = (e) => {
|
|
|
1345
1351
|
componentCls: t,
|
|
1346
1352
|
cardPaddingSM: n,
|
|
1347
1353
|
cardPaddingLG: a,
|
|
1348
|
-
|
|
1354
|
+
cardHeightSM: r,
|
|
1355
|
+
cardHeightLG: i,
|
|
1356
|
+
horizontalItemPaddingSM: l,
|
|
1349
1357
|
horizontalItemPaddingLG: o
|
|
1350
1358
|
} = e;
|
|
1351
1359
|
return {
|
|
1360
|
+
// >>>>> shared
|
|
1352
1361
|
[t]: {
|
|
1353
1362
|
"&-small": {
|
|
1354
1363
|
[`> ${t}-nav`]: {
|
|
1355
1364
|
[`${t}-tab`]: {
|
|
1356
|
-
padding:
|
|
1365
|
+
padding: l,
|
|
1357
1366
|
fontSize: e.titleFontSizeSM
|
|
1358
1367
|
}
|
|
1359
1368
|
}
|
|
@@ -1362,16 +1371,23 @@ const un = (e) => {
|
|
|
1362
1371
|
[`> ${t}-nav`]: {
|
|
1363
1372
|
[`${t}-tab`]: {
|
|
1364
1373
|
padding: o,
|
|
1365
|
-
fontSize: e.titleFontSizeLG
|
|
1374
|
+
fontSize: e.titleFontSizeLG,
|
|
1375
|
+
lineHeight: e.lineHeightLG
|
|
1366
1376
|
}
|
|
1367
1377
|
}
|
|
1368
1378
|
}
|
|
1369
1379
|
},
|
|
1380
|
+
// >>>>> card
|
|
1370
1381
|
[`${t}-card`]: {
|
|
1382
|
+
// Small
|
|
1371
1383
|
[`&${t}-small`]: {
|
|
1372
1384
|
[`> ${t}-nav`]: {
|
|
1373
1385
|
[`${t}-tab`]: {
|
|
1374
1386
|
padding: n
|
|
1387
|
+
},
|
|
1388
|
+
[`${t}-nav-add`]: {
|
|
1389
|
+
minWidth: r,
|
|
1390
|
+
minHeight: r
|
|
1375
1391
|
}
|
|
1376
1392
|
},
|
|
1377
1393
|
[`&${t}-bottom`]: {
|
|
@@ -1401,10 +1417,15 @@ const un = (e) => {
|
|
|
1401
1417
|
}
|
|
1402
1418
|
}
|
|
1403
1419
|
},
|
|
1420
|
+
// Large
|
|
1404
1421
|
[`&${t}-large`]: {
|
|
1405
1422
|
[`> ${t}-nav`]: {
|
|
1406
1423
|
[`${t}-tab`]: {
|
|
1407
1424
|
padding: a
|
|
1425
|
+
},
|
|
1426
|
+
[`${t}-nav-add`]: {
|
|
1427
|
+
minWidth: i,
|
|
1428
|
+
minHeight: i
|
|
1408
1429
|
}
|
|
1409
1430
|
}
|
|
1410
1431
|
}
|
|
@@ -1416,9 +1437,9 @@ const un = (e) => {
|
|
|
1416
1437
|
itemActiveColor: n,
|
|
1417
1438
|
itemHoverColor: a,
|
|
1418
1439
|
iconCls: r,
|
|
1419
|
-
tabsHorizontalItemMargin:
|
|
1420
|
-
horizontalItemPadding:
|
|
1421
|
-
itemSelectedColor:
|
|
1440
|
+
tabsHorizontalItemMargin: i,
|
|
1441
|
+
horizontalItemPadding: l,
|
|
1442
|
+
itemSelectedColor: o,
|
|
1422
1443
|
itemColor: d
|
|
1423
1444
|
} = e, s = `${t}-tab`;
|
|
1424
1445
|
return {
|
|
@@ -1428,7 +1449,7 @@ const un = (e) => {
|
|
|
1428
1449
|
WebkitTapHighlightColor: "transparent",
|
|
1429
1450
|
display: "inline-flex",
|
|
1430
1451
|
alignItems: "center",
|
|
1431
|
-
padding:
|
|
1452
|
+
padding: l,
|
|
1432
1453
|
fontSize: e.titleFontSize,
|
|
1433
1454
|
background: "transparent",
|
|
1434
1455
|
border: 0,
|
|
@@ -1472,10 +1493,10 @@ const un = (e) => {
|
|
|
1472
1493
|
color: a
|
|
1473
1494
|
},
|
|
1474
1495
|
[`&${s}-active ${s}-btn`]: {
|
|
1475
|
-
color:
|
|
1496
|
+
color: o,
|
|
1476
1497
|
textShadow: e.tabsActiveTextShadow
|
|
1477
1498
|
},
|
|
1478
|
-
[`&${s}-focus ${s}-btn`]:
|
|
1499
|
+
[`&${s}-focus ${s}-btn:focus-visible`]: Vt(e),
|
|
1479
1500
|
[`&${s}-disabled`]: {
|
|
1480
1501
|
color: e.colorTextDisabled,
|
|
1481
1502
|
cursor: "not-allowed"
|
|
@@ -1498,17 +1519,17 @@ const un = (e) => {
|
|
|
1498
1519
|
[`${s} + ${s}`]: {
|
|
1499
1520
|
margin: {
|
|
1500
1521
|
_skip_check_: !0,
|
|
1501
|
-
value:
|
|
1522
|
+
value: i
|
|
1502
1523
|
}
|
|
1503
1524
|
}
|
|
1504
1525
|
};
|
|
1505
|
-
},
|
|
1526
|
+
}, hn = (e) => {
|
|
1506
1527
|
const {
|
|
1507
1528
|
componentCls: t,
|
|
1508
1529
|
tabsHorizontalItemMarginRTL: n,
|
|
1509
1530
|
iconCls: a,
|
|
1510
1531
|
cardGutter: r,
|
|
1511
|
-
calc:
|
|
1532
|
+
calc: i
|
|
1512
1533
|
} = e;
|
|
1513
1534
|
return {
|
|
1514
1535
|
[`${t}-rtl`]: {
|
|
@@ -1542,7 +1563,7 @@ const un = (e) => {
|
|
|
1542
1563
|
},
|
|
1543
1564
|
marginLeft: {
|
|
1544
1565
|
_skip_check_: !0,
|
|
1545
|
-
value: u(
|
|
1566
|
+
value: u(i(e.marginXXS).mul(-1).equal())
|
|
1546
1567
|
},
|
|
1547
1568
|
[a]: {
|
|
1548
1569
|
margin: 0
|
|
@@ -1594,15 +1615,15 @@ const un = (e) => {
|
|
|
1594
1615
|
}
|
|
1595
1616
|
}
|
|
1596
1617
|
};
|
|
1597
|
-
},
|
|
1618
|
+
}, pn = (e) => {
|
|
1598
1619
|
const {
|
|
1599
1620
|
componentCls: t,
|
|
1600
1621
|
tabsCardPadding: n,
|
|
1601
1622
|
cardHeight: a,
|
|
1602
1623
|
cardGutter: r,
|
|
1603
|
-
itemHoverColor:
|
|
1604
|
-
itemActiveColor:
|
|
1605
|
-
colorBorderSecondary:
|
|
1624
|
+
itemHoverColor: i,
|
|
1625
|
+
itemActiveColor: l,
|
|
1626
|
+
colorBorderSecondary: o
|
|
1606
1627
|
} = e;
|
|
1607
1628
|
return {
|
|
1608
1629
|
[t]: Object.assign(Object.assign(Object.assign(Object.assign({}, it(e)), {
|
|
@@ -1671,23 +1692,23 @@ const un = (e) => {
|
|
|
1671
1692
|
},
|
|
1672
1693
|
[`${t}-nav-add`]: Object.assign({
|
|
1673
1694
|
minWidth: a,
|
|
1695
|
+
minHeight: a,
|
|
1674
1696
|
marginLeft: {
|
|
1675
1697
|
_skip_check_: !0,
|
|
1676
1698
|
value: r
|
|
1677
1699
|
},
|
|
1678
|
-
padding: u(e.paddingXS),
|
|
1679
1700
|
background: "transparent",
|
|
1680
|
-
border: `${u(e.lineWidth)} ${e.lineType} ${
|
|
1701
|
+
border: `${u(e.lineWidth)} ${e.lineType} ${o}`,
|
|
1681
1702
|
borderRadius: `${u(e.borderRadiusLG)} ${u(e.borderRadiusLG)} 0 0`,
|
|
1682
1703
|
outline: "none",
|
|
1683
1704
|
cursor: "pointer",
|
|
1684
1705
|
color: e.colorText,
|
|
1685
1706
|
transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`,
|
|
1686
1707
|
"&:hover": {
|
|
1687
|
-
color:
|
|
1708
|
+
color: i
|
|
1688
1709
|
},
|
|
1689
1710
|
"&:active, &:focus:not(:focus-visible)": {
|
|
1690
|
-
color:
|
|
1711
|
+
color: l
|
|
1691
1712
|
}
|
|
1692
1713
|
}, tt(e, -3))
|
|
1693
1714
|
},
|
|
@@ -1728,15 +1749,25 @@ const un = (e) => {
|
|
|
1728
1749
|
}
|
|
1729
1750
|
};
|
|
1730
1751
|
}, $n = (e) => {
|
|
1731
|
-
const
|
|
1752
|
+
const {
|
|
1753
|
+
cardHeight: t,
|
|
1754
|
+
cardHeightSM: n,
|
|
1755
|
+
cardHeightLG: a,
|
|
1756
|
+
controlHeight: r,
|
|
1757
|
+
controlHeightLG: i
|
|
1758
|
+
} = e, l = t || i, o = n || r, d = a || i + 8;
|
|
1732
1759
|
return {
|
|
1733
1760
|
zIndexPopup: e.zIndexPopupBase + 50,
|
|
1734
1761
|
cardBg: e.colorFillAlter,
|
|
1735
|
-
|
|
1762
|
+
// We can not pass this as valid value,
|
|
1763
|
+
// Since `cardHeight` will lock nav add button height.
|
|
1764
|
+
cardHeight: l,
|
|
1765
|
+
cardHeightSM: o,
|
|
1766
|
+
cardHeightLG: d,
|
|
1736
1767
|
// Initialize with empty string, because cardPadding will be calculated with cardHeight by default.
|
|
1737
|
-
cardPadding: `${(
|
|
1738
|
-
cardPaddingSM: `${e.
|
|
1739
|
-
cardPaddingLG: `${e.
|
|
1768
|
+
cardPadding: `${(l - e.fontHeight) / 2 - e.lineWidth}px ${e.padding}px`,
|
|
1769
|
+
cardPaddingSM: `${(o - e.fontHeight) / 2 - e.lineWidth}px ${e.paddingXS}px`,
|
|
1770
|
+
cardPaddingLG: `${(d - e.fontHeightLG) / 2 - e.lineWidth}px ${e.padding}px`,
|
|
1740
1771
|
titleFontSize: e.fontSize,
|
|
1741
1772
|
titleFontSizeLG: e.fontSizeLG,
|
|
1742
1773
|
titleFontSizeSM: e.fontSize,
|
|
@@ -1758,7 +1789,7 @@ const un = (e) => {
|
|
|
1758
1789
|
itemActiveColor: e.colorPrimaryActive,
|
|
1759
1790
|
cardGutter: e.marginXXS / 2
|
|
1760
1791
|
};
|
|
1761
|
-
}, yn =
|
|
1792
|
+
}, yn = Gt("Tabs", (e) => {
|
|
1762
1793
|
const t = Wt(e, {
|
|
1763
1794
|
// `cardPadding` is empty by default, so we could calculate with dynamic `cardHeight`
|
|
1764
1795
|
tabsCardPadding: e.cardPadding,
|
|
@@ -1769,7 +1800,7 @@ const un = (e) => {
|
|
|
1769
1800
|
tabsHorizontalItemMargin: `0 0 0 ${u(e.horizontalItemGutter)}`,
|
|
1770
1801
|
tabsHorizontalItemMarginRTL: `0 0 0 ${u(e.horizontalItemGutter)}`
|
|
1771
1802
|
});
|
|
1772
|
-
return [mn(t),
|
|
1803
|
+
return [mn(t), hn(t), bn(t), fn(t), vn(t), pn(t), un(t)];
|
|
1773
1804
|
}, $n), Jt = () => null;
|
|
1774
1805
|
process.env.NODE_ENV !== "production" && (Jt.displayName = "DeprecatedTabPane");
|
|
1775
1806
|
var Sn = function(e, t) {
|
|
@@ -1780,77 +1811,80 @@ var Sn = function(e, t) {
|
|
|
1780
1811
|
return n;
|
|
1781
1812
|
};
|
|
1782
1813
|
const st = (e) => {
|
|
1783
|
-
var t, n, a, r,
|
|
1814
|
+
var t, n, a, r, i, l, o, d, s, m, p;
|
|
1784
1815
|
const {
|
|
1785
1816
|
type: y,
|
|
1786
|
-
className:
|
|
1787
|
-
rootClassName:
|
|
1817
|
+
className: T,
|
|
1818
|
+
rootClassName: H,
|
|
1788
1819
|
size: x,
|
|
1789
|
-
onEdit:
|
|
1820
|
+
onEdit: O,
|
|
1790
1821
|
hideAdd: g,
|
|
1791
1822
|
centered: $,
|
|
1792
1823
|
addIcon: w,
|
|
1793
|
-
removeIcon:
|
|
1824
|
+
removeIcon: z,
|
|
1794
1825
|
moreIcon: D,
|
|
1795
|
-
more:
|
|
1796
|
-
popupClassName:
|
|
1797
|
-
children:
|
|
1798
|
-
items:
|
|
1799
|
-
animated:
|
|
1800
|
-
style:
|
|
1801
|
-
indicatorSize:
|
|
1802
|
-
indicator: f
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
} =
|
|
1806
|
-
|
|
1826
|
+
more: j,
|
|
1827
|
+
popupClassName: F,
|
|
1828
|
+
children: I,
|
|
1829
|
+
items: S,
|
|
1830
|
+
animated: N,
|
|
1831
|
+
style: h,
|
|
1832
|
+
indicatorSize: _,
|
|
1833
|
+
indicator: f,
|
|
1834
|
+
destroyInactiveTabPane: C,
|
|
1835
|
+
destroyOnHidden: X
|
|
1836
|
+
} = e, A = Sn(e, ["type", "className", "rootClassName", "size", "onEdit", "hideAdd", "centered", "addIcon", "removeIcon", "moreIcon", "more", "popupClassName", "children", "items", "animated", "style", "indicatorSize", "indicator", "destroyInactiveTabPane", "destroyOnHidden"]), {
|
|
1837
|
+
prefixCls: V
|
|
1838
|
+
} = A, {
|
|
1839
|
+
direction: Z,
|
|
1807
1840
|
tabs: v,
|
|
1808
|
-
getPrefixCls:
|
|
1809
|
-
getPopupContainer:
|
|
1810
|
-
} =
|
|
1811
|
-
let
|
|
1812
|
-
y === "editable-card" && (
|
|
1813
|
-
onEdit: (
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
N == null || N(ie === "add" ? de : z, ie);
|
|
1841
|
+
getPrefixCls: re,
|
|
1842
|
+
getPopupContainer: ne
|
|
1843
|
+
} = c.useContext(Me), Q = re("tabs", V), E = Oa(Q), [W, Y, k] = yn(Q, E);
|
|
1844
|
+
let U;
|
|
1845
|
+
y === "editable-card" && (U = {
|
|
1846
|
+
onEdit: (P, {
|
|
1847
|
+
key: oe,
|
|
1848
|
+
event: me
|
|
1849
|
+
}) => {
|
|
1850
|
+
O == null || O(P === "add" ? me : oe, P);
|
|
1819
1851
|
},
|
|
1820
|
-
removeIcon: (t =
|
|
1821
|
-
addIcon: (w ?? (v == null ? void 0 : v.addIcon)) || /* @__PURE__ */
|
|
1852
|
+
removeIcon: (t = z ?? (v == null ? void 0 : v.removeIcon)) !== null && t !== void 0 ? t : /* @__PURE__ */ c.createElement(Ra, null),
|
|
1853
|
+
addIcon: (w ?? (v == null ? void 0 : v.addIcon)) || /* @__PURE__ */ c.createElement(qt, null),
|
|
1822
1854
|
showAdd: g !== !0
|
|
1823
1855
|
});
|
|
1824
|
-
const
|
|
1856
|
+
const ie = re();
|
|
1825
1857
|
if (process.env.NODE_ENV !== "production") {
|
|
1826
|
-
const
|
|
1827
|
-
process.env.NODE_ENV !== "production" &&
|
|
1858
|
+
const P = rt("Tabs");
|
|
1859
|
+
process.env.NODE_ENV !== "production" && P(!("onPrevClick" in e) && !("onNextClick" in e), "breaking", "`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."), process.env.NODE_ENV !== "production" && P(!(_ || v != null && v.indicatorSize), "deprecated", "`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead."), P.deprecated(!("destroyInactiveTabPane" in e || S != null && S.some((oe) => "destroyInactiveTabPane" in oe)), "destroyInactiveTabPane", "destroyOnHidden");
|
|
1828
1860
|
}
|
|
1829
|
-
const
|
|
1861
|
+
const ee = Kt(x), pe = dn(S, I), ve = ln(Q, N), $e = Object.assign(Object.assign({}, v == null ? void 0 : v.style), h), ye = {
|
|
1830
1862
|
align: (n = f == null ? void 0 : f.align) !== null && n !== void 0 ? n : (a = v == null ? void 0 : v.indicator) === null || a === void 0 ? void 0 : a.align,
|
|
1831
|
-
size: (
|
|
1863
|
+
size: (o = (i = (r = f == null ? void 0 : f.size) !== null && r !== void 0 ? r : _) !== null && i !== void 0 ? i : (l = v == null ? void 0 : v.indicator) === null || l === void 0 ? void 0 : l.size) !== null && o !== void 0 ? o : v == null ? void 0 : v.indicatorSize
|
|
1832
1864
|
};
|
|
1833
|
-
return
|
|
1834
|
-
direction:
|
|
1835
|
-
getPopupContainer:
|
|
1836
|
-
},
|
|
1837
|
-
items:
|
|
1838
|
-
className:
|
|
1839
|
-
[`${
|
|
1840
|
-
[`${
|
|
1841
|
-
[`${
|
|
1842
|
-
[`${
|
|
1843
|
-
}, v == null ? void 0 : v.className,
|
|
1844
|
-
popupClassName:
|
|
1845
|
-
style:
|
|
1846
|
-
editable:
|
|
1865
|
+
return W(/* @__PURE__ */ c.createElement(kt, Object.assign({
|
|
1866
|
+
direction: Z,
|
|
1867
|
+
getPopupContainer: ne
|
|
1868
|
+
}, A, {
|
|
1869
|
+
items: pe,
|
|
1870
|
+
className: G({
|
|
1871
|
+
[`${Q}-${ee}`]: ee,
|
|
1872
|
+
[`${Q}-card`]: ["card", "editable-card"].includes(y),
|
|
1873
|
+
[`${Q}-editable-card`]: y === "editable-card",
|
|
1874
|
+
[`${Q}-centered`]: $
|
|
1875
|
+
}, v == null ? void 0 : v.className, T, H, Y, k, E),
|
|
1876
|
+
popupClassName: G(F, Y, k, E),
|
|
1877
|
+
style: $e,
|
|
1878
|
+
editable: U,
|
|
1847
1879
|
more: Object.assign({
|
|
1848
|
-
icon: (
|
|
1849
|
-
transitionName: `${
|
|
1850
|
-
},
|
|
1851
|
-
prefixCls:
|
|
1852
|
-
animated:
|
|
1853
|
-
indicator:
|
|
1880
|
+
icon: (p = (m = (s = (d = v == null ? void 0 : v.more) === null || d === void 0 ? void 0 : d.icon) !== null && s !== void 0 ? s : v == null ? void 0 : v.moreIcon) !== null && m !== void 0 ? m : D) !== null && p !== void 0 ? p : /* @__PURE__ */ c.createElement(Ha, null),
|
|
1881
|
+
transitionName: `${ie}-slide-up`
|
|
1882
|
+
}, j),
|
|
1883
|
+
prefixCls: Q,
|
|
1884
|
+
animated: ve,
|
|
1885
|
+
indicator: ye,
|
|
1886
|
+
// TODO: In the future, destroyInactiveTabPane in rc-tabs needs to be upgrade to destroyOnHidden
|
|
1887
|
+
destroyInactiveTabPane: X ?? C
|
|
1854
1888
|
})));
|
|
1855
1889
|
};
|
|
1856
1890
|
st.TabPane = Jt;
|
|
@@ -1869,12 +1903,12 @@ const Qt = (e) => {
|
|
|
1869
1903
|
hoverable: a = !0
|
|
1870
1904
|
} = e, r = _n(e, ["prefixCls", "className", "hoverable"]);
|
|
1871
1905
|
const {
|
|
1872
|
-
getPrefixCls:
|
|
1873
|
-
} =
|
|
1874
|
-
[`${
|
|
1906
|
+
getPrefixCls: i
|
|
1907
|
+
} = c.useContext(Me), l = i("card", t), o = G(`${l}-grid`, n, {
|
|
1908
|
+
[`${l}-grid-hoverable`]: a
|
|
1875
1909
|
});
|
|
1876
|
-
return /* @__PURE__ */
|
|
1877
|
-
className:
|
|
1910
|
+
return /* @__PURE__ */ c.createElement("div", Object.assign({}, r, {
|
|
1911
|
+
className: o
|
|
1878
1912
|
}));
|
|
1879
1913
|
}, Cn = (e) => {
|
|
1880
1914
|
const {
|
|
@@ -1882,7 +1916,7 @@ const Qt = (e) => {
|
|
|
1882
1916
|
componentCls: n,
|
|
1883
1917
|
headerHeight: a,
|
|
1884
1918
|
headerPadding: r,
|
|
1885
|
-
tabsMarginBottom:
|
|
1919
|
+
tabsMarginBottom: i
|
|
1886
1920
|
} = e;
|
|
1887
1921
|
return Object.assign(Object.assign({
|
|
1888
1922
|
display: "flex",
|
|
@@ -1918,7 +1952,7 @@ const Qt = (e) => {
|
|
|
1918
1952
|
}),
|
|
1919
1953
|
[`${t}-tabs-top`]: {
|
|
1920
1954
|
clear: "both",
|
|
1921
|
-
marginBottom:
|
|
1955
|
+
marginBottom: i,
|
|
1922
1956
|
color: e.colorText,
|
|
1923
1957
|
fontWeight: "normal",
|
|
1924
1958
|
fontSize: e.fontSize,
|
|
@@ -1959,15 +1993,15 @@ const Qt = (e) => {
|
|
|
1959
1993
|
iconCls: n,
|
|
1960
1994
|
actionsLiMargin: a,
|
|
1961
1995
|
cardActionsIconSize: r,
|
|
1962
|
-
colorBorderSecondary:
|
|
1963
|
-
actionsBg:
|
|
1996
|
+
colorBorderSecondary: i,
|
|
1997
|
+
actionsBg: l
|
|
1964
1998
|
} = e;
|
|
1965
1999
|
return Object.assign(Object.assign({
|
|
1966
2000
|
margin: 0,
|
|
1967
2001
|
padding: 0,
|
|
1968
2002
|
listStyle: "none",
|
|
1969
|
-
background:
|
|
1970
|
-
borderTop: `${u(e.lineWidth)} ${e.lineType} ${
|
|
2003
|
+
background: l,
|
|
2004
|
+
borderTop: `${u(e.lineWidth)} ${e.lineType} ${i}`,
|
|
1971
2005
|
display: "flex",
|
|
1972
2006
|
borderRadius: `0 0 ${u(e.borderRadiusLG)} ${u(e.borderRadiusLG)}`
|
|
1973
2007
|
}, We()), {
|
|
@@ -2002,7 +2036,7 @@ const Qt = (e) => {
|
|
|
2002
2036
|
}
|
|
2003
2037
|
},
|
|
2004
2038
|
"&:not(:last-child)": {
|
|
2005
|
-
borderInlineEnd: `${u(e.lineWidth)} ${e.lineType} ${
|
|
2039
|
+
borderInlineEnd: `${u(e.lineWidth)} ${e.lineType} ${i}`
|
|
2006
2040
|
}
|
|
2007
2041
|
}
|
|
2008
2042
|
});
|
|
@@ -2063,9 +2097,9 @@ const Qt = (e) => {
|
|
|
2063
2097
|
cardShadow: n,
|
|
2064
2098
|
cardHeadPadding: a,
|
|
2065
2099
|
colorBorderSecondary: r,
|
|
2066
|
-
boxShadowTertiary:
|
|
2067
|
-
bodyPadding:
|
|
2068
|
-
extraColor:
|
|
2100
|
+
boxShadowTertiary: i,
|
|
2101
|
+
bodyPadding: l,
|
|
2102
|
+
extraColor: o
|
|
2069
2103
|
} = e;
|
|
2070
2104
|
return {
|
|
2071
2105
|
[t]: Object.assign(Object.assign({}, it(e)), {
|
|
@@ -2073,18 +2107,18 @@ const Qt = (e) => {
|
|
|
2073
2107
|
background: e.colorBgContainer,
|
|
2074
2108
|
borderRadius: e.borderRadiusLG,
|
|
2075
2109
|
[`&:not(${t}-bordered)`]: {
|
|
2076
|
-
boxShadow:
|
|
2110
|
+
boxShadow: i
|
|
2077
2111
|
},
|
|
2078
2112
|
[`${t}-head`]: Cn(e),
|
|
2079
2113
|
[`${t}-extra`]: {
|
|
2080
2114
|
// https://stackoverflow.com/a/22429853/3040605
|
|
2081
2115
|
marginInlineStart: "auto",
|
|
2082
|
-
color:
|
|
2116
|
+
color: o,
|
|
2083
2117
|
fontWeight: "normal",
|
|
2084
2118
|
fontSize: e.fontSize
|
|
2085
2119
|
},
|
|
2086
2120
|
[`${t}-body`]: Object.assign({
|
|
2087
|
-
padding:
|
|
2121
|
+
padding: l,
|
|
2088
2122
|
borderRadius: `0 0 ${u(e.borderRadiusLG)} ${u(e.borderRadiusLG)}`
|
|
2089
2123
|
}, We()),
|
|
2090
2124
|
[`${t}-grid`]: xn(e),
|
|
@@ -2146,14 +2180,14 @@ const Qt = (e) => {
|
|
|
2146
2180
|
bodyPaddingSM: n,
|
|
2147
2181
|
headerPaddingSM: a,
|
|
2148
2182
|
headerHeightSM: r,
|
|
2149
|
-
headerFontSizeSM:
|
|
2183
|
+
headerFontSizeSM: i
|
|
2150
2184
|
} = e;
|
|
2151
2185
|
return {
|
|
2152
2186
|
[`${t}-small`]: {
|
|
2153
2187
|
[`> ${t}-head`]: {
|
|
2154
2188
|
minHeight: r,
|
|
2155
2189
|
padding: `0 ${u(a)}`,
|
|
2156
|
-
fontSize:
|
|
2190
|
+
fontSize: i,
|
|
2157
2191
|
[`> ${t}-head-wrapper`]: {
|
|
2158
2192
|
[`> ${t}-extra`]: {
|
|
2159
2193
|
fontSize: e.fontSize
|
|
@@ -2174,7 +2208,7 @@ const Qt = (e) => {
|
|
|
2174
2208
|
}
|
|
2175
2209
|
}
|
|
2176
2210
|
};
|
|
2177
|
-
},
|
|
2211
|
+
}, In = (e) => {
|
|
2178
2212
|
var t, n;
|
|
2179
2213
|
return {
|
|
2180
2214
|
headerBg: "transparent",
|
|
@@ -2192,7 +2226,7 @@ const Qt = (e) => {
|
|
|
2192
2226
|
bodyPadding: (t = e.bodyPadding) !== null && t !== void 0 ? t : e.paddingLG,
|
|
2193
2227
|
headerPadding: (n = e.headerPadding) !== null && n !== void 0 ? n : e.paddingLG
|
|
2194
2228
|
};
|
|
2195
|
-
},
|
|
2229
|
+
}, Rn = Gt("Card", (e) => {
|
|
2196
2230
|
const t = Wt(e, {
|
|
2197
2231
|
cardShadow: e.boxShadowCard,
|
|
2198
2232
|
cardHeadPadding: e.padding,
|
|
@@ -2205,8 +2239,8 @@ const Qt = (e) => {
|
|
|
2205
2239
|
// Size
|
|
2206
2240
|
On(t)
|
|
2207
2241
|
];
|
|
2208
|
-
},
|
|
2209
|
-
var
|
|
2242
|
+
}, In);
|
|
2243
|
+
var jt = function(e, t) {
|
|
2210
2244
|
var n = {};
|
|
2211
2245
|
for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
|
|
2212
2246
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, a = Object.getOwnPropertySymbols(e); r < a.length; r++)
|
|
@@ -2219,137 +2253,136 @@ const zn = (e) => {
|
|
|
2219
2253
|
actions: n = [],
|
|
2220
2254
|
actionStyle: a
|
|
2221
2255
|
} = e;
|
|
2222
|
-
return /* @__PURE__ */
|
|
2256
|
+
return /* @__PURE__ */ c.createElement("ul", {
|
|
2223
2257
|
className: t,
|
|
2224
2258
|
style: a
|
|
2225
|
-
}, n.map((r,
|
|
2226
|
-
const
|
|
2227
|
-
return /* @__PURE__ */
|
|
2259
|
+
}, n.map((r, i) => {
|
|
2260
|
+
const l = `action-${i}`;
|
|
2261
|
+
return /* @__PURE__ */ c.createElement("li", {
|
|
2228
2262
|
style: {
|
|
2229
2263
|
width: `${100 / n.length}%`
|
|
2230
2264
|
},
|
|
2231
|
-
key:
|
|
2232
|
-
}, /* @__PURE__ */
|
|
2265
|
+
key: l
|
|
2266
|
+
}, /* @__PURE__ */ c.createElement("span", null, r));
|
|
2233
2267
|
}));
|
|
2234
|
-
}, Mn = /* @__PURE__ */
|
|
2268
|
+
}, Mn = /* @__PURE__ */ c.forwardRef((e, t) => {
|
|
2235
2269
|
const {
|
|
2236
2270
|
prefixCls: n,
|
|
2237
2271
|
className: a,
|
|
2238
2272
|
rootClassName: r,
|
|
2239
|
-
style:
|
|
2240
|
-
extra:
|
|
2241
|
-
headStyle:
|
|
2273
|
+
style: i,
|
|
2274
|
+
extra: l,
|
|
2275
|
+
headStyle: o = {},
|
|
2242
2276
|
bodyStyle: d = {},
|
|
2243
2277
|
title: s,
|
|
2244
2278
|
loading: m,
|
|
2245
|
-
bordered:
|
|
2279
|
+
bordered: p,
|
|
2246
2280
|
variant: y,
|
|
2247
|
-
size:
|
|
2248
|
-
type:
|
|
2281
|
+
size: T,
|
|
2282
|
+
type: H,
|
|
2249
2283
|
cover: x,
|
|
2250
|
-
actions:
|
|
2284
|
+
actions: O,
|
|
2251
2285
|
tabList: g,
|
|
2252
2286
|
children: $,
|
|
2253
2287
|
activeTabKey: w,
|
|
2254
|
-
defaultActiveTabKey:
|
|
2288
|
+
defaultActiveTabKey: z,
|
|
2255
2289
|
tabBarExtraContent: D,
|
|
2256
|
-
hoverable:
|
|
2257
|
-
tabProps:
|
|
2258
|
-
classNames:
|
|
2259
|
-
styles:
|
|
2260
|
-
} = e,
|
|
2261
|
-
getPrefixCls:
|
|
2262
|
-
direction:
|
|
2290
|
+
hoverable: j,
|
|
2291
|
+
tabProps: F = {},
|
|
2292
|
+
classNames: I,
|
|
2293
|
+
styles: S
|
|
2294
|
+
} = e, N = jt(e, ["prefixCls", "className", "rootClassName", "style", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "variant", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps", "classNames", "styles"]), {
|
|
2295
|
+
getPrefixCls: h,
|
|
2296
|
+
direction: _,
|
|
2263
2297
|
card: f
|
|
2264
|
-
} =
|
|
2298
|
+
} = c.useContext(Me), [C] = ja("card", y, p);
|
|
2265
2299
|
if (process.env.NODE_ENV !== "production") {
|
|
2266
2300
|
const K = rt("Card");
|
|
2267
|
-
[["headStyle", "styles.header"], ["bodyStyle", "styles.body"], ["bordered", "variant"]].forEach((
|
|
2268
|
-
|
|
2269
|
-
K.deprecated(!(oe in e), oe, we);
|
|
2301
|
+
[["headStyle", "styles.header"], ["bodyStyle", "styles.body"], ["bordered", "variant"]].forEach(([M, de]) => {
|
|
2302
|
+
K.deprecated(!(M in e), M, de);
|
|
2270
2303
|
});
|
|
2271
2304
|
}
|
|
2272
|
-
const
|
|
2273
|
-
var
|
|
2274
|
-
(
|
|
2305
|
+
const X = (K) => {
|
|
2306
|
+
var M;
|
|
2307
|
+
(M = e.onTabChange) === null || M === void 0 || M.call(e, K);
|
|
2308
|
+
}, A = (K) => {
|
|
2309
|
+
var M;
|
|
2310
|
+
return G((M = f == null ? void 0 : f.classNames) === null || M === void 0 ? void 0 : M[K], I == null ? void 0 : I[K]);
|
|
2275
2311
|
}, V = (K) => {
|
|
2276
|
-
var
|
|
2277
|
-
return
|
|
2278
|
-
},
|
|
2279
|
-
var B;
|
|
2280
|
-
return Object.assign(Object.assign({}, (B = f == null ? void 0 : f.styles) === null || B === void 0 ? void 0 : B[K]), C == null ? void 0 : C[K]);
|
|
2281
|
-
}, Z = l.useMemo(() => {
|
|
2312
|
+
var M;
|
|
2313
|
+
return Object.assign(Object.assign({}, (M = f == null ? void 0 : f.styles) === null || M === void 0 ? void 0 : M[K]), S == null ? void 0 : S[K]);
|
|
2314
|
+
}, Z = c.useMemo(() => {
|
|
2282
2315
|
let K = !1;
|
|
2283
|
-
return
|
|
2284
|
-
(
|
|
2316
|
+
return c.Children.forEach($, (M) => {
|
|
2317
|
+
(M == null ? void 0 : M.type) === Qt && (K = !0);
|
|
2285
2318
|
}), K;
|
|
2286
|
-
}, [$]),
|
|
2319
|
+
}, [$]), v = h("card", n), [re, ne, Q] = Rn(v), E = /* @__PURE__ */ c.createElement(za, {
|
|
2287
2320
|
loading: !0,
|
|
2288
2321
|
active: !0,
|
|
2289
2322
|
paragraph: {
|
|
2290
2323
|
rows: 4
|
|
2291
2324
|
},
|
|
2292
2325
|
title: !1
|
|
2293
|
-
}, $),
|
|
2294
|
-
[
|
|
2326
|
+
}, $), W = w !== void 0, Y = Object.assign(Object.assign({}, F), {
|
|
2327
|
+
[W ? "activeKey" : "defaultActiveKey"]: W ? w : z,
|
|
2295
2328
|
tabBarExtraContent: D
|
|
2296
2329
|
});
|
|
2297
|
-
let
|
|
2298
|
-
const
|
|
2299
|
-
size:
|
|
2330
|
+
let k;
|
|
2331
|
+
const U = Kt(T), ie = !U || U === "default" ? "large" : U, ee = g ? /* @__PURE__ */ c.createElement(st, Object.assign({
|
|
2332
|
+
size: ie
|
|
2300
2333
|
}, Y, {
|
|
2301
|
-
className: `${
|
|
2302
|
-
onChange:
|
|
2334
|
+
className: `${v}-head-tabs`,
|
|
2335
|
+
onChange: X,
|
|
2303
2336
|
items: g.map((K) => {
|
|
2304
2337
|
var {
|
|
2305
|
-
tab:
|
|
2306
|
-
} = K,
|
|
2338
|
+
tab: M
|
|
2339
|
+
} = K, de = jt(K, ["tab"]);
|
|
2307
2340
|
return Object.assign({
|
|
2308
|
-
label:
|
|
2309
|
-
},
|
|
2341
|
+
label: M
|
|
2342
|
+
}, de);
|
|
2310
2343
|
})
|
|
2311
2344
|
})) : null;
|
|
2312
|
-
if (s ||
|
|
2313
|
-
const K =
|
|
2314
|
-
|
|
2345
|
+
if (s || l || ee) {
|
|
2346
|
+
const K = G(`${v}-head`, A("header")), M = G(`${v}-head-title`, A("title")), de = G(`${v}-extra`, A("extra")), Oe = Object.assign(Object.assign({}, o), V("header"));
|
|
2347
|
+
k = /* @__PURE__ */ c.createElement("div", {
|
|
2315
2348
|
className: K,
|
|
2316
|
-
style:
|
|
2317
|
-
}, /* @__PURE__ */
|
|
2318
|
-
className: `${
|
|
2319
|
-
}, s && /* @__PURE__ */
|
|
2320
|
-
className:
|
|
2321
|
-
style:
|
|
2322
|
-
}, s),
|
|
2323
|
-
className:
|
|
2324
|
-
style:
|
|
2325
|
-
},
|
|
2349
|
+
style: Oe
|
|
2350
|
+
}, /* @__PURE__ */ c.createElement("div", {
|
|
2351
|
+
className: `${v}-head-wrapper`
|
|
2352
|
+
}, s && /* @__PURE__ */ c.createElement("div", {
|
|
2353
|
+
className: M,
|
|
2354
|
+
style: V("title")
|
|
2355
|
+
}, s), l && /* @__PURE__ */ c.createElement("div", {
|
|
2356
|
+
className: de,
|
|
2357
|
+
style: V("extra")
|
|
2358
|
+
}, l)), ee);
|
|
2326
2359
|
}
|
|
2327
|
-
const
|
|
2328
|
-
className:
|
|
2329
|
-
style:
|
|
2330
|
-
}, x) : null,
|
|
2331
|
-
className:
|
|
2332
|
-
style:
|
|
2333
|
-
}, m ? E : $),
|
|
2334
|
-
actionClasses:
|
|
2335
|
-
actionStyle:
|
|
2336
|
-
actions:
|
|
2337
|
-
}) : null, Le =
|
|
2338
|
-
[`${
|
|
2339
|
-
[`${
|
|
2340
|
-
[`${
|
|
2341
|
-
[`${
|
|
2342
|
-
[`${
|
|
2343
|
-
[`${
|
|
2344
|
-
[`${
|
|
2345
|
-
[`${
|
|
2346
|
-
}, a, r,
|
|
2347
|
-
return
|
|
2360
|
+
const pe = G(`${v}-cover`, A("cover")), ve = x ? /* @__PURE__ */ c.createElement("div", {
|
|
2361
|
+
className: pe,
|
|
2362
|
+
style: V("cover")
|
|
2363
|
+
}, x) : null, $e = G(`${v}-body`, A("body")), ye = Object.assign(Object.assign({}, d), V("body")), P = /* @__PURE__ */ c.createElement("div", {
|
|
2364
|
+
className: $e,
|
|
2365
|
+
style: ye
|
|
2366
|
+
}, m ? E : $), oe = G(`${v}-actions`, A("actions")), me = O != null && O.length ? /* @__PURE__ */ c.createElement(zn, {
|
|
2367
|
+
actionClasses: oe,
|
|
2368
|
+
actionStyle: V("actions"),
|
|
2369
|
+
actions: O
|
|
2370
|
+
}) : null, Le = Ia(N, ["onTabChange"]), qe = G(v, f == null ? void 0 : f.className, {
|
|
2371
|
+
[`${v}-loading`]: m,
|
|
2372
|
+
[`${v}-bordered`]: C !== "borderless",
|
|
2373
|
+
[`${v}-hoverable`]: j,
|
|
2374
|
+
[`${v}-contain-grid`]: Z,
|
|
2375
|
+
[`${v}-contain-tabs`]: g == null ? void 0 : g.length,
|
|
2376
|
+
[`${v}-${U}`]: U,
|
|
2377
|
+
[`${v}-type-${H}`]: !!H,
|
|
2378
|
+
[`${v}-rtl`]: _ === "rtl"
|
|
2379
|
+
}, a, r, ne, Q), Fe = Object.assign(Object.assign({}, f == null ? void 0 : f.style), i);
|
|
2380
|
+
return re(/* @__PURE__ */ c.createElement("div", Object.assign({
|
|
2348
2381
|
ref: t
|
|
2349
2382
|
}, Le, {
|
|
2350
|
-
className:
|
|
2351
|
-
style:
|
|
2352
|
-
}),
|
|
2383
|
+
className: qe,
|
|
2384
|
+
style: Fe
|
|
2385
|
+
}), k, ve, P, me));
|
|
2353
2386
|
});
|
|
2354
2387
|
var Ln = function(e, t) {
|
|
2355
2388
|
var n = {};
|
|
@@ -2364,40 +2397,40 @@ const Dn = (e) => {
|
|
|
2364
2397
|
className: n,
|
|
2365
2398
|
avatar: a,
|
|
2366
2399
|
title: r,
|
|
2367
|
-
description:
|
|
2368
|
-
} = e,
|
|
2369
|
-
getPrefixCls:
|
|
2370
|
-
} =
|
|
2400
|
+
description: i
|
|
2401
|
+
} = e, l = Ln(e, ["prefixCls", "className", "avatar", "title", "description"]), {
|
|
2402
|
+
getPrefixCls: o
|
|
2403
|
+
} = c.useContext(Me), d = o("card", t), s = G(`${d}-meta`, n), m = a ? /* @__PURE__ */ c.createElement("div", {
|
|
2371
2404
|
className: `${d}-meta-avatar`
|
|
2372
|
-
}, a) : null,
|
|
2405
|
+
}, a) : null, p = r ? /* @__PURE__ */ c.createElement("div", {
|
|
2373
2406
|
className: `${d}-meta-title`
|
|
2374
|
-
}, r) : null, y =
|
|
2407
|
+
}, r) : null, y = i ? /* @__PURE__ */ c.createElement("div", {
|
|
2375
2408
|
className: `${d}-meta-description`
|
|
2376
|
-
},
|
|
2409
|
+
}, i) : null, T = p || y ? /* @__PURE__ */ c.createElement("div", {
|
|
2377
2410
|
className: `${d}-meta-detail`
|
|
2378
|
-
},
|
|
2379
|
-
return /* @__PURE__ */
|
|
2411
|
+
}, p, y) : null;
|
|
2412
|
+
return /* @__PURE__ */ c.createElement("div", Object.assign({}, l, {
|
|
2380
2413
|
className: s
|
|
2381
|
-
}), m,
|
|
2414
|
+
}), m, T);
|
|
2382
2415
|
}, Ke = Mn;
|
|
2383
2416
|
Ke.Grid = Qt;
|
|
2384
2417
|
Ke.Meta = Dn;
|
|
2385
2418
|
process.env.NODE_ENV !== "production" && (Ke.displayName = "Card");
|
|
2386
|
-
const Bn = "_kpiCard_w4qw3_1",
|
|
2419
|
+
const Bn = "_kpiCard_w4qw3_1", Hn = "_width430_w4qw3_7", jn = "_width384_w4qw3_16", An = "_flexCol_w4qw3_20", Gn = "_flexRow_w4qw3_25", Wn = "_title_w4qw3_30", Vn = "_content_w4qw3_56", xe = {
|
|
2387
2420
|
kpiCard: Bn,
|
|
2388
|
-
width430:
|
|
2389
|
-
width384:
|
|
2390
|
-
flexCol:
|
|
2391
|
-
flexRow:
|
|
2421
|
+
width430: Hn,
|
|
2422
|
+
width384: jn,
|
|
2423
|
+
flexCol: An,
|
|
2424
|
+
flexRow: Gn,
|
|
2392
2425
|
title: Wn,
|
|
2393
2426
|
content: Vn
|
|
2394
2427
|
};
|
|
2395
2428
|
function Qn({ title: e, content: t, icon: n, menuCollapsed: a }) {
|
|
2396
|
-
return /* @__PURE__ */ ze(Ke, { className:
|
|
2429
|
+
return /* @__PURE__ */ ze(Ke, { className: ha(xe.kpiCard, a ? xe.width430 : xe.width384), children: e && t ? /* @__PURE__ */ ze("div", { className: xe.flexCol, children: /* @__PURE__ */ Et("div", { className: xe.flexRow, children: [
|
|
2397
2430
|
n,
|
|
2398
|
-
/* @__PURE__ */ Et("div", { className:
|
|
2399
|
-
/* @__PURE__ */ ze("span", { className:
|
|
2400
|
-
/* @__PURE__ */ ze("span", { className:
|
|
2431
|
+
/* @__PURE__ */ Et("div", { className: xe.flexCol, children: [
|
|
2432
|
+
/* @__PURE__ */ ze("span", { className: xe.title, children: e }),
|
|
2433
|
+
/* @__PURE__ */ ze("span", { className: xe.content, children: t })
|
|
2401
2434
|
] })
|
|
2402
2435
|
] }) }) : /* @__PURE__ */ ze(ga, {}) });
|
|
2403
2436
|
}
|