@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,946 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { forwardRef as Le, useRef as ke, useImperativeHandle as De } from "react";
|
|
3
|
+
import { c as j, d as Be, a as X, _ as Me, z as W, m as He, n as fe, D as Xe, H as se, C as ue, N as We, A as Ye } from "./index-BWys7dkb.js";
|
|
4
|
+
import { K as v, i as Ze, T as Ke, u as qe, g as Fe, z as Ue } from "./index-VDH3iLaC.js";
|
|
5
|
+
import { u as Ge } from "./isVisible-CNQjrJPN.js";
|
|
6
|
+
import { C as Je } from "./ContextIsolator-CGkdKtc3.js";
|
|
7
|
+
import { i as Qe, c as et } from "./reactNode-sKPeiqPL.js";
|
|
8
|
+
import { P as G } from "./presetColors-Cl8UP3Nw.js";
|
|
9
|
+
function tt(t, o) {
|
|
10
|
+
return G.reduce((r, e) => {
|
|
11
|
+
const n = t[`${e}1`], s = t[`${e}3`], a = t[`${e}6`], i = t[`${e}7`];
|
|
12
|
+
return Object.assign(Object.assign({}, r), o(e, {
|
|
13
|
+
lightColor: n,
|
|
14
|
+
lightBorderColor: s,
|
|
15
|
+
darkColor: a,
|
|
16
|
+
textColor: i
|
|
17
|
+
}));
|
|
18
|
+
}, {});
|
|
19
|
+
}
|
|
20
|
+
const ot = new v("antZoomIn", {
|
|
21
|
+
"0%": {
|
|
22
|
+
transform: "scale(0.2)",
|
|
23
|
+
opacity: 0
|
|
24
|
+
},
|
|
25
|
+
"100%": {
|
|
26
|
+
transform: "scale(1)",
|
|
27
|
+
opacity: 1
|
|
28
|
+
}
|
|
29
|
+
}), nt = new v("antZoomOut", {
|
|
30
|
+
"0%": {
|
|
31
|
+
transform: "scale(1)"
|
|
32
|
+
},
|
|
33
|
+
"100%": {
|
|
34
|
+
transform: "scale(0.2)",
|
|
35
|
+
opacity: 0
|
|
36
|
+
}
|
|
37
|
+
}), ie = new v("antZoomBigIn", {
|
|
38
|
+
"0%": {
|
|
39
|
+
transform: "scale(0.8)",
|
|
40
|
+
opacity: 0
|
|
41
|
+
},
|
|
42
|
+
"100%": {
|
|
43
|
+
transform: "scale(1)",
|
|
44
|
+
opacity: 1
|
|
45
|
+
}
|
|
46
|
+
}), le = new v("antZoomBigOut", {
|
|
47
|
+
"0%": {
|
|
48
|
+
transform: "scale(1)"
|
|
49
|
+
},
|
|
50
|
+
"100%": {
|
|
51
|
+
transform: "scale(0.8)",
|
|
52
|
+
opacity: 0
|
|
53
|
+
}
|
|
54
|
+
}), rt = new v("antZoomUpIn", {
|
|
55
|
+
"0%": {
|
|
56
|
+
transform: "scale(0.8)",
|
|
57
|
+
transformOrigin: "50% 0%",
|
|
58
|
+
opacity: 0
|
|
59
|
+
},
|
|
60
|
+
"100%": {
|
|
61
|
+
transform: "scale(1)",
|
|
62
|
+
transformOrigin: "50% 0%"
|
|
63
|
+
}
|
|
64
|
+
}), at = new v("antZoomUpOut", {
|
|
65
|
+
"0%": {
|
|
66
|
+
transform: "scale(1)",
|
|
67
|
+
transformOrigin: "50% 0%"
|
|
68
|
+
},
|
|
69
|
+
"100%": {
|
|
70
|
+
transform: "scale(0.8)",
|
|
71
|
+
transformOrigin: "50% 0%",
|
|
72
|
+
opacity: 0
|
|
73
|
+
}
|
|
74
|
+
}), st = new v("antZoomLeftIn", {
|
|
75
|
+
"0%": {
|
|
76
|
+
transform: "scale(0.8)",
|
|
77
|
+
transformOrigin: "0% 50%",
|
|
78
|
+
opacity: 0
|
|
79
|
+
},
|
|
80
|
+
"100%": {
|
|
81
|
+
transform: "scale(1)",
|
|
82
|
+
transformOrigin: "0% 50%"
|
|
83
|
+
}
|
|
84
|
+
}), it = new v("antZoomLeftOut", {
|
|
85
|
+
"0%": {
|
|
86
|
+
transform: "scale(1)",
|
|
87
|
+
transformOrigin: "0% 50%"
|
|
88
|
+
},
|
|
89
|
+
"100%": {
|
|
90
|
+
transform: "scale(0.8)",
|
|
91
|
+
transformOrigin: "0% 50%",
|
|
92
|
+
opacity: 0
|
|
93
|
+
}
|
|
94
|
+
}), lt = new v("antZoomRightIn", {
|
|
95
|
+
"0%": {
|
|
96
|
+
transform: "scale(0.8)",
|
|
97
|
+
transformOrigin: "100% 50%",
|
|
98
|
+
opacity: 0
|
|
99
|
+
},
|
|
100
|
+
"100%": {
|
|
101
|
+
transform: "scale(1)",
|
|
102
|
+
transformOrigin: "100% 50%"
|
|
103
|
+
}
|
|
104
|
+
}), ct = new v("antZoomRightOut", {
|
|
105
|
+
"0%": {
|
|
106
|
+
transform: "scale(1)",
|
|
107
|
+
transformOrigin: "100% 50%"
|
|
108
|
+
},
|
|
109
|
+
"100%": {
|
|
110
|
+
transform: "scale(0.8)",
|
|
111
|
+
transformOrigin: "100% 50%",
|
|
112
|
+
opacity: 0
|
|
113
|
+
}
|
|
114
|
+
}), ft = new v("antZoomDownIn", {
|
|
115
|
+
"0%": {
|
|
116
|
+
transform: "scale(0.8)",
|
|
117
|
+
transformOrigin: "50% 100%",
|
|
118
|
+
opacity: 0
|
|
119
|
+
},
|
|
120
|
+
"100%": {
|
|
121
|
+
transform: "scale(1)",
|
|
122
|
+
transformOrigin: "50% 100%"
|
|
123
|
+
}
|
|
124
|
+
}), ut = new v("antZoomDownOut", {
|
|
125
|
+
"0%": {
|
|
126
|
+
transform: "scale(1)",
|
|
127
|
+
transformOrigin: "50% 100%"
|
|
128
|
+
},
|
|
129
|
+
"100%": {
|
|
130
|
+
transform: "scale(0.8)",
|
|
131
|
+
transformOrigin: "50% 100%",
|
|
132
|
+
opacity: 0
|
|
133
|
+
}
|
|
134
|
+
}), mt = {
|
|
135
|
+
zoom: {
|
|
136
|
+
inKeyframes: ot,
|
|
137
|
+
outKeyframes: nt
|
|
138
|
+
},
|
|
139
|
+
"zoom-big": {
|
|
140
|
+
inKeyframes: ie,
|
|
141
|
+
outKeyframes: le
|
|
142
|
+
},
|
|
143
|
+
"zoom-big-fast": {
|
|
144
|
+
inKeyframes: ie,
|
|
145
|
+
outKeyframes: le
|
|
146
|
+
},
|
|
147
|
+
"zoom-left": {
|
|
148
|
+
inKeyframes: st,
|
|
149
|
+
outKeyframes: it
|
|
150
|
+
},
|
|
151
|
+
"zoom-right": {
|
|
152
|
+
inKeyframes: lt,
|
|
153
|
+
outKeyframes: ct
|
|
154
|
+
},
|
|
155
|
+
"zoom-up": {
|
|
156
|
+
inKeyframes: rt,
|
|
157
|
+
outKeyframes: at
|
|
158
|
+
},
|
|
159
|
+
"zoom-down": {
|
|
160
|
+
inKeyframes: ft,
|
|
161
|
+
outKeyframes: ut
|
|
162
|
+
}
|
|
163
|
+
}, dt = (t, o) => {
|
|
164
|
+
const {
|
|
165
|
+
antCls: r
|
|
166
|
+
} = t, e = `${r}-${o}`, {
|
|
167
|
+
inKeyframes: n,
|
|
168
|
+
outKeyframes: s
|
|
169
|
+
} = mt[o];
|
|
170
|
+
return [Ze(e, n, s, t.motionDurationFast), {
|
|
171
|
+
[`
|
|
172
|
+
${e}-enter,
|
|
173
|
+
${e}-appear
|
|
174
|
+
`]: {
|
|
175
|
+
transform: "scale(0)",
|
|
176
|
+
opacity: 0,
|
|
177
|
+
animationTimingFunction: t.motionEaseOutCirc,
|
|
178
|
+
"&-prepare": {
|
|
179
|
+
transform: "none"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
[`${e}-leave`]: {
|
|
183
|
+
animationTimingFunction: t.motionEaseInOutCirc
|
|
184
|
+
}
|
|
185
|
+
}];
|
|
186
|
+
};
|
|
187
|
+
function me(t) {
|
|
188
|
+
var o = t.children, r = t.prefixCls, e = t.id, n = t.overlayInnerStyle, s = t.bodyClassName, a = t.className, i = t.style;
|
|
189
|
+
return /* @__PURE__ */ u.createElement("div", {
|
|
190
|
+
className: j("".concat(r, "-content"), a),
|
|
191
|
+
style: i
|
|
192
|
+
}, /* @__PURE__ */ u.createElement("div", {
|
|
193
|
+
className: j("".concat(r, "-inner"), s),
|
|
194
|
+
id: e,
|
|
195
|
+
role: "tooltip",
|
|
196
|
+
style: n
|
|
197
|
+
}, typeof o == "function" ? o() : o));
|
|
198
|
+
}
|
|
199
|
+
var k = {
|
|
200
|
+
shiftX: 64,
|
|
201
|
+
adjustY: 1
|
|
202
|
+
}, D = {
|
|
203
|
+
adjustX: 1,
|
|
204
|
+
shiftY: !0
|
|
205
|
+
}, w = [0, 0], pt = {
|
|
206
|
+
left: {
|
|
207
|
+
points: ["cr", "cl"],
|
|
208
|
+
overflow: D,
|
|
209
|
+
offset: [-4, 0],
|
|
210
|
+
targetOffset: w
|
|
211
|
+
},
|
|
212
|
+
right: {
|
|
213
|
+
points: ["cl", "cr"],
|
|
214
|
+
overflow: D,
|
|
215
|
+
offset: [4, 0],
|
|
216
|
+
targetOffset: w
|
|
217
|
+
},
|
|
218
|
+
top: {
|
|
219
|
+
points: ["bc", "tc"],
|
|
220
|
+
overflow: k,
|
|
221
|
+
offset: [0, -4],
|
|
222
|
+
targetOffset: w
|
|
223
|
+
},
|
|
224
|
+
bottom: {
|
|
225
|
+
points: ["tc", "bc"],
|
|
226
|
+
overflow: k,
|
|
227
|
+
offset: [0, 4],
|
|
228
|
+
targetOffset: w
|
|
229
|
+
},
|
|
230
|
+
topLeft: {
|
|
231
|
+
points: ["bl", "tl"],
|
|
232
|
+
overflow: k,
|
|
233
|
+
offset: [0, -4],
|
|
234
|
+
targetOffset: w
|
|
235
|
+
},
|
|
236
|
+
leftTop: {
|
|
237
|
+
points: ["tr", "tl"],
|
|
238
|
+
overflow: D,
|
|
239
|
+
offset: [-4, 0],
|
|
240
|
+
targetOffset: w
|
|
241
|
+
},
|
|
242
|
+
topRight: {
|
|
243
|
+
points: ["br", "tr"],
|
|
244
|
+
overflow: k,
|
|
245
|
+
offset: [0, -4],
|
|
246
|
+
targetOffset: w
|
|
247
|
+
},
|
|
248
|
+
rightTop: {
|
|
249
|
+
points: ["tl", "tr"],
|
|
250
|
+
overflow: D,
|
|
251
|
+
offset: [4, 0],
|
|
252
|
+
targetOffset: w
|
|
253
|
+
},
|
|
254
|
+
bottomRight: {
|
|
255
|
+
points: ["tr", "br"],
|
|
256
|
+
overflow: k,
|
|
257
|
+
offset: [0, 4],
|
|
258
|
+
targetOffset: w
|
|
259
|
+
},
|
|
260
|
+
rightBottom: {
|
|
261
|
+
points: ["bl", "br"],
|
|
262
|
+
overflow: D,
|
|
263
|
+
offset: [4, 0],
|
|
264
|
+
targetOffset: w
|
|
265
|
+
},
|
|
266
|
+
bottomLeft: {
|
|
267
|
+
points: ["tl", "bl"],
|
|
268
|
+
overflow: k,
|
|
269
|
+
offset: [0, 4],
|
|
270
|
+
targetOffset: w
|
|
271
|
+
},
|
|
272
|
+
leftBottom: {
|
|
273
|
+
points: ["br", "bl"],
|
|
274
|
+
overflow: D,
|
|
275
|
+
offset: [-4, 0],
|
|
276
|
+
targetOffset: w
|
|
277
|
+
}
|
|
278
|
+
}, gt = ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle", "arrowContent", "overlay", "id", "showArrow", "classNames", "styles"], bt = function(o, r) {
|
|
279
|
+
var e = o.overlayClassName, n = o.trigger, s = n === void 0 ? ["hover"] : n, a = o.mouseEnterDelay, i = a === void 0 ? 0 : a, l = o.mouseLeaveDelay, m = l === void 0 ? 0.1 : l, h = o.overlayStyle, c = o.prefixCls, d = c === void 0 ? "rc-tooltip" : c, y = o.children, O = o.onVisibleChange, $ = o.afterVisibleChange, _ = o.transitionName, b = o.animation, g = o.motion, x = o.placement, T = x === void 0 ? "right" : x, z = o.align, J = z === void 0 ? {} : z, B = o.destroyTooltipOnHide, I = B === void 0 ? !1 : B, Q = o.defaultVisible, Y = o.getTooltipContainer, ee = o.overlayInnerStyle;
|
|
280
|
+
o.arrowContent;
|
|
281
|
+
var f = o.overlay, R = o.id, A = o.showArrow, Z = A === void 0 ? !0 : A, P = o.classNames, N = o.styles, M = Be(o, gt), K = ke(null);
|
|
282
|
+
De(r, function() {
|
|
283
|
+
return K.current;
|
|
284
|
+
});
|
|
285
|
+
var q = X({}, M);
|
|
286
|
+
"visible" in o && (q.popupVisible = o.visible);
|
|
287
|
+
var H = function() {
|
|
288
|
+
return /* @__PURE__ */ u.createElement(me, {
|
|
289
|
+
key: "content",
|
|
290
|
+
prefixCls: d,
|
|
291
|
+
id: R,
|
|
292
|
+
bodyClassName: P == null ? void 0 : P.body,
|
|
293
|
+
overlayInnerStyle: X(X({}, ee), N == null ? void 0 : N.body)
|
|
294
|
+
}, f);
|
|
295
|
+
};
|
|
296
|
+
return /* @__PURE__ */ u.createElement(Ke, Me({
|
|
297
|
+
popupClassName: j(e, P == null ? void 0 : P.root),
|
|
298
|
+
prefixCls: d,
|
|
299
|
+
popup: H,
|
|
300
|
+
action: s,
|
|
301
|
+
builtinPlacements: pt,
|
|
302
|
+
popupPlacement: T,
|
|
303
|
+
ref: K,
|
|
304
|
+
popupAlign: J,
|
|
305
|
+
getPopupContainer: Y,
|
|
306
|
+
onPopupVisibleChange: O,
|
|
307
|
+
afterPopupVisibleChange: $,
|
|
308
|
+
popupTransitionName: _,
|
|
309
|
+
popupAnimation: b,
|
|
310
|
+
popupMotion: g,
|
|
311
|
+
defaultPopupVisible: Q,
|
|
312
|
+
autoDestroy: I,
|
|
313
|
+
mouseLeaveDelay: m,
|
|
314
|
+
popupStyle: X(X({}, h), N == null ? void 0 : N.root),
|
|
315
|
+
mouseEnterDelay: i,
|
|
316
|
+
arrow: Z
|
|
317
|
+
}, q), y);
|
|
318
|
+
};
|
|
319
|
+
const ht = /* @__PURE__ */ Le(bt);
|
|
320
|
+
function yt(t) {
|
|
321
|
+
const {
|
|
322
|
+
sizePopupArrow: o,
|
|
323
|
+
borderRadiusXS: r,
|
|
324
|
+
borderRadiusOuter: e
|
|
325
|
+
} = t, n = o / 2, s = 0, a = n, i = e * 1 / Math.sqrt(2), l = n - e * (1 - 1 / Math.sqrt(2)), m = n - r * (1 / Math.sqrt(2)), h = e * (Math.sqrt(2) - 1) + r * (1 / Math.sqrt(2)), c = 2 * n - m, d = h, y = 2 * n - i, O = l, $ = 2 * n - s, _ = a, b = n * Math.sqrt(2) + e * (Math.sqrt(2) - 2), g = e * (Math.sqrt(2) - 1), x = `polygon(${g}px 100%, 50% ${g}px, ${2 * n - g}px 100%, ${g}px 100%)`, T = `path('M ${s} ${a} A ${e} ${e} 0 0 0 ${i} ${l} L ${m} ${h} A ${r} ${r} 0 0 1 ${c} ${d} L ${y} ${O} A ${e} ${e} 0 0 0 ${$} ${_} Z')`;
|
|
326
|
+
return {
|
|
327
|
+
arrowShadowWidth: b,
|
|
328
|
+
arrowPath: T,
|
|
329
|
+
arrowPolygon: x
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
const wt = (t, o, r) => {
|
|
333
|
+
const {
|
|
334
|
+
sizePopupArrow: e,
|
|
335
|
+
arrowPolygon: n,
|
|
336
|
+
arrowPath: s,
|
|
337
|
+
arrowShadowWidth: a,
|
|
338
|
+
borderRadiusXS: i,
|
|
339
|
+
calc: l
|
|
340
|
+
} = t;
|
|
341
|
+
return {
|
|
342
|
+
pointerEvents: "none",
|
|
343
|
+
width: e,
|
|
344
|
+
height: e,
|
|
345
|
+
overflow: "hidden",
|
|
346
|
+
"&::before": {
|
|
347
|
+
position: "absolute",
|
|
348
|
+
bottom: 0,
|
|
349
|
+
insetInlineStart: 0,
|
|
350
|
+
width: e,
|
|
351
|
+
height: l(e).div(2).equal(),
|
|
352
|
+
background: o,
|
|
353
|
+
clipPath: {
|
|
354
|
+
_multi_value_: !0,
|
|
355
|
+
value: [n, s]
|
|
356
|
+
},
|
|
357
|
+
content: '""'
|
|
358
|
+
},
|
|
359
|
+
"&::after": {
|
|
360
|
+
content: '""',
|
|
361
|
+
position: "absolute",
|
|
362
|
+
width: a,
|
|
363
|
+
height: a,
|
|
364
|
+
bottom: 0,
|
|
365
|
+
insetInline: 0,
|
|
366
|
+
margin: "auto",
|
|
367
|
+
borderRadius: {
|
|
368
|
+
_skip_check_: !0,
|
|
369
|
+
value: `0 0 ${W(i)} 0`
|
|
370
|
+
},
|
|
371
|
+
transform: "translateY(50%) rotate(-135deg)",
|
|
372
|
+
boxShadow: r,
|
|
373
|
+
zIndex: 0,
|
|
374
|
+
background: "transparent"
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
}, de = 8;
|
|
378
|
+
function pe(t) {
|
|
379
|
+
const {
|
|
380
|
+
contentRadius: o,
|
|
381
|
+
limitVerticalRadius: r
|
|
382
|
+
} = t, e = o > 12 ? o + 2 : 12;
|
|
383
|
+
return {
|
|
384
|
+
arrowOffsetHorizontal: e,
|
|
385
|
+
arrowOffsetVertical: r ? de : e
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
function U(t, o) {
|
|
389
|
+
return t ? o : {};
|
|
390
|
+
}
|
|
391
|
+
function vt(t, o, r) {
|
|
392
|
+
const {
|
|
393
|
+
componentCls: e,
|
|
394
|
+
boxShadowPopoverArrow: n,
|
|
395
|
+
arrowOffsetVertical: s,
|
|
396
|
+
arrowOffsetHorizontal: a
|
|
397
|
+
} = t, {
|
|
398
|
+
arrowDistance: i = 0,
|
|
399
|
+
arrowPlacement: l = {
|
|
400
|
+
left: !0,
|
|
401
|
+
right: !0,
|
|
402
|
+
top: !0,
|
|
403
|
+
bottom: !0
|
|
404
|
+
}
|
|
405
|
+
} = {};
|
|
406
|
+
return {
|
|
407
|
+
[e]: Object.assign(Object.assign(Object.assign(Object.assign({
|
|
408
|
+
// ============================ Basic ============================
|
|
409
|
+
[`${e}-arrow`]: [Object.assign(Object.assign({
|
|
410
|
+
position: "absolute",
|
|
411
|
+
zIndex: 1,
|
|
412
|
+
display: "block"
|
|
413
|
+
}, wt(t, o, n)), {
|
|
414
|
+
"&:before": {
|
|
415
|
+
background: o
|
|
416
|
+
}
|
|
417
|
+
})]
|
|
418
|
+
}, U(!!l.top, {
|
|
419
|
+
[[`&-placement-top > ${e}-arrow`, `&-placement-topLeft > ${e}-arrow`, `&-placement-topRight > ${e}-arrow`].join(",")]: {
|
|
420
|
+
bottom: i,
|
|
421
|
+
transform: "translateY(100%) rotate(180deg)"
|
|
422
|
+
},
|
|
423
|
+
[`&-placement-top > ${e}-arrow`]: {
|
|
424
|
+
left: {
|
|
425
|
+
_skip_check_: !0,
|
|
426
|
+
value: "50%"
|
|
427
|
+
},
|
|
428
|
+
transform: "translateX(-50%) translateY(100%) rotate(180deg)"
|
|
429
|
+
},
|
|
430
|
+
"&-placement-topLeft": {
|
|
431
|
+
"--arrow-offset-horizontal": a,
|
|
432
|
+
[`> ${e}-arrow`]: {
|
|
433
|
+
left: {
|
|
434
|
+
_skip_check_: !0,
|
|
435
|
+
value: a
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
"&-placement-topRight": {
|
|
440
|
+
"--arrow-offset-horizontal": `calc(100% - ${W(a)})`,
|
|
441
|
+
[`> ${e}-arrow`]: {
|
|
442
|
+
right: {
|
|
443
|
+
_skip_check_: !0,
|
|
444
|
+
value: a
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
})), U(!!l.bottom, {
|
|
449
|
+
[[`&-placement-bottom > ${e}-arrow`, `&-placement-bottomLeft > ${e}-arrow`, `&-placement-bottomRight > ${e}-arrow`].join(",")]: {
|
|
450
|
+
top: i,
|
|
451
|
+
transform: "translateY(-100%)"
|
|
452
|
+
},
|
|
453
|
+
[`&-placement-bottom > ${e}-arrow`]: {
|
|
454
|
+
left: {
|
|
455
|
+
_skip_check_: !0,
|
|
456
|
+
value: "50%"
|
|
457
|
+
},
|
|
458
|
+
transform: "translateX(-50%) translateY(-100%)"
|
|
459
|
+
},
|
|
460
|
+
"&-placement-bottomLeft": {
|
|
461
|
+
"--arrow-offset-horizontal": a,
|
|
462
|
+
[`> ${e}-arrow`]: {
|
|
463
|
+
left: {
|
|
464
|
+
_skip_check_: !0,
|
|
465
|
+
value: a
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"&-placement-bottomRight": {
|
|
470
|
+
"--arrow-offset-horizontal": `calc(100% - ${W(a)})`,
|
|
471
|
+
[`> ${e}-arrow`]: {
|
|
472
|
+
right: {
|
|
473
|
+
_skip_check_: !0,
|
|
474
|
+
value: a
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
})), U(!!l.left, {
|
|
479
|
+
[[`&-placement-left > ${e}-arrow`, `&-placement-leftTop > ${e}-arrow`, `&-placement-leftBottom > ${e}-arrow`].join(",")]: {
|
|
480
|
+
right: {
|
|
481
|
+
_skip_check_: !0,
|
|
482
|
+
value: i
|
|
483
|
+
},
|
|
484
|
+
transform: "translateX(100%) rotate(90deg)"
|
|
485
|
+
},
|
|
486
|
+
[`&-placement-left > ${e}-arrow`]: {
|
|
487
|
+
top: {
|
|
488
|
+
_skip_check_: !0,
|
|
489
|
+
value: "50%"
|
|
490
|
+
},
|
|
491
|
+
transform: "translateY(-50%) translateX(100%) rotate(90deg)"
|
|
492
|
+
},
|
|
493
|
+
[`&-placement-leftTop > ${e}-arrow`]: {
|
|
494
|
+
top: s
|
|
495
|
+
},
|
|
496
|
+
[`&-placement-leftBottom > ${e}-arrow`]: {
|
|
497
|
+
bottom: s
|
|
498
|
+
}
|
|
499
|
+
})), U(!!l.right, {
|
|
500
|
+
[[`&-placement-right > ${e}-arrow`, `&-placement-rightTop > ${e}-arrow`, `&-placement-rightBottom > ${e}-arrow`].join(",")]: {
|
|
501
|
+
left: {
|
|
502
|
+
_skip_check_: !0,
|
|
503
|
+
value: i
|
|
504
|
+
},
|
|
505
|
+
transform: "translateX(-100%) rotate(-90deg)"
|
|
506
|
+
},
|
|
507
|
+
[`&-placement-right > ${e}-arrow`]: {
|
|
508
|
+
top: {
|
|
509
|
+
_skip_check_: !0,
|
|
510
|
+
value: "50%"
|
|
511
|
+
},
|
|
512
|
+
transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
|
|
513
|
+
},
|
|
514
|
+
[`&-placement-rightTop > ${e}-arrow`]: {
|
|
515
|
+
top: s
|
|
516
|
+
},
|
|
517
|
+
[`&-placement-rightBottom > ${e}-arrow`]: {
|
|
518
|
+
bottom: s
|
|
519
|
+
}
|
|
520
|
+
}))
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
function Ot(t, o, r, e) {
|
|
524
|
+
if (e === !1)
|
|
525
|
+
return {
|
|
526
|
+
adjustX: !1,
|
|
527
|
+
adjustY: !1
|
|
528
|
+
};
|
|
529
|
+
const n = e && typeof e == "object" ? e : {}, s = {};
|
|
530
|
+
switch (t) {
|
|
531
|
+
case "top":
|
|
532
|
+
case "bottom":
|
|
533
|
+
s.shiftX = o.arrowOffsetHorizontal * 2 + r, s.shiftY = !0, s.adjustY = !0;
|
|
534
|
+
break;
|
|
535
|
+
case "left":
|
|
536
|
+
case "right":
|
|
537
|
+
s.shiftY = o.arrowOffsetVertical * 2 + r, s.shiftX = !0, s.adjustX = !0;
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
const a = Object.assign(Object.assign({}, s), n);
|
|
541
|
+
return a.shiftX || (a.adjustX = !0), a.shiftY || (a.adjustY = !0), a;
|
|
542
|
+
}
|
|
543
|
+
const ce = {
|
|
544
|
+
left: {
|
|
545
|
+
points: ["cr", "cl"]
|
|
546
|
+
},
|
|
547
|
+
right: {
|
|
548
|
+
points: ["cl", "cr"]
|
|
549
|
+
},
|
|
550
|
+
top: {
|
|
551
|
+
points: ["bc", "tc"]
|
|
552
|
+
},
|
|
553
|
+
bottom: {
|
|
554
|
+
points: ["tc", "bc"]
|
|
555
|
+
},
|
|
556
|
+
topLeft: {
|
|
557
|
+
points: ["bl", "tl"]
|
|
558
|
+
},
|
|
559
|
+
leftTop: {
|
|
560
|
+
points: ["tr", "tl"]
|
|
561
|
+
},
|
|
562
|
+
topRight: {
|
|
563
|
+
points: ["br", "tr"]
|
|
564
|
+
},
|
|
565
|
+
rightTop: {
|
|
566
|
+
points: ["tl", "tr"]
|
|
567
|
+
},
|
|
568
|
+
bottomRight: {
|
|
569
|
+
points: ["tr", "br"]
|
|
570
|
+
},
|
|
571
|
+
rightBottom: {
|
|
572
|
+
points: ["bl", "br"]
|
|
573
|
+
},
|
|
574
|
+
bottomLeft: {
|
|
575
|
+
points: ["tl", "bl"]
|
|
576
|
+
},
|
|
577
|
+
leftBottom: {
|
|
578
|
+
points: ["br", "bl"]
|
|
579
|
+
}
|
|
580
|
+
}, Ct = {
|
|
581
|
+
topLeft: {
|
|
582
|
+
points: ["bl", "tc"]
|
|
583
|
+
},
|
|
584
|
+
leftTop: {
|
|
585
|
+
points: ["tr", "cl"]
|
|
586
|
+
},
|
|
587
|
+
topRight: {
|
|
588
|
+
points: ["br", "tc"]
|
|
589
|
+
},
|
|
590
|
+
rightTop: {
|
|
591
|
+
points: ["tl", "cr"]
|
|
592
|
+
},
|
|
593
|
+
bottomRight: {
|
|
594
|
+
points: ["tr", "bc"]
|
|
595
|
+
},
|
|
596
|
+
rightBottom: {
|
|
597
|
+
points: ["bl", "cr"]
|
|
598
|
+
},
|
|
599
|
+
bottomLeft: {
|
|
600
|
+
points: ["tl", "bc"]
|
|
601
|
+
},
|
|
602
|
+
leftBottom: {
|
|
603
|
+
points: ["br", "cl"]
|
|
604
|
+
}
|
|
605
|
+
}, $t = /* @__PURE__ */ new Set(["topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]);
|
|
606
|
+
function _t(t) {
|
|
607
|
+
const {
|
|
608
|
+
arrowWidth: o,
|
|
609
|
+
autoAdjustOverflow: r,
|
|
610
|
+
arrowPointAtCenter: e,
|
|
611
|
+
offset: n,
|
|
612
|
+
borderRadius: s,
|
|
613
|
+
visibleFirst: a
|
|
614
|
+
} = t, i = o / 2, l = {};
|
|
615
|
+
return Object.keys(ce).forEach((m) => {
|
|
616
|
+
const h = e && Ct[m] || ce[m], c = Object.assign(Object.assign({}, h), {
|
|
617
|
+
offset: [0, 0],
|
|
618
|
+
dynamicInset: !0
|
|
619
|
+
});
|
|
620
|
+
switch (l[m] = c, $t.has(m) && (c.autoArrow = !1), m) {
|
|
621
|
+
case "top":
|
|
622
|
+
case "topLeft":
|
|
623
|
+
case "topRight":
|
|
624
|
+
c.offset[1] = -i - n;
|
|
625
|
+
break;
|
|
626
|
+
case "bottom":
|
|
627
|
+
case "bottomLeft":
|
|
628
|
+
case "bottomRight":
|
|
629
|
+
c.offset[1] = i + n;
|
|
630
|
+
break;
|
|
631
|
+
case "left":
|
|
632
|
+
case "leftTop":
|
|
633
|
+
case "leftBottom":
|
|
634
|
+
c.offset[0] = -i - n;
|
|
635
|
+
break;
|
|
636
|
+
case "right":
|
|
637
|
+
case "rightTop":
|
|
638
|
+
case "rightBottom":
|
|
639
|
+
c.offset[0] = i + n;
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
642
|
+
const d = pe({
|
|
643
|
+
contentRadius: s,
|
|
644
|
+
limitVerticalRadius: !0
|
|
645
|
+
});
|
|
646
|
+
if (e)
|
|
647
|
+
switch (m) {
|
|
648
|
+
case "topLeft":
|
|
649
|
+
case "bottomLeft":
|
|
650
|
+
c.offset[0] = -d.arrowOffsetHorizontal - i;
|
|
651
|
+
break;
|
|
652
|
+
case "topRight":
|
|
653
|
+
case "bottomRight":
|
|
654
|
+
c.offset[0] = d.arrowOffsetHorizontal + i;
|
|
655
|
+
break;
|
|
656
|
+
case "leftTop":
|
|
657
|
+
case "rightTop":
|
|
658
|
+
c.offset[1] = -d.arrowOffsetHorizontal * 2 + i;
|
|
659
|
+
break;
|
|
660
|
+
case "leftBottom":
|
|
661
|
+
case "rightBottom":
|
|
662
|
+
c.offset[1] = d.arrowOffsetHorizontal * 2 - i;
|
|
663
|
+
break;
|
|
664
|
+
}
|
|
665
|
+
c.overflow = Ot(m, d, o, r), a && (c.htmlRegion = "visibleFirst");
|
|
666
|
+
}), l;
|
|
667
|
+
}
|
|
668
|
+
const xt = (t) => {
|
|
669
|
+
const {
|
|
670
|
+
calc: o,
|
|
671
|
+
componentCls: r,
|
|
672
|
+
// ant-tooltip
|
|
673
|
+
tooltipMaxWidth: e,
|
|
674
|
+
tooltipColor: n,
|
|
675
|
+
tooltipBg: s,
|
|
676
|
+
tooltipBorderRadius: a,
|
|
677
|
+
zIndexPopup: i,
|
|
678
|
+
controlHeight: l,
|
|
679
|
+
boxShadowSecondary: m,
|
|
680
|
+
paddingSM: h,
|
|
681
|
+
paddingXS: c,
|
|
682
|
+
arrowOffsetHorizontal: d,
|
|
683
|
+
sizePopupArrow: y
|
|
684
|
+
} = t, O = o(a).add(y).add(d).equal(), $ = o(a).mul(2).add(y).equal();
|
|
685
|
+
return [
|
|
686
|
+
{
|
|
687
|
+
[r]: Object.assign(Object.assign(Object.assign(Object.assign({}, Xe(t)), {
|
|
688
|
+
position: "absolute",
|
|
689
|
+
zIndex: i,
|
|
690
|
+
display: "block",
|
|
691
|
+
width: "max-content",
|
|
692
|
+
maxWidth: e,
|
|
693
|
+
visibility: "visible",
|
|
694
|
+
// When use `autoArrow`, origin will follow the arrow position
|
|
695
|
+
"--valid-offset-x": "var(--arrow-offset-horizontal, var(--arrow-x))",
|
|
696
|
+
transformOrigin: ["var(--valid-offset-x, 50%)", "var(--arrow-y, 50%)"].join(" "),
|
|
697
|
+
"&-hidden": {
|
|
698
|
+
display: "none"
|
|
699
|
+
},
|
|
700
|
+
"--antd-arrow-background-color": s,
|
|
701
|
+
// Wrapper for the tooltip content
|
|
702
|
+
[`${r}-inner`]: {
|
|
703
|
+
minWidth: $,
|
|
704
|
+
minHeight: l,
|
|
705
|
+
padding: `${W(t.calc(h).div(2).equal())} ${W(c)}`,
|
|
706
|
+
color: n,
|
|
707
|
+
textAlign: "start",
|
|
708
|
+
textDecoration: "none",
|
|
709
|
+
wordWrap: "break-word",
|
|
710
|
+
backgroundColor: s,
|
|
711
|
+
borderRadius: a,
|
|
712
|
+
boxShadow: m,
|
|
713
|
+
boxSizing: "border-box"
|
|
714
|
+
},
|
|
715
|
+
// Align placement should have another min width
|
|
716
|
+
[["&-placement-topLeft", "&-placement-topRight", "&-placement-bottomLeft", "&-placement-bottomRight"].join(",")]: {
|
|
717
|
+
minWidth: O
|
|
718
|
+
},
|
|
719
|
+
// Limit left and right placement radius
|
|
720
|
+
[["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
|
|
721
|
+
[`${r}-inner`]: {
|
|
722
|
+
borderRadius: t.min(a, de)
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
[`${r}-content`]: {
|
|
726
|
+
position: "relative"
|
|
727
|
+
}
|
|
728
|
+
}), tt(t, (_, b) => {
|
|
729
|
+
let {
|
|
730
|
+
darkColor: g
|
|
731
|
+
} = b;
|
|
732
|
+
return {
|
|
733
|
+
[`&${r}-${_}`]: {
|
|
734
|
+
[`${r}-inner`]: {
|
|
735
|
+
backgroundColor: g
|
|
736
|
+
},
|
|
737
|
+
[`${r}-arrow`]: {
|
|
738
|
+
"--antd-arrow-background-color": g
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
};
|
|
742
|
+
})), {
|
|
743
|
+
// RTL
|
|
744
|
+
"&-rtl": {
|
|
745
|
+
direction: "rtl"
|
|
746
|
+
}
|
|
747
|
+
})
|
|
748
|
+
},
|
|
749
|
+
// Arrow Style
|
|
750
|
+
vt(t, "var(--antd-arrow-background-color)"),
|
|
751
|
+
// Pure Render
|
|
752
|
+
{
|
|
753
|
+
[`${r}-pure`]: {
|
|
754
|
+
position: "relative",
|
|
755
|
+
maxWidth: "none",
|
|
756
|
+
margin: t.sizePopupArrow
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
];
|
|
760
|
+
}, Pt = (t) => Object.assign(Object.assign({
|
|
761
|
+
zIndexPopup: t.zIndexPopupBase + 70
|
|
762
|
+
}, pe({
|
|
763
|
+
contentRadius: t.borderRadius,
|
|
764
|
+
limitVerticalRadius: !0
|
|
765
|
+
})), yt(fe(t, {
|
|
766
|
+
borderRadiusOuter: Math.min(t.borderRadiusOuter, 4)
|
|
767
|
+
}))), ge = function(t) {
|
|
768
|
+
let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
769
|
+
return He("Tooltip", (e) => {
|
|
770
|
+
const {
|
|
771
|
+
borderRadius: n,
|
|
772
|
+
colorTextLightSolid: s,
|
|
773
|
+
colorBgSpotlight: a
|
|
774
|
+
} = e, i = fe(e, {
|
|
775
|
+
// default variables
|
|
776
|
+
tooltipMaxWidth: 250,
|
|
777
|
+
tooltipColor: s,
|
|
778
|
+
tooltipBorderRadius: n,
|
|
779
|
+
tooltipBg: a
|
|
780
|
+
});
|
|
781
|
+
return [xt(i), dt(e, "zoom-big-fast")];
|
|
782
|
+
}, Pt, {
|
|
783
|
+
resetStyle: !1,
|
|
784
|
+
// Popover use Tooltip as internal component. We do not need to handle this.
|
|
785
|
+
injectStyle: o
|
|
786
|
+
})(t);
|
|
787
|
+
}, Nt = G.map((t) => `${t}-inverse`);
|
|
788
|
+
function St(t) {
|
|
789
|
+
return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [].concat(se(Nt), se(G)).includes(t) : G.includes(t);
|
|
790
|
+
}
|
|
791
|
+
function be(t, o) {
|
|
792
|
+
const r = St(o), e = j({
|
|
793
|
+
[`${t}-${o}`]: o && r
|
|
794
|
+
}), n = {}, s = {};
|
|
795
|
+
return o && !r && (n.background = o, s["--antd-arrow-background-color"] = o), {
|
|
796
|
+
className: e,
|
|
797
|
+
overlayStyle: n,
|
|
798
|
+
arrowStyle: s
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
const jt = (t) => {
|
|
802
|
+
const {
|
|
803
|
+
prefixCls: o,
|
|
804
|
+
className: r,
|
|
805
|
+
placement: e = "top",
|
|
806
|
+
title: n,
|
|
807
|
+
color: s,
|
|
808
|
+
overlayInnerStyle: a
|
|
809
|
+
} = t, {
|
|
810
|
+
getPrefixCls: i
|
|
811
|
+
} = u.useContext(ue), l = i("tooltip", o), [m, h, c] = ge(l), d = be(l, s), y = d.arrowStyle, O = Object.assign(Object.assign({}, a), d.overlayStyle), $ = j(h, c, l, `${l}-pure`, `${l}-placement-${e}`, r, d.className);
|
|
812
|
+
return m(/* @__PURE__ */ u.createElement("div", {
|
|
813
|
+
className: $,
|
|
814
|
+
style: y
|
|
815
|
+
}, /* @__PURE__ */ u.createElement("div", {
|
|
816
|
+
className: `${l}-arrow`
|
|
817
|
+
}), /* @__PURE__ */ u.createElement(me, Object.assign({}, t, {
|
|
818
|
+
className: h,
|
|
819
|
+
prefixCls: l,
|
|
820
|
+
overlayInnerStyle: O
|
|
821
|
+
}), n)));
|
|
822
|
+
};
|
|
823
|
+
var Tt = function(t, o) {
|
|
824
|
+
var r = {};
|
|
825
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (r[e] = t[e]);
|
|
826
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, e = Object.getOwnPropertySymbols(t); n < e.length; n++)
|
|
827
|
+
o.indexOf(e[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[n]) && (r[e[n]] = t[e[n]]);
|
|
828
|
+
return r;
|
|
829
|
+
};
|
|
830
|
+
const zt = /* @__PURE__ */ u.forwardRef((t, o) => {
|
|
831
|
+
var r, e, n, s, a, i;
|
|
832
|
+
const {
|
|
833
|
+
prefixCls: l,
|
|
834
|
+
openClassName: m,
|
|
835
|
+
getTooltipContainer: h,
|
|
836
|
+
color: c,
|
|
837
|
+
overlayInnerStyle: d,
|
|
838
|
+
children: y,
|
|
839
|
+
afterOpenChange: O,
|
|
840
|
+
afterVisibleChange: $,
|
|
841
|
+
destroyTooltipOnHide: _,
|
|
842
|
+
arrow: b = !0,
|
|
843
|
+
title: g,
|
|
844
|
+
overlay: x,
|
|
845
|
+
builtinPlacements: T,
|
|
846
|
+
arrowPointAtCenter: z = !1,
|
|
847
|
+
autoAdjustOverflow: J = !0
|
|
848
|
+
} = t, B = !!b, [, I] = We(), {
|
|
849
|
+
getPopupContainer: Q,
|
|
850
|
+
getPrefixCls: Y,
|
|
851
|
+
direction: ee,
|
|
852
|
+
tooltip: f
|
|
853
|
+
} = u.useContext(ue), R = Ye("Tooltip"), A = u.useRef(null), Z = () => {
|
|
854
|
+
var p;
|
|
855
|
+
(p = A.current) === null || p === void 0 || p.forceAlign();
|
|
856
|
+
};
|
|
857
|
+
u.useImperativeHandle(o, () => {
|
|
858
|
+
var p;
|
|
859
|
+
return {
|
|
860
|
+
forceAlign: Z,
|
|
861
|
+
forcePopupAlign: () => {
|
|
862
|
+
R.deprecated(!1, "forcePopupAlign", "forceAlign"), Z();
|
|
863
|
+
},
|
|
864
|
+
nativeElement: (p = A.current) === null || p === void 0 ? void 0 : p.nativeElement
|
|
865
|
+
};
|
|
866
|
+
}), process.env.NODE_ENV !== "production" && ([["visible", "open"], ["defaultVisible", "defaultOpen"], ["onVisibleChange", "onOpenChange"], ["afterVisibleChange", "afterOpenChange"], ["arrowPointAtCenter", "arrow={{ pointAtCenter: true }}"], ["overlayStyle", "styles={{ root: {} }}"], ["overlayInnerStyle", "styles={{ body: {} }}"], ["overlayClassName", "classNames={{ root: {} }}"]].forEach((p) => {
|
|
867
|
+
let [C, S] = p;
|
|
868
|
+
R.deprecated(!(C in t), C, S);
|
|
869
|
+
}), process.env.NODE_ENV !== "production" && R(!_ || typeof _ == "boolean", "usage", "`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."), process.env.NODE_ENV !== "production" && R(!b || typeof b == "boolean" || !("arrowPointAtCenter" in b), "deprecated", "`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));
|
|
870
|
+
const [P, N] = Ge(!1, {
|
|
871
|
+
value: (r = t.open) !== null && r !== void 0 ? r : t.visible,
|
|
872
|
+
defaultValue: (e = t.defaultOpen) !== null && e !== void 0 ? e : t.defaultVisible
|
|
873
|
+
}), M = !g && !x && g !== 0, K = (p) => {
|
|
874
|
+
var C, S;
|
|
875
|
+
N(M ? !1 : p), M || ((C = t.onOpenChange) === null || C === void 0 || C.call(t, p), (S = t.onVisibleChange) === null || S === void 0 || S.call(t, p));
|
|
876
|
+
}, q = u.useMemo(() => {
|
|
877
|
+
var p, C;
|
|
878
|
+
let S = z;
|
|
879
|
+
return typeof b == "object" && (S = (C = (p = b.pointAtCenter) !== null && p !== void 0 ? p : b.arrowPointAtCenter) !== null && C !== void 0 ? C : z), T || _t({
|
|
880
|
+
arrowPointAtCenter: S,
|
|
881
|
+
autoAdjustOverflow: J,
|
|
882
|
+
arrowWidth: B ? I.sizePopupArrow : 0,
|
|
883
|
+
borderRadius: I.borderRadius,
|
|
884
|
+
offset: I.marginXXS,
|
|
885
|
+
visibleFirst: !0
|
|
886
|
+
});
|
|
887
|
+
}, [z, b, T, I]), H = u.useMemo(() => g === 0 ? g : x || g || "", [x, g]), re = /* @__PURE__ */ u.createElement(Je, {
|
|
888
|
+
space: !0
|
|
889
|
+
}, typeof H == "function" ? H() : H), {
|
|
890
|
+
getPopupContainer: ye,
|
|
891
|
+
placement: we = "top",
|
|
892
|
+
mouseEnterDelay: ve = 0.1,
|
|
893
|
+
mouseLeaveDelay: Oe = 0.1,
|
|
894
|
+
overlayStyle: Ce,
|
|
895
|
+
rootClassName: $e,
|
|
896
|
+
overlayClassName: _e,
|
|
897
|
+
styles: E,
|
|
898
|
+
classNames: V
|
|
899
|
+
} = t, ae = Tt(t, ["getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName", "overlayClassName", "styles", "classNames"]), L = Y("tooltip", l), xe = Y(), Pe = t["data-popover-inject"];
|
|
900
|
+
let te = P;
|
|
901
|
+
!("open" in t) && !("visible" in t) && M && (te = !1);
|
|
902
|
+
const oe = /* @__PURE__ */ u.isValidElement(y) && !Qe(y) ? y : /* @__PURE__ */ u.createElement("span", null, y), F = oe.props, Ne = !F.className || typeof F.className == "string" ? j(F.className, m || `${L}-open`) : F.className, [Se, je, Te] = ge(L, !Pe), ne = be(L, c), ze = ne.arrowStyle, Ie = j(_e, {
|
|
903
|
+
[`${L}-rtl`]: ee === "rtl"
|
|
904
|
+
}, ne.className, $e, je, Te, f == null ? void 0 : f.className, (n = f == null ? void 0 : f.classNames) === null || n === void 0 ? void 0 : n.root, V == null ? void 0 : V.root), Re = j((s = f == null ? void 0 : f.classNames) === null || s === void 0 ? void 0 : s.body, V == null ? void 0 : V.body), [Ae, Ee] = qe("Tooltip", ae.zIndex), Ve = /* @__PURE__ */ u.createElement(ht, Object.assign({}, ae, {
|
|
905
|
+
zIndex: Ae,
|
|
906
|
+
showArrow: B,
|
|
907
|
+
placement: we,
|
|
908
|
+
mouseEnterDelay: ve,
|
|
909
|
+
mouseLeaveDelay: Oe,
|
|
910
|
+
prefixCls: L,
|
|
911
|
+
classNames: {
|
|
912
|
+
root: Ie,
|
|
913
|
+
body: Re
|
|
914
|
+
},
|
|
915
|
+
styles: {
|
|
916
|
+
root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ze), (a = f == null ? void 0 : f.styles) === null || a === void 0 ? void 0 : a.root), f == null ? void 0 : f.style), Ce), E == null ? void 0 : E.root),
|
|
917
|
+
body: Object.assign(Object.assign(Object.assign(Object.assign({}, (i = f == null ? void 0 : f.styles) === null || i === void 0 ? void 0 : i.body), d), E == null ? void 0 : E.body), ne.overlayStyle)
|
|
918
|
+
},
|
|
919
|
+
getTooltipContainer: ye || h || Q,
|
|
920
|
+
ref: A,
|
|
921
|
+
builtinPlacements: q,
|
|
922
|
+
overlay: re,
|
|
923
|
+
visible: te,
|
|
924
|
+
onVisibleChange: K,
|
|
925
|
+
afterVisibleChange: O ?? $,
|
|
926
|
+
arrowContent: /* @__PURE__ */ u.createElement("span", {
|
|
927
|
+
className: `${L}-arrow-content`
|
|
928
|
+
}),
|
|
929
|
+
motion: {
|
|
930
|
+
motionName: Fe(xe, "zoom-big-fast", t.transitionName),
|
|
931
|
+
motionDeadline: 1e3
|
|
932
|
+
},
|
|
933
|
+
destroyTooltipOnHide: !!_
|
|
934
|
+
}), te ? et(oe, {
|
|
935
|
+
className: Ne
|
|
936
|
+
}) : oe);
|
|
937
|
+
return Se(/* @__PURE__ */ u.createElement(Ue.Provider, {
|
|
938
|
+
value: Ee
|
|
939
|
+
}, Ve));
|
|
940
|
+
}), he = zt;
|
|
941
|
+
process.env.NODE_ENV !== "production" && (he.displayName = "Tooltip");
|
|
942
|
+
he._InternalPanelDoNotUseOrYouWillBeFired = jt;
|
|
943
|
+
export {
|
|
944
|
+
he as T,
|
|
945
|
+
ot as z
|
|
946
|
+
};
|