@gobolt/genesis 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/dist/AntdIcon-Bsnbyy6g.js +200 -0
- package/dist/CheckOutlined-DAynWe12.js +527 -0
- package/dist/CloseCircleFilled-ZIY-u-27.js +13 -0
- package/dist/Compact-CJBo3f0u.js +185 -0
- package/dist/ContextIsolator-CGkdKtc3.js +20 -0
- package/dist/ExclamationCircleFilled-BICVVQIg.js +21 -0
- package/dist/Form-Cylpi4M4.js +1815 -0
- package/dist/Overflow-CP1M4Z0s.js +369 -0
- package/dist/SearchOutlined-DuzJkIiQ.js +52 -0
- package/dist/TextArea-3MOYYuAQ.js +1680 -0
- package/dist/bundle.css +1 -0
- package/dist/button-BNV2qdrP.js +1392 -0
- package/dist/compact-item-DH13cl8A.js +61 -0
- package/dist/components/atoms/button/Button.d.ts +12 -0
- package/dist/components/atoms/button/Button.js +27 -0
- package/dist/components/atoms/button/__stories__/Button.stories.d.ts +13 -0
- package/dist/components/atoms/button/index.d.ts +2 -0
- package/dist/components/atoms/button/index.js +4 -0
- package/dist/components/atoms/button/styles.d.ts +12 -0
- package/dist/components/atoms/button/styles.js +71 -0
- package/dist/components/atoms/checkbox/Checkbox.d.ts +10 -0
- package/dist/components/atoms/checkbox/Checkbox.js +13 -0
- package/dist/components/atoms/checkbox/__stories__/Checkbox.stories.d.ts +8 -0
- package/dist/components/atoms/checkbox/__tests__/Checkbox.test.d.ts +1 -0
- package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +18 -0
- package/dist/components/atoms/checkbox/index.d.ts +2 -0
- package/dist/components/atoms/checkbox/index.js +4 -0
- package/dist/components/atoms/checkbox/styles.d.ts +11 -0
- package/dist/components/atoms/checkbox/styles.js +582 -0
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/atoms/index.js +3 -0
- package/dist/components/atoms/input/Input.d.ts +11 -0
- package/dist/components/atoms/input/Input.js +12 -0
- package/dist/components/atoms/input/__stories__/Input.stories.d.ts +10 -0
- package/dist/components/atoms/input/__tests__/Input.test.d.ts +1 -0
- package/dist/components/atoms/input/__tests__/Input.test.js +28 -0
- package/dist/components/atoms/input/index.d.ts +2 -0
- package/dist/components/atoms/input/index.js +4 -0
- package/dist/components/atoms/input/styles.d.ts +14 -0
- package/dist/components/atoms/input/styles.js +415 -0
- package/dist/components/atoms/select/Select.d.ts +11 -0
- package/dist/components/atoms/select/Select.js +24 -0
- package/dist/components/atoms/select/__stories__/Select.stories.d.ts +8 -0
- package/dist/components/atoms/select/__tests__/Select.test.d.ts +1 -0
- package/dist/components/atoms/select/__tests__/Select.test.js +10735 -0
- package/dist/components/atoms/select/index.d.ts +2 -0
- package/dist/components/atoms/select/index.js +4 -0
- package/dist/components/atoms/select/styles.d.ts +15 -0
- package/dist/components/atoms/select/styles.js +3868 -0
- package/dist/components/atoms/typography/Typography.d.ts +11 -0
- package/dist/components/atoms/typography/Typography.js +44 -0
- package/dist/components/atoms/typography/__stories__/Typography.stories.d.ts +12 -0
- package/dist/components/atoms/typography/__tests__/Typography.test.d.ts +1 -0
- package/dist/components/atoms/typography/__tests__/Typography.test.js +16 -0
- package/dist/components/atoms/typography/index.d.ts +2 -0
- package/dist/components/atoms/typography/index.js +4 -0
- package/dist/components/atoms/typography/styles.d.ts +11 -0
- package/dist/components/atoms/typography/styles.js +28 -0
- package/dist/components/index.d.js +1 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.js +16 -0
- package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.d.ts +10 -0
- package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +35 -0
- package/dist/components/molecules/error-boundary-fallback/__stories__/ErrorBoundaryFallback.stories.d.ts +8 -0
- package/dist/components/molecules/error-boundary-fallback/index.d.ts +1 -0
- package/dist/components/molecules/error-boundary-fallback/index.js +4 -0
- package/dist/components/molecules/error-boundary-fallback/styles.d.ts +1 -0
- package/dist/components/molecules/error-boundary-fallback/styles.js +930 -0
- package/dist/components/molecules/form/Form.d.ts +15 -0
- package/dist/components/molecules/form/Form.js +7 -0
- package/dist/components/molecules/form/__stories__/Form.stories.d.ts +7 -0
- package/dist/components/molecules/form/__stories__/FormStory.d.ts +1 -0
- package/dist/components/molecules/form/__stories__/FormStory.js +90 -0
- package/dist/components/molecules/form/index.d.ts +2 -0
- package/dist/components/molecules/form/index.js +4 -0
- package/dist/constants/index.d.ts +51 -0
- package/dist/constants/index.js +54 -0
- package/dist/context-CZsFJmh6.js +2093 -0
- package/dist/declaration.d.js +1 -0
- package/dist/genesis/GenesisThemeBreakdown.d.ts +4 -0
- package/dist/genesis/GenesisThemeBreakdown.js +56 -0
- package/dist/genesis/GenesisThemeDemo.d.ts +8 -0
- package/dist/genesis/GenesisThemeDemo.js +8 -0
- package/dist/genesis/GenesisThemeDemo.stories.d.ts +7 -0
- package/dist/genesis/styles.d.ts +12 -0
- package/dist/genesis/styles.js +4038 -0
- package/dist/index-3MWkSVA1.js +96 -0
- package/dist/index-BPtFqhcp.js +19110 -0
- package/dist/index-BQO27mgE.js +402 -0
- package/dist/index-BWys7dkb.js +4462 -0
- package/dist/index-C7kFNqp2.js +276 -0
- package/dist/index-D1v_7IIx.js +1057 -0
- package/dist/index-SAAXFt-P.js +946 -0
- package/dist/index-VDH3iLaC.js +884 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +20 -0
- package/dist/isVisible-CNQjrJPN.js +366 -0
- package/dist/magic-string.es-BkUFmFT4.js +858 -0
- package/dist/presetColors-Cl8UP3Nw.js +4 -0
- package/dist/providers/GenesisProvider.d.ts +8 -0
- package/dist/providers/GenesisProvider.js +7 -0
- package/dist/providers/ThemeProvider.d.ts +9 -0
- package/dist/providers/ThemeProvider.js +18 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +6 -0
- package/dist/reactNode-sKPeiqPL.js +12 -0
- package/dist/setup-CMYVZCPF.js +33883 -0
- package/dist/styled-components.browser.esm-CZ1XM4o4.js +1144 -0
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.d.ts +1 -0
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +37 -0
- package/dist/styles/design-tokens/border-tokens/BorderTokens.stories.d.ts +6 -0
- package/dist/styles/design-tokens/color-tokens/ColorTokens.stories.d.ts +7 -0
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.d.ts +3 -0
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +36 -0
- package/dist/styles/design-tokens/sizing-tokens/index.stories.d.ts +7 -0
- package/dist/styles/design-tokens/typography/TypographyTokens.stories.d.ts +7 -0
- package/dist/styles/design-tokens/variables.d.ts +704 -0
- package/dist/styles/design-tokens/variables.js +697 -0
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/global-styles.js +35 -0
- package/dist/styles/theme/genesis-theme.d.ts +75 -0
- package/dist/styles/theme/genesis-theme.js +896 -0
- package/dist/styles/theme/genesis-theme.types.d.ts +162 -0
- package/dist/styles/theme/genesis-theme.types.js +4 -0
- package/dist/styles/theme/global-styles.d.ts +1 -0
- package/dist/styles/theme/global-styles.js +35 -0
- package/dist/styles/theme/index.d.ts +1 -0
- package/dist/styles/theme/index.js +9 -0
- package/dist/test/setup.d.ts +5 -0
- package/dist/test/setup.js +7 -0
- package/dist/useVariants-CEpw6Ww6.js +29 -0
- package/dist/utils/getAppointmentColor.d.ts +4 -0
- package/dist/utils/getAppointmentColor.js +91 -0
- package/dist/utils/isAllEnglishString.d.ts +1 -0
- package/dist/utils/isAllEnglishString.js +8 -0
- package/dist/utils/isAllEnglishString.test.d.ts +1 -0
- package/dist/utils/isAllEnglishString.test.js +8 -0
- package/dist/utils/parseAddress.d.ts +3 -0
- package/dist/utils/parseAddress.js +19 -0
- package/dist/vite-env.d.js +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,4038 @@
|
|
|
1
|
+
import { d as fa } from "../styled-components.browser.esm-CZ1XM4o4.js";
|
|
2
|
+
import { T as Ja } from "../index-D1v_7IIx.js";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import _e, { forwardRef as Qa, useMemo as Mn, useRef as ve, useCallback as vt, useImperativeHandle as er, createContext as tr, useState as be, useEffect as Be } from "react";
|
|
5
|
+
import { c as D, m as On, n as Tn, z as w, C as Ve, H as Ke, B as Qe, G as va, t as ma, s as ga, d as Se, e as z, _ as ae, h as B, ai as nr, af as pa, a as Y, w as rt, v as ba, o as ar, p as rr, q as ir, r as or, M as ha, b as en, l as lr, k as sr, A as Ln, E as ya, D as Dn, ak as zn, U as xn, P as tn } from "../index-BWys7dkb.js";
|
|
6
|
+
import { o as it, i as cr, u as bt, t as Ca } from "../isVisible-CNQjrJPN.js";
|
|
7
|
+
import { a as $a } from "../Compact-CJBo3f0u.js";
|
|
8
|
+
import { K as ur, T as Sa, c as dr, g as fr } from "../index-VDH3iLaC.js";
|
|
9
|
+
import { F as Lt, i as Xn, R as vr } from "../Overflow-CP1M4Z0s.js";
|
|
10
|
+
import { I as xa } from "../AntdIcon-Bsnbyy6g.js";
|
|
11
|
+
import { R as hn } from "../index-BQO27mgE.js";
|
|
12
|
+
import { K as ge } from "../CheckOutlined-DAynWe12.js";
|
|
13
|
+
import { r as mr } from "../index-BPtFqhcp.js";
|
|
14
|
+
import { u as gr } from "../context-CZsFJmh6.js";
|
|
15
|
+
const nn = (e) => {
|
|
16
|
+
const {
|
|
17
|
+
prefixCls: t,
|
|
18
|
+
className: a,
|
|
19
|
+
style: n,
|
|
20
|
+
size: r,
|
|
21
|
+
shape: o
|
|
22
|
+
} = e, l = D({
|
|
23
|
+
[`${t}-lg`]: r === "large",
|
|
24
|
+
[`${t}-sm`]: r === "small"
|
|
25
|
+
}), s = D({
|
|
26
|
+
[`${t}-circle`]: o === "circle",
|
|
27
|
+
[`${t}-square`]: o === "square",
|
|
28
|
+
[`${t}-round`]: o === "round"
|
|
29
|
+
}), c = i.useMemo(() => typeof r == "number" ? {
|
|
30
|
+
width: r,
|
|
31
|
+
height: r,
|
|
32
|
+
lineHeight: `${r}px`
|
|
33
|
+
} : {}, [r]);
|
|
34
|
+
return /* @__PURE__ */ i.createElement("span", {
|
|
35
|
+
className: D(t, l, s, a),
|
|
36
|
+
style: Object.assign(Object.assign({}, c), n)
|
|
37
|
+
});
|
|
38
|
+
}, pr = new ur("ant-skeleton-loading", {
|
|
39
|
+
"0%": {
|
|
40
|
+
backgroundPosition: "100% 50%"
|
|
41
|
+
},
|
|
42
|
+
"100%": {
|
|
43
|
+
backgroundPosition: "0 50%"
|
|
44
|
+
}
|
|
45
|
+
}), an = (e) => ({
|
|
46
|
+
height: e,
|
|
47
|
+
lineHeight: w(e)
|
|
48
|
+
}), ht = (e) => Object.assign({
|
|
49
|
+
width: e
|
|
50
|
+
}, an(e)), br = (e) => ({
|
|
51
|
+
background: e.skeletonLoadingBackground,
|
|
52
|
+
backgroundSize: "400% 100%",
|
|
53
|
+
animationName: pr,
|
|
54
|
+
animationDuration: e.skeletonLoadingMotionDuration,
|
|
55
|
+
animationTimingFunction: "ease",
|
|
56
|
+
animationIterationCount: "infinite"
|
|
57
|
+
}), yn = (e, t) => Object.assign({
|
|
58
|
+
width: t(e).mul(5).equal(),
|
|
59
|
+
minWidth: t(e).mul(5).equal()
|
|
60
|
+
}, an(e)), hr = (e) => {
|
|
61
|
+
const {
|
|
62
|
+
skeletonAvatarCls: t,
|
|
63
|
+
gradientFromColor: a,
|
|
64
|
+
controlHeight: n,
|
|
65
|
+
controlHeightLG: r,
|
|
66
|
+
controlHeightSM: o
|
|
67
|
+
} = e;
|
|
68
|
+
return {
|
|
69
|
+
[t]: Object.assign({
|
|
70
|
+
display: "inline-block",
|
|
71
|
+
verticalAlign: "top",
|
|
72
|
+
background: a
|
|
73
|
+
}, ht(n)),
|
|
74
|
+
[`${t}${t}-circle`]: {
|
|
75
|
+
borderRadius: "50%"
|
|
76
|
+
},
|
|
77
|
+
[`${t}${t}-lg`]: Object.assign({}, ht(r)),
|
|
78
|
+
[`${t}${t}-sm`]: Object.assign({}, ht(o))
|
|
79
|
+
};
|
|
80
|
+
}, yr = (e) => {
|
|
81
|
+
const {
|
|
82
|
+
controlHeight: t,
|
|
83
|
+
borderRadiusSM: a,
|
|
84
|
+
skeletonInputCls: n,
|
|
85
|
+
controlHeightLG: r,
|
|
86
|
+
controlHeightSM: o,
|
|
87
|
+
gradientFromColor: l,
|
|
88
|
+
calc: s
|
|
89
|
+
} = e;
|
|
90
|
+
return {
|
|
91
|
+
[n]: Object.assign({
|
|
92
|
+
display: "inline-block",
|
|
93
|
+
verticalAlign: "top",
|
|
94
|
+
background: l,
|
|
95
|
+
borderRadius: a
|
|
96
|
+
}, yn(t, s)),
|
|
97
|
+
[`${n}-lg`]: Object.assign({}, yn(r, s)),
|
|
98
|
+
[`${n}-sm`]: Object.assign({}, yn(o, s))
|
|
99
|
+
};
|
|
100
|
+
}, Yn = (e) => Object.assign({
|
|
101
|
+
width: e
|
|
102
|
+
}, an(e)), Cr = (e) => {
|
|
103
|
+
const {
|
|
104
|
+
skeletonImageCls: t,
|
|
105
|
+
imageSizeBase: a,
|
|
106
|
+
gradientFromColor: n,
|
|
107
|
+
borderRadiusSM: r,
|
|
108
|
+
calc: o
|
|
109
|
+
} = e;
|
|
110
|
+
return {
|
|
111
|
+
[t]: Object.assign(Object.assign({
|
|
112
|
+
display: "inline-flex",
|
|
113
|
+
alignItems: "center",
|
|
114
|
+
justifyContent: "center",
|
|
115
|
+
verticalAlign: "middle",
|
|
116
|
+
background: n,
|
|
117
|
+
borderRadius: r
|
|
118
|
+
}, Yn(o(a).mul(2).equal())), {
|
|
119
|
+
[`${t}-path`]: {
|
|
120
|
+
fill: "#bfbfbf"
|
|
121
|
+
},
|
|
122
|
+
[`${t}-svg`]: Object.assign(Object.assign({}, Yn(a)), {
|
|
123
|
+
maxWidth: o(a).mul(4).equal(),
|
|
124
|
+
maxHeight: o(a).mul(4).equal()
|
|
125
|
+
}),
|
|
126
|
+
[`${t}-svg${t}-svg-circle`]: {
|
|
127
|
+
borderRadius: "50%"
|
|
128
|
+
}
|
|
129
|
+
}),
|
|
130
|
+
[`${t}${t}-circle`]: {
|
|
131
|
+
borderRadius: "50%"
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}, Cn = (e, t, a) => {
|
|
135
|
+
const {
|
|
136
|
+
skeletonButtonCls: n
|
|
137
|
+
} = e;
|
|
138
|
+
return {
|
|
139
|
+
[`${a}${n}-circle`]: {
|
|
140
|
+
width: t,
|
|
141
|
+
minWidth: t,
|
|
142
|
+
borderRadius: "50%"
|
|
143
|
+
},
|
|
144
|
+
[`${a}${n}-round`]: {
|
|
145
|
+
borderRadius: t
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}, $n = (e, t) => Object.assign({
|
|
149
|
+
width: t(e).mul(2).equal(),
|
|
150
|
+
minWidth: t(e).mul(2).equal()
|
|
151
|
+
}, an(e)), $r = (e) => {
|
|
152
|
+
const {
|
|
153
|
+
borderRadiusSM: t,
|
|
154
|
+
skeletonButtonCls: a,
|
|
155
|
+
controlHeight: n,
|
|
156
|
+
controlHeightLG: r,
|
|
157
|
+
controlHeightSM: o,
|
|
158
|
+
gradientFromColor: l,
|
|
159
|
+
calc: s
|
|
160
|
+
} = e;
|
|
161
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
162
|
+
[a]: Object.assign({
|
|
163
|
+
display: "inline-block",
|
|
164
|
+
verticalAlign: "top",
|
|
165
|
+
background: l,
|
|
166
|
+
borderRadius: t,
|
|
167
|
+
width: s(n).mul(2).equal(),
|
|
168
|
+
minWidth: s(n).mul(2).equal()
|
|
169
|
+
}, $n(n, s))
|
|
170
|
+
}, Cn(e, n, a)), {
|
|
171
|
+
[`${a}-lg`]: Object.assign({}, $n(r, s))
|
|
172
|
+
}), Cn(e, r, `${a}-lg`)), {
|
|
173
|
+
[`${a}-sm`]: Object.assign({}, $n(o, s))
|
|
174
|
+
}), Cn(e, o, `${a}-sm`));
|
|
175
|
+
}, Sr = (e) => {
|
|
176
|
+
const {
|
|
177
|
+
componentCls: t,
|
|
178
|
+
skeletonAvatarCls: a,
|
|
179
|
+
skeletonTitleCls: n,
|
|
180
|
+
skeletonParagraphCls: r,
|
|
181
|
+
skeletonButtonCls: o,
|
|
182
|
+
skeletonInputCls: l,
|
|
183
|
+
skeletonImageCls: s,
|
|
184
|
+
controlHeight: c,
|
|
185
|
+
controlHeightLG: u,
|
|
186
|
+
controlHeightSM: v,
|
|
187
|
+
gradientFromColor: d,
|
|
188
|
+
padding: f,
|
|
189
|
+
marginSM: h,
|
|
190
|
+
borderRadius: S,
|
|
191
|
+
titleHeight: g,
|
|
192
|
+
blockRadius: x,
|
|
193
|
+
paragraphLiHeight: p,
|
|
194
|
+
controlHeightXS: C,
|
|
195
|
+
paragraphMarginTop: b
|
|
196
|
+
} = e;
|
|
197
|
+
return {
|
|
198
|
+
[t]: {
|
|
199
|
+
display: "table",
|
|
200
|
+
width: "100%",
|
|
201
|
+
[`${t}-header`]: {
|
|
202
|
+
display: "table-cell",
|
|
203
|
+
paddingInlineEnd: f,
|
|
204
|
+
verticalAlign: "top",
|
|
205
|
+
// Avatar
|
|
206
|
+
[a]: Object.assign({
|
|
207
|
+
display: "inline-block",
|
|
208
|
+
verticalAlign: "top",
|
|
209
|
+
background: d
|
|
210
|
+
}, ht(c)),
|
|
211
|
+
[`${a}-circle`]: {
|
|
212
|
+
borderRadius: "50%"
|
|
213
|
+
},
|
|
214
|
+
[`${a}-lg`]: Object.assign({}, ht(u)),
|
|
215
|
+
[`${a}-sm`]: Object.assign({}, ht(v))
|
|
216
|
+
},
|
|
217
|
+
[`${t}-content`]: {
|
|
218
|
+
display: "table-cell",
|
|
219
|
+
width: "100%",
|
|
220
|
+
verticalAlign: "top",
|
|
221
|
+
// Title
|
|
222
|
+
[n]: {
|
|
223
|
+
width: "100%",
|
|
224
|
+
height: g,
|
|
225
|
+
background: d,
|
|
226
|
+
borderRadius: x,
|
|
227
|
+
[`+ ${r}`]: {
|
|
228
|
+
marginBlockStart: v
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
// paragraph
|
|
232
|
+
[r]: {
|
|
233
|
+
padding: 0,
|
|
234
|
+
"> li": {
|
|
235
|
+
width: "100%",
|
|
236
|
+
height: p,
|
|
237
|
+
listStyle: "none",
|
|
238
|
+
background: d,
|
|
239
|
+
borderRadius: x,
|
|
240
|
+
"+ li": {
|
|
241
|
+
marginBlockStart: C
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
|
|
246
|
+
width: "61%"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
[`&-round ${t}-content`]: {
|
|
250
|
+
[`${n}, ${r} > li`]: {
|
|
251
|
+
borderRadius: S
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
[`${t}-with-avatar ${t}-content`]: {
|
|
256
|
+
// Title
|
|
257
|
+
[n]: {
|
|
258
|
+
marginBlockStart: h,
|
|
259
|
+
[`+ ${r}`]: {
|
|
260
|
+
marginBlockStart: b
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
// Skeleton element
|
|
265
|
+
[`${t}${t}-element`]: Object.assign(Object.assign(Object.assign(Object.assign({
|
|
266
|
+
display: "inline-block",
|
|
267
|
+
width: "auto"
|
|
268
|
+
}, $r(e)), hr(e)), yr(e)), Cr(e)),
|
|
269
|
+
// Skeleton Block Button, Input
|
|
270
|
+
[`${t}${t}-block`]: {
|
|
271
|
+
width: "100%",
|
|
272
|
+
[o]: {
|
|
273
|
+
width: "100%"
|
|
274
|
+
},
|
|
275
|
+
[l]: {
|
|
276
|
+
width: "100%"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
// With active animation
|
|
280
|
+
[`${t}${t}-active`]: {
|
|
281
|
+
[`
|
|
282
|
+
${n},
|
|
283
|
+
${r} > li,
|
|
284
|
+
${a},
|
|
285
|
+
${o},
|
|
286
|
+
${l},
|
|
287
|
+
${s}
|
|
288
|
+
`]: Object.assign({}, br(e))
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
}, xr = (e) => {
|
|
292
|
+
const {
|
|
293
|
+
colorFillContent: t,
|
|
294
|
+
colorFill: a
|
|
295
|
+
} = e, n = t, r = a;
|
|
296
|
+
return {
|
|
297
|
+
color: n,
|
|
298
|
+
colorGradientEnd: r,
|
|
299
|
+
gradientFromColor: n,
|
|
300
|
+
gradientToColor: r,
|
|
301
|
+
titleHeight: e.controlHeight / 2,
|
|
302
|
+
blockRadius: e.borderRadiusSM,
|
|
303
|
+
paragraphMarginTop: e.marginLG + e.marginXXS,
|
|
304
|
+
paragraphLiHeight: e.controlHeight / 2
|
|
305
|
+
};
|
|
306
|
+
}, yt = On("Skeleton", (e) => {
|
|
307
|
+
const {
|
|
308
|
+
componentCls: t,
|
|
309
|
+
calc: a
|
|
310
|
+
} = e, n = Tn(e, {
|
|
311
|
+
skeletonAvatarCls: `${t}-avatar`,
|
|
312
|
+
skeletonTitleCls: `${t}-title`,
|
|
313
|
+
skeletonParagraphCls: `${t}-paragraph`,
|
|
314
|
+
skeletonButtonCls: `${t}-button`,
|
|
315
|
+
skeletonInputCls: `${t}-input`,
|
|
316
|
+
skeletonImageCls: `${t}-image`,
|
|
317
|
+
imageSizeBase: a(e.controlHeight).mul(1.5).equal(),
|
|
318
|
+
borderRadius: 100,
|
|
319
|
+
// Large number to make capsule shape
|
|
320
|
+
skeletonLoadingBackground: `linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,
|
|
321
|
+
skeletonLoadingMotionDuration: "1.4s"
|
|
322
|
+
});
|
|
323
|
+
return [Sr(n)];
|
|
324
|
+
}, xr, {
|
|
325
|
+
deprecatedTokens: [["color", "gradientFromColor"], ["colorGradientEnd", "gradientToColor"]]
|
|
326
|
+
}), Er = (e) => {
|
|
327
|
+
const {
|
|
328
|
+
prefixCls: t,
|
|
329
|
+
className: a,
|
|
330
|
+
rootClassName: n,
|
|
331
|
+
active: r,
|
|
332
|
+
shape: o = "circle",
|
|
333
|
+
size: l = "default"
|
|
334
|
+
} = e, {
|
|
335
|
+
getPrefixCls: s
|
|
336
|
+
} = i.useContext(Ve), c = s("skeleton", t), [u, v, d] = yt(c), f = it(e, ["prefixCls", "className"]), h = D(c, `${c}-element`, {
|
|
337
|
+
[`${c}-active`]: r
|
|
338
|
+
}, a, n, v, d);
|
|
339
|
+
return u(/* @__PURE__ */ i.createElement("div", {
|
|
340
|
+
className: h
|
|
341
|
+
}, /* @__PURE__ */ i.createElement(nn, Object.assign({
|
|
342
|
+
prefixCls: `${c}-avatar`,
|
|
343
|
+
shape: o,
|
|
344
|
+
size: l
|
|
345
|
+
}, f))));
|
|
346
|
+
}, wr = (e) => {
|
|
347
|
+
const {
|
|
348
|
+
prefixCls: t,
|
|
349
|
+
className: a,
|
|
350
|
+
rootClassName: n,
|
|
351
|
+
active: r,
|
|
352
|
+
block: o = !1,
|
|
353
|
+
size: l = "default"
|
|
354
|
+
} = e, {
|
|
355
|
+
getPrefixCls: s
|
|
356
|
+
} = i.useContext(Ve), c = s("skeleton", t), [u, v, d] = yt(c), f = it(e, ["prefixCls"]), h = D(c, `${c}-element`, {
|
|
357
|
+
[`${c}-active`]: r,
|
|
358
|
+
[`${c}-block`]: o
|
|
359
|
+
}, a, n, v, d);
|
|
360
|
+
return u(/* @__PURE__ */ i.createElement("div", {
|
|
361
|
+
className: h
|
|
362
|
+
}, /* @__PURE__ */ i.createElement(nn, Object.assign({
|
|
363
|
+
prefixCls: `${c}-button`,
|
|
364
|
+
size: l
|
|
365
|
+
}, f))));
|
|
366
|
+
}, _r = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", Pr = (e) => {
|
|
367
|
+
const {
|
|
368
|
+
prefixCls: t,
|
|
369
|
+
className: a,
|
|
370
|
+
rootClassName: n,
|
|
371
|
+
style: r,
|
|
372
|
+
active: o
|
|
373
|
+
} = e, {
|
|
374
|
+
getPrefixCls: l
|
|
375
|
+
} = i.useContext(Ve), s = l("skeleton", t), [c, u, v] = yt(s), d = D(s, `${s}-element`, {
|
|
376
|
+
[`${s}-active`]: o
|
|
377
|
+
}, a, n, u, v);
|
|
378
|
+
return c(/* @__PURE__ */ i.createElement("div", {
|
|
379
|
+
className: d
|
|
380
|
+
}, /* @__PURE__ */ i.createElement("div", {
|
|
381
|
+
className: D(`${s}-image`, a),
|
|
382
|
+
style: r
|
|
383
|
+
}, /* @__PURE__ */ i.createElement("svg", {
|
|
384
|
+
viewBox: "0 0 1098 1024",
|
|
385
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
386
|
+
className: `${s}-image-svg`
|
|
387
|
+
}, /* @__PURE__ */ i.createElement("title", null, "Image placeholder"), /* @__PURE__ */ i.createElement("path", {
|
|
388
|
+
d: _r,
|
|
389
|
+
className: `${s}-image-path`
|
|
390
|
+
})))));
|
|
391
|
+
}, Ir = (e) => {
|
|
392
|
+
const {
|
|
393
|
+
prefixCls: t,
|
|
394
|
+
className: a,
|
|
395
|
+
rootClassName: n,
|
|
396
|
+
active: r,
|
|
397
|
+
block: o,
|
|
398
|
+
size: l = "default"
|
|
399
|
+
} = e, {
|
|
400
|
+
getPrefixCls: s
|
|
401
|
+
} = i.useContext(Ve), c = s("skeleton", t), [u, v, d] = yt(c), f = it(e, ["prefixCls"]), h = D(c, `${c}-element`, {
|
|
402
|
+
[`${c}-active`]: r,
|
|
403
|
+
[`${c}-block`]: o
|
|
404
|
+
}, a, n, v, d);
|
|
405
|
+
return u(/* @__PURE__ */ i.createElement("div", {
|
|
406
|
+
className: h
|
|
407
|
+
}, /* @__PURE__ */ i.createElement(nn, Object.assign({
|
|
408
|
+
prefixCls: `${c}-input`,
|
|
409
|
+
size: l
|
|
410
|
+
}, f))));
|
|
411
|
+
}, Rr = (e) => {
|
|
412
|
+
const {
|
|
413
|
+
prefixCls: t,
|
|
414
|
+
className: a,
|
|
415
|
+
rootClassName: n,
|
|
416
|
+
style: r,
|
|
417
|
+
active: o,
|
|
418
|
+
children: l
|
|
419
|
+
} = e, {
|
|
420
|
+
getPrefixCls: s
|
|
421
|
+
} = i.useContext(Ve), c = s("skeleton", t), [u, v, d] = yt(c), f = D(c, `${c}-element`, {
|
|
422
|
+
[`${c}-active`]: o
|
|
423
|
+
}, v, a, n, d);
|
|
424
|
+
return u(/* @__PURE__ */ i.createElement("div", {
|
|
425
|
+
className: f
|
|
426
|
+
}, /* @__PURE__ */ i.createElement("div", {
|
|
427
|
+
className: D(`${c}-image`, a),
|
|
428
|
+
style: r
|
|
429
|
+
}, l)));
|
|
430
|
+
}, Nr = (e, t) => {
|
|
431
|
+
const {
|
|
432
|
+
width: a,
|
|
433
|
+
rows: n = 2
|
|
434
|
+
} = t;
|
|
435
|
+
if (Array.isArray(a))
|
|
436
|
+
return a[e];
|
|
437
|
+
if (n - 1 === e)
|
|
438
|
+
return a;
|
|
439
|
+
}, Mr = (e) => {
|
|
440
|
+
const {
|
|
441
|
+
prefixCls: t,
|
|
442
|
+
className: a,
|
|
443
|
+
style: n,
|
|
444
|
+
rows: r
|
|
445
|
+
} = e, o = Ke(new Array(r)).map((l, s) => (
|
|
446
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
447
|
+
/* @__PURE__ */ i.createElement("li", {
|
|
448
|
+
key: s,
|
|
449
|
+
style: {
|
|
450
|
+
width: Nr(s, e)
|
|
451
|
+
}
|
|
452
|
+
})
|
|
453
|
+
));
|
|
454
|
+
return /* @__PURE__ */ i.createElement("ul", {
|
|
455
|
+
className: D(t, a),
|
|
456
|
+
style: n
|
|
457
|
+
}, o);
|
|
458
|
+
}, Or = (e) => {
|
|
459
|
+
let {
|
|
460
|
+
prefixCls: t,
|
|
461
|
+
className: a,
|
|
462
|
+
width: n,
|
|
463
|
+
style: r
|
|
464
|
+
} = e;
|
|
465
|
+
return (
|
|
466
|
+
// biome-ignore lint/a11y/useHeadingContent: HOC here
|
|
467
|
+
/* @__PURE__ */ i.createElement("h3", {
|
|
468
|
+
className: D(t, a),
|
|
469
|
+
style: Object.assign({
|
|
470
|
+
width: n
|
|
471
|
+
}, r)
|
|
472
|
+
})
|
|
473
|
+
);
|
|
474
|
+
};
|
|
475
|
+
function Sn(e) {
|
|
476
|
+
return e && typeof e == "object" ? e : {};
|
|
477
|
+
}
|
|
478
|
+
function Tr(e, t) {
|
|
479
|
+
return e && !t ? {
|
|
480
|
+
size: "large",
|
|
481
|
+
shape: "square"
|
|
482
|
+
} : {
|
|
483
|
+
size: "large",
|
|
484
|
+
shape: "circle"
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
function Lr(e, t) {
|
|
488
|
+
return !e && t ? {
|
|
489
|
+
width: "38%"
|
|
490
|
+
} : e && t ? {
|
|
491
|
+
width: "50%"
|
|
492
|
+
} : {};
|
|
493
|
+
}
|
|
494
|
+
function Dr(e, t) {
|
|
495
|
+
const a = {};
|
|
496
|
+
return (!e || !t) && (a.width = "61%"), !e && t ? a.rows = 3 : a.rows = 2, a;
|
|
497
|
+
}
|
|
498
|
+
const ot = (e) => {
|
|
499
|
+
const {
|
|
500
|
+
prefixCls: t,
|
|
501
|
+
loading: a,
|
|
502
|
+
className: n,
|
|
503
|
+
rootClassName: r,
|
|
504
|
+
style: o,
|
|
505
|
+
children: l,
|
|
506
|
+
avatar: s = !1,
|
|
507
|
+
title: c = !0,
|
|
508
|
+
paragraph: u = !0,
|
|
509
|
+
active: v,
|
|
510
|
+
round: d
|
|
511
|
+
} = e, {
|
|
512
|
+
getPrefixCls: f,
|
|
513
|
+
direction: h,
|
|
514
|
+
skeleton: S
|
|
515
|
+
} = i.useContext(Ve), g = f("skeleton", t), [x, p, C] = yt(g);
|
|
516
|
+
if (a || !("loading" in e)) {
|
|
517
|
+
const b = !!s, _ = !!c, R = !!u;
|
|
518
|
+
let P;
|
|
519
|
+
if (b) {
|
|
520
|
+
const E = Object.assign(Object.assign({
|
|
521
|
+
prefixCls: `${g}-avatar`
|
|
522
|
+
}, Tr(_, R)), Sn(s));
|
|
523
|
+
P = /* @__PURE__ */ i.createElement("div", {
|
|
524
|
+
className: `${g}-header`
|
|
525
|
+
}, /* @__PURE__ */ i.createElement(nn, Object.assign({}, E)));
|
|
526
|
+
}
|
|
527
|
+
let M;
|
|
528
|
+
if (_ || R) {
|
|
529
|
+
let E;
|
|
530
|
+
if (_) {
|
|
531
|
+
const y = Object.assign(Object.assign({
|
|
532
|
+
prefixCls: `${g}-title`
|
|
533
|
+
}, Lr(b, R)), Sn(c));
|
|
534
|
+
E = /* @__PURE__ */ i.createElement(Or, Object.assign({}, y));
|
|
535
|
+
}
|
|
536
|
+
let T;
|
|
537
|
+
if (R) {
|
|
538
|
+
const y = Object.assign(Object.assign({
|
|
539
|
+
prefixCls: `${g}-paragraph`
|
|
540
|
+
}, Dr(b, _)), Sn(u));
|
|
541
|
+
T = /* @__PURE__ */ i.createElement(Mr, Object.assign({}, y));
|
|
542
|
+
}
|
|
543
|
+
M = /* @__PURE__ */ i.createElement("div", {
|
|
544
|
+
className: `${g}-content`
|
|
545
|
+
}, E, T);
|
|
546
|
+
}
|
|
547
|
+
const O = D(g, {
|
|
548
|
+
[`${g}-with-avatar`]: b,
|
|
549
|
+
[`${g}-active`]: v,
|
|
550
|
+
[`${g}-rtl`]: h === "rtl",
|
|
551
|
+
[`${g}-round`]: d
|
|
552
|
+
}, S == null ? void 0 : S.className, n, r, p, C);
|
|
553
|
+
return x(/* @__PURE__ */ i.createElement("div", {
|
|
554
|
+
className: O,
|
|
555
|
+
style: Object.assign(Object.assign({}, S == null ? void 0 : S.style), o)
|
|
556
|
+
}, P, M));
|
|
557
|
+
}
|
|
558
|
+
return l ?? null;
|
|
559
|
+
};
|
|
560
|
+
ot.Button = wr;
|
|
561
|
+
ot.Avatar = Er;
|
|
562
|
+
ot.Input = Ir;
|
|
563
|
+
ot.Image = Pr;
|
|
564
|
+
ot.Node = Rr;
|
|
565
|
+
process.env.NODE_ENV !== "production" && (ot.displayName = "Skeleton");
|
|
566
|
+
var zr = ge.ESC, Ar = ge.TAB;
|
|
567
|
+
function kr(e) {
|
|
568
|
+
var t = e.visible, a = e.triggerRef, n = e.onVisibleChange, r = e.autoFocus, o = e.overlayRef, l = i.useRef(!1), s = function() {
|
|
569
|
+
if (t) {
|
|
570
|
+
var d, f;
|
|
571
|
+
(d = a.current) === null || d === void 0 || (f = d.focus) === null || f === void 0 || f.call(d), n == null || n(!1);
|
|
572
|
+
}
|
|
573
|
+
}, c = function() {
|
|
574
|
+
var d;
|
|
575
|
+
return (d = o.current) !== null && d !== void 0 && d.focus ? (o.current.focus(), l.current = !0, !0) : !1;
|
|
576
|
+
}, u = function(d) {
|
|
577
|
+
switch (d.keyCode) {
|
|
578
|
+
case zr:
|
|
579
|
+
s();
|
|
580
|
+
break;
|
|
581
|
+
case Ar: {
|
|
582
|
+
var f = !1;
|
|
583
|
+
l.current || (f = c()), f ? d.preventDefault() : s();
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
i.useEffect(function() {
|
|
589
|
+
return t ? (window.addEventListener("keydown", u), r && Qe(c, 3), function() {
|
|
590
|
+
window.removeEventListener("keydown", u), l.current = !1;
|
|
591
|
+
}) : function() {
|
|
592
|
+
l.current = !1;
|
|
593
|
+
};
|
|
594
|
+
}, [t]);
|
|
595
|
+
}
|
|
596
|
+
var jr = /* @__PURE__ */ Qa(function(e, t) {
|
|
597
|
+
var a = e.overlay, n = e.arrow, r = e.prefixCls, o = Mn(function() {
|
|
598
|
+
var s;
|
|
599
|
+
return typeof a == "function" ? s = a() : s = a, s;
|
|
600
|
+
}, [a]), l = va(t, ma(o));
|
|
601
|
+
return /* @__PURE__ */ _e.createElement(_e.Fragment, null, n && /* @__PURE__ */ _e.createElement("div", {
|
|
602
|
+
className: "".concat(r, "-arrow")
|
|
603
|
+
}), /* @__PURE__ */ _e.cloneElement(o, {
|
|
604
|
+
ref: ga(o) ? l : void 0
|
|
605
|
+
}));
|
|
606
|
+
}), mt = {
|
|
607
|
+
adjustX: 1,
|
|
608
|
+
adjustY: 1
|
|
609
|
+
}, gt = [0, 0], Br = {
|
|
610
|
+
topLeft: {
|
|
611
|
+
points: ["bl", "tl"],
|
|
612
|
+
overflow: mt,
|
|
613
|
+
offset: [0, -4],
|
|
614
|
+
targetOffset: gt
|
|
615
|
+
},
|
|
616
|
+
top: {
|
|
617
|
+
points: ["bc", "tc"],
|
|
618
|
+
overflow: mt,
|
|
619
|
+
offset: [0, -4],
|
|
620
|
+
targetOffset: gt
|
|
621
|
+
},
|
|
622
|
+
topRight: {
|
|
623
|
+
points: ["br", "tr"],
|
|
624
|
+
overflow: mt,
|
|
625
|
+
offset: [0, -4],
|
|
626
|
+
targetOffset: gt
|
|
627
|
+
},
|
|
628
|
+
bottomLeft: {
|
|
629
|
+
points: ["tl", "bl"],
|
|
630
|
+
overflow: mt,
|
|
631
|
+
offset: [0, 4],
|
|
632
|
+
targetOffset: gt
|
|
633
|
+
},
|
|
634
|
+
bottom: {
|
|
635
|
+
points: ["tc", "bc"],
|
|
636
|
+
overflow: mt,
|
|
637
|
+
offset: [0, 4],
|
|
638
|
+
targetOffset: gt
|
|
639
|
+
},
|
|
640
|
+
bottomRight: {
|
|
641
|
+
points: ["tr", "br"],
|
|
642
|
+
overflow: mt,
|
|
643
|
+
offset: [0, 4],
|
|
644
|
+
targetOffset: gt
|
|
645
|
+
}
|
|
646
|
+
}, Kr = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
|
|
647
|
+
function Vr(e, t) {
|
|
648
|
+
var a, n = e.arrow, r = n === void 0 ? !1 : n, o = e.prefixCls, l = o === void 0 ? "rc-dropdown" : o, s = e.transitionName, c = e.animation, u = e.align, v = e.placement, d = v === void 0 ? "bottomLeft" : v, f = e.placements, h = f === void 0 ? Br : f, S = e.getPopupContainer, g = e.showAction, x = e.hideAction, p = e.overlayClassName, C = e.overlayStyle, b = e.visible, _ = e.trigger, R = _ === void 0 ? ["hover"] : _, P = e.autoFocus, M = e.overlay, O = e.children, E = e.onVisibleChange, T = Se(e, Kr), y = _e.useState(), $ = z(y, 2), N = $[0], I = $[1], j = "visible" in e ? b : N, G = _e.useRef(null), m = _e.useRef(null), W = _e.useRef(null);
|
|
649
|
+
_e.useImperativeHandle(t, function() {
|
|
650
|
+
return G.current;
|
|
651
|
+
});
|
|
652
|
+
var J = function(q) {
|
|
653
|
+
I(q), E == null || E(q);
|
|
654
|
+
};
|
|
655
|
+
kr({
|
|
656
|
+
visible: j,
|
|
657
|
+
triggerRef: W,
|
|
658
|
+
onVisibleChange: J,
|
|
659
|
+
autoFocus: P,
|
|
660
|
+
overlayRef: m
|
|
661
|
+
});
|
|
662
|
+
var F = function(q) {
|
|
663
|
+
var te = e.onOverlayClick;
|
|
664
|
+
I(!1), te && te(q);
|
|
665
|
+
}, ee = function() {
|
|
666
|
+
return /* @__PURE__ */ _e.createElement(jr, {
|
|
667
|
+
ref: m,
|
|
668
|
+
overlay: M,
|
|
669
|
+
prefixCls: l,
|
|
670
|
+
arrow: r
|
|
671
|
+
});
|
|
672
|
+
}, se = function() {
|
|
673
|
+
return typeof M == "function" ? ee : ee();
|
|
674
|
+
}, A = function() {
|
|
675
|
+
var q = e.minOverlayWidthMatchTrigger, te = e.alignPoint;
|
|
676
|
+
return "minOverlayWidthMatchTrigger" in e ? q : !te;
|
|
677
|
+
}, K = function() {
|
|
678
|
+
var q = e.openClassName;
|
|
679
|
+
return q !== void 0 ? q : "".concat(l, "-open");
|
|
680
|
+
}, k = /* @__PURE__ */ _e.cloneElement(O, {
|
|
681
|
+
className: D((a = O.props) === null || a === void 0 ? void 0 : a.className, j && K()),
|
|
682
|
+
ref: ga(O) ? va(W, ma(O)) : void 0
|
|
683
|
+
}), V = x;
|
|
684
|
+
return !V && R.indexOf("contextMenu") !== -1 && (V = ["click"]), /* @__PURE__ */ _e.createElement(Sa, ae({
|
|
685
|
+
builtinPlacements: h
|
|
686
|
+
}, T, {
|
|
687
|
+
prefixCls: l,
|
|
688
|
+
ref: G,
|
|
689
|
+
popupClassName: D(p, B({}, "".concat(l, "-show-arrow"), r)),
|
|
690
|
+
popupStyle: C,
|
|
691
|
+
action: R,
|
|
692
|
+
showAction: g,
|
|
693
|
+
hideAction: V,
|
|
694
|
+
popupPlacement: d,
|
|
695
|
+
popupAlign: u,
|
|
696
|
+
popupTransitionName: s,
|
|
697
|
+
popupAnimation: c,
|
|
698
|
+
popupVisible: j,
|
|
699
|
+
stretch: A() ? "minWidth" : "",
|
|
700
|
+
popup: se(),
|
|
701
|
+
onPopupVisibleChange: J,
|
|
702
|
+
onPopupClick: F,
|
|
703
|
+
getPopupContainer: S
|
|
704
|
+
}), k);
|
|
705
|
+
}
|
|
706
|
+
const Hr = /* @__PURE__ */ _e.forwardRef(Vr);
|
|
707
|
+
var Ea = /* @__PURE__ */ i.createContext(null);
|
|
708
|
+
function wa(e, t) {
|
|
709
|
+
return e === void 0 ? null : "".concat(e, "-").concat(t);
|
|
710
|
+
}
|
|
711
|
+
function _a(e) {
|
|
712
|
+
var t = i.useContext(Ea);
|
|
713
|
+
return wa(t, e);
|
|
714
|
+
}
|
|
715
|
+
var Gr = ["children", "locked"], ze = /* @__PURE__ */ i.createContext(null);
|
|
716
|
+
function Wr(e, t) {
|
|
717
|
+
var a = Y({}, e);
|
|
718
|
+
return Object.keys(t).forEach(function(n) {
|
|
719
|
+
var r = t[n];
|
|
720
|
+
r !== void 0 && (a[n] = r);
|
|
721
|
+
}), a;
|
|
722
|
+
}
|
|
723
|
+
function Dt(e) {
|
|
724
|
+
var t = e.children, a = e.locked, n = Se(e, Gr), r = i.useContext(ze), o = nr(function() {
|
|
725
|
+
return Wr(r, n);
|
|
726
|
+
}, [r, n], function(l, s) {
|
|
727
|
+
return !a && (l[0] !== s[0] || !pa(l[1], s[1], !0));
|
|
728
|
+
});
|
|
729
|
+
return /* @__PURE__ */ i.createElement(ze.Provider, {
|
|
730
|
+
value: o
|
|
731
|
+
}, t);
|
|
732
|
+
}
|
|
733
|
+
var Fr = [], Pa = /* @__PURE__ */ i.createContext(null);
|
|
734
|
+
function rn() {
|
|
735
|
+
return i.useContext(Pa);
|
|
736
|
+
}
|
|
737
|
+
var Ia = /* @__PURE__ */ i.createContext(Fr);
|
|
738
|
+
function zt(e) {
|
|
739
|
+
var t = i.useContext(Ia);
|
|
740
|
+
return i.useMemo(function() {
|
|
741
|
+
return e !== void 0 ? [].concat(Ke(t), [e]) : t;
|
|
742
|
+
}, [t, e]);
|
|
743
|
+
}
|
|
744
|
+
var Ra = /* @__PURE__ */ i.createContext(null), An = /* @__PURE__ */ i.createContext({});
|
|
745
|
+
function Zn(e) {
|
|
746
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
747
|
+
if (cr(e)) {
|
|
748
|
+
var a = e.nodeName.toLowerCase(), n = (
|
|
749
|
+
// Focusable element
|
|
750
|
+
["input", "select", "textarea", "button"].includes(a) || // Editable element
|
|
751
|
+
e.isContentEditable || // Anchor with href element
|
|
752
|
+
a === "a" && !!e.getAttribute("href")
|
|
753
|
+
), r = e.getAttribute("tabindex"), o = Number(r), l = null;
|
|
754
|
+
return r && !Number.isNaN(o) ? l = o : n && l === null && (l = 0), n && e.disabled && (l = null), l !== null && (l >= 0 || t && l < 0);
|
|
755
|
+
}
|
|
756
|
+
return !1;
|
|
757
|
+
}
|
|
758
|
+
function qr(e) {
|
|
759
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, a = Ke(e.querySelectorAll("*")).filter(function(n) {
|
|
760
|
+
return Zn(n, t);
|
|
761
|
+
});
|
|
762
|
+
return Zn(e, t) && a.unshift(e), a;
|
|
763
|
+
}
|
|
764
|
+
var En = ge.LEFT, wn = ge.RIGHT, _n = ge.UP, Yt = ge.DOWN, Zt = ge.ENTER, Na = ge.ESC, Mt = ge.HOME, Ot = ge.END, Jn = [_n, Yt, En, wn];
|
|
765
|
+
function Ur(e, t, a, n) {
|
|
766
|
+
var r, o = "prev", l = "next", s = "children", c = "parent";
|
|
767
|
+
if (e === "inline" && n === Zt)
|
|
768
|
+
return {
|
|
769
|
+
inlineTrigger: !0
|
|
770
|
+
};
|
|
771
|
+
var u = B(B({}, _n, o), Yt, l), v = B(B(B(B({}, En, a ? l : o), wn, a ? o : l), Yt, s), Zt, s), d = B(B(B(B(B(B({}, _n, o), Yt, l), Zt, s), Na, c), En, a ? s : c), wn, a ? c : s), f = {
|
|
772
|
+
inline: u,
|
|
773
|
+
horizontal: v,
|
|
774
|
+
vertical: d,
|
|
775
|
+
inlineSub: u,
|
|
776
|
+
horizontalSub: d,
|
|
777
|
+
verticalSub: d
|
|
778
|
+
}, h = (r = f["".concat(e).concat(t ? "" : "Sub")]) === null || r === void 0 ? void 0 : r[n];
|
|
779
|
+
switch (h) {
|
|
780
|
+
case o:
|
|
781
|
+
return {
|
|
782
|
+
offset: -1,
|
|
783
|
+
sibling: !0
|
|
784
|
+
};
|
|
785
|
+
case l:
|
|
786
|
+
return {
|
|
787
|
+
offset: 1,
|
|
788
|
+
sibling: !0
|
|
789
|
+
};
|
|
790
|
+
case c:
|
|
791
|
+
return {
|
|
792
|
+
offset: -1,
|
|
793
|
+
sibling: !1
|
|
794
|
+
};
|
|
795
|
+
case s:
|
|
796
|
+
return {
|
|
797
|
+
offset: 1,
|
|
798
|
+
sibling: !1
|
|
799
|
+
};
|
|
800
|
+
default:
|
|
801
|
+
return null;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
function Xr(e) {
|
|
805
|
+
for (var t = e; t; ) {
|
|
806
|
+
if (t.getAttribute("data-menu-list"))
|
|
807
|
+
return t;
|
|
808
|
+
t = t.parentElement;
|
|
809
|
+
}
|
|
810
|
+
return null;
|
|
811
|
+
}
|
|
812
|
+
function Yr(e, t) {
|
|
813
|
+
for (var a = e || document.activeElement; a; ) {
|
|
814
|
+
if (t.has(a))
|
|
815
|
+
return a;
|
|
816
|
+
a = a.parentElement;
|
|
817
|
+
}
|
|
818
|
+
return null;
|
|
819
|
+
}
|
|
820
|
+
function kn(e, t) {
|
|
821
|
+
var a = qr(e, !0);
|
|
822
|
+
return a.filter(function(n) {
|
|
823
|
+
return t.has(n);
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
function Qn(e, t, a) {
|
|
827
|
+
var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
|
|
828
|
+
if (!e)
|
|
829
|
+
return null;
|
|
830
|
+
var r = kn(e, t), o = r.length, l = r.findIndex(function(s) {
|
|
831
|
+
return a === s;
|
|
832
|
+
});
|
|
833
|
+
return n < 0 ? l === -1 ? l = o - 1 : l -= 1 : n > 0 && (l += 1), l = (l + o) % o, r[l];
|
|
834
|
+
}
|
|
835
|
+
var Pn = function(t, a) {
|
|
836
|
+
var n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
837
|
+
return t.forEach(function(l) {
|
|
838
|
+
var s = document.querySelector("[data-menu-id='".concat(wa(a, l), "']"));
|
|
839
|
+
s && (n.add(s), o.set(s, l), r.set(l, s));
|
|
840
|
+
}), {
|
|
841
|
+
elements: n,
|
|
842
|
+
key2element: r,
|
|
843
|
+
element2key: o
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
function Zr(e, t, a, n, r, o, l, s, c, u) {
|
|
847
|
+
var v = i.useRef(), d = i.useRef();
|
|
848
|
+
d.current = t;
|
|
849
|
+
var f = function() {
|
|
850
|
+
Qe.cancel(v.current);
|
|
851
|
+
};
|
|
852
|
+
return i.useEffect(function() {
|
|
853
|
+
return function() {
|
|
854
|
+
f();
|
|
855
|
+
};
|
|
856
|
+
}, []), function(h) {
|
|
857
|
+
var S = h.which;
|
|
858
|
+
if ([].concat(Jn, [Zt, Na, Mt, Ot]).includes(S)) {
|
|
859
|
+
var g = o(), x = Pn(g, n), p = x, C = p.elements, b = p.key2element, _ = p.element2key, R = b.get(t), P = Yr(R, C), M = _.get(P), O = Ur(e, l(M, !0).length === 1, a, S);
|
|
860
|
+
if (!O && S !== Mt && S !== Ot)
|
|
861
|
+
return;
|
|
862
|
+
(Jn.includes(S) || [Mt, Ot].includes(S)) && h.preventDefault();
|
|
863
|
+
var E = function(m) {
|
|
864
|
+
if (m) {
|
|
865
|
+
var W = m, J = m.querySelector("a");
|
|
866
|
+
J != null && J.getAttribute("href") && (W = J);
|
|
867
|
+
var F = _.get(m);
|
|
868
|
+
s(F), f(), v.current = Qe(function() {
|
|
869
|
+
d.current === F && W.focus();
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
if ([Mt, Ot].includes(S) || O.sibling || !P) {
|
|
874
|
+
var T;
|
|
875
|
+
!P || e === "inline" ? T = r.current : T = Xr(P);
|
|
876
|
+
var y, $ = kn(T, C);
|
|
877
|
+
S === Mt ? y = $[0] : S === Ot ? y = $[$.length - 1] : y = Qn(T, C, P, O.offset), E(y);
|
|
878
|
+
} else if (O.inlineTrigger)
|
|
879
|
+
c(M);
|
|
880
|
+
else if (O.offset > 0)
|
|
881
|
+
c(M, !0), f(), v.current = Qe(function() {
|
|
882
|
+
x = Pn(g, n);
|
|
883
|
+
var G = P.getAttribute("aria-controls"), m = document.getElementById(G), W = Qn(m, x.elements);
|
|
884
|
+
E(W);
|
|
885
|
+
}, 5);
|
|
886
|
+
else if (O.offset < 0) {
|
|
887
|
+
var N = l(M, !0), I = N[N.length - 2], j = b.get(I);
|
|
888
|
+
c(I, !1), E(j);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
u == null || u(h);
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
function Jr(e) {
|
|
895
|
+
Promise.resolve().then(e);
|
|
896
|
+
}
|
|
897
|
+
var jn = "__RC_UTIL_PATH_SPLIT__", ea = function(t) {
|
|
898
|
+
return t.join(jn);
|
|
899
|
+
}, Qr = function(t) {
|
|
900
|
+
return t.split(jn);
|
|
901
|
+
}, In = "rc-menu-more";
|
|
902
|
+
function ei() {
|
|
903
|
+
var e = i.useState({}), t = z(e, 2), a = t[1], n = ve(/* @__PURE__ */ new Map()), r = ve(/* @__PURE__ */ new Map()), o = i.useState([]), l = z(o, 2), s = l[0], c = l[1], u = ve(0), v = ve(!1), d = function() {
|
|
904
|
+
v.current || a({});
|
|
905
|
+
}, f = vt(function(b, _) {
|
|
906
|
+
process.env.NODE_ENV !== "production" && rt(!n.current.has(b), "Duplicated key '".concat(b, "' used in Menu by path [").concat(_.join(" > "), "]"));
|
|
907
|
+
var R = ea(_);
|
|
908
|
+
r.current.set(R, b), n.current.set(b, R), u.current += 1;
|
|
909
|
+
var P = u.current;
|
|
910
|
+
Jr(function() {
|
|
911
|
+
P === u.current && d();
|
|
912
|
+
});
|
|
913
|
+
}, []), h = vt(function(b, _) {
|
|
914
|
+
var R = ea(_);
|
|
915
|
+
r.current.delete(R), n.current.delete(b);
|
|
916
|
+
}, []), S = vt(function(b) {
|
|
917
|
+
c(b);
|
|
918
|
+
}, []), g = vt(function(b, _) {
|
|
919
|
+
var R = n.current.get(b) || "", P = Qr(R);
|
|
920
|
+
return _ && s.includes(P[0]) && P.unshift(In), P;
|
|
921
|
+
}, [s]), x = vt(function(b, _) {
|
|
922
|
+
return b.filter(function(R) {
|
|
923
|
+
return R !== void 0;
|
|
924
|
+
}).some(function(R) {
|
|
925
|
+
var P = g(R, !0);
|
|
926
|
+
return P.includes(_);
|
|
927
|
+
});
|
|
928
|
+
}, [g]), p = function() {
|
|
929
|
+
var _ = Ke(n.current.keys());
|
|
930
|
+
return s.length && _.push(In), _;
|
|
931
|
+
}, C = vt(function(b) {
|
|
932
|
+
var _ = "".concat(n.current.get(b)).concat(jn), R = /* @__PURE__ */ new Set();
|
|
933
|
+
return Ke(r.current.keys()).forEach(function(P) {
|
|
934
|
+
P.startsWith(_) && R.add(r.current.get(P));
|
|
935
|
+
}), R;
|
|
936
|
+
}, []);
|
|
937
|
+
return i.useEffect(function() {
|
|
938
|
+
return function() {
|
|
939
|
+
v.current = !0;
|
|
940
|
+
};
|
|
941
|
+
}, []), {
|
|
942
|
+
// Register
|
|
943
|
+
registerPath: f,
|
|
944
|
+
unregisterPath: h,
|
|
945
|
+
refreshOverflowKeys: S,
|
|
946
|
+
// Util
|
|
947
|
+
isSubPathKey: x,
|
|
948
|
+
getKeyPath: g,
|
|
949
|
+
getKeys: p,
|
|
950
|
+
getSubPathKeys: C
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
function Tt(e) {
|
|
954
|
+
var t = i.useRef(e);
|
|
955
|
+
t.current = e;
|
|
956
|
+
var a = i.useCallback(function() {
|
|
957
|
+
for (var n, r = arguments.length, o = new Array(r), l = 0; l < r; l++)
|
|
958
|
+
o[l] = arguments[l];
|
|
959
|
+
return (n = t.current) === null || n === void 0 ? void 0 : n.call.apply(n, [t].concat(o));
|
|
960
|
+
}, []);
|
|
961
|
+
return e ? a : void 0;
|
|
962
|
+
}
|
|
963
|
+
var ti = Math.random().toFixed(5).toString().slice(2), ta = 0;
|
|
964
|
+
function ni(e) {
|
|
965
|
+
var t = bt(e, {
|
|
966
|
+
value: e
|
|
967
|
+
}), a = z(t, 2), n = a[0], r = a[1];
|
|
968
|
+
return i.useEffect(function() {
|
|
969
|
+
ta += 1;
|
|
970
|
+
var o = process.env.NODE_ENV === "test" ? "test" : "".concat(ti, "-").concat(ta);
|
|
971
|
+
r("rc-menu-uuid-".concat(o));
|
|
972
|
+
}, []), n;
|
|
973
|
+
}
|
|
974
|
+
function Ma(e, t, a, n) {
|
|
975
|
+
var r = i.useContext(ze), o = r.activeKey, l = r.onActive, s = r.onInactive, c = {
|
|
976
|
+
active: o === e
|
|
977
|
+
};
|
|
978
|
+
return t || (c.onMouseEnter = function(u) {
|
|
979
|
+
a == null || a({
|
|
980
|
+
key: e,
|
|
981
|
+
domEvent: u
|
|
982
|
+
}), l(e);
|
|
983
|
+
}, c.onMouseLeave = function(u) {
|
|
984
|
+
n == null || n({
|
|
985
|
+
key: e,
|
|
986
|
+
domEvent: u
|
|
987
|
+
}), s(e);
|
|
988
|
+
}), c;
|
|
989
|
+
}
|
|
990
|
+
function Oa(e) {
|
|
991
|
+
var t = i.useContext(ze), a = t.mode, n = t.rtl, r = t.inlineIndent;
|
|
992
|
+
if (a !== "inline")
|
|
993
|
+
return null;
|
|
994
|
+
var o = e;
|
|
995
|
+
return n ? {
|
|
996
|
+
paddingRight: o * r
|
|
997
|
+
} : {
|
|
998
|
+
paddingLeft: o * r
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
function Ta(e) {
|
|
1002
|
+
var t = e.icon, a = e.props, n = e.children, r;
|
|
1003
|
+
return t === null || t === !1 ? null : (typeof t == "function" ? r = /* @__PURE__ */ i.createElement(t, Y({}, a)) : typeof t != "boolean" && (r = t), r || n || null);
|
|
1004
|
+
}
|
|
1005
|
+
var ai = ["item"];
|
|
1006
|
+
function Qt(e) {
|
|
1007
|
+
var t = e.item, a = Se(e, ai);
|
|
1008
|
+
return Object.defineProperty(a, "item", {
|
|
1009
|
+
get: function() {
|
|
1010
|
+
return rt(!1, "`info.item` is deprecated since we will move to function component that not provides React Node instance in future."), t;
|
|
1011
|
+
}
|
|
1012
|
+
}), a;
|
|
1013
|
+
}
|
|
1014
|
+
var ri = ["title", "attribute", "elementRef"], ii = ["style", "className", "eventKey", "warnKey", "disabled", "itemIcon", "children", "role", "onMouseEnter", "onMouseLeave", "onClick", "onKeyDown", "onFocus"], oi = ["active"], li = /* @__PURE__ */ function(e) {
|
|
1015
|
+
ar(a, e);
|
|
1016
|
+
var t = rr(a);
|
|
1017
|
+
function a() {
|
|
1018
|
+
return ir(this, a), t.apply(this, arguments);
|
|
1019
|
+
}
|
|
1020
|
+
return or(a, [{
|
|
1021
|
+
key: "render",
|
|
1022
|
+
value: function() {
|
|
1023
|
+
var r = this.props, o = r.title, l = r.attribute, s = r.elementRef, c = Se(r, ri), u = it(c, ["eventKey", "popupClassName", "popupOffset", "onTitleClick"]);
|
|
1024
|
+
return rt(!l, "`attribute` of Menu.Item is deprecated. Please pass attribute directly."), /* @__PURE__ */ i.createElement(Lt.Item, ae({}, l, {
|
|
1025
|
+
title: typeof o == "string" ? o : void 0
|
|
1026
|
+
}, u, {
|
|
1027
|
+
ref: s
|
|
1028
|
+
}));
|
|
1029
|
+
}
|
|
1030
|
+
}]), a;
|
|
1031
|
+
}(i.Component), si = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
1032
|
+
var a = e.style, n = e.className, r = e.eventKey, o = e.warnKey, l = e.disabled, s = e.itemIcon, c = e.children, u = e.role, v = e.onMouseEnter, d = e.onMouseLeave, f = e.onClick, h = e.onKeyDown, S = e.onFocus, g = Se(e, ii), x = _a(r), p = i.useContext(ze), C = p.prefixCls, b = p.onItemClick, _ = p.disabled, R = p.overflowDisabled, P = p.itemIcon, M = p.selectedKeys, O = p.onActive, E = i.useContext(An), T = E._internalRenderMenuItem, y = "".concat(C, "-item"), $ = i.useRef(), N = i.useRef(), I = _ || l, j = ba(t, N), G = zt(r);
|
|
1033
|
+
process.env.NODE_ENV !== "production" && o && rt(!1, "MenuItem should not leave undefined `key`.");
|
|
1034
|
+
var m = function(ie) {
|
|
1035
|
+
return {
|
|
1036
|
+
key: r,
|
|
1037
|
+
// Note: For legacy code is reversed which not like other antd component
|
|
1038
|
+
keyPath: Ke(G).reverse(),
|
|
1039
|
+
item: $.current,
|
|
1040
|
+
domEvent: ie
|
|
1041
|
+
};
|
|
1042
|
+
}, W = s || P, J = Ma(r, I, v, d), F = J.active, ee = Se(J, oi), se = M.includes(r), A = Oa(G.length), K = function(ie) {
|
|
1043
|
+
if (!I) {
|
|
1044
|
+
var de = m(ie);
|
|
1045
|
+
f == null || f(Qt(de)), b(de);
|
|
1046
|
+
}
|
|
1047
|
+
}, k = function(ie) {
|
|
1048
|
+
if (h == null || h(ie), ie.which === ge.ENTER) {
|
|
1049
|
+
var de = m(ie);
|
|
1050
|
+
f == null || f(Qt(de)), b(de);
|
|
1051
|
+
}
|
|
1052
|
+
}, V = function(ie) {
|
|
1053
|
+
O(r), S == null || S(ie);
|
|
1054
|
+
}, U = {};
|
|
1055
|
+
e.role === "option" && (U["aria-selected"] = se);
|
|
1056
|
+
var q = /* @__PURE__ */ i.createElement(li, ae({
|
|
1057
|
+
ref: $,
|
|
1058
|
+
elementRef: j,
|
|
1059
|
+
role: u === null ? "none" : u || "menuitem",
|
|
1060
|
+
tabIndex: l ? null : -1,
|
|
1061
|
+
"data-menu-id": R && x ? null : x
|
|
1062
|
+
}, it(g, ["extra"]), ee, U, {
|
|
1063
|
+
component: "li",
|
|
1064
|
+
"aria-disabled": l,
|
|
1065
|
+
style: Y(Y({}, A), a),
|
|
1066
|
+
className: D(y, B(B(B({}, "".concat(y, "-active"), F), "".concat(y, "-selected"), se), "".concat(y, "-disabled"), I), n),
|
|
1067
|
+
onClick: K,
|
|
1068
|
+
onKeyDown: k,
|
|
1069
|
+
onFocus: V
|
|
1070
|
+
}), c, /* @__PURE__ */ i.createElement(Ta, {
|
|
1071
|
+
props: Y(Y({}, e), {}, {
|
|
1072
|
+
isSelected: se
|
|
1073
|
+
}),
|
|
1074
|
+
icon: W
|
|
1075
|
+
}));
|
|
1076
|
+
return T && (q = T(q, e, {
|
|
1077
|
+
selected: se
|
|
1078
|
+
})), q;
|
|
1079
|
+
});
|
|
1080
|
+
function ci(e, t) {
|
|
1081
|
+
var a = e.eventKey, n = rn(), r = zt(a);
|
|
1082
|
+
return i.useEffect(function() {
|
|
1083
|
+
if (n)
|
|
1084
|
+
return n.registerPath(a, r), function() {
|
|
1085
|
+
n.unregisterPath(a, r);
|
|
1086
|
+
};
|
|
1087
|
+
}, [r]), n ? null : /* @__PURE__ */ i.createElement(si, ae({}, e, {
|
|
1088
|
+
ref: t
|
|
1089
|
+
}));
|
|
1090
|
+
}
|
|
1091
|
+
const on = /* @__PURE__ */ i.forwardRef(ci);
|
|
1092
|
+
var ui = ["className", "children"], di = function(t, a) {
|
|
1093
|
+
var n = t.className, r = t.children, o = Se(t, ui), l = i.useContext(ze), s = l.prefixCls, c = l.mode, u = l.rtl;
|
|
1094
|
+
return /* @__PURE__ */ i.createElement("ul", ae({
|
|
1095
|
+
className: D(s, u && "".concat(s, "-rtl"), "".concat(s, "-sub"), "".concat(s, "-").concat(c === "inline" ? "inline" : "vertical"), n),
|
|
1096
|
+
role: "menu"
|
|
1097
|
+
}, o, {
|
|
1098
|
+
"data-menu-list": !0,
|
|
1099
|
+
ref: a
|
|
1100
|
+
}), r);
|
|
1101
|
+
}, Bn = /* @__PURE__ */ i.forwardRef(di);
|
|
1102
|
+
Bn.displayName = "SubMenuList";
|
|
1103
|
+
function Kn(e, t) {
|
|
1104
|
+
return Ca(e).map(function(a, n) {
|
|
1105
|
+
if (/* @__PURE__ */ i.isValidElement(a)) {
|
|
1106
|
+
var r, o, l = a.key, s = (r = (o = a.props) === null || o === void 0 ? void 0 : o.eventKey) !== null && r !== void 0 ? r : l, c = s == null;
|
|
1107
|
+
c && (s = "tmp_key-".concat([].concat(Ke(t), [n]).join("-")));
|
|
1108
|
+
var u = {
|
|
1109
|
+
key: s,
|
|
1110
|
+
eventKey: s
|
|
1111
|
+
};
|
|
1112
|
+
return process.env.NODE_ENV !== "production" && c && (u.warnKey = !0), /* @__PURE__ */ i.cloneElement(a, u);
|
|
1113
|
+
}
|
|
1114
|
+
return a;
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
var $e = {
|
|
1118
|
+
adjustX: 1,
|
|
1119
|
+
adjustY: 1
|
|
1120
|
+
}, fi = {
|
|
1121
|
+
topLeft: {
|
|
1122
|
+
points: ["bl", "tl"],
|
|
1123
|
+
overflow: $e
|
|
1124
|
+
},
|
|
1125
|
+
topRight: {
|
|
1126
|
+
points: ["br", "tr"],
|
|
1127
|
+
overflow: $e
|
|
1128
|
+
},
|
|
1129
|
+
bottomLeft: {
|
|
1130
|
+
points: ["tl", "bl"],
|
|
1131
|
+
overflow: $e
|
|
1132
|
+
},
|
|
1133
|
+
bottomRight: {
|
|
1134
|
+
points: ["tr", "br"],
|
|
1135
|
+
overflow: $e
|
|
1136
|
+
},
|
|
1137
|
+
leftTop: {
|
|
1138
|
+
points: ["tr", "tl"],
|
|
1139
|
+
overflow: $e
|
|
1140
|
+
},
|
|
1141
|
+
leftBottom: {
|
|
1142
|
+
points: ["br", "bl"],
|
|
1143
|
+
overflow: $e
|
|
1144
|
+
},
|
|
1145
|
+
rightTop: {
|
|
1146
|
+
points: ["tl", "tr"],
|
|
1147
|
+
overflow: $e
|
|
1148
|
+
},
|
|
1149
|
+
rightBottom: {
|
|
1150
|
+
points: ["bl", "br"],
|
|
1151
|
+
overflow: $e
|
|
1152
|
+
}
|
|
1153
|
+
}, vi = {
|
|
1154
|
+
topLeft: {
|
|
1155
|
+
points: ["bl", "tl"],
|
|
1156
|
+
overflow: $e
|
|
1157
|
+
},
|
|
1158
|
+
topRight: {
|
|
1159
|
+
points: ["br", "tr"],
|
|
1160
|
+
overflow: $e
|
|
1161
|
+
},
|
|
1162
|
+
bottomLeft: {
|
|
1163
|
+
points: ["tl", "bl"],
|
|
1164
|
+
overflow: $e
|
|
1165
|
+
},
|
|
1166
|
+
bottomRight: {
|
|
1167
|
+
points: ["tr", "br"],
|
|
1168
|
+
overflow: $e
|
|
1169
|
+
},
|
|
1170
|
+
rightTop: {
|
|
1171
|
+
points: ["tr", "tl"],
|
|
1172
|
+
overflow: $e
|
|
1173
|
+
},
|
|
1174
|
+
rightBottom: {
|
|
1175
|
+
points: ["br", "bl"],
|
|
1176
|
+
overflow: $e
|
|
1177
|
+
},
|
|
1178
|
+
leftTop: {
|
|
1179
|
+
points: ["tl", "tr"],
|
|
1180
|
+
overflow: $e
|
|
1181
|
+
},
|
|
1182
|
+
leftBottom: {
|
|
1183
|
+
points: ["bl", "br"],
|
|
1184
|
+
overflow: $e
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
function La(e, t, a) {
|
|
1188
|
+
if (t)
|
|
1189
|
+
return t;
|
|
1190
|
+
if (a)
|
|
1191
|
+
return a[e] || a.other;
|
|
1192
|
+
}
|
|
1193
|
+
var mi = {
|
|
1194
|
+
horizontal: "bottomLeft",
|
|
1195
|
+
vertical: "rightTop",
|
|
1196
|
+
"vertical-left": "rightTop",
|
|
1197
|
+
"vertical-right": "leftTop"
|
|
1198
|
+
};
|
|
1199
|
+
function gi(e) {
|
|
1200
|
+
var t = e.prefixCls, a = e.visible, n = e.children, r = e.popup, o = e.popupStyle, l = e.popupClassName, s = e.popupOffset, c = e.disabled, u = e.mode, v = e.onVisibleChange, d = i.useContext(ze), f = d.getPopupContainer, h = d.rtl, S = d.subMenuOpenDelay, g = d.subMenuCloseDelay, x = d.builtinPlacements, p = d.triggerSubMenuAction, C = d.forceSubMenuRender, b = d.rootClassName, _ = d.motion, R = d.defaultMotions, P = i.useState(!1), M = z(P, 2), O = M[0], E = M[1], T = h ? Y(Y({}, vi), x) : Y(Y({}, fi), x), y = mi[u], $ = La(u, _, R), N = i.useRef($);
|
|
1201
|
+
u !== "inline" && (N.current = $);
|
|
1202
|
+
var I = Y(Y({}, N.current), {}, {
|
|
1203
|
+
leavedClassName: "".concat(t, "-hidden"),
|
|
1204
|
+
removeOnLeave: !1,
|
|
1205
|
+
motionAppear: !0
|
|
1206
|
+
}), j = i.useRef();
|
|
1207
|
+
return i.useEffect(function() {
|
|
1208
|
+
return j.current = Qe(function() {
|
|
1209
|
+
E(a);
|
|
1210
|
+
}), function() {
|
|
1211
|
+
Qe.cancel(j.current);
|
|
1212
|
+
};
|
|
1213
|
+
}, [a]), /* @__PURE__ */ i.createElement(Sa, {
|
|
1214
|
+
prefixCls: t,
|
|
1215
|
+
popupClassName: D("".concat(t, "-popup"), B({}, "".concat(t, "-rtl"), h), l, b),
|
|
1216
|
+
stretch: u === "horizontal" ? "minWidth" : null,
|
|
1217
|
+
getPopupContainer: f,
|
|
1218
|
+
builtinPlacements: T,
|
|
1219
|
+
popupPlacement: y,
|
|
1220
|
+
popupVisible: O,
|
|
1221
|
+
popup: r,
|
|
1222
|
+
popupStyle: o,
|
|
1223
|
+
popupAlign: s && {
|
|
1224
|
+
offset: s
|
|
1225
|
+
},
|
|
1226
|
+
action: c ? [] : [p],
|
|
1227
|
+
mouseEnterDelay: S,
|
|
1228
|
+
mouseLeaveDelay: g,
|
|
1229
|
+
onPopupVisibleChange: v,
|
|
1230
|
+
forceRender: C,
|
|
1231
|
+
popupMotion: I,
|
|
1232
|
+
fresh: !0
|
|
1233
|
+
}, n);
|
|
1234
|
+
}
|
|
1235
|
+
function pi(e) {
|
|
1236
|
+
var t = e.id, a = e.open, n = e.keyPath, r = e.children, o = "inline", l = i.useContext(ze), s = l.prefixCls, c = l.forceSubMenuRender, u = l.motion, v = l.defaultMotions, d = l.mode, f = i.useRef(!1);
|
|
1237
|
+
f.current = d === o;
|
|
1238
|
+
var h = i.useState(!f.current), S = z(h, 2), g = S[0], x = S[1], p = f.current ? a : !1;
|
|
1239
|
+
i.useEffect(function() {
|
|
1240
|
+
f.current && x(!1);
|
|
1241
|
+
}, [d]);
|
|
1242
|
+
var C = Y({}, La(o, u, v));
|
|
1243
|
+
n.length > 1 && (C.motionAppear = !1);
|
|
1244
|
+
var b = C.onVisibleChanged;
|
|
1245
|
+
return C.onVisibleChanged = function(_) {
|
|
1246
|
+
return !f.current && !_ && x(!0), b == null ? void 0 : b(_);
|
|
1247
|
+
}, g ? null : /* @__PURE__ */ i.createElement(Dt, {
|
|
1248
|
+
mode: o,
|
|
1249
|
+
locked: !f.current
|
|
1250
|
+
}, /* @__PURE__ */ i.createElement(ha, ae({
|
|
1251
|
+
visible: p
|
|
1252
|
+
}, C, {
|
|
1253
|
+
forceRender: c,
|
|
1254
|
+
removeOnLeave: !1,
|
|
1255
|
+
leavedClassName: "".concat(s, "-hidden")
|
|
1256
|
+
}), function(_) {
|
|
1257
|
+
var R = _.className, P = _.style;
|
|
1258
|
+
return /* @__PURE__ */ i.createElement(Bn, {
|
|
1259
|
+
id: t,
|
|
1260
|
+
className: R,
|
|
1261
|
+
style: P
|
|
1262
|
+
}, r);
|
|
1263
|
+
}));
|
|
1264
|
+
}
|
|
1265
|
+
var bi = ["style", "className", "title", "eventKey", "warnKey", "disabled", "internalPopupClose", "children", "itemIcon", "expandIcon", "popupClassName", "popupOffset", "popupStyle", "onClick", "onMouseEnter", "onMouseLeave", "onTitleClick", "onTitleMouseEnter", "onTitleMouseLeave"], hi = ["active"], yi = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
1266
|
+
var a = e.style, n = e.className, r = e.title, o = e.eventKey, l = e.warnKey, s = e.disabled, c = e.internalPopupClose, u = e.children, v = e.itemIcon, d = e.expandIcon, f = e.popupClassName, h = e.popupOffset, S = e.popupStyle, g = e.onClick, x = e.onMouseEnter, p = e.onMouseLeave, C = e.onTitleClick, b = e.onTitleMouseEnter, _ = e.onTitleMouseLeave, R = Se(e, bi), P = _a(o), M = i.useContext(ze), O = M.prefixCls, E = M.mode, T = M.openKeys, y = M.disabled, $ = M.overflowDisabled, N = M.activeKey, I = M.selectedKeys, j = M.itemIcon, G = M.expandIcon, m = M.onItemClick, W = M.onOpenChange, J = M.onActive, F = i.useContext(An), ee = F._internalRenderSubMenuItem, se = i.useContext(Ra), A = se.isSubPathKey, K = zt(), k = "".concat(O, "-submenu"), V = y || s, U = i.useRef(), q = i.useRef();
|
|
1267
|
+
process.env.NODE_ENV !== "production" && l && rt(!1, "SubMenu should not leave undefined `key`.");
|
|
1268
|
+
var te = v ?? j, ie = d ?? G, de = T.includes(o), fe = !$ && de, Pe = A(I, o), H = Ma(o, V, b, _), me = H.active, De = Se(H, hi), Xe = i.useState(!1), oe = z(Xe, 2), Z = oe[0], ye = oe[1], Ie = function(ce) {
|
|
1269
|
+
V || ye(ce);
|
|
1270
|
+
}, He = function(ce) {
|
|
1271
|
+
Ie(!0), x == null || x({
|
|
1272
|
+
key: o,
|
|
1273
|
+
domEvent: ce
|
|
1274
|
+
});
|
|
1275
|
+
}, et = function(ce) {
|
|
1276
|
+
Ie(!1), p == null || p({
|
|
1277
|
+
key: o,
|
|
1278
|
+
domEvent: ce
|
|
1279
|
+
});
|
|
1280
|
+
}, Ye = i.useMemo(function() {
|
|
1281
|
+
return me || (E !== "inline" ? Z || A([N], o) : !1);
|
|
1282
|
+
}, [E, me, N, Z, o, A]), Oe = Oa(K.length), xe = function(ce) {
|
|
1283
|
+
V || (C == null || C({
|
|
1284
|
+
key: o,
|
|
1285
|
+
domEvent: ce
|
|
1286
|
+
}), E === "inline" && W(o, !de));
|
|
1287
|
+
}, Ct = Tt(function(Ee) {
|
|
1288
|
+
g == null || g(Qt(Ee)), m(Ee);
|
|
1289
|
+
}), Re = function(ce) {
|
|
1290
|
+
E !== "inline" && W(o, ce);
|
|
1291
|
+
}, Te = function() {
|
|
1292
|
+
J(o);
|
|
1293
|
+
}, Ge = P && "".concat(P, "-popup"), Le = /* @__PURE__ */ i.createElement("div", ae({
|
|
1294
|
+
role: "menuitem",
|
|
1295
|
+
style: Oe,
|
|
1296
|
+
className: "".concat(k, "-title"),
|
|
1297
|
+
tabIndex: V ? null : -1,
|
|
1298
|
+
ref: U,
|
|
1299
|
+
title: typeof r == "string" ? r : null,
|
|
1300
|
+
"data-menu-id": $ && P ? null : P,
|
|
1301
|
+
"aria-expanded": fe,
|
|
1302
|
+
"aria-haspopup": !0,
|
|
1303
|
+
"aria-controls": Ge,
|
|
1304
|
+
"aria-disabled": V,
|
|
1305
|
+
onClick: xe,
|
|
1306
|
+
onFocus: Te
|
|
1307
|
+
}, De), r, /* @__PURE__ */ i.createElement(Ta, {
|
|
1308
|
+
icon: E !== "horizontal" ? ie : void 0,
|
|
1309
|
+
props: Y(Y({}, e), {}, {
|
|
1310
|
+
isOpen: fe,
|
|
1311
|
+
// [Legacy] Not sure why need this mark
|
|
1312
|
+
isSubMenu: !0
|
|
1313
|
+
})
|
|
1314
|
+
}, /* @__PURE__ */ i.createElement("i", {
|
|
1315
|
+
className: "".concat(k, "-arrow")
|
|
1316
|
+
}))), We = i.useRef(E);
|
|
1317
|
+
if (E !== "inline" && K.length > 1 ? We.current = "vertical" : We.current = E, !$) {
|
|
1318
|
+
var Ae = We.current;
|
|
1319
|
+
Le = /* @__PURE__ */ i.createElement(gi, {
|
|
1320
|
+
mode: Ae,
|
|
1321
|
+
prefixCls: k,
|
|
1322
|
+
visible: !c && fe && E !== "inline",
|
|
1323
|
+
popupClassName: f,
|
|
1324
|
+
popupOffset: h,
|
|
1325
|
+
popupStyle: S,
|
|
1326
|
+
popup: /* @__PURE__ */ i.createElement(
|
|
1327
|
+
Dt,
|
|
1328
|
+
{
|
|
1329
|
+
mode: Ae === "horizontal" ? "vertical" : Ae
|
|
1330
|
+
},
|
|
1331
|
+
/* @__PURE__ */ i.createElement(Bn, {
|
|
1332
|
+
id: Ge,
|
|
1333
|
+
ref: q
|
|
1334
|
+
}, u)
|
|
1335
|
+
),
|
|
1336
|
+
disabled: V,
|
|
1337
|
+
onVisibleChange: Re
|
|
1338
|
+
}, Le);
|
|
1339
|
+
}
|
|
1340
|
+
var ke = /* @__PURE__ */ i.createElement(Lt.Item, ae({
|
|
1341
|
+
ref: t,
|
|
1342
|
+
role: "none"
|
|
1343
|
+
}, R, {
|
|
1344
|
+
component: "li",
|
|
1345
|
+
style: a,
|
|
1346
|
+
className: D(k, "".concat(k, "-").concat(E), n, B(B(B(B({}, "".concat(k, "-open"), fe), "".concat(k, "-active"), Ye), "".concat(k, "-selected"), Pe), "".concat(k, "-disabled"), V)),
|
|
1347
|
+
onMouseEnter: He,
|
|
1348
|
+
onMouseLeave: et
|
|
1349
|
+
}), Le, !$ && /* @__PURE__ */ i.createElement(pi, {
|
|
1350
|
+
id: Ge,
|
|
1351
|
+
open: fe,
|
|
1352
|
+
keyPath: K
|
|
1353
|
+
}, u));
|
|
1354
|
+
return ee && (ke = ee(ke, e, {
|
|
1355
|
+
selected: Pe,
|
|
1356
|
+
active: Ye,
|
|
1357
|
+
open: fe,
|
|
1358
|
+
disabled: V
|
|
1359
|
+
})), /* @__PURE__ */ i.createElement(Dt, {
|
|
1360
|
+
onItemClick: Ct,
|
|
1361
|
+
mode: E === "horizontal" ? "vertical" : E,
|
|
1362
|
+
itemIcon: te,
|
|
1363
|
+
expandIcon: ie
|
|
1364
|
+
}, ke);
|
|
1365
|
+
}), ln = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
1366
|
+
var a = e.eventKey, n = e.children, r = zt(a), o = Kn(n, r), l = rn();
|
|
1367
|
+
i.useEffect(function() {
|
|
1368
|
+
if (l)
|
|
1369
|
+
return l.registerPath(a, r), function() {
|
|
1370
|
+
l.unregisterPath(a, r);
|
|
1371
|
+
};
|
|
1372
|
+
}, [r]);
|
|
1373
|
+
var s;
|
|
1374
|
+
return l ? s = o : s = /* @__PURE__ */ i.createElement(yi, ae({
|
|
1375
|
+
ref: t
|
|
1376
|
+
}, e), o), /* @__PURE__ */ i.createElement(Ia.Provider, {
|
|
1377
|
+
value: r
|
|
1378
|
+
}, s);
|
|
1379
|
+
});
|
|
1380
|
+
process.env.NODE_ENV !== "production" && (ln.displayName = "SubMenu");
|
|
1381
|
+
function Da(e) {
|
|
1382
|
+
var t = e.className, a = e.style, n = i.useContext(ze), r = n.prefixCls, o = rn();
|
|
1383
|
+
return o ? null : /* @__PURE__ */ i.createElement("li", {
|
|
1384
|
+
role: "separator",
|
|
1385
|
+
className: D("".concat(r, "-item-divider"), t),
|
|
1386
|
+
style: a
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
var Ci = ["className", "title", "eventKey", "children"], $i = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
1390
|
+
var a = e.className, n = e.title;
|
|
1391
|
+
e.eventKey;
|
|
1392
|
+
var r = e.children, o = Se(e, Ci), l = i.useContext(ze), s = l.prefixCls, c = "".concat(s, "-item-group");
|
|
1393
|
+
return /* @__PURE__ */ i.createElement("li", ae({
|
|
1394
|
+
ref: t,
|
|
1395
|
+
role: "presentation"
|
|
1396
|
+
}, o, {
|
|
1397
|
+
onClick: function(v) {
|
|
1398
|
+
return v.stopPropagation();
|
|
1399
|
+
},
|
|
1400
|
+
className: D(c, a)
|
|
1401
|
+
}), /* @__PURE__ */ i.createElement("div", {
|
|
1402
|
+
role: "presentation",
|
|
1403
|
+
className: "".concat(c, "-title"),
|
|
1404
|
+
title: typeof n == "string" ? n : void 0
|
|
1405
|
+
}, n), /* @__PURE__ */ i.createElement("ul", {
|
|
1406
|
+
role: "group",
|
|
1407
|
+
className: "".concat(c, "-list")
|
|
1408
|
+
}, r));
|
|
1409
|
+
}), Vn = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
1410
|
+
var a = e.eventKey, n = e.children, r = zt(a), o = Kn(n, r), l = rn();
|
|
1411
|
+
return l ? o : /* @__PURE__ */ i.createElement($i, ae({
|
|
1412
|
+
ref: t
|
|
1413
|
+
}, it(e, ["warnKey"])), o);
|
|
1414
|
+
});
|
|
1415
|
+
process.env.NODE_ENV !== "production" && (Vn.displayName = "MenuItemGroup");
|
|
1416
|
+
var Si = ["label", "children", "key", "type", "extra"];
|
|
1417
|
+
function Rn(e, t, a) {
|
|
1418
|
+
var n = t.item, r = t.group, o = t.submenu, l = t.divider;
|
|
1419
|
+
return (e || []).map(function(s, c) {
|
|
1420
|
+
if (s && en(s) === "object") {
|
|
1421
|
+
var u = s, v = u.label, d = u.children, f = u.key, h = u.type, S = u.extra, g = Se(u, Si), x = f ?? "tmp-".concat(c);
|
|
1422
|
+
return d || h === "group" ? h === "group" ? /* @__PURE__ */ i.createElement(r, ae({
|
|
1423
|
+
key: x
|
|
1424
|
+
}, g, {
|
|
1425
|
+
title: v
|
|
1426
|
+
}), Rn(d, t, a)) : /* @__PURE__ */ i.createElement(o, ae({
|
|
1427
|
+
key: x
|
|
1428
|
+
}, g, {
|
|
1429
|
+
title: v
|
|
1430
|
+
}), Rn(d, t, a)) : h === "divider" ? /* @__PURE__ */ i.createElement(l, ae({
|
|
1431
|
+
key: x
|
|
1432
|
+
}, g)) : /* @__PURE__ */ i.createElement(n, ae({
|
|
1433
|
+
key: x
|
|
1434
|
+
}, g, {
|
|
1435
|
+
extra: S
|
|
1436
|
+
}), v, (!!S || S === 0) && /* @__PURE__ */ i.createElement("span", {
|
|
1437
|
+
className: "".concat(a, "-item-extra")
|
|
1438
|
+
}, S));
|
|
1439
|
+
}
|
|
1440
|
+
return null;
|
|
1441
|
+
}).filter(function(s) {
|
|
1442
|
+
return s;
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
function na(e, t, a, n, r) {
|
|
1446
|
+
var o = e, l = Y({
|
|
1447
|
+
divider: Da,
|
|
1448
|
+
item: on,
|
|
1449
|
+
group: Vn,
|
|
1450
|
+
submenu: ln
|
|
1451
|
+
}, n);
|
|
1452
|
+
return t && (o = Rn(t, l, r)), Kn(o, a);
|
|
1453
|
+
}
|
|
1454
|
+
var xi = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"], at = [], Ei = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
1455
|
+
var a, n = e, r = n.prefixCls, o = r === void 0 ? "rc-menu" : r, l = n.rootClassName, s = n.style, c = n.className, u = n.tabIndex, v = u === void 0 ? 0 : u, d = n.items, f = n.children, h = n.direction, S = n.id, g = n.mode, x = g === void 0 ? "vertical" : g, p = n.inlineCollapsed, C = n.disabled, b = n.disabledOverflow, _ = n.subMenuOpenDelay, R = _ === void 0 ? 0.1 : _, P = n.subMenuCloseDelay, M = P === void 0 ? 0.1 : P, O = n.forceSubMenuRender, E = n.defaultOpenKeys, T = n.openKeys, y = n.activeKey, $ = n.defaultActiveFirst, N = n.selectable, I = N === void 0 ? !0 : N, j = n.multiple, G = j === void 0 ? !1 : j, m = n.defaultSelectedKeys, W = n.selectedKeys, J = n.onSelect, F = n.onDeselect, ee = n.inlineIndent, se = ee === void 0 ? 24 : ee, A = n.motion, K = n.defaultMotions, k = n.triggerSubMenuAction, V = k === void 0 ? "hover" : k, U = n.builtinPlacements, q = n.itemIcon, te = n.expandIcon, ie = n.overflowedIndicator, de = ie === void 0 ? "..." : ie, fe = n.overflowedIndicatorPopupClassName, Pe = n.getPopupContainer, H = n.onClick, me = n.onOpenChange, De = n.onKeyDown, Xe = n.openAnimation, oe = n.openTransitionName, Z = n._internalRenderMenuItem, ye = n._internalRenderSubMenuItem, Ie = n._internalComponents, He = Se(n, xi), et = i.useMemo(function() {
|
|
1456
|
+
return [na(f, d, at, Ie, o), na(f, d, at, {}, o)];
|
|
1457
|
+
}, [f, d, Ie]), Ye = z(et, 2), Oe = Ye[0], xe = Ye[1], Ct = i.useState(!1), Re = z(Ct, 2), Te = Re[0], Ge = Re[1], Le = i.useRef(), We = ni(S), Ae = h === "rtl";
|
|
1458
|
+
process.env.NODE_ENV !== "production" && rt(!Xe && !oe, "`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");
|
|
1459
|
+
var ke = bt(E, {
|
|
1460
|
+
value: T,
|
|
1461
|
+
postState: function(Q) {
|
|
1462
|
+
return Q || at;
|
|
1463
|
+
}
|
|
1464
|
+
}), Ee = z(ke, 2), ce = Ee[0], lt = Ee[1], $t = function(Q) {
|
|
1465
|
+
var le = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1466
|
+
function Ne() {
|
|
1467
|
+
lt(Q), me == null || me(Q);
|
|
1468
|
+
}
|
|
1469
|
+
le ? mr.flushSync(Ne) : Ne();
|
|
1470
|
+
}, kt = i.useState(ce), jt = z(kt, 2), un = jt[0], Bt = jt[1], St = i.useRef(!1), Kt = i.useMemo(function() {
|
|
1471
|
+
return (x === "inline" || x === "vertical") && p ? ["vertical", p] : [x, !1];
|
|
1472
|
+
}, [x, p]), Fe = z(Kt, 2), je = Fe[0], xt = Fe[1], Et = je === "inline", dn = i.useState(je), wt = z(dn, 2), pe = wt[0], Ze = wt[1], fn = i.useState(xt), tt = z(fn, 2), Vt = tt[0], Ht = tt[1];
|
|
1473
|
+
i.useEffect(function() {
|
|
1474
|
+
Ze(je), Ht(xt), St.current && (Et ? lt(un) : $t(at));
|
|
1475
|
+
}, [je, xt]);
|
|
1476
|
+
var st = i.useState(0), Gt = z(st, 2), ct = Gt[0], Wt = Gt[1], ut = ct >= Oe.length - 1 || pe !== "horizontal" || b;
|
|
1477
|
+
i.useEffect(function() {
|
|
1478
|
+
Et && Bt(ce);
|
|
1479
|
+
}, [ce]), i.useEffect(function() {
|
|
1480
|
+
return St.current = !0, function() {
|
|
1481
|
+
St.current = !1;
|
|
1482
|
+
};
|
|
1483
|
+
}, []);
|
|
1484
|
+
var qe = ei(), Ft = qe.registerPath, _t = qe.unregisterPath, nt = qe.refreshOverflowKeys, dt = qe.isSubPathKey, Pt = qe.getKeyPath, It = qe.getKeys, qt = qe.getSubPathKeys, X = i.useMemo(function() {
|
|
1485
|
+
return {
|
|
1486
|
+
registerPath: Ft,
|
|
1487
|
+
unregisterPath: _t
|
|
1488
|
+
};
|
|
1489
|
+
}, [Ft, _t]), L = i.useMemo(function() {
|
|
1490
|
+
return {
|
|
1491
|
+
isSubPathKey: dt
|
|
1492
|
+
};
|
|
1493
|
+
}, [dt]);
|
|
1494
|
+
i.useEffect(function() {
|
|
1495
|
+
nt(ut ? at : Oe.slice(ct + 1).map(function(ue) {
|
|
1496
|
+
return ue.key;
|
|
1497
|
+
}));
|
|
1498
|
+
}, [ct, ut]);
|
|
1499
|
+
var ne = bt(y || $ && ((a = Oe[0]) === null || a === void 0 ? void 0 : a.key), {
|
|
1500
|
+
value: y
|
|
1501
|
+
}), re = z(ne, 2), he = re[0], Ce = re[1], Je = Tt(function(ue) {
|
|
1502
|
+
Ce(ue);
|
|
1503
|
+
}), we = Tt(function() {
|
|
1504
|
+
Ce(void 0);
|
|
1505
|
+
});
|
|
1506
|
+
er(t, function() {
|
|
1507
|
+
return {
|
|
1508
|
+
list: Le.current,
|
|
1509
|
+
focus: function(Q) {
|
|
1510
|
+
var le, Ne = It(), Me = Pn(Ne, We), Ut = Me.elements, pn = Me.key2element, Ya = Me.element2key, qn = kn(Le.current, Ut), Un = he ?? (qn[0] ? Ya.get(qn[0]) : (le = Oe.find(function(Za) {
|
|
1511
|
+
return !Za.props.disabled;
|
|
1512
|
+
})) === null || le === void 0 ? void 0 : le.key), Nt = pn.get(Un);
|
|
1513
|
+
if (Un && Nt) {
|
|
1514
|
+
var bn;
|
|
1515
|
+
Nt == null || (bn = Nt.focus) === null || bn === void 0 || bn.call(Nt, Q);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
};
|
|
1519
|
+
});
|
|
1520
|
+
var Rt = bt(m || [], {
|
|
1521
|
+
value: W,
|
|
1522
|
+
// Legacy convert key to array
|
|
1523
|
+
postState: function(Q) {
|
|
1524
|
+
return Array.isArray(Q) ? Q : Q == null ? at : [Q];
|
|
1525
|
+
}
|
|
1526
|
+
}), Ue = z(Rt, 2), ft = Ue[0], vn = Ue[1], mn = function(Q) {
|
|
1527
|
+
if (I) {
|
|
1528
|
+
var le = Q.key, Ne = ft.includes(le), Me;
|
|
1529
|
+
G ? Ne ? Me = ft.filter(function(pn) {
|
|
1530
|
+
return pn !== le;
|
|
1531
|
+
}) : Me = [].concat(Ke(ft), [le]) : Me = [le], vn(Me);
|
|
1532
|
+
var Ut = Y(Y({}, Q), {}, {
|
|
1533
|
+
selectedKeys: Me
|
|
1534
|
+
});
|
|
1535
|
+
Ne ? F == null || F(Ut) : J == null || J(Ut);
|
|
1536
|
+
}
|
|
1537
|
+
!G && ce.length && pe !== "inline" && $t(at);
|
|
1538
|
+
}, gn = Tt(function(ue) {
|
|
1539
|
+
H == null || H(Qt(ue)), mn(ue);
|
|
1540
|
+
}), Fn = Tt(function(ue, Q) {
|
|
1541
|
+
var le = ce.filter(function(Me) {
|
|
1542
|
+
return Me !== ue;
|
|
1543
|
+
});
|
|
1544
|
+
if (Q)
|
|
1545
|
+
le.push(ue);
|
|
1546
|
+
else if (pe !== "inline") {
|
|
1547
|
+
var Ne = qt(ue);
|
|
1548
|
+
le = le.filter(function(Me) {
|
|
1549
|
+
return !Ne.has(Me);
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
pa(ce, le, !0) || $t(le, !0);
|
|
1553
|
+
}), Wa = function(Q, le) {
|
|
1554
|
+
var Ne = le ?? !ce.includes(Q);
|
|
1555
|
+
Fn(Q, Ne);
|
|
1556
|
+
}, Fa = Zr(pe, he, Ae, We, Le, It, Pt, Ce, Wa, De);
|
|
1557
|
+
i.useEffect(function() {
|
|
1558
|
+
Ge(!0);
|
|
1559
|
+
}, []);
|
|
1560
|
+
var qa = i.useMemo(function() {
|
|
1561
|
+
return {
|
|
1562
|
+
_internalRenderMenuItem: Z,
|
|
1563
|
+
_internalRenderSubMenuItem: ye
|
|
1564
|
+
};
|
|
1565
|
+
}, [Z, ye]), Ua = pe !== "horizontal" || b ? Oe : (
|
|
1566
|
+
// Need wrap for overflow dropdown that do not response for open
|
|
1567
|
+
Oe.map(function(ue, Q) {
|
|
1568
|
+
return (
|
|
1569
|
+
// Always wrap provider to avoid sub node re-mount
|
|
1570
|
+
/* @__PURE__ */ i.createElement(Dt, {
|
|
1571
|
+
key: ue.key,
|
|
1572
|
+
overflowDisabled: Q > ct
|
|
1573
|
+
}, ue)
|
|
1574
|
+
);
|
|
1575
|
+
})
|
|
1576
|
+
), Xa = /* @__PURE__ */ i.createElement(Lt, ae({
|
|
1577
|
+
id: S,
|
|
1578
|
+
ref: Le,
|
|
1579
|
+
prefixCls: "".concat(o, "-overflow"),
|
|
1580
|
+
component: "ul",
|
|
1581
|
+
itemComponent: on,
|
|
1582
|
+
className: D(o, "".concat(o, "-root"), "".concat(o, "-").concat(pe), c, B(B({}, "".concat(o, "-inline-collapsed"), Vt), "".concat(o, "-rtl"), Ae), l),
|
|
1583
|
+
dir: h,
|
|
1584
|
+
style: s,
|
|
1585
|
+
role: "menu",
|
|
1586
|
+
tabIndex: v,
|
|
1587
|
+
data: Ua,
|
|
1588
|
+
renderRawItem: function(Q) {
|
|
1589
|
+
return Q;
|
|
1590
|
+
},
|
|
1591
|
+
renderRawRest: function(Q) {
|
|
1592
|
+
var le = Q.length, Ne = le ? Oe.slice(-le) : null;
|
|
1593
|
+
return /* @__PURE__ */ i.createElement(ln, {
|
|
1594
|
+
eventKey: In,
|
|
1595
|
+
title: de,
|
|
1596
|
+
disabled: ut,
|
|
1597
|
+
internalPopupClose: le === 0,
|
|
1598
|
+
popupClassName: fe
|
|
1599
|
+
}, Ne);
|
|
1600
|
+
},
|
|
1601
|
+
maxCount: pe !== "horizontal" || b ? Lt.INVALIDATE : Lt.RESPONSIVE,
|
|
1602
|
+
ssr: "full",
|
|
1603
|
+
"data-menu-list": !0,
|
|
1604
|
+
onVisibleChange: function(Q) {
|
|
1605
|
+
Wt(Q);
|
|
1606
|
+
},
|
|
1607
|
+
onKeyDown: Fa
|
|
1608
|
+
}, He));
|
|
1609
|
+
return /* @__PURE__ */ i.createElement(An.Provider, {
|
|
1610
|
+
value: qa
|
|
1611
|
+
}, /* @__PURE__ */ i.createElement(Ea.Provider, {
|
|
1612
|
+
value: We
|
|
1613
|
+
}, /* @__PURE__ */ i.createElement(Dt, {
|
|
1614
|
+
prefixCls: o,
|
|
1615
|
+
rootClassName: l,
|
|
1616
|
+
mode: pe,
|
|
1617
|
+
openKeys: ce,
|
|
1618
|
+
rtl: Ae,
|
|
1619
|
+
disabled: C,
|
|
1620
|
+
motion: Te ? A : null,
|
|
1621
|
+
defaultMotions: Te ? K : null,
|
|
1622
|
+
activeKey: he,
|
|
1623
|
+
onActive: Je,
|
|
1624
|
+
onInactive: we,
|
|
1625
|
+
selectedKeys: ft,
|
|
1626
|
+
inlineIndent: se,
|
|
1627
|
+
subMenuOpenDelay: R,
|
|
1628
|
+
subMenuCloseDelay: M,
|
|
1629
|
+
forceSubMenuRender: O,
|
|
1630
|
+
builtinPlacements: U,
|
|
1631
|
+
triggerSubMenuAction: V,
|
|
1632
|
+
getPopupContainer: Pe,
|
|
1633
|
+
itemIcon: q,
|
|
1634
|
+
expandIcon: te,
|
|
1635
|
+
onItemClick: gn,
|
|
1636
|
+
onOpenChange: Fn
|
|
1637
|
+
}, /* @__PURE__ */ i.createElement(Ra.Provider, {
|
|
1638
|
+
value: L
|
|
1639
|
+
}, Xa), /* @__PURE__ */ i.createElement("div", {
|
|
1640
|
+
style: {
|
|
1641
|
+
display: "none"
|
|
1642
|
+
},
|
|
1643
|
+
"aria-hidden": !0
|
|
1644
|
+
}, /* @__PURE__ */ i.createElement(Pa.Provider, {
|
|
1645
|
+
value: X
|
|
1646
|
+
}, xe)))));
|
|
1647
|
+
}), At = Ei;
|
|
1648
|
+
At.Item = on;
|
|
1649
|
+
At.SubMenu = ln;
|
|
1650
|
+
At.ItemGroup = Vn;
|
|
1651
|
+
At.Divider = Da;
|
|
1652
|
+
var wi = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" }, _i = function(t, a) {
|
|
1653
|
+
return /* @__PURE__ */ i.createElement(xa, ae({}, t, {
|
|
1654
|
+
ref: a,
|
|
1655
|
+
icon: wi
|
|
1656
|
+
}));
|
|
1657
|
+
}, za = /* @__PURE__ */ i.forwardRef(_i);
|
|
1658
|
+
process.env.NODE_ENV !== "production" && (za.displayName = "EllipsisOutlined");
|
|
1659
|
+
var Pi = { 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" }, Ii = function(t, a) {
|
|
1660
|
+
return /* @__PURE__ */ i.createElement(xa, ae({}, t, {
|
|
1661
|
+
ref: a,
|
|
1662
|
+
icon: Pi
|
|
1663
|
+
}));
|
|
1664
|
+
}, Aa = /* @__PURE__ */ i.forwardRef(Ii);
|
|
1665
|
+
process.env.NODE_ENV !== "production" && (Aa.displayName = "PlusOutlined");
|
|
1666
|
+
const sn = /* @__PURE__ */ tr(null);
|
|
1667
|
+
var Ri = function(t) {
|
|
1668
|
+
var a = t.activeTabOffset, n = t.horizontal, r = t.rtl, o = t.indicator, l = o === void 0 ? {} : o, s = l.size, c = l.align, u = c === void 0 ? "center" : c, v = be(), d = z(v, 2), f = d[0], h = d[1], S = ve(), g = _e.useCallback(function(p) {
|
|
1669
|
+
return typeof s == "function" ? s(p) : typeof s == "number" ? s : p;
|
|
1670
|
+
}, [s]);
|
|
1671
|
+
function x() {
|
|
1672
|
+
Qe.cancel(S.current);
|
|
1673
|
+
}
|
|
1674
|
+
return Be(function() {
|
|
1675
|
+
var p = {};
|
|
1676
|
+
if (a)
|
|
1677
|
+
if (n) {
|
|
1678
|
+
p.width = g(a.width);
|
|
1679
|
+
var C = r ? "right" : "left";
|
|
1680
|
+
u === "start" && (p[C] = a[C]), u === "center" && (p[C] = a[C] + a.width / 2, p.transform = r ? "translateX(50%)" : "translateX(-50%)"), u === "end" && (p[C] = a[C] + a.width, p.transform = "translateX(-100%)");
|
|
1681
|
+
} else
|
|
1682
|
+
p.height = g(a.height), u === "start" && (p.top = a.top), u === "center" && (p.top = a.top + a.height / 2, p.transform = "translateY(-50%)"), u === "end" && (p.top = a.top + a.height, p.transform = "translateY(-100%)");
|
|
1683
|
+
return x(), S.current = Qe(function() {
|
|
1684
|
+
h(p);
|
|
1685
|
+
}), x;
|
|
1686
|
+
}, [a, n, r, u, g]), {
|
|
1687
|
+
style: f
|
|
1688
|
+
};
|
|
1689
|
+
}, aa = {
|
|
1690
|
+
width: 0,
|
|
1691
|
+
height: 0,
|
|
1692
|
+
left: 0,
|
|
1693
|
+
top: 0
|
|
1694
|
+
};
|
|
1695
|
+
function Ni(e, t, a) {
|
|
1696
|
+
return Mn(function() {
|
|
1697
|
+
for (var n, r = /* @__PURE__ */ new Map(), o = t.get((n = e[0]) === null || n === void 0 ? void 0 : n.key) || aa, l = o.left + o.width, s = 0; s < e.length; s += 1) {
|
|
1698
|
+
var c = e[s].key, u = t.get(c);
|
|
1699
|
+
if (!u) {
|
|
1700
|
+
var v;
|
|
1701
|
+
u = t.get((v = e[s - 1]) === null || v === void 0 ? void 0 : v.key) || aa;
|
|
1702
|
+
}
|
|
1703
|
+
var d = r.get(c) || Y({}, u);
|
|
1704
|
+
d.right = l - d.left - d.width, r.set(c, d);
|
|
1705
|
+
}
|
|
1706
|
+
return r;
|
|
1707
|
+
}, [e.map(function(n) {
|
|
1708
|
+
return n.key;
|
|
1709
|
+
}).join("_"), t, a]);
|
|
1710
|
+
}
|
|
1711
|
+
function ra(e, t) {
|
|
1712
|
+
var a = i.useRef(e), n = i.useState({}), r = z(n, 2), o = r[1];
|
|
1713
|
+
function l(s) {
|
|
1714
|
+
var c = typeof s == "function" ? s(a.current) : s;
|
|
1715
|
+
c !== a.current && t(c, a.current), a.current = c, o({});
|
|
1716
|
+
}
|
|
1717
|
+
return [a.current, l];
|
|
1718
|
+
}
|
|
1719
|
+
var Mi = 0.1, ia = 0.01, Jt = 20, oa = Math.pow(0.995, Jt);
|
|
1720
|
+
function Oi(e, t) {
|
|
1721
|
+
var a = be(), n = z(a, 2), r = n[0], o = n[1], l = be(0), s = z(l, 2), c = s[0], u = s[1], v = be(0), d = z(v, 2), f = d[0], h = d[1], S = be(), g = z(S, 2), x = g[0], p = g[1], C = ve();
|
|
1722
|
+
function b(E) {
|
|
1723
|
+
var T = E.touches[0], y = T.screenX, $ = T.screenY;
|
|
1724
|
+
o({
|
|
1725
|
+
x: y,
|
|
1726
|
+
y: $
|
|
1727
|
+
}), window.clearInterval(C.current);
|
|
1728
|
+
}
|
|
1729
|
+
function _(E) {
|
|
1730
|
+
if (r) {
|
|
1731
|
+
var T = E.touches[0], y = T.screenX, $ = T.screenY;
|
|
1732
|
+
o({
|
|
1733
|
+
x: y,
|
|
1734
|
+
y: $
|
|
1735
|
+
});
|
|
1736
|
+
var N = y - r.x, I = $ - r.y;
|
|
1737
|
+
t(N, I);
|
|
1738
|
+
var j = Date.now();
|
|
1739
|
+
u(j), h(j - c), p({
|
|
1740
|
+
x: N,
|
|
1741
|
+
y: I
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
function R() {
|
|
1746
|
+
if (r && (o(null), p(null), x)) {
|
|
1747
|
+
var E = x.x / f, T = x.y / f, y = Math.abs(E), $ = Math.abs(T);
|
|
1748
|
+
if (Math.max(y, $) < Mi) return;
|
|
1749
|
+
var N = E, I = T;
|
|
1750
|
+
C.current = window.setInterval(function() {
|
|
1751
|
+
if (Math.abs(N) < ia && Math.abs(I) < ia) {
|
|
1752
|
+
window.clearInterval(C.current);
|
|
1753
|
+
return;
|
|
1754
|
+
}
|
|
1755
|
+
N *= oa, I *= oa, t(N * Jt, I * Jt);
|
|
1756
|
+
}, Jt);
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
var P = ve();
|
|
1760
|
+
function M(E) {
|
|
1761
|
+
var T = E.deltaX, y = E.deltaY, $ = 0, N = Math.abs(T), I = Math.abs(y);
|
|
1762
|
+
N === I ? $ = P.current === "x" ? T : y : N > I ? ($ = T, P.current = "x") : ($ = y, P.current = "y"), t(-$, -$) && E.preventDefault();
|
|
1763
|
+
}
|
|
1764
|
+
var O = ve(null);
|
|
1765
|
+
O.current = {
|
|
1766
|
+
onTouchStart: b,
|
|
1767
|
+
onTouchMove: _,
|
|
1768
|
+
onTouchEnd: R,
|
|
1769
|
+
onWheel: M
|
|
1770
|
+
}, i.useEffect(function() {
|
|
1771
|
+
function E(N) {
|
|
1772
|
+
O.current.onTouchStart(N);
|
|
1773
|
+
}
|
|
1774
|
+
function T(N) {
|
|
1775
|
+
O.current.onTouchMove(N);
|
|
1776
|
+
}
|
|
1777
|
+
function y(N) {
|
|
1778
|
+
O.current.onTouchEnd(N);
|
|
1779
|
+
}
|
|
1780
|
+
function $(N) {
|
|
1781
|
+
O.current.onWheel(N);
|
|
1782
|
+
}
|
|
1783
|
+
return document.addEventListener("touchmove", T, {
|
|
1784
|
+
passive: !1
|
|
1785
|
+
}), document.addEventListener("touchend", y, {
|
|
1786
|
+
passive: !0
|
|
1787
|
+
}), e.current.addEventListener("touchstart", E, {
|
|
1788
|
+
passive: !0
|
|
1789
|
+
}), e.current.addEventListener("wheel", $, {
|
|
1790
|
+
passive: !1
|
|
1791
|
+
}), function() {
|
|
1792
|
+
document.removeEventListener("touchmove", T), document.removeEventListener("touchend", y);
|
|
1793
|
+
};
|
|
1794
|
+
}, []);
|
|
1795
|
+
}
|
|
1796
|
+
function ka(e) {
|
|
1797
|
+
var t = be(0), a = z(t, 2), n = a[0], r = a[1], o = ve(0), l = ve();
|
|
1798
|
+
return l.current = e, lr(function() {
|
|
1799
|
+
var s;
|
|
1800
|
+
(s = l.current) === null || s === void 0 || s.call(l);
|
|
1801
|
+
}, [n]), function() {
|
|
1802
|
+
o.current === n && (o.current += 1, r(o.current));
|
|
1803
|
+
};
|
|
1804
|
+
}
|
|
1805
|
+
function Ti(e) {
|
|
1806
|
+
var t = ve([]), a = be({}), n = z(a, 2), r = n[1], o = ve(typeof e == "function" ? e() : e), l = ka(function() {
|
|
1807
|
+
var c = o.current;
|
|
1808
|
+
t.current.forEach(function(u) {
|
|
1809
|
+
c = u(c);
|
|
1810
|
+
}), t.current = [], o.current = c, r({});
|
|
1811
|
+
});
|
|
1812
|
+
function s(c) {
|
|
1813
|
+
t.current.push(c), l();
|
|
1814
|
+
}
|
|
1815
|
+
return [o.current, s];
|
|
1816
|
+
}
|
|
1817
|
+
var la = {
|
|
1818
|
+
width: 0,
|
|
1819
|
+
height: 0,
|
|
1820
|
+
left: 0,
|
|
1821
|
+
top: 0,
|
|
1822
|
+
right: 0
|
|
1823
|
+
};
|
|
1824
|
+
function Li(e, t, a, n, r, o, l) {
|
|
1825
|
+
var s = l.tabs, c = l.tabPosition, u = l.rtl, v, d, f;
|
|
1826
|
+
return ["top", "bottom"].includes(c) ? (v = "width", d = u ? "right" : "left", f = Math.abs(a)) : (v = "height", d = "top", f = -a), Mn(function() {
|
|
1827
|
+
if (!s.length)
|
|
1828
|
+
return [0, 0];
|
|
1829
|
+
for (var h = s.length, S = h, g = 0; g < h; g += 1) {
|
|
1830
|
+
var x = e.get(s[g].key) || la;
|
|
1831
|
+
if (Math.floor(x[d] + x[v]) > Math.floor(f + t)) {
|
|
1832
|
+
S = g - 1;
|
|
1833
|
+
break;
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
for (var p = 0, C = h - 1; C >= 0; C -= 1) {
|
|
1837
|
+
var b = e.get(s[C].key) || la;
|
|
1838
|
+
if (b[d] < f) {
|
|
1839
|
+
p = C + 1;
|
|
1840
|
+
break;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
return p >= S ? [0, 0] : [p, S];
|
|
1844
|
+
}, [e, t, n, r, o, f, c, s.map(function(h) {
|
|
1845
|
+
return h.key;
|
|
1846
|
+
}).join("_"), u]);
|
|
1847
|
+
}
|
|
1848
|
+
function sa(e) {
|
|
1849
|
+
var t;
|
|
1850
|
+
return e instanceof Map ? (t = {}, e.forEach(function(a, n) {
|
|
1851
|
+
t[n] = a;
|
|
1852
|
+
})) : t = e, JSON.stringify(t);
|
|
1853
|
+
}
|
|
1854
|
+
var Di = "TABS_DQ";
|
|
1855
|
+
function ja(e) {
|
|
1856
|
+
return String(e).replace(/"/g, Di);
|
|
1857
|
+
}
|
|
1858
|
+
function Hn(e, t, a, n) {
|
|
1859
|
+
return (
|
|
1860
|
+
// Only editable tabs can be removed
|
|
1861
|
+
!(!a || // Tabs cannot be removed when disabled
|
|
1862
|
+
n || // closable is false
|
|
1863
|
+
e === !1 || // If closable is undefined, the remove button should be hidden when closeIcon is null or false
|
|
1864
|
+
e === void 0 && (t === !1 || t === null))
|
|
1865
|
+
);
|
|
1866
|
+
}
|
|
1867
|
+
var Ba = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
1868
|
+
var a = e.prefixCls, n = e.editable, r = e.locale, o = e.style;
|
|
1869
|
+
return !n || n.showAdd === !1 ? null : /* @__PURE__ */ i.createElement("button", {
|
|
1870
|
+
ref: t,
|
|
1871
|
+
type: "button",
|
|
1872
|
+
className: "".concat(a, "-nav-add"),
|
|
1873
|
+
style: o,
|
|
1874
|
+
"aria-label": (r == null ? void 0 : r.addAriaLabel) || "Add tab",
|
|
1875
|
+
onClick: function(s) {
|
|
1876
|
+
n.onEdit("add", {
|
|
1877
|
+
event: s
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
}, n.addIcon || "+");
|
|
1881
|
+
}), Nn = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
1882
|
+
var a = e.position, n = e.prefixCls, r = e.extra;
|
|
1883
|
+
if (!r)
|
|
1884
|
+
return null;
|
|
1885
|
+
var o, l = {};
|
|
1886
|
+
return en(r) === "object" && !/* @__PURE__ */ i.isValidElement(r) ? l = r : l.right = r, a === "right" && (o = l.right), a === "left" && (o = l.left), o ? /* @__PURE__ */ i.createElement("div", {
|
|
1887
|
+
className: "".concat(n, "-extra-content"),
|
|
1888
|
+
ref: t
|
|
1889
|
+
}, o) : null;
|
|
1890
|
+
});
|
|
1891
|
+
process.env.NODE_ENV !== "production" && (Nn.displayName = "ExtraContent");
|
|
1892
|
+
var zi = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
1893
|
+
var a = e.prefixCls, n = e.id, r = e.tabs, o = e.locale, l = e.mobile, s = e.more, c = s === void 0 ? {} : s, u = e.style, v = e.className, d = e.editable, f = e.tabBarGutter, h = e.rtl, S = e.removeAriaLabel, g = e.onTabClick, x = e.getPopupContainer, p = e.popupClassName, C = be(!1), b = z(C, 2), _ = b[0], R = b[1], P = be(null), M = z(P, 2), O = M[0], E = M[1], T = c.icon, y = T === void 0 ? "More" : T, $ = "".concat(n, "-more-popup"), N = "".concat(a, "-dropdown"), I = O !== null ? "".concat($, "-").concat(O) : null, j = o == null ? void 0 : o.dropdownAriaLabel;
|
|
1894
|
+
function G(A, K) {
|
|
1895
|
+
A.preventDefault(), A.stopPropagation(), d.onEdit("remove", {
|
|
1896
|
+
key: K,
|
|
1897
|
+
event: A
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
var m = /* @__PURE__ */ i.createElement(At, {
|
|
1901
|
+
onClick: function(K) {
|
|
1902
|
+
var k = K.key, V = K.domEvent;
|
|
1903
|
+
g(k, V), R(!1);
|
|
1904
|
+
},
|
|
1905
|
+
prefixCls: "".concat(N, "-menu"),
|
|
1906
|
+
id: $,
|
|
1907
|
+
tabIndex: -1,
|
|
1908
|
+
role: "listbox",
|
|
1909
|
+
"aria-activedescendant": I,
|
|
1910
|
+
selectedKeys: [O],
|
|
1911
|
+
"aria-label": j !== void 0 ? j : "expanded dropdown"
|
|
1912
|
+
}, r.map(function(A) {
|
|
1913
|
+
var K = A.closable, k = A.disabled, V = A.closeIcon, U = A.key, q = A.label, te = Hn(K, V, d, k);
|
|
1914
|
+
return /* @__PURE__ */ i.createElement(on, {
|
|
1915
|
+
key: U,
|
|
1916
|
+
id: "".concat($, "-").concat(U),
|
|
1917
|
+
role: "option",
|
|
1918
|
+
"aria-controls": n && "".concat(n, "-panel-").concat(U),
|
|
1919
|
+
disabled: k
|
|
1920
|
+
}, /* @__PURE__ */ i.createElement("span", null, q), te && /* @__PURE__ */ i.createElement("button", {
|
|
1921
|
+
type: "button",
|
|
1922
|
+
"aria-label": S || "remove",
|
|
1923
|
+
tabIndex: 0,
|
|
1924
|
+
className: "".concat(N, "-menu-item-remove"),
|
|
1925
|
+
onClick: function(de) {
|
|
1926
|
+
de.stopPropagation(), G(de, U);
|
|
1927
|
+
}
|
|
1928
|
+
}, V || d.removeIcon || "×"));
|
|
1929
|
+
}));
|
|
1930
|
+
function W(A) {
|
|
1931
|
+
for (var K = r.filter(function(te) {
|
|
1932
|
+
return !te.disabled;
|
|
1933
|
+
}), k = K.findIndex(function(te) {
|
|
1934
|
+
return te.key === O;
|
|
1935
|
+
}) || 0, V = K.length, U = 0; U < V; U += 1) {
|
|
1936
|
+
k = (k + A + V) % V;
|
|
1937
|
+
var q = K[k];
|
|
1938
|
+
if (!q.disabled) {
|
|
1939
|
+
E(q.key);
|
|
1940
|
+
return;
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
function J(A) {
|
|
1945
|
+
var K = A.which;
|
|
1946
|
+
if (!_) {
|
|
1947
|
+
[ge.DOWN, ge.SPACE, ge.ENTER].includes(K) && (R(!0), A.preventDefault());
|
|
1948
|
+
return;
|
|
1949
|
+
}
|
|
1950
|
+
switch (K) {
|
|
1951
|
+
case ge.UP:
|
|
1952
|
+
W(-1), A.preventDefault();
|
|
1953
|
+
break;
|
|
1954
|
+
case ge.DOWN:
|
|
1955
|
+
W(1), A.preventDefault();
|
|
1956
|
+
break;
|
|
1957
|
+
case ge.ESC:
|
|
1958
|
+
R(!1);
|
|
1959
|
+
break;
|
|
1960
|
+
case ge.SPACE:
|
|
1961
|
+
case ge.ENTER:
|
|
1962
|
+
O !== null && g(O, A);
|
|
1963
|
+
break;
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
Be(function() {
|
|
1967
|
+
var A = document.getElementById(I);
|
|
1968
|
+
A && A.scrollIntoView && A.scrollIntoView(!1);
|
|
1969
|
+
}, [O]), Be(function() {
|
|
1970
|
+
_ || E(null);
|
|
1971
|
+
}, [_]);
|
|
1972
|
+
var F = B({}, h ? "marginRight" : "marginLeft", f);
|
|
1973
|
+
r.length || (F.visibility = "hidden", F.order = 1);
|
|
1974
|
+
var ee = D(B({}, "".concat(N, "-rtl"), h)), se = l ? null : /* @__PURE__ */ i.createElement(Hr, ae({
|
|
1975
|
+
prefixCls: N,
|
|
1976
|
+
overlay: m,
|
|
1977
|
+
visible: r.length ? _ : !1,
|
|
1978
|
+
onVisibleChange: R,
|
|
1979
|
+
overlayClassName: D(ee, p),
|
|
1980
|
+
mouseEnterDelay: 0.1,
|
|
1981
|
+
mouseLeaveDelay: 0.1,
|
|
1982
|
+
getPopupContainer: x
|
|
1983
|
+
}, c), /* @__PURE__ */ i.createElement("button", {
|
|
1984
|
+
type: "button",
|
|
1985
|
+
className: "".concat(a, "-nav-more"),
|
|
1986
|
+
style: F,
|
|
1987
|
+
tabIndex: -1,
|
|
1988
|
+
"aria-hidden": "true",
|
|
1989
|
+
"aria-haspopup": "listbox",
|
|
1990
|
+
"aria-controls": $,
|
|
1991
|
+
id: "".concat(n, "-more"),
|
|
1992
|
+
"aria-expanded": _,
|
|
1993
|
+
onKeyDown: J
|
|
1994
|
+
}, y));
|
|
1995
|
+
return /* @__PURE__ */ i.createElement("div", {
|
|
1996
|
+
className: D("".concat(a, "-nav-operations"), v),
|
|
1997
|
+
style: u,
|
|
1998
|
+
ref: t
|
|
1999
|
+
}, se, /* @__PURE__ */ i.createElement(Ba, {
|
|
2000
|
+
prefixCls: a,
|
|
2001
|
+
locale: o,
|
|
2002
|
+
editable: d
|
|
2003
|
+
}));
|
|
2004
|
+
});
|
|
2005
|
+
const Ai = /* @__PURE__ */ i.memo(zi, function(e, t) {
|
|
2006
|
+
return (
|
|
2007
|
+
// https://github.com/ant-design/ant-design/issues/32544
|
|
2008
|
+
// We'd better remove syntactic sugar in `rc-menu` since this has perf issue
|
|
2009
|
+
t.tabMoving
|
|
2010
|
+
);
|
|
2011
|
+
});
|
|
2012
|
+
var ki = function(t) {
|
|
2013
|
+
var a = t.prefixCls, n = t.id, r = t.active, o = t.focus, l = t.tab, s = l.key, c = l.label, u = l.disabled, v = l.closeIcon, d = l.icon, f = t.closable, h = t.renderWrapper, S = t.removeAriaLabel, g = t.editable, x = t.onClick, p = t.onFocus, C = t.onBlur, b = t.onKeyDown, _ = t.onMouseDown, R = t.onMouseUp, P = t.style, M = t.tabCount, O = t.currentPosition, E = "".concat(a, "-tab"), T = Hn(f, v, g, u);
|
|
2014
|
+
function y(G) {
|
|
2015
|
+
u || x(G);
|
|
2016
|
+
}
|
|
2017
|
+
function $(G) {
|
|
2018
|
+
G.preventDefault(), G.stopPropagation(), g.onEdit("remove", {
|
|
2019
|
+
key: s,
|
|
2020
|
+
event: G
|
|
2021
|
+
});
|
|
2022
|
+
}
|
|
2023
|
+
var N = i.useMemo(function() {
|
|
2024
|
+
return d && typeof c == "string" ? /* @__PURE__ */ i.createElement("span", null, c) : c;
|
|
2025
|
+
}, [c, d]), I = i.useRef(null);
|
|
2026
|
+
i.useEffect(function() {
|
|
2027
|
+
o && I.current && I.current.focus();
|
|
2028
|
+
}, [o]);
|
|
2029
|
+
var j = /* @__PURE__ */ i.createElement("div", {
|
|
2030
|
+
key: s,
|
|
2031
|
+
"data-node-key": ja(s),
|
|
2032
|
+
className: D(E, B(B(B(B({}, "".concat(E, "-with-remove"), T), "".concat(E, "-active"), r), "".concat(E, "-disabled"), u), "".concat(E, "-focus"), o)),
|
|
2033
|
+
style: P,
|
|
2034
|
+
onClick: y
|
|
2035
|
+
}, /* @__PURE__ */ i.createElement("div", {
|
|
2036
|
+
ref: I,
|
|
2037
|
+
role: "tab",
|
|
2038
|
+
"aria-selected": r,
|
|
2039
|
+
id: n && "".concat(n, "-tab-").concat(s),
|
|
2040
|
+
className: "".concat(E, "-btn"),
|
|
2041
|
+
"aria-controls": n && "".concat(n, "-panel-").concat(s),
|
|
2042
|
+
"aria-disabled": u,
|
|
2043
|
+
tabIndex: u ? null : r ? 0 : -1,
|
|
2044
|
+
onClick: function(m) {
|
|
2045
|
+
m.stopPropagation(), y(m);
|
|
2046
|
+
},
|
|
2047
|
+
onKeyDown: b,
|
|
2048
|
+
onMouseDown: _,
|
|
2049
|
+
onMouseUp: R,
|
|
2050
|
+
onFocus: p,
|
|
2051
|
+
onBlur: C
|
|
2052
|
+
}, o && /* @__PURE__ */ i.createElement("div", {
|
|
2053
|
+
"aria-live": "polite",
|
|
2054
|
+
style: {
|
|
2055
|
+
width: 0,
|
|
2056
|
+
height: 0,
|
|
2057
|
+
position: "absolute",
|
|
2058
|
+
overflow: "hidden",
|
|
2059
|
+
opacity: 0
|
|
2060
|
+
}
|
|
2061
|
+
}, "Tab ".concat(O, " of ").concat(M)), d && /* @__PURE__ */ i.createElement("span", {
|
|
2062
|
+
className: "".concat(E, "-icon")
|
|
2063
|
+
}, d), c && N), T && /* @__PURE__ */ i.createElement("button", {
|
|
2064
|
+
type: "button",
|
|
2065
|
+
"aria-label": S || "remove",
|
|
2066
|
+
tabIndex: r ? 0 : -1,
|
|
2067
|
+
className: "".concat(E, "-remove"),
|
|
2068
|
+
onClick: function(m) {
|
|
2069
|
+
m.stopPropagation(), $(m);
|
|
2070
|
+
}
|
|
2071
|
+
}, v || g.removeIcon || "×"));
|
|
2072
|
+
return h ? h(j) : j;
|
|
2073
|
+
}, ji = function(t, a) {
|
|
2074
|
+
var n = t.offsetWidth, r = t.offsetHeight, o = t.offsetTop, l = t.offsetLeft, s = t.getBoundingClientRect(), c = s.width, u = s.height, v = s.left, d = s.top;
|
|
2075
|
+
return Math.abs(c - n) < 1 ? [c, u, v - a.left, d - a.top] : [n, r, l, o];
|
|
2076
|
+
}, pt = function(t) {
|
|
2077
|
+
var a = t.current || {}, n = a.offsetWidth, r = n === void 0 ? 0 : n, o = a.offsetHeight, l = o === void 0 ? 0 : o;
|
|
2078
|
+
if (t.current) {
|
|
2079
|
+
var s = t.current.getBoundingClientRect(), c = s.width, u = s.height;
|
|
2080
|
+
if (Math.abs(c - r) < 1)
|
|
2081
|
+
return [c, u];
|
|
2082
|
+
}
|
|
2083
|
+
return [r, l];
|
|
2084
|
+
}, Xt = function(t, a) {
|
|
2085
|
+
return t[a ? 0 : 1];
|
|
2086
|
+
}, ca = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
2087
|
+
var a = e.className, n = e.style, r = e.id, o = e.animated, l = e.activeKey, s = e.rtl, c = e.extra, u = e.editable, v = e.locale, d = e.tabPosition, f = e.tabBarGutter, h = e.children, S = e.onTabClick, g = e.onTabScroll, x = e.indicator, p = i.useContext(sn), C = p.prefixCls, b = p.tabs, _ = ve(null), R = ve(null), P = ve(null), M = ve(null), O = ve(null), E = ve(null), T = ve(null), y = d === "top" || d === "bottom", $ = ra(0, function(X, L) {
|
|
2088
|
+
y && g && g({
|
|
2089
|
+
direction: X > L ? "left" : "right"
|
|
2090
|
+
});
|
|
2091
|
+
}), N = z($, 2), I = N[0], j = N[1], G = ra(0, function(X, L) {
|
|
2092
|
+
!y && g && g({
|
|
2093
|
+
direction: X > L ? "top" : "bottom"
|
|
2094
|
+
});
|
|
2095
|
+
}), m = z(G, 2), W = m[0], J = m[1], F = be([0, 0]), ee = z(F, 2), se = ee[0], A = ee[1], K = be([0, 0]), k = z(K, 2), V = k[0], U = k[1], q = be([0, 0]), te = z(q, 2), ie = te[0], de = te[1], fe = be([0, 0]), Pe = z(fe, 2), H = Pe[0], me = Pe[1], De = Ti(/* @__PURE__ */ new Map()), Xe = z(De, 2), oe = Xe[0], Z = Xe[1], ye = Ni(b, oe, V[0]), Ie = Xt(se, y), He = Xt(V, y), et = Xt(ie, y), Ye = Xt(H, y), Oe = Math.floor(Ie) < Math.floor(He + et), xe = Oe ? Ie - Ye : Ie - et, Ct = "".concat(C, "-nav-operations-hidden"), Re = 0, Te = 0;
|
|
2096
|
+
y && s ? (Re = 0, Te = Math.max(0, He - xe)) : (Re = Math.min(0, xe - He), Te = 0);
|
|
2097
|
+
function Ge(X) {
|
|
2098
|
+
return X < Re ? Re : X > Te ? Te : X;
|
|
2099
|
+
}
|
|
2100
|
+
var Le = ve(null), We = be(), Ae = z(We, 2), ke = Ae[0], Ee = Ae[1];
|
|
2101
|
+
function ce() {
|
|
2102
|
+
Ee(Date.now());
|
|
2103
|
+
}
|
|
2104
|
+
function lt() {
|
|
2105
|
+
Le.current && clearTimeout(Le.current);
|
|
2106
|
+
}
|
|
2107
|
+
Oi(M, function(X, L) {
|
|
2108
|
+
function ne(re, he) {
|
|
2109
|
+
re(function(Ce) {
|
|
2110
|
+
var Je = Ge(Ce + he);
|
|
2111
|
+
return Je;
|
|
2112
|
+
});
|
|
2113
|
+
}
|
|
2114
|
+
return Oe ? (y ? ne(j, X) : ne(J, L), lt(), ce(), !0) : !1;
|
|
2115
|
+
}), Be(function() {
|
|
2116
|
+
return lt(), ke && (Le.current = setTimeout(function() {
|
|
2117
|
+
Ee(0);
|
|
2118
|
+
}, 100)), lt;
|
|
2119
|
+
}, [ke]);
|
|
2120
|
+
var $t = Li(
|
|
2121
|
+
ye,
|
|
2122
|
+
// Container
|
|
2123
|
+
xe,
|
|
2124
|
+
// Transform
|
|
2125
|
+
y ? I : W,
|
|
2126
|
+
// Tabs
|
|
2127
|
+
He,
|
|
2128
|
+
// Add
|
|
2129
|
+
et,
|
|
2130
|
+
// Operation
|
|
2131
|
+
Ye,
|
|
2132
|
+
Y(Y({}, e), {}, {
|
|
2133
|
+
tabs: b
|
|
2134
|
+
})
|
|
2135
|
+
), kt = z($t, 2), jt = kt[0], un = kt[1], Bt = sr(function() {
|
|
2136
|
+
var X = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : l, L = ye.get(X) || {
|
|
2137
|
+
width: 0,
|
|
2138
|
+
height: 0,
|
|
2139
|
+
left: 0,
|
|
2140
|
+
right: 0,
|
|
2141
|
+
top: 0
|
|
2142
|
+
};
|
|
2143
|
+
if (y) {
|
|
2144
|
+
var ne = I;
|
|
2145
|
+
s ? L.right < I ? ne = L.right : L.right + L.width > I + xe && (ne = L.right + L.width - xe) : L.left < -I ? ne = -L.left : L.left + L.width > -I + xe && (ne = -(L.left + L.width - xe)), J(0), j(Ge(ne));
|
|
2146
|
+
} else {
|
|
2147
|
+
var re = W;
|
|
2148
|
+
L.top < -W ? re = -L.top : L.top + L.height > -W + xe && (re = -(L.top + L.height - xe)), j(0), J(Ge(re));
|
|
2149
|
+
}
|
|
2150
|
+
}), St = be(), Kt = z(St, 2), Fe = Kt[0], je = Kt[1], xt = be(!1), Et = z(xt, 2), dn = Et[0], wt = Et[1], pe = b.filter(function(X) {
|
|
2151
|
+
return !X.disabled;
|
|
2152
|
+
}).map(function(X) {
|
|
2153
|
+
return X.key;
|
|
2154
|
+
}), Ze = function(L) {
|
|
2155
|
+
var ne = pe.indexOf(Fe || l), re = pe.length, he = (ne + L + re) % re, Ce = pe[he];
|
|
2156
|
+
je(Ce);
|
|
2157
|
+
}, fn = function(L) {
|
|
2158
|
+
var ne = L.code, re = s && y, he = pe[0], Ce = pe[pe.length - 1];
|
|
2159
|
+
switch (ne) {
|
|
2160
|
+
case "ArrowLeft": {
|
|
2161
|
+
y && Ze(re ? 1 : -1);
|
|
2162
|
+
break;
|
|
2163
|
+
}
|
|
2164
|
+
case "ArrowRight": {
|
|
2165
|
+
y && Ze(re ? -1 : 1);
|
|
2166
|
+
break;
|
|
2167
|
+
}
|
|
2168
|
+
case "ArrowUp": {
|
|
2169
|
+
L.preventDefault(), y || Ze(-1);
|
|
2170
|
+
break;
|
|
2171
|
+
}
|
|
2172
|
+
case "ArrowDown": {
|
|
2173
|
+
L.preventDefault(), y || Ze(1);
|
|
2174
|
+
break;
|
|
2175
|
+
}
|
|
2176
|
+
case "Home": {
|
|
2177
|
+
L.preventDefault(), je(he);
|
|
2178
|
+
break;
|
|
2179
|
+
}
|
|
2180
|
+
case "End": {
|
|
2181
|
+
L.preventDefault(), je(Ce);
|
|
2182
|
+
break;
|
|
2183
|
+
}
|
|
2184
|
+
case "Enter":
|
|
2185
|
+
case "Space": {
|
|
2186
|
+
L.preventDefault(), S(Fe, L);
|
|
2187
|
+
break;
|
|
2188
|
+
}
|
|
2189
|
+
case "Backspace":
|
|
2190
|
+
case "Delete": {
|
|
2191
|
+
var Je = pe.indexOf(Fe), we = b.find(function(Ue) {
|
|
2192
|
+
return Ue.key === Fe;
|
|
2193
|
+
}), Rt = Hn(we == null ? void 0 : we.closable, we == null ? void 0 : we.closeIcon, u, we == null ? void 0 : we.disabled);
|
|
2194
|
+
Rt && (L.preventDefault(), L.stopPropagation(), u.onEdit("remove", {
|
|
2195
|
+
key: Fe,
|
|
2196
|
+
event: L
|
|
2197
|
+
}), Je === pe.length - 1 ? Ze(-1) : Ze(1));
|
|
2198
|
+
break;
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
}, tt = {};
|
|
2202
|
+
y ? tt[s ? "marginRight" : "marginLeft"] = f : tt.marginTop = f;
|
|
2203
|
+
var Vt = b.map(function(X, L) {
|
|
2204
|
+
var ne = X.key;
|
|
2205
|
+
return /* @__PURE__ */ i.createElement(ki, {
|
|
2206
|
+
id: r,
|
|
2207
|
+
prefixCls: C,
|
|
2208
|
+
key: ne,
|
|
2209
|
+
tab: X,
|
|
2210
|
+
style: L === 0 ? void 0 : tt,
|
|
2211
|
+
closable: X.closable,
|
|
2212
|
+
editable: u,
|
|
2213
|
+
active: ne === l,
|
|
2214
|
+
focus: ne === Fe,
|
|
2215
|
+
renderWrapper: h,
|
|
2216
|
+
removeAriaLabel: v == null ? void 0 : v.removeAriaLabel,
|
|
2217
|
+
tabCount: pe.length,
|
|
2218
|
+
currentPosition: L + 1,
|
|
2219
|
+
onClick: function(he) {
|
|
2220
|
+
S(ne, he);
|
|
2221
|
+
},
|
|
2222
|
+
onKeyDown: fn,
|
|
2223
|
+
onFocus: function() {
|
|
2224
|
+
dn || je(ne), Bt(ne), ce(), M.current && (s || (M.current.scrollLeft = 0), M.current.scrollTop = 0);
|
|
2225
|
+
},
|
|
2226
|
+
onBlur: function() {
|
|
2227
|
+
je(void 0);
|
|
2228
|
+
},
|
|
2229
|
+
onMouseDown: function() {
|
|
2230
|
+
wt(!0);
|
|
2231
|
+
},
|
|
2232
|
+
onMouseUp: function() {
|
|
2233
|
+
wt(!1);
|
|
2234
|
+
}
|
|
2235
|
+
});
|
|
2236
|
+
}), Ht = function() {
|
|
2237
|
+
return Z(function() {
|
|
2238
|
+
var L, ne = /* @__PURE__ */ new Map(), re = (L = O.current) === null || L === void 0 ? void 0 : L.getBoundingClientRect();
|
|
2239
|
+
return b.forEach(function(he) {
|
|
2240
|
+
var Ce, Je = he.key, we = (Ce = O.current) === null || Ce === void 0 ? void 0 : Ce.querySelector('[data-node-key="'.concat(ja(Je), '"]'));
|
|
2241
|
+
if (we) {
|
|
2242
|
+
var Rt = ji(we, re), Ue = z(Rt, 4), ft = Ue[0], vn = Ue[1], mn = Ue[2], gn = Ue[3];
|
|
2243
|
+
ne.set(Je, {
|
|
2244
|
+
width: ft,
|
|
2245
|
+
height: vn,
|
|
2246
|
+
left: mn,
|
|
2247
|
+
top: gn
|
|
2248
|
+
});
|
|
2249
|
+
}
|
|
2250
|
+
}), ne;
|
|
2251
|
+
});
|
|
2252
|
+
};
|
|
2253
|
+
Be(function() {
|
|
2254
|
+
Ht();
|
|
2255
|
+
}, [b.map(function(X) {
|
|
2256
|
+
return X.key;
|
|
2257
|
+
}).join("_")]);
|
|
2258
|
+
var st = ka(function() {
|
|
2259
|
+
var X = pt(_), L = pt(R), ne = pt(P);
|
|
2260
|
+
A([X[0] - L[0] - ne[0], X[1] - L[1] - ne[1]]);
|
|
2261
|
+
var re = pt(T);
|
|
2262
|
+
de(re);
|
|
2263
|
+
var he = pt(E);
|
|
2264
|
+
me(he);
|
|
2265
|
+
var Ce = pt(O);
|
|
2266
|
+
U([Ce[0] - re[0], Ce[1] - re[1]]), Ht();
|
|
2267
|
+
}), Gt = b.slice(0, jt), ct = b.slice(un + 1), Wt = [].concat(Ke(Gt), Ke(ct)), ut = ye.get(l), qe = Ri({
|
|
2268
|
+
activeTabOffset: ut,
|
|
2269
|
+
horizontal: y,
|
|
2270
|
+
indicator: x,
|
|
2271
|
+
rtl: s
|
|
2272
|
+
}), Ft = qe.style;
|
|
2273
|
+
Be(function() {
|
|
2274
|
+
Bt();
|
|
2275
|
+
}, [l, Re, Te, sa(ut), sa(ye), y]), Be(function() {
|
|
2276
|
+
st();
|
|
2277
|
+
}, [s]);
|
|
2278
|
+
var _t = !!Wt.length, nt = "".concat(C, "-nav-wrap"), dt, Pt, It, qt;
|
|
2279
|
+
return y ? s ? (Pt = I > 0, dt = I !== Te) : (dt = I < 0, Pt = I !== Re) : (It = W < 0, qt = W !== Re), /* @__PURE__ */ i.createElement(hn, {
|
|
2280
|
+
onResize: st
|
|
2281
|
+
}, /* @__PURE__ */ i.createElement("div", {
|
|
2282
|
+
ref: ba(t, _),
|
|
2283
|
+
role: "tablist",
|
|
2284
|
+
"aria-orientation": y ? "horizontal" : "vertical",
|
|
2285
|
+
className: D("".concat(C, "-nav"), a),
|
|
2286
|
+
style: n,
|
|
2287
|
+
onKeyDown: function() {
|
|
2288
|
+
ce();
|
|
2289
|
+
}
|
|
2290
|
+
}, /* @__PURE__ */ i.createElement(Nn, {
|
|
2291
|
+
ref: R,
|
|
2292
|
+
position: "left",
|
|
2293
|
+
extra: c,
|
|
2294
|
+
prefixCls: C
|
|
2295
|
+
}), /* @__PURE__ */ i.createElement(hn, {
|
|
2296
|
+
onResize: st
|
|
2297
|
+
}, /* @__PURE__ */ i.createElement("div", {
|
|
2298
|
+
className: D(nt, B(B(B(B({}, "".concat(nt, "-ping-left"), dt), "".concat(nt, "-ping-right"), Pt), "".concat(nt, "-ping-top"), It), "".concat(nt, "-ping-bottom"), qt)),
|
|
2299
|
+
ref: M
|
|
2300
|
+
}, /* @__PURE__ */ i.createElement(hn, {
|
|
2301
|
+
onResize: st
|
|
2302
|
+
}, /* @__PURE__ */ i.createElement("div", {
|
|
2303
|
+
ref: O,
|
|
2304
|
+
className: "".concat(C, "-nav-list"),
|
|
2305
|
+
style: {
|
|
2306
|
+
transform: "translate(".concat(I, "px, ").concat(W, "px)"),
|
|
2307
|
+
transition: ke ? "none" : void 0
|
|
2308
|
+
}
|
|
2309
|
+
}, Vt, /* @__PURE__ */ i.createElement(Ba, {
|
|
2310
|
+
ref: T,
|
|
2311
|
+
prefixCls: C,
|
|
2312
|
+
locale: v,
|
|
2313
|
+
editable: u,
|
|
2314
|
+
style: Y(Y({}, Vt.length === 0 ? void 0 : tt), {}, {
|
|
2315
|
+
visibility: _t ? "hidden" : null
|
|
2316
|
+
})
|
|
2317
|
+
}), /* @__PURE__ */ i.createElement("div", {
|
|
2318
|
+
className: D("".concat(C, "-ink-bar"), B({}, "".concat(C, "-ink-bar-animated"), o.inkBar)),
|
|
2319
|
+
style: Ft
|
|
2320
|
+
}))))), /* @__PURE__ */ i.createElement(Ai, ae({}, e, {
|
|
2321
|
+
removeAriaLabel: v == null ? void 0 : v.removeAriaLabel,
|
|
2322
|
+
ref: E,
|
|
2323
|
+
prefixCls: C,
|
|
2324
|
+
tabs: Wt,
|
|
2325
|
+
className: !_t && Ct,
|
|
2326
|
+
tabMoving: !!ke
|
|
2327
|
+
})), /* @__PURE__ */ i.createElement(Nn, {
|
|
2328
|
+
ref: P,
|
|
2329
|
+
position: "right",
|
|
2330
|
+
extra: c,
|
|
2331
|
+
prefixCls: C
|
|
2332
|
+
})));
|
|
2333
|
+
}), Gn = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
2334
|
+
var a = e.prefixCls, n = e.className, r = e.style, o = e.id, l = e.active, s = e.tabKey, c = e.children;
|
|
2335
|
+
return /* @__PURE__ */ i.createElement("div", {
|
|
2336
|
+
id: o && "".concat(o, "-panel-").concat(s),
|
|
2337
|
+
role: "tabpanel",
|
|
2338
|
+
tabIndex: l ? 0 : -1,
|
|
2339
|
+
"aria-labelledby": o && "".concat(o, "-tab-").concat(s),
|
|
2340
|
+
"aria-hidden": !l,
|
|
2341
|
+
style: r,
|
|
2342
|
+
className: D(a, l && "".concat(a, "-active"), n),
|
|
2343
|
+
ref: t
|
|
2344
|
+
}, c);
|
|
2345
|
+
});
|
|
2346
|
+
process.env.NODE_ENV !== "production" && (Gn.displayName = "TabPane");
|
|
2347
|
+
var Bi = ["renderTabBar"], Ki = ["label", "key"], Ka = function(t) {
|
|
2348
|
+
var a = t.renderTabBar, n = Se(t, Bi), r = i.useContext(sn), o = r.tabs;
|
|
2349
|
+
if (a) {
|
|
2350
|
+
var l = Y(Y({}, n), {}, {
|
|
2351
|
+
// Legacy support. We do not use this actually
|
|
2352
|
+
panes: o.map(function(s) {
|
|
2353
|
+
var c = s.label, u = s.key, v = Se(s, Ki);
|
|
2354
|
+
return /* @__PURE__ */ i.createElement(Gn, ae({
|
|
2355
|
+
tab: c,
|
|
2356
|
+
key: u,
|
|
2357
|
+
tabKey: u
|
|
2358
|
+
}, v));
|
|
2359
|
+
})
|
|
2360
|
+
});
|
|
2361
|
+
return a(l, ca);
|
|
2362
|
+
}
|
|
2363
|
+
return /* @__PURE__ */ i.createElement(ca, n);
|
|
2364
|
+
};
|
|
2365
|
+
process.env.NODE_ENV !== "production" && (Ka.displayName = "TabNavListWrapper");
|
|
2366
|
+
var Vi = ["key", "forceRender", "style", "className", "destroyInactiveTabPane"], Hi = function(t) {
|
|
2367
|
+
var a = t.id, n = t.activeKey, r = t.animated, o = t.tabPosition, l = t.destroyInactiveTabPane, s = i.useContext(sn), c = s.prefixCls, u = s.tabs, v = r.tabPane, d = "".concat(c, "-tabpane");
|
|
2368
|
+
return /* @__PURE__ */ i.createElement("div", {
|
|
2369
|
+
className: D("".concat(c, "-content-holder"))
|
|
2370
|
+
}, /* @__PURE__ */ i.createElement("div", {
|
|
2371
|
+
className: D("".concat(c, "-content"), "".concat(c, "-content-").concat(o), B({}, "".concat(c, "-content-animated"), v))
|
|
2372
|
+
}, u.map(function(f) {
|
|
2373
|
+
var h = f.key, S = f.forceRender, g = f.style, x = f.className, p = f.destroyInactiveTabPane, C = Se(f, Vi), b = h === n;
|
|
2374
|
+
return /* @__PURE__ */ i.createElement(ha, ae({
|
|
2375
|
+
key: h,
|
|
2376
|
+
visible: b,
|
|
2377
|
+
forceRender: S,
|
|
2378
|
+
removeOnLeave: !!(l || p),
|
|
2379
|
+
leavedClassName: "".concat(d, "-hidden")
|
|
2380
|
+
}, r.tabPaneMotion), function(_, R) {
|
|
2381
|
+
var P = _.style, M = _.className;
|
|
2382
|
+
return /* @__PURE__ */ i.createElement(Gn, ae({}, C, {
|
|
2383
|
+
prefixCls: d,
|
|
2384
|
+
id: a,
|
|
2385
|
+
tabKey: h,
|
|
2386
|
+
animated: v,
|
|
2387
|
+
active: b,
|
|
2388
|
+
style: Y(Y({}, g), P),
|
|
2389
|
+
className: D(x, M),
|
|
2390
|
+
ref: R
|
|
2391
|
+
}));
|
|
2392
|
+
});
|
|
2393
|
+
})));
|
|
2394
|
+
};
|
|
2395
|
+
function Gi() {
|
|
2396
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
2397
|
+
inkBar: !0,
|
|
2398
|
+
tabPane: !1
|
|
2399
|
+
}, t;
|
|
2400
|
+
return e === !1 ? t = {
|
|
2401
|
+
inkBar: !1,
|
|
2402
|
+
tabPane: !1
|
|
2403
|
+
} : e === !0 ? t = {
|
|
2404
|
+
inkBar: !0,
|
|
2405
|
+
tabPane: !1
|
|
2406
|
+
} : t = Y({
|
|
2407
|
+
inkBar: !0
|
|
2408
|
+
}, en(e) === "object" ? e : {}), t.tabPaneMotion && t.tabPane === void 0 && (t.tabPane = !0), !t.tabPaneMotion && t.tabPane && (process.env.NODE_ENV !== "production" && rt(!1, "`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work."), t.tabPane = !1), t;
|
|
2409
|
+
}
|
|
2410
|
+
var Wi = ["id", "prefixCls", "className", "items", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "more", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll", "getPopupContainer", "popupClassName", "indicator"], ua = 0, Va = /* @__PURE__ */ i.forwardRef(function(e, t) {
|
|
2411
|
+
var a = e.id, n = e.prefixCls, r = n === void 0 ? "rc-tabs" : n, o = e.className, l = e.items, s = e.direction, c = e.activeKey, u = e.defaultActiveKey, v = e.editable, d = e.animated, f = e.tabPosition, h = f === void 0 ? "top" : f, S = e.tabBarGutter, g = e.tabBarStyle, x = e.tabBarExtraContent, p = e.locale, C = e.more, b = e.destroyInactiveTabPane, _ = e.renderTabBar, R = e.onChange, P = e.onTabClick, M = e.onTabScroll, O = e.getPopupContainer, E = e.popupClassName, T = e.indicator, y = Se(e, Wi), $ = i.useMemo(function() {
|
|
2412
|
+
return (l || []).filter(function(H) {
|
|
2413
|
+
return H && en(H) === "object" && "key" in H;
|
|
2414
|
+
});
|
|
2415
|
+
}, [l]), N = s === "rtl", I = Gi(d), j = be(!1), G = z(j, 2), m = G[0], W = G[1];
|
|
2416
|
+
Be(function() {
|
|
2417
|
+
W(dr());
|
|
2418
|
+
}, []);
|
|
2419
|
+
var J = bt(function() {
|
|
2420
|
+
var H;
|
|
2421
|
+
return (H = $[0]) === null || H === void 0 ? void 0 : H.key;
|
|
2422
|
+
}, {
|
|
2423
|
+
value: c,
|
|
2424
|
+
defaultValue: u
|
|
2425
|
+
}), F = z(J, 2), ee = F[0], se = F[1], A = be(function() {
|
|
2426
|
+
return $.findIndex(function(H) {
|
|
2427
|
+
return H.key === ee;
|
|
2428
|
+
});
|
|
2429
|
+
}), K = z(A, 2), k = K[0], V = K[1];
|
|
2430
|
+
Be(function() {
|
|
2431
|
+
var H = $.findIndex(function(De) {
|
|
2432
|
+
return De.key === ee;
|
|
2433
|
+
});
|
|
2434
|
+
if (H === -1) {
|
|
2435
|
+
var me;
|
|
2436
|
+
H = Math.max(0, Math.min(k, $.length - 1)), se((me = $[H]) === null || me === void 0 ? void 0 : me.key);
|
|
2437
|
+
}
|
|
2438
|
+
V(H);
|
|
2439
|
+
}, [$.map(function(H) {
|
|
2440
|
+
return H.key;
|
|
2441
|
+
}).join("_"), ee, k]);
|
|
2442
|
+
var U = bt(null, {
|
|
2443
|
+
value: a
|
|
2444
|
+
}), q = z(U, 2), te = q[0], ie = q[1];
|
|
2445
|
+
Be(function() {
|
|
2446
|
+
a || (ie("rc-tabs-".concat(process.env.NODE_ENV === "test" ? "test" : ua)), ua += 1);
|
|
2447
|
+
}, []);
|
|
2448
|
+
function de(H, me) {
|
|
2449
|
+
P == null || P(H, me);
|
|
2450
|
+
var De = H !== ee;
|
|
2451
|
+
se(H), De && (R == null || R(H));
|
|
2452
|
+
}
|
|
2453
|
+
var fe = {
|
|
2454
|
+
id: te,
|
|
2455
|
+
activeKey: ee,
|
|
2456
|
+
animated: I,
|
|
2457
|
+
tabPosition: h,
|
|
2458
|
+
rtl: N,
|
|
2459
|
+
mobile: m
|
|
2460
|
+
}, Pe = Y(Y({}, fe), {}, {
|
|
2461
|
+
editable: v,
|
|
2462
|
+
locale: p,
|
|
2463
|
+
more: C,
|
|
2464
|
+
tabBarGutter: S,
|
|
2465
|
+
onTabClick: de,
|
|
2466
|
+
onTabScroll: M,
|
|
2467
|
+
extra: x,
|
|
2468
|
+
style: g,
|
|
2469
|
+
panes: null,
|
|
2470
|
+
getPopupContainer: O,
|
|
2471
|
+
popupClassName: E,
|
|
2472
|
+
indicator: T
|
|
2473
|
+
});
|
|
2474
|
+
return /* @__PURE__ */ i.createElement(sn.Provider, {
|
|
2475
|
+
value: {
|
|
2476
|
+
tabs: $,
|
|
2477
|
+
prefixCls: r
|
|
2478
|
+
}
|
|
2479
|
+
}, /* @__PURE__ */ i.createElement("div", ae({
|
|
2480
|
+
ref: t,
|
|
2481
|
+
id: a,
|
|
2482
|
+
className: D(r, "".concat(r, "-").concat(h), B(B(B({}, "".concat(r, "-mobile"), m), "".concat(r, "-editable"), v), "".concat(r, "-rtl"), N), o)
|
|
2483
|
+
}, y), /* @__PURE__ */ i.createElement(Ka, ae({}, Pe, {
|
|
2484
|
+
renderTabBar: _
|
|
2485
|
+
})), /* @__PURE__ */ i.createElement(Hi, ae({
|
|
2486
|
+
destroyInactiveTabPane: b
|
|
2487
|
+
}, fe, {
|
|
2488
|
+
animated: I
|
|
2489
|
+
}))));
|
|
2490
|
+
});
|
|
2491
|
+
process.env.NODE_ENV !== "production" && (Va.displayName = "Tabs");
|
|
2492
|
+
const Fi = {
|
|
2493
|
+
motionAppear: !1,
|
|
2494
|
+
motionEnter: !0,
|
|
2495
|
+
motionLeave: !0
|
|
2496
|
+
};
|
|
2497
|
+
function qi(e) {
|
|
2498
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
2499
|
+
inkBar: !0,
|
|
2500
|
+
tabPane: !1
|
|
2501
|
+
}, a;
|
|
2502
|
+
return t === !1 ? a = {
|
|
2503
|
+
inkBar: !1,
|
|
2504
|
+
tabPane: !1
|
|
2505
|
+
} : t === !0 ? a = {
|
|
2506
|
+
inkBar: !0,
|
|
2507
|
+
tabPane: !0
|
|
2508
|
+
} : a = Object.assign({
|
|
2509
|
+
inkBar: !0
|
|
2510
|
+
}, typeof t == "object" ? t : {}), a.tabPane && (a.tabPaneMotion = Object.assign(Object.assign({}, Fi), {
|
|
2511
|
+
motionName: fr(e, "switch")
|
|
2512
|
+
})), a;
|
|
2513
|
+
}
|
|
2514
|
+
var Ui = function(e, t) {
|
|
2515
|
+
var a = {};
|
|
2516
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
2517
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
2518
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
2519
|
+
return a;
|
|
2520
|
+
};
|
|
2521
|
+
function Xi(e) {
|
|
2522
|
+
return e.filter((t) => t);
|
|
2523
|
+
}
|
|
2524
|
+
function Yi(e, t) {
|
|
2525
|
+
if (process.env.NODE_ENV !== "production" && Ln("Tabs").deprecated(!t, "Tabs.TabPane", "items"), e)
|
|
2526
|
+
return e;
|
|
2527
|
+
const a = Ca(t).map((n) => {
|
|
2528
|
+
if (/* @__PURE__ */ i.isValidElement(n)) {
|
|
2529
|
+
const {
|
|
2530
|
+
key: r,
|
|
2531
|
+
props: o
|
|
2532
|
+
} = n, l = o || {}, {
|
|
2533
|
+
tab: s
|
|
2534
|
+
} = l, c = Ui(l, ["tab"]);
|
|
2535
|
+
return Object.assign(Object.assign({
|
|
2536
|
+
key: String(r)
|
|
2537
|
+
}, c), {
|
|
2538
|
+
label: s
|
|
2539
|
+
});
|
|
2540
|
+
}
|
|
2541
|
+
return null;
|
|
2542
|
+
});
|
|
2543
|
+
return Xi(a);
|
|
2544
|
+
}
|
|
2545
|
+
const Zi = (e) => {
|
|
2546
|
+
const {
|
|
2547
|
+
componentCls: t,
|
|
2548
|
+
motionDurationSlow: a
|
|
2549
|
+
} = e;
|
|
2550
|
+
return [
|
|
2551
|
+
{
|
|
2552
|
+
[t]: {
|
|
2553
|
+
[`${t}-switch`]: {
|
|
2554
|
+
"&-appear, &-enter": {
|
|
2555
|
+
transition: "none",
|
|
2556
|
+
"&-start": {
|
|
2557
|
+
opacity: 0
|
|
2558
|
+
},
|
|
2559
|
+
"&-active": {
|
|
2560
|
+
opacity: 1,
|
|
2561
|
+
transition: `opacity ${a}`
|
|
2562
|
+
}
|
|
2563
|
+
},
|
|
2564
|
+
"&-leave": {
|
|
2565
|
+
position: "absolute",
|
|
2566
|
+
transition: "none",
|
|
2567
|
+
inset: 0,
|
|
2568
|
+
"&-start": {
|
|
2569
|
+
opacity: 1
|
|
2570
|
+
},
|
|
2571
|
+
"&-active": {
|
|
2572
|
+
opacity: 0,
|
|
2573
|
+
transition: `opacity ${a}`
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
},
|
|
2579
|
+
// Follow code may reuse in other components
|
|
2580
|
+
[Xn(e, "slide-up"), Xn(e, "slide-down")]
|
|
2581
|
+
];
|
|
2582
|
+
}, Ji = (e) => {
|
|
2583
|
+
const {
|
|
2584
|
+
componentCls: t,
|
|
2585
|
+
tabsCardPadding: a,
|
|
2586
|
+
cardBg: n,
|
|
2587
|
+
cardGutter: r,
|
|
2588
|
+
colorBorderSecondary: o,
|
|
2589
|
+
itemSelectedColor: l
|
|
2590
|
+
} = e;
|
|
2591
|
+
return {
|
|
2592
|
+
[`${t}-card`]: {
|
|
2593
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2594
|
+
[`${t}-tab`]: {
|
|
2595
|
+
margin: 0,
|
|
2596
|
+
padding: a,
|
|
2597
|
+
background: n,
|
|
2598
|
+
border: `${w(e.lineWidth)} ${e.lineType} ${o}`,
|
|
2599
|
+
transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`
|
|
2600
|
+
},
|
|
2601
|
+
[`${t}-tab-active`]: {
|
|
2602
|
+
color: l,
|
|
2603
|
+
background: e.colorBgContainer
|
|
2604
|
+
},
|
|
2605
|
+
[`${t}-tab-focus`]: Object.assign({}, ya(e, -3)),
|
|
2606
|
+
[`${t}-ink-bar`]: {
|
|
2607
|
+
visibility: "hidden"
|
|
2608
|
+
},
|
|
2609
|
+
[`& ${t}-tab${t}-tab-focus ${t}-tab-btn`]: {
|
|
2610
|
+
outline: "none"
|
|
2611
|
+
}
|
|
2612
|
+
},
|
|
2613
|
+
// ========================== Top & Bottom ==========================
|
|
2614
|
+
[`&${t}-top, &${t}-bottom`]: {
|
|
2615
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2616
|
+
[`${t}-tab + ${t}-tab`]: {
|
|
2617
|
+
marginLeft: {
|
|
2618
|
+
_skip_check_: !0,
|
|
2619
|
+
value: w(r)
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
}
|
|
2623
|
+
},
|
|
2624
|
+
[`&${t}-top`]: {
|
|
2625
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2626
|
+
[`${t}-tab`]: {
|
|
2627
|
+
borderRadius: `${w(e.borderRadiusLG)} ${w(e.borderRadiusLG)} 0 0`
|
|
2628
|
+
},
|
|
2629
|
+
[`${t}-tab-active`]: {
|
|
2630
|
+
borderBottomColor: e.colorBgContainer
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
[`&${t}-bottom`]: {
|
|
2635
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2636
|
+
[`${t}-tab`]: {
|
|
2637
|
+
borderRadius: `0 0 ${w(e.borderRadiusLG)} ${w(e.borderRadiusLG)}`
|
|
2638
|
+
},
|
|
2639
|
+
[`${t}-tab-active`]: {
|
|
2640
|
+
borderTopColor: e.colorBgContainer
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
},
|
|
2644
|
+
// ========================== Left & Right ==========================
|
|
2645
|
+
[`&${t}-left, &${t}-right`]: {
|
|
2646
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2647
|
+
[`${t}-tab + ${t}-tab`]: {
|
|
2648
|
+
marginTop: w(r)
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
[`&${t}-left`]: {
|
|
2653
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2654
|
+
[`${t}-tab`]: {
|
|
2655
|
+
borderRadius: {
|
|
2656
|
+
_skip_check_: !0,
|
|
2657
|
+
value: `${w(e.borderRadiusLG)} 0 0 ${w(e.borderRadiusLG)}`
|
|
2658
|
+
}
|
|
2659
|
+
},
|
|
2660
|
+
[`${t}-tab-active`]: {
|
|
2661
|
+
borderRightColor: {
|
|
2662
|
+
_skip_check_: !0,
|
|
2663
|
+
value: e.colorBgContainer
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
},
|
|
2668
|
+
[`&${t}-right`]: {
|
|
2669
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2670
|
+
[`${t}-tab`]: {
|
|
2671
|
+
borderRadius: {
|
|
2672
|
+
_skip_check_: !0,
|
|
2673
|
+
value: `0 ${w(e.borderRadiusLG)} ${w(e.borderRadiusLG)} 0`
|
|
2674
|
+
}
|
|
2675
|
+
},
|
|
2676
|
+
[`${t}-tab-active`]: {
|
|
2677
|
+
borderLeftColor: {
|
|
2678
|
+
_skip_check_: !0,
|
|
2679
|
+
value: e.colorBgContainer
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2685
|
+
};
|
|
2686
|
+
}, Qi = (e) => {
|
|
2687
|
+
const {
|
|
2688
|
+
componentCls: t,
|
|
2689
|
+
itemHoverColor: a,
|
|
2690
|
+
dropdownEdgeChildVerticalPadding: n
|
|
2691
|
+
} = e;
|
|
2692
|
+
return {
|
|
2693
|
+
[`${t}-dropdown`]: Object.assign(Object.assign({}, Dn(e)), {
|
|
2694
|
+
position: "absolute",
|
|
2695
|
+
top: -9999,
|
|
2696
|
+
left: {
|
|
2697
|
+
_skip_check_: !0,
|
|
2698
|
+
value: -9999
|
|
2699
|
+
},
|
|
2700
|
+
zIndex: e.zIndexPopup,
|
|
2701
|
+
display: "block",
|
|
2702
|
+
"&-hidden": {
|
|
2703
|
+
display: "none"
|
|
2704
|
+
},
|
|
2705
|
+
[`${t}-dropdown-menu`]: {
|
|
2706
|
+
maxHeight: e.tabsDropdownHeight,
|
|
2707
|
+
margin: 0,
|
|
2708
|
+
padding: `${w(n)} 0`,
|
|
2709
|
+
overflowX: "hidden",
|
|
2710
|
+
overflowY: "auto",
|
|
2711
|
+
textAlign: {
|
|
2712
|
+
_skip_check_: !0,
|
|
2713
|
+
value: "left"
|
|
2714
|
+
},
|
|
2715
|
+
listStyleType: "none",
|
|
2716
|
+
backgroundColor: e.colorBgContainer,
|
|
2717
|
+
backgroundClip: "padding-box",
|
|
2718
|
+
borderRadius: e.borderRadiusLG,
|
|
2719
|
+
outline: "none",
|
|
2720
|
+
boxShadow: e.boxShadowSecondary,
|
|
2721
|
+
"&-item": Object.assign(Object.assign({}, zn), {
|
|
2722
|
+
display: "flex",
|
|
2723
|
+
alignItems: "center",
|
|
2724
|
+
minWidth: e.tabsDropdownWidth,
|
|
2725
|
+
margin: 0,
|
|
2726
|
+
padding: `${w(e.paddingXXS)} ${w(e.paddingSM)}`,
|
|
2727
|
+
color: e.colorText,
|
|
2728
|
+
fontWeight: "normal",
|
|
2729
|
+
fontSize: e.fontSize,
|
|
2730
|
+
lineHeight: e.lineHeight,
|
|
2731
|
+
cursor: "pointer",
|
|
2732
|
+
transition: `all ${e.motionDurationSlow}`,
|
|
2733
|
+
"> span": {
|
|
2734
|
+
flex: 1,
|
|
2735
|
+
whiteSpace: "nowrap"
|
|
2736
|
+
},
|
|
2737
|
+
"&-remove": {
|
|
2738
|
+
flex: "none",
|
|
2739
|
+
marginLeft: {
|
|
2740
|
+
_skip_check_: !0,
|
|
2741
|
+
value: e.marginSM
|
|
2742
|
+
},
|
|
2743
|
+
color: e.colorTextDescription,
|
|
2744
|
+
fontSize: e.fontSizeSM,
|
|
2745
|
+
background: "transparent",
|
|
2746
|
+
border: 0,
|
|
2747
|
+
cursor: "pointer",
|
|
2748
|
+
"&:hover": {
|
|
2749
|
+
color: a
|
|
2750
|
+
}
|
|
2751
|
+
},
|
|
2752
|
+
"&:hover": {
|
|
2753
|
+
background: e.controlItemBgHover
|
|
2754
|
+
},
|
|
2755
|
+
"&-disabled": {
|
|
2756
|
+
"&, &:hover": {
|
|
2757
|
+
color: e.colorTextDisabled,
|
|
2758
|
+
background: "transparent",
|
|
2759
|
+
cursor: "not-allowed"
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
})
|
|
2763
|
+
}
|
|
2764
|
+
})
|
|
2765
|
+
};
|
|
2766
|
+
}, eo = (e) => {
|
|
2767
|
+
const {
|
|
2768
|
+
componentCls: t,
|
|
2769
|
+
margin: a,
|
|
2770
|
+
colorBorderSecondary: n,
|
|
2771
|
+
horizontalMargin: r,
|
|
2772
|
+
verticalItemPadding: o,
|
|
2773
|
+
verticalItemMargin: l,
|
|
2774
|
+
calc: s
|
|
2775
|
+
} = e;
|
|
2776
|
+
return {
|
|
2777
|
+
// ========================== Top & Bottom ==========================
|
|
2778
|
+
[`${t}-top, ${t}-bottom`]: {
|
|
2779
|
+
flexDirection: "column",
|
|
2780
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2781
|
+
margin: r,
|
|
2782
|
+
"&::before": {
|
|
2783
|
+
position: "absolute",
|
|
2784
|
+
right: {
|
|
2785
|
+
_skip_check_: !0,
|
|
2786
|
+
value: 0
|
|
2787
|
+
},
|
|
2788
|
+
left: {
|
|
2789
|
+
_skip_check_: !0,
|
|
2790
|
+
value: 0
|
|
2791
|
+
},
|
|
2792
|
+
borderBottom: `${w(e.lineWidth)} ${e.lineType} ${n}`,
|
|
2793
|
+
content: "''"
|
|
2794
|
+
},
|
|
2795
|
+
[`${t}-ink-bar`]: {
|
|
2796
|
+
height: e.lineWidthBold,
|
|
2797
|
+
"&-animated": {
|
|
2798
|
+
transition: `width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
|
|
2799
|
+
right ${e.motionDurationSlow}`
|
|
2800
|
+
}
|
|
2801
|
+
},
|
|
2802
|
+
[`${t}-nav-wrap`]: {
|
|
2803
|
+
"&::before, &::after": {
|
|
2804
|
+
top: 0,
|
|
2805
|
+
bottom: 0,
|
|
2806
|
+
width: e.controlHeight
|
|
2807
|
+
},
|
|
2808
|
+
"&::before": {
|
|
2809
|
+
left: {
|
|
2810
|
+
_skip_check_: !0,
|
|
2811
|
+
value: 0
|
|
2812
|
+
},
|
|
2813
|
+
boxShadow: e.boxShadowTabsOverflowLeft
|
|
2814
|
+
},
|
|
2815
|
+
"&::after": {
|
|
2816
|
+
right: {
|
|
2817
|
+
_skip_check_: !0,
|
|
2818
|
+
value: 0
|
|
2819
|
+
},
|
|
2820
|
+
boxShadow: e.boxShadowTabsOverflowRight
|
|
2821
|
+
},
|
|
2822
|
+
[`&${t}-nav-wrap-ping-left::before`]: {
|
|
2823
|
+
opacity: 1
|
|
2824
|
+
},
|
|
2825
|
+
[`&${t}-nav-wrap-ping-right::after`]: {
|
|
2826
|
+
opacity: 1
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
},
|
|
2831
|
+
[`${t}-top`]: {
|
|
2832
|
+
[`> ${t}-nav,
|
|
2833
|
+
> div > ${t}-nav`]: {
|
|
2834
|
+
"&::before": {
|
|
2835
|
+
bottom: 0
|
|
2836
|
+
},
|
|
2837
|
+
[`${t}-ink-bar`]: {
|
|
2838
|
+
bottom: 0
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
},
|
|
2842
|
+
[`${t}-bottom`]: {
|
|
2843
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2844
|
+
order: 1,
|
|
2845
|
+
marginTop: a,
|
|
2846
|
+
marginBottom: 0,
|
|
2847
|
+
"&::before": {
|
|
2848
|
+
top: 0
|
|
2849
|
+
},
|
|
2850
|
+
[`${t}-ink-bar`]: {
|
|
2851
|
+
top: 0
|
|
2852
|
+
}
|
|
2853
|
+
},
|
|
2854
|
+
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
2855
|
+
order: 0
|
|
2856
|
+
}
|
|
2857
|
+
},
|
|
2858
|
+
// ========================== Left & Right ==========================
|
|
2859
|
+
[`${t}-left, ${t}-right`]: {
|
|
2860
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2861
|
+
flexDirection: "column",
|
|
2862
|
+
minWidth: s(e.controlHeight).mul(1.25).equal(),
|
|
2863
|
+
// >>>>>>>>>>> Tab
|
|
2864
|
+
[`${t}-tab`]: {
|
|
2865
|
+
padding: o,
|
|
2866
|
+
textAlign: "center"
|
|
2867
|
+
},
|
|
2868
|
+
[`${t}-tab + ${t}-tab`]: {
|
|
2869
|
+
margin: l
|
|
2870
|
+
},
|
|
2871
|
+
// >>>>>>>>>>> Nav
|
|
2872
|
+
[`${t}-nav-wrap`]: {
|
|
2873
|
+
flexDirection: "column",
|
|
2874
|
+
"&::before, &::after": {
|
|
2875
|
+
right: {
|
|
2876
|
+
_skip_check_: !0,
|
|
2877
|
+
value: 0
|
|
2878
|
+
},
|
|
2879
|
+
left: {
|
|
2880
|
+
_skip_check_: !0,
|
|
2881
|
+
value: 0
|
|
2882
|
+
},
|
|
2883
|
+
height: e.controlHeight
|
|
2884
|
+
},
|
|
2885
|
+
"&::before": {
|
|
2886
|
+
top: 0,
|
|
2887
|
+
boxShadow: e.boxShadowTabsOverflowTop
|
|
2888
|
+
},
|
|
2889
|
+
"&::after": {
|
|
2890
|
+
bottom: 0,
|
|
2891
|
+
boxShadow: e.boxShadowTabsOverflowBottom
|
|
2892
|
+
},
|
|
2893
|
+
[`&${t}-nav-wrap-ping-top::before`]: {
|
|
2894
|
+
opacity: 1
|
|
2895
|
+
},
|
|
2896
|
+
[`&${t}-nav-wrap-ping-bottom::after`]: {
|
|
2897
|
+
opacity: 1
|
|
2898
|
+
}
|
|
2899
|
+
},
|
|
2900
|
+
// >>>>>>>>>>> Ink Bar
|
|
2901
|
+
[`${t}-ink-bar`]: {
|
|
2902
|
+
width: e.lineWidthBold,
|
|
2903
|
+
"&-animated": {
|
|
2904
|
+
transition: `height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
[`${t}-nav-list, ${t}-nav-operations`]: {
|
|
2908
|
+
flex: "1 0 auto",
|
|
2909
|
+
// fix safari scroll problem
|
|
2910
|
+
flexDirection: "column"
|
|
2911
|
+
}
|
|
2912
|
+
}
|
|
2913
|
+
},
|
|
2914
|
+
[`${t}-left`]: {
|
|
2915
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2916
|
+
[`${t}-ink-bar`]: {
|
|
2917
|
+
right: {
|
|
2918
|
+
_skip_check_: !0,
|
|
2919
|
+
value: 0
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
},
|
|
2923
|
+
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
2924
|
+
marginLeft: {
|
|
2925
|
+
_skip_check_: !0,
|
|
2926
|
+
value: w(s(e.lineWidth).mul(-1).equal())
|
|
2927
|
+
},
|
|
2928
|
+
borderLeft: {
|
|
2929
|
+
_skip_check_: !0,
|
|
2930
|
+
value: `${w(e.lineWidth)} ${e.lineType} ${e.colorBorder}`
|
|
2931
|
+
},
|
|
2932
|
+
[`> ${t}-content > ${t}-tabpane`]: {
|
|
2933
|
+
paddingLeft: {
|
|
2934
|
+
_skip_check_: !0,
|
|
2935
|
+
value: e.paddingLG
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2939
|
+
},
|
|
2940
|
+
[`${t}-right`]: {
|
|
2941
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2942
|
+
order: 1,
|
|
2943
|
+
[`${t}-ink-bar`]: {
|
|
2944
|
+
left: {
|
|
2945
|
+
_skip_check_: !0,
|
|
2946
|
+
value: 0
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
},
|
|
2950
|
+
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
2951
|
+
order: 0,
|
|
2952
|
+
marginRight: {
|
|
2953
|
+
_skip_check_: !0,
|
|
2954
|
+
value: s(e.lineWidth).mul(-1).equal()
|
|
2955
|
+
},
|
|
2956
|
+
borderRight: {
|
|
2957
|
+
_skip_check_: !0,
|
|
2958
|
+
value: `${w(e.lineWidth)} ${e.lineType} ${e.colorBorder}`
|
|
2959
|
+
},
|
|
2960
|
+
[`> ${t}-content > ${t}-tabpane`]: {
|
|
2961
|
+
paddingRight: {
|
|
2962
|
+
_skip_check_: !0,
|
|
2963
|
+
value: e.paddingLG
|
|
2964
|
+
}
|
|
2965
|
+
}
|
|
2966
|
+
}
|
|
2967
|
+
}
|
|
2968
|
+
};
|
|
2969
|
+
}, to = (e) => {
|
|
2970
|
+
const {
|
|
2971
|
+
componentCls: t,
|
|
2972
|
+
cardPaddingSM: a,
|
|
2973
|
+
cardPaddingLG: n,
|
|
2974
|
+
horizontalItemPaddingSM: r,
|
|
2975
|
+
horizontalItemPaddingLG: o
|
|
2976
|
+
} = e;
|
|
2977
|
+
return {
|
|
2978
|
+
[t]: {
|
|
2979
|
+
"&-small": {
|
|
2980
|
+
[`> ${t}-nav`]: {
|
|
2981
|
+
[`${t}-tab`]: {
|
|
2982
|
+
padding: r,
|
|
2983
|
+
fontSize: e.titleFontSizeSM
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2986
|
+
},
|
|
2987
|
+
"&-large": {
|
|
2988
|
+
[`> ${t}-nav`]: {
|
|
2989
|
+
[`${t}-tab`]: {
|
|
2990
|
+
padding: o,
|
|
2991
|
+
fontSize: e.titleFontSizeLG
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2994
|
+
}
|
|
2995
|
+
},
|
|
2996
|
+
[`${t}-card`]: {
|
|
2997
|
+
[`&${t}-small`]: {
|
|
2998
|
+
[`> ${t}-nav`]: {
|
|
2999
|
+
[`${t}-tab`]: {
|
|
3000
|
+
padding: a
|
|
3001
|
+
}
|
|
3002
|
+
},
|
|
3003
|
+
[`&${t}-bottom`]: {
|
|
3004
|
+
[`> ${t}-nav ${t}-tab`]: {
|
|
3005
|
+
borderRadius: `0 0 ${w(e.borderRadius)} ${w(e.borderRadius)}`
|
|
3006
|
+
}
|
|
3007
|
+
},
|
|
3008
|
+
[`&${t}-top`]: {
|
|
3009
|
+
[`> ${t}-nav ${t}-tab`]: {
|
|
3010
|
+
borderRadius: `${w(e.borderRadius)} ${w(e.borderRadius)} 0 0`
|
|
3011
|
+
}
|
|
3012
|
+
},
|
|
3013
|
+
[`&${t}-right`]: {
|
|
3014
|
+
[`> ${t}-nav ${t}-tab`]: {
|
|
3015
|
+
borderRadius: {
|
|
3016
|
+
_skip_check_: !0,
|
|
3017
|
+
value: `0 ${w(e.borderRadius)} ${w(e.borderRadius)} 0`
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
},
|
|
3021
|
+
[`&${t}-left`]: {
|
|
3022
|
+
[`> ${t}-nav ${t}-tab`]: {
|
|
3023
|
+
borderRadius: {
|
|
3024
|
+
_skip_check_: !0,
|
|
3025
|
+
value: `${w(e.borderRadius)} 0 0 ${w(e.borderRadius)}`
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
},
|
|
3030
|
+
[`&${t}-large`]: {
|
|
3031
|
+
[`> ${t}-nav`]: {
|
|
3032
|
+
[`${t}-tab`]: {
|
|
3033
|
+
padding: n
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
};
|
|
3039
|
+
}, no = (e) => {
|
|
3040
|
+
const {
|
|
3041
|
+
componentCls: t,
|
|
3042
|
+
itemActiveColor: a,
|
|
3043
|
+
itemHoverColor: n,
|
|
3044
|
+
iconCls: r,
|
|
3045
|
+
tabsHorizontalItemMargin: o,
|
|
3046
|
+
horizontalItemPadding: l,
|
|
3047
|
+
itemSelectedColor: s,
|
|
3048
|
+
itemColor: c
|
|
3049
|
+
} = e, u = `${t}-tab`;
|
|
3050
|
+
return {
|
|
3051
|
+
[u]: {
|
|
3052
|
+
position: "relative",
|
|
3053
|
+
WebkitTouchCallout: "none",
|
|
3054
|
+
WebkitTapHighlightColor: "transparent",
|
|
3055
|
+
display: "inline-flex",
|
|
3056
|
+
alignItems: "center",
|
|
3057
|
+
padding: l,
|
|
3058
|
+
fontSize: e.titleFontSize,
|
|
3059
|
+
background: "transparent",
|
|
3060
|
+
border: 0,
|
|
3061
|
+
outline: "none",
|
|
3062
|
+
cursor: "pointer",
|
|
3063
|
+
color: c,
|
|
3064
|
+
"&-btn, &-remove": {
|
|
3065
|
+
"&:focus:not(:focus-visible), &:active": {
|
|
3066
|
+
color: a
|
|
3067
|
+
}
|
|
3068
|
+
},
|
|
3069
|
+
"&-btn": {
|
|
3070
|
+
outline: "none",
|
|
3071
|
+
transition: `all ${e.motionDurationSlow}`,
|
|
3072
|
+
[`${u}-icon:not(:last-child)`]: {
|
|
3073
|
+
marginInlineEnd: e.marginSM
|
|
3074
|
+
}
|
|
3075
|
+
},
|
|
3076
|
+
"&-remove": Object.assign({
|
|
3077
|
+
flex: "none",
|
|
3078
|
+
marginRight: {
|
|
3079
|
+
_skip_check_: !0,
|
|
3080
|
+
value: e.calc(e.marginXXS).mul(-1).equal()
|
|
3081
|
+
},
|
|
3082
|
+
marginLeft: {
|
|
3083
|
+
_skip_check_: !0,
|
|
3084
|
+
value: e.marginXS
|
|
3085
|
+
},
|
|
3086
|
+
color: e.colorTextDescription,
|
|
3087
|
+
fontSize: e.fontSizeSM,
|
|
3088
|
+
background: "transparent",
|
|
3089
|
+
border: "none",
|
|
3090
|
+
outline: "none",
|
|
3091
|
+
cursor: "pointer",
|
|
3092
|
+
transition: `all ${e.motionDurationSlow}`,
|
|
3093
|
+
"&:hover": {
|
|
3094
|
+
color: e.colorTextHeading
|
|
3095
|
+
}
|
|
3096
|
+
}, xn(e)),
|
|
3097
|
+
"&:hover": {
|
|
3098
|
+
color: n
|
|
3099
|
+
},
|
|
3100
|
+
[`&${u}-active ${u}-btn`]: {
|
|
3101
|
+
color: s,
|
|
3102
|
+
textShadow: e.tabsActiveTextShadow
|
|
3103
|
+
},
|
|
3104
|
+
[`&${u}-focus ${u}-btn`]: Object.assign({}, ya(e)),
|
|
3105
|
+
[`&${u}-disabled`]: {
|
|
3106
|
+
color: e.colorTextDisabled,
|
|
3107
|
+
cursor: "not-allowed"
|
|
3108
|
+
},
|
|
3109
|
+
[`&${u}-disabled ${u}-btn, &${u}-disabled ${t}-remove`]: {
|
|
3110
|
+
"&:focus, &:active": {
|
|
3111
|
+
color: e.colorTextDisabled
|
|
3112
|
+
}
|
|
3113
|
+
},
|
|
3114
|
+
[`& ${u}-remove ${r}`]: {
|
|
3115
|
+
margin: 0
|
|
3116
|
+
},
|
|
3117
|
+
[`${r}:not(:last-child)`]: {
|
|
3118
|
+
marginRight: {
|
|
3119
|
+
_skip_check_: !0,
|
|
3120
|
+
value: e.marginSM
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
},
|
|
3124
|
+
[`${u} + ${u}`]: {
|
|
3125
|
+
margin: {
|
|
3126
|
+
_skip_check_: !0,
|
|
3127
|
+
value: o
|
|
3128
|
+
}
|
|
3129
|
+
}
|
|
3130
|
+
};
|
|
3131
|
+
}, ao = (e) => {
|
|
3132
|
+
const {
|
|
3133
|
+
componentCls: t,
|
|
3134
|
+
tabsHorizontalItemMarginRTL: a,
|
|
3135
|
+
iconCls: n,
|
|
3136
|
+
cardGutter: r,
|
|
3137
|
+
calc: o
|
|
3138
|
+
} = e;
|
|
3139
|
+
return {
|
|
3140
|
+
[`${t}-rtl`]: {
|
|
3141
|
+
direction: "rtl",
|
|
3142
|
+
[`${t}-nav`]: {
|
|
3143
|
+
[`${t}-tab`]: {
|
|
3144
|
+
margin: {
|
|
3145
|
+
_skip_check_: !0,
|
|
3146
|
+
value: a
|
|
3147
|
+
},
|
|
3148
|
+
[`${t}-tab:last-of-type`]: {
|
|
3149
|
+
marginLeft: {
|
|
3150
|
+
_skip_check_: !0,
|
|
3151
|
+
value: 0
|
|
3152
|
+
}
|
|
3153
|
+
},
|
|
3154
|
+
[n]: {
|
|
3155
|
+
marginRight: {
|
|
3156
|
+
_skip_check_: !0,
|
|
3157
|
+
value: 0
|
|
3158
|
+
},
|
|
3159
|
+
marginLeft: {
|
|
3160
|
+
_skip_check_: !0,
|
|
3161
|
+
value: w(e.marginSM)
|
|
3162
|
+
}
|
|
3163
|
+
},
|
|
3164
|
+
[`${t}-tab-remove`]: {
|
|
3165
|
+
marginRight: {
|
|
3166
|
+
_skip_check_: !0,
|
|
3167
|
+
value: w(e.marginXS)
|
|
3168
|
+
},
|
|
3169
|
+
marginLeft: {
|
|
3170
|
+
_skip_check_: !0,
|
|
3171
|
+
value: w(o(e.marginXXS).mul(-1).equal())
|
|
3172
|
+
},
|
|
3173
|
+
[n]: {
|
|
3174
|
+
margin: 0
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
}
|
|
3178
|
+
},
|
|
3179
|
+
[`&${t}-left`]: {
|
|
3180
|
+
[`> ${t}-nav`]: {
|
|
3181
|
+
order: 1
|
|
3182
|
+
},
|
|
3183
|
+
[`> ${t}-content-holder`]: {
|
|
3184
|
+
order: 0
|
|
3185
|
+
}
|
|
3186
|
+
},
|
|
3187
|
+
[`&${t}-right`]: {
|
|
3188
|
+
[`> ${t}-nav`]: {
|
|
3189
|
+
order: 0
|
|
3190
|
+
},
|
|
3191
|
+
[`> ${t}-content-holder`]: {
|
|
3192
|
+
order: 1
|
|
3193
|
+
}
|
|
3194
|
+
},
|
|
3195
|
+
// ====================== Card ======================
|
|
3196
|
+
[`&${t}-card${t}-top, &${t}-card${t}-bottom`]: {
|
|
3197
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
3198
|
+
[`${t}-tab + ${t}-tab`]: {
|
|
3199
|
+
marginRight: {
|
|
3200
|
+
_skip_check_: !0,
|
|
3201
|
+
value: r
|
|
3202
|
+
},
|
|
3203
|
+
marginLeft: {
|
|
3204
|
+
_skip_check_: !0,
|
|
3205
|
+
value: 0
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
},
|
|
3211
|
+
[`${t}-dropdown-rtl`]: {
|
|
3212
|
+
direction: "rtl"
|
|
3213
|
+
},
|
|
3214
|
+
[`${t}-menu-item`]: {
|
|
3215
|
+
[`${t}-dropdown-rtl`]: {
|
|
3216
|
+
textAlign: {
|
|
3217
|
+
_skip_check_: !0,
|
|
3218
|
+
value: "right"
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
};
|
|
3223
|
+
}, ro = (e) => {
|
|
3224
|
+
const {
|
|
3225
|
+
componentCls: t,
|
|
3226
|
+
tabsCardPadding: a,
|
|
3227
|
+
cardHeight: n,
|
|
3228
|
+
cardGutter: r,
|
|
3229
|
+
itemHoverColor: o,
|
|
3230
|
+
itemActiveColor: l,
|
|
3231
|
+
colorBorderSecondary: s
|
|
3232
|
+
} = e;
|
|
3233
|
+
return {
|
|
3234
|
+
[t]: Object.assign(Object.assign(Object.assign(Object.assign({}, Dn(e)), {
|
|
3235
|
+
display: "flex",
|
|
3236
|
+
// ========================== Navigation ==========================
|
|
3237
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
3238
|
+
position: "relative",
|
|
3239
|
+
display: "flex",
|
|
3240
|
+
flex: "none",
|
|
3241
|
+
alignItems: "center",
|
|
3242
|
+
[`${t}-nav-wrap`]: {
|
|
3243
|
+
position: "relative",
|
|
3244
|
+
display: "flex",
|
|
3245
|
+
flex: "auto",
|
|
3246
|
+
alignSelf: "stretch",
|
|
3247
|
+
overflow: "hidden",
|
|
3248
|
+
whiteSpace: "nowrap",
|
|
3249
|
+
transform: "translate(0)",
|
|
3250
|
+
// Fix chrome render bug
|
|
3251
|
+
// >>>>> Ping shadow
|
|
3252
|
+
"&::before, &::after": {
|
|
3253
|
+
position: "absolute",
|
|
3254
|
+
zIndex: 1,
|
|
3255
|
+
opacity: 0,
|
|
3256
|
+
transition: `opacity ${e.motionDurationSlow}`,
|
|
3257
|
+
content: "''",
|
|
3258
|
+
pointerEvents: "none"
|
|
3259
|
+
}
|
|
3260
|
+
},
|
|
3261
|
+
[`${t}-nav-list`]: {
|
|
3262
|
+
position: "relative",
|
|
3263
|
+
display: "flex",
|
|
3264
|
+
transition: `opacity ${e.motionDurationSlow}`
|
|
3265
|
+
},
|
|
3266
|
+
// >>>>>>>> Operations
|
|
3267
|
+
[`${t}-nav-operations`]: {
|
|
3268
|
+
display: "flex",
|
|
3269
|
+
alignSelf: "stretch"
|
|
3270
|
+
},
|
|
3271
|
+
[`${t}-nav-operations-hidden`]: {
|
|
3272
|
+
position: "absolute",
|
|
3273
|
+
visibility: "hidden",
|
|
3274
|
+
pointerEvents: "none"
|
|
3275
|
+
},
|
|
3276
|
+
[`${t}-nav-more`]: {
|
|
3277
|
+
position: "relative",
|
|
3278
|
+
padding: a,
|
|
3279
|
+
background: "transparent",
|
|
3280
|
+
border: 0,
|
|
3281
|
+
color: e.colorText,
|
|
3282
|
+
"&::after": {
|
|
3283
|
+
position: "absolute",
|
|
3284
|
+
right: {
|
|
3285
|
+
_skip_check_: !0,
|
|
3286
|
+
value: 0
|
|
3287
|
+
},
|
|
3288
|
+
bottom: 0,
|
|
3289
|
+
left: {
|
|
3290
|
+
_skip_check_: !0,
|
|
3291
|
+
value: 0
|
|
3292
|
+
},
|
|
3293
|
+
height: e.calc(e.controlHeightLG).div(8).equal(),
|
|
3294
|
+
transform: "translateY(100%)",
|
|
3295
|
+
content: "''"
|
|
3296
|
+
}
|
|
3297
|
+
},
|
|
3298
|
+
[`${t}-nav-add`]: Object.assign({
|
|
3299
|
+
minWidth: n,
|
|
3300
|
+
marginLeft: {
|
|
3301
|
+
_skip_check_: !0,
|
|
3302
|
+
value: r
|
|
3303
|
+
},
|
|
3304
|
+
padding: w(e.paddingXS),
|
|
3305
|
+
background: "transparent",
|
|
3306
|
+
border: `${w(e.lineWidth)} ${e.lineType} ${s}`,
|
|
3307
|
+
borderRadius: `${w(e.borderRadiusLG)} ${w(e.borderRadiusLG)} 0 0`,
|
|
3308
|
+
outline: "none",
|
|
3309
|
+
cursor: "pointer",
|
|
3310
|
+
color: e.colorText,
|
|
3311
|
+
transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`,
|
|
3312
|
+
"&:hover": {
|
|
3313
|
+
color: o
|
|
3314
|
+
},
|
|
3315
|
+
"&:active, &:focus:not(:focus-visible)": {
|
|
3316
|
+
color: l
|
|
3317
|
+
}
|
|
3318
|
+
}, xn(e, -3))
|
|
3319
|
+
},
|
|
3320
|
+
[`${t}-extra-content`]: {
|
|
3321
|
+
flex: "none"
|
|
3322
|
+
},
|
|
3323
|
+
// ============================ InkBar ============================
|
|
3324
|
+
[`${t}-ink-bar`]: {
|
|
3325
|
+
position: "absolute",
|
|
3326
|
+
background: e.inkBarColor,
|
|
3327
|
+
pointerEvents: "none"
|
|
3328
|
+
}
|
|
3329
|
+
}), no(e)), {
|
|
3330
|
+
// =========================== TabPanes ===========================
|
|
3331
|
+
[`${t}-content`]: {
|
|
3332
|
+
position: "relative",
|
|
3333
|
+
width: "100%"
|
|
3334
|
+
},
|
|
3335
|
+
[`${t}-content-holder`]: {
|
|
3336
|
+
flex: "auto",
|
|
3337
|
+
minWidth: 0,
|
|
3338
|
+
minHeight: 0
|
|
3339
|
+
},
|
|
3340
|
+
[`${t}-tabpane`]: Object.assign(Object.assign({}, xn(e)), {
|
|
3341
|
+
"&-hidden": {
|
|
3342
|
+
display: "none"
|
|
3343
|
+
}
|
|
3344
|
+
})
|
|
3345
|
+
}),
|
|
3346
|
+
[`${t}-centered`]: {
|
|
3347
|
+
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
3348
|
+
[`${t}-nav-wrap`]: {
|
|
3349
|
+
[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]: {
|
|
3350
|
+
margin: "auto"
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
};
|
|
3356
|
+
}, io = (e) => {
|
|
3357
|
+
const t = e.controlHeightLG;
|
|
3358
|
+
return {
|
|
3359
|
+
zIndexPopup: e.zIndexPopupBase + 50,
|
|
3360
|
+
cardBg: e.colorFillAlter,
|
|
3361
|
+
cardHeight: t,
|
|
3362
|
+
// Initialize with empty string, because cardPadding will be calculated with cardHeight by default.
|
|
3363
|
+
cardPadding: `${(t - Math.round(e.fontSize * e.lineHeight)) / 2 - e.lineWidth}px ${e.padding}px`,
|
|
3364
|
+
cardPaddingSM: `${e.paddingXXS * 1.5}px ${e.padding}px`,
|
|
3365
|
+
cardPaddingLG: `${e.paddingXS}px ${e.padding}px ${e.paddingXXS * 1.5}px`,
|
|
3366
|
+
titleFontSize: e.fontSize,
|
|
3367
|
+
titleFontSizeLG: e.fontSizeLG,
|
|
3368
|
+
titleFontSizeSM: e.fontSize,
|
|
3369
|
+
inkBarColor: e.colorPrimary,
|
|
3370
|
+
horizontalMargin: `0 0 ${e.margin}px 0`,
|
|
3371
|
+
horizontalItemGutter: 32,
|
|
3372
|
+
// Fixed Value
|
|
3373
|
+
// Initialize with empty string, because horizontalItemMargin will be calculated with horizontalItemGutter by default.
|
|
3374
|
+
horizontalItemMargin: "",
|
|
3375
|
+
horizontalItemMarginRTL: "",
|
|
3376
|
+
horizontalItemPadding: `${e.paddingSM}px 0`,
|
|
3377
|
+
horizontalItemPaddingSM: `${e.paddingXS}px 0`,
|
|
3378
|
+
horizontalItemPaddingLG: `${e.padding}px 0`,
|
|
3379
|
+
verticalItemPadding: `${e.paddingXS}px ${e.paddingLG}px`,
|
|
3380
|
+
verticalItemMargin: `${e.margin}px 0 0 0`,
|
|
3381
|
+
itemColor: e.colorText,
|
|
3382
|
+
itemSelectedColor: e.colorPrimary,
|
|
3383
|
+
itemHoverColor: e.colorPrimaryHover,
|
|
3384
|
+
itemActiveColor: e.colorPrimaryActive,
|
|
3385
|
+
cardGutter: e.marginXXS / 2
|
|
3386
|
+
};
|
|
3387
|
+
}, oo = On("Tabs", (e) => {
|
|
3388
|
+
const t = Tn(e, {
|
|
3389
|
+
// `cardPadding` is empty by default, so we could calculate with dynamic `cardHeight`
|
|
3390
|
+
tabsCardPadding: e.cardPadding,
|
|
3391
|
+
dropdownEdgeChildVerticalPadding: e.paddingXXS,
|
|
3392
|
+
tabsActiveTextShadow: "0 0 0.25px currentcolor",
|
|
3393
|
+
tabsDropdownHeight: 200,
|
|
3394
|
+
tabsDropdownWidth: 120,
|
|
3395
|
+
tabsHorizontalItemMargin: `0 0 0 ${w(e.horizontalItemGutter)}`,
|
|
3396
|
+
tabsHorizontalItemMarginRTL: `0 0 0 ${w(e.horizontalItemGutter)}`
|
|
3397
|
+
});
|
|
3398
|
+
return [to(t), ao(t), eo(t), Qi(t), Ji(t), ro(t), Zi(t)];
|
|
3399
|
+
}, io), Ha = () => null;
|
|
3400
|
+
process.env.NODE_ENV !== "production" && (Ha.displayName = "DeprecatedTabPane");
|
|
3401
|
+
var lo = function(e, t) {
|
|
3402
|
+
var a = {};
|
|
3403
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
3404
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
3405
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
3406
|
+
return a;
|
|
3407
|
+
};
|
|
3408
|
+
const Wn = (e) => {
|
|
3409
|
+
var t, a, n, r, o, l, s, c, u, v, d;
|
|
3410
|
+
const {
|
|
3411
|
+
type: f,
|
|
3412
|
+
className: h,
|
|
3413
|
+
rootClassName: S,
|
|
3414
|
+
size: g,
|
|
3415
|
+
onEdit: x,
|
|
3416
|
+
hideAdd: p,
|
|
3417
|
+
centered: C,
|
|
3418
|
+
addIcon: b,
|
|
3419
|
+
removeIcon: _,
|
|
3420
|
+
moreIcon: R,
|
|
3421
|
+
more: P,
|
|
3422
|
+
popupClassName: M,
|
|
3423
|
+
children: O,
|
|
3424
|
+
items: E,
|
|
3425
|
+
animated: T,
|
|
3426
|
+
style: y,
|
|
3427
|
+
indicatorSize: $,
|
|
3428
|
+
indicator: N
|
|
3429
|
+
} = e, I = lo(e, ["type", "className", "rootClassName", "size", "onEdit", "hideAdd", "centered", "addIcon", "removeIcon", "moreIcon", "more", "popupClassName", "children", "items", "animated", "style", "indicatorSize", "indicator"]), {
|
|
3430
|
+
prefixCls: j
|
|
3431
|
+
} = I, {
|
|
3432
|
+
direction: G,
|
|
3433
|
+
tabs: m,
|
|
3434
|
+
getPrefixCls: W,
|
|
3435
|
+
getPopupContainer: J
|
|
3436
|
+
} = i.useContext(Ve), F = W("tabs", j), ee = gr(F), [se, A, K] = oo(F, ee);
|
|
3437
|
+
let k;
|
|
3438
|
+
f === "editable-card" && (k = {
|
|
3439
|
+
onEdit: (fe, Pe) => {
|
|
3440
|
+
let {
|
|
3441
|
+
key: H,
|
|
3442
|
+
event: me
|
|
3443
|
+
} = Pe;
|
|
3444
|
+
x == null || x(fe === "add" ? me : H, fe);
|
|
3445
|
+
},
|
|
3446
|
+
removeIcon: (t = _ ?? (m == null ? void 0 : m.removeIcon)) !== null && t !== void 0 ? t : /* @__PURE__ */ i.createElement(vr, null),
|
|
3447
|
+
addIcon: (b ?? (m == null ? void 0 : m.addIcon)) || /* @__PURE__ */ i.createElement(Aa, null),
|
|
3448
|
+
showAdd: p !== !0
|
|
3449
|
+
});
|
|
3450
|
+
const V = W();
|
|
3451
|
+
if (process.env.NODE_ENV !== "production") {
|
|
3452
|
+
const fe = Ln("Tabs");
|
|
3453
|
+
process.env.NODE_ENV !== "production" && fe(!("onPrevClick" in e) && !("onNextClick" in e), "breaking", "`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."), process.env.NODE_ENV !== "production" && fe(!($ || m != null && m.indicatorSize), "deprecated", "`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead.");
|
|
3454
|
+
}
|
|
3455
|
+
const U = $a(g), q = Yi(E, O), te = qi(F, T), ie = Object.assign(Object.assign({}, m == null ? void 0 : m.style), y), de = {
|
|
3456
|
+
align: (a = N == null ? void 0 : N.align) !== null && a !== void 0 ? a : (n = m == null ? void 0 : m.indicator) === null || n === void 0 ? void 0 : n.align,
|
|
3457
|
+
size: (s = (o = (r = N == null ? void 0 : N.size) !== null && r !== void 0 ? r : $) !== null && o !== void 0 ? o : (l = m == null ? void 0 : m.indicator) === null || l === void 0 ? void 0 : l.size) !== null && s !== void 0 ? s : m == null ? void 0 : m.indicatorSize
|
|
3458
|
+
};
|
|
3459
|
+
return se(/* @__PURE__ */ i.createElement(Va, Object.assign({
|
|
3460
|
+
direction: G,
|
|
3461
|
+
getPopupContainer: J
|
|
3462
|
+
}, I, {
|
|
3463
|
+
items: q,
|
|
3464
|
+
className: D({
|
|
3465
|
+
[`${F}-${U}`]: U,
|
|
3466
|
+
[`${F}-card`]: ["card", "editable-card"].includes(f),
|
|
3467
|
+
[`${F}-editable-card`]: f === "editable-card",
|
|
3468
|
+
[`${F}-centered`]: C
|
|
3469
|
+
}, m == null ? void 0 : m.className, h, S, A, K, ee),
|
|
3470
|
+
popupClassName: D(M, A, K, ee),
|
|
3471
|
+
style: ie,
|
|
3472
|
+
editable: k,
|
|
3473
|
+
more: Object.assign({
|
|
3474
|
+
icon: (d = (v = (u = (c = m == null ? void 0 : m.more) === null || c === void 0 ? void 0 : c.icon) !== null && u !== void 0 ? u : m == null ? void 0 : m.moreIcon) !== null && v !== void 0 ? v : R) !== null && d !== void 0 ? d : /* @__PURE__ */ i.createElement(za, null),
|
|
3475
|
+
transitionName: `${V}-slide-up`
|
|
3476
|
+
}, P),
|
|
3477
|
+
prefixCls: F,
|
|
3478
|
+
animated: te,
|
|
3479
|
+
indicator: de
|
|
3480
|
+
})));
|
|
3481
|
+
};
|
|
3482
|
+
Wn.TabPane = Ha;
|
|
3483
|
+
process.env.NODE_ENV !== "production" && (Wn.displayName = "Tabs");
|
|
3484
|
+
var so = function(e, t) {
|
|
3485
|
+
var a = {};
|
|
3486
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
3487
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
3488
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
3489
|
+
return a;
|
|
3490
|
+
};
|
|
3491
|
+
const Ga = (e) => {
|
|
3492
|
+
var {
|
|
3493
|
+
prefixCls: t,
|
|
3494
|
+
className: a,
|
|
3495
|
+
hoverable: n = !0
|
|
3496
|
+
} = e, r = so(e, ["prefixCls", "className", "hoverable"]);
|
|
3497
|
+
const {
|
|
3498
|
+
getPrefixCls: o
|
|
3499
|
+
} = i.useContext(Ve), l = o("card", t), s = D(`${l}-grid`, a, {
|
|
3500
|
+
[`${l}-grid-hoverable`]: n
|
|
3501
|
+
});
|
|
3502
|
+
return /* @__PURE__ */ i.createElement("div", Object.assign({}, r, {
|
|
3503
|
+
className: s
|
|
3504
|
+
}));
|
|
3505
|
+
}, co = (e) => {
|
|
3506
|
+
const {
|
|
3507
|
+
antCls: t,
|
|
3508
|
+
componentCls: a,
|
|
3509
|
+
headerHeight: n,
|
|
3510
|
+
headerPadding: r,
|
|
3511
|
+
tabsMarginBottom: o
|
|
3512
|
+
} = e;
|
|
3513
|
+
return Object.assign(Object.assign({
|
|
3514
|
+
display: "flex",
|
|
3515
|
+
justifyContent: "center",
|
|
3516
|
+
flexDirection: "column",
|
|
3517
|
+
minHeight: n,
|
|
3518
|
+
marginBottom: -1,
|
|
3519
|
+
padding: `0 ${w(r)}`,
|
|
3520
|
+
color: e.colorTextHeading,
|
|
3521
|
+
fontWeight: e.fontWeightStrong,
|
|
3522
|
+
fontSize: e.headerFontSize,
|
|
3523
|
+
background: e.headerBg,
|
|
3524
|
+
borderBottom: `${w(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,
|
|
3525
|
+
borderRadius: `${w(e.borderRadiusLG)} ${w(e.borderRadiusLG)} 0 0`
|
|
3526
|
+
}, tn()), {
|
|
3527
|
+
"&-wrapper": {
|
|
3528
|
+
width: "100%",
|
|
3529
|
+
display: "flex",
|
|
3530
|
+
alignItems: "center"
|
|
3531
|
+
},
|
|
3532
|
+
"&-title": Object.assign(Object.assign({
|
|
3533
|
+
display: "inline-block",
|
|
3534
|
+
flex: 1
|
|
3535
|
+
}, zn), {
|
|
3536
|
+
[`
|
|
3537
|
+
> ${a}-typography,
|
|
3538
|
+
> ${a}-typography-edit-content
|
|
3539
|
+
`]: {
|
|
3540
|
+
insetInlineStart: 0,
|
|
3541
|
+
marginTop: 0,
|
|
3542
|
+
marginBottom: 0
|
|
3543
|
+
}
|
|
3544
|
+
}),
|
|
3545
|
+
[`${t}-tabs-top`]: {
|
|
3546
|
+
clear: "both",
|
|
3547
|
+
marginBottom: o,
|
|
3548
|
+
color: e.colorText,
|
|
3549
|
+
fontWeight: "normal",
|
|
3550
|
+
fontSize: e.fontSize,
|
|
3551
|
+
"&-bar": {
|
|
3552
|
+
borderBottom: `${w(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`
|
|
3553
|
+
}
|
|
3554
|
+
}
|
|
3555
|
+
});
|
|
3556
|
+
}, uo = (e) => {
|
|
3557
|
+
const {
|
|
3558
|
+
cardPaddingBase: t,
|
|
3559
|
+
colorBorderSecondary: a,
|
|
3560
|
+
cardShadow: n,
|
|
3561
|
+
lineWidth: r
|
|
3562
|
+
} = e;
|
|
3563
|
+
return {
|
|
3564
|
+
width: "33.33%",
|
|
3565
|
+
padding: t,
|
|
3566
|
+
border: 0,
|
|
3567
|
+
borderRadius: 0,
|
|
3568
|
+
boxShadow: `
|
|
3569
|
+
${w(r)} 0 0 0 ${a},
|
|
3570
|
+
0 ${w(r)} 0 0 ${a},
|
|
3571
|
+
${w(r)} ${w(r)} 0 0 ${a},
|
|
3572
|
+
${w(r)} 0 0 0 ${a} inset,
|
|
3573
|
+
0 ${w(r)} 0 0 ${a} inset;
|
|
3574
|
+
`,
|
|
3575
|
+
transition: `all ${e.motionDurationMid}`,
|
|
3576
|
+
"&-hoverable:hover": {
|
|
3577
|
+
position: "relative",
|
|
3578
|
+
zIndex: 1,
|
|
3579
|
+
boxShadow: n
|
|
3580
|
+
}
|
|
3581
|
+
};
|
|
3582
|
+
}, fo = (e) => {
|
|
3583
|
+
const {
|
|
3584
|
+
componentCls: t,
|
|
3585
|
+
iconCls: a,
|
|
3586
|
+
actionsLiMargin: n,
|
|
3587
|
+
cardActionsIconSize: r,
|
|
3588
|
+
colorBorderSecondary: o,
|
|
3589
|
+
actionsBg: l
|
|
3590
|
+
} = e;
|
|
3591
|
+
return Object.assign(Object.assign({
|
|
3592
|
+
margin: 0,
|
|
3593
|
+
padding: 0,
|
|
3594
|
+
listStyle: "none",
|
|
3595
|
+
background: l,
|
|
3596
|
+
borderTop: `${w(e.lineWidth)} ${e.lineType} ${o}`,
|
|
3597
|
+
display: "flex",
|
|
3598
|
+
borderRadius: `0 0 ${w(e.borderRadiusLG)} ${w(e.borderRadiusLG)}`
|
|
3599
|
+
}, tn()), {
|
|
3600
|
+
"& > li": {
|
|
3601
|
+
margin: n,
|
|
3602
|
+
color: e.colorTextDescription,
|
|
3603
|
+
textAlign: "center",
|
|
3604
|
+
"> span": {
|
|
3605
|
+
position: "relative",
|
|
3606
|
+
display: "block",
|
|
3607
|
+
minWidth: e.calc(e.cardActionsIconSize).mul(2).equal(),
|
|
3608
|
+
fontSize: e.fontSize,
|
|
3609
|
+
lineHeight: e.lineHeight,
|
|
3610
|
+
cursor: "pointer",
|
|
3611
|
+
"&:hover": {
|
|
3612
|
+
color: e.colorPrimary,
|
|
3613
|
+
transition: `color ${e.motionDurationMid}`
|
|
3614
|
+
},
|
|
3615
|
+
[`a:not(${t}-btn), > ${a}`]: {
|
|
3616
|
+
display: "inline-block",
|
|
3617
|
+
width: "100%",
|
|
3618
|
+
color: e.colorTextDescription,
|
|
3619
|
+
lineHeight: w(e.fontHeight),
|
|
3620
|
+
transition: `color ${e.motionDurationMid}`,
|
|
3621
|
+
"&:hover": {
|
|
3622
|
+
color: e.colorPrimary
|
|
3623
|
+
}
|
|
3624
|
+
},
|
|
3625
|
+
[`> ${a}`]: {
|
|
3626
|
+
fontSize: r,
|
|
3627
|
+
lineHeight: w(e.calc(r).mul(e.lineHeight).equal())
|
|
3628
|
+
}
|
|
3629
|
+
},
|
|
3630
|
+
"&:not(:last-child)": {
|
|
3631
|
+
borderInlineEnd: `${w(e.lineWidth)} ${e.lineType} ${o}`
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
});
|
|
3635
|
+
}, vo = (e) => Object.assign(Object.assign({
|
|
3636
|
+
margin: `${w(e.calc(e.marginXXS).mul(-1).equal())} 0`,
|
|
3637
|
+
display: "flex"
|
|
3638
|
+
}, tn()), {
|
|
3639
|
+
"&-avatar": {
|
|
3640
|
+
paddingInlineEnd: e.padding
|
|
3641
|
+
},
|
|
3642
|
+
"&-detail": {
|
|
3643
|
+
overflow: "hidden",
|
|
3644
|
+
flex: 1,
|
|
3645
|
+
"> div:not(:last-child)": {
|
|
3646
|
+
marginBottom: e.marginXS
|
|
3647
|
+
}
|
|
3648
|
+
},
|
|
3649
|
+
"&-title": Object.assign({
|
|
3650
|
+
color: e.colorTextHeading,
|
|
3651
|
+
fontWeight: e.fontWeightStrong,
|
|
3652
|
+
fontSize: e.fontSizeLG
|
|
3653
|
+
}, zn),
|
|
3654
|
+
"&-description": {
|
|
3655
|
+
color: e.colorTextDescription
|
|
3656
|
+
}
|
|
3657
|
+
}), mo = (e) => {
|
|
3658
|
+
const {
|
|
3659
|
+
componentCls: t,
|
|
3660
|
+
colorFillAlter: a,
|
|
3661
|
+
headerPadding: n,
|
|
3662
|
+
bodyPadding: r
|
|
3663
|
+
} = e;
|
|
3664
|
+
return {
|
|
3665
|
+
[`${t}-head`]: {
|
|
3666
|
+
padding: `0 ${w(n)}`,
|
|
3667
|
+
background: a,
|
|
3668
|
+
"&-title": {
|
|
3669
|
+
fontSize: e.fontSize
|
|
3670
|
+
}
|
|
3671
|
+
},
|
|
3672
|
+
[`${t}-body`]: {
|
|
3673
|
+
padding: `${w(e.padding)} ${w(r)}`
|
|
3674
|
+
}
|
|
3675
|
+
};
|
|
3676
|
+
}, go = (e) => {
|
|
3677
|
+
const {
|
|
3678
|
+
componentCls: t
|
|
3679
|
+
} = e;
|
|
3680
|
+
return {
|
|
3681
|
+
overflow: "hidden",
|
|
3682
|
+
[`${t}-body`]: {
|
|
3683
|
+
userSelect: "none"
|
|
3684
|
+
}
|
|
3685
|
+
};
|
|
3686
|
+
}, po = (e) => {
|
|
3687
|
+
const {
|
|
3688
|
+
componentCls: t,
|
|
3689
|
+
cardShadow: a,
|
|
3690
|
+
cardHeadPadding: n,
|
|
3691
|
+
colorBorderSecondary: r,
|
|
3692
|
+
boxShadowTertiary: o,
|
|
3693
|
+
bodyPadding: l,
|
|
3694
|
+
extraColor: s
|
|
3695
|
+
} = e;
|
|
3696
|
+
return {
|
|
3697
|
+
[t]: Object.assign(Object.assign({}, Dn(e)), {
|
|
3698
|
+
position: "relative",
|
|
3699
|
+
background: e.colorBgContainer,
|
|
3700
|
+
borderRadius: e.borderRadiusLG,
|
|
3701
|
+
[`&:not(${t}-bordered)`]: {
|
|
3702
|
+
boxShadow: o
|
|
3703
|
+
},
|
|
3704
|
+
[`${t}-head`]: co(e),
|
|
3705
|
+
[`${t}-extra`]: {
|
|
3706
|
+
// https://stackoverflow.com/a/22429853/3040605
|
|
3707
|
+
marginInlineStart: "auto",
|
|
3708
|
+
color: s,
|
|
3709
|
+
fontWeight: "normal",
|
|
3710
|
+
fontSize: e.fontSize
|
|
3711
|
+
},
|
|
3712
|
+
[`${t}-body`]: Object.assign({
|
|
3713
|
+
padding: l,
|
|
3714
|
+
borderRadius: `0 0 ${w(e.borderRadiusLG)} ${w(e.borderRadiusLG)}`
|
|
3715
|
+
}, tn()),
|
|
3716
|
+
[`${t}-grid`]: uo(e),
|
|
3717
|
+
[`${t}-cover`]: {
|
|
3718
|
+
"> *": {
|
|
3719
|
+
display: "block",
|
|
3720
|
+
width: "100%",
|
|
3721
|
+
borderRadius: `${w(e.borderRadiusLG)} ${w(e.borderRadiusLG)} 0 0`
|
|
3722
|
+
}
|
|
3723
|
+
},
|
|
3724
|
+
[`${t}-actions`]: fo(e),
|
|
3725
|
+
[`${t}-meta`]: vo(e)
|
|
3726
|
+
}),
|
|
3727
|
+
[`${t}-bordered`]: {
|
|
3728
|
+
border: `${w(e.lineWidth)} ${e.lineType} ${r}`,
|
|
3729
|
+
[`${t}-cover`]: {
|
|
3730
|
+
marginTop: -1,
|
|
3731
|
+
marginInlineStart: -1,
|
|
3732
|
+
marginInlineEnd: -1
|
|
3733
|
+
}
|
|
3734
|
+
},
|
|
3735
|
+
[`${t}-hoverable`]: {
|
|
3736
|
+
cursor: "pointer",
|
|
3737
|
+
transition: `box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,
|
|
3738
|
+
"&:hover": {
|
|
3739
|
+
borderColor: "transparent",
|
|
3740
|
+
boxShadow: a
|
|
3741
|
+
}
|
|
3742
|
+
},
|
|
3743
|
+
[`${t}-contain-grid`]: {
|
|
3744
|
+
borderRadius: `${w(e.borderRadiusLG)} ${w(e.borderRadiusLG)} 0 0 `,
|
|
3745
|
+
[`${t}-body`]: {
|
|
3746
|
+
display: "flex",
|
|
3747
|
+
flexWrap: "wrap"
|
|
3748
|
+
},
|
|
3749
|
+
[`&:not(${t}-loading) ${t}-body`]: {
|
|
3750
|
+
marginBlockStart: e.calc(e.lineWidth).mul(-1).equal(),
|
|
3751
|
+
marginInlineStart: e.calc(e.lineWidth).mul(-1).equal(),
|
|
3752
|
+
padding: 0
|
|
3753
|
+
}
|
|
3754
|
+
},
|
|
3755
|
+
[`${t}-contain-tabs`]: {
|
|
3756
|
+
[`> div${t}-head`]: {
|
|
3757
|
+
minHeight: 0,
|
|
3758
|
+
[`${t}-head-title, ${t}-extra`]: {
|
|
3759
|
+
paddingTop: n
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3762
|
+
},
|
|
3763
|
+
[`${t}-type-inner`]: mo(e),
|
|
3764
|
+
[`${t}-loading`]: go(e),
|
|
3765
|
+
[`${t}-rtl`]: {
|
|
3766
|
+
direction: "rtl"
|
|
3767
|
+
}
|
|
3768
|
+
};
|
|
3769
|
+
}, bo = (e) => {
|
|
3770
|
+
const {
|
|
3771
|
+
componentCls: t,
|
|
3772
|
+
bodyPaddingSM: a,
|
|
3773
|
+
headerPaddingSM: n,
|
|
3774
|
+
headerHeightSM: r,
|
|
3775
|
+
headerFontSizeSM: o
|
|
3776
|
+
} = e;
|
|
3777
|
+
return {
|
|
3778
|
+
[`${t}-small`]: {
|
|
3779
|
+
[`> ${t}-head`]: {
|
|
3780
|
+
minHeight: r,
|
|
3781
|
+
padding: `0 ${w(n)}`,
|
|
3782
|
+
fontSize: o,
|
|
3783
|
+
[`> ${t}-head-wrapper`]: {
|
|
3784
|
+
[`> ${t}-extra`]: {
|
|
3785
|
+
fontSize: e.fontSize
|
|
3786
|
+
}
|
|
3787
|
+
}
|
|
3788
|
+
},
|
|
3789
|
+
[`> ${t}-body`]: {
|
|
3790
|
+
padding: a
|
|
3791
|
+
}
|
|
3792
|
+
},
|
|
3793
|
+
[`${t}-small${t}-contain-tabs`]: {
|
|
3794
|
+
[`> ${t}-head`]: {
|
|
3795
|
+
[`${t}-head-title, ${t}-extra`]: {
|
|
3796
|
+
paddingTop: 0,
|
|
3797
|
+
display: "flex",
|
|
3798
|
+
alignItems: "center"
|
|
3799
|
+
}
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3802
|
+
};
|
|
3803
|
+
}, ho = (e) => {
|
|
3804
|
+
var t, a;
|
|
3805
|
+
return {
|
|
3806
|
+
headerBg: "transparent",
|
|
3807
|
+
headerFontSize: e.fontSizeLG,
|
|
3808
|
+
headerFontSizeSM: e.fontSize,
|
|
3809
|
+
headerHeight: e.fontSizeLG * e.lineHeightLG + e.padding * 2,
|
|
3810
|
+
headerHeightSM: e.fontSize * e.lineHeight + e.paddingXS * 2,
|
|
3811
|
+
actionsBg: e.colorBgContainer,
|
|
3812
|
+
actionsLiMargin: `${e.paddingSM}px 0`,
|
|
3813
|
+
tabsMarginBottom: -e.padding - e.lineWidth,
|
|
3814
|
+
extraColor: e.colorText,
|
|
3815
|
+
bodyPaddingSM: 12,
|
|
3816
|
+
// Fixed padding.
|
|
3817
|
+
headerPaddingSM: 12,
|
|
3818
|
+
bodyPadding: (t = e.bodyPadding) !== null && t !== void 0 ? t : e.paddingLG,
|
|
3819
|
+
headerPadding: (a = e.headerPadding) !== null && a !== void 0 ? a : e.paddingLG
|
|
3820
|
+
};
|
|
3821
|
+
}, yo = On("Card", (e) => {
|
|
3822
|
+
const t = Tn(e, {
|
|
3823
|
+
cardShadow: e.boxShadowCard,
|
|
3824
|
+
cardHeadPadding: e.padding,
|
|
3825
|
+
cardPaddingBase: e.paddingLG,
|
|
3826
|
+
cardActionsIconSize: e.fontSize
|
|
3827
|
+
});
|
|
3828
|
+
return [
|
|
3829
|
+
// Style
|
|
3830
|
+
po(t),
|
|
3831
|
+
// Size
|
|
3832
|
+
bo(t)
|
|
3833
|
+
];
|
|
3834
|
+
}, ho);
|
|
3835
|
+
var da = function(e, t) {
|
|
3836
|
+
var a = {};
|
|
3837
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
3838
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
3839
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
3840
|
+
return a;
|
|
3841
|
+
};
|
|
3842
|
+
const Co = (e) => {
|
|
3843
|
+
const {
|
|
3844
|
+
actionClasses: t,
|
|
3845
|
+
actions: a = [],
|
|
3846
|
+
actionStyle: n
|
|
3847
|
+
} = e;
|
|
3848
|
+
return /* @__PURE__ */ i.createElement("ul", {
|
|
3849
|
+
className: t,
|
|
3850
|
+
style: n
|
|
3851
|
+
}, a.map((r, o) => {
|
|
3852
|
+
const l = `action-${o}`;
|
|
3853
|
+
return /* @__PURE__ */ i.createElement("li", {
|
|
3854
|
+
style: {
|
|
3855
|
+
width: `${100 / a.length}%`
|
|
3856
|
+
},
|
|
3857
|
+
key: l
|
|
3858
|
+
}, /* @__PURE__ */ i.createElement("span", null, r));
|
|
3859
|
+
}));
|
|
3860
|
+
}, $o = /* @__PURE__ */ i.forwardRef((e, t) => {
|
|
3861
|
+
const {
|
|
3862
|
+
prefixCls: a,
|
|
3863
|
+
className: n,
|
|
3864
|
+
rootClassName: r,
|
|
3865
|
+
style: o,
|
|
3866
|
+
extra: l,
|
|
3867
|
+
headStyle: s = {},
|
|
3868
|
+
bodyStyle: c = {},
|
|
3869
|
+
title: u,
|
|
3870
|
+
loading: v,
|
|
3871
|
+
bordered: d = !0,
|
|
3872
|
+
size: f,
|
|
3873
|
+
type: h,
|
|
3874
|
+
cover: S,
|
|
3875
|
+
actions: g,
|
|
3876
|
+
tabList: x,
|
|
3877
|
+
children: p,
|
|
3878
|
+
activeTabKey: C,
|
|
3879
|
+
defaultActiveTabKey: b,
|
|
3880
|
+
tabBarExtraContent: _,
|
|
3881
|
+
hoverable: R,
|
|
3882
|
+
tabProps: P = {},
|
|
3883
|
+
classNames: M,
|
|
3884
|
+
styles: O
|
|
3885
|
+
} = e, E = da(e, ["prefixCls", "className", "rootClassName", "style", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps", "classNames", "styles"]), {
|
|
3886
|
+
getPrefixCls: T,
|
|
3887
|
+
direction: y,
|
|
3888
|
+
card: $
|
|
3889
|
+
} = i.useContext(Ve);
|
|
3890
|
+
if (process.env.NODE_ENV !== "production") {
|
|
3891
|
+
const oe = Ln("Card");
|
|
3892
|
+
[["headStyle", "styles.header"], ["bodyStyle", "styles.body"]].forEach((Z) => {
|
|
3893
|
+
let [ye, Ie] = Z;
|
|
3894
|
+
oe.deprecated(!(ye in e), ye, Ie);
|
|
3895
|
+
});
|
|
3896
|
+
}
|
|
3897
|
+
const N = (oe) => {
|
|
3898
|
+
var Z;
|
|
3899
|
+
(Z = e.onTabChange) === null || Z === void 0 || Z.call(e, oe);
|
|
3900
|
+
}, I = (oe) => {
|
|
3901
|
+
var Z;
|
|
3902
|
+
return D((Z = $ == null ? void 0 : $.classNames) === null || Z === void 0 ? void 0 : Z[oe], M == null ? void 0 : M[oe]);
|
|
3903
|
+
}, j = (oe) => {
|
|
3904
|
+
var Z;
|
|
3905
|
+
return Object.assign(Object.assign({}, (Z = $ == null ? void 0 : $.styles) === null || Z === void 0 ? void 0 : Z[oe]), O == null ? void 0 : O[oe]);
|
|
3906
|
+
}, G = i.useMemo(() => {
|
|
3907
|
+
let oe = !1;
|
|
3908
|
+
return i.Children.forEach(p, (Z) => {
|
|
3909
|
+
(Z == null ? void 0 : Z.type) === Ga && (oe = !0);
|
|
3910
|
+
}), oe;
|
|
3911
|
+
}, [p]), m = T("card", a), [W, J, F] = yo(m), ee = /* @__PURE__ */ i.createElement(ot, {
|
|
3912
|
+
loading: !0,
|
|
3913
|
+
active: !0,
|
|
3914
|
+
paragraph: {
|
|
3915
|
+
rows: 4
|
|
3916
|
+
},
|
|
3917
|
+
title: !1
|
|
3918
|
+
}, p), se = C !== void 0, A = Object.assign(Object.assign({}, P), {
|
|
3919
|
+
[se ? "activeKey" : "defaultActiveKey"]: se ? C : b,
|
|
3920
|
+
tabBarExtraContent: _
|
|
3921
|
+
});
|
|
3922
|
+
let K;
|
|
3923
|
+
const k = $a(f), V = !k || k === "default" ? "large" : k, U = x ? /* @__PURE__ */ i.createElement(Wn, Object.assign({
|
|
3924
|
+
size: V
|
|
3925
|
+
}, A, {
|
|
3926
|
+
className: `${m}-head-tabs`,
|
|
3927
|
+
onChange: N,
|
|
3928
|
+
items: x.map((oe) => {
|
|
3929
|
+
var {
|
|
3930
|
+
tab: Z
|
|
3931
|
+
} = oe, ye = da(oe, ["tab"]);
|
|
3932
|
+
return Object.assign({
|
|
3933
|
+
label: Z
|
|
3934
|
+
}, ye);
|
|
3935
|
+
})
|
|
3936
|
+
})) : null;
|
|
3937
|
+
if (u || l || U) {
|
|
3938
|
+
const oe = D(`${m}-head`, I("header")), Z = D(`${m}-head-title`, I("title")), ye = D(`${m}-extra`, I("extra")), Ie = Object.assign(Object.assign({}, s), j("header"));
|
|
3939
|
+
K = /* @__PURE__ */ i.createElement("div", {
|
|
3940
|
+
className: oe,
|
|
3941
|
+
style: Ie
|
|
3942
|
+
}, /* @__PURE__ */ i.createElement("div", {
|
|
3943
|
+
className: `${m}-head-wrapper`
|
|
3944
|
+
}, u && /* @__PURE__ */ i.createElement("div", {
|
|
3945
|
+
className: Z,
|
|
3946
|
+
style: j("title")
|
|
3947
|
+
}, u), l && /* @__PURE__ */ i.createElement("div", {
|
|
3948
|
+
className: ye,
|
|
3949
|
+
style: j("extra")
|
|
3950
|
+
}, l)), U);
|
|
3951
|
+
}
|
|
3952
|
+
const q = D(`${m}-cover`, I("cover")), te = S ? /* @__PURE__ */ i.createElement("div", {
|
|
3953
|
+
className: q,
|
|
3954
|
+
style: j("cover")
|
|
3955
|
+
}, S) : null, ie = D(`${m}-body`, I("body")), de = Object.assign(Object.assign({}, c), j("body")), fe = /* @__PURE__ */ i.createElement("div", {
|
|
3956
|
+
className: ie,
|
|
3957
|
+
style: de
|
|
3958
|
+
}, v ? ee : p), Pe = D(`${m}-actions`, I("actions")), H = g != null && g.length ? /* @__PURE__ */ i.createElement(Co, {
|
|
3959
|
+
actionClasses: Pe,
|
|
3960
|
+
actionStyle: j("actions"),
|
|
3961
|
+
actions: g
|
|
3962
|
+
}) : null, me = it(E, ["onTabChange"]), De = D(m, $ == null ? void 0 : $.className, {
|
|
3963
|
+
[`${m}-loading`]: v,
|
|
3964
|
+
[`${m}-bordered`]: d,
|
|
3965
|
+
[`${m}-hoverable`]: R,
|
|
3966
|
+
[`${m}-contain-grid`]: G,
|
|
3967
|
+
[`${m}-contain-tabs`]: x == null ? void 0 : x.length,
|
|
3968
|
+
[`${m}-${k}`]: k,
|
|
3969
|
+
[`${m}-type-${h}`]: !!h,
|
|
3970
|
+
[`${m}-rtl`]: y === "rtl"
|
|
3971
|
+
}, n, r, J, F), Xe = Object.assign(Object.assign({}, $ == null ? void 0 : $.style), o);
|
|
3972
|
+
return W(/* @__PURE__ */ i.createElement("div", Object.assign({
|
|
3973
|
+
ref: t
|
|
3974
|
+
}, me, {
|
|
3975
|
+
className: De,
|
|
3976
|
+
style: Xe
|
|
3977
|
+
}), K, te, fe, H));
|
|
3978
|
+
});
|
|
3979
|
+
var So = function(e, t) {
|
|
3980
|
+
var a = {};
|
|
3981
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
3982
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
3983
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
3984
|
+
return a;
|
|
3985
|
+
};
|
|
3986
|
+
const xo = (e) => {
|
|
3987
|
+
const {
|
|
3988
|
+
prefixCls: t,
|
|
3989
|
+
className: a,
|
|
3990
|
+
avatar: n,
|
|
3991
|
+
title: r,
|
|
3992
|
+
description: o
|
|
3993
|
+
} = e, l = So(e, ["prefixCls", "className", "avatar", "title", "description"]), {
|
|
3994
|
+
getPrefixCls: s
|
|
3995
|
+
} = i.useContext(Ve), c = s("card", t), u = D(`${c}-meta`, a), v = n ? /* @__PURE__ */ i.createElement("div", {
|
|
3996
|
+
className: `${c}-meta-avatar`
|
|
3997
|
+
}, n) : null, d = r ? /* @__PURE__ */ i.createElement("div", {
|
|
3998
|
+
className: `${c}-meta-title`
|
|
3999
|
+
}, r) : null, f = o ? /* @__PURE__ */ i.createElement("div", {
|
|
4000
|
+
className: `${c}-meta-description`
|
|
4001
|
+
}, o) : null, h = d || f ? /* @__PURE__ */ i.createElement("div", {
|
|
4002
|
+
className: `${c}-meta-detail`
|
|
4003
|
+
}, d, f) : null;
|
|
4004
|
+
return /* @__PURE__ */ i.createElement("div", Object.assign({}, l, {
|
|
4005
|
+
className: u
|
|
4006
|
+
}), v, h);
|
|
4007
|
+
}, cn = $o;
|
|
4008
|
+
cn.Grid = Ga;
|
|
4009
|
+
cn.Meta = xo;
|
|
4010
|
+
process.env.NODE_ENV !== "production" && (cn.displayName = "Card");
|
|
4011
|
+
const Ao = fa(cn)`
|
|
4012
|
+
.ant-card-body {
|
|
4013
|
+
display: flex;
|
|
4014
|
+
flex-direction: column;
|
|
4015
|
+
align-items: center;
|
|
4016
|
+
cursor: pointer;
|
|
4017
|
+
color: green;
|
|
4018
|
+
padding: 14px;
|
|
4019
|
+
background-color: white;
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
&:hover {
|
|
4023
|
+
.ant-card-body {
|
|
4024
|
+
color: red;
|
|
4025
|
+
}
|
|
4026
|
+
}
|
|
4027
|
+
`, ko = fa(Ja.Title)`
|
|
4028
|
+
&.ant-typography {
|
|
4029
|
+
color: green !important;
|
|
4030
|
+
margin-bottom: 14px;
|
|
4031
|
+
font-size: 16px;
|
|
4032
|
+
font-weight: 700;
|
|
4033
|
+
}
|
|
4034
|
+
`;
|
|
4035
|
+
export {
|
|
4036
|
+
Ao as Card,
|
|
4037
|
+
ko as Headline
|
|
4038
|
+
};
|