@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,884 @@
|
|
|
1
|
+
import { r as Kr, q as Zr, h as lr, X as Gr, Y as Cr, N as Jr, A as Or, L as Xr, Z as gn, e as x, H as fr, O as J, u as _r, $ as vr, w as Yr, s as Rr, v as Ir, a as B, c as tn, M as Wr, _ as Hr, G as pr, a0 as et, t as nt, k as Je, a1 as mr, y as rt, d as tt } from "./index-BWys7dkb.js";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import Br from "react";
|
|
4
|
+
import { r as at } from "./index-BPtFqhcp.js";
|
|
5
|
+
import { R as Fr } from "./index-BQO27mgE.js";
|
|
6
|
+
import { g as hr } from "./AntdIcon-Bsnbyy6g.js";
|
|
7
|
+
import { i as it } from "./isVisible-CNQjrJPN.js";
|
|
8
|
+
var Vt = /* @__PURE__ */ function() {
|
|
9
|
+
function e(r, n) {
|
|
10
|
+
Zr(this, e), lr(this, "name", void 0), lr(this, "style", void 0), lr(this, "_keyframe", !0), this.name = r, this.style = n;
|
|
11
|
+
}
|
|
12
|
+
return Kr(e, [{
|
|
13
|
+
key: "getName",
|
|
14
|
+
value: function() {
|
|
15
|
+
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
16
|
+
return n ? "".concat(n, "-").concat(this.name) : this.name;
|
|
17
|
+
}
|
|
18
|
+
}]), e;
|
|
19
|
+
}();
|
|
20
|
+
const jt = (e, r) => {
|
|
21
|
+
const n = a.useContext(Gr), t = a.useMemo(() => {
|
|
22
|
+
var o;
|
|
23
|
+
const s = Cr[e], d = (o = n == null ? void 0 : n[e]) !== null && o !== void 0 ? o : {};
|
|
24
|
+
return Object.assign(Object.assign({}, typeof s == "function" ? s() : s), d || {});
|
|
25
|
+
}, [e, r, n]), i = a.useMemo(() => {
|
|
26
|
+
const o = n == null ? void 0 : n.locale;
|
|
27
|
+
return n != null && n.exist && !o ? Cr.locale : o;
|
|
28
|
+
}, [n]);
|
|
29
|
+
return [t, i];
|
|
30
|
+
}, Ar = /* @__PURE__ */ Br.createContext(void 0);
|
|
31
|
+
process.env.NODE_ENV !== "production" && (Ar.displayName = "zIndexContext");
|
|
32
|
+
const Ee = 100, ot = 10, ut = Ee * ot, st = ut + Ee, Vr = {
|
|
33
|
+
Modal: Ee,
|
|
34
|
+
Drawer: Ee,
|
|
35
|
+
Popover: Ee,
|
|
36
|
+
Popconfirm: Ee,
|
|
37
|
+
Tooltip: Ee,
|
|
38
|
+
Tour: Ee,
|
|
39
|
+
FloatButton: Ee
|
|
40
|
+
}, lt = {
|
|
41
|
+
SelectLike: 50,
|
|
42
|
+
Dropdown: 50,
|
|
43
|
+
DatePicker: 50,
|
|
44
|
+
Menu: 50,
|
|
45
|
+
ImagePreview: 1
|
|
46
|
+
};
|
|
47
|
+
function ct(e) {
|
|
48
|
+
return e in Vr;
|
|
49
|
+
}
|
|
50
|
+
const qt = (e, r) => {
|
|
51
|
+
const [, n] = Jr(), t = Br.useContext(Ar), i = ct(e);
|
|
52
|
+
let o;
|
|
53
|
+
if (r !== void 0)
|
|
54
|
+
o = [r, r];
|
|
55
|
+
else {
|
|
56
|
+
let s = t ?? 0;
|
|
57
|
+
i ? s += // Use preset token zIndex by default but not stack when has parent container
|
|
58
|
+
(t ? 0 : n.zIndexPopupBase) + // Container offset
|
|
59
|
+
Vr[e] : s += lt[e], o = [t === void 0 ? r : s, s];
|
|
60
|
+
}
|
|
61
|
+
if (process.env.NODE_ENV !== "production") {
|
|
62
|
+
const s = Or(e), d = n.zIndexPopupBase + st, v = o[0] || 0;
|
|
63
|
+
process.env.NODE_ENV !== "production" && s(r !== void 0 || v <= d, "usage", "`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.");
|
|
64
|
+
}
|
|
65
|
+
return o;
|
|
66
|
+
}, cr = () => ({
|
|
67
|
+
height: 0,
|
|
68
|
+
opacity: 0
|
|
69
|
+
}), br = (e) => {
|
|
70
|
+
const {
|
|
71
|
+
scrollHeight: r
|
|
72
|
+
} = e;
|
|
73
|
+
return {
|
|
74
|
+
height: r,
|
|
75
|
+
opacity: 1
|
|
76
|
+
};
|
|
77
|
+
}, dt = (e) => ({
|
|
78
|
+
height: e ? e.offsetHeight : 0
|
|
79
|
+
}), dr = (e, r) => (r == null ? void 0 : r.deadline) === !0 || r.propertyName === "height", Ut = function() {
|
|
80
|
+
return {
|
|
81
|
+
motionName: `${arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Xr}-motion-collapse`,
|
|
82
|
+
onAppearStart: cr,
|
|
83
|
+
onEnterStart: cr,
|
|
84
|
+
onAppearActive: br,
|
|
85
|
+
onEnterActive: br,
|
|
86
|
+
onLeaveStart: dt,
|
|
87
|
+
onLeaveActive: cr,
|
|
88
|
+
onAppearEnd: dr,
|
|
89
|
+
onEnterEnd: dr,
|
|
90
|
+
onLeaveEnd: dr,
|
|
91
|
+
motionDeadline: 500
|
|
92
|
+
};
|
|
93
|
+
}, Qt = (e, r, n) => n !== void 0 ? n : `${e}-${r}`, ft = (e) => ({
|
|
94
|
+
animationDuration: e,
|
|
95
|
+
animationFillMode: "both"
|
|
96
|
+
}), vt = (e) => ({
|
|
97
|
+
animationDuration: e,
|
|
98
|
+
animationFillMode: "both"
|
|
99
|
+
}), Kt = function(e, r, n, t) {
|
|
100
|
+
const o = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
|
|
101
|
+
return {
|
|
102
|
+
[`
|
|
103
|
+
${o}${e}-enter,
|
|
104
|
+
${o}${e}-appear
|
|
105
|
+
`]: Object.assign(Object.assign({}, ft(t)), {
|
|
106
|
+
animationPlayState: "paused"
|
|
107
|
+
}),
|
|
108
|
+
[`${o}${e}-leave`]: Object.assign(Object.assign({}, vt(t)), {
|
|
109
|
+
animationPlayState: "paused"
|
|
110
|
+
}),
|
|
111
|
+
[`
|
|
112
|
+
${o}${e}-enter${e}-enter-active,
|
|
113
|
+
${o}${e}-appear${e}-appear-active
|
|
114
|
+
`]: {
|
|
115
|
+
animationName: r,
|
|
116
|
+
animationPlayState: "running"
|
|
117
|
+
},
|
|
118
|
+
[`${o}${e}-leave${e}-leave-active`]: {
|
|
119
|
+
animationName: n,
|
|
120
|
+
animationPlayState: "running",
|
|
121
|
+
pointerEvents: "none"
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
var jr = /* @__PURE__ */ a.createContext(null), Mr = [];
|
|
126
|
+
function mt(e, r) {
|
|
127
|
+
var n = a.useState(function() {
|
|
128
|
+
if (!gn())
|
|
129
|
+
return null;
|
|
130
|
+
var m = document.createElement("div");
|
|
131
|
+
return process.env.NODE_ENV !== "production" && r && m.setAttribute("data-debug", r), m;
|
|
132
|
+
}), t = x(n, 1), i = t[0], o = a.useRef(!1), s = a.useContext(jr), d = a.useState(Mr), v = x(d, 2), h = v[0], k = v[1], g = s || (o.current ? void 0 : function(m) {
|
|
133
|
+
k(function(D) {
|
|
134
|
+
var C = [m].concat(fr(D));
|
|
135
|
+
return C;
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
function y() {
|
|
139
|
+
i.parentElement || document.body.appendChild(i), o.current = !0;
|
|
140
|
+
}
|
|
141
|
+
function c() {
|
|
142
|
+
var m;
|
|
143
|
+
(m = i.parentElement) === null || m === void 0 || m.removeChild(i), o.current = !1;
|
|
144
|
+
}
|
|
145
|
+
return J(function() {
|
|
146
|
+
return e ? s ? s(y) : y() : c(), c;
|
|
147
|
+
}, [e]), J(function() {
|
|
148
|
+
h.length && (h.forEach(function(m) {
|
|
149
|
+
return m();
|
|
150
|
+
}), k(Mr));
|
|
151
|
+
}, [h]), [i, g];
|
|
152
|
+
}
|
|
153
|
+
function ht(e) {
|
|
154
|
+
var r = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)), n = document.createElement("div");
|
|
155
|
+
n.id = r;
|
|
156
|
+
var t = n.style;
|
|
157
|
+
t.position = "absolute", t.left = "0", t.top = "0", t.width = "100px", t.height = "100px", t.overflow = "scroll";
|
|
158
|
+
var i, o;
|
|
159
|
+
if (e) {
|
|
160
|
+
var s = getComputedStyle(e);
|
|
161
|
+
t.scrollbarColor = s.scrollbarColor, t.scrollbarWidth = s.scrollbarWidth;
|
|
162
|
+
var d = getComputedStyle(e, "::-webkit-scrollbar"), v = parseInt(d.width, 10), h = parseInt(d.height, 10);
|
|
163
|
+
try {
|
|
164
|
+
var k = v ? "width: ".concat(d.width, ";") : "", g = h ? "height: ".concat(d.height, ";") : "";
|
|
165
|
+
_r(`
|
|
166
|
+
#`.concat(r, `::-webkit-scrollbar {
|
|
167
|
+
`).concat(k, `
|
|
168
|
+
`).concat(g, `
|
|
169
|
+
}`), r);
|
|
170
|
+
} catch (m) {
|
|
171
|
+
console.error(m), i = v, o = h;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
document.body.appendChild(n);
|
|
175
|
+
var y = e && i && !isNaN(i) ? i : n.offsetWidth - n.clientWidth, c = e && o && !isNaN(o) ? o : n.offsetHeight - n.clientHeight;
|
|
176
|
+
return document.body.removeChild(n), vr(r), {
|
|
177
|
+
width: y,
|
|
178
|
+
height: c
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function gt(e) {
|
|
182
|
+
return typeof document > "u" || !e || !(e instanceof Element) ? {
|
|
183
|
+
width: 0,
|
|
184
|
+
height: 0
|
|
185
|
+
} : ht(e);
|
|
186
|
+
}
|
|
187
|
+
function yt() {
|
|
188
|
+
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
|
|
189
|
+
}
|
|
190
|
+
var wt = "rc-util-locker-".concat(Date.now()), Pr = 0;
|
|
191
|
+
function Ct(e) {
|
|
192
|
+
var r = !!e, n = a.useState(function() {
|
|
193
|
+
return Pr += 1, "".concat(wt, "_").concat(Pr);
|
|
194
|
+
}), t = x(n, 1), i = t[0];
|
|
195
|
+
J(function() {
|
|
196
|
+
if (r) {
|
|
197
|
+
var o = gt(document.body).width, s = yt();
|
|
198
|
+
_r(`
|
|
199
|
+
html body {
|
|
200
|
+
overflow-y: hidden;
|
|
201
|
+
`.concat(s ? "width: calc(100% - ".concat(o, "px);") : "", `
|
|
202
|
+
}`), i);
|
|
203
|
+
} else
|
|
204
|
+
vr(i);
|
|
205
|
+
return function() {
|
|
206
|
+
vr(i);
|
|
207
|
+
};
|
|
208
|
+
}, [r, i]);
|
|
209
|
+
}
|
|
210
|
+
var bt = !1;
|
|
211
|
+
function Mt(e) {
|
|
212
|
+
return bt;
|
|
213
|
+
}
|
|
214
|
+
var Sr = function(r) {
|
|
215
|
+
return r === !1 ? !1 : !gn() || !r ? null : typeof r == "string" ? document.querySelector(r) : typeof r == "function" ? r() : r;
|
|
216
|
+
}, yr = /* @__PURE__ */ a.forwardRef(function(e, r) {
|
|
217
|
+
var n = e.open, t = e.autoLock, i = e.getContainer, o = e.debug, s = e.autoDestroy, d = s === void 0 ? !0 : s, v = e.children, h = a.useState(n), k = x(h, 2), g = k[0], y = k[1], c = g || n;
|
|
218
|
+
process.env.NODE_ENV !== "production" && Yr(gn() || !n, "Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."), a.useEffect(function() {
|
|
219
|
+
(d || n) && y(n);
|
|
220
|
+
}, [n, d]);
|
|
221
|
+
var m = a.useState(function() {
|
|
222
|
+
return Sr(i);
|
|
223
|
+
}), D = x(m, 2), C = D[0], _ = D[1];
|
|
224
|
+
a.useEffect(function() {
|
|
225
|
+
var U = Sr(i);
|
|
226
|
+
_(U ?? null);
|
|
227
|
+
});
|
|
228
|
+
var $ = mt(c && !C, o), b = x($, 2), z = b[0], L = b[1], f = C ?? z;
|
|
229
|
+
Ct(t && n && gn() && (f === z || f === document.body));
|
|
230
|
+
var re = null;
|
|
231
|
+
if (v && Rr(v) && r) {
|
|
232
|
+
var de = v;
|
|
233
|
+
re = de.ref;
|
|
234
|
+
}
|
|
235
|
+
var te = Ir(re, r);
|
|
236
|
+
if (!c || !gn() || C === void 0)
|
|
237
|
+
return null;
|
|
238
|
+
var fe = f === !1 || Mt(), ae = v;
|
|
239
|
+
return r && (ae = /* @__PURE__ */ a.cloneElement(v, {
|
|
240
|
+
ref: te
|
|
241
|
+
})), /* @__PURE__ */ a.createElement(jr.Provider, {
|
|
242
|
+
value: L
|
|
243
|
+
}, fe ? ae : /* @__PURE__ */ at.createPortal(ae, f));
|
|
244
|
+
});
|
|
245
|
+
process.env.NODE_ENV !== "production" && (yr.displayName = "Portal");
|
|
246
|
+
function Pt() {
|
|
247
|
+
var e = B({}, a);
|
|
248
|
+
return e.useId;
|
|
249
|
+
}
|
|
250
|
+
var Nr = 0, kr = Pt();
|
|
251
|
+
const St = kr ? (
|
|
252
|
+
// Use React `useId`
|
|
253
|
+
function(r) {
|
|
254
|
+
var n = kr();
|
|
255
|
+
return r || (process.env.NODE_ENV === "test" ? "test-id" : n);
|
|
256
|
+
}
|
|
257
|
+
) : (
|
|
258
|
+
// Use compatible of `useId`
|
|
259
|
+
function(r) {
|
|
260
|
+
var n = a.useState("ssr-id"), t = x(n, 2), i = t[0], o = t[1];
|
|
261
|
+
return a.useEffect(function() {
|
|
262
|
+
var s = Nr;
|
|
263
|
+
Nr += 1, o("rc_unique_".concat(s));
|
|
264
|
+
}, []), r || (process.env.NODE_ENV === "test" ? "test-id" : i);
|
|
265
|
+
}
|
|
266
|
+
), Nt = function() {
|
|
267
|
+
if (typeof navigator > "u" || typeof window > "u")
|
|
268
|
+
return !1;
|
|
269
|
+
var e = navigator.userAgent || navigator.vendor || window.opera;
|
|
270
|
+
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substr(0, 4));
|
|
271
|
+
};
|
|
272
|
+
function kt(e) {
|
|
273
|
+
var r = e.prefixCls, n = e.align, t = e.arrow, i = e.arrowPos, o = t || {}, s = o.className, d = o.content, v = i.x, h = v === void 0 ? 0 : v, k = i.y, g = k === void 0 ? 0 : k, y = a.useRef();
|
|
274
|
+
if (!n || !n.points)
|
|
275
|
+
return null;
|
|
276
|
+
var c = {
|
|
277
|
+
position: "absolute"
|
|
278
|
+
};
|
|
279
|
+
if (n.autoArrow !== !1) {
|
|
280
|
+
var m = n.points[0], D = n.points[1], C = m[0], _ = m[1], $ = D[0], b = D[1];
|
|
281
|
+
C === $ || !["t", "b"].includes(C) ? c.top = g : C === "t" ? c.top = 0 : c.bottom = 0, _ === b || !["l", "r"].includes(_) ? c.left = h : _ === "l" ? c.left = 0 : c.right = 0;
|
|
282
|
+
}
|
|
283
|
+
return /* @__PURE__ */ a.createElement("div", {
|
|
284
|
+
ref: y,
|
|
285
|
+
className: tn("".concat(r, "-arrow"), s),
|
|
286
|
+
style: c
|
|
287
|
+
}, d);
|
|
288
|
+
}
|
|
289
|
+
function Dt(e) {
|
|
290
|
+
var r = e.prefixCls, n = e.open, t = e.zIndex, i = e.mask, o = e.motion;
|
|
291
|
+
return i ? /* @__PURE__ */ a.createElement(Wr, Hr({}, o, {
|
|
292
|
+
motionAppear: !0,
|
|
293
|
+
visible: n,
|
|
294
|
+
removeOnLeave: !0
|
|
295
|
+
}), function(s) {
|
|
296
|
+
var d = s.className;
|
|
297
|
+
return /* @__PURE__ */ a.createElement("div", {
|
|
298
|
+
style: {
|
|
299
|
+
zIndex: t
|
|
300
|
+
},
|
|
301
|
+
className: tn("".concat(r, "-mask"), d)
|
|
302
|
+
});
|
|
303
|
+
}) : null;
|
|
304
|
+
}
|
|
305
|
+
var qr = /* @__PURE__ */ a.memo(function(e) {
|
|
306
|
+
var r = e.children;
|
|
307
|
+
return r;
|
|
308
|
+
}, function(e, r) {
|
|
309
|
+
return r.cache;
|
|
310
|
+
});
|
|
311
|
+
process.env.NODE_ENV !== "production" && (qr.displayName = "PopupContent");
|
|
312
|
+
var Ur = /* @__PURE__ */ a.forwardRef(function(e, r) {
|
|
313
|
+
var n = e.popup, t = e.className, i = e.prefixCls, o = e.style, s = e.target, d = e.onVisibleChanged, v = e.open, h = e.keepDom, k = e.fresh, g = e.onClick, y = e.mask, c = e.arrow, m = e.arrowPos, D = e.align, C = e.motion, _ = e.maskMotion, $ = e.forceRender, b = e.getPopupContainer, z = e.autoDestroy, L = e.portal, f = e.zIndex, re = e.onMouseEnter, de = e.onMouseLeave, te = e.onPointerEnter, fe = e.onPointerDownCapture, ae = e.ready, U = e.offsetX, Me = e.offsetY, ve = e.offsetR, Pe = e.offsetB, Q = e.onAlign, Se = e.onPrepare, W = e.stretch, F = e.targetWidth, w = e.targetHeight, He = typeof n == "function" ? n() : n, ie = v || h, H = (b == null ? void 0 : b.length) > 0, M = a.useState(!b || !H), K = x(M, 2), Be = K[0], an = K[1];
|
|
314
|
+
if (J(function() {
|
|
315
|
+
!Be && H && s && an(!0);
|
|
316
|
+
}, [Be, H, s]), !Be)
|
|
317
|
+
return null;
|
|
318
|
+
var me = "auto", Z = {
|
|
319
|
+
left: "-1000vw",
|
|
320
|
+
top: "-1000vh",
|
|
321
|
+
right: me,
|
|
322
|
+
bottom: me
|
|
323
|
+
};
|
|
324
|
+
if (ae || !v) {
|
|
325
|
+
var xe, Fe = D.points, O = D.dynamicInset || ((xe = D._experimental) === null || xe === void 0 ? void 0 : xe.dynamicInset), he = O && Fe[0][1] === "r", oe = O && Fe[0][0] === "b";
|
|
326
|
+
he ? (Z.right = ve, Z.left = me) : (Z.left = U, Z.right = me), oe ? (Z.bottom = Pe, Z.top = me) : (Z.top = Me, Z.bottom = me);
|
|
327
|
+
}
|
|
328
|
+
var q = {};
|
|
329
|
+
return W && (W.includes("height") && w ? q.height = w : W.includes("minHeight") && w && (q.minHeight = w), W.includes("width") && F ? q.width = F : W.includes("minWidth") && F && (q.minWidth = F)), v || (q.pointerEvents = "none"), /* @__PURE__ */ a.createElement(L, {
|
|
330
|
+
open: $ || ie,
|
|
331
|
+
getContainer: b && function() {
|
|
332
|
+
return b(s);
|
|
333
|
+
},
|
|
334
|
+
autoDestroy: z
|
|
335
|
+
}, /* @__PURE__ */ a.createElement(Dt, {
|
|
336
|
+
prefixCls: i,
|
|
337
|
+
open: v,
|
|
338
|
+
zIndex: f,
|
|
339
|
+
mask: y,
|
|
340
|
+
motion: _
|
|
341
|
+
}), /* @__PURE__ */ a.createElement(Fr, {
|
|
342
|
+
onResize: Q,
|
|
343
|
+
disabled: !v
|
|
344
|
+
}, function(on) {
|
|
345
|
+
return /* @__PURE__ */ a.createElement(Wr, Hr({
|
|
346
|
+
motionAppear: !0,
|
|
347
|
+
motionEnter: !0,
|
|
348
|
+
motionLeave: !0,
|
|
349
|
+
removeOnLeave: !1,
|
|
350
|
+
forceRender: $,
|
|
351
|
+
leavedClassName: "".concat(i, "-hidden")
|
|
352
|
+
}, C, {
|
|
353
|
+
onAppearPrepare: Se,
|
|
354
|
+
onEnterPrepare: Se,
|
|
355
|
+
visible: v,
|
|
356
|
+
onVisibleChanged: function(X) {
|
|
357
|
+
var ge;
|
|
358
|
+
C == null || (ge = C.onVisibleChanged) === null || ge === void 0 || ge.call(C, X), d(X);
|
|
359
|
+
}
|
|
360
|
+
}), function(Le, X) {
|
|
361
|
+
var ge = Le.className, Ae = Le.style, A = tn(i, ge, t);
|
|
362
|
+
return /* @__PURE__ */ a.createElement("div", {
|
|
363
|
+
ref: pr(on, r, X),
|
|
364
|
+
className: A,
|
|
365
|
+
style: B(B(B(B({
|
|
366
|
+
"--arrow-x": "".concat(m.x || 0, "px"),
|
|
367
|
+
"--arrow-y": "".concat(m.y || 0, "px")
|
|
368
|
+
}, Z), q), Ae), {}, {
|
|
369
|
+
boxSizing: "border-box",
|
|
370
|
+
zIndex: f
|
|
371
|
+
}, o),
|
|
372
|
+
onMouseEnter: re,
|
|
373
|
+
onMouseLeave: de,
|
|
374
|
+
onPointerEnter: te,
|
|
375
|
+
onClick: g,
|
|
376
|
+
onPointerDownCapture: fe
|
|
377
|
+
}, c && /* @__PURE__ */ a.createElement(kt, {
|
|
378
|
+
prefixCls: i,
|
|
379
|
+
arrow: c,
|
|
380
|
+
arrowPos: m,
|
|
381
|
+
align: D
|
|
382
|
+
}), /* @__PURE__ */ a.createElement(qr, {
|
|
383
|
+
cache: !v && !k
|
|
384
|
+
}, He));
|
|
385
|
+
});
|
|
386
|
+
}));
|
|
387
|
+
});
|
|
388
|
+
process.env.NODE_ENV !== "production" && (Ur.displayName = "Popup");
|
|
389
|
+
var Qr = /* @__PURE__ */ a.forwardRef(function(e, r) {
|
|
390
|
+
var n = e.children, t = e.getTriggerDOMNode, i = Rr(n), o = a.useCallback(function(d) {
|
|
391
|
+
et(r, t ? t(d) : d);
|
|
392
|
+
}, [t]), s = Ir(o, nt(n));
|
|
393
|
+
return i ? /* @__PURE__ */ a.cloneElement(n, {
|
|
394
|
+
ref: s
|
|
395
|
+
}) : n;
|
|
396
|
+
});
|
|
397
|
+
process.env.NODE_ENV !== "production" && (Qr.displayName = "TriggerWrapper");
|
|
398
|
+
var Dr = /* @__PURE__ */ a.createContext(null);
|
|
399
|
+
function Er(e) {
|
|
400
|
+
return e ? Array.isArray(e) ? e : [e] : [];
|
|
401
|
+
}
|
|
402
|
+
function Et(e, r, n, t) {
|
|
403
|
+
return a.useMemo(function() {
|
|
404
|
+
var i = Er(n ?? r), o = Er(t ?? r), s = new Set(i), d = new Set(o);
|
|
405
|
+
return e && (s.has("hover") && (s.delete("hover"), s.add("click")), d.has("hover") && (d.delete("hover"), d.add("click"))), [s, d];
|
|
406
|
+
}, [e, r, n, t]);
|
|
407
|
+
}
|
|
408
|
+
function xt() {
|
|
409
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], n = arguments.length > 2 ? arguments[2] : void 0;
|
|
410
|
+
return n ? e[0] === r[0] : e[0] === r[0] && e[1] === r[1];
|
|
411
|
+
}
|
|
412
|
+
function Lt(e, r, n, t) {
|
|
413
|
+
for (var i = n.points, o = Object.keys(e), s = 0; s < o.length; s += 1) {
|
|
414
|
+
var d, v = o[s];
|
|
415
|
+
if (xt((d = e[v]) === null || d === void 0 ? void 0 : d.points, i, t))
|
|
416
|
+
return "".concat(r, "-placement-").concat(v);
|
|
417
|
+
}
|
|
418
|
+
return "";
|
|
419
|
+
}
|
|
420
|
+
function xr(e, r, n, t) {
|
|
421
|
+
return r || (n ? {
|
|
422
|
+
motionName: "".concat(e, "-").concat(n)
|
|
423
|
+
} : t ? {
|
|
424
|
+
motionName: t
|
|
425
|
+
} : null);
|
|
426
|
+
}
|
|
427
|
+
function wn(e) {
|
|
428
|
+
return e.ownerDocument.defaultView;
|
|
429
|
+
}
|
|
430
|
+
function gr(e) {
|
|
431
|
+
for (var r = [], n = e == null ? void 0 : e.parentElement, t = ["hidden", "scroll", "clip", "auto"]; n; ) {
|
|
432
|
+
var i = wn(n).getComputedStyle(n), o = i.overflowX, s = i.overflowY, d = i.overflow;
|
|
433
|
+
[o, s, d].some(function(v) {
|
|
434
|
+
return t.includes(v);
|
|
435
|
+
}) && r.push(n), n = n.parentElement;
|
|
436
|
+
}
|
|
437
|
+
return r;
|
|
438
|
+
}
|
|
439
|
+
function yn(e) {
|
|
440
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
441
|
+
return Number.isNaN(e) ? r : e;
|
|
442
|
+
}
|
|
443
|
+
function hn(e) {
|
|
444
|
+
return yn(parseFloat(e), 0);
|
|
445
|
+
}
|
|
446
|
+
function Lr(e, r) {
|
|
447
|
+
var n = B({}, e);
|
|
448
|
+
return (r || []).forEach(function(t) {
|
|
449
|
+
if (!(t instanceof HTMLBodyElement || t instanceof HTMLHtmlElement)) {
|
|
450
|
+
var i = wn(t).getComputedStyle(t), o = i.overflow, s = i.overflowClipMargin, d = i.borderTopWidth, v = i.borderBottomWidth, h = i.borderLeftWidth, k = i.borderRightWidth, g = t.getBoundingClientRect(), y = t.offsetHeight, c = t.clientHeight, m = t.offsetWidth, D = t.clientWidth, C = hn(d), _ = hn(v), $ = hn(h), b = hn(k), z = yn(Math.round(g.width / m * 1e3) / 1e3), L = yn(Math.round(g.height / y * 1e3) / 1e3), f = (m - D - $ - b) * z, re = (y - c - C - _) * L, de = C * L, te = _ * L, fe = $ * z, ae = b * z, U = 0, Me = 0;
|
|
451
|
+
if (o === "clip") {
|
|
452
|
+
var ve = hn(s);
|
|
453
|
+
U = ve * z, Me = ve * L;
|
|
454
|
+
}
|
|
455
|
+
var Pe = g.x + fe - U, Q = g.y + de - Me, Se = Pe + g.width + 2 * U - fe - ae - f, W = Q + g.height + 2 * Me - de - te - re;
|
|
456
|
+
n.left = Math.max(n.left, Pe), n.top = Math.max(n.top, Q), n.right = Math.min(n.right, Se), n.bottom = Math.min(n.bottom, W);
|
|
457
|
+
}
|
|
458
|
+
}), n;
|
|
459
|
+
}
|
|
460
|
+
function Tr(e) {
|
|
461
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = "".concat(r), t = n.match(/^(.*)\%$/);
|
|
462
|
+
return t ? e * (parseFloat(t[1]) / 100) : parseFloat(n);
|
|
463
|
+
}
|
|
464
|
+
function $r(e, r) {
|
|
465
|
+
var n = r || [], t = x(n, 2), i = t[0], o = t[1];
|
|
466
|
+
return [Tr(e.width, i), Tr(e.height, o)];
|
|
467
|
+
}
|
|
468
|
+
function zr() {
|
|
469
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
470
|
+
return [e[0], e[1]];
|
|
471
|
+
}
|
|
472
|
+
function rn(e, r) {
|
|
473
|
+
var n = r[0], t = r[1], i, o;
|
|
474
|
+
return n === "t" ? o = e.y : n === "b" ? o = e.y + e.height : o = e.y + e.height / 2, t === "l" ? i = e.x : t === "r" ? i = e.x + e.width : i = e.x + e.width / 2, {
|
|
475
|
+
x: i,
|
|
476
|
+
y: o
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
function We(e, r) {
|
|
480
|
+
var n = {
|
|
481
|
+
t: "b",
|
|
482
|
+
b: "t",
|
|
483
|
+
l: "r",
|
|
484
|
+
r: "l"
|
|
485
|
+
};
|
|
486
|
+
return e.map(function(t, i) {
|
|
487
|
+
return i === r ? n[t] || "c" : t;
|
|
488
|
+
}).join("");
|
|
489
|
+
}
|
|
490
|
+
function Tt(e, r, n, t, i, o, s) {
|
|
491
|
+
var d = a.useState({
|
|
492
|
+
ready: !1,
|
|
493
|
+
offsetX: 0,
|
|
494
|
+
offsetY: 0,
|
|
495
|
+
offsetR: 0,
|
|
496
|
+
offsetB: 0,
|
|
497
|
+
arrowX: 0,
|
|
498
|
+
arrowY: 0,
|
|
499
|
+
scaleX: 1,
|
|
500
|
+
scaleY: 1,
|
|
501
|
+
align: i[t] || {}
|
|
502
|
+
}), v = x(d, 2), h = v[0], k = v[1], g = a.useRef(0), y = a.useMemo(function() {
|
|
503
|
+
return r ? gr(r) : [];
|
|
504
|
+
}, [r]), c = a.useRef({}), m = function() {
|
|
505
|
+
c.current = {};
|
|
506
|
+
};
|
|
507
|
+
e || m();
|
|
508
|
+
var D = Je(function() {
|
|
509
|
+
if (r && n && e) {
|
|
510
|
+
let ne = function(nn, Re) {
|
|
511
|
+
var Ie = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Cn, mn = M.x + nn, Wn = M.y + Re, ir = mn + he, or = Wn + O, ur = Math.max(mn, Ie.left), u = Math.max(Wn, Ie.top), l = Math.min(ir, Ie.right), E = Math.min(or, Ie.bottom);
|
|
512
|
+
return Math.max(0, (l - ur) * (E - u));
|
|
513
|
+
}, In = function() {
|
|
514
|
+
Ue = M.y + N, Qe = Ue + O, ke = M.x + P, Xe = ke + he;
|
|
515
|
+
};
|
|
516
|
+
var $, b, z, L, f = r, re = f.ownerDocument, de = wn(f), te = de.getComputedStyle(f), fe = te.width, ae = te.height, U = te.position, Me = f.style.left, ve = f.style.top, Pe = f.style.right, Q = f.style.bottom, Se = f.style.overflow, W = B(B({}, i[t]), o), F = re.createElement("div");
|
|
517
|
+
($ = f.parentElement) === null || $ === void 0 || $.appendChild(F), F.style.left = "".concat(f.offsetLeft, "px"), F.style.top = "".concat(f.offsetTop, "px"), F.style.position = U, F.style.height = "".concat(f.offsetHeight, "px"), F.style.width = "".concat(f.offsetWidth, "px"), f.style.left = "0", f.style.top = "0", f.style.right = "auto", f.style.bottom = "auto", f.style.overflow = "hidden";
|
|
518
|
+
var w;
|
|
519
|
+
if (Array.isArray(n))
|
|
520
|
+
w = {
|
|
521
|
+
x: n[0],
|
|
522
|
+
y: n[1],
|
|
523
|
+
width: 0,
|
|
524
|
+
height: 0
|
|
525
|
+
};
|
|
526
|
+
else {
|
|
527
|
+
var He, ie, H = n.getBoundingClientRect();
|
|
528
|
+
H.x = (He = H.x) !== null && He !== void 0 ? He : H.left, H.y = (ie = H.y) !== null && ie !== void 0 ? ie : H.top, w = {
|
|
529
|
+
x: H.x,
|
|
530
|
+
y: H.y,
|
|
531
|
+
width: H.width,
|
|
532
|
+
height: H.height
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
var M = f.getBoundingClientRect();
|
|
536
|
+
M.x = (b = M.x) !== null && b !== void 0 ? b : M.left, M.y = (z = M.y) !== null && z !== void 0 ? z : M.top;
|
|
537
|
+
var K = re.documentElement, Be = K.clientWidth, an = K.clientHeight, me = K.scrollWidth, Z = K.scrollHeight, xe = K.scrollTop, Fe = K.scrollLeft, O = M.height, he = M.width, oe = w.height, q = w.width, on = {
|
|
538
|
+
left: 0,
|
|
539
|
+
top: 0,
|
|
540
|
+
right: Be,
|
|
541
|
+
bottom: an
|
|
542
|
+
}, Le = {
|
|
543
|
+
left: -Fe,
|
|
544
|
+
top: -xe,
|
|
545
|
+
right: me - Fe,
|
|
546
|
+
bottom: Z - xe
|
|
547
|
+
}, X = W.htmlRegion, ge = "visible", Ae = "visibleFirst";
|
|
548
|
+
X !== "scroll" && X !== Ae && (X = ge);
|
|
549
|
+
var A = X === Ae, Fn = Lr(Le, y), S = Lr(on, y), Cn = X === ge ? S : Fn, Ve = A ? S : Cn;
|
|
550
|
+
f.style.left = "auto", f.style.top = "auto", f.style.right = "0", f.style.bottom = "0";
|
|
551
|
+
var V = f.getBoundingClientRect();
|
|
552
|
+
f.style.left = Me, f.style.top = ve, f.style.right = Pe, f.style.bottom = Q, f.style.overflow = Se, (L = f.parentElement) === null || L === void 0 || L.removeChild(F);
|
|
553
|
+
var Te = yn(Math.round(he / parseFloat(fe) * 1e3) / 1e3), Ne = yn(Math.round(O / parseFloat(ae) * 1e3) / 1e3);
|
|
554
|
+
if (Te === 0 || Ne === 0 || mr(n) && !it(n))
|
|
555
|
+
return;
|
|
556
|
+
var An = W.offset, Vn = W.targetOffset, bn = $r(M, An), ue = x(bn, 2), se = ue[0], Y = ue[1], jn = $r(w, Vn), je = x(jn, 2), p = je[0], $e = je[1];
|
|
557
|
+
w.x -= p, w.y -= $e;
|
|
558
|
+
var qn = W.points || [], Mn = x(qn, 2), Un = Mn[0], Qn = Mn[1], ye = zr(Qn), G = zr(Un), un = rn(w, ye), j = rn(M, G), ze = B({}, W), P = un.x - j.x + se, N = un.y - j.y + Y, le = ne(P, N), qe = ne(P, N, S), sn = rn(w, ["t", "l"]), ee = rn(M, ["t", "l"]), Pn = rn(w, ["b", "r"]), ln = rn(M, ["b", "r"]), _e = W.overflow || {}, Sn = _e.adjustX, Kn = _e.adjustY, cn = _e.shiftX, Oe = _e.shiftY, dn = function(Re) {
|
|
559
|
+
return typeof Re == "boolean" ? Re : Re >= 0;
|
|
560
|
+
}, Ue, Qe, ke, Xe;
|
|
561
|
+
In();
|
|
562
|
+
var Ke = dn(Kn), Nn = G[0] === ye[0];
|
|
563
|
+
if (Ke && G[0] === "t" && (Qe > Ve.bottom || c.current.bt)) {
|
|
564
|
+
var I = N;
|
|
565
|
+
Nn ? I -= O - oe : I = sn.y - ln.y - Y;
|
|
566
|
+
var kn = ne(P, I), Zn = ne(P, I, S);
|
|
567
|
+
// Of course use larger one
|
|
568
|
+
kn > le || kn === le && (!A || // Choose recommend one
|
|
569
|
+
Zn >= qe) ? (c.current.bt = !0, N = I, Y = -Y, ze.points = [We(G, 0), We(ye, 0)]) : c.current.bt = !1;
|
|
570
|
+
}
|
|
571
|
+
if (Ke && G[0] === "b" && (Ue < Ve.top || c.current.tb)) {
|
|
572
|
+
var Ze = N;
|
|
573
|
+
Nn ? Ze += O - oe : Ze = Pn.y - ee.y - Y;
|
|
574
|
+
var Dn = ne(P, Ze), Gn = ne(P, Ze, S);
|
|
575
|
+
// Of course use larger one
|
|
576
|
+
Dn > le || Dn === le && (!A || // Choose recommend one
|
|
577
|
+
Gn >= qe) ? (c.current.tb = !0, N = Ze, Y = -Y, ze.points = [We(G, 0), We(ye, 0)]) : c.current.tb = !1;
|
|
578
|
+
}
|
|
579
|
+
var En = dn(Sn), xn = G[1] === ye[1];
|
|
580
|
+
if (En && G[1] === "l" && (Xe > Ve.right || c.current.rl)) {
|
|
581
|
+
var Ge = P;
|
|
582
|
+
xn ? Ge -= he - q : Ge = sn.x - ln.x - se;
|
|
583
|
+
var Ln = ne(Ge, N), Ye = ne(Ge, N, S);
|
|
584
|
+
// Of course use larger one
|
|
585
|
+
Ln > le || Ln === le && (!A || // Choose recommend one
|
|
586
|
+
Ye >= qe) ? (c.current.rl = !0, P = Ge, se = -se, ze.points = [We(G, 1), We(ye, 1)]) : c.current.rl = !1;
|
|
587
|
+
}
|
|
588
|
+
if (En && G[1] === "r" && (ke < Ve.left || c.current.lr)) {
|
|
589
|
+
var De = P;
|
|
590
|
+
xn ? De += he - q : De = Pn.x - ee.x - se;
|
|
591
|
+
var Tn = ne(De, N), $n = ne(De, N, S);
|
|
592
|
+
// Of course use larger one
|
|
593
|
+
Tn > le || Tn === le && (!A || // Choose recommend one
|
|
594
|
+
$n >= qe) ? (c.current.lr = !0, P = De, se = -se, ze.points = [We(G, 1), We(ye, 1)]) : c.current.lr = !1;
|
|
595
|
+
}
|
|
596
|
+
In();
|
|
597
|
+
var we = cn === !0 ? 0 : cn;
|
|
598
|
+
typeof we == "number" && (ke < S.left && (P -= ke - S.left - se, w.x + q < S.left + we && (P += w.x - S.left + q - we)), Xe > S.right && (P -= Xe - S.right - se, w.x > S.right - we && (P += w.x - S.right + we)));
|
|
599
|
+
var ce = Oe === !0 ? 0 : Oe;
|
|
600
|
+
typeof ce == "number" && (Ue < S.top && (N -= Ue - S.top - Y, w.y + oe < S.top + ce && (N += w.y - S.top + oe - ce)), Qe > S.bottom && (N -= Qe - S.bottom - Y, w.y > S.bottom - ce && (N += w.y - S.bottom + ce)));
|
|
601
|
+
var pe = M.x + P, en = pe + he, Ce = M.y + N, Jn = Ce + O, zn = w.x, On = zn + q, fn = w.y, Xn = fn + oe, Yn = Math.max(pe, zn), pn = Math.min(en, On), _n = (Yn + pn) / 2, er = _n - pe, nr = Math.max(Ce, fn), Rn = Math.min(Jn, Xn), rr = (nr + Rn) / 2, tr = rr - Ce;
|
|
602
|
+
s == null || s(r, ze);
|
|
603
|
+
var vn = V.right - M.x - (P + M.width), be = V.bottom - M.y - (N + M.height);
|
|
604
|
+
Te === 1 && (P = Math.round(P), vn = Math.round(vn)), Ne === 1 && (N = Math.round(N), be = Math.round(be));
|
|
605
|
+
var ar = {
|
|
606
|
+
ready: !0,
|
|
607
|
+
offsetX: P / Te,
|
|
608
|
+
offsetY: N / Ne,
|
|
609
|
+
offsetR: vn / Te,
|
|
610
|
+
offsetB: be / Ne,
|
|
611
|
+
arrowX: er / Te,
|
|
612
|
+
arrowY: tr / Ne,
|
|
613
|
+
scaleX: Te,
|
|
614
|
+
scaleY: Ne,
|
|
615
|
+
align: ze
|
|
616
|
+
};
|
|
617
|
+
k(ar);
|
|
618
|
+
}
|
|
619
|
+
}), C = function() {
|
|
620
|
+
g.current += 1;
|
|
621
|
+
var b = g.current;
|
|
622
|
+
Promise.resolve().then(function() {
|
|
623
|
+
g.current === b && D();
|
|
624
|
+
});
|
|
625
|
+
}, _ = function() {
|
|
626
|
+
k(function(b) {
|
|
627
|
+
return B(B({}, b), {}, {
|
|
628
|
+
ready: !1
|
|
629
|
+
});
|
|
630
|
+
});
|
|
631
|
+
};
|
|
632
|
+
return J(_, [t]), J(function() {
|
|
633
|
+
e || _();
|
|
634
|
+
}, [e]), [h.ready, h.offsetX, h.offsetY, h.offsetR, h.offsetB, h.arrowX, h.arrowY, h.scaleX, h.scaleY, h.align, C];
|
|
635
|
+
}
|
|
636
|
+
function $t(e, r, n, t, i) {
|
|
637
|
+
J(function() {
|
|
638
|
+
if (e && r && n) {
|
|
639
|
+
let g = function() {
|
|
640
|
+
t(), i();
|
|
641
|
+
};
|
|
642
|
+
var o = r, s = n, d = gr(o), v = gr(s), h = wn(s), k = new Set([h].concat(fr(d), fr(v)));
|
|
643
|
+
return k.forEach(function(y) {
|
|
644
|
+
y.addEventListener("scroll", g, {
|
|
645
|
+
passive: !0
|
|
646
|
+
});
|
|
647
|
+
}), h.addEventListener("resize", g, {
|
|
648
|
+
passive: !0
|
|
649
|
+
}), t(), function() {
|
|
650
|
+
k.forEach(function(y) {
|
|
651
|
+
y.removeEventListener("scroll", g), h.removeEventListener("resize", g);
|
|
652
|
+
});
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
}, [e, r, n]);
|
|
656
|
+
}
|
|
657
|
+
function zt(e, r, n, t, i, o, s, d) {
|
|
658
|
+
var v = a.useRef(e);
|
|
659
|
+
v.current = e;
|
|
660
|
+
var h = a.useRef(!1);
|
|
661
|
+
a.useEffect(function() {
|
|
662
|
+
if (r && t && (!i || o)) {
|
|
663
|
+
var g = function() {
|
|
664
|
+
h.current = !1;
|
|
665
|
+
}, y = function(z) {
|
|
666
|
+
var L;
|
|
667
|
+
v.current && !s(((L = z.composedPath) === null || L === void 0 || (L = L.call(z)) === null || L === void 0 ? void 0 : L[0]) || z.target) && !h.current && d(!1);
|
|
668
|
+
}, c = wn(t);
|
|
669
|
+
c.addEventListener("pointerdown", g, !0), c.addEventListener("mousedown", y, !0), c.addEventListener("contextmenu", y, !0);
|
|
670
|
+
var m = hr(n);
|
|
671
|
+
if (m && (m.addEventListener("mousedown", y, !0), m.addEventListener("contextmenu", y, !0)), process.env.NODE_ENV !== "production") {
|
|
672
|
+
var D, C, _ = n == null || (D = n.getRootNode) === null || D === void 0 ? void 0 : D.call(n), $ = (C = t.getRootNode) === null || C === void 0 ? void 0 : C.call(t);
|
|
673
|
+
rt(_ === $, "trigger element and popup element should in same shadow root.");
|
|
674
|
+
}
|
|
675
|
+
return function() {
|
|
676
|
+
c.removeEventListener("pointerdown", g, !0), c.removeEventListener("mousedown", y, !0), c.removeEventListener("contextmenu", y, !0), m && (m.removeEventListener("mousedown", y, !0), m.removeEventListener("contextmenu", y, !0));
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
}, [r, n, t, i, o]);
|
|
680
|
+
function k() {
|
|
681
|
+
h.current = !0;
|
|
682
|
+
}
|
|
683
|
+
return k;
|
|
684
|
+
}
|
|
685
|
+
var _t = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
|
|
686
|
+
function Rt() {
|
|
687
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : yr, r = /* @__PURE__ */ a.forwardRef(function(n, t) {
|
|
688
|
+
var i = n.prefixCls, o = i === void 0 ? "rc-trigger-popup" : i, s = n.children, d = n.action, v = d === void 0 ? "hover" : d, h = n.showAction, k = n.hideAction, g = n.popupVisible, y = n.defaultPopupVisible, c = n.onPopupVisibleChange, m = n.afterPopupVisibleChange, D = n.mouseEnterDelay, C = n.mouseLeaveDelay, _ = C === void 0 ? 0.1 : C, $ = n.focusDelay, b = n.blurDelay, z = n.mask, L = n.maskClosable, f = L === void 0 ? !0 : L, re = n.getPopupContainer, de = n.forceRender, te = n.autoDestroy, fe = n.destroyPopupOnHide, ae = n.popup, U = n.popupClassName, Me = n.popupStyle, ve = n.popupPlacement, Pe = n.builtinPlacements, Q = Pe === void 0 ? {} : Pe, Se = n.popupAlign, W = n.zIndex, F = n.stretch, w = n.getPopupClassNameFromAlign, He = n.fresh, ie = n.alignPoint, H = n.onPopupClick, M = n.onPopupAlign, K = n.arrow, Be = n.popupMotion, an = n.maskMotion, me = n.popupTransitionName, Z = n.popupAnimation, xe = n.maskTransitionName, Fe = n.maskAnimation, O = n.className, he = n.getTriggerDOMNode, oe = tt(n, _t), q = te || fe || !1, on = a.useState(!1), Le = x(on, 2), X = Le[0], ge = Le[1];
|
|
689
|
+
J(function() {
|
|
690
|
+
ge(Nt());
|
|
691
|
+
}, []);
|
|
692
|
+
var Ae = a.useRef({}), A = a.useContext(Dr), Fn = a.useMemo(function() {
|
|
693
|
+
return {
|
|
694
|
+
registerSubPopup: function(l, E) {
|
|
695
|
+
Ae.current[l] = E, A == null || A.registerSubPopup(l, E);
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
}, [A]), S = St(), Cn = a.useState(null), Ve = x(Cn, 2), V = Ve[0], Te = Ve[1], Ne = a.useRef(null), An = Je(function(u) {
|
|
699
|
+
Ne.current = u, mr(u) && V !== u && Te(u), A == null || A.registerSubPopup(S, u);
|
|
700
|
+
}), Vn = a.useState(null), bn = x(Vn, 2), ue = bn[0], se = bn[1], Y = a.useRef(null), jn = Je(function(u) {
|
|
701
|
+
mr(u) && ue !== u && (se(u), Y.current = u);
|
|
702
|
+
}), je = a.Children.only(s), p = (je == null ? void 0 : je.props) || {}, $e = {}, qn = Je(function(u) {
|
|
703
|
+
var l, E, R = ue;
|
|
704
|
+
return (R == null ? void 0 : R.contains(u)) || ((l = hr(R)) === null || l === void 0 ? void 0 : l.host) === u || u === R || (V == null ? void 0 : V.contains(u)) || ((E = hr(V)) === null || E === void 0 ? void 0 : E.host) === u || u === V || Object.values(Ae.current).some(function(T) {
|
|
705
|
+
return (T == null ? void 0 : T.contains(u)) || u === T;
|
|
706
|
+
});
|
|
707
|
+
}), Mn = xr(o, Be, Z, me), Un = xr(o, an, Fe, xe), Qn = a.useState(y || !1), ye = x(Qn, 2), G = ye[0], un = ye[1], j = g ?? G, ze = Je(function(u) {
|
|
708
|
+
g === void 0 && un(u);
|
|
709
|
+
});
|
|
710
|
+
J(function() {
|
|
711
|
+
un(g || !1);
|
|
712
|
+
}, [g]);
|
|
713
|
+
var P = a.useRef(j);
|
|
714
|
+
P.current = j;
|
|
715
|
+
var N = a.useRef([]);
|
|
716
|
+
N.current = [];
|
|
717
|
+
var le = Je(function(u) {
|
|
718
|
+
var l;
|
|
719
|
+
ze(u), ((l = N.current[N.current.length - 1]) !== null && l !== void 0 ? l : j) !== u && (N.current.push(u), c == null || c(u));
|
|
720
|
+
}), qe = a.useRef(), sn = function() {
|
|
721
|
+
clearTimeout(qe.current);
|
|
722
|
+
}, ee = function(l) {
|
|
723
|
+
var E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
724
|
+
sn(), E === 0 ? le(l) : qe.current = setTimeout(function() {
|
|
725
|
+
le(l);
|
|
726
|
+
}, E * 1e3);
|
|
727
|
+
};
|
|
728
|
+
a.useEffect(function() {
|
|
729
|
+
return sn;
|
|
730
|
+
}, []);
|
|
731
|
+
var Pn = a.useState(!1), ln = x(Pn, 2), _e = ln[0], Sn = ln[1];
|
|
732
|
+
J(function(u) {
|
|
733
|
+
(!u || j) && Sn(!0);
|
|
734
|
+
}, [j]);
|
|
735
|
+
var Kn = a.useState(null), cn = x(Kn, 2), Oe = cn[0], dn = cn[1], Ue = a.useState(null), Qe = x(Ue, 2), ke = Qe[0], Xe = Qe[1], Ke = function(l) {
|
|
736
|
+
Xe([l.clientX, l.clientY]);
|
|
737
|
+
}, Nn = Tt(j, V, ie && ke !== null ? ke : ue, ve, Q, Se, M), I = x(Nn, 11), kn = I[0], Zn = I[1], Ze = I[2], Dn = I[3], Gn = I[4], En = I[5], xn = I[6], Ge = I[7], Ln = I[8], Ye = I[9], De = I[10], Tn = Et(X, v, h, k), $n = x(Tn, 2), we = $n[0], ce = $n[1], pe = we.has("click"), en = ce.has("click") || ce.has("contextMenu"), Ce = Je(function() {
|
|
738
|
+
_e || De();
|
|
739
|
+
}), Jn = function() {
|
|
740
|
+
P.current && ie && en && ee(!1);
|
|
741
|
+
};
|
|
742
|
+
$t(j, ue, V, Ce, Jn), J(function() {
|
|
743
|
+
Ce();
|
|
744
|
+
}, [ke, ve]), J(function() {
|
|
745
|
+
j && !(Q != null && Q[ve]) && Ce();
|
|
746
|
+
}, [JSON.stringify(Se)]);
|
|
747
|
+
var zn = a.useMemo(function() {
|
|
748
|
+
var u = Lt(Q, o, Ye, ie);
|
|
749
|
+
return tn(u, w == null ? void 0 : w(Ye));
|
|
750
|
+
}, [Ye, w, Q, o, ie]);
|
|
751
|
+
a.useImperativeHandle(t, function() {
|
|
752
|
+
return {
|
|
753
|
+
nativeElement: Y.current,
|
|
754
|
+
popupElement: Ne.current,
|
|
755
|
+
forceAlign: Ce
|
|
756
|
+
};
|
|
757
|
+
});
|
|
758
|
+
var On = a.useState(0), fn = x(On, 2), Xn = fn[0], Yn = fn[1], pn = a.useState(0), _n = x(pn, 2), er = _n[0], nr = _n[1], Rn = function() {
|
|
759
|
+
if (F && ue) {
|
|
760
|
+
var l = ue.getBoundingClientRect();
|
|
761
|
+
Yn(l.width), nr(l.height);
|
|
762
|
+
}
|
|
763
|
+
}, rr = function() {
|
|
764
|
+
Rn(), Ce();
|
|
765
|
+
}, tr = function(l) {
|
|
766
|
+
Sn(!1), De(), m == null || m(l);
|
|
767
|
+
}, vn = function() {
|
|
768
|
+
return new Promise(function(l) {
|
|
769
|
+
Rn(), dn(function() {
|
|
770
|
+
return l;
|
|
771
|
+
});
|
|
772
|
+
});
|
|
773
|
+
};
|
|
774
|
+
J(function() {
|
|
775
|
+
Oe && (De(), Oe(), dn(null));
|
|
776
|
+
}, [Oe]);
|
|
777
|
+
function be(u, l, E, R) {
|
|
778
|
+
$e[u] = function(T) {
|
|
779
|
+
var Hn;
|
|
780
|
+
R == null || R(T), ee(l, E);
|
|
781
|
+
for (var sr = arguments.length, wr = new Array(sr > 1 ? sr - 1 : 0), Bn = 1; Bn < sr; Bn++)
|
|
782
|
+
wr[Bn - 1] = arguments[Bn];
|
|
783
|
+
(Hn = p[u]) === null || Hn === void 0 || Hn.call.apply(Hn, [p, T].concat(wr));
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
(pe || en) && ($e.onClick = function(u) {
|
|
787
|
+
var l;
|
|
788
|
+
P.current && en ? ee(!1) : !P.current && pe && (Ke(u), ee(!0));
|
|
789
|
+
for (var E = arguments.length, R = new Array(E > 1 ? E - 1 : 0), T = 1; T < E; T++)
|
|
790
|
+
R[T - 1] = arguments[T];
|
|
791
|
+
(l = p.onClick) === null || l === void 0 || l.call.apply(l, [p, u].concat(R));
|
|
792
|
+
});
|
|
793
|
+
var ar = zt(j, en, ue, V, z, f, qn, ee), ne = we.has("hover"), In = ce.has("hover"), nn, Re;
|
|
794
|
+
ne && (be("onMouseEnter", !0, D, function(u) {
|
|
795
|
+
Ke(u);
|
|
796
|
+
}), be("onPointerEnter", !0, D, function(u) {
|
|
797
|
+
Ke(u);
|
|
798
|
+
}), nn = function(l) {
|
|
799
|
+
(j || _e) && V !== null && V !== void 0 && V.contains(l.target) && ee(!0, D);
|
|
800
|
+
}, ie && ($e.onMouseMove = function(u) {
|
|
801
|
+
var l;
|
|
802
|
+
(l = p.onMouseMove) === null || l === void 0 || l.call(p, u);
|
|
803
|
+
})), In && (be("onMouseLeave", !1, _), be("onPointerLeave", !1, _), Re = function() {
|
|
804
|
+
ee(!1, _);
|
|
805
|
+
}), we.has("focus") && be("onFocus", !0, $), ce.has("focus") && be("onBlur", !1, b), we.has("contextMenu") && ($e.onContextMenu = function(u) {
|
|
806
|
+
var l;
|
|
807
|
+
P.current && ce.has("contextMenu") ? ee(!1) : (Ke(u), ee(!0)), u.preventDefault();
|
|
808
|
+
for (var E = arguments.length, R = new Array(E > 1 ? E - 1 : 0), T = 1; T < E; T++)
|
|
809
|
+
R[T - 1] = arguments[T];
|
|
810
|
+
(l = p.onContextMenu) === null || l === void 0 || l.call.apply(l, [p, u].concat(R));
|
|
811
|
+
}), O && ($e.className = tn(p.className, O));
|
|
812
|
+
var Ie = B(B({}, p), $e), mn = {}, Wn = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
|
|
813
|
+
Wn.forEach(function(u) {
|
|
814
|
+
oe[u] && (mn[u] = function() {
|
|
815
|
+
for (var l, E = arguments.length, R = new Array(E), T = 0; T < E; T++)
|
|
816
|
+
R[T] = arguments[T];
|
|
817
|
+
(l = Ie[u]) === null || l === void 0 || l.call.apply(l, [Ie].concat(R)), oe[u].apply(oe, R);
|
|
818
|
+
});
|
|
819
|
+
});
|
|
820
|
+
var ir = /* @__PURE__ */ a.cloneElement(je, B(B({}, Ie), mn)), or = {
|
|
821
|
+
x: En,
|
|
822
|
+
y: xn
|
|
823
|
+
}, ur = K ? B({}, K !== !0 ? K : {}) : null;
|
|
824
|
+
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(Fr, {
|
|
825
|
+
disabled: !j,
|
|
826
|
+
ref: jn,
|
|
827
|
+
onResize: rr
|
|
828
|
+
}, /* @__PURE__ */ a.createElement(Qr, {
|
|
829
|
+
getTriggerDOMNode: he
|
|
830
|
+
}, ir)), /* @__PURE__ */ a.createElement(Dr.Provider, {
|
|
831
|
+
value: Fn
|
|
832
|
+
}, /* @__PURE__ */ a.createElement(Ur, {
|
|
833
|
+
portal: e,
|
|
834
|
+
ref: An,
|
|
835
|
+
prefixCls: o,
|
|
836
|
+
popup: ae,
|
|
837
|
+
className: tn(U, zn),
|
|
838
|
+
style: Me,
|
|
839
|
+
target: ue,
|
|
840
|
+
onMouseEnter: nn,
|
|
841
|
+
onMouseLeave: Re,
|
|
842
|
+
onPointerEnter: nn,
|
|
843
|
+
zIndex: W,
|
|
844
|
+
open: j,
|
|
845
|
+
keepDom: _e,
|
|
846
|
+
fresh: He,
|
|
847
|
+
onClick: H,
|
|
848
|
+
onPointerDownCapture: ar,
|
|
849
|
+
mask: z,
|
|
850
|
+
motion: Mn,
|
|
851
|
+
maskMotion: Un,
|
|
852
|
+
onVisibleChanged: tr,
|
|
853
|
+
onPrepare: vn,
|
|
854
|
+
forceRender: de,
|
|
855
|
+
autoDestroy: q,
|
|
856
|
+
getPopupContainer: re,
|
|
857
|
+
align: Ye,
|
|
858
|
+
arrow: ur,
|
|
859
|
+
arrowPos: or,
|
|
860
|
+
ready: kn,
|
|
861
|
+
offsetX: Zn,
|
|
862
|
+
offsetY: Ze,
|
|
863
|
+
offsetR: Dn,
|
|
864
|
+
offsetB: Gn,
|
|
865
|
+
onAlign: Ce,
|
|
866
|
+
stretch: F,
|
|
867
|
+
targetWidth: Xn / Ge,
|
|
868
|
+
targetHeight: er / Ln
|
|
869
|
+
})));
|
|
870
|
+
});
|
|
871
|
+
return process.env.NODE_ENV !== "production" && (r.displayName = "Trigger"), r;
|
|
872
|
+
}
|
|
873
|
+
const Zt = Rt(yr);
|
|
874
|
+
export {
|
|
875
|
+
Vt as K,
|
|
876
|
+
Zt as T,
|
|
877
|
+
jt as a,
|
|
878
|
+
Ut as b,
|
|
879
|
+
Nt as c,
|
|
880
|
+
Qt as g,
|
|
881
|
+
Kt as i,
|
|
882
|
+
qt as u,
|
|
883
|
+
Ar as z
|
|
884
|
+
};
|